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,178 @@
1
+ import { defineComponent as v, ref as x, computed as k, watch as w, nextTick as V, openBlock as s, createElementBlock as r, unref as S, createCommentVNode as z, createElementVNode as n, createVNode as d, withCtx as m, createBlock as f, withModifiers as $ } from "vue";
2
+ import { uniqueId as p } from "../../../utilities/helpers.js";
3
+ import { sanitizeHtml as F } from "../../../composables/useSanitize.js";
4
+ import N from "../../templates/sortable-list/sortable-list.vue.js";
5
+ /* empty css */
6
+ import B from "../image-upload/image-upload.vue.js";
7
+ /* empty css */
8
+ import I from "../file-upload/file-upload.vue.js";
9
+ /* empty css */
10
+ import c from "../../atoms/svg-icon/svg-icon.vue.js";
11
+ /* empty css */
12
+ const T = { class: "upload-group" }, W = ["innerHTML"], C = { class: "upload-group__list" }, R = { class: "img-container" }, U = ["src"], H = ["onClick"], M = {
13
+ role: "button",
14
+ class: "img-thumbnail d-flex justify-content-center align-items-center"
15
+ }, P = {
16
+ role: "button",
17
+ class: "img-thumbnail d-flex justify-content-center align-items-center"
18
+ }, Y = /* @__PURE__ */ v({
19
+ __name: "upload-group",
20
+ props: {
21
+ modelValue: {
22
+ type: Array,
23
+ default: () => []
24
+ },
25
+ name: {
26
+ type: String,
27
+ default: () => p()
28
+ },
29
+ id: {
30
+ type: String,
31
+ default: () => p()
32
+ },
33
+ label: {
34
+ type: String,
35
+ default: ""
36
+ },
37
+ variant: {
38
+ type: String,
39
+ default: ""
40
+ },
41
+ disabled: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ required: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ accept: {
50
+ type: String
51
+ },
52
+ maxFileSize: {
53
+ type: Number,
54
+ default: 0
55
+ },
56
+ endpoint: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ authToken: {
61
+ type: String,
62
+ default: ""
63
+ },
64
+ customFetch: null,
65
+ baseResponsePath: {
66
+ type: String,
67
+ default: "/api/v1/assets"
68
+ },
69
+ previewWidth: {
70
+ type: Number,
71
+ default: 0
72
+ },
73
+ useImageUpload: {
74
+ type: Boolean,
75
+ default: !1
76
+ },
77
+ maxImageWidth: {
78
+ type: Number,
79
+ default: 0
80
+ },
81
+ aspectRatio: Number
82
+ },
83
+ emits: ["update:modelValue"],
84
+ setup(e, { emit: h }) {
85
+ const b = e, u = h, l = x(""), o = k({
86
+ get() {
87
+ return b.modelValue;
88
+ },
89
+ set(t) {
90
+ u("update:modelValue", t);
91
+ }
92
+ });
93
+ function g(t) {
94
+ o.value.splice(t, 1), u("update:modelValue", o.value);
95
+ }
96
+ return w(l, async (t, a) => {
97
+ t && a !== t && (u("update:modelValue", [...o.value, t]), await V(), l.value = "");
98
+ }), (t, a) => (s(), r("div", T, [
99
+ e.label ? (s(), r("label", {
100
+ key: 0,
101
+ innerHTML: S(F)(e.label)
102
+ }, null, 8, W)) : z("", !0),
103
+ n("div", C, [
104
+ d(N, {
105
+ modelValue: o.value,
106
+ "onUpdate:modelValue": a[2] || (a[2] = (i) => o.value = i),
107
+ vertical: !1,
108
+ class: "mb-3"
109
+ }, {
110
+ "list-item": m(({ item: i, index: y }) => [
111
+ n("div", R, [
112
+ n("img", {
113
+ src: `${i}${e.previewWidth ? `?width=${e.previewWidth}` : ""}`,
114
+ class: "img-thumbnail"
115
+ }, null, 8, U),
116
+ n("button", {
117
+ onClick: $((j) => g(y), ["prevent"]),
118
+ class: "btn btn--close"
119
+ }, [
120
+ d(c, { symbol: "x" })
121
+ ], 8, H)
122
+ ])
123
+ ]),
124
+ "list-append": m(() => [
125
+ e.useImageUpload ? (s(), f(B, {
126
+ key: 0,
127
+ src: l.value,
128
+ "onUpdate:src": a[0] || (a[0] = (i) => l.value = i),
129
+ endpoint: e.endpoint,
130
+ "custom-fetch": e.customFetch,
131
+ "to-data-url": !e.endpoint,
132
+ "auth-token": e.authToken,
133
+ disabled: e.disabled,
134
+ "base-response-path": e.baseResponsePath,
135
+ accept: e.accept,
136
+ "max-file-size": e.maxFileSize,
137
+ "max-image-width": e.maxImageWidth,
138
+ "enable-preview": !1,
139
+ "aspect-ratio": e.aspectRatio
140
+ }, {
141
+ button: m(() => [
142
+ n("span", M, [
143
+ d(c, { symbol: "plus" })
144
+ ])
145
+ ]),
146
+ _: 1
147
+ }, 8, ["src", "endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width", "aspect-ratio"])) : (s(), f(I, {
148
+ key: 1,
149
+ src: l.value,
150
+ "onUpdate:src": a[1] || (a[1] = (i) => l.value = i),
151
+ multiple: !1,
152
+ endpoint: e.endpoint,
153
+ "custom-fetch": e.customFetch,
154
+ "to-data-url": !e.endpoint,
155
+ "auth-token": e.authToken,
156
+ disabled: e.disabled,
157
+ "base-response-path": e.baseResponsePath,
158
+ accept: e.accept,
159
+ "max-file-size": e.maxFileSize,
160
+ "max-image-width": e.maxImageWidth
161
+ }, {
162
+ button: m(() => [
163
+ n("span", P, [
164
+ d(c, { symbol: "plus" })
165
+ ])
166
+ ]),
167
+ _: 1
168
+ }, 8, ["src", "endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width"]))
169
+ ]),
170
+ _: 1
171
+ }, 8, ["modelValue"])
172
+ ])
173
+ ]));
174
+ }
175
+ });
176
+ export {
177
+ Y as default
178
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./upload-group.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,126 @@
1
+ import { defineComponent as p, computed as r, openBlock as m, createElementBlock as u, unref as c, createCommentVNode as f, createVNode as g } from "vue";
2
+ import { uniqueId as n } from "../../../utilities/helpers.js";
3
+ import y from "../../molecules/upload-group/upload-group.vue.js";
4
+ /* empty css */
5
+ import { sanitizeHtml as h } from "../../../composables/useSanitize.js";
6
+ const b = { class: "asset-uploader" }, v = ["innerHTML"], k = /* @__PURE__ */ p({
7
+ __name: "asset-uploader",
8
+ props: {
9
+ modelValue: {
10
+ type: Array,
11
+ default: () => []
12
+ },
13
+ name: {
14
+ type: String,
15
+ default: () => n()
16
+ },
17
+ id: {
18
+ type: String,
19
+ default: () => n()
20
+ },
21
+ type: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ label: {
26
+ type: String,
27
+ default: ""
28
+ },
29
+ variant: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ disabled: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ required: {
38
+ type: Boolean,
39
+ default: !1
40
+ },
41
+ accept: {
42
+ type: String
43
+ },
44
+ maxFileSize: {
45
+ type: Number,
46
+ default: 0
47
+ },
48
+ endpoint: {
49
+ type: String,
50
+ default: ""
51
+ },
52
+ authToken: {
53
+ type: String,
54
+ default: ""
55
+ },
56
+ customFetch: null,
57
+ mediaTypeMap: {
58
+ type: Object,
59
+ default: () => ({
60
+ svg: "Svg",
61
+ png: "Image",
62
+ jpg: "Image"
63
+ /* Image */
64
+ })
65
+ },
66
+ baseResponsePath: {
67
+ type: String,
68
+ default: "/api/v1/assets"
69
+ },
70
+ previewWidth: {
71
+ type: Number,
72
+ default: 0
73
+ },
74
+ useImageUpload: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
78
+ maxImageWidth: {
79
+ type: Number,
80
+ default: 0
81
+ },
82
+ aspectRatio: Number
83
+ },
84
+ emits: ["update:modelValue"],
85
+ setup(e, { emit: o }) {
86
+ const t = e, s = o, i = r({
87
+ get() {
88
+ return t.modelValue.map((d) => d.src);
89
+ },
90
+ set(d) {
91
+ s("update:modelValue", d.map(
92
+ (a, l) => ({
93
+ mediaType: t.modelValue[l] && t.modelValue[l].mediaType || a.includes("data:image") ? a.includes("data:image/svg") ? "Svg" : "Image" : t.mediaTypeMap[a.split(".")[1]],
94
+ src: a,
95
+ name: t.modelValue[l] && t.modelValue[l].name || `${t.name}-${l}`,
96
+ ...t.type ? { type: t.type } : {}
97
+ })
98
+ ));
99
+ }
100
+ });
101
+ return (d, a) => (m(), u("div", b, [
102
+ e.label ? (m(), u("label", {
103
+ key: 0,
104
+ innerHTML: c(h)(e.label)
105
+ }, null, 8, v)) : f("", !0),
106
+ g(y, {
107
+ modelValue: i.value,
108
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => i.value = l),
109
+ endpoint: e.endpoint,
110
+ "custom-fetch": e.customFetch,
111
+ "auth-token": e.authToken,
112
+ disabled: e.disabled,
113
+ "preview-width": e.previewWidth,
114
+ "base-response-path": e.baseResponsePath,
115
+ accept: e.accept,
116
+ "max-file-size": e.maxFileSize,
117
+ "use-image-upload": e.useImageUpload,
118
+ "max-image-width": e.maxImageWidth,
119
+ "aspect-ratio": e.aspectRatio
120
+ }, null, 8, ["modelValue", "endpoint", "custom-fetch", "auth-token", "disabled", "preview-width", "base-response-path", "accept", "max-file-size", "use-image-upload", "max-image-width", "aspect-ratio"])
121
+ ]));
122
+ }
123
+ });
124
+ export {
125
+ k as default
126
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./asset-uploader.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };