@uploadcare/file-uploader 1.21.0 → 1.23.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.
Files changed (126) hide show
  1. package/abstract/UploaderBlock.d.ts.map +1 -1
  2. package/abstract/UploaderBlock.js +27 -5
  3. package/abstract/UploaderPublicApi.d.ts.map +1 -1
  4. package/abstract/UploaderPublicApi.js +9 -1
  5. package/abstract/managers/ValidationManager.d.ts +71 -12
  6. package/abstract/managers/ValidationManager.d.ts.map +1 -1
  7. package/abstract/managers/ValidationManager.js +229 -53
  8. package/abstract/uploadEntrySchema.d.ts +10 -2
  9. package/abstract/uploadEntrySchema.d.ts.map +1 -1
  10. package/abstract/uploadEntrySchema.js +10 -2
  11. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.js +1 -1
  12. package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +3 -0
  13. package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts.map +1 -1
  14. package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.js +20 -10
  15. package/blocks/CloudImageEditor/src/css/common.css +30 -0
  16. package/blocks/CloudImageEditor/src/svg-sprite.d.ts +1 -1
  17. package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +1 -1
  18. package/blocks/CloudImageEditor/src/svg-sprite.js +1 -1
  19. package/blocks/Config/initialConfig.d.ts.map +1 -1
  20. package/blocks/Config/initialConfig.js +2 -0
  21. package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
  22. package/blocks/Config/normalizeConfigValue.js +2 -0
  23. package/blocks/FileItem/FileItem.d.ts +1 -1
  24. package/blocks/FileItem/FileItem.d.ts.map +1 -1
  25. package/blocks/FileItem/FileItem.js +68 -49
  26. package/blocks/UploadList/UploadList.d.ts +2 -0
  27. package/blocks/UploadList/UploadList.d.ts.map +1 -1
  28. package/blocks/UploadList/UploadList.js +18 -20
  29. package/blocks/themes/uc-basic/svg-sprite.d.ts +1 -1
  30. package/blocks/themes/uc-basic/svg-sprite.d.ts.map +1 -1
  31. package/blocks/themes/uc-basic/svg-sprite.js +1 -1
  32. package/env.d.ts +1 -1
  33. package/env.js +1 -1
  34. package/index.ssr.d.ts +1 -1
  35. package/index.ssr.d.ts.map +1 -1
  36. package/index.ssr.js +7 -3
  37. package/locales/file-uploader/ar.d.ts +4 -2
  38. package/locales/file-uploader/ar.js +6 -5
  39. package/locales/file-uploader/az.d.ts +4 -2
  40. package/locales/file-uploader/az.js +7 -4
  41. package/locales/file-uploader/ca.d.ts +4 -2
  42. package/locales/file-uploader/ca.js +7 -4
  43. package/locales/file-uploader/cs.d.ts +4 -2
  44. package/locales/file-uploader/cs.js +7 -4
  45. package/locales/file-uploader/da.d.ts +4 -2
  46. package/locales/file-uploader/da.js +7 -4
  47. package/locales/file-uploader/de.d.ts +4 -2
  48. package/locales/file-uploader/de.js +7 -4
  49. package/locales/file-uploader/el.d.ts +4 -2
  50. package/locales/file-uploader/el.js +7 -4
  51. package/locales/file-uploader/en.d.ts +4 -2
  52. package/locales/file-uploader/en.js +6 -5
  53. package/locales/file-uploader/es.d.ts +4 -2
  54. package/locales/file-uploader/es.js +7 -4
  55. package/locales/file-uploader/et.d.ts +4 -2
  56. package/locales/file-uploader/et.js +7 -4
  57. package/locales/file-uploader/fi.d.ts +4 -2
  58. package/locales/file-uploader/fi.js +7 -4
  59. package/locales/file-uploader/fr.d.ts +4 -2
  60. package/locales/file-uploader/fr.js +7 -4
  61. package/locales/file-uploader/he.d.ts +4 -2
  62. package/locales/file-uploader/he.js +7 -4
  63. package/locales/file-uploader/hy.d.ts +4 -2
  64. package/locales/file-uploader/hy.js +6 -4
  65. package/locales/file-uploader/is.d.ts +4 -2
  66. package/locales/file-uploader/is.js +7 -4
  67. package/locales/file-uploader/it.d.ts +4 -2
  68. package/locales/file-uploader/it.js +7 -4
  69. package/locales/file-uploader/ja.d.ts +4 -2
  70. package/locales/file-uploader/ja.js +7 -4
  71. package/locales/file-uploader/ka.d.ts +4 -2
  72. package/locales/file-uploader/ka.js +7 -4
  73. package/locales/file-uploader/kk.d.ts +4 -2
  74. package/locales/file-uploader/kk.js +7 -4
  75. package/locales/file-uploader/ko.d.ts +4 -2
  76. package/locales/file-uploader/ko.js +7 -4
  77. package/locales/file-uploader/lv.d.ts +4 -2
  78. package/locales/file-uploader/lv.js +7 -4
  79. package/locales/file-uploader/nb.d.ts +4 -2
  80. package/locales/file-uploader/nb.js +7 -4
  81. package/locales/file-uploader/nl.d.ts +4 -2
  82. package/locales/file-uploader/nl.js +7 -4
  83. package/locales/file-uploader/pl.d.ts +4 -2
  84. package/locales/file-uploader/pl.js +7 -4
  85. package/locales/file-uploader/pt.d.ts +4 -2
  86. package/locales/file-uploader/pt.js +7 -4
  87. package/locales/file-uploader/ro.d.ts +4 -2
  88. package/locales/file-uploader/ro.js +7 -4
  89. package/locales/file-uploader/ru.d.ts +4 -2
  90. package/locales/file-uploader/ru.js +7 -6
  91. package/locales/file-uploader/sk.d.ts +4 -2
  92. package/locales/file-uploader/sk.js +7 -4
  93. package/locales/file-uploader/sr.d.ts +4 -2
  94. package/locales/file-uploader/sr.js +7 -4
  95. package/locales/file-uploader/sv.d.ts +4 -2
  96. package/locales/file-uploader/sv.js +7 -4
  97. package/locales/file-uploader/tr.d.ts +4 -2
  98. package/locales/file-uploader/tr.js +7 -4
  99. package/locales/file-uploader/uk.d.ts +4 -2
  100. package/locales/file-uploader/uk.js +7 -4
  101. package/locales/file-uploader/vi.d.ts +4 -2
  102. package/locales/file-uploader/vi.js +7 -4
  103. package/locales/file-uploader/zh-TW.d.ts +4 -2
  104. package/locales/file-uploader/zh-TW.js +7 -4
  105. package/locales/file-uploader/zh.d.ts +4 -2
  106. package/locales/file-uploader/zh.js +7 -6
  107. package/package.json +8 -8
  108. package/types/exported.d.ts +26 -4
  109. package/utils/withResolvers.d.ts +6 -0
  110. package/utils/withResolvers.d.ts.map +1 -0
  111. package/utils/withResolvers.js +18 -0
  112. package/utils/withResolvers.test.d.ts +2 -0
  113. package/utils/withResolvers.test.d.ts.map +1 -0
  114. package/utils/withResolvers.test.js +36 -0
  115. package/web/file-uploader.iife.min.js +4 -4
  116. package/web/file-uploader.min.js +4 -4
  117. package/web/uc-basic.min.css +1 -1
  118. package/web/uc-cloud-image-editor.min.css +1 -1
  119. package/web/uc-cloud-image-editor.min.js +4 -4
  120. package/web/uc-file-uploader-inline.min.css +1 -1
  121. package/web/uc-file-uploader-inline.min.js +4 -4
  122. package/web/uc-file-uploader-minimal.min.css +1 -1
  123. package/web/uc-file-uploader-minimal.min.js +4 -4
  124. package/web/uc-file-uploader-regular.min.css +1 -1
  125. package/web/uc-file-uploader-regular.min.js +4 -4
  126. package/web/uc-img.min.js +1 -1
@@ -120,15 +120,17 @@ declare const _default: {
120
120
  failed: string;
121
121
  uploading: string;
122
122
  idle: string;
123
- queued: string;
124
123
  'a11y-file-item-status': string;
125
124
  'select-all': string;
126
125
  'deselect-all': string;
127
126
  'waiting-for': string;
127
+ 'queued-uploading': string;
128
+ 'queued-validation': string;
129
+ validation: string;
128
130
  'a11y-cloud-editor-apply-aspect-ratio': string;
129
- 'aspect-ratio': string;
130
131
  'crop-to-shape': string;
131
132
  custom: string;
133
+ 'freeform-crop': string;
132
134
  };
133
135
  export default _default;
134
136
  //# sourceMappingURL=ru.d.ts.map
@@ -57,7 +57,7 @@ export default {
57
57
  'src-type-vk': 'ВКонтакте',
58
58
  'src-type-evernote': 'Evernote',
59
59
  'src-type-box': 'Box',
60
- 'src-type-onedrive': 'Onedrive',
60
+ 'src-type-onedrive': 'OneDrive',
61
61
  'src-type-huddle': 'Huddle',
62
62
  'src-type-other': 'Другое',
63
63
  'src-type-mobile-video-camera': 'Видео',
@@ -121,15 +121,16 @@ export default {
121
121
  failed: 'Не удалось',
122
122
  uploading: 'Загрузка',
123
123
  idle: 'Ожидание',
124
- queued: 'В очереди',
124
+
125
125
  'a11y-file-item-status': 'Файл {{fileName}} находится в статусе {{status}}',
126
126
  'select-all': 'Выбрать все',
127
127
  'deselect-all': 'Отменить выбор всех',
128
128
  'waiting-for': 'Ожидание {{source}}',
129
+ 'queued-uploading': 'В очереди на загрузку',
130
+ 'queued-validation': 'В очереди на проверку',
131
+ validation: 'Идет проверка',
129
132
  'a11y-cloud-editor-apply-aspect-ratio': 'Применить операцию {{name}} {{value}}',
130
- 'aspect-ratio': 'Соотношение сторон',
131
-
132
133
  'crop-to-shape': 'Обрезать до {{value}}',
133
-
134
- custom: 'Пользовательский',
134
+ custom: 'Свободная форма',
135
+ 'freeform-crop': 'Свободная обрезка',
135
136
  };
@@ -124,11 +124,13 @@ declare const _default: {
124
124
  'select-all': string;
125
125
  'deselect-all': string;
126
126
  'waiting-for': string;
127
- queued: string;
127
+ 'queued-uploading': string;
128
+ 'queued-validation': string;
129
+ validation: string;
128
130
  'a11y-cloud-editor-apply-aspect-ratio': string;
129
- 'aspect-ratio': string;
130
131
  'crop-to-shape': string;
131
132
  custom: string;
133
+ 'freeform-crop': string;
132
134
  };
133
135
  export default _default;
134
136
  //# sourceMappingURL=sk.d.ts.map
@@ -57,7 +57,7 @@ export default {
57
57
  'src-type-vk': 'VK',
58
58
  'src-type-evernote': 'Evernote',
59
59
  'src-type-box': 'Box',
60
- 'src-type-onedrive': 'Onedrive',
60
+ 'src-type-onedrive': 'OneDrive',
61
61
  'src-type-huddle': 'Huddle',
62
62
  'src-type-other': 'Iné',
63
63
  'src-type-mobile-video-camera': 'Video',
@@ -121,15 +121,18 @@ export default {
121
121
  failed: 'Neúspešné',
122
122
  uploading: 'Nahrávanie',
123
123
  idle: 'Nečinný',
124
+
124
125
  'a11y-file-item-status': 'Súbor {{fileName}} je v stave {{status}}',
125
126
  'select-all': 'Vybrať všetko',
126
127
  'deselect-all': 'Zrušiť výber všetkého',
127
128
  'waiting-for': 'Čaká sa na {{source}}',
128
- queued: 'Vo fronte',
129
+ 'queued-uploading': 'Vo fronte na nahranie',
130
+ 'queued-validation': 'Vo fronte na validáciu',
131
+ validation: 'Prebieha validácia',
129
132
  'a11y-cloud-editor-apply-aspect-ratio': 'Použiť operáciu {{name}} {{value}}',
130
- 'aspect-ratio': 'Pomer strán',
131
133
 
132
134
  'crop-to-shape': 'Orezať na {{value}}',
133
135
 
134
- custom: 'Vlastný',
136
+ custom: 'Voľná forma',
137
+ 'freeform-crop': 'Voľné orezávanie',
135
138
  };
@@ -122,11 +122,13 @@ declare const _default: {
122
122
  'select-all': string;
123
123
  'deselect-all': string;
124
124
  'waiting-for': string;
125
- queued: string;
125
+ 'queued-uploading': string;
126
+ 'queued-validation': string;
127
+ validation: string;
126
128
  'a11y-cloud-editor-apply-aspect-ratio': string;
127
- 'aspect-ratio': string;
128
129
  'crop-to-shape': string;
129
130
  custom: string;
131
+ 'freeform-crop': string;
130
132
  };
131
133
  export default _default;
132
134
  //# sourceMappingURL=sr.d.ts.map
@@ -55,7 +55,7 @@ export default {
55
55
  'src-type-vk': 'VK',
56
56
  'src-type-evernote': 'Evernote',
57
57
  'src-type-box': 'Box',
58
- 'src-type-onedrive': 'Onedrive',
58
+ 'src-type-onedrive': 'OneDrive',
59
59
  'src-type-huddle': 'Huddle',
60
60
  'src-type-other': 'Остало',
61
61
  'src-type-mobile-video-camera': 'Видео',
@@ -119,15 +119,18 @@ export default {
119
119
  failed: 'Neuspešno',
120
120
  uploading: 'Otpremanje',
121
121
  idle: 'Neaktivan',
122
+
122
123
  'a11y-file-item-status': 'Datoteka {{fileName}} je u statusu {{status}}',
123
124
  'select-all': 'Изабери све',
124
125
  'deselect-all': 'Поништи избор свих',
125
126
  'waiting-for': 'Чека се {{source}}',
126
- queued: 'У реду',
127
+ 'queued-uploading': 'У реду за отпремање',
128
+ 'queued-validation': 'У реду за валидацију',
129
+ validation: 'Валидација у току',
127
130
  'a11y-cloud-editor-apply-aspect-ratio': 'Примени операцију {{name}} {{value}}',
128
- 'aspect-ratio': 'Однос страница',
129
131
 
130
132
  'crop-to-shape': 'Исеци на {{value}}',
131
133
 
132
- custom: 'Прилагођен',
134
+ custom: 'Слободна форма',
135
+ 'freeform-crop': 'Слободно исецање',
133
136
  };
@@ -116,15 +116,17 @@ declare const _default: {
116
116
  failed: string;
117
117
  uploading: string;
118
118
  idle: string;
119
- queued: string;
120
119
  'a11y-file-item-status': string;
121
120
  'select-all': string;
122
121
  'deselect-all': string;
123
122
  'waiting-for': string;
123
+ 'queued-uploading': string;
124
+ 'queued-validation': string;
125
+ validation: string;
124
126
  'a11y-cloud-editor-apply-aspect-ratio': string;
125
- 'aspect-ratio': string;
126
127
  'crop-to-shape': string;
127
128
  custom: string;
129
+ 'freeform-crop': string;
128
130
  };
129
131
  export default _default;
130
132
  //# sourceMappingURL=sv.d.ts.map
@@ -53,7 +53,7 @@ export default {
53
53
  'src-type-vk': 'VK',
54
54
  'src-type-evernote': 'Evernote',
55
55
  'src-type-box': 'Box',
56
- 'src-type-onedrive': 'Onedrive',
56
+ 'src-type-onedrive': 'OneDrive',
57
57
  'src-type-huddle': 'Huddle',
58
58
  'src-type-other': 'Annat',
59
59
  'src-type-mobile-video-camera': 'Video',
@@ -117,15 +117,18 @@ export default {
117
117
  failed: 'Misslyckades',
118
118
  uploading: 'Laddar upp',
119
119
  idle: 'Overksam',
120
- queued: 'I kö',
120
+
121
121
  'a11y-file-item-status': 'Filen {{fileName}} är i status {{status}}',
122
122
  'select-all': 'Välj alla',
123
123
  'deselect-all': 'Avmarkera alla',
124
124
  'waiting-for': 'Väntar på {{source}}',
125
+ 'queued-uploading': 'I kö för uppladdning',
126
+ 'queued-validation': 'I kö för validering',
127
+ validation: 'Validerar',
125
128
  'a11y-cloud-editor-apply-aspect-ratio': 'Använd åtgärd {{name}} {{value}}',
126
- 'aspect-ratio': 'Bildförhållande',
127
129
 
128
130
  'crop-to-shape': 'Beskär till {{value}}',
129
131
 
130
- custom: 'Anpassad',
132
+ custom: 'Fri form',
133
+ 'freeform-crop': 'Fri beskärning',
131
134
  };
@@ -116,15 +116,17 @@ declare const _default: {
116
116
  failed: string;
117
117
  uploading: string;
118
118
  idle: string;
119
- queued: string;
120
119
  'a11y-file-item-status': string;
121
120
  'select-all': string;
122
121
  'deselect-all': string;
123
122
  'waiting-for': string;
123
+ 'queued-uploading': string;
124
+ 'queued-validation': string;
125
+ validation: string;
124
126
  'a11y-cloud-editor-apply-aspect-ratio': string;
125
- 'aspect-ratio': string;
126
127
  'crop-to-shape': string;
127
128
  custom: string;
129
+ 'freeform-crop': string;
128
130
  };
129
131
  export default _default;
130
132
  //# sourceMappingURL=tr.d.ts.map
@@ -53,7 +53,7 @@ export default {
53
53
  'src-type-vk': 'VK',
54
54
  'src-type-evernote': 'Evernote',
55
55
  'src-type-box': 'Box',
56
- 'src-type-onedrive': 'Onedrive',
56
+ 'src-type-onedrive': 'OneDrive',
57
57
  'src-type-huddle': 'Huddle',
58
58
  'src-type-other': 'Diğer',
59
59
  'src-type-mobile-video-camera': 'Video',
@@ -117,15 +117,18 @@ export default {
117
117
  failed: 'Başarısız',
118
118
  uploading: 'Yükleniyor',
119
119
  idle: 'Boşta',
120
- queued: 'Sırada',
120
+
121
121
  'a11y-file-item-status': '{{fileName}} dosyası {{status}} durumunda',
122
122
  'select-all': 'Hepsini seç',
123
123
  'deselect-all': 'Hiçbirini seçme',
124
124
  'waiting-for': '{{source}} bekleniyor',
125
+ 'queued-uploading': 'Yükleme için sırada',
126
+ 'queued-validation': 'Doğrulama için sırada',
127
+ validation: 'Doğrulanıyor',
125
128
  'a11y-cloud-editor-apply-aspect-ratio': '{{name}} {{value}} işlemini uygula',
126
- 'aspect-ratio': 'En boy oranı',
127
129
 
128
130
  'crop-to-shape': '{{value}} boyutuna kırp',
129
131
 
130
- custom: 'Özel',
132
+ custom: 'Serbest form',
133
+ 'freeform-crop': 'Serbest kırpma',
131
134
  };
@@ -120,15 +120,17 @@ declare const _default: {
120
120
  failed: string;
121
121
  uploading: string;
122
122
  idle: string;
123
- queued: string;
124
123
  'a11y-file-item-status': string;
125
124
  'select-all': string;
126
125
  'deselect-all': string;
127
126
  'waiting-for': string;
127
+ 'queued-uploading': string;
128
+ 'queued-validation': string;
129
+ validation: string;
128
130
  'a11y-cloud-editor-apply-aspect-ratio': string;
129
- 'aspect-ratio': string;
130
131
  'crop-to-shape': string;
131
132
  custom: string;
133
+ 'freeform-crop': string;
132
134
  };
133
135
  export default _default;
134
136
  //# sourceMappingURL=uk.d.ts.map
@@ -57,7 +57,7 @@ export default {
57
57
  'src-type-vk': 'VK',
58
58
  'src-type-evernote': 'Evernote',
59
59
  'src-type-box': 'Box',
60
- 'src-type-onedrive': 'Onedrive',
60
+ 'src-type-onedrive': 'OneDrive',
61
61
  'src-type-huddle': 'Huddle',
62
62
  'src-type-other': 'Інше',
63
63
  'src-type-mobile-video-camera': 'Відео',
@@ -121,15 +121,18 @@ export default {
121
121
  failed: 'Не вдалося',
122
122
  uploading: 'Завантаження',
123
123
  idle: 'Очікування',
124
- queued: 'У черзі',
124
+
125
125
  'a11y-file-item-status': 'Файл {{fileName}} у стані {{status}}',
126
126
  'select-all': 'Вибрати всі',
127
127
  'deselect-all': 'Скасувати вибір всіх',
128
128
  'waiting-for': 'Очікування {{source}}',
129
+ 'queued-uploading': 'У черзі на завантаження',
130
+ 'queued-validation': 'У черзі на перевірку',
131
+ validation: 'Триває перевірка',
129
132
  'a11y-cloud-editor-apply-aspect-ratio': 'Застосувати операцію {{name}} {{value}}',
130
- 'aspect-ratio': 'Співвідношення сторін',
131
133
 
132
134
  'crop-to-shape': 'Обрізати до {{value}}',
133
135
 
134
- custom: 'Користувацький',
136
+ custom: 'Вільна форма',
137
+ 'freeform-crop': 'Вільна обрізка',
135
138
  };
@@ -116,15 +116,17 @@ declare const _default: {
116
116
  failed: string;
117
117
  uploading: string;
118
118
  idle: string;
119
- queued: string;
120
119
  'a11y-file-item-status': string;
121
120
  'select-all': string;
122
121
  'deselect-all': string;
123
122
  'waiting-for': string;
123
+ 'queued-uploading': string;
124
+ 'queued-validation': string;
125
+ validation: string;
124
126
  'a11y-cloud-editor-apply-aspect-ratio': string;
125
- 'aspect-ratio': string;
126
127
  'crop-to-shape': string;
127
128
  custom: string;
129
+ 'freeform-crop': string;
128
130
  };
129
131
  export default _default;
130
132
  //# sourceMappingURL=vi.d.ts.map
@@ -53,7 +53,7 @@ export default {
53
53
  'src-type-vk': 'VK',
54
54
  'src-type-evernote': 'Evernote',
55
55
  'src-type-box': 'Box',
56
- 'src-type-onedrive': 'Onedrive',
56
+ 'src-type-onedrive': 'OneDrive',
57
57
  'src-type-huddle': 'Huddle',
58
58
  'src-type-other': 'Khác',
59
59
  'src-type-mobile-video-camera': 'Video',
@@ -117,15 +117,18 @@ export default {
117
117
  failed: 'Thất bại',
118
118
  uploading: 'Đang tải lên',
119
119
  idle: 'Nhàn rỗi',
120
- queued: 'Đang xếp hàng',
120
+
121
121
  'a11y-file-item-status': 'Tệp {{fileName}} ở trạng thái {{status}}',
122
122
  'select-all': 'Chọn tất cả',
123
123
  'deselect-all': 'Bỏ chọn tất cả',
124
124
  'waiting-for': 'Đang chờ {{source}}',
125
+ 'queued-uploading': 'Đang xếp hàng để tải lên',
126
+ 'queued-validation': 'Đang xếp hàng để xác thực',
127
+ validation: 'Đang xác thực',
125
128
  'a11y-cloud-editor-apply-aspect-ratio': 'Áp dụng thao tác {{name}} {{value}}',
126
- 'aspect-ratio': 'Tỷ lệ khung hình',
127
129
 
128
130
  'crop-to-shape': 'Cắt theo {{value}}',
129
131
 
130
- custom: 'Tùy chỉnh',
132
+ custom: 'Dạng tự do',
133
+ 'freeform-crop': 'Cắt tự do',
131
134
  };
@@ -116,15 +116,17 @@ declare const _default: {
116
116
  failed: string;
117
117
  uploading: string;
118
118
  idle: string;
119
- queued: string;
120
119
  'a11y-file-item-status': string;
121
120
  'select-all': string;
122
121
  'deselect-all': string;
123
122
  'waiting-for': string;
123
+ 'queued-uploading': string;
124
+ 'queued-validation': string;
125
+ validation: string;
124
126
  'a11y-cloud-editor-apply-aspect-ratio': string;
125
- 'aspect-ratio': string;
126
127
  'crop-to-shape': string;
127
128
  custom: string;
129
+ 'freeform-crop': string;
128
130
  };
129
131
  export default _default;
130
132
  //# sourceMappingURL=zh-TW.d.ts.map
@@ -53,7 +53,7 @@ export default {
53
53
  'src-type-vk': 'VK',
54
54
  'src-type-evernote': 'Evernote',
55
55
  'src-type-box': 'Box',
56
- 'src-type-onedrive': 'Onedrive',
56
+ 'src-type-onedrive': 'OneDrive',
57
57
  'src-type-huddle': 'Huddle',
58
58
  'src-type-other': '其他',
59
59
  'src-type-mobile-video-camera': '影片',
@@ -117,15 +117,18 @@ export default {
117
117
  failed: '失敗',
118
118
  uploading: '上傳中',
119
119
  idle: '閒置',
120
- queued: '排隊中',
120
+
121
121
  'a11y-file-item-status': '檔案 {{fileName}} 的狀態是 {{status}}',
122
122
  'select-all': '全選',
123
123
  'deselect-all': '取消全選',
124
124
  'waiting-for': '等待 {{source}}',
125
+ 'queued-uploading': '排隊等待上傳',
126
+ 'queued-validation': '排隊等待驗證',
127
+ validation: '驗證中',
125
128
  'a11y-cloud-editor-apply-aspect-ratio': '套用操作 {{name}} {{value}}',
126
- 'aspect-ratio': '寬高比',
127
129
 
128
130
  'crop-to-shape': '裁剪為 {{value}}',
129
131
 
130
- custom: '自訂',
132
+ custom: '自由形式',
133
+ 'freeform-crop': '自由裁剪',
131
134
  };
@@ -116,15 +116,17 @@ declare const _default: {
116
116
  failed: string;
117
117
  uploading: string;
118
118
  idle: string;
119
- queued: string;
120
119
  'a11y-file-item-status': string;
121
120
  'select-all': string;
122
121
  'deselect-all': string;
123
122
  'waiting-for': string;
123
+ 'queued-uploading': string;
124
+ 'queued-validation': string;
125
+ validation: string;
124
126
  'a11y-cloud-editor-apply-aspect-ratio': string;
125
- 'aspect-ratio': string;
126
127
  'crop-to-shape': string;
127
128
  custom: string;
129
+ 'freeform-crop': string;
128
130
  };
129
131
  export default _default;
130
132
  //# sourceMappingURL=zh.d.ts.map
@@ -53,7 +53,7 @@ export default {
53
53
  'src-type-vk': 'VK',
54
54
  'src-type-evernote': 'Evernote',
55
55
  'src-type-box': 'Box',
56
- 'src-type-onedrive': 'Onedrive',
56
+ 'src-type-onedrive': 'OneDrive',
57
57
  'src-type-huddle': 'Huddle',
58
58
  'src-type-other': '其他',
59
59
  'src-type-mobile-video-camera': '视频',
@@ -117,15 +117,16 @@ export default {
117
117
  failed: '失败',
118
118
  uploading: '上传中',
119
119
  idle: '空闲',
120
- queued: '排队中',
120
+
121
121
  'a11y-file-item-status': '文件 {{fileName}} 的状态是 {{status}}',
122
122
  'select-all': '全选',
123
123
  'deselect-all': '取消全选',
124
124
  'waiting-for': '等待 {{source}}',
125
+ 'queued-uploading': '排队等待上传',
126
+ 'queued-validation': '排队等待验证',
127
+ validation: '正在验证',
125
128
  'a11y-cloud-editor-apply-aspect-ratio': '应用操作 {{name}} {{value}}',
126
- 'aspect-ratio': '宽高比',
127
-
128
129
  'crop-to-shape': '裁剪为 {{value}}',
129
-
130
- custom: '自定义',
130
+ custom: '自由形式',
131
+ 'freeform-crop': '自由裁剪',
131
132
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uploadcare/file-uploader",
3
- "version": "1.21.0",
3
+ "version": "1.23.0",
4
4
  "description": "Building blocks for Uploadcare products integration",
5
5
  "keywords": [
6
6
  "web components",
@@ -107,8 +107,8 @@
107
107
  "@types/node": "^18.15.11",
108
108
  "@types/react": "^18.2.34",
109
109
  "@types/sinon": "^17.0.4",
110
- "@vitest/browser": "^3.1.2",
111
- "@vitest/coverage-v8": "^3.1.3",
110
+ "@vitest/browser": "^3.2.4",
111
+ "@vitest/coverage-v8": "^3.2.4",
112
112
  "@web/test-runner": "^0.20.1",
113
113
  "esbuild": "^0.25.1",
114
114
  "eslint": "^8.56.0",
@@ -135,16 +135,16 @@
135
135
  "tsd": "^0.32.0",
136
136
  "typescript": "^5.8.2",
137
137
  "vite": "^6.3.4",
138
- "vitest": "^3.1.2"
138
+ "vitest": "^3.2.4"
139
139
  },
140
140
  "author": "Uploadcare Inc.",
141
141
  "license": "MIT",
142
142
  "dependencies": {
143
143
  "@symbiotejs/symbiote": "^1.11.7",
144
- "@uploadcare/cname-prefix": "^6.17.0",
145
- "@uploadcare/image-shrink": "^6.17.0",
146
- "@uploadcare/quality-insights": "^6.17.0",
147
- "@uploadcare/upload-client": "^6.17.0",
144
+ "@uploadcare/cname-prefix": "^6.18.0",
145
+ "@uploadcare/image-shrink": "^6.18.0",
146
+ "@uploadcare/quality-insights": "^6.18.0",
147
+ "@uploadcare/upload-client": "^6.18.0",
148
148
  "keyux": "^0.7.1"
149
149
  }
150
150
  }
@@ -1,10 +1,20 @@
1
1
  import type { LocaleDefinition } from '../abstract/localeRegistry';
2
2
  import type { complexConfigKeys } from '../blocks/Config/Config';
3
- import type { FuncFileValidator, FuncCollectionValidator } from '../abstract/managers/ValidationManager';
3
+ import type {
4
+ FuncFileValidator,
5
+ FuncCollectionValidator,
6
+ FileValidator,
7
+ FileValidatorDescriptor,
8
+ } from '../abstract/managers/ValidationManager';
4
9
  import type { CameraMode } from '../blocks/CameraSource/CameraSource';
5
10
  import type { FilesViewMode } from '../blocks/UploadList/UploadList';
6
11
 
7
- export type { FuncFileValidator, FuncCollectionValidator } from '../abstract/managers/ValidationManager';
12
+ export type {
13
+ FuncFileValidator,
14
+ FuncCollectionValidator,
15
+ FileValidator,
16
+ FileValidatorDescriptor,
17
+ } from '../abstract/managers/ValidationManager';
8
18
  export type { UploaderPublicApi } from '../abstract/UploaderPublicApi';
9
19
 
10
20
  export type UploadError = import('@uploadcare/upload-client').UploadError;
@@ -21,7 +31,7 @@ export type SecureDeliveryProxyUrlResolver = (
21
31
  export type SecureUploadsSignatureAndExpire = { secureSignature: string; secureExpire: string };
22
32
  export type SecureUploadsSignatureResolver = () => Promise<SecureUploadsSignatureAndExpire | null>;
23
33
  export type IconHrefResolver = (iconName: string) => string;
24
- export type FileValidators = FuncFileValidator[];
34
+ export type FileValidators = FileValidator[];
25
35
  export type CollectionValidators = FuncCollectionValidator[];
26
36
  export type SourceTypes = import('../blocks/utils/UploadSource').SourceTypes;
27
37
 
@@ -80,7 +90,7 @@ export type ConfigType = {
80
90
  */
81
91
  sourceList: string;
82
92
  /**
83
- * Top-level origin for the uploader.
93
+ * Top-level origin for the uploader.
84
94
  * This is used for Google Drive Picker if there is no access to the origin due to the cross-origin policy.
85
95
  */
86
96
  topLevelOrigin: string;
@@ -255,6 +265,16 @@ export type ConfigType = {
255
265
  */
256
266
  collectionValidators: CollectionValidators;
257
267
 
268
+ /**
269
+ * Timeout for async validation functions, in milliseconds.
270
+ */
271
+ validationTimeout: number;
272
+
273
+ /**
274
+ * The number of files to validate concurrently.
275
+ */
276
+ validationConcurrency: number;
277
+
258
278
  /**
259
279
  * The camera modes to enable in the camera modal,
260
280
  * it is possible to select photo or video capture.
@@ -407,6 +427,8 @@ export type OutputFileEntry<TStatus extends OutputFileStatus = OutputFileStatus>
407
427
  uploadProgress: number;
408
428
  fullPath: string | null;
409
429
  source: SourceTypes | null;
430
+
431
+ isValidationPending: boolean;
410
432
  } & (
411
433
  | {
412
434
  status: 'success';
@@ -0,0 +1,6 @@
1
+ export function withResolvers<T extends void, R extends unknown>(): {
2
+ promise: Promise<T>;
3
+ resolve: (value?: T | PromiseLike<T>) => void;
4
+ reject: (reason?: R) => void;
5
+ };
6
+ //# sourceMappingURL=withResolvers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withResolvers.d.ts","sourceRoot":"","sources":["withResolvers.js"],"names":[],"mappings":"AAKO,8BAJa,CAAC,SAAR,IAAM,EACI,CAAC,SAAX,OAAS,KACT;IAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;CAAE,CAchH"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @template {void} T
3
+ * @template {unknown} R
4
+ * @returns {{ promise: Promise<T>; resolve: (value?: T | PromiseLike<T>) => void; reject: (reason?: R) => void }}
5
+ */
6
+ export const withResolvers = () => {
7
+ /** @type {(value?: any) => void} */
8
+ let resolve;
9
+ /** @type {(reason?: any) => void} */
10
+ let reject;
11
+
12
+ const promise = new Promise((res, rej) => {
13
+ resolve = res;
14
+ reject = rej;
15
+ });
16
+
17
+ return { promise, resolve, reject };
18
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=withResolvers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withResolvers.test.d.ts","sourceRoot":"","sources":["withResolvers.test.js"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ import { expect } from '@esm-bundle/chai';
2
+ import { withResolvers } from './withResolvers';
3
+
4
+ describe('withResolvers', () => {
5
+ it('resolves when external resolve is called', async () => {
6
+ const { promise, resolve } = withResolvers();
7
+
8
+ setTimeout(() => resolve(42), 10);
9
+
10
+ const result = await promise;
11
+ expect(result).to.equal(42);
12
+ });
13
+
14
+ it('rejects when external reject is called', async () => {
15
+ const { promise, reject } = withResolvers();
16
+
17
+ setTimeout(() => reject(new Error('fail')), 10);
18
+
19
+ try {
20
+ await promise;
21
+ throw new Error('Promise should have been rejected');
22
+ } catch (err) {
23
+ expect(err).to.be.instanceOf(Error);
24
+ expect(err.message).to.equal('fail');
25
+ }
26
+ });
27
+
28
+ it('resolves with a promise-like value (flattened)', async () => {
29
+ const { promise, resolve } = withResolvers();
30
+
31
+ setTimeout(() => resolve(Promise.resolve('ok')), 10);
32
+
33
+ const result = await promise;
34
+ expect(result).to.equal('ok');
35
+ });
36
+ });