ablok-components 0.3.57 → 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.
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/ablok-components.umd.js +2 -2
- package/dist/assets/img/guide.png.js +4 -0
- package/dist/components/atoms/base-button/base-button.vue.js +92 -0
- package/dist/components/atoms/base-button/base-button.vue3.js +5 -0
- package/dist/components/atoms/base-headline/base-headline.vue.js +30 -0
- package/dist/components/atoms/base-headline/base-headline.vue2.js +4 -0
- package/dist/components/atoms/base-image/base-image.vue.js +75 -0
- package/dist/components/atoms/base-image/base-image.vue3.js +5 -0
- package/dist/components/atoms/base-input/base-input.vue.js +181 -0
- package/dist/components/atoms/base-input/base-input.vue3.js +5 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.vue.js +21 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.vue2.js +4 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue.js +113 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue3.js +5 -0
- package/dist/components/atoms/check-group/check-group.vue.js +86 -0
- package/dist/components/atoms/check-group/check-group.vue3.js +5 -0
- package/dist/components/atoms/custom-html/custom-html.vue.js +26 -0
- package/dist/components/atoms/custom-html/custom-html.vue2.js +4 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.vue.js +84 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.vue3.js +5 -0
- package/dist/components/atoms/input-datetime/input-datetime.vue.js +99 -0
- package/dist/components/atoms/input-datetime/input-datetime.vue2.js +4 -0
- package/dist/components/atoms/input-file/input-file.vue.js +130 -0
- package/dist/components/atoms/input-file/input-file.vue2.js +4 -0
- package/dist/components/atoms/input-passcode/input-passcode.vue.js +149 -0
- package/dist/components/atoms/input-passcode/input-passcode.vue2.js +4 -0
- package/dist/components/atoms/input-password/input-password.vue.js +118 -0
- package/dist/components/atoms/input-password/input-password.vue2.js +4 -0
- package/dist/components/atoms/input-textarea/input-textarea.vue.js +105 -0
- package/dist/components/atoms/input-textarea/input-textarea.vue2.js +4 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.vue.js +38 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.vue3.js +5 -0
- package/dist/components/atoms/radio-group/radio-group.vue.js +99 -0
- package/dist/components/atoms/radio-group/radio-group.vue3.js +5 -0
- package/dist/components/atoms/svg-icon/svg-icon.vue.js +44 -0
- package/dist/components/atoms/svg-icon/svg-icon.vue3.js +5 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.vue.js +59 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.vue3.js +5 -0
- package/dist/components/molecules/accordion/accordion-item.vue.js +76 -0
- package/dist/components/molecules/accordion/accordion-item.vue3.js +5 -0
- package/dist/components/molecules/accordion/accordion.vue.js +12 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.vue.js +132 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.vue3.js +5 -0
- package/dist/components/molecules/base-camera/base-camera.vue.js +392 -0
- package/dist/components/molecules/base-camera/base-camera.vue3.js +5 -0
- package/dist/components/molecules/base-map/base-map.vue.js +386 -0
- package/dist/components/molecules/base-map/base-map.vue3.js +5 -0
- package/dist/components/molecules/color-palette/color-palette.vue.js +72 -0
- package/dist/components/molecules/color-palette/color-palette.vue3.js +5 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.vue.js +102 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.vue2.js +4 -0
- package/dist/components/molecules/file-upload/file-upload.vue.js +177 -0
- package/dist/components/molecules/file-upload/file-upload.vue3.js +5 -0
- package/dist/components/molecules/hint-system/hint-system.vue.d.ts +1 -1
- package/dist/components/molecules/hint-system/hint-system.vue.js +111 -0
- package/dist/components/molecules/hint-system/hint-system.vue3.js +5 -0
- package/dist/components/molecules/image-crop/image-crop.vue.js +82 -0
- package/dist/components/molecules/image-crop/image-crop.vue2.js +4 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue.js +120 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue2.js +4 -0
- package/dist/components/molecules/image-resize/image-resize.vue.js +143 -0
- package/dist/components/molecules/image-resize/image-resize.vue2.js +4 -0
- package/dist/components/molecules/image-upload/image-upload.vue.js +274 -0
- package/dist/components/molecules/image-upload/image-upload.vue3.js +5 -0
- package/dist/components/molecules/image-zoom/image-zoom.vue.js +209 -0
- package/dist/components/molecules/image-zoom/image-zoom.vue3.js +5 -0
- package/dist/components/molecules/input-color/input-color.vue.js +105 -0
- package/dist/components/molecules/input-color/input-color.vue3.js +5 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.vue.js +263 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.vue3.js +5 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.vue.js +207 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.vue3.js +5 -0
- package/dist/components/molecules/link-sharing/link-sharing.vue.js +177 -0
- package/dist/components/molecules/link-sharing/link-sharing.vue3.js +7 -0
- package/dist/components/molecules/location-list/location-list.vue.js +98 -0
- package/dist/components/molecules/location-list/location-list.vue3.js +5 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.js +55 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue3.js +5 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.vue.js +135 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.vue3.js +5 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue.js +134 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue3.js +5 -0
- package/dist/components/molecules/progress-steps/progress-steps.vue.js +84 -0
- package/dist/components/molecules/progress-steps/progress-steps.vue3.js +5 -0
- package/dist/components/molecules/qr-code/qr-code.vue.js +103 -0
- package/dist/components/molecules/qr-code/qr-code.vue3.js +5 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.vue.js +79 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.vue3.js +5 -0
- package/dist/components/molecules/rte-editor/rte-editor.vue.js +455 -0
- package/dist/components/molecules/rte-editor/rte-editor.vue3.js +5 -0
- package/dist/components/molecules/select-media/select-media.vue.js +87 -0
- package/dist/components/molecules/select-media/select-media.vue3.js +5 -0
- package/dist/components/molecules/upload-group/upload-group.vue.js +178 -0
- package/dist/components/molecules/upload-group/upload-group.vue3.js +5 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.vue.js +126 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.vue3.js +5 -0
- package/dist/components/organisms/location-finder/location-finder.vue.js +634 -0
- package/dist/components/organisms/location-finder/location-finder.vue3.js +5 -0
- package/dist/components/templates/base-carousel/base-carousel.vue.js +94 -0
- package/dist/components/templates/base-carousel/base-carousel.vue3.js +5 -0
- package/dist/components/templates/base-form/base-form.vue.js +35 -0
- package/dist/components/templates/base-form/base-form.vue3.js +5 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue.js +123 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue3.js +5 -0
- package/dist/components/templates/popover-dialog/popover-dialog.vue.js +95 -0
- package/dist/components/templates/popover-dialog/popover-dialog.vue3.js +5 -0
- package/dist/components/templates/sortable-list/sortable-list.vue.js +158 -0
- package/dist/components/templates/sortable-list/sortable-list.vue3.js +5 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue.js +85 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue3.js +5 -0
- package/dist/composables/useCameraFilter.js +56 -0
- package/dist/composables/useConfetti.js +12 -0
- package/dist/composables/useDirections.js +62 -0
- package/dist/composables/useFileUpload.js +79 -0
- package/dist/composables/useGeocoding.js +85 -0
- package/dist/composables/useGeolocation.js +71 -0
- package/dist/composables/useSanitize.js +23 -0
- package/dist/i18n.d.ts +3 -0
- package/dist/index.js +156 -0
- package/dist/locales/en.d.ts +3 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatDistance.js +163 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatLong.js +37 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/formatRelative.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/localize.js +161 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de/_lib/match.js +112 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/de.js +20 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/en-US.js +20 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +70 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +33 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/localize.js +121 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr/_lib/match.js +110 -0
- package/dist/node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/fr.js +20 -0
- package/dist/utilities/helpers.js +79 -0
- package/package.json +80 -25
- package/dist/ablok-components.es.js +0 -8654
- package/dist/components/atoms/base-button/base-button.spec.d.ts +0 -1
- package/dist/components/atoms/base-headline/base-headline.spec.d.ts +0 -1
- package/dist/components/atoms/base-image/base-image.spec.d.ts +0 -1
- package/dist/components/atoms/base-input/base-input.spec.d.ts +0 -1
- package/dist/components/atoms/base-paragraph/base-paragraph.spec.d.ts +0 -1
- package/dist/components/atoms/canvas-confetti/canvas-confetti.spec.d.ts +0 -1
- package/dist/components/atoms/check-group/check-group.spec.d.ts +0 -1
- package/dist/components/atoms/custom-html/custom-html.spec.d.ts +0 -1
- package/dist/components/atoms/input-checkbox/input-checkbox.spec.d.ts +0 -1
- package/dist/components/atoms/input-file/input-file.spec.d.ts +0 -1
- package/dist/components/atoms/input-passcode/input-passcode.spec.d.ts +0 -1
- package/dist/components/atoms/input-password/input-password.spec.d.ts +0 -1
- package/dist/components/atoms/input-textarea/input-textarea.spec.d.ts +0 -1
- package/dist/components/atoms/loading-spinner/loading-spinner.spec.d.ts +0 -1
- package/dist/components/atoms/radio-group/radio-group.spec.d.ts +0 -1
- package/dist/components/atoms/svg-icon/svg-icon.spec.d.ts +0 -1
- package/dist/components/atoms/zoom-slider/zoom-slider.spec.d.ts +0 -1
- package/dist/components/molecules/accordion/accordion-item.spec.d.ts +0 -1
- package/dist/components/molecules/auto-suggest/auto-suggest.spec.d.ts +0 -1
- package/dist/components/molecules/base-map/base-map.spec.d.ts +0 -1
- package/dist/components/molecules/color-palette/color-palette.spec.d.ts +0 -1
- package/dist/components/molecules/dom-renderer/dom-renderer.spec.d.ts +0 -1
- package/dist/components/molecules/file-upload/file-upload.spec.d.ts +0 -1
- package/dist/components/molecules/hint-system/hint-system.spec.d.ts +0 -1
- package/dist/components/molecules/image-crop/image-crop.spec.d.ts +0 -1
- package/dist/components/molecules/image-crop-resize/image-crop-resize.spec.d.ts +0 -1
- package/dist/components/molecules/image-resize/image-resize.spec.d.ts +0 -1
- package/dist/components/molecules/image-upload/image-upload.spec.d.ts +0 -1
- package/dist/components/molecules/image-zoom/image-zoom.spec.d.ts +0 -1
- package/dist/components/molecules/input-color/input-color.spec.d.ts +0 -1
- package/dist/components/molecules/input-datepicker/input-datepicker.spec.d.ts +0 -1
- package/dist/components/molecules/input-dropdown/input-dropdown.spec.d.ts +0 -1
- package/dist/components/molecules/link-sharing/link-sharing.spec.d.ts +0 -1
- package/dist/components/molecules/media-thumbnails/media-thumbnails.spec.d.ts +0 -1
- package/dist/components/molecules/popover-notifications/popover-notifications.spec.d.ts +0 -1
- package/dist/components/molecules/popover-tooltip/popover-tooltip.spec.d.ts +0 -1
- package/dist/components/molecules/progress-steps/progress-steps.spec.d.ts +0 -1
- package/dist/components/molecules/qr-code/qr-code.spec.d.ts +0 -1
- package/dist/components/molecules/radio-buttons/radio-buttons.spec.d.ts +0 -1
- package/dist/components/molecules/rte-editor/rte-editor.spec.d.ts +0 -1
- package/dist/components/molecules/select-media/select-media.spec.d.ts +0 -1
- package/dist/components/molecules/upload-group/upload-group.spec.d.ts +0 -1
- package/dist/components/organisms/asset-uploader/asset-uploader.spec.d.ts +0 -1
- package/dist/components/organisms/location-finder/location-finder.spec.d.ts +0 -1
- package/dist/components/templates/base-carousel/base-carousel.spec.d.ts +0 -1
- package/dist/components/templates/base-form/base-form.spec.d.ts +0 -1
- package/dist/components/templates/modal-dialog/modal-dialog.spec.d.ts +0 -1
- package/dist/components/templates/popover-dialog/popover-dialog.spec.d.ts +0 -1
- package/dist/components/templates/sortable-list/sortable-list.spec.d.ts +0 -1
- package/dist/components/templates/touch-wrapper/touch-wrapper.spec.d.ts +0 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { defineComponent as q, shallowRef as G, ref as C, onMounted as H, markRaw as m, watch as S, computed as f, nextTick as J, openBlock as u, createElementBlock as k, renderSlot as K, toDisplayString as w, createCommentVNode as y, createElementVNode as Q, normalizeStyle as X, normalizeClass as ee, createBlock as d, resolveDynamicComponent as p, withCtx as h, Fragment as te, renderList as ae, createTextVNode as U } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
const le = { class: "base-map" }, ne = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "base-map__label"
|
|
6
|
+
}, re = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "base-map__hint"
|
|
9
|
+
}, se = /* @__PURE__ */ q({
|
|
10
|
+
__name: "base-map",
|
|
11
|
+
props: {
|
|
12
|
+
label: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: null
|
|
19
|
+
},
|
|
20
|
+
center: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: () => ({ lat: 48.8566, lng: 2.3522 })
|
|
23
|
+
},
|
|
24
|
+
zoom: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 13
|
|
27
|
+
},
|
|
28
|
+
markers: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: () => []
|
|
31
|
+
},
|
|
32
|
+
routeCoordinates: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default: () => []
|
|
35
|
+
},
|
|
36
|
+
routeColor: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "#2563eb"
|
|
39
|
+
},
|
|
40
|
+
routeWeight: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 5
|
|
43
|
+
},
|
|
44
|
+
selectionRadius: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 0
|
|
47
|
+
},
|
|
48
|
+
selectionRadiusCenter: {
|
|
49
|
+
type: Object,
|
|
50
|
+
default: null
|
|
51
|
+
},
|
|
52
|
+
selectionRadiusColor: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "#2563eb"
|
|
55
|
+
},
|
|
56
|
+
selectionRadiusFillColor: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: "#60a5fa"
|
|
59
|
+
},
|
|
60
|
+
selectionRadiusFillOpacity: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 0.14
|
|
63
|
+
},
|
|
64
|
+
selectionRadiusOpacity: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: 0.65
|
|
67
|
+
},
|
|
68
|
+
selectionRadiusStrokeWeight: {
|
|
69
|
+
type: Number,
|
|
70
|
+
default: 2
|
|
71
|
+
},
|
|
72
|
+
userLocation: {
|
|
73
|
+
type: Object,
|
|
74
|
+
default: null
|
|
75
|
+
},
|
|
76
|
+
userLocationLabel: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: "Your location"
|
|
79
|
+
},
|
|
80
|
+
selectedLocationLabel: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: "Selected location"
|
|
83
|
+
},
|
|
84
|
+
height: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "20rem"
|
|
87
|
+
},
|
|
88
|
+
interactive: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: !1
|
|
91
|
+
},
|
|
92
|
+
disabled: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: !1
|
|
95
|
+
},
|
|
96
|
+
showSelectedMarker: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: !0
|
|
99
|
+
},
|
|
100
|
+
helperText: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: ""
|
|
103
|
+
},
|
|
104
|
+
mapStyle: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: "streets"
|
|
107
|
+
},
|
|
108
|
+
tileLayerUrl: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: ""
|
|
111
|
+
},
|
|
112
|
+
tileLayerAttribution: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: ""
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
emits: ["update:modelValue", "update:center", "update:zoom", "map-click", "marker-click"],
|
|
118
|
+
setup(n, { emit: $ }) {
|
|
119
|
+
function v(e, t) {
|
|
120
|
+
return t({
|
|
121
|
+
className: "base-map__marker-wrapper",
|
|
122
|
+
html: `<span class="base-map__marker-pin base-map__marker-pin--${e}"><span class="base-map__marker-core"></span></span>`,
|
|
123
|
+
iconSize: [24, 24],
|
|
124
|
+
iconAnchor: [12, 24],
|
|
125
|
+
popupAnchor: [0, -20]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
const N = {
|
|
129
|
+
lat: 48.8566,
|
|
130
|
+
lng: 2.3522
|
|
131
|
+
}, x = {
|
|
132
|
+
streets: {
|
|
133
|
+
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
134
|
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
135
|
+
},
|
|
136
|
+
light: {
|
|
137
|
+
url: "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",
|
|
138
|
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
|
|
139
|
+
},
|
|
140
|
+
dark: {
|
|
141
|
+
url: "https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",
|
|
142
|
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
|
|
143
|
+
},
|
|
144
|
+
minimal: {
|
|
145
|
+
url: "https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png",
|
|
146
|
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
|
|
147
|
+
},
|
|
148
|
+
popover: {
|
|
149
|
+
url: "https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}{r}.png",
|
|
150
|
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
|
|
151
|
+
}
|
|
152
|
+
}, a = n, c = $, s = G(null), L = C(null), M = C(null), z = C(a.zoom), r = C(o(a.modelValue));
|
|
153
|
+
H(async () => {
|
|
154
|
+
if (typeof window > "u")
|
|
155
|
+
return;
|
|
156
|
+
const [e, t] = await Promise.all([
|
|
157
|
+
import("@vue-leaflet/vue-leaflet"),
|
|
158
|
+
import("leaflet")
|
|
159
|
+
]), l = e.default ?? e, i = t.default ?? t;
|
|
160
|
+
s.value = m({
|
|
161
|
+
LCircle: m(l.LCircle),
|
|
162
|
+
LMap: m(l.LMap),
|
|
163
|
+
LMarker: m(l.LMarker),
|
|
164
|
+
LPopup: m(l.LPopup),
|
|
165
|
+
LPolyline: m(l.LPolyline),
|
|
166
|
+
LTileLayer: m(l.LTileLayer)
|
|
167
|
+
}), L.value = {
|
|
168
|
+
list: v("list", i.divIcon),
|
|
169
|
+
selected: v("selected", i.divIcon),
|
|
170
|
+
search: v("search", i.divIcon),
|
|
171
|
+
user: v("user", i.divIcon)
|
|
172
|
+
};
|
|
173
|
+
}), S(() => a.zoom, (e) => {
|
|
174
|
+
z.value = e;
|
|
175
|
+
}), S(() => a.modelValue, (e) => {
|
|
176
|
+
r.value = o(e);
|
|
177
|
+
}), S(() => a.center, (e) => {
|
|
178
|
+
const t = o(e);
|
|
179
|
+
t && g(t);
|
|
180
|
+
}, { deep: !0 }), S(
|
|
181
|
+
() => [
|
|
182
|
+
a.height,
|
|
183
|
+
a.markers.length,
|
|
184
|
+
a.routeCoordinates.length,
|
|
185
|
+
a.center?.lat,
|
|
186
|
+
a.center?.lng,
|
|
187
|
+
a.modelValue?.lat,
|
|
188
|
+
a.modelValue?.lng,
|
|
189
|
+
a.userLocation?.lat,
|
|
190
|
+
a.userLocation?.lng
|
|
191
|
+
],
|
|
192
|
+
() => {
|
|
193
|
+
V();
|
|
194
|
+
},
|
|
195
|
+
{ flush: "post" }
|
|
196
|
+
);
|
|
197
|
+
const b = f(() => o(a.userLocation)), R = f(() => o(a.selectionRadiusCenter) || r.value), B = f(() => {
|
|
198
|
+
const e = (a.markers || []).map((t) => {
|
|
199
|
+
const l = o(t);
|
|
200
|
+
return l ? {
|
|
201
|
+
...t,
|
|
202
|
+
...l,
|
|
203
|
+
type: t.type || (r.value && P(t, r.value) ? "selected" : "list")
|
|
204
|
+
} : null;
|
|
205
|
+
}).filter((t) => !!t);
|
|
206
|
+
return a.showSelectedMarker && r.value && !e.some((t) => P(t, r.value)) && e.push({
|
|
207
|
+
id: "selected-location",
|
|
208
|
+
label: a.selectedLocationLabel,
|
|
209
|
+
type: "search",
|
|
210
|
+
...r.value
|
|
211
|
+
}), e;
|
|
212
|
+
}), T = f(() => (a.routeCoordinates || []).map((e) => W(e)).filter((e) => !!e)), E = f(() => {
|
|
213
|
+
const e = o(a.center) || r.value || o(a.markers[0]) || N;
|
|
214
|
+
return [e.lat, e.lng];
|
|
215
|
+
}), I = f(() => {
|
|
216
|
+
if (a.tileLayerUrl.trim())
|
|
217
|
+
return a.tileLayerUrl;
|
|
218
|
+
const e = a.mapStyle === "custom" ? "streets" : a.mapStyle;
|
|
219
|
+
return x[e].url;
|
|
220
|
+
}), j = f(() => {
|
|
221
|
+
if (a.tileLayerAttribution.trim())
|
|
222
|
+
return a.tileLayerAttribution;
|
|
223
|
+
const e = a.mapStyle === "custom" ? "streets" : a.mapStyle;
|
|
224
|
+
return x[e].attribution;
|
|
225
|
+
});
|
|
226
|
+
function O(e = "list") {
|
|
227
|
+
if (L.value)
|
|
228
|
+
return L.value[e] || L.value.list;
|
|
229
|
+
}
|
|
230
|
+
function A(e = "list") {
|
|
231
|
+
switch (e) {
|
|
232
|
+
case "user":
|
|
233
|
+
return 450;
|
|
234
|
+
case "selected":
|
|
235
|
+
return 350;
|
|
236
|
+
case "search":
|
|
237
|
+
return 250;
|
|
238
|
+
default:
|
|
239
|
+
return 150;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function o(e) {
|
|
243
|
+
if (!e)
|
|
244
|
+
return null;
|
|
245
|
+
const t = Number(e.lat), l = Number(e.lng);
|
|
246
|
+
return Number.isNaN(t) || Number.isNaN(l) ? null : { lat: t, lng: l };
|
|
247
|
+
}
|
|
248
|
+
function W(e) {
|
|
249
|
+
if (Array.isArray(e)) {
|
|
250
|
+
const l = Number(e[0]), i = Number(e[1]);
|
|
251
|
+
return Number.isFinite(l) && Number.isFinite(i) ? [l, i] : null;
|
|
252
|
+
}
|
|
253
|
+
const t = o(e);
|
|
254
|
+
return t ? [t.lat, t.lng] : null;
|
|
255
|
+
}
|
|
256
|
+
function P(e, t) {
|
|
257
|
+
const l = o(e), i = o(t);
|
|
258
|
+
return !l || !i ? !1 : Math.abs(l.lat - i.lat) < 1e-6 && Math.abs(l.lng - i.lng) < 1e-6;
|
|
259
|
+
}
|
|
260
|
+
async function V() {
|
|
261
|
+
await J(), M.value?.invalidateSize();
|
|
262
|
+
}
|
|
263
|
+
function g(e) {
|
|
264
|
+
M.value?.panTo([e.lat, e.lng]);
|
|
265
|
+
}
|
|
266
|
+
function D(e) {
|
|
267
|
+
M.value = e, g(o(a.center) || r.value || N), V();
|
|
268
|
+
}
|
|
269
|
+
function Z(e) {
|
|
270
|
+
z.value = e, c("update:zoom", e);
|
|
271
|
+
}
|
|
272
|
+
function Y(e) {
|
|
273
|
+
const t = o(e);
|
|
274
|
+
t && (g(t), c("update:center", t));
|
|
275
|
+
}
|
|
276
|
+
function _(e) {
|
|
277
|
+
if (!a.interactive || a.disabled)
|
|
278
|
+
return;
|
|
279
|
+
const t = {
|
|
280
|
+
lat: Number(e.latlng.lat.toFixed(6)),
|
|
281
|
+
lng: Number(e.latlng.lng.toFixed(6))
|
|
282
|
+
};
|
|
283
|
+
r.value = t, g(t), c("update:modelValue", t), c("update:center", t), c("map-click", t);
|
|
284
|
+
}
|
|
285
|
+
function F(e) {
|
|
286
|
+
r.value = {
|
|
287
|
+
lat: Number(e.lat),
|
|
288
|
+
lng: Number(e.lng)
|
|
289
|
+
}, g(r.value), c("update:modelValue", r.value), c("update:center", r.value), c("marker-click", e);
|
|
290
|
+
}
|
|
291
|
+
return (e, t) => (u(), k("div", le, [
|
|
292
|
+
K(e.$slots, "label", {}, () => [
|
|
293
|
+
n.label ? (u(), k("label", ne, w(n.label), 1)) : y("", !0)
|
|
294
|
+
]),
|
|
295
|
+
Q("div", {
|
|
296
|
+
class: ee(["base-map__frame", {
|
|
297
|
+
"base-map__frame--interactive": n.interactive && !n.disabled,
|
|
298
|
+
"base-map__frame--disabled": n.disabled
|
|
299
|
+
}]),
|
|
300
|
+
style: X({ height: n.height }),
|
|
301
|
+
"data-testid": "base-map"
|
|
302
|
+
}, [
|
|
303
|
+
s.value ? (u(), d(p(s.value?.LMap), {
|
|
304
|
+
key: 0,
|
|
305
|
+
class: "base-map__canvas",
|
|
306
|
+
"use-global-leaflet": !1,
|
|
307
|
+
zoom: z.value,
|
|
308
|
+
center: E.value,
|
|
309
|
+
onReady: D,
|
|
310
|
+
onClick: _,
|
|
311
|
+
"onUpdate:zoom": Z,
|
|
312
|
+
"onUpdate:center": Y
|
|
313
|
+
}, {
|
|
314
|
+
default: h(() => [
|
|
315
|
+
(u(), d(p(s.value.LTileLayer), {
|
|
316
|
+
url: I.value,
|
|
317
|
+
attribution: j.value,
|
|
318
|
+
"layer-type": "base",
|
|
319
|
+
name: "OpenStreetMap"
|
|
320
|
+
}, null, 8, ["url", "attribution"])),
|
|
321
|
+
T.value.length > 1 ? (u(), d(p(s.value.LPolyline), {
|
|
322
|
+
key: 0,
|
|
323
|
+
"lat-lngs": T.value,
|
|
324
|
+
color: n.routeColor,
|
|
325
|
+
weight: n.routeWeight
|
|
326
|
+
}, null, 8, ["lat-lngs", "color", "weight"])) : y("", !0),
|
|
327
|
+
R.value && n.selectionRadius > 0 ? (u(), d(p(s.value.LCircle), {
|
|
328
|
+
key: 1,
|
|
329
|
+
"lat-lng": [R.value.lat, R.value.lng],
|
|
330
|
+
radius: n.selectionRadius,
|
|
331
|
+
color: n.selectionRadiusColor,
|
|
332
|
+
"fill-color": n.selectionRadiusFillColor,
|
|
333
|
+
"fill-opacity": n.selectionRadiusFillOpacity,
|
|
334
|
+
opacity: n.selectionRadiusOpacity,
|
|
335
|
+
weight: n.selectionRadiusStrokeWeight
|
|
336
|
+
}, null, 8, ["lat-lng", "radius", "color", "fill-color", "fill-opacity", "opacity", "weight"])) : y("", !0),
|
|
337
|
+
(u(!0), k(te, null, ae(B.value, (l, i) => (u(), d(p(s.value.LMarker), {
|
|
338
|
+
key: l.id ?? `${l.lat}-${l.lng}-${i}`,
|
|
339
|
+
"lat-lng": [l.lat, l.lng],
|
|
340
|
+
icon: O(l.type),
|
|
341
|
+
"z-index-offset": A(l.type),
|
|
342
|
+
onClick: (oe) => F(l)
|
|
343
|
+
}, {
|
|
344
|
+
default: h(() => [
|
|
345
|
+
l.label ? (u(), d(p(s.value.LPopup), { key: 0 }, {
|
|
346
|
+
default: h(() => [
|
|
347
|
+
U(w(l.label), 1)
|
|
348
|
+
]),
|
|
349
|
+
_: 2
|
|
350
|
+
}, 1024)) : y("", !0)
|
|
351
|
+
]),
|
|
352
|
+
_: 2
|
|
353
|
+
}, 1032, ["lat-lng", "icon", "z-index-offset", "onClick"]))), 128)),
|
|
354
|
+
b.value ? (u(), d(p(s.value.LMarker), {
|
|
355
|
+
key: `user-${b.value.lat}-${b.value.lng}`,
|
|
356
|
+
"lat-lng": [b.value.lat, b.value.lng],
|
|
357
|
+
icon: O("user"),
|
|
358
|
+
"z-index-offset": A("user"),
|
|
359
|
+
onClick: t[0] || (t[0] = (l) => F({
|
|
360
|
+
id: "user-location",
|
|
361
|
+
label: n.userLocationLabel,
|
|
362
|
+
type: "user",
|
|
363
|
+
...b.value
|
|
364
|
+
}))
|
|
365
|
+
}, {
|
|
366
|
+
default: h(() => [
|
|
367
|
+
(u(), d(p(s.value.LPopup), null, {
|
|
368
|
+
default: h(() => [
|
|
369
|
+
U(w(n.userLocationLabel), 1)
|
|
370
|
+
]),
|
|
371
|
+
_: 1
|
|
372
|
+
}))
|
|
373
|
+
]),
|
|
374
|
+
_: 1
|
|
375
|
+
}, 8, ["lat-lng", "icon", "z-index-offset"])) : y("", !0)
|
|
376
|
+
]),
|
|
377
|
+
_: 1
|
|
378
|
+
}, 40, ["zoom", "center"])) : y("", !0)
|
|
379
|
+
], 6),
|
|
380
|
+
n.interactive && n.helperText ? (u(), k("p", re, w(n.helperText), 1)) : y("", !0)
|
|
381
|
+
]));
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
export {
|
|
385
|
+
se as default
|
|
386
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as u, computed as m, openBlock as s, createElementBlock as c, createVNode as f, withCtx as p, createElementVNode as b, normalizeStyle as y } from "vue";
|
|
2
|
+
import { uniqueId as d } from "../../../utilities/helpers.js";
|
|
3
|
+
import V from "../../atoms/radio-group/radio-group.vue.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const g = { class: "color-palette" }, x = ["for"], B = /* @__PURE__ */ u({
|
|
6
|
+
__name: "color-palette",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: [String],
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
colors: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: ["#000000", "#FFFFFF"]
|
|
15
|
+
},
|
|
16
|
+
name: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: () => d()
|
|
19
|
+
},
|
|
20
|
+
id: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: () => d()
|
|
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
|
+
},
|
|
36
|
+
emits: ["update:modelValue"],
|
|
37
|
+
setup(e, { emit: i }) {
|
|
38
|
+
const n = e, r = i, t = m({
|
|
39
|
+
get() {
|
|
40
|
+
return n.modelValue;
|
|
41
|
+
},
|
|
42
|
+
set(o) {
|
|
43
|
+
r("update:modelValue", o);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return (o, a) => (s(), c("div", g, [
|
|
47
|
+
f(V, {
|
|
48
|
+
modelValue: t.value,
|
|
49
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => t.value = l),
|
|
50
|
+
options: e.colors,
|
|
51
|
+
name: e.name,
|
|
52
|
+
id: e.id,
|
|
53
|
+
label: e.label,
|
|
54
|
+
disabled: e.disabled,
|
|
55
|
+
required: e.required,
|
|
56
|
+
class: "d-flex flex-wrap flex-row gap-2"
|
|
57
|
+
}, {
|
|
58
|
+
"option-label": p((l) => [
|
|
59
|
+
b("label", {
|
|
60
|
+
for: `${e.id}-${l.index}`,
|
|
61
|
+
class: "d-block rounded-circle",
|
|
62
|
+
style: y({ backgroundColor: l.option })
|
|
63
|
+
}, null, 12, x)
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 8, ["modelValue", "options", "name", "id", "label", "disabled", "required"])
|
|
67
|
+
]));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
B as default
|
|
72
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineComponent as v, ref as l, onMounted as y, onBeforeUnmount as b, openBlock as h, createElementBlock as C, normalizeStyle as B, normalizeClass as w, renderSlot as x } from "vue";
|
|
2
|
+
import { debounce as P } from "lodash";
|
|
3
|
+
import R from "html2canvas";
|
|
4
|
+
const M = /* @__PURE__ */ v({
|
|
5
|
+
__name: "dom-renderer",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
fixedWidth: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 0
|
|
14
|
+
},
|
|
15
|
+
renderUpdates: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
},
|
|
19
|
+
exportToSvg: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
options: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: () => ({})
|
|
26
|
+
},
|
|
27
|
+
pending: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
emitPending: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
debug: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:modelValue", "update:pending"],
|
|
41
|
+
setup(o, { emit: c }) {
|
|
42
|
+
const e = o, n = c, r = l(), m = l(""), i = l(), d = l(!0);
|
|
43
|
+
async function p() {
|
|
44
|
+
if (!r.value || !d.value)
|
|
45
|
+
return "";
|
|
46
|
+
const t = r.value;
|
|
47
|
+
if (!t.isConnected)
|
|
48
|
+
return "";
|
|
49
|
+
try {
|
|
50
|
+
e.emitPending && n("update:pending", !0);
|
|
51
|
+
const a = t.firstElementChild;
|
|
52
|
+
if (!a)
|
|
53
|
+
return "";
|
|
54
|
+
const g = await R(a, {
|
|
55
|
+
backgroundColor: "rgba(0, 0, 0, 0)",
|
|
56
|
+
scale: 1,
|
|
57
|
+
...e.options
|
|
58
|
+
});
|
|
59
|
+
if (!d.value || !r.value || !t.isConnected)
|
|
60
|
+
return "";
|
|
61
|
+
const s = g.toDataURL();
|
|
62
|
+
if (n("update:modelValue", s), e.emitPending && n("update:pending", !1), e.debug) {
|
|
63
|
+
const f = new Image();
|
|
64
|
+
f.src = s, document.body.appendChild(f);
|
|
65
|
+
}
|
|
66
|
+
return s;
|
|
67
|
+
} catch (a) {
|
|
68
|
+
return d.value && e.emitPending && n("update:pending", !1), console.warn("dom-renderer: Render failed", a), "";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const u = P(async () => {
|
|
72
|
+
m.value = await p();
|
|
73
|
+
}, 300, { trailing: !0, leading: !1 });
|
|
74
|
+
return y(() => {
|
|
75
|
+
const t = r.value;
|
|
76
|
+
e.renderUpdates && (i.value = new MutationObserver(async (a) => {
|
|
77
|
+
!d.value || !t.isConnected || (e.emitPending && n("update:pending", !0), u());
|
|
78
|
+
}), i.value.observe(t, {
|
|
79
|
+
attributes: !0,
|
|
80
|
+
childList: !0,
|
|
81
|
+
characterData: !0,
|
|
82
|
+
subtree: !0
|
|
83
|
+
})), setTimeout(() => {
|
|
84
|
+
e.emitPending && n("update:pending", !0), u();
|
|
85
|
+
}, 500);
|
|
86
|
+
}), b(() => {
|
|
87
|
+
d.value = !1, i.value && i.value.disconnect(), u.cancel();
|
|
88
|
+
}), (t, a) => (h(), C("div", {
|
|
89
|
+
class: w(["dom-renderer", {
|
|
90
|
+
"off-screen": !o.debug
|
|
91
|
+
}]),
|
|
92
|
+
ref_key: "renderer",
|
|
93
|
+
ref: r,
|
|
94
|
+
style: B(o.fixedWidth > 0 ? { width: `${o.fixedWidth}px` } : {})
|
|
95
|
+
}, [
|
|
96
|
+
x(t.$slots, "default")
|
|
97
|
+
], 6));
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
M as default
|
|
102
|
+
};
|