/** Core */ import { CoreComponent } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; /** Nested modules */ import * as TransactionWizardPackage from "../../directives/transactionWizard/transactionWizard"; import { PageBag } from "cmf.core.controls/src/components/page/pageBag"; /** Angular */ import * as ng from "@angular/core"; import { WizardEventArgs } from "cmf.core.controls/src/components/wizard/wizardDef"; /** * Api path where the upload is made */ export declare const UPLOAD_FILE_API_PATH = "api/GenericService/UploadAttachment"; /** * Key for the file in the upload request data */ export declare const UPLOAD_FILE_REQUEST_DATA_KEY = "attachment-file"; /** * @whatItDoes * * This wizard will enable an user to associate to an entity instance * a file or an Url as Attachment * * @howToUse * * Generic.Attachments.Add * * ### Inputs: * * ### Outputs: * * ### Example * To use the wizard one can invoke via action * * ```javascript * this.framework.sandbox.navigation.navigateByAction(this._router, "Generic.Attachments.Add", { * instance: this.instance, * preSelectedAttachment: file * }, this._elementRef); * ``` * * * @description * * ## EntityAttachments Component * * ### Dependencies * * #### Components * * _This component depends on WizardModule,TransactionWizardModule,ValidatorModule, StepAttachments and RadioModule components_ * * #### Services * * _This component does not depend on any service_ * * #### Directives * _This component does not depend on any directive_ * */ export declare class WizardAttachments extends CoreComponent implements TransactionWizardPackage.TransactionWizardInterface { private _pageBag; private _elementRef; private _stepAttachments; /** * Supported file extensions */ supportedFileExtensions: string[]; /** * Pre-selected attachment file, if filled wizard on load will * automatically fill the file field with the preselected one */ preSelectedAttachment: File; /** * Entity instance for which the attachment will be set */ instance: Cmf.Foundation.BusinessObjects.Entity; /** * Constructor * * @param viewContainerRef the reference to the component view container */ constructor(viewContainerRef: ng.ViewContainerRef, _pageBag: PageBag, _elementRef: ng.ElementRef); /** * Load all supported file extensions on wizard init */ onWizardInit(args: WizardEventArgs): void; /** * @param args transaction wizard input args */ prepareTransactionInput(args: TransactionWizardPackage.TransactionWizardArgs): Promise; /** * Uploads a file to the host and returns the temporary path were it was stored * @param file File to upload * @returns promise to a string with the path */ private uploadFile; /** * @param output result of the query output */ handleTransactionOutput(output: Cmf.Foundation.BusinessOrchestration.BaseOutput): Promise; } export declare class WizardAttachmentsModule { }