@deepkit/desktop-ui
Version:
Library for desktop UI widgets in Angular 10+
77 lines (76 loc) • 3.43 kB
TypeScript
import { AfterViewInit, ChangeDetectorRef, ElementRef, Injector, OnChanges, OnDestroy, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
import { Subscription } from 'rxjs';
import { ValueAccessorBase } from '../../core/form';
import { Overlay } from '@angular/cdk/overlay';
import { DropdownComponent } from '../button/dropdown.component';
import { ButtonComponent } from '../button/button.component';
import * as i0 from "@angular/core";
/**
* Necessary directive to get a dynamic rendered option.
*
* ```html
* <dui-option>
* <ng-container *dynamicOption>
* {{item.fieldName | date}}
* </ng-container>
* </dui-option>
* ```
*/
export declare class DynamicOptionDirective {
template: TemplateRef<any>;
constructor(template: TemplateRef<any>);
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicOptionDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicOptionDirective, "[dynamicOption]", never, {}, {}, never, never, false, never>;
}
export declare class OptionDirective {
readonly element: ElementRef;
value: any;
disabled: boolean;
dynamic?: DynamicOptionDirective;
constructor(element: ElementRef);
static ɵfac: i0.ɵɵFactoryDeclaration<OptionDirective, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<OptionDirective, "dui-option", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["dynamic"], ["*"], false, never>;
}
export declare class OptionSeparatorDirective {
constructor();
static ɵfac: i0.ɵɵFactoryDeclaration<OptionSeparatorDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<OptionSeparatorDirective, "dui-option-separator", never, {}, {}, never, never, false, never>;
}
declare class NotSelected {
}
export declare class SelectboxComponent<T> extends ValueAccessorBase<T | NotSelected> implements AfterViewInit, OnDestroy, OnChanges {
protected overlay: Overlay;
protected injector: Injector;
element: ElementRef;
readonly cd: ChangeDetectorRef;
readonly cdParent: ChangeDetectorRef;
placeholder: string;
/**
* Different textured styled.
*/
textured: boolean | '';
/**
* Smaller text and height.
*/
small: boolean | '';
button?: ButtonComponent;
options?: QueryList<OptionDirective>;
dropdown: DropdownComponent;
label: string;
optionsValueMap: Map<NotSelected | T, OptionDirective>;
protected changeSubscription?: Subscription;
constructor(overlay: Overlay, injector: Injector, element: ElementRef, cd: ChangeDetectorRef, cdParent: ChangeDetectorRef);
isSeparator(item: any): boolean;
ngAfterViewInit(): void;
select(value: T): void;
onClick(): void;
ngOnChanges(changes: SimpleChanges): void;
open(): void;
writeValue(value?: T | NotSelected): void;
get isSelected(): boolean;
protected updateMap(): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SelectboxComponent<any>, [null, null, null, null, { skipSelf: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<SelectboxComponent<any>, "dui-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "textured": { "alias": "textured"; "required": false; }; "small": { "alias": "small"; "required": false; }; }, {}, ["button", "options"], ["dui-button"], false, never>;
}
export {};