import { KbqOverflowItemsModule } from '@koobiq/components/overflow-items';

KbqOverflowItem

directiveСкопировать ссылку на KbqOverflowItem

Directive for the item that can be hidden by the KbqOverflowItems directive.

@Directive({ selector: '[kbqOverflowItem]', exportAs: 'kbqOverflowItem' })
class KbqOverflowItem extends ElementVisibilityManager {
    readonly id = input.required<unknown>({ alias: 'kbqOverflowItem' });
    readonly order = input<number | null>(null);
    readonly alwaysVisible = input<boolean>(false);
}
kbqOverflowIteminputrequiredСкопировать ссылку на kbqOverflowItemunknown

Unique identifier for the item.

orderinputСкопировать ссылку на ordernumber | null

Defines the order in which the item is processed in the overflow container, without changing its original position in the QueryList.

alwaysVisibleinputСкопировать ссылку на alwaysVisibleboolean

Element with this attribute will be ignored when hiding and will always remain visible. Defaults to false.

KbqOverflowItems

directiveСкопировать ссылку на KbqOverflowItems

Directive for managing the visibility of items that overflow the container.

@Directive({ selector: '[kbqOverflowItems]', exportAs: 'kbqOverflowItems' })
class KbqOverflowItems {
    readonly reverseOverflowOrder = input<boolean>(false);
    readonly debounceTime = input<number>(0);
    readonly additionalResizeObserverTargets = input<Element | Element[]>(
        this.document.body
    );
    readonly orientation = input<KbqOrientation>('horizontal');
    readonly wrap = input<KbqFlexWrap>('nowrap');
    readonly changes = output<ReadonlySet<unknown>>();
    readonly hiddenItemIDs: Signal<ReadonlySet<unknown>>;
}
reverseOverflowOrderinputСкопировать ссылку на reverseOverflowOrderboolean

Whether the overflow order should be reversed. Defaults to false.

Example
[0, 1, hidden, hidden] ---> [hidden, hidden, 2, 3]
debounceTimeinputСкопировать ссылку на debounceTimenumber

Debounce time for recalculating items visibility. Defaults to 0.

additionalResizeObserverTargetsinputСкопировать ссылку на additionalResizeObserverTargetsElement | Element[]

List of additional elements to observe for resize changes. Defaults to document.body.

orientationinputСкопировать ссылку на orientationKbqOrientation

Defines the orientation of the overflow items. Defaults to 'horizontal'.

wrapinputСкопировать ссылку на wrapKbqFlexWrap

Defines the wrap of the overflow items. Defaults to 'nowrap'.

changesoutputСкопировать ссылку на changesReadonlySet<unknown>

Emits the set of hidden items after every recalculation, also when it has not changed: a recalculation shows every item before it hides the overflown ones again, so a consumer that hides items itself re-applies that here.

hiddenItemIDsСкопировать ссылку на hiddenItemIDsSignal<ReadonlySet<unknown>>

Set of hidden item IDs.

KbqOverflowItemsResult

directiveСкопировать ссылку на KbqOverflowItemsResult

Directive for displaying the result of hidden items by the KbqOverflowItems directive.

@Directive({
    selector: '[kbqOverflowItemsResult]',
    exportAs: 'kbqOverflowItemsResult'
})
class KbqOverflowItemsResult extends ElementVisibilityManager {}
Предложения по улучшению
Если вы нашли ошибку или хотите доработать статью, создайте запрос на GitHub.