@ctodev/cclibrary-typings
Version:
Library typings for use with CLARC INFINITY
143 lines (142 loc) • 5.71 kB
TypeScript
import { ElementRef, EventEmitter, QueryList, WritableSignal } from '@angular/core';
import { displayExtraButtonFieldElement } from '../../tcc-abstract-display-element';
import { TccInputMask } from '../../../../models/inputMask.model';
import { TccKeyValuePair } from '../../../../../odata/models/shared.model';
import { ConnectedPosition, Overlay } from '@angular/cdk/overlay';
import { TccTranslationPipe } from '../../../../pipes/tcc-translation/tcc-translation.pipe';
import { TccFormFieldComponent } from '../../../tcc-form-field/tcc-form-field.component';
import { GetDisplayValuePipe } from './pipes/get-display-value-pipe';
export declare class TccSelectElementComponent extends displayExtraButtonFieldElement {
private overlay;
private translationPipe;
private getDisplayValuePipe;
activeElement: ElementRef<HTMLInputElement>;
formField: TccFormFieldComponent;
htmlOptions: QueryList<ElementRef>;
set element(element: TccInputMask._DisplaySelectElement);
set options(options: TccInputMask.options);
selectOpen: EventEmitter<TccInputMask.eventTrigger>;
createNewEntity: EventEmitter<TccInputMask.eventTrigger>;
set overlayOpen(overlayOpen: boolean);
get overlayOpen(): boolean;
overlayPositions: ConnectedPosition[];
scrollStrategy: import("@angular/cdk/overlay").CloseScrollStrategy;
_overlayOpen$: WritableSignal<boolean>;
isSelectPanelAnchorVisible: boolean;
_element: TccInputMask._DisplaySelectElement;
currFilterValue: string;
_selections: TccKeyValuePair[] | Array<TccInputMask._SelectGroupSelection>;
_forceSelection: boolean;
_filteredSelections$: WritableSignal<TccKeyValuePair[] | Array<TccInputMask._SelectGroupSelection>>;
private flattnedKeys;
activeOption: string;
overlayClicked: boolean;
_multiple: boolean;
loadSelection: boolean;
_value: string;
_default: string | number;
_tooltip: boolean;
_openOnEnter: boolean;
_notSelectedOption: boolean;
private tempSelections;
isAllSelected: boolean;
_createElementPath: string;
_disableLabelFloating: boolean;
private optionToGroupRelation;
document: Document;
/**
* safes if the value is currently changed, so that the value from the input will only be deleted on the first change.
*/
private valueTouched;
private selectPanelIntersectionObserver;
valueSuggestion: {
value: string | number | string[] | number[];
options: TccInputMask.setValueSuggestionOptions;
};
constructor(elementRef: ElementRef, overlay: Overlay, translationPipe: TccTranslationPipe, getDisplayValuePipe: GetDisplayValuePipe);
private startPanelIntersectionObserver;
private stopPanelIntersectionObserver;
/**
* builds event output object
*
* @returns The eventOutput
*/
protected buildEventOutput(notChanged?: boolean): TccInputMask.eventOutput;
/**
* @returns the option group, from which the option was selected. Undefined if no option was selected or the select has no option groups.
*/
private getSelectOptionContext;
private _getSelectOptionContext;
/**
* resets the element to its complete init state (using the inputElement config)
*/
reset(): void;
/**
* refreshes the selection list, if getSelectionsFunction is given
*/
refreshSelectionList(): void;
private _refreshSelectionList;
private normalizeSelections;
private setFlattendKeys;
protected onSetElement(): void;
protected onSetForm(): void;
filterSelections(): void;
setValue(value: string | number | string[], options?: {
setValueChange?: boolean;
emitChangeEvent?: boolean;
index?: number;
}): void;
/**
* get the value of the element
*
* @returns element.value
*/
_getValue(onlyChanged?: boolean): string | number | string[] | number[];
refresh(): void;
verify(): boolean;
focus(): void;
onSelectOpen(): void;
/**
* sets the selections (overwrites previouse) TODO ybr option group wird momentan nicht unterstützt
*
* @param {Array<string>|Array<TccKeyValuePair>} selections
*/
setSelections(selections: Array<string> | Array<TccKeyValuePair>): void;
/**
* adds an element to the selections
*
* @param {string | TccKeyValuePair} value
*/
addToSelection(value: string | TccKeyValuePair, allowDuplicates?: boolean): void;
/**
* removes an element from the selections
*
* @param {string | TccKeyValuePair} value
*/
removeFromSelection(value: string | TccKeyValuePair): void;
protected changeElement(): void;
overlayContainerClick(): void;
overlayContainerMouseDown(): void;
toggleSelectAll(): void;
private extractAllKeys;
startLoadOptions(): void;
endLoadOptions(): void;
onCreateNewEntity(): void;
isOptionGroup(option: TccKeyValuePair | TccInputMask._SelectGroupSelection): option is TccInputMask._SelectGroupSelection;
isMultiSelect(selectElement: TccInputMask._DisplaySelectElement): selectElement is TccInputMask._DisplayMultiASyncSelectElement | TccInputMask._DisplayMultiSyncSelectElement;
onKeyUpEnter(event: KeyboardEvent): void;
onKeyDown(event: KeyboardEvent): void;
private activateNextOption;
private activatePreviousOption;
private getFlatSelections;
overlayMouseDown(): void;
optionClick(event: MouseEvent, key: string): void;
private handleCheckboxChange;
focusOutEvent(): void;
openOverlay(): void;
toggleOverlay(): void;
attachOverlay(): void;
detachOverlay(): void;
closeOverlay(): void;
_focusEvent(): void;
}