ablok-components 0.3.105 → 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 +3 -2
- 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 -306
- 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/dom-renderer/dom-renderer.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_debounce as t } from "../../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js";
|
|
3
|
+
import { createElementBlock as n, defineComponent as r, normalizeClass as i, normalizeStyle as a, onBeforeUnmount as o, onMounted as s, openBlock as c, ref as l, renderSlot as u } from "vue";
|
|
4
|
+
import d from "html2canvas";
|
|
5
|
+
//#region src/components/molecules/dom-renderer/dom-renderer.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var f = /* @__PURE__ */ e(t(), 1), p = /*@__PURE__*/ r({
|
|
7
|
+
__name: "dom-renderer",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
fixedWidth: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
renderUpdates: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
exportToSvg: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
options: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: () => ({})
|
|
28
|
+
},
|
|
29
|
+
pending: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
emitPending: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
debug: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: ["update:modelValue", "update:pending"],
|
|
43
|
+
setup(e, { emit: t }) {
|
|
44
|
+
let r = e, p = t, m = l(), h = l(""), g = l(), _ = l(!0);
|
|
45
|
+
async function v() {
|
|
46
|
+
if (!m.value || !_.value) return "";
|
|
47
|
+
let e = m.value;
|
|
48
|
+
if (!e.isConnected) return "";
|
|
49
|
+
try {
|
|
50
|
+
r.emitPending && p("update:pending", !0);
|
|
51
|
+
let t = e.firstElementChild;
|
|
52
|
+
if (!t) return "";
|
|
53
|
+
let n = await d(t, {
|
|
54
|
+
backgroundColor: "rgba(0, 0, 0, 0)",
|
|
55
|
+
scale: 1,
|
|
56
|
+
...r.options
|
|
57
|
+
});
|
|
58
|
+
if (!_.value || !m.value || !e.isConnected) return "";
|
|
59
|
+
let i = n.toDataURL();
|
|
60
|
+
if (p("update:modelValue", i), r.emitPending && p("update:pending", !1), r.debug) {
|
|
61
|
+
let e = new Image();
|
|
62
|
+
e.src = i, document.body.appendChild(e);
|
|
63
|
+
}
|
|
64
|
+
return i;
|
|
65
|
+
} catch (e) {
|
|
66
|
+
return _.value && r.emitPending && p("update:pending", !1), console.warn("dom-renderer: Render failed", e), "";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
let y = (0, f.default)(async () => {
|
|
70
|
+
h.value = await v();
|
|
71
|
+
}, 300, {
|
|
72
|
+
trailing: !0,
|
|
73
|
+
leading: !1
|
|
74
|
+
});
|
|
75
|
+
return s(() => {
|
|
76
|
+
let e = m.value;
|
|
77
|
+
r.renderUpdates && (g.value = new MutationObserver(async (t) => {
|
|
78
|
+
!_.value || !e.isConnected || (r.emitPending && p("update:pending", !0), y());
|
|
79
|
+
}), g.value.observe(e, {
|
|
80
|
+
attributes: !0,
|
|
81
|
+
childList: !0,
|
|
82
|
+
characterData: !0,
|
|
83
|
+
subtree: !0
|
|
84
|
+
})), setTimeout(() => {
|
|
85
|
+
r.emitPending && p("update:pending", !0), y();
|
|
86
|
+
}, 500);
|
|
87
|
+
}), o(() => {
|
|
88
|
+
_.value = !1, g.value && g.value.disconnect(), y.cancel();
|
|
89
|
+
}), (t, r) => (c(), n("div", {
|
|
90
|
+
class: i(["dom-renderer", { "off-screen": !e.debug }]),
|
|
91
|
+
ref_key: "renderer",
|
|
92
|
+
ref: m,
|
|
93
|
+
style: a(e.fixedWidth > 0 ? { width: `${e.fixedWidth}px` } : {})
|
|
94
|
+
}, [u(t.$slots, "default")], 6));
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
//#endregion
|
|
98
|
+
export { p as default };
|
package/dist/components/molecules/file-upload/file-upload.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import e from "../../atoms/svg-icon/svg-icon.js";
|
|
2
|
+
import { sanitizeHtml as t } from "../../../composables/useSanitize.js";
|
|
3
|
+
import { uniqueId as n } from "../../../utilities/helpers.js";
|
|
4
|
+
import r from "../../atoms/input-file/input-file.js";
|
|
5
|
+
import { useDragAndDrop as i } from "../../../composables/useDragAndDrop.js";
|
|
6
|
+
import { useUploadTransport as a } from "../../../composables/useUploadTransport.js";
|
|
7
|
+
import { useLocalFileUrl as o } from "../../../composables/useLocalFileUrl.js";
|
|
8
|
+
import { Fragment as s, Transition as c, computed as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, ref as _, renderList as v, renderSlot as y, toRef as b, unref as x, watch as S, withCtx as C, withModifiers as w } from "vue";
|
|
9
|
+
//#region src/components/molecules/file-upload/file-upload.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var T = ["src"], E = ["onClick"], D = ["onClick"], O = ["for"], k = ["innerHTML"], A = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "file-upload__loading-spinner"
|
|
13
|
+
}, j = /*@__PURE__*/ m({
|
|
14
|
+
__name: "file-upload",
|
|
15
|
+
props: {
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: []
|
|
19
|
+
},
|
|
20
|
+
src: { type: String },
|
|
21
|
+
name: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: () => n()
|
|
24
|
+
},
|
|
25
|
+
id: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: () => n()
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
placeholder: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
variant: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
},
|
|
45
|
+
readOnly: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
required: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
pattern: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: null
|
|
56
|
+
},
|
|
57
|
+
multiple: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
accept: { type: String },
|
|
62
|
+
maxFileSize: {
|
|
63
|
+
type: Number,
|
|
64
|
+
default: 0
|
|
65
|
+
},
|
|
66
|
+
endpoint: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ""
|
|
69
|
+
},
|
|
70
|
+
toDataUrl: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !0
|
|
73
|
+
},
|
|
74
|
+
authToken: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ""
|
|
77
|
+
},
|
|
78
|
+
customFetch: null,
|
|
79
|
+
baseResponsePath: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: "/api/v1/assets"
|
|
82
|
+
},
|
|
83
|
+
enablePreview: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: !0
|
|
86
|
+
},
|
|
87
|
+
previewWidth: {
|
|
88
|
+
type: Number,
|
|
89
|
+
default: 0
|
|
90
|
+
},
|
|
91
|
+
dropFiles: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !1
|
|
94
|
+
},
|
|
95
|
+
localUrlFormat: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "dataUrl"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
emits: ["update:modelValue", "update:src"],
|
|
101
|
+
setup(n, { emit: m }) {
|
|
102
|
+
let j = n, M = m, N = _(), P = _([]), F = _([]), { pending: I, uploadFile: L } = a(j), { toLocalUrl: R, revoke: z } = o(b(j, "localUrlFormat")), { isDragging: B } = i(N, {
|
|
103
|
+
enabled: () => j.dropFiles,
|
|
104
|
+
onDrop: (e) => {
|
|
105
|
+
P.value = e;
|
|
106
|
+
}
|
|
107
|
+
}), V = l(() => j.modelValue?.length ? j.modelValue : j.src ? [{
|
|
108
|
+
type: "",
|
|
109
|
+
src: j.src
|
|
110
|
+
}] : F.value);
|
|
111
|
+
function H(e) {
|
|
112
|
+
let t = typeof e == "string" ? parseInt(e, 10) : e, n = Array.isArray(j.modelValue) && j.modelValue.length > 0, r = Array.isArray(F.value) && F.value.length > 0;
|
|
113
|
+
if (r && t < F.value.length && (z(F.value[t]?.src), F.value.splice(t, 1)), n) {
|
|
114
|
+
let e = [...j.modelValue];
|
|
115
|
+
t < e.length && e.splice(t, 1), M("update:modelValue", e), j.multiple || M("update:src", e[0]?.src || "");
|
|
116
|
+
} else if (r) {
|
|
117
|
+
let e = j.multiple ? F.value : F.value[0];
|
|
118
|
+
M("update:modelValue", e), j.multiple || M("update:src", F.value[0]?.src || "");
|
|
119
|
+
} else M("update:modelValue", j.multiple ? [] : void 0), M("update:src", "");
|
|
120
|
+
P.value.splice(t, 1);
|
|
121
|
+
}
|
|
122
|
+
return S(() => P.value, async (e) => {
|
|
123
|
+
let t = await Promise.all(e.map(async (e) => ({
|
|
124
|
+
src: j.toDataUrl ? await R(e) : await L(e),
|
|
125
|
+
type: e.type,
|
|
126
|
+
name: e.name,
|
|
127
|
+
size: e.size,
|
|
128
|
+
lastModified: e.lastModified
|
|
129
|
+
})));
|
|
130
|
+
F.value = t;
|
|
131
|
+
}, { deep: !0 }), S(() => F.value, async (e) => {
|
|
132
|
+
let t = j.multiple ? e : e[0];
|
|
133
|
+
M("update:modelValue", t), j.multiple || M("update:src", e[0] && e[0].src);
|
|
134
|
+
}, { deep: !0 }), (i, a) => (g(), d("div", {
|
|
135
|
+
ref_key: "root",
|
|
136
|
+
ref: N,
|
|
137
|
+
class: h(["file-upload", {
|
|
138
|
+
"has-dragging": n.dropFiles,
|
|
139
|
+
"is-dragging": x(B)
|
|
140
|
+
}])
|
|
141
|
+
}, [
|
|
142
|
+
(g(!0), d(s, null, v(V.value, (t, r) => (g(), d("div", {
|
|
143
|
+
key: t.src,
|
|
144
|
+
class: h(n.enablePreview ? "file-upload__thumbnail" : "file-upload__reset")
|
|
145
|
+
}, [y(i.$slots, "preview-item", {
|
|
146
|
+
bind: {
|
|
147
|
+
item: t,
|
|
148
|
+
index: r
|
|
149
|
+
},
|
|
150
|
+
on: { removeFile: H }
|
|
151
|
+
}, () => [n.enablePreview ? (g(), d(s, { key: 0 }, [f("img", {
|
|
152
|
+
src: `${t.src}${n.previewWidth ? `?width=${n.previewWidth}` : ""}`,
|
|
153
|
+
class: "img-thumbnail rounded"
|
|
154
|
+
}, null, 8, T), f("button", {
|
|
155
|
+
onClick: w((e) => H(r), ["prevent"]),
|
|
156
|
+
class: "btn btn--close"
|
|
157
|
+
}, [p(e, { symbol: "x" })], 8, E)], 64)) : (g(), d("button", {
|
|
158
|
+
key: 1,
|
|
159
|
+
onClick: w((e) => H(r), ["prevent"]),
|
|
160
|
+
class: "btn btn--close btn-outline-contrast"
|
|
161
|
+
}, [p(e, { symbol: "x" })], 8, D))])], 2))), 128)),
|
|
162
|
+
p(r, {
|
|
163
|
+
modelValue: P.value,
|
|
164
|
+
"onUpdate:modelValue": a[0] ||= (e) => P.value = e,
|
|
165
|
+
id: n.id,
|
|
166
|
+
name: n.name,
|
|
167
|
+
accept: n.accept,
|
|
168
|
+
"max-file-size": n.maxFileSize,
|
|
169
|
+
multiple: n.multiple,
|
|
170
|
+
class: "d-none"
|
|
171
|
+
}, null, 8, [
|
|
172
|
+
"modelValue",
|
|
173
|
+
"id",
|
|
174
|
+
"name",
|
|
175
|
+
"accept",
|
|
176
|
+
"max-file-size",
|
|
177
|
+
"multiple"
|
|
178
|
+
]),
|
|
179
|
+
y(i.$slots, "label", {}, () => [f("label", {
|
|
180
|
+
for: n.id,
|
|
181
|
+
class: "file-upload__label"
|
|
182
|
+
}, [y(i.$slots, "button", {}, () => [f("span", {
|
|
183
|
+
class: "btn btn-outline-contrast",
|
|
184
|
+
innerHTML: x(t)(n.label || i.$t("common.selectFile"))
|
|
185
|
+
}, null, 8, k)]), p(c, { name: "fade" }, {
|
|
186
|
+
default: C(() => [x(I) ? (g(), d("span", A, [...a[1] ||= [f("span", {
|
|
187
|
+
class: "spinner-border",
|
|
188
|
+
role: "status"
|
|
189
|
+
}, [f("span", { class: "visually-hidden" }, "Loading...")], -1)]])) : u("", !0)]),
|
|
190
|
+
_: 1
|
|
191
|
+
})], 8, O)])
|
|
192
|
+
], 2));
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
//#endregion
|
|
196
|
+
export { j as default };
|
package/dist/components/molecules/hint-system/hint-system.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { sanitizeHtml as e } from "../../../composables/useSanitize.js";
|
|
2
|
+
import { Fragment as t, TransitionGroup as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, openBlock as l, ref as u, renderList as d, renderSlot as f, toDisplayString as p, unref as m, watch as h, withCtx as g } from "vue";
|
|
3
|
+
//#region src/components/molecules/hint-system/hint-system.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _ = { class: "hint-system" }, v = ["innerHTML"], y = ["innerHTML"], b = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "hint-system__hint-content"
|
|
7
|
+
}, x = ["disabled"], S = /*@__PURE__*/ c({
|
|
8
|
+
__name: "hint-system",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 0
|
|
13
|
+
},
|
|
14
|
+
hints: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
penalty: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 1
|
|
21
|
+
},
|
|
22
|
+
maxHints: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
htmlContent: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "Show hint"
|
|
33
|
+
},
|
|
34
|
+
description: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:modelValue", "hint-revealed"],
|
|
40
|
+
setup(c, { emit: S }) {
|
|
41
|
+
let C = c, w = S, T = u(C.modelValue);
|
|
42
|
+
h(() => C.modelValue, (e) => {
|
|
43
|
+
T.value = e;
|
|
44
|
+
});
|
|
45
|
+
let E = r(() => C.maxHints === void 0 ? C.hints.length : C.maxHints), D = r(() => T.value < E.value), O = r(() => C.hints.slice(0, T.value));
|
|
46
|
+
function k() {
|
|
47
|
+
if (!D.value) return;
|
|
48
|
+
let e = T.value;
|
|
49
|
+
T.value++, w("update:modelValue", T.value), w("hint-revealed", {
|
|
50
|
+
hint: C.hints[e],
|
|
51
|
+
index: e,
|
|
52
|
+
penaltyTotal: T.value * C.penalty
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return (r, u) => (l(), o("div", _, [
|
|
56
|
+
c.description ? (l(), o("div", {
|
|
57
|
+
key: 0,
|
|
58
|
+
innerHTML: m(e)(c.description),
|
|
59
|
+
class: "hint-system__description"
|
|
60
|
+
}, null, 8, v)) : a("", !0),
|
|
61
|
+
O.value.length ? (l(), i(n, {
|
|
62
|
+
key: 1,
|
|
63
|
+
name: "hint-reveal",
|
|
64
|
+
tag: "ol",
|
|
65
|
+
class: "hint-system__list"
|
|
66
|
+
}, {
|
|
67
|
+
default: g(() => [(l(!0), o(t, null, d(O.value, (t, n) => (l(), o("li", {
|
|
68
|
+
key: n,
|
|
69
|
+
class: "hint-system__hint"
|
|
70
|
+
}, [f(r.$slots, "hint", {
|
|
71
|
+
hint: t,
|
|
72
|
+
index: n,
|
|
73
|
+
isNew: n === T.value - 1
|
|
74
|
+
}, () => [c.htmlContent ? (l(), o("div", {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "hint-system__hint-content",
|
|
77
|
+
innerHTML: m(e)(t.content || "")
|
|
78
|
+
}, null, 8, y)) : (l(), o("div", b, p(t.content), 1))])]))), 128))]),
|
|
79
|
+
_: 3
|
|
80
|
+
})) : a("", !0),
|
|
81
|
+
f(r.$slots, "trigger", {
|
|
82
|
+
revealNext: k,
|
|
83
|
+
canReveal: D.value,
|
|
84
|
+
revealedCount: T.value,
|
|
85
|
+
total: E.value
|
|
86
|
+
}, () => [s("button", {
|
|
87
|
+
type: "button",
|
|
88
|
+
class: "hint-system__trigger d-block w-100 text-center",
|
|
89
|
+
disabled: !D.value,
|
|
90
|
+
onClick: k
|
|
91
|
+
}, p(c.label), 9, x)])
|
|
92
|
+
]));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
//#endregion
|
|
96
|
+
export { S as default };
|
package/dist/components/molecules/image-crop/image-crop.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import e from "../input-dropdown/input-dropdown.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, onBeforeMount as o, openBlock as s, ref as c, renderSlot as l, toDisplayString as u, unref as d, useTemplateRef as f, withModifiers as p } from "vue";
|
|
4
|
+
import { Cropper as m } from "vue-advanced-cropper";
|
|
5
|
+
//#region src/components/molecules/image-crop/image-crop.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var h = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "image-crop"
|
|
9
|
+
}, g = { class: "row mb-4" }, _ = { class: "col" }, v = { class: "row" }, y = { class: "col d-flex gap-2 justify-content-end gap-2" }, b = /*@__PURE__*/ a({
|
|
10
|
+
__name: "image-crop",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"/>",
|
|
15
|
+
required: !0
|
|
16
|
+
},
|
|
17
|
+
spinner: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
ready: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
aspectRatioOptions: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: () => [
|
|
28
|
+
{
|
|
29
|
+
value: 0,
|
|
30
|
+
text: "Free"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: 1,
|
|
34
|
+
text: "1:1"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: 4 / 3,
|
|
38
|
+
text: "4:3"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: 16 / 9,
|
|
42
|
+
text: "16:9"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
value: 3 / 4,
|
|
46
|
+
text: "3:4"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
value: 9 / 16,
|
|
50
|
+
text: "9:16"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
suggestedAspectRatio: Number
|
|
55
|
+
},
|
|
56
|
+
emits: ["update:modelValue"],
|
|
57
|
+
setup(a, { emit: b }) {
|
|
58
|
+
let x = a, S = b, C = f("cropper"), w = c(0);
|
|
59
|
+
function T() {
|
|
60
|
+
let { canvas: e } = C.value?.getResult(), t = e.toDataURL();
|
|
61
|
+
S("update:modelValue", t);
|
|
62
|
+
}
|
|
63
|
+
return o(() => {
|
|
64
|
+
w.value = x.suggestedAspectRatio || 0;
|
|
65
|
+
}), (o, c) => a.modelValue ? (s(), n("div", h, [
|
|
66
|
+
r("div", g, [r("div", _, [i(d(m), {
|
|
67
|
+
ref: "cropper",
|
|
68
|
+
class: "cropper",
|
|
69
|
+
src: a.modelValue,
|
|
70
|
+
"stencil-props": { ...w.value === 0 ? {} : { aspectRatio: w.value } },
|
|
71
|
+
"resize-image": !1
|
|
72
|
+
}, null, 8, ["src", "stencil-props"])])]),
|
|
73
|
+
c[1] ||= r("hr", null, null, -1),
|
|
74
|
+
r("div", v, [r("div", y, [
|
|
75
|
+
i(e, {
|
|
76
|
+
modelValue: w.value,
|
|
77
|
+
"onUpdate:modelValue": c[0] ||= (e) => w.value = e,
|
|
78
|
+
options: a.aspectRatioOptions,
|
|
79
|
+
class: "mb-0"
|
|
80
|
+
}, null, 8, ["modelValue", "options"]),
|
|
81
|
+
l(o.$slots, "actions"),
|
|
82
|
+
r("button", {
|
|
83
|
+
class: "btn btn-sm btn-primary",
|
|
84
|
+
onClick: p(T, ["prevent", "stop"])
|
|
85
|
+
}, u(o.$t("common.apply")), 1)
|
|
86
|
+
])])
|
|
87
|
+
])) : t("", !0);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//#endregion
|
|
91
|
+
export { b as default };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import e from "../../atoms/svg-icon/svg-icon.js";
|
|
2
|
+
import t from "../../atoms/base-image/base-image.js";
|
|
3
|
+
import n from "../image-resize/image-resize.js";
|
|
4
|
+
import r from "../image-crop/image-crop.js";
|
|
5
|
+
import { computed as i, 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, watch as g, withCtx as _, withModifiers as v } from "vue";
|
|
6
|
+
//#region src/components/molecules/image-crop-resize/image-crop-resize.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var y = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "image-crop-resize position-relative"
|
|
10
|
+
}, b = { class: "row" }, x = { class: "col" }, S = {
|
|
11
|
+
key: 3,
|
|
12
|
+
class: "alert alert-warning mt-4 small p-2"
|
|
13
|
+
}, C = { key: 4 }, w = { class: "row" }, T = { class: "col-12" }, E = { class: "d-flex" }, D = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "d-flex gap-3"
|
|
16
|
+
}, O = { class: "caption" }, k = { class: "caption" }, A = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "ms-auto"
|
|
19
|
+
}, j = /*@__PURE__*/ u({
|
|
20
|
+
__name: "image-crop-resize",
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\"/>",
|
|
25
|
+
required: !0
|
|
26
|
+
},
|
|
27
|
+
spinner: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
ready: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
aspectRatio: Number
|
|
36
|
+
},
|
|
37
|
+
emits: ["update:modelValue"],
|
|
38
|
+
setup(u, { emit: j }) {
|
|
39
|
+
let M = u, N = j, P = p(!1), F = p(!1), I = i({
|
|
40
|
+
get: () => M.modelValue,
|
|
41
|
+
set: (e) => N("update:modelValue", e)
|
|
42
|
+
}), L = i(() => M.modelValue.startsWith("data:image/svg+xml"));
|
|
43
|
+
return g(() => [P.value, I.value], (e, t) => {
|
|
44
|
+
e[0] && e[0] === t[0] && (P.value = !1);
|
|
45
|
+
}), g(() => [F.value, I.value], (e, t) => {
|
|
46
|
+
e[0] && e[0] === t[0] && (F.value = !1);
|
|
47
|
+
}), d(() => {}), (i, d) => u.modelValue ? (f(), s("div", y, [c("div", b, [c("div", x, [
|
|
48
|
+
P.value || F.value ? P.value ? (f(), a(n, {
|
|
49
|
+
key: 1,
|
|
50
|
+
modelValue: I.value,
|
|
51
|
+
"onUpdate:modelValue": d[1] ||= (e) => I.value = e
|
|
52
|
+
}, {
|
|
53
|
+
actions: _(() => [c("button", {
|
|
54
|
+
class: "btn btn-outline-ccontrast",
|
|
55
|
+
onClick: d[0] ||= v((e) => P.value = !1, ["prevent", "stop"])
|
|
56
|
+
}, h(i.$t("common.cancel")), 1)]),
|
|
57
|
+
_: 1
|
|
58
|
+
}, 8, ["modelValue"])) : F.value ? (f(), a(r, {
|
|
59
|
+
key: 2,
|
|
60
|
+
modelValue: I.value,
|
|
61
|
+
"onUpdate:modelValue": d[3] ||= (e) => I.value = e,
|
|
62
|
+
"suggested-aspect-ratio": u.aspectRatio
|
|
63
|
+
}, {
|
|
64
|
+
actions: _(() => [c("button", {
|
|
65
|
+
class: "btn btn-sm btn-outline-ccontrast",
|
|
66
|
+
onClick: d[2] ||= v((e) => F.value = !1, ["prevent", "stop"])
|
|
67
|
+
}, h(i.$t("common.cancel")), 1)]),
|
|
68
|
+
_: 1
|
|
69
|
+
}, 8, ["modelValue", "suggested-aspect-ratio"])) : o("", !0) : (f(), a(t, {
|
|
70
|
+
key: 0,
|
|
71
|
+
ref: "targetImage",
|
|
72
|
+
class: "",
|
|
73
|
+
animate: !1,
|
|
74
|
+
src: u.modelValue
|
|
75
|
+
}, null, 8, ["src"])),
|
|
76
|
+
L.value ? (f(), s("div", S, h(i.$t("common.svgWarning")), 1)) : o("", !0),
|
|
77
|
+
!F.value && !P.value ? (f(), s("hr", C)) : o("", !0),
|
|
78
|
+
c("div", w, [c("div", T, [c("div", E, [!F.value && !P.value ? (f(), s("div", D, [c("button", {
|
|
79
|
+
type: "button",
|
|
80
|
+
class: "btn btn-light",
|
|
81
|
+
onClick: d[4] ||= v((e) => F.value = !F.value, ["prevent", "stop"])
|
|
82
|
+
}, [l(e, { symbol: "crop" }), c("span", O, h(i.$t("common.crop")), 1)]), c("button", {
|
|
83
|
+
type: "button",
|
|
84
|
+
class: "btn btn-light",
|
|
85
|
+
onClick: d[5] ||= v((e) => P.value = !P.value, ["prevent", "stop"])
|
|
86
|
+
}, [l(e, { symbol: "image-upscale" }), c("span", k, h(i.$t("common.resize")), 1)])])) : o("", !0), !F.value && !P.value ? (f(), s("div", A, [m(i.$slots, "submit")])) : o("", !0)])])])
|
|
87
|
+
])])])) : o("", !0);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//#endregion
|
|
91
|
+
export { j as default };
|