@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
|
@@ -1,543 +1,362 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
tag.tiClasses,
|
|
16
|
-
tag.classes,
|
|
17
|
-
{ 'ti-deletion-mark': isMarked(index) }
|
|
18
|
-
]"
|
|
19
|
-
tabindex="0"
|
|
20
|
-
class="ti-tag t-medium"
|
|
21
|
-
@click="emit('tag-clicked', { tag, index })"
|
|
2
|
+
<div class="field-tags-new">
|
|
3
|
+
<!-- Tags container -->
|
|
4
|
+
<div class="tags-container">
|
|
5
|
+
<span
|
|
6
|
+
v-for="(tag, index) in tags"
|
|
7
|
+
:key="index"
|
|
8
|
+
class="tag"
|
|
9
|
+
>
|
|
10
|
+
{{ getTagText(tag) }}
|
|
11
|
+
<button
|
|
12
|
+
@click="removeTag(index)"
|
|
13
|
+
class="tag-remove"
|
|
14
|
+
type="button"
|
|
22
15
|
>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
<div :ref="el => setTagCenter(el, index)" class="ti-tag-center">
|
|
41
|
-
<span
|
|
42
|
-
v-if="!$slots['tag-center']"
|
|
43
|
-
:class="{ 'ti-hidden': tagsEditStatus[index] }"
|
|
44
|
-
@click="performEditTag(index)"
|
|
45
|
-
>{{ tag.text }}</span>
|
|
46
|
-
<tag-input
|
|
47
|
-
v-if="!$slots['tag-center']"
|
|
48
|
-
:scope="{
|
|
49
|
-
edit: tagsEditStatus[index],
|
|
50
|
-
maxlength,
|
|
51
|
-
tag,
|
|
52
|
-
index,
|
|
53
|
-
validateTag: createChangedTag,
|
|
54
|
-
performCancelEdit: cancelEdit,
|
|
55
|
-
performSaveEdit: performSaveTag,
|
|
56
|
-
}"
|
|
57
|
-
/>
|
|
58
|
-
<slot
|
|
59
|
-
name="tag-center"
|
|
60
|
-
:tag="tag"
|
|
61
|
-
:index="index"
|
|
62
|
-
:maxlength="maxlength"
|
|
63
|
-
:edit="tagsEditStatus[index]"
|
|
64
|
-
:perform-save-edit="performSaveTag"
|
|
65
|
-
:perform-delete="performDeleteTag"
|
|
66
|
-
:perform-cancel-edit="cancelEdit"
|
|
67
|
-
:validate-tag="createChangedTag"
|
|
68
|
-
:perform-open-edit="performEditTag"
|
|
69
|
-
:deletion-mark="isMarked(index)"
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
<div
|
|
73
|
-
v-if="$slots['tag-right']"
|
|
74
|
-
class="ti-tag-right"
|
|
75
|
-
>
|
|
76
|
-
<slot
|
|
77
|
-
name="tag-right"
|
|
78
|
-
:tag="tag"
|
|
79
|
-
:index="index"
|
|
80
|
-
:edit="tagsEditStatus[index]"
|
|
81
|
-
:perform-save-edit="performSaveTag"
|
|
82
|
-
:perform-delete="performDeleteTag"
|
|
83
|
-
:perform-cancel-edit="cancelEdit"
|
|
84
|
-
:perform-open-edit="performEditTag"
|
|
85
|
-
:deletion-mark="isMarked(index)"
|
|
86
|
-
/>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="ti-actions">
|
|
90
|
-
<i
|
|
91
|
-
v-if="!$slots['tag-actions']"
|
|
92
|
-
v-show="tagsEditStatus[index]"
|
|
93
|
-
class="ti-icon-undo"
|
|
94
|
-
@click.stop="cancelEdit(index)"
|
|
95
|
-
/>
|
|
96
|
-
<i
|
|
97
|
-
v-if="!$slots['tag-actions']"
|
|
98
|
-
v-show="!tagsEditStatus[index]"
|
|
99
|
-
class="ti-icon-close"
|
|
100
|
-
@click.stop="performDeleteTag(index)"
|
|
101
|
-
/>
|
|
102
|
-
<slot
|
|
103
|
-
v-if="$slots['tag-actions']"
|
|
104
|
-
name="tag-actions"
|
|
105
|
-
:tag="tag"
|
|
106
|
-
:index="index"
|
|
107
|
-
:edit="tagsEditStatus[index]"
|
|
108
|
-
:perform-save-edit="performSaveTag"
|
|
109
|
-
:perform-delete="performDeleteTag"
|
|
110
|
-
:perform-cancel-edit="cancelEdit"
|
|
111
|
-
:perform-open-edit="performEditTag"
|
|
112
|
-
:deletion-mark="isMarked(index)"
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</li>
|
|
116
|
-
<li class="ti-new-tag-input-wrapper">
|
|
117
|
-
<input
|
|
118
|
-
ref="newTagInputRef"
|
|
119
|
-
:class="[createClasses(newTag, tags, validation, isDuplicate)]"
|
|
120
|
-
:placeholder="placeholder"
|
|
121
|
-
:value="newTag"
|
|
122
|
-
:maxlength="maxlength"
|
|
123
|
-
:disabled="disabled"
|
|
124
|
-
type="text"
|
|
125
|
-
size="1"
|
|
126
|
-
class="ti-new-tag-input"
|
|
127
|
-
@keydown="handleKeyDown"
|
|
128
|
-
@paste="addTagsFromPaste"
|
|
129
|
-
@keydown.delete="invokeDelete"
|
|
130
|
-
@keydown.tab="performBlur"
|
|
131
|
-
@keydown.up.prevent="selectItem('before')"
|
|
132
|
-
@keydown.down.prevent="selectItem('after')"
|
|
133
|
-
@input="updateNewTag"
|
|
134
|
-
@focus="focused = true"
|
|
135
|
-
@click="!addOnlyFromAutocomplete && (selectedItem = null)"
|
|
136
|
-
>
|
|
137
|
-
</li>
|
|
138
|
-
</ul>
|
|
16
|
+
×
|
|
17
|
+
</button>
|
|
18
|
+
</span>
|
|
19
|
+
|
|
20
|
+
<input
|
|
21
|
+
ref="inputRef"
|
|
22
|
+
v-model="newTag"
|
|
23
|
+
@keydown="handleKeyDown"
|
|
24
|
+
@paste="handlePaste"
|
|
25
|
+
@focus="focused = true"
|
|
26
|
+
@blur="handleBlur"
|
|
27
|
+
:placeholder="placeholder || 'Add tags'"
|
|
28
|
+
:maxlength="maxlength"
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
class="tag-input"
|
|
31
|
+
/>
|
|
139
32
|
</div>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
@mouseleave="selectedItem = null"
|
|
33
|
+
|
|
34
|
+
<!-- Autocomplete dropdown -->
|
|
35
|
+
<div
|
|
36
|
+
v-if="showAutocomplete && filteredAutocomplete.length > 0"
|
|
37
|
+
class="autocomplete"
|
|
146
38
|
>
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{ 'ti-selected-item': isSelected(index) }
|
|
157
|
-
]"
|
|
158
|
-
class="ti-item"
|
|
159
|
-
@mouseenter="!disabled && (selectedItem = index)"
|
|
160
|
-
>
|
|
161
|
-
<div
|
|
162
|
-
v-if="!$slots['autocomplete-item']"
|
|
163
|
-
@click="performAddTags(item, undefined, 'autocomplete')"
|
|
164
|
-
>
|
|
165
|
-
{{ item.text }}
|
|
166
|
-
</div>
|
|
167
|
-
<slot
|
|
168
|
-
v-else
|
|
169
|
-
name="autocomplete-item"
|
|
170
|
-
:item="item"
|
|
171
|
-
:index="index"
|
|
172
|
-
:perform-add="item => performAddTags(item, undefined, 'autocomplete')"
|
|
173
|
-
:selected="isSelected(index)"
|
|
174
|
-
/>
|
|
175
|
-
</li>
|
|
176
|
-
</ul>
|
|
177
|
-
<slot name="autocomplete-footer" />
|
|
39
|
+
<div
|
|
40
|
+
v-for="(item, index) in filteredAutocomplete"
|
|
41
|
+
:key="getTagText(item)"
|
|
42
|
+
@click="addTag(item)"
|
|
43
|
+
@mouseenter="selectedIndex = index"
|
|
44
|
+
:class="['autocomplete-item', { selected: selectedIndex === index }]"
|
|
45
|
+
>
|
|
46
|
+
{{ getTagText(item) }}
|
|
47
|
+
</div>
|
|
178
48
|
</div>
|
|
179
49
|
</div>
|
|
180
50
|
</template>
|
|
181
51
|
|
|
182
52
|
<script setup>
|
|
183
|
-
import { ref, computed, watch
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
53
|
+
import { ref, computed, watch } from 'vue'
|
|
54
|
+
|
|
55
|
+
const props = defineProps({
|
|
56
|
+
modelValue: Array,
|
|
57
|
+
textField: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: 'text'
|
|
60
|
+
},
|
|
61
|
+
autocompleteItems: Array,
|
|
62
|
+
separators: {
|
|
63
|
+
type: Array,
|
|
64
|
+
default: () => [',', ';']
|
|
65
|
+
},
|
|
66
|
+
addOnKey: {
|
|
67
|
+
type: Array,
|
|
68
|
+
default: () => [13] // Enter key
|
|
69
|
+
},
|
|
70
|
+
maxTags: {
|
|
71
|
+
type: Number,
|
|
72
|
+
default: 20
|
|
73
|
+
},
|
|
74
|
+
maxlength: {
|
|
75
|
+
type: Number,
|
|
76
|
+
default: 50
|
|
77
|
+
},
|
|
78
|
+
placeholder: String,
|
|
79
|
+
disabled: Boolean,
|
|
80
|
+
addOnBlur: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: true
|
|
83
|
+
},
|
|
84
|
+
autocompleteMinLength: {
|
|
85
|
+
type: Number,
|
|
86
|
+
default: 1
|
|
87
|
+
}
|
|
88
|
+
})
|
|
191
89
|
|
|
192
|
-
|
|
193
|
-
const emit = defineEmits([
|
|
194
|
-
'adding-duplicate',
|
|
195
|
-
'before-adding-tag',
|
|
196
|
-
'before-deleting-tag',
|
|
197
|
-
'before-editing-tag',
|
|
198
|
-
'before-saving-tag',
|
|
199
|
-
'max-tags-reached',
|
|
200
|
-
'saving-duplicate',
|
|
201
|
-
'tags-changed',
|
|
202
|
-
'tag-clicked',
|
|
203
|
-
'update:modelValue',
|
|
204
|
-
'update:tags',
|
|
205
|
-
]);
|
|
90
|
+
const emit = defineEmits(['update:modelValue', 'tags-changed'])
|
|
206
91
|
|
|
207
92
|
// State
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
const
|
|
212
|
-
const deletionMark = ref(null);
|
|
213
|
-
const deletionMarkTimer = ref(null);
|
|
214
|
-
const selectedItem = ref(null);
|
|
215
|
-
const focused = ref(false);
|
|
216
|
-
const newTagInputRef = ref(null);
|
|
93
|
+
const newTag = ref('')
|
|
94
|
+
const focused = ref(false)
|
|
95
|
+
const selectedIndex = ref(-1)
|
|
96
|
+
const inputRef = ref(null)
|
|
217
97
|
|
|
218
98
|
// Computed
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
const filteredAutocompleteItems = computed(() => {
|
|
228
|
-
const items = propsObj.autocompleteItems.map(i =>
|
|
229
|
-
createTag(i, propsObj.tags, propsObj.validation, propsObj.isDuplicate)
|
|
230
|
-
);
|
|
99
|
+
const tags = computed({
|
|
100
|
+
get: () => props.modelValue || [],
|
|
101
|
+
set: (value) => {
|
|
102
|
+
emit('update:modelValue', value)
|
|
103
|
+
emit('tags-changed', value)
|
|
104
|
+
}
|
|
105
|
+
})
|
|
231
106
|
|
|
232
|
-
|
|
233
|
-
return
|
|
234
|
-
|
|
107
|
+
const showAutocomplete = computed(() => {
|
|
108
|
+
return focused.value &&
|
|
109
|
+
props.autocompleteItems?.length > 0 &&
|
|
110
|
+
newTag.value.length >= props.autocompleteMinLength
|
|
111
|
+
})
|
|
235
112
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const items = filteredAutocompleteItems.value;
|
|
239
|
-
const current = selectedItem.value;
|
|
240
|
-
const lastItem = items.length - 1;
|
|
113
|
+
const filteredAutocomplete = computed(() => {
|
|
114
|
+
if (!props.autocompleteItems) return []
|
|
241
115
|
|
|
242
|
-
|
|
243
|
-
if (current === null) return 0;
|
|
244
|
-
if (method === 'before' && current === 0) return lastItem;
|
|
245
|
-
if (method === 'after' && current === lastItem) return 0;
|
|
246
|
-
return method === 'after' ? current + 1 : current - 1;
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
const selectDefaultItem = () => {
|
|
250
|
-
selectedItem.value = propsObj.addOnlyFromAutocomplete && filteredAutocompleteItems.value.length > 0 ? 0 : null;
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
const selectItem = (method) => {
|
|
254
|
-
selectedItem.value = getSelectedIndex(method);
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
const isSelected = (index) => selectedItem.value === index;
|
|
258
|
-
const isMarked = (index) => deletionMark.value === index;
|
|
259
|
-
|
|
260
|
-
const setTagCenter = (el, index) => {
|
|
261
|
-
if (el) {
|
|
262
|
-
tagCenterRefs.value.set(index, el);
|
|
263
|
-
} else {
|
|
264
|
-
tagCenterRefs.value.delete(index);
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
const invokeDelete = () => {
|
|
269
|
-
if (!propsObj.deleteOnBackspace || newTag.value.length > 0) return;
|
|
116
|
+
const searchText = newTag.value.toLowerCase()
|
|
270
117
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
118
|
+
return props.autocompleteItems.filter(item => {
|
|
119
|
+
const itemText = getTagText(item).toLowerCase()
|
|
120
|
+
|
|
121
|
+
// Filter by search text
|
|
122
|
+
if (!itemText.includes(searchText)) return false
|
|
123
|
+
|
|
124
|
+
// Filter out duplicates
|
|
125
|
+
return !isDuplicate(itemText)
|
|
126
|
+
})
|
|
127
|
+
})
|
|
280
128
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
tag: tagsCopy.value[index],
|
|
295
|
-
editTag: () => editTag(index),
|
|
296
|
-
});
|
|
129
|
+
// Methods
|
|
130
|
+
function getTagText(tag) {
|
|
131
|
+
if (tag === null || tag === undefined) return ''
|
|
132
|
+
if (typeof tag === 'string') return tag
|
|
133
|
+
return tag[props.textField] || ''
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function createTag(text) {
|
|
137
|
+
// Preserve format based on existing data
|
|
138
|
+
if (tags.value.length > 0) {
|
|
139
|
+
if (typeof tags.value[0] === 'string') {
|
|
140
|
+
return text
|
|
141
|
+
}
|
|
297
142
|
}
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
const editTag = (index) => {
|
|
301
|
-
if (!propsObj.allowEditTags) return;
|
|
302
|
-
toggleEditMode(index);
|
|
303
|
-
focus(index);
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
const toggleEditMode = (index) => {
|
|
307
|
-
if (!propsObj.allowEditTags || propsObj.disabled) return;
|
|
308
|
-
tagsEditStatus.value[index] = !tagsEditStatus.value[index];
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
const createChangedTag = (index, event) => {
|
|
312
|
-
const tag = tagsCopy.value[index];
|
|
313
|
-
tag.text = event ? event.target.value : tagsCopy.value[index].text;
|
|
314
143
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const cancelEdit = (index) => {
|
|
330
|
-
if (!propsObj.tags[index]) return;
|
|
144
|
+
// Default to object with custom field
|
|
145
|
+
return { [props.textField]: text }
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function isDuplicate(text) {
|
|
149
|
+
const searchText = text.toLowerCase().trim()
|
|
150
|
+
return tags.value.some(tag =>
|
|
151
|
+
getTagText(tag).toLowerCase().trim() === searchText
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function addTag(input) {
|
|
156
|
+
let text = ''
|
|
331
157
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
const createTagTexts = (string) => {
|
|
346
|
-
const regex = new RegExp(propsObj.separators.map(s => quote(s)).join('|'));
|
|
347
|
-
return string.split(regex).map(text => ({ text }));
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
const performDeleteTag = (index) => {
|
|
351
|
-
if (!propsObj.onBeforeDeletingTag) {
|
|
352
|
-
deleteTag(index);
|
|
353
|
-
} else {
|
|
354
|
-
emit('before-deleting-tag', {
|
|
355
|
-
index,
|
|
356
|
-
tag: tagsCopy.value[index],
|
|
357
|
-
deleteTag: () => deleteTag(index),
|
|
358
|
-
});
|
|
158
|
+
if (typeof input === 'string') {
|
|
159
|
+
text = input.trim()
|
|
160
|
+
} else if (typeof input === 'object') {
|
|
161
|
+
// If it's an autocomplete item, preserve the whole object
|
|
162
|
+
if (props.autocompleteItems?.includes(input)) {
|
|
163
|
+
if (!isDuplicate(getTagText(input))) {
|
|
164
|
+
tags.value = [...tags.value, input]
|
|
165
|
+
}
|
|
166
|
+
newTag.value = ''
|
|
167
|
+
selectedIndex.value = -1
|
|
168
|
+
return
|
|
169
|
+
}
|
|
170
|
+
text = getTagText(input).trim()
|
|
359
171
|
}
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
const deleteTag = (index) => {
|
|
363
|
-
if (propsObj.disabled) return;
|
|
364
172
|
|
|
365
|
-
|
|
366
|
-
clearTimeout(deletionMarkTimer.value);
|
|
173
|
+
if (!text || tags.value.length >= props.maxTags) return
|
|
367
174
|
|
|
368
|
-
|
|
369
|
-
newTags.splice(index, 1);
|
|
370
|
-
tagsCopy.value = newTags;
|
|
175
|
+
if (isDuplicate(text)) return
|
|
371
176
|
|
|
372
|
-
|
|
177
|
+
const tag = createTag(text)
|
|
178
|
+
tags.value = [...tags.value, tag]
|
|
179
|
+
newTag.value = ''
|
|
180
|
+
selectedIndex.value = -1
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function removeTag(index) {
|
|
184
|
+
if (props.disabled) return
|
|
373
185
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
if (
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
});
|
|
186
|
+
const newTags = [...tags.value]
|
|
187
|
+
newTags.splice(index, 1)
|
|
188
|
+
tags.value = newTags
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function handleKeyDown(event) {
|
|
192
|
+
// Handle arrow keys for autocomplete navigation
|
|
193
|
+
if (showAutocomplete.value) {
|
|
194
|
+
if (event.key === 'ArrowDown') {
|
|
195
|
+
event.preventDefault()
|
|
196
|
+
selectedIndex.value = Math.min(
|
|
197
|
+
selectedIndex.value + 1,
|
|
198
|
+
filteredAutocomplete.value.length - 1
|
|
199
|
+
)
|
|
200
|
+
return
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (event.key === 'ArrowUp') {
|
|
204
|
+
event.preventDefault()
|
|
205
|
+
selectedIndex.value = Math.max(selectedIndex.value - 1, -1)
|
|
206
|
+
return
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Add selected autocomplete item on Enter
|
|
210
|
+
if (event.key === 'Enter' && selectedIndex.value >= 0) {
|
|
211
|
+
event.preventDefault()
|
|
212
|
+
addTag(filteredAutocomplete.value[selectedIndex.value])
|
|
213
|
+
return
|
|
403
214
|
}
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
const duplicateFilter = (tag) => {
|
|
408
|
-
return propsObj.isDuplicate ?
|
|
409
|
-
!propsObj.isDuplicate(tagsCopy.value, tag) :
|
|
410
|
-
!tagsCopy.value.find(t => t.text === tag.text);
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
const addTag = (tag, source = 'new-tag-input') => {
|
|
414
|
-
const options = filteredAutocompleteItems.value.map(i => i.text);
|
|
415
|
-
if (propsObj.addOnlyFromAutocomplete && options.indexOf(tag.text) === -1) return;
|
|
416
|
-
|
|
417
|
-
nextTick(() => {
|
|
418
|
-
const maximumReached = propsObj.maxTags && propsObj.maxTags <= tagsCopy.value.length;
|
|
419
|
-
if (maximumReached) return emit('max-tags-reached', tag);
|
|
420
|
-
|
|
421
|
-
const dup = propsObj.avoidAddingDuplicates && !duplicateFilter(tag);
|
|
422
|
-
if (dup) return emit('adding-duplicate', tag);
|
|
423
|
-
|
|
424
|
-
if (hasForbiddingAddRule(tag.tiClasses)) return;
|
|
425
|
-
|
|
426
|
-
newTag.value = '';
|
|
427
|
-
tagsCopy.value = [...tagsCopy.value, tag];
|
|
428
|
-
tagsEditStatus.value.push(false);
|
|
429
|
-
|
|
430
|
-
emit('update:tags', tagsCopy.value);
|
|
431
|
-
|
|
432
|
-
if (source === 'autocomplete') newTagInputRef.value?.focus();
|
|
433
|
-
|
|
434
|
-
emit('tags-changed', tagsCopy.value);
|
|
435
|
-
});
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
const performSaveTag = (index, event) => {
|
|
439
|
-
const tag = tagsCopy.value[index];
|
|
440
|
-
|
|
441
|
-
if (propsObj.disabled || (event && noTriggerKey(event, 'addOnKey'))) return;
|
|
442
|
-
if (tag.text.trim().length === 0) return;
|
|
443
|
-
|
|
444
|
-
if (!propsObj['onBeforeSavingTag']) {
|
|
445
|
-
saveTag(index, tag);
|
|
446
|
-
} else {
|
|
447
|
-
emit('before-saving-tag', {
|
|
448
|
-
index,
|
|
449
|
-
tag,
|
|
450
|
-
saveTag: () => saveTag(index, tag),
|
|
451
|
-
});
|
|
452
215
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
216
|
+
|
|
217
|
+
// Check for add triggers
|
|
218
|
+
const shouldAdd = props.addOnKey.some(key => {
|
|
219
|
+
if (typeof key === 'number') {
|
|
220
|
+
return event.keyCode === key
|
|
221
|
+
}
|
|
222
|
+
return event.key === key
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
if (shouldAdd) {
|
|
226
|
+
event.preventDefault()
|
|
227
|
+
addTag(newTag.value)
|
|
228
|
+
return
|
|
464
229
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
newTags[index] = tag;
|
|
470
|
-
tagsCopy.value = newTags;
|
|
471
|
-
toggleEditMode(index);
|
|
472
|
-
|
|
473
|
-
emit('update:tags', tagsCopy.value);
|
|
474
|
-
emit('tags-changed', tagsCopy.value);
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
const tagsEqual = () => {
|
|
478
|
-
return !tagsCopy.value.some((t, i) => !equal(t, propsObj.tags[i]));
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
const updateNewTag = (event) => {
|
|
482
|
-
const value = event.target.value;
|
|
483
|
-
newTag.value = value;
|
|
484
|
-
emit('update:modelValue', value);
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
const initTags = () => {
|
|
488
|
-
tagsCopy.value = createTags(propsObj.tags, propsObj.validation, propsObj.isDuplicate);
|
|
489
|
-
tagsEditStatus.value = new Array(propsObj.tags.length).fill(false);
|
|
490
|
-
|
|
491
|
-
if (!tagsEqual()) {
|
|
492
|
-
emit('update:tags', tagsCopy.value);
|
|
230
|
+
|
|
231
|
+
// Handle backspace to delete last tag
|
|
232
|
+
if (event.key === 'Backspace' && newTag.value === '' && tags.value.length > 0) {
|
|
233
|
+
removeTag(tags.value.length - 1)
|
|
493
234
|
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
const blurredOnClick = (e) => {
|
|
497
|
-
const el = e.currentTarget;
|
|
498
|
-
if (el?.contains(e.target) || el?.contains(document.activeElement)) return;
|
|
499
|
-
performBlur();
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
const performBlur = () => {
|
|
503
|
-
if (propsObj.addOnBlur && focused.value) performAddTags(newTag.value);
|
|
504
|
-
focused.value = false;
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
const handleKeyDown = (event) => {
|
|
508
|
-
const item = filteredAutocompleteItems.value[selectedItem.value] || newTag.value;
|
|
509
|
-
performAddTags(item, event);
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
// Watchers
|
|
513
|
-
watch(() => propsObj.modelValue, (newValue) => {
|
|
514
|
-
if (!propsObj.addOnlyFromAutocomplete) selectedItem.value = null;
|
|
515
|
-
newTag.value = newValue;
|
|
516
|
-
});
|
|
235
|
+
}
|
|
517
236
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
//
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
})
|
|
237
|
+
function handlePaste(event) {
|
|
238
|
+
event.preventDefault()
|
|
239
|
+
|
|
240
|
+
const text = event.clipboardData.getData('text')
|
|
241
|
+
if (!text) return
|
|
242
|
+
|
|
243
|
+
// Create regex from separators
|
|
244
|
+
const separatorRegex = new RegExp(
|
|
245
|
+
props.separators.map(s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|')
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
// Split by separators and add each tag
|
|
249
|
+
const parts = text.split(separatorRegex)
|
|
250
|
+
|
|
251
|
+
parts.forEach(part => {
|
|
252
|
+
if (tags.value.length >= props.maxTags) return
|
|
253
|
+
addTag(part)
|
|
254
|
+
})
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function handleBlur() {
|
|
258
|
+
// Small delay to allow click on autocomplete items
|
|
259
|
+
setTimeout(() => {
|
|
260
|
+
focused.value = false
|
|
261
|
+
selectedIndex.value = -1
|
|
262
|
+
|
|
263
|
+
if (props.addOnBlur && newTag.value) {
|
|
264
|
+
addTag(newTag.value)
|
|
265
|
+
}
|
|
266
|
+
}, 200)
|
|
267
|
+
}
|
|
536
268
|
|
|
537
|
-
//
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
})
|
|
269
|
+
// Reset selected index when autocomplete items change
|
|
270
|
+
watch(filteredAutocomplete, () => {
|
|
271
|
+
selectedIndex.value = -1
|
|
272
|
+
})
|
|
541
273
|
</script>
|
|
542
274
|
|
|
543
|
-
<style
|
|
275
|
+
<style scoped>
|
|
276
|
+
.field-tags-new {
|
|
277
|
+
position: relative;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.tags-container {
|
|
281
|
+
display: flex;
|
|
282
|
+
flex-wrap: wrap;
|
|
283
|
+
align-items: center;
|
|
284
|
+
gap: 0.5rem;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.tag {
|
|
288
|
+
display: inline-flex;
|
|
289
|
+
align-items: center;
|
|
290
|
+
background: rgb(var(--main, 255, 215, 0));
|
|
291
|
+
color: rgb(var(--black, 0, 0, 0));
|
|
292
|
+
padding: 0.25rem 0.5rem;
|
|
293
|
+
border-radius: 2rem;
|
|
294
|
+
font-size: 0.875rem;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.tag-remove {
|
|
298
|
+
margin-left: 0.25rem;
|
|
299
|
+
background: none;
|
|
300
|
+
border: none;
|
|
301
|
+
color: inherit;
|
|
302
|
+
font-size: 1.25rem;
|
|
303
|
+
cursor: pointer;
|
|
304
|
+
padding: 0;
|
|
305
|
+
line-height: 1;
|
|
306
|
+
opacity: 0.7;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.tag-remove:hover {
|
|
310
|
+
opacity: 1;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.tag-input {
|
|
314
|
+
flex: 1;
|
|
315
|
+
border: none;
|
|
316
|
+
background: none;
|
|
317
|
+
outline: none;
|
|
318
|
+
min-width: 150px;
|
|
319
|
+
padding: 0.25rem;
|
|
320
|
+
font-size: inherit;
|
|
321
|
+
font-family: inherit;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.tag-input:disabled {
|
|
325
|
+
cursor: not-allowed;
|
|
326
|
+
opacity: 0.5;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.autocomplete {
|
|
330
|
+
position: absolute;
|
|
331
|
+
top: 100%;
|
|
332
|
+
left: 0;
|
|
333
|
+
right: 0;
|
|
334
|
+
margin-top: 0.25rem;
|
|
335
|
+
background: white;
|
|
336
|
+
border: 1px solid rgb(var(--gray, 224, 224, 224));
|
|
337
|
+
border-radius: 0.5rem;
|
|
338
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
339
|
+
max-height: 200px;
|
|
340
|
+
overflow-y: auto;
|
|
341
|
+
z-index: 100;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.autocomplete-item {
|
|
345
|
+
padding: 0.5rem 0.75rem;
|
|
346
|
+
cursor: pointer;
|
|
347
|
+
transition: background-color 0.2s;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.autocomplete-item:hover,
|
|
351
|
+
.autocomplete-item.selected {
|
|
352
|
+
background: rgb(var(--gray-light, 248, 248, 248));
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.autocomplete-item:first-child {
|
|
356
|
+
border-radius: 0.5rem 0.5rem 0 0;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.autocomplete-item:last-child {
|
|
360
|
+
border-radius: 0 0 0.5rem 0.5rem;
|
|
361
|
+
}
|
|
362
|
+
</style>
|