ablok-components 0.3.104 → 0.3.106
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 +7 -8
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/ablok-components.css +2 -1
- package/dist/ablok-components.umd.js +4 -4
- package/dist/assets/img/guide.js +4 -0
- package/dist/components/atoms/base-button/base-button.js +6 -0
- package/dist/components/atoms/base-button/base-button.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/atoms/base-headline/base-headline.js +5 -0
- package/dist/components/atoms/base-headline/base-headline.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/atoms/base-image/base-image.js +6 -0
- package/dist/components/atoms/base-image/base-image.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/atoms/base-input/base-input.js +6 -0
- package/dist/components/atoms/base-input/base-input.vue_vue_type_script_setup_true_lang.js +196 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.js +5 -0
- package/dist/components/atoms/base-paragraph/base-paragraph.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.js +6 -0
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/atoms/check-group/check-group.js +6 -0
- package/dist/components/atoms/check-group/check-group.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/atoms/custom-html/custom-html.js +5 -0
- package/dist/components/atoms/custom-html/custom-html.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.js +6 -0
- package/dist/components/atoms/input-checkbox/input-checkbox.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/atoms/input-datetime/input-datetime.js +5 -0
- package/dist/components/atoms/input-datetime/input-datetime.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/components/atoms/input-file/input-file.js +5 -0
- package/dist/components/atoms/input-file/input-file.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/components/atoms/input-passcode/input-passcode.js +5 -0
- package/dist/components/atoms/input-passcode/input-passcode.vue_vue_type_script_setup_true_lang.js +158 -0
- package/dist/components/atoms/input-password/input-password.js +5 -0
- package/dist/components/atoms/input-password/input-password.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/atoms/input-textarea/input-textarea.js +5 -0
- package/dist/components/atoms/input-textarea/input-textarea.vue_vue_type_script_setup_true_lang.js +108 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.js +6 -0
- package/dist/components/atoms/loading-spinner/loading-spinner.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/components/atoms/radio-group/radio-group.js +6 -0
- package/dist/components/atoms/radio-group/radio-group.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/atoms/svg-icon/svg-icon.js +6 -0
- package/dist/components/atoms/svg-icon/svg-icon.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.js +6 -0
- package/dist/components/atoms/zoom-slider/zoom-slider.vue_vue_type_script_setup_true_lang.js +57 -0
- package/dist/components/molecules/accordion/accordion-item.js +6 -0
- package/dist/components/molecules/accordion/accordion-item.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/molecules/accordion/accordion.js +10 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.js +6 -0
- package/dist/components/molecules/auto-suggest/auto-suggest.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/molecules/base-camera/base-camera.js +6 -0
- package/dist/components/molecules/base-camera/base-camera.vue_vue_type_script_async_true_setup_true_lang.js +505 -0
- package/dist/components/molecules/base-map/base-map.js +6 -0
- package/dist/components/molecules/base-map/base-map.vue_vue_type_script_setup_true_lang.js +390 -0
- package/dist/components/molecules/bulk-upload/bulk-upload.js +6 -0
- package/dist/components/molecules/bulk-upload/bulk-upload.vue_vue_type_script_setup_true_lang.js +188 -0
- package/dist/components/molecules/color-palette/color-palette.js +6 -0
- package/dist/components/molecules/color-palette/color-palette.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.js +5 -0
- package/dist/components/molecules/dom-renderer/dom-renderer.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/components/molecules/file-upload/file-upload.js +6 -0
- package/dist/components/molecules/file-upload/file-upload.vue_vue_type_script_setup_true_lang.js +196 -0
- package/dist/components/molecules/hint-system/hint-system.js +6 -0
- package/dist/components/molecules/hint-system/hint-system.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/molecules/image-crop/image-crop.js +5 -0
- package/dist/components/molecules/image-crop/image-crop.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.js +5 -0
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/image-resize/image-resize.js +5 -0
- package/dist/components/molecules/image-resize/image-resize.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/molecules/image-upload/image-upload.js +6 -0
- package/dist/components/molecules/image-upload/image-upload.vue_vue_type_script_setup_true_lang.js +264 -0
- package/dist/components/molecules/image-zoom/image-zoom.js +6 -0
- package/dist/components/molecules/image-zoom/image-zoom.vue_vue_type_script_setup_true_lang.js +195 -0
- package/dist/components/molecules/input-color/input-color.js +6 -0
- package/dist/components/molecules/input-color/input-color.vue_vue_type_script_setup_true_lang.js +118 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.js +6 -0
- package/dist/components/molecules/input-datepicker/input-datepicker.vue_vue_type_script_setup_true_lang.js +337 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.js +6 -0
- package/dist/components/molecules/input-dropdown/input-dropdown.vue_vue_type_script_setup_true_lang.js +169 -0
- package/dist/components/molecules/link-sharing/link-sharing.js +6 -0
- package/dist/components/molecules/link-sharing/link-sharing.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/molecules/location-list/location-list.js +6 -0
- package/dist/components/molecules/location-list/location-list.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.js +6 -0
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.js +6 -0
- package/dist/components/molecules/popover-notifications/popover-notifications.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.js +6 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/components/molecules/progress-steps/progress-steps.js +6 -0
- package/dist/components/molecules/progress-steps/progress-steps.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/components/molecules/qr-code/qr-code.js +6 -0
- package/dist/components/molecules/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.js +6 -0
- package/dist/components/molecules/radio-buttons/radio-buttons.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/molecules/rte-editor/rte-editor.js +6 -0
- package/dist/components/molecules/rte-editor/rte-editor.vue_vue_type_script_setup_true_lang.js +384 -0
- package/dist/components/molecules/select-media/select-media.js +6 -0
- package/dist/components/molecules/select-media/select-media.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/molecules/upload-group/upload-group.js +6 -0
- package/dist/components/molecules/upload-group/upload-group.vue_vue_type_script_setup_true_lang.js +184 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.js +5 -0
- package/dist/components/organisms/asset-uploader/asset-uploader.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/organisms/location-finder/location-finder.js +6 -0
- package/dist/components/organisms/location-finder/location-finder.vue_vue_type_script_setup_true_lang.js +609 -0
- package/dist/components/organisms/preset-uploader/preset-uploader.js +6 -0
- package/dist/components/organisms/preset-uploader/preset-uploader.vue_vue_type_script_setup_true_lang.js +592 -0
- package/dist/components/templates/base-carousel/base-carousel.js +6 -0
- package/dist/components/templates/base-carousel/base-carousel.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/templates/base-form/base-form.js +6 -0
- package/dist/components/templates/base-form/base-form.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/templates/modal-dialog/modal-dialog.js +6 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/components/templates/popover-dialog/popover-dialog.js +6 -0
- package/dist/components/templates/popover-dialog/popover-dialog.vue_vue_type_script_setup_true_lang.js +91 -0
- package/dist/components/templates/sortable-list/sortable-list.js +6 -0
- package/dist/components/templates/sortable-list/sortable-list.vue_vue_type_script_setup_true_lang.js +190 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.js +6 -0
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/composables/useCameraFilter.js +60 -55
- package/dist/composables/useConfetti.js +9 -11
- package/dist/composables/useDirections.js +54 -59
- package/dist/composables/useDragAndDrop.js +28 -28
- package/dist/composables/useGeocoding.js +81 -83
- package/dist/composables/useGeolocation.js +61 -70
- package/dist/composables/useLocalFileUrl.js +16 -13
- package/dist/composables/useSanitize.js +81 -21
- package/dist/composables/useUploadTransport.js +28 -27
- package/dist/index.js +60 -161
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +8 -8
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +16 -17
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +19 -28
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +17 -14
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatDistance.js +161 -162
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatLong.js +31 -36
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/localize.js +210 -158
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de/_lib/match.js +113 -111
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/de.js +18 -18
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +68 -69
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +31 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js +200 -153
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js +123 -109
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js +19 -19
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +68 -69
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +31 -32
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +11 -11
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/localize.js +176 -120
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr/_lib/match.js +122 -108
- package/dist/node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/fr.js +18 -18
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -16
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js +13 -14
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -21
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js +10 -11
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js +13 -15
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js +55 -60
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js +11 -12
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js +14 -15
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js +12 -13
- package/dist/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js +24 -28
- package/dist/utilities/helpers.js +55 -70
- package/package.json +12 -11
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/_virtual/debounce.js +0 -7
- package/dist/assets/img/guide.png.js +0 -4
- package/dist/components/atoms/base-button/base-button.vue.js +0 -92
- package/dist/components/atoms/base-button/base-button3.vue.js +0 -5
- package/dist/components/atoms/base-headline/base-headline.vue.js +0 -30
- package/dist/components/atoms/base-headline/base-headline2.vue.js +0 -4
- package/dist/components/atoms/base-image/base-image.vue.js +0 -75
- package/dist/components/atoms/base-image/base-image3.vue.js +0 -5
- package/dist/components/atoms/base-input/base-input.vue.js +0 -184
- package/dist/components/atoms/base-input/base-input3.vue.js +0 -5
- package/dist/components/atoms/base-paragraph/base-paragraph.vue.js +0 -21
- package/dist/components/atoms/base-paragraph/base-paragraph2.vue.js +0 -4
- package/dist/components/atoms/canvas-confetti/canvas-confetti.vue.js +0 -113
- package/dist/components/atoms/canvas-confetti/canvas-confetti3.vue.js +0 -5
- package/dist/components/atoms/check-group/check-group.vue.js +0 -86
- package/dist/components/atoms/check-group/check-group3.vue.js +0 -5
- package/dist/components/atoms/custom-html/custom-html.vue.js +0 -26
- package/dist/components/atoms/custom-html/custom-html2.vue.js +0 -4
- package/dist/components/atoms/input-checkbox/input-checkbox.vue.js +0 -84
- package/dist/components/atoms/input-checkbox/input-checkbox3.vue.js +0 -5
- package/dist/components/atoms/input-datetime/input-datetime.vue.js +0 -99
- package/dist/components/atoms/input-datetime/input-datetime2.vue.js +0 -4
- package/dist/components/atoms/input-file/input-file.vue.js +0 -130
- package/dist/components/atoms/input-file/input-file2.vue.js +0 -4
- package/dist/components/atoms/input-passcode/input-passcode.vue.js +0 -149
- package/dist/components/atoms/input-passcode/input-passcode2.vue.js +0 -4
- package/dist/components/atoms/input-password/input-password.vue.js +0 -118
- package/dist/components/atoms/input-password/input-password2.vue.js +0 -4
- package/dist/components/atoms/input-textarea/input-textarea.vue.js +0 -105
- package/dist/components/atoms/input-textarea/input-textarea2.vue.js +0 -4
- package/dist/components/atoms/loading-spinner/loading-spinner.vue.js +0 -38
- package/dist/components/atoms/loading-spinner/loading-spinner3.vue.js +0 -5
- package/dist/components/atoms/radio-group/radio-group.vue.js +0 -99
- package/dist/components/atoms/radio-group/radio-group3.vue.js +0 -5
- package/dist/components/atoms/svg-icon/svg-icon.vue.js +0 -44
- package/dist/components/atoms/svg-icon/svg-icon3.vue.js +0 -5
- package/dist/components/atoms/zoom-slider/zoom-slider.vue.js +0 -59
- package/dist/components/atoms/zoom-slider/zoom-slider3.vue.js +0 -5
- package/dist/components/molecules/accordion/accordion-item.vue.js +0 -84
- package/dist/components/molecules/accordion/accordion-item3.vue.js +0 -5
- package/dist/components/molecules/accordion/accordion.vue.js +0 -12
- package/dist/components/molecules/auto-suggest/auto-suggest.vue.js +0 -132
- package/dist/components/molecules/auto-suggest/auto-suggest3.vue.js +0 -5
- package/dist/components/molecules/base-camera/base-camera.vue.js +0 -530
- package/dist/components/molecules/base-camera/base-camera3.vue.js +0 -5
- package/dist/components/molecules/base-map/base-map.vue.js +0 -386
- package/dist/components/molecules/base-map/base-map3.vue.js +0 -5
- package/dist/components/molecules/bulk-upload/bulk-upload.vue.js +0 -256
- package/dist/components/molecules/bulk-upload/bulk-upload3.vue.js +0 -5
- package/dist/components/molecules/color-palette/color-palette.vue.js +0 -72
- package/dist/components/molecules/color-palette/color-palette3.vue.js +0 -5
- package/dist/components/molecules/dom-renderer/dom-renderer.vue.js +0 -102
- package/dist/components/molecules/dom-renderer/dom-renderer2.vue.js +0 -4
- package/dist/components/molecules/file-upload/file-upload.vue.js +0 -215
- package/dist/components/molecules/file-upload/file-upload3.vue.js +0 -5
- package/dist/components/molecules/hint-system/hint-system.vue.js +0 -111
- package/dist/components/molecules/hint-system/hint-system3.vue.js +0 -5
- package/dist/components/molecules/image-crop/image-crop.vue.js +0 -82
- package/dist/components/molecules/image-crop/image-crop2.vue.js +0 -4
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue.js +0 -120
- package/dist/components/molecules/image-crop-resize/image-crop-resize2.vue.js +0 -4
- package/dist/components/molecules/image-resize/image-resize.vue.js +0 -143
- package/dist/components/molecules/image-resize/image-resize2.vue.js +0 -4
- package/dist/components/molecules/image-upload/image-upload.vue.js +0 -289
- package/dist/components/molecules/image-upload/image-upload3.vue.js +0 -5
- package/dist/components/molecules/image-zoom/image-zoom.vue.js +0 -209
- package/dist/components/molecules/image-zoom/image-zoom3.vue.js +0 -5
- package/dist/components/molecules/input-color/input-color.vue.js +0 -105
- package/dist/components/molecules/input-color/input-color3.vue.js +0 -5
- package/dist/components/molecules/input-datepicker/input-datepicker.vue.js +0 -291
- package/dist/components/molecules/input-datepicker/input-datepicker3.vue.js +0 -5
- package/dist/components/molecules/input-dropdown/input-dropdown.vue.js +0 -207
- package/dist/components/molecules/input-dropdown/input-dropdown3.vue.js +0 -5
- package/dist/components/molecules/link-sharing/link-sharing.vue.js +0 -177
- package/dist/components/molecules/link-sharing/link-sharing3.vue.js +0 -7
- package/dist/components/molecules/location-list/location-list.vue.js +0 -98
- package/dist/components/molecules/location-list/location-list3.vue.js +0 -5
- package/dist/components/molecules/media-thumbnails/media-thumbnails.vue.js +0 -87
- package/dist/components/molecules/media-thumbnails/media-thumbnails3.vue.js +0 -5
- package/dist/components/molecules/popover-notifications/popover-notifications.vue.js +0 -135
- package/dist/components/molecules/popover-notifications/popover-notifications3.vue.js +0 -5
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue.js +0 -134
- package/dist/components/molecules/popover-tooltip/popover-tooltip3.vue.js +0 -5
- package/dist/components/molecules/progress-steps/progress-steps.vue.js +0 -84
- package/dist/components/molecules/progress-steps/progress-steps3.vue.js +0 -5
- package/dist/components/molecules/qr-code/qr-code.vue.js +0 -103
- package/dist/components/molecules/qr-code/qr-code3.vue.js +0 -5
- package/dist/components/molecules/radio-buttons/radio-buttons.vue.js +0 -79
- package/dist/components/molecules/radio-buttons/radio-buttons3.vue.js +0 -5
- package/dist/components/molecules/rte-editor/rte-editor.vue.js +0 -478
- package/dist/components/molecules/rte-editor/rte-editor3.vue.js +0 -5
- package/dist/components/molecules/select-media/select-media.vue.js +0 -87
- package/dist/components/molecules/select-media/select-media3.vue.js +0 -5
- package/dist/components/molecules/upload-group/upload-group.vue.js +0 -193
- package/dist/components/molecules/upload-group/upload-group3.vue.js +0 -5
- package/dist/components/organisms/asset-uploader/asset-uploader.vue.js +0 -160
- package/dist/components/organisms/asset-uploader/asset-uploader2.vue.js +0 -4
- package/dist/components/organisms/location-finder/location-finder.vue.js +0 -634
- package/dist/components/organisms/location-finder/location-finder3.vue.js +0 -5
- package/dist/components/organisms/preset-uploader/preset-uploader.vue.js +0 -569
- package/dist/components/organisms/preset-uploader/preset-uploader3.vue.js +0 -5
- package/dist/components/templates/base-carousel/base-carousel.vue.js +0 -93
- package/dist/components/templates/base-carousel/base-carousel3.vue.js +0 -5
- package/dist/components/templates/base-form/base-form.vue.js +0 -35
- package/dist/components/templates/base-form/base-form3.vue.js +0 -5
- package/dist/components/templates/modal-dialog/modal-dialog.vue.js +0 -123
- package/dist/components/templates/modal-dialog/modal-dialog3.vue.js +0 -5
- package/dist/components/templates/popover-dialog/popover-dialog.vue.js +0 -95
- package/dist/components/templates/popover-dialog/popover-dialog3.vue.js +0 -5
- package/dist/components/templates/sortable-list/sortable-list.vue.js +0 -204
- package/dist/components/templates/sortable-list/sortable-list3.vue.js +0 -5
- package/dist/components/templates/touch-wrapper/touch-wrapper.vue.js +0 -76
- package/dist/components/templates/touch-wrapper/touch-wrapper3.vue.js +0 -5
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
import e from "../../molecules/auto-suggest/auto-suggest.js";
|
|
2
|
+
import t from "../../molecules/base-map/base-map.js";
|
|
3
|
+
import n from "../../molecules/location-list/location-list.js";
|
|
4
|
+
import { useDirections as r } from "../../../composables/useDirections.js";
|
|
5
|
+
import { useGeocoding as i } from "../../../composables/useGeocoding.js";
|
|
6
|
+
import { useGeolocation as a } from "../../../composables/useGeolocation.js";
|
|
7
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as ee, defineComponent as p, normalizeClass as m, onMounted as te, openBlock as h, ref as g, renderList as ne, toDisplayString as _, unref as v, watch as y } from "vue";
|
|
8
|
+
import { useI18n as re } from "vue-i18n";
|
|
9
|
+
//#region src/components/organisms/location-finder/location-finder.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var ie = {
|
|
11
|
+
class: "location-finder",
|
|
12
|
+
"data-testid": "location-finder"
|
|
13
|
+
}, ae = { class: "location-finder__actions" }, oe = ["disabled"], se = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "location-finder__notice",
|
|
16
|
+
"data-testid": "location-finder-error"
|
|
17
|
+
}, ce = { class: "location-finder__map-panel" }, le = ["aria-label"], ue = { class: "location-finder__legend-item" }, de = { class: "location-finder__legend-item" }, fe = { class: "location-finder__legend-item" }, pe = { class: "location-finder__legend-item" }, me = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "location-finder__sidebar"
|
|
20
|
+
}, he = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "location-finder__summary",
|
|
23
|
+
"data-testid": "location-finder-directions"
|
|
24
|
+
}, ge = { class: "location-finder__summary-title" }, _e = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "location-finder__summary-copy"
|
|
27
|
+
}, ve = { class: "location-finder__summary-grid" }, ye = { class: "location-finder__summary-label" }, be = { "data-testid": "location-finder-distance" }, xe = { class: "location-finder__summary-label" }, Se = { "data-testid": "location-finder-duration" }, Ce = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "location-finder__steps"
|
|
30
|
+
}, we = { key: 0 }, Te = {
|
|
31
|
+
key: 2,
|
|
32
|
+
class: "location-finder__summary-copy"
|
|
33
|
+
}, b = /*@__PURE__*/ p({
|
|
34
|
+
__name: "location-finder",
|
|
35
|
+
props: {
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: Object,
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
locations: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
},
|
|
44
|
+
center: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default: null
|
|
47
|
+
},
|
|
48
|
+
distance: {
|
|
49
|
+
type: Number,
|
|
50
|
+
default: null
|
|
51
|
+
},
|
|
52
|
+
userLocation: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: null
|
|
55
|
+
},
|
|
56
|
+
messages: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default: () => ({})
|
|
59
|
+
},
|
|
60
|
+
mapHeight: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "26rem"
|
|
63
|
+
},
|
|
64
|
+
searchLabel: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: ""
|
|
67
|
+
},
|
|
68
|
+
searchPlaceholder: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: ""
|
|
71
|
+
},
|
|
72
|
+
resultsLabel: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: ""
|
|
75
|
+
},
|
|
76
|
+
emptyText: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: ""
|
|
79
|
+
},
|
|
80
|
+
locateButtonLabel: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: ""
|
|
83
|
+
},
|
|
84
|
+
stopTrackingLabel: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: ""
|
|
87
|
+
},
|
|
88
|
+
mapHelperText: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: ""
|
|
91
|
+
},
|
|
92
|
+
enableGeocoding: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: !1
|
|
95
|
+
},
|
|
96
|
+
geocodingEndpoint: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "https://nominatim.openstreetmap.org/search"
|
|
99
|
+
},
|
|
100
|
+
reverseGeocodingEndpoint: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: "https://nominatim.openstreetmap.org/reverse"
|
|
103
|
+
},
|
|
104
|
+
geocodingLimit: {
|
|
105
|
+
type: Number,
|
|
106
|
+
default: 5
|
|
107
|
+
},
|
|
108
|
+
geocodingMinQueryLength: {
|
|
109
|
+
type: Number,
|
|
110
|
+
default: 3
|
|
111
|
+
},
|
|
112
|
+
customGeocodingFetch: null,
|
|
113
|
+
enableDirections: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: !1
|
|
116
|
+
},
|
|
117
|
+
directionsEndpoint: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: "https://router.project-osrm.org/route/v1"
|
|
120
|
+
},
|
|
121
|
+
routeProfile: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: "driving"
|
|
124
|
+
},
|
|
125
|
+
customDirectionsFetch: null,
|
|
126
|
+
showDirectionsSummary: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: !0
|
|
129
|
+
},
|
|
130
|
+
showDirectionsSteps: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: !0
|
|
133
|
+
},
|
|
134
|
+
directionsTitle: {
|
|
135
|
+
type: String,
|
|
136
|
+
default: ""
|
|
137
|
+
},
|
|
138
|
+
directionsEmptyText: {
|
|
139
|
+
type: String,
|
|
140
|
+
default: ""
|
|
141
|
+
},
|
|
142
|
+
distanceLabel: {
|
|
143
|
+
type: String,
|
|
144
|
+
default: ""
|
|
145
|
+
},
|
|
146
|
+
durationLabel: {
|
|
147
|
+
type: String,
|
|
148
|
+
default: ""
|
|
149
|
+
},
|
|
150
|
+
routeColor: {
|
|
151
|
+
type: String,
|
|
152
|
+
default: "#2563eb"
|
|
153
|
+
},
|
|
154
|
+
routeWeight: {
|
|
155
|
+
type: Number,
|
|
156
|
+
default: 5
|
|
157
|
+
},
|
|
158
|
+
selectionRadius: {
|
|
159
|
+
type: Number,
|
|
160
|
+
default: 0
|
|
161
|
+
},
|
|
162
|
+
selectionRadiusColor: {
|
|
163
|
+
type: String,
|
|
164
|
+
default: "#2563eb"
|
|
165
|
+
},
|
|
166
|
+
selectionRadiusFillColor: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: "#60a5fa"
|
|
169
|
+
},
|
|
170
|
+
mapStyle: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: "streets"
|
|
173
|
+
},
|
|
174
|
+
tileLayerUrl: {
|
|
175
|
+
type: String,
|
|
176
|
+
default: ""
|
|
177
|
+
},
|
|
178
|
+
tileLayerAttribution: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: ""
|
|
181
|
+
},
|
|
182
|
+
disabled: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
default: !1
|
|
185
|
+
},
|
|
186
|
+
interactive: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: !1
|
|
189
|
+
},
|
|
190
|
+
showSearch: {
|
|
191
|
+
type: Boolean,
|
|
192
|
+
default: !0
|
|
193
|
+
},
|
|
194
|
+
showLegend: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: !0
|
|
197
|
+
},
|
|
198
|
+
showSidebar: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
default: !0
|
|
201
|
+
},
|
|
202
|
+
showTrackButton: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
default: !0
|
|
205
|
+
},
|
|
206
|
+
trackUser: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
default: !0
|
|
209
|
+
},
|
|
210
|
+
autoLocate: {
|
|
211
|
+
type: Boolean,
|
|
212
|
+
default: !1
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
emits: [
|
|
216
|
+
"update:modelValue",
|
|
217
|
+
"update:distance",
|
|
218
|
+
"select",
|
|
219
|
+
"search",
|
|
220
|
+
"track-user"
|
|
221
|
+
],
|
|
222
|
+
setup(p, { emit: b }) {
|
|
223
|
+
let x = {
|
|
224
|
+
lat: 48.8566,
|
|
225
|
+
lng: 2.3522
|
|
226
|
+
}, Ee = {
|
|
227
|
+
searchLabel: "Search locations",
|
|
228
|
+
searchPlaceholder: "Search by name or address",
|
|
229
|
+
resultsLabel: "Locations",
|
|
230
|
+
emptyText: "No locations found.",
|
|
231
|
+
locateButtonLabel: "Use my location",
|
|
232
|
+
stopTrackingLabel: "Stop tracking",
|
|
233
|
+
mapHelperText: "Select a location from the list or use the map.",
|
|
234
|
+
directionsTitle: "Directions",
|
|
235
|
+
directionsEmptyText: "Select a destination and share your location to preview a route.",
|
|
236
|
+
distanceLabel: "Distance",
|
|
237
|
+
durationLabel: "ETA",
|
|
238
|
+
loadingRoute: "Loading route…",
|
|
239
|
+
legendAriaLabel: "Map marker types",
|
|
240
|
+
legendLocations: "Locations",
|
|
241
|
+
legendSelected: "Selected",
|
|
242
|
+
legendSearchResult: "Search result",
|
|
243
|
+
userLocationLabel: "Your location",
|
|
244
|
+
pinnedLocationTitle: "Pinned location",
|
|
245
|
+
selectedLocationLabel: "Selected location"
|
|
246
|
+
}, S = p, C = b, { t: De, te: Oe } = re({ useScope: "global" }), w = a(), T = i(), E = r(), D = g(""), O = g(q(G(S.modelValue))), k = g(q(G(S.modelValue)) ? null : G(S.modelValue)), A = g(W(S.modelValue) || W(S.center) || W(S.locations[0]) || x), j = g(!1), M = s(() => W(S.userLocation)), N = s(() => w.position.value || M.value), P = s(() => W(k.value)), F = s(() => W(O.value)), I = s(() => N.value || P.value), ke = s(() => !I.value || !F.value ? null : Ge(I.value, F.value)), L = s(() => W(S.modelValue) || P.value || F.value), R = s(() => w.error.value || T.error.value || E.error.value || ""), Ae = s(() => S.showSearch || S.trackUser && S.showTrackButton), z = s(() => S.enableDirections && S.showDirectionsSummary), B = s(() => S.showSidebar || z.value), je = s(() => Ke(E.distanceMeters.value)), Me = s(() => qe(E.durationSeconds.value)), V = s(() => ({
|
|
247
|
+
searchLabel: U("searchLabel", S.searchLabel),
|
|
248
|
+
searchPlaceholder: U("searchPlaceholder", S.searchPlaceholder),
|
|
249
|
+
resultsLabel: U("resultsLabel", S.resultsLabel),
|
|
250
|
+
emptyText: U("emptyText", S.emptyText),
|
|
251
|
+
locateButtonLabel: U("locateButtonLabel", S.locateButtonLabel),
|
|
252
|
+
stopTrackingLabel: U("stopTrackingLabel", S.stopTrackingLabel),
|
|
253
|
+
mapHelperText: U("mapHelperText", S.mapHelperText),
|
|
254
|
+
directionsTitle: U("directionsTitle", S.directionsTitle),
|
|
255
|
+
directionsEmptyText: U("directionsEmptyText", S.directionsEmptyText),
|
|
256
|
+
distanceLabel: U("distanceLabel", S.distanceLabel),
|
|
257
|
+
durationLabel: U("durationLabel", S.durationLabel),
|
|
258
|
+
loadingRoute: U("loadingRoute"),
|
|
259
|
+
legendAriaLabel: U("legendAriaLabel"),
|
|
260
|
+
legendLocations: U("legendLocations"),
|
|
261
|
+
legendSelected: U("legendSelected"),
|
|
262
|
+
legendSearchResult: U("legendSearchResult"),
|
|
263
|
+
userLocationLabel: U("userLocationLabel"),
|
|
264
|
+
pinnedLocationTitle: U("pinnedLocationTitle"),
|
|
265
|
+
selectedLocationLabel: U("selectedLocationLabel")
|
|
266
|
+
})), Ne = s(() => k.value ? J(k.value) : V.value.selectedLocationLabel), Pe = s(() => w.isTracking.value && j.value ? V.value.stopTrackingLabel : V.value.locateButtonLabel);
|
|
267
|
+
y(() => S.modelValue, (e) => {
|
|
268
|
+
let t = G(e), n = q(t);
|
|
269
|
+
n ? (O.value = n, k.value = null) : t && (k.value = t);
|
|
270
|
+
let r = W(e);
|
|
271
|
+
r && (A.value = r);
|
|
272
|
+
}, { immediate: !0 }), y(() => S.center, (e) => {
|
|
273
|
+
let t = W(e);
|
|
274
|
+
t && (A.value = t);
|
|
275
|
+
}, { deep: !0 }), y(N, (e) => {
|
|
276
|
+
e && j.value && (A.value = e);
|
|
277
|
+
}, { deep: !0 }), y(ke, (e) => {
|
|
278
|
+
C("update:distance", e);
|
|
279
|
+
}, { immediate: !0 }), y(D, async (e) => {
|
|
280
|
+
if (C("search", e), !S.enableGeocoding) {
|
|
281
|
+
T.clearResults();
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
let t = e.trim();
|
|
285
|
+
if (t.length < S.geocodingMinQueryLength) {
|
|
286
|
+
T.clearResults();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
await T.search(t, {
|
|
290
|
+
endpoint: S.geocodingEndpoint,
|
|
291
|
+
customFetch: S.customGeocodingFetch,
|
|
292
|
+
limit: S.geocodingLimit
|
|
293
|
+
});
|
|
294
|
+
}), y(() => ({
|
|
295
|
+
enabled: S.enableDirections,
|
|
296
|
+
origin: N.value,
|
|
297
|
+
destination: L.value,
|
|
298
|
+
profile: S.routeProfile
|
|
299
|
+
}), async ({ enabled: e, origin: t, destination: n, profile: r }) => {
|
|
300
|
+
if (!e || !t || !n || X(t, n)) {
|
|
301
|
+
E.clearRoute();
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
await E.fetchRoute(t, n, {
|
|
305
|
+
endpoint: S.directionsEndpoint,
|
|
306
|
+
profile: r,
|
|
307
|
+
customFetch: S.customDirectionsFetch
|
|
308
|
+
});
|
|
309
|
+
}, {
|
|
310
|
+
immediate: !0,
|
|
311
|
+
deep: !0
|
|
312
|
+
}), te(async () => {
|
|
313
|
+
S.autoLocate && S.trackUser && await $();
|
|
314
|
+
});
|
|
315
|
+
let Fe = s(() => {
|
|
316
|
+
let e = He(D.value).trim();
|
|
317
|
+
return e ? S.locations.filter((t) => [J(t), Ue(t)].filter(Boolean).some((t) => He(t).includes(e))) : S.locations;
|
|
318
|
+
}), Ie = s(() => T.results.value.map((e) => ({
|
|
319
|
+
id: e.id,
|
|
320
|
+
title: e.title,
|
|
321
|
+
address: e.address,
|
|
322
|
+
lat: e.lat,
|
|
323
|
+
lng: e.lng,
|
|
324
|
+
source: e.source
|
|
325
|
+
}))), Le = s(() => {
|
|
326
|
+
if (!D.value.trim()) return S.locations;
|
|
327
|
+
let e = Fe.value;
|
|
328
|
+
return e.length ? e : S.locations;
|
|
329
|
+
}), H = s(() => Le.value), Re = s(() => We(Le.value, S.enableGeocoding ? Ie.value : [])), ze = s(() => Array.from(new Set(Re.value.map((e) => Y(e))))), Be = s(() => H.value.map((e) => {
|
|
330
|
+
let t = W(e);
|
|
331
|
+
return t ? {
|
|
332
|
+
id: K(e),
|
|
333
|
+
label: J(e),
|
|
334
|
+
...t,
|
|
335
|
+
type: F.value && X(t, F.value) ? "selected" : "list"
|
|
336
|
+
} : null;
|
|
337
|
+
}).filter((e) => !!e)), Ve = s(() => j.value && N.value ? N.value : A.value || L.value || N.value || W(H.value[0]) || x);
|
|
338
|
+
function U(e, t) {
|
|
339
|
+
let n = S.messages?.[e];
|
|
340
|
+
if (typeof n == "string" && n.trim()) return n;
|
|
341
|
+
if (typeof t == "string" && t.trim()) return t;
|
|
342
|
+
let r = `locationFinder.${String(e)}`;
|
|
343
|
+
return Oe(r) ? String(De(r)) : Ee[e];
|
|
344
|
+
}
|
|
345
|
+
function W(e) {
|
|
346
|
+
if (!e) return null;
|
|
347
|
+
let t = Number(e.lat), n = Number(e.lng);
|
|
348
|
+
return !Number.isFinite(t) || !Number.isFinite(n) ? null : {
|
|
349
|
+
lat: t,
|
|
350
|
+
lng: n
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
function G(e) {
|
|
354
|
+
if (!e) return null;
|
|
355
|
+
let t = W(e);
|
|
356
|
+
return t ? {
|
|
357
|
+
...e,
|
|
358
|
+
...t
|
|
359
|
+
} : null;
|
|
360
|
+
}
|
|
361
|
+
function K(e) {
|
|
362
|
+
return e ? typeof e == "object" ? e.id ?? e.value ?? Y(e) : e : null;
|
|
363
|
+
}
|
|
364
|
+
function q(e) {
|
|
365
|
+
return e && S.locations.find((t) => K(t) === K(e) || X(W(t), W(e))) || null;
|
|
366
|
+
}
|
|
367
|
+
function He(e) {
|
|
368
|
+
return `${e ?? ""}`.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
369
|
+
}
|
|
370
|
+
function J(e) {
|
|
371
|
+
return `${e.title || e.label || e.name || "Location"}`;
|
|
372
|
+
}
|
|
373
|
+
function Ue(e) {
|
|
374
|
+
return `${e.address || e.description || e.subtitle || ""}`;
|
|
375
|
+
}
|
|
376
|
+
function Y(e) {
|
|
377
|
+
let t = J(e), n = Ue(e);
|
|
378
|
+
return n ? `${t} — ${n}` : t;
|
|
379
|
+
}
|
|
380
|
+
function We(e, t) {
|
|
381
|
+
let n = [...e];
|
|
382
|
+
return t.forEach((e) => {
|
|
383
|
+
n.some((t) => K(t) === K(e) || X(W(t), W(e))) || n.push(e);
|
|
384
|
+
}), n;
|
|
385
|
+
}
|
|
386
|
+
function X(e, t) {
|
|
387
|
+
return !e || !t ? !1 : Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1e-6;
|
|
388
|
+
}
|
|
389
|
+
function Ge(e, t) {
|
|
390
|
+
let n = (e) => Math.PI / 180 * e, r = n(t.lat - e.lat), i = n(t.lng - e.lng), a = n(e.lat), o = n(t.lat), s = Math.sin(r / 2) ** 2 + Math.cos(a) * Math.cos(o) * Math.sin(i / 2) ** 2, c = 2 * Math.atan2(Math.sqrt(s), Math.sqrt(1 - s));
|
|
391
|
+
return Math.round(6371e3 * c);
|
|
392
|
+
}
|
|
393
|
+
function Ke(e) {
|
|
394
|
+
return e === null || !Number.isFinite(e) ? "—" : e >= 1e3 ? `${(e / 1e3).toFixed(1)} km` : `${Math.round(e)} m`;
|
|
395
|
+
}
|
|
396
|
+
function qe(e) {
|
|
397
|
+
if (e === null || !Number.isFinite(e)) return "—";
|
|
398
|
+
let t = Math.max(1, Math.round(e / 60));
|
|
399
|
+
if (t < 60) return `${t} min`;
|
|
400
|
+
let n = Math.floor(t / 60), r = t % 60;
|
|
401
|
+
return r ? `${n} h ${r} min` : `${n} h`;
|
|
402
|
+
}
|
|
403
|
+
function Z(e) {
|
|
404
|
+
let t = G(e), n = q(t);
|
|
405
|
+
if (j.value = !1, !t) {
|
|
406
|
+
C("update:modelValue", null);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
O.value = n || t;
|
|
410
|
+
let r = W(t);
|
|
411
|
+
r && (A.value = r), C("update:modelValue", t), C("select", t);
|
|
412
|
+
}
|
|
413
|
+
function Q(e) {
|
|
414
|
+
let t = G(e), n = q(t);
|
|
415
|
+
if (j.value = !1, !t) {
|
|
416
|
+
C("update:modelValue", null);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
n ? (O.value = n, k.value = null) : k.value = t;
|
|
420
|
+
let r = W(t);
|
|
421
|
+
r && (A.value = r), C("update:modelValue", t), C("select", t);
|
|
422
|
+
}
|
|
423
|
+
function Je(e) {
|
|
424
|
+
let t = Re.value.find((t) => Y(t) === e || J(t) === e);
|
|
425
|
+
if (t) {
|
|
426
|
+
if (q(t)) {
|
|
427
|
+
Z(t), k.value = null;
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
Q(t);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function Ye(e) {
|
|
434
|
+
Z(e);
|
|
435
|
+
}
|
|
436
|
+
function Xe(e) {
|
|
437
|
+
if (e.id === "user-location" && N.value) {
|
|
438
|
+
A.value = N.value, j.value = !0, C("track-user", N.value);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
let t = H.value.find((t) => K(t) === e.id) || H.value.find((t) => {
|
|
442
|
+
let n = W(t);
|
|
443
|
+
return n && Math.abs(n.lat - e.lat) < 1e-6 && Math.abs(n.lng - e.lng) < 1e-6;
|
|
444
|
+
});
|
|
445
|
+
if (t) {
|
|
446
|
+
Z(t);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
k.value && (K(k.value) === e.id || X(W(k.value), {
|
|
450
|
+
lat: e.lat,
|
|
451
|
+
lng: e.lng
|
|
452
|
+
})) && Q(k.value);
|
|
453
|
+
}
|
|
454
|
+
async function Ze(e) {
|
|
455
|
+
if (A.value = e, j.value = !1, !S.interactive) return;
|
|
456
|
+
let t = H.value.find((t) => {
|
|
457
|
+
let n = W(t);
|
|
458
|
+
return n && Math.abs(n.lat - e.lat) < 1e-6 && Math.abs(n.lng - e.lng) < 1e-6;
|
|
459
|
+
});
|
|
460
|
+
if (t) {
|
|
461
|
+
Z(t);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
Q(await Qe(e, V.value.pinnedLocationTitle));
|
|
465
|
+
}
|
|
466
|
+
async function Qe(e, t) {
|
|
467
|
+
if (!S.enableGeocoding) return {
|
|
468
|
+
id: `pin-${e.lat}-${e.lng}`,
|
|
469
|
+
title: t,
|
|
470
|
+
lat: e.lat,
|
|
471
|
+
lng: e.lng
|
|
472
|
+
};
|
|
473
|
+
let n = await T.reverse(e, {
|
|
474
|
+
reverseEndpoint: S.reverseGeocodingEndpoint,
|
|
475
|
+
customFetch: S.customGeocodingFetch
|
|
476
|
+
});
|
|
477
|
+
return n ? {
|
|
478
|
+
id: n.id,
|
|
479
|
+
title: n.title || t,
|
|
480
|
+
address: n.address,
|
|
481
|
+
lat: n.lat,
|
|
482
|
+
lng: n.lng,
|
|
483
|
+
source: n.source
|
|
484
|
+
} : {
|
|
485
|
+
id: `pin-${e.lat}-${e.lng}`,
|
|
486
|
+
title: t,
|
|
487
|
+
lat: e.lat,
|
|
488
|
+
lng: e.lng
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
async function $() {
|
|
492
|
+
if (w.isTracking.value && j.value) {
|
|
493
|
+
w.stopTracking(), j.value = !1;
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
if (N.value) {
|
|
497
|
+
A.value = N.value, j.value = !0, C("track-user", N.value), !w.isTracking.value && !M.value && w.startTracking();
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
let e = await w.locate();
|
|
501
|
+
e && (A.value = e, j.value = !0, C("track-user", e), w.startTracking());
|
|
502
|
+
}
|
|
503
|
+
return (r, i) => (h(), u("div", ie, [
|
|
504
|
+
Ae.value ? (h(), u("div", {
|
|
505
|
+
key: 0,
|
|
506
|
+
class: m(["location-finder__toolbar", { "location-finder__toolbar--actions-only": !S.showSearch }])
|
|
507
|
+
}, [S.showSearch ? (h(), c(e, {
|
|
508
|
+
key: 0,
|
|
509
|
+
modelValue: D.value,
|
|
510
|
+
"onUpdate:modelValue": i[0] ||= (e) => D.value = e,
|
|
511
|
+
class: "location-finder__search",
|
|
512
|
+
label: V.value.searchLabel,
|
|
513
|
+
placeholder: V.value.searchPlaceholder,
|
|
514
|
+
options: ze.value,
|
|
515
|
+
disabled: p.disabled,
|
|
516
|
+
"onUpdate:selection": Je
|
|
517
|
+
}, null, 8, [
|
|
518
|
+
"modelValue",
|
|
519
|
+
"label",
|
|
520
|
+
"placeholder",
|
|
521
|
+
"options",
|
|
522
|
+
"disabled"
|
|
523
|
+
])) : l("", !0), d("div", ae, [p.trackUser && S.showTrackButton ? (h(), u("button", {
|
|
524
|
+
key: 0,
|
|
525
|
+
type: "button",
|
|
526
|
+
class: "btn btn-outline-primary btn-sm location-finder__locate",
|
|
527
|
+
disabled: p.disabled || v(w).pending.value,
|
|
528
|
+
"data-testid": "location-finder-locate",
|
|
529
|
+
onClick: $
|
|
530
|
+
}, _(Pe.value), 9, oe)) : l("", !0)])], 2)) : l("", !0),
|
|
531
|
+
R.value ? (h(), u("p", se, _(R.value), 1)) : l("", !0),
|
|
532
|
+
d("div", { class: m(["location-finder__layout", {
|
|
533
|
+
"location-finder__layout--with-summary": z.value,
|
|
534
|
+
"location-finder__layout--full-width": !B.value
|
|
535
|
+
}]) }, [d("div", ce, [ee(t, {
|
|
536
|
+
class: "location-finder__map",
|
|
537
|
+
center: Ve.value,
|
|
538
|
+
markers: Be.value,
|
|
539
|
+
"model-value": P.value,
|
|
540
|
+
"user-location": N.value,
|
|
541
|
+
"user-location-label": V.value.userLocationLabel,
|
|
542
|
+
"selected-location-label": Ne.value,
|
|
543
|
+
"route-coordinates": v(E).routeCoordinates.value,
|
|
544
|
+
"route-color": p.routeColor,
|
|
545
|
+
"route-weight": p.routeWeight,
|
|
546
|
+
"selection-radius": p.selectionRadius,
|
|
547
|
+
"selection-radius-center": L.value,
|
|
548
|
+
"selection-radius-color": p.selectionRadiusColor,
|
|
549
|
+
"selection-radius-fill-color": p.selectionRadiusFillColor,
|
|
550
|
+
"map-style": p.mapStyle,
|
|
551
|
+
"tile-layer-url": p.tileLayerUrl,
|
|
552
|
+
"tile-layer-attribution": p.tileLayerAttribution,
|
|
553
|
+
height: p.mapHeight,
|
|
554
|
+
interactive: p.interactive,
|
|
555
|
+
disabled: p.disabled,
|
|
556
|
+
"helper-text": V.value.mapHelperText,
|
|
557
|
+
"onUpdate:modelValue": Ze,
|
|
558
|
+
onMarkerClick: Xe
|
|
559
|
+
}, null, 8, [
|
|
560
|
+
"center",
|
|
561
|
+
"markers",
|
|
562
|
+
"model-value",
|
|
563
|
+
"user-location",
|
|
564
|
+
"user-location-label",
|
|
565
|
+
"selected-location-label",
|
|
566
|
+
"route-coordinates",
|
|
567
|
+
"route-color",
|
|
568
|
+
"route-weight",
|
|
569
|
+
"selection-radius",
|
|
570
|
+
"selection-radius-center",
|
|
571
|
+
"selection-radius-color",
|
|
572
|
+
"selection-radius-fill-color",
|
|
573
|
+
"map-style",
|
|
574
|
+
"tile-layer-url",
|
|
575
|
+
"tile-layer-attribution",
|
|
576
|
+
"height",
|
|
577
|
+
"interactive",
|
|
578
|
+
"disabled",
|
|
579
|
+
"helper-text"
|
|
580
|
+
]), S.showLegend ? (h(), u("div", {
|
|
581
|
+
key: 0,
|
|
582
|
+
class: "location-finder__legend",
|
|
583
|
+
"data-testid": "location-finder-legend",
|
|
584
|
+
"aria-label": V.value.legendAriaLabel
|
|
585
|
+
}, [
|
|
586
|
+
d("span", ue, [i[2] ||= d("span", { class: "location-finder__legend-swatch location-finder__legend-swatch--list" }, null, -1), f(" " + _(V.value.legendLocations), 1)]),
|
|
587
|
+
d("span", de, [i[3] ||= d("span", { class: "location-finder__legend-swatch location-finder__legend-swatch--selected" }, null, -1), f(" " + _(V.value.legendSelected), 1)]),
|
|
588
|
+
d("span", fe, [i[4] ||= d("span", { class: "location-finder__legend-swatch location-finder__legend-swatch--search" }, null, -1), f(" " + _(V.value.legendSearchResult), 1)]),
|
|
589
|
+
d("span", pe, [i[5] ||= d("span", { class: "location-finder__legend-swatch location-finder__legend-swatch--user" }, null, -1), f(" " + _(V.value.userLocationLabel), 1)])
|
|
590
|
+
], 8, le)) : l("", !0)]), B.value ? (h(), u("aside", me, [S.showSidebar ? (h(), c(n, {
|
|
591
|
+
key: 0,
|
|
592
|
+
modelValue: O.value,
|
|
593
|
+
"onUpdate:modelValue": i[1] ||= (e) => O.value = e,
|
|
594
|
+
class: "location-finder__results",
|
|
595
|
+
locations: H.value,
|
|
596
|
+
label: V.value.resultsLabel,
|
|
597
|
+
"empty-text": V.value.emptyText,
|
|
598
|
+
onSelect: Ye
|
|
599
|
+
}, null, 8, [
|
|
600
|
+
"modelValue",
|
|
601
|
+
"locations",
|
|
602
|
+
"label",
|
|
603
|
+
"empty-text"
|
|
604
|
+
])) : l("", !0), z.value ? (h(), u("div", he, [d("p", ge, _(V.value.directionsTitle), 1), v(E).pending.value ? (h(), u("p", _e, _(V.value.loadingRoute), 1)) : v(E).hasRoute.value ? (h(), u(o, { key: 1 }, [d("div", ve, [d("div", null, [d("p", ye, _(V.value.distanceLabel), 1), d("strong", be, _(je.value), 1)]), d("div", null, [d("p", xe, _(V.value.durationLabel), 1), d("strong", Se, _(Me.value), 1)])]), p.showDirectionsSteps && v(E).steps.value.length ? (h(), u("ol", Ce, [(h(!0), u(o, null, ne(v(E).steps.value.slice(0, 5), (e, t) => (h(), u("li", { key: `${e.instruction}-${t}` }, [d("span", null, _(e.instruction), 1), e.name ? (h(), u("small", we, _(e.name), 1)) : l("", !0)]))), 128))])) : l("", !0)], 64)) : (h(), u("p", Te, _(V.value.directionsEmptyText), 1))])) : l("", !0)])) : l("", !0)], 2)
|
|
605
|
+
]));
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
//#endregion
|
|
609
|
+
export { b as default };
|