@alfresco/adf-core
Version:
70 lines (69 loc) • 3.29 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 { Pagination } from '@alfresco/js-api';
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
import { MatChip } from '@angular/material/chips';
import { Chip } from './chip';
import * as i0 from "@angular/core";
/**
* This component shows dynamic list of chips which render depending on free space.
*/
export declare class DynamicChipListComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
private changeDetectorRef;
/** Provide if you want to use paginated chips. */
pagination: Pagination;
/** List of chips to display. */
chips: Chip[];
/** Show delete button. */
showDelete: boolean;
/** Disable delete button. */
disableDelete: boolean;
/** Should limit number of chips displayed. */
limitChipsDisplayed: boolean;
/** Round up chips */
roundUpChips: boolean;
/** Emitted when button for view more is clicked. */
displayNext: EventEmitter<void>;
/** Emitted when any chip is removed. */
removedChip: EventEmitter<string>;
containerView: ElementRef;
matChips: QueryList<MatChip>;
chipsToDisplay: Chip[];
calculationsDone: boolean;
columnFlexDirection: boolean;
moveLoadMoreButtonToNextRow: boolean;
undisplayedChipsCount: number;
viewMoreButtonLeftOffset: number;
viewMoreButtonTop: number;
paginationData: Pagination;
private initialChips;
private initialLimitChipsDisplayed;
private viewMoreButtonLeftOffsetBeforeFlexDirection;
private requestedDisplayingAllChips;
private resizeObserver;
constructor(changeDetectorRef: ChangeDetectorRef);
ngOnChanges(changes: SimpleChanges): void;
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
displayNextChips(event: Event): void;
private calculateChipsToDisplay;
private getChipMargin;
private arrangeElements;
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicChipListComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicChipListComponent, "adf-dynamic-chip-list", never, { "pagination": { "alias": "pagination"; "required": false; }; "chips": { "alias": "chips"; "required": true; }; "showDelete": { "alias": "showDelete"; "required": false; }; "disableDelete": { "alias": "disableDelete"; "required": false; }; "limitChipsDisplayed": { "alias": "limitChipsDisplayed"; "required": false; }; "roundUpChips": { "alias": "roundUpChips"; "required": false; }; }, { "displayNext": "displayNext"; "removedChip": "removedChip"; }, never, never, true, never>;
}