@alfresco/adf-content-services
Version:
Alfresco ADF content services
65 lines (64 loc) • 3.73 kB
TypeScript
/*!
* @license
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
import { MatChipInputEvent } from '@angular/material/chips';
import { Observable } from 'rxjs';
import { AutocompleteOption } from '../../models/autocomplete-option.interface';
import * as i0 from "@angular/core";
export declare class SearchChipAutocompleteInputComponent implements OnInit, OnChanges {
optionInput: ElementRef<HTMLInputElement>;
autocompleteOptions: AutocompleteOption[];
preselectedOptions: AutocompleteOption[];
onReset$: Observable<void>;
allowOnlyPredefinedValues: boolean;
placeholder: string;
compareOption?: (option1: AutocompleteOption, option2: AutocompleteOption) => boolean;
formatChipValue?: (option: string) => string;
filter: (options: AutocompleteOption[], value: string) => AutocompleteOption[];
optionsChanged: EventEmitter<AutocompleteOption[]>;
inputChanged: EventEmitter<string>;
readonly separatorKeysCodes: readonly [13];
formCtrl: FormControl<string>;
filteredOptions: AutocompleteOption[];
selectedOptions: AutocompleteOption[];
private _activeAnyOption;
private readonly destroyRef;
set activeAnyOption(active: boolean);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
add(event: MatChipInputEvent): void;
remove(value: AutocompleteOption): void;
selected(event: MatAutocompleteSelectedEvent): void;
/**
* Determines if a given option is already selected.
*
* This method checks if the provided `option` is present in the `selectedOptions` array.
* If a custom comparison function (`compareOption`) is provided, it uses this function to determine equality.
* Otherwise, it falls back to using strict equality comparison.
*
* @param option - The option to check for selection.
* @returns `true` if the option is selected, `false` otherwise.
*/
isOptionSelected(option: AutocompleteOption): boolean;
private isAdded;
private isExists;
private reset;
static ɵfac: i0.ɵɵFactoryDeclaration<SearchChipAutocompleteInputComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SearchChipAutocompleteInputComponent, "adf-search-chip-autocomplete-input", never, { "autocompleteOptions": { "alias": "autocompleteOptions"; "required": false; }; "preselectedOptions": { "alias": "preselectedOptions"; "required": false; }; "onReset$": { "alias": "onReset$"; "required": false; }; "allowOnlyPredefinedValues": { "alias": "allowOnlyPredefinedValues"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "compareOption": { "alias": "compareOption"; "required": false; }; "formatChipValue": { "alias": "formatChipValue"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; }, { "optionsChanged": "optionsChanged"; "inputChanged": "inputChanged"; }, never, never, true, never>;
}