@ozdao/martyrs 0.2.544 → 0.2.546
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/martyrs/src/components/Feed/{Feed.vue2.cjs → Feed.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Feed/{Feed.vue2.js.map → Feed.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Feed/{Feed.vue2.js → Feed.vue.js} +2 -2
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -0
- package/dist/martyrs/src/components/FieldTags/{BlockTags.vue2.cjs → BlockTags.vue.cjs} +2 -2
- package/dist/martyrs/src/components/FieldTags/{BlockTags.vue2.js.map → BlockTags.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/FieldTags/{BlockTags.vue2.js → BlockTags.vue.js} +2 -2
- package/dist/martyrs/src/components/FieldTags/BlockTags.vue.js.map +1 -0
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.cjs → Spoiler.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js.map → Spoiler.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue2.js → Spoiler.vue.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +1 -0
- package/dist/martyrs/src/components/UploadImage/{UploadImage.vue2.cjs → UploadImage.vue.cjs} +2 -2
- package/dist/martyrs/src/components/UploadImage/{UploadImage.vue2.js.map → UploadImage.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/UploadImage/{UploadImage.vue2.js → UploadImage.vue.js} +2 -2
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Blog.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsSearch.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsSearch.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/globals.client.cjs +6 -0
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +6 -0
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockMultiselect.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockMultiselect.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.cjs +1 -1
- package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.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/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.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 +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
- 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/MusicHome.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.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/Track.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
- package/dist/martyrs/src/modules/notifications/router/notifications.router.cjs +1 -1
- package/dist/martyrs/src/modules/notifications/router/notifications.router.cjs.map +1 -1
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js +1 -1
- package/dist/martyrs/src/modules/notifications/router/notifications.router.js.map +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/Applications.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Customers.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/pages/Orders.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +5 -5
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +5 -5
- 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 +3 -3
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +5 -5
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +5 -5
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +5 -5
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +5 -5
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.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/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 +2 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.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/FilterProducts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/package.json +1 -1
- package/src/modules/globals/globals.client.js +7 -0
- package/src/modules/globals/views/utils/vue-app-renderer.js +1 -1
- package/src/modules/notifications/router/notifications.router.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/FieldTags/BlockTags.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue2.cjs.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
|
@@ -12,7 +12,7 @@ const BlockSorting = require("../../modules/globals/views/components/blocks/Bloc
|
|
|
12
12
|
const Filters = require("../../modules/globals/views/components/sections/Filters.vue2.cjs");
|
|
13
13
|
const ButtonSort = require("../../modules/globals/views/components/elements/ButtonSort.vue.cjs");
|
|
14
14
|
const ButtonDate = require("../../modules/globals/views/components/elements/ButtonDate.vue.cjs");
|
|
15
|
-
;/* empty css
|
|
15
|
+
;/* empty css */
|
|
16
16
|
const _hoisted_1 = {
|
|
17
17
|
key: 0,
|
|
18
18
|
style: { "transform": "scale(1)" },
|
|
@@ -427,4 +427,4 @@ const _sfc_main = {
|
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
429
|
exports.default = _sfc_main;
|
|
430
|
-
//# sourceMappingURL=Feed.
|
|
430
|
+
//# sourceMappingURL=Feed.vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feed.vue2.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n <div v-if=\"search || date || (sort && !sort.hideButton)\" style=\"transform: scale(1);\" class=\"mn-b-thin pos-relative z-index-2 pos-relative flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <FiltersBar\n v-if=\"filter\"\n v-model=\"filter.selected\"\n :filters=\"filterConfig\"\n :class=\"filter.class || 'mobile-only'\"\n />\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-medium w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-medium aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-medium t-white bg-black\"\n />\n </Dropdown> \n\n <!-- Actions -->\n <template\n v-if=\"actions.length\"\n >\n <template v-for=\"action in actions\" :key=\"action.key\">\n <div \n :class=\"action.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <component\n :is=\"action.component\"\n @click=\"action.handler\"\n class=\"w-1r h-auto\"\n >\n </component>\n\n </div>\n </template>\n </template>\n </div>\n\n <TransitionGroup \n v-if=\"isLoading && !keepSlotVisible\"\n tag=\"ul\" \n name=\"scaleTransition\" \n class=\"pos-relative z-index-1\"\n :class=\"$attrs.class\"\n >\n <Skeleton\n v-if=\"isLoading && !skeleton?.hide\"\n v-for=\"i in currentLimit\" \n :structure=\"skeleton.structure\"\n :horizontal=\"skeleton.horizontal\"\n :loading=\"skeleton.apply_to_slot\"\n :key=\"'skeleton-' + i\"\n :class=\"replaceClasses('radius-medium bg-light pd-thin flex-child-default o-hidden d-block', skeleton.class)\"\n />\n <Loader v-if=\"isLoading && skeleton?.hide\"/>\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-else-if=\"itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n :class=\"replaceClasses('pd-medium bg-light radius-medium', states.empty.class)\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n v-else-if=\"!keepSlotVisible || !isLoading\"\n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <!-- Slot visible with overlay loader -->\n <div v-else class=\"pos-relative\">\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n \n <!-- Overlay loader -->\n <div \n v-if=\"isLoading && keepSlotVisible\"\n class=\"pos-absolute pos-t-0 pos-l-0 w-100 h-100 flex-center bg-white-transp-90 z-index-10\"\n >\n <Loader />\n </div>\n </div>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, watch } from 'vue';\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\nimport SkeletonEvent from '@martyrs/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport Skeleton from '@martyrs/src/components/Skeleton/Skeleton.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@martyrs/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@martyrs/src/components/Calendar/Calendar.vue'\nimport BottomSheet from '@martyrs/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@martyrs/src/modules/globals/views/components/blocks/BlockSorting.vue'\n\nimport FiltersBar from '@martyrs/src/modules/globals/views/components/sections/Filters.vue'\n\nimport ButtonSort from '@martyrs/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@martyrs/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\n\nconst { replaceClasses } = useGlobalMixins();\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Внутреннее хранилище для случая, когда v-model:items не передан\nconst internalItems = ref([])\n\n// Элегантное решение через computed\nconst itemsList = computed({\n get: () => items.value ?? internalItems.value,\n set: (val) => {\n if (items.value !== undefined) {\n items.value = val\n } else {\n internalItems.value = val\n }\n }\n})\n\nconst filterConfig = computed(() => {\n if (!filter.value?.options) return []\n \n return filter.value.options.map(opt => ({\n key: opt.value,\n title: opt.title,\n type: 'options',\n options: opt.options || [],\n defaultValue: null\n }))\n})\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: 'Nothing found',\n description: 'Sorry, nothing found',\n },\n }),\n },\n actions: {\n type: Array,\n default: () => []\n },\n skeleton: {\n type: Object,\n default: () => ({\n hide: false,\n horizontal: false,\n structure: [\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'large' },\n { block: 'button', size: 'small' }\n ]\n }),\n \n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 10, \n skip: 0 ,\n owner: null,\n creator: null,\n customer: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n keepSlotVisible: {\n type: Boolean,\n default: false\n },\n});\n \nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\nlet currentSearch = ref('');\nlet isSearching = ref(false);\n\nlet requestId = 0;\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n isSearching.value = true;\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 500);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst removeNullValues = (obj) => {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value != null)\n );\n};\n\nconst loadMoreItems = async () => {\n if (!hasMoreItems.value || isLoadingExtra.value) {\n return;\n }\n \n isLoadingExtra.value = true;\n \n const currentRequestId = ++requestId;\n\n currentSkip.value += currentLimit.value;\n \n try {\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n // Элегантное обновление через computed setter\n itemsList.value = [...itemsList.value, ...data];\n \n } catch (error) {\n console.error('Load more error:', error);\n } finally {\n if (currentRequestId === requestId) {\n isLoadingExtra.value = false;\n }\n }\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n \n const currentRequestId = ++requestId;\n \n if (isSearching.value) {\n itemsList.value = [];\n isSearching.value = false;\n }\n \n try {\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n // Элегантное обновление через computed setter\n itemsList.value = data;\n \n } catch (error) {\n console.error('Fetch error:', error);\n } finally {\n if (currentRequestId === requestId) {\n isLoading.value = false;\n }\n }\n};\n\nwatch(\n [() => props.external, () => date.value, () => ({...sort.value}), () => ({...props.options})],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n<style>\n.feed-move,\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n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AAA,MACE,CAAC,MAAM,MAAM,UAAU,MAAM,KAAK,OAAO,OAAO,EAAC,GAAG,KAAK,MAAK,IAAI,OAAO,EAAC,GAAG,MAAM,QAAO,EAAE;AAAA,MAC5F,CAAC,CAAC,aAAa,SAAS,SAAS,UAAU,GAAG,CAAC,aAAa,SAAS,SAAS,UAAU,MAAM;AAC5F,YACE,gBAAgB,eAChB,YAAY,WACZ,SAAS,UAAU,SAAS,SAC5B,SAAS,UAAU,SAAS,SAC5B,KAAK,UAAU,UAAU,MAAM,KAAK,UAAU,UAAU,GACxD;AACA,sBAAY,QAAQ;AACpB,qBAAU;AAAA,QACZ;AAAA,MACF;AAAA,MACA,EAAE,MAAM,KAAI;AAAA,IACd;AAEA,QAAI,WAAW;AAEf,cAAU,YAAY;AACpB,YAAM,WAAU;AAEhB,UAAI,OAAO,WAAW,eAAe,CAAC,MAAM,gBAAgB,MAAM,UAAU;AAC1E,mBAAW,IAAI,qBAAqB,aAAW;AAC7C,cAAI,QAAQ,KAAK,WAAS,MAAM,cAAc,GAAG;AAC/C,0BAAa;AAAA,UACf;AAAA,QACF,CAAC;AAED,YAAI,SAAS,MAAO,UAAS,QAAQ,SAAS,KAAK;AAAA,MACrD;AAAA,IACF,CAAC;AAED,gBAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACrB;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Feed.vue.cjs","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n <div v-if=\"search || date || (sort && !sort.hideButton)\" style=\"transform: scale(1);\" class=\"mn-b-thin pos-relative z-index-2 pos-relative flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <FiltersBar\n v-if=\"filter\"\n v-model=\"filter.selected\"\n :filters=\"filterConfig\"\n :class=\"filter.class || 'mobile-only'\"\n />\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-medium w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-medium aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-medium t-white bg-black\"\n />\n </Dropdown> \n\n <!-- Actions -->\n <template\n v-if=\"actions.length\"\n >\n <template v-for=\"action in actions\" :key=\"action.key\">\n <div \n :class=\"action.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <component\n :is=\"action.component\"\n @click=\"action.handler\"\n class=\"w-1r h-auto\"\n >\n </component>\n\n </div>\n </template>\n </template>\n </div>\n\n <TransitionGroup \n v-if=\"isLoading && !keepSlotVisible\"\n tag=\"ul\" \n name=\"scaleTransition\" \n class=\"pos-relative z-index-1\"\n :class=\"$attrs.class\"\n >\n <Skeleton\n v-if=\"isLoading && !skeleton?.hide\"\n v-for=\"i in currentLimit\" \n :structure=\"skeleton.structure\"\n :horizontal=\"skeleton.horizontal\"\n :loading=\"skeleton.apply_to_slot\"\n :key=\"'skeleton-' + i\"\n :class=\"replaceClasses('radius-medium bg-light pd-thin flex-child-default o-hidden d-block', skeleton.class)\"\n />\n <Loader v-if=\"isLoading && skeleton?.hide\"/>\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-else-if=\"itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n :class=\"replaceClasses('pd-medium bg-light radius-medium', states.empty.class)\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n v-else-if=\"!keepSlotVisible || !isLoading\"\n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <!-- Slot visible with overlay loader -->\n <div v-else class=\"pos-relative\">\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n \n <!-- Overlay loader -->\n <div \n v-if=\"isLoading && keepSlotVisible\"\n class=\"pos-absolute pos-t-0 pos-l-0 w-100 h-100 flex-center bg-white-transp-90 z-index-10\"\n >\n <Loader />\n </div>\n </div>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, watch } from 'vue';\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\nimport SkeletonEvent from '@martyrs/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport Skeleton from '@martyrs/src/components/Skeleton/Skeleton.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@martyrs/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@martyrs/src/components/Calendar/Calendar.vue'\nimport BottomSheet from '@martyrs/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@martyrs/src/modules/globals/views/components/blocks/BlockSorting.vue'\n\nimport FiltersBar from '@martyrs/src/modules/globals/views/components/sections/Filters.vue'\n\nimport ButtonSort from '@martyrs/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@martyrs/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\n\nconst { replaceClasses } = useGlobalMixins();\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Внутреннее хранилище для случая, когда v-model:items не передан\nconst internalItems = ref([])\n\n// Элегантное решение через computed\nconst itemsList = computed({\n get: () => items.value ?? internalItems.value,\n set: (val) => {\n if (items.value !== undefined) {\n items.value = val\n } else {\n internalItems.value = val\n }\n }\n})\n\nconst filterConfig = computed(() => {\n if (!filter.value?.options) return []\n \n return filter.value.options.map(opt => ({\n key: opt.value,\n title: opt.title,\n type: 'options',\n options: opt.options || [],\n defaultValue: null\n }))\n})\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: 'Nothing found',\n description: 'Sorry, nothing found',\n },\n }),\n },\n actions: {\n type: Array,\n default: () => []\n },\n skeleton: {\n type: Object,\n default: () => ({\n hide: false,\n horizontal: false,\n structure: [\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'large' },\n { block: 'button', size: 'small' }\n ]\n }),\n \n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 10, \n skip: 0 ,\n owner: null,\n creator: null,\n customer: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n keepSlotVisible: {\n type: Boolean,\n default: false\n },\n});\n \nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\nlet currentSearch = ref('');\nlet isSearching = ref(false);\n\nlet requestId = 0;\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n isSearching.value = true;\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 500);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst removeNullValues = (obj) => {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value != null)\n );\n};\n\nconst loadMoreItems = async () => {\n if (!hasMoreItems.value || isLoadingExtra.value) {\n return;\n }\n \n isLoadingExtra.value = true;\n \n const currentRequestId = ++requestId;\n\n currentSkip.value += currentLimit.value;\n \n try {\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n // Элегантное обновление через computed setter\n itemsList.value = [...itemsList.value, ...data];\n \n } catch (error) {\n console.error('Load more error:', error);\n } finally {\n if (currentRequestId === requestId) {\n isLoadingExtra.value = false;\n }\n }\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n \n const currentRequestId = ++requestId;\n \n if (isSearching.value) {\n itemsList.value = [];\n isSearching.value = false;\n }\n \n try {\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n // Элегантное обновление через computed setter\n itemsList.value = data;\n \n } catch (error) {\n console.error('Fetch error:', error);\n } finally {\n if (currentRequestId === requestId) {\n isLoading.value = false;\n }\n }\n};\n\nwatch(\n [() => props.external, () => date.value, () => ({...sort.value}), () => ({...props.options})],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n<style>\n.feed-move,\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["useGlobalMixins","_useModel","ref","computed","search","watch","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8LA,UAAM,EAAE,eAAc,IAAKA,uBAAe;AAE1C,UAAM,SAASC,IAAAA,SAAW,SAAC,QAAQ;AACnC,UAAM,OAAOA,IAAAA,SAAW,SAAC,MAAM;AAC/B,UAAM,SAASA,IAAAA,SAAW,SAAC,QAAQ;AACnC,UAAM,OAAOA,IAAAA,SAAW,SAAC,MAAM;AAC/B,UAAM,QAAQA,IAAAA,SAAW,SAAC,OAAO;AAGjC,UAAM,gBAAgBC,IAAAA,IAAI,CAAA,CAAE;AAG5B,UAAM,YAAYC,IAAAA,SAAS;AAAA,MACzB,KAAK,MAAM,MAAM,SAAS,cAAc;AAAA,MACxC,KAAK,CAAC,QAAQ;AACZ,YAAI,MAAM,UAAU,QAAW;AAC7B,gBAAM,QAAQ;AAAA,QAChB,OAAO;AACL,wBAAc,QAAQ;AAAA,QACxB;AAAA,MACF;AAAA,IACF,CAAC;AAED,UAAM,eAAeA,IAAAA,SAAS,MAAM;AAClC,UAAI,CAAC,OAAO,OAAO,QAAS,QAAO,CAAA;AAEnC,aAAO,OAAO,MAAM,QAAQ,IAAI,UAAQ;AAAA,QACtC,KAAK,IAAI;AAAA,QACT,OAAO,IAAI;AAAA,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AAAA,YAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACrB;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,7 +10,7 @@ import _sfc_main$5 from "../../modules/globals/views/components/blocks/BlockSort
|
|
|
10
10
|
import Filters from "../../modules/globals/views/components/sections/Filters.vue2.js";
|
|
11
11
|
import _sfc_main$4 from "../../modules/globals/views/components/elements/ButtonSort.vue.js";
|
|
12
12
|
import _sfc_main$3 from "../../modules/globals/views/components/elements/ButtonDate.vue.js";
|
|
13
|
-
/* empty css
|
|
13
|
+
/* empty css */
|
|
14
14
|
const _hoisted_1 = {
|
|
15
15
|
key: 0,
|
|
16
16
|
style: { "transform": "scale(1)" },
|
|
@@ -427,4 +427,4 @@ const _sfc_main = {
|
|
|
427
427
|
export {
|
|
428
428
|
_sfc_main as default
|
|
429
429
|
};
|
|
430
|
-
//# sourceMappingURL=Feed.
|
|
430
|
+
//# sourceMappingURL=Feed.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feed.vue.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n <div v-if=\"search || date || (sort && !sort.hideButton)\" style=\"transform: scale(1);\" class=\"mn-b-thin pos-relative z-index-2 pos-relative flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <FiltersBar\n v-if=\"filter\"\n v-model=\"filter.selected\"\n :filters=\"filterConfig\"\n :class=\"filter.class || 'mobile-only'\"\n />\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-medium w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-medium aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-medium t-white bg-black\"\n />\n </Dropdown> \n\n <!-- Actions -->\n <template\n v-if=\"actions.length\"\n >\n <template v-for=\"action in actions\" :key=\"action.key\">\n <div \n :class=\"action.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <component\n :is=\"action.component\"\n @click=\"action.handler\"\n class=\"w-1r h-auto\"\n >\n </component>\n\n </div>\n </template>\n </template>\n </div>\n\n <TransitionGroup \n v-if=\"isLoading && !keepSlotVisible\"\n tag=\"ul\" \n name=\"scaleTransition\" \n class=\"pos-relative z-index-1\"\n :class=\"$attrs.class\"\n >\n <Skeleton\n v-if=\"isLoading && !skeleton?.hide\"\n v-for=\"i in currentLimit\" \n :structure=\"skeleton.structure\"\n :horizontal=\"skeleton.horizontal\"\n :loading=\"skeleton.apply_to_slot\"\n :key=\"'skeleton-' + i\"\n :class=\"replaceClasses('radius-medium bg-light pd-thin flex-child-default o-hidden d-block', skeleton.class)\"\n />\n <Loader v-if=\"isLoading && skeleton?.hide\"/>\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-else-if=\"itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n :class=\"replaceClasses('pd-medium bg-light radius-medium', states.empty.class)\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n v-else-if=\"!keepSlotVisible || !isLoading\"\n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <!-- Slot visible with overlay loader -->\n <div v-else class=\"pos-relative\">\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n \n <!-- Overlay loader -->\n <div \n v-if=\"isLoading && keepSlotVisible\"\n class=\"pos-absolute pos-t-0 pos-l-0 w-100 h-100 flex-center bg-white-transp-90 z-index-10\"\n >\n <Loader />\n </div>\n </div>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, watch } from 'vue';\nimport { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\nimport SkeletonEvent from '@martyrs/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport Skeleton from '@martyrs/src/components/Skeleton/Skeleton.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@martyrs/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@martyrs/src/components/Calendar/Calendar.vue'\nimport BottomSheet from '@martyrs/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@martyrs/src/modules/globals/views/components/blocks/BlockSorting.vue'\n\nimport FiltersBar from '@martyrs/src/modules/globals/views/components/sections/Filters.vue'\n\nimport ButtonSort from '@martyrs/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@martyrs/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\n\nconst { replaceClasses } = useGlobalMixins();\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Внутреннее хранилище для случая, когда v-model:items не передан\nconst internalItems = ref([])\n\n// Элегантное решение через computed\nconst itemsList = computed({\n get: () => items.value ?? internalItems.value,\n set: (val) => {\n if (items.value !== undefined) {\n items.value = val\n } else {\n internalItems.value = val\n }\n }\n})\n\nconst filterConfig = computed(() => {\n if (!filter.value?.options) return []\n \n return filter.value.options.map(opt => ({\n key: opt.value,\n title: opt.title,\n type: 'options',\n options: opt.options || [],\n defaultValue: null\n }))\n})\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: 'Nothing found',\n description: 'Sorry, nothing found',\n },\n }),\n },\n actions: {\n type: Array,\n default: () => []\n },\n skeleton: {\n type: Object,\n default: () => ({\n hide: false,\n horizontal: false,\n structure: [\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'large' },\n { block: 'button', size: 'small' }\n ]\n }),\n \n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 10, \n skip: 0 ,\n owner: null,\n creator: null,\n customer: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n keepSlotVisible: {\n type: Boolean,\n default: false\n },\n});\n \nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\nlet currentSearch = ref('');\nlet isSearching = ref(false);\n\nlet requestId = 0;\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n isSearching.value = true;\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 500);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst removeNullValues = (obj) => {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value != null)\n );\n};\n\nconst loadMoreItems = async () => {\n if (!hasMoreItems.value || isLoadingExtra.value) {\n return;\n }\n \n isLoadingExtra.value = true;\n \n const currentRequestId = ++requestId;\n\n currentSkip.value += currentLimit.value;\n \n try {\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n // Элегантное обновление через computed setter\n itemsList.value = [...itemsList.value, ...data];\n \n } catch (error) {\n console.error('Load more error:', error);\n } finally {\n if (currentRequestId === requestId) {\n isLoadingExtra.value = false;\n }\n }\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n \n const currentRequestId = ++requestId;\n \n if (isSearching.value) {\n itemsList.value = [];\n isSearching.value = false;\n }\n \n try {\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n // Элегантное обновление через computed setter\n itemsList.value = data;\n \n } catch (error) {\n console.error('Fetch error:', error);\n } finally {\n if (currentRequestId === requestId) {\n isLoading.value = false;\n }\n }\n};\n\nwatch(\n [() => props.external, () => date.value, () => ({...sort.value}), () => ({...props.options})],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n<style>\n.feed-move,\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-le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,QACpB;AAAA,MACF;AAAA,IACF;AAEA;AAAA,MACE,CAAC,MAAM,MAAM,UAAU,MAAM,KAAK,OAAO,OAAO,EAAC,GAAG,KAAK,MAAK,IAAI,OAAO,EAAC,GAAG,MAAM,QAAO,EAAE;AAAA,MAC5F,CAAC,CAAC,aAAa,SAAS,SAAS,UAAU,GAAG,CAAC,aAAa,SAAS,SAAS,UAAU,MAAM;AAC5F,YACE,gBAAgB,eAChB,YAAY,WACZ,SAAS,UAAU,SAAS,SAC5B,SAAS,UAAU,SAAS,SAC5B,KAAK,UAAU,UAAU,MAAM,KAAK,UAAU,UAAU,GACxD;AACA,sBAAY,QAAQ;AACpB,qBAAU;AAAA,QACZ;AAAA,MACF;AAAA,MACA,EAAE,MAAM,KAAI;AAAA,IACd;AAEA,QAAI,WAAW;AAEf,cAAU,YAAY;AACpB,YAAM,WAAU;AAEhB,UAAI,OAAO,WAAW,eAAe,CAAC,MAAM,gBAAgB,MAAM,UAAU;AAC1E,mBAAW,IAAI,qBAAqB,aAAW;AAC7C,cAAI,QAAQ,KAAK,WAAS,MAAM,cAAc,GAAG;AAC/C,0BAAa;AAAA,UACf;AAAA,QACF,CAAC;AAED,YAAI,SAAS,MAAO,UAAS,QAAQ,SAAS,KAAK;AAAA,MACrD;AAAA,IACF,CAAC;AAED,gBAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACrB;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const FieldTags = require("./FieldTags.vue2.cjs");
|
|
5
|
-
;/* empty css
|
|
5
|
+
;/* empty css */
|
|
6
6
|
const _hoisted_1 = ["onClick"];
|
|
7
7
|
const _hoisted_2 = { key: 1 };
|
|
8
8
|
const _sfc_main = {
|
|
@@ -91,4 +91,4 @@ const _sfc_main = {
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
exports.default = _sfc_main;
|
|
94
|
-
//# sourceMappingURL=BlockTags.
|
|
94
|
+
//# sourceMappingURL=BlockTags.vue.cjs.map
|
package/dist/martyrs/src/components/FieldTags/{BlockTags.vue2.js.map → BlockTags.vue.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockTags.
|
|
1
|
+
{"version":3,"file":"BlockTags.vue.cjs","sources":["../../../../../src/components/FieldTags/BlockTags.vue"],"sourcesContent":["<template>\n <div>\n <FieldTags\n v-model=\"selectedTags\"\n :autocomplete-items=\"filteredItems\"\n :add-on-key=\"[13, ':', ';', ',']\"\n :separators=\"[';', ',']\"\n :max-tags=\"20\"\n :maxlength=\"20\"\n :placeholder=\"'Please add tags'\"\n @tags-changed=\"handleTagsChanged\"\n class=\"mn-b-thin bg-light radius-medium pd-small\"\n />\n \n <input\n v-model=\"tag\"\n @keydown.enter=\"addTagFromInput\"\n placeholder=\"Type to filter suggestions\"\n class=\"hidden-input\"\n style=\"position: absolute; left: -9999px;\"\n />\n\n <p class=\"p-small mn-b-thin\">Suggested:</p>\n\n <span \n v-if=\"filteredSuggestedItems.length > 0\" \n v-for=\"(tag,index) in filteredSuggestedItems\" \n @click=\"addTag(tag)\"\n class=\"cursor-pointer t-medium ti-tag-toDefactor\"\n :class=\"{'mn-r-micro':index !== filteredSuggestedItems.length - 1}\"\n >\n {{ tag.text }}\n </span>\n <span v-else>You added all suggested tags</span> \n </div>\n</template>\n\n<script setup>\nimport FieldTags from '@martyrs/src/components/FieldTags/FieldTags.vue'\nimport { ref, computed, onMounted } from 'vue';\n\nconst emits = defineEmits(['tags-changed']);\nconst props = defineProps({\n tags: {\n type: Array\n },\n tagsSuggested: {\n type: Array,\n default: [\n { text: 'story' },\n { text: 'news' },\n { text: 'guide' },\n { text: 'discussion' },\n { text: 'photos' },\n ]\n }\n});\n\nconst tag = ref('');\nconst selectedTags = ref([]);\nconst autocompleteItems = ref(props.tagsSuggested);\n\n// Initialize tags\nif (props.tags) {\n selectedTags.value = props.tags.map(tag => \n typeof tag === 'string' ? { text: tag } : tag\n );\n}\n\n// Filter autocomplete items based on current input\nconst filteredItems = computed(() => {\n return autocompleteItems.value;\n});\n\nconst filteredSuggestedItems = computed(() => {\n return autocompleteItems.value.filter(item => {\n return !selectedTags.value.some(tag => tag.text === item.text);\n });\n })\n\nfunction addTag (tagToAdd) {\n selectedTags.value.push(tagToAdd)\n emits('tags-changed', selectedTags.value.map(t => t.text));\n}\n\nfunction addTagFromInput() {\n if (tag.value) {\n addTag({ text: tag.value });\n tag.value = '';\n }\n}\n\nfunction handleTagsChanged(newTags) {\n selectedTags.value = newTags;\n emits('tags-changed', newTags.map(t => typeof t === 'string' ? t : t.text));\n}\n\n\n\n</script>\n\n<style>\n .ti-tag-toDefactor {\n background-color: rgb(var(--main));\n color: rgb(var(--black));\n border-radius: 4rem;\n padding: 1px 8px 2px;\n margin: 2px;\n font-size: .85em;\n }\n</style>"],"names":["ref","tag","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,UAAM,QAAQ;AACd,UAAM,QAAQ;AAgBd,UAAM,MAAMA,IAAAA,IAAI,EAAE;AAClB,UAAM,eAAeA,IAAAA,IAAI,EAAE;AAC3B,UAAM,oBAAoBA,IAAAA,IAAI,MAAM,aAAa;AAGjD,QAAI,MAAM,MAAM;AACd,mBAAa,QAAQ,MAAM,KAAK;AAAA,QAAI,CAAAC,SAClC,OAAOA,SAAQ,WAAW,EAAE,MAAMA,KAAG,IAAKA;AAAA,MAC9C;AAAA,IACA;AAGA,UAAM,gBAAgBC,IAAAA,SAAS,MAAM;AACnC,aAAO,kBAAkB;AAAA,IAC3B,CAAC;AAED,UAAM,yBAAyBA,IAAAA,SAAS,MAAM;AAC1C,aAAO,kBAAkB,MAAM,OAAO,UAAQ;AAC5C,eAAO,CAAC,aAAa,MAAM,KAAK,CAAAD,SAAOA,KAAI,SAAS,KAAK,IAAI;AAAA,MAC/D,CAAC;AAAA,IACH,CAAC;AAEH,aAAS,OAAQ,UAAU;AACzB,mBAAa,MAAM,KAAK,QAAQ;AAChC,YAAM,gBAAgB,aAAa,MAAM,IAAI,OAAK,EAAE,IAAI,CAAC;AAAA,IAC3D;AAEA,aAAS,kBAAkB;AACzB,UAAI,IAAI,OAAO;AACb,eAAO,EAAE,MAAM,IAAI,MAAK,CAAE;AAC1B,YAAI,QAAQ;AAAA,MACd;AAAA,IACF;AAEA,aAAS,kBAAkB,SAAS;AAClC,mBAAa,QAAQ;AACrB,YAAM,gBAAgB,QAAQ,IAAI,OAAK,OAAO,MAAM,WAAW,IAAI,EAAE,IAAI,CAAC;AAAA,IAC5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, createElementBlock, openBlock, createVNode, withDirectives, createElementVNode, withKeys, vModelText, Fragment, renderList, normalizeClass, toDisplayString } from "vue";
|
|
2
2
|
import FieldTags from "./FieldTags.vue2.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
const _hoisted_1 = ["onClick"];
|
|
5
5
|
const _hoisted_2 = { key: 1 };
|
|
6
6
|
const _sfc_main = {
|
|
@@ -91,4 +91,4 @@ const _sfc_main = {
|
|
|
91
91
|
export {
|
|
92
92
|
_sfc_main as default
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=BlockTags.
|
|
94
|
+
//# sourceMappingURL=BlockTags.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockTags.vue.js","sources":["../../../../../src/components/FieldTags/BlockTags.vue"],"sourcesContent":["<template>\n <div>\n <FieldTags\n v-model=\"selectedTags\"\n :autocomplete-items=\"filteredItems\"\n :add-on-key=\"[13, ':', ';', ',']\"\n :separators=\"[';', ',']\"\n :max-tags=\"20\"\n :maxlength=\"20\"\n :placeholder=\"'Please add tags'\"\n @tags-changed=\"handleTagsChanged\"\n class=\"mn-b-thin bg-light radius-medium pd-small\"\n />\n \n <input\n v-model=\"tag\"\n @keydown.enter=\"addTagFromInput\"\n placeholder=\"Type to filter suggestions\"\n class=\"hidden-input\"\n style=\"position: absolute; left: -9999px;\"\n />\n\n <p class=\"p-small mn-b-thin\">Suggested:</p>\n\n <span \n v-if=\"filteredSuggestedItems.length > 0\" \n v-for=\"(tag,index) in filteredSuggestedItems\" \n @click=\"addTag(tag)\"\n class=\"cursor-pointer t-medium ti-tag-toDefactor\"\n :class=\"{'mn-r-micro':index !== filteredSuggestedItems.length - 1}\"\n >\n {{ tag.text }}\n </span>\n <span v-else>You added all suggested tags</span> \n </div>\n</template>\n\n<script setup>\nimport FieldTags from '@martyrs/src/components/FieldTags/FieldTags.vue'\nimport { ref, computed, onMounted } from 'vue';\n\nconst emits = defineEmits(['tags-changed']);\nconst props = defineProps({\n tags: {\n type: Array\n },\n tagsSuggested: {\n type: Array,\n default: [\n { text: 'story' },\n { text: 'news' },\n { text: 'guide' },\n { text: 'discussion' },\n { text: 'photos' },\n ]\n }\n});\n\nconst tag = ref('');\nconst selectedTags = ref([]);\nconst autocompleteItems = ref(props.tagsSuggested);\n\n// Initialize tags\nif (props.tags) {\n selectedTags.value = props.tags.map(tag => \n typeof tag === 'string' ? { text: tag } : tag\n );\n}\n\n// Filter autocomplete items based on current input\nconst filteredItems = computed(() => {\n return autocompleteItems.value;\n});\n\nconst filteredSuggestedItems = computed(() => {\n return autocompleteItems.value.filter(item => {\n return !selectedTags.value.some(tag => tag.text === item.text);\n });\n })\n\nfunction addTag (tagToAdd) {\n selectedTags.value.push(tagToAdd)\n emits('tags-changed', selectedTags.value.map(t => t.text));\n}\n\nfunction addTagFromInput() {\n if (tag.value) {\n addTag({ text: tag.value });\n tag.value = '';\n }\n}\n\nfunction handleTagsChanged(newTags) {\n selectedTags.value = newTags;\n emits('tags-changed', newTags.map(t => typeof t === 'string' ? t : t.text));\n}\n\n\n\n</script>\n\n<style>\n .ti-tag-toDefactor {\n background-color: rgb(var(--main));\n color: rgb(var(--black));\n border-radius: 4rem;\n padding: 1px 8px 2px;\n margin: 2px;\n font-size: .85em;\n }\n</style>"],"names":["tag"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyCA,UAAM,QAAQ;AACd,UAAM,QAAQ;AAgBd,UAAM,MAAM,IAAI,EAAE;AAClB,UAAM,eAAe,IAAI,EAAE;AAC3B,UAAM,oBAAoB,IAAI,MAAM,aAAa;AAGjD,QAAI,MAAM,MAAM;AACd,mBAAa,QAAQ,MAAM,KAAK;AAAA,QAAI,CAAAA,SAClC,OAAOA,SAAQ,WAAW,EAAE,MAAMA,KAAG,IAAKA;AAAA,MAC9C;AAAA,IACA;AAGA,UAAM,gBAAgB,SAAS,MAAM;AACnC,aAAO,kBAAkB;AAAA,IAC3B,CAAC;AAED,UAAM,yBAAyB,SAAS,MAAM;AAC1C,aAAO,kBAAkB,MAAM,OAAO,UAAQ;AAC5C,eAAO,CAAC,aAAa,MAAM,KAAK,CAAAA,SAAOA,KAAI,SAAS,KAAK,IAAI;AAAA,MAC/D,CAAC;AAAA,IACH,CAAC;AAEH,aAAS,OAAQ,UAAU;AACzB,mBAAa,MAAM,KAAK,QAAQ;AAChC,YAAM,gBAAgB,aAAa,MAAM,IAAI,OAAK,EAAE,IAAI,CAAC;AAAA,IAC3D;AAEA,aAAS,kBAAkB;AACzB,UAAI,IAAI,OAAO;AACb,eAAO,EAAE,MAAM,IAAI,MAAK,CAAE;AAC1B,YAAI,QAAQ;AAAA,MACd;AAAA,IACF;AAEA,aAAS,kBAAkB,SAAS;AAClC,mBAAa,QAAQ;AACrB,YAAM,gBAAgB,QAAQ,IAAI,OAAK,OAAO,MAAM,WAAW,IAAI,EAAE,IAAI,CAAC;AAAA,IAC5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
;/* empty css
|
|
4
|
+
;/* empty css */
|
|
5
5
|
const _sfc_main = {
|
|
6
6
|
__name: "Spoiler",
|
|
7
7
|
props: {
|
|
@@ -70,4 +70,4 @@ const _sfc_main = {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
exports.default = _sfc_main;
|
|
73
|
-
//# sourceMappingURL=Spoiler.
|
|
73
|
+
//# sourceMappingURL=Spoiler.vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spoiler.
|
|
1
|
+
{"version":3,"file":"Spoiler.vue.cjs","sources":["../../../../../src/components/Spoiler/Spoiler.vue"],"sourcesContent":["<template>\n <div>\n <div @click=\"toggleSpoiler\" class=\"flex-v-center flex-nowrap flex\">\n <slot name=\"header\" :isOpen=\"showSpoiler\"></slot>\n </div>\n <transition\n name=\"collapse\"\n @enter=\"onEnter\"\n @after-enter=\"onAfterEnter\"\n @leave=\"onLeave\"\n >\n <div v-show=\"showSpoiler\" class=\"spoiler\" ref=\"spoilerContent\">\n <slot name=\"content\"></slot>\n </div>\n </transition>\n </div>\n</template>\n<script setup>\nimport { ref, onMounted } from 'vue';\n\nconst props = defineProps({\n status: {\n type: Boolean,\n default: false\n }\n});\n\nconst showSpoiler = ref(false);\nconst spoilerContent = ref(null);\n\nonMounted(() => {\n if (props.status) {\n showSpoiler.value = props.status;\n }\n});\n\nconst toggleSpoiler = () => {\n showSpoiler.value = !showSpoiler.value;\n};\n\n// Анимация открытия\nconst onEnter = (el) => {\n el.style.height = '0';\n void el.offsetHeight; // force reflow\n el.style.height = el.scrollHeight + 'px';\n};\n\nconst onAfterEnter = (el) => {\n el.style.height = 'auto';\n};\n\n// Анимация закрытия\nconst onLeave = (el) => {\n el.style.height = el.scrollHeight + 'px';\n void el.offsetHeight; // force reflow\n el.style.height = '0';\n};\n\ndefineExpose({\n showSpoiler\n});\n</script>\n<style lang=\"scss\">\n.spoiler {\n overflow: hidden;\n transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n</style>"],"names":["ref","onMounted"],"mappings":";;;;;;;;;;;;;AAoBA,UAAM,QAAQ;AAOd,UAAM,cAAcA,IAAAA,IAAI,KAAK;AAC7B,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/BC,QAAAA,UAAU,MAAM;AACd,UAAI,MAAM,QAAQ;AAChB,oBAAY,QAAQ,MAAM;AAAA,MAC5B;AAAA,IACF,CAAC;AAED,UAAM,gBAAgB,MAAM;AAC1B,kBAAY,QAAQ,CAAC,YAAY;AAAA,IACnC;AAGA,UAAM,UAAU,CAAC,OAAO;AACtB,SAAG,MAAM,SAAS;AAClB,WAAK,GAAG;AACR,SAAG,MAAM,SAAS,GAAG,eAAe;AAAA,IACtC;AAEA,UAAM,eAAe,CAAC,OAAO;AAC3B,SAAG,MAAM,SAAS;AAAA,IACpB;AAGA,UAAM,UAAU,CAAC,OAAO;AACtB,SAAG,MAAM,SAAS,GAAG,eAAe;AACpC,WAAK,GAAG;AACR,SAAG,MAAM,SAAS;AAAA,IACpB;AAEA,aAAa;AAAA,MACX;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, onMounted, createElementBlock, openBlock, createElementVNode, createVNode, renderSlot, Transition, withCtx, withDirectives, vShow } from "vue";
|
|
2
|
-
/* empty css
|
|
2
|
+
/* empty css */
|
|
3
3
|
const _sfc_main = {
|
|
4
4
|
__name: "Spoiler",
|
|
5
5
|
props: {
|
|
@@ -70,4 +70,4 @@ const _sfc_main = {
|
|
|
70
70
|
export {
|
|
71
71
|
_sfc_main as default
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=Spoiler.
|
|
73
|
+
//# sourceMappingURL=Spoiler.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spoiler.vue.js","sources":["../../../../../src/components/Spoiler/Spoiler.vue"],"sourcesContent":["<template>\n <div>\n <div @click=\"toggleSpoiler\" class=\"flex-v-center flex-nowrap flex\">\n <slot name=\"header\" :isOpen=\"showSpoiler\"></slot>\n </div>\n <transition\n name=\"collapse\"\n @enter=\"onEnter\"\n @after-enter=\"onAfterEnter\"\n @leave=\"onLeave\"\n >\n <div v-show=\"showSpoiler\" class=\"spoiler\" ref=\"spoilerContent\">\n <slot name=\"content\"></slot>\n </div>\n </transition>\n </div>\n</template>\n<script setup>\nimport { ref, onMounted } from 'vue';\n\nconst props = defineProps({\n status: {\n type: Boolean,\n default: false\n }\n});\n\nconst showSpoiler = ref(false);\nconst spoilerContent = ref(null);\n\nonMounted(() => {\n if (props.status) {\n showSpoiler.value = props.status;\n }\n});\n\nconst toggleSpoiler = () => {\n showSpoiler.value = !showSpoiler.value;\n};\n\n// Анимация открытия\nconst onEnter = (el) => {\n el.style.height = '0';\n void el.offsetHeight; // force reflow\n el.style.height = el.scrollHeight + 'px';\n};\n\nconst onAfterEnter = (el) => {\n el.style.height = 'auto';\n};\n\n// Анимация закрытия\nconst onLeave = (el) => {\n el.style.height = el.scrollHeight + 'px';\n void el.offsetHeight; // force reflow\n el.style.height = '0';\n};\n\ndefineExpose({\n showSpoiler\n});\n</script>\n<style lang=\"scss\">\n.spoiler {\n overflow: hidden;\n transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;AAoBA,UAAM,QAAQ;AAOd,UAAM,cAAc,IAAI,KAAK;AAC7B,UAAM,iBAAiB,IAAI,IAAI;AAE/B,cAAU,MAAM;AACd,UAAI,MAAM,QAAQ;AAChB,oBAAY,QAAQ,MAAM;AAAA,MAC5B;AAAA,IACF,CAAC;AAED,UAAM,gBAAgB,MAAM;AAC1B,kBAAY,QAAQ,CAAC,YAAY;AAAA,IACnC;AAGA,UAAM,UAAU,CAAC,OAAO;AACtB,SAAG,MAAM,SAAS;AAClB,WAAK,GAAG;AACR,SAAG,MAAM,SAAS,GAAG,eAAe;AAAA,IACtC;AAEA,UAAM,eAAe,CAAC,OAAO;AAC3B,SAAG,MAAM,SAAS;AAAA,IACpB;AAGA,UAAM,UAAU,CAAC,OAAO;AACtB,SAAG,MAAM,SAAS,GAAG,eAAe;AACpC,WAAK,GAAG;AACR,SAAG,MAAM,SAAS;AAAA,IACpB;AAEA,aAAa;AAAA,MACX;AAAA,IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/martyrs/src/components/UploadImage/{UploadImage.vue2.cjs → UploadImage.vue.cjs}
RENAMED
|
@@ -5,7 +5,7 @@ const axios = require("axios");
|
|
|
5
5
|
const Loader = require("../Loader/Loader.vue2.cjs");
|
|
6
6
|
const IconUpload = ;/* empty css */
|
|
7
7
|
const IconDelete = require("../../modules/icons/navigation/IconDelete.vue.cjs");
|
|
8
|
-
;/* empty css
|
|
8
|
+
;/* empty css */
|
|
9
9
|
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
10
10
|
const _hoisted_1 = ["src"];
|
|
11
11
|
const _hoisted_2 = {
|
|
@@ -216,4 +216,4 @@ const _sfc_main = {
|
|
|
216
216
|
};
|
|
217
217
|
const UploadImage = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-26da6988"]]);
|
|
218
218
|
exports.default = UploadImage;
|
|
219
|
-
//# sourceMappingURL=UploadImage.
|
|
219
|
+
//# sourceMappingURL=UploadImage.vue.cjs.map
|
package/dist/martyrs/src/components/UploadImage/{UploadImage.vue2.js.map → UploadImage.vue.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadImage.
|
|
1
|
+
{"version":3,"file":"UploadImage.vue.cjs","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div class=\"upload-image-wrapper flex-v-center flex-nowrap flex gap-small\" :class=\"{'with-text': text}\">\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"pos-relative radius-small br-solid br-1px br-black-transp-10 h-100 aspect-1x1 flex-v-center flex-h-center flex cursor-pointer\"\n >\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo || previewUrl\" \n :src=\"previewUrl || (FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"pos-absolute radius-small o-hidden z-index-1 w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center pos-relative z-index-2 flex-h-center flex w-100 h-100 radius-small bg-second\" >\n <IconUpload class=\"i-medium upload-icon\" fill=\"rgb(var(--white))\" />\n </div>\n \n <!-- Hover controls -->\n <div class=\"z-index-2 pos-relative hover-controls pos-absolute w-100 h-100 flex-v-center flex-h-center flex\">\n <div v-if=\"!imageUrl && !photo && !previewUrl\" class=\"hover-upload-icon\">\n <IconUpload class=\"i-medium\" fill=\"rgb(var(--white))\" />\n </div>\n <div v-else class=\"hover-buttons flex gap-small\">\n <button @click.stop=\"onComponentClick\" class=\"hover-button radius-small pd-thin bg-main t-white br-none cursor-pointer\">\n <IconUpload class=\"i-semi\" fill=\"rgb(var(--white))\" />\n </button>\n <button @click.stop=\"deleteImage\" class=\"hover-button radius-small pd-thin bg-danger t-white br-none cursor-pointer\">\n <IconDelete class=\"i-semi\" fill=\"rgb(var(--white))\" />\n </button>\n </div>\n </div>\n \n <!-- Loading overlay -->\n <div v-if=\"loading\" class=\"z-index-2 loading-overlay pos-absolute w-100 h-100 flex-v-center flex-h-center flex\">\n <Loader :centered=\"false\" />\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n \n <!-- Text block -->\n <div v-if=\"text\" class=\"upload-text-block flex flex-column\">\n <span class=\"mn-b-small t-medium\">{{ textConfig.title }}</span>\n <span class=\"mn-b-medium t-transp\">{{ textConfig.subtitle }}</span>\n <div v-if=\"!imageUrl && !photo && !previewUrl\">\n <button @click=\"onComponentClick\" class=\"button button-small w-max bg-main t-black cursor-pointer\">\n {{ textConfig.buttonText }}\n </button>\n </div>\n <div v-else class=\"flex gap-thin\">\n <button @click=\"onComponentClick\" class=\"button button-small w-max bg-second t-white cursor-pointer\">\n Upload \n </button>\n <button @click=\"deleteImage\" class=\"button button-small w-max bg-red t-white cursor-pointer\">\n Delete\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch, computed } from 'vue';\nimport axios from 'axios';\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport IconUpload from '@martyrs/src/modules/icons/navigation/IconUpload.vue';\nimport IconDelete from '@martyrs/src/modules/icons/navigation/IconDelete.vue';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\nconst previewUrl = ref(null);\nconst loading = ref(false);\n\nconst props = defineProps({\n uploadPath: {\n type: String,\n required: true\n },\n photo: {\n type: String,\n default: null\n },\n text: {\n type: [Object, Boolean],\n default: null\n }\n});\n\nconst emit = defineEmits(['update:photo', 'error']);\n\n// Text configuration with defaults\nconst textConfig = computed(() => {\n const defaults = {\n title: 'Upload Image',\n subtitle: 'Drag & drop your image here or click button. Supported: JPG, PNG, GIF. Max size: 2MB',\n buttonText: 'Choose Image'\n };\n \n if (props.text === true) {\n return defaults;\n } else if (typeof props.text === 'object' && props.text !== null) {\n return {\n title: props.text.title || defaults.title,\n subtitle: props.text.subtitle || defaults.subtitle,\n buttonText: props.text.buttonText || defaults.buttonText\n };\n }\n \n return defaults;\n});\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n // Create preview from file\n const reader = new FileReader();\n reader.onload = (e) => {\n previewUrl.value = e.target.result;\n };\n reader.readAsDataURL(file);\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n \n loading.value = true;\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n previewUrl.value = null; // Clear preview after successful upload\n emit('update:photo', imageUrl.value);\n } catch (error) {\n emit('error', error);\n console.error(\"Upload error:\", error); // Логируем ошибку\n previewUrl.value = null; // Clear preview on error\n } finally {\n loading.value = false;\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n\nfunction deleteImage() {\n imageUrl.value = null;\n previewUrl.value = null;\n emit('update:photo', null);\n // Reset file input\n if (fileInput.value) {\n fileInput.value.value = '';\n }\n}\n</script>\n\n<style scoped>\n.image-upload-area {\n overflow: hidden;\n transition: all 0.3s ease;\n}\n\n.image-upload-area:hover {\n opacity: 0.95;\n}\n\n/* Hover controls */\n.hover-controls {\n top: 0;\n left: 0;\n background: rgba(0, 0, 0, 0.7);\n opacity: 0;\n transition: opacity 0.3s ease;\n pointer-events: none;\n}\n\n.image-upload-area:hover .hover-controls {\n opacity: 1;\n pointer-events: all;\n}\n\n.hover-upload-icon {\n animation: pulse 1.5s infinite;\n}\n\n.hover-button {\n transition: transform 0.2s ease, background-color 0.2s ease;\n}\n\n.hover-button:hover {\n transform: scale(1.1);\n}\n\n.hover-button:active {\n transform: scale(0.95);\n}\n\n/* Loading overlay */\n.loading-overlay {\n top: 0;\n left: 0;\n background: rgba(255, 255, 255, 0.9);\n z-index: 10;\n}\n\n/* Animations */\n@keyframes pulse {\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(1.05);\n opacity: 0.8;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n/* Upload icon in empty state */\n.upload-icon {\n transition: transform 0.3s ease;\n}\n\n.image-upload-area:hover .upload-icon {\n transform: scale(1.1);\n}\n</style>\n"],"names":["ref","computed","watch","e"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,UAAM,WAAWA,IAAAA,IAAI,IAAI;AACzB,UAAM,YAAYA,IAAAA,IAAI,IAAI;AAC1B,UAAM,aAAaA,IAAAA,IAAI,IAAI;AAC3B,UAAM,UAAUA,IAAAA,IAAI,KAAK;AAEzB,UAAM,QAAQ;AAed,UAAM,OAAO;AAGb,UAAM,aAAaC,IAAAA,SAAS,MAAM;AAChC,YAAM,WAAW;AAAA,QACf,OAAO;AAAA,QACP,UAAU;AAAA,QACV,YAAY;AAAA,MAChB;AAEE,UAAI,MAAM,SAAS,MAAM;AACvB,eAAO;AAAA,MACT,WAAW,OAAO,MAAM,SAAS,YAAY,MAAM,SAAS,MAAM;AAChE,eAAO;AAAA,UACL,OAAO,MAAM,KAAK,SAAS,SAAS;AAAA,UACpC,UAAU,MAAM,KAAK,YAAY,SAAS;AAAA,UAC1C,YAAY,MAAM,KAAK,cAAc,SAAS;AAAA,QACpD;AAAA,MACE;AAEA,aAAO;AAAA,IACT,CAAC;AAEDC,QAAAA,MAAM,OAAO,CAAC,EAAC,MAAK,MAAM;AACxB,UAAG,MAAO,UAAS,QAAQ;AAAA,IAC7B,CAAC;AAED,aAAS,mBAAmB;AAC1B,gBAAU,MAAM,MAAK;AAAA,IACvB;AAEA,mBAAe,aAAa,GAAG;AAC7B,UAAI,OAAO,EAAE,OAAO,MAAM,CAAC;AAC3B,UAAI,CAAC,M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|
|
3
3
|
import Loader from "../Loader/Loader.vue2.js";
|
|
4
4
|
import _sfc_main$1 from "../../modules/icons/navigation/IconUpload.vue.js";
|
|
5
5
|
import _sfc_main$2 from "../../modules/icons/navigation/IconDelete.vue.js";
|
|
6
|
-
/* empty css
|
|
6
|
+
/* empty css */
|
|
7
7
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
8
|
const _hoisted_1 = ["src"];
|
|
9
9
|
const _hoisted_2 = {
|
|
@@ -216,4 +216,4 @@ const UploadImage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-
|
|
|
216
216
|
export {
|
|
217
217
|
UploadImage as default
|
|
218
218
|
};
|
|
219
|
-
//# sourceMappingURL=UploadImage.
|
|
219
|
+
//# sourceMappingURL=UploadImage.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadImage.vue.js","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div class=\"upload-image-wrapper flex-v-center flex-nowrap flex gap-small\" :class=\"{'with-text': text}\">\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"pos-relative radius-small br-solid br-1px br-black-transp-10 h-100 aspect-1x1 flex-v-center flex-h-center flex cursor-pointer\"\n >\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo || previewUrl\" \n :src=\"previewUrl || (FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"pos-absolute radius-small o-hidden z-index-1 w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center pos-relative z-index-2 flex-h-center flex w-100 h-100 radius-small bg-second\" >\n <IconUpload class=\"i-medium upload-icon\" fill=\"rgb(var(--white))\" />\n </div>\n \n <!-- Hover controls -->\n <div class=\"z-index-2 pos-relative hover-controls pos-absolute w-100 h-100 flex-v-center flex-h-center flex\">\n <div v-if=\"!imageUrl && !photo && !previewUrl\" class=\"hover-upload-icon\">\n <IconUpload class=\"i-medium\" fill=\"rgb(var(--white))\" />\n </div>\n <div v-else class=\"hover-buttons flex gap-small\">\n <button @click.stop=\"onComponentClick\" class=\"hover-button radius-small pd-thin bg-main t-white br-none cursor-pointer\">\n <IconUpload class=\"i-semi\" fill=\"rgb(var(--white))\" />\n </button>\n <button @click.stop=\"deleteImage\" class=\"hover-button radius-small pd-thin bg-danger t-white br-none cursor-pointer\">\n <IconDelete class=\"i-semi\" fill=\"rgb(var(--white))\" />\n </button>\n </div>\n </div>\n \n <!-- Loading overlay -->\n <div v-if=\"loading\" class=\"z-index-2 loading-overlay pos-absolute w-100 h-100 flex-v-center flex-h-center flex\">\n <Loader :centered=\"false\" />\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n \n <!-- Text block -->\n <div v-if=\"text\" class=\"upload-text-block flex flex-column\">\n <span class=\"mn-b-small t-medium\">{{ textConfig.title }}</span>\n <span class=\"mn-b-medium t-transp\">{{ textConfig.subtitle }}</span>\n <div v-if=\"!imageUrl && !photo && !previewUrl\">\n <button @click=\"onComponentClick\" class=\"button button-small w-max bg-main t-black cursor-pointer\">\n {{ textConfig.buttonText }}\n </button>\n </div>\n <div v-else class=\"flex gap-thin\">\n <button @click=\"onComponentClick\" class=\"button button-small w-max bg-second t-white cursor-pointer\">\n Upload \n </button>\n <button @click=\"deleteImage\" class=\"button button-small w-max bg-red t-white cursor-pointer\">\n Delete\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch, computed } from 'vue';\nimport axios from 'axios';\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport IconUpload from '@martyrs/src/modules/icons/navigation/IconUpload.vue';\nimport IconDelete from '@martyrs/src/modules/icons/navigation/IconDelete.vue';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\nconst previewUrl = ref(null);\nconst loading = ref(false);\n\nconst props = defineProps({\n uploadPath: {\n type: String,\n required: true\n },\n photo: {\n type: String,\n default: null\n },\n text: {\n type: [Object, Boolean],\n default: null\n }\n});\n\nconst emit = defineEmits(['update:photo', 'error']);\n\n// Text configuration with defaults\nconst textConfig = computed(() => {\n const defaults = {\n title: 'Upload Image',\n subtitle: 'Drag & drop your image here or click button. Supported: JPG, PNG, GIF. Max size: 2MB',\n buttonText: 'Choose Image'\n };\n \n if (props.text === true) {\n return defaults;\n } else if (typeof props.text === 'object' && props.text !== null) {\n return {\n title: props.text.title || defaults.title,\n subtitle: props.text.subtitle || defaults.subtitle,\n buttonText: props.text.buttonText || defaults.buttonText\n };\n }\n \n return defaults;\n});\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n // Create preview from file\n const reader = new FileReader();\n reader.onload = (e) => {\n previewUrl.value = e.target.result;\n };\n reader.readAsDataURL(file);\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n \n loading.value = true;\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n previewUrl.value = null; // Clear preview after successful upload\n emit('update:photo', imageUrl.value);\n } catch (error) {\n emit('error', error);\n console.error(\"Upload error:\", error); // Логируем ошибку\n previewUrl.value = null; // Clear preview on error\n } finally {\n loading.value = false;\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n\nfunction deleteImage() {\n imageUrl.value = null;\n previewUrl.value = null;\n emit('update:photo', null);\n // Reset file input\n if (fileInput.value) {\n fileInput.value.value = '';\n }\n}\n</script>\n\n<style scoped>\n.image-upload-area {\n overflow: hidden;\n transition: all 0.3s ease;\n}\n\n.image-upload-area:hover {\n opacity: 0.95;\n}\n\n/* Hover controls */\n.hover-controls {\n top: 0;\n left: 0;\n background: rgba(0, 0, 0, 0.7);\n opacity: 0;\n transition: opacity 0.3s ease;\n pointer-events: none;\n}\n\n.image-upload-area:hover .hover-controls {\n opacity: 1;\n pointer-events: all;\n}\n\n.hover-upload-icon {\n animation: pulse 1.5s infinite;\n}\n\n.hover-button {\n transition: transform 0.2s ease, background-color 0.2s ease;\n}\n\n.hover-button:hover {\n transform: scale(1.1);\n}\n\n.hover-button:active {\n transform: scale(0.95);\n}\n\n/* Loading overlay */\n.loading-overlay {\n top: 0;\n left: 0;\n background: rgba(255, 255, 255, 0.9);\n z-index: 10;\n}\n\n/* Animations */\n@keyframes pulse {\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(1.05);\n opacity: 0.8;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n/* Upload icon in empty state */\n.upload-icon {\n transition: transform 0.3s ease;\n}\n\n.image-upload-area:hover .upload-icon {\n transform: scale(1.1);\n}\n</style>\n"],"names":["e"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,UAAM,WAAW,IAAI,IAAI;AACzB,UAAM,YAAY,IAAI,IAAI;AAC1B,UAAM,aAAa,IAAI,IAAI;AAC3B,UAAM,UAAU,IAAI,KAAK;AAEzB,UAAM,QAAQ;AAed,UAAM,OAAO;AAGb,UAAM,aAAa,SAAS,MAAM;AAChC,YAAM,WAAW;AAAA,QACf,OAAO;AAAA,QACP,UAAU;AAAA,QACV,YAAY;AAAA,MAChB;AAEE,UAAI,MAAM,SAAS,MAAM;AACvB,eAAO;AAAA,MACT,WAAW,OAAO,MAAM,SAAS,YAAY,MAAM,SAAS,MAAM;AAChE,eAAO;AAAA,UACL,OAAO,MAAM,KAA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A,QACX,QAAQ;AAAA,UACN,OAAO,EAAE,aAAa;AAAA,QAC5B;AAAA,MACA,CAAG;AAAA,IACH;AAEA,aAAS,cAAc;AACrB,eAAS,QAAQ;AACjB,iBAAW,QAAQ;AACnB,WAAK,gBAAgB,IAAI;AAEzB,UAAI,UAAU,OAAO;AACnB,kBAAU,MAAM,QAAQ;AAAA,MAC1B;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
const Tab = require("../../../../../components/Tab/Tab.vue2.cjs");
|
|
6
|
-
const Feed = require("../../../../../components/Feed/Feed.
|
|
6
|
+
const Feed = require("../../../../../components/Feed/Feed.vue.cjs");
|
|
7
7
|
const CardBlogpost = require("../../../../community/components/blocks/CardBlogpost.vue.cjs");
|
|
8
8
|
const auth = require("../../store/auth.cjs");
|
|
9
9
|
const blogposts = require("../../../../community/store/blogposts.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, watch, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, createVNode, unref, withCtx, Fragment, renderList } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue2.js";
|
|
4
|
-
import _sfc_main$2 from "../../../../../components/Feed/Feed.
|
|
4
|
+
import _sfc_main$2 from "../../../../../components/Feed/Feed.vue.js";
|
|
5
5
|
import _sfc_main$3 from "../../../../community/components/blocks/CardBlogpost.vue.js";
|
|
6
6
|
import { state } from "../../store/auth.js";
|
|
7
7
|
import { read } from "../../../../community/store/blogposts.js";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Field = require("../../../../../components/Field/Field.vue2.cjs");
|
|
5
5
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
|
6
|
-
const UploadImage = require("../../../../../components/UploadImage/UploadImage.
|
|
6
|
+
const UploadImage = require("../../../../../components/UploadImage/UploadImage.vue.cjs");
|
|
7
7
|
const vueRouter = require("vue-router");
|
|
8
8
|
const users = require("../../store/users.cjs");
|
|
9
9
|
const _hoisted_1 = { class: "for-transition w-100" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createElementVNode, createVNode, toDisplayString, withCtx, createTextVNode } from "vue";
|
|
2
2
|
import Field from "../../../../../components/Field/Field.vue2.js";
|
|
3
3
|
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
|
4
|
-
import UploadImage from "../../../../../components/UploadImage/UploadImage.
|
|
4
|
+
import UploadImage from "../../../../../components/UploadImage/UploadImage.vue.js";
|
|
5
5
|
import { useRouter } from "vue-router";
|
|
6
6
|
import { state, actions } from "../../store/users.js";
|
|
7
7
|
const _hoisted_1 = { class: "for-transition w-100" };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
5
|
-
const Feed = require("../../../../components/Feed/Feed.
|
|
5
|
+
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
6
6
|
const Table = require("../../../../components/Table/Table.vue.cjs");
|
|
7
7
|
const StatusBadge = require("../../../../components/Table/StatusBadge.vue.cjs");
|
|
8
8
|
const IconProfile = require("../../../icons/entities/IconProfile.vue.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, createElementBlock, openBlock, createElementVNode, createVNode, withCtx } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
3
|
-
import _sfc_main$4 from "../../../../components/Feed/Feed.
|
|
3
|
+
import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
|
|
4
4
|
import Table from "../../../../components/Table/Table.vue.js";
|
|
5
5
|
import StatusBadge from "../../../../components/Table/StatusBadge.vue.js";
|
|
6
6
|
import _sfc_main$2 from "../../../icons/entities/IconProfile.vue.js";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
const Select = require("../../../../components/Select/Select.vue.cjs");
|
|
6
|
-
const Feed = require("../../../../components/Feed/Feed.
|
|
6
|
+
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
7
7
|
const CardOrganization = require("../../../organizations/components/blocks/CardOrganization.vue.cjs");
|
|
8
8
|
const IconFeatured = require("../../../icons/entities/IconFeatured.vue.cjs");
|
|
9
9
|
const IconPopular = require("../../../icons/entities/IconPopular.vue.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, resolveComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, unref, createBlock, normalizeClass, createTextVNode, withCtx, Transition, resolveDynamicComponent, Fragment, renderList } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import Select from "../../../../components/Select/Select.vue.js";
|
|
4
|
-
import _sfc_main$5 from "../../../../components/Feed/Feed.
|
|
4
|
+
import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
|
|
5
5
|
import _sfc_main$6 from "../../../organizations/components/blocks/CardOrganization.vue.js";
|
|
6
6
|
import _sfc_main$1 from "../../../icons/entities/IconFeatured.vue.js";
|
|
7
7
|
import _sfc_main$2 from "../../../icons/entities/IconPopular.vue.js";
|
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
5
|
require("vue-i18n");
|
|
6
6
|
;/* empty css */
|
|
7
|
-
const Feed = require("../../../../components/Feed/Feed.
|
|
7
|
+
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
8
8
|
const CardBlogpost = require("../blocks/CardBlogpost.vue.cjs");
|
|
9
9
|
const blogposts = require("../../store/blogposts.cjs");
|
|
10
10
|
const auth = require("../../../auth/views/store/auth.cjs");
|
|
@@ -2,7 +2,7 @@ import { onMounted, watch, createElementBlock, openBlock, createVNode, unref, wi
|
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import "vue-i18n";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import _sfc_main$1 from "../../../../components/Feed/Feed.
|
|
5
|
+
import _sfc_main$1 from "../../../../components/Feed/Feed.vue.js";
|
|
6
6
|
import _sfc_main$2 from "../blocks/CardBlogpost.vue.js";
|
|
7
7
|
import { state, read } from "../../store/blogposts.js";
|
|
8
8
|
import { state as state$1 } from "../../../auth/views/store/auth.js";
|
|
@@ -5,11 +5,11 @@ require("isomorphic-dompurify");
|
|
|
5
5
|
;/* empty css */
|
|
6
6
|
const Constructor = require("../../../constructor/components/sections/Constructor.vue.cjs");
|
|
7
7
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
8
|
-
const BlockTags = require("../../../../components/FieldTags/BlockTags.
|
|
8
|
+
const BlockTags = require("../../../../components/FieldTags/BlockTags.vue.cjs");
|
|
9
9
|
const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
|
|
10
10
|
const Field = require("../../../../components/Field/Field.vue2.cjs");
|
|
11
11
|
const Button = require("../../../../components/Button/Button.vue.cjs");
|
|
12
|
-
const Feed = require("../../../../components/Feed/Feed.
|
|
12
|
+
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
13
13
|
const Card = require("../../../globals/views/components/blocks/Card.vue.cjs");
|
|
14
14
|
const vueRouter = require("vue-router");
|
|
15
15
|
const blogposts = require("../../store/blogposts.cjs");
|
|
@@ -3,11 +3,11 @@ import "isomorphic-dompurify";
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _sfc_main$1 from "../../../constructor/components/sections/Constructor.vue.js";
|
|
5
5
|
import _sfc_main$2 from "../../../../components/Popup/Popup.vue.js";
|
|
6
|
-
import _sfc_main$3 from "../../../../components/FieldTags/BlockTags.
|
|
6
|
+
import _sfc_main$3 from "../../../../components/FieldTags/BlockTags.vue.js";
|
|
7
7
|
import _sfc_main$6 from "../../../../components/Checkbox/Checkbox.vue.js";
|
|
8
8
|
import Field from "../../../../components/Field/Field.vue2.js";
|
|
9
9
|
import _sfc_main$7 from "../../../../components/Button/Button.vue.js";
|
|
10
|
-
import _sfc_main$5 from "../../../../components/Feed/Feed.
|
|
10
|
+
import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
|
|
11
11
|
import _sfc_main$4 from "../../../globals/views/components/blocks/Card.vue.js";
|
|
12
12
|
import { useRoute, useRouter } from "vue-router";
|
|
13
13
|
import { read, clean, state as state$1, remove, update, create } from "../../store/blogposts.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
|
5
|
-
const Feed = require("../../../../components/Feed/Feed.
|
|
5
|
+
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
6
6
|
const CardBlogpost = require("../blocks/CardBlogpost.vue.cjs");
|
|
7
7
|
const IconPlus = require("../../../icons/navigation/IconPlus.vue.cjs");
|
|
8
8
|
const auth = require("../../../auth/views/store/auth.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, createElementBlock, openBlock, createCommentVNode, createElementVNode, unref, createVNode, withCtx, Fragment, renderList, createBlock } from "vue";
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
|
3
|
-
import _sfc_main$2 from "../../../../components/Feed/Feed.
|
|
3
|
+
import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
|
|
4
4
|
import _sfc_main$3 from "../blocks/CardBlogpost.vue.js";
|
|
5
5
|
import _sfc_main$1 from "../../../icons/navigation/IconPlus.vue.js";
|
|
6
6
|
import { state } from "../../../auth/views/store/auth.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const Field = require("../../../../components/Field/Field.vue2.cjs");
|
|
5
|
-
const UploadImage = require("../../../../components/UploadImage/UploadImage.
|
|
5
|
+
const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
|
|
6
6
|
const _hoisted_1 = { class: "w-100 pd-medium bg-white radius-medium pos-relative" };
|
|
7
7
|
const _hoisted_2 = { class: "flex flex-v-center gap-thin" };
|
|
8
8
|
const _hoisted_3 = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, createElementBlock, openBlock, createElementVNode, createCommentVNode, createBlock, Fragment, createVNode, toDisplayString } from "vue";
|
|
2
2
|
import Field from "../../../../components/Field/Field.vue2.js";
|
|
3
|
-
import UploadImage from "../../../../components/UploadImage/UploadImage.
|
|
3
|
+
import UploadImage from "../../../../components/UploadImage/UploadImage.vue.js";
|
|
4
4
|
const _hoisted_1 = { class: "w-100 pd-medium bg-white radius-medium pos-relative" };
|
|
5
5
|
const _hoisted_2 = { class: "flex flex-v-center gap-thin" };
|
|
6
6
|
const _hoisted_3 = {
|