/** Core */ import { CoreComponent } from "cmf.core/src/core"; import { Cmf } from "cmf.lbos"; /** Nested modules */ import { TransactionWizardInterface, TransactionWizardArgs } from "../../directives/transactionWizard/transactionWizard"; import { PageBag } from "cmf.core.controls/src/components/page/pageBag"; import { ComplexType, EntityTypePropertyValueType } from "cmf.core/src/domain/extensions/caches/entityType"; import { LayoutAffectationLevel, LayoutMetadataKey } from "cmf.core.controls/src/directives/layout/layoutService"; import { InternalLayoutBaseDef } from "cmf.core.controls/src/directives/layout/layoutDef"; /** Angular */ import * as ng from "@angular/core"; /** * Input data for WizardSaveLayout to be passed via context */ export interface WizardSaveLayoutArgs { /** * InternalLayoutBaseDef to be saved (Layout) */ layout: InternalLayoutBaseDef; /** * Current instance being handled: UIPage, Resource, etc */ instance: Cmf.Foundation.BusinessObjects.Entity; /** * List of available context parameters to resolve */ contextParameters: LayoutMetadataKey[]; } /** * @whatItDoes * * Generic wizard to save personalized layouts * Supported objects: UIPage * * @howToUse * * This component receives data via context (context.wizardSaveLayoutArgs) of type WizardSaveLayoutArgs * * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * ``` * * ### _NOTES_ * (optional, Provide additional notes here) * * @description * * ## WizardSaveLayout Component * * ### Dependencies * * #### Components * * BaseWidgetModule : `cmf.core.controls` * * SelectExpandedModule : `cmf.core.controls` * * TransactionWizardModule: `cmf.core.business.controls` * */ export declare class WizardSaveLayout extends CoreComponent implements TransactionWizardInterface, WizardSaveLayoutArgs { private _pageBag; /** * Identifier deduced from current instance */ private readonly _identifier; /** * Generic callback before layout save */ private _onWizardLayoutSave; /** * Define if page should be refreshed on close */ closeWithoutRefresh: boolean; /** * List of context parameters accepted by service and matched with existing ones in the page */ contextParametersToSave: { label: string; originalName: string; complexType: ComplexType; originalType: EntityTypePropertyValueType; value?: any; }[]; /** * List of available context parameters to resolve */ contextParameters: LayoutMetadataKey[]; /** * Show/hide advanced options section */ showAdvanced: boolean; /** * Types personalization levels available */ LayoutAffectationLevels: { value: LayoutAffectationLevel; text: string; }[]; /** * Selected personalization level type */ selectedLayoutAffectationLevel: { value: LayoutAffectationLevel; text: string; }; /** * InternalLayoutBaseDef to be saved (Layout) */ layout: InternalLayoutBaseDef; /** * Level of layout personalization to save (deduced from selectedLayoutAffectationLevel) */ readonly getLayoutAffectationLevel: LayoutAffectationLevel; /** * Current instance being handled: UIPage, Resource, etc */ instance: Cmf.Foundation.BusinessObjects.Entity; /** * Context user to be used */ contextUser: Cmf.Foundation.Security.User; /** * Context role to be used */ contextRole: Cmf.Foundation.Security.Role; constructor(viewContainerRef: ng.ViewContainerRef, _pageBag: PageBag); /** * On layout personalization level selector change: will reset some advanced settings * @param event Event */ onLayoutAffectationLevelsChange(event: any): void; /** * Prepare data for wizard: send all available parameters to find which are accepted for layout personalization */ prepareDataInput(): Promise; /** * Handle data for wizard: build contextParametersToSave taking into account matched parameters * @param outputs BaseOutput */ handleDataOutput(outputs: Cmf.Foundation.BusinessOrchestration.BaseOutput[]): Promise; /** * Save current layout personalization context * @param args TransactionWizardArgs */ prepareTransactionInput(args: TransactionWizardArgs): Promise; handleTransactionOutput(output: Cmf.Foundation.BusinessOrchestration.BaseOutput): Promise; } export declare class WizardSaveLayoutModule { }