@ngx-uk-frontend/core
Version:
Core utilities and shared functionality for ngx-uk-frontend libraries
35 lines • 2.18 kB
JavaScript
/* eslint-disable @angular-eslint/directive-selector */
import { Directive, input } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Base directive for individual error summary items
*
* This directive provides common functionality for error summary items
* across different design systems. It provides a declarative API for
* error summary components.
*
* The directive doesn't render anything itself - it just provides
* properties that the parent error summary component can use.
*/
export class ErrorSummaryItemDirective {
/**
* The text of the error message to display
* Required field that will be displayed as the error message
*/
text = input.required(...(ngDevMode ? [{ debugName: "text" }] : []));
/**
* Required targetId attribute for the error link
* This should reference the id of the form field with the error.
*/
targetId = input.required(...(ngDevMode ? [{ debugName: "targetId" }] : []));
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ErrorSummaryItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: ErrorSummaryItemDirective, isStandalone: true, selector: "error-summary-item", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, targetId: { classPropertyName: "targetId", publicName: "targetId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ErrorSummaryItemDirective, decorators: [{
type: Directive,
args: [{
selector: 'error-summary-item',
standalone: true,
}]
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], targetId: [{ type: i0.Input, args: [{ isSignal: true, alias: "targetId", required: true }] }] } });
//# sourceMappingURL=error-summary-item.directive.js.map