import * as i0 from '@angular/core'; import { AfterViewInit, OnDestroy, OnChanges } from '@angular/core'; import { ScrollContainerComponent } from '@talenra/ngx-base/scroll-container'; /** * Controls the vertical layout of your content. Is typically combined with a workspace-layout * that controls the horizontal layout. * * - Adds scrolling if the content exceeds the container height. * - Supports a header section with an optional "overscroll" effect * - Supports an optional sticky bar (e.g. a toolbar) * - Supports an optional sticky footer (e.g. buttons) * * @see {@link WorkspaceLayoutSimpleComponent} and {@link WorkspaceLayoutSidepanelComponent} * for examples on how to use content-layout in combination with a workspace-layout. * * ```html * * *
My header
* * My toolbar *
My content
*
My footer bar
*
* ``` * * ```html * * *
My header
* * *
My content
*
My footer bar
*
* ``` * * ### Import * * ```typescript * import { ContentLayoutModule } from '@talenra/ngx-base/content-layout'; * ``` * * ../../#/content-control/content-layout */ declare class ContentLayoutComponent implements AfterViewInit, OnDestroy, OnChanges { /** * Determines whether the layout uses a header element. The header element is injected using content projection: Place * it the component's content and mark it with the `header` attribute. * * ```html * * *
My header
*
*/ useHeader: boolean; /** * Determines whether the layout uses a sticky bar element. The sticky bar element is injected using content * projection: Place it the component's content and mark it with the `sticky-bar` attribute. * * The following class names are added/removed to the sticky bar element depending of ContentLayout's state: * - `no-header`: ContentLayout does not use a header (useHeader = false) * - `header-reduced`: Header is reduced (overscrolled by content) * - `content-scrolled`: Content has scroll-offset * * @example * * *
My sticky bar
*
*/ useStickyBar: boolean; /** * Determines whether the layout uses a sticky footer element. The sticky footer element is * injected using content projection: Place it the component's content and mark * it with the `sticky-footer` attribute. * * @example * * *
My sticky footer
*
*/ useStickyFooter: boolean; /** * Determines whether the content is allowed to take the full height and to cover the * header when scrolled. * * @example * *
My header
*
My scrollable Content
*
*/ overscrollHeader: boolean; /** * Determines whether the header is currently in reduced mode (overscrolled by content). * * @internal */ headerReduced: boolean; /** * Threshold for triggering overscroll behaviour. * * @see {ScrollContainerBehaviour} * * @internal */ scrollYThreshold: number; private observers; /** * Stored heights for relevant elements */ private heights; /** * Determines whether to use transitions for UI updates. Is initially disabled to prevent flickering. */ private useTransition; /** * Emits the height of the header whenever it is updated. This is useful for cases where the layout depends on the * header height and cannot be handled using CSS. * * @deprecated */ headerHeightChange: i0.OutputEmitterRef; /** * Class names applied to the host element. */ private hostClass; private headerRef?; private contentRef?; private stickyBarRef?; private stickyFooterRef?; private renderer; /** Scroll Container reference */ private scrollContainer; /** Content Layout Service reference. */ private service; private hostRef; /** @internal */ constructor(); /** @internal */ ngAfterViewInit(): void; /** @internal */ ngOnDestroy(): void; /** @internal */ ngOnChanges(): void; /** * Updates the stored element heights whenever they change. Enables UI transitions after the very first trigger. */ private updateHeight; /** * Triggered whenever input properties are updated or the content scroll-offset changes. Will update the layout * parameters. */ protected onScrollOffsetY(hasScroll: boolean): void; /** * Add/remove class-names to/from sticky bar. Simplifies styling of sticky bar elements for consuming apps. */ private updateContentElements; /** * Workaround for transitions: As we cannot use CSS transitions with `height: auto`, we set the height (or the * max-height) explicitly. * * TODO: Check if we can use CSS grid-template-rows: 0/1fr instead (s. AppSidenavComponent for example) * * @internal */ headerStyle(): { maxHeight?: undefined; } | { maxHeight: string; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_useHeader: unknown; static ngAcceptInputType_useStickyBar: unknown; static ngAcceptInputType_useStickyFooter: unknown; static ngAcceptInputType_overscrollHeader: unknown; } /** * Service to manage the state of the Content Layout component. * * The service grants access to Content Layout's Scroll Container which allows consumers to interact with the native * scroll element. We might extend the service in the future to provide additional functionality if we have appropriate * use cases. * * Currently the service is intended for internal use only and thus not mentioned in the API docs. * * @internal */ declare class ContentLayoutService { /** Internal: Scroll Container reference. Is set by Content Layout. Read-only access is provided to consumers. */ private readonly _scrollContainer; /** * Scroll Container reference. Allows access to the native scroll element. * * ```typescript * const service: ContentLayoutService = inject(ContentLayoutService); * console.log(`scrollTop: ${service.scrollContainer()?.scrollElement.scrollTop}`); * ``` */ readonly scrollContainer: i0.Signal; /** * Set Scroll Container reference. Hidden from API docs as this is handled by ContentLayoutComponent exclusively. * * @internal */ setScrollContainer(scrollContainer: ScrollContainerComponent): void; /** Internal: Determines whether Content Layout content has vertical scroll offset */ private readonly _hasScroll; /** Determines whether Content Layout content has vertical scroll offset */ readonly hasScroll: i0.Signal; /** * Set hasScroll property's value. Hidden from API docs as this is handled by ContentLayoutComponent exclusively. * * @internal */ setHasScroll(value: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * StickyBar is used with ContentLayout's sticky bar. It wraps the content of the sticky bar and takes care of styling. * * ```html * * * *
Main content
*
*
* ``` * * ### Import * * ```typescript * import { StickyBarComponent } from '@talenra/ngx-base/content-layout'; * ``` * * ../../#/content-control/content-layout */ declare class StickyBarComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export { ContentLayoutComponent, ContentLayoutService, StickyBarComponent };