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
package/dist/components/molecules/image-resize/image-resize.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import t from "../../atoms/base-image/base-image.js";
|
|
3
|
+
import { resizeImageElementToDataUrl as n } from "../../../utilities/helpers.js";
|
|
4
|
+
import r from "../../atoms/base-input/base-input.js";
|
|
5
|
+
import { require_debounce as i } from "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js";
|
|
6
|
+
import { createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, onMounted as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, useTemplateRef as g, vModelText as _, watch as v, withDirectives as y, withModifiers as b } from "vue";
|
|
7
|
+
//#region src/components/molecules/image-resize/image-resize.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var x = /* @__PURE__ */ e(i(), 1), S = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "image-editor position-relative"
|
|
11
|
+
}, C = { class: "row mb-3" }, w = { class: "col" }, T = { class: "row gap-2 mb-4" }, E = { class: "col-12" }, D = { class: "input mb-2" }, O = { class: "col" }, k = { class: "input mb-0" }, A = { class: "col" }, j = { class: "input mb-0" }, M = { class: "row" }, N = { class: "col d-flex justify-content-end gap-2" }, P = ["disabled"], F = /*@__PURE__*/ u({
|
|
12
|
+
__name: "image-resize",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"/>",
|
|
17
|
+
required: !0
|
|
18
|
+
},
|
|
19
|
+
spinner: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
ready: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:modelValue"],
|
|
29
|
+
setup(e, { emit: i }) {
|
|
30
|
+
let u = i, F = g("image"), I = p(1), L = p(0), R = p(0), z = p(null), B = p(0), V = p(0);
|
|
31
|
+
function H() {
|
|
32
|
+
z.value && (u("update:modelValue", z.value), I.value = 1);
|
|
33
|
+
}
|
|
34
|
+
let U = () => {
|
|
35
|
+
if (!B.value || !V.value) return;
|
|
36
|
+
L.value = Math.round(B.value * I.value);
|
|
37
|
+
let e = V.value / B.value;
|
|
38
|
+
R.value = Math.round(L.value * e);
|
|
39
|
+
let t = F.value?.$el;
|
|
40
|
+
if (!t) return;
|
|
41
|
+
let r = t.querySelector("img");
|
|
42
|
+
r && (z.value = n(r, L.value, R.value, "image/png"));
|
|
43
|
+
}, W = (0, x.default)(U, 300);
|
|
44
|
+
return v(I, () => {
|
|
45
|
+
B.value && (L.value = Math.round(B.value * I.value), W());
|
|
46
|
+
}), v(L, () => {
|
|
47
|
+
if (!B.value || L.value === 0) return;
|
|
48
|
+
let e = L.value / B.value;
|
|
49
|
+
Math.abs(e - I.value) > 1e-4 && (I.value = Number(e.toFixed(4)));
|
|
50
|
+
let t = V.value / B.value;
|
|
51
|
+
R.value = Math.round(L.value * t), W();
|
|
52
|
+
}), v(R, () => {
|
|
53
|
+
if (!V.value || R.value === 0) return;
|
|
54
|
+
let e = R.value / V.value;
|
|
55
|
+
Math.abs(e - I.value) > 1e-4 && (I.value = Number(e.toFixed(4)));
|
|
56
|
+
let t = B.value / V.value;
|
|
57
|
+
L.value = Math.round(R.value * t), W();
|
|
58
|
+
}), d(() => {
|
|
59
|
+
let e = F.value?.$el;
|
|
60
|
+
if (!e) return;
|
|
61
|
+
let t = e.querySelector("img");
|
|
62
|
+
if (!t) return;
|
|
63
|
+
let n = () => {
|
|
64
|
+
B.value = t.naturalWidth, V.value = t.naturalHeight, U();
|
|
65
|
+
};
|
|
66
|
+
t.complete ? n() : t.addEventListener("load", n);
|
|
67
|
+
}), (n, i) => e.modelValue ? (f(), s("div", S, [
|
|
68
|
+
c("div", C, [c("div", w, [l(t, {
|
|
69
|
+
ref_key: "image",
|
|
70
|
+
ref: F,
|
|
71
|
+
class: "d-none",
|
|
72
|
+
src: e.modelValue,
|
|
73
|
+
animate: !1
|
|
74
|
+
}, null, 8, ["src"]), z.value ? (f(), a(t, {
|
|
75
|
+
key: 0,
|
|
76
|
+
ref: "targetImage",
|
|
77
|
+
class: "",
|
|
78
|
+
src: z.value,
|
|
79
|
+
animate: !1
|
|
80
|
+
}, null, 8, ["src"])) : o("", !0)])]),
|
|
81
|
+
c("div", T, [
|
|
82
|
+
c("div", E, [c("div", D, [y(c("input", {
|
|
83
|
+
type: "range",
|
|
84
|
+
class: "form-range",
|
|
85
|
+
id: "scaleRange",
|
|
86
|
+
"onUpdate:modelValue": i[0] ||= (e) => I.value = e,
|
|
87
|
+
min: "0",
|
|
88
|
+
max: "2",
|
|
89
|
+
step: "0.0001"
|
|
90
|
+
}, null, 512), [[_, I.value]])])]),
|
|
91
|
+
c("div", O, [c("div", k, [l(r, {
|
|
92
|
+
type: "number",
|
|
93
|
+
class: "form-input mb-0",
|
|
94
|
+
id: "targetWidth",
|
|
95
|
+
modelValue: L.value,
|
|
96
|
+
"onUpdate:modelValue": i[1] ||= (e) => L.value = e
|
|
97
|
+
}, null, 8, ["modelValue"])])]),
|
|
98
|
+
i[3] ||= c("div", { class: "col-auto d-flex align-items-center" }, [c("output", null, "×")], -1),
|
|
99
|
+
c("div", A, [c("div", j, [l(r, {
|
|
100
|
+
type: "number",
|
|
101
|
+
class: "form-input mb-0",
|
|
102
|
+
id: "targetHeight",
|
|
103
|
+
modelValue: R.value,
|
|
104
|
+
"onUpdate:modelValue": i[2] ||= (e) => R.value = e
|
|
105
|
+
}, null, 8, ["modelValue"])])])
|
|
106
|
+
]),
|
|
107
|
+
c("div", M, [c("div", N, [m(n.$slots, "actions"), c("button", {
|
|
108
|
+
class: "btn btn-sm btn-primary",
|
|
109
|
+
disabled: !z.value,
|
|
110
|
+
onClick: b(H, ["prevent", "stop"])
|
|
111
|
+
}, h(n.$t("common.apply")), 9, P)])])
|
|
112
|
+
])) : o("", !0);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
//#endregion
|
|
116
|
+
export { F as default };
|
package/dist/components/molecules/image-upload/image-upload.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import e from "../../atoms/svg-icon/svg-icon.js";
|
|
2
|
+
import t from "../../atoms/base-image/base-image.js";
|
|
3
|
+
import { sanitizeHtml as ee } from "../../../composables/useSanitize.js";
|
|
4
|
+
import { resizeImageFileByMaxWidth as n, srcToFile as r, uniqueId as i } from "../../../utilities/helpers.js";
|
|
5
|
+
import a from "../../atoms/input-file/input-file.js";
|
|
6
|
+
import { useDragAndDrop as o } from "../../../composables/useDragAndDrop.js";
|
|
7
|
+
import { useUploadTransport as s } from "../../../composables/useUploadTransport.js";
|
|
8
|
+
import { useLocalFileUrl as c } from "../../../composables/useLocalFileUrl.js";
|
|
9
|
+
import l from "../image-crop-resize/image-crop-resize.js";
|
|
10
|
+
import u from "../../templates/modal-dialog/modal-dialog.js";
|
|
11
|
+
import { Fragment as d, Transition as f, computed as p, createBlock as te, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as x, openBlock as S, ref as C, renderSlot as w, toDisplayString as T, toRef as E, unref as D, watch as O, withCtx as k, withModifiers as A } from "vue";
|
|
12
|
+
//#region src/components/molecules/image-upload/image-upload.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
+
var ne = { class: "image-upload__controls" }, re = { class: "d-flex gap-1 align-items-center" }, j = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "image-upload__controls"
|
|
16
|
+
}, M = ["for"], N = ["innerHTML"], P = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "image-upload__loading-spinner"
|
|
19
|
+
}, F = /*@__PURE__*/ v({
|
|
20
|
+
__name: "image-upload",
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
src: { type: String },
|
|
27
|
+
name: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: () => i()
|
|
30
|
+
},
|
|
31
|
+
id: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: () => i()
|
|
34
|
+
},
|
|
35
|
+
label: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
placeholder: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
variant: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ""
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
readOnly: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: !1
|
|
54
|
+
},
|
|
55
|
+
required: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !1
|
|
58
|
+
},
|
|
59
|
+
pattern: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: null
|
|
62
|
+
},
|
|
63
|
+
accept: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: "image/*"
|
|
66
|
+
},
|
|
67
|
+
maxFileSize: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 0
|
|
70
|
+
},
|
|
71
|
+
endpoint: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: ""
|
|
74
|
+
},
|
|
75
|
+
toDataUrl: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !0
|
|
78
|
+
},
|
|
79
|
+
authToken: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ""
|
|
82
|
+
},
|
|
83
|
+
customFetch: null,
|
|
84
|
+
baseResponsePath: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "/api/v1/assets"
|
|
87
|
+
},
|
|
88
|
+
enablePreview: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: !0
|
|
91
|
+
},
|
|
92
|
+
previewWidth: {
|
|
93
|
+
type: Number,
|
|
94
|
+
default: 0
|
|
95
|
+
},
|
|
96
|
+
dropFiles: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: !1
|
|
99
|
+
},
|
|
100
|
+
enableReview: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: !0
|
|
103
|
+
},
|
|
104
|
+
maxImageWidth: {
|
|
105
|
+
type: Number,
|
|
106
|
+
default: 4096
|
|
107
|
+
},
|
|
108
|
+
aspectRatio: Number,
|
|
109
|
+
localUrlFormat: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: "dataUrl"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
emits: ["update:modelValue", "update:src"],
|
|
115
|
+
setup(i, { emit: v }) {
|
|
116
|
+
let F = i, I = v, L = C(), R = C([]), z = C(!1), B = C(!1), V = C(null), H = C(null), U = C(null), W = !1, { pending: G, uploadFile: K } = s(F), { toLocalUrl: q, revoke: J } = c(E(F, "localUrlFormat")), { isDragging: Y } = o(L, {
|
|
117
|
+
enabled: () => F.dropFiles,
|
|
118
|
+
onDrop: (e) => {
|
|
119
|
+
R.value = e;
|
|
120
|
+
}
|
|
121
|
+
}), X = p(() => F.modelValue ? F.modelValue : F.src ? {
|
|
122
|
+
type: "",
|
|
123
|
+
src: F.src
|
|
124
|
+
} : V.value);
|
|
125
|
+
function Z(e) {
|
|
126
|
+
J(V.value?.src), V.value = e;
|
|
127
|
+
}
|
|
128
|
+
function Q() {
|
|
129
|
+
Z(null), R.value = [], z.value = !1, I("update:modelValue", void 0), I("update:src", "");
|
|
130
|
+
}
|
|
131
|
+
function $() {
|
|
132
|
+
Q();
|
|
133
|
+
}
|
|
134
|
+
O(() => R.value, async (e) => {
|
|
135
|
+
if (!e || !e.length || !e[0]) return;
|
|
136
|
+
z.value = !1;
|
|
137
|
+
let t = await n(e[0], F.maxImageWidth);
|
|
138
|
+
F.enableReview ? (H.value = {
|
|
139
|
+
src: await q(t),
|
|
140
|
+
type: t.type
|
|
141
|
+
}, W = !0, B.value = !0) : Z({
|
|
142
|
+
src: F.toDataUrl ? await q(t) : await K(t),
|
|
143
|
+
type: t.type
|
|
144
|
+
});
|
|
145
|
+
}), O(() => V.value, (e) => {
|
|
146
|
+
I("update:modelValue", e || void 0), I("update:src", e?.src || "");
|
|
147
|
+
}), O(() => U.value, async (e) => {
|
|
148
|
+
if (e) {
|
|
149
|
+
try {
|
|
150
|
+
Z({
|
|
151
|
+
src: F.toDataUrl ? await q(e) : await K(e),
|
|
152
|
+
type: e.type
|
|
153
|
+
});
|
|
154
|
+
} catch (t) {
|
|
155
|
+
console.error(`Failed to process file "${e.name}"`, t);
|
|
156
|
+
}
|
|
157
|
+
U.value = null;
|
|
158
|
+
}
|
|
159
|
+
}), O(() => B.value, (e, t) => {
|
|
160
|
+
!e && t && H.value && (W && J(H.value.src), W = !1, H.value = null, $());
|
|
161
|
+
}), O(() => F.src, (e) => {
|
|
162
|
+
!e && V.value && $();
|
|
163
|
+
});
|
|
164
|
+
function ie(e, t) {
|
|
165
|
+
W = !1, H.value = {
|
|
166
|
+
src: e,
|
|
167
|
+
type: t
|
|
168
|
+
}, B.value = !0;
|
|
169
|
+
}
|
|
170
|
+
async function ae() {
|
|
171
|
+
H.value && (U.value = await r(H.value.src, "file", H.value.type), W && J(H.value.src)), W = !1, H.value = null, B.value = !1;
|
|
172
|
+
}
|
|
173
|
+
return x(() => {
|
|
174
|
+
J(V.value?.src);
|
|
175
|
+
}), (n, r) => (S(), h("div", {
|
|
176
|
+
ref_key: "root",
|
|
177
|
+
ref: L,
|
|
178
|
+
class: y(["image-upload", {
|
|
179
|
+
"has-dragging": i.dropFiles,
|
|
180
|
+
"is-dragging": D(Y)
|
|
181
|
+
}])
|
|
182
|
+
}, [
|
|
183
|
+
!B.value && X.value ? (S(), h("div", {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: y(["mb-2", i.enablePreview ? "image-upload__thumbnail" : "image-upload__reset"])
|
|
186
|
+
}, [i.enablePreview ? (S(), h(d, { key: 0 }, [_(t, {
|
|
187
|
+
src: `${X.value.src}${i.previewWidth ? `?width=${i.previewWidth}` : ""}`,
|
|
188
|
+
class: "img-thumbnail rounded",
|
|
189
|
+
ready: z.value,
|
|
190
|
+
"onUpdate:ready": r[0] ||= (e) => z.value = e,
|
|
191
|
+
animate: !1,
|
|
192
|
+
style: b({
|
|
193
|
+
maxWidth: i.previewWidth ? `${i.previewWidth}px` : "auto",
|
|
194
|
+
height: "auto"
|
|
195
|
+
})
|
|
196
|
+
}, null, 8, [
|
|
197
|
+
"src",
|
|
198
|
+
"ready",
|
|
199
|
+
"style"
|
|
200
|
+
]), g("div", ne, [g("div", re, [g("button", {
|
|
201
|
+
type: "button",
|
|
202
|
+
onClick: r[1] ||= A((e) => ie(X.value.src, X.value.type), ["prevent", "stop"]),
|
|
203
|
+
class: "btn btn--edit btn-sm btn-light"
|
|
204
|
+
}, [_(e, { symbol: "edit-2" })]), g("button", {
|
|
205
|
+
type: "button",
|
|
206
|
+
onClick: r[2] ||= A((e) => Q(), ["prevent", "stop"]),
|
|
207
|
+
class: "btn btn--close btn-sm btn-light"
|
|
208
|
+
}, [_(e, { symbol: "x" })])])])], 64)) : (S(), h("div", j, [g("button", {
|
|
209
|
+
onClick: r[3] ||= A((e) => Q(), ["prevent", "stop"]),
|
|
210
|
+
class: "btn btn--close btn-outline-contrast"
|
|
211
|
+
}, [_(e, { symbol: "x" })])]))], 2)) : m("", !0),
|
|
212
|
+
_(a, {
|
|
213
|
+
modelValue: R.value,
|
|
214
|
+
"onUpdate:modelValue": r[4] ||= (e) => R.value = e,
|
|
215
|
+
id: i.id,
|
|
216
|
+
name: i.name,
|
|
217
|
+
accept: i.accept,
|
|
218
|
+
"max-file-size": i.maxFileSize,
|
|
219
|
+
class: "d-none"
|
|
220
|
+
}, null, 8, [
|
|
221
|
+
"modelValue",
|
|
222
|
+
"id",
|
|
223
|
+
"name",
|
|
224
|
+
"accept",
|
|
225
|
+
"max-file-size"
|
|
226
|
+
]),
|
|
227
|
+
i.src ? m("", !0) : (S(), h("label", {
|
|
228
|
+
key: 1,
|
|
229
|
+
for: i.id,
|
|
230
|
+
class: "image-upload__label"
|
|
231
|
+
}, [w(n.$slots, "button", {}, () => [g("span", {
|
|
232
|
+
class: "btn btn-outline-contrast",
|
|
233
|
+
innerHTML: D(ee)(i.label || n.$t("common.selectFile"))
|
|
234
|
+
}, null, 8, N)]), _(f, { name: "fade" }, {
|
|
235
|
+
default: k(() => [D(G) ? (S(), h("span", P, [...r[7] ||= [g("span", {
|
|
236
|
+
class: "spinner-border",
|
|
237
|
+
role: "status"
|
|
238
|
+
}, [g("span", { class: "visually-hidden" }, "Loading...")], -1)]])) : m("", !0)]),
|
|
239
|
+
_: 1
|
|
240
|
+
})], 8, M)),
|
|
241
|
+
_(u, {
|
|
242
|
+
modelValue: B.value,
|
|
243
|
+
"onUpdate:modelValue": r[6] ||= (e) => B.value = e,
|
|
244
|
+
footer: !1
|
|
245
|
+
}, {
|
|
246
|
+
default: k(() => [B.value && H.value ? (S(), te(l, {
|
|
247
|
+
key: 0,
|
|
248
|
+
modelValue: H.value.src,
|
|
249
|
+
"onUpdate:modelValue": r[5] ||= (e) => H.value.src = e,
|
|
250
|
+
"aspect-ratio": i.aspectRatio
|
|
251
|
+
}, {
|
|
252
|
+
submit: k(() => [g("button", {
|
|
253
|
+
class: "btn btn-primary",
|
|
254
|
+
onClick: A(ae, ["prevent", "stop"])
|
|
255
|
+
}, T(n.$t("common.save")), 1)]),
|
|
256
|
+
_: 1
|
|
257
|
+
}, 8, ["modelValue", "aspect-ratio"])) : m("", !0)]),
|
|
258
|
+
_: 1
|
|
259
|
+
}, 8, ["modelValue"])
|
|
260
|
+
], 2));
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
//#endregion
|
|
264
|
+
export { F as default };
|
package/dist/components/molecules/image-zoom/image-zoom.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import e from "../../atoms/base-image/base-image.js";
|
|
2
|
+
import t from "../../templates/popover-dialog/popover-dialog.js";
|
|
3
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, nextTick as c, normalizeClass as l, normalizeStyle as u, onMounted as d, openBlock as f, ref as p, renderSlot as m, watch as h, withCtx as g, withModifiers as _ } from "vue";
|
|
4
|
+
//#region src/components/molecules/image-zoom/image-zoom.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var v = ["popovertarget"], y = ["src", "alt"], b = /*@__PURE__*/ s({
|
|
6
|
+
__name: "image-zoom",
|
|
7
|
+
props: {
|
|
8
|
+
src: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: !0
|
|
11
|
+
},
|
|
12
|
+
alt: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
},
|
|
16
|
+
spinner: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
zoom: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 2
|
|
23
|
+
},
|
|
24
|
+
focusWidth: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0
|
|
27
|
+
},
|
|
28
|
+
focusHeight: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0
|
|
31
|
+
},
|
|
32
|
+
hoverDelay: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 150
|
|
35
|
+
},
|
|
36
|
+
closeTimeout: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 0
|
|
39
|
+
},
|
|
40
|
+
popoverId: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: () => `image-zoom-${Math.random().toString(36).substring(2, 9)}`
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
setup(s) {
|
|
46
|
+
let b = s, x = p(null), S = p(null), C = p(null), w = p(!1), T = p(!1), E = p(!1), D = p(!1), O = p(null), k = p(0), A = p(0), j = p(0), M = p(0), N = n(() => Number.isFinite(b.focusWidth) && b.focusWidth > 0 && Number.isFinite(b.focusHeight) && b.focusHeight > 0 && j.value > 0 && M.value > 0 && b.focusWidth <= j.value && b.focusHeight <= M.value), P = n(() => j.value > 0 && M.value > 0 && !N.value), F = n(() => E.value && !T.value && j.value > 0 && M.value > 0), I = n(() => P.value ? {
|
|
47
|
+
width: `${j.value}px`,
|
|
48
|
+
height: `${M.value}px`,
|
|
49
|
+
left: "0px",
|
|
50
|
+
top: "0px"
|
|
51
|
+
} : {
|
|
52
|
+
width: `${b.focusWidth}px`,
|
|
53
|
+
height: `${b.focusHeight}px`,
|
|
54
|
+
left: `${k.value}px`,
|
|
55
|
+
top: `${A.value}px`
|
|
56
|
+
}), L = n(() => {
|
|
57
|
+
let e = j.value * b.zoom, t = M.value * b.zoom;
|
|
58
|
+
return {
|
|
59
|
+
width: `${e}px`,
|
|
60
|
+
height: `${t}px`,
|
|
61
|
+
transform: N.value && !T.value ? `translate(${-k.value * b.zoom}px, ${-A.value * b.zoom}px)` : "none",
|
|
62
|
+
transformOrigin: "top left"
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
function R() {
|
|
66
|
+
if (!S.value) return;
|
|
67
|
+
let e = S.value.getBoundingClientRect();
|
|
68
|
+
j.value = e.width, M.value = e.height;
|
|
69
|
+
}
|
|
70
|
+
function z() {
|
|
71
|
+
O.value &&= (clearTimeout(O.value), null);
|
|
72
|
+
}
|
|
73
|
+
function B() {
|
|
74
|
+
z(), w.value = !0;
|
|
75
|
+
}
|
|
76
|
+
function V() {
|
|
77
|
+
z(), O.value = setTimeout(() => {
|
|
78
|
+
!E.value && !D.value && !T.value && (w.value = !1), O.value = null;
|
|
79
|
+
}, b.hoverDelay || 100);
|
|
80
|
+
}
|
|
81
|
+
function H(e, t) {
|
|
82
|
+
if (!S.value) return;
|
|
83
|
+
if (P.value) {
|
|
84
|
+
k.value = 0, A.value = 0;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
let n = S.value.getBoundingClientRect(), r = e - n.left, i = t - n.top, a = Math.min(Math.max(r - b.focusWidth / 2, 0), Math.max(n.width - b.focusWidth, 0)), o = Math.min(Math.max(i - b.focusHeight / 2, 0), Math.max(n.height - b.focusHeight, 0));
|
|
88
|
+
k.value = a, A.value = o;
|
|
89
|
+
}
|
|
90
|
+
function U() {
|
|
91
|
+
if (!C.value || !T.value || P.value) return;
|
|
92
|
+
let e = C.value.getBoundingClientRect(), t = Math.max(0, k.value * b.zoom - e.width / 2 + b.focusWidth * b.zoom / 2), n = Math.max(0, A.value * b.zoom - e.height / 2 + b.focusHeight * b.zoom / 2);
|
|
93
|
+
C.value.scrollTo({
|
|
94
|
+
left: t,
|
|
95
|
+
top: n
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function W(e) {
|
|
99
|
+
R(), H(e.clientX, e.clientY);
|
|
100
|
+
}
|
|
101
|
+
function G(e) {
|
|
102
|
+
E.value = !0, R(), H(e.clientX, e.clientY), T.value || B();
|
|
103
|
+
}
|
|
104
|
+
function K() {
|
|
105
|
+
E.value = !1, T.value || V();
|
|
106
|
+
}
|
|
107
|
+
function q(e) {
|
|
108
|
+
T.value && (w.value = !0, R(), H(e.clientX, e.clientY));
|
|
109
|
+
}
|
|
110
|
+
function J() {
|
|
111
|
+
T.value && c(U);
|
|
112
|
+
}
|
|
113
|
+
function Y() {
|
|
114
|
+
D.value = !0, B();
|
|
115
|
+
}
|
|
116
|
+
function X() {
|
|
117
|
+
D.value = !1, V();
|
|
118
|
+
}
|
|
119
|
+
function Z(e) {
|
|
120
|
+
T.value && (w.value = !w.value, e instanceof MouseEvent && H(e.clientX, e.clientY));
|
|
121
|
+
}
|
|
122
|
+
return d(() => {
|
|
123
|
+
T.value = "ontouchstart" in window || navigator.maxTouchPoints > 0, R();
|
|
124
|
+
}), h(w, async (e) => {
|
|
125
|
+
e && T.value && (await c(), U());
|
|
126
|
+
}), (n, c) => (f(), i("span", {
|
|
127
|
+
class: "image-zoom",
|
|
128
|
+
popovertarget: s.popoverId,
|
|
129
|
+
ref_key: "wrapper",
|
|
130
|
+
ref: x
|
|
131
|
+
}, [a("div", {
|
|
132
|
+
class: "image-zoom__target",
|
|
133
|
+
ref_key: "target",
|
|
134
|
+
ref: S,
|
|
135
|
+
onPointermove: W,
|
|
136
|
+
onPointerenter: G,
|
|
137
|
+
onPointerleave: K,
|
|
138
|
+
onPointerdown: q,
|
|
139
|
+
onPointerup: J,
|
|
140
|
+
onPointercancel: K,
|
|
141
|
+
onClick: _(Z, ["prevent"])
|
|
142
|
+
}, [m(n.$slots, "image", {
|
|
143
|
+
src: s.src,
|
|
144
|
+
alt: s.alt,
|
|
145
|
+
spinner: s.spinner,
|
|
146
|
+
animate: !1
|
|
147
|
+
}, () => [o(e, {
|
|
148
|
+
class: "image-zoom__image",
|
|
149
|
+
src: s.src,
|
|
150
|
+
alt: s.alt,
|
|
151
|
+
spinner: s.spinner,
|
|
152
|
+
animate: !1
|
|
153
|
+
}, null, 8, [
|
|
154
|
+
"src",
|
|
155
|
+
"alt",
|
|
156
|
+
"spinner"
|
|
157
|
+
])]), F.value ? (f(), i("span", {
|
|
158
|
+
key: 0,
|
|
159
|
+
class: "image-zoom__focus",
|
|
160
|
+
style: u(I.value)
|
|
161
|
+
}, null, 4)) : r("", !0)], 544), o(t, {
|
|
162
|
+
id: s.popoverId,
|
|
163
|
+
modelValue: w.value,
|
|
164
|
+
"onUpdate:modelValue": c[0] ||= (e) => w.value = e,
|
|
165
|
+
hover: !1,
|
|
166
|
+
"hover-delay": s.hoverDelay,
|
|
167
|
+
"close-timeout": s.closeTimeout,
|
|
168
|
+
class: l(["image-zoom__popover", { "image-zoom__popover--full": P.value }]),
|
|
169
|
+
role: "tooltip",
|
|
170
|
+
onMouseenter: Y,
|
|
171
|
+
onMouseleave: X
|
|
172
|
+
}, {
|
|
173
|
+
default: g(() => [a("div", { class: l(["image-zoom__preview-wrapper", { "image-zoom__preview-wrapper--full": P.value }]) }, [a("div", {
|
|
174
|
+
class: l(["image-zoom__preview", { "image-zoom__preview--full": P.value }]),
|
|
175
|
+
ref_key: "preview",
|
|
176
|
+
ref: C
|
|
177
|
+
}, [a("img", {
|
|
178
|
+
class: l(["image-zoom__preview-image", { "image-zoom__preview-image--full": P.value }]),
|
|
179
|
+
src: s.src,
|
|
180
|
+
alt: s.alt,
|
|
181
|
+
style: u(L.value),
|
|
182
|
+
draggable: "false"
|
|
183
|
+
}, null, 14, y)], 2)], 2)]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, [
|
|
186
|
+
"id",
|
|
187
|
+
"modelValue",
|
|
188
|
+
"hover-delay",
|
|
189
|
+
"close-timeout",
|
|
190
|
+
"class"
|
|
191
|
+
])], 8, v));
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
//#endregion
|
|
195
|
+
export { b as default };
|