@ozdao/prometheus-framework 0.2.323 → 0.2.325
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Media-BjSScxrV.js +1 -0
- package/dist/Media-CCVndMgQ.mjs +111 -0
- package/dist/main-BBmjvE8i.js +92 -0
- package/dist/main-BCskq3d2.mjs +13068 -0
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +9 -11
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +10 -12
- package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +37 -9
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +37 -9
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js.map +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +27 -18
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +27 -18
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +93 -0
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +94 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs +0 -93
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js +1 -94
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/prometheus-framework/src/components/EmptyState/EmptyState.vue.cjs +2 -2
- package/dist/prometheus-framework/src/components/EmptyState/EmptyState.vue.js +2 -2
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +7 -3
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +7 -3
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Media/Media.vue.cjs +154 -0
- package/dist/prometheus-framework/src/components/Media/Media.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Media/Media.vue.js +154 -0
- package/dist/prometheus-framework/src/components/Media/Media.vue.js.map +1 -0
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -4
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -4
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +68 -37
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +69 -38
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs +0 -2
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js +4 -6
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +118 -3
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +119 -4
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +112 -163
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +119 -170
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +0 -17
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +2 -19
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +18 -78
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +23 -83
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +34 -25
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +35 -26
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +45 -38
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +56 -49
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +221 -50
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +225 -54
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/EventsHot.vue.cjs +98 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/EventsHot.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/EventsHot.vue.js +98 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/EventsHot.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.cjs +9 -9
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/events.client.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/events.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/events.client.js +1 -0
- package/dist/prometheus-framework/src/modules/events/events.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +2 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +2 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +11 -5
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +11 -5
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/CitySelection.vue.cjs +100 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/CitySelection.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/CitySelection.vue.js +100 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/CitySelection.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +6 -7
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +6 -7
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.cjs +1 -6
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.js +1 -6
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.cjs +30 -14
- package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.js +30 -14
- package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/actions/IconShopcartAdd.vue.cjs +33 -0
- package/dist/prometheus-framework/src/modules/icons/actions/IconShopcartAdd.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/actions/IconShopcartAdd.vue.js +33 -0
- package/dist/prometheus-framework/src/modules/icons/actions/IconShopcartAdd.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs +4 -17
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js +4 -17
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconPayments.vue.cjs +34 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPayments.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPayments.vue.js +34 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPayments.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.cjs +27 -17
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.js +28 -18
- package/dist/prometheus-framework/src/modules/icons/entities/IconPrice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/icons.client.cjs +2 -0
- package/dist/prometheus-framework/src/modules/icons/icons.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/icons.client.js +50 -48
- package/dist/prometheus-framework/src/modules/icons/icons.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +67 -2
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +67 -2
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +821 -789
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +821 -789
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +4 -15
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +4 -15
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.cjs +24 -30
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.js +25 -31
- package/dist/prometheus-framework/src/modules/products/components/elements/Price.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +236 -13
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +239 -16
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +60 -14
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +67 -21
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.cjs +0 -3
- package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js +48 -51
- package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/prometheus-framework.cjs.js +1 -92
- package/dist/prometheus-framework.es.js +36 -13005
- package/package.json +1 -1
- package/src/components/Button/Button.vue +43 -40
- package/src/components/DatePicker/Calendar.vue +15 -7
- package/src/components/DatePicker/DatePicker.vue +50 -40
- package/src/components/EmptyState/EmptyState.vue +2 -2
- package/src/components/Feed/Feed.vue +6 -2
- package/src/components/Media/Media.vue +211 -0
- package/src/components/Popup/Popup.vue +19 -21
- package/src/components/Slider/Slider.vue +57 -21
- package/src/components/index.js +1 -0
- package/src/main.js +3 -1
- package/src/modules/auth/views/components/pages/Profile.vue +2 -1
- package/src/modules/backoffice/backoffice.client.js +0 -2
- package/src/modules/backoffice/components/pages/Dashboard.vue +95 -2
- package/src/modules/backoffice/components/partials/Sidebar.vue +115 -132
- package/src/modules/backoffice/router/backoffice.js +0 -14
- package/src/modules/community/components/layouts/Community.vue +1 -52
- package/src/modules/events/components/blocks/CardEvent.vue +28 -22
- package/src/modules/events/components/pages/Event.vue +11 -8
- package/src/modules/events/components/pages/Events.vue +241 -56
- package/src/modules/events/components/sections/EventsHot.vue +93 -0
- package/src/modules/events/components/sections/FeaturedEvents.vue +17 -15
- package/src/modules/events/components/sections/List.vue +1 -1
- package/src/modules/events/events.client.js +1 -0
- package/src/modules/events/router/events.js +0 -4
- package/src/modules/events/store/events.js +1 -0
- package/src/modules/globals/views/components/layouts/App.vue +4 -5
- package/src/modules/globals/views/components/layouts/Client.vue +8 -2
- package/src/modules/globals/views/components/partials/CitySelection.vue +88 -0
- package/src/modules/globals/views/components/partials/Header.vue +3 -3
- package/src/modules/globals/views/components/partials/Navigation.vue +75 -20
- package/src/modules/globals/views/components/partials/Sidebar.vue +2 -9
- package/src/modules/globals/views/mixins/mixins.js +56 -35
- package/src/modules/governance/DESCRIPTION.MD +238 -0
- package/src/modules/governance/controllers/factories/initiatives.controller.js +3 -1
- package/src/modules/governance/controllers/routes/initiatives.routes.js +1 -1
- package/src/modules/governance/controllers/routes/tasks.routes.js +1 -1
- package/src/modules/governance/controllers/routes/votes.routes.js +1 -1
- package/src/modules/governance/controllers/routes/votings.routes.js +1 -1
- package/src/modules/governance/governance.client.js +35 -35
- package/src/modules/governance/governance.server.js +8 -8
- package/src/modules/governance/models/milestone.model.js +98 -0
- package/src/modules/governance/models/task.model.js +39 -7
- package/src/modules/governance/views/components/pages/Initiative.vue +1 -1
- package/src/modules/governance/views/components/pages/InitiativeCreate.vue +2 -2
- package/src/modules/governance/views/components/pages/Initiatives.vue +3 -2
- package/src/modules/governance/views/components/pages/Task.vue +1 -1
- package/src/modules/governance/views/components/pages/TaskCreate.vue +2 -2
- package/src/modules/governance/views/components/pages/Tasks.vue +2 -2
- package/src/modules/governance/views/components/pages/Voting.vue +3 -3
- package/src/modules/governance/views/components/pages/VotingCreate.vue +2 -2
- package/src/modules/governance/views/components/pages/Votings.vue +2 -2
- package/src/modules/governance/views/components/sections/VoteForm.vue +1 -1
- package/src/modules/governance/views/router/goverance.router.js +263 -0
- package/src/modules/icons/actions/IconShopcartAdd.vue +15 -0
- package/src/modules/icons/entities/IconCommunity.vue +4 -6
- package/src/modules/icons/entities/IconPayments.vue +14 -0
- package/src/modules/icons/entities/IconPrice.vue +12 -3
- package/src/modules/icons/icons.client.js +5 -0
- package/src/modules/icons/logos/Logotype.vue +50 -17
- package/src/modules/orders/components/blocks/CardOrderItem.vue +2 -0
- package/src/modules/orders/store/shopcart.js +100 -1
- package/src/modules/organizations/components/pages/Organizations.vue +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +5 -11
- package/src/modules/products/components/blocks/ImagesThumbnails.vue +4 -4
- package/src/modules/products/components/elements/Price.vue +33 -56
- package/src/modules/products/components/pages/Product.vue +235 -13
- package/src/modules/products/components/sections/SectionProduct.vue +50 -25
- package/src/modules/products/products.client.js +0 -4
- package/src/styles/base/all.scss +15 -16
- package/src/styles/config.scss +2 -2
- package/src/modules/backoffice/components/layouts/Backoffice.vue +0 -55
- package/src/modules/events/components/sections/SectionLineup.vue +0 -42
- package/src/modules/events/components/sections/SectionMainGuest.vue +0 -95
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +0 -117
- package/src/modules/events/components/sections/SectionSpecialGuests.vue +0 -46
- package/src/modules/governance/controllers/factories/projects.controller.js +0 -65
- package/src/modules/governance/controllers/routes/projects.routes.js +0 -34
- package/src/modules/governance/models/project.model.js +0 -26
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Feed.vue.cjs","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-medium o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 300);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\nwatch(\n () => [props.external, date.value, sort.value, props.options],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","shallowRef","ref","search","watch","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,UAAM,SAASA,IAAAA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,IAAAA,kBAAY,MAAM;AAC/B,UAAM,SAASA,IAAAA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,IAAAA,kBAAY,MAAM;AAC/B,UAAM,QAAQA,IAAAA,kBAAY,OAAO;AAGjC,UAAM,QAAQ;AA6Cd,UAAM,YAAYC,IAAAA,WAAW,MAAM,SAAS,CAAE,CAAA;AAC9C,UAAM,eAAeC,IAAAA,IAAI,KAAK;AAE9B,QAAI,YAAYA,IAAAA,IAAI,IAAI;AACxB,QAAI,iBAAiBA,IAAAA,IAAI,KAAK;AAC9B,QAAI,WAAWA,IAAG,IAAC,IAAI;AAEvB,QAAI,cAAcA,IAAAA,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAeA,IAAAA,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAKrE,QAAI,gBAAgBA,IAAAA,IAAI,EAAE;AAE1B,aAAS,SAAS,IAAI,OAAO;AAC3B,UAAI,YAAY;AAChB,aAAO,IAAI,SAAS;AAClB,qBAAa,SAAS;AACtB,oBAAY,WAAW,MAAM,GAAG,GAAG,IAAI,GAAG,KAAK;AAAA,MACnD;AAAA,IACA;AAEA,UAAM,kBAAkB,SAAS,CAAC,UAAU;AAC1C,oBAAc,QAAQ;AACtB,kBAAY,QAAQ;AACpB,mBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Feed.vue.cjs","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-medium o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-medium\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 300);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\nwatch(\n () => [props.external, date.value, sort.value, props.options],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","shallowRef","ref","search","watch","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,UAAM,SAASA,IAAAA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,IAAAA,kBAAY,MAAM;AAC/B,UAAM,SAASA,IAAAA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,IAAAA,kBAAY,MAAM;AAC/B,UAAM,QAAQA,IAAAA,kBAAY,OAAO;AAGjC,UAAM,QAAQ;AAiDd,UAAM,YAAYC,IAAAA,WAAW,MAAM,SAAS,CAAE,CAAA;AAC9C,UAAM,eAAeC,IAAAA,IAAI,KAAK;AAE9B,QAAI,YAAYA,IAAAA,IAAI,IAAI;AACxB,QAAI,iBAAiBA,IAAAA,IAAI,KAAK;AAC9B,QAAI,WAAWA,IAAG,IAAC,IAAI;AAEvB,QAAI,cAAcA,IAAAA,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAeA,IAAAA,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAKrE,QAAI,gBAAgBA,IAAAA,IAAI,EAAE;AAE1B,aAAS,SAAS,IAAI,OAAO;AAC3B,UAAI,YAAY;AA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;AAEDC,QAAAA,YAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACpB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,7 +2,7 @@ import { mergeModels, useModel, shallowRef, ref, watch, onMounted, onUnmounted,
|
|
2
2
|
import SkeletonEvent from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
3
|
import Loader from "../Loader/Loader.vue2.js";
|
4
4
|
import _sfc_main$a from "../EmptyState/EmptyState.vue.js";
|
5
|
-
import _sfc_main$5 from "../Dropdown/Dropdown.
|
5
|
+
import _sfc_main$5 from "../Dropdown/Dropdown.vue2.js";
|
6
6
|
import _sfc_main$7 from "../DatePicker/Calendar.vue2.js";
|
7
7
|
import _sfc_main$3 from "../BottomSheet/BottomSheet.vue.js";
|
8
8
|
import _sfc_main$1 from "../../modules/globals/views/components/blocks/BlockSearch.vue.js";
|
@@ -27,6 +27,10 @@ const _sfc_main = {
|
|
27
27
|
type: Boolean,
|
28
28
|
default: true
|
29
29
|
},
|
30
|
+
LoadMore: {
|
31
|
+
type: Boolean,
|
32
|
+
default: true
|
33
|
+
},
|
30
34
|
search: {
|
31
35
|
type: [Boolean, Object],
|
32
36
|
default: false
|
@@ -171,7 +175,7 @@ const _sfc_main = {
|
|
171
175
|
let observer = null;
|
172
176
|
onMounted(async () => {
|
173
177
|
await fetchItems();
|
174
|
-
if (typeof window !== "undefined" && !props.showLoadMore) {
|
178
|
+
if (typeof window !== "undefined" && !props.showLoadMore && props.LoadMore) {
|
175
179
|
observer = new IntersectionObserver((entries) => {
|
176
180
|
if (entries.some((entry) => entry.isIntersecting)) {
|
177
181
|
loadMoreItems();
|
@@ -294,7 +298,7 @@ const _sfc_main = {
|
|
294
298
|
description: __props.states.empty.description,
|
295
299
|
action: __props.states.empty.action,
|
296
300
|
callback: __props.states.empty.callback,
|
297
|
-
class: "pd-medium mn-b-thin bg-light radius-
|
301
|
+
class: "pd-medium mn-b-thin bg-light radius-medium"
|
298
302
|
}, null, 8, ["title", "description", "action", "callback"])) : createCommentVNode("", true)
|
299
303
|
]),
|
300
304
|
_: 1
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Feed.vue.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-medium o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 300);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\nwatch(\n () => [props.external, date.value, sort.value, props.options],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,QAAQA,kBAAY,OAAO;AAGjC,UAAM,QAAQ;AA6Cd,UAAM,YAAY,WAAW,MAAM,SAAS,CAAE,CAAA;AAC9C,UAAM,eAAe,IAAI,KAAK;AAE9B,QAAI,YAAY,IAAI,IAAI;AACxB,QAAI,iBAAiB,IAAI,KAAK;AAC9B,QAAI,WAAW,IAAI,IAAI;AAEvB,QAAI,cAAc,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAe,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAKrE,QAAI,gBAAgB,IAAI,EAAE;AAE1B,aAAS,SAAS,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AC;AAED,gBAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACpB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Feed.vue.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-medium o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-medium\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 300);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\nwatch(\n () => [props.external, date.value, sort.value, props.options],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,QAAQA,kBAAY,OAAO;AAGjC,UAAM,QAAQ;AAiDd,UAAM,YAAY,WAAW,MAAM,SAAS,CAAE,CAAA;AAC9C,UAAM,eAAe,IAAI,KAAK;AAE9B,QAAI,YAAY,IAAI,IAAI;AACxB,QAAI,iBAAiB,IAAI,KAAK;AAC9B,QAAI,WAAW,IAAI,IAAI;AAEvB,QAAI,cAAc,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAe,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAKr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,SAAS,MAAO,UAAS,QAAQ,SAAS,KAAK;AAAA,MACpD;AAAA,IACH,CAAC;AAED,gBAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACpB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -0,0 +1,154 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const vue = require("vue");
|
4
|
+
;/* empty css */
|
5
|
+
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
|
6
|
+
const _hoisted_1 = { class: "media-container" };
|
7
|
+
const _hoisted_2 = ["src", "data-src", "alt"];
|
8
|
+
const _hoisted_3 = ["controls", "loop", "muted", "autoplay", "playsinline", "preload"];
|
9
|
+
const _hoisted_4 = ["src", "type"];
|
10
|
+
const _hoisted_5 = {
|
11
|
+
key: 2,
|
12
|
+
class: "media-placeholder"
|
13
|
+
};
|
14
|
+
const _hoisted_6 = {
|
15
|
+
key: 3,
|
16
|
+
class: "media-error"
|
17
|
+
};
|
18
|
+
const _sfc_main = {
|
19
|
+
__name: "Media",
|
20
|
+
props: {
|
21
|
+
url: {
|
22
|
+
type: String,
|
23
|
+
required: true
|
24
|
+
},
|
25
|
+
options: {
|
26
|
+
type: Object,
|
27
|
+
default: () => ({
|
28
|
+
muted: true,
|
29
|
+
loop: true,
|
30
|
+
playsinline: true,
|
31
|
+
preload: "metadata"
|
32
|
+
// 'none' | 'metadata' | 'auto'
|
33
|
+
})
|
34
|
+
}
|
35
|
+
},
|
36
|
+
setup(__props) {
|
37
|
+
const props = __props;
|
38
|
+
const videoElement = vue.ref(null);
|
39
|
+
const imageElement = vue.ref(null);
|
40
|
+
const isLoaded = vue.ref(false);
|
41
|
+
const error = vue.ref(null);
|
42
|
+
const isIntersecting = vue.ref(false);
|
43
|
+
let observer = null;
|
44
|
+
let isPlaying = false;
|
45
|
+
const fileExtension = vue.computed(() => {
|
46
|
+
var _a, _b, _c;
|
47
|
+
return (_c = (_b = (_a = props.url) == null ? void 0 : _a.split(".")) == null ? void 0 : _b.pop()) == null ? void 0 : _c.toLowerCase();
|
48
|
+
});
|
49
|
+
const isImage = vue.computed(() => {
|
50
|
+
const imageExtensions = ["jpg", "jpeg", "png", "gif", "webp", "svg", "avif"];
|
51
|
+
return imageExtensions.includes(fileExtension.value);
|
52
|
+
});
|
53
|
+
const isVideo = vue.computed(() => {
|
54
|
+
const videoExtensions = ["mp4", "webm", "ogg"];
|
55
|
+
return videoExtensions.includes(fileExtension.value);
|
56
|
+
});
|
57
|
+
const videoType = vue.computed(() => {
|
58
|
+
const types = {
|
59
|
+
"mp4": "video/mp4",
|
60
|
+
"webm": "video/webm",
|
61
|
+
"ogg": "video/ogg"
|
62
|
+
};
|
63
|
+
return types[fileExtension.value] || "";
|
64
|
+
});
|
65
|
+
function handleLoad() {
|
66
|
+
isLoaded.value = true;
|
67
|
+
}
|
68
|
+
function handleError(err) {
|
69
|
+
error.value = `Ошибка загрузки медиа: ${err.message}`;
|
70
|
+
isLoaded.value = false;
|
71
|
+
}
|
72
|
+
async function playVideo() {
|
73
|
+
if (!videoElement.value) return;
|
74
|
+
try {
|
75
|
+
if (videoElement.value.paused && !isPlaying) {
|
76
|
+
await videoElement.value.play();
|
77
|
+
isPlaying = true;
|
78
|
+
}
|
79
|
+
} catch (err) {
|
80
|
+
handleError(err);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
function setupIntersectionObserver() {
|
84
|
+
const options = {
|
85
|
+
root: null,
|
86
|
+
rootMargin: "50px",
|
87
|
+
threshold: 0.1
|
88
|
+
};
|
89
|
+
observer = new IntersectionObserver((entries) => {
|
90
|
+
entries.forEach((entry) => {
|
91
|
+
var _a;
|
92
|
+
isIntersecting.value = entry.isIntersecting;
|
93
|
+
if (entry.isIntersecting) {
|
94
|
+
if (isVideo.value && ((_a = props.options) == null ? void 0 : _a.autoplay)) {
|
95
|
+
playVideo();
|
96
|
+
}
|
97
|
+
observer.disconnect();
|
98
|
+
}
|
99
|
+
});
|
100
|
+
}, options);
|
101
|
+
const element = isImage.value ? imageElement.value : videoElement.value;
|
102
|
+
if (element) {
|
103
|
+
observer.observe(element);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
vue.onMounted(() => {
|
107
|
+
setupIntersectionObserver();
|
108
|
+
});
|
109
|
+
vue.onUnmounted(() => {
|
110
|
+
if (observer) {
|
111
|
+
observer.disconnect();
|
112
|
+
}
|
113
|
+
});
|
114
|
+
return (_ctx, _cache) => {
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
116
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
117
|
+
isImage.value ? (vue.openBlock(), vue.createElementBlock("img", vue.mergeProps({
|
118
|
+
key: 0,
|
119
|
+
src: isIntersecting.value ? __props.url : "",
|
120
|
+
"data-src": __props.url,
|
121
|
+
alt: ((_a = __props.options) == null ? void 0 : _a.alt) || "Image",
|
122
|
+
class: ["media-item", { "loading": !isLoaded.value }],
|
123
|
+
loading: "lazy",
|
124
|
+
onLoad: handleLoad
|
125
|
+
}, __props.options, {
|
126
|
+
ref_key: "imageElement",
|
127
|
+
ref: imageElement
|
128
|
+
}), null, 16, _hoisted_2)) : isVideo.value ? (vue.openBlock(), vue.createElementBlock("video", vue.mergeProps({
|
129
|
+
key: 1,
|
130
|
+
ref_key: "videoElement",
|
131
|
+
ref: videoElement,
|
132
|
+
class: [{ "loading": !isLoaded.value }, "media-item"],
|
133
|
+
controls: !((_b = __props.options) == null ? void 0 : _b.hideControls),
|
134
|
+
loop: ((_c = __props.options) == null ? void 0 : _c.loop) !== false,
|
135
|
+
muted: ((_d = __props.options) == null ? void 0 : _d.muted) !== false,
|
136
|
+
autoplay: (_e = __props.options) == null ? void 0 : _e.autoplay,
|
137
|
+
playsinline: ((_f = __props.options) == null ? void 0 : _f.playsinline) !== false,
|
138
|
+
preload: ((_g = __props.options) == null ? void 0 : _g.preload) || "metadata",
|
139
|
+
onLoadeddata: handleLoad
|
140
|
+
}, __props.options), [
|
141
|
+
vue.createElementVNode("source", {
|
142
|
+
src: __props.url,
|
143
|
+
type: videoType.value
|
144
|
+
}, null, 8, _hoisted_4)
|
145
|
+
], 16, _hoisted_3)) : vue.createCommentVNode("", true),
|
146
|
+
!isLoaded.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, " Загрузка... ")) : vue.createCommentVNode("", true),
|
147
|
+
error.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, vue.toDisplayString(error.value), 1)) : vue.createCommentVNode("", true)
|
148
|
+
]);
|
149
|
+
};
|
150
|
+
}
|
151
|
+
};
|
152
|
+
const Media = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-94bcf726"]]);
|
153
|
+
exports.default = Media;
|
154
|
+
//# sourceMappingURL=Media.vue.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Media.vue.cjs","sources":["../../../../../src/components/Media/Media.vue"],"sourcesContent":["<template>\n <div class=\"media-container\">\n <!-- Изображение с ленивой загрузкой и placeholder -->\n <img\n v-if=\"isImage\"\n :src=\"isIntersecting ? url : ''\"\n :data-src=\"url\"\n :alt=\"options?.alt || 'Image'\"\n class=\"media-item\"\n :class=\"{ 'loading': !isLoaded }\"\n loading=\"lazy\"\n @load=\"handleLoad\"\n v-bind=\"options\"\n ref=\"imageElement\"\n />\n \n <!-- Видео с предварительной загрузкой -->\n <video\n v-else-if=\"isVideo\"\n ref=\"videoElement\"\n :class=\"{ 'loading': !isLoaded }\"\n class=\"media-item\"\n :controls=\"!options?.hideControls\"\n :loop=\"options?.loop !== false\"\n :muted=\"options?.muted !== false\"\n :autoplay=\"options?.autoplay\"\n :playsinline=\"options?.playsinline !== false\"\n :preload=\"options?.preload || 'metadata'\"\n @loadeddata=\"handleLoad\"\n v-bind=\"options\"\n >\n <source :src=\"url\" :type=\"videoType\">\n </video>\n \n <!-- Плейсхолдер во время загрузки -->\n <div v-if=\"!isLoaded\" class=\"media-placeholder\">\n Загрузка...\n </div>\n \n <!-- Сообщение об ошибке -->\n <div v-if=\"error\" class=\"media-error\">\n {{ error }}\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, computed, onUnmounted } from 'vue'\n\nconst props = defineProps({\n url: {\n type: String,\n required: true\n },\n options: {\n type: Object,\n default: () => ({\n muted: true,\n loop: true,\n playsinline: true,\n preload: 'metadata' // 'none' | 'metadata' | 'auto'\n })\n }\n})\n\n// Refs\nconst videoElement = ref(null)\nconst imageElement = ref(null)\nconst isLoaded = ref(false)\nconst error = ref(null)\nconst isIntersecting = ref(false)\nlet observer = null\nlet isPlaying = false\n\n// Определяем тип медиа\nconst fileExtension = computed(() => {\n return props.url?.split('.')?.pop()?.toLowerCase()\n})\n\nconst isImage = computed(() => {\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'avif']\n return imageExtensions.includes(fileExtension.value)\n})\n\nconst isVideo = computed(() => {\n const videoExtensions = ['mp4', 'webm', 'ogg']\n return videoExtensions.includes(fileExtension.value)\n})\n\n// Определяем MIME-тип для видео\nconst videoType = computed(() => {\n const types = {\n 'mp4': 'video/mp4',\n 'webm': 'video/webm',\n 'ogg': 'video/ogg'\n }\n return types[fileExtension.value] || ''\n})\n\n// Обработчик загрузки медиа\nfunction handleLoad() {\n isLoaded.value = true\n}\n\n// Обработка ошибок\nfunction handleError(err) {\n error.value = `Ошибка загрузки медиа: ${err.message}`\n isLoaded.value = false\n}\n\n// Управление видео с обработкой ошибок\nasync function playVideo() {\n if (!videoElement.value) return\n \n try {\n if (videoElement.value.paused && !isPlaying) {\n await videoElement.value.play()\n isPlaying = true\n }\n } catch (err) {\n handleError(err)\n }\n}\n\nfunction checkAndPlayVideo() {\n if (!videoElement.value) return\n \n videoElement.value.onplaying = () => {\n isPlaying = true\n }\n \n videoElement.value.onpause = () => {\n isPlaying = false\n }\n \n videoElement.value.onerror = handleError\n}\n\n// Intersection Observer для ленивой загрузки\nfunction setupIntersectionObserver() {\n const options = {\n root: null,\n rootMargin: '50px',\n threshold: 0.1\n }\n \n observer = new IntersectionObserver((entries) => {\n entries.forEach(entry => {\n isIntersecting.value = entry.isIntersecting\n \n if (entry.isIntersecting) {\n if (isVideo.value && props.options?.autoplay) {\n playVideo()\n }\n // Отключаем observer после первой загрузки\n observer.disconnect()\n }\n })\n }, options)\n \n // Наблюдаем за элементом в зависимости от типа медиа\n const element = isImage.value ? imageElement.value : videoElement.value\n if (element) {\n observer.observe(element)\n }\n}\n\n// Lifecycle hooks\nonMounted(() => {\n setupIntersectionObserver()\n})\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect()\n }\n})\n</script>\n\n<style scoped>\n.media-container {\n}\n\n.media-item {\n all: inherit;\n opacity: 1;\n transition: opacity 0.3s ease;\n}\n\n.media-item.loading {\n opacity: 0;\n}\n\n.media-placeholder {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #f5f5f5;\n}\n\n.media-error {\n color: #ff4444;\n padding: 1rem;\n text-align: center;\n}\n</style>"],"names":["ref","computed","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,UAAM,QAAQ;AAiBd,UAAM,eAAeA,IAAG,IAAC,IAAI;AAC7B,UAAM,eAAeA,IAAG,IAAC,IAAI;AAC7B,UAAM,WAAWA,IAAG,IAAC,KAAK;AAC1B,UAAM,QAAQA,IAAG,IAAC,IAAI;AACtB,UAAM,iBAAiBA,IAAG,IAAC,KAAK;AAChC,QAAI,WAAW;AACf,QAAI,YAAY;AAGhB,U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WAAM,YAAN,mBAAe,WAAU;AAC5C,wBAAW;AAAA,YACZ;AAED,qBAAS,WAAY;AAAA,UACtB;AAAA,QACP,CAAK;AAAA,MACF,GAAE,OAAO;AAGV,YAAM,UAAU,QAAQ,QAAQ,aAAa,QAAQ,aAAa;AAClE,UAAI,SAAS;AACX,iBAAS,QAAQ,OAAO;AAAA,MACzB;AAAA,IACH;AAGAC,QAAAA,UAAU,MAAM;AACd,gCAA2B;AAAA,IAC7B,CAAC;AAEDC,QAAAA,YAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAY;AAAA,MACtB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -0,0 +1,154 @@
|
|
1
|
+
import { ref, computed, onMounted, onUnmounted, openBlock, createElementBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
+
const _hoisted_1 = { class: "media-container" };
|
5
|
+
const _hoisted_2 = ["src", "data-src", "alt"];
|
6
|
+
const _hoisted_3 = ["controls", "loop", "muted", "autoplay", "playsinline", "preload"];
|
7
|
+
const _hoisted_4 = ["src", "type"];
|
8
|
+
const _hoisted_5 = {
|
9
|
+
key: 2,
|
10
|
+
class: "media-placeholder"
|
11
|
+
};
|
12
|
+
const _hoisted_6 = {
|
13
|
+
key: 3,
|
14
|
+
class: "media-error"
|
15
|
+
};
|
16
|
+
const _sfc_main = {
|
17
|
+
__name: "Media",
|
18
|
+
props: {
|
19
|
+
url: {
|
20
|
+
type: String,
|
21
|
+
required: true
|
22
|
+
},
|
23
|
+
options: {
|
24
|
+
type: Object,
|
25
|
+
default: () => ({
|
26
|
+
muted: true,
|
27
|
+
loop: true,
|
28
|
+
playsinline: true,
|
29
|
+
preload: "metadata"
|
30
|
+
// 'none' | 'metadata' | 'auto'
|
31
|
+
})
|
32
|
+
}
|
33
|
+
},
|
34
|
+
setup(__props) {
|
35
|
+
const props = __props;
|
36
|
+
const videoElement = ref(null);
|
37
|
+
const imageElement = ref(null);
|
38
|
+
const isLoaded = ref(false);
|
39
|
+
const error = ref(null);
|
40
|
+
const isIntersecting = ref(false);
|
41
|
+
let observer = null;
|
42
|
+
let isPlaying = false;
|
43
|
+
const fileExtension = computed(() => {
|
44
|
+
var _a, _b, _c;
|
45
|
+
return (_c = (_b = (_a = props.url) == null ? void 0 : _a.split(".")) == null ? void 0 : _b.pop()) == null ? void 0 : _c.toLowerCase();
|
46
|
+
});
|
47
|
+
const isImage = computed(() => {
|
48
|
+
const imageExtensions = ["jpg", "jpeg", "png", "gif", "webp", "svg", "avif"];
|
49
|
+
return imageExtensions.includes(fileExtension.value);
|
50
|
+
});
|
51
|
+
const isVideo = computed(() => {
|
52
|
+
const videoExtensions = ["mp4", "webm", "ogg"];
|
53
|
+
return videoExtensions.includes(fileExtension.value);
|
54
|
+
});
|
55
|
+
const videoType = computed(() => {
|
56
|
+
const types = {
|
57
|
+
"mp4": "video/mp4",
|
58
|
+
"webm": "video/webm",
|
59
|
+
"ogg": "video/ogg"
|
60
|
+
};
|
61
|
+
return types[fileExtension.value] || "";
|
62
|
+
});
|
63
|
+
function handleLoad() {
|
64
|
+
isLoaded.value = true;
|
65
|
+
}
|
66
|
+
function handleError(err) {
|
67
|
+
error.value = `Ошибка загрузки медиа: ${err.message}`;
|
68
|
+
isLoaded.value = false;
|
69
|
+
}
|
70
|
+
async function playVideo() {
|
71
|
+
if (!videoElement.value) return;
|
72
|
+
try {
|
73
|
+
if (videoElement.value.paused && !isPlaying) {
|
74
|
+
await videoElement.value.play();
|
75
|
+
isPlaying = true;
|
76
|
+
}
|
77
|
+
} catch (err) {
|
78
|
+
handleError(err);
|
79
|
+
}
|
80
|
+
}
|
81
|
+
function setupIntersectionObserver() {
|
82
|
+
const options = {
|
83
|
+
root: null,
|
84
|
+
rootMargin: "50px",
|
85
|
+
threshold: 0.1
|
86
|
+
};
|
87
|
+
observer = new IntersectionObserver((entries) => {
|
88
|
+
entries.forEach((entry) => {
|
89
|
+
var _a;
|
90
|
+
isIntersecting.value = entry.isIntersecting;
|
91
|
+
if (entry.isIntersecting) {
|
92
|
+
if (isVideo.value && ((_a = props.options) == null ? void 0 : _a.autoplay)) {
|
93
|
+
playVideo();
|
94
|
+
}
|
95
|
+
observer.disconnect();
|
96
|
+
}
|
97
|
+
});
|
98
|
+
}, options);
|
99
|
+
const element = isImage.value ? imageElement.value : videoElement.value;
|
100
|
+
if (element) {
|
101
|
+
observer.observe(element);
|
102
|
+
}
|
103
|
+
}
|
104
|
+
onMounted(() => {
|
105
|
+
setupIntersectionObserver();
|
106
|
+
});
|
107
|
+
onUnmounted(() => {
|
108
|
+
if (observer) {
|
109
|
+
observer.disconnect();
|
110
|
+
}
|
111
|
+
});
|
112
|
+
return (_ctx, _cache) => {
|
113
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
114
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
115
|
+
isImage.value ? (openBlock(), createElementBlock("img", mergeProps({
|
116
|
+
key: 0,
|
117
|
+
src: isIntersecting.value ? __props.url : "",
|
118
|
+
"data-src": __props.url,
|
119
|
+
alt: ((_a = __props.options) == null ? void 0 : _a.alt) || "Image",
|
120
|
+
class: ["media-item", { "loading": !isLoaded.value }],
|
121
|
+
loading: "lazy",
|
122
|
+
onLoad: handleLoad
|
123
|
+
}, __props.options, {
|
124
|
+
ref_key: "imageElement",
|
125
|
+
ref: imageElement
|
126
|
+
}), null, 16, _hoisted_2)) : isVideo.value ? (openBlock(), createElementBlock("video", mergeProps({
|
127
|
+
key: 1,
|
128
|
+
ref_key: "videoElement",
|
129
|
+
ref: videoElement,
|
130
|
+
class: [{ "loading": !isLoaded.value }, "media-item"],
|
131
|
+
controls: !((_b = __props.options) == null ? void 0 : _b.hideControls),
|
132
|
+
loop: ((_c = __props.options) == null ? void 0 : _c.loop) !== false,
|
133
|
+
muted: ((_d = __props.options) == null ? void 0 : _d.muted) !== false,
|
134
|
+
autoplay: (_e = __props.options) == null ? void 0 : _e.autoplay,
|
135
|
+
playsinline: ((_f = __props.options) == null ? void 0 : _f.playsinline) !== false,
|
136
|
+
preload: ((_g = __props.options) == null ? void 0 : _g.preload) || "metadata",
|
137
|
+
onLoadeddata: handleLoad
|
138
|
+
}, __props.options), [
|
139
|
+
createElementVNode("source", {
|
140
|
+
src: __props.url,
|
141
|
+
type: videoType.value
|
142
|
+
}, null, 8, _hoisted_4)
|
143
|
+
], 16, _hoisted_3)) : createCommentVNode("", true),
|
144
|
+
!isLoaded.value ? (openBlock(), createElementBlock("div", _hoisted_5, " Загрузка... ")) : createCommentVNode("", true),
|
145
|
+
error.value ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(error.value), 1)) : createCommentVNode("", true)
|
146
|
+
]);
|
147
|
+
};
|
148
|
+
}
|
149
|
+
};
|
150
|
+
const Media = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-94bcf726"]]);
|
151
|
+
export {
|
152
|
+
Media as default
|
153
|
+
};
|
154
|
+
//# sourceMappingURL=Media.vue.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Media.vue.js","sources":["../../../../../src/components/Media/Media.vue"],"sourcesContent":["<template>\n <div class=\"media-container\">\n <!-- Изображение с ленивой загрузкой и placeholder -->\n <img\n v-if=\"isImage\"\n :src=\"isIntersecting ? url : ''\"\n :data-src=\"url\"\n :alt=\"options?.alt || 'Image'\"\n class=\"media-item\"\n :class=\"{ 'loading': !isLoaded }\"\n loading=\"lazy\"\n @load=\"handleLoad\"\n v-bind=\"options\"\n ref=\"imageElement\"\n />\n \n <!-- Видео с предварительной загрузкой -->\n <video\n v-else-if=\"isVideo\"\n ref=\"videoElement\"\n :class=\"{ 'loading': !isLoaded }\"\n class=\"media-item\"\n :controls=\"!options?.hideControls\"\n :loop=\"options?.loop !== false\"\n :muted=\"options?.muted !== false\"\n :autoplay=\"options?.autoplay\"\n :playsinline=\"options?.playsinline !== false\"\n :preload=\"options?.preload || 'metadata'\"\n @loadeddata=\"handleLoad\"\n v-bind=\"options\"\n >\n <source :src=\"url\" :type=\"videoType\">\n </video>\n \n <!-- Плейсхолдер во время загрузки -->\n <div v-if=\"!isLoaded\" class=\"media-placeholder\">\n Загрузка...\n </div>\n \n <!-- Сообщение об ошибке -->\n <div v-if=\"error\" class=\"media-error\">\n {{ error }}\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, computed, onUnmounted } from 'vue'\n\nconst props = defineProps({\n url: {\n type: String,\n required: true\n },\n options: {\n type: Object,\n default: () => ({\n muted: true,\n loop: true,\n playsinline: true,\n preload: 'metadata' // 'none' | 'metadata' | 'auto'\n })\n }\n})\n\n// Refs\nconst videoElement = ref(null)\nconst imageElement = ref(null)\nconst isLoaded = ref(false)\nconst error = ref(null)\nconst isIntersecting = ref(false)\nlet observer = null\nlet isPlaying = false\n\n// Определяем тип медиа\nconst fileExtension = computed(() => {\n return props.url?.split('.')?.pop()?.toLowerCase()\n})\n\nconst isImage = computed(() => {\n const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'avif']\n return imageExtensions.includes(fileExtension.value)\n})\n\nconst isVideo = computed(() => {\n const videoExtensions = ['mp4', 'webm', 'ogg']\n return videoExtensions.includes(fileExtension.value)\n})\n\n// Определяем MIME-тип для видео\nconst videoType = computed(() => {\n const types = {\n 'mp4': 'video/mp4',\n 'webm': 'video/webm',\n 'ogg': 'video/ogg'\n }\n return types[fileExtension.value] || ''\n})\n\n// Обработчик загрузки медиа\nfunction handleLoad() {\n isLoaded.value = true\n}\n\n// Обработка ошибок\nfunction handleError(err) {\n error.value = `Ошибка загрузки медиа: ${err.message}`\n isLoaded.value = false\n}\n\n// Управление видео с обработкой ошибок\nasync function playVideo() {\n if (!videoElement.value) return\n \n try {\n if (videoElement.value.paused && !isPlaying) {\n await videoElement.value.play()\n isPlaying = true\n }\n } catch (err) {\n handleError(err)\n }\n}\n\nfunction checkAndPlayVideo() {\n if (!videoElement.value) return\n \n videoElement.value.onplaying = () => {\n isPlaying = true\n }\n \n videoElement.value.onpause = () => {\n isPlaying = false\n }\n \n videoElement.value.onerror = handleError\n}\n\n// Intersection Observer для ленивой загрузки\nfunction setupIntersectionObserver() {\n const options = {\n root: null,\n rootMargin: '50px',\n threshold: 0.1\n }\n \n observer = new IntersectionObserver((entries) => {\n entries.forEach(entry => {\n isIntersecting.value = entry.isIntersecting\n \n if (entry.isIntersecting) {\n if (isVideo.value && props.options?.autoplay) {\n playVideo()\n }\n // Отключаем observer после первой загрузки\n observer.disconnect()\n }\n })\n }, options)\n \n // Наблюдаем за элементом в зависимости от типа медиа\n const element = isImage.value ? imageElement.value : videoElement.value\n if (element) {\n observer.observe(element)\n }\n}\n\n// Lifecycle hooks\nonMounted(() => {\n setupIntersectionObserver()\n})\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect()\n }\n})\n</script>\n\n<style scoped>\n.media-container {\n}\n\n.media-item {\n all: inherit;\n opacity: 1;\n transition: opacity 0.3s ease;\n}\n\n.media-item.loading {\n opacity: 0;\n}\n\n.media-placeholder {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #f5f5f5;\n}\n\n.media-error {\n color: #ff4444;\n padding: 1rem;\n text-align: center;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,UAAM,QAAQ;AAiBd,UAAM,eAAe,IAAI,IAAI;AAC7B,UAAM,eAAe,IAAI,IAAI;AAC7B,UAAM,WAAW,IAAI,KAAK;AAC1B,UAAM,QAAQ,IAAI,IAAI;AACtB,UAAM,iBAAiB,IAAI,KAAK;AAChC,QAAI,WAAW;AACf,QAAI,YAAY;AAGhB,UAAM,gBAAgB,SAAS,MAAM;;AACnC,cAAO,uBAAM,QAAN,mBAAW,MAAM,SA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AA,MACF,GAAE,OAAO;AAGV,YAAM,UAAU,QAAQ,QAAQ,aAAa,QAAQ,aAAa;AAClE,UAAI,SAAS;AACX,iBAAS,QAAQ,OAAO;AAAA,MACzB;AAAA,IACH;AAGA,cAAU,MAAM;AACd,gCAA2B;AAAA,IAC7B,CAAC;AAED,gBAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAY;AAAA,MACtB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -47,10 +47,7 @@ const _sfc_main = {
|
|
47
47
|
};
|
48
48
|
vueI18n.useI18n(text);
|
49
49
|
return (_ctx, _cache) => {
|
50
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
51
|
-
name: "TransitionTranslateY",
|
52
|
-
appear: ""
|
53
|
-
}, {
|
50
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, { name: "moveFromTop" }, {
|
54
51
|
default: vue.withCtx(() => [
|
55
52
|
__props.isPopupOpen ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
56
53
|
key: 0,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popup.vue.cjs","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\
|
1
|
+
{"version":3,"file":"Popup.vue.cjs","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\t\t<transition name=\"moveFromTop\">\n\t\t\t<teleport to=\"body\" v-if=\"isPopupOpen\">\n\t\t\t\t<div v-if=\"isPopupOpen\" key=\"popup-content\" class=\"pd-small z-index-6 popup-wrapper\">\n\n\t\t\t\t\t<transition name=\"TransitionTranslateY\" mode=\"out-in\">\n\t\t\t\t\t\t<section class=\"pos-relative z-index-4\" v-bind=\"$attrs\" :class=\"$attrs.class\">\n\t\t\t\t\t\t\t\t<h4 v-if=\"title\" class=\"mn-b-small\">{{title}}</h4>\n\t\t\t\t\t\t\t\t<IconCross :fill=\"'rgb(var(--white))'\" @click=\"closePopup()\" class=\"cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5\"/>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</section> \n\t\t\t\t\t</transition>\n\n\t\t\t\t\t<div \n\t\t\t\t\t\t@click=\"closePopup()\" \n\t\t\t\t :class=\"{'active':isPopupOpen === true}\" \n\t\t\t\t class=\"color-overlay z-index-3\">\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\t\t</teleport>\n\t</transition>\n</template>\n\n<script setup>\nimport { computed, watch, onMounted, ref, nextTick } from 'vue';\n// Import libs\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Icons\nimport IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';\n// Define props\nconst props = defineProps({\n isPopupOpen: {\n \ttype: Boolean,\n\t default: false\n },\n style: String,\n title: String,\n});\nconst emits = defineEmits(['close-popup'])\n\nfunction closePopup() {\n emits(\"close-popup\");\n} \n\nwatch(() => props.isPopupOpen, (newVal) => {\n if (newVal) {\n document.body.classList.add('no-scroll');\n } else {\n document.body.classList.remove('no-scroll');\n }\n});\n\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst text = {\n \tmessages: {\n\t en: {},\n\t ru: {}\n\t}\n}\nconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\t.no-scroll {\n\t overflow: hidden;\n\t}\n\n\t.popup-wrapper {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\tz-index: 40;\n\n\t\t.popup {\n\t\t\tposition: absolute;\n\t\t\theight: auto;\n\t\t\tpadding: 2rem;\n\t\t\tmin-width: 24rem;\n\t\t\tborder-radius: 2rem;\n\t\t\toverflow: hidden;\n\n\t\t\tcolor: white;\n\t\t\tbackground: black;\n\n\t\t\tz-index: 40;\n\t\t}\n\t}\n\n\t.color-overlay {\n\t\tdisplay: block;\n\t\tposition: fixed;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tbackground: rgba(0,0,0,0.0);\n\t\tpointer-events: none;\n\n\t\ttransform: scale(1.5);\n\n\t\ttransition: all 0.5s cubic-bezier(.31,.79,.24,.92);\n\n\t\t&.active {\n\t\t\tbackground: rgba(#000,0.25);\n\t\t\tpointer-events: all;\n\t\t}\n\t}\n</style>\n"],"names":["watch","useRoute","useRouter","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAM,QAAQ;AAQd,UAAM,QAAQ;AAEd,aAAS,aAAa;AACpB,YAAM,aAAa;AAAA,IACrB;AAEAA,QAAK,MAAC,MAAM,MAAM,aAAa,CAAC,WAAW;AACzC,UAAI,QAAQ;AACV,iBAAS,KAAK,UAAU,IAAI,WAAW;AAAA,MAC3C,OAAS;AACL,iBAAS,KAAK,UAAU,OAAO,WAAW;AAAA,MAC3C;AAAA,IACH,CAAC;AAGaC,cAAAA,SAAU;AACTC,cAAAA,UAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,IAAI,CAAE;AAAA,QACN,IAAI,CAAE;AAAA,MACT;AAAA,IACF;AACcC,YAAO,QAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -45,10 +45,7 @@ const _sfc_main = {
|
|
45
45
|
};
|
46
46
|
useI18n(text);
|
47
47
|
return (_ctx, _cache) => {
|
48
|
-
return openBlock(), createBlock(Transition, {
|
49
|
-
name: "TransitionTranslateY",
|
50
|
-
appear: ""
|
51
|
-
}, {
|
48
|
+
return openBlock(), createBlock(Transition, { name: "moveFromTop" }, {
|
52
49
|
default: withCtx(() => [
|
53
50
|
__props.isPopupOpen ? (openBlock(), createBlock(Teleport, {
|
54
51
|
key: 0,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popup.vue.js","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\
|
1
|
+
{"version":3,"file":"Popup.vue.js","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\t\t<transition name=\"moveFromTop\">\n\t\t\t<teleport to=\"body\" v-if=\"isPopupOpen\">\n\t\t\t\t<div v-if=\"isPopupOpen\" key=\"popup-content\" class=\"pd-small z-index-6 popup-wrapper\">\n\n\t\t\t\t\t<transition name=\"TransitionTranslateY\" mode=\"out-in\">\n\t\t\t\t\t\t<section class=\"pos-relative z-index-4\" v-bind=\"$attrs\" :class=\"$attrs.class\">\n\t\t\t\t\t\t\t\t<h4 v-if=\"title\" class=\"mn-b-small\">{{title}}</h4>\n\t\t\t\t\t\t\t\t<IconCross :fill=\"'rgb(var(--white))'\" @click=\"closePopup()\" class=\"cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5\"/>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</section> \n\t\t\t\t\t</transition>\n\n\t\t\t\t\t<div \n\t\t\t\t\t\t@click=\"closePopup()\" \n\t\t\t\t :class=\"{'active':isPopupOpen === true}\" \n\t\t\t\t class=\"color-overlay z-index-3\">\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\t\t</teleport>\n\t</transition>\n</template>\n\n<script setup>\nimport { computed, watch, onMounted, ref, nextTick } from 'vue';\n// Import libs\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Icons\nimport IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';\n// Define props\nconst props = defineProps({\n isPopupOpen: {\n \ttype: Boolean,\n\t default: false\n },\n style: String,\n title: String,\n});\nconst emits = defineEmits(['close-popup'])\n\nfunction closePopup() {\n emits(\"close-popup\");\n} \n\nwatch(() => props.isPopupOpen, (newVal) => {\n if (newVal) {\n document.body.classList.add('no-scroll');\n } else {\n document.body.classList.remove('no-scroll');\n }\n});\n\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst text = {\n \tmessages: {\n\t en: {},\n\t ru: {}\n\t}\n}\nconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\t.no-scroll {\n\t overflow: hidden;\n\t}\n\n\t.popup-wrapper {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\tz-index: 40;\n\n\t\t.popup {\n\t\t\tposition: absolute;\n\t\t\theight: auto;\n\t\t\tpadding: 2rem;\n\t\t\tmin-width: 24rem;\n\t\t\tborder-radius: 2rem;\n\t\t\toverflow: hidden;\n\n\t\t\tcolor: white;\n\t\t\tbackground: black;\n\n\t\t\tz-index: 40;\n\t\t}\n\t}\n\n\t.color-overlay {\n\t\tdisplay: block;\n\t\tposition: fixed;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tbackground: rgba(0,0,0,0.0);\n\t\tpointer-events: none;\n\n\t\ttransform: scale(1.5);\n\n\t\ttransition: all 0.5s cubic-bezier(.31,.79,.24,.92);\n\n\t\t&.active {\n\t\t\tbackground: rgba(#000,0.25);\n\t\t\tpointer-events: all;\n\t\t}\n\t}\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAM,QAAQ;AAQd,UAAM,QAAQ;AAEd,aAAS,aAAa;AACpB,YAAM,aAAa;AAAA,IACrB;AAEA,UAAM,MAAM,MAAM,aAAa,CAAC,WAAW;AACzC,UAAI,QAAQ;AACV,iBAAS,KAAK,UAAU,IAAI,WAAW;AAAA,MAC3C,OAAS;AACL,iBAAS,KAAK,UAAU,OAAO,WAAW;AAAA,MAC3C;AAAA,IACH,CAAC;AAGa,aAAU;AACT,cAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,IAAI,CAAE;AAAA,QACN,IAAI,CAAE;AAAA,MACT;AAAA,IACF;AACc,YAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|