@ozdao/martyrs 0.2.540 → 0.2.542
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/{globals.verifier-CJ1lr-NW.cjs → globals.verifier-Bi-XLEi9.cjs} +24 -23
- package/dist/{globals.verifier-BhqUrneb.js → globals.verifier-gPPX_jhf.js} +24 -23
- package/dist/inventory.server.cjs +1 -1
- package/dist/inventory.server.js +1 -1
- package/dist/{main-gOfhekZG.js → main-ByKkD9qa.js} +2857 -3276
- package/dist/main-Czyu-VcC.cjs +11 -0
- package/dist/martyrs/src/components/Button/{Button.vue2.cjs → Button.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue2.js.map → Button.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
- package/dist/martyrs/src/components/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/UploadImage/UploadImage.vue.cjs +161 -42
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +162 -43
- package/dist/martyrs/src/components/UploadImage/UploadImage.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 +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 +1 -1
- 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/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.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 +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +21 -21
- 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/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- 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/store/globals.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.js +2 -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 +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 +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +11 -11
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +12 -12
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
- 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 +1 -1
- 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/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 +1 -1
- 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 +2 -3
- 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 +2 -3
- 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 +1 -1
- 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/CardProduct.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/elements/{THC.vue2.cjs → THC.vue.cjs} +2 -2
- package/dist/martyrs/src/modules/products/components/elements/THC.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/products/components/elements/{THC.vue2.js → THC.vue.js} +2 -2
- package/dist/martyrs/src/modules/products/components/elements/THC.vue.js.map +1 -0
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +63 -39
- 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 +69 -45
- 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 +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +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 +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +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 +2 -2
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/products/store/categories.cjs +4 -0
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +4 -0
- package/dist/martyrs/src/modules/products/store/categories.js.map +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 +1 -1
- 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/music.server.cjs +1 -1
- package/dist/music.server.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/orders.server.cjs +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +10 -2
- package/dist/products.server.js +10 -2
- package/dist/rents.server.cjs +1 -1
- package/dist/rents.server.js +1 -1
- package/dist/style.css +129 -129
- package/dist/{web-DxxU2bwy.js → web-BklgIiYr.js} +1 -1
- package/dist/{web-bMa0DMyG.cjs → web-CQBm7C6L.cjs} +1 -1
- package/package.json +1 -1
- 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/UploadImage/UploadImage.vue +192 -18
- package/src/modules/community/components/pages/CreateBlogPost.vue +0 -1
- package/src/modules/globals/controllers/classes/globals.validator.js +24 -23
- package/src/modules/globals/views/store/globals.js +2 -2
- package/src/modules/products/components/pages/CategoryEdit.vue +73 -39
- package/src/modules/products/middlewares/categories.verifier.js +9 -1
- package/src/modules/products/store/categories.js +5 -0
- 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-Zhs0EqRp.cjs +0 -11
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.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 -43
- package/dist/martyrs/src/components/FieldTags/create-tags.cjs.map +0 -1
- package/dist/martyrs/src/components/FieldTags/create-tags.js +0 -43
- 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/modules/products/components/elements/THC.vue2.cjs.map +0 -1
- package/dist/martyrs/src/modules/products/components/elements/THC.vue2.js.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/create-tags.js +0 -84
- 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
|
@@ -69,6 +69,7 @@ const loopInterval = ref(null)
|
|
|
69
69
|
const resizeObserver = ref(null)
|
|
70
70
|
const checkInterval = ref(null)
|
|
71
71
|
const resizeTimeout = ref(null)
|
|
72
|
+
const previousSize = ref({ width: 0, height: 0 })
|
|
72
73
|
|
|
73
74
|
const widthMin = ref('100%')
|
|
74
75
|
const widthContainer = ref(0)
|
|
@@ -152,11 +153,22 @@ const checkForClone = async () => {
|
|
|
152
153
|
resizeObserver.value.disconnect()
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
resizeObserver.value = new ResizeObserver(() => {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
resizeObserver.value = new ResizeObserver((entries) => {
|
|
157
|
+
const entry = entries[0]
|
|
158
|
+
const newWidth = entry.contentRect.width
|
|
159
|
+
const newHeight = entry.contentRect.height
|
|
160
|
+
|
|
161
|
+
// Only recalculate if size changed significantly (more than 1px)
|
|
162
|
+
const widthChanged = Math.abs(newWidth - previousSize.value.width) > 1
|
|
163
|
+
const heightChanged = Math.abs(newHeight - previousSize.value.height) > 1
|
|
164
|
+
|
|
165
|
+
if (widthChanged || heightChanged) {
|
|
166
|
+
previousSize.value = { width: newWidth, height: newHeight }
|
|
167
|
+
clearTimeout(resizeTimeout.value)
|
|
168
|
+
resizeTimeout.value = setTimeout(() => {
|
|
169
|
+
calculateClones()
|
|
170
|
+
}, 300)
|
|
171
|
+
}
|
|
160
172
|
})
|
|
161
173
|
|
|
162
174
|
resizeObserver.value.observe(marqueeOverlayContainer.value)
|
|
@@ -188,7 +200,7 @@ const getCurrentStyle = computed(() => {
|
|
|
188
200
|
'--pauseOnHover': `${props.pauseOnHover ? 'paused' : 'running'}`,
|
|
189
201
|
'--pauseOnClick': `${props.pauseOnClick ? 'paused' : 'running'}`,
|
|
190
202
|
'--pauseAnimation': `${(props.vertical && verticalAnimationPause.value) || props.pause ? 'paused' : 'running'}`,
|
|
191
|
-
'--gradient-color':
|
|
203
|
+
'--gradient-color': props.gradientColor,
|
|
192
204
|
'--gradient-length': `${gradientLength.value}`,
|
|
193
205
|
'--min-width': `${widthMin.value}`,
|
|
194
206
|
'--min-height': `${heightMin.value}`,
|
|
@@ -258,9 +270,9 @@ watch(
|
|
|
258
270
|
(newVal, oldVal) => {
|
|
259
271
|
if (newVal !== oldVal) {
|
|
260
272
|
if (newVal) {
|
|
261
|
-
emits('onResume')
|
|
262
|
-
} else {
|
|
263
273
|
emits('onPause')
|
|
274
|
+
} else {
|
|
275
|
+
emits('onResume')
|
|
264
276
|
}
|
|
265
277
|
}
|
|
266
278
|
}
|
|
@@ -271,20 +283,19 @@ watch(
|
|
|
271
283
|
.vue3-marquee {
|
|
272
284
|
display: flex !important;
|
|
273
285
|
position: relative;
|
|
286
|
+
will-change: transform;
|
|
287
|
+
transform: translateZ(0);
|
|
288
|
+
backface-visibility: hidden;
|
|
274
289
|
|
|
275
290
|
.marquee {
|
|
276
291
|
flex: 0 0 auto;
|
|
277
292
|
min-width: var(--min-width);
|
|
278
293
|
min-height: var(--min-height);
|
|
279
294
|
z-index: 1;
|
|
280
|
-
will-change: transform;
|
|
281
|
-
transform: translateZ(0);
|
|
282
|
-
backface-visibility: hidden;
|
|
283
295
|
|
|
284
296
|
animation: var(--orientation) var(--duration) linear var(--delay) var(--loops);
|
|
285
297
|
animation-play-state: var(--pauseAnimation);
|
|
286
298
|
animation-direction: var(--direction);
|
|
287
|
-
contain: layout style paint;
|
|
288
299
|
}
|
|
289
300
|
|
|
290
301
|
.overlay {
|
|
@@ -325,7 +336,7 @@ watch(
|
|
|
325
336
|
}
|
|
326
337
|
|
|
327
338
|
.overlay::before,.overlay::after {
|
|
328
|
-
background: linear-gradient(to right, var(--gradient-color));
|
|
339
|
+
background: linear-gradient(to right, var(--gradient-color), transparent);
|
|
329
340
|
height: 100%;
|
|
330
341
|
width: var(--gradient-length);
|
|
331
342
|
}
|
|
@@ -351,7 +362,7 @@ watch(
|
|
|
351
362
|
}
|
|
352
363
|
|
|
353
364
|
.overlay::before, .overlay::after {
|
|
354
|
-
background: linear-gradient(to bottom, var(--gradient-color));
|
|
365
|
+
background: linear-gradient(to bottom, var(--gradient-color), transparent);
|
|
355
366
|
height: var(--gradient-length);
|
|
356
367
|
width: 100%;
|
|
357
368
|
}
|
|
@@ -1,40 +1,116 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<div class="upload-image-wrapper flex-v-center flex-nowrap flex gap-small" :class="{'with-text': text}">
|
|
3
|
+
<div
|
|
4
|
+
@click="onComponentClick"
|
|
5
|
+
@drop="onDrop"
|
|
6
|
+
@dragover.prevent
|
|
7
|
+
class="pos-relative bg-light radius-small br-solid br-1px br-black-transp-10 h-100 aspect-1x1 flex-v-center flex-h-center flex cursor-pointer"
|
|
8
|
+
>
|
|
7
9
|
<img loading="lazy"
|
|
8
|
-
v-if="imageUrl || photo"
|
|
9
|
-
:src="(FILE_SERVER_URL || '') + (imageUrl || photo)"
|
|
10
|
+
v-if="imageUrl || photo || previewUrl"
|
|
11
|
+
:src="previewUrl || (FILE_SERVER_URL || '') + (imageUrl || photo)"
|
|
10
12
|
alt="Uploaded image"
|
|
11
|
-
class="w-100 h-100 object-fit-cover"
|
|
12
|
-
|
|
13
|
+
class="pos-absolute z-index-1 w-100 h-100 object-fit-cover"
|
|
14
|
+
/>
|
|
13
15
|
|
|
14
|
-
<div v-else class="flex-v-center flex-h-center flex w-100 h-100 bg-second" >
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
<div v-else class="flex-v-center z-index-2 flex-h-center flex w-100 h-100 bg-second" >
|
|
17
|
+
<IconUpload class="i-medium upload-icon" fill="rgb(var(--white))" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Hover controls -->
|
|
21
|
+
<div class="z-index-2 hover-controls pos-absolute w-100 h-100 flex-v-center flex-h-center flex">
|
|
22
|
+
<div v-if="!imageUrl && !photo && !previewUrl" class="hover-upload-icon">
|
|
23
|
+
<IconUpload class="i-medium" fill="rgb(var(--white))" />
|
|
24
|
+
</div>
|
|
25
|
+
<div v-else class="hover-buttons flex gap-small">
|
|
26
|
+
<button @click.stop="onComponentClick" class="hover-button radius-small pd-thin bg-main t-white br-none cursor-pointer">
|
|
27
|
+
<IconUpload class="i-semi" fill="rgb(var(--white))" />
|
|
28
|
+
</button>
|
|
29
|
+
<button @click.stop="deleteImage" class="hover-button radius-small pd-thin bg-danger t-white br-none cursor-pointer">
|
|
30
|
+
<IconDelete class="i-semi" fill="rgb(var(--white))" />
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- Loading overlay -->
|
|
36
|
+
<div v-if="loading" class="z-index-2 loading-overlay pos-absolute w-100 h-100 flex-v-center flex-h-center flex">
|
|
37
|
+
<Loader :centered="false" />
|
|
18
38
|
</div>
|
|
19
39
|
|
|
20
40
|
<input type="file" name="file" ref="fileInput" @change="onFileChange" style="display: none"/>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- Text block -->
|
|
44
|
+
<div v-if="text" class="upload-text-block flex flex-column">
|
|
45
|
+
<span class="mn-b-small t-medium">{{ textConfig.title }}</span>
|
|
46
|
+
<span class="mn-b-medium t-transp">{{ textConfig.subtitle }}</span>
|
|
47
|
+
<div v-if="!imageUrl && !photo && !previewUrl">
|
|
48
|
+
<button @click="onComponentClick" class="button button-small w-max bg-main t-black cursor-pointer">
|
|
49
|
+
{{ textConfig.buttonText }}
|
|
50
|
+
</button>
|
|
51
|
+
</div>
|
|
52
|
+
<div v-else class="flex gap-thin">
|
|
53
|
+
<button @click="onComponentClick" class="button button-small w-max bg-second t-white cursor-pointer">
|
|
54
|
+
Upload
|
|
55
|
+
</button>
|
|
56
|
+
<button @click="deleteImage" class="button button-small w-max bg-red t-white cursor-pointer">
|
|
57
|
+
Delete
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
21
61
|
</div>
|
|
22
62
|
</template>
|
|
23
63
|
|
|
24
64
|
<script setup>
|
|
25
|
-
import { ref, watch } from 'vue';
|
|
65
|
+
import { ref, watch, computed } from 'vue';
|
|
26
66
|
import axios from 'axios';
|
|
67
|
+
import Loader from '@martyrs/src/components/Loader/Loader.vue';
|
|
68
|
+
import IconUpload from '@martyrs/src/modules/icons/navigation/IconUpload.vue';
|
|
69
|
+
import IconDelete from '@martyrs/src/modules/icons/navigation/IconDelete.vue';
|
|
27
70
|
|
|
28
71
|
const imageUrl = ref(null);
|
|
29
72
|
const fileInput = ref(null);
|
|
73
|
+
const previewUrl = ref(null);
|
|
74
|
+
const loading = ref(false);
|
|
30
75
|
|
|
31
|
-
const props = defineProps(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
76
|
+
const props = defineProps({
|
|
77
|
+
uploadPath: {
|
|
78
|
+
type: String,
|
|
79
|
+
required: true
|
|
80
|
+
},
|
|
81
|
+
photo: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: null
|
|
84
|
+
},
|
|
85
|
+
text: {
|
|
86
|
+
type: [Object, Boolean],
|
|
87
|
+
default: null
|
|
88
|
+
}
|
|
89
|
+
});
|
|
35
90
|
|
|
36
91
|
const emit = defineEmits(['update:photo', 'error']);
|
|
37
92
|
|
|
93
|
+
// Text configuration with defaults
|
|
94
|
+
const textConfig = computed(() => {
|
|
95
|
+
const defaults = {
|
|
96
|
+
title: 'Upload Image',
|
|
97
|
+
subtitle: 'Drag & drop your image here or click button. Supported: JPG, PNG, GIF. Max size: 2MB',
|
|
98
|
+
buttonText: 'Choose Image'
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
if (props.text === true) {
|
|
102
|
+
return defaults;
|
|
103
|
+
} else if (typeof props.text === 'object' && props.text !== null) {
|
|
104
|
+
return {
|
|
105
|
+
title: props.text.title || defaults.title,
|
|
106
|
+
subtitle: props.text.subtitle || defaults.subtitle,
|
|
107
|
+
buttonText: props.text.buttonText || defaults.buttonText
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return defaults;
|
|
112
|
+
});
|
|
113
|
+
|
|
38
114
|
watch(props, ({photo}) => {
|
|
39
115
|
if(photo) imageUrl.value = photo;
|
|
40
116
|
});
|
|
@@ -50,10 +126,19 @@ async function onFileChange(e) {
|
|
|
50
126
|
return;
|
|
51
127
|
}
|
|
52
128
|
|
|
129
|
+
// Create preview from file
|
|
130
|
+
const reader = new FileReader();
|
|
131
|
+
reader.onload = (e) => {
|
|
132
|
+
previewUrl.value = e.target.result;
|
|
133
|
+
};
|
|
134
|
+
reader.readAsDataURL(file);
|
|
135
|
+
|
|
53
136
|
let formData = new FormData();
|
|
54
137
|
formData.append("file", file);
|
|
55
138
|
|
|
56
139
|
console.log("Sending file:", file.name); // Логируем имя файла перед отправкой
|
|
140
|
+
|
|
141
|
+
loading.value = true;
|
|
57
142
|
|
|
58
143
|
try {
|
|
59
144
|
const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
|
|
@@ -61,10 +146,14 @@ async function onFileChange(e) {
|
|
|
61
146
|
let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);
|
|
62
147
|
console.log("Upload response:", response); // Логируем ответ сервера
|
|
63
148
|
imageUrl.value = response.data[0].filepath;
|
|
149
|
+
previewUrl.value = null; // Clear preview after successful upload
|
|
64
150
|
emit('update:photo', imageUrl.value);
|
|
65
151
|
} catch (error) {
|
|
66
152
|
emit('error', error);
|
|
67
153
|
console.error("Upload error:", error); // Логируем ошибку
|
|
154
|
+
previewUrl.value = null; // Clear preview on error
|
|
155
|
+
} finally {
|
|
156
|
+
loading.value = false;
|
|
68
157
|
}
|
|
69
158
|
}
|
|
70
159
|
|
|
@@ -77,4 +166,89 @@ function onDrop(e) {
|
|
|
77
166
|
}
|
|
78
167
|
});
|
|
79
168
|
}
|
|
169
|
+
|
|
170
|
+
function deleteImage() {
|
|
171
|
+
imageUrl.value = null;
|
|
172
|
+
previewUrl.value = null;
|
|
173
|
+
emit('update:photo', null);
|
|
174
|
+
// Reset file input
|
|
175
|
+
if (fileInput.value) {
|
|
176
|
+
fileInput.value.value = '';
|
|
177
|
+
}
|
|
178
|
+
}
|
|
80
179
|
</script>
|
|
180
|
+
|
|
181
|
+
<style scoped>
|
|
182
|
+
.image-upload-area {
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
transition: all 0.3s ease;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.image-upload-area:hover {
|
|
188
|
+
opacity: 0.95;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Hover controls */
|
|
192
|
+
.hover-controls {
|
|
193
|
+
top: 0;
|
|
194
|
+
left: 0;
|
|
195
|
+
background: rgba(0, 0, 0, 0.7);
|
|
196
|
+
opacity: 0;
|
|
197
|
+
transition: opacity 0.3s ease;
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.image-upload-area:hover .hover-controls {
|
|
202
|
+
opacity: 1;
|
|
203
|
+
pointer-events: all;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.hover-upload-icon {
|
|
207
|
+
animation: pulse 1.5s infinite;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.hover-button {
|
|
211
|
+
transition: transform 0.2s ease, background-color 0.2s ease;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.hover-button:hover {
|
|
215
|
+
transform: scale(1.1);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.hover-button:active {
|
|
219
|
+
transform: scale(0.95);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* Loading overlay */
|
|
223
|
+
.loading-overlay {
|
|
224
|
+
top: 0;
|
|
225
|
+
left: 0;
|
|
226
|
+
background: rgba(255, 255, 255, 0.9);
|
|
227
|
+
z-index: 10;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Animations */
|
|
231
|
+
@keyframes pulse {
|
|
232
|
+
0% {
|
|
233
|
+
transform: scale(1);
|
|
234
|
+
opacity: 1;
|
|
235
|
+
}
|
|
236
|
+
50% {
|
|
237
|
+
transform: scale(1.05);
|
|
238
|
+
opacity: 0.8;
|
|
239
|
+
}
|
|
240
|
+
100% {
|
|
241
|
+
transform: scale(1);
|
|
242
|
+
opacity: 1;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Upload icon in empty state */
|
|
247
|
+
.upload-icon {
|
|
248
|
+
transition: transform 0.3s ease;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.image-upload-area:hover .upload-icon {
|
|
252
|
+
transform: scale(1.1);
|
|
253
|
+
}
|
|
254
|
+
</style>
|
|
@@ -130,7 +130,6 @@ import Textarea from '@martyrs/src/modules/constructor/components/elements/Texta
|
|
|
130
130
|
import Constructor from '@martyrs/src/modules/constructor/components/sections/Constructor.vue';
|
|
131
131
|
|
|
132
132
|
import Popup from '@martyrs/src/components/Popup/Popup.vue'
|
|
133
|
-
import FieldTags from '@martyrs/src/components/FieldTags/FieldTags.vue'
|
|
134
133
|
import BlockTags from '@martyrs/src/components/FieldTags/BlockTags.vue'
|
|
135
134
|
import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
|
|
136
135
|
import Field from '@martyrs/src/components/Field/Field.vue'
|
|
@@ -341,7 +341,8 @@ class Validator {
|
|
|
341
341
|
for (let i = 0; i < value.length; i++) {
|
|
342
342
|
const result = validator.validate(value[i]);
|
|
343
343
|
if (!result.isValid) {
|
|
344
|
-
|
|
344
|
+
const fieldName = message ? `${message}[${i}]` : `Item ${i}`;
|
|
345
|
+
this.errors.push(`${fieldName}: ${result.errors.join(', ')}`);
|
|
345
346
|
return false;
|
|
346
347
|
}
|
|
347
348
|
}
|
|
@@ -367,7 +368,7 @@ class Validator {
|
|
|
367
368
|
}
|
|
368
369
|
const result = validator.validate(value[key]);
|
|
369
370
|
if (!result.isValid) {
|
|
370
|
-
this.errors.push(`
|
|
371
|
+
this.errors.push(`"${key}" ${result.errors.join(', ')}`);
|
|
371
372
|
return false;
|
|
372
373
|
}
|
|
373
374
|
}
|
|
@@ -394,7 +395,7 @@ class Validator {
|
|
|
394
395
|
}
|
|
395
396
|
const result = validator.validate(value[key]);
|
|
396
397
|
if (!result.isValid) {
|
|
397
|
-
this.errors.push(`
|
|
398
|
+
this.errors.push(`"${key}" ${result.errors.join(', ')}`);
|
|
398
399
|
return false;
|
|
399
400
|
}
|
|
400
401
|
}
|
|
@@ -425,46 +426,46 @@ class Validator {
|
|
|
425
426
|
const context = this.options.context ? `${this.options.context} ` : '';
|
|
426
427
|
switch (rule.type) {
|
|
427
428
|
case 'string':
|
|
428
|
-
return `${context}
|
|
429
|
+
return `${context}must be a string`;
|
|
429
430
|
case 'number':
|
|
430
|
-
return `${context}
|
|
431
|
+
return `${context}must be a number`;
|
|
431
432
|
case 'integer':
|
|
432
|
-
return `${context}
|
|
433
|
+
return `${context}must be an integer`;
|
|
433
434
|
case 'boolean':
|
|
434
|
-
return `${context}
|
|
435
|
+
return `${context}must be a boolean`;
|
|
435
436
|
case 'array':
|
|
436
|
-
return `${context}
|
|
437
|
+
return `${context}must be an array`;
|
|
437
438
|
case 'date':
|
|
438
|
-
return `${context}
|
|
439
|
+
return `${context}must be a valid date`;
|
|
439
440
|
case 'required':
|
|
440
|
-
return `${context}
|
|
441
|
+
return `${context}is required`;
|
|
441
442
|
case 'min':
|
|
442
|
-
if (rule.param instanceof Date) return `${context}
|
|
443
|
-
return `${context}
|
|
443
|
+
if (rule.param instanceof Date) return `${context}must be no earlier than ${rule.param.toLocaleDateString()}`;
|
|
444
|
+
return `${context}must be at least ${rule.param}`;
|
|
444
445
|
case 'max':
|
|
445
|
-
if (rule.param instanceof Date) return `${context}
|
|
446
|
-
return `${context}
|
|
446
|
+
if (rule.param instanceof Date) return `${context}must be no later than ${rule.param.toLocaleDateString()}`;
|
|
447
|
+
return `${context}must be at most ${rule.param}`;
|
|
447
448
|
case 'length':
|
|
448
449
|
if (rule.param.min !== undefined && rule.param.max !== undefined) {
|
|
449
|
-
return `${context}
|
|
450
|
+
return `${context}length must be between ${rule.param.min} and ${rule.param.max} characters`;
|
|
450
451
|
} else if (rule.param.min !== undefined) {
|
|
451
|
-
return `${context}
|
|
452
|
+
return `${context}length must be at least ${rule.param.min} characters`;
|
|
452
453
|
} else if (rule.param.max !== undefined) {
|
|
453
|
-
return `${context}
|
|
454
|
+
return `${context}length must be at most ${rule.param.max} characters`;
|
|
454
455
|
}
|
|
455
|
-
return `${context}
|
|
456
|
+
return `${context}does not meet length requirements`;
|
|
456
457
|
case 'pattern':
|
|
457
|
-
return `${context}
|
|
458
|
+
return `${context}does not match required format`;
|
|
458
459
|
case 'email':
|
|
459
|
-
return `${context}
|
|
460
|
+
return `${context}must be a valid email address`;
|
|
460
461
|
case 'oneOf':
|
|
461
|
-
return `${context}
|
|
462
|
+
return `${context}must be one of: ${rule.param.join(', ')}`;
|
|
462
463
|
case 'oneOfTypes':
|
|
463
|
-
return `${context}
|
|
464
|
+
return `${context}must be one of types: ${rule.param.join(', ')}`;
|
|
464
465
|
case 'custom':
|
|
465
466
|
return rule.param;
|
|
466
467
|
case 'items':
|
|
467
|
-
return `${context}
|
|
468
|
+
return `${context}contains invalid items`;
|
|
468
469
|
case 'object':
|
|
469
470
|
return `${context}не соответствует типу объекта`;
|
|
470
471
|
case 'shape':
|
|
@@ -162,7 +162,7 @@ function setError(error) {
|
|
|
162
162
|
if (error?.response?.data) errorData = error.response.data;
|
|
163
163
|
|
|
164
164
|
// Обработка ошибок верификации
|
|
165
|
-
if (errorData?.error === 'VALIDATION_ERROR' && errorData?.errors) {
|
|
165
|
+
if ((errorData?.error === 'VALIDATION_ERROR' || errorData?.errors) && errorData?.errors) {
|
|
166
166
|
// Собираем все сообщения об ошибках в одну строку
|
|
167
167
|
const errorMessages = [];
|
|
168
168
|
for (const field in errorData.errors) {
|
|
@@ -173,7 +173,7 @@ function setError(error) {
|
|
|
173
173
|
errorMessages.push(fieldErrors);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
state.error.message = errorMessages.join(', ') || 'Validation error';
|
|
176
|
+
state.error.message = errorMessages.join(', ') || errorData.message || 'Validation error';
|
|
177
177
|
} else if (error && errorData.errorCode) {
|
|
178
178
|
// state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);
|
|
179
179
|
state.error.message = errorData.errorCode;
|
|
@@ -17,36 +17,41 @@
|
|
|
17
17
|
title="Profile"
|
|
18
18
|
class="mn-b-thin"
|
|
19
19
|
>
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
<Select
|
|
22
|
+
v-model:select="categories.state.current.status"
|
|
23
|
+
label="Status"
|
|
24
|
+
:options="[
|
|
25
|
+
'draft',
|
|
26
|
+
'internal',
|
|
27
|
+
'published',
|
|
28
|
+
'removed'
|
|
29
|
+
]"
|
|
30
|
+
placeholder="Select category"
|
|
31
|
+
class="pos-relative mn-b-thin w-100 bg-white radius-small pd-medium"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<Field
|
|
35
|
+
v-model:field="categories.state.current.name"
|
|
36
|
+
label="Name"
|
|
37
|
+
placeholder="Enter category name"
|
|
38
|
+
class="w-100 mn-b-thin bg-white radius-small pd-medium"
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<div class="w-100 mn-b-thin bg-white radius-small pd-medium cols-1">
|
|
21
42
|
<UploadImage
|
|
22
|
-
|
|
43
|
+
v-model:photo="categories.state.current.photo"
|
|
23
44
|
:uploadPath="'categories'"
|
|
24
|
-
|
|
45
|
+
:text="{
|
|
46
|
+
title: 'Upload category image',
|
|
47
|
+
subtitle: 'Supported: JPG, PNG, GIF. Max size: 5MB',
|
|
48
|
+
buttonText: 'Select Image'
|
|
49
|
+
}"
|
|
50
|
+
class="pos-relative"
|
|
25
51
|
/>
|
|
26
|
-
<Field
|
|
27
|
-
v-model:field="categories.state.current.name"
|
|
28
|
-
label="Name"
|
|
29
|
-
placeholder="Enter category name"
|
|
30
|
-
class="w-100 bg-white radius-small pd-medium"
|
|
31
|
-
/>
|
|
32
52
|
</div>
|
|
33
53
|
|
|
34
|
-
|
|
35
|
-
<Field
|
|
36
|
-
v-model:field="categories.state.current.order"
|
|
37
|
-
label="Order"
|
|
38
|
-
:disabled="true"
|
|
39
|
-
class="w-40 bg-white radius-small pd-medium"
|
|
40
|
-
/>
|
|
41
|
-
<Field
|
|
42
|
-
v-model:field="categories.state.current.slug"
|
|
43
|
-
label="Slug"
|
|
44
|
-
placeholder="Enter category slug"
|
|
45
|
-
:disabled="route.params.category ? true : false"
|
|
46
|
-
class="w-100 bg-white radius-small pd-medium"
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
54
|
+
|
|
50
55
|
<Field
|
|
51
56
|
v-if="route.params.category"
|
|
52
57
|
v-model:field="categories.state.current.url"
|
|
@@ -54,19 +59,25 @@
|
|
|
54
59
|
:disabled="true"
|
|
55
60
|
class="w-100 bg-white radius-small pd-medium mn-b-thin"
|
|
56
61
|
/>
|
|
62
|
+
|
|
57
63
|
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
<div class="mn-b-thin w-100 flex-nowrap gap-thin flex">
|
|
65
|
+
<Field
|
|
66
|
+
v-model:field="categories.state.current.order"
|
|
67
|
+
label="Order"
|
|
68
|
+
:disabled="true"
|
|
69
|
+
class="w-40 bg-white radius-small pd-medium"
|
|
70
|
+
/>
|
|
71
|
+
<Field
|
|
72
|
+
v-model:field="categories.state.current.slug"
|
|
73
|
+
label="Slug"
|
|
74
|
+
placeholder="Enter category slug"
|
|
75
|
+
:disabled="route.params.category ? true : false"
|
|
76
|
+
class="w-100 bg-white radius-small pd-medium"
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
|
|
70
81
|
|
|
71
82
|
<!-- <div class="flex-v-center flex-nowrap flex">
|
|
72
83
|
<h4 class="mn-r-thin t-medium">Localization</h4>
|
|
@@ -125,8 +136,11 @@
|
|
|
125
136
|
class="w-100 bg-white radius-small pd-medium"
|
|
126
137
|
/>
|
|
127
138
|
<FieldTags
|
|
128
|
-
v-model
|
|
129
|
-
placeholder="Add filter options"
|
|
139
|
+
v-model="item.options"
|
|
140
|
+
:placeholder="'Add filter options'"
|
|
141
|
+
:separators="[',', ';']"
|
|
142
|
+
:add-on-key="[13, ',', ';']"
|
|
143
|
+
:max-tags="20"
|
|
130
144
|
class="w-100 bg-white radius-small pd-medium"
|
|
131
145
|
/>
|
|
132
146
|
<div
|
|
@@ -224,6 +238,16 @@
|
|
|
224
238
|
? categories.state.current.owner.target._id
|
|
225
239
|
: categories.state.current.owner.target
|
|
226
240
|
}
|
|
241
|
+
|
|
242
|
+
// Очищаем filters от tiClasses перед отправкой
|
|
243
|
+
if (categories.state.current.filters) {
|
|
244
|
+
categories.state.current.filters = categories.state.current.filters.map(filter => ({
|
|
245
|
+
...filter,
|
|
246
|
+
options: filter.options ? filter.options.map(opt =>
|
|
247
|
+
typeof opt === 'string' ? opt : opt.text
|
|
248
|
+
) : []
|
|
249
|
+
}));
|
|
250
|
+
}
|
|
227
251
|
|
|
228
252
|
await categories.actions.update(categories.state.current)
|
|
229
253
|
|
|
@@ -241,6 +265,16 @@
|
|
|
241
265
|
hidden: false,
|
|
242
266
|
target: route.params._id ? route.params._id : null
|
|
243
267
|
}
|
|
268
|
+
|
|
269
|
+
// Очищаем filters от tiClasses перед отправкой
|
|
270
|
+
if (categories.state.current.filters) {
|
|
271
|
+
categories.state.current.filters = categories.state.current.filters.map(filter => ({
|
|
272
|
+
...filter,
|
|
273
|
+
options: filter.options ? filter.options.map(opt =>
|
|
274
|
+
typeof opt === 'string' ? opt : opt.text
|
|
275
|
+
) : []
|
|
276
|
+
}));
|
|
277
|
+
}
|
|
244
278
|
|
|
245
279
|
await categories.actions.create(categories.state.current)
|
|
246
280
|
redirectTo()
|
|
@@ -79,7 +79,15 @@ export default (function (db) {
|
|
|
79
79
|
slug: { rule: 'optional', validator: Validator.schema().string() },
|
|
80
80
|
parent: { rule: 'optional', validator: Validator.schema().oneOfTypes(['string', 'null']) },
|
|
81
81
|
localization: { rule: 'optional' },
|
|
82
|
-
filters: {
|
|
82
|
+
filters: {
|
|
83
|
+
rule: 'optional',
|
|
84
|
+
validator: Validator.schema().array().items(
|
|
85
|
+
Validator.schema().object({
|
|
86
|
+
name: Validator.schema().string(),
|
|
87
|
+
options: Validator.schema().array().items(Validator.schema().string())
|
|
88
|
+
})
|
|
89
|
+
)
|
|
90
|
+
},
|
|
83
91
|
owner: {
|
|
84
92
|
rule: 'optional',
|
|
85
93
|
validator: Validator.schema().object({
|
|
@@ -36,6 +36,11 @@ const actions = {
|
|
|
36
36
|
const response = await $axios.get('/api/categories', { params: options });
|
|
37
37
|
|
|
38
38
|
if (options._id) {
|
|
39
|
+
// Проверяем что приходит с сервера
|
|
40
|
+
console.log('Category data from server:', response.data[0]);
|
|
41
|
+
if (response.data[0].filters) {
|
|
42
|
+
console.log('Filters:', response.data[0].filters);
|
|
43
|
+
}
|
|
39
44
|
state.current = { ...response.data[0] };
|
|
40
45
|
return Promise.resolve(response.data[0]);
|
|
41
46
|
} else {
|
package/dist/_virtual/index3.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|