@ozdao/martyrs 0.2.481 → 0.2.483
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/README.md +4 -13
- package/dist/{Media-CKk33U4A.js → Media-C57G7rnE.js} +1 -1
- package/dist/{Media-B1ZP3D7B.cjs → Media-DjnpKS62.cjs} +1 -1
- package/dist/_virtual/_commonjsHelpers.cjs +2 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -1
- package/dist/_virtual/_commonjsHelpers.js +2 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/_virtual/index2.cjs +8 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +8 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.cjs +5 -0
- package/dist/_virtual/index3.cjs.map +1 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/{abac-XF1JVCLI.cjs → abac-6LjoG9u-.cjs} +107 -26
- package/dist/{abac-BuL5pUZ4.js → abac-Cf_9lCSh.js} +107 -26
- package/dist/globals.server.cjs +1 -1
- package/dist/globals.server.js +1 -1
- package/dist/{main-BhAiwmnI.js → main-CXQqAVVb.js} +3036 -4278
- package/dist/main-De5X_RUk.cjs +11 -0
- package/dist/martyrs/src/components/Button/{Button.vue2.cjs → Button.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue2.js.map → Button.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +28 -7
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +29 -8
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs +5 -8
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.js +6 -9
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +84 -0
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +84 -0
- package/dist/martyrs/src/components/Feed/Carousel.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +4 -4
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +4 -4
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs +2 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +2 -1
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs +141 -113
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +142 -114
- package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs +203 -151
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +204 -152
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js.map +1 -1
- package/dist/martyrs/src/components/Radio/Radio.vue.cjs +2 -2
- package/dist/martyrs/src/components/Radio/Radio.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Radio/Radio.vue.js +2 -2
- package/dist/martyrs/src/components/Radio/Radio.vue.js.map +1 -1
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.cjs +4 -3
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js +4 -3
- package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js.map +1 -1
- package/dist/martyrs/src/components/Slider/{Slider.native.vue.cjs → Slider.vue.cjs} +22 -80
- package/dist/martyrs/src/components/Slider/Slider.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Slider/{Slider.native.vue.js → Slider.vue.js} +23 -81
- package/dist/martyrs/src/components/Slider/Slider.vue.js.map +1 -0
- package/dist/martyrs/src/components/Status/Status.vue.cjs +11 -5
- package/dist/martyrs/src/components/Status/Status.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Status/Status.vue.js +13 -7
- package/dist/martyrs/src/components/Status/Status.vue.js.map +1 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs +4 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js +4 -2
- package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +6 -4
- 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 +6 -4
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +4 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +5 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +22 -149
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +24 -151
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +77 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +77 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +121 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +121 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs +38 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +38 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.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.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs +17 -39
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +18 -40
- package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/EnterCode.json.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/EnterCode.json.js +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/EnterPassword.json.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/EnterPassword.json.js +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/ResetPassword.json.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/ResetPassword.json.js +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/SignIn.json.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/SignIn.json.js +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/SignUp.json.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/localization/SignUp.json.js +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.cjs +23 -16
- package/dist/martyrs/src/modules/auth/views/router/users.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.js +23 -16
- package/dist/martyrs/src/modules/auth/views/router/users.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +3 -3
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.js +3 -3
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +6 -6
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +4 -3
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +4 -3
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- 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/Comment.vue.cjs +92 -62
- package/dist/martyrs/src/modules/community/components/sections/Comment.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js +93 -63
- package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/Comments.vue.cjs +82 -53
- package/dist/martyrs/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/Comments.vue.js +82 -53
- package/dist/martyrs/src/modules/community/components/sections/Comments.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +2 -6
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +2 -6
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- 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/sections/EventsHot.vue.cjs +3 -9
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +3 -9
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js.map +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +4 -4
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +9 -9
- package/dist/martyrs/src/modules/globals/globals.client.cjs +13 -0
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +13 -0
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/locales/en.cjs +24 -0
- package/dist/martyrs/src/modules/globals/locales/en.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/locales/en.js +24 -0
- package/dist/martyrs/src/modules/globals/locales/en.js.map +1 -0
- package/dist/martyrs/src/modules/globals/locales/ru.cjs +24 -0
- package/dist/martyrs/src/modules/globals/locales/ru.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/locales/ru.js +24 -0
- package/dist/martyrs/src/modules/globals/locales/ru.js.map +1 -0
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +71 -0
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +71 -0
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js.map +1 -0
- 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.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +84 -0
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +84 -0
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +50 -44
- 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 +50 -44
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs +17 -0
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.js +17 -0
- package/dist/martyrs/src/modules/globals/views/mixins/mixins.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.cjs +70 -0
- package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.js +70 -0
- package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.js.map +1 -0
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/martyrs/src/modules/icons/entities/IconList.vue.cjs +35 -0
- package/dist/martyrs/src/modules/icons/entities/IconList.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/icons/entities/IconList.vue.js +35 -0
- package/dist/martyrs/src/modules/icons/entities/IconList.vue.js.map +1 -0
- package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.cjs +21 -20
- package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.js +21 -20
- package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.cjs +6 -13
- package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.js +6 -13
- package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.js +1 -3
- package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.js.map +1 -1
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +1 -3
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +41 -43
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +52 -58
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +52 -58
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.cjs +8 -8
- package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.js +8 -8
- package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +50 -51
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +51 -52
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- 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 +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- 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/organizations/configs/navigation.organization.config.cjs +7 -4
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +18 -15
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.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/CardProduct.vue.cjs +7 -2
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +8 -3
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +11 -12
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +12 -13
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +32 -23
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +35 -26
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.cjs +4 -4
- package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js +4 -4
- package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.cjs +7 -5
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.js +7 -5
- package/dist/martyrs/src/modules/products/components/elements/Price.vue.js.map +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 +2 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +57 -40
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +59 -42
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +105 -85
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +107 -87
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +145 -0
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +145 -0
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js.map +1 -0
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +46 -31
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +50 -35
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs +44 -0
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js +44 -0
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js.map +1 -0
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +131 -0
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +131 -0
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -0
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/products/products.client.cjs +3 -3
- package/dist/martyrs/src/modules/products/products.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/products.client.js +3 -3
- package/dist/martyrs/src/modules/products/products.client.js.map +1 -1
- package/dist/martyrs/src/modules/products/store/products.cjs +4 -0
- package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/products.js +4 -0
- package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
- 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/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.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/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/localization/wallet.json.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/node_modules/lodash.merge/index.cjs +689 -0
- package/dist/node_modules/lodash.merge/index.cjs.map +1 -0
- package/dist/node_modules/lodash.merge/index.js +689 -0
- package/dist/node_modules/lodash.merge/index.js.map +1 -0
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +111 -34
- package/dist/products.server.js +111 -34
- package/dist/style.css +239 -235
- package/package.json +1 -1
- package/src/.martyrs/chunks.json +325 -0
- package/src/.martyrs/filemap.json +6802 -0
- package/src/.martyrs/semantic-analysis.json +307 -0
- package/src/.martyrs/toc.json +14 -0
- package/src/components/Button/Button.vue +2 -2
- package/src/components/Checkbox/Checkbox.vue +28 -16
- package/src/components/Chips/Chips.vue +4 -4
- package/src/components/Feed/Carousel.vue +72 -0
- package/src/components/Feed/Feed.vue +2 -2
- package/src/components/Field/Field.vue +1 -0
- package/src/components/FieldPhone/FieldPhone.vue +337 -238
- package/src/components/PhotoViewer/PhotoViewer.vue +307 -220
- package/src/components/Radio/Radio.vue +2 -10
- package/src/components/Skeleton/Skeleton.vue +9 -12
- package/src/components/Slider/Slider.vue +220 -100
- package/src/components/Status/Status.vue +10 -8
- package/src/components/Tooltip/Tooltip.vue +2 -2
- package/src/modules/auth/views/components/layouts/Auth.vue +1 -1
- package/src/modules/auth/views/components/pages/Profile.vue +1 -1
- package/src/modules/auth/views/components/pages/ProfileEdit.old.vue +189 -0
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +19 -182
- package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +72 -0
- package/src/modules/auth/views/components/pages/ProfileEditProfile.vue +110 -0
- package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +28 -0
- package/src/modules/auth/views/components/sections/SliderFeatures.vue +13 -79
- package/src/modules/auth/views/localization/EnterCode.json +2 -2
- package/src/modules/auth/views/localization/EnterPassword.json +2 -2
- package/src/modules/auth/views/localization/ResetPassword.json +2 -2
- package/src/modules/auth/views/localization/SignIn.json +2 -2
- package/src/modules/auth/views/localization/SignUp.json +2 -2
- package/src/modules/auth/views/router/users.js +23 -12
- package/src/modules/community/components/blocks/FooterBlogpost.vue +3 -3
- package/src/modules/community/components/pages/BlogPost.vue +2 -1
- package/src/modules/community/components/sections/Comment.vue +161 -57
- package/src/modules/community/components/sections/Comments.vue +120 -63
- package/src/modules/community/components/sections/HotPosts.vue +7 -7
- package/src/modules/events/components/sections/EventsHot.vue +26 -33
- package/src/modules/globals/controllers/classes/abac/abac.core.js +3 -1
- package/src/modules/globals/controllers/classes/abac/abac.fields.js +126 -42
- package/src/modules/globals/controllers/classes/abac/v2/abac-core-fixed.js +313 -0
- package/src/modules/globals/controllers/classes/abac/v2/abac-express-fixed.js +276 -0
- package/src/modules/globals/controllers/classes/abac/v2/abac-fields-fixed.js +422 -0
- package/src/modules/globals/controllers/classes/abac/v2/abac-main-fixed.js +295 -0
- package/src/modules/globals/controllers/classes/abac/v2/abac-policies-fixed.js +316 -0
- package/src/modules/globals/controllers/classes/abac/v2/abac-ws-fixed.js +237 -0
- package/src/modules/globals/globals.client.js +17 -1
- package/src/modules/globals/locales/en.js +21 -0
- package/src/modules/globals/locales/index.js +8 -0
- package/src/modules/globals/locales/ru.js +21 -0
- package/src/modules/globals/views/classes/globals.i18n.js +84 -0
- package/src/modules/globals/views/components/blocks/CardFooter.vue +3 -3
- package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -1
- package/src/modules/globals/views/components/blocks/PopupAuth.vue +66 -0
- package/src/modules/globals/views/components/layouts/Client.vue +43 -40
- package/src/modules/globals/views/components/partials/Footer.vue +162 -162
- package/src/modules/globals/views/mixins/mixins.js +37 -17
- package/src/modules/globals/views/plugins/popup.auth.plugin.js +77 -0
- package/src/modules/globals/views/store/globals.js +0 -40
- package/src/modules/icons/entities/IconList.vue +14 -0
- package/src/modules/icons/navigation/IconCheck.vue +1 -3
- package/src/modules/icons/navigation/IconDoubleCheck.vue +1 -3
- package/src/modules/icons/navigation/IconLike.vue +1 -3
- package/src/modules/icons/navigation/IconMute.vue +1 -3
- package/src/modules/icons/navigation/IconPause.vue +1 -3
- package/src/modules/icons/navigation/IconPlay.vue +12 -15
- package/src/modules/icons/navigation/IconRefresh.vue +1 -3
- package/src/modules/icons/navigation/IconShuffle.vue +11 -26
- package/src/modules/icons/navigation/IconUnMute.vue +1 -3
- package/src/modules/icons/navigation/IconVolume.vue +1 -3
- package/src/modules/icons/pages/IconsPage.vue +0 -2
- package/src/modules/marketplace/views/components/layouts/Marketplace.vue +34 -38
- package/src/modules/music/components/pages/AlbumDetail.vue +2 -2
- package/src/modules/music/components/pages/PlaylistDetail.vue +2 -2
- package/src/modules/music/components/pages/TrackDetail.vue +1 -1
- package/src/modules/music/components/player/MusicPlayer.vue +2 -2
- package/src/modules/notifications/components/blocks/NotificationItem.vue +6 -51
- package/src/modules/notifications/components/elements/NotificationBadge.vue +53 -97
- package/src/modules/organizations/configs/navigation.organization.config.js +8 -4
- package/src/modules/products/components/blocks/CardProduct.vue +8 -2
- package/src/modules/products/components/blocks/ProductDiscounts.vue +3 -4
- package/src/modules/products/components/blocks/ProductImages.vue +32 -23
- package/src/modules/products/components/blocks/ProductVariants.vue +6 -4
- package/src/modules/products/components/elements/Price.vue +3 -3
- package/src/modules/products/components/pages/Product.vue +32 -26
- package/src/modules/products/components/pages/ProductEdit.vue +95 -72
- package/src/modules/products/components/sections/EditRecommended.vue +131 -0
- package/src/modules/products/components/sections/ProductConfigurator.vue +35 -21
- package/src/modules/products/components/sections/ProductsPopular.vue +45 -0
- package/src/modules/products/components/sections/ProductsRecommended.vue +134 -0
- package/src/modules/products/controllers/configs/products.lookup.config.js +20 -15
- package/src/modules/products/controllers/products.controller.js +7 -22
- package/src/modules/products/models/category.model.js +28 -1
- package/src/modules/products/models/leftover.model.js +32 -0
- package/src/modules/products/models/product.model.js +37 -1
- package/src/modules/products/models/variant.model.js +35 -0
- package/src/modules/products/products.client.js +3 -3
- package/src/modules/products/routes/products.routes.js +1 -0
- package/src/modules/products/store/products.js +4 -0
- package/src/modules/wallet/views/localization/wallet.json +2 -2
- package/src/styles/base/all.scss +0 -38
- package/src/styles/base/shadow_transitions_hover_refactor.scss +20 -51
- package/src/styles/config.scss +51 -1
- package/dist/main-C75EcBpE.cjs +0 -11
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/components/Slider/Slider.native.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Slider/Slider.native.vue.js.map +0 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs +0 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs.map +0 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.js +0 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.js.map +0 -1
- package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.cjs +0 -34
- package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.js +0 -34
- package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.js.map +0 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs +0 -124
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js +0 -124
- package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel-autoplay@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +0 -194
- package/dist/node_modules/.pnpm/embla-carousel-autoplay@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel-autoplay@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +0 -194
- package/dist/node_modules/.pnpm/embla-carousel-autoplay@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +0 -43
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +0 -43
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs +0 -43
- package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js +0 -43
- package/dist/node_modules/.pnpm/embla-carousel-vue@8.6.0_vue@3.5.13_typescript@5.8.3_/node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +0 -1630
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs.map +0 -1
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +0 -1630
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +0 -1
- package/src/components/Slider/Slider.native.vue +0 -313
- package/src/modules/products/components/sections/PopularProducts.vue +0 -156
|
@@ -5,7 +5,7 @@ import _sfc_main$4 from "../../../../../components/Status/Status.vue.js";
|
|
|
5
5
|
import _sfc_main$1 from "../../../../../components/Popup/Popup.vue.js";
|
|
6
6
|
import Loader from "../../../../../components/Loader/Loader.vue2.js";
|
|
7
7
|
import "vue-i18n";
|
|
8
|
-
/* empty css
|
|
8
|
+
/* empty css */
|
|
9
9
|
import "../../../../orders/store/shopcart.js";
|
|
10
10
|
import "../../../../auth/views/store/auth.js";
|
|
11
11
|
/* empty css */
|
|
@@ -18,6 +18,8 @@ const _hoisted_1 = {
|
|
|
18
18
|
class: "w-100 h-100"
|
|
19
19
|
};
|
|
20
20
|
const _hoisted_2 = { class: "rows-1-min0_max1 z-index-1 pos-relative w-100 h-100" };
|
|
21
|
+
const _hoisted_3 = { class: "o-y-scroll o-x-hidden h-100" };
|
|
22
|
+
const _hoisted_4 = { class: "h-min-100 pos-relative w-100" };
|
|
21
23
|
const _sfc_main = {
|
|
22
24
|
__name: "Client",
|
|
23
25
|
props: {
|
|
@@ -91,7 +93,7 @@ const _sfc_main = {
|
|
|
91
93
|
if (page.value) show.value = true;
|
|
92
94
|
});
|
|
93
95
|
return (_ctx, _cache) => {
|
|
94
|
-
var _a, _b, _c
|
|
96
|
+
var _a, _b, _c;
|
|
95
97
|
const _component_router_view = resolveComponent("router-view");
|
|
96
98
|
return openBlock(), createElementBlock("div", {
|
|
97
99
|
id: "app-wrapper",
|
|
@@ -219,45 +221,56 @@ const _sfc_main = {
|
|
|
219
221
|
_: 1
|
|
220
222
|
}, 40, ["stateSidebar", "widthHidden", "width", "theme"])) : createCommentVNode("", true),
|
|
221
223
|
createElementVNode("div", _hoisted_2, [
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
createVNode(Transition, {
|
|
238
|
-
onBeforeEnter: scrollTop,
|
|
239
|
-
name: "scaleTransition",
|
|
240
|
-
mode: "out-in",
|
|
241
|
-
appear: ""
|
|
224
|
+
createElementVNode("div", _hoisted_3, [
|
|
225
|
+
state.error.show ? (openBlock(), createBlock(_sfc_main$4, {
|
|
226
|
+
key: 0,
|
|
227
|
+
data: state.error,
|
|
228
|
+
onClose: _cache[1] || (_cache[1] = ($event) => state.error.show = false),
|
|
229
|
+
class: "z-index-7"
|
|
230
|
+
}, null, 8, ["data"])) : createCommentVNode("", true),
|
|
231
|
+
createElementVNode("div", _hoisted_4, [
|
|
232
|
+
(openBlock(), createBlock(Suspense, { onResolve: onSuspenseResolved }, {
|
|
233
|
+
default: withCtx(() => [
|
|
234
|
+
createVNode(_component_router_view, {
|
|
235
|
+
id: "view",
|
|
236
|
+
class: normalizeClass([{
|
|
237
|
+
"scroll-hide": _ctx.MOBILE_APP
|
|
238
|
+
}, "h-min-100 pos-relative w-100"])
|
|
242
239
|
}, {
|
|
243
|
-
default: withCtx(() => [
|
|
244
|
-
(
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
240
|
+
default: withCtx(({ Component, route: route2 }) => [
|
|
241
|
+
createVNode(Transition, {
|
|
242
|
+
onBeforeEnter: scrollTop,
|
|
243
|
+
name: "scaleTransition",
|
|
244
|
+
mode: "out-in",
|
|
245
|
+
appear: ""
|
|
246
|
+
}, {
|
|
247
|
+
default: withCtx(() => [
|
|
248
|
+
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
|
249
|
+
ref_key: "page",
|
|
250
|
+
ref: page,
|
|
251
|
+
key: route2.path,
|
|
252
|
+
class: "w-100 h-min-100",
|
|
253
|
+
onPageLoading: handlePageLoading,
|
|
254
|
+
onPageLoaded: handlePageLoaded
|
|
255
|
+
}, null, 32))
|
|
256
|
+
]),
|
|
257
|
+
_: 2
|
|
258
|
+
}, 1024)
|
|
252
259
|
]),
|
|
253
|
-
_:
|
|
254
|
-
},
|
|
260
|
+
_: 1
|
|
261
|
+
}, 8, ["class"])
|
|
255
262
|
]),
|
|
256
263
|
_: 1
|
|
257
|
-
}
|
|
264
|
+
}))
|
|
258
265
|
]),
|
|
259
|
-
|
|
260
|
-
|
|
266
|
+
!_ctx.MOBILE_APP && unref(route).meta.footer && !unref(route).meta.hideFooter ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.footer), {
|
|
267
|
+
key: 1,
|
|
268
|
+
ref: "footer",
|
|
269
|
+
theme: headerTheme.value,
|
|
270
|
+
logotype: unref(route).meta.logotype,
|
|
271
|
+
location: unref(route).meta.location
|
|
272
|
+
}, null, 8, ["theme", "logotype", "location"])) : createCommentVNode("", true)
|
|
273
|
+
])
|
|
261
274
|
])
|
|
262
275
|
], 34),
|
|
263
276
|
createVNode(_component_router_view, { name: "defaultBottom" }, {
|
|
@@ -266,15 +279,8 @@ const _sfc_main = {
|
|
|
266
279
|
]),
|
|
267
280
|
_: 1
|
|
268
281
|
}),
|
|
269
|
-
!_ctx.MOBILE_APP && ((_d = unref(route).meta.footer) == null ? void 0 : _d.component) && !unref(route).meta.hideFooter ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.footer.component), {
|
|
270
|
-
key: 1,
|
|
271
|
-
ref: "footer",
|
|
272
|
-
theme: headerTheme.value,
|
|
273
|
-
logotype: unref(route).meta.footer.logotype,
|
|
274
|
-
location: unref(route).meta.footer.location
|
|
275
|
-
}, null, 8, ["theme", "logotype", "location"])) : createCommentVNode("", true),
|
|
276
282
|
_ctx.MOBILE_APP && unref(route).meta.title_hide ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.bottombar), {
|
|
277
|
-
key:
|
|
283
|
+
key: 1,
|
|
278
284
|
class: "z-index-2"
|
|
279
285
|
})) : createCommentVNode("", true)
|
|
280
286
|
], 2);
|
|
@@ -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=\"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.header_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\">\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\tid=\"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.js';\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// PROPS\n\tconst props = defineProps({\n env: {\n type: Object,\n required: true\n },\n app: {\n type: Object,\n required: true\n },\n modules: {\n type: Object,\n required: true\n }\n })\n\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\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuNE,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;AAI1B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
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.header_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\">\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<div class=\"o-y-scroll o-x-hidden h-100\">\n\t \t\t\t<Status \n\t \t\t\t\tv-if=\"globals.state.error.show\"\n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\t\t\t\t\t<div class=\"h-min-100 pos-relative w-100\">\n\t\t\t\t \t\t<Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t\t\t<router-view \n\t\t\t\t\t\t\t\tid=\"view\"\n\t\t\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t\tclass=\"h-min-100 pos-relative w-100\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t\t\t \t<component \n\t\t\t\t\t \t\tref=\"page\" \n\t\t\t\t\t \t\t:is=\"Component\" \n\t\t\t\t\t \t\t:key=\"route.path\"\n\t\t\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t\t\t @page-loaded=\"handlePageLoaded\"\n\t\t\t\t\t \t/>\n\t\t\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t\t\t \t<!-- -->\n\t\t\t\t\t </transition>\n\t\t\t\t\t\t </router-view>\n\t\t\t\t\t\t</Suspense>\n\t\t\t\t </div>\n\t\t\t \n\t <component\n\t\t\t\t\t\tv-if=\"!MOBILE_APP && route.meta.footer && !route.meta.hideFooter\"\n\t\t\t ref=\"footer\" \n\t\t\t :is=\"route.meta.footer\"\n\t\t\t :theme=\"headerTheme\"\n\t\t\t :logotype=\"route.meta.logotype\"\n\t\t\t :location=\"route.meta.location\"\n\t\t\t />\n\t\t\t\t</div>\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\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.js';\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\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t// PROPS\n\tconst props = defineProps({\n env: {\n type: Object,\n required: true\n },\n app: {\n type: Object,\n required: true\n },\n modules: {\n type: Object,\n required: true\n }\n })\n\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\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0NE,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,e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
7
|
const shopcart = require("../../../../orders/store/shopcart.cjs");
|
|
8
8
|
const auth = require("../../../../auth/views/store/auth.cjs");
|
|
9
9
|
const NotificationBadge = require("../../../../notifications/components/elements/NotificationBadge.vue.cjs");
|
|
10
|
-
const Button = require("../../../../../components/Button/Button.
|
|
10
|
+
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
|
11
11
|
const Select = require("../../../../../components/Select/Select.vue.cjs");
|
|
12
12
|
const IconShopcart = require("../../../../icons/entities/IconShopcart.vue.cjs");
|
|
13
13
|
const IconProfile = require("../../../../icons/entities/IconProfile.vue.cjs");
|
|
@@ -5,7 +5,7 @@ import { state } from "../../store/globals.js";
|
|
|
5
5
|
import { actions, getters } from "../../../../orders/store/shopcart.js";
|
|
6
6
|
import { state as state$1 } from "../../../../auth/views/store/auth.js";
|
|
7
7
|
import NotificationBadge from "../../../../notifications/components/elements/NotificationBadge.vue.js";
|
|
8
|
-
import _sfc_main$1 from "../../../../../components/Button/Button.
|
|
8
|
+
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
|
9
9
|
import Select from "../../../../../components/Select/Select.vue.js";
|
|
10
10
|
import _sfc_main$3 from "../../../../icons/entities/IconShopcart.vue.js";
|
|
11
11
|
import _sfc_main$4 from "../../../../icons/entities/IconProfile.vue.js";
|
|
@@ -5,7 +5,7 @@ const vueRouter = require("vue-router");
|
|
|
5
5
|
const vueI18n = require("vue-i18n");
|
|
6
6
|
const IconShopcart = require("../../../../icons/entities/IconShopcart.vue.cjs");
|
|
7
7
|
const IconProfile = require("../../../../icons/entities/IconProfile.vue.cjs");
|
|
8
|
-
const Button = require("../../../../../components/Button/Button.
|
|
8
|
+
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
|
9
9
|
const globals = require("../../store/globals.cjs");
|
|
10
10
|
const shopcart = require("../../../../orders/store/shopcart.cjs");
|
|
11
11
|
const auth = require("../../../../auth/views/store/auth.cjs");
|
|
@@ -3,7 +3,7 @@ import { useRouter, useRoute } from "vue-router";
|
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
|
4
4
|
import _sfc_main$2 from "../../../../icons/entities/IconShopcart.vue.js";
|
|
5
5
|
import _sfc_main$3 from "../../../../icons/entities/IconProfile.vue.js";
|
|
6
|
-
import _sfc_main$1 from "../../../../../components/Button/Button.
|
|
6
|
+
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
|
7
7
|
import { state } from "../../store/globals.js";
|
|
8
8
|
import { getters, actions } from "../../../../orders/store/shopcart.js";
|
|
9
9
|
import { state as state$1 } from "../../../../auth/views/store/auth.js";
|
|
@@ -49,6 +49,22 @@ function useGlobalMixins() {
|
|
|
49
49
|
return "null";
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
+
const replaceClasses = (original = "", map = null) => {
|
|
53
|
+
if (map == null && typeof original !== "string") return "";
|
|
54
|
+
if (typeof map === "string") {
|
|
55
|
+
const orig = typeof original === "string" ? original.trim().split(/\s+/) : [];
|
|
56
|
+
const next = map.trim().split(/\s+/);
|
|
57
|
+
const replaceSet = new Set(next);
|
|
58
|
+
const replaced = orig.map((cls) => replaceSet.has(cls) ? next.find((c) => c !== cls) || cls : cls);
|
|
59
|
+
const extra = next.filter((c) => !orig.includes(c));
|
|
60
|
+
return [.../* @__PURE__ */ new Set([...replaced, ...extra])].join(" ");
|
|
61
|
+
}
|
|
62
|
+
if (typeof map === "object" && map !== null) {
|
|
63
|
+
const orig = typeof original === "string" ? original.trim().split(/\s+/) : [];
|
|
64
|
+
return orig.map((cls) => map[cls] ?? cls).join(" ");
|
|
65
|
+
}
|
|
66
|
+
return typeof original === "string" ? original.trim() : "";
|
|
67
|
+
};
|
|
52
68
|
const formatDate = (d, options = {}) => {
|
|
53
69
|
var fixedDate = new Date(d);
|
|
54
70
|
const formatOptions = {
|
|
@@ -208,6 +224,7 @@ function useGlobalMixins() {
|
|
|
208
224
|
formatPrice,
|
|
209
225
|
formatDate,
|
|
210
226
|
formateText,
|
|
227
|
+
replaceClasses,
|
|
211
228
|
normalizeUrlParam,
|
|
212
229
|
joinArrayToUrl,
|
|
213
230
|
getMarketplaceLink,
|
|
@@ -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.js';\n\n// useGlobalMixins.js\nexport function useGlobalMixins() {\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 const returnCurrency = () => {\n const currency = globals.state.options.currency || '$';\n return currency;\n };\n\n const formatPrice = number => {\n try {\n if (number == null) {\n throw new TypeError('formatPrice: ожидается число, но получено null или undefined');\n }\n\n const currency = returnCurrency();\n const absNumber = Math.abs(number)\n .toFixed(2)\n .replace('.', ',')\n .replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n\n const sign = number < 0 ? '-' : '';\n return `${sign} ${currency}${absNumber}`;\n } catch (err) {\n console.error(err);\n return 'null';\n }\n};\n\n\n const 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, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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, {\n day: '2-digit',\n month: 'short',\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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\n .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 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).getPropertyValue(name).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 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// Экспорт для глобальной регистрации\nexport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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,EACD;AACH;AAGY,MAAC,eAAe;AAAA,EAC1B,SAAS,gBAAiB;AAC5B;;;"}
|
|
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.js';\n\n// useGlobalMixins.js\nexport function useGlobalMixins() {\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 const returnCurrency = () => {\n const currency = globals.state.options.currency || '$';\n return currency;\n };\n\n const formatPrice = number => {\n try {\n if (number == null) {\n throw new TypeError('formatPrice: ожидается число, но получено null или undefined');\n }\n\n const currency = returnCurrency();\n const absNumber = Math.abs(number)\n .toFixed(2)\n .replace('.', ',')\n .replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n\n const sign = number < 0 ? '-' : '';\n return `${sign} ${currency}${absNumber}`;\n } catch (err) {\n console.error(err);\n return 'null';\n }\n };\n \n const replaceClasses = (original = '', map = null) => {\n if (map == null && typeof original !== 'string') return '';\n if (typeof map === 'string') {\n const orig = typeof original === 'string' ? original.trim().split(/\\s+/) : [];\n const next = map.trim().split(/\\s+/);\n const replaceSet = new Set(next);\n const replaced = orig.map(cls => (replaceSet.has(cls) ? next.find(c => c !== cls) || cls : cls));\n const extra = next.filter(c => !orig.includes(c));\n return [...new Set([...replaced, ...extra])].join(' ');\n }\n\n if (typeof map === 'object' && map !== null) {\n const orig = typeof original === 'string' ? original.trim().split(/\\s+/) : [];\n return orig.map(cls => map[cls] ?? cls).join(' ');\n }\n\n return typeof original === 'string' ? original.trim() : '';\n };\n \n\n const 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, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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, {\n day: '2-digit',\n month: 'short',\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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\n .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 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).getPropertyValue(name).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 return {\n isAdmin,\n hasAccess,\n returnCurrency,\n formatPrice,\n formatDate,\n formateText,\n replaceClasses,\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// Экспорт для глобальной регистрации\nexport const globalMixins = {\n methods: useGlobalMixins(),\n};\n"],"names":["isAdmin","globals.state"],"mappings":";;;AAGO,SAAS,kBAAkB;AAChC,QAAM,UAAU,WAAS;AACvB,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,EACG;AAED,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,oB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AA,EACtE;AAED,QAAM,cAAc,MAAM;AACxB,UAAM,MAAM,UAAU,kBAAkB;AACxC,UAAM,MAAM,UAAU,kBAAkB;AACxC,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACtE;AAED,QAAM,eAAe,MAAM,WAAW,mBAAmB;AAEzD,SAAO;AAAA,IACL;AAAA,IACA;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,EACD;AACH;AAGY,MAAC,eAAe;AAAA,EAC1B,SAAS,gBAAiB;AAC5B;;;"}
|
|
@@ -47,6 +47,22 @@ function useGlobalMixins() {
|
|
|
47
47
|
return "null";
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
+
const replaceClasses = (original = "", map = null) => {
|
|
51
|
+
if (map == null && typeof original !== "string") return "";
|
|
52
|
+
if (typeof map === "string") {
|
|
53
|
+
const orig = typeof original === "string" ? original.trim().split(/\s+/) : [];
|
|
54
|
+
const next = map.trim().split(/\s+/);
|
|
55
|
+
const replaceSet = new Set(next);
|
|
56
|
+
const replaced = orig.map((cls) => replaceSet.has(cls) ? next.find((c) => c !== cls) || cls : cls);
|
|
57
|
+
const extra = next.filter((c) => !orig.includes(c));
|
|
58
|
+
return [.../* @__PURE__ */ new Set([...replaced, ...extra])].join(" ");
|
|
59
|
+
}
|
|
60
|
+
if (typeof map === "object" && map !== null) {
|
|
61
|
+
const orig = typeof original === "string" ? original.trim().split(/\s+/) : [];
|
|
62
|
+
return orig.map((cls) => map[cls] ?? cls).join(" ");
|
|
63
|
+
}
|
|
64
|
+
return typeof original === "string" ? original.trim() : "";
|
|
65
|
+
};
|
|
50
66
|
const formatDate = (d, options = {}) => {
|
|
51
67
|
var fixedDate = new Date(d);
|
|
52
68
|
const formatOptions = {
|
|
@@ -206,6 +222,7 @@ function useGlobalMixins() {
|
|
|
206
222
|
formatPrice,
|
|
207
223
|
formatDate,
|
|
208
224
|
formateText,
|
|
225
|
+
replaceClasses,
|
|
209
226
|
normalizeUrlParam,
|
|
210
227
|
joinArrayToUrl,
|
|
211
228
|
getMarketplaceLink,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixins.js","sources":["../../../../../../../src/modules/globals/views/mixins/mixins.js"],"sourcesContent":["import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n\n// useGlobalMixins.js\nexport function useGlobalMixins() {\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 const returnCurrency = () => {\n const currency = globals.state.options.currency || '$';\n return currency;\n };\n\n const formatPrice = number => {\n try {\n if (number == null) {\n throw new TypeError('formatPrice: ожидается число, но получено null или undefined');\n }\n\n const currency = returnCurrency();\n const absNumber = Math.abs(number)\n .toFixed(2)\n .replace('.', ',')\n .replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n\n const sign = number < 0 ? '-' : '';\n return `${sign} ${currency}${absNumber}`;\n } catch (err) {\n console.error(err);\n return 'null';\n }\n};\n\n\n const 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, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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, {\n day: '2-digit',\n month: 'short',\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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\n .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 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).getPropertyValue(name).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 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// Экспорт для глобальной регистрации\nexport const globalMixins = {\n methods: useGlobalMixins(),\n};\n"],"names":["isAdmin","globals.state","state"],"mappings":";AAGO,SAAS,kBAAkB;AAChC,QAAM,UAAU,WAAS;AACvB,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,EACG;AAED,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;AAED,QAAM,iBAAiB,MAAM;AAC3B,UAAM,WAAWC,MAAc,QAAQ,YAAY;AACnD,WAAO;AAAA,EACR;AAEA,QAAM,cAAc,YAAU;AAC/B,QAAI;AACF,UAAI,UAAU,MAAM;AAClB,cAAM,IAAI,UAAU,8DAA8D;AAAA,MACxF;AAEI,YAAM,WAAW,eAAgB;AACjC,YAAM,YAAY,KAAK,IAAI,MAAM,EAC9B,QAAQ,CAAC,EACT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AAU,kBAAkB;AACxC,UAAM,MAAM,UAAU,kBAAkB;AACxC,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACtE;AAED,QAAM,eAAe,MAAM,WAAW,mBAAmB;AAEzD,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,EACD;AACH;AAGY,MAAC,eAAe;AAAA,EAC1B,SAAS,gBAAiB;AAC5B;"}
|
|
1
|
+
{"version":3,"file":"mixins.js","sources":["../../../../../../../src/modules/globals/views/mixins/mixins.js"],"sourcesContent":["import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n\n// useGlobalMixins.js\nexport function useGlobalMixins() {\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 const returnCurrency = () => {\n const currency = globals.state.options.currency || '$';\n return currency;\n };\n\n const formatPrice = number => {\n try {\n if (number == null) {\n throw new TypeError('formatPrice: ожидается число, но получено null или undefined');\n }\n\n const currency = returnCurrency();\n const absNumber = Math.abs(number)\n .toFixed(2)\n .replace('.', ',')\n .replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n\n const sign = number < 0 ? '-' : '';\n return `${sign} ${currency}${absNumber}`;\n } catch (err) {\n console.error(err);\n return 'null';\n }\n };\n \n const replaceClasses = (original = '', map = null) => {\n if (map == null && typeof original !== 'string') return '';\n if (typeof map === 'string') {\n const orig = typeof original === 'string' ? original.trim().split(/\\s+/) : [];\n const next = map.trim().split(/\\s+/);\n const replaceSet = new Set(next);\n const replaced = orig.map(cls => (replaceSet.has(cls) ? next.find(c => c !== cls) || cls : cls));\n const extra = next.filter(c => !orig.includes(c));\n return [...new Set([...replaced, ...extra])].join(' ');\n }\n\n if (typeof map === 'object' && map !== null) {\n const orig = typeof original === 'string' ? original.trim().split(/\\s+/) : [];\n return orig.map(cls => map[cls] ?? cls).join(' ');\n }\n\n return typeof original === 'string' ? original.trim() : '';\n };\n \n\n const 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, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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, {\n day: '2-digit',\n month: 'short',\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n }).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\n .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 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).getPropertyValue(name).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 return {\n isAdmin,\n hasAccess,\n returnCurrency,\n formatPrice,\n formatDate,\n formateText,\n replaceClasses,\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// Экспорт для глобальной регистрации\nexport const globalMixins = {\n methods: useGlobalMixins(),\n};\n"],"names":["isAdmin","globals.state","state"],"mappings":";AAGO,SAAS,kBAAkB;AAChC,QAAM,UAAU,WAAS;AACvB,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,EACG;AAED,QAAM,YAAY,CAAC,gBAAgB,gBAAgB,MAAM,YAAY,MAAM,UAAU,UAAU;AAE7F,QAAI,QAAQ,KAAK,GAAG;AAClB,aAAO;AAAA,IACb;AA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,MAAM,iBAAkB,KAAI,kBAAmB;AAEhE,QAAM,YAAY,MAAM;AACtB,UAAM,MAAM,UAAU,eAAe;AACrC,UAAM,MAAM,UAAU,eAAe;AACrC,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACtE;AAED,QAAM,cAAc,MAAM;AACxB,UAAM,MAAM,UAAU,kBAAkB;AACxC,UAAM,MAAM,UAAU,kBAAkB;AACxC,WAAO,eAAe,eAAe,GAAG,qBAAqB,GAAG,GAAG,EAAE;AAAA,EACtE;AAED,QAAM,eAAe,MAAM,WAAW,mBAAmB;AAEzD,SAAO;AAAA,IACL;AAAA,IACA;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,EACD;AACH;AAGY,MAAC,eAAe;AAAA,EAC1B,SAAS,gBAAiB;AAC5B;"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const PopupAuth = require("../components/blocks/PopupAuth.vue.cjs");
|
|
5
|
+
const state = vue.reactive({
|
|
6
|
+
visible: false,
|
|
7
|
+
title: "Welcome",
|
|
8
|
+
subtitle: "Please sign in or create an account to continue.",
|
|
9
|
+
returnUrl: "",
|
|
10
|
+
resolve: null,
|
|
11
|
+
reject: null
|
|
12
|
+
});
|
|
13
|
+
function showAuth({
|
|
14
|
+
title = "Welcome",
|
|
15
|
+
subtitle = "Please sign in or create an account to continue.",
|
|
16
|
+
returnUrl = ""
|
|
17
|
+
} = {}) {
|
|
18
|
+
return new Promise((res, rej) => {
|
|
19
|
+
state.resolve = res;
|
|
20
|
+
state.reject = rej;
|
|
21
|
+
state.title = title;
|
|
22
|
+
state.subtitle = subtitle;
|
|
23
|
+
state.returnUrl = returnUrl;
|
|
24
|
+
state.visible = true;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function closeAuth(result = null) {
|
|
28
|
+
var _a;
|
|
29
|
+
state.visible = false;
|
|
30
|
+
(_a = state.resolve) == null ? void 0 : _a.call(state, result);
|
|
31
|
+
state.resolve = state.reject = null;
|
|
32
|
+
}
|
|
33
|
+
function cancelAuth() {
|
|
34
|
+
var _a;
|
|
35
|
+
state.visible = false;
|
|
36
|
+
(_a = state.reject) == null ? void 0 : _a.call(state, new Error("Authentication cancelled"));
|
|
37
|
+
state.resolve = state.reject = null;
|
|
38
|
+
}
|
|
39
|
+
const AuthDialogHost = vue.defineComponent({
|
|
40
|
+
name: "AuthDialogHost",
|
|
41
|
+
setup() {
|
|
42
|
+
return () => {
|
|
43
|
+
if (!state.visible) return null;
|
|
44
|
+
return vue.h(PopupAuth.default, {
|
|
45
|
+
authState: state,
|
|
46
|
+
closeAuth,
|
|
47
|
+
"onClose-popup": cancelAuth
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const popupAuthPlugin = {
|
|
53
|
+
install(app) {
|
|
54
|
+
app.config.globalProperties.$auth = showAuth;
|
|
55
|
+
app.config.globalProperties.$showAuth = showAuth;
|
|
56
|
+
if (typeof window !== "undefined" && typeof document !== "undefined") {
|
|
57
|
+
const container = document.createElement("div");
|
|
58
|
+
container.id = "auth-dialog-host";
|
|
59
|
+
document.body.appendChild(container);
|
|
60
|
+
const vnode = vue.h(AuthDialogHost);
|
|
61
|
+
vnode.appContext = app._context;
|
|
62
|
+
vue.render(vnode, container);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.cancelAuth = cancelAuth;
|
|
67
|
+
exports.closeAuth = closeAuth;
|
|
68
|
+
exports.default = popupAuthPlugin;
|
|
69
|
+
exports.showAuth = showAuth;
|
|
70
|
+
//# sourceMappingURL=popup.auth.plugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup.auth.plugin.cjs","sources":["../../../../../../../src/modules/globals/views/plugins/popup.auth.plugin.js"],"sourcesContent":["// @martyrs/src/modules/auth/views/plugins/authPlugin.js\nimport { reactive, defineComponent, h, render } from 'vue';\nimport PopupAuth from '@martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue';\n\n// 1) Общее состояние и API\nconst state = reactive({\n visible: false,\n title: 'Welcome',\n subtitle: 'Please sign in or create an account to continue.',\n returnUrl: '',\n resolve: null,\n reject: null\n});\n\nexport function showAuth({ \n title = 'Welcome', \n subtitle = 'Please sign in or create an account to continue.',\n returnUrl = ''\n} = {}) {\n return new Promise((res, rej) => {\n state.resolve = res;\n state.reject = rej;\n state.title = title;\n state.subtitle = subtitle;\n state.returnUrl = returnUrl;\n state.visible = true;\n });\n}\n\nexport function closeAuth(result = null) {\n state.visible = false;\n state.resolve?.(result);\n state.resolve = state.reject = null;\n}\n\nexport function cancelAuth() {\n state.visible = false;\n state.reject?.(new Error('Authentication cancelled'));\n state.resolve = state.reject = null;\n}\n\n// 2) Хост-компонент\nconst AuthDialogHost = defineComponent({\n name: 'AuthDialogHost',\n setup() {\n return () => {\n if (!state.visible) return null;\n \n return h(PopupAuth, {\n authState: state,\n closeAuth: closeAuth,\n 'onClose-popup': cancelAuth\n });\n };\n }\n});\n\n// 3) Плагин\nexport default {\n install(app) {\n // 3.1) Глобальный метод\n app.config.globalProperties.$auth = showAuth;\n app.config.globalProperties.$showAuth = showAuth;\n \n // 3.2) Контейнер в body\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n const container = document.createElement('div');\n container.id = 'auth-dialog-host';\n document.body.appendChild(container);\n \n // 3.3) Рендерим VNode в контексте основного app\n const vnode = h(AuthDialogHost);\n vnode.appContext = app._context; // <-- ключевой момент\n render(vnode, container);\n }\n }\n};"],"names":["reactive","defineComponent","h","PopupAuth","render"],"mappings":";;;;AAKA,MAAM,QAAQA,IAAAA,SAAS;AAAA,EACrB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AACV,CAAC;AAEM,SAAS,SAAS;AAAA,EACvB,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,YAAY;AACd,IAAI,IAAI;AACN,SAAO,IAAI,QAAQ,CAAC,KAAK,QAAQ;AAC/B,UAAM,UAAU;AAChB,UAAM,SAAS;AACf,UAAM,QAAQ;AACd,UAAM,WAAW;AACjB,UAAM,YAAY;AAClB,UAAM,UAAU;AAAA,EACpB,CAAG;AACH;AAEO,SAAS,UAAU,SAAS,MAAM;;AACvC,QAAM,UAAU;AAChB,cAAM,YAAN,+BAAgB;AAChB,QAAM,UAAU,MAAM,SAAS;AACjC;AAEO,SAAS,aAAa;;AAC3B,QAAM,UAAU;AAChB,cAAM,WAAN,+BAAe,IAAI,MAAM,0BAA0B;AACnD,QAAM,UAAU,MAAM,SAAS;AACjC;AAGA,MAAM,iBAAiBC,IAAAA,gBAAgB;AAAA,EACrC,MAAM;AAAA,EACN,QAAQ;AACN,WAAO,MAAM;AACX,UAAI,CAAC,MAAM,QAAS,QAAO;AAE3B,aAAOC,IAAAA,EAAEC,UAAAA,SAAW;AAAA,QAClB,WAAW;AAAA,QACX;AAAA,QACA,iBAAiB;AAAA,MACzB,CAAO;AAAA,IACF;AAAA,EACL;AACA,CAAC;AAGD,MAAe,kBAAA;AAAA,EACb,QAAQ,KAAK;AAEX,QAAI,OAAO,iBAAiB,QAAQ;AACpC,QAAI,OAAO,iBAAiB,YAAY;AAGxC,QAAI,OAAO,WAAW,eAAe,OAAO,aAAa,aAAa;AACpE,YAAM,YAAY,SAAS,cAAc,KAAK;AAC9C,gBAAU,KAAK;AACf,eAAS,KAAK,YA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