@ozdao/martyrs 0.2.452 → 0.2.453
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Media-Bx_un17A.js → Media-BsgJlo-X.js} +1 -1
- package/dist/{Media-_5Qittnv.mjs → Media-CxRfrG2S.mjs} +1 -1
- package/dist/{main-DZCereaK.mjs → main-7FA_ai95.mjs} +2 -2
- package/dist/{main-AHluqkEA.js → main-Zocv7IVl.js} +2 -2
- package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
- package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
- package/dist/martyrs/src/components/Button/Button.vue.cjs +1 -1
- package/dist/martyrs/src/components/Button/Button.vue.js +1 -1
- package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue.cjs → Loader.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Loader/{Loader.vue.js → Loader.vue2.js} +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue.cjs.map → Loader.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
- package/dist/martyrs/src/components/Popup/{Popup.vue.cjs → Popup.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Popup/{Popup.vue.js → Popup.vue2.js} +2 -2
- package/dist/martyrs/src/components/Popup/{Popup.vue.cjs.map → Popup.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.cjs → SelectMulti.vue.cjs} +2 -2
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js.map → SelectMulti.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js → SelectMulti.vue.js} +2 -2
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +1 -0
- package/dist/martyrs/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/martyrs/src/components/Slider/Slider.vue.js +1 -1
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs → Tooltip.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.js → Tooltip.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs.map → Tooltip.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +3 -3
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +3 -3
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +3 -3
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs +13 -51
- package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js +13 -51
- package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +38 -6
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +38 -6
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs +27 -17
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.js +27 -17
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.cjs +1 -3
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js +1 -3
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs +4 -4
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +4 -4
- package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.cjs +0 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.js +0 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/Images360.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/style.css +1 -53
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +1 -1
- package/src/modules/auth/views/components/layouts/Auth.vue +2 -2
- package/src/modules/auth/views/components/pages/SignIn.vue +1 -1
- package/src/modules/globals/views/components/layouts/App.vue +5 -94
- package/src/modules/globals/views/components/layouts/Client.vue +45 -5
- package/src/modules/globals/views/mixins/mixins.js +35 -18
- package/src/modules/icons/logos/Logotype.vue +1 -1
- package/src/modules/marketplace/views/components/pages/Catalog.vue +1 -3
- package/src/modules/orders/components/partials/ShopCart.vue +4 -15
- package/src/modules/orders/store/shopcart.js +0 -2
- package/src/styles/base/borders.scss +7 -1
- package/src/styles/layout.scss +3 -41
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +0 -1
- package/dist/martyrs/src/components/Popup/Popup.vue.js.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +0 -1
|
@@ -4,8 +4,8 @@ const vue = require("vue");
|
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
const globals = require("../../store/globals.cjs");
|
|
6
6
|
const Status = require("../../../../../components/Status/Status.vue.cjs");
|
|
7
|
-
const Popup = require("../../../../../components/Popup/Popup.
|
|
8
|
-
const Loader = require("../../../../../components/Loader/Loader.
|
|
7
|
+
const Popup = require("../../../../../components/Popup/Popup.vue2.cjs");
|
|
8
|
+
const Loader = require("../../../../../components/Loader/Loader.vue2.cjs");
|
|
9
9
|
require("vue-i18n");
|
|
10
10
|
;/* empty css */
|
|
11
11
|
require("../../../../orders/store/shopcart.cjs");
|
|
@@ -13,8 +13,14 @@ require("../../../../auth/views/store/auth.cjs");
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
const LocationSelection = require("../partials/LocationSelection.vue.cjs");
|
|
15
15
|
const ShopCart = require("../../../../orders/components/partials/ShopCart.vue.cjs");
|
|
16
|
+
const index$1 = require("../../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.cjs");
|
|
17
|
+
const index = require("../../../../../../../node_modules/.pnpm/@capacitor_keyboard@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/keyboard/dist/esm/index.cjs");
|
|
16
18
|
;/* empty css */
|
|
17
|
-
const _hoisted_1 = {
|
|
19
|
+
const _hoisted_1 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "w-100 h-100"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_2 = { class: "rows-1-min0_max1 z-index-1 pos-relative w-100 h-100" };
|
|
18
24
|
const _sfc_main = {
|
|
19
25
|
__name: "Client",
|
|
20
26
|
setup(__props) {
|
|
@@ -50,7 +56,17 @@ const _sfc_main = {
|
|
|
50
56
|
const handleScroll = () => {
|
|
51
57
|
scrollOffset.value = event.target.scrollTop;
|
|
52
58
|
};
|
|
59
|
+
const FirstUse = vue.ref(false);
|
|
60
|
+
if (process.env.MOBILE_APP === "ios") index.Keyboard.setAccessoryBarVisible({ isVisible: false });
|
|
61
|
+
async function getFirstUse() {
|
|
62
|
+
const ret = await index$1.Preferences.get({ key: "first-use" });
|
|
63
|
+
FirstUse.value = ret.value ? JSON.parse(ret.value) : true;
|
|
64
|
+
}
|
|
65
|
+
const updateFirstUse = (value) => {
|
|
66
|
+
FirstUse.value = value;
|
|
67
|
+
};
|
|
53
68
|
vue.onMounted(async () => {
|
|
69
|
+
await getFirstUse();
|
|
54
70
|
const savedPosition = localStorage.getItem("position");
|
|
55
71
|
if (savedPosition) {
|
|
56
72
|
globals.state.position = JSON.parse(savedPosition);
|
|
@@ -69,7 +85,7 @@ const _sfc_main = {
|
|
|
69
85
|
const _component_router_view = vue.resolveComponent("router-view");
|
|
70
86
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
71
87
|
id: "app-wrapper",
|
|
72
|
-
class: vue.normalizeClass(["pos-relative o-hidden", {
|
|
88
|
+
class: vue.normalizeClass(["flex flex-column h-100 w-100 pos-relative o-hidden", {
|
|
73
89
|
"pd-t-extra": _ctx.MOBILE_APP === "ios",
|
|
74
90
|
"bg-white": headerTheme.value === "light",
|
|
75
91
|
"bg-black": headerTheme.value === "dark"
|
|
@@ -87,6 +103,22 @@ const _sfc_main = {
|
|
|
87
103
|
]),
|
|
88
104
|
_: 1
|
|
89
105
|
}),
|
|
106
|
+
vue.createVNode(vue.Transition, {
|
|
107
|
+
name: "moveFromTop",
|
|
108
|
+
mode: "out-in"
|
|
109
|
+
}, {
|
|
110
|
+
default: vue.withCtx(() => [
|
|
111
|
+
FirstUse.value && vue.unref(route).meta.walkthrough ? (vue.openBlock(), vue.createElementBlock("section", _hoisted_1, [
|
|
112
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(route).meta.walkthrough), {
|
|
113
|
+
name: "Walkthrough",
|
|
114
|
+
onUpdateFirstUse: updateFirstUse,
|
|
115
|
+
slides: [1, 2, 3],
|
|
116
|
+
class: "tab"
|
|
117
|
+
}, null, 32))
|
|
118
|
+
])) : vue.createCommentVNode("", true)
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
}),
|
|
90
122
|
!_ctx.MOBILE_APP && vue.unref(route).meta.header ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(route).meta.header), {
|
|
91
123
|
key: 0,
|
|
92
124
|
ref_key: "header",
|
|
@@ -138,7 +170,7 @@ const _sfc_main = {
|
|
|
138
170
|
id: "screen",
|
|
139
171
|
ref: "screen",
|
|
140
172
|
onScroll: handleScroll,
|
|
141
|
-
class: vue.normalizeClass(["flex flex-nowrap
|
|
173
|
+
class: vue.normalizeClass(["flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out", {
|
|
142
174
|
"": _ctx.MOBILE_APP === "ios"
|
|
143
175
|
}])
|
|
144
176
|
}, [
|
|
@@ -177,7 +209,7 @@ const _sfc_main = {
|
|
|
177
209
|
]),
|
|
178
210
|
_: 1
|
|
179
211
|
}, 40, ["stateSidebar", "widthHidden", "width", "theme"])) : vue.createCommentVNode("", true),
|
|
180
|
-
vue.createElementVNode("div",
|
|
212
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
181
213
|
globals.state.error.show ? (vue.openBlock(), vue.createBlock(Status.default, {
|
|
182
214
|
key: 0,
|
|
183
215
|
data: globals.state.error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\t\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t \n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["ref","useRoute","globals.state","computed","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiLE,QAAI,OAAOA,IAAAA,IAAI,KAAK;AAEpB,UAAM,OAAOA,IAAAA,IAAI,IAAI;AAErB,UAAM,gBAAgBA,IAAG,IAAC,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQC,UAAQ,SAAA;AAGtB,UAAM,cAAcD,IAAG,IAAC,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BE,cAAa,MAAC,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAeF,IAAAA,IAAI,CAAC;AAE1B,UAAM,SAASA,IAAAA,IAAI,IAAI;AAEvB,UAAM,cAAcG,IAAAA,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAEDC,QAAAA,UAAU,YAAY;AAYrB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBF,gBAAAA,MAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,gBAAa,MAAC,sBAAsB;AAAA,MACxC,OAAU;AACNA,gBAAa,MAAC,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Client.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t <!-- rows-1-min0_max1 z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n import { Keyboard } from '@capacitor/keyboard';\n\n if (process.env.MOBILE_APP === 'ios') Keyboard.setAccessoryBarVisible({ isVisible: false }) \n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["ref","useRoute","globals.state","computed","Keyboard","Preferences","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsME,QAAI,OAAOA,IAAAA,IAAI,KAAK;AAEpB,UAAM,OAAOA,IAAAA,IAAI,IAAI;AAErB,UAAM,gBAAgBA,IAAG,IAAC,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQC,UAAQ,SAAA;AAGtB,UAAM,cAAcD,IAAG,IAAC,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BE,cAAa,MAAC,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAeF,IAAAA,IAAI,CAAC;AAE1B,UAAM,SAASA,IAAAA,IAAI,IAAI;AAEvB,UAAM,cAAcG,IAAAA,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAIA,UAAM,WAAWH,IAAG,IAAC,KAAK;AAK1B,QAAI,QAAQ,IAAI,eAAe,MAAOI,OAAQ,SAAC,uBAAuB,EAAE,WAAW,OAAO;AAE1F,mBAAe,cAAc;AAC3B,YAAM,MAAM,MAAMC,QAAW,YAAC,IAAI,EAAE,KAAK,aAAa;AACtD,eAAS,QAAQ,IAAI,QAAQ,KAAK,MAAM,IAAI,KAAK,IAAI;AAAA,IACzD;AAEE,UAAM,iBAAiB,CAAC,UAAU;AAChC,eAAS,QAAQ;AAAA,IACrB;AAECC,QAAAA,UAAU,YAAY;AACpB,YAAM,YAAW;AAYlB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBJ,gBAAAA,MAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,gBAAa,MAAC,sBAAsB;AAAA,MACxC,OAAU;AACNA,gBAAa,MAAC,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,8 +2,8 @@ import { ref, computed, onMounted, resolveComponent, createElementBlock, openBlo
|
|
|
2
2
|
import { useRoute } from "vue-router";
|
|
3
3
|
import { state } from "../../store/globals.js";
|
|
4
4
|
import _sfc_main$4 from "../../../../../components/Status/Status.vue.js";
|
|
5
|
-
import _sfc_main$1 from "../../../../../components/Popup/Popup.
|
|
6
|
-
import Loader from "../../../../../components/Loader/Loader.
|
|
5
|
+
import _sfc_main$1 from "../../../../../components/Popup/Popup.vue2.js";
|
|
6
|
+
import Loader from "../../../../../components/Loader/Loader.vue2.js";
|
|
7
7
|
import "vue-i18n";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import "../../../../orders/store/shopcart.js";
|
|
@@ -11,8 +11,14 @@ import "../../../../auth/views/store/auth.js";
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
import _sfc_main$2 from "../partials/LocationSelection.vue.js";
|
|
13
13
|
import _sfc_main$3 from "../../../../orders/components/partials/ShopCart.vue.js";
|
|
14
|
+
import { Preferences } from "../../../../../../node_modules/.pnpm/@capacitor_preferences@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/preferences/dist/esm/index.js";
|
|
15
|
+
import { Keyboard } from "../../../../../../../node_modules/.pnpm/@capacitor_keyboard@7.0.1_@capacitor_core@7.2.0/node_modules/@capacitor/keyboard/dist/esm/index.js";
|
|
14
16
|
/* empty css */
|
|
15
|
-
const _hoisted_1 = {
|
|
17
|
+
const _hoisted_1 = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "w-100 h-100"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_2 = { class: "rows-1-min0_max1 z-index-1 pos-relative w-100 h-100" };
|
|
16
22
|
const _sfc_main = {
|
|
17
23
|
__name: "Client",
|
|
18
24
|
setup(__props) {
|
|
@@ -48,7 +54,17 @@ const _sfc_main = {
|
|
|
48
54
|
const handleScroll = () => {
|
|
49
55
|
scrollOffset.value = event.target.scrollTop;
|
|
50
56
|
};
|
|
57
|
+
const FirstUse = ref(false);
|
|
58
|
+
if (process.env.MOBILE_APP === "ios") Keyboard.setAccessoryBarVisible({ isVisible: false });
|
|
59
|
+
async function getFirstUse() {
|
|
60
|
+
const ret = await Preferences.get({ key: "first-use" });
|
|
61
|
+
FirstUse.value = ret.value ? JSON.parse(ret.value) : true;
|
|
62
|
+
}
|
|
63
|
+
const updateFirstUse = (value) => {
|
|
64
|
+
FirstUse.value = value;
|
|
65
|
+
};
|
|
51
66
|
onMounted(async () => {
|
|
67
|
+
await getFirstUse();
|
|
52
68
|
const savedPosition = localStorage.getItem("position");
|
|
53
69
|
if (savedPosition) {
|
|
54
70
|
state.position = JSON.parse(savedPosition);
|
|
@@ -67,7 +83,7 @@ const _sfc_main = {
|
|
|
67
83
|
const _component_router_view = resolveComponent("router-view");
|
|
68
84
|
return openBlock(), createElementBlock("div", {
|
|
69
85
|
id: "app-wrapper",
|
|
70
|
-
class: normalizeClass(["pos-relative o-hidden", {
|
|
86
|
+
class: normalizeClass(["flex flex-column h-100 w-100 pos-relative o-hidden", {
|
|
71
87
|
"pd-t-extra": _ctx.MOBILE_APP === "ios",
|
|
72
88
|
"bg-white": headerTheme.value === "light",
|
|
73
89
|
"bg-black": headerTheme.value === "dark"
|
|
@@ -85,6 +101,22 @@ const _sfc_main = {
|
|
|
85
101
|
]),
|
|
86
102
|
_: 1
|
|
87
103
|
}),
|
|
104
|
+
createVNode(Transition, {
|
|
105
|
+
name: "moveFromTop",
|
|
106
|
+
mode: "out-in"
|
|
107
|
+
}, {
|
|
108
|
+
default: withCtx(() => [
|
|
109
|
+
FirstUse.value && unref(route).meta.walkthrough ? (openBlock(), createElementBlock("section", _hoisted_1, [
|
|
110
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.walkthrough), {
|
|
111
|
+
name: "Walkthrough",
|
|
112
|
+
onUpdateFirstUse: updateFirstUse,
|
|
113
|
+
slides: [1, 2, 3],
|
|
114
|
+
class: "tab"
|
|
115
|
+
}, null, 32))
|
|
116
|
+
])) : createCommentVNode("", true)
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}),
|
|
88
120
|
!_ctx.MOBILE_APP && unref(route).meta.header ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.header), {
|
|
89
121
|
key: 0,
|
|
90
122
|
ref_key: "header",
|
|
@@ -136,7 +168,7 @@ const _sfc_main = {
|
|
|
136
168
|
id: "screen",
|
|
137
169
|
ref: "screen",
|
|
138
170
|
onScroll: handleScroll,
|
|
139
|
-
class: normalizeClass(["flex flex-nowrap
|
|
171
|
+
class: normalizeClass(["flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out", {
|
|
140
172
|
"": _ctx.MOBILE_APP === "ios"
|
|
141
173
|
}])
|
|
142
174
|
}, [
|
|
@@ -175,7 +207,7 @@ const _sfc_main = {
|
|
|
175
207
|
]),
|
|
176
208
|
_: 1
|
|
177
209
|
}, 40, ["stateSidebar", "widthHidden", "width", "theme"])) : createCommentVNode("", true),
|
|
178
|
-
createElementVNode("div",
|
|
210
|
+
createElementVNode("div", _hoisted_2, [
|
|
179
211
|
state.error.show ? (openBlock(), createBlock(_sfc_main$4, {
|
|
180
212
|
key: 0,
|
|
181
213
|
data: state.error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\t\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t \n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["globals.state"],"mappings":";;;;;;;;;;;;;;;;;;AAiLE,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AAErB,UAAM,gBAAgB,IAAI,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQ,SAAQ;AAGtB,UAAM,cAAc,IAAI,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BA,YAAc,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAe,IAAI,CAAC;AAE1B,UAAM,SAAS,IAAI,IAAI;AAEvB,UAAM,cAAc,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAED,cAAU,YAAY;AAYrB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBA,cAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,cAAc,sBAAsB;AAAA,MACxC,OAAU;AACNA,cAAc,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t <!-- rows-1-min0_max1 z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n import { Keyboard } from '@capacitor/keyboard';\n\n if (process.env.MOBILE_APP === 'ios') Keyboard.setAccessoryBarVisible({ isVisible: false }) \n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["globals.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAsME,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AAErB,UAAM,gBAAgB,IAAI,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQ,SAAQ;AAGtB,UAAM,cAAc,IAAI,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BA,YAAc,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAe,IAAI,CAAC;AAE1B,UAAM,SAAS,IAAI,IAAI;AAEvB,UAAM,cAAc,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAIA,UAAM,WAAW,IAAI,KAAK;AAK1B,QAAI,QAAQ,IAAI,eAAe,MAAO,UAAS,uBAAuB,EAAE,WAAW,OAAO;AAE1F,mBAAe,cAAc;AAC3B,YAAM,MAAM,MAAM,YAAY,IAAI,EAAE,KAAK,aAAa;AACtD,eAAS,QAAQ,IAAI,QAAQ,KAAK,MAAM,IAAI,KAAK,IAAI;AAAA,IACzD;AAEE,UAAM,iBAAiB,CAAC,UAAU;AAChC,eAAS,QAAQ;AAAA,IACrB;AAEC,cAAU,YAAY;AACpB,YAAM,YAAW;AAYlB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBA,cAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,cAAc,sBAAsB;AAAA,MACxC,OAAU;AACNA,cAAc,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const globals = require("../store/globals.cjs");
|
|
4
4
|
function useGlobalMixins() {
|
|
5
|
-
const isClientSide = typeof window !== "undefined";
|
|
6
5
|
const isAdmin = (roles) => {
|
|
7
6
|
if (roles) {
|
|
8
7
|
const isAdmin2 = roles.includes("ROLE_ADMIN") ? roles.includes("ROLE_ADMIN") : false;
|
|
@@ -142,35 +141,46 @@ function useGlobalMixins() {
|
|
|
142
141
|
base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : "";
|
|
143
142
|
return base;
|
|
144
143
|
};
|
|
144
|
+
const isClientSide = typeof window !== "undefined" && typeof document !== "undefined";
|
|
145
145
|
const getCssVar = (name) => {
|
|
146
146
|
if (!isClientSide) return "";
|
|
147
147
|
return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
148
148
|
};
|
|
149
|
+
const matchMediaSafe = (query) => {
|
|
150
|
+
if (!isClientSide) return { matches: false };
|
|
151
|
+
return window.matchMedia(query);
|
|
152
|
+
};
|
|
149
153
|
const isMediaMax = (varName) => {
|
|
150
|
-
if (!isClientSide) return false;
|
|
151
154
|
const maxWidth = getCssVar(varName);
|
|
152
|
-
return
|
|
155
|
+
return matchMediaSafe(`(max-width: ${maxWidth})`).matches;
|
|
153
156
|
};
|
|
154
157
|
const isMediaMin = (varName) => {
|
|
155
|
-
if (!isClientSide) return false;
|
|
156
158
|
const minWidth = getCssVar(varName);
|
|
157
|
-
return
|
|
159
|
+
return matchMediaSafe(`(min-width: ${minWidth})`).matches;
|
|
158
160
|
};
|
|
159
161
|
const isFlipPhone = () => isMediaMax("--flip-phone-max");
|
|
160
162
|
const isPhone = () => isMediaMax("--phone-landscape-max");
|
|
161
|
-
const isTabletPortrait = () =>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
)
|
|
163
|
+
const isTabletPortrait = () => {
|
|
164
|
+
const min = getCssVar("--tablet-portrait-min");
|
|
165
|
+
const max = getCssVar("--tablet-portrait-max");
|
|
166
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
167
|
+
};
|
|
168
|
+
const isTabletLandscape = () => {
|
|
169
|
+
const min = getCssVar("--tablet-landscape-min");
|
|
170
|
+
const max = getCssVar("--tablet-landscape-max");
|
|
171
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
172
|
+
};
|
|
167
173
|
const isTablet = () => isTabletPortrait() || isTabletLandscape();
|
|
168
|
-
const isDesktop = () =>
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
)
|
|
174
|
+
const isDesktop = () => {
|
|
175
|
+
const min = getCssVar("--desktop-min");
|
|
176
|
+
const max = getCssVar("--desktop-max");
|
|
177
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
178
|
+
};
|
|
179
|
+
const isXLDesktop = () => {
|
|
180
|
+
const min = getCssVar("--xl-desktop-min");
|
|
181
|
+
const max = getCssVar("--xl-desktop-max");
|
|
182
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
183
|
+
};
|
|
174
184
|
const isXXLDesktop = () => isMediaMin("--xxl-desktop-min");
|
|
175
185
|
return {
|
|
176
186
|
isAdmin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixins.cjs","sources":["../../../../../../../src/modules/globals/views/mixins/mixins.js"],"sourcesContent":["import * as globals from '@martyrs/src/modules/globals/views/store/globals'\n\n// useGlobalMixins.js\nexport function useGlobalMixins() {\n const isClientSide = typeof window !== 'undefined'\n\n const isAdmin = (roles) => {\n if (roles) {\n const isAdmin = roles.includes('ROLE_ADMIN') ? roles.includes('ROLE_ADMIN') : false;\n\n if (isAdmin !== true) {\n return false\n }\n\n return true\n } else {\n return false\n }\n }\n \n const hasAccess = (organizationId, rightCategory = null, rightType = null, accesses, roles) => {\n // Если пользователь админ, то сразу даем доступ\n if (isAdmin(roles)) {\n return true;\n }\n \n const accessArray = accesses;\n \n // Проверяем существование записи для организации\n const organizationAccess = accessArray.find(access => access.organization === organizationId);\n \n // Если переданы только organizationId и accesses - проверяем только членство\n if (rightCategory === null && rightType === null) {\n return Boolean(organizationAccess); // если организация найдена - значит член\n }\n\n // Для проверки прав сначала проверяем существование организации\n if (!organizationAccess) {\n return false;\n }\n\n const categoryAccess = organizationAccess.rights[rightCategory];\n if (!categoryAccess) {\n return false;\n }\n return categoryAccess[rightType] === true;\n };\n\n\n const returnCurrency = () => {\n const currency = globals.state.options.currency || '$'\n return currency\n }\n\n const formatPrice = (number) => {\n const currency = returnCurrency();\n let formattedNumber = number.toFixed(2).replace('.', ',').replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n return `${currency}${formattedNumber}`;\n }\n\nconst formatDate = (d, options = {}) => {\n var fixedDate = new Date(d);\n\n // Определяем параметры локализации\n const formatOptions = {\n year: 'numeric',\n month: 'long', // название месяца\n day: '2-digit', // день с ведущим нулем\n hour: '2-digit', // часы с ведущим нулем\n minute: '2-digit', // минуты с ведущим нулем\n hour12: false, // 24-часовой формат времени\n ...options // дополнительные настройки\n };\n\n // Язык, по умолчанию \"ru\" (русский)\n const locale = options.language || 'ru';\n\n // Используем Intl.DateTimeFormat для локализации\n const dateFormatter = new Intl.DateTimeFormat(locale, formatOptions);\n\n var format = {\n dateOnly: options.dateOnly || false,\n timeOnly: options.timeOnly || false,\n dayMonth: options.dayMonth || false,\n dayTime: options.dayTime || false,\n monthYear: options.monthYear || false,\n yearOnly: options.yearOnly || false,\n custom: options.custom || \"\",\n monthName: options.monthName || false, // Новый параметр для вывода названия месяца\n language: options.language || 'ru' // Язык, по умолчанию русский\n };\n\n if (format.dateOnly) {\n return dateFormatter.format(fixedDate).split(',')[0]; // Выводим только дату\n } else if (format.timeOnly) {\n return new Intl.DateTimeFormat(locale, { hour: '2-digit', minute: '2-digit', hour12: false }).format(fixedDate); // Выводим только время\n } else if (format.dayMonth) {\n return new Intl.DateTimeFormat(locale, { day: '2-digit', month: 'short' }).format(fixedDate); // день и месяц\n } else if (format.dayTime) {\n return new Intl.DateTimeFormat(locale, { day: '2-digit', month: 'short', hour: '2-digit', minute: '2-digit', hour12: false }).format(fixedDate); // день и время\n } else if (format.monthYear) {\n return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(fixedDate); // месяц и год\n } else if (format.yearOnly) {\n return new Intl.DateTimeFormat(locale, { year: 'numeric' }).format(fixedDate); // только год\n } else if (format.custom) {\n // Для пользовательского формата с подстановкой\n return format.custom.replace(\"yyyy\", fixedDate.getFullYear())\n .replace(\"mm\", (\"0\" + (fixedDate.getMonth() + 1)).slice(-2)) // добавление ведущего нуля\n .replace(\"dd\", (\"0\" + fixedDate.getDate()).slice(-2)) // добавление ведущего нуля\n .replace(\"hh\", (\"0\" + fixedDate.getHours()).slice(-2)) // добавление ведущего нуля\n .replace(\"min\", (\"0\" + fixedDate.getMinutes()).slice(-2)); // добавление ведущего нуля\n }\n\n // Вернуть полную дату в стандартном формате\n return dateFormatter.format(fixedDate);\n}\n\n const formateText = (text, maxLength = 16) => {\n // Return empty string if text is undefined or null\n if (!text) return '';\n \n // If text is shorter than or equal to maxLength, return it as is\n if (text.length <= maxLength) {\n return text;\n }\n \n // Otherwise truncate and add ellipsis\n return text.substring(0, maxLength) + '...';\n }\n\n\n const normalizeUrlParam = (param) => {\n if (!param) param = ''\n\n return param\n .toLowerCase()\n .replace(/ /g, '-')\n .replace(/[^a-z0-9-]/g, '');\n }\n\n const joinArrayToUrl = (arr) => {\n return arr.join('/')\n }\n\n function generateFilters(selectedFilters) {\n const filters = [];\n \n // Process all selected filters\n for (const [key, values] of Object.entries(selectedFilters)) {\n if (values && values.length > 0) {\n // Skip special filters (these are handled separately)\n if (key !== 'prices' && key !== 'delivery' && key !== 'categories') {\n filters.push({\n parameter: key,\n caseSensitive: false,\n values: Array.isArray(values) ? values : [values]\n });\n }\n }\n }\n \n return filters.length > 0 ? JSON.stringify(filters) : undefined;\n }\n\n const getMarketplaceLink = (categories, country, state, city) => {\n let country_normalized = country ? normalizeUrlParam(country) : '';\n let state_normalized = state ? normalizeUrlParam(state) : '';\n let city_normalized = city ? normalizeUrlParam(city) : '';\n\n let base = '/marketplace';\n base += country_normalized ? `/${country_normalized}` : '';\n base += country_normalized && state_normalized ? `/${state_normalized}` : '';\n base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';\n\n if (categories && categories.length) {\n base += `?categories=${categories.join(\",\")}`;\n }\n\n return base;\n }\n\n const getSpotsLink = (country, state, city) => {\n let country_normalized = country ? normalizeUrlParam(country) : '';\n let state_normalized = state ? normalizeUrlParam(state) : '';\n let city_normalized = city ? normalizeUrlParam(city) : '';\n\n let base = '/spots';\n base += country_normalized ? `/${country_normalized}` : '';\n base += country_normalized && state_normalized ? `/${state_normalized}` : '';\n base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';\n\n return base;\n }\n\n const getCssVar = (name) => {\n if (!isClientSide) return '' // SSR fallback\n return getComputedStyle(document.documentElement)\n .getPropertyValue(name)\n .trim()\n }\n\n const isMediaMax = (varName) => {\n if (!isClientSide) return false\n const maxWidth = getCssVar(varName)\n return window.matchMedia(`(max-width: ${maxWidth})`).matches\n }\n\n const isMediaMin = (varName) => {\n if (!isClientSide) return false\n const minWidth = getCssVar(varName)\n return window.matchMedia(`(min-width: ${minWidth})`).matches\n }\n\n\n const isFlipPhone = () => isMediaMax('--flip-phone-max')\n const isPhone = () => isMediaMax('--phone-landscape-max')\n const isTabletPortrait = () => window.matchMedia(\n `(min-width: ${getCssVar('--tablet-portrait-min')}) and (max-width: ${getCssVar('--tablet-portrait-max')})`\n ).matches\n const isTabletLandscape = () => window.matchMedia(\n `(min-width: ${getCssVar('--tablet-landscape-min')}) and (max-width: ${getCssVar('--tablet-landscape-max')})`\n ).matches\n const isTablet = () => isTabletPortrait() || isTabletLandscape()\n\n const isDesktop = () => window.matchMedia(\n `(min-width: ${getCssVar('--desktop-min')}) and (max-width: ${getCssVar('--desktop-max')})`\n ).matches\n const isXLDesktop = () => window.matchMedia(\n `(min-width: ${getCssVar('--xl-desktop-min')}) and (max-width: ${getCssVar('--xl-desktop-max')})`\n ).matches\n const isXXLDesktop = () => isMediaMin('--xxl-desktop-min')\n\n\n return {\n isAdmin,\n hasAccess,\n returnCurrency,\n formatPrice,\n formatDate,\n formateText,\n normalizeUrlParam,\n joinArrayToUrl,\n getMarketplaceLink,\n getSpotsLink,\n generateFilters,\n // Брейкпоинты\n getCssVar,\n isMediaMax,\n isMediaMin,\n isFlipPhone,\n isPhone,\n isTabletPortrait,\n isTabletLandscape,\n isTablet,\n isDesktop,\n isXLDesktop,\n isXXLDesktop,\n\n }\n}\n\n// Экспорт для глобальной регистрации\nexport const globalMixins = {\n methods: useGlobalMixins()\n}"],"names":["isAdmin","globals.state"],"mappings":";;;AAGO,SAAS,kBAAkB;AAChC,QAAM,eAAe,OAAO,WAAW;AAEvC,QAAM,UAAU,CAAC,UAAU;AACzB,QAAI,OAAO;AACT,YAAMA,WAAU,MAAM,SAAS,YAAY,IAAI,MAAM,SAAS,YAAY,IAAI;AAE9E,UAAIA,aAAY,MAAM;AACpB,eAAO;AAAA,MACf;AAEM,aAAO;AAAA,IACb,OAAW;AACL,aAAO;AAAA,IACb;AAAA,EACA;AAEE,QAAM,YAAY,CAAC,gBAAgB,gBAAgB,MAAM,YAAY,MAAM,UAAU,UAAU;AAE7F,QAAI,QAAQ,KAAK,GAAG;AAClB,aAAO;AAAA,IACb;AAEI,UAAM,cAAc;AAGpB,UAAM,qBAAqB,YAAY,KAAK,YAAU,OAAO,iBAAiB,cAAc;AAG5F,QAAI,kBAAkB,QAAQ,cAAc,MAAM;AAChD,aAAO,QAAQ,kBAAkB;AAAA,IACvC;AAGI,QAAI,CAAC,oBAAoB;AACvB,aAAO;AAAA,IACb;AAEI,UAAM,iBAAiB,mBAAmB,OAAO,aAAa;AAC9D,QAAI,CAAC,gBAAgB;AACnB,aAAO;AAAA,IACb;AACI,WAAO,eAAe,SAAS,MAAM;AAAA,EACtC;AAGD,QAAM,iBAAiB,MAAM;AAC3B,UAAM,WAAWC,QAAAA,MAAc,QAAQ,YAAY;AACnD,WAAO;AAAA,EACX;AAEE,QAAM,cAAc,CAAC,WAAW;AAC9B,UAAM,WAAW,eAAgB;AACjC,QAAI,kBAAkB,OAAO,QAAQ,CAAC,EAAE,QAAQ,KAAK,GAAG,EAAE,QAAQ,yBAAyB,GAAG;AAC9F,WAAO,GAAG,QAAQ,GAAG,eAAe;AAAA,EACxC;AAEA,QAAM,aAAa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cjs","sources":["../../../../../../../src/modules/globals/views/mixins/mixins.js"],"sourcesContent":["import * as globals from '@martyrs/src/modules/globals/views/store/globals'\n\n// useGlobalMixins.js\nexport function useGlobalMixins() {\n\n\n const isAdmin = (roles) => {\n if (roles) {\n const isAdmin = roles.includes('ROLE_ADMIN') ? roles.includes('ROLE_ADMIN') : false;\n\n if (isAdmin !== true) {\n return false\n }\n\n return true\n } else {\n return false\n }\n }\n \n const hasAccess = (organizationId, rightCategory = null, rightType = null, accesses, roles) => {\n // Если пользователь админ, то сразу даем доступ\n if (isAdmin(roles)) {\n return true;\n }\n \n const accessArray = accesses;\n \n // Проверяем существование записи для организации\n const organizationAccess = accessArray.find(access => access.organization === organizationId);\n \n // Если переданы только organizationId и accesses - проверяем только членство\n if (rightCategory === null && rightType === null) {\n return Boolean(organizationAccess); // если организация найдена - значит член\n }\n\n // Для проверки прав сначала проверяем существование организации\n if (!organizationAccess) {\n return false;\n }\n\n const categoryAccess = organizationAccess.rights[rightCategory];\n if (!categoryAccess) {\n return false;\n }\n return categoryAccess[rightType] === true;\n };\n\n\n const returnCurrency = () => {\n const currency = globals.state.options.currency || '$'\n return currency\n }\n\n const formatPrice = (number) => {\n const currency = returnCurrency();\n let formattedNumber = number.toFixed(2).replace('.', ',').replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n return `${currency}${formattedNumber}`;\n }\n\nconst formatDate = (d, options = {}) => {\n var fixedDate = new Date(d);\n\n // Определяем параметры локализации\n const formatOptions = {\n year: 'numeric',\n month: 'long', // название месяца\n day: '2-digit', // день с ведущим нулем\n hour: '2-digit', // часы с ведущим нулем\n minute: '2-digit', // минуты с ведущим нулем\n hour12: false, // 24-часовой формат времени\n ...options // дополнительные настройки\n };\n\n // Язык, по умолчанию \"ru\" (русский)\n const locale = options.language || 'ru';\n\n // Используем Intl.DateTimeFormat для локализации\n const dateFormatter = new Intl.DateTimeFormat(locale, formatOptions);\n\n var format = {\n dateOnly: options.dateOnly || false,\n timeOnly: options.timeOnly || false,\n dayMonth: options.dayMonth || false,\n dayTime: options.dayTime || false,\n monthYear: options.monthYear || false,\n yearOnly: options.yearOnly || false,\n custom: options.custom || \"\",\n monthName: options.monthName || false, // Новый параметр для вывода названия месяца\n language: options.language || 'ru' // Язык, по умолчанию русский\n };\n\n if (format.dateOnly) {\n return dateFormatter.format(fixedDate).split(',')[0]; // Выводим только дату\n } else if (format.timeOnly) {\n return new Intl.DateTimeFormat(locale, { hour: '2-digit', minute: '2-digit', hour12: false }).format(fixedDate); // Выводим только время\n } else if (format.dayMonth) {\n return new Intl.DateTimeFormat(locale, { day: '2-digit', month: 'short' }).format(fixedDate); // день и месяц\n } else if (format.dayTime) {\n return new Intl.DateTimeFormat(locale, { day: '2-digit', month: 'short', hour: '2-digit', minute: '2-digit', hour12: false }).format(fixedDate); // день и время\n } else if (format.monthYear) {\n return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(fixedDate); // месяц и год\n } else if (format.yearOnly) {\n return new Intl.DateTimeFormat(locale, { year: 'numeric' }).format(fixedDate); // только год\n } else if (format.custom) {\n // Для пользовательского формата с подстановкой\n return format.custom.replace(\"yyyy\", fixedDate.getFullYear())\n .replace(\"mm\", (\"0\" + (fixedDate.getMonth() + 1)).slice(-2)) // добавление ведущего нуля\n .replace(\"dd\", (\"0\" + fixedDate.getDate()).slice(-2)) // добавление ведущего нуля\n .replace(\"hh\", (\"0\" + fixedDate.getHours()).slice(-2)) // добавление ведущего нуля\n .replace(\"min\", (\"0\" + fixedDate.getMinutes()).slice(-2)); // добавление ведущего нуля\n }\n\n // Вернуть полную дату в стандартном формате\n return dateFormatter.format(fixedDate);\n}\n\n const formateText = (text, maxLength = 16) => {\n // Return empty string if text is undefined or null\n if (!text) return '';\n \n // If text is shorter than or equal to maxLength, return it as is\n if (text.length <= maxLength) {\n return text;\n }\n \n // Otherwise truncate and add ellipsis\n return text.substring(0, maxLength) + '...';\n }\n\n\n const normalizeUrlParam = (param) => {\n if (!param) param = ''\n\n return param\n .toLowerCase()\n .replace(/ /g, '-')\n .replace(/[^a-z0-9-]/g, '');\n }\n\n const joinArrayToUrl = (arr) => {\n return arr.join('/')\n }\n\n function generateFilters(selectedFilters) {\n const filters = [];\n \n // Process all selected filters\n for (const [key, values] of Object.entries(selectedFilters)) {\n if (values && values.length > 0) {\n // Skip special filters (these are handled separately)\n if (key !== 'prices' && key !== 'delivery' && key !== 'categories') {\n filters.push({\n parameter: key,\n caseSensitive: false,\n values: Array.isArray(values) ? values : [values]\n });\n }\n }\n }\n \n return filters.length > 0 ? JSON.stringify(filters) : undefined;\n }\n\n const getMarketplaceLink = (categories, country, state, city) => {\n let country_normalized = country ? normalizeUrlParam(country) : '';\n let state_normalized = state ? normalizeUrlParam(state) : '';\n let city_normalized = city ? normalizeUrlParam(city) : '';\n\n let base = '/marketplace';\n base += country_normalized ? `/${country_normalized}` : '';\n base += country_normalized && state_normalized ? `/${state_normalized}` : '';\n base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';\n\n if (categories && categories.length) {\n base += `?categories=${categories.join(\",\")}`;\n }\n\n return base;\n }\n\n const getSpotsLink = (country, state, city) => {\n let country_normalized = country ? normalizeUrlParam(country) : '';\n let state_normalized = state ? normalizeUrlParam(state) : '';\n let city_normalized = city ? normalizeUrlParam(city) : '';\n\n let base = '/spots';\n base += country_normalized ? `/${country_normalized}` : '';\n base += country_normalized && state_normalized ? `/${state_normalized}` : '';\n base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';\n\n return base;\n }\n\n const isClientSide = typeof window !== 'undefined' && typeof document !== 'undefined'\n\n const getCssVar = (name) => {\n if (!isClientSide) return '' // SSR fallback\n return getComputedStyle(document.documentElement)\n .getPropertyValue(name)\n .trim()\n }\n\n const matchMediaSafe = (query) => {\n if (!isClientSide) return { matches: false }\n return window.matchMedia(query)\n }\n\n const isMediaMax = (varName) => {\n const maxWidth = getCssVar(varName)\n return matchMediaSafe(`(max-width: ${maxWidth})`).matches\n }\n\n const isMediaMin = (varName) => {\n const minWidth = getCssVar(varName)\n return matchMediaSafe(`(min-width: ${minWidth})`).matches\n }\n\n const isFlipPhone = () => isMediaMax('--flip-phone-max')\n const isPhone = () => isMediaMax('--phone-landscape-max')\n\n const isTabletPortrait = () => {\n const min = getCssVar('--tablet-portrait-min')\n const max = getCssVar('--tablet-portrait-max')\n return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches\n }\n\n const isTabletLandscape = () => {\n const min = getCssVar('--tablet-landscape-min')\n const max = getCssVar('--tablet-landscape-max')\n return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches\n }\n\n const isTablet = () => isTabletPortrait() || isTabletLandscape()\n\n const isDesktop = () => {\n const min = getCssVar('--desktop-min')\n const max = getCssVar('--desktop-max')\n return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches\n }\n\n const isXLDesktop = () => {\n const min = getCssVar('--xl-desktop-min')\n const max = getCssVar('--xl-desktop-max')\n return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches\n }\n\n const isXXLDesktop = () => isMediaMin('--xxl-desktop-min')\n\n\n return {\n isAdmin,\n hasAccess,\n returnCurrency,\n formatPrice,\n formatDate,\n formateText,\n normalizeUrlParam,\n joinArrayToUrl,\n getMarketplaceLink,\n getSpotsLink,\n generateFilters,\n // Брейкпоинты\n getCssVar,\n isMediaMax,\n isMediaMin,\n isFlipPhone,\n isPhone,\n isTabletPortrait,\n isTabletLandscape,\n isTablet,\n isDesktop,\n isXLDesktop,\n isXXLDesktop,\n\n }\n}\n\n// Экспорт для глобальной регистрации\nexport const globalMixins = {\n methods: useGlobalMixins()\n}"],"names":["isAdmin","globals.state"],"mappings":";;;AAGO,SAAS,kBAAkB;AAGhC,QAAM,UAAU,CAAC,UAAU;AACzB,QAAI,OAAO;AACT,YAAMA,WAAU,MAAM,SAAS,YAAY,IAAI,MAAM,SAAS,YAAY,IAAI;AAE9E,UAAIA,aAAY,MAAM;AACpB,eAAO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AACvD,QAAM,UAAU,MAAM,WAAW,uBAAuB;AAExD,QAAM,mBAAmB,MAAM;AAC7B,UAAM,MAAM,UAAU,uBAAuB;AAC7C,UAAM,MAAM,UAAU,uBAAuB;AAC7C,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACzE;AAEE,QAAM,oBAAoB,MAAM;AAC9B,UAAM,MAAM,UAAU,wBAAwB;AAC9C,UAAM,MAAM,UAAU,wBAAwB;AAC9C,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACzE;AAEE,QAAM,WAAW,MAAM,iBAAgB,KAAM,kBAAiB;AAE9D,QAAM,YAAY,MAAM;AACtB,UAAM,MAAM,UAAU,eAAe;AACrC,UAAM,MAAM,UAAU,eAAe;AACrC,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACzE;AAEE,QAAM,cAAc,MAAM;AACxB,UAAM,MAAM,UAAU,kBAAkB;AACxC,UAAM,MAAM,UAAU,kBAAkB;AACxC,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACzE;AAEE,QAAM,eAAe,MAAM,WAAW,mBAAmB;AAGzD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAEJ;AACA;AAGY,MAAC,eAAe;AAAA,EAC1B,SAAS,gBAAe;AAC1B;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { state } from "../store/globals.js";
|
|
2
2
|
function useGlobalMixins() {
|
|
3
|
-
const isClientSide = typeof window !== "undefined";
|
|
4
3
|
const isAdmin = (roles) => {
|
|
5
4
|
if (roles) {
|
|
6
5
|
const isAdmin2 = roles.includes("ROLE_ADMIN") ? roles.includes("ROLE_ADMIN") : false;
|
|
@@ -140,35 +139,46 @@ function useGlobalMixins() {
|
|
|
140
139
|
base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : "";
|
|
141
140
|
return base;
|
|
142
141
|
};
|
|
142
|
+
const isClientSide = typeof window !== "undefined" && typeof document !== "undefined";
|
|
143
143
|
const getCssVar = (name) => {
|
|
144
144
|
if (!isClientSide) return "";
|
|
145
145
|
return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
146
146
|
};
|
|
147
|
+
const matchMediaSafe = (query) => {
|
|
148
|
+
if (!isClientSide) return { matches: false };
|
|
149
|
+
return window.matchMedia(query);
|
|
150
|
+
};
|
|
147
151
|
const isMediaMax = (varName) => {
|
|
148
|
-
if (!isClientSide) return false;
|
|
149
152
|
const maxWidth = getCssVar(varName);
|
|
150
|
-
return
|
|
153
|
+
return matchMediaSafe(`(max-width: ${maxWidth})`).matches;
|
|
151
154
|
};
|
|
152
155
|
const isMediaMin = (varName) => {
|
|
153
|
-
if (!isClientSide) return false;
|
|
154
156
|
const minWidth = getCssVar(varName);
|
|
155
|
-
return
|
|
157
|
+
return matchMediaSafe(`(min-width: ${minWidth})`).matches;
|
|
156
158
|
};
|
|
157
159
|
const isFlipPhone = () => isMediaMax("--flip-phone-max");
|
|
158
160
|
const isPhone = () => isMediaMax("--phone-landscape-max");
|
|
159
|
-
const isTabletPortrait = () =>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
)
|
|
161
|
+
const isTabletPortrait = () => {
|
|
162
|
+
const min = getCssVar("--tablet-portrait-min");
|
|
163
|
+
const max = getCssVar("--tablet-portrait-max");
|
|
164
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
165
|
+
};
|
|
166
|
+
const isTabletLandscape = () => {
|
|
167
|
+
const min = getCssVar("--tablet-landscape-min");
|
|
168
|
+
const max = getCssVar("--tablet-landscape-max");
|
|
169
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
170
|
+
};
|
|
165
171
|
const isTablet = () => isTabletPortrait() || isTabletLandscape();
|
|
166
|
-
const isDesktop = () =>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
+
const isDesktop = () => {
|
|
173
|
+
const min = getCssVar("--desktop-min");
|
|
174
|
+
const max = getCssVar("--desktop-max");
|
|
175
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
176
|
+
};
|
|
177
|
+
const isXLDesktop = () => {
|
|
178
|
+
const min = getCssVar("--xl-desktop-min");
|
|
179
|
+
const max = getCssVar("--xl-desktop-max");
|
|
180
|
+
return matchMediaSafe(`(min-width: ${min}) and (max-width: ${max})`).matches;
|
|
181
|
+
};
|
|
172
182
|
const isXXLDesktop = () => isMediaMin("--xxl-desktop-min");
|
|
173
183
|
return {
|
|
174
184
|
isAdmin,
|