@funidata/ngx-fudis
Version:
Funidata Design System.
43 lines (42 loc) • 2.29 kB
TypeScript
import { OnDestroy, OnChanges } from '@angular/core';
import { FudisSelectOption } from '../../../../../types/forms';
import { FudisIdService } from '../../../../../services/id/id.service';
import { SelectGroupComponent } from '../../common/select-group/select-group.component';
import { MultiselectComponent } from '../multiselect.component';
import { SelectOptionBaseDirective } from '../../common/select-option-base/select-option-base.directive';
import { FudisTranslationService } from '../../../../../services/translation/translation.service';
import { FudisComponentChanges } from '../../../../../types/miscellaneous';
import * as i0 from "@angular/core";
export declare class MultiselectOptionComponent extends SelectOptionBaseDirective implements OnDestroy, OnChanges {
protected _parentMultiselect: MultiselectComponent;
private static instanceCounter;
protected readonly componentInstanceId: string;
constructor(_document: Document, _parentMultiselect: MultiselectComponent, _parentGroup: SelectGroupComponent, _idService: FudisIdService, _translationService: FudisTranslationService);
/**
* Common parent and its properties
*/
protected _parent: MultiselectComponent;
ngOnChanges(changes: FudisComponentChanges<MultiselectOptionComponent>): void;
ngOnDestroy(): void;
private clearParentOptionVisibility;
/**
* Click handler for clicking the option
*
* @param event Event
*/
protected _clickOption(event: Event): void;
protected _checkVisibilityFromFilterText(filterText: string): void;
/**
* Checks if this option is checked or not and updates parents state accordingly
*
* @param options Currently selected options
*/
private _isOptionChecked;
/**
* When option is changed, it will not change Form Control's value, which is intended, but visible
* label should be updated
*/
protected _checkIfLabelRequiresUpdate(newData: FudisSelectOption<object>): void;
static ɵfac: i0.ɵɵFactoryDeclaration<MultiselectOptionComponent, [null, { host: true; }, { optional: true; host: true; }, null, null]>;
static ɵcmp: i0.ɵɵComponentDeclaration<MultiselectOptionComponent, "fudis-multiselect-option", never, {}, {}, never, never, false, never>;
}