@uploadcare/file-uploader 1.15.0-alpha.2 → 1.15.0-alpha.21
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/abstract/ActivityBlock.d.ts +5 -5
- package/abstract/ActivityBlock.d.ts.map +1 -1
- package/abstract/Block.d.ts +3 -9
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +1 -1
- package/abstract/CTX.d.ts +6 -6
- package/abstract/CTX.d.ts.map +1 -1
- package/abstract/LocaleManager.d.ts +3 -3
- package/abstract/LocaleManager.d.ts.map +1 -1
- package/abstract/ModalManager.d.ts +26 -17
- package/abstract/ModalManager.d.ts.map +1 -1
- package/abstract/ModalManager.js +32 -18
- 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 +44 -44
- package/abstract/TypedCollection.d.ts.map +1 -1
- package/abstract/TypedCollection.js +53 -33
- package/abstract/TypedData.d.ts +71 -25
- package/abstract/TypedData.d.ts.map +1 -1
- package/abstract/TypedData.js +74 -17
- package/abstract/UploaderBlock.d.ts +10 -10
- package/abstract/UploaderBlock.d.ts.map +1 -1
- package/abstract/UploaderBlock.js +23 -11
- package/abstract/UploaderPublicApi.d.ts +24 -23
- package/abstract/UploaderPublicApi.d.ts.map +1 -1
- package/abstract/UploaderPublicApi.js +21 -10
- package/abstract/ValidationManager.d.ts +125 -6
- package/abstract/ValidationManager.d.ts.map +1 -1
- package/abstract/ValidationManager.js +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/l10nProcessor.d.ts.map +1 -1
- package/abstract/loadFileUploaderFrom.d.ts +1 -1
- 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 +123 -63
- package/abstract/uploadEntrySchema.d.ts.map +1 -1
- package/abstract/uploadEntrySchema.js +66 -81
- package/blocks/CameraSource/CameraSource.d.ts +9 -9
- package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
- package/blocks/CameraSource/calcCameraModes.d.ts +1 -1
- package/blocks/CameraSource/constants.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/CropFrame.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +1 -1
- package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +1 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorImageFader.js +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
- package/blocks/CloudImageEditor/src/EditorToolbar.js +1 -1
- 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/cropper-constants.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +1 -1
- package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -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.map +1 -1
- package/blocks/CloudImageEditor/src/types.d.ts +8 -58
- package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +5 -2
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
- package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +7 -3
- package/blocks/Config/Config.d.ts +3 -12
- package/blocks/Config/Config.d.ts.map +1 -1
- package/blocks/Config/assertions.d.ts +1 -1
- package/blocks/Config/initialConfig.d.ts +1 -1
- package/blocks/Config/initialConfig.d.ts.map +1 -1
- package/blocks/Config/initialConfig.js +4 -4
- package/blocks/Config/normalizeConfigValue.d.ts +2 -1
- package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
- package/blocks/Config/normalizeConfigValue.js +18 -109
- package/blocks/Config/side-effects.d.ts.map +1 -1
- package/blocks/Config/validatorsType.d.ts +37 -0
- package/blocks/Config/validatorsType.d.ts.map +1 -0
- package/blocks/Config/validatorsType.js +134 -0
- package/blocks/DropArea/DropArea.d.ts +3 -2
- package/blocks/DropArea/DropArea.d.ts.map +1 -1
- package/blocks/DropArea/DropArea.js +20 -2
- package/blocks/DropArea/addDropzone.d.ts.map +1 -1
- package/blocks/DropArea/drop-area.css +4 -2
- package/blocks/DropArea/getDropItems.d.ts +2 -2
- package/blocks/DropArea/getDropItems.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.d.ts +3 -3
- package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
- package/blocks/ExternalSource/ExternalSource.js +0 -1
- package/blocks/ExternalSource/MessageBridge.d.ts +3 -3
- package/blocks/ExternalSource/MessageBridge.d.ts.map +1 -1
- package/blocks/ExternalSource/query-string.d.ts.map +1 -1
- package/blocks/ExternalSource/types.d.ts +64 -64
- package/blocks/ExternalSource/types.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.d.ts +13 -40
- package/blocks/FileItem/FileItem.d.ts.map +1 -1
- package/blocks/FileItem/FileItem.js +126 -179
- package/blocks/FileItem/FileItemConfig.d.ts +28 -0
- package/blocks/FileItem/FileItemConfig.d.ts.map +1 -0
- package/blocks/FileItem/FileItemConfig.js +74 -0
- package/blocks/FileItem/file-item.css +39 -0
- package/blocks/Img/ImgBase.d.ts +3 -3
- package/blocks/Img/ImgBase.d.ts.map +1 -1
- package/blocks/Img/ImgBase.js +9 -9
- package/blocks/Img/ImgConfig.d.ts.map +1 -1
- package/blocks/Img/configurations.d.ts.map +1 -1
- package/blocks/Modal/Modal.d.ts +21 -2
- package/blocks/Modal/Modal.d.ts.map +1 -1
- package/blocks/Modal/Modal.js +37 -18
- package/blocks/ProgressBar/ProgressBar.d.ts +6 -1
- package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/blocks/ProgressBar/ProgressBar.js +41 -44
- package/blocks/ProgressBar/progress-bar.css +9 -6
- package/blocks/Range/Range.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
- package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
- package/blocks/SimpleBtn/SimpleBtn.js +1 -1
- package/blocks/SourceBtn/SourceBtn.d.ts +2 -5
- package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
- package/blocks/SourceBtn/SourceBtn.js +5 -5
- package/blocks/SourceList/SourceList.js +2 -2
- package/blocks/Spinner/Spinner.d.ts.map +1 -1
- package/blocks/Thumb/Thumb.d.ts +51 -0
- package/blocks/Thumb/Thumb.d.ts.map +1 -0
- package/blocks/Thumb/Thumb.js +233 -0
- package/blocks/Thumb/thumb.css +4 -0
- package/blocks/UploadCtxProvider/EventEmitter.d.ts +20 -20
- 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 +4 -2
- package/blocks/UploadList/UploadList.d.ts.map +1 -1
- package/blocks/UploadList/UploadList.js +3 -1
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -3
- package/blocks/svg-backgrounds/svg-backgrounds.d.ts.map +1 -1
- package/blocks/themes/uc-basic/common.css +1 -1
- package/blocks/themes/uc-basic/index.css +1 -0
- package/blocks/themes/uc-basic/svg-sprite.d.ts.map +1 -1
- package/blocks/utils/UploadSource.d.ts.map +1 -1
- package/blocks/utils/debounce.d.ts +3 -1
- package/blocks/utils/debounce.d.ts.map +1 -1
- package/blocks/{CloudImageEditor/src/lib → utils}/preloadImage.js +1 -1
- package/blocks/utils/resizeImage.d.ts +1 -1
- package/blocks/utils/resizeImage.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/env.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/index.ssr.d.ts +59 -0
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +79 -13
- package/locales/file-uploader/ar.d.ts +1 -0
- package/locales/file-uploader/ar.js +1 -0
- package/locales/file-uploader/az.d.ts +1 -0
- package/locales/file-uploader/az.js +1 -0
- package/locales/file-uploader/ca.d.ts +1 -0
- package/locales/file-uploader/ca.js +1 -0
- package/locales/file-uploader/cs.d.ts +1 -0
- package/locales/file-uploader/cs.js +1 -0
- package/locales/file-uploader/da.d.ts +1 -0
- package/locales/file-uploader/da.js +1 -0
- package/locales/file-uploader/de.d.ts +1 -0
- package/locales/file-uploader/de.js +1 -0
- package/locales/file-uploader/el.d.ts +1 -0
- package/locales/file-uploader/el.js +1 -0
- package/locales/file-uploader/en.d.ts +1 -0
- package/locales/file-uploader/en.js +1 -0
- package/locales/file-uploader/es.d.ts +1 -0
- package/locales/file-uploader/es.js +1 -0
- package/locales/file-uploader/et.d.ts +1 -0
- package/locales/file-uploader/et.js +1 -0
- package/locales/file-uploader/fi.d.ts +1 -0
- package/locales/file-uploader/fi.js +1 -0
- package/locales/file-uploader/fr.d.ts +1 -0
- package/locales/file-uploader/fr.js +1 -0
- package/locales/file-uploader/he.d.ts +1 -0
- package/locales/file-uploader/he.js +1 -0
- package/locales/file-uploader/hy.d.ts +1 -0
- package/locales/file-uploader/hy.js +1 -0
- package/locales/file-uploader/is.d.ts +1 -0
- package/locales/file-uploader/is.js +1 -0
- package/locales/file-uploader/it.d.ts +1 -0
- package/locales/file-uploader/it.js +1 -0
- package/locales/file-uploader/ja.d.ts +1 -0
- package/locales/file-uploader/ja.js +1 -0
- package/locales/file-uploader/ka.d.ts +1 -0
- package/locales/file-uploader/ka.js +1 -0
- package/locales/file-uploader/kk.d.ts +1 -0
- package/locales/file-uploader/kk.js +1 -0
- package/locales/file-uploader/ko.d.ts +1 -0
- package/locales/file-uploader/ko.js +1 -0
- package/locales/file-uploader/lv.d.ts +1 -0
- package/locales/file-uploader/lv.js +1 -0
- package/locales/file-uploader/nb.d.ts +1 -0
- package/locales/file-uploader/nb.js +1 -0
- package/locales/file-uploader/nl.d.ts +1 -0
- package/locales/file-uploader/nl.js +1 -0
- package/locales/file-uploader/pl.d.ts +1 -0
- package/locales/file-uploader/pl.js +1 -0
- package/locales/file-uploader/pt.d.ts +1 -0
- package/locales/file-uploader/pt.js +1 -0
- package/locales/file-uploader/ro.d.ts +1 -0
- package/locales/file-uploader/ro.js +1 -0
- package/locales/file-uploader/ru.d.ts +1 -0
- package/locales/file-uploader/ru.js +1 -0
- package/locales/file-uploader/sk.d.ts +1 -0
- package/locales/file-uploader/sk.js +1 -0
- package/locales/file-uploader/sr.d.ts +1 -0
- package/locales/file-uploader/sr.js +1 -0
- package/locales/file-uploader/sv.d.ts +1 -0
- package/locales/file-uploader/sv.js +1 -0
- package/locales/file-uploader/tr.d.ts +1 -0
- package/locales/file-uploader/tr.js +1 -0
- package/locales/file-uploader/uk.d.ts +1 -0
- package/locales/file-uploader/uk.js +1 -0
- package/locales/file-uploader/vi.d.ts +1 -0
- package/locales/file-uploader/vi.js +1 -0
- package/locales/file-uploader/zh-TW.d.ts +1 -0
- package/locales/file-uploader/zh-TW.js +1 -0
- package/locales/file-uploader/zh.d.ts +1 -0
- package/locales/file-uploader/zh.js +1 -0
- package/package.json +6 -5
- 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/minimal/FileUploaderMinimal.d.ts +21 -2
- package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +102 -23
- package/solutions/file-uploader/minimal/index.css +11 -28
- package/solutions/file-uploader/minimal/index.d.ts +1 -16
- package/solutions/file-uploader/minimal/index.js +1 -18
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +3 -5
- package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
- package/solutions/file-uploader/regular/FileUploaderRegular.js +1 -15
- package/types/exported.d.ts +4 -3
- package/types/jsx.d.ts +1 -1
- package/utils/browser-info.d.ts +13 -0
- package/utils/browser-info.d.ts.map +1 -0
- package/utils/browser-info.js +22 -0
- package/utils/browser-info.test.d.ts +2 -0
- package/utils/browser-info.test.d.ts.map +1 -0
- package/utils/browser-info.test.js +109 -0
- package/utils/cdn-utils.d.ts +3 -3
- package/utils/cdn-utils.d.ts.map +1 -1
- package/utils/fileTypes.d.ts +5 -1
- package/utils/fileTypes.d.ts.map +1 -1
- package/utils/fileTypes.js +18 -2
- 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 +1 -1
- package/utils/template-utils.d.ts.map +1 -1
- package/utils/toKebabCase.d.ts.map +1 -1
- package/utils/transparentPixelSrc.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 +1 -1
- package/utils/waitForAttribute.d.ts.map +1 -1
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +4 -4
- package/web/uc-basic.min.css +1 -1
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.min.css +1 -1
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.css +1 -1
- package/web/uc-file-uploader-minimal.min.js +4 -4
- package/web/uc-file-uploader-regular.min.css +1 -1
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +1 -1
- package/blocks/utils/supportCapture.d.ts +0 -2
- package/blocks/utils/supportCapture.d.ts.map +0 -1
- package/blocks/utils/supportCapture.js +0 -3
- /package/blocks/{CloudImageEditor/src/lib → utils}/preloadImage.d.ts +0 -0
- /package/blocks/{CloudImageEditor/src/lib → utils}/preloadImage.d.ts.map +0 -0
|
@@ -116,6 +116,7 @@ export default {
|
|
|
116
116
|
failed: 'Misslyckades',
|
|
117
117
|
uploading: 'Laddar upp',
|
|
118
118
|
idle: 'Overksam',
|
|
119
|
+
queued: 'I kö',
|
|
119
120
|
'a11y-file-item-status': 'Filen {{fileName}} är i status {{status}}',
|
|
120
121
|
'select-all': 'Välj alla',
|
|
121
122
|
'deselect-all': 'Avmarkera alla',
|
|
@@ -116,6 +116,7 @@ export default {
|
|
|
116
116
|
failed: 'Başarısız',
|
|
117
117
|
uploading: 'Yükleniyor',
|
|
118
118
|
idle: 'Boşta',
|
|
119
|
+
queued: 'Sırada',
|
|
119
120
|
'a11y-file-item-status': '{{fileName}} dosyası {{status}} durumunda',
|
|
120
121
|
'select-all': 'Hepsini seç',
|
|
121
122
|
'deselect-all': 'Hiçbirini seçme',
|
|
@@ -120,6 +120,7 @@ export default {
|
|
|
120
120
|
failed: 'Не вдалося',
|
|
121
121
|
uploading: 'Завантаження',
|
|
122
122
|
idle: 'Очікування',
|
|
123
|
+
queued: 'У черзі',
|
|
123
124
|
'a11y-file-item-status': 'Файл {{fileName}} у стані {{status}}',
|
|
124
125
|
'select-all': 'Вибрати всі',
|
|
125
126
|
'deselect-all': 'Скасувати вибір всіх',
|
|
@@ -116,6 +116,7 @@ export default {
|
|
|
116
116
|
failed: 'Thất bại',
|
|
117
117
|
uploading: 'Đang tải lên',
|
|
118
118
|
idle: 'Nhàn rỗi',
|
|
119
|
+
queued: 'Đang xếp hàng',
|
|
119
120
|
'a11y-file-item-status': 'Tệp {{fileName}} ở trạng thái {{status}}',
|
|
120
121
|
'select-all': 'Chọn tất cả',
|
|
121
122
|
'deselect-all': 'Bỏ chọn tất cả',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadcare/file-uploader",
|
|
3
|
-
"version": "1.15.0-alpha.
|
|
3
|
+
"version": "1.15.0-alpha.21",
|
|
4
4
|
"description": "Building blocks for Uploadcare products integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web components",
|
|
@@ -100,13 +100,14 @@
|
|
|
100
100
|
"@babel/preset-env": "^7.21.4",
|
|
101
101
|
"@esm-bundle/chai": "^4.3.4-fix.0",
|
|
102
102
|
"@happy-dom/global-registrator": "^16.8.1",
|
|
103
|
-
"@total-typescript/ts-reset": "^0.
|
|
103
|
+
"@total-typescript/ts-reset": "^0.6.1",
|
|
104
104
|
"@types/chai": "^4.3.4",
|
|
105
105
|
"@types/mocha": "^10.0.1",
|
|
106
106
|
"@types/node": "^18.15.11",
|
|
107
107
|
"@types/react": "^18.2.34",
|
|
108
|
+
"@types/sinon": "^17.0.4",
|
|
108
109
|
"@web/test-runner": "^0.19.0",
|
|
109
|
-
"esbuild": "^0.
|
|
110
|
+
"esbuild": "^0.25.1",
|
|
110
111
|
"eslint": "^8.56.0",
|
|
111
112
|
"eslint-config-prettier": "^9.1.0",
|
|
112
113
|
"eslint-plugin-import": "^2.29.1",
|
|
@@ -126,8 +127,8 @@
|
|
|
126
127
|
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
|
|
127
128
|
"stylelint-order": "^6.0.3",
|
|
128
129
|
"svg-sprite": "^2.0.4",
|
|
129
|
-
"tsd": "^0.
|
|
130
|
-
"typescript": "^5.
|
|
130
|
+
"tsd": "^0.31.2",
|
|
131
|
+
"typescript": "^5.8.2"
|
|
131
132
|
},
|
|
132
133
|
"author": "Uploadcare Inc.",
|
|
133
134
|
"license": "MIT",
|
|
@@ -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': ReturnType<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":"AAIA;IAMI
|
|
1
|
+
{"version":3,"file":"FileUploaderInline.d.ts","sourceRoot":"","sources":["FileUploaderInline.js"],"names":[],"mappings":"AAIA;IAMI;;;;;;+CAcoB,YAAU;mCACsC,YAAU;6BAIhD,2BAA2B;;wCAMS,2CACnD;;;;;;MAhBd;IAGH,gCAGC;IAED,6BAEC;CA0BF;;;;8BAtD6B,oCAAoC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export class FileUploaderMinimal extends SolutionBlock {
|
|
2
2
|
init$: {
|
|
3
3
|
singleUpload: boolean;
|
|
4
|
+
isHiddenStartFrom: boolean;
|
|
5
|
+
classUploadList: string;
|
|
6
|
+
classStartFrom: string;
|
|
4
7
|
'*commonProgress': number;
|
|
5
8
|
'*uploadList': never[];
|
|
6
9
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
7
|
-
'*collectionErrors':
|
|
8
|
-
'*collectionState': import("
|
|
10
|
+
'*collectionErrors': ReturnType<import("./index.js").OutputErrorCollection>[];
|
|
11
|
+
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
9
12
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
10
13
|
'*uploadTrigger': Set<string>;
|
|
11
14
|
'*secureUploadsManager': import("../../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -15,6 +18,22 @@ export class FileUploaderMinimal extends SolutionBlock {
|
|
|
15
18
|
'*historyBack': null;
|
|
16
19
|
'*closeModal': () => void;
|
|
17
20
|
};
|
|
21
|
+
_handleModalOpen(data: {
|
|
22
|
+
id: import("../../../abstract/ModalManager.js").ModalId;
|
|
23
|
+
modal: import("../../../abstract/ModalManager.js").ModalNode;
|
|
24
|
+
}): void;
|
|
25
|
+
_handleModalClose(data: {
|
|
26
|
+
id: import("../../../abstract/ModalManager.js").ModalId;
|
|
27
|
+
modal: import("../../../abstract/ModalManager.js").ModalNode;
|
|
28
|
+
}): void;
|
|
29
|
+
handleModalOpen: ((data: {
|
|
30
|
+
id: import("../../../abstract/ModalManager.js").ModalId;
|
|
31
|
+
modal: import("../../../abstract/ModalManager.js").ModalNode;
|
|
32
|
+
}) => void) | undefined;
|
|
33
|
+
handleModalClose: ((data: {
|
|
34
|
+
id: import("../../../abstract/ModalManager.js").ModalId;
|
|
35
|
+
modal: import("../../../abstract/ModalManager.js").ModalNode;
|
|
36
|
+
}) => void) | undefined;
|
|
18
37
|
}
|
|
19
38
|
export namespace FileUploaderMinimal {
|
|
20
39
|
let template: string;
|
|
@@ -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":"AAQA;IAMI;;;;;;;;+CASqD,YAAU;mCAEf,YAClD;6BAKS,2BAA2B;;wCAIhC,2CAGI;;;;;;MAlBL;;;;;;;;;IA8FD;;;4BAAuD;IACvD;;;4BAAyD;CAW5D;;;;8BA5H6B,oCAAoC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
//@ts-check
|
|
1
2
|
import { ActivityBlock } from '../../../abstract/ActivityBlock.js';
|
|
2
3
|
import { SolutionBlock } from '../../../abstract/SolutionBlock.js';
|
|
3
4
|
import { ModalEvents } from '../../../abstract/ModalManager.js';
|
|
4
5
|
|
|
6
|
+
const ACTIVE_CLASS = 'active';
|
|
7
|
+
const EMPTY_CLASS = '';
|
|
8
|
+
|
|
5
9
|
export class FileUploaderMinimal extends SolutionBlock {
|
|
6
10
|
static styleAttrs = [...super.styleAttrs, 'uc-file-uploader-minimal'];
|
|
7
11
|
|
|
@@ -11,15 +15,58 @@ export class FileUploaderMinimal extends SolutionBlock {
|
|
|
11
15
|
this.init$ = {
|
|
12
16
|
...this.init$,
|
|
13
17
|
singleUpload: false,
|
|
18
|
+
isHiddenStartFrom: false,
|
|
19
|
+
classUploadList: EMPTY_CLASS,
|
|
20
|
+
classStartFrom: EMPTY_CLASS,
|
|
14
21
|
};
|
|
15
22
|
}
|
|
16
23
|
|
|
24
|
+
/** @type {import('../../../abstract/ModalManager.js').ModalCb} */
|
|
25
|
+
_handleModalOpen(e) {
|
|
26
|
+
if (e.id === ActivityBlock.activities.CLOUD_IMG_EDIT) {
|
|
27
|
+
this.set$({
|
|
28
|
+
classUploadList: ACTIVE_CLASS,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (this.$['*currentActivity'] === ActivityBlock.activities.UPLOAD_LIST) {
|
|
33
|
+
this.set$({
|
|
34
|
+
classUploadList: ACTIVE_CLASS,
|
|
35
|
+
isHiddenStartFrom: true,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (this.$['*uploadList']?.length <= 0) {
|
|
40
|
+
this.set$({
|
|
41
|
+
classStartFrom: ACTIVE_CLASS,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** @type {import('../../../abstract/ModalManager.js').ModalCb} */
|
|
47
|
+
_handleModalClose(e) {
|
|
48
|
+
if (e.id === this.$['*currentActivity']) {
|
|
49
|
+
this.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
50
|
+
this.set$({
|
|
51
|
+
isHiddenStartFrom: false,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (e.id === ActivityBlock.activities.CLOUD_IMG_EDIT) {
|
|
56
|
+
this.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
17
60
|
initCallback() {
|
|
18
61
|
super.initCallback();
|
|
19
62
|
|
|
20
63
|
/** @type {import('../../../abstract/UploaderBlock.js').UploaderBlock} */
|
|
21
64
|
const uBlock = this.ref.uBlock;
|
|
22
65
|
this.sub('*currentActivity', (val) => {
|
|
66
|
+
if (val === ActivityBlock.activities.UPLOAD_LIST) {
|
|
67
|
+
this.modalManager.closeAll();
|
|
68
|
+
}
|
|
69
|
+
|
|
23
70
|
if (!val) {
|
|
24
71
|
this.$['*currentActivity'] = uBlock.initActivity || ActivityBlock.activities.START_FROM;
|
|
25
72
|
}
|
|
@@ -28,51 +75,83 @@ export class FileUploaderMinimal extends SolutionBlock {
|
|
|
28
75
|
this.sub('*uploadList', (list) => {
|
|
29
76
|
if (list?.length > 0) {
|
|
30
77
|
this.$['*currentActivity'] = ActivityBlock.activities.UPLOAD_LIST;
|
|
78
|
+
this.set$({
|
|
79
|
+
classStartFrom: EMPTY_CLASS,
|
|
80
|
+
});
|
|
31
81
|
} else {
|
|
82
|
+
this.set$({
|
|
83
|
+
classUploadList: EMPTY_CLASS,
|
|
84
|
+
isHiddenStartFrom: false,
|
|
85
|
+
});
|
|
32
86
|
this.$['*currentActivity'] = uBlock.initActivity || ActivityBlock.activities.START_FROM;
|
|
33
87
|
}
|
|
34
88
|
});
|
|
35
89
|
|
|
36
|
-
this.subConfigValue('sourceList', (sourceList) => {
|
|
37
|
-
if (sourceList !== 'local') {
|
|
38
|
-
this.cfg.sourceList = 'local';
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
90
|
this.subConfigValue('confirmUpload', (confirmUpload) => {
|
|
43
91
|
if (confirmUpload !== false) {
|
|
44
92
|
this.cfg.confirmUpload = false;
|
|
45
93
|
}
|
|
46
94
|
});
|
|
47
95
|
|
|
48
|
-
this.subConfigValue('
|
|
96
|
+
this.subConfigValue('filesViewMode', (mode) => {
|
|
49
97
|
this.setAttribute('mode', mode);
|
|
50
|
-
});
|
|
51
98
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
99
|
+
this.subConfigValue('multiple', (multiple) => {
|
|
100
|
+
if (mode === 'grid') {
|
|
101
|
+
if (multiple) {
|
|
102
|
+
this.style.removeProperty('--uc-grid-col');
|
|
103
|
+
} else {
|
|
104
|
+
this.style.setProperty('--uc-grid-col', '1');
|
|
105
|
+
}
|
|
58
106
|
|
|
59
|
-
|
|
107
|
+
this.$.singleUpload = !multiple;
|
|
108
|
+
} else {
|
|
109
|
+
this.style.removeProperty('--uc-grid-col');
|
|
110
|
+
this.$.singleUpload = false;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
60
113
|
});
|
|
61
114
|
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
115
|
+
this.handleModalOpen = this._handleModalOpen.bind(this);
|
|
116
|
+
this.handleModalClose = this._handleModalClose.bind(this);
|
|
117
|
+
|
|
118
|
+
this.modalManager.subscribe(ModalEvents.OPEN, this.handleModalOpen);
|
|
119
|
+
this.modalManager.subscribe(ModalEvents.CLOSE, this.handleModalClose);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
destroyCallback() {
|
|
123
|
+
super.destroyCallback();
|
|
124
|
+
this.modalManager.unsubscribe(ModalEvents.OPEN, this.handleModalOpen);
|
|
125
|
+
this.modalManager.unsubscribe(ModalEvents.CLOSE, this.handleModalClose);
|
|
67
126
|
}
|
|
68
127
|
}
|
|
69
128
|
|
|
70
129
|
FileUploaderMinimal.template = /* HTML */ `
|
|
71
|
-
<uc-start-from>
|
|
72
|
-
<uc-drop-area set="@single:singleUpload" tabindex="0"
|
|
130
|
+
<uc-start-from set="@hidden: isHiddenStartFrom; @class:classStartFrom">
|
|
131
|
+
<uc-drop-area set="@single:singleUpload;" initflow clickable tabindex="0" l10n="choose-file"></uc-drop-area>
|
|
73
132
|
<uc-copyright></uc-copyright>
|
|
74
133
|
</uc-start-from>
|
|
75
|
-
<uc-upload-list ref="uBlock"></uc-upload-list>
|
|
134
|
+
<uc-upload-list set="@class:classUploadList" ref="uBlock"></uc-upload-list>
|
|
135
|
+
|
|
136
|
+
<uc-modal id="start-from" strokes block-body-scrolling>
|
|
137
|
+
<uc-start-from>
|
|
138
|
+
<uc-drop-area with-icon clickable></uc-drop-area>
|
|
139
|
+
<uc-source-list role="list" wrap></uc-source-list>
|
|
140
|
+
<button type="button" l10n="start-from-cancel" class="uc-secondary-btn" set="onclick: *historyBack"></button>
|
|
141
|
+
</uc-start-from>
|
|
142
|
+
</uc-modal>
|
|
143
|
+
|
|
144
|
+
<uc-modal id="camera" strokes block-body-scrolling>
|
|
145
|
+
<uc-camera-source></uc-camera-source>
|
|
146
|
+
</uc-modal>
|
|
147
|
+
|
|
148
|
+
<uc-modal id="url" strokes block-body-scrolling>
|
|
149
|
+
<uc-url-source></uc-url-source>
|
|
150
|
+
</uc-modal>
|
|
151
|
+
|
|
152
|
+
<uc-modal id="external" strokes block-body-scrolling>
|
|
153
|
+
<uc-external-source></uc-external-source>
|
|
154
|
+
</uc-modal>
|
|
76
155
|
|
|
77
156
|
<uc-modal id="cloud-image-edit" strokes block-body-scrolling>
|
|
78
157
|
<uc-cloud-image-editor-activity></uc-cloud-image-editor-activity>
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
@import url('../../../blocks/themes/uc-basic/
|
|
2
|
-
|
|
3
|
-
/* COMMON STYLES */
|
|
4
|
-
@import url('../../../blocks/themes/uc-basic/common.css');
|
|
5
|
-
|
|
6
|
-
/* THEME */
|
|
7
|
-
@import url('../../../blocks/themes/uc-basic/theme.css');
|
|
8
|
-
|
|
9
|
-
/* BLOCKS: */
|
|
10
|
-
@import url('../../../blocks/StartFrom/start-from.css');
|
|
11
|
-
@import url('../../../blocks/DropArea/drop-area.css');
|
|
12
|
-
@import url('../../../blocks/UploadList/upload-list.css');
|
|
13
|
-
@import url('../../../blocks/FileItem/file-item.css');
|
|
14
|
-
@import url('../../../blocks/Icon/icon.css');
|
|
15
|
-
@import url('../../../blocks/ProgressBar/progress-bar.css');
|
|
16
|
-
@import url('../../../blocks/Copyright/copyright.css');
|
|
17
|
-
@import url('../../../blocks/Modal/modal.css');
|
|
18
|
-
@import url('../../../blocks/CloudImageEditor/index.css');
|
|
19
|
-
@import url('../../../blocks/CloudImageEditorActivity/index.css');
|
|
1
|
+
@import url('../../../blocks/themes/uc-basic/index.css');
|
|
20
2
|
|
|
21
3
|
/* ICONS: */
|
|
22
4
|
:where([uc-file-uploader-minimal]) {
|
|
@@ -27,7 +9,7 @@
|
|
|
27
9
|
display: block;
|
|
28
10
|
}
|
|
29
11
|
|
|
30
|
-
[uc-file-uploader-minimal] uc-start-from .uc-content {
|
|
12
|
+
[uc-file-uploader-minimal] > uc-start-from .uc-content {
|
|
31
13
|
display: flex;
|
|
32
14
|
flex-direction: column;
|
|
33
15
|
gap: 4px;
|
|
@@ -37,7 +19,7 @@
|
|
|
37
19
|
background-color: transparent;
|
|
38
20
|
}
|
|
39
21
|
|
|
40
|
-
:where([uc-file-uploader-minimal] uc-drop-area) {
|
|
22
|
+
:where([uc-file-uploader-minimal] > uc-start-from uc-drop-area) {
|
|
41
23
|
display: flex;
|
|
42
24
|
position: relative;
|
|
43
25
|
align-items: center;
|
|
@@ -50,12 +32,12 @@
|
|
|
50
32
|
border-radius: calc(var(--uc-radius) * 1.75);
|
|
51
33
|
}
|
|
52
34
|
|
|
53
|
-
:where(.uc-contrast) :where([uc-file-uploader-minimal] uc-drop-area) {
|
|
35
|
+
:where(.uc-contrast) :where([uc-file-uploader-minimal] > uc-start-from uc-drop-area) {
|
|
54
36
|
background-color: transparent;
|
|
55
37
|
}
|
|
56
38
|
|
|
57
39
|
/* hack to make transparent :hover colors work in any conditions */
|
|
58
|
-
:where([uc-file-uploader-minimal] uc-drop-area)::before {
|
|
40
|
+
:where([uc-file-uploader-minimal] > uc-start-from uc-drop-area)::before {
|
|
59
41
|
content: '';
|
|
60
42
|
z-index: -1;
|
|
61
43
|
width: 100%;
|
|
@@ -64,7 +46,7 @@
|
|
|
64
46
|
background-color: var(--uc-background);
|
|
65
47
|
}
|
|
66
48
|
|
|
67
|
-
:where([uc-file-uploader-minimal]:has([single]) uc-drop-area) {
|
|
49
|
+
:where([uc-file-uploader-minimal]:has([single]) > uc-start-from uc-drop-area) {
|
|
68
50
|
aspect-ratio: var(--uc-grid-aspect-ratio);
|
|
69
51
|
}
|
|
70
52
|
|
|
@@ -118,10 +100,6 @@
|
|
|
118
100
|
display: flex;
|
|
119
101
|
}
|
|
120
102
|
|
|
121
|
-
[uc-file-uploader-minimal] uc-file-item .uc-edit-btn {
|
|
122
|
-
/* display: none; */
|
|
123
|
-
}
|
|
124
|
-
|
|
125
103
|
[uc-file-uploader-minimal] uc-file-item uc-progress-bar {
|
|
126
104
|
top: 0 !important;
|
|
127
105
|
height: 100% !important;
|
|
@@ -132,6 +110,11 @@
|
|
|
132
110
|
border-radius: var(--uc-radius);
|
|
133
111
|
}
|
|
134
112
|
|
|
113
|
+
[uc-file-uploader-minimal] uc-file-item uc-progress-bar .uc-fake-progress {
|
|
114
|
+
background-color: var(--uc-primary-transparent);
|
|
115
|
+
border-radius: var(--uc-radius);
|
|
116
|
+
}
|
|
117
|
+
|
|
135
118
|
[uc-file-uploader-minimal] uc-upload-list uc-drop-area {
|
|
136
119
|
width: 100%;
|
|
137
120
|
height: 100%;
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { defineLocale } from "../../../abstract/localeRegistry.js";
|
|
3
|
-
export { FileUploaderMinimal } from "./FileUploaderMinimal.js";
|
|
4
|
-
export { StartFrom } from "../../../blocks/StartFrom/StartFrom.js";
|
|
5
|
-
export { DropArea } from "../../../blocks/DropArea/DropArea.js";
|
|
6
|
-
export { UploadList } from "../../../blocks/UploadList/UploadList.js";
|
|
7
|
-
export { FileItem } from "../../../blocks/FileItem/FileItem.js";
|
|
8
|
-
export { Icon } from "../../../blocks/Icon/Icon.js";
|
|
9
|
-
export { ProgressBar } from "../../../blocks/ProgressBar/ProgressBar.js";
|
|
10
|
-
export { Copyright } from "../../../blocks/Copyright/Copyright.js";
|
|
11
|
-
export { FormInput } from "../../../blocks/FormInput/FormInput.js";
|
|
12
|
-
export { Config } from "../../../blocks/Config/Config.js";
|
|
13
|
-
export { UploadCtxProvider } from "../../../blocks/UploadCtxProvider/UploadCtxProvider.js";
|
|
14
|
-
export { Modal } from "../../../blocks/Modal/Modal.js";
|
|
15
|
-
export * from "../../../blocks/CloudImageEditor/index.js";
|
|
16
|
-
export { CloudImageEditorActivity } from "../../../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js";
|
|
1
|
+
export * from "../../../index.js";
|
|
17
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { defineLocale } from '../../../abstract/localeRegistry.js';
|
|
3
|
-
export { FileUploaderMinimal } from './FileUploaderMinimal.js';
|
|
4
|
-
export { StartFrom } from '../../../blocks/StartFrom/StartFrom.js';
|
|
5
|
-
export { DropArea } from '../../../blocks/DropArea/DropArea.js';
|
|
6
|
-
export { UploadList } from '../../../blocks/UploadList/UploadList.js';
|
|
7
|
-
export { FileItem } from '../../../blocks/FileItem/FileItem.js';
|
|
8
|
-
export { Icon } from '../../../blocks/Icon/Icon.js';
|
|
9
|
-
export { ProgressBar } from '../../../blocks/ProgressBar/ProgressBar.js';
|
|
10
|
-
export { Copyright } from '../../../blocks/Copyright/Copyright.js';
|
|
11
|
-
export { FormInput } from '../../../blocks/FormInput/FormInput.js';
|
|
12
|
-
export { Config } from '../../../blocks/Config/Config.js';
|
|
13
|
-
export { UploadCtxProvider } from '../../../blocks/UploadCtxProvider/UploadCtxProvider.js';
|
|
14
|
-
|
|
15
|
-
export { Modal } from '../../../blocks/Modal/Modal.js';
|
|
16
|
-
|
|
17
|
-
export * from '../../../blocks/CloudImageEditor/index.js';
|
|
18
|
-
export { CloudImageEditorActivity } from '../../../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js';
|
|
1
|
+
export * from '../../../index.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export class FileUploaderRegular extends SolutionBlock {
|
|
2
2
|
init$: {
|
|
3
3
|
isHidden: boolean;
|
|
4
|
-
|
|
4
|
+
'*commonProgress': number;
|
|
5
5
|
'*uploadList': never[];
|
|
6
6
|
'*uploadQueue': import("@uploadcare/upload-client").Queue;
|
|
7
|
-
'*collectionErrors':
|
|
8
|
-
'*collectionState': import("./index.js").OutputCollectionState
|
|
7
|
+
'*collectionErrors': ReturnType<import("./index.js").OutputErrorCollection>[];
|
|
8
|
+
'*collectionState': import("./index.js").OutputCollectionState | null;
|
|
9
9
|
'*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
|
|
10
10
|
'*uploadTrigger': Set<string>;
|
|
11
11
|
'*secureUploadsManager': import("../../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
|
|
@@ -15,8 +15,6 @@ export class FileUploaderRegular extends SolutionBlock {
|
|
|
15
15
|
'*historyBack': null;
|
|
16
16
|
'*closeModal': () => void;
|
|
17
17
|
};
|
|
18
|
-
/** @private */
|
|
19
|
-
private _lastModalActive;
|
|
20
18
|
}
|
|
21
19
|
export namespace FileUploaderRegular {
|
|
22
20
|
let template: string;
|
|
@@ -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":"AAIA;IAMI;;;;;+CAmBsB,YAAU;mCAEmB,YAChD;6BAEO,2BAA2B;;wCAEnC,2CAAoB;;;;;;MAvBrB;CAaJ;;;;8BAzB6B,oCAAoC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { SolutionBlock } from '../../../abstract/SolutionBlock.js';
|
|
3
|
-
import { asBoolean } from '../../../blocks/Config/
|
|
4
|
-
import { EventType } from '../../../blocks/UploadCtxProvider/EventEmitter.js';
|
|
3
|
+
import { asBoolean } from '../../../blocks/Config/validatorsType.js';
|
|
5
4
|
|
|
6
5
|
export class FileUploaderRegular extends SolutionBlock {
|
|
7
6
|
static styleAttrs = [...super.styleAttrs, 'uc-file-uploader-regular'];
|
|
@@ -24,19 +23,6 @@ export class FileUploaderRegular extends SolutionBlock {
|
|
|
24
23
|
this.set$({ isHidden: asBoolean(value) });
|
|
25
24
|
},
|
|
26
25
|
);
|
|
27
|
-
|
|
28
|
-
this.sub(
|
|
29
|
-
'*modalActive',
|
|
30
|
-
(modalActive) => {
|
|
31
|
-
if (this._lastModalActive !== modalActive) {
|
|
32
|
-
this.emit(modalActive ? EventType.MODAL_OPEN : EventType.MODAL_CLOSE, undefined, { debounce: true });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** @private */
|
|
36
|
-
this._lastModalActive = modalActive;
|
|
37
|
-
},
|
|
38
|
-
false,
|
|
39
|
-
);
|
|
40
26
|
}
|
|
41
27
|
}
|
|
42
28
|
|
package/types/exported.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { LocaleDefinition } from '../abstract/localeRegistry';
|
|
|
2
2
|
import type { complexConfigKeys } from '../blocks/Config/Config';
|
|
3
3
|
import type { FuncFileValidator, FuncCollectionValidator } from '../abstract/ValidationManager';
|
|
4
4
|
import type { CameraMode } from '../blocks/CameraSource/CameraSource';
|
|
5
|
+
import type { FilesViewMode } from '../blocks/UploadList/UploadList';
|
|
5
6
|
|
|
6
7
|
export type { FuncFileValidator, FuncCollectionValidator } from '../abstract/ValidationManager';
|
|
7
8
|
export type { UploaderPublicApi } from '../abstract/UploaderPublicApi';
|
|
@@ -279,11 +280,11 @@ export type ConfigType = {
|
|
|
279
280
|
*/
|
|
280
281
|
mediaRecorderOptions: MediaRecorderOptions | null;
|
|
281
282
|
|
|
282
|
-
|
|
283
|
+
filesViewMode: FilesViewMode;
|
|
283
284
|
|
|
284
|
-
|
|
285
|
+
gridShowFileNames: boolean;
|
|
285
286
|
|
|
286
|
-
|
|
287
|
+
cloudImageEditorAutoOpen: boolean;
|
|
287
288
|
};
|
|
288
289
|
export type ConfigComplexType = Pick<ConfigType, (typeof complexConfigKeys)[number]>;
|
|
289
290
|
export type ConfigPlainType = Omit<ConfigType, keyof ConfigComplexType>;
|
package/types/jsx.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ declare namespace JSX {
|
|
|
54
54
|
>;
|
|
55
55
|
'uc-cloud-image-editor': CustomElement<CloudImageEditorBlock, JSX.IntrinsicElements['uc-cloud-image-editor-block']>;
|
|
56
56
|
'uc-form-input': CustomElement<FormInput, CtxAttributes>;
|
|
57
|
-
'uc-file-uploader-regular': CustomElement<FileUploaderRegular, CtxAttributes
|
|
57
|
+
'uc-file-uploader-regular': CustomElement<FileUploaderRegular, CtxAttributes & Partial<{ headless: boolean }>>;
|
|
58
58
|
'uc-file-uploader-minimal': CustomElement<FileUploaderMinimal, CtxAttributes>;
|
|
59
59
|
'uc-file-uploader-inline': CustomElement<FileUploaderInline, CtxAttributes>;
|
|
60
60
|
'uc-upload-ctx-provider': CustomElement<InstanceType<UploadCtxProvider>, CtxAttributes>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function calcBrowserInfo(): {
|
|
2
|
+
safariDesktop: boolean;
|
|
3
|
+
};
|
|
4
|
+
export function calcBrowserFeatures(): {
|
|
5
|
+
htmlMediaCapture: boolean;
|
|
6
|
+
};
|
|
7
|
+
export namespace browserInfo {
|
|
8
|
+
let safariDesktop: boolean;
|
|
9
|
+
}
|
|
10
|
+
export namespace browserFeatures {
|
|
11
|
+
let htmlMediaCapture: boolean;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=browser-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-info.d.ts","sourceRoot":"","sources":["browser-info.js"],"names":[],"mappings":"AAWO;;EAEL;AAEK;;EAEL"}
|