@uploadcare/blocks
Version:
Building blocks for Uploadcare products integration
82 lines • 2.81 kB
TypeScript
export class UploaderBlock extends ActivityBlock {
ctxInit: {
'*commonProgress': number;
'*uploadList': any[];
'*outputData': any;
'*focusedEntry': any;
'*uploadMetadata': any;
'*currentActivity': string;
'*currentActivityParams': {};
'*history': any[];
'*activityCaption': string;
'*activityIcon': string;
'*ctxTargetsRegistry': Map<any, any>;
};
/** @private */
private __initialUploadMetadata;
/**
* This is Public JS API method. Could be called before block initialization, so we need to delay state interactions
* until block init.
*
* TODO: If we add more public methods, it is better to use the single queue instead of tons of private fields per
* each method. See https://github.com/uploadcare/blocks/pull/162/
*
* @param {import('@uploadcare/upload-client').Metadata} metadata
* @public
*/
public setUploadMetadata(metadata: import('@uploadcare/upload-client').Metadata): void;
/** @param {File[]} files */
addFiles(files: File[]): void;
openSystemDialog(): void;
fileInput: HTMLInputElement;
/** @type {String[]} */
get sourceList(): string[];
/** @param {Boolean} [force] */
initFlow(force?: boolean): void;
cancelFlow(): void;
/** @returns {TypedCollection} */
get uploadCollection(): TypedCollection;
/** @private */
private _handleCollectionUpdate;
/** @returns {import('@uploadcare/upload-client').FileFromOptions} */
getUploadClientOptions(): import('@uploadcare/upload-client').FileFromOptions;
/** @param {(item: import('./TypedData.js').TypedData) => Boolean} checkFn */
getOutputData(checkFn: (item: import('./TypedData.js').TypedData) => boolean): any[];
}
export namespace UploaderBlock {
type sourceTypes = string;
const sourceTypes: Readonly<{
FACEBOOK: "facebook";
DROPBOX: "dropbox";
GDRIVE: "gdrive";
GPHOTOS: "gphotos";
INSTAGRAM: "instagram";
FLICKR: "flickr";
VK: "vk";
EVERNOTE: "evernote";
BOX: "box";
ONEDRIVE: "onedrive";
HUDDLE: "huddle";
LOCAL: "local";
URL: "url";
CAMERA: "camera";
DRAW: "draw";
}>;
type extSrcList = string;
const extSrcList: Readonly<{
FACEBOOK: "facebook";
DROPBOX: "dropbox";
GDRIVE: "gdrive";
GPHOTOS: "gphotos";
INSTAGRAM: "instagram";
FLICKR: "flickr";
VK: "vk";
EVERNOTE: "evernote";
BOX: "box";
ONEDRIVE: "onedrive";
HUDDLE: "huddle";
}>;
}
import { ActivityBlock } from "./ActivityBlock.js";
import { TypedCollection } from "./TypedCollection.js";
//# sourceMappingURL=UploaderBlock.d.ts.map