admins-components 9.0.40 → 9.0.42

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.
Files changed (80) hide show
  1. package/dist/admins-components.js +6 -6
  2. package/dist/admins-components169.js +1 -1
  3. package/dist/admins-components172.js +1 -1
  4. package/dist/admins-components173.js +1 -1
  5. package/dist/admins-components175.js +1 -1
  6. package/dist/admins-components23.js +20 -187
  7. package/dist/admins-components23.js.map +1 -1
  8. package/dist/admins-components25.js +2 -2
  9. package/dist/admins-components25.js.map +1 -1
  10. package/dist/admins-components26.js +214 -70
  11. package/dist/admins-components26.js.map +1 -1
  12. package/dist/admins-components28.js +6 -51
  13. package/dist/admins-components28.js.map +1 -1
  14. package/dist/admins-components29.js +71 -67
  15. package/dist/admins-components29.js.map +1 -1
  16. package/dist/{admins-components27.js → admins-components30.js} +1 -1
  17. package/dist/admins-components30.js.map +1 -0
  18. package/dist/admins-components31.js +51 -6
  19. package/dist/admins-components31.js.map +1 -1
  20. package/dist/admins-components32.js +68 -59
  21. package/dist/admins-components32.js.map +1 -1
  22. package/dist/admins-components34.js +2 -2
  23. package/dist/admins-components34.js.map +1 -1
  24. package/dist/admins-components35.js +61 -35
  25. package/dist/admins-components35.js.map +1 -1
  26. package/dist/admins-components37.js +2 -2
  27. package/dist/admins-components37.js.map +1 -1
  28. package/dist/admins-components38.js +37 -34
  29. package/dist/admins-components38.js.map +1 -1
  30. package/dist/admins-components40.js +6 -32
  31. package/dist/admins-components40.js.map +1 -1
  32. package/dist/admins-components41.js +37 -0
  33. package/dist/{admins-components39.js.map → admins-components41.js.map} +1 -1
  34. package/dist/admins-components42.js +2 -4
  35. package/dist/admins-components42.js.map +1 -1
  36. package/dist/admins-components43.js +28 -142
  37. package/dist/admins-components43.js.map +1 -1
  38. package/dist/admins-components45.js +2 -2
  39. package/dist/admins-components45.js.map +1 -1
  40. package/dist/admins-components46.js +132 -110
  41. package/dist/admins-components46.js.map +1 -1
  42. package/dist/admins-components48.js +6 -179
  43. package/dist/admins-components48.js.map +1 -1
  44. package/dist/admins-components49.js +124 -4
  45. package/dist/admins-components49.js.map +1 -1
  46. package/dist/admins-components50.js +4 -19
  47. package/dist/admins-components50.js.map +1 -1
  48. package/dist/admins-components51.js +180 -0
  49. package/dist/admins-components51.js.map +1 -0
  50. package/dist/admins-components52.js +2 -4
  51. package/dist/admins-components52.js.map +1 -1
  52. package/dist/admins-components58.js.map +1 -1
  53. package/dist/admins-components61.js +6 -6
  54. package/dist/admins-components63.js +21 -16
  55. package/dist/admins-components63.js.map +1 -1
  56. package/dist/admins-components64.js.map +1 -1
  57. package/dist/admins-components65.js +3 -3
  58. package/dist/admins-components65.js.map +1 -1
  59. package/dist/admins-components67.js.map +1 -1
  60. package/dist/admins-components68.js +18 -19
  61. package/dist/admins-components68.js.map +1 -1
  62. package/dist/admins-components70.js.map +1 -1
  63. package/dist/admins-components72.js +1 -1
  64. package/dist/admins-components81.js +1 -1
  65. package/dist/admins-components84.js +2 -2
  66. package/dist/admins-components90.js +1 -1
  67. package/dist/main.css +1 -1
  68. package/dist/main.css.map +1 -1
  69. package/dist/src/components/DropdownMenu.vue.d.ts +1 -0
  70. package/dist/src/components/DropdownSelect.vue.d.ts +3 -0
  71. package/dist/src/components/Loader.vue.d.ts +4 -1
  72. package/dist/src/styles/components/data-table/data-table.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  73. package/dist/src/styles/components/dropdown-select.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  74. package/dist/src/styles/components/loader.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  75. package/dist/src/types/data-list.d.ts +2 -2
  76. package/package.json +1 -1
  77. package/dist/admins-components27.js.map +0 -1
  78. package/dist/admins-components39.js +0 -5
  79. package/dist/admins-components47.js +0 -5
  80. package/dist/admins-components47.js.map +0 -1
@@ -1,37 +1,40 @@
1
- import e from "./admins-components6.js";
2
- import t from "./admins-components37.js";
3
- import { createBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, openBlock as o, toDisplayString as s, withCtx as c } from "vue";
4
- //#region src/components/ConfirmModal.vue?vue&type=script&setup=true&lang.ts
5
- var l = { class: "c-confirm-modal-message" }, u = /* @__PURE__ */ a({
6
- __name: "ConfirmModal",
7
- props: {
8
- title: {},
9
- message: {},
10
- confirmLabel: { default: "Rendben" },
11
- cancelLabel: { default: "Mégse" },
12
- type: { default: "normal" }
13
- },
14
- emits: ["confirm", "cancel"],
15
- setup(a, { emit: u }) {
16
- let d = u;
17
- return (u, f) => (o(), n(t, {
18
- title: a.title,
19
- onClose: f[2] ||= (e) => d("cancel")
20
- }, {
21
- footer: c(() => [i(e, {
22
- label: a.cancelLabel,
23
- type: "normal",
24
- outline: "",
25
- onClick: f[0] ||= (e) => d("cancel")
26
- }, null, 8, ["label"]), i(e, {
27
- label: a.confirmLabel,
28
- type: a.type,
29
- onClick: f[1] ||= (e) => d("confirm")
30
- }, null, 8, ["label", "type"])]),
31
- default: c(() => [r("p", l, s(a.message), 1)]),
32
- _: 1
33
- }, 8, ["title"]));
1
+ import { Teleport as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, onMounted as o, onUnmounted as s, openBlock as c, renderSlot as l, toDisplayString as u } from "vue";
2
+ //#region src/components/Modal.vue?vue&type=script&setup=true&lang.ts
3
+ var d = { class: "ac-component" }, f = { class: "c-modal" }, p = {
4
+ key: 0,
5
+ class: "c-modal-header"
6
+ }, m = { class: "c-modal-title" }, h = { class: "c-modal-body c-scroll" }, g = {
7
+ key: 1,
8
+ class: "c-modal-footer"
9
+ }, _ = /* @__PURE__ */ a({
10
+ __name: "Modal",
11
+ props: { title: {} },
12
+ emits: ["close"],
13
+ setup(a, { emit: _ }) {
14
+ let v = _;
15
+ function y(e) {
16
+ e.target === e.currentTarget && v("close");
17
+ }
18
+ function b(e) {
19
+ e.key === "Escape" && v("close");
20
+ }
21
+ return o(() => {
22
+ document.addEventListener("keydown", b);
23
+ }), s(() => {
24
+ document.removeEventListener("keydown", b);
25
+ }), (o, s) => (c(), t(e, { to: "body" }, [i("div", d, [i("div", {
26
+ class: "c-modal-backdrop",
27
+ onMousedown: y
28
+ }, [i("div", f, [
29
+ a.title ? (c(), r("div", p, [i("h3", m, u(a.title), 1), i("button", {
30
+ type: "button",
31
+ class: "c-modal-close",
32
+ onClick: s[0] ||= (e) => v("close")
33
+ }, [...s[1] ||= [i("i", { class: "fa-solid fa-xmark" }, null, -1)]])])) : n("", !0),
34
+ i("div", h, [l(o.$slots, "default")]),
35
+ o.$slots.footer ? (c(), r("div", g, [l(o.$slots, "footer")])) : n("", !0)
36
+ ])], 32)])]));
34
37
  }
35
38
  });
36
39
  //#endregion
37
- export { u as default };
40
+ export { _ as default };
@@ -1 +1 @@
1
- {"version":3,"file":"admins-components38.js","names":[],"sources":["../src/components/ConfirmModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ConfirmModalProps {\n title?: string\n message: string\n confirmLabel?: string\n cancelLabel?: string\n type?: ButtonType\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Modal from '@/components/Modal.vue'\nimport Button, { type ButtonType } from '@/components/Button.vue'\n\nwithDefaults(defineProps<ConfirmModalProps>(), {\n confirmLabel: 'Rendben',\n cancelLabel: 'Mégse',\n type: 'normal',\n})\n\nconst emit = defineEmits<{\n confirm: []\n cancel: []\n}>()\n</script>\n\n<template>\n <Modal :title=\"title\" @close=\"emit('cancel')\">\n <p class=\"c-confirm-modal-message\">{{ message }}</p>\n <template #footer>\n <Button :label=\"cancelLabel\" type=\"normal\" outline @click=\"emit('cancel')\" />\n <Button :label=\"confirmLabel\" :type=\"type\" @click=\"emit('confirm')\" />\n </template>\n </Modal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAoBA,IAAM,IAAO;yBAOX,EAMQ,GAAA;GANA,OAAO,EAAA;GAAQ,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,QAAA;;GAErB,QAAM,QAC8D,CAA7E,EAA6E,GAAA;IAApE,OAAO,EAAA;IAAa,MAAK;IAAS,SAAA;IAAS,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,QAAA;2BAC/D,EAAsE,GAAA;IAA7D,OAAO,EAAA;IAAe,MAAM,EAAA;IAAO,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,SAAA;;oBAHL,CAApD,EAAoD,KAApD,GAAoD,EAAd,EAAA,OAAO,GAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"admins-components38.js","names":["$slots"],"sources":["../src/components/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ModalProps {\n title?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted } from 'vue'\n\ndefineProps<ModalProps>()\n\nconst emit = defineEmits<{\n close: []\n}>()\n\nfunction onBackdropClick(e: MouseEvent) {\n if (e.target === e.currentTarget) {\n emit('close')\n }\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n emit('close')\n }\n}\n\nonMounted(() => {\n document.addEventListener('keydown', onKeydown)\n})\n\nonUnmounted(() => {\n document.removeEventListener('keydown', onKeydown)\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <div class=\"ac-component\">\n <div class=\"c-modal-backdrop\" @mousedown=\"onBackdropClick\">\n <div class=\"c-modal\">\n <div class=\"c-modal-header\" v-if=\"title\">\n <h3 class=\"c-modal-title\">{{ title }}</h3>\n <button type=\"button\" class=\"c-modal-close\" @click=\"emit('close')\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"c-modal-body c-scroll\">\n <slot />\n </div>\n <div v-if=\"$slots.footer\" class=\"c-modal-footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/modal.scss\"></style>\n"],"mappings":";;;;;;;;;;;;;EAWA,IAAM,IAAO;EAIb,SAAS,EAAgB,GAAe;GACtC,AAAI,EAAE,WAAW,EAAE,iBACjB,EAAK,OAAO;EAEhB;EAEA,SAAS,EAAU,GAAkB;GACnC,AAAI,EAAE,QAAQ,YACZ,EAAK,OAAO;EAEhB;SAEA,QAAgB;GACd,SAAS,iBAAiB,WAAW,CAAS;EAChD,CAAC,GAED,QAAkB;GAChB,SAAS,oBAAoB,WAAW,CAAS;EACnD,CAAC,mBAIC,EAmBW,GAAA,EAnBD,IAAG,OAAM,GAAA,CACjB,EAiBM,OAjBN,GAiBM,CAhBJ,EAeM,OAAA;GAfD,OAAM;GAAoB,aAAW;MACxC,EAaM,OAbN,GAaM;GAZ8B,EAAA,SAAA,EAAA,GAAlC,EAKM,OALN,GAKM,CAJJ,EAA0C,MAA1C,GAA0C,EAAb,EAAA,KAAK,GAAA,CAAA,GAClC,EAES,UAAA;IAFD,MAAK;IAAS,OAAM;IAAiB,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,OAAA;oBACtD,EAAiC,KAAA,EAA9B,OAAM,oBAAmB,GAAA,MAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;GAGhC,EAEM,OAFN,GAEM,CADJ,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;GAECA,EAAAA,OAAO,UAAA,EAAA,GAAlB,EAEM,OAFN,GAEM,CADJ,EAAsB,EAAA,QAAA,QAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
@@ -1,33 +1,7 @@
1
- import { createElementBlock as e, defineComponent as t, normalizeClass as n, openBlock as r, ref as i, withModifiers as a } from "vue";
2
- //#region src/components/CopyToClipboard.vue?vue&type=script&setup=true&lang.ts
3
- var o = /* @__PURE__ */ t({
4
- __name: "CopyToClipboard",
5
- props: {
6
- value: {},
7
- target: {},
8
- useParent: { type: Boolean }
9
- },
10
- setup(t) {
11
- let o = t, s = i(!1);
12
- function c(e) {
13
- let t = "";
14
- if (o.target) {
15
- let e = typeof o.target == "string" ? document.querySelector(o.target) : o.target;
16
- e && (t = e.innerText);
17
- } else if (o.useParent && e?.target) {
18
- let n = e.target.parentElement;
19
- n && (t = n.innerText);
20
- } else t = o.value == null ? "" : String(o.value);
21
- t && (navigator.clipboard.writeText(t), s.value = !0, setTimeout(() => {
22
- s.value = !1;
23
- }, 1500));
24
- }
25
- return (t, i) => (r(), e("i", {
26
- class: n([s.value ? "fa-solid fa-check c-copy-btn--copied" : "fa-regular fa-copy", "c-copy-btn"]),
27
- tabindex: "0",
28
- onClick: a(c, ["stop"])
29
- }, null, 2));
30
- }
31
- });
1
+ import './src/styles/components/modal.scss_vue_type_style_index_0_src_true_lang.css';
2
+ import e from "./admins-components38.js";
3
+ /* empty css */
4
+ //#region src/components/Modal.vue
5
+ var t = e;
32
6
  //#endregion
33
- export { o as default };
7
+ export { t as default };
@@ -1 +1 @@
1
- {"version":3,"file":"admins-components40.js","names":[],"sources":["../src/components/CopyToClipboard.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nconst props = defineProps<{\n value?: unknown\n target?: string | HTMLElement\n useParent?: boolean\n}>()\n\nconst copied = ref(false)\n\nfunction copy(event?: MouseEvent) {\n let text = ''\n\n if (props.target) {\n const element: HTMLElement | null = typeof props.target === 'string'\n ? document.querySelector(props.target)\n : props.target\n\n if (element) {\n text = element.innerText\n }\n }\n else if (props.useParent && event?.target) {\n const parent = (event.target as HTMLElement).parentElement\n if (parent) {\n text = parent.innerText\n }\n }\n else {\n text = props.value == null ? '' : String(props.value)\n }\n\n if (text) {\n navigator.clipboard.writeText(text)\n copied.value = true\n setTimeout(() => { copied.value = false }, 1500)\n }\n}\n</script>\n\n<template>\n <i\n :class=\"copied ? 'fa-solid fa-check c-copy-btn--copied' : 'fa-regular fa-copy'\"\n class=\"c-copy-btn\"\n tabindex=\"0\"\n @click.stop=\"copy\"\n ></i>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/copy-to-clipboard.scss\"></style>\n"],"mappings":";;;;;;;;;;EAGA,IAAM,IAAQ,GAMR,IAAS,EAAI,EAAK;EAExB,SAAS,EAAK,GAAoB;GAChC,IAAI,IAAO;GAEX,IAAI,EAAM,QAAQ;IAChB,IAAM,IAA8B,OAAO,EAAM,UAAW,WACxD,SAAS,cAAc,EAAM,MAAM,IACnC,EAAM;IAEV,AAAI,MACF,IAAO,EAAQ;GAEnB,OACK,IAAI,EAAM,aAAa,GAAO,QAAQ;IACzC,IAAM,IAAU,EAAM,OAAuB;IAC7C,AAAI,MACF,IAAO,EAAO;GAElB,OAEE,IAAO,EAAM,SAAS,OAAO,KAAK,OAAO,EAAM,KAAK;GAGtD,AAAI,MACF,UAAU,UAAU,UAAU,CAAI,GAClC,EAAO,QAAQ,IACf,iBAAiB;IAAE,EAAO,QAAQ;GAAM,GAAG,IAAI;EAEnD;yBAIE,EAKK,KAAA;GAJF,OAAK,EAAA,CAAE,EAAA,QAAM,yCAAA,sBACR,YAAY,CAAA;GAClB,UAAS;GACR,SAAK,EAAO,GAAI,CAAA,MAAA,CAAA"}
1
+ {"version":3,"file":"admins-components40.js","names":[],"sources":["../src/components/Modal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ModalProps {\n title?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted } from 'vue'\n\ndefineProps<ModalProps>()\n\nconst emit = defineEmits<{\n close: []\n}>()\n\nfunction onBackdropClick(e: MouseEvent) {\n if (e.target === e.currentTarget) {\n emit('close')\n }\n}\n\nfunction onKeydown(e: KeyboardEvent) {\n if (e.key === 'Escape') {\n emit('close')\n }\n}\n\nonMounted(() => {\n document.addEventListener('keydown', onKeydown)\n})\n\nonUnmounted(() => {\n document.removeEventListener('keydown', onKeydown)\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <div class=\"ac-component\">\n <div class=\"c-modal-backdrop\" @mousedown=\"onBackdropClick\">\n <div class=\"c-modal\">\n <div class=\"c-modal-header\" v-if=\"title\">\n <h3 class=\"c-modal-title\">{{ title }}</h3>\n <button type=\"button\" class=\"c-modal-close\" @click=\"emit('close')\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"c-modal-body c-scroll\">\n <slot />\n </div>\n <div v-if=\"$slots.footer\" class=\"c-modal-footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/modal.scss\"></style>\n"],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import e from "./admins-components6.js";
2
+ import t from "./admins-components40.js";
3
+ import { createBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, openBlock as o, toDisplayString as s, withCtx as c } from "vue";
4
+ //#region src/components/ConfirmModal.vue?vue&type=script&setup=true&lang.ts
5
+ var l = { class: "c-confirm-modal-message" }, u = /* @__PURE__ */ a({
6
+ __name: "ConfirmModal",
7
+ props: {
8
+ title: {},
9
+ message: {},
10
+ confirmLabel: { default: "Rendben" },
11
+ cancelLabel: { default: "Mégse" },
12
+ type: { default: "normal" }
13
+ },
14
+ emits: ["confirm", "cancel"],
15
+ setup(a, { emit: u }) {
16
+ let d = u;
17
+ return (u, f) => (o(), n(t, {
18
+ title: a.title,
19
+ onClose: f[2] ||= (e) => d("cancel")
20
+ }, {
21
+ footer: c(() => [i(e, {
22
+ label: a.cancelLabel,
23
+ type: "normal",
24
+ outline: "",
25
+ onClick: f[0] ||= (e) => d("cancel")
26
+ }, null, 8, ["label"]), i(e, {
27
+ label: a.confirmLabel,
28
+ type: a.type,
29
+ onClick: f[1] ||= (e) => d("confirm")
30
+ }, null, 8, ["label", "type"])]),
31
+ default: c(() => [r("p", l, s(a.message), 1)]),
32
+ _: 1
33
+ }, 8, ["title"]));
34
+ }
35
+ });
36
+ //#endregion
37
+ export { u as default };
@@ -1 +1 @@
1
- {"version":3,"file":"admins-components39.js","names":[],"sources":["../src/components/ConfirmModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ConfirmModalProps {\n title?: string\n message: string\n confirmLabel?: string\n cancelLabel?: string\n type?: ButtonType\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Modal from '@/components/Modal.vue'\nimport Button, { type ButtonType } from '@/components/Button.vue'\n\nwithDefaults(defineProps<ConfirmModalProps>(), {\n confirmLabel: 'Rendben',\n cancelLabel: 'Mégse',\n type: 'normal',\n})\n\nconst emit = defineEmits<{\n confirm: []\n cancel: []\n}>()\n</script>\n\n<template>\n <Modal :title=\"title\" @close=\"emit('cancel')\">\n <p class=\"c-confirm-modal-message\">{{ message }}</p>\n <template #footer>\n <Button :label=\"cancelLabel\" type=\"normal\" outline @click=\"emit('cancel')\" />\n <Button :label=\"confirmLabel\" :type=\"type\" @click=\"emit('confirm')\" />\n </template>\n </Modal>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"admins-components41.js","names":[],"sources":["../src/components/ConfirmModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ConfirmModalProps {\n title?: string\n message: string\n confirmLabel?: string\n cancelLabel?: string\n type?: ButtonType\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Modal from '@/components/Modal.vue'\nimport Button, { type ButtonType } from '@/components/Button.vue'\n\nwithDefaults(defineProps<ConfirmModalProps>(), {\n confirmLabel: 'Rendben',\n cancelLabel: 'Mégse',\n type: 'normal',\n})\n\nconst emit = defineEmits<{\n confirm: []\n cancel: []\n}>()\n</script>\n\n<template>\n <Modal :title=\"title\" @close=\"emit('cancel')\">\n <p class=\"c-confirm-modal-message\">{{ message }}</p>\n <template #footer>\n <Button :label=\"cancelLabel\" type=\"normal\" outline @click=\"emit('cancel')\" />\n <Button :label=\"confirmLabel\" :type=\"type\" @click=\"emit('confirm')\" />\n </template>\n </Modal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAoBA,IAAM,IAAO;yBAOX,EAMQ,GAAA;GANA,OAAO,EAAA;GAAQ,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,QAAA;;GAErB,QAAM,QAC8D,CAA7E,EAA6E,GAAA;IAApE,OAAO,EAAA;IAAa,MAAK;IAAS,SAAA;IAAS,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,QAAA;2BAC/D,EAAsE,GAAA;IAA7D,OAAO,EAAA;IAAe,MAAM,EAAA;IAAO,SAAK,AAAA,EAAA,QAAA,MAAE,EAAI,SAAA;;oBAHL,CAApD,EAAoD,KAApD,GAAoD,EAAd,EAAA,OAAO,GAAA,CAAA,CAAA,CAAA"}
@@ -1,7 +1,5 @@
1
- import './src/styles/components/copy-to-clipboard.scss_vue_type_style_index_0_src_true_lang.css';
2
- import e from "./admins-components40.js";
3
- /* empty css */
4
- //#region src/components/CopyToClipboard.vue
1
+ import e from "./admins-components41.js";
2
+ //#region src/components/ConfirmModal.vue
5
3
  var t = e;
6
4
  //#endregion
7
5
  export { t as default };
@@ -1 +1 @@
1
- {"version":3,"file":"admins-components42.js","names":[],"sources":["../src/components/CopyToClipboard.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nconst props = defineProps<{\n value?: unknown\n target?: string | HTMLElement\n useParent?: boolean\n}>()\n\nconst copied = ref(false)\n\nfunction copy(event?: MouseEvent) {\n let text = ''\n\n if (props.target) {\n const element: HTMLElement | null = typeof props.target === 'string'\n ? document.querySelector(props.target)\n : props.target\n\n if (element) {\n text = element.innerText\n }\n }\n else if (props.useParent && event?.target) {\n const parent = (event.target as HTMLElement).parentElement\n if (parent) {\n text = parent.innerText\n }\n }\n else {\n text = props.value == null ? '' : String(props.value)\n }\n\n if (text) {\n navigator.clipboard.writeText(text)\n copied.value = true\n setTimeout(() => { copied.value = false }, 1500)\n }\n}\n</script>\n\n<template>\n <i\n :class=\"copied ? 'fa-solid fa-check c-copy-btn--copied' : 'fa-regular fa-copy'\"\n class=\"c-copy-btn\"\n tabindex=\"0\"\n @click.stop=\"copy\"\n ></i>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/copy-to-clipboard.scss\"></style>\n"],"mappings":""}
1
+ {"version":3,"file":"admins-components42.js","names":[],"sources":["../src/components/ConfirmModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ConfirmModalProps {\n title?: string\n message: string\n confirmLabel?: string\n cancelLabel?: string\n type?: ButtonType\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Modal from '@/components/Modal.vue'\nimport Button, { type ButtonType } from '@/components/Button.vue'\n\nwithDefaults(defineProps<ConfirmModalProps>(), {\n confirmLabel: 'Rendben',\n cancelLabel: 'Mégse',\n type: 'normal',\n})\n\nconst emit = defineEmits<{\n confirm: []\n cancel: []\n}>()\n</script>\n\n<template>\n <Modal :title=\"title\" @close=\"emit('cancel')\">\n <p class=\"c-confirm-modal-message\">{{ message }}</p>\n <template #footer>\n <Button :label=\"cancelLabel\" type=\"normal\" outline @click=\"emit('cancel')\" />\n <Button :label=\"confirmLabel\" :type=\"type\" @click=\"emit('confirm')\" />\n </template>\n </Modal>\n</template>\n"],"mappings":""}
@@ -1,147 +1,33 @@
1
- import e from "./admins-components6.js";
2
- import t from "./admins-components37.js";
3
- import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, onMounted as u, onUnmounted as d, openBlock as f, ref as p, vModelCheckbox as m, vModelText as h, watch as g, withCtx as _, withDirectives as v } from "vue";
4
- //#region src/components/custom/ImagePicker.vue?vue&type=script&setup=true&lang.ts
5
- var y = { class: "ac-component" }, b = { class: "c-image-picker" }, x = { class: "c-image-picker__preview" }, S = ["src", "alt"], C = {
6
- key: 1,
7
- class: "c-image-picker__placeholder"
8
- }, w = { class: "c-image-picker__buttons" }, T = {
9
- key: 0,
10
- class: "c-image-picker__details"
11
- }, E = { class: "c-input-row" }, D = ["disabled"], O = { class: "c-input-row" }, k = ["disabled"], A = { class: "flex-center gap-1" }, j = ["checked", "disabled"], M = [
12
- "viewid",
13
- "environment",
14
- "aeurl"
15
- ], N = {
16
- id: "",
17
- url: "",
18
- isAdult: !1,
19
- source: "",
20
- title: ""
21
- }, P = /* @__PURE__ */ c({
22
- __name: "ImagePicker",
1
+ import { createElementBlock as e, defineComponent as t, normalizeClass as n, openBlock as r, ref as i, withModifiers as a } from "vue";
2
+ //#region src/components/CopyToClipboard.vue?vue&type=script&setup=true&lang.ts
3
+ var o = /* @__PURE__ */ t({
4
+ __name: "CopyToClipboard",
23
5
  props: {
24
- modelValue: { default: void 0 },
25
- details: {
26
- type: Boolean,
27
- default: !1
28
- },
29
- editable: {
30
- type: Boolean,
31
- default: !1
32
- },
33
- direction: { default: "vertical" },
34
- articleEditorUrl: {},
35
- environment: {},
36
- searchImageWidgetUrl: {},
37
- imageBaseUrl: {},
38
- imageViewId: {}
6
+ value: {},
7
+ target: {},
8
+ useParent: { type: Boolean }
39
9
  },
40
- emits: ["update:modelValue"],
41
- setup(c, { emit: P }) {
42
- let F = c, I = P, L = p(N), R = p(!1);
43
- g(() => L.value, () => {
44
- I("update:modelValue", L.value);
45
- }, { deep: !0 }), g(() => F.modelValue, (e) => {
46
- e && (L.value = e);
47
- }, {
48
- deep: !0,
49
- immediate: !0
50
- });
51
- let z = `${typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `ip-${Date.now()}-${Math.random().toString(36).slice(2)}`}-image-picker-causation`;
52
- u(() => {
53
- if (!customElements.get("hvg-search-image") && !document.querySelector(`script[src="${F.searchImageWidgetUrl}"]`)) {
54
- let e = document.createElement("script");
55
- e.type = "text/javascript", e.src = F.searchImageWidgetUrl, e.async = !0, document.head.appendChild(e);
56
- }
57
- });
58
- let B = n(() => L.value && (L.value.url && L.value.url.length > 0 || L.value.id && L.value.id.length > 0)), V = n(() => {
59
- if (B.value) return L.value.url && L.value.url.length > 0 ? L.value.url : `${F.imageBaseUrl}/${F.imageViewId}/${L.value.id}.img`;
60
- }), H = n(() => F.direction === "horizontal"), U = (e) => {
61
- e.preventDefault(), R.value = !0;
62
- }, W = (e) => {
63
- e.preventDefault(), L.value = { ...N };
64
- }, G = (e) => {
65
- e?.detail?.causationid === z && (R.value = !1, e.detail?.image && (L.value = {
66
- id: e.detail.image.id,
67
- url: "",
68
- isAdult: e.detail.image.isAdult,
69
- source: e.detail.image.source,
70
- title: e.detail.image.title
71
- }));
72
- };
73
- return u(() => {
74
- window.addEventListener("image-selected", G);
75
- }), d(() => {
76
- window.removeEventListener("image-selected", G);
77
- }), (n, u) => (f(), a("div", y, [o("div", b, [o("div", { class: l(["c-image-picker__container", { "c-image-picker__container--horizontal": H.value }]) }, [
78
- o("div", x, [B.value ? (f(), a("img", {
79
- key: 0,
80
- src: V.value,
81
- alt: L.value.title || "Selected image",
82
- class: "c-image-picker__img"
83
- }, null, 8, S)) : (f(), a("p", C, "Nincs kiválasztott kép"))]),
84
- o("div", w, [s(e, {
85
- type: "success",
86
- label: "Kép kiválasztása",
87
- class: "nowrap",
88
- onClick: U,
89
- icon: "fa-solid fa-image"
90
- }), s(e, {
91
- type: "error",
92
- label: "Eltávolítás",
93
- class: "nowrap",
94
- onClick: W,
95
- icon: "fa-solid fa-trash"
96
- })]),
97
- c.details && L.value.id ? (f(), a("div", T, [
98
- o("div", null, [u[4] ||= o("label", {
99
- for: "image-source",
100
- class: "c-label"
101
- }, "Forrás", -1), o("div", E, [v(o("input", {
102
- "onUpdate:modelValue": u[0] ||= (e) => L.value.source = e,
103
- id: "image-source",
104
- type: "text",
105
- class: "c-input",
106
- placeholder: "Kép forrása",
107
- disabled: !c.editable
108
- }, null, 8, D), [[h, L.value.source]])])]),
109
- o("div", null, [u[5] ||= o("label", {
110
- for: "image-title",
111
- class: "c-label"
112
- }, "Cím / Alt szöveg", -1), o("div", O, [v(o("textarea", {
113
- "onUpdate:modelValue": u[1] ||= (e) => L.value.title = e,
114
- id: "image-title",
115
- class: "c-input c-image-picker__textarea",
116
- placeholder: "Cím vagy alt szöveg",
117
- disabled: !c.editable
118
- }, null, 8, k), [[h, L.value.title]])])]),
119
- o("div", A, [v(o("input", {
120
- id: "image-adult",
121
- "onUpdate:modelValue": u[2] ||= (e) => L.value.isAdult = e,
122
- type: "checkbox",
123
- class: "c-checkbox",
124
- checked: L.value.isAdult,
125
- disabled: !c.editable
126
- }, null, 8, j), [[m, L.value.isAdult]]), u[6] ||= o("label", {
127
- for: "image-adult",
128
- class: "c-label"
129
- }, "Felnőtt tartalom", -1)])
130
- ])) : i("", !0)
131
- ], 2), R.value ? (f(), r(t, {
132
- key: 0,
133
- onClose: u[3] ||= (e) => R.value = !1
134
- }, {
135
- default: _(() => [o("hvg-search-image", {
136
- causationid: z,
137
- viewid: c.imageViewId,
138
- environment: c.environment,
139
- aeurl: c.articleEditorUrl,
140
- selectonly: "true"
141
- }, null, 8, M)]),
142
- _: 1
143
- })) : i("", !0)])]));
10
+ setup(t) {
11
+ let o = t, s = i(!1);
12
+ function c(e) {
13
+ let t = "";
14
+ if (o.target) {
15
+ let e = typeof o.target == "string" ? document.querySelector(o.target) : o.target;
16
+ e && (t = e.innerText);
17
+ } else if (o.useParent && e?.target) {
18
+ let n = e.target.parentElement;
19
+ n && (t = n.innerText);
20
+ } else t = o.value == null ? "" : String(o.value);
21
+ t && (navigator.clipboard.writeText(t), s.value = !0, setTimeout(() => {
22
+ s.value = !1;
23
+ }, 1500));
24
+ }
25
+ return (t, i) => (r(), e("i", {
26
+ class: n([s.value ? "fa-solid fa-check c-copy-btn--copied" : "fa-regular fa-copy", "c-copy-btn"]),
27
+ tabindex: "0",
28
+ onClick: a(c, ["stop"])
29
+ }, null, 2));
144
30
  }
145
31
  });
146
32
  //#endregion
147
- export { P as default };
33
+ export { o as default };
@@ -1 +1 @@
1
- {"version":3,"file":"admins-components43.js","names":[],"sources":["../src/components/custom/ImagePicker.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ImagePickerModel {\n id: string\n url: string\n source: string\n title: string\n isAdult: boolean\n}\n\nexport interface ImagePickerProps {\n modelValue?: ImagePickerModel\n details?: boolean\n editable?: boolean\n direction?: 'horizontal' | 'vertical'\n articleEditorUrl: string\n environment: string\n searchImageWidgetUrl: string\n imageBaseUrl: string\n imageViewId: string\n}\n\nconst defaultValue: ImagePickerModel = {\n id: '',\n url: '',\n isAdult: false,\n source: '',\n title: '',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport Modal from '@/components/Modal.vue'\nimport Button from '@/components/Button.vue'\n\nconst props = withDefaults(defineProps<ImagePickerProps>(), {\n modelValue: undefined,\n details: false,\n editable: false,\n direction: 'vertical',\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: ImagePickerModel): void\n}>()\n\nconst local = ref<ImagePickerModel>(defaultValue)\nconst showImageModal = ref(false)\n\nwatch(\n () => local.value,\n () => {\n emit('update:modelValue', local.value)\n },\n { deep: true },\n)\n\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (newValue) {\n local.value = newValue\n }\n },\n { deep: true, immediate: true },\n)\n\n// Generate unique ID\nconst uniqueId = (() => {\n if (typeof crypto !== 'undefined' && crypto.randomUUID) return crypto.randomUUID()\n return `ip-${Date.now()}-${Math.random().toString(36).slice(2)}`\n})()\n\nconst imageCausationId = `${uniqueId}-image-picker-causation`\n\n// Load external search image widget script\nonMounted(() => {\n // Check if custom element is already registered\n if (!customElements.get('hvg-search-image')) {\n if (!document.querySelector(`script[src=\"${props.searchImageWidgetUrl}\"]`)) {\n const script = document.createElement('script')\n script.type = 'text/javascript'\n script.src = props.searchImageWidgetUrl\n script.async = true\n document.head.appendChild(script)\n }\n }\n})\n\n// Computed properties\nconst hasImage = computed(() => {\n return (\n local.value &&\n ((local.value.url && local.value.url.length > 0) ||\n (local.value.id && local.value.id.length > 0))\n )\n})\n\nconst imageUrl = computed(() => {\n if (!hasImage.value) return undefined\n if (local.value.url && local.value.url.length > 0) return local.value.url\n return `${props.imageBaseUrl}/${props.imageViewId}/${local.value.id}.img`\n})\n\nconst isHorizontal = computed(() => props.direction === 'horizontal')\n\n// Event handlers\nconst selectImage = (event: MouseEvent) => {\n event.preventDefault()\n showImageModal.value = true\n}\n\nconst resetImage = (event: MouseEvent) => {\n event.preventDefault()\n local.value = { ...defaultValue }\n}\n\nconst onImageSelected = (e: CustomEvent) => {\n if (e?.detail?.causationid === imageCausationId) {\n showImageModal.value = false\n\n if (e.detail?.image) {\n local.value = {\n id: e.detail.image.id,\n url: '',\n isAdult: e.detail.image.isAdult,\n source: e.detail.image.source,\n title: e.detail.image.title,\n }\n }\n }\n}\n\n// Event listeners\nonMounted(() => {\n window.addEventListener('image-selected', onImageSelected as EventListener)\n})\n\nonUnmounted(() => {\n window.removeEventListener('image-selected', onImageSelected as EventListener)\n})\n</script>\n\n<template>\n <div class=\"ac-component\">\n <div class=\"c-image-picker\">\n <div\n class=\"c-image-picker__container\"\n :class=\"{ 'c-image-picker__container--horizontal': isHorizontal }\"\n >\n <div class=\"c-image-picker__preview\">\n <img\n v-if=\"hasImage\"\n :src=\"imageUrl\"\n :alt=\"local.title || 'Selected image'\"\n class=\"c-image-picker__img\"\n />\n <p v-else class=\"c-image-picker__placeholder\">Nincs kiválasztott kép</p>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"c-image-picker__buttons\">\n <Button\n type=\"success\"\n label=\"Kép kiválasztása\"\n class=\"nowrap\"\n @click=\"selectImage\"\n icon=\"fa-solid fa-image\"\n ></Button>\n <Button\n type=\"error\"\n label=\"Eltávolítás\"\n class=\"nowrap\"\n @click=\"resetImage\"\n icon=\"fa-solid fa-trash\"\n ></Button>\n </div>\n\n <!-- Details Section -->\n <div v-if=\"details && local.id\" class=\"c-image-picker__details\">\n <!-- Source Input -->\n <div>\n <label for=\"image-source\" class=\"c-label\">Forrás</label>\n <div class=\"c-input-row\">\n <input\n v-model=\"local.source\"\n id=\"image-source\"\n type=\"text\"\n class=\"c-input\"\n placeholder=\"Kép forrása\"\n :disabled=\"!editable\"\n />\n </div>\n </div>\n\n <!-- Title/Alt Text Input -->\n <div>\n <label for=\"image-title\" class=\"c-label\">Cím / Alt szöveg</label>\n <div class=\"c-input-row\">\n <textarea\n v-model=\"local.title\"\n id=\"image-title\"\n class=\"c-input c-image-picker__textarea\"\n placeholder=\"Cím vagy alt szöveg\"\n :disabled=\"!editable\"\n />\n </div>\n </div>\n\n <!-- Adult Content Checkbox -->\n <div class=\"flex-center gap-1\">\n <input\n id=\"image-adult\"\n v-model=\"local.isAdult\"\n type=\"checkbox\"\n class=\"c-checkbox\"\n :checked=\"local.isAdult\"\n :disabled=\"!editable\"\n />\n <label for=\"image-adult\" class=\"c-label\">Felnőtt tartalom</label>\n </div>\n </div>\n </div>\n\n <!-- Image Search Modal Dialog -->\n <Modal v-if=\"showImageModal\" @close=\"showImageModal = false\">\n <hvg-search-image\n :causationid=\"imageCausationId\"\n :viewid=\"imageViewId\"\n :environment=\"environment\"\n :aeurl=\"articleEditorUrl\"\n selectonly=\"true\"\n />\n </Modal>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/image-picker.scss\"></style>\n"],"mappings":"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"}
1
+ {"version":3,"file":"admins-components43.js","names":[],"sources":["../src/components/CopyToClipboard.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nconst props = defineProps<{\n value?: unknown\n target?: string | HTMLElement\n useParent?: boolean\n}>()\n\nconst copied = ref(false)\n\nfunction copy(event?: MouseEvent) {\n let text = ''\n\n if (props.target) {\n const element: HTMLElement | null = typeof props.target === 'string'\n ? document.querySelector(props.target)\n : props.target\n\n if (element) {\n text = element.innerText\n }\n }\n else if (props.useParent && event?.target) {\n const parent = (event.target as HTMLElement).parentElement\n if (parent) {\n text = parent.innerText\n }\n }\n else {\n text = props.value == null ? '' : String(props.value)\n }\n\n if (text) {\n navigator.clipboard.writeText(text)\n copied.value = true\n setTimeout(() => { copied.value = false }, 1500)\n }\n}\n</script>\n\n<template>\n <i\n :class=\"copied ? 'fa-solid fa-check c-copy-btn--copied' : 'fa-regular fa-copy'\"\n class=\"c-copy-btn\"\n tabindex=\"0\"\n @click.stop=\"copy\"\n ></i>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/copy-to-clipboard.scss\"></style>\n"],"mappings":";;;;;;;;;;EAGA,IAAM,IAAQ,GAMR,IAAS,EAAI,EAAK;EAExB,SAAS,EAAK,GAAoB;GAChC,IAAI,IAAO;GAEX,IAAI,EAAM,QAAQ;IAChB,IAAM,IAA8B,OAAO,EAAM,UAAW,WACxD,SAAS,cAAc,EAAM,MAAM,IACnC,EAAM;IAEV,AAAI,MACF,IAAO,EAAQ;GAEnB,OACK,IAAI,EAAM,aAAa,GAAO,QAAQ;IACzC,IAAM,IAAU,EAAM,OAAuB;IAC7C,AAAI,MACF,IAAO,EAAO;GAElB,OAEE,IAAO,EAAM,SAAS,OAAO,KAAK,OAAO,EAAM,KAAK;GAGtD,AAAI,MACF,UAAU,UAAU,UAAU,CAAI,GAClC,EAAO,QAAQ,IACf,iBAAiB;IAAE,EAAO,QAAQ;GAAM,GAAG,IAAI;EAEnD;yBAIE,EAKK,KAAA;GAJF,OAAK,EAAA,CAAE,EAAA,QAAM,yCAAA,sBACR,YAAY,CAAA;GAClB,UAAS;GACR,SAAK,EAAO,GAAI,CAAA,MAAA,CAAA"}
@@ -1,7 +1,7 @@
1
- import './src/styles/components/image-picker.scss_vue_type_style_index_0_src_true_lang.css';
1
+ import './src/styles/components/copy-to-clipboard.scss_vue_type_style_index_0_src_true_lang.css';
2
2
  import e from "./admins-components43.js";
3
3
  /* empty css */
4
- //#region src/components/custom/ImagePicker.vue
4
+ //#region src/components/CopyToClipboard.vue
5
5
  var t = e;
6
6
  //#endregion
7
7
  export { t as default };
@@ -1 +1 @@
1
- {"version":3,"file":"admins-components45.js","names":[],"sources":["../src/components/custom/ImagePicker.vue"],"sourcesContent":["<script lang=\"ts\">\nexport interface ImagePickerModel {\n id: string\n url: string\n source: string\n title: string\n isAdult: boolean\n}\n\nexport interface ImagePickerProps {\n modelValue?: ImagePickerModel\n details?: boolean\n editable?: boolean\n direction?: 'horizontal' | 'vertical'\n articleEditorUrl: string\n environment: string\n searchImageWidgetUrl: string\n imageBaseUrl: string\n imageViewId: string\n}\n\nconst defaultValue: ImagePickerModel = {\n id: '',\n url: '',\n isAdult: false,\n source: '',\n title: '',\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport Modal from '@/components/Modal.vue'\nimport Button from '@/components/Button.vue'\n\nconst props = withDefaults(defineProps<ImagePickerProps>(), {\n modelValue: undefined,\n details: false,\n editable: false,\n direction: 'vertical',\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', v: ImagePickerModel): void\n}>()\n\nconst local = ref<ImagePickerModel>(defaultValue)\nconst showImageModal = ref(false)\n\nwatch(\n () => local.value,\n () => {\n emit('update:modelValue', local.value)\n },\n { deep: true },\n)\n\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (newValue) {\n local.value = newValue\n }\n },\n { deep: true, immediate: true },\n)\n\n// Generate unique ID\nconst uniqueId = (() => {\n if (typeof crypto !== 'undefined' && crypto.randomUUID) return crypto.randomUUID()\n return `ip-${Date.now()}-${Math.random().toString(36).slice(2)}`\n})()\n\nconst imageCausationId = `${uniqueId}-image-picker-causation`\n\n// Load external search image widget script\nonMounted(() => {\n // Check if custom element is already registered\n if (!customElements.get('hvg-search-image')) {\n if (!document.querySelector(`script[src=\"${props.searchImageWidgetUrl}\"]`)) {\n const script = document.createElement('script')\n script.type = 'text/javascript'\n script.src = props.searchImageWidgetUrl\n script.async = true\n document.head.appendChild(script)\n }\n }\n})\n\n// Computed properties\nconst hasImage = computed(() => {\n return (\n local.value &&\n ((local.value.url && local.value.url.length > 0) ||\n (local.value.id && local.value.id.length > 0))\n )\n})\n\nconst imageUrl = computed(() => {\n if (!hasImage.value) return undefined\n if (local.value.url && local.value.url.length > 0) return local.value.url\n return `${props.imageBaseUrl}/${props.imageViewId}/${local.value.id}.img`\n})\n\nconst isHorizontal = computed(() => props.direction === 'horizontal')\n\n// Event handlers\nconst selectImage = (event: MouseEvent) => {\n event.preventDefault()\n showImageModal.value = true\n}\n\nconst resetImage = (event: MouseEvent) => {\n event.preventDefault()\n local.value = { ...defaultValue }\n}\n\nconst onImageSelected = (e: CustomEvent) => {\n if (e?.detail?.causationid === imageCausationId) {\n showImageModal.value = false\n\n if (e.detail?.image) {\n local.value = {\n id: e.detail.image.id,\n url: '',\n isAdult: e.detail.image.isAdult,\n source: e.detail.image.source,\n title: e.detail.image.title,\n }\n }\n }\n}\n\n// Event listeners\nonMounted(() => {\n window.addEventListener('image-selected', onImageSelected as EventListener)\n})\n\nonUnmounted(() => {\n window.removeEventListener('image-selected', onImageSelected as EventListener)\n})\n</script>\n\n<template>\n <div class=\"ac-component\">\n <div class=\"c-image-picker\">\n <div\n class=\"c-image-picker__container\"\n :class=\"{ 'c-image-picker__container--horizontal': isHorizontal }\"\n >\n <div class=\"c-image-picker__preview\">\n <img\n v-if=\"hasImage\"\n :src=\"imageUrl\"\n :alt=\"local.title || 'Selected image'\"\n class=\"c-image-picker__img\"\n />\n <p v-else class=\"c-image-picker__placeholder\">Nincs kiválasztott kép</p>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"c-image-picker__buttons\">\n <Button\n type=\"success\"\n label=\"Kép kiválasztása\"\n class=\"nowrap\"\n @click=\"selectImage\"\n icon=\"fa-solid fa-image\"\n ></Button>\n <Button\n type=\"error\"\n label=\"Eltávolítás\"\n class=\"nowrap\"\n @click=\"resetImage\"\n icon=\"fa-solid fa-trash\"\n ></Button>\n </div>\n\n <!-- Details Section -->\n <div v-if=\"details && local.id\" class=\"c-image-picker__details\">\n <!-- Source Input -->\n <div>\n <label for=\"image-source\" class=\"c-label\">Forrás</label>\n <div class=\"c-input-row\">\n <input\n v-model=\"local.source\"\n id=\"image-source\"\n type=\"text\"\n class=\"c-input\"\n placeholder=\"Kép forrása\"\n :disabled=\"!editable\"\n />\n </div>\n </div>\n\n <!-- Title/Alt Text Input -->\n <div>\n <label for=\"image-title\" class=\"c-label\">Cím / Alt szöveg</label>\n <div class=\"c-input-row\">\n <textarea\n v-model=\"local.title\"\n id=\"image-title\"\n class=\"c-input c-image-picker__textarea\"\n placeholder=\"Cím vagy alt szöveg\"\n :disabled=\"!editable\"\n />\n </div>\n </div>\n\n <!-- Adult Content Checkbox -->\n <div class=\"flex-center gap-1\">\n <input\n id=\"image-adult\"\n v-model=\"local.isAdult\"\n type=\"checkbox\"\n class=\"c-checkbox\"\n :checked=\"local.isAdult\"\n :disabled=\"!editable\"\n />\n <label for=\"image-adult\" class=\"c-label\">Felnőtt tartalom</label>\n </div>\n </div>\n </div>\n\n <!-- Image Search Modal Dialog -->\n <Modal v-if=\"showImageModal\" @close=\"showImageModal = false\">\n <hvg-search-image\n :causationid=\"imageCausationId\"\n :viewid=\"imageViewId\"\n :environment=\"environment\"\n :aeurl=\"articleEditorUrl\"\n selectonly=\"true\"\n />\n </Modal>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/image-picker.scss\"></style>\n"],"mappings":""}
1
+ {"version":3,"file":"admins-components45.js","names":[],"sources":["../src/components/CopyToClipboard.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nconst props = defineProps<{\n value?: unknown\n target?: string | HTMLElement\n useParent?: boolean\n}>()\n\nconst copied = ref(false)\n\nfunction copy(event?: MouseEvent) {\n let text = ''\n\n if (props.target) {\n const element: HTMLElement | null = typeof props.target === 'string'\n ? document.querySelector(props.target)\n : props.target\n\n if (element) {\n text = element.innerText\n }\n }\n else if (props.useParent && event?.target) {\n const parent = (event.target as HTMLElement).parentElement\n if (parent) {\n text = parent.innerText\n }\n }\n else {\n text = props.value == null ? '' : String(props.value)\n }\n\n if (text) {\n navigator.clipboard.writeText(text)\n copied.value = true\n setTimeout(() => { copied.value = false }, 1500)\n }\n}\n</script>\n\n<template>\n <i\n :class=\"copied ? 'fa-solid fa-check c-copy-btn--copied' : 'fa-regular fa-copy'\"\n class=\"c-copy-btn\"\n tabindex=\"0\"\n @click.stop=\"copy\"\n ></i>\n</template>\n\n<style lang=\"scss\" src=\"@/styles/components/copy-to-clipboard.scss\"></style>\n"],"mappings":""}