@ozdao/martyrs 0.2.539 → 0.2.541
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/{globals.verifier-CJ1lr-NW.cjs → globals.verifier-Bi-XLEi9.cjs} +24 -23
- package/dist/{globals.verifier-BhqUrneb.js → globals.verifier-gPPX_jhf.js} +24 -23
- package/dist/inventory.server.cjs +1 -1
- package/dist/inventory.server.js +1 -1
- package/dist/{main-Zhs0EqRp.cjs → main-7IA3UHca.cjs} +6 -6
- package/dist/{main-gOfhekZG.js → main-BpBtIUcJ.js} +549 -549
- package/dist/martyrs/src/components/Button/Button.vue.cjs +1 -1
- package/dist/martyrs/src/components/Button/Button.vue.js +1 -1
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +3 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.js +3 -3
- package/dist/martyrs/src/components/FieldTags/create-tags.cjs +11 -2
- package/dist/martyrs/src/components/FieldTags/create-tags.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldTags/create-tags.js +11 -2
- package/dist/martyrs/src/components/FieldTags/create-tags.js.map +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue.cjs → Loader.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Loader/{Loader.vue.js → Loader.vue2.js} +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue.cjs.map → Loader.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs +0 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +0 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +3 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.cjs +0 -3
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +0 -3
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.cjs +31 -41
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.js +31 -41
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.cjs +0 -3
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.js +0 -3
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/store.cjs +0 -5
- package/dist/martyrs/src/modules/globals/views/classes/store.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/store.js +0 -5
- package/dist/martyrs/src/modules/globals/views/classes/store.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/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/components/sections/{Filters.vue.cjs → Filters.vue2.cjs} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.js → Filters.vue2.js} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.cjs.map → Filters.vue2.js.map} +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.js +2 -2
- package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +7 -3
- 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 +7 -3
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +2 -2
- 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/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.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/pages/Album.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/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/sections/FormDelivery.vue.cjs +3 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +4 -4
- 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/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
- 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 +19 -3
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +19 -3
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.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/store/categories.cjs +4 -0
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +4 -0
- package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/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/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.cjs +1 -1
- package/dist/music.server.js +1 -1
- package/dist/orders.server.cjs +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +10 -2
- package/dist/products.server.js +10 -2
- package/dist/rents.server.cjs +1 -1
- package/dist/rents.server.js +1 -1
- package/dist/{web-bMa0DMyG.cjs → web-C9bVm6Nw.cjs} +1 -1
- package/dist/{web-DxxU2bwy.js → web-DsdyXC8n.js} +1 -1
- package/package.json +1 -1
- package/src/components/FieldTags/FieldTagsNew.vue +366 -0
- package/src/components/FieldTags/README.md +513 -0
- package/src/components/FieldTags/create-tags.js +15 -2
- package/src/modules/auth/views/store/auth.js +0 -2
- package/src/modules/globals/controllers/classes/globals.validator.js +24 -23
- package/src/modules/globals/globals.client.js +0 -3
- package/src/modules/globals/views/classes/globals.app.js +21 -34
- package/src/modules/globals/views/classes/module-registry.js +0 -3
- package/src/modules/globals/views/classes/store.js +0 -7
- package/src/modules/globals/views/store/globals.js +2 -2
- package/src/modules/globals/views/utils/vue-app-renderer.js +11 -3
- package/src/modules/products/components/pages/CategoryEdit.vue +20 -0
- package/src/modules/products/middlewares/categories.verifier.js +9 -1
- package/src/modules/products/store/categories.js +5 -0
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Loader = require("../Loader/Loader.
|
|
4
|
+
const Loader = require("../Loader/Loader.vue2.cjs");
|
|
5
5
|
const IconCheckmark = require("../../modules/icons/navigation/IconCheckmark.vue.cjs");
|
|
6
6
|
const IconCross = require("../../modules/icons/navigation/IconCross.vue.cjs");
|
|
7
7
|
;/* empty css */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, createElementBlock, openBlock, normalizeClass, withModifiers, createVNode, createCommentVNode, Transition, withCtx, createBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createElementVNode } from "vue";
|
|
2
|
-
import Loader from "../Loader/Loader.
|
|
2
|
+
import Loader from "../Loader/Loader.vue2.js";
|
|
3
3
|
import _sfc_main$1 from "../../modules/icons/navigation/IconCheckmark.vue.js";
|
|
4
4
|
import _sfc_main$2 from "../../modules/icons/navigation/IconCross.vue.js";
|
|
5
5
|
/* empty css */
|
|
@@ -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 clickOutside = require("../FieldPhone/click-outside.cjs");
|
|
5
|
-
;/* empty css
|
|
5
|
+
;/* empty css */
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "w-100 h-100 flex-center flex"
|
|
@@ -61,4 +61,4 @@ const _sfc_main = {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
exports.default = _sfc_main;
|
|
64
|
-
//# sourceMappingURL=Dropdown.
|
|
64
|
+
//# sourceMappingURL=Dropdown.vue2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.vue2.cjs","sources":["../../../../../src/components/Dropdown/Dropdown.vue"],"sourcesContent":["<template>\n <div class=\"dropdown pos-relative\" v-click-outside=\"clickedOutside\" @click.stop=\"isOpen = !isOpen\">\n <div v-if=\"isComponentLabel\" class=\"w-100 h-100 flex-center flex\">\n <component :is=\"label.component\" v-bind=\"label.props\" :class=\"label.class\"></component>\n </div>\n <div v-else>\n {{ label }}\n </div>\n <transition name=\"TransitionTranslateY\" mode=\"out-in\">\n <div \n v-show=\"isOpen\" \n :style=\"{ left: align === 'left' ? '0' : 'auto', right: align === 'right' ? '0' : 'auto' }\" \n class=\"dropdown-content radius-big\" \n >\n <slot></slot>\n </div>\n </transition>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue';\nimport clickOutside from '../FieldPhone/click-outside.js';\n\nlet vClickOutside = clickOutside\n\nconst props = defineProps({\n label: {\n type: [String, Object],\n default: 'Open'\n },\n align: {\n type: String,\n default: 'left'\n }\n})\n\nconst isOpen = ref(false);\nconst isComponentLabel = computed(() => typeof props.label === 'object');\n\nfunction clickedOutside () {\n isOpen.value = false\n}\n</script>\n\n<style >\n.dropdown-content {\n display: block;\n position: absolute;\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n z-index: 1;\n}\n\n/*.dropdown:hover .dropdown-content {\n display: block;\n}*/\n</style>\n"],"names":["clickOutside","ref","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBA,QAAI,gBAAgBA,aAAAA;AAEpB,UAAM,QAAQ;AAWd,UAAM,SAASC,IAAAA,IAAI,KAAK;AACxB,UAAM,mBAAmBC,IAAAA,SAAS,MAAM,OAAO,MAAM,UAAU,QAAQ;AAEvE,aAAS,iBAAkB;AACzB,aAAO,QAAQ;AAAA,IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, withDirectives, createElementBlock, openBlock, withModifiers, createVNode, createBlock, resolveDynamicComponent, mergeProps, toDisplayString, Transition, withCtx, createElementVNode, normalizeStyle, renderSlot, vShow, unref } from "vue";
|
|
2
2
|
import clickOutside from "../FieldPhone/click-outside.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
const _hoisted_1 = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "w-100 h-100 flex-center flex"
|
|
@@ -61,4 +61,4 @@ const _sfc_main = {
|
|
|
61
61
|
export {
|
|
62
62
|
_sfc_main as default
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=Dropdown.
|
|
64
|
+
//# sourceMappingURL=Dropdown.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.
|
|
1
|
+
{"version":3,"file":"Dropdown.vue2.js","sources":["../../../../../src/components/Dropdown/Dropdown.vue"],"sourcesContent":["<template>\n <div class=\"dropdown pos-relative\" v-click-outside=\"clickedOutside\" @click.stop=\"isOpen = !isOpen\">\n <div v-if=\"isComponentLabel\" class=\"w-100 h-100 flex-center flex\">\n <component :is=\"label.component\" v-bind=\"label.props\" :class=\"label.class\"></component>\n </div>\n <div v-else>\n {{ label }}\n </div>\n <transition name=\"TransitionTranslateY\" mode=\"out-in\">\n <div \n v-show=\"isOpen\" \n :style=\"{ left: align === 'left' ? '0' : 'auto', right: align === 'right' ? '0' : 'auto' }\" \n class=\"dropdown-content radius-big\" \n >\n <slot></slot>\n </div>\n </transition>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue';\nimport clickOutside from '../FieldPhone/click-outside.js';\n\nlet vClickOutside = clickOutside\n\nconst props = defineProps({\n label: {\n type: [String, Object],\n default: 'Open'\n },\n align: {\n type: String,\n default: 'left'\n }\n})\n\nconst isOpen = ref(false);\nconst isComponentLabel = computed(() => typeof props.label === 'object');\n\nfunction clickedOutside () {\n isOpen.value = false\n}\n</script>\n\n<style >\n.dropdown-content {\n display: block;\n position: absolute;\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n z-index: 1;\n}\n\n/*.dropdown:hover .dropdown-content {\n display: block;\n}*/\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,QAAI,gBAAgB;AAEpB,UAAM,QAAQ;AAWd,UAAM,SAAS,IAAI,KAAK;AACxB,UAAM,mBAAmB,SAAS,MAAM,OAAO,MAAM,UAAU,QAAQ;AAEvE,aAAS,iBAAkB;AACzB,aAAO,QAAQ;AAAA,IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,95 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const vue = require("vue");
|
|
4
|
-
const vueDraggableNext_esmBundler = require("../../../../node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.6_vue@3.5.21_typescript@5.9.2_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs");
|
|
5
|
-
const UploadImageMultiple = require("../UploadImageMultiple/UploadImageMultiple.vue.cjs");
|
|
6
|
-
const IconCross = require("../../modules/icons/navigation/IconCross.vue.cjs");
|
|
7
|
-
require("./EditImages.vue2.cjs");
|
|
8
|
-
const _hoisted_1 = { class: "flex-nowrap flex gap-small" };
|
|
9
|
-
const _hoisted_2 = { class: "pos-relative" };
|
|
10
|
-
const _hoisted_3 = ["src"];
|
|
11
|
-
const _hoisted_4 = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small"
|
|
14
|
-
};
|
|
15
|
-
const _sfc_main = {
|
|
16
|
-
__name: "EditImages",
|
|
17
|
-
props: {
|
|
18
|
-
images: Array,
|
|
19
|
-
text: Object,
|
|
20
|
-
options: Object,
|
|
21
|
-
uploadPath: {
|
|
22
|
-
type: Object,
|
|
23
|
-
default: "unsorted"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ["update:images"],
|
|
27
|
-
setup(__props, { emit: __emit }) {
|
|
28
|
-
const props = __props;
|
|
29
|
-
const emit = __emit;
|
|
30
|
-
const localImages = vue.ref([...props.images]);
|
|
31
|
-
vue.watchEffect(() => {
|
|
32
|
-
localImages.value = [...props.images];
|
|
33
|
-
});
|
|
34
|
-
const emitChanges = () => {
|
|
35
|
-
emit("update:images", localImages.value);
|
|
36
|
-
};
|
|
37
|
-
const onImagesUpdate = (newImages) => {
|
|
38
|
-
localImages.value = [...localImages.value, ...newImages];
|
|
39
|
-
emitChanges();
|
|
40
|
-
};
|
|
41
|
-
const deleteImage = (index) => {
|
|
42
|
-
localImages.value.splice(index, 1);
|
|
43
|
-
emitChanges();
|
|
44
|
-
};
|
|
45
|
-
return (_ctx, _cache) => {
|
|
46
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
47
|
-
localImages.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(vueDraggableNext_esmBundler.VueDraggableNext), {
|
|
48
|
-
key: 0,
|
|
49
|
-
class: "gap-small flex dragArea list-group w-full",
|
|
50
|
-
modelValue: localImages.value,
|
|
51
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localImages.value = $event),
|
|
52
|
-
onChange: emitChanges
|
|
53
|
-
}, {
|
|
54
|
-
default: vue.withCtx(() => [
|
|
55
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(localImages.value, (image, index) => {
|
|
56
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
57
|
-
vue.createElementVNode("img", {
|
|
58
|
-
loading: "lazy",
|
|
59
|
-
class: "i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden",
|
|
60
|
-
src: (_ctx.FILE_SERVER_URL || "") + image
|
|
61
|
-
}, null, 8, _hoisted_3),
|
|
62
|
-
vue.createVNode(IconCross.default, {
|
|
63
|
-
onClick: ($event) => deleteImage(index),
|
|
64
|
-
class: "cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro"
|
|
65
|
-
}, null, 8, ["onClick"])
|
|
66
|
-
]);
|
|
67
|
-
}), 256))
|
|
68
|
-
]),
|
|
69
|
-
_: 1
|
|
70
|
-
}, 8, ["modelValue"])) : vue.createCommentVNode("", true),
|
|
71
|
-
localImages.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
72
|
-
vue.createVNode(UploadImageMultiple.default, {
|
|
73
|
-
"onUpdate:images": onImagesUpdate,
|
|
74
|
-
text: "Add",
|
|
75
|
-
options: {
|
|
76
|
-
showText: false
|
|
77
|
-
},
|
|
78
|
-
uploadPath: "photos",
|
|
79
|
-
class: "radius-big"
|
|
80
|
-
})
|
|
81
|
-
])) : vue.createCommentVNode("", true),
|
|
82
|
-
localImages.value.length < 1 ? (vue.openBlock(), vue.createBlock(UploadImageMultiple.default, {
|
|
83
|
-
key: 2,
|
|
84
|
-
"onUpdate:images": onImagesUpdate,
|
|
85
|
-
uploadPath: props.uploadPath,
|
|
86
|
-
text: props.text,
|
|
87
|
-
options: props.options,
|
|
88
|
-
class: "w-100 pd-medium"
|
|
89
|
-
}, null, 8, ["uploadPath", "text", "options"])) : vue.createCommentVNode("", true)
|
|
90
|
-
]);
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
exports.default = _sfc_main;
|
|
95
2
|
//# sourceMappingURL=EditImages.vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditImages.vue.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"EditImages.vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,95 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { VueDraggableNext } from "../../../../node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.6_vue@3.5.21_typescript@5.9.2_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
|
|
3
|
-
import _sfc_main$2 from "../UploadImageMultiple/UploadImageMultiple.vue.js";
|
|
4
|
-
import _sfc_main$1 from "../../modules/icons/navigation/IconCross.vue.js";
|
|
5
|
-
import "./EditImages.vue2.js";
|
|
6
|
-
const _hoisted_1 = { class: "flex-nowrap flex gap-small" };
|
|
7
|
-
const _hoisted_2 = { class: "pos-relative" };
|
|
8
|
-
const _hoisted_3 = ["src"];
|
|
9
|
-
const _hoisted_4 = {
|
|
10
|
-
key: 1,
|
|
11
|
-
class: "i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small"
|
|
12
|
-
};
|
|
13
|
-
const _sfc_main = {
|
|
14
|
-
__name: "EditImages",
|
|
15
|
-
props: {
|
|
16
|
-
images: Array,
|
|
17
|
-
text: Object,
|
|
18
|
-
options: Object,
|
|
19
|
-
uploadPath: {
|
|
20
|
-
type: Object,
|
|
21
|
-
default: "unsorted"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
emits: ["update:images"],
|
|
25
|
-
setup(__props, { emit: __emit }) {
|
|
26
|
-
const props = __props;
|
|
27
|
-
const emit = __emit;
|
|
28
|
-
const localImages = ref([...props.images]);
|
|
29
|
-
watchEffect(() => {
|
|
30
|
-
localImages.value = [...props.images];
|
|
31
|
-
});
|
|
32
|
-
const emitChanges = () => {
|
|
33
|
-
emit("update:images", localImages.value);
|
|
34
|
-
};
|
|
35
|
-
const onImagesUpdate = (newImages) => {
|
|
36
|
-
localImages.value = [...localImages.value, ...newImages];
|
|
37
|
-
emitChanges();
|
|
38
|
-
};
|
|
39
|
-
const deleteImage = (index) => {
|
|
40
|
-
localImages.value.splice(index, 1);
|
|
41
|
-
emitChanges();
|
|
42
|
-
};
|
|
43
|
-
return (_ctx, _cache) => {
|
|
44
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
45
|
-
localImages.value.length > 0 ? (openBlock(), createBlock(unref(VueDraggableNext), {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: "gap-small flex dragArea list-group w-full",
|
|
48
|
-
modelValue: localImages.value,
|
|
49
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localImages.value = $event),
|
|
50
|
-
onChange: emitChanges
|
|
51
|
-
}, {
|
|
52
|
-
default: withCtx(() => [
|
|
53
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(localImages.value, (image, index) => {
|
|
54
|
-
return openBlock(), createElementBlock("div", _hoisted_2, [
|
|
55
|
-
createElementVNode("img", {
|
|
56
|
-
loading: "lazy",
|
|
57
|
-
class: "i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden",
|
|
58
|
-
src: (_ctx.FILE_SERVER_URL || "") + image
|
|
59
|
-
}, null, 8, _hoisted_3),
|
|
60
|
-
createVNode(_sfc_main$1, {
|
|
61
|
-
onClick: ($event) => deleteImage(index),
|
|
62
|
-
class: "cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro"
|
|
63
|
-
}, null, 8, ["onClick"])
|
|
64
|
-
]);
|
|
65
|
-
}), 256))
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
69
|
-
localImages.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
70
|
-
createVNode(_sfc_main$2, {
|
|
71
|
-
"onUpdate:images": onImagesUpdate,
|
|
72
|
-
text: "Add",
|
|
73
|
-
options: {
|
|
74
|
-
showText: false
|
|
75
|
-
},
|
|
76
|
-
uploadPath: "photos",
|
|
77
|
-
class: "radius-big"
|
|
78
|
-
})
|
|
79
|
-
])) : createCommentVNode("", true),
|
|
80
|
-
localImages.value.length < 1 ? (openBlock(), createBlock(_sfc_main$2, {
|
|
81
|
-
key: 2,
|
|
82
|
-
"onUpdate:images": onImagesUpdate,
|
|
83
|
-
uploadPath: props.uploadPath,
|
|
84
|
-
text: props.text,
|
|
85
|
-
options: props.options,
|
|
86
|
-
class: "w-100 pd-medium"
|
|
87
|
-
}, null, 8, ["uploadPath", "text", "options"])) : createCommentVNode("", true)
|
|
88
|
-
]);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
export {
|
|
93
|
-
_sfc_main as default
|
|
94
|
-
};
|
|
1
|
+
|
|
95
2
|
//# sourceMappingURL=EditImages.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditImages.vue.js","sources":[
|
|
1
|
+
{"version":3,"file":"EditImages.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const vueDraggableNext_esmBundler = require("../../../../node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.6_vue@3.5.21_typescript@5.9.2_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs");
|
|
5
|
+
const UploadImageMultiple = require("../UploadImageMultiple/UploadImageMultiple.vue.cjs");
|
|
6
|
+
const IconCross = require("../../modules/icons/navigation/IconCross.vue.cjs");
|
|
7
|
+
require("./EditImages.vue.cjs");
|
|
8
|
+
const _hoisted_1 = { class: "flex-nowrap flex gap-small" };
|
|
9
|
+
const _hoisted_2 = { class: "pos-relative" };
|
|
10
|
+
const _hoisted_3 = ["src"];
|
|
11
|
+
const _hoisted_4 = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small"
|
|
14
|
+
};
|
|
15
|
+
const _sfc_main = {
|
|
16
|
+
__name: "EditImages",
|
|
17
|
+
props: {
|
|
18
|
+
images: Array,
|
|
19
|
+
text: Object,
|
|
20
|
+
options: Object,
|
|
21
|
+
uploadPath: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: "unsorted"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:images"],
|
|
27
|
+
setup(__props, { emit: __emit }) {
|
|
28
|
+
const props = __props;
|
|
29
|
+
const emit = __emit;
|
|
30
|
+
const localImages = vue.ref([...props.images]);
|
|
31
|
+
vue.watchEffect(() => {
|
|
32
|
+
localImages.value = [...props.images];
|
|
33
|
+
});
|
|
34
|
+
const emitChanges = () => {
|
|
35
|
+
emit("update:images", localImages.value);
|
|
36
|
+
};
|
|
37
|
+
const onImagesUpdate = (newImages) => {
|
|
38
|
+
localImages.value = [...localImages.value, ...newImages];
|
|
39
|
+
emitChanges();
|
|
40
|
+
};
|
|
41
|
+
const deleteImage = (index) => {
|
|
42
|
+
localImages.value.splice(index, 1);
|
|
43
|
+
emitChanges();
|
|
44
|
+
};
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
47
|
+
localImages.value.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(vueDraggableNext_esmBundler.VueDraggableNext), {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "gap-small flex dragArea list-group w-full",
|
|
50
|
+
modelValue: localImages.value,
|
|
51
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localImages.value = $event),
|
|
52
|
+
onChange: emitChanges
|
|
53
|
+
}, {
|
|
54
|
+
default: vue.withCtx(() => [
|
|
55
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(localImages.value, (image, index) => {
|
|
56
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
57
|
+
vue.createElementVNode("img", {
|
|
58
|
+
loading: "lazy",
|
|
59
|
+
class: "i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden",
|
|
60
|
+
src: (_ctx.FILE_SERVER_URL || "") + image
|
|
61
|
+
}, null, 8, _hoisted_3),
|
|
62
|
+
vue.createVNode(IconCross.default, {
|
|
63
|
+
onClick: ($event) => deleteImage(index),
|
|
64
|
+
class: "cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro"
|
|
65
|
+
}, null, 8, ["onClick"])
|
|
66
|
+
]);
|
|
67
|
+
}), 256))
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 8, ["modelValue"])) : vue.createCommentVNode("", true),
|
|
71
|
+
localImages.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
72
|
+
vue.createVNode(UploadImageMultiple.default, {
|
|
73
|
+
"onUpdate:images": onImagesUpdate,
|
|
74
|
+
text: "Add",
|
|
75
|
+
options: {
|
|
76
|
+
showText: false
|
|
77
|
+
},
|
|
78
|
+
uploadPath: "photos",
|
|
79
|
+
class: "radius-big"
|
|
80
|
+
})
|
|
81
|
+
])) : vue.createCommentVNode("", true),
|
|
82
|
+
localImages.value.length < 1 ? (vue.openBlock(), vue.createBlock(UploadImageMultiple.default, {
|
|
83
|
+
key: 2,
|
|
84
|
+
"onUpdate:images": onImagesUpdate,
|
|
85
|
+
uploadPath: props.uploadPath,
|
|
86
|
+
text: props.text,
|
|
87
|
+
options: props.options,
|
|
88
|
+
class: "w-100 pd-medium"
|
|
89
|
+
}, null, 8, ["uploadPath", "text", "options"])) : vue.createCommentVNode("", true)
|
|
90
|
+
]);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.default = _sfc_main;
|
|
2
95
|
//# sourceMappingURL=EditImages.vue2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditImages.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"EditImages.vue2.cjs","sources":["../../../../../src/components/EditImages/EditImages.vue"],"sourcesContent":["<template>\n\t<div class=\"flex-nowrap flex gap-small\">\n <VueDraggableNext v-if=\"localImages.length > 0\" class=\"gap-small flex dragArea list-group w-full\" v-model=\"localImages\" @change=\"emitChanges\">\n\t\t\t<div v-for=\"(image, index) in localImages\" class=\"pos-relative\">\n\t\t\t\t<img loading=\"lazy\" class=\"i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden\" :src=\"(FILE_SERVER_URL || '') + image\" />\n\t\t\t\t\n <IconCross \n @click=\"deleteImage(index)\" \n class=\"cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro\"\n />\n\t\t\t</div>\n\t\t</VueDraggableNext>\n <div\n v-if=\"localImages.length > 0\" \n class=\"i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small\"\n >\n <UploadImageMultiple \n @update:images=\"onImagesUpdate\"\n text=\"Add\"\n :options=\"{\n showText: false\n }\"\n :uploadPath=\"'photos'\"\n class=\"radius-big\"\n />\n </div>\n\n\n\t\t<UploadImageMultiple \t\n v-if=\"localImages.length < 1\" \n @update:images=\"onImagesUpdate\"\n :uploadPath=\"props.uploadPath\"\n :text=\"props.text\"\n :options=\"props.options\"\n class=\"w-100 pd-medium\"\n />\n\t</div>\t\n</template>\n\n<script setup>\nimport { ref, defineProps, watchEffect } from 'vue';\nimport { VueDraggableNext } from 'vue-draggable-next'\nimport UploadImageMultiple from \"@martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue\";\nimport IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue';\n\nconst props = defineProps({\n images: Array,\n text: Object,\n options: Object,\n uploadPath: {\n type: Object,\n default: 'unsorted'\n }\n});\n\nconst emit = defineEmits(['update:images'])\n\nconst localImages = ref([...props.images])\n\nwatchEffect(() => {\n localImages.value = [...props.images]; // Обновление localImages при изменении props.images\n});\n\nconst emitChanges = () => {\n emit('update:images', localImages.value)\n}\n\nconst onImagesUpdate = (newImages) => {\n localImages.value = [...localImages.value, ...newImages]\n emitChanges()\n}\n\nconst deleteImage = (index) => {\n localImages.value.splice(index, 1)\n emitChanges()\n}\n</script>\n\n<style lang=\"scss\">\n// Your styles here\n</style>\n"],"names":["ref","watchEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,UAAM,QAAQ;AAUd,UAAM,OAAO;AAEb,UAAM,cAAcA,IAAAA,IAAI,CAAC,GAAG,MAAM,MAAM,CAAC;AAEzCC,QAAAA,YAAY,MAAM;AAChB,kBAAY,QAAQ,CAAC,GAAG,MAAM,MAAM;AAAA,IACtC,CAAC;AAED,UAAM,cAAc,MAAM;AACxB,WAAK,iBAAiB,YAAY,KAAK;AAAA,IACzC;AAEA,UAAM,iBAAiB,CAAC,cAAc;AACpC,kBAAY,QAAQ,CAAC,GAAG,YAAY,OAAO,GAAG,SAAS;AACvD,kBAAW;AAAA,IACb;AAEA,UAAM,cAAc,CAAC,UAAU;AAC7B,kBAAY,MAAM,OAAO,OAAO,CAAC;AACjC,kBAAW;AAAA,IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
import { ref, watchEffect, createElementBlock, openBlock, createBlock, createCommentVNode, unref, withCtx, Fragment, renderList, createElementVNode, createVNode } from "vue";
|
|
2
|
+
import { VueDraggableNext } from "../../../../node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.6_vue@3.5.21_typescript@5.9.2_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
|
|
3
|
+
import _sfc_main$2 from "../UploadImageMultiple/UploadImageMultiple.vue.js";
|
|
4
|
+
import _sfc_main$1 from "../../modules/icons/navigation/IconCross.vue.js";
|
|
5
|
+
import "./EditImages.vue.js";
|
|
6
|
+
const _hoisted_1 = { class: "flex-nowrap flex gap-small" };
|
|
7
|
+
const _hoisted_2 = { class: "pos-relative" };
|
|
8
|
+
const _hoisted_3 = ["src"];
|
|
9
|
+
const _hoisted_4 = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small"
|
|
12
|
+
};
|
|
13
|
+
const _sfc_main = {
|
|
14
|
+
__name: "EditImages",
|
|
15
|
+
props: {
|
|
16
|
+
images: Array,
|
|
17
|
+
text: Object,
|
|
18
|
+
options: Object,
|
|
19
|
+
uploadPath: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: "unsorted"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:images"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const emit = __emit;
|
|
28
|
+
const localImages = ref([...props.images]);
|
|
29
|
+
watchEffect(() => {
|
|
30
|
+
localImages.value = [...props.images];
|
|
31
|
+
});
|
|
32
|
+
const emitChanges = () => {
|
|
33
|
+
emit("update:images", localImages.value);
|
|
34
|
+
};
|
|
35
|
+
const onImagesUpdate = (newImages) => {
|
|
36
|
+
localImages.value = [...localImages.value, ...newImages];
|
|
37
|
+
emitChanges();
|
|
38
|
+
};
|
|
39
|
+
const deleteImage = (index) => {
|
|
40
|
+
localImages.value.splice(index, 1);
|
|
41
|
+
emitChanges();
|
|
42
|
+
};
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
45
|
+
localImages.value.length > 0 ? (openBlock(), createBlock(unref(VueDraggableNext), {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: "gap-small flex dragArea list-group w-full",
|
|
48
|
+
modelValue: localImages.value,
|
|
49
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localImages.value = $event),
|
|
50
|
+
onChange: emitChanges
|
|
51
|
+
}, {
|
|
52
|
+
default: withCtx(() => [
|
|
53
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(localImages.value, (image, index) => {
|
|
54
|
+
return openBlock(), createElementBlock("div", _hoisted_2, [
|
|
55
|
+
createElementVNode("img", {
|
|
56
|
+
loading: "lazy",
|
|
57
|
+
class: "i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden",
|
|
58
|
+
src: (_ctx.FILE_SERVER_URL || "") + image
|
|
59
|
+
}, null, 8, _hoisted_3),
|
|
60
|
+
createVNode(_sfc_main$1, {
|
|
61
|
+
onClick: ($event) => deleteImage(index),
|
|
62
|
+
class: "cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro"
|
|
63
|
+
}, null, 8, ["onClick"])
|
|
64
|
+
]);
|
|
65
|
+
}), 256))
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
69
|
+
localImages.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
70
|
+
createVNode(_sfc_main$2, {
|
|
71
|
+
"onUpdate:images": onImagesUpdate,
|
|
72
|
+
text: "Add",
|
|
73
|
+
options: {
|
|
74
|
+
showText: false
|
|
75
|
+
},
|
|
76
|
+
uploadPath: "photos",
|
|
77
|
+
class: "radius-big"
|
|
78
|
+
})
|
|
79
|
+
])) : createCommentVNode("", true),
|
|
80
|
+
localImages.value.length < 1 ? (openBlock(), createBlock(_sfc_main$2, {
|
|
81
|
+
key: 2,
|
|
82
|
+
"onUpdate:images": onImagesUpdate,
|
|
83
|
+
uploadPath: props.uploadPath,
|
|
84
|
+
text: props.text,
|
|
85
|
+
options: props.options,
|
|
86
|
+
class: "w-100 pd-medium"
|
|
87
|
+
}, null, 8, ["uploadPath", "text", "options"])) : createCommentVNode("", true)
|
|
88
|
+
]);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
export {
|
|
93
|
+
_sfc_main as default
|
|
94
|
+
};
|
|
2
95
|
//# sourceMappingURL=EditImages.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditImages.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"EditImages.vue2.js","sources":["../../../../../src/components/EditImages/EditImages.vue"],"sourcesContent":["<template>\n\t<div class=\"flex-nowrap flex gap-small\">\n <VueDraggableNext v-if=\"localImages.length > 0\" class=\"gap-small flex dragArea list-group w-full\" v-model=\"localImages\" @change=\"emitChanges\">\n\t\t\t<div v-for=\"(image, index) in localImages\" class=\"pos-relative\">\n\t\t\t\t<img loading=\"lazy\" class=\"i-extra object-fit-contain bg-black-transp-5 pd-nano radius-small o-hidden\" :src=\"(FILE_SERVER_URL || '') + image\" />\n\t\t\t\t\n <IconCross \n @click=\"deleteImage(index)\" \n class=\"cursor-pointer pos-absolute t-center flex-center flex radius-extra i-medium bg-red pos-t-10-negative pos-r-10-negative pd-micro\"\n />\n\t\t\t</div>\n\t\t</VueDraggableNext>\n <div\n v-if=\"localImages.length > 0\" \n class=\"i-extra uppercase flex-center flex radius-small o-hidden br-solid br-main br-2px pd-small\"\n >\n <UploadImageMultiple \n @update:images=\"onImagesUpdate\"\n text=\"Add\"\n :options=\"{\n showText: false\n }\"\n :uploadPath=\"'photos'\"\n class=\"radius-big\"\n />\n </div>\n\n\n\t\t<UploadImageMultiple \t\n v-if=\"localImages.length < 1\" \n @update:images=\"onImagesUpdate\"\n :uploadPath=\"props.uploadPath\"\n :text=\"props.text\"\n :options=\"props.options\"\n class=\"w-100 pd-medium\"\n />\n\t</div>\t\n</template>\n\n<script setup>\nimport { ref, defineProps, watchEffect } from 'vue';\nimport { VueDraggableNext } from 'vue-draggable-next'\nimport UploadImageMultiple from \"@martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue\";\nimport IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue';\n\nconst props = defineProps({\n images: Array,\n text: Object,\n options: Object,\n uploadPath: {\n type: Object,\n default: 'unsorted'\n }\n});\n\nconst emit = defineEmits(['update:images'])\n\nconst localImages = ref([...props.images])\n\nwatchEffect(() => {\n localImages.value = [...props.images]; // Обновление localImages при изменении props.images\n});\n\nconst emitChanges = () => {\n emit('update:images', localImages.value)\n}\n\nconst onImagesUpdate = (newImages) => {\n localImages.value = [...localImages.value, ...newImages]\n emitChanges()\n}\n\nconst deleteImage = (index) => {\n localImages.value.splice(index, 1)\n emitChanges()\n}\n</script>\n\n<style lang=\"scss\">\n// Your styles here\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,UAAM,QAAQ;AAUd,UAAM,OAAO;AAEb,UAAM,cAAc,IAAI,CAAC,GAAG,MAAM,MAAM,CAAC;AAEzC,gBAAY,MAAM;AAChB,kBAAY,QAAQ,CAAC,GAAG,MAAM,MAAM;AAAA,IACtC,CAAC;AAED,UAAM,cAAc,MAAM;AACxB,WAAK,iBAAiB,YAAY,KAAK;AAAA,IACzC;AAEA,UAAM,iBAAiB,CAAC,cAAc;AACpC,kBAAY,QAAQ,CAAC,GAAG,YAAY,OAAO,GAAG,SAAS;AACvD,kBAAW;AAAA,IACb;AAEA,UAAM,cAAc,CAAC,UAAU;AAC7B,kBAAY,MAAM,OAAO,OAAO,CAAC;AACjC,kBAAW;AAAA,IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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 vueI18n = require("vue-i18n");
|
|
5
|
-
const Loader = require("../Loader/Loader.
|
|
5
|
+
const Loader = require("../Loader/Loader.vue2.cjs");
|
|
6
6
|
const Slider = require("../Slider/Slider.vue.cjs");
|
|
7
7
|
const EmptyState = require("../EmptyState/EmptyState.vue.cjs");
|
|
8
8
|
;/* empty css */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, createElementBlock, openBlock, createBlock, createVNode, normalizeClass, withCtx, Fragment, renderList, Transition, renderSlot } from "vue";
|
|
2
2
|
import { useI18n } from "vue-i18n";
|
|
3
|
-
import Loader from "../Loader/Loader.
|
|
3
|
+
import Loader from "../Loader/Loader.vue2.js";
|
|
4
4
|
import _sfc_main$2 from "../Slider/Slider.vue.js";
|
|
5
5
|
import _sfc_main$1 from "../EmptyState/EmptyState.vue.js";
|
|
6
6
|
/* empty css */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
-
const Loader = require("../Loader/Loader.
|
|
4
|
+
const Loader = require("../Loader/Loader.vue2.cjs");
|
|
5
5
|
const Skeleton = require("../Skeleton/Skeleton.vue2.cjs");
|
|
6
6
|
const EmptyState = require("../EmptyState/EmptyState.vue.cjs");
|
|
7
|
-
const Dropdown = require("../Dropdown/Dropdown.
|
|
7
|
+
const Dropdown = require("../Dropdown/Dropdown.vue2.cjs");
|
|
8
8
|
const Calendar = require("../Calendar/Calendar.vue2.cjs");
|
|
9
9
|
const BlockSearch = require("../../modules/globals/views/components/blocks/BlockSearch.vue.cjs");
|
|
10
10
|
const BlockSorting = require("../../modules/globals/views/components/blocks/BlockSorting.vue.cjs");
|
|
11
|
-
const Filters = require("../../modules/globals/views/components/sections/Filters.
|
|
11
|
+
const Filters = require("../../modules/globals/views/components/sections/Filters.vue2.cjs");
|
|
12
12
|
const ButtonSort = require("../../modules/globals/views/components/elements/ButtonSort.vue.cjs");
|
|
13
13
|
const ButtonDate = require("../../modules/globals/views/components/elements/ButtonDate.vue.cjs");
|
|
14
14
|
;/* empty css */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { mergeModels, useModel, ref, computed, watch, onMounted, onUnmounted, createElementBlock, openBlock, Fragment, createCommentVNode, createBlock, normalizeClass, withCtx, createVNode, renderList, resolveDynamicComponent, unref, TransitionGroup, renderSlot } from "vue";
|
|
2
|
-
import Loader from "../Loader/Loader.
|
|
2
|
+
import Loader from "../Loader/Loader.vue2.js";
|
|
3
3
|
import Skeleton from "../Skeleton/Skeleton.vue2.js";
|
|
4
4
|
import _sfc_main$6 from "../EmptyState/EmptyState.vue.js";
|
|
5
|
-
import _sfc_main$2 from "../Dropdown/Dropdown.
|
|
5
|
+
import _sfc_main$2 from "../Dropdown/Dropdown.vue2.js";
|
|
6
6
|
import Calendar from "../Calendar/Calendar.vue2.js";
|
|
7
7
|
import _sfc_main$1 from "../../modules/globals/views/components/blocks/BlockSearch.vue.js";
|
|
8
8
|
import _sfc_main$5 from "../../modules/globals/views/components/blocks/BlockSorting.vue.js";
|
|
9
|
-
import Filters from "../../modules/globals/views/components/sections/Filters.
|
|
9
|
+
import Filters from "../../modules/globals/views/components/sections/Filters.vue2.js";
|
|
10
10
|
import _sfc_main$4 from "../../modules/globals/views/components/elements/ButtonSort.vue.js";
|
|
11
11
|
import _sfc_main$3 from "../../modules/globals/views/components/elements/ButtonDate.vue.js";
|
|
12
12
|
/* empty css */
|
|
@@ -20,11 +20,12 @@ const findIndex = (arr, callback) => {
|
|
|
20
20
|
};
|
|
21
21
|
const createClasses = (tag, tags, validation = [], customDuplicateFn) => {
|
|
22
22
|
if (tag.text === void 0) tag = { text: tag };
|
|
23
|
+
if (!Array.isArray(tags)) tags = [];
|
|
23
24
|
const classes = validateUserRules(tag, validation);
|
|
24
25
|
const index = findIndex(tags, (t) => t === tag);
|
|
25
26
|
const tagsDiff = clone(tags);
|
|
26
27
|
const inputTag = index !== -1 ? tagsDiff.splice(index, 1)[0] : clone(tag);
|
|
27
|
-
const duplicate = customDuplicateFn ? customDuplicateFn(tagsDiff, inputTag) : tagsDiff.map((t) => t.text).indexOf(inputTag.text) !== -1;
|
|
28
|
+
const duplicate = customDuplicateFn ? customDuplicateFn(tagsDiff, inputTag) : Array.isArray(tagsDiff) ? tagsDiff.map((t) => t.text).indexOf(inputTag.text) !== -1 : false;
|
|
28
29
|
if (duplicate) classes.push("ti-duplicate");
|
|
29
30
|
classes.length === 0 ? classes.push("ti-valid") : classes.push("ti-invalid");
|
|
30
31
|
return classes;
|
|
@@ -32,10 +33,18 @@ const createClasses = (tag, tags, validation = [], customDuplicateFn) => {
|
|
|
32
33
|
const createTag = (tag, ...rest) => {
|
|
33
34
|
if (tag.text === void 0) tag = { text: tag };
|
|
34
35
|
const t = clone(tag);
|
|
36
|
+
if (rest[0] && !Array.isArray(rest[0])) {
|
|
37
|
+
rest[0] = [];
|
|
38
|
+
}
|
|
35
39
|
t.tiClasses = createClasses(tag, ...rest);
|
|
36
40
|
return t;
|
|
37
41
|
};
|
|
38
|
-
const createTags = (tags, ...rest) =>
|
|
42
|
+
const createTags = (tags, ...rest) => {
|
|
43
|
+
if (!Array.isArray(tags)) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
return tags.map((t) => createTag(t, tags, ...rest));
|
|
47
|
+
};
|
|
39
48
|
exports.clone = clone;
|
|
40
49
|
exports.createClasses = createClasses;
|
|
41
50
|
exports.createTag = createTag;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-tags.cjs","sources":["../../../../../src/components/FieldTags/create-tags.js"],"sourcesContent":["// helper functions\n\nconst validateUserRules = (tag, validation) => {\n return validation\n .filter(val => {\n const { text } = tag;\n // if the rule is a string, we convert it to RegExp\n if (typeof val.rule === 'string') return !new RegExp(val.rule).test(text);\n\n if (val.rule instanceof RegExp) return !val.rule.test(text);\n\n // if we deal with a function, invoke it\n const isFunction = {}.toString.call(val.rule) === '[object Function]';\n if (isFunction) return val.rule(tag);\n })\n .map(val => val.classes);\n};\n\nconst clone = node => JSON.parse(JSON.stringify(node));\n\nconst findIndex = (arr, callback) => {\n let index = 0;\n while (index < arr.length) {\n if (callback(arr[index], index, arr)) return index;\n index++;\n }\n return -1;\n};\n\nconst createClasses = (tag, tags, validation = [], customDuplicateFn) => {\n if (tag.text === undefined) tag = { text: tag };\n\n // create css classes from the user validation array\n const classes = validateUserRules(tag, validation);\n\n // if we find the tag, it's an exsting one which is edited.\n // in this case we must splice it out\n const index = findIndex(tags, t => t === tag);\n const tagsDiff = clone(tags);\n const inputTag = index !== -1 ? tagsDiff.splice(index, 1)[0] : clone(tag);\n\n // check whether the tag is a duplicate or not\n const duplicate = customDuplicateFn ? customDuplicateFn(tagsDiff, inputTag) : tagsDiff.map(t => t.text).indexOf(inputTag.text) !== -1;\n\n // if it's a duplicate, push the class duplicate to the array\n if (duplicate) classes.push('ti-duplicate');\n\n // if we find no classes, the tag is valid → push the class valid\n classes.length === 0 ? classes.push('ti-valid') : classes.push('ti-invalid');\n return classes;\n};\n\n/**\n * @description Create one tag out of a String or validate an existing one\n * @property {helpers}\n * @param {Object|String} tag A tag which should be validated | A String to create a tag\n * @param {Array} tagsarray The tags array\n * @param {Array} [validation=[]] The validation Array is optional (pass it if you use one)\n * @returns {Object} The created (validated) tag\n */\nconst createTag = (tag, ...rest) => {\n // if text is undefined, a string is passed. let's make a tag out of it\n if (tag.text === undefined) tag = { text: tag };\n\n // we better make a clone to not getting reference trouble\n const t = clone(tag);\n\n // create the validation classes\n t.tiClasses = createClasses(tag, ...rest);\n return t;\n};\n\n/**\n * @description Create multiple tags out of Strings or validate existing tags\n * @property {helpers}\n * @param {Array} tagsarray An Array containing tags or strings. See example below.\n * @param {Array} [validation=[]] The validation Array is optional (pass it if you use one)\n * @returns {Array} An array containing (validated) tags\n * @example /* Example to call the function */\n const validatedTags = createTags(['tag1Text', 'tag2Text'], [{ type: 'length', rule: /[0-9]/ }])\n */\nconst createTags = (tags, ...rest) => tags.map(t => createTag(t, tags, ...rest));\n\nexport { clone, createClasses, createTag, createTags };\n"],"names":[],"mappings":";;AAEA,MAAM,oBAAoB,CAAC,KAAK,eAAe;AAC7C,SAAO,WACJ,OAAO,SAAO;AACb,UAAM,EAAE,KAAI,IAAK;AAEjB,QAAI,OAAO,IAAI,SAAS,SAAU,QAAO,CAAC,IAAI,OAAO,IAAI,IAAI,EAAE,KAAK,IAAI;AAExE,QAAI,IAAI,gBAAgB,OAAQ,QAAO,CAAC,IAAI,KAAK,KAAK,IAAI;AAG1D,UAAM,aAAa,CAAA,EAAG,SAAS,KAAK,IAAI,IAAI,MAAM;AAClD,QAAI,WAAY,QAAO,IAAI,KAAK,GAAG;AAAA,EACrC,CAAC,EACA,IAAI,SAAO,IAAI,OAAO;AAC3B;AAEK,MAAC,QAAQ,UAAQ,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAErD,MAAM,YAAY,CAAC,KAAK,aAAa;AACnC,MAAI,QAAQ;AACZ,SAAO,QAAQ,IAAI,QAAQ;AACzB,QAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,EAAG,QAAO;AAC7C;AAAA,EACF;AACA,SAAO;AACT;AAEK,MAAC,gBAAgB,CAAC,KAAK,MAAM,aAAa,CAAA,GAAI,sBAAsB;AACvE,MAAI,IAAI,SAAS,OAAW,OAAM,EAAE,MAAM,IAAG;AAG7C,QAAM,UAAU,kBAAkB,KAAK,UAAU;AAIjD,QAAM,QAAQ,UAAU,MAAM,OAAK,MAAM,GAAG;AAC5C,QAAM,WAAW,MAAM,IAAI;AAC3B,QAAM,WAAW,UAAU,KAAK,SAAS,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,MAAM,GAAG;AAGxE,QAAM,YAAY,oBAAoB,kBAAkB,UAAU,QAAQ,IAAI,SAAS,IAAI,OAAK,EAAE,IAAI,EAAE,QAAQ,SAAS,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"create-tags.cjs","sources":["../../../../../src/components/FieldTags/create-tags.js"],"sourcesContent":["// helper functions\n\nconst validateUserRules = (tag, validation) => {\n return validation\n .filter(val => {\n const { text } = tag;\n // if the rule is a string, we convert it to RegExp\n if (typeof val.rule === 'string') return !new RegExp(val.rule).test(text);\n\n if (val.rule instanceof RegExp) return !val.rule.test(text);\n\n // if we deal with a function, invoke it\n const isFunction = {}.toString.call(val.rule) === '[object Function]';\n if (isFunction) return val.rule(tag);\n })\n .map(val => val.classes);\n};\n\nconst clone = node => JSON.parse(JSON.stringify(node));\n\nconst findIndex = (arr, callback) => {\n let index = 0;\n while (index < arr.length) {\n if (callback(arr[index], index, arr)) return index;\n index++;\n }\n return -1;\n};\n\nconst createClasses = (tag, tags, validation = [], customDuplicateFn) => {\n if (tag.text === undefined) tag = { text: tag };\n \n // Ensure tags is an array\n if (!Array.isArray(tags)) tags = [];\n\n // create css classes from the user validation array\n const classes = validateUserRules(tag, validation);\n\n // if we find the tag, it's an exsting one which is edited.\n // in this case we must splice it out\n const index = findIndex(tags, t => t === tag);\n const tagsDiff = clone(tags);\n const inputTag = index !== -1 ? tagsDiff.splice(index, 1)[0] : clone(tag);\n\n // check whether the tag is a duplicate or not\n const duplicate = customDuplicateFn ? customDuplicateFn(tagsDiff, inputTag) : (Array.isArray(tagsDiff) ? tagsDiff.map(t => t.text).indexOf(inputTag.text) !== -1 : false);\n\n // if it's a duplicate, push the class duplicate to the array\n if (duplicate) classes.push('ti-duplicate');\n\n // if we find no classes, the tag is valid → push the class valid\n classes.length === 0 ? classes.push('ti-valid') : classes.push('ti-invalid');\n return classes;\n};\n\n/**\n * @description Create one tag out of a String or validate an existing one\n * @property {helpers}\n * @param {Object|String} tag A tag which should be validated | A String to create a tag\n * @param {Array} tagsarray The tags array\n * @param {Array} [validation=[]] The validation Array is optional (pass it if you use one)\n * @returns {Object} The created (validated) tag\n */\nconst createTag = (tag, ...rest) => {\n // if text is undefined, a string is passed. let's make a tag out of it\n if (tag.text === undefined) tag = { text: tag };\n\n // we better make a clone to not getting reference trouble\n const t = clone(tag);\n \n // Ensure the first argument in rest (tags array) is actually an array\n if (rest[0] && !Array.isArray(rest[0])) {\n rest[0] = [];\n }\n\n // create the validation classes\n t.tiClasses = createClasses(tag, ...rest);\n return t;\n};\n\n/**\n * @description Create multiple tags out of Strings or validate existing tags\n * @property {helpers}\n * @param {Array} tagsarray An Array containing tags or strings. See example below.\n * @param {Array} [validation=[]] The validation Array is optional (pass it if you use one)\n * @returns {Array} An array containing (validated) tags\n * @example /* Example to call the function */\n const validatedTags = createTags(['tag1Text', 'tag2Text'], [{ type: 'length', rule: /[0-9]/ }])\n */\nconst createTags = (tags, ...rest) => {\n if (!Array.isArray(tags)) {\n return [];\n }\n return tags.map(t => createTag(t, tags, ...rest));\n};\n\nexport { clone, createClasses, createTag, createTags };\n"],"names":[],"mappings":";;AAEA,MAAM,oBAAoB,CAAC,KAAK,eAAe;AAC7C,SAAO,WACJ,OAAO,SAAO;AACb,UAAM,EAAE,KAAI,IAAK;AAEjB,QAAI,OAAO,IAAI,SAAS,SAAU,QAAO,CAAC,IAAI,OAAO,IAAI,IAAI,EAAE,KAAK,IAAI;AAExE,QAAI,IAAI,gBAAgB,OAAQ,QAAO,CAAC,IAAI,KAAK,KAAK,IAAI;AAG1D,UAAM,aAAa,CAAA,EAAG,SAAS,KAAK,IAAI,IAAI,MAAM;AAClD,QAAI,WAAY,QAAO,IAAI,KAAK,GAAG;AAAA,EACrC,CAAC,EACA,IAAI,SAAO,IAAI,OAAO;AAC3B;AAEK,MAAC,QAAQ,UAAQ,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAErD,MAAM,YAAY,CAAC,KAAK,aAAa;AACnC,MAAI,QAAQ;AACZ,SAAO,QAAQ,IAAI,QAAQ;AACzB,QAAI,SAAS,IAAI,KAAK,GAAG,OAAO,GAAG,EAAG,QAAO;AAC7C;AAAA,EACF;AACA,SAAO;AACT;AAEK,MAAC,gBAAgB,CAAC,KAAK,MAAM,aAAa,CAAA,GAAI,sBAAsB;AACvE,MAAI,IAAI,SAAS,OAAW,OAAM,EAAE,MAAM,IAAG;AAG7C,MAAI,CAAC,MAAM,QAAQ,IAAI,EAAG,QAAO,CAAA;AAGjC,QAAM,UAAU,kBAAkB,KAAK,UAAU;AAIjD,QAAM,QAAQ,UAAU,MAAM,OAAK,MAAM,GAAG;AAC5C,QAAM,WAAW,MAAM,IAAI;AAC3B,QAAM,WAAW,UAAU,KAAK,SAAS,OAAO,OAAO,CAAC,EAAE,CAAC,IAAI,MAAM,GAAG;AAGxE,QAAM,YAAY,oBAAoB,kBAAkB,UAAU,QAAQ,IAAK,MAAM,QAAQ,QAAQ,IAAI,SAAS,IAAI,OAAK,EAAE,IAAI,EAAE,QAAQ,SAAS,IAAI,MAAM,KAAK;AAGnK,MAAI,UAAW,SAAQ,KAAK,cAAc;AAG1C,UAAQ,WAAW,IAAI,QAAQ,KAAK,UAAU,IAAI,QAAQ,KAAK,YAAY;AAC3E,SAAO;AACT;AAUK,MAAC,YAAY,CAAC,QAAQ,SAAS;AAElC,MAAI,IAAI,SAAS,OAAW,OAAM,EAAE,MAAM,IAAG;AAG7C,QAAM,IAAI,MAAM,GAAG;AAGnB,MAAI,KAAK,CAAC,KAAK,CAAC,MAAM,QAAQ,KAAK,CAAC,CAAC,GAAG;AACtC,SAAK,CAAC,IAAI,CAAA;AAAA,EACZ;AAGA,IAAE,YAAY,cAAc,KAAK,GAAG,IAAI;AACxC,SAAO;AACT;AAWK,MAAC,aAAa,CAAC,SAAS,SAAS;AACpC,MAAI,CAAC,MAAM,QAAQ,IAAI,GAAG;AACxB,WAAO,CAAA;AAAA,EACT;AACA,SAAO,KAAK,IAAI,OAAK,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;AAClD;;;;;"}
|