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,12 @@
1
+ let t = null;
2
+ async function n() {
3
+ if (typeof window > "u")
4
+ return null;
5
+ if (t)
6
+ return t;
7
+ const e = await import("canvas-confetti");
8
+ return t = e.default || e, t;
9
+ }
10
+ export {
11
+ n as getConfetti
12
+ };
@@ -0,0 +1,62 @@
1
+ import { ref as o, computed as y } from "vue";
2
+ import { ofetch as g } from "ofetch";
3
+ const A = "https://router.project-osrm.org/route/v1";
4
+ function D() {
5
+ const e = o([]), u = o(null), a = o(null), n = o([]), i = o(!1), s = o(""), v = y(() => e.value.length > 1);
6
+ function l() {
7
+ e.value = [], u.value = null, a.value = null, n.value = [], s.value = "";
8
+ }
9
+ async function p(c, m, f = {}) {
10
+ if (!c || !m)
11
+ return l(), null;
12
+ i.value = !0;
13
+ const N = f.customFetch || g, b = (f.endpoint || A).replace(/\/$/, ""), $ = f.profile || "driving";
14
+ try {
15
+ const r = (await N(
16
+ `${b}/${$}/${c.lng},${c.lat};${m.lng},${m.lat}`,
17
+ {
18
+ method: "GET",
19
+ query: {
20
+ alternatives: !1,
21
+ overview: "full",
22
+ steps: !0,
23
+ geometries: "geojson"
24
+ }
25
+ }
26
+ ))?.routes?.[0];
27
+ if (!r)
28
+ throw new Error("No route available for these points.");
29
+ return e.value = Array.isArray(r?.geometry?.coordinates) ? r.geometry.coordinates.map((t) => [Number(t[1]), Number(t[0])]).filter((t) => Number.isFinite(t[0]) && Number.isFinite(t[1])) : [], u.value = Number.isFinite(r?.distance) ? Number(r.distance) : null, a.value = Number.isFinite(r?.duration) ? Number(r.duration) : null, n.value = Array.isArray(r?.legs) ? r.legs.flatMap((t) => Array.isArray(t?.steps) ? t.steps.map((h) => F(h)) : []) : [], s.value = "", r;
30
+ } catch (d) {
31
+ return l(), s.value = d?.message || "Unable to load directions right now.", null;
32
+ } finally {
33
+ i.value = !1;
34
+ }
35
+ }
36
+ return {
37
+ routeCoordinates: e,
38
+ distanceMeters: u,
39
+ durationSeconds: a,
40
+ steps: n,
41
+ pending: i,
42
+ error: s,
43
+ hasRoute: v,
44
+ fetchRoute: p,
45
+ clearRoute: l
46
+ };
47
+ }
48
+ function F(e) {
49
+ const u = `${e?.maneuver?.type || "continue"}`, a = e?.maneuver?.modifier ? ` ${e.maneuver.modifier}` : "", n = `${e?.name || ""}`;
50
+ return {
51
+ instruction: `${w(u)}${a}${n ? ` on ${n}` : ""}`.trim(),
52
+ name: n,
53
+ distance: Number.isFinite(e?.distance) ? Number(e.distance) : 0,
54
+ duration: Number.isFinite(e?.duration) ? Number(e.duration) : 0
55
+ };
56
+ }
57
+ function w(e) {
58
+ return e.charAt(0).toUpperCase() + e.slice(1);
59
+ }
60
+ export {
61
+ D as useDirections
62
+ };
@@ -0,0 +1,79 @@
1
+ import { ref as r, computed as A, onMounted as V, onBeforeUnmount as F } from "vue";
2
+ import { ofetch as L } from "ofetch";
3
+ function U(a = null, o) {
4
+ const c = r(!1), f = r([]), n = r([]), h = r(!1), u = r(!1), y = A(() => a.modelValue?.length ? a.modelValue : a.src ? [{ type: "", src: a.src }] : n.value);
5
+ async function D(e) {
6
+ const t = new FormData();
7
+ t.append("file", e), c.value = !0;
8
+ const d = await (a.customFetch || L)(a.endpoint, {
9
+ method: "POST",
10
+ ...a.customFetch ? {} : { headers: {
11
+ Accept: "application/json",
12
+ ...a.authToken ? { Authorization: `Bearer ${a.authToken}` } : {}
13
+ } },
14
+ body: t
15
+ }).catch((E) => {
16
+ console.error("Error", E);
17
+ });
18
+ return c.value = !1, `${a.baseResponsePath || "/api/v1/assets"}/${d.path}`;
19
+ }
20
+ function b(e) {
21
+ const t = typeof e == "string" ? parseInt(e, 10) : e, s = Array.isArray(a.modelValue) && a.modelValue.length > 0, d = Array.isArray(n.value) && n.value.length > 0;
22
+ if (d && t < n.value.length && n.value.splice(t, 1), s) {
23
+ const l = [...a.modelValue];
24
+ t < l.length && l.splice(t, 1), o?.("update:modelValue", l), a.multiple || o?.("update:src", l[0]?.src || "");
25
+ } else if (d) {
26
+ const l = a.multiple ? n.value : n.value[0];
27
+ o?.("update:modelValue", l), a.multiple || o?.("update:src", n.value[0]?.src || "");
28
+ } else
29
+ o?.("update:modelValue", a.multiple ? [] : void 0), o?.("update:src", "");
30
+ f.value.splice(t, 1), h.value = !1;
31
+ }
32
+ function i(e) {
33
+ e.preventDefault(), u.value = !0;
34
+ }
35
+ function v(e) {
36
+ e.preventDefault(), u.value = !1;
37
+ }
38
+ function m(e) {
39
+ e.preventDefault(), u.value = !1;
40
+ const t = e.dataTransfer, s = t && Array.from(t.files || []);
41
+ f.value = s || [];
42
+ }
43
+ function g() {
44
+ a.dropFiles && (["dragenter", "dragover"].forEach((e) => {
45
+ document.body.addEventListener(e, i, !1);
46
+ }), ["dragleave", "drop"].forEach((e) => {
47
+ document.body.addEventListener(e, v, !1);
48
+ }), document.body.addEventListener("drop", m, !1));
49
+ }
50
+ function p() {
51
+ a.dropFiles && (["dragenter", "dragover"].forEach((e) => {
52
+ document.body.removeEventListener(e, i, !1);
53
+ }), ["dragleave", "drop"].forEach((e) => {
54
+ document.body.removeEventListener(e, v, !1);
55
+ }), document.body.removeEventListener("drop", m, !1));
56
+ }
57
+ return V(() => {
58
+ g();
59
+ }), F(() => {
60
+ p();
61
+ }), {
62
+ pending: c,
63
+ files: f,
64
+ dataUrls: n,
65
+ imgLoaded: h,
66
+ isDragging: u,
67
+ thumbnails: y,
68
+ uploadFile: D,
69
+ removeFile: b,
70
+ dragStart: i,
71
+ dragStop: v,
72
+ dragDrop: m,
73
+ setupDragAndDrop: g,
74
+ cleanupDragAndDrop: p
75
+ };
76
+ }
77
+ export {
78
+ U as useFileUpload
79
+ };
@@ -0,0 +1,85 @@
1
+ import { ref as g } from "vue";
2
+ import { ofetch as m } from "ofetch";
3
+ const f = "https://nominatim.openstreetmap.org/search", h = "https://nominatim.openstreetmap.org/reverse";
4
+ function E() {
5
+ const e = g([]), n = g(!1), r = g("");
6
+ function o() {
7
+ e.value = [], r.value = "";
8
+ }
9
+ async function c(s, a = {}) {
10
+ if (!s.trim())
11
+ return o(), [];
12
+ n.value = !0;
13
+ const i = a.customFetch || m;
14
+ try {
15
+ const t = await i(a.endpoint || f, {
16
+ method: "GET",
17
+ headers: {
18
+ Accept: "application/json",
19
+ ...a.language ? { "Accept-Language": a.language } : {}
20
+ },
21
+ query: {
22
+ q: s,
23
+ format: "jsonv2",
24
+ addressdetails: 1,
25
+ limit: a.limit || 5
26
+ }
27
+ });
28
+ return e.value = Array.isArray(t) ? t.map((l, v) => d(l, v, "geocoder")).filter((l) => !!l) : [], r.value = "", e.value;
29
+ } catch (t) {
30
+ return r.value = t?.message || "Unable to search locations right now.", e.value = [], [];
31
+ } finally {
32
+ n.value = !1;
33
+ }
34
+ }
35
+ async function u(s, a = {}) {
36
+ n.value = !0;
37
+ const i = a.customFetch || m;
38
+ try {
39
+ const t = await i(a.reverseEndpoint || h, {
40
+ method: "GET",
41
+ headers: {
42
+ Accept: "application/json",
43
+ ...a.language ? { "Accept-Language": a.language } : {}
44
+ },
45
+ query: {
46
+ lat: s.lat,
47
+ lon: s.lng,
48
+ format: "jsonv2",
49
+ addressdetails: 1
50
+ }
51
+ }), l = d(t, 0, "reverse-geocoder");
52
+ return r.value = "", l;
53
+ } catch (t) {
54
+ return r.value = t?.message || "Unable to resolve this location right now.", null;
55
+ } finally {
56
+ n.value = !1;
57
+ }
58
+ }
59
+ return {
60
+ results: e,
61
+ pending: n,
62
+ error: r,
63
+ search: c,
64
+ reverse: u,
65
+ clearResults: o
66
+ };
67
+ }
68
+ function d(e, n, r) {
69
+ const o = Number(e?.lat), c = Number(e?.lon ?? e?.lng);
70
+ if (!Number.isFinite(o) || !Number.isFinite(c))
71
+ return null;
72
+ const u = `${e?.display_name || e?.name || "Location"}`, s = `${e?.name || u.split(",")[0] || "Location"}`.trim();
73
+ return {
74
+ id: `${r === "reverse-geocoder" ? "reverse" : "geo"}-${e?.place_id ?? n}`,
75
+ title: s,
76
+ address: u,
77
+ lat: o,
78
+ lng: c,
79
+ source: r,
80
+ raw: e
81
+ };
82
+ }
83
+ export {
84
+ E as useGeocoding
85
+ };
@@ -0,0 +1,71 @@
1
+ import { ref as l, onBeforeUnmount as y, computed as v } from "vue";
2
+ function h(p = {}) {
3
+ const o = l(null), r = l(""), n = l(!1), t = l(!1), u = typeof window < "u" && typeof navigator < "u" && "geolocation" in navigator, s = {
4
+ enableHighAccuracy: !0,
5
+ timeout: 1e4,
6
+ maximumAge: 1e4,
7
+ ...p
8
+ };
9
+ let a = null;
10
+ function f(e) {
11
+ o.value = {
12
+ lat: Number(e.latitude),
13
+ lng: Number(e.longitude),
14
+ accuracy: Number.isFinite(e.accuracy) ? Number(e.accuracy) : null
15
+ }, n.value = !1, r.value = "";
16
+ }
17
+ function i(e) {
18
+ r.value = typeof e == "string" ? e : e instanceof Error ? e.message : e.message || "Unable to retrieve your location.", n.value = !1;
19
+ }
20
+ async function m() {
21
+ return u ? (n.value = !0, new Promise((e) => {
22
+ navigator.geolocation.getCurrentPosition(
23
+ ({ coords: c }) => {
24
+ f(c), e(o.value);
25
+ },
26
+ (c) => {
27
+ i(c), e(null);
28
+ },
29
+ s
30
+ );
31
+ })) : (i("Geolocation is not supported in this browser."), null);
32
+ }
33
+ function d() {
34
+ if (!u) {
35
+ i("Geolocation is not supported in this browser.");
36
+ return;
37
+ }
38
+ a === null && (n.value = !0, t.value = !0, a = navigator.geolocation.watchPosition(
39
+ ({ coords: e }) => {
40
+ f(e);
41
+ },
42
+ (e) => {
43
+ i(e), t.value = !1;
44
+ },
45
+ s
46
+ ));
47
+ }
48
+ function g() {
49
+ if (!u || a === null) {
50
+ t.value = !1, n.value = !1;
51
+ return;
52
+ }
53
+ navigator.geolocation.clearWatch(a), a = null, t.value = !1, n.value = !1;
54
+ }
55
+ return y(() => {
56
+ g();
57
+ }), {
58
+ supported: u,
59
+ position: v(() => o.value),
60
+ accuracy: v(() => o.value?.accuracy ?? null),
61
+ error: r,
62
+ pending: n,
63
+ isTracking: t,
64
+ locate: m,
65
+ startTracking: d,
66
+ stopTracking: g
67
+ };
68
+ }
69
+ export {
70
+ h as useGeolocation
71
+ };
@@ -0,0 +1,23 @@
1
+ import { computed as i } from "vue";
2
+ import e from "dompurify";
3
+ function o(t) {
4
+ return i(() => {
5
+ const r = typeof t == "function" ? t() : typeof t == "string" ? t : t.value;
6
+ return e.sanitize(r, {
7
+ ALLOWED_TAGS: ["b", "i", "em", "strong", "u", "span", "p", "br", "a", "ul", "ol", "li", "h1", "h2", "h3", "h4", "h5", "h6", "article", "div", "label"],
8
+ ALLOWED_ATTR: ["class", "id", "href", "target", "rel", "title", "data-countdown"],
9
+ ALLOW_DATA_ATTR: !0
10
+ });
11
+ });
12
+ }
13
+ function l(t) {
14
+ return e.sanitize(t, {
15
+ ALLOWED_TAGS: ["b", "i", "em", "strong", "u", "span", "p", "br", "a", "ul", "ol", "li", "h1", "h2", "h3", "h4", "h5", "h6", "article", "div", "label"],
16
+ ALLOWED_ATTR: ["class", "id", "href", "target", "rel", "title", "data-countdown", "v-modal"],
17
+ ALLOW_DATA_ATTR: !0
18
+ });
19
+ }
20
+ export {
21
+ l as sanitizeHtml,
22
+ o as useSanitize
23
+ };
package/dist/i18n.d.ts CHANGED
@@ -48,6 +48,9 @@ declare const i18n: import('vue-i18n').I18n<{
48
48
  download: string;
49
49
  selectFile: string;
50
50
  apply: string;
51
+ crop: string;
52
+ resize: string;
53
+ svgWarning: string;
51
54
  };
52
55
  form: {
53
56
  mandatoryNote: string;
package/dist/index.js ADDED
@@ -0,0 +1,156 @@
1
+ import { default as W } from "./components/atoms/svg-icon/svg-icon.vue.js";
2
+ /* empty css */
3
+ import { default as j } from "./components/atoms/loading-spinner/loading-spinner.vue.js";
4
+ /* empty css */
5
+ import { default as J } from "./components/atoms/base-image/base-image.vue.js";
6
+ /* empty css */
7
+ import { default as O } from "./components/atoms/base-headline/base-headline.vue.js";
8
+ import { default as X } from "./components/atoms/base-paragraph/base-paragraph.vue.js";
9
+ import { default as _ } from "./components/molecules/accordion/accordion-item.vue.js";
10
+ /* empty css */
11
+ import { default as oo } from "./components/molecules/accordion/accordion.vue.js";
12
+ import { default as ro } from "./components/atoms/base-button/base-button.vue.js";
13
+ /* empty css */
14
+ import { default as ao } from "./components/atoms/base-input/base-input.vue.js";
15
+ /* empty css */
16
+ import { default as mo } from "./components/atoms/input-textarea/input-textarea.vue.js";
17
+ import { default as so } from "./components/atoms/input-checkbox/input-checkbox.vue.js";
18
+ /* empty css */
19
+ import { default as io } from "./components/atoms/input-datetime/input-datetime.vue.js";
20
+ import { default as xo } from "./components/molecules/input-datepicker/input-datepicker.vue.js";
21
+ /* empty css */
22
+ import { default as Io } from "./components/atoms/input-passcode/input-passcode.vue.js";
23
+ import { default as go } from "./components/atoms/input-password/input-password.vue.js";
24
+ import { default as Bo } from "./components/atoms/check-group/check-group.vue.js";
25
+ /* empty css */
26
+ import { default as So } from "./components/atoms/radio-group/radio-group.vue.js";
27
+ /* empty css */
28
+ import { default as ho } from "./components/molecules/radio-buttons/radio-buttons.vue.js";
29
+ /* empty css */
30
+ import { default as Ro } from "./components/atoms/input-file/input-file.vue.js";
31
+ import { default as Fo } from "./components/atoms/custom-html/custom-html.vue.js";
32
+ import { default as ko } from "./components/molecules/select-media/select-media.vue.js";
33
+ /* empty css */
34
+ import { default as Mo } from "./components/molecules/rte-editor/rte-editor.vue.js";
35
+ /* empty css */
36
+ import { default as Uo } from "./components/molecules/input-color/input-color.vue.js";
37
+ /* empty css */
38
+ import { default as Ho } from "./components/molecules/color-palette/color-palette.vue.js";
39
+ /* empty css */
40
+ import { default as zo } from "./components/molecules/input-dropdown/input-dropdown.vue.js";
41
+ /* empty css */
42
+ import { default as Eo } from "./components/molecules/auto-suggest/auto-suggest.vue.js";
43
+ /* empty css */
44
+ import { default as Qo } from "./components/molecules/base-camera/base-camera.vue.js";
45
+ /* empty css */
46
+ import { default as Zo } from "./components/molecules/base-map/base-map.vue.js";
47
+ /* empty css */
48
+ import { default as qo } from "./components/molecules/location-list/location-list.vue.js";
49
+ /* empty css */
50
+ import { default as Ko } from "./components/molecules/file-upload/file-upload.vue.js";
51
+ /* empty css */
52
+ import { default as Vo } from "./components/molecules/upload-group/upload-group.vue.js";
53
+ /* empty css */
54
+ import { default as Yo } from "./components/organisms/asset-uploader/asset-uploader.vue.js";
55
+ /* empty css */
56
+ import { default as $o } from "./components/organisms/location-finder/location-finder.vue.js";
57
+ /* empty css */
58
+ import { default as tt } from "./components/templates/base-carousel/base-carousel.vue.js";
59
+ /* empty css */
60
+ import { default as et } from "./components/molecules/media-thumbnails/media-thumbnails.vue.js";
61
+ /* empty css */
62
+ import { default as pt } from "./components/molecules/progress-steps/progress-steps.vue.js";
63
+ /* empty css */
64
+ import { default as ft } from "./components/molecules/hint-system/hint-system.vue.js";
65
+ /* empty css */
66
+ import { default as ut } from "./components/molecules/popover-tooltip/popover-tooltip.vue.js";
67
+ /* empty css */
68
+ import { default as dt } from "./components/molecules/popover-notifications/popover-notifications.vue.js";
69
+ /* empty css */
70
+ import { default as xt } from "./components/molecules/dom-renderer/dom-renderer.vue.js";
71
+ import { default as It } from "./components/molecules/qr-code/qr-code.vue.js";
72
+ /* empty css */
73
+ import { default as gt } from "./components/molecules/link-sharing/link-sharing.vue.js";
74
+ /* empty css */
75
+ import { default as Bt } from "./components/templates/base-form/base-form.vue.js";
76
+ /* empty css */
77
+ import { default as St } from "./components/templates/modal-dialog/modal-dialog.vue.js";
78
+ /* empty css */
79
+ import { default as ht } from "./components/templates/popover-dialog/popover-dialog.vue.js";
80
+ /* empty css */
81
+ import { default as Rt } from "./components/templates/sortable-list/sortable-list.vue.js";
82
+ /* empty css */
83
+ import { default as Ft } from "./components/templates/touch-wrapper/touch-wrapper.vue.js";
84
+ /* empty css */
85
+ import { default as kt } from "./components/atoms/canvas-confetti/canvas-confetti.vue.js";
86
+ /* empty css */
87
+ import { default as Mt } from "./components/molecules/image-crop/image-crop.vue.js";
88
+ import { default as Ut } from "./components/molecules/image-resize/image-resize.vue.js";
89
+ import { default as Ht } from "./components/molecules/image-crop-resize/image-crop-resize.vue.js";
90
+ import { default as zt } from "./components/molecules/image-upload/image-upload.vue.js";
91
+ /* empty css */
92
+ import { default as Et } from "./components/molecules/image-zoom/image-zoom.vue.js";
93
+ /* empty css */
94
+ import { useCameraFilter as Qt } from "./composables/useCameraFilter.js";
95
+ import { useDirections as Zt } from "./composables/useDirections.js";
96
+ import { useGeocoding as qt } from "./composables/useGeocoding.js";
97
+ import { useGeolocation as Kt } from "./composables/useGeolocation.js";
98
+ export {
99
+ oo as Accordion,
100
+ _ as AccordionItem,
101
+ Yo as AssetUploader,
102
+ Eo as AutoSuggest,
103
+ ro as BaseButton,
104
+ Qo as BaseCamera,
105
+ tt as BaseCarousel,
106
+ Bt as BaseForm,
107
+ O as BaseHeadline,
108
+ J as BaseImage,
109
+ ao as BaseInput,
110
+ Zo as BaseMap,
111
+ X as BaseParagraph,
112
+ kt as CanvasConfetti,
113
+ Bo as CheckGroup,
114
+ Ho as ColorPalette,
115
+ Fo as CustomHtml,
116
+ xt as DomRenderer,
117
+ Ko as FileUpload,
118
+ ft as HintSystem,
119
+ Mt as ImageCrop,
120
+ Ht as ImageCropResize,
121
+ Ut as ImageResize,
122
+ zt as ImageUpload,
123
+ Et as ImageZoom,
124
+ so as InputCheckbox,
125
+ Uo as InputColor,
126
+ xo as InputDatepicker,
127
+ io as InputDatetime,
128
+ zo as InputDropdown,
129
+ Ro as InputFile,
130
+ Io as InputPasscode,
131
+ go as InputPassword,
132
+ mo as InputTextarea,
133
+ gt as LinkSharing,
134
+ j as LoadingSpinner,
135
+ $o as LocationFinder,
136
+ qo as LocationList,
137
+ et as MediaThumbnails,
138
+ St as ModalDialog,
139
+ ht as PopoverDialog,
140
+ dt as PopoverNotifications,
141
+ ut as PopoverTooltip,
142
+ pt as ProgressSteps,
143
+ It as QrCode,
144
+ ho as RadioButtons,
145
+ So as RadioGroup,
146
+ Mo as RteEditor,
147
+ ko as SelectMedia,
148
+ Rt as SortableList,
149
+ W as SvgIcon,
150
+ Ft as TouchWrapper,
151
+ Vo as UploadGroup,
152
+ Qt as useCameraFilter,
153
+ Zt as useDirections,
154
+ qt as useGeocoding,
155
+ Kt as useGeolocation
156
+ };
@@ -47,6 +47,9 @@ export declare const messages: {
47
47
  download: string;
48
48
  selectFile: string;
49
49
  apply: string;
50
+ crop: string;
51
+ resize: string;
52
+ svgWarning: string;
50
53
  };
51
54
  form: {
52
55
  mandatoryNote: string;
@@ -0,0 +1,9 @@
1
+ function r(t) {
2
+ return (d = {}) => {
3
+ const n = d.width ? String(d.width) : t.defaultWidth;
4
+ return t.formats[n] || t.formats[t.defaultWidth];
5
+ };
6
+ }
7
+ export {
8
+ r as buildFormatLongFn
9
+ };
@@ -0,0 +1,18 @@
1
+ function c(t) {
2
+ return (l, e) => {
3
+ const u = e?.context ? String(e.context) : "standalone";
4
+ let d;
5
+ if (u === "formatting" && t.formattingValues) {
6
+ const n = t.defaultFormattingWidth || t.defaultWidth, i = e?.width ? String(e.width) : n;
7
+ d = t.formattingValues[i] || t.formattingValues[n];
8
+ } else {
9
+ const n = t.defaultWidth, i = e?.width ? String(e.width) : t.defaultWidth;
10
+ d = t.values[i] || t.values[n];
11
+ }
12
+ const a = t.argumentCallback ? t.argumentCallback(l) : l;
13
+ return d[a];
14
+ };
15
+ }
16
+ export {
17
+ c as buildLocalizeFn
18
+ };
@@ -0,0 +1,31 @@
1
+ function P(t) {
2
+ return (n, e = {}) => {
3
+ const l = e.width, h = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], i = n.match(h);
4
+ if (!i)
5
+ return null;
6
+ const r = i[0], c = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? o(c, (u) => u.test(r)) : (
7
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
8
+ s(c, (u) => u.test(r))
9
+ );
10
+ let a;
11
+ a = t.valueCallback ? t.valueCallback(d) : d, a = e.valueCallback ? (
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
13
+ e.valueCallback(a)
14
+ ) : a;
15
+ const f = n.slice(r.length);
16
+ return { value: a, rest: f };
17
+ };
18
+ }
19
+ function s(t, n) {
20
+ for (const e in t)
21
+ if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
22
+ return e;
23
+ }
24
+ function o(t, n) {
25
+ for (let e = 0; e < t.length; e++)
26
+ if (n(t[e]))
27
+ return e;
28
+ }
29
+ export {
30
+ P as buildMatchFn
31
+ };
@@ -0,0 +1,15 @@
1
+ function h(t) {
2
+ return (e, c = {}) => {
3
+ const n = e.match(t.matchPattern);
4
+ if (!n) return null;
5
+ const u = n[0], a = e.match(t.parsePattern);
6
+ if (!a) return null;
7
+ let l = t.valueCallback ? t.valueCallback(a[0]) : a[0];
8
+ l = c.valueCallback ? c.valueCallback(l) : l;
9
+ const r = e.slice(u.length);
10
+ return { value: l, rest: r };
11
+ };
12
+ }
13
+ export {
14
+ h as buildMatchPatternFn
15
+ };