@ctodev/cclibrary-typings
Version:
Library typings for use with CLARC INFINITY
104 lines (103 loc) • 3.8 kB
TypeScript
import { OnInit } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
import { TccInputMaskComponent } from '../../../shared/components/tcc-input-mask/tcc-input-mask.component';
import { TccInputMask } from '../../../shared/models/inputMask.model';
import { AlertType } from '../../models/alert.model';
import { TccTutorialTooltip } from '../tcc-tutorial-tooltip/tcc-tutorial-tooltip.component';
import { TccTutorialService } from '../../../shared/services/tcc-tutorial/tcc-tutorial.service';
import { TccODataServiceFactory } from '../../../odata/factories/tcc-odata-service/tcc-odata-service.factory';
import { TccSnackBarService } from '../../services/tcc-snackbar/tcc-snackbar.service';
export declare namespace tccDialogWindow {
enum dialogButtonType {
filled = 0,
secondary = 1,
outlined = 2
}
interface TccDialogTextStyle {
color?: string;
fontSize?: number;
fontWeight?: number;
fontFamily?: string;
}
interface TccDialogHeader extends TccDialogTextStyle {
text: string;
}
interface TccDialogData<Entity = any> {
type?: AlertType;
header?: string | TccDialogHeader;
inputElements?: TccInputMask.RowElements | TccInputMask.SectionElement;
buttons?: TccDialogButton[];
illustration?: illustration | string;
message?: string | TccDialogMessage;
tutorial?: TccTutorialTooltip.options;
returnEntity?: boolean;
entity?: Entity;
enableAssignTransport?: boolean;
forceAssignTransport?: boolean;
fixedSize?: boolean;
customSize?: string;
}
interface TccDialogButton {
caption?: string;
filled?: dialogButtonType;
type?: AlertType;
returnvalue?: any;
submit?: boolean;
}
interface TccDialogMessage extends TccDialogTextStyle {
message: string;
width?: string;
}
interface TccInputDialogReturn {
returnvalue: any;
values: TccInputMask.valueChanges;
entity?: any;
}
interface illustration {
height: string;
width: string;
illustration: string;
}
}
export declare class TccDialogWindowComponent implements OnInit {
data: tccDialogWindow.TccDialogData;
private dialogRef;
tutorialService: TccTutorialService;
private factory;
private snackBar;
inputMask: TccInputMaskComponent;
icon: string;
headerText: tccDialogWindow.TccDialogHeader;
class: string;
color: string;
dialogButtonType: typeof tccDialogWindow.dialogButtonType;
inputOptions: TccInputMask.options;
message: tccDialogWindow.TccDialogMessage;
illustrationHeight: string;
illustrationWidth: string;
illustration: string;
tutorial: TccTutorialTooltip.options;
_entity: any;
constructor(data: tccDialogWindow.TccDialogData, dialogRef: MatDialogRef<TccDialogWindowComponent>, tutorialService: TccTutorialService, factory: TccODataServiceFactory, snackBar: TccSnackBarService);
ngOnInit(): void;
private get getText();
private get getMessage();
private get getIcon();
private get getClass();
private get getIconColor();
private get inputElements();
private getTransportSelections;
private initIllustration;
private get getTutorial();
get getFixedSize(): boolean;
get getCustomSize(): string | null;
private getFilledButtonClass;
onDialogClick(event: KeyboardEvent): void;
/**
* stops keyDown Events from traveling outside the Dialog to stop background interactions.
* @param {KeyboardEvent} event
*/
stopKeyDownPropagation(event: KeyboardEvent): void;
inputmaskChange($event: any): void;
close(buttonValue: any): void;
}