@ozdao/martyrs 0.2.541 → 0.2.543
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 +3 -6
- package/dist/_virtual/index2.cjs.map +1 -1
- package/dist/_virtual/index2.js +2 -5
- package/dist/_virtual/index2.js.map +1 -1
- package/dist/main-BNdv8Ji-.cjs +11 -0
- package/dist/{main-BpBtIUcJ.js → main-DUwlesGq.js} +3135 -3555
- 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/EditImages/EditImages.vue.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +4 -2
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +5 -3
- package/dist/martyrs/src/components/Feed/Carousel.vue.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +5 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +5 -3
- 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/BlockTags.vue.cjs +30 -21
- package/dist/martyrs/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldTags/BlockTags.vue.js +32 -23
- package/dist/martyrs/src/components/FieldTags/BlockTags.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue2.cjs +235 -0
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue2.js +235 -0
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Marquee/Marquee.vue.cjs +17 -8
- package/dist/martyrs/src/components/Marquee/Marquee.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Marquee/Marquee.vue.js +17 -8
- package/dist/martyrs/src/components/Marquee/Marquee.vue.js.map +1 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.cjs +3 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.js +4 -2
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue2.cjs +219 -0
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue2.js +219 -0
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue2.js.map +1 -0
- 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 +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/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 +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +4 -4
- 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 +2 -7
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +2 -7
- package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +2 -13
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.js +2 -13
- package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -4
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -4
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +2 -2
- 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 +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +22 -22
- 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 +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- 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 +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- 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 +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +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 +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue2.cjs → Filters.vue.cjs} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue2.js.map → Filters.vue.cjs.map} +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue2.js → Filters.vue.js} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue.js.map +1 -0
- package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.cjs +1 -0
- package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.js +1 -0
- package/dist/martyrs/src/modules/globals/views/plugins/alert.plugin.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/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 +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.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 +11 -11
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +12 -12
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +16 -16
- 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 +16 -16
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
- 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 +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
- 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 +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
- 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/orders/components/forms/FormApplicationDetails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +1 -1
- 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 +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/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/organizations/components/blocks/CardDepartment.vue.cjs +3 -4
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +3 -4
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js.map +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 +20 -20
- 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 +3 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +3 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +4 -5
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +4 -5
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +3 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +3 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +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 +6 -6
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/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/CardCategory.vue.cjs +11 -5
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +12 -6
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +5 -2
- 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 +5 -2
- 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 +49 -41
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +54 -46
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +5 -5
- 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 +5 -5
- 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 +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/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/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +11 -11
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/index.cjs +1 -1
- package/dist/node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/index.js +1 -1
- package/dist/style.css +133 -133
- package/dist/{web-DsdyXC8n.js → web-C6njYH1C.js} +1 -1
- package/dist/{web-C9bVm6Nw.cjs → web-CVdyxtLD.cjs} +1 -1
- package/package.json +1 -1
- package/src/components/Feed/Carousel.vue +3 -0
- package/src/components/Feed/Feed.vue +3 -0
- package/src/components/FieldTags/BlockTags.vue +28 -16
- package/src/components/FieldTags/FieldTags.vue +327 -508
- package/src/components/Marquee/Marquee.vue +25 -14
- package/src/components/Tab/Tab.vue +2 -0
- package/src/components/UploadImage/UploadImage.vue +192 -18
- package/src/modules/community/components/blocks/CardBlogpost.vue +2 -7
- package/src/modules/community/components/blocks/FooterBlogpost.vue +2 -13
- package/src/modules/community/components/pages/CreateBlogPost.vue +0 -1
- package/src/modules/globals/TASK.MD +105 -1
- package/src/modules/globals/views/plugins/alert.plugin.js +1 -0
- package/src/modules/products/components/blocks/CardCategory.vue +6 -0
- package/src/modules/products/components/pages/Categories.vue +4 -1
- package/src/modules/products/components/pages/CategoryEdit.vue +53 -39
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/dist/_virtual/index3.cjs +0 -5
- package/dist/_virtual/index3.cjs.map +0 -1
- package/dist/_virtual/index3.js +0 -5
- package/dist/_virtual/index3.js.map +0 -1
- package/dist/main-7IA3UHca.cjs +0 -11
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +0 -480
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +0 -480
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js.map +0 -1
- package/dist/martyrs/src/components/FieldTags/create-tags.cjs +0 -52
- package/dist/martyrs/src/components/FieldTags/create-tags.cjs.map +0 -1
- package/dist/martyrs/src/components/FieldTags/create-tags.js +0 -52
- package/dist/martyrs/src/components/FieldTags/create-tags.js.map +0 -1
- package/dist/martyrs/src/components/FieldTags/tag-input.vue2.cjs +0 -32
- package/dist/martyrs/src/components/FieldTags/tag-input.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/FieldTags/tag-input.vue2.js +0 -32
- package/dist/martyrs/src/components/FieldTags/tag-input.vue2.js.map +0 -1
- package/dist/martyrs/src/components/FieldTags/vue-tags-input.props.cjs +0 -329
- package/dist/martyrs/src/components/FieldTags/vue-tags-input.props.cjs.map +0 -1
- package/dist/martyrs/src/components/FieldTags/vue-tags-input.props.js +0 -329
- package/dist/martyrs/src/components/FieldTags/vue-tags-input.props.js.map +0 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.cjs +0 -100
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +0 -100
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js.map +0 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +0 -1
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.cjs +0 -39
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.cjs.map +0 -1
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +0 -39
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +0 -1
- package/src/components/FieldTags/FieldTagsNew.vue +0 -366
- package/src/components/FieldTags/README.md +0 -513
- package/src/components/FieldTags/create-tags.js +0 -97
- package/src/components/FieldTags/tag-input.vue +0 -55
- package/src/components/FieldTags/vue-tags-input.props.js +0 -342
- package/src/components/FieldTags/vue-tags-input.scss +0 -149
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
const propValidatorTag = (value) => {
|
|
2
|
-
return !value.some((t) => {
|
|
3
|
-
const invalidText = !t.text;
|
|
4
|
-
if (invalidText) console.warn('Missing property "text"', t);
|
|
5
|
-
let invalidClasses = false;
|
|
6
|
-
if (t.classes) invalidClasses = typeof t.classes !== "string";
|
|
7
|
-
if (invalidClasses) console.warn('Property "classes" must be type of string', t);
|
|
8
|
-
return invalidText || invalidClasses;
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
const propValidatorStringNumeric = (value) => {
|
|
12
|
-
return !value.some((v) => {
|
|
13
|
-
if (typeof v === "number") {
|
|
14
|
-
const numeric = isFinite(v) && Math.floor(v) === v;
|
|
15
|
-
if (!numeric) console.warn("Only numerics are allowed for this prop. Found:", v);
|
|
16
|
-
return !numeric;
|
|
17
|
-
} else if (typeof v === "string") {
|
|
18
|
-
const string = /\W|[a-z]|!\d/i.test(v);
|
|
19
|
-
if (!string) console.warn("Only alpha strings are allowed for this prop. Found:", v);
|
|
20
|
-
return !string;
|
|
21
|
-
} else {
|
|
22
|
-
console.warn("Only numeric and string values are allowed. Found:", v);
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
const props = {
|
|
28
|
-
/**
|
|
29
|
-
* @description Property to bind a model to the input.
|
|
30
|
-
If the user changes the input value, the model updates, too.
|
|
31
|
-
If the user presses enter with an valid input,
|
|
32
|
-
a new tag is created with the value of this model.
|
|
33
|
-
After creating the new tag, the model is cleared.
|
|
34
|
-
* @property {props}
|
|
35
|
-
* @required
|
|
36
|
-
* @type {String}
|
|
37
|
-
* @model
|
|
38
|
-
* @default ''
|
|
39
|
-
*/
|
|
40
|
-
modelValue: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: "",
|
|
43
|
-
required: true
|
|
44
|
-
},
|
|
45
|
-
/**
|
|
46
|
-
* @description Pass an array containing objects like in the example below.
|
|
47
|
-
The properties 'style' and 'class' are optional. Of course it is possible to add custom
|
|
48
|
-
properties to a tag object. vue-tags-input won't change the key and value.
|
|
49
|
-
* @property {props}
|
|
50
|
-
* @type {Array}
|
|
51
|
-
* @sync
|
|
52
|
-
* @default []
|
|
53
|
-
* @example
|
|
54
|
-
{
|
|
55
|
-
 text: 'My tag value', /* The visible text on display */
|
|
56
|
-
 style: 'background-color: #ccc', /* Adding inline styles is possible */
|
|
57
|
-
 classes: 'custom-class another', /* The value will be added as css classes */
|
|
58
|
-
}
|
|
59
|
-
*/
|
|
60
|
-
tags: {
|
|
61
|
-
type: Array,
|
|
62
|
-
default: () => [],
|
|
63
|
-
validator: propValidatorTag
|
|
64
|
-
},
|
|
65
|
-
/**
|
|
66
|
-
* @description Expects an array containing objects inside. The objects
|
|
67
|
-
can have the same properties as a tag object.
|
|
68
|
-
* @property {props}
|
|
69
|
-
* @type {Array}
|
|
70
|
-
* @default []
|
|
71
|
-
*/
|
|
72
|
-
autocompleteItems: {
|
|
73
|
-
type: Array,
|
|
74
|
-
default: () => [],
|
|
75
|
-
validator: propValidatorTag
|
|
76
|
-
},
|
|
77
|
-
/**
|
|
78
|
-
* @description Defines whether a tag is editable after creation or not.
|
|
79
|
-
* @property {props}
|
|
80
|
-
* @type {Boolean}
|
|
81
|
-
* @default false
|
|
82
|
-
*/
|
|
83
|
-
allowEditTags: {
|
|
84
|
-
type: Boolean,
|
|
85
|
-
default: false
|
|
86
|
-
},
|
|
87
|
-
/**
|
|
88
|
-
* @description Defines if duplicate autocomplete items are filtered out from the view or not.
|
|
89
|
-
* @property {props}
|
|
90
|
-
* @type {Boolean}
|
|
91
|
-
* @default true
|
|
92
|
-
*/
|
|
93
|
-
autocompleteFilterDuplicates: {
|
|
94
|
-
default: true,
|
|
95
|
-
type: Boolean
|
|
96
|
-
},
|
|
97
|
-
/**
|
|
98
|
-
* @description If it's true, the user can add tags only via the autocomplete layer.
|
|
99
|
-
* @property {props}
|
|
100
|
-
* @type {Boolean}
|
|
101
|
-
* @default false
|
|
102
|
-
*/
|
|
103
|
-
addOnlyFromAutocomplete: {
|
|
104
|
-
type: Boolean,
|
|
105
|
-
default: false
|
|
106
|
-
},
|
|
107
|
-
/**
|
|
108
|
-
* @description The minimum character length which is required
|
|
109
|
-
until the autocomplete layer is shown. If set to 0,
|
|
110
|
-
then it'll be shown on focus.
|
|
111
|
-
* @property {props}
|
|
112
|
-
* @type {Number}
|
|
113
|
-
* @default 1
|
|
114
|
-
*/
|
|
115
|
-
autocompleteMinLength: {
|
|
116
|
-
type: Number,
|
|
117
|
-
default: 1
|
|
118
|
-
},
|
|
119
|
-
/**
|
|
120
|
-
* @description If it's true, the autocomplete layer is always shown, regardless if
|
|
121
|
-
an input or an autocomplete items exists.
|
|
122
|
-
* @property {props}
|
|
123
|
-
* @type {Boolean}
|
|
124
|
-
* @default false
|
|
125
|
-
*/
|
|
126
|
-
autocompleteAlwaysOpen: {
|
|
127
|
-
type: Boolean,
|
|
128
|
-
default: false
|
|
129
|
-
},
|
|
130
|
-
/**
|
|
131
|
-
* @description Property to disable vue-tags-input.
|
|
132
|
-
* @property {props}
|
|
133
|
-
* @type {Boolean}
|
|
134
|
-
* @default false
|
|
135
|
-
*/
|
|
136
|
-
disabled: {
|
|
137
|
-
type: Boolean,
|
|
138
|
-
default: false
|
|
139
|
-
},
|
|
140
|
-
/**
|
|
141
|
-
* @description The placeholder text which is shown in the input, when it's empty.
|
|
142
|
-
* @property {props}
|
|
143
|
-
* @type {String}
|
|
144
|
-
* @default Add Tag
|
|
145
|
-
*/
|
|
146
|
-
placeholder: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: "Add Tag"
|
|
149
|
-
},
|
|
150
|
-
/**
|
|
151
|
-
* @description Custom trigger key codes can be registrated. If the user presses one of these,
|
|
152
|
-
a tag will be generated out of the input value. Can be either a numeric keyCode or the key
|
|
153
|
-
as a string.
|
|
154
|
-
* @property {props}
|
|
155
|
-
* @type {Array}
|
|
156
|
-
* @default [13]
|
|
157
|
-
* @example add-on-key="[13, ':', ';']"
|
|
158
|
-
*/
|
|
159
|
-
addOnKey: {
|
|
160
|
-
type: Array,
|
|
161
|
-
default: () => [13],
|
|
162
|
-
validator: propValidatorStringNumeric
|
|
163
|
-
},
|
|
164
|
-
/**
|
|
165
|
-
* @description Custom trigger key codes can be registrated. If the user edits a tag
|
|
166
|
-
and presses one of these, the edited tag will be saved.
|
|
167
|
-
Can be either a numeric keyCode or the key as a string.
|
|
168
|
-
* @property {props}
|
|
169
|
-
* @type {Array}
|
|
170
|
-
* @default [13]
|
|
171
|
-
* @example save-on-key="[13, ':', ';']"
|
|
172
|
-
*/
|
|
173
|
-
saveOnKey: {
|
|
174
|
-
type: Array,
|
|
175
|
-
default: () => [13],
|
|
176
|
-
validator: propValidatorStringNumeric
|
|
177
|
-
},
|
|
178
|
-
/**
|
|
179
|
-
* @description The maximum amount the tags array is allowed to hold.
|
|
180
|
-
* @property {props}
|
|
181
|
-
* @type {Number}
|
|
182
|
-
*/
|
|
183
|
-
maxTags: {
|
|
184
|
-
type: Number
|
|
185
|
-
},
|
|
186
|
-
/**
|
|
187
|
-
* @description The maximum amount of characters the input is allowed to hold.
|
|
188
|
-
* @property {props}
|
|
189
|
-
* @type {Number}
|
|
190
|
-
*/
|
|
191
|
-
maxlength: {
|
|
192
|
-
type: Number
|
|
193
|
-
},
|
|
194
|
-
/**
|
|
195
|
-
* @description Pass an array containing objects like in the example below.
|
|
196
|
-
The property 'classes' will be added as css classes, if the property 'rule' matches the text
|
|
197
|
-
of a tag, an autocomplete item or the input. The property 'rule' can be type of
|
|
198
|
-
RegExp or function. If the property 'disableAdd' is 'true', the item can't be added
|
|
199
|
-
to the tags array, if the appropriated rule matches.
|
|
200
|
-
* @property {props}
|
|
201
|
-
* @type {Array}
|
|
202
|
-
* @default []
|
|
203
|
-
* @example
|
|
204
|
-
{
|
|
205
|
-
 classes: 'class', /* css class */
|
|
206
|
-
 rule: /^([^0-9]*)$/, /* RegExp */
|
|
207
|
-
}, {
|
|
208
|
-
 classes: 'no-braces', /* css class */
|
|
209
|
-
 rule(text) { /* function with text as param */
|
|
210
|
-
  return text.indexOf('{') !== -1 || text.indexOf('}') !== -1;
|
|
211
|
-
 },
|
|
212
|
-
 disableAdd: true, /* if the rule matches, the item cannot be added */,
|
|
213
|
-
},
|
|
214
|
-
*/
|
|
215
|
-
validation: {
|
|
216
|
-
type: Array,
|
|
217
|
-
default: () => [],
|
|
218
|
-
validator(value) {
|
|
219
|
-
return !value.some((v) => {
|
|
220
|
-
const missingRule = !v.rule;
|
|
221
|
-
if (missingRule) console.warn('Property "rule" is missing', v);
|
|
222
|
-
const validRule = v.rule && (typeof v.rule === "string" || v.rule instanceof RegExp || {}.toString.call(v.rule) === "[object Function]");
|
|
223
|
-
if (!validRule) {
|
|
224
|
-
console.warn("A rule must be type of string, RegExp or function. Found:", JSON.stringify(v.rule));
|
|
225
|
-
}
|
|
226
|
-
const missingClasses = !v.classes;
|
|
227
|
-
if (missingClasses) console.warn('Property "classes" is missing', v);
|
|
228
|
-
const invalidType = v.type && typeof v.type !== "string";
|
|
229
|
-
if (invalidType) console.warn('Property "type" must be type of string. Found:', v);
|
|
230
|
-
return !validRule || missingRule || missingClasses || invalidType;
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
/**
|
|
235
|
-
* @description Defines the characters which splits a text into different pieces,
|
|
236
|
-
to generate tags out of this pieces.
|
|
237
|
-
* @property {props}
|
|
238
|
-
* @type {Array}
|
|
239
|
-
* @default [';']
|
|
240
|
-
* @example
|
|
241
|
-
separators: [';', ',']
|
|
242
|
-
input: some; user input, has random; commas, an,d semicolons
|
|
243
|
-
will split into: some - user input - has random - commas - an - d semicolons
|
|
244
|
-
*/
|
|
245
|
-
separators: {
|
|
246
|
-
type: Array,
|
|
247
|
-
default: () => [";"],
|
|
248
|
-
validator(value) {
|
|
249
|
-
return !value.some((s) => {
|
|
250
|
-
const invalidType = typeof s !== "string";
|
|
251
|
-
if (invalidType) console.warn("Separators must be type of string. Found:", s);
|
|
252
|
-
return invalidType;
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
/**
|
|
257
|
-
* @description If it's true, the user can't add or save a tag,
|
|
258
|
-
if another exists, with the same text value.
|
|
259
|
-
* @property {props}
|
|
260
|
-
* @type {Boolean}
|
|
261
|
-
* @default true
|
|
262
|
-
*/
|
|
263
|
-
avoidAddingDuplicates: {
|
|
264
|
-
type: Boolean,
|
|
265
|
-
default: true
|
|
266
|
-
},
|
|
267
|
-
/**
|
|
268
|
-
* @description If the input holds a value and loses the focus,
|
|
269
|
-
a tag will be generated out of this value, if possible.
|
|
270
|
-
* @property {props}
|
|
271
|
-
* @type {Boolean}
|
|
272
|
-
* @default true
|
|
273
|
-
*/
|
|
274
|
-
addOnBlur: {
|
|
275
|
-
type: Boolean,
|
|
276
|
-
default: true
|
|
277
|
-
},
|
|
278
|
-
/**
|
|
279
|
-
* @description Custom function to detect duplicates. If the function returns 'true',
|
|
280
|
-
the tag will be marked as duplicate.
|
|
281
|
-
* @property {props}
|
|
282
|
-
* @type {Function}
|
|
283
|
-
* @param {Array} tagsarray The Array of tags minus the one which is edited/created.
|
|
284
|
-
* @param {Object} tag The tag which is edited or should be added to the tags array.
|
|
285
|
-
* @example
|
|
286
|
-
// The duplicate function to recreate the default behaviour, would look like this:
|
|
287
|
-
isDuplicate(tags, tag) {
|
|
288
|
-
 return tags.map(t => t.text).indexOf(tag.text) !== -1;
|
|
289
|
-
}
|
|
290
|
-
*/
|
|
291
|
-
isDuplicate: {
|
|
292
|
-
type: Function,
|
|
293
|
-
default: null
|
|
294
|
-
},
|
|
295
|
-
/**
|
|
296
|
-
* @description If it's true, the user can paste into the input element and
|
|
297
|
-
vue-tags-input will create tags out of the incoming text.
|
|
298
|
-
* @property {props}
|
|
299
|
-
* @type {Boolean}
|
|
300
|
-
* @default true
|
|
301
|
-
*/
|
|
302
|
-
addFromPaste: {
|
|
303
|
-
type: Boolean,
|
|
304
|
-
default: true
|
|
305
|
-
},
|
|
306
|
-
/**
|
|
307
|
-
* @description Defines if it's possible to delete tags by pressing backspace.
|
|
308
|
-
If so and the user wants to delete a tag,
|
|
309
|
-
the tag gets the css class 'deletion-mark' for 1 second.
|
|
310
|
-
If the user presses backspace again in that time period,
|
|
311
|
-
the tag is removed from the tags array and the view.
|
|
312
|
-
* @property {props}
|
|
313
|
-
* @type {Boolean}
|
|
314
|
-
* @default true
|
|
315
|
-
*/
|
|
316
|
-
deleteOnBackspace: {
|
|
317
|
-
default: true,
|
|
318
|
-
type: Boolean
|
|
319
|
-
},
|
|
320
|
-
// event handlers
|
|
321
|
-
onBeforeAddingTag: Function,
|
|
322
|
-
onBeforeDeletingTag: Function,
|
|
323
|
-
onBeforeEditingTag: Function,
|
|
324
|
-
onBeforeSavingTag: Function
|
|
325
|
-
};
|
|
326
|
-
export {
|
|
327
|
-
props as default
|
|
328
|
-
};
|
|
329
|
-
//# sourceMappingURL=vue-tags-input.props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vue-tags-input.props.js","sources":["../../../../../src/components/FieldTags/vue-tags-input.props.js"],"sourcesContent":["// The file contains all props and validators which are provided by the component\n\nconst propValidatorTag = value => {\n return !value.some(t => {\n const invalidText = !t.text;\n if (invalidText) console.warn('Missing property \"text\"', t);\n\n let invalidClasses = false;\n if (t.classes) invalidClasses = typeof t.classes !== 'string';\n if (invalidClasses) console.warn('Property \"classes\" must be type of string', t);\n\n return invalidText || invalidClasses;\n });\n};\n\nconst propValidatorStringNumeric = value => {\n return !value.some(v => {\n if (typeof v === 'number') {\n const numeric = isFinite(v) && Math.floor(v) === v;\n if (!numeric) console.warn('Only numerics are allowed for this prop. Found:', v);\n return !numeric;\n } else if (typeof v === 'string') {\n /*\n * Regex: || Not totally fool-proof yet, still matches \"0a\" and such\n * - allow non-word characters (aka symbols e.g. ;, :, ' etc)\n * - allow alpha characters\n * - deny numbers\n */\n const string = /\\W|[a-z]|!\\d/i.test(v);\n if (!string) console.warn('Only alpha strings are allowed for this prop. Found:', v);\n return !string;\n } else {\n console.warn('Only numeric and string values are allowed. Found:', v);\n return false;\n }\n });\n};\n\nexport default {\n /**\n * @description Property to bind a model to the input.\n If the user changes the input value, the model updates, too.\n If the user presses enter with an valid input,\n a new tag is created with the value of this model.\n After creating the new tag, the model is cleared.\n * @property {props}\n * @required\n * @type {String}\n * @model\n * @default ''\n */\n modelValue: {\n type: String,\n default: '',\n required: true,\n },\n /**\n * @description Pass an array containing objects like in the example below.\n The properties 'style' and 'class' are optional. Of course it is possible to add custom\n properties to a tag object. vue-tags-input won't change the key and value.\n * @property {props}\n * @type {Array}\n * @sync\n * @default []\n * @example\n {\n  text: 'My tag value', /* The visible text on display */\n  style: 'background-color: #ccc', /* Adding inline styles is possible */\n  classes: 'custom-class another', /* The value will be added as css classes */\n }\n */\n tags: {\n type: Array,\n default: () => [],\n validator: propValidatorTag,\n },\n /**\n * @description Expects an array containing objects inside. The objects\n can have the same properties as a tag object.\n * @property {props}\n * @type {Array}\n * @default []\n */\n autocompleteItems: {\n type: Array,\n default: () => [],\n validator: propValidatorTag,\n },\n /**\n * @description Defines whether a tag is editable after creation or not.\n * @property {props}\n * @type {Boolean}\n * @default false\n */\n allowEditTags: {\n type: Boolean,\n default: false,\n },\n /**\n * @description Defines if duplicate autocomplete items are filtered out from the view or not.\n * @property {props}\n * @type {Boolean}\n * @default true\n */\n autocompleteFilterDuplicates: {\n default: true,\n type: Boolean,\n },\n /**\n * @description If it's true, the user can add tags only via the autocomplete layer.\n * @property {props}\n * @type {Boolean}\n * @default false\n */\n addOnlyFromAutocomplete: {\n type: Boolean,\n default: false,\n },\n /**\n * @description The minimum character length which is required\n until the autocomplete layer is shown. If set to 0,\n then it'll be shown on focus.\n * @property {props}\n * @type {Number}\n * @default 1\n */\n autocompleteMinLength: {\n type: Number,\n default: 1,\n },\n /**\n * @description If it's true, the autocomplete layer is always shown, regardless if\n an input or an autocomplete items exists.\n * @property {props}\n * @type {Boolean}\n * @default false\n */\n autocompleteAlwaysOpen: {\n type: Boolean,\n default: false,\n },\n /**\n * @description Property to disable vue-tags-input.\n * @property {props}\n * @type {Boolean}\n * @default false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * @description The placeholder text which is shown in the input, when it's empty.\n * @property {props}\n * @type {String}\n * @default Add Tag\n */\n placeholder: {\n type: String,\n default: 'Add Tag',\n },\n /**\n * @description Custom trigger key codes can be registrated. If the user presses one of these,\n a tag will be generated out of the input value. Can be either a numeric keyCode or the key\n as a string.\n * @property {props}\n * @type {Array}\n * @default [13]\n * @example add-on-key=\"[13, ':', ';']\"\n */\n addOnKey: {\n type: Array,\n default: () => [13],\n validator: propValidatorStringNumeric,\n },\n /**\n * @description Custom trigger key codes can be registrated. If the user edits a tag\n and presses one of these, the edited tag will be saved.\n Can be either a numeric keyCode or the key as a string.\n * @property {props}\n * @type {Array}\n * @default [13]\n * @example save-on-key=\"[13, ':', ';']\"\n */\n saveOnKey: {\n type: Array,\n default: () => [13],\n validator: propValidatorStringNumeric,\n },\n /**\n * @description The maximum amount the tags array is allowed to hold.\n * @property {props}\n * @type {Number}\n */\n maxTags: {\n type: Number,\n },\n /**\n * @description The maximum amount of characters the input is allowed to hold.\n * @property {props}\n * @type {Number}\n */\n maxlength: {\n type: Number,\n },\n /**\n * @description Pass an array containing objects like in the example below.\n The property 'classes' will be added as css classes, if the property 'rule' matches the text\n of a tag, an autocomplete item or the input. The property 'rule' can be type of\n RegExp or function. If the property 'disableAdd' is 'true', the item can't be added\n to the tags array, if the appropriated rule matches.\n * @property {props}\n * @type {Array}\n * @default []\n * @example\n {\n  classes: 'class', /* css class */\n  rule: /^([^0-9]*)$/, /* RegExp */\n }, {\n  classes: 'no-braces', /* css class */\n  rule(text) { /* function with text as param */\n   return text.indexOf('{') !== -1 || text.indexOf('}') !== -1;\n  },\n  disableAdd: true, /* if the rule matches, the item cannot be added */,\n },\n */\n validation: {\n type: Array,\n default: () => [],\n validator(value) {\n return !value.some(v => {\n const missingRule = !v.rule;\n if (missingRule) console.warn('Property \"rule\" is missing', v);\n\n const validRule = v.rule && (typeof v.rule === 'string' || v.rule instanceof RegExp || {}.toString.call(v.rule) === '[object Function]');\n\n if (!validRule) {\n console.warn('A rule must be type of string, RegExp or function. Found:', JSON.stringify(v.rule));\n }\n\n const missingClasses = !v.classes;\n if (missingClasses) console.warn('Property \"classes\" is missing', v);\n\n const invalidType = v.type && typeof v.type !== 'string';\n if (invalidType) console.warn('Property \"type\" must be type of string. Found:', v);\n\n return !validRule || missingRule || missingClasses || invalidType;\n });\n },\n },\n /**\n * @description Defines the characters which splits a text into different pieces,\n to generate tags out of this pieces.\n * @property {props}\n * @type {Array}\n * @default [';']\n * @example\n separators: [';', ',']\n input: some; user input, has random; commas, an,d semicolons\n will split into: some - user input - has random - commas - an - d semicolons\n */\n separators: {\n type: Array,\n default: () => [';'],\n validator(value) {\n return !value.some(s => {\n const invalidType = typeof s !== 'string';\n if (invalidType) console.warn('Separators must be type of string. Found:', s);\n return invalidType;\n });\n },\n },\n /**\n * @description If it's true, the user can't add or save a tag,\n if another exists, with the same text value.\n * @property {props}\n * @type {Boolean}\n * @default true\n */\n avoidAddingDuplicates: {\n type: Boolean,\n default: true,\n },\n /**\n * @description If the input holds a value and loses the focus,\n a tag will be generated out of this value, if possible.\n * @property {props}\n * @type {Boolean}\n * @default true\n */\n addOnBlur: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Custom function to detect duplicates. If the function returns 'true',\n the tag will be marked as duplicate.\n * @property {props}\n * @type {Function}\n * @param {Array} tagsarray The Array of tags minus the one which is edited/created.\n * @param {Object} tag The tag which is edited or should be added to the tags array.\n * @example\n // The duplicate function to recreate the default behaviour, would look like this:\n isDuplicate(tags, tag) {\n  return tags.map(t => t.text).indexOf(tag.text) !== -1;\n }\n */\n isDuplicate: {\n type: Function,\n default: null,\n },\n /**\n * @description If it's true, the user can paste into the input element and\n vue-tags-input will create tags out of the incoming text.\n * @property {props}\n * @type {Boolean}\n * @default true\n */\n addFromPaste: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Defines if it's possible to delete tags by pressing backspace.\n If so and the user wants to delete a tag,\n the tag gets the css class 'deletion-mark' for 1 second.\n If the user presses backspace again in that time period,\n the tag is removed from the tags array and the view.\n * @property {props}\n * @type {Boolean}\n * @default true\n */\n deleteOnBackspace: {\n default: true,\n type: Boolean,\n },\n // event handlers\n onBeforeAddingTag: Function,\n onBeforeDeletingTag: Function,\n onBeforeEditingTag: Function,\n onBeforeSavingTag: Function,\n};\n"],"names":[],"mappings":"AAEA,MAAM,mBAAmB,WAAS;AAChC,SAAO,C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AAAA,IACN,SAAS;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcE,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQE,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,EACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWE,mBAAmB;AAAA,IACjB,SAAS;AAAA,IACT,MAAM;AAAA,EACV;AAAA;AAAA,EAEE,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,mBAAmB;AACrB;"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const axios = require("axios");
|
|
5
|
-
const _hoisted_1 = ["src"];
|
|
6
|
-
const _hoisted_2 = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "flex-v-center flex-h-center flex w-100 h-100 bg-second"
|
|
9
|
-
};
|
|
10
|
-
const _sfc_main = {
|
|
11
|
-
__name: "UploadImage",
|
|
12
|
-
props: [
|
|
13
|
-
"uploadPath",
|
|
14
|
-
// only necessary prop
|
|
15
|
-
"photo"
|
|
16
|
-
// new prop for holding the image url
|
|
17
|
-
],
|
|
18
|
-
emits: ["update:photo", "error"],
|
|
19
|
-
setup(__props, { emit: __emit }) {
|
|
20
|
-
const imageUrl = vue.ref(null);
|
|
21
|
-
const fileInput = vue.ref(null);
|
|
22
|
-
const props = __props;
|
|
23
|
-
const emit = __emit;
|
|
24
|
-
vue.watch(props, ({ photo }) => {
|
|
25
|
-
if (photo) imageUrl.value = photo;
|
|
26
|
-
});
|
|
27
|
-
function onComponentClick() {
|
|
28
|
-
fileInput.value.click();
|
|
29
|
-
}
|
|
30
|
-
async function onFileChange(e) {
|
|
31
|
-
let file = e.target.files[0];
|
|
32
|
-
if (!file) {
|
|
33
|
-
console.error("No file selected");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
let formData = new FormData();
|
|
37
|
-
formData.append("file", file);
|
|
38
|
-
console.log("Sending file:", file.name);
|
|
39
|
-
try {
|
|
40
|
-
const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
|
|
41
|
-
let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);
|
|
42
|
-
console.log("Upload response:", response);
|
|
43
|
-
imageUrl.value = response.data[0].filepath;
|
|
44
|
-
emit("update:photo", imageUrl.value);
|
|
45
|
-
} catch (error) {
|
|
46
|
-
emit("error", error);
|
|
47
|
-
console.error("Upload error:", error);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function onDrop(e) {
|
|
51
|
-
e.preventDefault();
|
|
52
|
-
onFileChange({
|
|
53
|
-
target: {
|
|
54
|
-
files: e.dataTransfer.files
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return (_ctx, _cache) => {
|
|
59
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
60
|
-
onClick: onComponentClick,
|
|
61
|
-
onDrop,
|
|
62
|
-
onDragover: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
63
|
-
}, ["prevent"])),
|
|
64
|
-
class: "image-upload-area flex-v-center flex-h-center flex"
|
|
65
|
-
}, [
|
|
66
|
-
imageUrl.value || __props.photo ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
67
|
-
key: 0,
|
|
68
|
-
loading: "lazy",
|
|
69
|
-
src: (_ctx.FILE_SERVER_URL || "") + (imageUrl.value || __props.photo),
|
|
70
|
-
alt: "Uploaded image",
|
|
71
|
-
class: "w-100 h-100 object-fit-cover"
|
|
72
|
-
}, null, 8, _hoisted_1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, _cache[1] || (_cache[1] = [
|
|
73
|
-
vue.createElementVNode("svg", {
|
|
74
|
-
class: "i-medium",
|
|
75
|
-
width: "104",
|
|
76
|
-
height: "104",
|
|
77
|
-
viewBox: "0 0 104 104",
|
|
78
|
-
fill: "none",
|
|
79
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
80
|
-
}, [
|
|
81
|
-
vue.createElementVNode("path", {
|
|
82
|
-
fill: "rgb(var(--white))",
|
|
83
|
-
d: "M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"
|
|
84
|
-
})
|
|
85
|
-
], -1)
|
|
86
|
-
]))),
|
|
87
|
-
vue.createElementVNode("input", {
|
|
88
|
-
type: "file",
|
|
89
|
-
name: "file",
|
|
90
|
-
ref_key: "fileInput",
|
|
91
|
-
ref: fileInput,
|
|
92
|
-
onChange: onFileChange,
|
|
93
|
-
style: { "display": "none" }
|
|
94
|
-
}, null, 544)
|
|
95
|
-
], 32);
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
exports.default = _sfc_main;
|
|
100
|
-
//# sourceMappingURL=UploadImage.vue.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UploadImage.vue.cjs","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"image-upload-area flex-v-center flex-h-center flex\">\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo\" \n :src=\"(FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center flex-h-center flex w-100 h-100 bg-second\" >\n <svg class=\"i-medium\" width=\"104\" height=\"104\" viewBox=\"0 0 104 104\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"rgb(var(--white))\" d=\"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z\"/>\n </svg>\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch } from 'vue';\nimport axios from 'axios';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\n\nconst props = defineProps([\n 'uploadPath', // only necessary prop\n 'photo' // new prop for holding the image url\n]);\n\nconst emit = defineEmits(['update:photo', 'error']);\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n emit('update:photo', imageUrl.value);\n } catch (error) {\n emit('error', error);\n console.error(\"Upload error:\", error); // Логируем ошибку\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n</script>\n"],"names":["ref","watch"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BA,UAAM,WAAWA,IAAAA,IAAI,IAAI;AACzB,UAAM,YAAYA,IAAAA,IAAI,IAAI;AAE1B,UAAM,QAAQ;AAKd,UAAM,OAAO;AAEbC,QAAAA,MAAM,OAAO,CAAC,EAAC,MAAK,MAAM;AACxB,UAAG,MAAO,UAAS,QAAQ;AAAA,IAC7B,CAAC;AAED,aAAS,mBAAmB;AAC1B,gBAAU,MAAM,MAAK;AAAA,IACvB;AAEA,mBAAe,aAAa,GAAG;AAC7B,UAAI,OAAO,EAAE,OAAO,MAAM,CAAC;AAC3B,UAAI,CAAC,MAAM;AACT,gBAAQ,MAAM,kBAAkB;AAChC;AAAA,MACF;AAEA,UAAI,WAAW,IAAI,SAAQ;AAC3B,eAAS,OAAO,QAAQ,IAAI;AAE5B,cAAQ,IAAI,iBAAiB,KAAK,IAAI;AAEtC,UAAI;AACF,cAAM,SAAS,MAAM,OAAO,EAAE,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAE;AAEnF,YAAI,WAAW,MAAM,OAAO,KAAK,mCAAmC,mBAAmB,MAAM,UAAU,CAAC,IAAI,QAAQ;AACpH,gBAAQ,IAAI,oBAAoB,QAAQ;AACxC,iBAAS,QAAQ,SAAS,KAAK,CAAC,EAAE;AAClC,aAAK,gBAAgB,SAAS,KAAK;AAAA,MACrC,SAAS,OAAO;AACd,aAAK,SAAS,KAAK;AACnB,gBAAQ,MAAM,iBAAiB,KAAK;AAAA,MACtC;AAAA,IACF;AAGA,aAAS,OAAO,GAAG;AACjB,QAAE,eAAc;AAChB,mBAAa;AAAA,QACX,QAAQ;AAAA,UACN,OAAO,EAAE,aAAa;AAAA,QAC5B;AAAA,MACA,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { ref, watch, createElementBlock, openBlock, withModifiers, createElementVNode } from "vue";
|
|
2
|
-
import axios from "axios";
|
|
3
|
-
const _hoisted_1 = ["src"];
|
|
4
|
-
const _hoisted_2 = {
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "flex-v-center flex-h-center flex w-100 h-100 bg-second"
|
|
7
|
-
};
|
|
8
|
-
const _sfc_main = {
|
|
9
|
-
__name: "UploadImage",
|
|
10
|
-
props: [
|
|
11
|
-
"uploadPath",
|
|
12
|
-
// only necessary prop
|
|
13
|
-
"photo"
|
|
14
|
-
// new prop for holding the image url
|
|
15
|
-
],
|
|
16
|
-
emits: ["update:photo", "error"],
|
|
17
|
-
setup(__props, { emit: __emit }) {
|
|
18
|
-
const imageUrl = ref(null);
|
|
19
|
-
const fileInput = ref(null);
|
|
20
|
-
const props = __props;
|
|
21
|
-
const emit = __emit;
|
|
22
|
-
watch(props, ({ photo }) => {
|
|
23
|
-
if (photo) imageUrl.value = photo;
|
|
24
|
-
});
|
|
25
|
-
function onComponentClick() {
|
|
26
|
-
fileInput.value.click();
|
|
27
|
-
}
|
|
28
|
-
async function onFileChange(e) {
|
|
29
|
-
let file = e.target.files[0];
|
|
30
|
-
if (!file) {
|
|
31
|
-
console.error("No file selected");
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
let formData = new FormData();
|
|
35
|
-
formData.append("file", file);
|
|
36
|
-
console.log("Sending file:", file.name);
|
|
37
|
-
try {
|
|
38
|
-
const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
|
|
39
|
-
let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);
|
|
40
|
-
console.log("Upload response:", response);
|
|
41
|
-
imageUrl.value = response.data[0].filepath;
|
|
42
|
-
emit("update:photo", imageUrl.value);
|
|
43
|
-
} catch (error) {
|
|
44
|
-
emit("error", error);
|
|
45
|
-
console.error("Upload error:", error);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function onDrop(e) {
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
onFileChange({
|
|
51
|
-
target: {
|
|
52
|
-
files: e.dataTransfer.files
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return (_ctx, _cache) => {
|
|
57
|
-
return openBlock(), createElementBlock("div", {
|
|
58
|
-
onClick: onComponentClick,
|
|
59
|
-
onDrop,
|
|
60
|
-
onDragover: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
61
|
-
}, ["prevent"])),
|
|
62
|
-
class: "image-upload-area flex-v-center flex-h-center flex"
|
|
63
|
-
}, [
|
|
64
|
-
imageUrl.value || __props.photo ? (openBlock(), createElementBlock("img", {
|
|
65
|
-
key: 0,
|
|
66
|
-
loading: "lazy",
|
|
67
|
-
src: (_ctx.FILE_SERVER_URL || "") + (imageUrl.value || __props.photo),
|
|
68
|
-
alt: "Uploaded image",
|
|
69
|
-
class: "w-100 h-100 object-fit-cover"
|
|
70
|
-
}, null, 8, _hoisted_1)) : (openBlock(), createElementBlock("div", _hoisted_2, _cache[1] || (_cache[1] = [
|
|
71
|
-
createElementVNode("svg", {
|
|
72
|
-
class: "i-medium",
|
|
73
|
-
width: "104",
|
|
74
|
-
height: "104",
|
|
75
|
-
viewBox: "0 0 104 104",
|
|
76
|
-
fill: "none",
|
|
77
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
78
|
-
}, [
|
|
79
|
-
createElementVNode("path", {
|
|
80
|
-
fill: "rgb(var(--white))",
|
|
81
|
-
d: "M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"
|
|
82
|
-
})
|
|
83
|
-
], -1)
|
|
84
|
-
]))),
|
|
85
|
-
createElementVNode("input", {
|
|
86
|
-
type: "file",
|
|
87
|
-
name: "file",
|
|
88
|
-
ref_key: "fileInput",
|
|
89
|
-
ref: fileInput,
|
|
90
|
-
onChange: onFileChange,
|
|
91
|
-
style: { "display": "none" }
|
|
92
|
-
}, null, 544)
|
|
93
|
-
], 32);
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
export {
|
|
98
|
-
_sfc_main as default
|
|
99
|
-
};
|
|
100
|
-
//# sourceMappingURL=UploadImage.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UploadImage.vue.js","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"image-upload-area flex-v-center flex-h-center flex\">\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo\" \n :src=\"(FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center flex-h-center flex w-100 h-100 bg-second\" >\n <svg class=\"i-medium\" width=\"104\" height=\"104\" viewBox=\"0 0 104 104\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"rgb(var(--white))\" d=\"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z\"/>\n </svg>\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch } from 'vue';\nimport axios from 'axios';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\n\nconst props = defineProps([\n 'uploadPath', // only necessary prop\n 'photo' // new prop for holding the image url\n]);\n\nconst emit = defineEmits(['update:photo', 'error']);\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n emit('update:photo', imageUrl.value);\n } catch (error) {\n emit('error', error);\n console.error(\"Upload error:\", error); // Логируем ошибку\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA2BA,UAAM,WAAW,IAAI,IAAI;AACzB,UAAM,YAAY,IAAI,IAAI;AAE1B,UAAM,QAAQ;AAKd,UAAM,OAAO;AAEb,UAAM,OAAO,CAAC,EAAC,MAAK,MAAM;AACxB,UAAG,MAAO,UAAS,QAAQ;AAAA,IAC7B,CAAC;AAED,aAAS,mBAAmB;AAC1B,gBAAU,MAAM,MAAK;AAAA,IACvB;AAEA,mBAAe,aAAa,GAAG;AAC7B,UAAI,OAAO,EAAE,OAAO,MAAM,CAAC;AAC3B,UAAI,CAAC,MAAM;AACT,gBAAQ,MAAM,kBAAkB;AAChC;AAAA,MACF;AAEA,UAAI,WAAW,IAAI,SAAQ;AAC3B,eAAS,OAAO,QAAQ,IAAI;AAE5B,cAAQ,IAAI,iBAAiB,KAAK,IAAI;AAEtC,UAAI;AACF,cAAM,SAAS,MAAM,OAAO,EAAE,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAE;AAEnF,YAAI,WAAW,MAAM,OAAO,KAAK,mCAAmC,mBAAmB,MAAM,UAAU,CAAC,IAAI,QAAQ;AACpH,gBAAQ,IAAI,oBAAoB,QAAQ;AACxC,iBAAS,QAAQ,SAAS,KAAK,CAAC,EAAE;AAClC,aAAK,gBAAgB,SAAS,KAAK;AAAA,MACrC,SAAS,OAAO;AACd,aAAK,SAAS,KAAK;AACnB,gBAAQ,MAAM,iBAAiB,KAAK;AAAA,MACtC;AAAA,IACF;AAGA,aAAS,OAAO,GAAG;AACjB,QAAE,eAAc;AAChB,mBAAa;AAAA,QACX,QAAQ;AAAA,UACN,OAAO,EAAE,aAAa;AAAA,QAC5B;AAAA,MACA,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Filters.vue2.cjs","sources":["../../../../../../../../src/modules/globals/views/components/sections/Filters.vue"],"sourcesContent":["<template>\n <div class=\"flex t-nowrap gap-thin\">\n <!-- All Filters Button -->\n <button\n @click=\"showAllFilters = true\"\n class=\"pd-small radius-medium bg-light flex-v-center flex gap-micro cursor-pointer\"\n :class=\"{ 'bg-main': activeFiltersCount > 0 }\"\n >\n <IconFilter class=\"i-medium\" />\n <span class=\"h-1r\"></span>\n <span v-if=\"activeFiltersCount\">{{ activeFiltersCount }}</span>\n </button>\n\n <!-- Individual Filter Buttons -->\n <button\n v-for=\"filter in filters\"\n :key=\"filter.value\"\n @click=\"openFilter(filter.value)\"\n class=\"pd-small radius-medium bg-light cursor-pointer flex-v-center flex gap-micro\"\n :class=\"{ 'selected bg-main': isFilterActive(filter) }\"\n >\n <IconCalendar v-if=\"filter.type === 'date'\" class=\"mn-r-micro i-medium\" />\n <span class=\"t-nowrap\">{{ filter.type === 'date' && getFilterValue(filter) ? formatFilterValue(filter) : filter.title }}</span>\n <span v-if=\"getFilterValue(filter) && filter.type !== 'date'\" class=\"mn-l-micro\">\n {{ formatFilterValue(filter) }}\n </span>\n </button>\n\n <!-- All Filters Popup -->\n <Popup\n :isPopupOpen=\"showAllFilters\"\n @close-popup=\"showAllFilters = false\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"w-min-20r bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <div class=\"flex-v-center flex-nowrap flex mn-b-medium\">\n <h3 class=\"flex-child-full\">Filters</h3>\n </div>\n\n <div class=\"filters-content\">\n <div \n v-for=\"filter in filters\" \n :key=\"filter.value\"\n class=\"mn-b-medium\"\n >\n <h4 class=\"mn-b-small\">{{ filter.title }}</h4>\n \n <!-- Checkbox Filter -->\n <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\n\n <!-- Date Filter -->\n <div v-else-if=\"filter.type === 'date'\">\n <Calendar\n v-model:date=\"tempSelected[filter.value]\"\n :allowRange=\"true\"\n :disablePastDates=\"true\"\n class=\"bg-light radius-small\"\n />\n </div>\n </div>\n </div>\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button \n @click=\"applyAllFilters\" \n class=\"button bg-main flex-child-full\"\n >\n Apply\n </button>\n <button \n @click=\"resetFilters\" \n class=\"button bg-light\"\n >\n Reset Filters\n </button>\n </div>\n </Popup>\n\n <!-- Individual Filter Popups -->\n <Popup\n v-for=\"filter in filters\"\n :key=\"`popup-${filter.value}`\"\n :isPopupOpen=\"individualPopups[filter.value]\"\n @close-popup=\"individualPopups[filter.value] = false\"\n :align=\"isPhone() ? 'bottom center' : 'center center'\"\n class=\"bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium\"\n >\n <h4 class=\"mn-b-medium\">{{ filter.title }}</h4>\n \n <!-- Checkbox Filter -->\n <div v-if=\"filter.type === 'checkbox'\">\n <Checkbox\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\"\n v-model:radio=\"tempSelected[filter.value]\"\n mode=\"checkbox\"\n class=\"mn-b-micro\"\n />\n </div>\n\n <!-- Radio Filter -->\n <div v-else-if=\"filter.type === 'radio'\">\n <div\n v-for=\"option in filter.options\"\n :key=\"option.value\"\n @click=\"tempSelected[filter.value] = option.value\"\n class=\"pd-small radius-small cursor-pointer mn-b-micro\"\n :class=\"{ \n 'bg-main': tempSelected[filter.value] === option.value,\n 'bg-light': tempSelected[filter.value] !== option.value\n }\"\n >\n {{ option.label }}\n </div>\n </div>\n\n <!-- Range Filter -->\n <div v-else-if=\"filter.type === 'range'\" class=\"flex gap-thin\">\n <Field\n v-model:field=\"tempSelected[filter.value].min\"\n :placeholder=\"filter.minPlaceholder || 'Min'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n <Field\n v-model:field=\"tempSelected[filter.value].max\"\n :placeholder=\"filter.maxPlaceholder || 'Max'\"\n type=\"number\"\n :label=\"returnCurrency()\"\n class=\"w-50 bg-light pd-small radius-small\"\n />\n </div>\n\n <!-- Date Filter -->\n <div v-else-if=\"filter.type === 'date'\">\n <div class=\"mn-t-small\">\n <Calendar\n v-model:date=\"tempSelected[filter.value]\"\n :allowRange=\"true\"\n :disablePastDates=\"true\"\n class=\"bg-light radius-small\"\n />\n </div>\n </div>\n\n <div class=\"flex gap-thin mn-t-medium\">\n <button \n @click=\"cancelFilter(filter.value)\" \n class=\"bg-light button flex-child-full\"\n >\n Cancel\n </button>\n <button \n @click=\"applyFilter(filter.value)\" \n class=\"bg-main w-100 button flex-child-full\"\n >\n Apply\n </button>\n \n \n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, reactive, watch } from 'vue'\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js'\nimport Popup from '@martyrs/src/components/Popup/Popup.vue'\nimport Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'\nimport Field from '@martyrs/src/components/Field/Field.vue'\nimport Calendar from '@martyrs/src/components/Calendar/Calendar.vue'\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue'\nimport IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'\n\nconst filters = defineModel('filters', {\n type: Array,\n required: true\n})\n\nconst selected = defineModel('selected', {\n type: Object,\n default: () => ({})\n})\n\nconst emit = defineEmits(['select'])\n\nconst { formatDate } = useGlobalMixins()\n\n// State\nconst showAllFilters = ref(false)\nconst individualPopups = reactive({})\nconst tempSelected = reactive({})\nconst tempDateRange = ref(null)\n\n// Initialize popups and temp values\nwatch(filters, (newFilters) => {\n newFilters.forEach(filter => {\n individualPopups[filter.value] = false\n \n if (!tempSelected[filter.value]) {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = [...(selected.value[filter.value] || [])]\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = { ...(selected.value[filter.value] || { min: '', max: '' }) }\n } else if (filter.type === 'date') {\n tempSelected[filter.value] = selected.value[filter.value] || null\n } else {\n tempSelected[filter.value] = selected.value[filter.value] || null\n }\n }\n })\n}, { immediate: true, deep: true })\n\n// Sync selected to tempSelected\nwatch(selected, (newSelected) => {\n Object.keys(newSelected).forEach(key => {\n const filter = filters.value.find(f => f.value === key)\n if (filter) {\n if (filter.type === 'checkbox') {\n tempSelected[key] = [...(newSelected[key] || [])]\n } else if (filter.type === 'range') {\n tempSelected[key] = { ...(newSelected[key] || { min: '', max: '' }) }\n } else {\n tempSelected[key] = newSelected[key]\n }\n }\n })\n}, { deep: true })\n\n// Computed\nconst activeFiltersCount = computed(() => {\n return Object.entries(selected.value).filter(([key, value]) => {\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'object' && value !== null) {\n return value.min || value.max\n }\n return value !== null && value !== undefined\n }).length\n})\n\n// Methods\nconst openFilter = (filterValue) => {\n individualPopups[filterValue] = true\n}\n\nconst isFilterActive = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return false\n if (Array.isArray(value)) return value.length > 0\n if (filter.type === 'range') return value.min || value.max\n return true\n}\n\nconst getFilterValue = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return false\n \n if (filter.type === 'range') {\n return value.min || value.max\n }\n \n if (filter.type === 'date') {\n return value && value.start && value.end\n }\n \n if (Array.isArray(value)) {\n return value.length > 0\n }\n \n return value\n}\n\nconst formatFilterValue = (filter) => {\n const value = selected.value[filter.value]\n if (!value) return ''\n \n if (Array.isArray(value)) {\n return `(${value.length})`\n }\n \n if (filter.type === 'range') {\n if (!value.min && !value.max) return ''\n return `${value.min || '0'}-${value.max || '∞'}`\n }\n \n if (filter.type === 'date') {\n if (!value || !value.start || !value.end) return ''\n return `${formatDate(value.start, { dayMonth: true, language: 'en' })} - ${formatDate(value.end, { dayMonth: true, language: 'en' })}`\n }\n \n if (filter.type === 'radio') {\n const option = filter.options.find(o => o.value === value)\n return option ? `(${option.label})` : ''\n }\n \n return ''\n}\n\nconst applyFilter = (filterValue) => {\n selected.value[filterValue] = tempSelected[filterValue]\n individualPopups[filterValue] = false\n emit('select', { filter: filterValue, value: tempSelected[filterValue] })\n}\n\nconst cancelFilter = (filterValue) => {\n const filter = filters.value.find(f => f.value === filterValue)\n if (filter) {\n if (filter.type === 'checkbox') {\n tempSelected[filterValue] = [...(selected.value[filterValue] || [])]\n } else if (filter.type === 'range') {\n tempSelected[filterValue] = { ...(selected.value[filterValue] || { min: '', max: '' }) }\n } else if (filter.type === 'date') {\n tempSelected[filterValue] = selected.value[filterValue] || null\n } else {\n tempSelected[filterValue] = selected.value[filterValue] || null\n }\n }\n individualPopups[filterValue] = false\n}\n\nconst applyAllFilters = () => {\n Object.entries(tempSelected).forEach(([key, value]) => {\n if (selected.value[key] !== value) {\n selected.value[key] = value\n emit('select', { filter: key, value })\n }\n })\n showAllFilters.value = false\n}\n\nconst resetFilters = () => {\n filters.value.forEach(filter => {\n if (filter.type === 'checkbox') {\n tempSelected[filter.value] = []\n selected.value[filter.value] = []\n } else if (filter.type === 'range') {\n tempSelected[filter.value] = { min: '', max: '' }\n selected.value[filter.value] = { min: '', max: '' }\n } else if (filter.type === 'date') {\n tempSelected[filter.value] = null\n selected.value[filter.value] = null\n } else {\n tempSelected[filter.value] = null\n selected.value[filter.value] = null\n }\n emit('select', { filter: filter.value, value: null })\n })\n}\n</script>\n\n<style scoped>\n.filters-content {\n max-height: 60vh;\n overflow-y: auto;\n}\n</style>"],"names":["_useModel","useGlobalMixins","ref","reactive","watch","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+NA,UAAM,UAAUA,IAAAA,SAAW,SAAC,SAG3B;AAED,UAAM,WAAWA,IAAAA,SAAW,SAAC,UAG5B;AAED,UAAM,OAAO;AAEb,UAAM,EAAE,WAAU,IAAKC,OAAAA,gBAAe;AAGtC,UAAM,iBAAiBC,IAAAA,IAAI,KAAK;AAChC,UAAM,mBAAmBC,IAAAA,SAAS,CAAA,CAAE;AACpC,UAAM,eAAeA,IAAAA,SAAS,CAAA,CAAE;AACVD,QAAAA,IAAI,IAAI;AAG9BE,QAAAA,MAAM,SAAS,CAAC,eAAe;AAC7B,iBAAW,QAAQ,YAAU;AAC3B,yBAAiB,OAAO,KAAK,IAAI;AAEjC,YAAI,CAAC,aAAa,O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