import * as _angular_core from '@angular/core'; import { EventEmitter, ElementRef, TemplateRef, QueryList, SimpleChanges } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import * as i2 from 'primeng/api'; import { OverlayService, OverlayOptions, PrimeTemplate } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import { BaseEditableHolder } from 'primeng/baseeditableholder'; import * as i1 from 'primeng/bind'; import { Bind } from 'primeng/bind'; import { Fluid } from 'primeng/fluid'; import { Overlay } from 'primeng/overlay'; import { Nullable, VoidListener } from 'primeng/ts-helpers'; import { CascadeSelectPassThrough, CascadeSelectChangeEvent, CascadeSelectShowEvent, CascadeSelectHideEvent, CascadeSelectBeforeShowEvent, CascadeSelectBeforeHideEvent, CascadeSelectValueTemplateContext, CascadeSelectOptionTemplateContext } from 'primeng/types/cascadeselect'; export * from 'primeng/types/cascadeselect'; import { BaseStyle } from 'primeng/base'; /** * * CascadeSelect is a form component to select a value from a nested structure of options. * * [Live Demo](https://www.primeng.org/cascadeselect/) * * @module cascadeselectstyle * */ declare enum CascadeSelectClasses { /** * Class name of the root element */ root = "p-cascadeselect", /** * Class name of the label element */ label = "p-cascadeselect-label", /** * Class name of the dropdown element */ dropdown = "p-cascadeselect-dropdown", /** * Class name of the loading icon element */ loadingIcon = "p-cascadeselect-loading-icon", /** * Class name of the dropdown icon element */ clearIcon = "p-cascadeselect-clear-icon", /** * Class name of the dropdown icon element */ dropdownIcon = "p-cascadeselect-dropdown-icon", /** * Class name of the overlay element */ overlay = "p-cascadeselect-overlay", /** * Class name of the list container element */ listContainer = "p-cascadeselect-list-container", /** * Class name of the list element */ list = "p-cascadeselect-list", /** * Class name of the item element */ item = "p-cascadeselect-item", /** * Class name of the item content element */ itemContent = "p-cascadeselect-item-content", /** * Class name of the item text element */ itemText = "p-cascadeselect-item-text", /** * Class name of the group icon element */ groupIcon = "p-cascadeselect-group-icon", /** * Class name of the item list element */ itemList = "p-cascadeselect-item-list" } declare class CascadeSelectStyle extends BaseStyle { name: string; style: string; classes: { root: ({ instance }: { instance: any; }) => (string | { 'p-cascadeselect p-component p-inputwrapper': boolean; 'p-cascadeselect-clearable': any; 'p-cascadeselect-mobile': any; 'p-disabled': any; 'p-invalid': any; 'p-focus': any; 'p-inputwrapper-filled': any; 'p-variant-filled': boolean; 'p-inputwrapper-focus': any; 'p-cascadeselect-open': any; 'p-cascadeselect-fluid': any; 'p-cascadeselect-sm p-inputfield-sm': boolean; 'p-cascadeselect-lg p-inputfield-lg': boolean; })[]; label: ({ instance }: { instance: any; }) => (string | { 'p-placeholder': boolean; 'p-cascadeselect-label-empty': boolean; })[]; clearIcon: string; dropdown: string; loadingIcon: string; dropdownIcon: string; overlay: ({ instance }: { instance: any; }) => (string | { 'p-cascadeselect-mobile-active': any; })[]; listContainer: string; list: string; option: ({ instance, processedOption }: { instance: any; processedOption: any; }) => (string | { 'p-cascadeselect-option-group': any; 'p-cascadeselect-option-active': any; 'p-cascadeselect-option-selected': any; 'p-focus': any; 'p-disabled': any; })[]; optionContent: string; optionText: string; groupIcon: string; optionList: string; }; inlineStyles: { root: ({ instance }: { instance: any; }) => { position: string | undefined; }; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } interface CascadeSelectStyle extends BaseStyle { } declare const CASCADESELECT_VALUE_ACCESSOR: any; declare class CascadeSelectSub extends BaseComponent { cascadeselect: CascadeSelect; selectId: string | undefined; activeOptionPath: any[]; optionDisabled: any[]; focusedOptionId: string | undefined; options: any[] | string[] | string | undefined | null; optionGroupChildren: string[] | string | undefined | null; optionTemplate: Nullable>; groupicon: Nullable>; level: number; optionLabel: string | undefined; optionValue: string | undefined; optionGroupLabel: string | undefined; dirty: boolean | undefined; root: boolean | undefined; onChange: EventEmitter; onFocusChange: EventEmitter; onFocusEnterChange: EventEmitter; _componentStyle: CascadeSelectStyle; constructor(cascadeselect: CascadeSelect); getPTOptions(processedOption: any, index: number, key: string): any; onInit(): void; onOptionClick(event: any, processedOption: any): void; onOptionMouseEnter(event: any, processedOption: any): void; onOptionMouseMove(event: any, processedOption: any): void; getOptionId(processedOption: any): string; getOptionLabel(processedOption: any): any; getOptionValue(processedOption: any): any; getOptionLabelToRender(processedOption: any): any; isOptionDisabled(processedOption: any): any; getOptionGroupLabel(processedOption: any): any; getOptionGroupChildren(processedOption: any): any; isOptionGroup(processedOption: any): boolean; isOptionSelected(processedOption: any): boolean; isOptionActive(processedOption: any): boolean; isOptionFocused(processedOption: any): boolean; position(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; static ngAcceptInputType_level: unknown; static ngAcceptInputType_dirty: unknown; static ngAcceptInputType_root: unknown; } /** * CascadeSelect is a form component to select a value from a nested structure of options. * @group Components */ declare class CascadeSelect extends BaseEditableHolder { overlayService: OverlayService; $pcCascadeSelect: CascadeSelect | undefined; bindDirectiveInstance: Bind; onAfterViewChecked(): void; /** * Unique identifier of the component * @group Props */ id: string | undefined; /** * Text to display when the search is active. Defaults to global value in i18n translation configuration. * @group Props * @defaultValue '{0} results are available' */ searchMessage: string | undefined; /** * Text to display when there is no data. Defaults to global value in i18n translation configuration. * @group Props */ emptyMessage: string | undefined; /** * Text to be displayed in hidden accessible field when options are selected. Defaults to global value in i18n translation configuration. * @group Props * @defaultValue '{0} items selected' */ selectionMessage: string | undefined; /** * Text to display when filtering does not return any results. Defaults to value from PrimeNG locale configuration. * @group Props * @defaultValue 'No available options' */ emptySearchMessage: string | undefined; /** * Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration. * @group Props * @defaultValue 'No selected item' */ emptySelectionMessage: string | undefined; /** * Locale to use in searching. The default locale is the host environment's current locale. * @group Props */ searchLocale: string | undefined; /** * Name of the disabled field of an option. * @group Props */ optionDisabled: any; /** * Fields used when filtering the options, defaults to optionLabel. * @group Props */ focusOnHover: boolean; /** * Determines if the option will be selected on focus. * @group Props */ selectOnFocus: boolean; /** * Whether to focus on the first visible or selected element when the overlay panel is shown. * @group Props */ autoOptionFocus: boolean; /** * Style class of the component. * @deprecated since v20.0.0, use `class` instead. * @group Props */ styleClass: string | undefined; /** * An array of selectitems to display as the available options. * @group Props */ options: string[] | string | undefined; /** * Property name or getter function to use as the label of an option. * @group Props */ optionLabel: string | undefined; /** * Property name or getter function to use as the value of an option, defaults to the option itself when not defined. * @group Props */ optionValue: string | undefined; /** * Property name or getter function to use as the label of an option group. * @group Props */ optionGroupLabel: string | undefined; /** * Property name or getter function to retrieve the items of a group. * @group Props */ optionGroupChildren: string[] | string | undefined | null; /** * Default text to display when no option is selected. * @group Props */ placeholder: string | undefined; /** * Selected value of the component. * @group Props */ value: string | undefined | null; /** * A property to uniquely identify an option. * @group Props */ dataKey: string | undefined; /** * Identifier of the underlying input element. * @group Props */ inputId: string | undefined; /** * Index of the element in tabbing order. * @group Props */ tabindex: number | 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 of the input for accessibility. * @group Props */ inputLabel: string | undefined; /** * Defines a string that labels the input for accessibility. * @group Props */ ariaLabel: string | undefined; /** * When enabled, a clear icon is displayed to clear the value. * @group Props */ showClear: boolean; /** * Style class of the overlay panel. * @group Props */ panelStyleClass: string | undefined; /** * Inline style of the overlay panel. * @group Props */ panelStyle: { [klass: string]: any; } | null | undefined; /** * Whether to use overlay API feature. The properties of overlay API can be used like an object in it. * @group Props */ overlayOptions: OverlayOptions | undefined; /** * When present, it specifies that the component should automatically get focus on load. * @group Props */ autofocus: boolean | undefined; /** * Whether the dropdown is in loading state. * @group Props */ loading: boolean | undefined; /** * Icon to display in loading state. * @group Props */ loadingIcon: string | undefined; /** * The breakpoint to define the maximum width boundary. * @group Props */ breakpoint: string; /** * Specifies the size of the component. * @defaultValue undefined * @group Props */ size: _angular_core.InputSignal<"small" | "large" | undefined>; /** * Specifies the input variant of the component. * @defaultValue undefined * @group Props */ variant: _angular_core.InputSignal<"filled" | "outlined" | undefined>; /** * Spans 100% width of the container when enabled. * @defaultValue undefined * @group Props */ fluid: _angular_core.InputSignalWithTransform; /** * Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). * @defaultValue 'self' * @group Props */ appendTo: _angular_core.InputSignal; /** * The motion options. * @group Props */ motionOptions: _angular_core.InputSignal; /** * Callback to invoke on value change. * @param {CascadeSelectChangeEvent} event - Custom change event. * @group Emits */ onChange: EventEmitter; /** * Callback to invoke when a group changes. * @param {Event} event - Browser event. * @group Emits */ onGroupChange: EventEmitter; /** * Callback to invoke when the overlay is shown. * @param {CascadeSelectShowEvent} event - Custom overlay show event. * @group Emits */ onShow: EventEmitter; /** * Callback to invoke when the overlay is hidden. * @param {CascadeSelectHideEvent} event - Custom overlay hide event. * @group Emits */ onHide: EventEmitter; /** * Callback to invoke when the clear token is clicked. * @group Emits */ onClear: EventEmitter; /** * Callback to invoke before overlay is shown. * @param {CascadeSelectBeforeShowEvent} event - Custom overlay show event. * @group Emits */ onBeforeShow: EventEmitter; /** * Callback to invoke before overlay is hidden. * @param {CascadeSelectBeforeHideEvent} event - Custom overlay hide event. * @group Emits */ onBeforeHide: EventEmitter; /** * Callback to invoke when input receives focus. * @param {FocusEvent} event - Focus event. * @group Emits */ onFocus: EventEmitter; /** * Callback to invoke when input loses focus. * @param {FocusEvent} event - Focus event. * @group Emits */ onBlur: EventEmitter; focusInputViewChild: Nullable; panelViewChild: Nullable; overlayViewChild: Nullable; /** * Custom value template. * @group Templates */ valueTemplate: Nullable>; /** * Custom option template. * @group Templates */ optionTemplate: Nullable>; /** * Custom header template. * @group Templates */ headerTemplate: Nullable>; /** * Custom footer template. * @group Templates */ footerTemplate: Nullable>; /** * Custom trigger icon template. * @group Templates */ triggerIconTemplate: Nullable>; /** * Custom loading icon template. * @group Templates */ loadingIconTemplate: Nullable>; /** * Custom option group icon template. * @group Templates */ groupIconTemplate: Nullable>; /** * Custom clear icon template. * @group Templates */ clearIconTemplate: Nullable>; _valueTemplate: TemplateRef | undefined; _optionTemplate: TemplateRef | undefined; _headerTemplate: TemplateRef | undefined; _footerTemplate: TemplateRef | undefined; _triggerIconTemplate: TemplateRef | undefined; _loadingIconTemplate: TemplateRef | undefined; _groupIconTemplate: TemplateRef | undefined; _clearIconTemplate: TemplateRef | undefined; selectionPath: any; focused: boolean; overlayVisible: boolean; clicked: boolean; dirty: boolean; searchValue: string | undefined; searchTimeout: any; focusedOptionInfo: _angular_core.WritableSignal; activeOptionPath: _angular_core.WritableSignal; processedOptions: string[] | string | undefined; _componentStyle: CascadeSelectStyle; initialized: boolean; $variant: _angular_core.Signal<"filled" | "outlined" | null>; $appendTo: _angular_core.Signal; pcFluid: Fluid | null; get hasFluid(): boolean; onHostClick(event: MouseEvent): void; get listLabel(): string; get focusedOptionId(): string | null; get searchResultMessageText(): string; get searchMessageText(): string; get emptySearchMessageText(): string; get emptyMessageText(): string; get selectionMessageText(): string; get emptySelectionMessageText(): string; get selectedMessageText(): string; visibleOptions: _angular_core.Signal; label: _angular_core.Signal; get _label(): any; templates: QueryList; onAfterContentInit(): void; onChanges(changes: SimpleChanges): void; hasSelectedOption(): boolean; createProcessedOptions(options: any, level?: number, parent?: {}, parentKey?: string): any[]; onInputFocus(event: FocusEvent): void; onInputBlur(event: FocusEvent): void; onInputKeyDown(event: KeyboardEvent): void; onArrowDownKey(event: any): void; onArrowUpKey(event: any): void; onArrowLeftKey(event: any): void; onArrowRightKey(event: any): void; onHomeKey(event: any): void; onEndKey(event: any): void; onEnterKey(event: any): void; onSpaceKey(event: any): void; onEscapeKey(event: any): void; onTabKey(event: any): void; onBackspaceKey(event: any): void; equalityKey(): string | undefined; updateModel(value: any, event?: any): void; autoUpdateModel(): void; scrollInView(index?: number): void; changeFocusedOptionIndex(event: any, index: any, preventSelection?: boolean): void; matchMediaListener: VoidListener; onOptionSelect(event: any): void; onOptionGroupSelect(event: any): void; onContainerClick(event: MouseEvent): void; isOptionMatched(processedOption: any): any; isOptionDisabled(option: any): any; isValidOption(processedOption: any): boolean; isValidSelectedOption(processedOption: any): any; isSelected(processedOption: any): any; findOptionPathByValue(value: any, processedOptions?: any, level?: number): any; findFirstOptionIndex(): any; findLastOptionIndex(): number; findNextOptionIndex(index: any): any; findPrevOptionIndex(index: any): any; findSelectedOptionIndex(): any; findFirstFocusedOptionIndex(): any; findLastFocusedOptionIndex(): any; searchOptions(event: any, char: any): boolean; hide(event?: any, isFocus?: boolean): void; show(event?: any, isFocus?: boolean): void; clear(event?: MouseEvent): void; getOptionLabel(option: any): any; getOptionValue(option: any): any; getOptionGroupLabel(optionGroup: any): any; getOptionGroupChildren(optionGroup: any, level: any): any; isOptionGroup(option: any, level: any): any; isProccessedOptionGroup(processedOption: any): boolean; getProccessedOptionLabel(processedOption: any): any; constructor(overlayService: OverlayService); query: any; queryMatches: _angular_core.WritableSignal; mobileActive: _angular_core.WritableSignal; onOptionChange(event: any): void; onOptionClick(event: any): void; onOptionMouseEnter(event: any): void; onOptionMouseMove(event: any): void; onInit(): void; onAfterViewInit(): void; bindMatchMediaListener(): void; unbindMatchMediaListener(): void; onOverlayAfterLeave(): void; /** * @override * * @see {@link BaseEditableHolder.writeControlValue} * Writes the value to the control. */ writeControlValue(value: any, setModelValue: (value: any) => void): void; onDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; static ngAcceptInputType_focusOnHover: unknown; static ngAcceptInputType_selectOnFocus: unknown; static ngAcceptInputType_autoOptionFocus: unknown; static ngAcceptInputType_tabindex: unknown; static ngAcceptInputType_showClear: unknown; static ngAcceptInputType_autofocus: unknown; static ngAcceptInputType_loading: unknown; } declare class CascadeSelectModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { CASCADESELECT_VALUE_ACCESSOR, CascadeSelect, CascadeSelectClasses, CascadeSelectModule, CascadeSelectStyle, CascadeSelectSub };