ablok-components 0.3.58 → 0.3.59

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 (196) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/ablok-components.umd.js +1 -1
  3. package/dist/assets/img/guide.png.js +4 -0
  4. package/dist/components/atoms/base-button/base-button.vue.js +92 -0
  5. package/dist/components/atoms/base-button/base-button.vue3.js +5 -0
  6. package/dist/components/atoms/base-headline/base-headline.vue.js +30 -0
  7. package/dist/components/atoms/base-headline/base-headline.vue2.js +4 -0
  8. package/dist/components/atoms/base-image/base-image.vue.js +75 -0
  9. package/dist/components/atoms/base-image/base-image.vue3.js +5 -0
  10. package/dist/components/atoms/base-input/base-input.vue.js +181 -0
  11. package/dist/components/atoms/base-input/base-input.vue3.js +5 -0
  12. package/dist/components/atoms/base-paragraph/base-paragraph.vue.js +21 -0
  13. package/dist/components/atoms/base-paragraph/base-paragraph.vue2.js +4 -0
  14. package/dist/components/atoms/canvas-confetti/canvas-confetti.vue.js +113 -0
  15. package/dist/components/atoms/canvas-confetti/canvas-confetti.vue3.js +5 -0
  16. package/dist/components/atoms/check-group/check-group.vue.js +86 -0
  17. package/dist/components/atoms/check-group/check-group.vue3.js +5 -0
  18. package/dist/components/atoms/custom-html/custom-html.vue.js +26 -0
  19. package/dist/components/atoms/custom-html/custom-html.vue2.js +4 -0
  20. package/dist/components/atoms/input-checkbox/input-checkbox.vue.js +84 -0
  21. package/dist/components/atoms/input-checkbox/input-checkbox.vue3.js +5 -0
  22. package/dist/components/atoms/input-datetime/input-datetime.vue.js +99 -0
  23. package/dist/components/atoms/input-datetime/input-datetime.vue2.js +4 -0
  24. package/dist/components/atoms/input-file/input-file.vue.js +130 -0
  25. package/dist/components/atoms/input-file/input-file.vue2.js +4 -0
  26. package/dist/components/atoms/input-passcode/input-passcode.vue.js +149 -0
  27. package/dist/components/atoms/input-passcode/input-passcode.vue2.js +4 -0
  28. package/dist/components/atoms/input-password/input-password.vue.js +118 -0
  29. package/dist/components/atoms/input-password/input-password.vue2.js +4 -0
  30. package/dist/components/atoms/input-textarea/input-textarea.vue.js +105 -0
  31. package/dist/components/atoms/input-textarea/input-textarea.vue2.js +4 -0
  32. package/dist/components/atoms/loading-spinner/loading-spinner.vue.js +38 -0
  33. package/dist/components/atoms/loading-spinner/loading-spinner.vue3.js +5 -0
  34. package/dist/components/atoms/radio-group/radio-group.vue.js +99 -0
  35. package/dist/components/atoms/radio-group/radio-group.vue3.js +5 -0
  36. package/dist/components/atoms/svg-icon/svg-icon.vue.js +44 -0
  37. package/dist/components/atoms/svg-icon/svg-icon.vue3.js +5 -0
  38. package/dist/components/atoms/zoom-slider/zoom-slider.vue.js +59 -0
  39. package/dist/components/atoms/zoom-slider/zoom-slider.vue3.js +5 -0
  40. package/dist/components/molecules/accordion/accordion-item.vue.js +76 -0
  41. package/dist/components/molecules/accordion/accordion-item.vue3.js +5 -0
  42. package/dist/components/molecules/accordion/accordion.vue.js +12 -0
  43. package/dist/components/molecules/auto-suggest/auto-suggest.vue.js +132 -0
  44. package/dist/components/molecules/auto-suggest/auto-suggest.vue3.js +5 -0
  45. package/dist/components/molecules/base-camera/base-camera.vue.js +392 -0
  46. package/dist/components/molecules/base-camera/base-camera.vue3.js +5 -0
  47. package/dist/components/molecules/base-map/base-map.vue.js +386 -0
  48. package/dist/components/molecules/base-map/base-map.vue3.js +5 -0
  49. package/dist/components/molecules/color-palette/color-palette.vue.js +72 -0
  50. package/dist/components/molecules/color-palette/color-palette.vue3.js +5 -0
  51. package/dist/components/molecules/dom-renderer/dom-renderer.vue.js +102 -0
  52. package/dist/components/molecules/dom-renderer/dom-renderer.vue2.js +4 -0
  53. package/dist/components/molecules/file-upload/file-upload.vue.js +177 -0
  54. package/dist/components/molecules/file-upload/file-upload.vue3.js +5 -0
  55. package/dist/components/molecules/hint-system/hint-system.vue.d.ts +1 -1
  56. package/dist/components/molecules/hint-system/hint-system.vue.js +111 -0
  57. package/dist/components/molecules/hint-system/hint-system.vue3.js +5 -0
  58. package/dist/components/molecules/image-crop/image-crop.vue.js +82 -0
  59. package/dist/components/molecules/image-crop/image-crop.vue2.js +4 -0
  60. package/dist/components/molecules/image-crop-resize/image-crop-resize.vue.js +120 -0
  61. package/dist/components/molecules/image-crop-resize/image-crop-resize.vue2.js +4 -0
  62. package/dist/components/molecules/image-resize/image-resize.vue.js +143 -0
  63. package/dist/components/molecules/image-resize/image-resize.vue2.js +4 -0
  64. package/dist/components/molecules/image-upload/image-upload.vue.js +274 -0
  65. package/dist/components/molecules/image-upload/image-upload.vue3.js +5 -0
  66. package/dist/components/molecules/image-zoom/image-zoom.vue.js +209 -0
  67. package/dist/components/molecules/image-zoom/image-zoom.vue3.js +5 -0
  68. package/dist/components/molecules/input-color/input-color.vue.js +105 -0
  69. package/dist/components/molecules/input-color/input-color.vue3.js +5 -0
  70. package/dist/components/molecules/input-datepicker/input-datepicker.vue.js +263 -0
  71. package/dist/components/molecules/input-datepicker/input-datepicker.vue3.js +5 -0
  72. package/dist/components/molecules/input-dropdown/input-dropdown.vue.js +207 -0
  73. package/dist/components/molecules/input-dropdown/input-dropdown.vue3.js +5 -0
  74. package/dist/components/molecules/link-sharing/link-sharing.vue.js +177 -0
  75. package/dist/components/molecules/link-sharing/link-sharing.vue3.js +7 -0
  76. package/dist/components/molecules/location-list/location-list.vue.js +98 -0
  77. package/dist/components/molecules/location-list/location-list.vue3.js +5 -0
  78. package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.js +55 -0
  79. package/dist/components/molecules/media-thumbnails/media-thumbnails.vue3.js +5 -0
  80. package/dist/components/molecules/popover-notifications/popover-notifications.vue.js +135 -0
  81. package/dist/components/molecules/popover-notifications/popover-notifications.vue3.js +5 -0
  82. package/dist/components/molecules/popover-tooltip/popover-tooltip.vue.js +134 -0
  83. package/dist/components/molecules/popover-tooltip/popover-tooltip.vue3.js +5 -0
  84. package/dist/components/molecules/progress-steps/progress-steps.vue.js +84 -0
  85. package/dist/components/molecules/progress-steps/progress-steps.vue3.js +5 -0
  86. package/dist/components/molecules/qr-code/qr-code.vue.js +103 -0
  87. package/dist/components/molecules/qr-code/qr-code.vue3.js +5 -0
  88. package/dist/components/molecules/radio-buttons/radio-buttons.vue.js +79 -0
  89. package/dist/components/molecules/radio-buttons/radio-buttons.vue3.js +5 -0
  90. package/dist/components/molecules/rte-editor/rte-editor.vue.js +455 -0
  91. package/dist/components/molecules/rte-editor/rte-editor.vue3.js +5 -0
  92. package/dist/components/molecules/select-media/select-media.vue.js +87 -0
  93. package/dist/components/molecules/select-media/select-media.vue3.js +5 -0
  94. package/dist/components/molecules/upload-group/upload-group.vue.js +178 -0
  95. package/dist/components/molecules/upload-group/upload-group.vue3.js +5 -0
  96. package/dist/components/organisms/asset-uploader/asset-uploader.vue.js +126 -0
  97. package/dist/components/organisms/asset-uploader/asset-uploader.vue3.js +5 -0
  98. package/dist/components/organisms/location-finder/location-finder.vue.js +634 -0
  99. package/dist/components/organisms/location-finder/location-finder.vue3.js +5 -0
  100. package/dist/components/templates/base-carousel/base-carousel.vue.js +94 -0
  101. package/dist/components/templates/base-carousel/base-carousel.vue3.js +5 -0
  102. package/dist/components/templates/base-form/base-form.vue.js +35 -0
  103. package/dist/components/templates/base-form/base-form.vue3.js +5 -0
  104. package/dist/components/templates/modal-dialog/modal-dialog.vue.js +123 -0
  105. package/dist/components/templates/modal-dialog/modal-dialog.vue3.js +5 -0
  106. package/dist/components/templates/popover-dialog/popover-dialog.vue.js +95 -0
  107. package/dist/components/templates/popover-dialog/popover-dialog.vue3.js +5 -0
  108. package/dist/components/templates/sortable-list/sortable-list.vue.js +158 -0
  109. package/dist/components/templates/sortable-list/sortable-list.vue3.js +5 -0
  110. package/dist/components/templates/touch-wrapper/touch-wrapper.vue.js +85 -0
  111. package/dist/components/templates/touch-wrapper/touch-wrapper.vue3.js +5 -0
  112. package/dist/composables/useCameraFilter.js +56 -0
  113. package/dist/composables/useConfetti.js +12 -0
  114. package/dist/composables/useDirections.js +62 -0
  115. package/dist/composables/useFileUpload.js +79 -0
  116. package/dist/composables/useGeocoding.js +85 -0
  117. package/dist/composables/useGeolocation.js +71 -0
  118. package/dist/composables/useSanitize.js +23 -0
  119. package/dist/i18n.d.ts +3 -0
  120. package/dist/index.js +156 -0
  121. package/dist/locales/en.d.ts +3 -0
  122. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  123. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
  124. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
  125. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
  126. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatDistance.js +163 -0
  127. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatLong.js +37 -0
  128. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatRelative.js +11 -0
  129. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/localize.js +161 -0
  130. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/match.js +112 -0
  131. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de.js +20 -0
  132. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
  133. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
  134. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  135. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
  136. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
  137. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US.js +20 -0
  138. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +70 -0
  139. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +33 -0
  140. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -0
  141. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/localize.js +121 -0
  142. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/match.js +110 -0
  143. package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr.js +20 -0
  144. package/dist/utilities/helpers.js +79 -0
  145. package/package.json +80 -25
  146. package/dist/ablok-components.es.js +0 -8655
  147. package/dist/components/atoms/base-button/base-button.spec.d.ts +0 -1
  148. package/dist/components/atoms/base-headline/base-headline.spec.d.ts +0 -1
  149. package/dist/components/atoms/base-image/base-image.spec.d.ts +0 -1
  150. package/dist/components/atoms/base-input/base-input.spec.d.ts +0 -1
  151. package/dist/components/atoms/base-paragraph/base-paragraph.spec.d.ts +0 -1
  152. package/dist/components/atoms/canvas-confetti/canvas-confetti.spec.d.ts +0 -1
  153. package/dist/components/atoms/check-group/check-group.spec.d.ts +0 -1
  154. package/dist/components/atoms/custom-html/custom-html.spec.d.ts +0 -1
  155. package/dist/components/atoms/input-checkbox/input-checkbox.spec.d.ts +0 -1
  156. package/dist/components/atoms/input-file/input-file.spec.d.ts +0 -1
  157. package/dist/components/atoms/input-passcode/input-passcode.spec.d.ts +0 -1
  158. package/dist/components/atoms/input-password/input-password.spec.d.ts +0 -1
  159. package/dist/components/atoms/input-textarea/input-textarea.spec.d.ts +0 -1
  160. package/dist/components/atoms/loading-spinner/loading-spinner.spec.d.ts +0 -1
  161. package/dist/components/atoms/radio-group/radio-group.spec.d.ts +0 -1
  162. package/dist/components/atoms/svg-icon/svg-icon.spec.d.ts +0 -1
  163. package/dist/components/atoms/zoom-slider/zoom-slider.spec.d.ts +0 -1
  164. package/dist/components/molecules/accordion/accordion-item.spec.d.ts +0 -1
  165. package/dist/components/molecules/auto-suggest/auto-suggest.spec.d.ts +0 -1
  166. package/dist/components/molecules/base-map/base-map.spec.d.ts +0 -1
  167. package/dist/components/molecules/color-palette/color-palette.spec.d.ts +0 -1
  168. package/dist/components/molecules/dom-renderer/dom-renderer.spec.d.ts +0 -1
  169. package/dist/components/molecules/file-upload/file-upload.spec.d.ts +0 -1
  170. package/dist/components/molecules/hint-system/hint-system.spec.d.ts +0 -1
  171. package/dist/components/molecules/image-crop/image-crop.spec.d.ts +0 -1
  172. package/dist/components/molecules/image-crop-resize/image-crop-resize.spec.d.ts +0 -1
  173. package/dist/components/molecules/image-resize/image-resize.spec.d.ts +0 -1
  174. package/dist/components/molecules/image-upload/image-upload.spec.d.ts +0 -1
  175. package/dist/components/molecules/image-zoom/image-zoom.spec.d.ts +0 -1
  176. package/dist/components/molecules/input-color/input-color.spec.d.ts +0 -1
  177. package/dist/components/molecules/input-datepicker/input-datepicker.spec.d.ts +0 -1
  178. package/dist/components/molecules/input-dropdown/input-dropdown.spec.d.ts +0 -1
  179. package/dist/components/molecules/link-sharing/link-sharing.spec.d.ts +0 -1
  180. package/dist/components/molecules/media-thumbnails/media-thumbnails.spec.d.ts +0 -1
  181. package/dist/components/molecules/popover-notifications/popover-notifications.spec.d.ts +0 -1
  182. package/dist/components/molecules/popover-tooltip/popover-tooltip.spec.d.ts +0 -1
  183. package/dist/components/molecules/progress-steps/progress-steps.spec.d.ts +0 -1
  184. package/dist/components/molecules/qr-code/qr-code.spec.d.ts +0 -1
  185. package/dist/components/molecules/radio-buttons/radio-buttons.spec.d.ts +0 -1
  186. package/dist/components/molecules/rte-editor/rte-editor.spec.d.ts +0 -1
  187. package/dist/components/molecules/select-media/select-media.spec.d.ts +0 -1
  188. package/dist/components/molecules/upload-group/upload-group.spec.d.ts +0 -1
  189. package/dist/components/organisms/asset-uploader/asset-uploader.spec.d.ts +0 -1
  190. package/dist/components/organisms/location-finder/location-finder.spec.d.ts +0 -1
  191. package/dist/components/templates/base-carousel/base-carousel.spec.d.ts +0 -1
  192. package/dist/components/templates/base-form/base-form.spec.d.ts +0 -1
  193. package/dist/components/templates/modal-dialog/modal-dialog.spec.d.ts +0 -1
  194. package/dist/components/templates/popover-dialog/popover-dialog.spec.d.ts +0 -1
  195. package/dist/components/templates/sortable-list/sortable-list.spec.d.ts +0 -1
  196. package/dist/components/templates/touch-wrapper/touch-wrapper.spec.d.ts +0 -1
@@ -0,0 +1,79 @@
1
+ import { defineComponent as r, computed as m, openBlock as s, createElementBlock as p, createVNode as f, withCtx as c, createElementVNode as b, toDisplayString as y } from "vue";
2
+ import { uniqueId as n } from "../../../utilities/helpers.js";
3
+ import V from "../../atoms/radio-group/radio-group.vue.js";
4
+ /* empty css */
5
+ const g = { class: "radio-buttons" }, x = ["for"], v = /* @__PURE__ */ r({
6
+ __name: "radio-buttons",
7
+ props: {
8
+ modelValue: {
9
+ type: null,
10
+ default: ""
11
+ },
12
+ options: {
13
+ type: Array,
14
+ default: []
15
+ },
16
+ name: {
17
+ type: String,
18
+ default: () => n()
19
+ },
20
+ id: {
21
+ type: String,
22
+ default: () => n()
23
+ },
24
+ label: {
25
+ type: String
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ required: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ keyOption: {
36
+ // type: String as PropType<'any' | 'all'>,
37
+ type: null
38
+ },
39
+ itemClass: {
40
+ type: String,
41
+ default: ""
42
+ }
43
+ },
44
+ emits: ["update:modelValue", "update:selection"],
45
+ setup(e, { emit: d }) {
46
+ const i = e, u = d, l = m({
47
+ get() {
48
+ return i.modelValue;
49
+ },
50
+ set(o) {
51
+ u("update:modelValue", o);
52
+ }
53
+ });
54
+ return (o, a) => (s(), p("div", g, [
55
+ f(V, {
56
+ modelValue: l.value,
57
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => l.value = t),
58
+ options: e.options,
59
+ name: e.name,
60
+ id: e.id,
61
+ disabled: e.disabled,
62
+ required: e.required,
63
+ class: "d-flex flex-column gap-3 justify-content-center"
64
+ }, {
65
+ "option-label": c((t) => [
66
+ b("label", {
67
+ for: `${e.id}-${t.index}`,
68
+ class: "d-block btn btn-outline-primary p-3 fw-bold",
69
+ role: "button"
70
+ }, y(t.option.text), 9, x)
71
+ ]),
72
+ _: 1
73
+ }, 8, ["modelValue", "options", "name", "id", "disabled", "required"])
74
+ ]));
75
+ }
76
+ });
77
+ export {
78
+ v as default
79
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./radio-buttons.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,455 @@
1
+ import { defineComponent as H, ref as $, shallowRef as m, onMounted as w, onBeforeUnmount as S, watch as M, openBlock as u, createElementBlock as d, normalizeClass as b, createVNode as s, createElementVNode as l, createBlock as c, createCommentVNode as V, resolveDynamicComponent as E } from "vue";
2
+ import n from "../../atoms/svg-icon/svg-icon.vue.js";
3
+ /* empty css */
4
+ const U = { class: "rte-editor" }, R = {
5
+ key: 0,
6
+ class: "rte-editor__controls mb-2"
7
+ }, I = ["disabled"], N = ["disabled"], O = { class: "btn-group" }, j = ["disabled"], z = ["disabled"], D = { class: "btn-group" }, K = { class: "dropdown" }, q = {
8
+ class: "btn dropdown-toggle btn-light",
9
+ "data-bs-toggle": "dropdown",
10
+ role: "button",
11
+ type: "button"
12
+ }, F = { class: "dropdown-menu" }, G = { class: "dropdown" }, J = {
13
+ class: "btn dropdown-toggle btn-light",
14
+ "data-bs-toggle": "dropdown",
15
+ role: "button",
16
+ type: "button"
17
+ }, Q = { class: "dropdown-menu" }, W = { class: "btn-group" }, X = ["disabled"], Y = ["disabled"], nt = /* @__PURE__ */ H({
18
+ __name: "rte-editor",
19
+ props: {
20
+ modelValue: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ disabled: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ iconBasePath: {
29
+ type: String,
30
+ default: "/rte-icons-defs.svg"
31
+ }
32
+ },
33
+ emits: ["update:modelValue"],
34
+ setup(a, { emit: f }) {
35
+ const g = a, p = f, h = $(!1), t = m(void 0), v = m(null);
36
+ w(async () => {
37
+ const [
38
+ { Editor: r, mergeAttributes: e },
39
+ { EditorContent: i },
40
+ { default: B },
41
+ { default: P },
42
+ { default: C },
43
+ { default: L },
44
+ { default: x }
45
+ ] = await Promise.all([
46
+ import("@tiptap/core"),
47
+ import("@tiptap/vue-3"),
48
+ import("@tiptap/extension-highlight"),
49
+ import("@tiptap/extension-text-align"),
50
+ import("@tiptap/extension-link"),
51
+ import("@tiptap/starter-kit"),
52
+ import("@tiptap/extension-bold")
53
+ ]);
54
+ v.value = i, t.value = new r({
55
+ content: g.modelValue,
56
+ onUpdate: () => {
57
+ p("update:modelValue", t.value?.getHTML());
58
+ },
59
+ extensions: [
60
+ L.configure({
61
+ bold: !1,
62
+ link: !1
63
+ }),
64
+ x.extend({
65
+ addAttributes() {
66
+ return {
67
+ class: {
68
+ default: null
69
+ }
70
+ };
71
+ },
72
+ parseHTML() {
73
+ return [
74
+ { tag: "strong" },
75
+ { tag: "b" }
76
+ ];
77
+ },
78
+ renderHTML({ HTMLAttributes: o }) {
79
+ return ["strong", e(this.options.HTMLAttributes, o), 0];
80
+ }
81
+ }),
82
+ P.configure({
83
+ types: ["heading", "paragraph"]
84
+ }),
85
+ B,
86
+ C.extend({
87
+ addAttributes() {
88
+ return {
89
+ ...this.parent?.(),
90
+ // Allow any attribute on anchor tags
91
+ class: {
92
+ default: null
93
+ },
94
+ id: {
95
+ default: null
96
+ },
97
+ title: {
98
+ default: null
99
+ }
100
+ };
101
+ },
102
+ parseHTML() {
103
+ return [
104
+ // Parse anchor tags with href (default behavior)
105
+ {
106
+ tag: "a[href]",
107
+ getAttrs: (o) => ({
108
+ href: o.getAttribute("href"),
109
+ target: o.getAttribute("target"),
110
+ rel: o.getAttribute("rel"),
111
+ class: o.getAttribute("class"),
112
+ id: o.getAttribute("id"),
113
+ title: o.getAttribute("title")
114
+ })
115
+ },
116
+ // Also parse plain anchor tags without href
117
+ {
118
+ tag: "a:not([href])",
119
+ getAttrs: (o) => ({
120
+ href: null,
121
+ target: o.getAttribute("target"),
122
+ rel: o.getAttribute("rel"),
123
+ class: o.getAttribute("class"),
124
+ id: o.getAttribute("id"),
125
+ title: o.getAttribute("title")
126
+ })
127
+ }
128
+ ];
129
+ },
130
+ renderHTML({ HTMLAttributes: o }) {
131
+ if (!o.href) {
132
+ const { href: Z, target: _, rel: tt, ...T } = o;
133
+ return ["a", e(T), 0];
134
+ }
135
+ return ["a", e(this.options.HTMLAttributes, o), 0];
136
+ }
137
+ }).configure({
138
+ openOnClick: !1,
139
+ autolink: !0,
140
+ defaultProtocol: "https",
141
+ protocols: ["http", "https"],
142
+ HTMLAttributes: {
143
+ target: "_blank",
144
+ rel: "noopener noreferrer"
145
+ }
146
+ })
147
+ ]
148
+ });
149
+ }), S(() => {
150
+ t.value?.destroy();
151
+ }), M(() => g.modelValue, (r, e) => {
152
+ if (t.value) {
153
+ if (t.value.getHTML() === r)
154
+ return;
155
+ t.value.commands.setContent(r);
156
+ }
157
+ });
158
+ function k() {
159
+ const r = t.value?.getAttributes("link").href, e = window.prompt("URL", r);
160
+ if (e !== null) {
161
+ if (e === "") {
162
+ t.value?.chain().focus().extendMarkRange("link").unsetLink().run();
163
+ return;
164
+ }
165
+ try {
166
+ t.value?.chain().focus().extendMarkRange("link").setLink({ href: e }).run();
167
+ } catch (i) {
168
+ alert(i.message);
169
+ }
170
+ }
171
+ }
172
+ const y = () => {
173
+ t.value?.commands.setContent(`<textarea>${t.value.getHTML()}</textarea>`), h.value = !0;
174
+ }, A = () => {
175
+ t.value?.commands.setContent(t.value.getText()), h.value = !1;
176
+ };
177
+ return (r, e) => (u(), d("div", U, [
178
+ t.value ? (u(), d("div", R, [
179
+ h.value ? (u(), d("button", {
180
+ key: 1,
181
+ class: "btn btn-sm btn-light is-active",
182
+ onClick: A,
183
+ disabled: !t.value.can().chain().focus().toggleCode().run(),
184
+ title: "Toggle Source"
185
+ }, [
186
+ s(n, {
187
+ symbol: "source",
188
+ "base-path": a.iconBasePath
189
+ }, null, 8, ["base-path"])
190
+ ], 8, N)) : (u(), d("button", {
191
+ key: 0,
192
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("code") }]),
193
+ onClick: y,
194
+ disabled: !t.value.can().chain().focus().toggleCode().run(),
195
+ title: "Toggle Source"
196
+ }, [
197
+ s(n, {
198
+ symbol: "source",
199
+ "base-path": a.iconBasePath
200
+ }, null, 8, ["base-path"])
201
+ ], 10, I)),
202
+ l("div", O, [
203
+ l("button", {
204
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("bold") }]),
205
+ onClick: e[0] || (e[0] = (i) => t.value?.chain().focus().toggleBold().run()),
206
+ disabled: !t.value.can().chain().focus().toggleBold().run(),
207
+ title: "Toggle Bold"
208
+ }, [
209
+ s(n, {
210
+ symbol: "bold",
211
+ "base-path": a.iconBasePath
212
+ }, null, 8, ["base-path"])
213
+ ], 10, j),
214
+ l("button", {
215
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("italic") }]),
216
+ onClick: e[1] || (e[1] = (i) => t.value?.chain().focus().toggleItalic().run()),
217
+ disabled: !t.value.can().chain().focus().toggleItalic().run(),
218
+ title: "Toggle Italic"
219
+ }, [
220
+ s(n, {
221
+ symbol: "italic",
222
+ "base-path": a.iconBasePath
223
+ }, null, 8, ["base-path"])
224
+ ], 10, z)
225
+ ]),
226
+ l("div", D, [
227
+ l("div", K, [
228
+ l("button", q, [
229
+ t.value.isActive("heading", { level: 1 }) ? (u(), c(n, {
230
+ key: 0,
231
+ symbol: "h1",
232
+ "base-path": a.iconBasePath
233
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 2 }) ? (u(), c(n, {
234
+ key: 1,
235
+ symbol: "h2",
236
+ "base-path": a.iconBasePath
237
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 3 }) ? (u(), c(n, {
238
+ key: 2,
239
+ symbol: "h3",
240
+ "base-path": a.iconBasePath
241
+ }, null, 8, ["base-path"])) : t.value.isActive("heading", { level: 4 }) ? (u(), c(n, {
242
+ key: 3,
243
+ symbol: "h4",
244
+ "base-path": a.iconBasePath
245
+ }, null, 8, ["base-path"])) : (u(), c(n, {
246
+ key: 4,
247
+ symbol: "headline",
248
+ "base-path": a.iconBasePath
249
+ }, null, 8, ["base-path"]))
250
+ ]),
251
+ l("ul", F, [
252
+ l("li", null, [
253
+ l("button", {
254
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 1 }) }]),
255
+ onClick: e[2] || (e[2] = (i) => t.value?.chain().focus().setHeading({ level: 1 }).run()),
256
+ title: "Set Heading 1"
257
+ }, [
258
+ s(n, {
259
+ symbol: "h1",
260
+ "base-path": a.iconBasePath
261
+ }, null, 8, ["base-path"])
262
+ ], 2)
263
+ ]),
264
+ l("li", null, [
265
+ l("button", {
266
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 2 }) }]),
267
+ onClick: e[3] || (e[3] = (i) => t.value?.chain().focus().setHeading({ level: 2 }).run()),
268
+ title: "Set Heading 2"
269
+ }, [
270
+ s(n, {
271
+ symbol: "h2",
272
+ "base-path": a.iconBasePath
273
+ }, null, 8, ["base-path"])
274
+ ], 2)
275
+ ]),
276
+ l("li", null, [
277
+ l("button", {
278
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 3 }) }]),
279
+ onClick: e[4] || (e[4] = (i) => t.value?.chain().focus().setHeading({ level: 3 }).run()),
280
+ title: "Set Heading 3"
281
+ }, [
282
+ s(n, {
283
+ symbol: "h3",
284
+ "base-path": a.iconBasePath
285
+ }, null, 8, ["base-path"])
286
+ ], 2)
287
+ ]),
288
+ l("li", null, [
289
+ l("button", {
290
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("heading", { level: 4 }) }]),
291
+ onClick: e[5] || (e[5] = (i) => t.value?.chain().focus().setHeading({ level: 4 }).run()),
292
+ title: "Set Heading 4"
293
+ }, [
294
+ s(n, {
295
+ symbol: "h4",
296
+ "base-path": a.iconBasePath
297
+ }, null, 8, ["base-path"])
298
+ ], 2)
299
+ ])
300
+ ])
301
+ ]),
302
+ l("button", {
303
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("paragraph") }]),
304
+ onClick: e[6] || (e[6] = (i) => t.value?.chain().focus().setParagraph().run()),
305
+ title: "Set Paragraph"
306
+ }, [
307
+ s(n, {
308
+ symbol: "paragraph",
309
+ "base-path": a.iconBasePath
310
+ }, null, 8, ["base-path"])
311
+ ], 2),
312
+ l("button", {
313
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("bulletList") }]),
314
+ onClick: e[7] || (e[7] = (i) => t.value?.chain().focus().toggleBulletList().run()),
315
+ title: "Toggle Bullet List"
316
+ }, [
317
+ s(n, {
318
+ symbol: "list",
319
+ "base-path": a.iconBasePath
320
+ }, null, 8, ["base-path"])
321
+ ], 2),
322
+ l("button", {
323
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("orderedList") }]),
324
+ onClick: e[8] || (e[8] = (i) => t.value?.chain().focus().toggleOrderedList().run()),
325
+ title: "Toggle Ordered List"
326
+ }, [
327
+ s(n, {
328
+ symbol: "ordered-list",
329
+ "base-path": a.iconBasePath
330
+ }, null, 8, ["base-path"])
331
+ ], 2)
332
+ ]),
333
+ l("div", G, [
334
+ l("button", J, [
335
+ t.value.isActive({ textAlign: "center" }) ? (u(), c(n, {
336
+ key: 0,
337
+ symbol: "align-center",
338
+ "base-path": a.iconBasePath
339
+ }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "left" }) ? (u(), c(n, {
340
+ key: 1,
341
+ symbol: "align-left",
342
+ "base-path": a.iconBasePath
343
+ }, null, 8, ["base-path"])) : t.value.isActive({ textAlign: "right" }) ? (u(), c(n, {
344
+ key: 2,
345
+ symbol: "align-right",
346
+ "base-path": a.iconBasePath
347
+ }, null, 8, ["base-path"])) : (u(), c(n, {
348
+ key: 3,
349
+ symbol: "align-justify",
350
+ "base-path": a.iconBasePath
351
+ }, null, 8, ["base-path"]))
352
+ ]),
353
+ l("ul", Q, [
354
+ l("li", null, [
355
+ l("button", {
356
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "left" }) }]),
357
+ onClick: e[9] || (e[9] = (i) => t.value?.chain().focus().setTextAlign("left").run())
358
+ }, [
359
+ s(n, {
360
+ symbol: "align-left",
361
+ "base-path": a.iconBasePath
362
+ }, null, 8, ["base-path"])
363
+ ], 2)
364
+ ]),
365
+ l("li", null, [
366
+ l("button", {
367
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "center" }) }]),
368
+ onClick: e[10] || (e[10] = (i) => t.value?.chain().focus().setTextAlign("center").run())
369
+ }, [
370
+ s(n, {
371
+ symbol: "align-center",
372
+ "base-path": a.iconBasePath
373
+ }, null, 8, ["base-path"])
374
+ ], 2)
375
+ ]),
376
+ l("li", null, [
377
+ l("button", {
378
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "right" }) }]),
379
+ onClick: e[11] || (e[11] = (i) => t.value?.chain().focus().setTextAlign("right").run())
380
+ }, [
381
+ s(n, {
382
+ symbol: "align-right",
383
+ "base-path": a.iconBasePath
384
+ }, null, 8, ["base-path"])
385
+ ], 2)
386
+ ]),
387
+ l("li", null, [
388
+ l("button", {
389
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive({ textAlign: "pretty" }) }]),
390
+ onClick: e[12] || (e[12] = (i) => t.value?.chain().focus().setTextAlign("right").run())
391
+ }, [
392
+ s(n, {
393
+ symbol: "align-justify",
394
+ "base-path": a.iconBasePath
395
+ }, null, 8, ["base-path"])
396
+ ], 2)
397
+ ])
398
+ ])
399
+ ]),
400
+ t.value.isActive("link") ? (u(), d("button", {
401
+ key: 3,
402
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("link") }]),
403
+ onClick: e[13] || (e[13] = (i) => t.value.chain().focus().unsetLink().run()),
404
+ title: "Unset Link"
405
+ }, [
406
+ s(n, {
407
+ symbol: "unlink",
408
+ "base-path": a.iconBasePath
409
+ }, null, 8, ["base-path"])
410
+ ], 2)) : (u(), d("button", {
411
+ key: 2,
412
+ class: b(["btn btn-sm btn-light", { "is-active": t.value.isActive("link") }]),
413
+ onClick: k,
414
+ title: "Set Link"
415
+ }, [
416
+ s(n, {
417
+ symbol: "link",
418
+ "base-path": a.iconBasePath
419
+ }, null, 8, ["base-path"])
420
+ ], 2)),
421
+ l("div", W, [
422
+ l("button", {
423
+ class: "btn btn-sm btn-light",
424
+ onClick: e[14] || (e[14] = (i) => t.value?.chain().focus().undo().run()),
425
+ disabled: !t.value.can().chain().focus().undo().run(),
426
+ title: "Undo"
427
+ }, [
428
+ s(n, {
429
+ symbol: "undo",
430
+ "base-path": a.iconBasePath
431
+ }, null, 8, ["base-path"])
432
+ ], 8, X),
433
+ l("button", {
434
+ class: "btn btn-sm btn-light",
435
+ onClick: e[15] || (e[15] = (i) => t.value?.chain().focus().redo().run()),
436
+ disabled: !t.value.can().chain().focus().redo().run(),
437
+ title: "Redo"
438
+ }, [
439
+ s(n, {
440
+ symbol: "redo",
441
+ "base-path": a.iconBasePath
442
+ }, null, 8, ["base-path"])
443
+ ], 8, Y)
444
+ ])
445
+ ])) : V("", !0),
446
+ (u(), c(E(v.value), {
447
+ class: "rte-editor__content",
448
+ editor: t.value
449
+ }, null, 8, ["editor"]))
450
+ ]));
451
+ }
452
+ });
453
+ export {
454
+ nt as default
455
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./rte-editor.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,87 @@
1
+ import { defineComponent as u, computed as r, openBlock as n, createElementBlock as c, createVNode as f, withCtx as y, createElementVNode as x, normalizeClass as b, createBlock as V, createCommentVNode as p } from "vue";
2
+ import { uniqueId as o } from "../../../utilities/helpers.js";
3
+ import g from "../../atoms/radio-group/radio-group.vue.js";
4
+ /* empty css */
5
+ import q from "../../atoms/base-image/base-image.vue.js";
6
+ /* empty css */
7
+ const v = { class: "select-media" }, B = ["for"], $ = /* @__PURE__ */ u({
8
+ __name: "select-media",
9
+ props: {
10
+ modelValue: {
11
+ type: null,
12
+ default: ""
13
+ },
14
+ assets: {
15
+ type: Array,
16
+ default: []
17
+ },
18
+ name: {
19
+ type: String,
20
+ default: () => o()
21
+ },
22
+ id: {
23
+ type: String,
24
+ default: () => o()
25
+ },
26
+ label: {
27
+ type: String
28
+ },
29
+ disabled: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ required: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ emitKey: {
38
+ type: String,
39
+ default: "src"
40
+ }
41
+ },
42
+ emits: ["update:modelValue", "update:selection"],
43
+ setup(e, { emit: m }) {
44
+ const a = e, d = m, i = r({
45
+ get() {
46
+ return a.modelValue;
47
+ },
48
+ set(s) {
49
+ const l = a.assets.find((t) => t.id === s);
50
+ d("update:modelValue", a.emitKey ? l[a.emitKey] : l), a.emitKey && a.emitKey !== "id" && d("update:selection", l.id);
51
+ }
52
+ });
53
+ return (s, l) => (n(), c("div", v, [
54
+ f(g, {
55
+ modelValue: i.value,
56
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => i.value = t),
57
+ options: e.assets.map((t) => t.id),
58
+ name: e.name,
59
+ id: e.id,
60
+ disabled: e.disabled,
61
+ required: e.required,
62
+ class: "d-flex flex-wrap flex-row justify-content-center",
63
+ itemClass: "col-6 p-2"
64
+ }, {
65
+ "option-label": y((t) => [
66
+ x("label", {
67
+ for: `${e.id}-${t.index}`,
68
+ class: b(["w-100", {
69
+ "is-active": e.assets[t.index].id === i.value
70
+ }]),
71
+ role: "button"
72
+ }, [
73
+ e.assets[t.index].thumbnail ? (n(), V(q, {
74
+ key: 0,
75
+ src: e.assets[t.index].thumbnail,
76
+ alt: e.assets[t.index].id
77
+ }, null, 8, ["src", "alt"])) : p("", !0)
78
+ ], 10, B)
79
+ ]),
80
+ _: 1
81
+ }, 8, ["modelValue", "options", "name", "id", "disabled", "required"])
82
+ ]));
83
+ }
84
+ });
85
+ export {
86
+ $ as default
87
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./select-media.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };