import * as i0 from '@angular/core'; import { EventEmitter, OnInit, OnDestroy, QueryList, AfterViewInit, ElementRef, KeyValueDiffers, KeyValueDiffer, KeyValueChangeRecord, DoCheck, DestroyRef, ChangeDetectorRef } from '@angular/core'; import * as i15 from '@angular/common'; import { CurrencyPipe } from '@angular/common'; import * as i25 from '@sowatech/shared/ds-datasource'; import { AggregateFunctionFieldConfig, FilterOperator, AggregateFunctionConfig, DatasourceComponent, CSVConfig } from '@sowatech/shared/ds-datasource'; import { LoggerService } from '@sowatech/shared/logger'; import { ScrollEvent } from '@sowatech/shared/scheduler'; import { SharedConfigService, ColumnType, TextAlignType, PaginationInfoVariant, SwtGridDefaultConfig, ShowDetailMethod, IconAlignType } from '@sowatech/shared/shared-config'; import * as i24 from '@sowatech/shared/swt-controls'; import { LoadingIndicatorComponent, IQuillConfiguration, QuillToolbarDefaultType, IQuillToolbarConfiguration, ColorPickerConfiguration } from '@sowatech/shared/swt-controls'; import * as i26 from '@sowatech/shared/swt-dragula'; import { DragulaService } from '@sowatech/shared/swt-dragula'; import * as i36 from '@sowatech/shared/utilities'; import { I18nService } from '@sowatech/shared/utilities'; import { ModalDirective, BsModalRef, BsModalService } from 'ngx-bootstrap/modal'; import * as i31 from 'ngx-scrollbar'; import { NgScrollbar } from 'ngx-scrollbar'; import { UserPropertiesStorageService } from '@sowatech/shared/user-properties-storage'; import { SelectItem, GroupedSelectItem, SelectColor, SelectItemGroup } from '@sowatech/shared/@types'; import * as i16 from '@ng-select/ng-select'; import { NgOption } from '@ng-select/ng-select'; import { Subscription, Observable, Subject } from 'rxjs'; import { QuillModules } from 'ngx-quill'; import * as i19 from '@sowatech/shared/dialogs'; import { DialogInitDirective } from '@sowatech/shared/dialogs'; import * as i29 from 'ng-keyboard-shortcuts'; import * as i20 from 'ngx-bootstrap/dropdown'; import * as i22 from 'ngx-bootstrap/popover'; import * as i23 from 'ngx-bootstrap/timepicker'; import * as i21 from 'ngx-bootstrap/typeahead'; import * as i17 from '@angular/forms'; import { NgForm } from '@angular/forms'; import * as i18 from '@angular/router'; import * as i27 from 'ngx-mask'; import * as i28 from '@sowatech/shared/no-double-click'; import * as i30 from '@sowatech/shared/no-edit-button'; import * as i32 from '@sowatech/shared/template'; import * as i33 from '@sowatech/shared/buttons'; import * as i34 from '@sowatech/shared/layout'; import * as i35 from '@sowatech/shared/typed-template'; declare class ColVisibilityService { private userPropertiesStorage; constructor(userPropertiesStorage: UserPropertiesStorageService); private storageKey; isColumnVisible(columnKey: string, hiddenByDefault: boolean | undefined): boolean; updateColumnVisibility(visibleColumns: Column[], hiddenColumns: Column[]): void; hiddenColumnsChanged: EventEmitter; private deleteFromStore; private setHidden; private setVisible; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type Column = { columnKey: string; hiddenByDefault: boolean; }; declare abstract class ColSelectDialogComponentBase { component: ColSelectDialogComponent; dialog: ModalDirective; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ColSelectDialogInspiniaComponent extends ColSelectDialogComponentBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ColSelectDialogSneatComponent extends ColSelectDialogComponentBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ColSelectDialogComponent implements OnInit, OnDestroy { private colVisibilityService; bsModalRef: BsModalRef; constructor(colVisibilityService: ColVisibilityService, sharedConfig: SharedConfigService, bsModalRef: BsModalRef); ngOnInit(): void; private readonly subscriptions; ngOnDestroy(): void; dialogTitle: string; disableAnimation: boolean; template: QueryList; onSubmit: EventEmitter; get isConfigured(): boolean; dialogFields: DialogField$1[]; editItem: ColumnVisibility; private createColumnVisibility; cancelDialog(): void; submitDialog(): void; private onSubmitColumnVisiblity; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type ColumnVisibility = { [fieldname: string]: boolean; }; interface DialogField$1 { columnKey: string; text: string; type: string; hiddenByDefault: boolean; } type HeaderTitleGroups = Record; type GridLookup = Array | Array; type GridSpanVariant = 'label' | 'icon' | 'progress' | 'stackedProgress'; type GridColumnType = ColumnType | 'buttons' | 'empty' | 'lookup'; /** * das zugewiesene Feld kann nur ein Feldname von T sein, wobei der zugewiesene Typ für dieses Feld V ist */ type KeyWithType = { [K in keyof T]-?: T[K] extends V ? K : never; }[keyof T]; /** * das zugewiesene Feld kann nur ein Feldname von T mit string value sein */ type FieldnameWithStringValue = KeyWithType; type FieldnameWithBooleanValue = KeyWithType; type FieldnameWithRecordValue = KeyWithType>; type ItemId = any; declare class GridColumn implements AggregateFunctionFieldConfig { text?: string; title?: string; fieldname?: Extract; headerTitleGroup?: string; hideFieldValue?: boolean; type?: GridColumnType; lookups?: GridLookup; trueValueText?: string; falseValueText?: string; unit?: string; digitInfo?: string; dateFormat?: string; buttons?: Array>; buttonsAsDropdown?: string; buttonsAsDropdownClass?: string; spans?: Array>; titleSpans?: Array>; minWidth?: string; width?: string; textAlign?: TextAlignType; bodyClass?: string; bodyClassFieldname?: FieldnameWithStringValue; headerClass?: string; allowFilter?: boolean; allowSort?: boolean; filterOperator?: FilterOperator; /** * Filtervariante bei Lookups * @default 'single' */ filterSelectOption?: 'single' | 'multi'; edit?: boolean; /** Aggregatfunktionen über Items (siehe includedAggregateData). Ergebnis im Tooltip oder Footer. Klappt nur mit Zahlen */ aggregateFunctions?: AggregateFunctionGridConfig[]; /** Wenn true: Spalte ist hidden und muss über den visibility-Dialog explizit eingeblendet werden */ hiddenByDefault?: boolean; /** * welche Daten sollen für aggregateFunctions verwendet werden? * * @default 'all' */ includedAggregateData?: 'all' | 'selected'; groupBy?: boolean; } declare class GridColumnButton { ident?: string; text?: string; tooltip?: string; buttonClass?: string; iconClass?: string; disabledFieldname?: FieldnameWithBooleanValue; buttonClassFieldname?: FieldnameWithStringValue; iconClassFieldname?: FieldnameWithStringValue; /** * Beispiel: * `spans: [{ text: 'Löschen', ident: 'DELETE', onClick: id => this.delete(id) }]` */ onClick?: (itemId: ItemId | null) => void; } declare class GridTitleSpan { class?: string; text?: string; title?: string; positionBefore?: boolean; color?: string; color2?: string; backgroundColor?: string; isIcon?: boolean; variant?: GridSpanVariant; routerLink?: string; /** Zusätzliche QueryParams für den RouterLink*/ queryParams?: Record; /** soll bei variant = 'progress' der Wert in % angezeigt werden? default: true */ showProgressPercent?: boolean; stackedProgressBars?: IStackedProgressBar[]; ident?: string; onClick?: () => void; } declare class GridColumnSpan { class?: string; classFieldname?: FieldnameWithStringValue; text?: string; textFieldname?: Extract; title?: string; titleFieldname?: Extract; positionBefore?: boolean; color?: string; colorFieldname?: FieldnameWithStringValue; color2?: string; color2Fieldname?: FieldnameWithStringValue; backgroundColor?: string; backgroundColorFieldname?: FieldnameWithStringValue; isIcon?: boolean; variant?: GridSpanVariant; routerLink?: string; /** Feldname mit Routerlink (als string); if!=null wird in tag mit Routerlink gerendert */ routerLinkFieldname?: FieldnameWithStringValue; /** Zusätzliche QueryParams für den RouterLink*/ queryParams?: Record; /** Feldname mit zusätzlichen QueryParams für den RouterLink*/ queryParamsFieldname?: FieldnameWithRecordValue; /** soll bei variant = 'progress' der Wert in % angezeigt werden? default: true */ showProgressPercent?: boolean; stackedProgressBars?: IStackedProgressBar[]; ident?: string; /** * Beispiel: * `buttons: [{ text: 'Löschen', ident: 'DELETE', onClick: id => this.delete(id) }]` */ onClick?: (itemId: ItemId | null) => void; } declare class GridConfiguration { columns: Array>; idfield?: Extract; small?: boolean; gridStoreKey?: string; gridClass?: string; allowFilter?: boolean; allowSort?: boolean; allowPaging?: boolean; pageSizes?: number[]; paginationInfoVariant?: PaginationInfoVariant; allowPrintDownload?: boolean; printTitle?: string; rowClassFieldName?: keyof ListItem; rowDetailClassFieldName?: keyof ListItem; allowSelectPageSize?: boolean; allowMultiSelect?: boolean; disableFieldName?: Extract; tableHover?: boolean; showSelectCheckBoxes?: boolean; showEmptyGrid?: boolean; emptyGridText?: string; dragulaBag?: string; filterFieldsVisible?: boolean; hideColSelectBtn?: boolean; headerTitleGroups?: HeaderTitleGroups; } type AggregateFunctionGridConfig = AggregateFunctionConfig & { /** @default true */ showInTooltip?: boolean; /** @default false */ showInFooterRow?: boolean; }; interface IHeaderTitleGroup { text: string; title?: string; } interface IStackedProgressBar { value?: string; valueFieldname?: Extract; class?: string; classFieldName?: string; } declare class GridDropEvent { sourceContainer: HTMLElement; destinationContainer: HTMLElement; dropElement: HTMLElement; nextElement?: HTMLElement; nextItem?: any; editItem: any; } declare class GridDropRemoveEvent { sourceContainer: HTMLElement; editItem: any; } declare class RowClickEvent { $event: MouseEvent; itemId: any; } declare class Html5DragDropEvent { $event: DragEvent; itemId: any; } declare class GridColumnButtonEvent { buttonIdent: string; itemId: any; event: MouseEvent; } declare class SpanClickEvent { ident: string; event: MouseEvent; listItem: any; } type OnlyStringKeys = Record; type Id = any; declare class GridComponent implements OnInit, OnDestroy, AfterViewInit { private logger; private dragulaService; locale: string; private config; private colVisibilityService; private currencyPipe; private modalService; private i18n; constructor(logger: LoggerService, dragulaService: DragulaService, locale: string, config: SwtGridDefaultConfig, colVisibilityService: ColVisibilityService, currencyPipe: CurrencyPipe, modalService: BsModalService, i18n: I18nService); private bsModalRef?; private readonly destroyRef; private printService; readonly selectAllRowsLabel: string; readonly selectRowLabel: string; private datePipe; private decimalPipe; private subscriptions; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; private onColVisibilityChanged; onKeydownHandler(event: KeyboardEvent): void; onEnterPressed(): void; /** * @deprecated clickOnFocusedRow() benutzen */ clickOnFocuedRow(): void; clickOnFocusedRow(): void; onKeyUp(): void; onKeyDown(): void; get datasourceHasExternalRefresh(): boolean; gridId: string; gridIdPrefix: string; idfield: string; set setGridId(value: string); cyTotalRefreshCounter: i0.WritableSignal; cyCurrentRefreshCounter: i0.WritableSignal; set setListDatasource(value: DatasourceComponent); stickyHeader: boolean; name: string; small: boolean; allowKeyboardShortCuts: boolean; minHeight: string; /** * Max-Height of table excluding pagination. */ maxHeightTable: string; /** * Obsolete. Max-Height of entire component including pagination, filter info etc. Use maxHeightTable instead. */ maxHeight: string; rowHeight: number; filterRowHeight: number; headerRowHeight: number; headerTitleGroups: HeaderTitleGroups; gridStoreKey: string; hideColSelectBtn: boolean; gridClass: string; allowCSVDownload: boolean; csvFileName: string; csvConfig: CSVConfig; allowFilter: boolean; allowSort: boolean; allowPaging: boolean; showSelectedIdsNotFoundWarning: boolean; showRowDetail: boolean; showDetailMethod: ShowDetailMethod; paginationInfoVariant: PaginationInfoVariant; allowPrintDownload: boolean; printTitle: string; rowClassFieldName?: keyof ListItem; rowDetailClassFieldName?: keyof ListItem; allowSelectPageSize: boolean; set _pageSizes(values: number[]); pageSizes: number[]; allowMultiSelect: boolean; /** Bool-Fieldname des Models der angibt ob Select für Zeile disabled wird*/ disableSelectFieldName: Extract; showEmptyGrid: boolean; emptyGridText: string; filterFieldsVisible: boolean; sortItemAlign: IconAlignType; html5Draggable: string; onHtml5DragStart: EventEmitter; dragulaBag: i0.InputSignal; dragulaShowIcon: i0.InputSignal; dragulaOnlyIconDrag: i0.InputSignal; protected readonly dragulaDragHandleClass: i0.Signal; private setDragulaOptions; private getDragulaOptions; private dragulaSubscriptions; private setDragulaSubscriptions; private setDatasourceFixedSortItems; showSelectCheckBoxes: boolean; tableHover: boolean; set setConfig(value: GridConfiguration); onButtonClicked: EventEmitter; onRowClicked: EventEmitter; onDrop: EventEmitter; onDragulaRemove: EventEmitter; /** nur für showDetailMethod = 'dropdown' */ detailOpened: EventEmitter; loadingIndicator: LoadingIndicatorComponent; filterItems: ElementRef; table: ElementRef; swtGridDiv: ElementRef; headerTitleGroupColumns?: HeaderTitleGroupCol[]; showFooter: boolean; private readonly firstItemsOfGroupSignal; get firstItemsOfGroup(): Id[]; focusGrid(): void; private readonly datasource; get listDatasource(): DatasourceComponent; set listDatasource(ds: DatasourceComponent); private allColumns; set columns(allColumns: GridColumn[]); setFocusedFilter(fieldName: string): void; private readonly visibleColumnsSignal; get visibleColumns(): GridColumn[]; get numOfVisibleColumns(): number; private get extraColumnCount(); get rowCursorClass(): string; private readonly groupByColumnsSignal; get groupByColumns(): GridColumn[]; get groupByColumn(): GridColumn; get grouped(): boolean; private prepareHeaderGroupColumns; private prepareColumns; configureGrid(config: GridConfiguration): void; getData(): object[]; downloadCSV(): void; downloadCsvWithData(data: ListItem[]): void; private getCSVColumn; displayText(listItem: any, column: GridColumn): string; getLookupTextColumn(listItem: any, column: GridColumn): string; allowSortColumn(column: GridColumn): boolean; allowFilterColumn(column: GridColumn): boolean; getFilterOperator(column: GridColumn): string; private autoDetectIdFieldname; private getListItemId; buttonClicked(event: MouseEvent, ident: string, listItem: any): void; spanClicked(event: SpanClickEvent): void; rowClick(event: MouseEvent, listItem: any): void; private onBeforeDatasourceRefresh; private onAfterDatasourceRefresh; private onFocus; toggleGridDetail(listItemId: Id): void; setRowDetailId(listItemId: Id): void; html5DragStart(event: DragEvent, listItem: ListItem): void; isSelected(listItem: ListItem): boolean; isFocused(listItem: ListItem): boolean; /** Die ID des geöffneten Grid Details */ detailId?: Id; closeDetail(): void; closeDetailByDropDown(event?: Event): void; isRowDetailIdOpen(listItemId: Id): boolean; isRowDetailOpen(listItem: ListItem): boolean; openDetail(event: Event, listItem: ListItem): void; visibilityKey(gridColumn: GridColumn): string; colSelectDialog: ColSelectDialogComponent; showColSelectDialog(): void; columnClass(column: GridColumn, listItem: ListItem): string; getDefaultColumnTextAlignment(type?: GridColumnType): any; spansBefore(spans: GridColumnSpan[] | GridTitleSpan[]): Array>; spansAfter(spans: GridColumnSpan[] | GridTitleSpan[]): Array>; getButtonClass(listItem: ListItem, btn: GridColumnButton): string; getButtonIconClass(listItem: ListItem, btn: GridColumnButton): string; private onRowDrop; private onRowRemove; fieldValueModelChange(event: any, gridColumn: GridColumn, listItem: ListItem): void; getSelectOptionValue(lookup: unknown): unknown; private getColumnsByColVisibility; private formatAggregate; getAggregateFooterText(col: GridColumn): string; getAggregateTitleText(col: GridColumn): string; getEditColLabel(col: GridColumn): string; private updateShowFooter; private setDefaultConfigurations; printGrid(): void; private getNode; readonly scrollbar: i0.Signal; private scrollEventBlocked; scrollToPosition(posX: number, posY: number): void; scrolledToPosition: EventEmitter; scroll(event: any): void; private calcFirstItemsOfGroups; isFirstItemOfGroup(item: ListItem): boolean; columnTemplateParam: { listItem: ListItem; column: GridColumn; }; getInputType(type: GridColumnType): "number" | "text" | "date" | "email" | "tel" | "buttons" | "checkbox" | "url" | "empty" | "lookup" | "datetime-local"; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "swt-grid", never, { "idfield": { "alias": "idfield"; "required": false; }; "setGridId": { "alias": "id"; "required": false; }; "setListDatasource": { "alias": "datasource"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "name": { "alias": "name"; "required": false; }; "small": { "alias": "small"; "required": false; }; "allowKeyboardShortCuts": { "alias": "allowKeyboardShortCuts"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeightTable": { "alias": "maxHeightTable"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "filterRowHeight": { "alias": "filterRowHeight"; "required": false; }; "headerRowHeight": { "alias": "headerRowHeight"; "required": false; }; "headerTitleGroups": { "alias": "headerTitleGroups"; "required": false; }; "gridStoreKey": { "alias": "store-key"; "required": false; }; "hideColSelectBtn": { "alias": "hideColSelectBtn"; "required": false; }; "gridClass": { "alias": "gridClass"; "required": false; }; "allowCSVDownload": { "alias": "allowCSVDownload"; "required": false; }; "csvFileName": { "alias": "csvFileName"; "required": false; }; "csvConfig": { "alias": "csvConfig"; "required": false; }; "allowFilter": { "alias": "allowFilter"; "required": false; }; "allowSort": { "alias": "allowSort"; "required": false; }; "allowPaging": { "alias": "allowPaging"; "required": false; }; "showSelectedIdsNotFoundWarning": { "alias": "showSelectedIdsNotFoundWarning"; "required": false; }; "showRowDetail": { "alias": "showRowDetail"; "required": false; }; "showDetailMethod": { "alias": "showDetailMethod"; "required": false; }; "paginationInfoVariant": { "alias": "paginationInfoVariant"; "required": false; }; "allowPrintDownload": { "alias": "allowPrintDownload"; "required": false; }; "printTitle": { "alias": "printTitle"; "required": false; }; "rowClassFieldName": { "alias": "rowClassFieldName"; "required": false; }; "rowDetailClassFieldName": { "alias": "rowDetailClassFieldName"; "required": false; }; "allowSelectPageSize": { "alias": "allowSelectPageSize"; "required": false; }; "_pageSizes": { "alias": "pageSizes"; "required": false; }; "allowMultiSelect": { "alias": "allowMultiSelect"; "required": false; }; "disableSelectFieldName": { "alias": "disableSelectFieldName"; "required": false; }; "showEmptyGrid": { "alias": "showEmptyGrid"; "required": false; }; "emptyGridText": { "alias": "emptyGridText"; "required": false; }; "filterFieldsVisible": { "alias": "filterFieldsVisible"; "required": false; }; "sortItemAlign": { "alias": "sortItemAlign"; "required": false; }; "html5Draggable": { "alias": "html5Draggable"; "required": false; }; "dragulaBag": { "alias": "dragulaBag"; "required": false; "isSignal": true; }; "dragulaShowIcon": { "alias": "dragulaShowIcon"; "required": false; "isSignal": true; }; "dragulaOnlyIconDrag": { "alias": "dragulaOnlyIconDrag"; "required": false; "isSignal": true; }; "showSelectCheckBoxes": { "alias": "showSelectCheckBoxes"; "required": false; }; "tableHover": { "alias": "table-hover"; "required": false; }; "setConfig": { "alias": "config"; "required": false; }; }, { "onHtml5DragStart": "onHtml5DragStart"; "onButtonClicked": "onButtonClicked"; "onRowClicked": "onRowClicked"; "onDrop": "onDrop"; "onDragulaRemove": "onDragulaRemove"; "detailOpened": "detailOpened"; "scrolledToPosition": "scrolledToPosition"; }, never, ["*"], false, never>; } declare class HeaderTitleGroupCol implements IHeaderTitleGroup { key: string | null; span: number; constructor(key: string | null, span?: number, data?: IHeaderTitleGroup); text: string; title: string; get isEmpty(): boolean; static get empty(): HeaderTitleGroupCol; } declare class GridCellSpanComponent { spans: GridColumnSpan[]; listItem?: unknown; spanClick: EventEmitter; private readListItem; private joinedString; spanText(span: GridColumnSpan): string; spanNumber(span: GridColumnSpan): number; spanNumberProgressBar(stackedProgressBar: IStackedProgressBar): number; spanTitle(span: GridColumnSpan): string; spanClass(span: GridColumnSpan): string; spanClassProgressBar(stackedProgressBar: IStackedProgressBar): string; colorValue(span: GridColumnSpan, fieldType: string): string; spanRouterLink(span: GridColumnSpan): string; spanQueryParams(span: GridColumnSpan): Record; isClickable(span: GridColumnSpan): string; spanClicked(span: GridColumnSpan, event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GridCellSpanRouterLinkComponent { readonly routerLink: i0.InputSignalWithTransform; readonly queryParams: i0.InputSignal>; protected handleClick(event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MultiSelectFilterComponent implements AfterViewInit { readonly lookups: i0.InputSignalWithTransform; readonly fieldNames: i0.InputSignal; readonly datasource: i0.InputSignal>; private readonly datasourceFilterItems; protected value: i0.Signal; private readonly filterOperator; private readonly destryRef; ngAfterViewInit(): void; private transformGridLookup; protected setFilter(selection: NgOption[]): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /**key for dynamic lookups, which are provided during dialog.show as a dictionary[lookupsKey,Array]*/ type lookupsKey = string; type Lookups = Array | Array; type FieldType = 'text' | 'number' | 'date' | 'dateInterval' | 'boolean' | 'textarea' | 'password' | 'password-with-confirm' | 'email' | 'tel' | 'divider' | 'buttons' | 'info-text' | 'time' | 'lru' | 'hidden' | 'color-select' | 'money'; /**the type of control. in most cases this is equal to type of field but can differ (e.g. controltype "select")*/ type ControlType = 'text' | 'number' | 'date' | 'dateInterval' | 'dateInput' | 'checkbox' | 'textarea' | 'password' | 'password-with-confirm' | 'email' | 'tel' | 'select' | 'divider' | 'buttons' | 'grid' | 'info-text' | 'time' | 'dropdown-grid' | 'hidden' | 'rich-text' | 'color-picker' | 'money'; /**this class is used to configure the dialog*/ declare class DialogField { fieldname?: Extract; type?: FieldType; /** Nicht manuell setzen! * wird intern aus type, controlTypeVariant, und vorhandenen lookups ermittelt. Im Regelfall identisch zu type * */ controlType?: ControlType; /** wenn abweichend vom standard zb bei datePicker / dateInput */ controlTypeVariant?: 'input'; text?: string; unit?: string; placeholder?: string; help?: string; required?: boolean; /** Zweiter Feldname bei mehrteiligen Inputs wie z.B. dateInterval*/ fieldname2?: Extract; /** Zweiter Text bei mehrteiligen Inputs wie z.B. dateInterval*/ text2?: string; /** Zweiter Hilfetext bei mehrteiligen Inputs wie z.B. dateInterval*/ help2?: string; /** Zweites Required bei mehrteiligen Inputs wie z.B. dateInterval*/ required2?: boolean; maxLength?: number; default?: any; trueValueText?: string; falseValueText?: string; min?: number; max?: number; showSpinnerButtons?: boolean; calendarWeekVisible?: boolean; lookUps?: Lookups | Array | lookupsKey; onLookUp?: (lookupItems: Array, editItem: DTO) => Array; onChange?: (editItem: any, previousValue: any) => void; multiSelectLookups?: boolean; radioLookups?: boolean; /** multi-lru async SelectItem loading */ lookUpSearchFn?: (term: string) => Promise; /** text for empty lookup */ addEmptyLookup?: string; /** Felder mit abhängigen selects => leert Value und cached lookUps des fieldnames beim change */ dependentSelectFieldnames?: Array>; fieldnamePasswordConfirm?: Extract; autofocus?: boolean; hideIf?: (editItem: any) => boolean; buttons?: Array; grid?: DialogGridConfiguration; textMask?: TextMaskConfig; richText?: RichTextConfiguration; colorPicker?: ColorPickerConfiguration; zIndex?: number; /**optional: direktes setzen eines style im Eingabe-Control */ controlStyle?: string; /** internal*/ hasError?: boolean; cssClass?: string; } declare class TextMaskConfig { mask?: string; showMaskTyped?: boolean; patterns?: { [character: string]: { pattern: RegExp; optional?: boolean; symbol?: string; }; }; } declare class DialogFieldCategory { name: string; dialogFields: DialogField[]; hideIf?: (editItem: any) => boolean; active?: boolean; } declare class DialogDynamicList { key: string; lookupItems?: Lookups; datasource?: DatasourceComponent; } declare class DialogFieldButton { onButtonClicked?: (editItem: any) => void; text?: string; tooltip?: string; buttonClass?: string; iconClass?: string; position?: 'form' | 'footer-before' | 'footer-after'; submitDialog?: boolean; submitResult?: string; width?: `${number}px` | `${number}em` | `${number}%` | 'auto'; } declare class DialogGridConfiguration extends GridConfiguration { datasource: DatasourceComponent | lookupsKey; /** * wenn gesetzt wird, wird das Grid als DropDown dargestellt */ showAsDropDownFieldName?: string; onDropdownGridShown?: (editItem: any, fieldname: string, datasource: DatasourceComponent) => void; displayFieldValue?: string; pageSize?: number; } declare class RichTextConfiguration implements IQuillConfiguration { /** default: 'html' */ format?: 'object' | 'html' | 'text' | 'json'; /** default: 'snow' */ theme?: 'snow' | 'bubble'; readOnly?: boolean; toolbar?: QuillToolbarDefaultType | IQuillToolbarConfiguration; /** *wird nur benötigt, falls standard modules/toolbar nicht ausreicht */ modules?: QuillModules; } declare const DIALOG_FIELD_NULLVALUE = "$NULL"; interface IDialogConfiguration { fieldsOrCategoriesOfFields: DialogField[] | DialogFieldCategory[]; title: string; enterKeyAsTabKey?: boolean; categoriesAsTabs?: boolean; size?: DialogSize; inputSize?: DialogInputSize; hideOkButton?: boolean; hideCancelButton?: boolean; } type DialogSize = 'small' | 'medium' | 'large'; type DialogInputSize = 'small' | 'medium' | 'large'; declare class GenericEditDialogResult { key: string; dto: DATATYPE; mode: MODETYPE; submitResult: string; } declare abstract class GenericEditDialogBaseComponent { protected logger: LoggerService; private differs; constructor(logger: LoggerService, differs: KeyValueDiffers); private sharedConfig; inputSizeDefault: DialogInputSize; categoriesAsTabs: boolean; onHidden: EventEmitter; onCancel: EventEmitter; onSubmit: EventEmitter; onBeforeSubmit: EventEmitter; onChangeDetected: EventEmitter; protected differ: KeyValueDiffer; protected subscriptions: Array; protected dtoItem: T; editItem: any; mode: any; errorText: string; dynamicLists?: DialogDynamicList[]; submitResult: 'CANCEL' | 'OK' | string; protected onInit(): void; protected doCheck(): void; protected onDestroy(): void; hide(): void; private _inputSizeClass; get inputSizeClass(): string; set inputSizeClass(value: 'input-sm' | 'input-lg' | string); private _inputSize; get inputSize(): DialogInputSize; set inputSize(newSize: DialogInputSize); private getInputSizeClassForInputSize; private readonly dirty; readonly isDirty: i0.Signal; resetDirty(): void; setDirty(): void; abstract isShown(): boolean; protected initData(dto?: T, mode?: any, //user-defined 'mode' without any logic in dialog. can e.g. be used to store meta-info like "INSERT|EDIT|DUPLICATE" in multi-role dialogs dynamicLists?: DialogDynamicList[]): void; protected resetData(): void; cancelDialog(): void; /** * Abschluss der Bearbeitung: * Konvertiert die Form-Eingabewerte in den korrekten Typ soweit erforderlich (z.B. string nach number). * Kopiert die Form-Eingabewerte in das Datenobjekt zurück. * Löst Submit Events aus * * @param submitResult */ protected submitDialog(submitResult?: 'OK' | string): void; get isSubmitDisabled(): boolean; showErrors(errors: string[]): void; handleKeyboardEvent(event: KeyboardEvent): void; enterKeyAsTabKey: boolean; configureDialogFields(fieldsOrCategoriesOfFields: DialogField[] | DialogFieldCategory[]): void; get getAllDialogFields(): DialogField[]; protected getDialogField(fieldname: string): DialogField; categories: DialogFieldCategory[]; get visibleCategories(): DialogFieldCategory[]; protected copyToEditItem(dto: T): void; private convertToIsoDate; protected numberToStringEditItem(field: DialogField): void; protected stringToNumberEditItem(field: DialogField): any; protected getValueOfDtoItem(fieldname: string): any; protected initNewEditItem(): void; protected prepareItem(): void; private convertEditItemValuesToCorrectTypes; protected stringToNullOrBool(value: any): boolean; private writeAllEditItemFieldToDtoItemFields; private writeEditItemFieldToDtoItemField; private fieldIsEmpty; private prepareDialogFields; private getControlType; private passwordConfirmInvalid; hasLookups(fieldname: string | DialogField): boolean; getGroupableLookups(field: string | DialogField): SelectItemGroup[]; getLookups(fieldname: string | DialogField): Array; private lookupTypeCheck; private mapGroupedLookups; private isGroupedSelectItem; doOnChange(keyValueChange: KeyValueChangeRecord): void; getSelectItem(fieldname: string): SelectItem; setCatActive(activeCat: DialogFieldCategory): void; private setFirstCatActive; private getDynamicLookupItems; getDynamicDatasource(field: DialogField): DatasourceComponent; private getDynamicList; onButtonClicked(btn: DialogFieldButton, editItem: any): void; doOnDropdownGridShown(fieldname: string): void; private prepareGrid; private datasourceSubscriptions; bindGridSelectionToEditItem(): void; private unSubscribeDatasources; private hasDatePicker; private useBrowserDateInput; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "inputSizeDefault": { "alias": "inputSizeDefault"; "required": false; }; "categoriesAsTabs": { "alias": "categoriesAsTabs"; "required": false; }; }, { "onHidden": "onHidden"; "onCancel": "onCancel"; "onSubmit": "onSubmit"; "onBeforeSubmit": "onBeforeSubmit"; "onChangeDetected": "onChangeDetected"; }, never, never, true, never>; } declare class GenericEditDialogService { private loggerService; constructor(loggerService: LoggerService); private notify; raiseNotify(data: any): void; private notifySubscriptions; subscribeOnNotify(next: (value: any) => void): void; unsubscribeNotifies(): void; private registeredConfigurations; private dialogComponent; setDialogComponent(dialogComponent: GenericEditDialogComponent): void; registerDialogConfiguration(key: string, dialogConfiguration: IDialogConfiguration): any; registerDialogConfiguration(key: string, fieldsOrCategoriesOfFields: DialogField[] | DialogFieldCategory[], title?: string, categoriesAsTabs?: boolean): any; private getDialogConfiguration; show(configuration: IDialogConfiguration, dto?: any, mode?: any, lookups?: DialogDynamicList[]): Observable>; show(configuration: IDialogConfiguration, dto?: DATATYPE, mode?: any, lookups?: DialogDynamicList[]): Observable>; show(configuration: IDialogConfiguration, dto?: DATATYPE, mode?: MODETYPE, lookups?: DialogDynamicList[]): Observable>; show(key: string, dto?: any, mode?: any, lookups?: DialogDynamicList[]): Observable>; show(key: string, dto?: DATATYPE, mode?: any, lookups?: DialogDynamicList[]): Observable>; show(key: string, dto?: DATATYPE, mode?: MODETYPE, lookups?: DialogDynamicList[]): Observable>; private hiddenSubscription; private cancelSubscription; showConfig(configuration: IDialogConfiguration, dto?: DATATYPE, lookups?: DialogDynamicList[], mode?: any, key?: string): Observable>; onCancel: Subject; onHidden: Subject; hide(): void; showErrors(errors: string[]): void; focus(fieldname: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare abstract class SwtGenericEditDialogComponentBase { component: GenericEditDialogComponent; dialog: ModalDirective; dialogInitDirective: DialogInitDirective; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "component": { "alias": "component"; "required": false; }; }, {}, never, never, true, never>; } declare class SwtGenericEditDialogInspiniaComponent extends SwtGenericEditDialogComponentBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SwtGenericEditDialogSneatComponent extends SwtGenericEditDialogComponentBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GenericEditDialogComponent extends GenericEditDialogBaseComponent implements DoCheck, OnDestroy, OnInit { private genericEditDialogService; private destroyRef; constructor(logger: LoggerService, genericEditDialogService: GenericEditDialogService, differs: KeyValueDiffers, sharedConfig: SharedConfigService, destroyRef: DestroyRef); template: QueryList; get dialog(): ModalDirective; private get dialogInitDirective(); modalTitle: string; titleSingular: string; dialogId: string; hideOkButton: boolean; hideCancelButton: boolean; disableAnimation: boolean; swtDropdownContainerContainer: string; /** Verfolgt ob der Dialog initialisiert wurde, um das Rendern versteckter Dialoge im DOM zu vermeiden (WAVE Barrierefreiheit) */ isDialogOpen: i0.WritableSignal; private onHiddenSubscription; /** set this true, if this dialog component should be used as the "global generic dialog" */ set serviceDialog(value: boolean); /** used internal */ isShown(): boolean; ngOnInit(): void; /** fix weil modal-open nicht herausgenommen wird wenn ein 2ter Dialog geoeffnet wird */ private closeModalFix; ngDoCheck(): void; ngOnDestroy(): void; /** * Fill Data and Show Dialog * * @param dto * @param mode user-defined 'mode' without any logic in dialog. can e.g. be used to store meta-info like "INSERT|EDIT|DUPLICATE" in multi-role dialogs * @param dynamicLists dynamic lookups (in contrary to static) which are loaded before dialog.show. they are refernced by a lookupKey in the configuration (lookups of type string) */ show(dto?: T, mode?: any, dynamicLists?: DialogDynamicList[]): void; /** * Re-Open the Dialog with errors shown * * @param errors */ showErrors(errors: string[]): void; submitDialog(submitResult?: 'OK' | string): void; hide(): void; cancelDialog(): void; get customFormButtonsBefore(): Array; get customFormButtonsAfter(): Array; private getCustomButtons; private _size; sizeClass: string; get size(): DialogSize; set size(newSize: DialogSize); private getSizeClass; focus(fieldname: string): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "swt-generic-edit-dialog", never, { "titleSingular": { "alias": "titleSingular"; "required": false; }; "dialogId": { "alias": "id"; "required": false; }; "serviceDialog": { "alias": "serviceDialog"; "required": false; }; }, {}, never, never, false, never>; } declare class GenericEditDialogInlineComponent extends GenericEditDialogBaseComponent implements DoCheck, OnDestroy, OnInit { constructor(logger: LoggerService, differs: KeyValueDiffers); ngOnInit(): void; ngOnDestroy(): void; ngDoCheck(): void; /** Bestimmt in welchem container der bs-dropdown-container gerendert wird. Default ist 'body'. */ swtDropdownContainerContainer: string; /** * Konfiguriert den Aufbau des Formulars * * @param fieldsOrCategoriesOfFields */ configureDialogFields(fieldsOrCategoriesOfFields: DialogField[] | DialogFieldCategory[]): void; /** * Übergibt die Bearbeitungsdaten * Wenn nicht aufgerufen, dann funktioniert die Change-Detection nicht! * * @param dto * @param dynamicLists */ initData(dto?: T, dynamicLists?: DialogDynamicList[]): void; /** * Abschluss der Bearbeitung. * Kopiert die Form-Eingabewerte in das Datenobjekt zurück und liefert dieses als Ergebnis. */ submitEdit(): T; cancelEdit(): void; /** * wird intern benutzt * */ isShown(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "swt-generic-edit-dialog-inline", never, { "swtDropdownContainerContainer": { "alias": "swtDropdownContainerContainer"; "required": false; }; }, {}, never, never, false, never>; } declare class SwtGridLoadingDirective { private readonly grid; constructor(); /** Wenn `true`, wird der `loading-indicator` angezeigt */ readonly loading: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } interface ListEditorWebApiService { getList(): Promise; update(updateItem: T): Promise; insert(updateItem: T): Promise; delete(id: any): Promise; } type FieldName = Extract; declare class ListEditorComponent { private readonly destroyRef; private readonly logger; private readonly messageBoxService; private readonly i18n; private readonly editDialog; listItems: Array; idFieldname: FieldName; titleSingular: string; titlePlural: string; small: boolean; gridButtonColumn: GridColumn; explicitStoreKey?: string; onEdit: EventEmitter; listDatasource: DatasourceComponent; listGrid: GridComponent; private dialogConfig; set columns(allColumns: ListColumn[]); private _webApiService; set webApiService(value: ListEditorWebApiService); get storeKey(): string; refresh(focusId?: number): Promise; private getListItemId; add(): void; gridButtonClicked(event: GridColumnButtonEvent): void; private delete; private deleteItem; private edit; private updateItem; private insertItem; focus(listItem: ListItem): void; isSelected(listItem: ListItem): boolean; private setEditableColumns; private setVisibleColumns; private listColumnToGridColumn; /** Das Grid unsterstützt nicht die Implementation eines lookupsKey */ private isValidLookup; private fieldTypeToGridColumnType; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "swt-list-editor", never, { "idFieldname": { "alias": "idFieldname"; "required": false; }; "titleSingular": { "alias": "titleSingular"; "required": false; }; "titlePlural": { "alias": "titlePlural"; "required": false; }; "small": { "alias": "small"; "required": false; }; "gridButtonColumn": { "alias": "gridButtonColumn"; "required": false; }; "explicitStoreKey": { "alias": "store-key"; "required": false; }; }, { "onEdit": "onEdit"; }, never, ["[custom-buttons]", "[grid-detail]"], false, never>; } type ListColumn = DialogField & Omit, 'type' | 'lookups'> & ListColumnCustomFields; declare class ListColumnCustomFields { hiddenInList?: boolean; hiddenInDialog?: boolean; } declare class ColHideDirective implements OnInit, OnDestroy { constructor(el: ElementRef); private readonly colVisibilityService; private readonly sharedConfig; private readonly hiddenClass; private subscriptions; ngOnInit(): void; ngOnDestroy(): void; set dsColHideName(name: string); hiddenByDefault: boolean; private columnElement; private colHideName; refreshColumnVisibility(): void; private setColumnHidden; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class DisableClickDirective implements OnInit, OnDestroy { private readonly el; constructor(el: ElementRef); private subscription; private _disableClick; set disableClick(value: boolean); private setDisabled; private removeDisabled; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare abstract class SwtGenericEditDialogFormComponentBase { component: GenericEditDialogFormComponent; dialogForm: NgForm; protected fieldValidate(field: DialogField, fieldValue?: unknown, fieldValue2?: unknown): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SwtGenericEditDialogFormInspiniaComponent extends SwtGenericEditDialogFormComponentBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SwtGenericEditDialogFormSneatComponent extends SwtGenericEditDialogFormComponentBase { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class GenericEditDialogFormComponent implements OnInit, OnDestroy, AfterViewInit { private logger; changeDetectorRef: ChangeDetectorRef; private readonly locale; private readonly currencyCode; constructor(logger: LoggerService, changeDetectorRef: ChangeDetectorRef, locale: string, currencyCode: string); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; small: boolean; master: GenericEditDialogBaseComponent; cat: DialogFieldCategory; editItem: any; dynamicLookups: DialogDynamicList[]; inputClass: string; private subscriptions; template: QueryList; get dialogForm(): NgForm; swtDropdownContainerContainer: string; onDropdownGridShown: EventEmitter; passwordConfirmInvalid(field: DialogField): boolean; fieldVisible(field: DialogField): boolean; getLookups(field: DialogField): Array; getGroupableLookups(field: DialogField): SelectItemGroup[]; /** * Used for trackBy in NgFor. * Prevents the unnecessary Destroy/Create of the Elements, what breaks ChangeDetection in Firefox */ idenitifyGroupableLookupsChanged(index: any, item: SelectItemGroup): any; private ngSelectOptionsDictionary; getLookupsWithLabel(field: DialogField): Array; hasLookups(field: DialogField): boolean; dropDownClearClicked(fieldname: string): void; getDynamicDatasource(field: DialogField): DatasourceComponent; getDisplayValue(field: DialogField): string[]; getDisplayValueOrDefault(field: DialogField, defaultValue: string): string[]; refreshDialog(): void; formValueChanged: EventEmitter; onFormValueChanged(data?: any): void; onSelectChanged(fieldname: string): void; private clearDependentSelect; formErrors: {}; formValidate(data?: any): void; fieldValidate(field: DialogField, fieldValue?: unknown, fieldValue2?: unknown): void; formatMoneyText(field: DialogField): string; private setFormErrors; private getErrorMessage; containsFormButtons(field: DialogField): boolean; formButtons(field: DialogField): DialogFieldButton[]; onButtonClicked(btn: DialogFieldButton, editItem: any): void; doOnDropdownGridShown(fieldname: string): void; /** * Fokussiert das Dropdown-Grid-Komponente. * * Diese Methode prüft, ob die übergebene Grid-Komponente existiert und eine focusGrid-Methode besitzt. * Falls ja, wird die Fokussierung über requestAnimationFrame asynchron ausgeführt, um eine saubere * Ausführung im nächsten Browser-Render-Zyklus zu gewährleisten. * * @param gridComponent - Die Grid-Komponente, die fokussiert werden soll * @returns void */ focusDropdownGrid(gridComponent: GridComponent): void; /** * Behandelt das FocusOut-Event des Dropdown-Grids. * * Schließt das Dropdown, wenn der Fokus den gesamten Dropdown-Grid-Container verlässt. * Prüft, ob das neue Fokus-Ziel (relatedTarget) innerhalb des Containers liegt. * Falls nicht, wird das Dropdown geschlossen und der Fokus zurück zum Dropdown-Container gesetzt, * damit die Tab-Reihenfolge korrekt fortgesetzt wird. * * @param event - Das FocusEvent * @param dropdownContainer - Die Dropdown-Container-Komponente * @returns void */ onDropdownGridFocusOut(event: FocusEvent, dropdownContainer: any): void; clickSpinnerUp(eventData: any, field: DialogField): void; clickSpinnerDown(eventData: any, field: DialogField): void; private getHasDatePicker; private readonly hasDatePicker; useBrowserDateInput(field: DialogField): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SwtGenericModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { ColHideDirective, ColSelectDialogComponent, DIALOG_FIELD_NULLVALUE, DialogDynamicList, DialogField, DialogFieldButton, DialogFieldCategory, DialogGridConfiguration, GenericEditDialogComponent, GenericEditDialogFormComponent, GenericEditDialogInlineComponent, GenericEditDialogResult, GenericEditDialogService, GridCellSpanComponent, GridCellSpanRouterLinkComponent, GridColumn, GridColumnButton, GridColumnButtonEvent, GridColumnSpan, GridComponent, GridConfiguration, GridDropEvent, GridDropRemoveEvent, GridTitleSpan, Html5DragDropEvent, ListEditorComponent, MultiSelectFilterComponent, RichTextConfiguration, RowClickEvent, SpanClickEvent, SwtGenericModule, SwtGridLoadingDirective, TextMaskConfig }; export type { AggregateFunctionGridConfig, ControlType, DialogInputSize, DialogSize, FieldType, GridColumnType, GridLookup, GridSpanVariant, HeaderTitleGroups, IDialogConfiguration, IHeaderTitleGroup, IStackedProgressBar, ListColumn, ListEditorWebApiService, Lookups, lookupsKey };