/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { EventEmitter } from '@angular/core'; import { ThemePalette } from '@angular/material/core'; import { FormFieldModel, FormFieldValidator, FormModel, FormOutcomeEvent, FormOutcomeModel } from './widgets'; import * as i0 from "@angular/core"; export declare abstract class FormBaseComponent { protected _form: FormModel; /** * @deprecated Use {@link FormModel.SAVE_OUTCOME} instead. */ static readonly SAVE_OUTCOME_ID: string; /** * @deprecated Use {@link FormModel.COMPLETE_OUTCOME} instead. */ static readonly COMPLETE_OUTCOME_ID: string; /** * @deprecated Use {@link FormModel.START_PROCESS_OUTCOME} instead. */ static readonly START_PROCESS_OUTCOME_ID: string; static readonly CUSTOM_OUTCOME_ID: string; static readonly COMPLETE_BUTTON_COLOR: ThemePalette; /** * @deprecated Use {@link FormOutcomeModel.COMPLETE_ACTION} instead. */ static readonly COMPLETE_OUTCOME_NAME: string; /** Path of the folder where the metadata will be stored. */ path: string; /** Name to assign to the new node where the metadata are stored. */ nameNode: string; /** Toggle rendering of the form title. */ showTitle: boolean; /** Toggle rendering of the `Complete` outcome button. */ showCompleteButton: boolean; /** If true then the `Complete` outcome button is shown, but it will be disabled. */ disableCompleteButton: boolean; /** If true then the `Save` outcome button is shown but will be disabled. */ disableSaveButton: boolean; /** If true then the `Start Process` outcome button is shown but it will be disabled. */ disableStartProcessButton: boolean; /** Toggle rendering of the `Save` outcome button. */ showSaveButton: boolean; /** Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. */ readOnly: boolean; /** Toggle rendering of the `Refresh` button. */ showRefreshButton: boolean; /** Toggle rendering of the validation icon next to the form title. */ showValidationIcon: boolean; /** Contains a list of form field validator instances. */ fieldValidators: FormFieldValidator[]; /** Emitted when the supplied form values have a validation error. */ formError: EventEmitter; /** * Emitted when any outcome is executed. Default behaviour can be prevented * via `event.preventDefault()`. */ executeOutcome: EventEmitter; /** * Emitted when any error occurs. */ error: EventEmitter; /** * Custom style that is backed by the form.theme. */ formStyle: string; get form(): FormModel; /** Underlying form model instance. */ set form(form: FormModel); getParsedFormDefinition(): FormBaseComponent; hasForm(): boolean; isTitleEnabled(): boolean; getColorForOutcome(outcomeName: string): ThemePalette; isOutcomeButtonEnabled(outcome?: FormOutcomeModel): boolean; isOutcomeButtonVisible(outcome: FormOutcomeModel, isFormReadOnly: boolean): boolean; /** * Invoked when user clicks outcome button. * * @param outcome Form outcome model * @returns `true` if outcome button was clicked, otherwise `false` */ onOutcomeClicked(outcome: FormOutcomeModel): boolean; handleError(err: any): any; abstract onRefreshClicked(): void; abstract saveTaskForm(): void; abstract completeTaskForm(outcome?: string, outcomeId?: string): void; protected abstract onTaskSaved(form: FormModel): void; protected abstract storeFormAsMetadata(): void; protected abstract onExecuteOutcome(outcome: FormOutcomeModel): boolean; private flattenStyles; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }