@doku-dev/doku-fragment
Version:
A new Angular UI library that moving away from Bootstrap and built from scratch.
31 lines (30 loc) • 1.46 kB
TypeScript
import { ApplicationRef, ComponentRef, EnvironmentInjector, Renderer2 } from '@angular/core';
import { DokuSelectLoadingTemplate } from '../directives/select-loading-template.directive';
import { DokuSelectNoItemTemplate } from '../directives/select-no-item-template.directive';
import { DokuSelectOptionTemplate } from '../directives/select-option-template.directive';
import { DokuSelectDropdownPortal } from '../select-dropdown-portal.component';
import { DokuSelectOption } from '../select-option.component';
import { DokuSelectOptionItemRecord } from '../select.interface';
type CreateSelectOptionProps = {
bindLabel: string;
bindValue: string;
appRef: ApplicationRef;
envInjector: EnvironmentInjector;
renderer: Renderer2;
portalRef: ComponentRef<DokuSelectDropdownPortal>;
clickFn?: (item: DokuSelectOptionItemRecord) => void;
loading?: boolean;
};
export declare class ItemInjectionUtil {
static refs: ComponentRef<DokuSelectOption>[];
static injectSelectOptions(items: DokuSelectOptionItemRecord[] | undefined, props: CreateSelectOptionProps, template?: {
noItem?: DokuSelectNoItemTemplate;
loading?: DokuSelectLoadingTemplate;
option?: DokuSelectOptionTemplate;
}): void;
private static createItemSelectOption;
private static createEmptyStateItemSelectOption;
private static createLoadingStateItemSelectOption;
private static createBaseSelectOption;
}
export {};