@uploadcare/file-uploader 1.24.0-alpha.2 → 1.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/env.js +1 -1
- package/dist/index.css +3 -2
- package/dist/index.d.ts +48 -58
- package/dist/index.js +197 -233
- package/dist/index.ssr.js +6 -2
- package/package.json +2 -1
- package/types/css.d.ts +3 -0
- package/web/file-uploader.iife.min.d.ts +48 -58
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.d.ts +48 -58
- package/web/file-uploader.min.js +4 -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.d.ts +11 -21
- 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.d.ts +48 -58
- 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.d.ts +48 -58
- 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.d.ts +48 -58
- package/web/uc-file-uploader-regular.min.js +4 -4
- package/web/uc-img.min.js +1 -1
package/dist/index.ssr.js
CHANGED
|
@@ -840,7 +840,11 @@ export const ExternalSource = class {
|
|
|
840
840
|
<button type="button" set="onclick: onSelectAll; @hidden: !couldSelectAll" l10n="select-all"></button>
|
|
841
841
|
<button type="button" set="onclick: onDeselectAll; @hidden: !couldDeselectAll" l10n="deselect-all"></button>
|
|
842
842
|
</div>
|
|
843
|
-
<button
|
|
843
|
+
<button
|
|
844
|
+
type="button"
|
|
845
|
+
class="uc-done-btn uc-primary-btn"
|
|
846
|
+
set="onclick: onDone; @disabled: !isDoneBtnEnabled; @hidden: !showDoneBtn"
|
|
847
|
+
>
|
|
844
848
|
<uc-spinner set="@hidden: isSelectionReady"></uc-spinner>
|
|
845
849
|
<span l10n="done" set="@class: doneBtnTextClass"></span>
|
|
846
850
|
</button>
|
|
@@ -1128,7 +1132,7 @@ export const ModalEvents = {
|
|
|
1128
1132
|
DESTROY: "modal:destroy",
|
|
1129
1133
|
};
|
|
1130
1134
|
export const PACKAGE_NAME = `blocks`;
|
|
1131
|
-
export const PACKAGE_VERSION = `1.24.
|
|
1135
|
+
export const PACKAGE_VERSION = `1.24.1`;
|
|
1132
1136
|
export const PresenceToggle = class {
|
|
1133
1137
|
static template = `<slot></slot> `;
|
|
1134
1138
|
static reg = () => {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadcare/file-uploader",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.1",
|
|
4
4
|
"description": "Building blocks for Uploadcare products integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web components",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"default": "./dist/index.js"
|
|
48
48
|
},
|
|
49
49
|
"./index.css": {
|
|
50
|
+
"types": "./types/css.d.ts",
|
|
50
51
|
"default": "./dist/index.css"
|
|
51
52
|
},
|
|
52
53
|
"./abstract/loadFileUploaderFrom.js": "./dist/abstract/loadFileUploaderFrom.js",
|
package/types/css.d.ts
ADDED
|
@@ -5,41 +5,6 @@ import { UploadcareFile, Metadata, UploadError, NetworkError, UploadcareGroup, F
|
|
|
5
5
|
export { Metadata, NetworkError, UploadError, UploadcareError, UploadcareFile, UploadcareGroup } from '@uploadcare/upload-client';
|
|
6
6
|
import { TelemetryRequest } from '@uploadcare/quality-insights';
|
|
7
7
|
|
|
8
|
-
declare const ExternalUploadSource: Readonly<{
|
|
9
|
-
readonly FACEBOOK: "facebook";
|
|
10
|
-
readonly DROPBOX: "dropbox";
|
|
11
|
-
readonly GDRIVE: "gdrive";
|
|
12
|
-
readonly GPHOTOS: "gphotos";
|
|
13
|
-
readonly FLICKR: "flickr";
|
|
14
|
-
readonly VK: "vk";
|
|
15
|
-
readonly EVERNOTE: "evernote";
|
|
16
|
-
readonly BOX: "box";
|
|
17
|
-
readonly ONEDRIVE: "onedrive";
|
|
18
|
-
readonly HUDDLE: "huddle";
|
|
19
|
-
}>;
|
|
20
|
-
declare const UploadSource: Readonly<{
|
|
21
|
-
readonly FACEBOOK: "facebook";
|
|
22
|
-
readonly DROPBOX: "dropbox";
|
|
23
|
-
readonly GDRIVE: "gdrive";
|
|
24
|
-
readonly GPHOTOS: "gphotos";
|
|
25
|
-
readonly FLICKR: "flickr";
|
|
26
|
-
readonly VK: "vk";
|
|
27
|
-
readonly EVERNOTE: "evernote";
|
|
28
|
-
readonly BOX: "box";
|
|
29
|
-
readonly ONEDRIVE: "onedrive";
|
|
30
|
-
readonly HUDDLE: "huddle";
|
|
31
|
-
readonly MOBILE_VIDEO_CAMERA: "mobile-video-camera";
|
|
32
|
-
readonly MOBILE_PHOTO_CAMERA: "mobile-photo-camera";
|
|
33
|
-
readonly LOCAL: "local";
|
|
34
|
-
readonly DROP_AREA: "drop-area";
|
|
35
|
-
readonly CAMERA: "camera";
|
|
36
|
-
readonly EXTERNAL: "external";
|
|
37
|
-
readonly API: "js-api";
|
|
38
|
-
readonly URL: "url";
|
|
39
|
-
readonly DRAW: "draw";
|
|
40
|
-
}>;
|
|
41
|
-
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
42
|
-
|
|
43
8
|
declare class A11y {
|
|
44
9
|
private _destroyKeyUX;
|
|
45
10
|
private readonly _scopedWindow;
|
|
@@ -180,7 +145,7 @@ declare class Block extends BaseComponent<any> {
|
|
|
180
145
|
static StateConsumerScope: string | null;
|
|
181
146
|
static styleAttrs: string[];
|
|
182
147
|
protected requireCtxName: boolean;
|
|
183
|
-
activityType:
|
|
148
|
+
activityType: ActivityType;
|
|
184
149
|
init$: {};
|
|
185
150
|
l10n(str: string, variables?: Record<string, string | number>): string;
|
|
186
151
|
private pluralize;
|
|
@@ -477,8 +442,8 @@ declare class ValidationManager {
|
|
|
477
442
|
private _getValidatorDescriptorsForEntry;
|
|
478
443
|
}
|
|
479
444
|
|
|
480
|
-
type CameraMode =
|
|
481
|
-
type CameraStatus =
|
|
445
|
+
type CameraMode = 'photo' | 'video';
|
|
446
|
+
type CameraStatus = 'shot' | 'retake' | 'accept' | 'play' | 'stop' | 'pause' | 'resume';
|
|
482
447
|
declare class CameraSource extends UploaderBlock {
|
|
483
448
|
couldBeCtxOwner: boolean;
|
|
484
449
|
activityType: "camera";
|
|
@@ -578,12 +543,52 @@ declare class UploadList extends UploaderBlock {
|
|
|
578
543
|
destroyCallback(): void;
|
|
579
544
|
}
|
|
580
545
|
|
|
546
|
+
declare const ExternalUploadSource: Readonly<{
|
|
547
|
+
readonly FACEBOOK: "facebook";
|
|
548
|
+
readonly DROPBOX: "dropbox";
|
|
549
|
+
readonly GDRIVE: "gdrive";
|
|
550
|
+
readonly GPHOTOS: "gphotos";
|
|
551
|
+
readonly FLICKR: "flickr";
|
|
552
|
+
readonly VK: "vk";
|
|
553
|
+
readonly EVERNOTE: "evernote";
|
|
554
|
+
readonly BOX: "box";
|
|
555
|
+
readonly ONEDRIVE: "onedrive";
|
|
556
|
+
readonly HUDDLE: "huddle";
|
|
557
|
+
}>;
|
|
558
|
+
declare const UploadSource: Readonly<{
|
|
559
|
+
readonly FACEBOOK: "facebook";
|
|
560
|
+
readonly DROPBOX: "dropbox";
|
|
561
|
+
readonly GDRIVE: "gdrive";
|
|
562
|
+
readonly GPHOTOS: "gphotos";
|
|
563
|
+
readonly FLICKR: "flickr";
|
|
564
|
+
readonly VK: "vk";
|
|
565
|
+
readonly EVERNOTE: "evernote";
|
|
566
|
+
readonly BOX: "box";
|
|
567
|
+
readonly ONEDRIVE: "onedrive";
|
|
568
|
+
readonly HUDDLE: "huddle";
|
|
569
|
+
readonly MOBILE_VIDEO_CAMERA: "mobile-video-camera";
|
|
570
|
+
readonly MOBILE_PHOTO_CAMERA: "mobile-photo-camera";
|
|
571
|
+
readonly LOCAL: "local";
|
|
572
|
+
readonly DROP_AREA: "drop-area";
|
|
573
|
+
readonly CAMERA: "camera";
|
|
574
|
+
readonly EXTERNAL: "external";
|
|
575
|
+
readonly API: "js-api";
|
|
576
|
+
readonly URL: "url";
|
|
577
|
+
readonly DRAW: "draw";
|
|
578
|
+
}>;
|
|
579
|
+
type SourceTypes = (typeof UploadSource)[keyof typeof UploadSource];
|
|
580
|
+
|
|
581
581
|
declare const CameraSourceTypes: Readonly<{
|
|
582
582
|
PHOTO: "photo";
|
|
583
583
|
VIDEO: "video";
|
|
584
584
|
}>;
|
|
585
585
|
type ModeCameraType = (typeof CameraSourceTypes)[keyof typeof CameraSourceTypes];
|
|
586
586
|
|
|
587
|
+
type ApiAddFileCommonOptions = {
|
|
588
|
+
silent?: boolean;
|
|
589
|
+
fileName?: string;
|
|
590
|
+
source?: string;
|
|
591
|
+
};
|
|
587
592
|
declare class UploaderPublicApi {
|
|
588
593
|
private _ctx;
|
|
589
594
|
constructor(ctx: UploaderBlock);
|
|
@@ -593,25 +598,10 @@ declare class UploaderPublicApi {
|
|
|
593
598
|
/**
|
|
594
599
|
* TODO: Probably we should not allow user to override `source` property
|
|
595
600
|
*/
|
|
596
|
-
addFileFromUrl: (url: string, { silent, fileName, source
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
}) => OutputFileEntry<"idle">;
|
|
601
|
-
addFileFromUuid: (uuid: string, { silent, fileName, source, }?: {
|
|
602
|
-
silent?: boolean;
|
|
603
|
-
fileName?: string;
|
|
604
|
-
source?: string;
|
|
605
|
-
}) => OutputFileEntry<"idle">;
|
|
606
|
-
addFileFromCdnUrl: (cdnUrl: string, { silent, fileName, source, }?: {
|
|
607
|
-
silent?: boolean;
|
|
608
|
-
fileName?: string;
|
|
609
|
-
source?: string;
|
|
610
|
-
}) => OutputFileEntry<"idle">;
|
|
611
|
-
addFileFromObject: (file: File, { silent, fileName, source, fullPath, }?: {
|
|
612
|
-
silent?: boolean;
|
|
613
|
-
fileName?: string;
|
|
614
|
-
source?: string;
|
|
601
|
+
addFileFromUrl: (url: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
602
|
+
addFileFromUuid: (uuid: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
603
|
+
addFileFromCdnUrl: (cdnUrl: string, { silent, fileName, source }?: ApiAddFileCommonOptions) => OutputFileEntry<"idle">;
|
|
604
|
+
addFileFromObject: (file: File, { silent, fileName, source, fullPath, }?: ApiAddFileCommonOptions & {
|
|
615
605
|
fullPath?: string;
|
|
616
606
|
}) => OutputFileEntry<"idle">;
|
|
617
607
|
removeFileByInternalId: (internalId: string) => void;
|
|
@@ -2054,4 +2044,4 @@ declare class FileUploaderRegular extends SolutionBlock {
|
|
|
2054
2044
|
type KebabCase<T extends string> = T extends `${infer Head} ${infer Tail}` ? `${Lowercase<Head>}-${KebabCase<Tail>}` : Lowercase<T>;
|
|
2055
2045
|
declare const toKebabCase: <T extends string>(str: T) => KebabCase<T>;
|
|
2056
2046
|
|
|
2057
|
-
export { ActivityBlock, ActivityHeader, Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, DropArea, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, type FileValidator, type FileValidatorDescriptor, type FileValidators, FormInput, type FuncCollectionValidator, type FuncFileValidator, type GroupFlag, Icon, type IconHrefResolver, Img, type KebabCase$1 as KebabCase, type KebabCaseKeys, LineLoaderUi, type LocaleDefinitionOverride, type LowerCase, type LowerCaseKeys, type MetadataCallback, Modal, ModalEvents, type ModalId, type OutputCollectionErrorType, type OutputCollectionState, type OutputCollectionStatus, type OutputCustomErrorType, type OutputError, type OutputErrorCollection, type OutputErrorFile, type OutputErrorTypePayload, type OutputFileEntry, type OutputFileErrorPayload, type OutputFileErrorType, type OutputFileStatus, PACKAGE_NAME, PACKAGE_VERSION, PresenceToggle, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UploadCtxProvider, UploadList, UploadSource, UploaderBlock, UploaderPublicApi, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };
|
|
2047
|
+
export { ActivityBlock, ActivityHeader, type ApiAddFileCommonOptions, Block, BtnUi, CameraSource, CloudImageEditor, CloudImageEditorActivity, CloudImageEditorBlock, type CollectionValidators, Config, type ConfigAttributesType, type ConfigComplexType, type ConfigPlainType, type ConfigType, Copyright, CropFrame, DropArea, EditorAspectRatioButtonControl, EditorCropButtonControl, EditorFilterControl, EditorFreeformButtonControl, EditorImageCropper, EditorImageFader, EditorOperationControl, EditorScroller, EditorSlider, EditorToolbar, type EventMap, type EventPayload, EventType, ExternalSource, ExternalUploadSource, FileItem, FileUploaderInline, FileUploaderMinimal, FileUploaderRegular, type FileValidator, type FileValidatorDescriptor, type FileValidators, FormInput, type FuncCollectionValidator, type FuncFileValidator, type GroupFlag, Icon, type IconHrefResolver, Img, type KebabCase$1 as KebabCase, type KebabCaseKeys, LineLoaderUi, type LocaleDefinitionOverride, type LowerCase, type LowerCaseKeys, type MetadataCallback, Modal, ModalEvents, type ModalId, type OutputCollectionErrorType, type OutputCollectionState, type OutputCollectionStatus, type OutputCustomErrorType, type OutputError, type OutputErrorCollection, type OutputErrorFile, type OutputErrorTypePayload, type OutputFileEntry, type OutputFileErrorPayload, type OutputFileErrorType, type OutputFileStatus, PACKAGE_NAME, PACKAGE_VERSION, PresenceToggle, ProgressBar, ProgressBarCommon, type SecureDeliveryProxyUrlResolver, type SecureUploadsSignatureAndExpire, type SecureUploadsSignatureResolver, Select, SimpleBtn, SliderUi, SolutionBlock, SourceBtn, SourceList, type SourceTypes, Spinner, StartFrom, Thumb, UploadCtxProvider, UploadList, UploadSource, UploaderBlock, UploaderPublicApi, UrlSource, defineComponents, defineLocale, loadFileUploaderFrom, toKebabCase };
|