@ozdao/martyrs 0.2.524 → 0.2.525
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/_virtual/index.cjs +4 -4
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.cjs +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/community.server.cjs +1 -1
- package/dist/community.server.js +1 -1
- package/dist/{crud-CC6k6yY5.cjs → crud-DGM6Xa1R.cjs} +1 -1
- package/dist/{crud-BIFl1W1i.js → crud-Ed3dcRsC.js} +1 -1
- package/dist/events.server.cjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/gallery.server.cjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/{globals.verifier-DFqKQ7hK.js → globals.verifier-BhqUrneb.js} +31 -1
- package/dist/{globals.verifier-C0zj_LLo.cjs → globals.verifier-CJ1lr-NW.cjs} +31 -1
- package/dist/inventory.server.cjs +3 -3
- package/dist/inventory.server.js +3 -3
- package/dist/{main-BM3GslOO.cjs → main-4KvvKtzH.cjs} +6 -6
- package/dist/{main-Qcn7YlTx.js → main-Bk4xq-K0.js} +45 -37
- package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.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/Feed.vue.cjs +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.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/Spoiler/{Spoiler.vue2.cjs → Spoiler.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js.map → Spoiler.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js → Spoiler.vue.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +1 -0
- package/dist/martyrs/src/components/Tree/Tree.vue.cjs +19 -33
- package/dist/martyrs/src/components/Tree/Tree.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Tree/Tree.vue.js +19 -33
- package/dist/martyrs/src/components/Tree/Tree.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/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 +2 -2
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- 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 +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
- 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/classes/globals.i18n.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
- 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.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +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 +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +2 -2
- 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/store/globals.cjs +14 -2
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.js +14 -2
- package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
- 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/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.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 +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- 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 +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/music/router/music.js +2 -2
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs +0 -4
- package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/notifications.client.js +0 -4
- package/dist/martyrs/src/modules/notifications/notifications.client.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 +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/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 +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +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/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +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/forms/AddExistingMembersForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.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 +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +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 +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/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/pages/Categories.vue.cjs +28 -20
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +28 -20
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- 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 +78 -46
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +78 -46
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -2
- 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 +1 -2
- 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/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/FilterProducts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- 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/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 +12 -2
- package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/products.js +12 -2
- 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 +2 -2
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +2 -2
- 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/Spot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.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.es.js +1 -1
- package/dist/music.server.cjs +2 -2
- package/dist/music.server.js +2 -2
- package/dist/orders.server.cjs +3 -3
- package/dist/orders.server.js +3 -3
- package/dist/organizations.server.cjs +2 -2
- package/dist/organizations.server.js +2 -2
- package/dist/products.server.cjs +34 -22
- package/dist/products.server.js +34 -22
- package/dist/{queryProcessor-B_X680wC.cjs → queryProcessor-DMSc5-r6.cjs} +17 -20
- package/dist/{queryProcessor-CVcLPEnv.js → queryProcessor-rukV_SBd.js} +17 -20
- package/dist/rents.server.cjs +2 -2
- package/dist/rents.server.js +2 -2
- package/dist/spots.server.cjs +1 -1
- package/dist/spots.server.js +1 -1
- package/dist/{web-DVR8m2fm.js → web-BS-4Xl3x.js} +1 -1
- package/dist/{web-B0cfxzgu.cjs → web-CjndIDjT.cjs} +1 -1
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +1 -1
- package/src/components/Tree/Tree.vue +27 -15
- package/src/modules/globals/controllers/classes/globals.validator.js +32 -1
- package/src/modules/globals/controllers/utils/queryProcessor.js +27 -20
- package/src/modules/globals/views/components/blocks/PopupDateSelector.vue +1 -1
- package/src/modules/globals/views/store/globals.js +19 -2
- package/src/modules/notifications/notifications.client.js +0 -5
- package/src/modules/products/components/pages/Categories.vue +41 -26
- package/src/modules/products/components/pages/ProductEdit.vue +45 -21
- package/src/modules/products/components/pages/Products.vue +0 -1
- package/src/modules/products/controllers/categories.controller.js +3 -17
- package/src/modules/products/controllers/products.controller.js +34 -1
- package/src/modules/products/middlewares/categories.verifier.js +1 -1
- package/src/modules/products/middlewares/variants.verifier.js +2 -2
- package/src/modules/products/store/products.js +10 -0
- 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/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
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.cjs.map +0 -1
- package/src/modules/products/TASKS.MD +0 -1
|
@@ -281,8 +281,6 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
281
281
|
const route = options.route || "User Profile Root";
|
|
282
282
|
router.addRoute(route, notifications_router.default);
|
|
283
283
|
store.addStore("notifications", notifications_store);
|
|
284
|
-
console.log("[Notifications] Initializing, auth store exists:", !!store.auth);
|
|
285
|
-
console.log("[Notifications] Auth state:", store.auth?.state);
|
|
286
284
|
if (options.wsUrl) {
|
|
287
285
|
globals_websocket.default.initialize({ wsUrl: process.env.WSS_URL });
|
|
288
286
|
}
|
|
@@ -297,7 +295,6 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
297
295
|
const autoInit = !isServer && options.autoInit !== false;
|
|
298
296
|
if (autoInit) {
|
|
299
297
|
notificationManager.initialize();
|
|
300
|
-
console.log("[Notifications] Setting up auth watcher...");
|
|
301
298
|
if (!store.auth) {
|
|
302
299
|
console.error("[Notifications] Auth store not found! Cannot set up watcher.");
|
|
303
300
|
return;
|
|
@@ -305,7 +302,6 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
305
302
|
vue.watch(
|
|
306
303
|
() => store.auth.state.access.status,
|
|
307
304
|
async (isAuthenticated) => {
|
|
308
|
-
console.log("[Notifications] Auth status changed:", isAuthenticated);
|
|
309
305
|
if (isAuthenticated) {
|
|
310
306
|
console.log("[Notifications] User logged in, re-registering device...");
|
|
311
307
|
await store.notifications.actions.reregisterDeviceAfterLogin();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Capacitor Preferences\nimport { Preferences } from '@capacitor/preferences';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // For anonymous users, add anonymousId\n if (!this.store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n const deviceToken = JSON.stringify(subscription);\n const deviceId = await this.generateDeviceId();\n \n // Store device data for re-registration after login\n try {\n await Preferences.set({\n key: 'notifications_device_token',\n value: deviceToken\n });\n } catch (error) {\n console.warn('Could not save device token to preferences:', error);\n }\n\n const deviceData = {\n deviceToken,\n deviceType: 'web',\n deviceId\n };\n\n // For anonymous users, get or generate anonymousId\n if (!store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device\n console.log('[Notifications] Registering device with data:', deviceData);\n await store.notifications.actions.registerDevice(deviceData);\n }\n\n async generateDeviceId() {\n // Try to get or generate a persistent device ID\n try {\n const result = await Preferences.get({ key: 'notifications_device_id' });\n let deviceId = result.value;\n \n if (!deviceId) {\n deviceId = 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n await Preferences.set({\n key: 'notifications_device_id',\n value: deviceId\n });\n }\n return deviceId;\n } catch (error) {\n console.warn('Could not access preferences for device ID:', error);\n return 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n }\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n \n // Connect WebSocket only for authenticated users\n if (userId) {\n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: process.env.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // Load notifications from API for authenticated users\n await this.store.notifications.actions.getNotifications(userId);\n } else {\n console.log('Initializing notifications for anonymous user');\n }\n\n // Enable push notifications for both authenticated and anonymous users\n // Skip auto-init for mobile apps - will be triggered manually from Walkthrough\n if (this.options.enablePush !== false && !process.env.MOBILE_APP) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n console.log('[Notifications] Initializing, auth store exists:', !!store.auth);\n console.log('[Notifications] Auth state:', store.auth?.state);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: process.env.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize immediately (supports both authenticated and anonymous users)\n notificationManager.initialize();\n\n // Watch for user login/logout using auth store\n console.log('[Notifications] Setting up auth watcher...');\n if (!store.auth) {\n console.error('[Notifications] Auth store not found! Cannot set up watcher.');\n return;\n }\n \n watch(\n () => store.auth.state.access.status,\n async (isAuthenticated) => {\n console.log('[Notifications] Auth status changed:', isAuthenticated);\n if (isAuthenticated) {\n // Re-register device for authenticated user\n console.log('[Notifications] User logged in, re-registering device...');\n await store.notifications.actions.reregisterDeviceAfterLogin();\n // Reinitialize notifications for authenticated user\n notificationManager.disconnect();\n await notificationManager.initialize();\n } else {\n // Keep notifications active for anonymous users, just reset user-specific data\n console.log('[Notifications] User logged out, resetting notifications...');\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["Preferences","globalWebSocket","routerNotifications","storeNotifications","watch","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;;AAwBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AAC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AU;AAAA,QACtC,OAAO;AAEL,kBAAQ,IAAI,6DAA6D;AACzE,gBAAM,cAAc,UAAU,mBAAkB;AAAA,QAClD;AAAA,MACF;AAAA,IACN;AAAA,EACE;AAGA,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAGC,WAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMF;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD,qBAAAA;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMI,kBAAAA;AAAAA;AAAAA,MAEN,kBAAMC,iBAAAA;AAAAA;AAAAA,MAEN,mBAAMC,kBAAAA;AAAAA,MACN,yBAAMC,wBAAAA;AAAAA;AAAAA,MAEN,eAAMC,cAAAA;AAAAA;AAAAA,MAEN,qBAAMC,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Capacitor Preferences\nimport { Preferences } from '@capacitor/preferences';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // For anonymous users, add anonymousId\n if (!this.store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n const deviceToken = JSON.stringify(subscription);\n const deviceId = await this.generateDeviceId();\n \n // Store device data for re-registration after login\n try {\n await Preferences.set({\n key: 'notifications_device_token',\n value: deviceToken\n });\n } catch (error) {\n console.warn('Could not save device token to preferences:', error);\n }\n\n const deviceData = {\n deviceToken,\n deviceType: 'web',\n deviceId\n };\n\n // For anonymous users, get or generate anonymousId\n if (!store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device\n console.log('[Notifications] Registering device with data:', deviceData);\n await store.notifications.actions.registerDevice(deviceData);\n }\n\n async generateDeviceId() {\n // Try to get or generate a persistent device ID\n try {\n const result = await Preferences.get({ key: 'notifications_device_id' });\n let deviceId = result.value;\n \n if (!deviceId) {\n deviceId = 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n await Preferences.set({\n key: 'notifications_device_id',\n value: deviceId\n });\n }\n return deviceId;\n } catch (error) {\n console.warn('Could not access preferences for device ID:', error);\n return 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n }\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n \n // Connect WebSocket only for authenticated users\n if (userId) {\n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: process.env.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // Load notifications from API for authenticated users\n await this.store.notifications.actions.getNotifications(userId);\n } else {\n console.log('Initializing notifications for anonymous user');\n }\n\n // Enable push notifications for both authenticated and anonymous users\n // Skip auto-init for mobile apps - will be triggered manually from Walkthrough\n if (this.options.enablePush !== false && !process.env.MOBILE_APP) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: process.env.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize immediately (supports both authenticated and anonymous users)\n notificationManager.initialize();\n\n // Watch for user login/logout using auth store\n if (!store.auth) {\n console.error('[Notifications] Auth store not found! Cannot set up watcher.');\n return;\n }\n \n watch(\n () => store.auth.state.access.status,\n async (isAuthenticated) => {\n if (isAuthenticated) {\n // Re-register device for authenticated user\n console.log('[Notifications] User logged in, re-registering device...');\n await store.notifications.actions.reregisterDeviceAfterLogin();\n // Reinitialize notifications for authenticated user\n notificationManager.disconnect();\n await notificationManager.initialize();\n } else {\n // Keep notifications active for anonymous users, just reset user-specific data\n console.log('[Notifications] User logged out, resetting notifications...');\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["Preferences","globalWebSocket","routerNotifications","storeNotifications","watch","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;;AAwBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,+FAAiB,CAAA;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,wJAA+B,CAAA;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,gIAAmB,CAAA;AAEnD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACT;AAEA,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,MAAM,sCAAsC,KAAK;AACzD,aAAO;AAAA,IACT;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,qBAAqB;AAEzB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,KAAK,eAAe;AACvB,YAAM,cAAc,MAAM,KAAK,WAAU;AACzC,UAAI,CAAC,YAAa,QAAO;AAAA,IAC3B;AAEA,QAAI;AAEF,YAAM,mBAAmB,MAAM,KAAK,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AAM,OAAO;AAAA,MAC9B,OAAO,oBAAoB;AACzB,YAAI,iBAAiB;AAEnB,kBAAQ,IAAI,0DAA0D;AACtE,gBAAM,MAAM,cAAc,QAAQ,2BAA0B;AAE5D,8BAAoB,WAAU;AAC9B,gBAAM,oBAAoB,WAAU;AAAA,QACtC,OAAO;AAEL,kBAAQ,IAAI,6DAA6D;AACzE,gBAAM,cAAc,UAAU,mBAAkB;AAAA,QAClD;AAAA,MACF;AAAA,IACN;AAAA,EACE;AAGA,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAGC,WAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMF;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD,qBAAAA;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMI,kBAAAA;AAAAA;AAAAA,MAEN,kBAAMC,iBAAAA;AAAAA;AAAAA,MAEN,mBAAMC,kBAAAA;AAAAA,MACN,yBAAMC,wBAAAA;AAAAA;AAAAA,MAEN,eAAMC,cAAAA;AAAAA;AAAAA,MAEN,qBAAMC,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
|
|
@@ -279,8 +279,6 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
279
279
|
const route = options.route || "User Profile Root";
|
|
280
280
|
router.addRoute(route, nofitications);
|
|
281
281
|
store.addStore("notifications", notifications_store);
|
|
282
|
-
console.log("[Notifications] Initializing, auth store exists:", !!store.auth);
|
|
283
|
-
console.log("[Notifications] Auth state:", store.auth?.state);
|
|
284
282
|
if (options.wsUrl) {
|
|
285
283
|
globalWebSocket.initialize({ wsUrl: process.env.WSS_URL });
|
|
286
284
|
}
|
|
@@ -295,7 +293,6 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
295
293
|
const autoInit = !isServer && options.autoInit !== false;
|
|
296
294
|
if (autoInit) {
|
|
297
295
|
notificationManager.initialize();
|
|
298
|
-
console.log("[Notifications] Setting up auth watcher...");
|
|
299
296
|
if (!store.auth) {
|
|
300
297
|
console.error("[Notifications] Auth store not found! Cannot set up watcher.");
|
|
301
298
|
return;
|
|
@@ -303,7 +300,6 @@ function initializeNotifications(app, store, router, options = {}) {
|
|
|
303
300
|
watch(
|
|
304
301
|
() => store.auth.state.access.status,
|
|
305
302
|
async (isAuthenticated) => {
|
|
306
|
-
console.log("[Notifications] Auth status changed:", isAuthenticated);
|
|
307
303
|
if (isAuthenticated) {
|
|
308
304
|
console.log("[Notifications] User logged in, re-registering device...");
|
|
309
305
|
await store.notifications.actions.reregisterDeviceAfterLogin();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Capacitor Preferences\nimport { Preferences } from '@capacitor/preferences';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // For anonymous users, add anonymousId\n if (!this.store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n const deviceToken = JSON.stringify(subscription);\n const deviceId = await this.generateDeviceId();\n \n // Store device data for re-registration after login\n try {\n await Preferences.set({\n key: 'notifications_device_token',\n value: deviceToken\n });\n } catch (error) {\n console.warn('Could not save device token to preferences:', error);\n }\n\n const deviceData = {\n deviceToken,\n deviceType: 'web',\n deviceId\n };\n\n // For anonymous users, get or generate anonymousId\n if (!store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device\n console.log('[Notifications] Registering device with data:', deviceData);\n await store.notifications.actions.registerDevice(deviceData);\n }\n\n async generateDeviceId() {\n // Try to get or generate a persistent device ID\n try {\n const result = await Preferences.get({ key: 'notifications_device_id' });\n let deviceId = result.value;\n \n if (!deviceId) {\n deviceId = 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n await Preferences.set({\n key: 'notifications_device_id',\n value: deviceId\n });\n }\n return deviceId;\n } catch (error) {\n console.warn('Could not access preferences for device ID:', error);\n return 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n }\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n \n // Connect WebSocket only for authenticated users\n if (userId) {\n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: process.env.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // Load notifications from API for authenticated users\n await this.store.notifications.actions.getNotifications(userId);\n } else {\n console.log('Initializing notifications for anonymous user');\n }\n\n // Enable push notifications for both authenticated and anonymous users\n // Skip auto-init for mobile apps - will be triggered manually from Walkthrough\n if (this.options.enablePush !== false && !process.env.MOBILE_APP) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n \n console.log('[Notifications] Initializing, auth store exists:', !!store.auth);\n console.log('[Notifications] Auth state:', store.auth?.state);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: process.env.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize immediately (supports both authenticated and anonymous users)\n notificationManager.initialize();\n\n // Watch for user login/logout using auth store\n console.log('[Notifications] Setting up auth watcher...');\n if (!store.auth) {\n console.error('[Notifications] Auth store not found! Cannot set up watcher.');\n return;\n }\n \n watch(\n () => store.auth.state.access.status,\n async (isAuthenticated) => {\n console.log('[Notifications] Auth status changed:', isAuthenticated);\n if (isAuthenticated) {\n // Re-register device for authenticated user\n console.log('[Notifications] User logged in, re-registering device...');\n await store.notifications.actions.reregisterDeviceAfterLogin();\n // Reinitialize notifications for authenticated user\n notificationManager.disconnect();\n await notificationManager.initialize();\n } else {\n // Keep notifications active for anonymous users, just reset user-specific data\n console.log('[Notifications] User logged out, resetting notifications...');\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["routerNotifications","storeNotifications","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;AAwBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,OAAO,8FAAiB;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,uJAA+B;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,OAAO,+HAAmB;AAEnD,WAAK,YAAY;AACjB,WAAK,oBAAoB;AACzB,WAAK,SAAS;AAGd,UAAI,CAAC,KAAK,UAAU,oBAAoB;AACtC,eAAO;AAAA,MACT;AAEA,WAAK,gBAAgB;AACrB,aAAO;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,MAAM,sCAAsC,KAAK;AACzD,aAAO;AAAA,IACT;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,qBAAqB;AAEzB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,KAAK,eAAe;AACvB,YAAM,cAAc,MAAM,KAAK,WAAU;AACzC,UAAI,CAAC,YAAa,QAAO;AAAA,IAC3B;AAEA,QAAI;AAEF,YAAM,mBAAmB,MAAM,KAAK,kBAAkB,mBAAkB;AACxE,UAAI,iBAAiB,YAAY,WAAW;AAC1C,gBAAQ,IAAI,qCAAqC;AACjD,eAAO;AAAA,MACT;AAGA,WAAK,gBAAe;AAGpB,YAAM,KAAK,kBAAkB,SAAQ;AACrC,aAAO;AAAA,IACT,SAAS,OAAO;AACd,cAAQ,M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B,WAAU;AAAA,QACtC,OAAO;AAEL,kBAAQ,IAAI,6DAA6D;AACzE,gBAAM,cAAc,UAAU,mBAAkB;AAAA,QAClD;AAAA,MACF;AAAA,IACN;AAAA,EACE;AAGA,MAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAG,OAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMA;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEN,eAAME;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,IACN;AAAA,EACA;AACA;"}
|
|
1
|
+
{"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Capacitor Preferences\nimport { Preferences } from '@capacitor/preferences';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // For anonymous users, add anonymousId\n if (!this.store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n const deviceToken = JSON.stringify(subscription);\n const deviceId = await this.generateDeviceId();\n \n // Store device data for re-registration after login\n try {\n await Preferences.set({\n key: 'notifications_device_token',\n value: deviceToken\n });\n } catch (error) {\n console.warn('Could not save device token to preferences:', error);\n }\n\n const deviceData = {\n deviceToken,\n deviceType: 'web',\n deviceId\n };\n\n // For anonymous users, get or generate anonymousId\n if (!store.auth.state.user?._id) {\n let anonymousId = null;\n try {\n const result = await Preferences.get({ key: 'notifications_anonymous_id' });\n anonymousId = result.value;\n } catch (error) {\n console.warn('Could not get anonymous ID from preferences:', error);\n }\n \n if (!anonymousId) {\n anonymousId = 'anon_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n try {\n await Preferences.set({\n key: 'notifications_anonymous_id',\n value: anonymousId\n });\n } catch (error) {\n console.warn('Could not save anonymous ID to preferences:', error);\n }\n }\n deviceData.anonymousId = anonymousId;\n }\n\n // Register device\n console.log('[Notifications] Registering device with data:', deviceData);\n await store.notifications.actions.registerDevice(deviceData);\n }\n\n async generateDeviceId() {\n // Try to get or generate a persistent device ID\n try {\n const result = await Preferences.get({ key: 'notifications_device_id' });\n let deviceId = result.value;\n \n if (!deviceId) {\n deviceId = 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n await Preferences.set({\n key: 'notifications_device_id',\n value: deviceId\n });\n }\n return deviceId;\n } catch (error) {\n console.warn('Could not access preferences for device ID:', error);\n return 'web_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);\n }\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n \n // Connect WebSocket only for authenticated users\n if (userId) {\n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: process.env.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // Load notifications from API for authenticated users\n await this.store.notifications.actions.getNotifications(userId);\n } else {\n console.log('Initializing notifications for anonymous user');\n }\n\n // Enable push notifications for both authenticated and anonymous users\n // Skip auto-init for mobile apps - will be triggered manually from Walkthrough\n if (this.options.enablePush !== false && !process.env.MOBILE_APP) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: process.env.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize immediately (supports both authenticated and anonymous users)\n notificationManager.initialize();\n\n // Watch for user login/logout using auth store\n if (!store.auth) {\n console.error('[Notifications] Auth store not found! Cannot set up watcher.');\n return;\n }\n \n watch(\n () => store.auth.state.access.status,\n async (isAuthenticated) => {\n if (isAuthenticated) {\n // Re-register device for authenticated user\n console.log('[Notifications] User logged in, re-registering device...');\n await store.notifications.actions.reregisterDeviceAfterLogin();\n // Reinitialize notifications for authenticated user\n notificationManager.disconnect();\n await notificationManager.initialize();\n } else {\n // Keep notifications active for anonymous users, just reset user-specific data\n console.log('[Notifications] User logged out, resetting notifications...');\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"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AM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMA;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEN,eAAME;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,IACN;AAAA,EACA;AACA;"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
5
5
|
const Field = require("../../../../components/Field/Field.vue.cjs");
|
|
6
|
-
const Select = require("../../../../components/Select/Select.
|
|
7
|
-
const Button = require("../../../../components/Button/Button.
|
|
6
|
+
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
7
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
8
8
|
const _hoisted_1 = { class: "gap-thin flex mn-t-small" };
|
|
9
9
|
const _sfc_main = {
|
|
10
10
|
__name: "FormApplicationDetails",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mergeModels, useModel, ref, watch, createBlock, openBlock, withCtx, createVNode, createElementVNode, unref, isRef, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
3
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
4
|
-
import Select from "../../../../components/Select/Select.
|
|
5
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
5
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
6
6
|
const _hoisted_1 = { class: "gap-thin flex mn-t-small" };
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
__name: "FormApplicationDetails",
|
|
@@ -4,8 +4,8 @@ const vue = require("vue");
|
|
|
4
4
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
5
5
|
const Field = require("../../../../components/Field/Field.vue.cjs");
|
|
6
6
|
const FieldPhone = require("../../../../components/FieldPhone/FieldPhone.vue.cjs");
|
|
7
|
-
const Select = require("../../../../components/Select/Select.
|
|
8
|
-
const Button = require("../../../../components/Button/Button.
|
|
7
|
+
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
8
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
9
9
|
const _hoisted_1 = { class: "gap-thin mn-b-thin flex-justify-between flex-nowrap flex" };
|
|
10
10
|
const _hoisted_2 = {
|
|
11
11
|
key: 2,
|
|
@@ -2,8 +2,8 @@ import { mergeModels, useModel, ref, watch, createBlock, openBlock, withCtx, cre
|
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
3
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
4
4
|
import _sfc_main$2 from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
|
5
|
-
import Select from "../../../../components/Select/Select.
|
|
6
|
-
import _sfc_main$3 from "../../../../components/Button/Button.
|
|
5
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
6
|
+
import _sfc_main$3 from "../../../../components/Button/Button.vue2.js";
|
|
7
7
|
const _hoisted_1 = { class: "gap-thin mn-b-thin flex-justify-between flex-nowrap flex" };
|
|
8
8
|
const _hoisted_2 = {
|
|
9
9
|
key: 2,
|
|
@@ -5,7 +5,7 @@ const vueRouter = require("vue-router");
|
|
|
5
5
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
6
6
|
;/* empty css */
|
|
7
7
|
const IconCross = require("../../../icons/navigation/IconCross.vue.cjs");
|
|
8
|
-
;/* empty css
|
|
8
|
+
;/* empty css */
|
|
9
9
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
10
10
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
11
11
|
const BlockSearch = require("../../../globals/views/components/blocks/BlockSearch.vue.cjs");
|
|
@@ -3,7 +3,7 @@ import { useRoute } from "vue-router";
|
|
|
3
3
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import _sfc_main$3 from "../../../icons/navigation/IconCross.vue.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
import _sfc_main$6 from "../../../../components/Popup/Popup.vue.js";
|
|
8
8
|
import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
|
|
9
9
|
import _sfc_main$4 from "../../../globals/views/components/blocks/BlockSearch.vue.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
|
-
const Button = require("../../../../components/Button/Button.
|
|
6
|
-
const Select = require("../../../../components/Select/Select.
|
|
5
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
6
|
+
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
7
7
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
8
8
|
const IconTime = require("../../../icons/entities/IconTime.vue.cjs");
|
|
9
9
|
const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, onMounted, computed, createElementBlock, createCommentVNode, openBlock, createVNode, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, normalizeClass, withCtx, createBlock, unref } from "vue";
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
|
3
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
-
import Select from "../../../../components/Select/Select.
|
|
3
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
4
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
5
5
|
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
|
6
6
|
import IconClock from "../../../icons/entities/IconTime.vue.js";
|
|
7
7
|
import _sfc_main$3 from "../blocks/CardOrderItem.vue.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Button = require("../../../../components/Button/Button.
|
|
4
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
5
5
|
const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
|
|
6
6
|
const AskToLogin = require("../sections/AskToLogin.vue.cjs");
|
|
7
7
|
const Succes = require("../sections/Succes.vue.cjs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, computed, onMounted, watch, createElementBlock, openBlock, createBlock, createCommentVNode, createElementVNode, unref, toDisplayString, createVNode, Fragment, renderList, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import _sfc_main$9 from "../../../../components/Button/Button.
|
|
2
|
+
import _sfc_main$9 from "../../../../components/Button/Button.vue2.js";
|
|
3
3
|
import _sfc_main$7 from "../blocks/CardOrderItem.vue.js";
|
|
4
4
|
import _sfc_main$1 from "../sections/AskToLogin.vue.js";
|
|
5
5
|
import _sfc_main$3 from "../sections/Succes.vue.js";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
;/* empty css */
|
|
6
|
-
const Button = require("../../../../components/Button/Button.
|
|
6
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
7
7
|
const Tab = require("../../../../components/Tab/Tab.vue2.cjs");
|
|
8
8
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
9
9
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance, computed, ref, onMounted, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, withCtx, createElementVNode, createTextVNode, unref, Fragment, renderList, toDisplayString } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
5
5
|
import _sfc_main$3 from "../../../../components/Tab/Tab.vue2.js";
|
|
6
6
|
import _sfc_main$4 from "../../../../components/Popup/Popup.vue.js";
|
|
7
7
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
5
5
|
const StatusBadge = require("../../../../components/Table/StatusBadge.vue.cjs");
|
|
6
|
-
const Button = require("../../../../components/Button/Button.
|
|
6
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
7
7
|
const mixins = require("../../../globals/views/mixins/mixins.cjs");
|
|
8
8
|
;/* empty css */
|
|
9
9
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createVNode, createElementVNode, withCtx, toDisplayString, createCommentVNode, unref, createTextVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
3
|
import StatusBadge from "../../../../components/Table/StatusBadge.vue.js";
|
|
4
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
5
5
|
import { useGlobalMixins } from "../../../globals/views/mixins/mixins.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
5
5
|
const StatusBadge = require("../../../../components/Table/StatusBadge.vue.cjs");
|
|
6
|
-
const Button = require("../../../../components/Button/Button.
|
|
6
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
7
7
|
const mixins = require("../../../globals/views/mixins/mixins.cjs");
|
|
8
8
|
;/* empty css */
|
|
9
9
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createVNode, createElementVNode, withCtx, toDisplayString, createCommentVNode, unref, Fragment, renderList, createTextVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
3
|
import StatusBadge from "../../../../components/Table/StatusBadge.vue.js";
|
|
4
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
|
4
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
|
5
5
|
import { useGlobalMixins } from "../../../globals/views/mixins/mixins.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
;/* empty css */
|
|
6
6
|
;/* empty css */
|
|
7
|
-
;/* empty css
|
|
7
|
+
;/* empty css */
|
|
8
8
|
;/* empty css */
|
|
9
9
|
const Field = require("../../../../components/Field/Field.vue.cjs");
|
|
10
10
|
const Radio = require("../../../../components/Radio/Radio.vue.cjs");
|
|
@@ -2,7 +2,7 @@ import { watch, onMounted, computed, createBlock, openBlock, withCtx, createElem
|
|
|
2
2
|
import { useRoute } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
-
/* empty css
|
|
5
|
+
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
import Field from "../../../../components/Field/Field.vue.js";
|
|
8
8
|
import _sfc_main$2 from "../../../../components/Radio/Radio.vue.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
5
|
-
const Select = require("../../../../components/Select/Select.
|
|
5
|
+
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
6
6
|
const _hoisted_1 = { class: "mn-b-small flex-nowrap flex" };
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
__name: "FormPayment",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createBlock, openBlock, withCtx, createElementVNode, createVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
|
-
import Select from "../../../../components/Select/Select.
|
|
3
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
|
4
4
|
const _hoisted_1 = { class: "mn-b-small flex-nowrap flex" };
|
|
5
5
|
const _sfc_main = {
|
|
6
6
|
__name: "FormPayment",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
;/* empty css
|
|
4
|
+
;/* empty css */
|
|
5
5
|
;/* empty css */
|
|
6
6
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
7
7
|
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createElementVNode, createCommentVNode, Fragment, renderList, createBlock } from "vue";
|
|
2
|
-
/* empty css
|
|
2
|
+
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
import _sfc_main$1 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
const CardOrderItem = require("../../../orders/components/blocks/CardOrderItem.vue.cjs");
|
|
6
|
-
const Chips = require("../../../../components/Chips/Chips.
|
|
6
|
+
const Chips = require("../../../../components/Chips/Chips.vue2.cjs");
|
|
7
7
|
const PlaceholderOrganizationPic = require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs");
|
|
8
8
|
const IconShopcart = require("../../../icons/entities/IconShopcart.vue.cjs");
|
|
9
9
|
const IconTime = require("../../../icons/entities/IconTime.vue.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createElementVNode, createCommentVNode, createBlock, toDisplayString, withCtx, createVNode, Fragment, renderList, withModifiers } from "vue";
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
3
|
import _sfc_main$4 from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
|
4
|
-
import _sfc_main$1 from "../../../../components/Chips/Chips.
|
|
4
|
+
import _sfc_main$1 from "../../../../components/Chips/Chips.vue2.js";
|
|
5
5
|
import PlaceholderOrganizationPic from "../../../icons/placeholders/PlaceholderOrganizationPic.vue.js";
|
|
6
6
|
import _sfc_main$3 from "../../../icons/entities/IconShopcart.vue.js";
|
|
7
7
|
import IconClock from "../../../icons/entities/IconTime.vue.js";
|
package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Button = require("../../../../components/Button/Button.
|
|
4
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
5
5
|
require("../../../auth/views/store/auth.cjs");
|
|
6
6
|
const memberships_store = require("../../store/memberships.store.cjs");
|
|
7
7
|
const _sfc_main = {
|
package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createBlock, openBlock, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../../../../components/Button/Button.
|
|
2
|
+
import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
|
|
3
3
|
import "../../../auth/views/store/auth.js";
|
|
4
4
|
import membershipsStore from "../../store/memberships.store.js";
|
|
5
5
|
const _sfc_main = {
|
package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Button = require("../../../../components/Button/Button.
|
|
4
|
+
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
|
5
5
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
6
6
|
const PlaceholderUserpic = require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs");
|
|
7
7
|
const IconCheck = require("../../../icons/navigation/IconCheck.vue.cjs");
|
package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, createElementBlock, openBlock, createElementVNode, createVNode, createCommentVNode, withCtx, Fragment, renderList, normalizeClass, createBlock, toDisplayString, createTextVNode } from "vue";
|
|
2
|
-
import _sfc_main$3 from "../../../../components/Button/Button.
|
|
2
|
+
import _sfc_main$3 from "../../../../components/Button/Button.vue2.js";
|
|
3
3
|
import _sfc_main$1 from "../../../../components/Feed/Feed.vue.js";
|
|
4
4
|
import PlaceholderUserpic from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
|
|
5
5
|
import _sfc_main$2 from "../../../icons/navigation/IconCheck.vue.js";
|