Icard/angular-clarity-master(work.../node_modules/primeng/treeselect/treeselect.d.ts

388 lines
16 KiB
TypeScript

import { AnimationEvent } from '@angular/animations';
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, QueryList, TemplateRef } from '@angular/core';
import { OverlayOptions, OverlayService, PrimeNGConfig, PrimeTemplate, ScrollerOptions, TreeNode } from 'primeng/api';
import { Overlay } from 'primeng/overlay';
import { Tree, TreeFilterEvent, TreeNodeSelectEvent, TreeNodeUnSelectEvent } from 'primeng/tree';
import { Nullable } from 'primeng/ts-helpers';
import { TreeSelectNodeCollapseEvent, TreeSelectNodeExpandEvent } from './treeselect.interface';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng/overlay";
import * as i3 from "primeng/ripple";
import * as i4 from "primeng/api";
import * as i5 from "primeng/tree";
import * as i6 from "primeng/autofocus";
import * as i7 from "primeng/icons/search";
import * as i8 from "primeng/icons/times";
import * as i9 from "primeng/icons/chevrondown";
export declare const TREESELECT_VALUE_ACCESSOR: any;
/**
* TreeSelect is a form component to choose from hierarchical data.
* @group Components
*/
export declare class TreeSelect implements AfterContentInit {
config: PrimeNGConfig;
cd: ChangeDetectorRef;
el: ElementRef;
overlayService: OverlayService;
/**
* Identifier of the underlying input element.
* @group Props
*/
inputId: string | undefined;
/**
* Height of the viewport, a scrollbar is defined if height of list exceeds this value.
* @group Props
*/
scrollHeight: string;
/**
* When present, it specifies that the component should be disabled.
* @group Props
*/
disabled: boolean | undefined;
/**
* Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.
* @group Props
*/
metaKeySelection: boolean;
/**
* Specifies the input variant of the component.
* @group Props
*/
variant: 'filled' | 'outlined';
/**
* Defines how the selected items are displayed.
* @group Props
*/
display: 'comma' | 'chip';
/**
* Defines the selection mode.
* @group Props
*/
selectionMode: 'single' | 'multiple' | 'checkbox';
/**
* Index of the element in tabbing order.
* @group Props
*/
tabindex: string | undefined;
/**
* Defines a string that labels the input for accessibility.
* @group Props
*/
ariaLabel: string | undefined;
/**
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
* @group Props
*/
ariaLabelledBy: string | undefined;
/**
* Label to display when there are no selections.
* @group Props
*/
placeholder: string | undefined;
/**
* Style class of the overlay panel.
* @group Props
*/
panelClass: string | string[] | Set<string> | {
[klass: string]: any;
} | undefined;
/**
* Inline style of the panel element.
* @group Props
*/
panelStyle: {
[klass: string]: any;
} | null | undefined;
/**
* Style class of the panel element.
* @group Props
*/
panelStyleClass: string | undefined;
/**
* Inline style of the container element.
* @group Props
*/
containerStyle: {
[klass: string]: any;
} | null | undefined;
/**
* Style class of the container element.
* @group Props
*/
containerStyleClass: string | undefined;
/**
* Inline style of the label element.
* @group Props
*/
labelStyle: {
[klass: string]: any;
} | null | undefined;
/**
* Style class of the label element.
* @group Props
*/
labelStyleClass: string | undefined;
/**
* Specifies the options for the overlay.
* @group Props
*/
overlayOptions: OverlayOptions | undefined;
/**
* Text to display when there are no options available. Defaults to value from PrimeNG locale configuration.
* @group Props
*/
emptyMessage: string;
/**
* A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are "body" for document body and "self" for the element itself.
* @group Props
*/
appendTo: HTMLElement | ElementRef | TemplateRef<any> | string | null | undefined | any;
/**
* When specified, displays an input field to filter the items.
* @group Props
*/
filter: boolean;
/**
* When filtering is enabled, filterBy decides which field or fields (comma separated) to search against.
* @group Props
*/
filterBy: string;
/**
* Mode for filtering valid values are "lenient" and "strict". Default is lenient.
* @group Props
*/
filterMode: string;
/**
* Placeholder text to show when filter input is empty.
* @group Props
*/
filterPlaceholder: string | undefined;
/**
* Locale to use in filtering. The default locale is the host environment's current locale.
* @group Props
*/
filterLocale: string | undefined;
/**
* Determines whether the filter input should be automatically focused when the component is rendered.
* @group Props
*/
filterInputAutoFocus: boolean;
/**
* Whether checkbox selections propagate to descendant nodes.
* @group Props
*/
propagateSelectionDown: boolean;
/**
* Whether checkbox selections propagate to ancestor nodes.
* @group Props
*/
propagateSelectionUp: boolean;
/**
* When enabled, a clear icon is displayed to clear the value.
* @group Props
*/
showClear: boolean;
/**
* Clears the filter value when hiding the dropdown.
* @group Props
*/
resetFilterOnHide: boolean;
/**
* Whether the data should be loaded on demand during scroll.
* @group Props
*/
virtualScroll: boolean | undefined;
/**
* Height of an item in the list for VirtualScrolling.
* @group Props
*/
virtualScrollItemSize: number | undefined;
/**
* Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
* @group Props
*/
virtualScrollOptions: ScrollerOptions | undefined;
/**
* When present, it specifies that the component should automatically get focus on load.
* @group Props
*/
autofocus: boolean | undefined;
/**
* An array of treenodes.
* @defaultValue undefined
* @group Props
*/
get options(): TreeNode[] | undefined;
set options(options: TreeNode[] | undefined);
/**
* Transition options of the show animation.
* @group Props
* @deprecated since v14.2.0 use overlayOptions property instead.
*/
get showTransitionOptions(): string | undefined;
set showTransitionOptions(val: string | undefined);
/**
* Transition options of the hide animation.
* @group Props
* @deprecated since v14.2.0 use overlayOptions property instead.
*/
get hideTransitionOptions(): string | undefined;
set hideTransitionOptions(val: string | undefined);
/**
* Callback to invoke when a node is expanded.
* @param {TreeSelectNodeExpandEvent} event - Custom node expand event.
* @group Emits
*/
onNodeExpand: EventEmitter<TreeSelectNodeExpandEvent>;
/**
* Callback to invoke when a node is collapsed.
* @param {TreeSelectNodeCollapseEvent} event - Custom node collapse event.
* @group Emits
*/
onNodeCollapse: EventEmitter<TreeSelectNodeCollapseEvent>;
/**
* Callback to invoke when the overlay is shown.
* @param {Event} event - Browser event.
* @group Emits
*/
onShow: EventEmitter<Event>;
/**
* Callback to invoke when the overlay is hidden.
* @param {Event} event - Browser event.
* @group Emits
*/
onHide: EventEmitter<Event>;
/**
* Callback to invoke when input field is cleared.
* @group Emits
*/
onClear: EventEmitter<any>;
/**
* Callback to invoke when data is filtered.
* @group Emits
*/
onFilter: EventEmitter<TreeFilterEvent>;
/**
* Callback to invoke when a node is unselected.
* @param {TreeNodeUnSelectEvent} event - node unselect event.
* @group Emits
*/
onNodeUnselect: EventEmitter<TreeNodeUnSelectEvent>;
/**
* Callback to invoke when a node is selected.
* @param {TreeNodeSelectEvent} event - node select event.
* @group Emits
*/
onNodeSelect: EventEmitter<TreeNodeSelectEvent>;
_showTransitionOptions: string | undefined;
_hideTransitionOptions: string | undefined;
templates: Nullable<QueryList<PrimeTemplate>>;
containerEl: Nullable<ElementRef>;
focusInput: Nullable<ElementRef>;
filterViewChild: Nullable<ElementRef>;
treeViewChild: Nullable<Tree>;
panelEl: Nullable<ElementRef>;
overlayViewChild: Nullable<Overlay>;
firstHiddenFocusableElementOnOverlay: Nullable<ElementRef>;
lastHiddenFocusableElementOnOverlay: Nullable<ElementRef>;
filteredNodes: TreeNode[] | undefined | null;
filterValue: Nullable<string>;
serializedValue: Nullable<any[]>;
valueTemplate: Nullable<TemplateRef<any>>;
headerTemplate: Nullable<TemplateRef<any>>;
emptyTemplate: Nullable<TemplateRef<any>>;
footerTemplate: Nullable<TemplateRef<any>>;
clearIconTemplate: Nullable<TemplateRef<any>>;
triggerIconTemplate: Nullable<TemplateRef<any>>;
filterIconTemplate: Nullable<TemplateRef<any>>;
closeIconTemplate: Nullable<TemplateRef<any>>;
itemTogglerIconTemplate: Nullable<TemplateRef<any>>;
itemCheckboxIconTemplate: Nullable<TemplateRef<any>>;
itemLoadingIconTemplate: Nullable<TemplateRef<any>>;
focused: Nullable<boolean>;
overlayVisible: Nullable<boolean>;
selfChange: Nullable<boolean>;
value: any | undefined;
expandedNodes: any[];
_options: TreeNode[] | undefined;
templateMap: any;
onModelChange: Function;
onModelTouched: Function;
listId: string;
constructor(config: PrimeNGConfig, cd: ChangeDetectorRef, el: ElementRef, overlayService: OverlayService);
ngOnInit(): void;
ngAfterContentInit(): void;
onOverlayAnimationStart(event: AnimationEvent): void;
onOverlayBeforeHide(event: Event): void;
onSelectionChange(event: Event): void;
onClick(event: Event): void;
onKeyDown(event: KeyboardEvent): void;
onFilterInput(event: Event): void;
onArrowDown(event: KeyboardEvent): void;
onFirstHiddenFocus(event: any): void;
onLastHiddenFocus(event: any): void;
show(): void;
hide(event?: any): void;
clear(event: Event): void;
checkValue(): boolean;
onTabKey(event: any, pressedInInputText?: boolean): void;
hasFocusableElements(): boolean;
resetFilter(): void;
updateTreeState(): void;
updateTreeBranchState(node: TreeNode | null, path: any, selectedNodes: TreeNode[]): void;
expandPath(expandedNodes: TreeNode[]): void;
nodeExpand(event: {
originalEvent: Event;
node: TreeNode;
}): void;
nodeCollapse(event: {
originalEvent: Event;
node: TreeNode;
}): void;
resetExpandedNodes(): void;
resetPartialSelected(nodes?: TreeNode<any>[]): void;
findSelectedNodes(node: TreeNode, keys: any[], selectedNodes: TreeNode[]): void;
isSelected(node: TreeNode): boolean;
findIndexInSelection(node: TreeNode): number;
onSelect(event: TreeNodeSelectEvent): void;
onUnselect(event: TreeNodeUnSelectEvent): void;
onFocus(): void;
onBlur(): void;
writeValue(value: any): void;
registerOnChange(fn: Function): void;
registerOnTouched(fn: Function): void;
setDisabledState(val: boolean): void;
containerClass(): {
'p-treeselect p-component p-inputwrapper': boolean;
'p-treeselect-chip': boolean;
'p-disabled': boolean;
'p-focus': boolean;
'p-variant-filled': boolean;
};
labelClass(): {
'p-treeselect-label': boolean;
'p-placeholder': boolean;
'p-treeselect-label-empty': boolean;
};
get emptyValue(): boolean;
get emptyOptions(): boolean;
get label(): any;
static ɵfac: i0.ɵɵFactoryDeclaration<TreeSelect, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TreeSelect, "p-treeSelect", never, { "inputId": { "alias": "inputId"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "metaKeySelection": { "alias": "metaKeySelection"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "display": { "alias": "display"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "panelStyle": { "alias": "panelStyle"; "required": false; }; "panelStyleClass": { "alias": "panelStyleClass"; "required": false; }; "containerStyle": { "alias": "containerStyle"; "required": false; }; "containerStyleClass": { "alias": "containerStyleClass"; "required": false; }; "labelStyle": { "alias": "labelStyle"; "required": false; }; "labelStyleClass": { "alias": "labelStyleClass"; "required": false; }; "overlayOptions": { "alias": "overlayOptions"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "filterBy": { "alias": "filterBy"; "required": false; }; "filterMode": { "alias": "filterMode"; "required": false; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; }; "filterLocale": { "alias": "filterLocale"; "required": false; }; "filterInputAutoFocus": { "alias": "filterInputAutoFocus"; "required": false; }; "propagateSelectionDown": { "alias": "propagateSelectionDown"; "required": false; }; "propagateSelectionUp": { "alias": "propagateSelectionUp"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "resetFilterOnHide": { "alias": "resetFilterOnHide"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "virtualScrollItemSize": { "alias": "virtualScrollItemSize"; "required": false; }; "virtualScrollOptions": { "alias": "virtualScrollOptions"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "options": { "alias": "options"; "required": false; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; }; }, { "onNodeExpand": "onNodeExpand"; "onNodeCollapse": "onNodeCollapse"; "onShow": "onShow"; "onHide": "onHide"; "onClear": "onClear"; "onFilter": "onFilter"; "onNodeUnselect": "onNodeUnselect"; "onNodeSelect": "onNodeSelect"; }, ["templates"], never, false, never>;
static ngAcceptInputType_disabled: unknown;
static ngAcceptInputType_metaKeySelection: unknown;
static ngAcceptInputType_filter: unknown;
static ngAcceptInputType_filterInputAutoFocus: unknown;
static ngAcceptInputType_propagateSelectionDown: unknown;
static ngAcceptInputType_propagateSelectionUp: unknown;
static ngAcceptInputType_showClear: unknown;
static ngAcceptInputType_resetFilterOnHide: unknown;
static ngAcceptInputType_autofocus: unknown;
}
export declare class TreeSelectModule {
static ɵfac: i0.ɵɵFactoryDeclaration<TreeSelectModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<TreeSelectModule, [typeof TreeSelect], [typeof i1.CommonModule, typeof i2.OverlayModule, typeof i3.RippleModule, typeof i4.SharedModule, typeof i5.TreeModule, typeof i6.AutoFocusModule, typeof i7.SearchIcon, typeof i8.TimesIcon, typeof i9.ChevronDownIcon], [typeof TreeSelect, typeof i2.OverlayModule, typeof i4.SharedModule, typeof i5.TreeModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<TreeSelectModule>;
}