@uploadcare/file-uploader 1.22.0 → 1.24.0-alpha.0
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/abstract/loadFileUploaderFrom.d.ts +14 -0
- package/dist/abstract/loadFileUploaderFrom.js +78 -0
- package/dist/env.d.ts +4 -0
- package/dist/env.js +36 -0
- package/dist/index.css +2714 -0
- package/dist/index.d.ts +2043 -0
- package/dist/index.js +11914 -0
- package/{index.ssr.js → dist/index.ssr.js} +1113 -1082
- package/{locales → dist/locales}/file-uploader/ar.d.ts +5 -3
- package/dist/locales/file-uploader/ar.js +168 -0
- package/{locales → dist/locales}/file-uploader/az.d.ts +5 -3
- package/dist/locales/file-uploader/az.js +160 -0
- package/{locales → dist/locales}/file-uploader/ca.d.ts +5 -3
- package/dist/locales/file-uploader/ca.js +162 -0
- package/{locales → dist/locales}/file-uploader/cs.d.ts +5 -3
- package/dist/locales/file-uploader/cs.js +164 -0
- package/{locales → dist/locales}/file-uploader/da.d.ts +5 -3
- package/dist/locales/file-uploader/da.js +160 -0
- package/{locales → dist/locales}/file-uploader/de.d.ts +5 -3
- package/dist/locales/file-uploader/de.js +160 -0
- package/{locales → dist/locales}/file-uploader/el.d.ts +5 -3
- package/dist/locales/file-uploader/el.js +160 -0
- package/{locales → dist/locales}/file-uploader/en.d.ts +5 -3
- package/dist/locales/file-uploader/en.js +160 -0
- package/{locales → dist/locales}/file-uploader/es.d.ts +5 -3
- package/dist/locales/file-uploader/es.js +162 -0
- package/{locales → dist/locales}/file-uploader/et.d.ts +5 -3
- package/dist/locales/file-uploader/et.js +160 -0
- package/{locales → dist/locales}/file-uploader/fi.d.ts +5 -3
- package/dist/locales/file-uploader/fi.js +160 -0
- package/{locales → dist/locales}/file-uploader/fr.d.ts +5 -3
- package/dist/locales/file-uploader/fr.js +162 -0
- package/{locales → dist/locales}/file-uploader/he.d.ts +5 -3
- package/dist/locales/file-uploader/he.js +162 -0
- package/{locales → dist/locales}/file-uploader/hy.d.ts +5 -3
- package/dist/locales/file-uploader/hy.js +160 -0
- package/{locales → dist/locales}/file-uploader/is.d.ts +5 -3
- package/dist/locales/file-uploader/is.js +160 -0
- package/{locales → dist/locales}/file-uploader/it.d.ts +5 -3
- package/dist/locales/file-uploader/it.js +162 -0
- package/{locales → dist/locales}/file-uploader/ja.d.ts +5 -3
- package/dist/locales/file-uploader/ja.js +160 -0
- package/{locales → dist/locales}/file-uploader/ka.d.ts +5 -3
- package/dist/locales/file-uploader/ka.js +160 -0
- package/{locales → dist/locales}/file-uploader/kk.d.ts +5 -3
- package/dist/locales/file-uploader/kk.js +160 -0
- package/{locales → dist/locales}/file-uploader/ko.d.ts +5 -3
- package/dist/locales/file-uploader/ko.js +160 -0
- package/{locales → dist/locales}/file-uploader/lv.d.ts +5 -3
- package/dist/locales/file-uploader/lv.js +162 -0
- package/{locales → dist/locales}/file-uploader/nb.d.ts +5 -3
- package/dist/locales/file-uploader/nb.js +160 -0
- package/{locales → dist/locales}/file-uploader/nl.d.ts +5 -3
- package/dist/locales/file-uploader/nl.js +160 -0
- package/{locales → dist/locales}/file-uploader/pl.d.ts +5 -3
- package/dist/locales/file-uploader/pl.js +164 -0
- package/{locales → dist/locales}/file-uploader/pt.d.ts +5 -3
- package/dist/locales/file-uploader/pt.js +162 -0
- package/{locales → dist/locales}/file-uploader/ro.d.ts +5 -3
- package/dist/locales/file-uploader/ro.js +162 -0
- package/{locales → dist/locales}/file-uploader/ru.d.ts +5 -3
- package/dist/locales/file-uploader/ru.js +164 -0
- package/{locales → dist/locales}/file-uploader/sk.d.ts +5 -3
- package/dist/locales/file-uploader/sk.js +164 -0
- package/{locales → dist/locales}/file-uploader/sr.d.ts +5 -3
- package/dist/locales/file-uploader/sr.js +162 -0
- package/{locales → dist/locales}/file-uploader/sv.d.ts +5 -3
- package/dist/locales/file-uploader/sv.js +160 -0
- package/{locales → dist/locales}/file-uploader/tr.d.ts +5 -3
- package/dist/locales/file-uploader/tr.js +160 -0
- package/{locales → dist/locales}/file-uploader/uk.d.ts +5 -3
- package/dist/locales/file-uploader/uk.js +164 -0
- package/{locales → dist/locales}/file-uploader/vi.d.ts +5 -3
- package/dist/locales/file-uploader/vi.js +160 -0
- package/{locales → dist/locales}/file-uploader/zh-TW.d.ts +5 -3
- package/dist/locales/file-uploader/zh-TW.js +160 -0
- package/{locales → dist/locales}/file-uploader/zh.d.ts +5 -3
- package/dist/locales/file-uploader/zh.js +160 -0
- package/package.json +110 -63
- package/types/jsx.d.ts +10 -10
- package/web/file-uploader.iife.min.d.ts +2057 -0
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.d.ts +2057 -0
- package/web/file-uploader.min.js +4 -4
- package/web/uc-basic.min.css +26 -1
- package/web/uc-cloud-image-editor.min.css +26 -1
- package/web/uc-cloud-image-editor.min.d.ts +1544 -0
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.min.css +26 -1
- package/web/uc-file-uploader-inline.min.d.ts +2057 -0
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.css +26 -1
- package/web/uc-file-uploader-minimal.min.d.ts +2057 -0
- package/web/uc-file-uploader-minimal.min.js +4 -4
- package/web/uc-file-uploader-regular.min.css +26 -1
- package/web/uc-file-uploader-regular.min.d.ts +2057 -0
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/{blocks/Img/ImgBase.d.ts → web/uc-img.min.d.ts} +38 -3
- package/web/uc-img.min.js +3 -3
- package/abstract/ActivityBlock.d.ts +0 -79
- package/abstract/ActivityBlock.d.ts.map +0 -1
- package/abstract/ActivityBlock.js +0 -216
- package/abstract/Block.d.ts +0 -113
- package/abstract/Block.d.ts.map +0 -1
- package/abstract/Block.js +0 -410
- package/abstract/CTX.d.ts +0 -30
- package/abstract/CTX.d.ts.map +0 -1
- package/abstract/CTX.js +0 -39
- package/abstract/SolutionBlock.d.ts +0 -22
- package/abstract/SolutionBlock.d.ts.map +0 -1
- package/abstract/SolutionBlock.js +0 -23
- package/abstract/TypedCollection.d.ts +0 -127
- package/abstract/TypedCollection.d.ts.map +0 -1
- package/abstract/TypedCollection.js +0 -265
- package/abstract/TypedData.d.ts +0 -93
- package/abstract/TypedData.d.ts.map +0 -1
- package/abstract/TypedData.js +0 -134
- package/abstract/UploaderBlock.d.ts +0 -121
- package/abstract/UploaderBlock.d.ts.map +0 -1
- package/abstract/UploaderBlock.js +0 -511
- package/abstract/UploaderPublicApi.d.ts +0 -100
- package/abstract/UploaderPublicApi.d.ts.map +0 -1
- package/abstract/UploaderPublicApi.js +0 -399
- package/abstract/buildOutputCollectionState.d.ts +0 -8
- package/abstract/buildOutputCollectionState.d.ts.map +0 -1
- package/abstract/buildOutputCollectionState.js +0 -136
- package/abstract/defineComponents.d.ts +0 -5
- package/abstract/defineComponents.d.ts.map +0 -1
- package/abstract/defineComponents.js +0 -21
- package/abstract/l10nProcessor.d.ts +0 -7
- package/abstract/l10nProcessor.d.ts.map +0 -1
- package/abstract/l10nProcessor.js +0 -93
- package/abstract/loadFileUploaderFrom.d.ts +0 -8
- package/abstract/loadFileUploaderFrom.d.ts.map +0 -1
- package/abstract/loadFileUploaderFrom.js +0 -34
- package/abstract/localeRegistry.d.ts +0 -5
- package/abstract/localeRegistry.d.ts.map +0 -1
- package/abstract/localeRegistry.js +0 -63
- package/abstract/managers/LocaleManager.d.ts +0 -38
- package/abstract/managers/LocaleManager.d.ts.map +0 -1
- package/abstract/managers/LocaleManager.js +0 -130
- package/abstract/managers/ModalManager.d.ts +0 -122
- package/abstract/managers/ModalManager.d.ts.map +0 -1
- package/abstract/managers/ModalManager.js +0 -235
- package/abstract/managers/SecureUploadsManager.d.ts +0 -22
- package/abstract/managers/SecureUploadsManager.d.ts.map +0 -1
- package/abstract/managers/SecureUploadsManager.js +0 -91
- package/abstract/managers/TelemetryManager.d.ts +0 -71
- package/abstract/managers/TelemetryManager.d.ts.map +0 -1
- package/abstract/managers/TelemetryManager.js +0 -218
- package/abstract/managers/ValidationManager.d.ts +0 -150
- package/abstract/managers/ValidationManager.d.ts.map +0 -1
- package/abstract/managers/ValidationManager.js +0 -164
- package/abstract/managers/a11y.d.ts +0 -20
- package/abstract/managers/a11y.d.ts.map +0 -1
- package/abstract/managers/a11y.js +0 -118
- package/abstract/sharedConfigKey.d.ts +0 -2
- package/abstract/sharedConfigKey.d.ts.map +0 -1
- package/abstract/sharedConfigKey.js +0 -8
- package/abstract/testModeProcessor.d.ts +0 -7
- package/abstract/testModeProcessor.d.ts.map +0 -1
- package/abstract/testModeProcessor.js +0 -39
- package/abstract/uploadEntrySchema.d.ts +0 -126
- package/abstract/uploadEntrySchema.d.ts.map +0 -1
- package/abstract/uploadEntrySchema.js +0 -124
- package/blocks/ActivityHeader/ActivityHeader.d.ts +0 -4
- package/blocks/ActivityHeader/ActivityHeader.d.ts.map +0 -1
- package/blocks/ActivityHeader/ActivityHeader.js +0 -3
- package/blocks/ActivityHeader/activity-header.css +0 -14
- package/blocks/CameraSource/CameraSource.d.ts +0 -176
- package/blocks/CameraSource/CameraSource.d.ts.map +0 -1
- package/blocks/CameraSource/CameraSource.js +0 -929
- package/blocks/CameraSource/calcCameraModes.d.ts +0 -5
- package/blocks/CameraSource/calcCameraModes.d.ts.map +0 -1
- package/blocks/CameraSource/calcCameraModes.js +0 -11
- package/blocks/CameraSource/camera-source.css +0 -183
- package/blocks/CameraSource/constants.d.ts +0 -16
- package/blocks/CameraSource/constants.d.ts.map +0 -1
- package/blocks/CameraSource/constants.js +0 -19
- package/blocks/CloudImageEditor/index.css +0 -1
- package/blocks/CloudImageEditor/index.d.ts +0 -2
- package/blocks/CloudImageEditor/index.d.ts.map +0 -1
- package/blocks/CloudImageEditor/index.js +0 -1
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +0 -59
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.js +0 -243
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +0 -158
- package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/CropFrame.js +0 -569
- package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +0 -14
- package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.js +0 -140
- package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +0 -10
- package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +0 -45
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +0 -6
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +0 -52
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +0 -18
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +0 -177
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +0 -106
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +0 -551
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +0 -132
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.js +0 -456
- package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +0 -9
- package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorOperationControl.js +0 -50
- package/blocks/CloudImageEditor/src/EditorScroller.d.ts +0 -7
- package/blocks/CloudImageEditor/src/EditorScroller.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorScroller.js +0 -33
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts +0 -24
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorSlider.js +0 -118
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +0 -124
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.js +0 -534
- package/blocks/CloudImageEditor/src/crop-utils.d.ts +0 -123
- package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/crop-utils.js +0 -729
- package/blocks/CloudImageEditor/src/cropper-constants.d.ts +0 -11
- package/blocks/CloudImageEditor/src/cropper-constants.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/cropper-constants.js +0 -11
- package/blocks/CloudImageEditor/src/css/common.css +0 -1259
- package/blocks/CloudImageEditor/src/css/icons.css +0 -12
- package/blocks/CloudImageEditor/src/css/index.css +0 -2
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +0 -21
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +0 -99
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +0 -11
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +0 -52
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +0 -17
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +0 -71
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +0 -16
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +0 -179
- package/blocks/CloudImageEditor/src/index.d.ts +0 -16
- package/blocks/CloudImageEditor/src/index.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/index.js +0 -15
- package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts +0 -15
- package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/FocusVisible.js +0 -33
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +0 -10
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.js +0 -256
- package/blocks/CloudImageEditor/src/lib/classNames.d.ts +0 -3
- package/blocks/CloudImageEditor/src/lib/classNames.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/classNames.js +0 -34
- package/blocks/CloudImageEditor/src/lib/linspace.d.ts +0 -8
- package/blocks/CloudImageEditor/src/lib/linspace.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/linspace.js +0 -14
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +0 -3
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.js +0 -80
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +0 -2
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.js +0 -35
- package/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +0 -2
- package/blocks/CloudImageEditor/src/lib/parseTabs.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/parseTabs.js +0 -14
- package/blocks/CloudImageEditor/src/lib/pick.d.ts +0 -7
- package/blocks/CloudImageEditor/src/lib/pick.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/pick.js +0 -15
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +0 -14
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/lib/transformationUtils.js +0 -167
- package/blocks/CloudImageEditor/src/state.d.ts +0 -38
- package/blocks/CloudImageEditor/src/state.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/state.js +0 -92
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts +0 -3
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/svg-sprite.js +0 -1
- package/blocks/CloudImageEditor/src/template.d.ts +0 -2
- package/blocks/CloudImageEditor/src/template.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/template.js +0 -36
- package/blocks/CloudImageEditor/src/toolbar-constants.d.ts +0 -59
- package/blocks/CloudImageEditor/src/toolbar-constants.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/toolbar-constants.js +0 -116
- package/blocks/CloudImageEditor/src/types.d.ts +0 -66
- package/blocks/CloudImageEditor/src/types.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/types.js +0 -80
- package/blocks/CloudImageEditor/src/util.d.ts +0 -2
- package/blocks/CloudImageEditor/src/util.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/util.js +0 -21
- package/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +0 -11
- package/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts.map +0 -1
- package/blocks/CloudImageEditor/src/utils/parseFilterValue.js +0 -11
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +0 -29
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +0 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +0 -128
- package/blocks/CloudImageEditorActivity/index.css +0 -13
- package/blocks/CloudImageEditorActivity/test.d.ts +0 -2
- package/blocks/CloudImageEditorActivity/test.d.ts.map +0 -1
- package/blocks/CloudImageEditorActivity/test.js +0 -9
- package/blocks/Config/Config.d.ts +0 -60
- package/blocks/Config/Config.d.ts.map +0 -1
- package/blocks/Config/Config.js +0 -263
- package/blocks/Config/assertions.d.ts +0 -5
- package/blocks/Config/assertions.d.ts.map +0 -1
- package/blocks/Config/assertions.js +0 -37
- package/blocks/Config/config.css +0 -3
- package/blocks/Config/initialConfig.d.ts +0 -7
- package/blocks/Config/initialConfig.d.ts.map +0 -1
- package/blocks/Config/initialConfig.js +0 -91
- package/blocks/Config/normalizeConfigValue.d.ts +0 -2
- package/blocks/Config/normalizeConfigValue.d.ts.map +0 -1
- package/blocks/Config/normalizeConfigValue.js +0 -127
- package/blocks/Config/side-effects.d.ts +0 -11
- package/blocks/Config/side-effects.d.ts.map +0 -1
- package/blocks/Config/side-effects.js +0 -126
- package/blocks/Config/validatorsType.d.ts +0 -37
- package/blocks/Config/validatorsType.d.ts.map +0 -1
- package/blocks/Config/validatorsType.js +0 -134
- package/blocks/Copyright/Copyright.d.ts +0 -4
- package/blocks/Copyright/Copyright.d.ts.map +0 -1
- package/blocks/Copyright/Copyright.js +0 -24
- package/blocks/Copyright/copyright.css +0 -32
- package/blocks/DropArea/DropArea.d.ts +0 -49
- package/blocks/DropArea/DropArea.d.ts.map +0 -1
- package/blocks/DropArea/DropArea.js +0 -292
- package/blocks/DropArea/addDropzone.d.ts +0 -21
- package/blocks/DropArea/addDropzone.d.ts.map +0 -1
- package/blocks/DropArea/addDropzone.js +0 -137
- package/blocks/DropArea/drop-area.css +0 -201
- package/blocks/DropArea/getDropItems.d.ts +0 -16
- package/blocks/DropArea/getDropItems.d.ts.map +0 -1
- package/blocks/DropArea/getDropItems.js +0 -167
- package/blocks/ExternalSource/ExternalSource.d.ts +0 -82
- package/blocks/ExternalSource/ExternalSource.d.ts.map +0 -1
- package/blocks/ExternalSource/ExternalSource.js +0 -320
- package/blocks/ExternalSource/MessageBridge.d.ts +0 -20
- package/blocks/ExternalSource/MessageBridge.d.ts.map +0 -1
- package/blocks/ExternalSource/MessageBridge.js +0 -73
- package/blocks/ExternalSource/buildThemeDefinition.d.ts +0 -3
- package/blocks/ExternalSource/buildThemeDefinition.d.ts.map +0 -1
- package/blocks/ExternalSource/buildThemeDefinition.js +0 -47
- package/blocks/ExternalSource/external-source.css +0 -94
- package/blocks/ExternalSource/query-string.d.ts +0 -8
- package/blocks/ExternalSource/query-string.d.ts.map +0 -1
- package/blocks/ExternalSource/query-string.js +0 -14
- package/blocks/ExternalSource/types.d.ts +0 -106
- package/blocks/ExternalSource/types.d.ts.map +0 -1
- package/blocks/ExternalSource/types.js +0 -133
- package/blocks/FileItem/FileItem.d.ts +0 -76
- package/blocks/FileItem/FileItem.d.ts.map +0 -1
- package/blocks/FileItem/FileItem.js +0 -461
- package/blocks/FileItem/FileItemConfig.d.ts +0 -28
- package/blocks/FileItem/FileItemConfig.d.ts.map +0 -1
- package/blocks/FileItem/FileItemConfig.js +0 -74
- package/blocks/FileItem/file-item.css +0 -243
- package/blocks/FormInput/FormInput.d.ts +0 -7
- package/blocks/FormInput/FormInput.d.ts.map +0 -1
- package/blocks/FormInput/FormInput.js +0 -92
- package/blocks/Icon/Icon.d.ts +0 -11
- package/blocks/Icon/Icon.d.ts.map +0 -1
- package/blocks/Icon/Icon.js +0 -43
- package/blocks/Icon/icon.css +0 -12
- package/blocks/Img/Img.d.ts +0 -4
- package/blocks/Img/Img.d.ts.map +0 -1
- package/blocks/Img/Img.js +0 -21
- package/blocks/Img/ImgBase.d.ts.map +0 -1
- package/blocks/Img/ImgBase.js +0 -408
- package/blocks/Img/ImgConfig.d.ts +0 -31
- package/blocks/Img/ImgConfig.d.ts.map +0 -1
- package/blocks/Img/ImgConfig.js +0 -102
- package/blocks/Img/configurations.d.ts +0 -12
- package/blocks/Img/configurations.d.ts.map +0 -1
- package/blocks/Img/configurations.js +0 -14
- package/blocks/Img/props-map.d.ts +0 -29
- package/blocks/Img/props-map.d.ts.map +0 -1
- package/blocks/Img/props-map.js +0 -34
- package/blocks/Img/test.css +0 -16
- package/blocks/Img/utils/parseObjectToString.d.ts +0 -2
- package/blocks/Img/utils/parseObjectToString.d.ts.map +0 -1
- package/blocks/Img/utils/parseObjectToString.js +0 -13
- package/blocks/Modal/Modal.d.ts +0 -43
- package/blocks/Modal/Modal.d.ts.map +0 -1
- package/blocks/Modal/Modal.js +0 -158
- package/blocks/Modal/modal.css +0 -45
- package/blocks/ProgressBar/ProgressBar.d.ts +0 -17
- package/blocks/ProgressBar/ProgressBar.d.ts.map +0 -1
- package/blocks/ProgressBar/ProgressBar.js +0 -62
- package/blocks/ProgressBar/progress-bar.css +0 -62
- package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +0 -8
- package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts.map +0 -1
- package/blocks/ProgressBarCommon/ProgressBarCommon.js +0 -44
- package/blocks/ProgressBarCommon/progress-bar-common.css +0 -16
- package/blocks/Range/Range.d.ts +0 -16
- package/blocks/Range/Range.d.ts.map +0 -1
- package/blocks/Range/Range.js +0 -44
- package/blocks/Range/range.css +0 -65
- package/blocks/Select/Select.d.ts +0 -9
- package/blocks/Select/Select.d.ts.map +0 -1
- package/blocks/Select/Select.js +0 -35
- package/blocks/Select/select.css +0 -22
- package/blocks/SimpleBtn/SimpleBtn.d.ts +0 -25
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +0 -1
- package/blocks/SimpleBtn/SimpleBtn.js +0 -54
- package/blocks/SimpleBtn/simple-btn.css +0 -64
- package/blocks/SourceBtn/SourceBtn.d.ts +0 -57
- package/blocks/SourceBtn/SourceBtn.d.ts.map +0 -1
- package/blocks/SourceBtn/SourceBtn.js +0 -172
- package/blocks/SourceBtn/source-btn.css +0 -53
- package/blocks/SourceList/SourceList.d.ts +0 -4
- package/blocks/SourceList/SourceList.d.ts.map +0 -1
- package/blocks/SourceList/SourceList.js +0 -51
- package/blocks/Spinner/Spinner.d.ts +0 -8
- package/blocks/Spinner/Spinner.d.ts.map +0 -1
- package/blocks/Spinner/Spinner.js +0 -5
- package/blocks/Spinner/spinner.css +0 -18
- package/blocks/StartFrom/StartFrom.d.ts +0 -7
- package/blocks/StartFrom/StartFrom.d.ts.map +0 -1
- package/blocks/StartFrom/StartFrom.js +0 -14
- package/blocks/StartFrom/start-from.css +0 -28
- package/blocks/Thumb/Thumb.d.ts +0 -51
- package/blocks/Thumb/Thumb.d.ts.map +0 -1
- package/blocks/Thumb/Thumb.js +0 -235
- package/blocks/Thumb/thumb.css +0 -4
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +0 -125
- package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +0 -1
- package/blocks/UploadCtxProvider/EventEmitter.js +0 -144
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +0 -35
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +0 -1
- package/blocks/UploadCtxProvider/UploadCtxProvider.js +0 -46
- package/blocks/UploadList/UploadList.d.ts +0 -60
- package/blocks/UploadList/UploadList.d.ts.map +0 -1
- package/blocks/UploadList/UploadList.js +0 -263
- package/blocks/UploadList/upload-list.css +0 -88
- package/blocks/UrlSource/UrlSource.d.ts +0 -9
- package/blocks/UrlSource/UrlSource.d.ts.map +0 -1
- package/blocks/UrlSource/UrlSource.js +0 -69
- package/blocks/UrlSource/url-source.css +0 -16
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts +0 -17
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts.map +0 -1
- package/blocks/svg-backgrounds/svg-backgrounds.js +0 -45
- package/blocks/themes/uc-basic/common.css +0 -129
- package/blocks/themes/uc-basic/config.css +0 -4
- package/blocks/themes/uc-basic/index.css +0 -37
- package/blocks/themes/uc-basic/post-reset.css +0 -3
- package/blocks/themes/uc-basic/svg-sprite.d.ts +0 -3
- package/blocks/themes/uc-basic/svg-sprite.d.ts.map +0 -1
- package/blocks/themes/uc-basic/svg-sprite.js +0 -1
- package/blocks/themes/uc-basic/theme.css +0 -291
- package/blocks/utils/UploadSource.d.ts +0 -39
- package/blocks/utils/UploadSource.d.ts.map +0 -1
- package/blocks/utils/UploadSource.js +0 -33
- package/blocks/utils/abilities.d.ts +0 -2
- package/blocks/utils/abilities.d.ts.map +0 -1
- package/blocks/utils/abilities.js +0 -3
- package/blocks/utils/comma-separated.d.ts +0 -3
- package/blocks/utils/comma-separated.d.ts.map +0 -1
- package/blocks/utils/comma-separated.js +0 -22
- package/blocks/utils/debounce.d.ts +0 -12
- package/blocks/utils/debounce.d.ts.map +0 -1
- package/blocks/utils/debounce.js +0 -22
- package/blocks/utils/preloadImage.d.ts +0 -11
- package/blocks/utils/preloadImage.d.ts.map +0 -1
- package/blocks/utils/preloadImage.js +0 -38
- package/blocks/utils/resizeImage.d.ts +0 -6
- package/blocks/utils/resizeImage.d.ts.map +0 -1
- package/blocks/utils/resizeImage.js +0 -40
- package/blocks/utils/throttle.d.ts +0 -6
- package/blocks/utils/throttle.d.ts.map +0 -1
- package/blocks/utils/throttle.js +0 -45
- package/blocks/utils/userAgent.d.ts +0 -6
- package/blocks/utils/userAgent.d.ts.map +0 -1
- package/blocks/utils/userAgent.js +0 -14
- package/env.d.ts +0 -4
- package/env.d.ts.map +0 -1
- package/env.js +0 -3
- package/index.d.ts +0 -43
- package/index.d.ts.map +0 -1
- package/index.js +0 -55
- package/index.ssr.d.ts +0 -1111
- package/index.ssr.d.ts.map +0 -1
- package/locales/file-uploader/ar.d.ts.map +0 -1
- package/locales/file-uploader/ar.js +0 -137
- package/locales/file-uploader/az.d.ts.map +0 -1
- package/locales/file-uploader/az.js +0 -130
- package/locales/file-uploader/ca.d.ts.map +0 -1
- package/locales/file-uploader/ca.js +0 -134
- package/locales/file-uploader/cs.d.ts.map +0 -1
- package/locales/file-uploader/cs.js +0 -136
- package/locales/file-uploader/da.d.ts.map +0 -1
- package/locales/file-uploader/da.js +0 -132
- package/locales/file-uploader/de.d.ts.map +0 -1
- package/locales/file-uploader/de.js +0 -133
- package/locales/file-uploader/el.d.ts.map +0 -1
- package/locales/file-uploader/el.js +0 -133
- package/locales/file-uploader/en.d.ts.map +0 -1
- package/locales/file-uploader/en.js +0 -129
- package/locales/file-uploader/es.d.ts.map +0 -1
- package/locales/file-uploader/es.js +0 -134
- package/locales/file-uploader/et.d.ts.map +0 -1
- package/locales/file-uploader/et.js +0 -131
- package/locales/file-uploader/fi.d.ts.map +0 -1
- package/locales/file-uploader/fi.js +0 -132
- package/locales/file-uploader/fr.d.ts.map +0 -1
- package/locales/file-uploader/fr.js +0 -134
- package/locales/file-uploader/he.d.ts.map +0 -1
- package/locales/file-uploader/he.js +0 -133
- package/locales/file-uploader/hy.d.ts.map +0 -1
- package/locales/file-uploader/hy.js +0 -130
- package/locales/file-uploader/is.d.ts.map +0 -1
- package/locales/file-uploader/is.js +0 -131
- package/locales/file-uploader/it.d.ts.map +0 -1
- package/locales/file-uploader/it.js +0 -134
- package/locales/file-uploader/ja.d.ts.map +0 -1
- package/locales/file-uploader/ja.js +0 -131
- package/locales/file-uploader/ka.d.ts.map +0 -1
- package/locales/file-uploader/ka.js +0 -131
- package/locales/file-uploader/kk.d.ts.map +0 -1
- package/locales/file-uploader/kk.js +0 -131
- package/locales/file-uploader/ko.d.ts.map +0 -1
- package/locales/file-uploader/ko.js +0 -130
- package/locales/file-uploader/lv.d.ts.map +0 -1
- package/locales/file-uploader/lv.js +0 -133
- package/locales/file-uploader/nb.d.ts.map +0 -1
- package/locales/file-uploader/nb.js +0 -131
- package/locales/file-uploader/nl.d.ts.map +0 -1
- package/locales/file-uploader/nl.js +0 -132
- package/locales/file-uploader/pl.d.ts.map +0 -1
- package/locales/file-uploader/pl.js +0 -135
- package/locales/file-uploader/pt.d.ts.map +0 -1
- package/locales/file-uploader/pt.js +0 -134
- package/locales/file-uploader/ro.d.ts.map +0 -1
- package/locales/file-uploader/ro.js +0 -134
- package/locales/file-uploader/ru.d.ts.map +0 -1
- package/locales/file-uploader/ru.js +0 -133
- package/locales/file-uploader/sk.d.ts.map +0 -1
- package/locales/file-uploader/sk.js +0 -135
- package/locales/file-uploader/sr.d.ts.map +0 -1
- package/locales/file-uploader/sr.js +0 -133
- package/locales/file-uploader/sv.d.ts.map +0 -1
- package/locales/file-uploader/sv.js +0 -131
- package/locales/file-uploader/tr.d.ts.map +0 -1
- package/locales/file-uploader/tr.js +0 -131
- package/locales/file-uploader/uk.d.ts.map +0 -1
- package/locales/file-uploader/uk.js +0 -135
- package/locales/file-uploader/vi.d.ts.map +0 -1
- package/locales/file-uploader/vi.js +0 -131
- package/locales/file-uploader/zh-TW.d.ts.map +0 -1
- package/locales/file-uploader/zh-TW.js +0 -131
- package/locales/file-uploader/zh.d.ts.map +0 -1
- package/locales/file-uploader/zh.js +0 -129
- package/solutions/adaptive-image/index.d.ts +0 -3
- package/solutions/adaptive-image/index.d.ts.map +0 -1
- package/solutions/adaptive-image/index.js +0 -5
- package/solutions/cloud-image-editor/CloudImageEditor.d.ts +0 -39
- package/solutions/cloud-image-editor/CloudImageEditor.d.ts.map +0 -1
- package/solutions/cloud-image-editor/CloudImageEditor.js +0 -24
- package/solutions/cloud-image-editor/index.css +0 -2
- package/solutions/cloud-image-editor/index.d.ts +0 -6
- package/solutions/cloud-image-editor/index.d.ts.map +0 -1
- package/solutions/cloud-image-editor/index.js +0 -11
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +0 -27
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +0 -1
- package/solutions/file-uploader/inline/FileUploaderInline.js +0 -80
- package/solutions/file-uploader/inline/index.css +0 -54
- package/solutions/file-uploader/inline/index.d.ts +0 -2
- package/solutions/file-uploader/inline/index.d.ts.map +0 -1
- package/solutions/file-uploader/inline/index.js +0 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +0 -43
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +0 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +0 -163
- package/solutions/file-uploader/minimal/index.css +0 -147
- package/solutions/file-uploader/minimal/index.d.ts +0 -2
- package/solutions/file-uploader/minimal/index.d.ts.map +0 -1
- package/solutions/file-uploader/minimal/index.js +0 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +0 -24
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +0 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +0 -69
- package/solutions/file-uploader/regular/index.css +0 -1
- package/solutions/file-uploader/regular/index.d.ts +0 -2
- package/solutions/file-uploader/regular/index.d.ts.map +0 -1
- package/solutions/file-uploader/regular/index.js +0 -1
- package/types/events.d.ts +0 -5
- package/types/events.js +0 -1
- package/types/exported.d.ts +0 -534
- package/types/exported.js +0 -1
- package/types/global.d.ts +0 -8
- package/types/https.d.ts +0 -1
- package/types/index.d.ts +0 -2
- package/types/index.js +0 -3
- package/utils/WindowHeightTracker.d.ts +0 -24
- package/utils/WindowHeightTracker.d.ts.map +0 -1
- package/utils/WindowHeightTracker.js +0 -51
- package/utils/browser-info.d.ts +0 -13
- package/utils/browser-info.d.ts.map +0 -1
- package/utils/browser-info.js +0 -22
- package/utils/browser-info.test.d.ts +0 -2
- package/utils/browser-info.test.d.ts.map +0 -1
- package/utils/browser-info.test.js +0 -109
- package/utils/cdn-utils.d.ts +0 -59
- package/utils/cdn-utils.d.ts.map +0 -1
- package/utils/cdn-utils.js +0 -199
- package/utils/cdn-utils.test.d.ts +0 -2
- package/utils/cdn-utils.test.d.ts.map +0 -1
- package/utils/cdn-utils.test.js +0 -227
- package/utils/delay.d.ts +0 -2
- package/utils/delay.d.ts.map +0 -1
- package/utils/delay.js +0 -4
- package/utils/fileTypes.d.ts +0 -12
- package/utils/fileTypes.d.ts.map +0 -1
- package/utils/fileTypes.js +0 -111
- package/utils/fileTypes.test.d.ts +0 -2
- package/utils/fileTypes.test.d.ts.map +0 -1
- package/utils/fileTypes.test.js +0 -89
- package/utils/get-top-level-origin.d.ts +0 -2
- package/utils/get-top-level-origin.d.ts.map +0 -1
- package/utils/get-top-level-origin.js +0 -11
- package/utils/getLocaleDirection.d.ts +0 -2
- package/utils/getLocaleDirection.d.ts.map +0 -1
- package/utils/getLocaleDirection.js +0 -18
- package/utils/getPluralForm.d.ts +0 -3
- package/utils/getPluralForm.d.ts.map +0 -1
- package/utils/getPluralForm.js +0 -13
- package/utils/getPluralForm.test.d.ts +0 -2
- package/utils/getPluralForm.test.d.ts.map +0 -1
- package/utils/getPluralForm.test.js +0 -16
- package/utils/ifRef.d.ts +0 -7
- package/utils/ifRef.d.ts.map +0 -1
- package/utils/ifRef.js +0 -9
- package/utils/isPromiseLike.d.ts +0 -2
- package/utils/isPromiseLike.d.ts.map +0 -1
- package/utils/isPromiseLike.js +0 -12
- package/utils/isPromiseLike.test.d.ts +0 -2
- package/utils/isPromiseLike.test.d.ts.map +0 -1
- package/utils/isPromiseLike.test.js +0 -20
- package/utils/isSecureTokenExpired.d.ts +0 -4
- package/utils/isSecureTokenExpired.d.ts.map +0 -1
- package/utils/isSecureTokenExpired.js +0 -17
- package/utils/isSecureTokenExpired.test.d.ts +0 -2
- package/utils/isSecureTokenExpired.test.d.ts.map +0 -1
- package/utils/isSecureTokenExpired.test.js +0 -33
- package/utils/memoize.d.ts +0 -2
- package/utils/memoize.d.ts.map +0 -1
- package/utils/memoize.js +0 -23
- package/utils/memoize.test.d.ts +0 -2
- package/utils/memoize.test.d.ts.map +0 -1
- package/utils/memoize.test.js +0 -38
- package/utils/mixinClass.d.ts +0 -10
- package/utils/mixinClass.d.ts.map +0 -1
- package/utils/mixinClass.js +0 -18
- package/utils/parseCdnUrl.d.ts +0 -9
- package/utils/parseCdnUrl.d.ts.map +0 -1
- package/utils/parseCdnUrl.js +0 -23
- package/utils/parseCdnUrl.test.d.ts +0 -2
- package/utils/parseCdnUrl.test.d.ts.map +0 -1
- package/utils/parseCdnUrl.test.js +0 -91
- package/utils/parseShrink.d.ts +0 -5
- package/utils/parseShrink.d.ts.map +0 -1
- package/utils/parseShrink.js +0 -34
- package/utils/parseShrink.test.d.ts +0 -2
- package/utils/parseShrink.test.d.ts.map +0 -1
- package/utils/parseShrink.test.js +0 -26
- package/utils/prettyBytes.d.ts +0 -11
- package/utils/prettyBytes.d.ts.map +0 -1
- package/utils/prettyBytes.js +0 -64
- package/utils/prettyBytes.test.d.ts +0 -2
- package/utils/prettyBytes.test.d.ts.map +0 -1
- package/utils/prettyBytes.test.js +0 -99
- package/utils/stringToArray.d.ts +0 -2
- package/utils/stringToArray.d.ts.map +0 -1
- package/utils/stringToArray.js +0 -11
- package/utils/stringToArray.test.d.ts +0 -2
- package/utils/stringToArray.test.d.ts.map +0 -1
- package/utils/stringToArray.test.js +0 -20
- package/utils/template-utils.d.ts +0 -40
- package/utils/template-utils.d.ts.map +0 -1
- package/utils/template-utils.js +0 -50
- package/utils/template-utils.test.d.ts +0 -2
- package/utils/template-utils.test.d.ts.map +0 -1
- package/utils/template-utils.test.js +0 -56
- package/utils/toKebabCase.d.ts +0 -3
- package/utils/toKebabCase.d.ts.map +0 -1
- package/utils/toKebabCase.js +0 -15
- package/utils/toKebabCase.test.d.ts +0 -2
- package/utils/toKebabCase.test.d.ts.map +0 -1
- package/utils/toKebabCase.test.js +0 -11
- package/utils/transparentPixelSrc.d.ts +0 -2
- package/utils/transparentPixelSrc.d.ts.map +0 -1
- package/utils/transparentPixelSrc.js +0 -2
- package/utils/uniqueArray.d.ts +0 -2
- package/utils/uniqueArray.d.ts.map +0 -1
- package/utils/uniqueArray.js +0 -8
- package/utils/uniqueArray.test.d.ts +0 -2
- package/utils/uniqueArray.test.d.ts.map +0 -1
- package/utils/uniqueArray.test.js +0 -8
- package/utils/validators/collection/index.d.ts +0 -3
- package/utils/validators/collection/index.d.ts.map +0 -1
- package/utils/validators/collection/index.js +0 -2
- package/utils/validators/collection/validateCollectionUploadError.d.ts +0 -3
- package/utils/validators/collection/validateCollectionUploadError.d.ts.map +0 -1
- package/utils/validators/collection/validateCollectionUploadError.js +0 -11
- package/utils/validators/collection/validateMultiple.d.ts +0 -3
- package/utils/validators/collection/validateMultiple.d.ts.map +0 -1
- package/utils/validators/collection/validateMultiple.js +0 -43
- package/utils/validators/file/index.d.ts +0 -5
- package/utils/validators/file/index.d.ts.map +0 -1
- package/utils/validators/file/index.js +0 -4
- package/utils/validators/file/validateFileType.d.ts +0 -3
- package/utils/validators/file/validateFileType.d.ts.map +0 -1
- package/utils/validators/file/validateFileType.js +0 -30
- package/utils/validators/file/validateIsImage.d.ts +0 -3
- package/utils/validators/file/validateIsImage.d.ts.map +0 -1
- package/utils/validators/file/validateIsImage.js +0 -25
- package/utils/validators/file/validateMaxSizeLimit.d.ts +0 -3
- package/utils/validators/file/validateMaxSizeLimit.d.ts.map +0 -1
- package/utils/validators/file/validateMaxSizeLimit.js +0 -15
- package/utils/validators/file/validateUploadError.d.ts +0 -3
- package/utils/validators/file/validateUploadError.d.ts.map +0 -1
- package/utils/validators/file/validateUploadError.js +0 -48
- package/utils/waitForAttribute.d.ts +0 -8
- package/utils/waitForAttribute.d.ts.map +0 -1
- package/utils/waitForAttribute.js +0 -43
- package/utils/waitForAttribute.test.d.ts +0 -2
- package/utils/waitForAttribute.test.d.ts.map +0 -1
- package/utils/waitForAttribute.test.js +0 -78
- package/utils/warnOnce.d.ts +0 -3
- package/utils/warnOnce.d.ts.map +0 -1
- package/utils/warnOnce.js +0 -11
- package/utils/wildcardRegexp.d.ts +0 -2
- package/utils/wildcardRegexp.d.ts.map +0 -1
- package/utils/wildcardRegexp.js +0 -17
- package/utils/wildcardRegexp.test.d.ts +0 -2
- package/utils/wildcardRegexp.test.d.ts.map +0 -1
- package/utils/wildcardRegexp.test.js +0 -19
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Note: dataTransfer will be destroyed outside of the call stack. So, do not try to process it asynchronous.
|
|
3
|
-
*
|
|
4
|
-
* @param {DataTransfer} dataTransfer
|
|
5
|
-
* @returns {Promise<DropItem[]>}
|
|
6
|
-
*/
|
|
7
|
-
export function getDropItems(dataTransfer: DataTransfer): Promise<DropItem[]>;
|
|
8
|
-
export type DropItem = {
|
|
9
|
-
type: "file";
|
|
10
|
-
file: File;
|
|
11
|
-
fullPath?: string;
|
|
12
|
-
} | {
|
|
13
|
-
type: "url";
|
|
14
|
-
url: string;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=getDropItems.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDropItems.d.ts","sourceRoot":"","sources":["getDropItems.js"],"names":[],"mappings":"AAwGA;;;;;GAKG;AACH,2CAHW,YAAY,GACV,OAAO,CAAC,QAAQ,EAAE,CAAC,CA0D/B;uBAnKY;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {{
|
|
5
|
-
* type: 'file';
|
|
6
|
-
* file: File;
|
|
7
|
-
* fullPath?: string;
|
|
8
|
-
* }
|
|
9
|
-
* | {
|
|
10
|
-
* type: 'url';
|
|
11
|
-
* url: string;
|
|
12
|
-
* }} DropItem
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @param {File} file
|
|
17
|
-
* @returns {Promise<boolean>}
|
|
18
|
-
*/
|
|
19
|
-
function checkIsDirectory(file) {
|
|
20
|
-
return new Promise((resolve) => {
|
|
21
|
-
if (typeof window.FileReader !== 'function') {
|
|
22
|
-
resolve(false);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
let reader = new FileReader();
|
|
27
|
-
reader.onerror = () => {
|
|
28
|
-
resolve(true);
|
|
29
|
-
};
|
|
30
|
-
/** @param {Event} e */
|
|
31
|
-
let onLoad = (e) => {
|
|
32
|
-
if (e.type !== 'loadend') {
|
|
33
|
-
reader.abort();
|
|
34
|
-
}
|
|
35
|
-
resolve(false);
|
|
36
|
-
};
|
|
37
|
-
reader.onloadend = onLoad;
|
|
38
|
-
reader.onprogress = onLoad;
|
|
39
|
-
|
|
40
|
-
reader.readAsDataURL(file);
|
|
41
|
-
} catch (err) {
|
|
42
|
-
resolve(false);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @param {FileSystemEntry} webkitEntry
|
|
49
|
-
* @param {string} dataTransferItemType
|
|
50
|
-
* @returns {Promise<DropItem[] | null>}
|
|
51
|
-
*/
|
|
52
|
-
function readEntryContentAsync(webkitEntry, dataTransferItemType) {
|
|
53
|
-
return new Promise((resolve) => {
|
|
54
|
-
let reading = 0;
|
|
55
|
-
/** @type {DropItem[]} */
|
|
56
|
-
const dropItems = [];
|
|
57
|
-
|
|
58
|
-
/** @param {FileSystemEntry} entry */
|
|
59
|
-
const readEntry = (entry) => {
|
|
60
|
-
if (!entry) {
|
|
61
|
-
console.warn('Unexpectedly received empty content entry', { scope: 'drag-and-drop' });
|
|
62
|
-
resolve(null);
|
|
63
|
-
}
|
|
64
|
-
if (entry.isFile) {
|
|
65
|
-
reading++;
|
|
66
|
-
/** @type {FileSystemFileEntry} */ (entry).file((file) => {
|
|
67
|
-
reading--;
|
|
68
|
-
// webkitGetAsEntry don't provide type for HEIC images at least, so we use type value from dataTransferItem
|
|
69
|
-
const clonedFile = new File([file], file.name, { type: file.type || dataTransferItemType });
|
|
70
|
-
dropItems.push({
|
|
71
|
-
type: 'file',
|
|
72
|
-
file: clonedFile,
|
|
73
|
-
fullPath: entry.fullPath,
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
if (reading === 0) {
|
|
77
|
-
resolve(dropItems);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
} else if (entry.isDirectory) {
|
|
81
|
-
readReaderContent(/** @type {FileSystemDirectoryEntry} */ (entry).createReader());
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/** @param {FileSystemDirectoryReader} reader */
|
|
86
|
-
let readReaderContent = (reader) => {
|
|
87
|
-
reading++;
|
|
88
|
-
|
|
89
|
-
reader.readEntries((entries) => {
|
|
90
|
-
reading--;
|
|
91
|
-
for (let entry of entries) {
|
|
92
|
-
readEntry(entry);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (reading === 0) {
|
|
96
|
-
resolve(dropItems);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
readEntry(webkitEntry);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Note: dataTransfer will be destroyed outside of the call stack. So, do not try to process it asynchronous.
|
|
107
|
-
*
|
|
108
|
-
* @param {DataTransfer} dataTransfer
|
|
109
|
-
* @returns {Promise<DropItem[]>}
|
|
110
|
-
*/
|
|
111
|
-
export function getDropItems(dataTransfer) {
|
|
112
|
-
/** @type {DropItem[]} */
|
|
113
|
-
const dropItems = [];
|
|
114
|
-
const promises = [];
|
|
115
|
-
for (let i = 0; i < dataTransfer.items.length; i++) {
|
|
116
|
-
let item = dataTransfer.items[i];
|
|
117
|
-
if (!item) {
|
|
118
|
-
continue;
|
|
119
|
-
}
|
|
120
|
-
if (item.kind === 'file') {
|
|
121
|
-
const itemType = item.type;
|
|
122
|
-
if (typeof item.webkitGetAsEntry === 'function' || typeof (/** @type {any} */ (item).getAsEntry) === 'function') {
|
|
123
|
-
let entry =
|
|
124
|
-
typeof item.webkitGetAsEntry === 'function'
|
|
125
|
-
? item.webkitGetAsEntry()
|
|
126
|
-
: /** @type {any} */ (item).getAsEntry();
|
|
127
|
-
promises.push(
|
|
128
|
-
readEntryContentAsync(entry, itemType).then((items) => {
|
|
129
|
-
if (items) {
|
|
130
|
-
dropItems.push(...items);
|
|
131
|
-
}
|
|
132
|
-
}),
|
|
133
|
-
);
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const file = item.getAsFile();
|
|
138
|
-
file &&
|
|
139
|
-
promises.push(
|
|
140
|
-
checkIsDirectory(file).then((isDirectory) => {
|
|
141
|
-
if (isDirectory) {
|
|
142
|
-
// we can't get directory files, so we'll skip it
|
|
143
|
-
} else {
|
|
144
|
-
dropItems.push({
|
|
145
|
-
type: 'file',
|
|
146
|
-
file,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}),
|
|
150
|
-
);
|
|
151
|
-
} else if (item.kind === 'string' && item.type.match('^text/uri-list')) {
|
|
152
|
-
promises.push(
|
|
153
|
-
new Promise((resolve) => {
|
|
154
|
-
item.getAsString((value) => {
|
|
155
|
-
dropItems.push({
|
|
156
|
-
type: 'url',
|
|
157
|
-
url: value,
|
|
158
|
-
});
|
|
159
|
-
resolve(undefined);
|
|
160
|
-
});
|
|
161
|
-
}),
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return Promise.all(promises).then(() => dropItems);
|
|
167
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/** @typedef {{ externalSourceType: string }} ActivityParams */
|
|
2
|
-
export class ExternalSource extends UploaderBlock {
|
|
3
|
-
activityType: "external";
|
|
4
|
-
init$: {
|
|
5
|
-
activityIcon: string;
|
|
6
|
-
activityCaption: string;
|
|
7
|
-
/** @type {import('./types.js').InputMessageMap['selected-files-change']['selectedFiles']} */
|
|
8
|
-
selectedList: import("./types.js").InputMessageMap["selected-files-change"]["selectedFiles"];
|
|
9
|
-
total: number;
|
|
10
|
-
isSelectionReady: boolean;
|
|
11
|
-
isDoneBtnEnabled: boolean;
|
|
12
|
-
couldSelectAll: boolean;
|
|
13
|
-
couldDeselectAll: boolean;
|
|
14
|
-
showSelectionStatus: boolean;
|
|
15
|
-
counterText: string;
|
|
16
|
-
doneBtnTextClass: string;
|
|
17
|
-
toolbarVisible: boolean;
|
|
18
|
-
onDone: () => void;
|
|
19
|
-
onCancel: () => void;
|
|
20
|
-
onSelectAll: () => void;
|
|
21
|
-
onDeselectAll: () => void;
|
|
22
|
-
'*commonProgress': number;
|
|
23
|
-
'*uploadList': never[];
|
|
24
|
-
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
25
|
-
'*collectionErrors': import("../../index.js").OutputErrorCollection[];
|
|
26
|
-
'*collectionState': import("../../index.js").OutputCollectionState | null;
|
|
27
|
-
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
28
|
-
'*uploadTrigger': Set<string>;
|
|
29
|
-
'*secureUploadsManager': import("../../abstract/managers/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
30
|
-
'*currentActivity': null;
|
|
31
|
-
'*currentActivityParams': {};
|
|
32
|
-
'*history': never[];
|
|
33
|
-
'*historyBack': null;
|
|
34
|
-
'*closeModal': () => void;
|
|
35
|
-
};
|
|
36
|
-
/** @type {ActivityParams} */
|
|
37
|
-
get activityParams(): ActivityParams;
|
|
38
|
-
/**
|
|
39
|
-
* @private
|
|
40
|
-
* @param {NonNullable<import('./types.js').InputMessageMap['selected-files-change']['selectedFiles']>[number]} selectedFile
|
|
41
|
-
*/
|
|
42
|
-
private extractUrlFromSelectedFile;
|
|
43
|
-
/**
|
|
44
|
-
* @private
|
|
45
|
-
* @param {import('./types.js').InputMessageMap['toolbar-state-change']} message
|
|
46
|
-
*/
|
|
47
|
-
private handleToolbarStateChange;
|
|
48
|
-
/**
|
|
49
|
-
* @private
|
|
50
|
-
* @param {import('./types.js').InputMessageMap['selected-files-change']} message
|
|
51
|
-
*/
|
|
52
|
-
private handleSelectedFilesChange;
|
|
53
|
-
/** @private */
|
|
54
|
-
private handleIframeLoad;
|
|
55
|
-
/** @private */
|
|
56
|
-
private applyTheme;
|
|
57
|
-
/**
|
|
58
|
-
* @private
|
|
59
|
-
* @param {string} css
|
|
60
|
-
*/
|
|
61
|
-
private applyEmbedCss;
|
|
62
|
-
/** @private */
|
|
63
|
-
private setupL10n;
|
|
64
|
-
/** @private */
|
|
65
|
-
private remoteUrl;
|
|
66
|
-
/** @private */
|
|
67
|
-
private mountIframe;
|
|
68
|
-
/** @private */
|
|
69
|
-
private _messageBridge;
|
|
70
|
-
/** @private */
|
|
71
|
-
private unmountIframe;
|
|
72
|
-
/** @private */
|
|
73
|
-
private resetSelectionStatus;
|
|
74
|
-
}
|
|
75
|
-
export namespace ExternalSource {
|
|
76
|
-
let template: string;
|
|
77
|
-
}
|
|
78
|
-
export type ActivityParams = {
|
|
79
|
-
externalSourceType: string;
|
|
80
|
-
};
|
|
81
|
-
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
82
|
-
//# sourceMappingURL=ExternalSource.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalSource.d.ts","sourceRoot":"","sources":["ExternalSource.js"],"names":[],"mappings":"AAkBA,+DAA+D;AAE/D;IAEE,yBAAiD;IAK/C;;;QAKE,6FAA6F;sBAAlF,OAAO,YAAY,EAAE,eAAe,CAAC,uBAAuB,CAAC,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmC1F;IAGH,6BAA6B;IAC7B,sBADW,cAAc,CAOxB;IAgDD;;;OAGG;IACH,mCAcC;IAED;;;OAGG;IACH,iCAIC;IAED;;;OAGG;IACH,kCAsBC;IAED,eAAe;IACf,yBAIC;IAED,eAAe;IACf,mBAKC;IAED;;;OAGG;IACH,sBAKC;IAED,eAAe;IACf,kBAKC;IAED,eAAe;IACf,kBAkBC;IAED,eAAe;IACf,oBA8BC;IANC,eAAe;IACf,uBAA6D;IAO/D,eAAe;IACf,sBAMC;IAED,eAAe;IACf,6BASC;CACF;;;;6BAjRa;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE;8BAdd,iCAAiC"}
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
import { create } from '@symbiotejs/symbiote';
|
|
4
|
-
import { ActivityBlock } from '../../abstract/ActivityBlock.js';
|
|
5
|
-
import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
6
|
-
import { stringToArray } from '../../utils/stringToArray.js';
|
|
7
|
-
import { wildcardRegexp } from '../../utils/wildcardRegexp.js';
|
|
8
|
-
import { buildThemeDefinition } from './buildThemeDefinition.js';
|
|
9
|
-
import { MessageBridge } from './MessageBridge.js';
|
|
10
|
-
import { queryString } from './query-string.js';
|
|
11
|
-
import { getTopLevelOrigin } from '../../utils/get-top-level-origin.js';
|
|
12
|
-
import { ExternalUploadSource } from '../utils/UploadSource.js';
|
|
13
|
-
|
|
14
|
-
/** @type {Record<string, string>} */
|
|
15
|
-
const SOCIAL_SOURCE_MAPPING = {
|
|
16
|
-
[ExternalUploadSource.GDRIVE]: 'ngdrive',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/** @typedef {{ externalSourceType: string }} ActivityParams */
|
|
20
|
-
|
|
21
|
-
export class ExternalSource extends UploaderBlock {
|
|
22
|
-
couldBeCtxOwner = true;
|
|
23
|
-
activityType = ActivityBlock.activities.EXTERNAL;
|
|
24
|
-
|
|
25
|
-
constructor() {
|
|
26
|
-
super();
|
|
27
|
-
|
|
28
|
-
this.init$ = {
|
|
29
|
-
...this.init$,
|
|
30
|
-
activityIcon: '',
|
|
31
|
-
activityCaption: '',
|
|
32
|
-
|
|
33
|
-
/** @type {import('./types.js').InputMessageMap['selected-files-change']['selectedFiles']} */
|
|
34
|
-
selectedList: [],
|
|
35
|
-
total: 0,
|
|
36
|
-
|
|
37
|
-
isSelectionReady: false,
|
|
38
|
-
isDoneBtnEnabled: false,
|
|
39
|
-
couldSelectAll: false,
|
|
40
|
-
couldDeselectAll: false,
|
|
41
|
-
showSelectionStatus: false,
|
|
42
|
-
counterText: '',
|
|
43
|
-
doneBtnTextClass: 'uc-hidden',
|
|
44
|
-
toolbarVisible: true,
|
|
45
|
-
|
|
46
|
-
onDone: () => {
|
|
47
|
-
for (const message of this.$.selectedList) {
|
|
48
|
-
const url = this.extractUrlFromSelectedFile(message);
|
|
49
|
-
const { filename } = message;
|
|
50
|
-
const { externalSourceType } = this.activityParams;
|
|
51
|
-
this.api.addFileFromUrl(url, { fileName: filename, source: externalSourceType });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
this.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
55
|
-
this.modalManager.open(ActivityBlock.activities.UPLOAD_LIST);
|
|
56
|
-
},
|
|
57
|
-
onCancel: () => {
|
|
58
|
-
this.historyBack();
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
onSelectAll: () => {
|
|
62
|
-
this._messageBridge?.send({ type: 'select-all' });
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
onDeselectAll: () => {
|
|
66
|
-
this._messageBridge?.send({ type: 'deselect-all' });
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** @type {ActivityParams} */
|
|
72
|
-
get activityParams() {
|
|
73
|
-
const params = super.activityParams;
|
|
74
|
-
if ('externalSourceType' in params) {
|
|
75
|
-
return params;
|
|
76
|
-
}
|
|
77
|
-
throw new Error(`External Source activity params not found`);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
initCallback() {
|
|
81
|
-
super.initCallback();
|
|
82
|
-
this.registerActivity(this.activityType, {
|
|
83
|
-
onActivate: () => {
|
|
84
|
-
let { externalSourceType } = /** @type {ActivityParams} */ (this.activityParams);
|
|
85
|
-
|
|
86
|
-
if (!externalSourceType) {
|
|
87
|
-
this.modalManager.close(this.$['*currentActivity']);
|
|
88
|
-
this.$['*currentActivity'] = null;
|
|
89
|
-
console.error(`Param "externalSourceType" is required for activity "${this.activityType}"`);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
this.set$({
|
|
94
|
-
activityCaption: `${externalSourceType?.[0].toUpperCase()}${externalSourceType?.slice(1)}`,
|
|
95
|
-
activityIcon: externalSourceType,
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
this.mountIframe();
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
this.sub('*currentActivityParams', (val) => {
|
|
102
|
-
if (!this.isActivityActive) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
this.unmountIframe();
|
|
106
|
-
this.mountIframe();
|
|
107
|
-
});
|
|
108
|
-
this.sub('*currentActivity', (val) => {
|
|
109
|
-
if (val !== this.activityType) {
|
|
110
|
-
this.unmountIframe();
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
this.subConfigValue('multiple', (multiple) => {
|
|
114
|
-
this.$.showSelectionStatus = multiple;
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
this.subConfigValue('localeName', (val) => {
|
|
118
|
-
this.setupL10n();
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
this.subConfigValue('externalSourcesEmbedCss', (embedCss) => {
|
|
122
|
-
this.applyEmbedCss(embedCss);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @private
|
|
128
|
-
* @param {NonNullable<import('./types.js').InputMessageMap['selected-files-change']['selectedFiles']>[number]} selectedFile
|
|
129
|
-
*/
|
|
130
|
-
extractUrlFromSelectedFile(selectedFile) {
|
|
131
|
-
if (selectedFile.alternatives) {
|
|
132
|
-
const preferredTypes = stringToArray(this.cfg.externalSourcesPreferredTypes);
|
|
133
|
-
for (const preferredType of preferredTypes) {
|
|
134
|
-
const regexp = wildcardRegexp(preferredType);
|
|
135
|
-
for (const [type, typeUrl] of Object.entries(selectedFile.alternatives)) {
|
|
136
|
-
if (regexp.test(type)) {
|
|
137
|
-
return typeUrl;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return selectedFile.url;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @private
|
|
148
|
-
* @param {import('./types.js').InputMessageMap['toolbar-state-change']} message
|
|
149
|
-
*/
|
|
150
|
-
handleToolbarStateChange(message) {
|
|
151
|
-
this.set$({
|
|
152
|
-
toolbarVisible: message.isVisible,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* @private
|
|
158
|
-
* @param {import('./types.js').InputMessageMap['selected-files-change']} message
|
|
159
|
-
*/
|
|
160
|
-
async handleSelectedFilesChange(message) {
|
|
161
|
-
if (this.cfg.multiple !== message.isMultipleMode) {
|
|
162
|
-
console.error('Multiple mode mismatch');
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
this.bindL10n('counterText', () =>
|
|
167
|
-
this.l10n('selected-count', {
|
|
168
|
-
count: message.selectedCount,
|
|
169
|
-
total: message.total,
|
|
170
|
-
}),
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
this.set$({
|
|
174
|
-
doneBtnTextClass: message.isReady ? '' : 'uc-hidden',
|
|
175
|
-
isSelectionReady: message.isReady,
|
|
176
|
-
isDoneBtnEnabled: message.isReady && message.selectedFiles.length > 0,
|
|
177
|
-
showSelectionStatus: message.isMultipleMode && message.total > 0,
|
|
178
|
-
couldSelectAll: message.selectedCount < message.total,
|
|
179
|
-
couldDeselectAll: message.selectedCount === message.total,
|
|
180
|
-
selectedList: message.selectedFiles,
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/** @private */
|
|
185
|
-
handleIframeLoad() {
|
|
186
|
-
this.applyEmbedCss(this.cfg.externalSourcesEmbedCss);
|
|
187
|
-
this.applyTheme();
|
|
188
|
-
this.setupL10n();
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/** @private */
|
|
192
|
-
applyTheme() {
|
|
193
|
-
this._messageBridge?.send({
|
|
194
|
-
type: 'set-theme-definition',
|
|
195
|
-
theme: buildThemeDefinition(this),
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* @private
|
|
201
|
-
* @param {string} css
|
|
202
|
-
*/
|
|
203
|
-
applyEmbedCss(css) {
|
|
204
|
-
this._messageBridge?.send({
|
|
205
|
-
type: 'set-embed-css',
|
|
206
|
-
css,
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/** @private */
|
|
211
|
-
setupL10n() {
|
|
212
|
-
this._messageBridge?.send({
|
|
213
|
-
type: 'set-locale-definition',
|
|
214
|
-
localeDefinition: this.cfg.localeName,
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/** @private */
|
|
219
|
-
remoteUrl() {
|
|
220
|
-
const { pubkey, remoteTabSessionKey, socialBaseUrl, multiple } = this.cfg;
|
|
221
|
-
const { externalSourceType } = this.activityParams;
|
|
222
|
-
const sourceName = SOCIAL_SOURCE_MAPPING[externalSourceType] ?? externalSourceType;
|
|
223
|
-
const lang = this.l10n('social-source-lang')?.split('-')?.[0] || 'en';
|
|
224
|
-
const params = {
|
|
225
|
-
lang,
|
|
226
|
-
public_key: pubkey,
|
|
227
|
-
images_only: false.toString(),
|
|
228
|
-
session_key: remoteTabSessionKey,
|
|
229
|
-
wait_for_theme: true,
|
|
230
|
-
multiple: multiple.toString(),
|
|
231
|
-
origin: this.cfg.topLevelOrigin || getTopLevelOrigin(),
|
|
232
|
-
debug: this.cfg.debug,
|
|
233
|
-
};
|
|
234
|
-
const url = new URL(`/window4/${sourceName}`, socialBaseUrl);
|
|
235
|
-
url.search = queryString(params);
|
|
236
|
-
return url.toString();
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/** @private */
|
|
240
|
-
mountIframe() {
|
|
241
|
-
/** @type {HTMLIFrameElement} */
|
|
242
|
-
// @ts-ignore
|
|
243
|
-
let iframe = create({
|
|
244
|
-
tag: 'iframe',
|
|
245
|
-
attributes: {
|
|
246
|
-
src: this.remoteUrl(),
|
|
247
|
-
marginheight: 0,
|
|
248
|
-
marginwidth: 0,
|
|
249
|
-
frameborder: 0,
|
|
250
|
-
allowTransparency: true,
|
|
251
|
-
},
|
|
252
|
-
});
|
|
253
|
-
iframe.addEventListener('load', this.handleIframeLoad.bind(this));
|
|
254
|
-
|
|
255
|
-
this.ref.iframeWrapper.innerHTML = '';
|
|
256
|
-
this.ref.iframeWrapper.appendChild(iframe);
|
|
257
|
-
|
|
258
|
-
if (!iframe.contentWindow) {
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
this._messageBridge?.destroy();
|
|
263
|
-
|
|
264
|
-
/** @private */
|
|
265
|
-
this._messageBridge = new MessageBridge(iframe.contentWindow);
|
|
266
|
-
this._messageBridge.on('selected-files-change', this.handleSelectedFilesChange.bind(this));
|
|
267
|
-
this._messageBridge.on('toolbar-state-change', this.handleToolbarStateChange.bind(this));
|
|
268
|
-
|
|
269
|
-
this.resetSelectionStatus();
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/** @private */
|
|
273
|
-
unmountIframe() {
|
|
274
|
-
this._messageBridge?.destroy();
|
|
275
|
-
this._messageBridge = undefined;
|
|
276
|
-
this.ref.iframeWrapper.innerHTML = '';
|
|
277
|
-
|
|
278
|
-
this.resetSelectionStatus();
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/** @private */
|
|
282
|
-
resetSelectionStatus() {
|
|
283
|
-
this.set$({
|
|
284
|
-
selectedList: [],
|
|
285
|
-
total: 0,
|
|
286
|
-
isDoneBtnEnabled: false,
|
|
287
|
-
couldSelectAll: false,
|
|
288
|
-
couldDeselectAll: false,
|
|
289
|
-
showSelectionStatus: false,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
ExternalSource.template = /* HTML */ `
|
|
295
|
-
<uc-activity-header>
|
|
296
|
-
<button
|
|
297
|
-
type="button"
|
|
298
|
-
class="uc-mini-btn uc-close-btn"
|
|
299
|
-
set="onclick: *historyBack"
|
|
300
|
-
l10n="@title:a11y-activity-header-button-close;@aria-label:a11y-activity-header-button-close"
|
|
301
|
-
>
|
|
302
|
-
<uc-icon name="close"></uc-icon>
|
|
303
|
-
</button>
|
|
304
|
-
</uc-activity-header>
|
|
305
|
-
<div class="uc-content">
|
|
306
|
-
<div ref="iframeWrapper" class="uc-iframe-wrapper"></div>
|
|
307
|
-
<div class="uc-toolbar" set="@hidden: !toolbarVisible">
|
|
308
|
-
<button type="button" class="uc-cancel-btn uc-secondary-btn" set="onclick: onCancel" l10n="cancel"></button>
|
|
309
|
-
<div set="@hidden: !showSelectionStatus" class="uc-selection-status-box">
|
|
310
|
-
<span>{{counterText}}</span>
|
|
311
|
-
<button type="button" set="onclick: onSelectAll; @hidden: !couldSelectAll" l10n="select-all"></button>
|
|
312
|
-
<button type="button" set="onclick: onDeselectAll; @hidden: !couldDeselectAll" l10n="deselect-all"></button>
|
|
313
|
-
</div>
|
|
314
|
-
<button type="button" class="uc-done-btn uc-primary-btn" set="onclick: onDone; @disabled: !isDoneBtnEnabled;">
|
|
315
|
-
<uc-spinner set="@hidden: isSelectionReady"></uc-spinner>
|
|
316
|
-
<span l10n="done" set="@class: doneBtnTextClass"></span>
|
|
317
|
-
</button>
|
|
318
|
-
</div>
|
|
319
|
-
</div>
|
|
320
|
-
`;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export class MessageBridge {
|
|
2
|
-
/** @param {Window} context */
|
|
3
|
-
constructor(context: Window);
|
|
4
|
-
/** @type {Map<string, Set<import('./types').InputMessageHandler<import('./types').InputMessageType>>>} */
|
|
5
|
-
_handlerMap: Map<string, Set<import("./types").InputMessageHandler<import("./types").InputMessageType>>>;
|
|
6
|
-
/** @type {Window} */
|
|
7
|
-
_context: Window;
|
|
8
|
-
/** @param {MessageEvent} e */
|
|
9
|
-
_handleMessage: (e: MessageEvent) => void;
|
|
10
|
-
/**
|
|
11
|
-
* @template {import('./types').InputMessageType} T
|
|
12
|
-
* @param {T} type
|
|
13
|
-
* @param {import('./types').InputMessageHandler<T>} handler
|
|
14
|
-
*/
|
|
15
|
-
on<T extends import("./types").InputMessageType>(type: T, handler: import("./types").InputMessageHandler<T>): void;
|
|
16
|
-
/** @param {import('./types').OutputMessage} message */
|
|
17
|
-
send(message: import("./types").OutputMessage): void;
|
|
18
|
-
destroy(): void;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=MessageBridge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBridge.d.ts","sourceRoot":"","sources":["MessageBridge.js"],"names":[],"mappings":"AAkBA;IAOE,8BAA8B;IAC9B,qBADY,MAAM,EAKjB;IAXD,0GAA0G;IAC1G,aADW,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,SAAS,EAAE,mBAAmB,CAAC,OAAO,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAC9E;IAExB,qBAAqB;IACrB,UADW,MAAM,CACR;IAST,8BAA8B;IAC9B,iBAAkB,GADN,YACO,UAejB;IAEF;;;;OAIG;IACH,GAJkD,CAAC,SAAtC,OAAQ,SAAS,EAAE,gBAAiB,QACtC,CAAC,WACD,OAAO,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC,QASlD;IAED,uDAAuD;IACvD,cADY,OAAO,SAAS,EAAE,aAAa,QAG1C;IAED,gBAEC;CACF"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
/** @type {import('./types').InputMessageType[]} */
|
|
4
|
-
const MESSAGE_TYPE_WHITELIST = ['selected-files-change', 'toolbar-state-change'];
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @param {unknown} message
|
|
8
|
-
* @returns {message is import("./types").InputMessageMap[import("./types").InputMessageType]}
|
|
9
|
-
*/
|
|
10
|
-
const isWhitelistedMessage = (message) => {
|
|
11
|
-
if (!message) return false;
|
|
12
|
-
if (typeof message !== 'object') return false;
|
|
13
|
-
return (
|
|
14
|
-
'type' in message &&
|
|
15
|
-
MESSAGE_TYPE_WHITELIST.includes(/** @type {import('./types').InputMessageType} */ (message.type))
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export class MessageBridge {
|
|
20
|
-
/** @type {Map<string, Set<import('./types').InputMessageHandler<import('./types').InputMessageType>>>} */
|
|
21
|
-
_handlerMap = new Map();
|
|
22
|
-
|
|
23
|
-
/** @type {Window} */
|
|
24
|
-
_context;
|
|
25
|
-
|
|
26
|
-
/** @param {Window} context */
|
|
27
|
-
constructor(context) {
|
|
28
|
-
this._context = context;
|
|
29
|
-
|
|
30
|
-
window.addEventListener('message', this._handleMessage);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** @param {MessageEvent} e */
|
|
34
|
-
_handleMessage = (e) => {
|
|
35
|
-
if (e.source !== this._context) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const message = e.data;
|
|
39
|
-
if (!isWhitelistedMessage(message)) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const handlers = this._handlerMap.get(message.type);
|
|
44
|
-
if (handlers) {
|
|
45
|
-
for (const handler of handlers) {
|
|
46
|
-
handler(message);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @template {import('./types').InputMessageType} T
|
|
53
|
-
* @param {T} type
|
|
54
|
-
* @param {import('./types').InputMessageHandler<T>} handler
|
|
55
|
-
*/
|
|
56
|
-
on(type, handler) {
|
|
57
|
-
const handlers = this._handlerMap.get(type) ?? new Set();
|
|
58
|
-
if (!this._handlerMap.has(type)) {
|
|
59
|
-
this._handlerMap.set(type, handlers);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
handlers.add(/** @type {import('./types').InputMessageHandler<import('./types').InputMessageType>} */ (handler));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/** @param {import('./types').OutputMessage} message */
|
|
66
|
-
send(message) {
|
|
67
|
-
this._context.postMessage(message, '*');
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
destroy() {
|
|
71
|
-
window.removeEventListener('message', this._handleMessage);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildThemeDefinition.d.ts","sourceRoot":"","sources":["buildThemeDefinition.js"],"names":[],"mappings":"AAqCA,mCAAmC;AACnC,8CADY,WAAW,8DAStB"}
|