@ozdao/martyrs 0.2.509 → 0.2.511
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.server.cjs +1 -2
- package/dist/auth.server.js +1 -2
- package/dist/builder.cjs +105 -19
- package/dist/builder.js +107 -20
- package/dist/main-B1XN9Zjg.cjs +11 -0
- package/dist/{main-DSiCr7yl.js → main-u7zgfMGL.js} +2612 -2424
- package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +3 -3
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +3 -3
- package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
- package/dist/martyrs/src/components/Chips/{Chips.vue.cjs → Chips.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Chips/{Chips.vue.js → Chips.vue2.js} +2 -2
- package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +3 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +3 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue2.cjs → Loader.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js.map → Loader.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +2 -2
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue2.cjs → Menu.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
- package/dist/martyrs/src/components/Select/{Select.vue2.cjs → Select.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Select/{Select.vue2.js.map → Select.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/locales/ru.cjs +2 -0
- package/dist/martyrs/src/modules/auth/locales/ru.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/locales/ru.js +2 -0
- package/dist/martyrs/src/modules/auth/locales/ru.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +3 -3
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +3 -3
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +4 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +4 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +9 -4
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +9 -4
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +115 -52
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +124 -61
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +3 -3
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +3 -3
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +3 -3
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +3 -3
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/router/music.cjs +3 -2
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.js +3 -2
- package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +4 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +4 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.cjs +0 -6
- package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +0 -6
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +3 -3
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +6 -5
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +6 -5
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +165 -181
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +170 -186
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +3 -5
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +4 -6
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/products/store/products.cjs +5 -5
- package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/products.js +5 -5
- package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +4 -4
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/orders.server.cjs +3 -0
- package/dist/orders.server.js +3 -0
- package/dist/products.server.cjs +57 -60
- package/dist/products.server.js +57 -60
- package/dist/style.css +14 -11
- package/dist/{web-gtBkwjra.js → web--8-wgr6b.js} +1 -1
- package/dist/{web-XyQNm3cW.cjs → web-BS6utuAZ.cjs} +1 -1
- package/package.json +1 -1
- package/src/builder/CLAUDE.MD +405 -0
- package/src/builder/builder.js +3 -0
- package/src/builder/modes/spa.dev.js +35 -15
- package/src/builder/modes/spa.prod.js +5 -6
- package/src/builder/modes/spa.rspack.dev.js +110 -0
- package/src/components/Checkbox/Checkbox.vue +1 -1
- package/src/components/Feed/Feed.vue +1 -1
- package/src/components/Field/Field.vue +5 -0
- package/src/modules/auth/controllers/services/twofa.service.js +1 -1
- package/src/modules/auth/locales/ru.js +2 -0
- package/src/modules/auth/views/components/pages/EnterCode.vue +2 -2
- package/src/modules/globals/views/components/layouts/Client.vue +12 -1
- package/src/modules/globals/views/components/sections/Filters.vue +89 -22
- package/src/modules/orders/models/application.model.js +3 -0
- package/src/modules/orders/orders.client.js +0 -6
- package/src/modules/products/components/pages/Products.vue +157 -181
- package/src/modules/products/components/sections/EditRecommended.vue +1 -3
- package/src/modules/products/components/sections/ProductsPopular.vue +1 -1
- package/src/modules/products/controllers/configs/products.lookup.config.js +0 -9
- package/src/modules/products/controllers/products.controller.js +14 -6
- package/src/modules/products/controllers/queries/products.queries.js +56 -48
- package/src/modules/products/models/product.model.js +4 -0
- package/src/modules/products/store/products.js +5 -5
- package/dist/main-D89N_jml.cjs +0 -11
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Chips/Chips.vue.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +0 -1
|
@@ -1,41 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
+
const mixins = require("../../mixins/mixins.cjs");
|
|
4
5
|
const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
|
|
5
6
|
const Checkbox = require("../../../../../components/Checkbox/Checkbox.vue.cjs");
|
|
6
7
|
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
|
8
|
+
const Calendar = require("../../../../../components/Calendar/Calendar.vue2.cjs");
|
|
7
9
|
const IconFilter = require("../../../../icons/navigation/IconFilter.vue.cjs");
|
|
8
10
|
const IconCross = require("../../../../icons/navigation/IconCross.vue.cjs");
|
|
11
|
+
const IconCalendar = ;/* empty css */
|
|
9
12
|
;/* empty css */
|
|
10
13
|
const _pluginVue_exportHelper = require("../../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
11
|
-
const _hoisted_1 = { class: "flex gap-thin" };
|
|
14
|
+
const _hoisted_1 = { class: "flex t-nowrap gap-thin" };
|
|
12
15
|
const _hoisted_2 = { key: 0 };
|
|
13
16
|
const _hoisted_3 = ["onClick"];
|
|
14
|
-
const _hoisted_4 = {
|
|
15
|
-
|
|
17
|
+
const _hoisted_4 = { class: "t-nowrap" };
|
|
18
|
+
const _hoisted_5 = {
|
|
19
|
+
key: 1,
|
|
16
20
|
class: "mn-l-micro"
|
|
17
21
|
};
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
22
|
+
const _hoisted_6 = { class: "flex-v-center flex-nowrap flex mn-b-medium" };
|
|
23
|
+
const _hoisted_7 = { class: "filters-content" };
|
|
24
|
+
const _hoisted_8 = { class: "mn-b-small" };
|
|
25
|
+
const _hoisted_9 = { key: 0 };
|
|
26
|
+
const _hoisted_10 = { key: 1 };
|
|
27
|
+
const _hoisted_11 = ["onClick"];
|
|
28
|
+
const _hoisted_12 = {
|
|
25
29
|
key: 2,
|
|
26
30
|
class: "flex gap-thin"
|
|
27
31
|
};
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
32
|
+
const _hoisted_13 = { key: 3 };
|
|
33
|
+
const _hoisted_14 = { class: "mn-b-medium" };
|
|
34
|
+
const _hoisted_15 = { key: 0 };
|
|
35
|
+
const _hoisted_16 = { key: 1 };
|
|
36
|
+
const _hoisted_17 = ["onClick"];
|
|
37
|
+
const _hoisted_18 = {
|
|
33
38
|
key: 2,
|
|
34
39
|
class: "flex gap-thin"
|
|
35
40
|
};
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
41
|
+
const _hoisted_19 = { key: 3 };
|
|
42
|
+
const _hoisted_20 = { class: "mn-t-small" };
|
|
43
|
+
const _hoisted_21 = { class: "flex gap-thin mn-t-medium" };
|
|
44
|
+
const _hoisted_22 = ["onClick"];
|
|
45
|
+
const _hoisted_23 = ["onClick"];
|
|
39
46
|
const _sfc_main = {
|
|
40
47
|
__name: "Filters",
|
|
41
48
|
props: {
|
|
@@ -55,17 +62,21 @@ const _sfc_main = {
|
|
|
55
62
|
const filters = vue.useModel(__props, "filters");
|
|
56
63
|
const selected = vue.useModel(__props, "selected");
|
|
57
64
|
const emit = __emit;
|
|
65
|
+
const { formatDate } = mixins.useGlobalMixins();
|
|
58
66
|
const showAllFilters = vue.ref(false);
|
|
59
67
|
const individualPopups = vue.reactive({});
|
|
60
68
|
const tempSelected = vue.reactive({});
|
|
69
|
+
vue.ref(null);
|
|
61
70
|
vue.watch(filters, (newFilters) => {
|
|
62
71
|
newFilters.forEach((filter) => {
|
|
63
72
|
individualPopups[filter.value] = false;
|
|
64
73
|
if (!tempSelected[filter.value]) {
|
|
65
74
|
if (filter.type === "checkbox") {
|
|
66
|
-
tempSelected[filter.value] = selected.value[filter.value] || [];
|
|
75
|
+
tempSelected[filter.value] = [...selected.value[filter.value] || []];
|
|
67
76
|
} else if (filter.type === "range") {
|
|
68
|
-
tempSelected[filter.value] = selected.value[filter.value] || { min: "", max: "" };
|
|
77
|
+
tempSelected[filter.value] = { ...selected.value[filter.value] || { min: "", max: "" } };
|
|
78
|
+
} else if (filter.type === "date") {
|
|
79
|
+
tempSelected[filter.value] = selected.value[filter.value] || null;
|
|
69
80
|
} else {
|
|
70
81
|
tempSelected[filter.value] = selected.value[filter.value] || null;
|
|
71
82
|
}
|
|
@@ -74,7 +85,16 @@ const _sfc_main = {
|
|
|
74
85
|
}, { immediate: true, deep: true });
|
|
75
86
|
vue.watch(selected, (newSelected) => {
|
|
76
87
|
Object.keys(newSelected).forEach((key) => {
|
|
77
|
-
|
|
88
|
+
const filter = filters.value.find((f) => f.value === key);
|
|
89
|
+
if (filter) {
|
|
90
|
+
if (filter.type === "checkbox") {
|
|
91
|
+
tempSelected[key] = [...newSelected[key] || []];
|
|
92
|
+
} else if (filter.type === "range") {
|
|
93
|
+
tempSelected[key] = { ...newSelected[key] || { min: "", max: "" } };
|
|
94
|
+
} else {
|
|
95
|
+
tempSelected[key] = newSelected[key];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
78
98
|
});
|
|
79
99
|
}, { deep: true });
|
|
80
100
|
const activeFiltersCount = vue.computed(() => {
|
|
@@ -97,7 +117,18 @@ const _sfc_main = {
|
|
|
97
117
|
return true;
|
|
98
118
|
};
|
|
99
119
|
const getFilterValue = (filter) => {
|
|
100
|
-
|
|
120
|
+
const value = selected.value[filter.value];
|
|
121
|
+
if (!value) return false;
|
|
122
|
+
if (filter.type === "range") {
|
|
123
|
+
return value.min || value.max;
|
|
124
|
+
}
|
|
125
|
+
if (filter.type === "date") {
|
|
126
|
+
return value && value.start && value.end;
|
|
127
|
+
}
|
|
128
|
+
if (Array.isArray(value)) {
|
|
129
|
+
return value.length > 0;
|
|
130
|
+
}
|
|
131
|
+
return value;
|
|
101
132
|
};
|
|
102
133
|
const formatFilterValue = (filter) => {
|
|
103
134
|
const value = selected.value[filter.value];
|
|
@@ -109,6 +140,10 @@ const _sfc_main = {
|
|
|
109
140
|
if (!value.min && !value.max) return "";
|
|
110
141
|
return `${value.min || "0"}-${value.max || "∞"}`;
|
|
111
142
|
}
|
|
143
|
+
if (filter.type === "date") {
|
|
144
|
+
if (!value || !value.start || !value.end) return "";
|
|
145
|
+
return `${formatDate(value.start, { dayMonth: true, language: "en" })} - ${formatDate(value.end, { dayMonth: true, language: "en" })}`;
|
|
146
|
+
}
|
|
112
147
|
if (filter.type === "radio") {
|
|
113
148
|
const option = filter.options.find((o) => o.value === value);
|
|
114
149
|
return option ? `(${option.label})` : "";
|
|
@@ -124,9 +159,11 @@ const _sfc_main = {
|
|
|
124
159
|
const filter = filters.value.find((f) => f.value === filterValue);
|
|
125
160
|
if (filter) {
|
|
126
161
|
if (filter.type === "checkbox") {
|
|
127
|
-
tempSelected[filterValue] = selected.value[filterValue] || [];
|
|
162
|
+
tempSelected[filterValue] = [...selected.value[filterValue] || []];
|
|
128
163
|
} else if (filter.type === "range") {
|
|
129
|
-
tempSelected[filterValue] = selected.value[filterValue] || { min: "", max: "" };
|
|
164
|
+
tempSelected[filterValue] = { ...selected.value[filterValue] || { min: "", max: "" } };
|
|
165
|
+
} else if (filter.type === "date") {
|
|
166
|
+
tempSelected[filterValue] = selected.value[filterValue] || null;
|
|
130
167
|
} else {
|
|
131
168
|
tempSelected[filterValue] = selected.value[filterValue] || null;
|
|
132
169
|
}
|
|
@@ -150,6 +187,9 @@ const _sfc_main = {
|
|
|
150
187
|
} else if (filter.type === "range") {
|
|
151
188
|
tempSelected[filter.value] = { min: "", max: "" };
|
|
152
189
|
selected.value[filter.value] = { min: "", max: "" };
|
|
190
|
+
} else if (filter.type === "date") {
|
|
191
|
+
tempSelected[filter.value] = null;
|
|
192
|
+
selected.value[filter.value] = null;
|
|
153
193
|
} else {
|
|
154
194
|
tempSelected[filter.value] = null;
|
|
155
195
|
selected.value[filter.value] = null;
|
|
@@ -161,19 +201,24 @@ const _sfc_main = {
|
|
|
161
201
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
162
202
|
vue.createElementVNode("button", {
|
|
163
203
|
onClick: _cache[0] || (_cache[0] = ($event) => showAllFilters.value = true),
|
|
164
|
-
class: vue.normalizeClass(["pd-
|
|
204
|
+
class: vue.normalizeClass(["pd-small radius-medium bg-light flex-v-center flex gap-micro cursor-pointer", { "bg-main": activeFiltersCount.value > 0 }])
|
|
165
205
|
}, [
|
|
166
|
-
vue.createVNode(IconFilter.default, { class: "i-
|
|
206
|
+
vue.createVNode(IconFilter.default, { class: "i-medium" }),
|
|
207
|
+
_cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "h-1r" }, null, -1)),
|
|
167
208
|
activeFiltersCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(activeFiltersCount.value), 1)) : vue.createCommentVNode("", true)
|
|
168
209
|
], 2),
|
|
169
210
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filters.value, (filter) => {
|
|
170
211
|
return vue.openBlock(), vue.createElementBlock("button", {
|
|
171
212
|
key: filter.value,
|
|
172
213
|
onClick: ($event) => openFilter(filter.value),
|
|
173
|
-
class: vue.normalizeClass(["pd-
|
|
214
|
+
class: vue.normalizeClass(["pd-small radius-medium bg-light cursor-pointer flex-v-center flex gap-micro", { "selected bg-main": isFilterActive(filter) }])
|
|
174
215
|
}, [
|
|
175
|
-
vue.
|
|
176
|
-
|
|
216
|
+
filter.type === "date" ? (vue.openBlock(), vue.createBlock(IconCalendar.default, {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "mn-r-micro i-medium"
|
|
219
|
+
})) : vue.createCommentVNode("", true),
|
|
220
|
+
vue.createElementVNode("span", _hoisted_4, vue.toDisplayString(filter.type === "date" && getFilterValue(filter) ? formatFilterValue(filter) : filter.title), 1),
|
|
221
|
+
getFilterValue(filter) && filter.type !== "date" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5, vue.toDisplayString(formatFilterValue(filter)), 1)) : vue.createCommentVNode("", true)
|
|
177
222
|
], 10, _hoisted_3);
|
|
178
223
|
}), 128)),
|
|
179
224
|
vue.createVNode(Popup.default, {
|
|
@@ -183,21 +228,21 @@ const _sfc_main = {
|
|
|
183
228
|
class: "w-min-20r bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium"
|
|
184
229
|
}, {
|
|
185
230
|
default: vue.withCtx(() => [
|
|
186
|
-
vue.createElementVNode("div",
|
|
187
|
-
_cache[
|
|
231
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
232
|
+
_cache[4] || (_cache[4] = vue.createElementVNode("h3", { class: "flex-child-full" }, "Filters", -1)),
|
|
188
233
|
vue.createVNode(IconCross.default, {
|
|
189
234
|
onClick: _cache[1] || (_cache[1] = ($event) => showAllFilters.value = false),
|
|
190
235
|
class: "i-regular cursor-pointer"
|
|
191
236
|
})
|
|
192
237
|
]),
|
|
193
|
-
vue.createElementVNode("div",
|
|
238
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
194
239
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filters.value, (filter) => {
|
|
195
240
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
196
241
|
key: filter.value,
|
|
197
242
|
class: "mn-b-medium"
|
|
198
243
|
}, [
|
|
199
|
-
vue.createElementVNode("h4",
|
|
200
|
-
filter.type === "checkbox" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
244
|
+
vue.createElementVNode("h4", _hoisted_8, vue.toDisplayString(filter.title), 1),
|
|
245
|
+
filter.type === "checkbox" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
201
246
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filter.options, (option) => {
|
|
202
247
|
return vue.openBlock(), vue.createBlock(Checkbox.default, {
|
|
203
248
|
key: option.value,
|
|
@@ -209,7 +254,7 @@ const _sfc_main = {
|
|
|
209
254
|
class: "mn-b-micro"
|
|
210
255
|
}, null, 8, ["label", "value", "radio", "onUpdate:radio"]);
|
|
211
256
|
}), 128))
|
|
212
|
-
])) : filter.type === "radio" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
257
|
+
])) : filter.type === "radio" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
|
|
213
258
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filter.options, (option) => {
|
|
214
259
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
215
260
|
key: option.value,
|
|
@@ -218,23 +263,31 @@ const _sfc_main = {
|
|
|
218
263
|
"bg-main": tempSelected[filter.value] === option.value,
|
|
219
264
|
"bg-light": tempSelected[filter.value] !== option.value
|
|
220
265
|
}])
|
|
221
|
-
}, vue.toDisplayString(option.label), 11,
|
|
266
|
+
}, vue.toDisplayString(option.label), 11, _hoisted_11);
|
|
222
267
|
}), 128))
|
|
223
|
-
])) : filter.type === "range" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
268
|
+
])) : filter.type === "range" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
|
|
224
269
|
vue.createVNode(Field.default, {
|
|
225
270
|
field: tempSelected[filter.value].min,
|
|
226
271
|
"onUpdate:field": ($event) => tempSelected[filter.value].min = $event,
|
|
227
272
|
placeholder: filter.minPlaceholder || "Min",
|
|
228
273
|
type: "number",
|
|
229
|
-
class: "w-50 bg-light radius-small"
|
|
274
|
+
class: "w-50 bg-light pd-small radius-small"
|
|
230
275
|
}, null, 8, ["field", "onUpdate:field", "placeholder"]),
|
|
231
276
|
vue.createVNode(Field.default, {
|
|
232
277
|
field: tempSelected[filter.value].max,
|
|
233
278
|
"onUpdate:field": ($event) => tempSelected[filter.value].max = $event,
|
|
234
279
|
placeholder: filter.maxPlaceholder || "Max",
|
|
235
280
|
type: "number",
|
|
236
|
-
class: "w-50 bg-light radius-small"
|
|
281
|
+
class: "w-50 bg-light pd-small radius-small"
|
|
237
282
|
}, null, 8, ["field", "onUpdate:field", "placeholder"])
|
|
283
|
+
])) : filter.type === "date" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
|
|
284
|
+
vue.createVNode(Calendar.default, {
|
|
285
|
+
date: tempSelected[filter.value],
|
|
286
|
+
"onUpdate:date": ($event) => tempSelected[filter.value] = $event,
|
|
287
|
+
allowRange: true,
|
|
288
|
+
disablePastDates: true,
|
|
289
|
+
class: "bg-light radius-small"
|
|
290
|
+
}, null, 8, ["date", "onUpdate:date"])
|
|
238
291
|
])) : vue.createCommentVNode("", true)
|
|
239
292
|
]);
|
|
240
293
|
}), 128))
|
|
@@ -261,8 +314,8 @@ const _sfc_main = {
|
|
|
261
314
|
class: "bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium"
|
|
262
315
|
}, {
|
|
263
316
|
default: vue.withCtx(() => [
|
|
264
|
-
vue.createElementVNode("h4",
|
|
265
|
-
filter.type === "checkbox" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
317
|
+
vue.createElementVNode("h4", _hoisted_14, vue.toDisplayString(filter.title), 1),
|
|
318
|
+
filter.type === "checkbox" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
|
|
266
319
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filter.options, (option) => {
|
|
267
320
|
return vue.openBlock(), vue.createBlock(Checkbox.default, {
|
|
268
321
|
key: option.value,
|
|
@@ -274,7 +327,7 @@ const _sfc_main = {
|
|
|
274
327
|
class: "mn-b-micro"
|
|
275
328
|
}, null, 8, ["label", "value", "radio", "onUpdate:radio"]);
|
|
276
329
|
}), 128))
|
|
277
|
-
])) : filter.type === "radio" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
330
|
+
])) : filter.type === "radio" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
|
|
278
331
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filter.options, (option) => {
|
|
279
332
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
280
333
|
key: option.value,
|
|
@@ -283,33 +336,43 @@ const _sfc_main = {
|
|
|
283
336
|
"bg-main": tempSelected[filter.value] === option.value,
|
|
284
337
|
"bg-light": tempSelected[filter.value] !== option.value
|
|
285
338
|
}])
|
|
286
|
-
}, vue.toDisplayString(option.label), 11,
|
|
339
|
+
}, vue.toDisplayString(option.label), 11, _hoisted_17);
|
|
287
340
|
}), 128))
|
|
288
|
-
])) : filter.type === "range" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
341
|
+
])) : filter.type === "range" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
|
|
289
342
|
vue.createVNode(Field.default, {
|
|
290
343
|
field: tempSelected[filter.value].min,
|
|
291
344
|
"onUpdate:field": ($event) => tempSelected[filter.value].min = $event,
|
|
292
345
|
placeholder: filter.minPlaceholder || "Min",
|
|
293
346
|
type: "number",
|
|
294
|
-
class: "w-50 bg-light radius-small"
|
|
347
|
+
class: "w-50 bg-light pd-small radius-small"
|
|
295
348
|
}, null, 8, ["field", "onUpdate:field", "placeholder"]),
|
|
296
349
|
vue.createVNode(Field.default, {
|
|
297
350
|
field: tempSelected[filter.value].max,
|
|
298
351
|
"onUpdate:field": ($event) => tempSelected[filter.value].max = $event,
|
|
299
352
|
placeholder: filter.maxPlaceholder || "Max",
|
|
300
353
|
type: "number",
|
|
301
|
-
class: "w-50 bg-light radius-small"
|
|
354
|
+
class: "w-50 bg-light pd-small radius-small"
|
|
302
355
|
}, null, 8, ["field", "onUpdate:field", "placeholder"])
|
|
356
|
+
])) : filter.type === "date" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
|
|
357
|
+
vue.createElementVNode("div", _hoisted_20, [
|
|
358
|
+
vue.createVNode(Calendar.default, {
|
|
359
|
+
date: tempSelected[filter.value],
|
|
360
|
+
"onUpdate:date": ($event) => tempSelected[filter.value] = $event,
|
|
361
|
+
allowRange: true,
|
|
362
|
+
disablePastDates: true,
|
|
363
|
+
class: "bg-light radius-small"
|
|
364
|
+
}, null, 8, ["date", "onUpdate:date"])
|
|
365
|
+
])
|
|
303
366
|
])) : vue.createCommentVNode("", true),
|
|
304
|
-
vue.createElementVNode("div",
|
|
367
|
+
vue.createElementVNode("div", _hoisted_21, [
|
|
305
368
|
vue.createElementVNode("button", {
|
|
306
369
|
onClick: ($event) => cancelFilter(filter.value),
|
|
307
|
-
class: "
|
|
308
|
-
}, " Cancel ", 8,
|
|
370
|
+
class: "bg-light button flex-child-full"
|
|
371
|
+
}, " Cancel ", 8, _hoisted_22),
|
|
309
372
|
vue.createElementVNode("button", {
|
|
310
373
|
onClick: ($event) => applyFilter(filter.value),
|
|
311
|
-
class: "w-100 button
|
|
312
|
-
}, " Apply ", 8,
|
|
374
|
+
class: "bg-main w-100 button flex-child-full"
|
|
375
|
+
}, " Apply ", 8, _hoisted_23)
|
|
313
376
|
])
|
|
314
377
|
]),
|
|
315
378
|
_: 2
|
|
@@ -319,6 +382,6 @@ const _sfc_main = {
|
|
|
319
382
|
};
|
|
320
383
|
}
|
|
321
384
|
};
|
|
322
|
-
const Filters = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
385
|
+
const Filters = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-798714cf"]]);
|
|
323
386
|
exports.default = Filters;
|
|
324
387
|
//# sourceMappingURL=Filters.vue2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Filters.vue2.cjs","sources":["../../../../../../../../src/modules/globals/views/components/sections/Filters.vue"],"sourcesContent":["<template>\n <div class=\"flex gap-thin\">\n <!-- All Filters Button -->\n <button\n @click=\"showAllFilters = true\"\n class=\"pd-thin radius-medium bg-light flex-v-center flex gap-micro cursor-pointer\"\n :class=\"{ 'bg-main': activeFiltersCount > 0 }\"\n >\n <IconFilter class=\"i-small\" />\n <span v-if=\"activeFiltersCount\">{{ activeFiltersCount }}</span>\n </button>\n\n <!-- Individual Filter Buttons -->\n <button\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n @click=\"openFilter(filter.value)\"\n class=\"pd-thin radius-medium bg-light cursor-pointer\"\n :class=\"{ 'selected bg-main': isFilterActive(filter) }\"\n >\n {{ filter.title }}\n <span v-if=\"getFilterValue(filter)\" class=\"mn-l-micro\">\n {{ formatFilterValue(filter) }}\n </span>\n </button>\n\n <!-- All Filters Popup -->\n <Popup\n :isPopupOpen=\"showAllFilters\"\n @close-popup=\"showAllFilters = false\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"w-min-20r bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <div class=\"flex-v-center flex-nowrap flex mn-b-medium\">\n <h3 class=\"flex-child-full\">Filters</h3>\n <IconCross \n @click=\"showAllFilters = false\" \n class=\"i-regular cursor-pointer\"\n />\n </div>\n\n <div class=\"filters-content\">\n <div \n v-for=\"filter in filters\" \n :key=\"filter.value\"\n class=\"mn-b-medium\"\n >\n <h4 class=\"mn-b-thin\">{{ filter.title }}</h4>\n \n <!-- Checkbox Filter -->\n <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n class=\"w-50 bg-light radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n class=\"w-50 bg-light radius-small\"\n />\n </div>\n </div>\n </div>\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button \n @click=\"applyAllFilters\" \n class=\"button bg-main flex-child-full\"\n >\n Apply\n </button>\n <button \n @click=\"resetFilters\" \n class=\"button bg-light\"\n >\n Reset Filters\n </button>\n </div>\n </Popup>\n\n <!-- Individual Filter Popups -->\n <Popup\n v-for=\"filter in filters\"\n :key=\"`popup-${filter.value}`\"\n :isPopupOpen=\"individualPopups[filter.value]\"\n @close-popup=\"individualPopups[filter.value] = false\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <h4 class=\"mn-b-medium\">{{ filter.title }}</h4>\n \n <!-- Checkbox Filter -->\n <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n class=\"w-50 bg-light radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n class=\"w-50 bg-light radius-small\"\n />\n </div>\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button \n @click=\"cancelFilter(filter.value)\" \n class=\"w-100 button bg-light\"\n >\n Cancel\n </button>\n <button \n @click=\"applyFilter(filter.value)\" \n class=\"w-100 button bg-main\"\n >\n Apply\n </button>\n \n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, reactive, watch } from 'vue'\nimport Popup from '@martyrs/src/components/Popup/Popup.vue'\nimport Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'\nimport Field from '@martyrs/src/components/Field/Field.vue'\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue'\n\nconst filters = defineModel('filters', {\n type: Array,\n required: true\n})\n\nconst selected = defineModel('selected', {\n type: Object,\n default: () => ({})\n})\n\nconst emit = defineEmits(['select'])\n\n// State\nconst showAllFilters = ref(false)\nconst individualPopups = reactive({})\nconst tempSelected = reactive({})\n\n// Initialize popups and temp values\nwatch(filters, (newFilters) => {\n newFilters.forEach(filter => {\n individualPopups[filter.value] = false\n \n if (!tempSelected[filter.value]) {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = selected.value[filter.value] || []\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = selected.value[filter.value] || { min: '', max: '' }\n } else {\n tempSelected[filter.value] = selected.value[filter.value] || null\n }\n }\n })\n}, { immediate: true, deep: true })\n\n// Sync selected to tempSelected\nwatch(selected, (newSelected) => {\n Object.keys(newSelected).forEach(key => {\n tempSelected[key] = newSelected[key]\n })\n}, { deep: true })\n\n// Computed\nconst activeFiltersCount = computed(() => {\n return Object.entries(selected.value).filter(([key, value]) => {\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'object' && value !== null) {\n return value.min || value.max\n }\n return value !== null && value !== undefined\n }).length\n})\n\n// Methods\nconst openFilter = (filterValue) => {\n individualPopups[filterValue] = true\n}\n\nconst isFilterActive = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return false\n if (Array.isArray(value)) return value.length > 0\n if (filter.type === 'range') return value.min || value.max\n return true\n}\n\nconst getFilterValue = (filter) => {\n return selected.value[filter.value]\n}\n\nconst formatFilterValue = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return ''\n \n if (Array.isArray(value)) {\n return `(${value.length})`\n }\n \n if (filter.type === 'range') {\n if (!value.min && !value.max) return ''\n return `${value.min || '0'}-${value.max || '∞'}`\n }\n \n if (filter.type === 'radio') {\n const option = filter.options.find(o => o.value === value)\n return option ? `(${option.label})` : ''\n }\n \n return ''\n}\n\nconst applyFilter = (filterValue) => {\n selected.value[filterValue] = tempSelected[filterValue]\n individualPopups[filterValue] = false\n emit('select', { filter: filterValue, value: tempSelected[filterValue] })\n}\n\nconst cancelFilter = (filterValue) => {\n const filter = filters.value.find(f => f.value === filterValue)\n if (filter) {\n if (filter.type === 'checkbox') {\n tempSelected[filterValue] = selected.value[filterValue] || []\n } else if (filter.type === 'range') {\n tempSelected[filterValue] = selected.value[filterValue] || { min: '', max: '' }\n } else {\n tempSelected[filterValue] = selected.value[filterValue] || null\n }\n }\n individualPopups[filterValue] = false\n}\n\nconst applyAllFilters = () => {\n Object.entries(tempSelected).forEach(([key, value]) => {\n if (selected.value[key] !== value) {\n selected.value[key] = value\n emit('select', { filter: key, value })\n }\n })\n showAllFilters.value = false\n}\n\nconst resetFilters = () => {\n filters.value.forEach(filter => {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = []\n selected.value[filter.value] = []\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = { min: '', max: '' }\n selected.value[filter.value] = { min: '', max: '' }\n } else {\n tempSelected[filter.value] = null\n selected.value[filter.value] = null\n }\n emit('select', { filter: filter.value, value: null })\n })\n}\n</script>\n\n<style scoped>\n.filters-content {\n max-height: 60vh;\n overflow-y: auto;\n}\n</style>"],"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KAAI,CAAE;AAAA,MACtD,CAAC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Filters.vue2.cjs","sources":["../../../../../../../../src/modules/globals/views/components/sections/Filters.vue"],"sourcesContent":["<template>\n <div class=\"flex t-nowrap gap-thin\">\n <!-- All Filters Button -->\n <button\n @click=\"showAllFilters = true\"\n class=\"pd-small radius-medium bg-light flex-v-center flex gap-micro cursor-pointer\"\n :class=\"{ 'bg-main': activeFiltersCount > 0 }\"\n >\n <IconFilter class=\"i-medium\" />\n <span class=\"h-1r\"></span>\n <span v-if=\"activeFiltersCount\">{{ activeFiltersCount }}</span>\n </button>\n\n <!-- Individual Filter Buttons -->\n <button\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n @click=\"openFilter(filter.value)\"\n class=\"pd-small radius-medium bg-light cursor-pointer flex-v-center flex gap-micro\"\n :class=\"{ 'selected bg-main': isFilterActive(filter) }\"\n >\n <IconCalendar v-if=\"filter.type === 'date'\" class=\"mn-r-micro i-medium\" />\n <span class=\"t-nowrap\">{{ filter.type === 'date' && getFilterValue(filter) ? formatFilterValue(filter) : filter.title }}</span>\n <span v-if=\"getFilterValue(filter) && filter.type !== 'date'\" class=\"mn-l-micro\">\n {{ formatFilterValue(filter) }}\n </span>\n </button>\n\n <!-- All Filters Popup -->\n <Popup\n :isPopupOpen=\"showAllFilters\"\n @close-popup=\"showAllFilters = false\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"w-min-20r bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <div class=\"flex-v-center flex-nowrap flex mn-b-medium\">\n <h3 class=\"flex-child-full\">Filters</h3>\n <IconCross \n @click=\"showAllFilters = false\" \n class=\"i-regular cursor-pointer\"\n />\n </div>\n\n <div class=\"filters-content\">\n <div \n v-for=\"filter in filters\" \n :key=\"filter.value\"\n class=\"mn-b-medium\"\n >\n <h4 class=\"mn-b-small\">{{ filter.title }}</h4>\n \n <!-- Checkbox Filter -->\n <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\n\n <!-- Date Filter -->\n <div v-else-if=\"filter.type === 'date'\">\n <Calendar\n v-model:date=\"tempSelected[filter.value]\"\n :allowRange=\"true\"\n :disablePastDates=\"true\"\n class=\"bg-light radius-small\"\n />\n </div>\n </div>\n </div>\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button \n @click=\"applyAllFilters\" \n class=\"button bg-main flex-child-full\"\n >\n Apply\n </button>\n <button \n @click=\"resetFilters\" \n class=\"button bg-light\"\n >\n Reset Filters\n </button>\n </div>\n </Popup>\n\n <!-- Individual Filter Popups -->\n <Popup\n v-for=\"filter in filters\"\n :key=\"`popup-${filter.value}`\"\n :isPopupOpen=\"individualPopups[filter.value]\"\n @close-popup=\"individualPopups[filter.value] = false\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <h4 class=\"mn-b-medium\">{{ filter.title }}</h4>\n \n <!-- Checkbox Filter -->\n <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\n\n <!-- Date Filter -->\n <div v-else-if=\"filter.type === 'date'\">\n <div class=\"mn-t-small\">\n <Calendar\n v-model:date=\"tempSelected[filter.value]\"\n :allowRange=\"true\"\n :disablePastDates=\"true\"\n class=\"bg-light radius-small\"\n />\n </div>\n </div>\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button \n @click=\"cancelFilter(filter.value)\" \n class=\"bg-light button flex-child-full\"\n >\n Cancel\n </button>\n <button \n @click=\"applyFilter(filter.value)\" \n class=\"bg-main w-100 button flex-child-full\"\n >\n Apply\n </button>\n \n \n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, reactive, watch } from 'vue'\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js'\nimport Popup from '@martyrs/src/components/Popup/Popup.vue'\nimport Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'\nimport Field from '@martyrs/src/components/Field/Field.vue'\nimport Calendar from '@martyrs/src/components/Calendar/Calendar.vue'\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue'\nimport IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'\n\nconst filters = defineModel('filters', {\n type: Array,\n required: true\n})\n\nconst selected = defineModel('selected', {\n type: Object,\n default: () => ({})\n})\n\nconst emit = defineEmits(['select'])\n\nconst { formatDate } = useGlobalMixins()\n\n// State\nconst showAllFilters = ref(false)\nconst individualPopups = reactive({})\nconst tempSelected = reactive({})\nconst tempDateRange = ref(null)\n\n// Initialize popups and temp values\nwatch(filters, (newFilters) => {\n newFilters.forEach(filter => {\n individualPopups[filter.value] = false\n \n if (!tempSelected[filter.value]) {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = [...(selected.value[filter.value] || [])]\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = { ...(selected.value[filter.value] || { min: '', max: '' }) }\n } else if (filter.type === 'date') {\n tempSelected[filter.value] = selected.value[filter.value] || null\n } else {\n tempSelected[filter.value] = selected.value[filter.value] || null\n }\n }\n })\n}, { immediate: true, deep: true })\n\n// Sync selected to tempSelected\nwatch(selected, (newSelected) => {\n Object.keys(newSelected).forEach(key => {\n const filter = filters.value.find(f => f.value === key)\n if (filter) {\n if (filter.type === 'checkbox') {\n tempSelected[key] = [...(newSelected[key] || [])]\n } else if (filter.type === 'range') {\n tempSelected[key] = { ...(newSelected[key] || { min: '', max: '' }) }\n } else {\n tempSelected[key] = newSelected[key]\n }\n }\n })\n}, { deep: true })\n\n// Computed\nconst activeFiltersCount = computed(() => {\n return Object.entries(selected.value).filter(([key, value]) => {\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'object' && value !== null) {\n return value.min || value.max\n }\n return value !== null && value !== undefined\n }).length\n})\n\n// Methods\nconst openFilter = (filterValue) => {\n individualPopups[filterValue] = true\n}\n\nconst isFilterActive = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return false\n if (Array.isArray(value)) return value.length > 0\n if (filter.type === 'range') return value.min || value.max\n return true\n}\n\nconst getFilterValue = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return false\n \n if (filter.type === 'range') {\n return value.min || value.max\n }\n \n if (filter.type === 'date') {\n return value && value.start && value.end\n }\n \n if (Array.isArray(value)) {\n return value.length > 0\n }\n \n return value\n}\n\nconst formatFilterValue = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return ''\n \n if (Array.isArray(value)) {\n return `(${value.length})`\n }\n \n if (filter.type === 'range') {\n if (!value.min && !value.max) return ''\n return `${value.min || '0'}-${value.max || '∞'}`\n }\n \n if (filter.type === 'date') {\n if (!value || !value.start || !value.end) return ''\n return `${formatDate(value.start, { dayMonth: true, language: 'en' })} - ${formatDate(value.end, { dayMonth: true, language: 'en' })}`\n }\n \n if (filter.type === 'radio') {\n const option = filter.options.find(o => o.value === value)\n return option ? `(${option.label})` : ''\n }\n \n return ''\n}\n\nconst applyFilter = (filterValue) => {\n selected.value[filterValue] = tempSelected[filterValue]\n individualPopups[filterValue] = false\n emit('select', { filter: filterValue, value: tempSelected[filterValue] })\n}\n\nconst cancelFilter = (filterValue) => {\n const filter = filters.value.find(f => f.value === filterValue)\n if (filter) {\n if (filter.type === 'checkbox') {\n tempSelected[filterValue] = [...(selected.value[filterValue] || [])]\n } else if (filter.type === 'range') {\n tempSelected[filterValue] = { ...(selected.value[filterValue] || { min: '', max: '' }) }\n } else if (filter.type === 'date') {\n tempSelected[filterValue] = selected.value[filterValue] || null\n } else {\n tempSelected[filterValue] = selected.value[filterValue] || null\n }\n }\n individualPopups[filterValue] = false\n}\n\nconst applyAllFilters = () => {\n Object.entries(tempSelected).forEach(([key, value]) => {\n if (selected.value[key] !== value) {\n selected.value[key] = value\n emit('select', { filter: key, value })\n }\n })\n showAllFilters.value = false\n}\n\nconst resetFilters = () => {\n filters.value.forEach(filter => {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = []\n selected.value[filter.value] = []\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = { min: '', max: '' }\n selected.value[filter.value] = { min: '', max: '' }\n } else if (filter.type === 'date') {\n tempSelected[filter.value] = null\n selected.value[filter.value] = null\n } else {\n tempSelected[filter.value] = null\n selected.value[filter.value] = null\n }\n emit('select', { filter: filter.value, value: null })\n })\n}\n</script>\n\n<style scoped>\n.filters-content {\n max-height: 60vh;\n overflow-y: auto;\n}\n</style>"],"names":["_useModel","useGlobalMixins","ref","reactive","watch","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+NA,UAAM,UAAUA,IAAAA,SAAW,SAAC,SAG3B;AAED,UAAM,WAAWA,IAAAA,SAAW,SAAC,UAG5B;AAED,UAAM,OAAO;AAEb,UAAM,EAAE,WAAU,IAAKC,OAAAA,gBAAe;AAGtC,UAAM,iBAAiBC,IAAAA,IAAI,KAAK;AAChC,UAAM,mBAAmBC,IAAAA,SAAS,CAAA,CAAE;AACpC,UAAM,eAAeA,IAAAA,SAAS,CAAA,CAAE;AACVD,QAAAA,IAAI,IAAI;AAG9BE,QAAAA,MAAM,SAAS,CAAC,eAAe;AAC7B,iBAAW,QAAQ,YAAU;AAC3B,yBAAiB,OAAO,KAAK,IAAI;AAEjC,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