@funidata/ngx-fudis
Version:
Funidata Design System.
98 lines (97 loc) • 3.8 kB
TypeScript
import { ElementRef, OnChanges, OnDestroy, OnInit, AfterContentInit } from '@angular/core';
import { FudisIdService } from '../../services/id/id.service';
import { FudisHeadingVariant, FudisHeadingLevel } from '../../types/typography';
import { FudisGridWidth, FudisGridAlign } from '../../types/grid';
import { PopoverApiDirective } from '../../directives/popover/popover-api.directive';
import { FudisComponentChanges, FudisBadgeVariant } from '../../types/miscellaneous';
import { FudisInternalErrorSummaryService } from '../../services/form/error-summary/internal-error-summary.service';
import { BehaviorSubject } from 'rxjs';
import * as i0 from "@angular/core";
export declare class SectionComponent extends PopoverApiDirective implements OnInit, OnChanges, OnDestroy, AfterContentInit {
private _element;
private _idService;
private _errorSummaryService;
constructor(_element: ElementRef, _idService: FudisIdService, _errorSummaryService: FudisInternalErrorSummaryService);
/**
* Section title
*/
title: string;
/**
* Heading level for the section title
*/
level: FudisHeadingLevel;
/**
* Heading variant for the section title
*/
titleVariant: FudisHeadingVariant;
/**
* Section id
*/
id: string;
/**
* Add badge to the section title
*/
badge: FudisBadgeVariant | null;
/**
* Badge text
*/
badgeText: string | null;
/**
* Maximum width of Grid. When viewport gets narrower, grid automatically adjusts to lower sizes.
*
* - Xxl = Default value. Viewports of 1600px and larger
* - Xl = Viewports smaller than 1600px
* - Lg = Viewports smaller than 1200px
* - Md = Viewports smaller than 992px
* - Sm = Viewports smaller than 768px
* - Xs = Viewports smaller than 576px
*/
width: FudisGridWidth;
/**
* Alignment of Grid component inside its parent
*/
align: FudisGridAlign;
/**
* Custom CSS classes
*/
classes: string;
/**
* Is section title shown in error summary breadcrumb
*/
errorSummaryBreadcrumb: boolean;
/**
* Internal, separate unique heading id
*/
protected _headingId: string;
/**
* Section CSS class list
*/
protected _classList: BehaviorSubject<string>;
/**
* Is info sent to error summary service
*/
private _errorSummaryInfoSent;
private _parentFormId;
ngOnInit(): void;
ngAfterContentInit(): void;
ngOnChanges(changes: FudisComponentChanges<SectionComponent>): void;
ngOnDestroy(): void;
/**
* Send error object to Error Summary Service
*/
private _addToErrorSummary;
/**
* Remove error object from Error Summary Service
*/
private _removeFromErrorSummary;
/**
* Set main CSS class with possible custom classes
*/
private _getClasses;
/**
* Generate id with Id Service
*/
private _setSectionId;
static ɵfac: i0.ɵɵFactoryDeclaration<SectionComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SectionComponent, "fudis-section", never, { "title": { "alias": "title"; "required": true; }; "level": { "alias": "level"; "required": true; }; "titleVariant": { "alias": "titleVariant"; "required": false; }; "id": { "alias": "id"; "required": false; }; "badge": { "alias": "badge"; "required": false; }; "badgeText": { "alias": "badgeText"; "required": false; }; "width": { "alias": "width"; "required": false; }; "align": { "alias": "align"; "required": false; }; "classes": { "alias": "classes"; "required": false; }; "errorSummaryBreadcrumb": { "alias": "errorSummaryBreadcrumb"; "required": false; }; }, {}, never, ["fudis-section-actions", "fudis-section-content"], false, never>;
}