@uploadcare/file-uploader 1.5.2 → 1.5.3-alpha.2
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/README.md +5 -5
- package/abstract/ActivityBlock.d.ts +3 -3
- package/abstract/ActivityBlock.d.ts.map +1 -1
- package/abstract/Block.d.ts +4 -11
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +16 -16
- package/abstract/CTX.d.ts +7 -7
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/CTX.js +1 -1
- package/abstract/LocaleManager.d.ts +3 -3
- package/abstract/SecureUploadsManager.d.ts +2 -2
- package/abstract/SecureUploadsManager.d.ts.map +1 -1
- package/abstract/SolutionBlock.d.ts +2 -2
- package/abstract/SolutionBlock.d.ts.map +1 -1
- package/abstract/TypedCollection.d.ts +1 -1
- package/abstract/TypedCollection.d.ts.map +1 -1
- package/abstract/TypedCollection.js +4 -4
- package/abstract/TypedData.d.ts +2 -2
- package/abstract/TypedData.d.ts.map +1 -1
- package/abstract/TypedData.js +4 -4
- package/abstract/UploaderBlock.d.ts +5 -5
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +5 -5
- package/abstract/UploaderPublicApi.d.ts +22 -21
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +3 -3
- package/abstract/ValidationManager.d.ts +3 -3
- package/abstract/ValidationManager.d.ts.map +1 -1
- package/abstract/a11y.d.ts +2 -2
- package/abstract/a11y.d.ts.map +1 -1
- package/abstract/buildOutputCollectionState.d.ts +1 -1
- package/abstract/buildOutputCollectionState.d.ts.map +1 -1
- package/abstract/defineComponents.d.ts.map +1 -1
- package/abstract/defineComponents.js +5 -0
- package/abstract/l10nProcessor.d.ts.map +1 -1
- package/abstract/l10nProcessor.js +3 -3
- package/abstract/loadFileUploaderFrom.d.ts.map +1 -1
- package/abstract/localeRegistry.d.ts.map +1 -1
- package/abstract/sharedConfigKey.d.ts.map +1 -1
- package/abstract/uploadEntrySchema.d.ts +2 -2
- package/abstract/uploadEntrySchema.d.ts.map +1 -1
- package/abstract/uploadEntrySchema.js +1 -1
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
- package/blocks/CameraSource/CameraSource.js +5 -4
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +11 -11
- package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.js +2 -1
- package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +2 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +3 -7
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +2 -2
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorOperationControl.js +1 -1
- package/blocks/CloudImageEditor/src/EditorScroller.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorScroller.js +2 -1
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.js +2 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.js +4 -3
- package/blocks/CloudImageEditor/src/crop-utils.d.ts +14 -14
- package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/css/common.css +2 -2
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +3 -3
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +2 -1
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +3 -2
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +2 -1
- package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +1 -1
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +3 -3
- package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/state.d.ts +4 -4
- package/blocks/CloudImageEditor/src/svg-sprite.d.ts +1 -1
- package/blocks/CloudImageEditor/src/svg-sprite.js +1 -1
- package/blocks/CloudImageEditor/src/template.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/template.js +2 -1
- package/blocks/CloudImageEditor/src/types.d.ts +2 -2
- package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +2 -1
- package/blocks/Config/Config.d.ts +3 -11
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/initialConfig.d.ts +1 -1
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Copyright/Copyright.d.ts.map +1 -1
- package/blocks/Copyright/Copyright.js +2 -1
- package/blocks/DropArea/DropArea.d.ts +2 -2
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/DropArea/DropArea.js +3 -3
- package/blocks/DropArea/addDropzone.d.ts.map +1 -1
- package/blocks/DropArea/getDropItems.d.ts +2 -2
- package/blocks/DropArea/getDropItems.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.d.ts +5 -5
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +3 -3
- package/blocks/ExternalSource/buildStyles.js +2 -2
- package/blocks/ExternalSource/query-string.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.d.ts +3 -2
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +13 -7
- package/blocks/FormInput/FormInput.js +1 -1
- package/blocks/Icon/Icon.d.ts +0 -1
- package/blocks/Icon/Icon.d.ts.map +1 -1
- package/blocks/Icon/Icon.js +2 -4
- package/blocks/Img/ImgBase.js +9 -9
- package/blocks/Img/ImgConfig.d.ts +2 -2
- package/blocks/Img/ImgConfig.d.ts.map +1 -1
- package/blocks/Img/ImgConfig.js +3 -3
- package/blocks/Img/utils/parseObjectToString.js +1 -1
- package/blocks/Modal/Modal.d.ts.map +1 -1
- package/blocks/Modal/Modal.js +2 -1
- package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/blocks/ProgressBar/ProgressBar.js +2 -1
- package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts.map +1 -1
- package/blocks/ProgressBarCommon/ProgressBarCommon.js +2 -1
- package/blocks/Select/Select.d.ts.map +1 -1
- package/blocks/Select/Select.js +14 -9
- package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.js +2 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +3 -3
- package/blocks/SourceList/SourceList.d.ts.map +1 -1
- package/blocks/SourceList/SourceList.js +5 -4
- package/blocks/StartFrom/StartFrom.d.ts.map +1 -1
- package/blocks/StartFrom/StartFrom.js +2 -1
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +19 -19
- package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -1
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +4 -4
- package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.d.ts +2 -2
- package/blocks/UploadList/UploadList.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.js +4 -5
- package/blocks/UrlSource/UrlSource.d.ts.map +1 -1
- package/blocks/UrlSource/UrlSource.js +3 -2
- package/blocks/themes/uc-basic/index.css +0 -1
- package/blocks/themes/uc-basic/svg-sprite.d.ts +1 -1
- package/blocks/themes/uc-basic/svg-sprite.js +1 -1
- package/blocks/utils/debounce.d.ts +3 -1
- package/blocks/utils/debounce.d.ts.map +1 -1
- package/blocks/utils/throttle.d.ts +3 -1
- package/blocks/utils/throttle.d.ts.map +1 -1
- package/blocks/utils/userAgent.d.ts +1 -1
- package/blocks/utils/userAgent.d.ts.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.ssr.d.ts +115 -1
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +122 -11
- package/locales/file-uploader/ar.d.ts +5 -0
- package/locales/file-uploader/ar.js +5 -0
- package/locales/file-uploader/az.d.ts +5 -0
- package/locales/file-uploader/az.js +5 -0
- package/locales/file-uploader/ca.d.ts +5 -0
- package/locales/file-uploader/ca.js +5 -0
- package/locales/file-uploader/cs.d.ts +5 -0
- package/locales/file-uploader/cs.js +5 -0
- package/locales/file-uploader/da.d.ts +5 -0
- package/locales/file-uploader/da.js +5 -0
- package/locales/file-uploader/de.d.ts +5 -0
- package/locales/file-uploader/de.js +5 -0
- package/locales/file-uploader/el.d.ts +5 -0
- package/locales/file-uploader/el.js +5 -0
- package/locales/file-uploader/en.d.ts +5 -0
- package/locales/file-uploader/en.js +5 -0
- package/locales/file-uploader/es.d.ts +5 -0
- package/locales/file-uploader/es.js +5 -0
- package/locales/file-uploader/et.d.ts +5 -0
- package/locales/file-uploader/et.js +5 -0
- package/locales/file-uploader/fr.d.ts +5 -0
- package/locales/file-uploader/fr.js +5 -0
- package/locales/file-uploader/he.d.ts +5 -0
- package/locales/file-uploader/he.js +5 -0
- package/locales/file-uploader/hy.d.ts +5 -0
- package/locales/file-uploader/hy.js +5 -0
- package/locales/file-uploader/is.d.ts +5 -0
- package/locales/file-uploader/is.js +5 -0
- package/locales/file-uploader/it.d.ts +5 -0
- package/locales/file-uploader/it.js +5 -0
- package/locales/file-uploader/ja.d.ts +5 -0
- package/locales/file-uploader/ja.js +5 -0
- package/locales/file-uploader/ka.d.ts +5 -0
- package/locales/file-uploader/ka.js +5 -0
- package/locales/file-uploader/kk.d.ts +5 -0
- package/locales/file-uploader/kk.js +5 -0
- package/locales/file-uploader/ko.d.ts +5 -0
- package/locales/file-uploader/ko.js +5 -0
- package/locales/file-uploader/lv.d.ts +5 -0
- package/locales/file-uploader/lv.js +5 -0
- package/locales/file-uploader/nb.d.ts +5 -0
- package/locales/file-uploader/nb.js +5 -0
- package/locales/file-uploader/nl.d.ts +5 -0
- package/locales/file-uploader/nl.js +5 -0
- package/locales/file-uploader/pl.d.ts +5 -0
- package/locales/file-uploader/pl.js +5 -0
- package/locales/file-uploader/pt.d.ts +5 -0
- package/locales/file-uploader/pt.js +5 -0
- package/locales/file-uploader/ro.d.ts +5 -0
- package/locales/file-uploader/ro.js +5 -0
- package/locales/file-uploader/ru.d.ts +5 -0
- package/locales/file-uploader/ru.js +5 -0
- package/locales/file-uploader/sk.d.ts +5 -0
- package/locales/file-uploader/sk.js +5 -0
- package/locales/file-uploader/sr.d.ts +5 -0
- package/locales/file-uploader/sr.js +5 -0
- package/locales/file-uploader/sv.d.ts +5 -0
- package/locales/file-uploader/sv.js +5 -0
- package/locales/file-uploader/tr.d.ts +5 -0
- package/locales/file-uploader/tr.js +5 -0
- package/locales/file-uploader/uk.d.ts +5 -0
- package/locales/file-uploader/uk.js +5 -0
- package/locales/file-uploader/vi.d.ts +5 -0
- package/locales/file-uploader/vi.js +5 -0
- package/locales/file-uploader/zh-TW.d.ts +5 -0
- package/locales/file-uploader/zh-TW.js +5 -0
- package/locales/file-uploader/zh.d.ts +5 -0
- package/locales/file-uploader/zh.js +5 -0
- package/package.json +10 -7
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts +2 -2
- package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
- package/solutions/file-uploader/inline/FileUploaderInline.js +3 -4
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +2 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +3 -3
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +2 -1
- package/symbiote.js +19 -0
- package/types/jsx.d.ts +9 -3
- package/utils/getPluralForm.d.ts.map +1 -1
- package/utils/isSecureTokenExpired.d.ts +1 -1
- package/utils/memoize.d.ts.map +1 -1
- package/utils/mixinClass.d.ts +3 -1
- package/utils/mixinClass.d.ts.map +1 -1
- package/utils/prettyBytes.d.ts.map +1 -1
- package/utils/template-utils.d.ts.map +1 -1
- package/utils/toKebabCase.d.ts.map +1 -1
- package/utils/uniqueArray.d.ts.map +1 -1
- package/utils/validators/collection/validateCollectionUploadError.d.ts +1 -1
- package/utils/validators/collection/validateMultiple.d.ts +1 -1
- package/utils/validators/file/validateFileType.d.ts +1 -1
- package/utils/validators/file/validateIsImage.d.ts +1 -1
- package/utils/validators/file/validateMaxSizeLimit.d.ts +1 -1
- package/utils/validators/file/validateUploadError.d.ts +1 -1
- package/utils/waitForAttribute.d.ts +12 -6
- package/utils/waitForAttribute.d.ts.map +1 -1
- package/utils/waitForAttribute.js +38 -8
- package/utils/waitForAttribute.test.js +10 -47
- package/utils/withResolvers.d.ts +7 -0
- package/utils/withResolvers.d.ts.map +1 -0
- package/utils/withResolvers.js +17 -0
- package/utils/withResolvers.test.d.ts +2 -0
- package/utils/withResolvers.test.d.ts.map +1 -0
- package/utils/withResolvers.test.js +27 -0
- package/web/file-uploader.iife.min.js +5 -4
- package/web/file-uploader.min.js +5 -4
- package/web/uc-basic.min.css +1 -1
- package/web/uc-cloud-image-editor.min.css +1 -1
- package/web/uc-cloud-image-editor.min.js +5 -4
- package/web/uc-file-uploader-inline.min.css +1 -1
- package/web/uc-file-uploader-inline.min.js +5 -4
- package/web/uc-file-uploader-minimal.min.js +4 -3
- package/web/uc-file-uploader-regular.min.css +1 -1
- package/web/uc-file-uploader-regular.min.js +5 -4
- package/web/uc-img.min.js +4 -3
- 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/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
|
@@ -114,6 +114,11 @@ declare const _default: {
|
|
|
114
114
|
'a11y-cloud-editor-apply-filter': string;
|
|
115
115
|
'a11y-cloud-editor-apply-crop': string;
|
|
116
116
|
'a11y-cloud-editor-apply-tuning': string;
|
|
117
|
+
finished: string;
|
|
118
|
+
failed: string;
|
|
119
|
+
uploading: string;
|
|
120
|
+
idle: string;
|
|
121
|
+
'a11y-file-item-status': string;
|
|
117
122
|
};
|
|
118
123
|
export default _default;
|
|
119
124
|
//# sourceMappingURL=sk.d.ts.map
|
|
@@ -115,4 +115,9 @@ export default {
|
|
|
115
115
|
'a11y-cloud-editor-apply-filter': 'Použiť filter {{name}}',
|
|
116
116
|
'a11y-cloud-editor-apply-crop': 'Použiť operáciu {{name}}',
|
|
117
117
|
'a11y-cloud-editor-apply-tuning': 'Použiť ladenie {{name}}',
|
|
118
|
+
finished: 'Dokončené',
|
|
119
|
+
failed: 'Neúspešné',
|
|
120
|
+
uploading: 'Nahrávanie',
|
|
121
|
+
idle: 'Nečinný',
|
|
122
|
+
'a11y-file-item-status': 'Súbor {{fileName}} je v stave {{status}}',
|
|
118
123
|
};
|
|
@@ -112,6 +112,11 @@ declare const _default: {
|
|
|
112
112
|
'a11y-cloud-editor-apply-filter': string;
|
|
113
113
|
'a11y-cloud-editor-apply-crop': string;
|
|
114
114
|
'a11y-cloud-editor-apply-tuning': string;
|
|
115
|
+
finished: string;
|
|
116
|
+
failed: string;
|
|
117
|
+
uploading: string;
|
|
118
|
+
idle: string;
|
|
119
|
+
'a11y-file-item-status': string;
|
|
115
120
|
};
|
|
116
121
|
export default _default;
|
|
117
122
|
//# sourceMappingURL=sr.d.ts.map
|
|
@@ -113,4 +113,9 @@ export default {
|
|
|
113
113
|
'a11y-cloud-editor-apply-filter': 'Primeni filter {{name}}',
|
|
114
114
|
'a11y-cloud-editor-apply-crop': 'Primeni operaciju {{name}}',
|
|
115
115
|
'a11y-cloud-editor-apply-tuning': 'Primeni podešavanje {{name}}',
|
|
116
|
+
finished: 'Završeno',
|
|
117
|
+
failed: 'Neuspešno',
|
|
118
|
+
uploading: 'Otpremanje',
|
|
119
|
+
idle: 'Neaktivan',
|
|
120
|
+
'a11y-file-item-status': 'Datoteka {{fileName}} je u statusu {{status}}',
|
|
116
121
|
};
|
|
@@ -110,6 +110,11 @@ declare const _default: {
|
|
|
110
110
|
'a11y-cloud-editor-apply-filter': string;
|
|
111
111
|
'a11y-cloud-editor-apply-crop': string;
|
|
112
112
|
'a11y-cloud-editor-apply-tuning': string;
|
|
113
|
+
finished: string;
|
|
114
|
+
failed: string;
|
|
115
|
+
uploading: string;
|
|
116
|
+
idle: string;
|
|
117
|
+
'a11y-file-item-status': string;
|
|
113
118
|
};
|
|
114
119
|
export default _default;
|
|
115
120
|
//# sourceMappingURL=sv.d.ts.map
|
|
@@ -111,4 +111,9 @@ export default {
|
|
|
111
111
|
'a11y-cloud-editor-apply-filter': 'Applicera filter {{name}}',
|
|
112
112
|
'a11y-cloud-editor-apply-crop': 'Applicera {{name}} operation',
|
|
113
113
|
'a11y-cloud-editor-apply-tuning': 'Applicera {{name}} inställning',
|
|
114
|
+
finished: 'Slutfört',
|
|
115
|
+
failed: 'Misslyckades',
|
|
116
|
+
uploading: 'Laddar upp',
|
|
117
|
+
idle: 'Overksam',
|
|
118
|
+
'a11y-file-item-status': 'Filen {{fileName}} är i status {{status}}',
|
|
114
119
|
};
|
|
@@ -110,6 +110,11 @@ declare const _default: {
|
|
|
110
110
|
'a11y-cloud-editor-apply-filter': string;
|
|
111
111
|
'a11y-cloud-editor-apply-crop': string;
|
|
112
112
|
'a11y-cloud-editor-apply-tuning': string;
|
|
113
|
+
finished: string;
|
|
114
|
+
failed: string;
|
|
115
|
+
uploading: string;
|
|
116
|
+
idle: string;
|
|
117
|
+
'a11y-file-item-status': string;
|
|
113
118
|
};
|
|
114
119
|
export default _default;
|
|
115
120
|
//# sourceMappingURL=tr.d.ts.map
|
|
@@ -111,4 +111,9 @@ export default {
|
|
|
111
111
|
'a11y-cloud-editor-apply-filter': '{{name}} filtresini uygula',
|
|
112
112
|
'a11y-cloud-editor-apply-crop': '{{name}} işlemini uygula',
|
|
113
113
|
'a11y-cloud-editor-apply-tuning': '{{name}} ayarını uygula',
|
|
114
|
+
finished: 'Tamamlandı',
|
|
115
|
+
failed: 'Başarısız',
|
|
116
|
+
uploading: 'Yükleniyor',
|
|
117
|
+
idle: 'Boşta',
|
|
118
|
+
'a11y-file-item-status': '{{fileName}} dosyası {{status}} durumunda',
|
|
114
119
|
};
|
|
@@ -114,6 +114,11 @@ declare const _default: {
|
|
|
114
114
|
'a11y-cloud-editor-apply-filter': string;
|
|
115
115
|
'a11y-cloud-editor-apply-crop': string;
|
|
116
116
|
'a11y-cloud-editor-apply-tuning': string;
|
|
117
|
+
finished: string;
|
|
118
|
+
failed: string;
|
|
119
|
+
uploading: string;
|
|
120
|
+
idle: string;
|
|
121
|
+
'a11y-file-item-status': string;
|
|
117
122
|
};
|
|
118
123
|
export default _default;
|
|
119
124
|
//# sourceMappingURL=uk.d.ts.map
|
|
@@ -115,4 +115,9 @@ export default {
|
|
|
115
115
|
'a11y-cloud-editor-apply-filter': 'Застосувати фільтр {{name}}',
|
|
116
116
|
'a11y-cloud-editor-apply-crop': 'Застосувати операцію {{name}}',
|
|
117
117
|
'a11y-cloud-editor-apply-tuning': 'Застосувати налаштування {{name}}',
|
|
118
|
+
finished: 'Завершено',
|
|
119
|
+
failed: 'Не вдалося',
|
|
120
|
+
uploading: 'Завантаження',
|
|
121
|
+
idle: 'Очікування',
|
|
122
|
+
'a11y-file-item-status': 'Файл {{fileName}} у стані {{status}}',
|
|
118
123
|
};
|
|
@@ -110,6 +110,11 @@ declare const _default: {
|
|
|
110
110
|
'a11y-cloud-editor-apply-filter': string;
|
|
111
111
|
'a11y-cloud-editor-apply-crop': string;
|
|
112
112
|
'a11y-cloud-editor-apply-tuning': string;
|
|
113
|
+
finished: string;
|
|
114
|
+
failed: string;
|
|
115
|
+
uploading: string;
|
|
116
|
+
idle: string;
|
|
117
|
+
'a11y-file-item-status': string;
|
|
113
118
|
};
|
|
114
119
|
export default _default;
|
|
115
120
|
//# sourceMappingURL=vi.d.ts.map
|
|
@@ -111,4 +111,9 @@ export default {
|
|
|
111
111
|
'a11y-cloud-editor-apply-filter': 'Áp dụng bộ lọc {{name}}',
|
|
112
112
|
'a11y-cloud-editor-apply-crop': 'Áp dụng thao tác {{name}}',
|
|
113
113
|
'a11y-cloud-editor-apply-tuning': 'Áp dụng điều chỉnh {{name}}',
|
|
114
|
+
finished: 'Hoàn thành',
|
|
115
|
+
failed: 'Thất bại',
|
|
116
|
+
uploading: 'Đang tải lên',
|
|
117
|
+
idle: 'Nhàn rỗi',
|
|
118
|
+
'a11y-file-item-status': 'Tệp {{fileName}} ở trạng thái {{status}}',
|
|
114
119
|
};
|
|
@@ -110,6 +110,11 @@ declare const _default: {
|
|
|
110
110
|
'a11y-cloud-editor-apply-filter': string;
|
|
111
111
|
'a11y-cloud-editor-apply-crop': string;
|
|
112
112
|
'a11y-cloud-editor-apply-tuning': string;
|
|
113
|
+
finished: string;
|
|
114
|
+
failed: string;
|
|
115
|
+
uploading: string;
|
|
116
|
+
idle: string;
|
|
117
|
+
'a11y-file-item-status': string;
|
|
113
118
|
};
|
|
114
119
|
export default _default;
|
|
115
120
|
//# sourceMappingURL=zh-TW.d.ts.map
|
|
@@ -111,4 +111,9 @@ export default {
|
|
|
111
111
|
'a11y-cloud-editor-apply-filter': '應用 {{name}} 篩選器',
|
|
112
112
|
'a11y-cloud-editor-apply-crop': '應用 {{name}} 操作',
|
|
113
113
|
'a11y-cloud-editor-apply-tuning': '應用 {{name}} 調整',
|
|
114
|
+
finished: '完成',
|
|
115
|
+
failed: '失敗',
|
|
116
|
+
uploading: '上傳中',
|
|
117
|
+
idle: '閒置',
|
|
118
|
+
'a11y-file-item-status': '檔案 {{fileName}} 的狀態是 {{status}}',
|
|
114
119
|
};
|
|
@@ -110,6 +110,11 @@ declare const _default: {
|
|
|
110
110
|
'a11y-cloud-editor-apply-filter': string;
|
|
111
111
|
'a11y-cloud-editor-apply-crop': string;
|
|
112
112
|
'a11y-cloud-editor-apply-tuning': string;
|
|
113
|
+
finished: string;
|
|
114
|
+
failed: string;
|
|
115
|
+
uploading: string;
|
|
116
|
+
idle: string;
|
|
117
|
+
'a11y-file-item-status': string;
|
|
113
118
|
};
|
|
114
119
|
export default _default;
|
|
115
120
|
//# sourceMappingURL=zh.d.ts.map
|
|
@@ -111,4 +111,9 @@ export default {
|
|
|
111
111
|
'a11y-cloud-editor-apply-filter': '应用 {{name}} 过滤器',
|
|
112
112
|
'a11y-cloud-editor-apply-crop': '应用 {{name}} 操作',
|
|
113
113
|
'a11y-cloud-editor-apply-tuning': '应用 {{name}} 调整',
|
|
114
|
+
finished: '已完成',
|
|
115
|
+
failed: '失败',
|
|
116
|
+
uploading: '上传中',
|
|
117
|
+
idle: '空闲',
|
|
118
|
+
'a11y-file-item-status': '文件 {{fileName}} 的状态是 {{status}}',
|
|
114
119
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadcare/file-uploader",
|
|
3
|
-
"version": "1.5.2",
|
|
3
|
+
"version": "1.5.3-alpha.2",
|
|
4
4
|
"description": "Building blocks for Uploadcare products integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web components",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"repository": "https://github.com/uploadcare/file-uploader/",
|
|
54
54
|
"files": [
|
|
55
55
|
"{abstract,blocks,solutions,web,utils,types,locales}/**/*.{js,css,d.ts,d.ts.map}",
|
|
56
|
+
"symbiote.js",
|
|
56
57
|
"index.{js,d.ts,d.ts.map}",
|
|
57
58
|
"index.ssr.{js,d.ts,d.ts.map}",
|
|
58
59
|
"env.{js,d.ts,d.ts.map}",
|
|
@@ -99,12 +100,12 @@
|
|
|
99
100
|
"@happy-dom/global-registrator": "^9.8.4",
|
|
100
101
|
"@jam-do/jam-tools": "^0.0.4",
|
|
101
102
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
102
|
-
"@types/chai": "^4.3.
|
|
103
|
+
"@types/chai": "^4.3.17",
|
|
103
104
|
"@types/mocha": "^10.0.1",
|
|
104
105
|
"@types/node": "^18.15.11",
|
|
105
106
|
"@types/react": "^18.2.34",
|
|
106
|
-
"@web/dev-server": "^0.
|
|
107
|
-
"@web/test-runner": "^0.
|
|
107
|
+
"@web/dev-server": "^0.4.6",
|
|
108
|
+
"@web/test-runner": "^0.18.2",
|
|
108
109
|
"esbuild": "^0.19.9",
|
|
109
110
|
"eslint": "^8.56.0",
|
|
110
111
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -128,15 +129,17 @@
|
|
|
128
129
|
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
|
|
129
130
|
"stylelint-order": "^6.0.3",
|
|
130
131
|
"svg-sprite": "^2.0.4",
|
|
131
|
-
"tsd": "^0.
|
|
132
|
-
"typescript": "^5.
|
|
132
|
+
"tsd": "^0.31.1",
|
|
133
|
+
"typescript": "^5.5.4"
|
|
133
134
|
},
|
|
134
135
|
"author": "Uploadcare Inc.",
|
|
135
136
|
"license": "MIT",
|
|
136
137
|
"dependencies": {
|
|
137
|
-
"@symbiotejs/symbiote": "^
|
|
138
|
+
"@symbiotejs/symbiote": "^2.3.1",
|
|
139
|
+
"@types/sinon": "^17.0.3",
|
|
138
140
|
"@uploadcare/image-shrink": "^6.14.1",
|
|
139
141
|
"@uploadcare/upload-client": "^6.14.1",
|
|
142
|
+
"D": "^1.0.0",
|
|
140
143
|
"keyux": "^0.7.1"
|
|
141
144
|
}
|
|
142
145
|
}
|
|
@@ -5,8 +5,8 @@ export class FileUploaderInline extends SolutionBlock {
|
|
|
5
5
|
'*commonProgress': number;
|
|
6
6
|
'*uploadList': never[];
|
|
7
7
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
8
|
-
'*collectionErrors':
|
|
9
|
-
'*collectionState': import("./index.js").OutputCollectionState
|
|
8
|
+
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
9
|
+
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
10
10
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
11
11
|
'*uploadTrigger': Set<string>;
|
|
12
12
|
'*secureUploadsManager': import("../../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderInline.d.ts","sourceRoot":"","sources":["FileUploaderInline.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileUploaderInline.d.ts","sourceRoot":"","sources":["FileUploaderInline.js"],"names":[],"mappings":"AAKA;IAMI;;;;;;oCAUA,YACF;mCAIK,YAAU;6BAAmF,2BAGhF;;wCAOf,2CAA2B;;;;;;MAf3B;IAGH,gCAGC;IAED,6BAEC;CA0BF;;;;8BAtD6B,oCAAoC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
+
import { html } from '../../../symbiote.js';
|
|
2
3
|
import { ActivityBlock } from '../../../abstract/ActivityBlock.js';
|
|
3
4
|
import { SolutionBlock } from '../../../abstract/SolutionBlock.js';
|
|
4
5
|
|
|
@@ -56,8 +57,7 @@ export class FileUploaderInline extends SolutionBlock {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
FileUploaderInline.template =
|
|
60
|
-
<uc-start-from>
|
|
60
|
+
FileUploaderInline.template = html` <uc-start-from>
|
|
61
61
|
<uc-drop-area with-icon clickable></uc-drop-area>
|
|
62
62
|
<uc-source-list wrap></uc-source-list>
|
|
63
63
|
<button
|
|
@@ -72,5 +72,4 @@ FileUploaderInline.template = /* HTML */ `
|
|
|
72
72
|
<uc-camera-source></uc-camera-source>
|
|
73
73
|
<uc-url-source></uc-url-source>
|
|
74
74
|
<uc-external-source></uc-external-source>
|
|
75
|
-
<uc-cloud-image-editor-activity></uc-cloud-image-editor-activity
|
|
76
|
-
`;
|
|
75
|
+
<uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderMinimal.d.ts","sourceRoot":"","sources":["FileUploaderMinimal.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileUploaderMinimal.d.ts","sourceRoot":"","sources":["FileUploaderMinimal.js"],"names":[],"mappings":"AAIA;CAkCC;;;;8BApC6B,oCAAoC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { html } from '../../../symbiote.js';
|
|
1
2
|
import { ActivityBlock } from '../../../abstract/ActivityBlock.js';
|
|
2
3
|
import { SolutionBlock } from '../../../abstract/SolutionBlock.js';
|
|
3
4
|
|
|
@@ -37,7 +38,7 @@ export class FileUploaderMinimal extends SolutionBlock {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
FileUploaderMinimal.template =
|
|
41
|
+
FileUploaderMinimal.template = html`
|
|
41
42
|
<uc-start-from>
|
|
42
43
|
<uc-drop-area tabindex="0" clickable l10n="choose-file"></uc-drop-area>
|
|
43
44
|
<uc-copyright></uc-copyright>
|
|
@@ -4,9 +4,9 @@ export class FileUploaderRegular extends SolutionBlock {
|
|
|
4
4
|
'*commonProgress': number;
|
|
5
5
|
'*uploadList': never[];
|
|
6
6
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
7
|
-
'*collectionErrors':
|
|
8
|
-
'*collectionState': import("./index.js").OutputCollectionState
|
|
9
|
-
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
7
|
+
'*collectionErrors': import("./index.js").OutputErrorCollection[];
|
|
8
|
+
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
9
|
+
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
10
10
|
'*uploadTrigger': Set<string>;
|
|
11
11
|
'*secureUploadsManager': import("../../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
12
12
|
'*currentActivity': null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderRegular.d.ts","sourceRoot":"","sources":["FileUploaderRegular.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileUploaderRegular.d.ts","sourceRoot":"","sources":["FileUploaderRegular.js"],"names":[],"mappings":"AAMA;IAMI;;;;;oCAWwC,YACvC;mCAKC,YAAI;6BAEoC,2BAC1B;;wCAIZ,2CAAuB;;;;;;MArB1B;IAoBG,eAAe;IACf,yBAAmC;CAK1C;;;;8BAvC6B,oCAAoC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
+
import { html } from '../../../symbiote.js';
|
|
2
3
|
import { SolutionBlock } from '../../../abstract/SolutionBlock.js';
|
|
3
4
|
import { asBoolean } from '../../../blocks/Config/normalizeConfigValue.js';
|
|
4
5
|
import { EventType } from '../../../blocks/UploadCtxProvider/EventEmitter.js';
|
|
@@ -40,7 +41,7 @@ export class FileUploaderRegular extends SolutionBlock {
|
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
FileUploaderRegular.template =
|
|
44
|
+
FileUploaderRegular.template = html`
|
|
44
45
|
<uc-simple-btn set="@hidden: isHidden"></uc-simple-btn>
|
|
45
46
|
|
|
46
47
|
<uc-modal strokes block-body-scrolling>
|
package/symbiote.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { setConstants } from '@symbiotejs/symbiote';
|
|
2
|
+
export {
|
|
3
|
+
Symbiote,
|
|
4
|
+
Symbiote as BaseComponent,
|
|
5
|
+
PubSub,
|
|
6
|
+
PubSub as Data,
|
|
7
|
+
UID,
|
|
8
|
+
html,
|
|
9
|
+
create,
|
|
10
|
+
applyStyles,
|
|
11
|
+
DICT,
|
|
12
|
+
} from '@symbiotejs/symbiote';
|
|
13
|
+
export { slotProcessor } from '@symbiotejs/symbiote/core/slotProcessor.js';
|
|
14
|
+
|
|
15
|
+
setConstants({
|
|
16
|
+
BIND_ATTR: 'set',
|
|
17
|
+
CTX_NAME_ATTR: 'ctx-name',
|
|
18
|
+
CSS_CTX_PROP: '--ctx-name',
|
|
19
|
+
});
|
package/types/jsx.d.ts
CHANGED
|
@@ -8,9 +8,15 @@ type FileUploaderRegular = import('../index.js').FileUploaderRegular;
|
|
|
8
8
|
type FileUploaderMinimal = import('../index.js').FileUploaderMinimal;
|
|
9
9
|
type FormInput = import('../index.js').FormInput;
|
|
10
10
|
type CloudImageEditorBlock = import('../index.js').CloudImageEditorBlock;
|
|
11
|
-
type CtxAttributes =
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
type CtxAttributes =
|
|
12
|
+
| {
|
|
13
|
+
ctx: string;
|
|
14
|
+
'ctx-name'?: never;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
ctx?: never;
|
|
18
|
+
'ctx-name': string;
|
|
19
|
+
};
|
|
14
20
|
type CommonHtmlAttributes<T> = Partial<
|
|
15
21
|
Pick<React.HTMLAttributes<T>, 'id' | 'children' | 'hidden'> & { class: React.HTMLAttributes<T>['className'] }
|
|
16
22
|
>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPluralForm.d.ts","sourceRoot":"","sources":["getPluralForm.js"],"names":[],"mappings":"AASO,sCAJI,MAAM,SACN,MAAM,GACJ,UAAU,CAKtB;yBAVa,
|
|
1
|
+
{"version":3,"file":"getPluralForm.d.ts","sourceRoot":"","sources":["getPluralForm.js"],"names":[],"mappings":"AASO,sCAJI,MAAM,SACN,MAAM,GACJ,UAAU,CAKtB;yBAVa,IAAI,CAAC,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function isSecureTokenExpired(secureToken: import(
|
|
1
|
+
export function isSecureTokenExpired(secureToken: import("../types").SecureUploadsSignatureAndExpire, { threshold }: {
|
|
2
2
|
threshold?: number;
|
|
3
3
|
}): boolean;
|
|
4
4
|
//# sourceMappingURL=isSecureTokenExpired.d.ts.map
|
package/utils/memoize.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoize.d.ts","sourceRoot":"","sources":["memoize.js"],"names":[],"mappings":"AASO,
|
|
1
|
+
{"version":3,"file":"memoize.d.ts","sourceRoot":"","sources":["memoize.js"],"names":[],"mappings":"AASO,wBANc,KAAK,SAAZ,GAAG,EAAG,EACD,OAAO,kBACiB,CAAC,SAA/B,CAAE,GAAG,IAAI,EAAE,KAAK,KAAK,OAAQ,MAC/B,CAAC,GACC,CAAC,CAeb"}
|
package/utils/mixinClass.d.ts
CHANGED
|
@@ -4,5 +4,7 @@ export type GConstructor<T> = new (...args: any[]) => T;
|
|
|
4
4
|
* are some dynamic generated properties or native overrides in the class. We're use it to define dynamic access
|
|
5
5
|
* properties and events to subscribe to.
|
|
6
6
|
*/
|
|
7
|
-
export type MixinClass<Base extends GConstructor<HTMLElement>, InstanceProperties extends Record<string, any> = {}> =
|
|
7
|
+
export type MixinClass<Base extends GConstructor<HTMLElement>, InstanceProperties extends Record<string, any> = {}> = {
|
|
8
|
+
new (...args: ConstructorParameters<Base>): InstanceProperties & InstanceType<Base>;
|
|
9
|
+
} & Omit<Base, "new">;
|
|
8
10
|
//# sourceMappingURL=mixinClass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixinClass.d.ts","sourceRoot":"","sources":["mixinClass.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mixinClass.d.ts","sourceRoot":"","sources":["mixinClass.js"],"names":[],"mappings":"yBACa,CAAC,IACD,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC;;;;;;uBAQG,IAAI,SAA/B,YAAY,CAAC,WAAW,CAAE,EACJ,kBAAkB,SAAxC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAE,SACrB;IACZ,KAAS,GAAG,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC,GAAG,kBAAkB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;CACrF,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prettyBytes.d.ts","sourceRoot":"","sources":["prettyBytes.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAiBI,mCAJI,MAAM,SACN,CAAC,
|
|
1
|
+
{"version":3,"file":"prettyBytes.d.ts","sourceRoot":"","sources":["prettyBytes.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAiBI,mCAJI,MAAM,SACN,CAAC,OAAO,YAAY,EAAE,MAAM,OAAO,YAAY,CAAC,GAC9C,MAAM,CAmClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-utils.d.ts","sourceRoot":"","sources":["template-utils.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AAEH;;;;;GAKG;AACH,yHAQC;AAED;;;GAGG;AACH,oDAFa;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,EAAE,CAiB5E"}
|
|
1
|
+
{"version":3,"file":"template-utils.d.ts","sourceRoot":"","sources":["template-utils.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AAEH;;;;;GAKG;AACH,yHAQC;AAED;;;GAGG;AACH,oDAFa;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,EAAE,CAiB5E;;;;;;;;;;;;;;;wBAjDa;IAAE,CAAC,GAAG,QAAQ,GAAG,4BAA4B,SAAS,CAAA;CAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["toKebabCase.js"],"names":[],"mappings":"AAUO,
|
|
1
|
+
{"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["toKebabCase.js"],"names":[],"mappings":"AAUO,4BAJe,CAAC,SAAV,MAAQ,OACV,CAAC,GACC,SAAS,CAAC,CAAC,CAAC,CAMX;sBAbQ,CAAC,SAAV,MAAQ,IACR,CAAC,SAAS,GAAG,MAAM,IAAI,IAAI,MAAM,IAAI,EAAE,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniqueArray.d.ts","sourceRoot":"","sources":["uniqueArray.js"],"names":[],"mappings":"AAKO,
|
|
1
|
+
{"version":3,"file":"uniqueArray.d.ts","sourceRoot":"","sources":["uniqueArray.js"],"names":[],"mappings":"AAKO,4BAJM,CAAC,OACH,CAAC,EAAE,GACD,CAAC,EAAE,CAIf"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @type {import('../../../abstract/ValidationManager.js').FuncCollectionValidator} */
|
|
2
|
-
export const validateCollectionUploadError: import(
|
|
2
|
+
export const validateCollectionUploadError: import("../../../abstract/ValidationManager.js").FuncCollectionValidator;
|
|
3
3
|
//# sourceMappingURL=validateCollectionUploadError.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @type {import('../../../abstract/ValidationManager.js').FuncCollectionValidator} */
|
|
2
|
-
export const validateMultiple: import(
|
|
2
|
+
export const validateMultiple: import("../../../abstract/ValidationManager.js").FuncCollectionValidator;
|
|
3
3
|
//# sourceMappingURL=validateMultiple.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @type {import('../../../abstract/ValidationManager.js').FuncFileValidator} */
|
|
2
|
-
export const validateFileType: import(
|
|
2
|
+
export const validateFileType: import("../../../abstract/ValidationManager.js").FuncFileValidator;
|
|
3
3
|
//# sourceMappingURL=validateFileType.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @type {import('../../../abstract/ValidationManager.js').FuncFileValidator} */
|
|
2
|
-
export const validateIsImage: import(
|
|
2
|
+
export const validateIsImage: import("../../../abstract/ValidationManager.js").FuncFileValidator;
|
|
3
3
|
//# sourceMappingURL=validateIsImage.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @type {import('../../../abstract/ValidationManager.js').FuncFileValidator} */
|
|
2
|
-
export const validateMaxSizeLimit: import(
|
|
2
|
+
export const validateMaxSizeLimit: import("../../../abstract/ValidationManager.js").FuncFileValidator;
|
|
3
3
|
//# sourceMappingURL=validateMaxSizeLimit.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @type {import('../../../abstract/ValidationManager.js').FuncFileValidator} */
|
|
2
|
-
export const validateUploadError: import(
|
|
2
|
+
export const validateUploadError: import("../../../abstract/ValidationManager.js").FuncFileValidator;
|
|
3
3
|
//# sourceMappingURL=validateUploadError.d.ts.map
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
export function waitForAttribute({ element, attribute,
|
|
1
|
+
export function waitForAttribute<T extends string>({ element, attribute, timeout }: {
|
|
2
2
|
element: HTMLElement;
|
|
3
|
-
attribute:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
attribute: T;
|
|
4
|
+
timeout?: number;
|
|
5
|
+
}): Promise<ReturnType<T>>;
|
|
6
|
+
export type ReturnType<T extends string> = {
|
|
7
|
+
success: true;
|
|
8
|
+
attribute: T;
|
|
9
|
+
value: string;
|
|
10
|
+
} | {
|
|
11
|
+
success: false;
|
|
12
|
+
attribute: T;
|
|
13
|
+
};
|
|
8
14
|
//# sourceMappingURL=waitForAttribute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitForAttribute.d.ts","sourceRoot":"","sources":["waitForAttribute.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"waitForAttribute.d.ts","sourceRoot":"","sources":["waitForAttribute.js"],"names":[],"mappings":"AA0BO,iCARe,CAAC,SAAV,MAAQ,mCACV;IACV,OAAW,EAAE,WAAW,CAAC;IACzB,SAAa,EAAE,CAAC,CAAC;IACjB,OAAW,CAAC,EAAE,MAAM,CAAC;CAClB,GACS,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAgDlC;uBAnEqB,CAAC,SAAV,MAAQ,IACR;IACZ,OAAe,EAAE,IAAI,CAAC;IACtB,SAAiB,EAAE,CAAC,CAAC;IACrB,KAAa,EAAE,MAAM,CAAC;CACf,GACD;IACN,OAAe,EAAE,KAAK,CAAC;IACvB,SAAiB,EAAE,CAAC,CAAC;CACd"}
|
|
@@ -1,19 +1,40 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
+
import { withResolvers } from './withResolvers.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @template {string} T
|
|
7
|
+
* @typedef {{
|
|
8
|
+
* success: true;
|
|
9
|
+
* attribute: T;
|
|
10
|
+
* value: string;
|
|
11
|
+
* }
|
|
12
|
+
* | {
|
|
13
|
+
* success: false;
|
|
14
|
+
* attribute: T;
|
|
15
|
+
* }} ReturnType
|
|
16
|
+
*/
|
|
17
|
+
|
|
3
18
|
/**
|
|
19
|
+
* @template {string} T
|
|
4
20
|
* @param {{
|
|
5
21
|
* element: HTMLElement;
|
|
6
|
-
* attribute:
|
|
7
|
-
* onSuccess: (value: string) => void;
|
|
8
|
-
* onTimeout: () => void;
|
|
22
|
+
* attribute: T;
|
|
9
23
|
* timeout?: number;
|
|
10
24
|
* }} options
|
|
25
|
+
* @returns {Promise<ReturnType<T>>}
|
|
11
26
|
*/
|
|
12
|
-
export const waitForAttribute = ({ element, attribute,
|
|
27
|
+
export const waitForAttribute = async ({ element, attribute, timeout = 300 }) => {
|
|
28
|
+
const { promise, resolve } = /** @type {typeof withResolvers<ReturnType<T>>} */ (withResolvers)();
|
|
29
|
+
|
|
13
30
|
const currentAttrValue = element.getAttribute(attribute);
|
|
14
31
|
if (currentAttrValue !== null) {
|
|
15
|
-
|
|
16
|
-
|
|
32
|
+
resolve({
|
|
33
|
+
success: true,
|
|
34
|
+
value: currentAttrValue,
|
|
35
|
+
attribute,
|
|
36
|
+
});
|
|
37
|
+
return promise;
|
|
17
38
|
}
|
|
18
39
|
|
|
19
40
|
const observer = new MutationObserver((mutations) => {
|
|
@@ -28,7 +49,10 @@ export const waitForAttribute = ({ element, attribute, onSuccess, onTimeout, tim
|
|
|
28
49
|
|
|
29
50
|
const timeoutId = setTimeout(() => {
|
|
30
51
|
observer.disconnect();
|
|
31
|
-
|
|
52
|
+
resolve({
|
|
53
|
+
success: false,
|
|
54
|
+
attribute,
|
|
55
|
+
});
|
|
32
56
|
}, timeout);
|
|
33
57
|
|
|
34
58
|
/** @param {MutationRecord} mutation */
|
|
@@ -37,7 +61,13 @@ export const waitForAttribute = ({ element, attribute, onSuccess, onTimeout, tim
|
|
|
37
61
|
if (mutation.type === 'attributes' && mutation.attributeName === attribute && attrValue !== null) {
|
|
38
62
|
clearTimeout(timeoutId);
|
|
39
63
|
observer.disconnect();
|
|
40
|
-
|
|
64
|
+
resolve({
|
|
65
|
+
success: true,
|
|
66
|
+
value: attrValue,
|
|
67
|
+
attribute,
|
|
68
|
+
});
|
|
41
69
|
}
|
|
42
70
|
};
|
|
71
|
+
|
|
72
|
+
return promise;
|
|
43
73
|
};
|