ablok-components 0.3.58 → 0.3.60

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