/** * Generated bundle index. Do not edit. */ import { AbstractControl, FormGroupDirective, NgControl, NgForm } from "@angular/forms"; import * as i0 from "@angular/core"; import { ElementRef, Renderer2 } from "@angular/core"; import { OverlayRef, ScrollStrategy } from "@angular/cdk/overlay"; import { Observable } from "rxjs"; /** * `booleanAttribute` that passes `undefined` through instead of coercing it to * `false`, so an explicit input can be told apart from an unset one and win over * a fallback. */ export declare function nxOptionalBooleanAttribute(value: unknown): boolean | undefined; /** * Provider that defines when form controls have an error. */ export declare class ErrorStateMatcher { isErrorState(control: AbstractControl | NgControl | null, form: FormGroupDirective | NgForm | null): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Service to generate unique IDs using the Angular APP_ID as a namespace. * If the APP_ID is the default 'ng', a random string is used instead. * This helps prevent ID collisions in micro frontend scenarios. */ export declare class IdGenerationService { private static _counter; private readonly _appId; constructor(); /** * Generates a unique ID with the given prefix. * @param prefix The prefix for the ID (e.g., component name) * @returns A unique ID string */ nextId(prefix: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Helper ScrollStrategy to be used in tests to test overriding the default scroll strategy. * * Example usage: * TestBed.resetTestingModule() * .configureTestingModule({ * imports: [ScrollStrategyOverrideComponent, NxAutocompleteModule, NxInputModule], * providers: [ * { * provide: NX_AUTOCOMPLETE_SCROLL_STRATEGY, * useFactory: () => fakeScrollStrategyFunction, * }, * ], * }) * .compileComponents(); * createTestComponent(ScrollStrategyOverrideComponent); * expect((testInstance as ScrollStrategyOverrideComponent).scrollStrategy).toBe(fakeScrollStrategyFunction); * */ export declare class FakeScrollStrategy implements ScrollStrategy { isEnabled: boolean; overlayRef: OverlayRef; attach(overlayRef: OverlayRef): void; enable(): void; disable(): void; detach(): void; } /** See usage at FakeScrollStrategy */ export declare const fakeScrollStrategyFunction: () => FakeScrollStrategy; /** * Service for measuring text width using canvas context. */ export declare class TextMeasurementService { private readonly _platformId; private _textMeasureContext; private _getTextMeasureContext; /** * Measure the pixel width of a text string using canvas. * Optionally uses the font from a specific HTML input element. * @param text The text to measure * @param inputElement Optional input element to get font styles from * @returns The pixel width of the text, or 0 if measurement is not possible */ private measureTextWidth; /** * Compute the optimal width for an input field based on its value and placeholder. * @param value The current value of the input * @param placeholder The placeholder text * @param maxInputLength The maximum length of the input * @param inputElement Optional input element to get font styles from * @returns A CSS width string in pixels */ computeInputWidth(value: string | null, placeholder: string, maxInputLength: number, inputElement?: HTMLInputElement): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface TrustedHTML { readonly __brand__: 'TrustedHTML'; } /** * @docs-private * Only pass HTML that is already sanitized or comes from a trusted source. */ export declare function _trustedHTML(html: string): TrustedHTML; /** * Assert that a value is not `null` and redefine its type. */ export declare function notNull(value: T | null): value is T; /** * Assert that a value is not `undefined` or `null` and redefine its type. */ export declare function notNullable(value: T | null | undefined): value is T; /** * Assert that a value is not `undefined` and redefine its type. */ export declare function notUndefined(value: T | undefined): value is T; /** * Assert that a value is truthy using the double negation operator `!!` and redefine its type. */ export declare function isTruthy(value: T | null | undefined): value is T; /** * Assert that a value is `string` using `typeof` check and redefine its type. */ export declare function isString(value: unknown): value is string; /** * Assert that a value is `number` using `typeof` check and redefine its type. */ export declare function isNumber(value: unknown): value is number; /** * Assert that a value is `boolean` using `typeof` check and redefine its type. */ export declare function isBoolean(value: unknown): value is boolean; /** * Assert that a value is `true` and redefine its type. */ export declare function isTrue(value: unknown): value is true; /** * Assert that a value is `false` and redefine its type. */ export declare function isFalse(value: unknown): value is false; /** * Assert that a value is `null` and redefine its type. */ export declare function isNull(value: unknown): value is null; /** * Assert that a value is `null` or `undefined` and redefine its type. */ export declare function isNullable(value: unknown): value is null | undefined; /** * Assert that a value is `undefined` and redefine its type. */ export declare function isUndefined(value: unknown): value is undefined; /** * Assert that a value is not `undefined` or `null` or an empty `ArrayLike` object such as `string` and redefine its type. */ export declare function notEmpty>(value: T | null | undefined): value is T; export declare function pad(str: string, length?: number, padCharacter?: string): string; export declare function formatDate(date: Date): string; export declare function formatDateHuman(date: Date): string; /** * The purpose of this function is to allow a list of short keywords * expand to longer bem class names with will then be applied to the classname value. * * This function will map a list of keys to values in a MAPPING list. * Whatever value is found will replace the keyword. * Every keyword not found will just transfered wiithmout modifying. */ export declare function mapClassNames(value: string, DEFAULTS?: string[], MAPPING?: {}): string; export declare function getClassNameList(value: string, MAPPING?: { [k: string]: string; }): string[]; /** * Add classes to the native element using the provided renderer. */ export declare function appendClasses(renderer: Renderer2, element: ElementRef, classes: string): void; /** * Remove classes from the native element using the provided renderer. */ export declare function removeClasses(renderer: Renderer2, element: ElementRef, classes: string): void; /** * Create a new `Date` instance using the provided value. */ export declare function parseDate(dateString: string | number | Date): Date; /** * Manually compose a font shorthand defintion as it's not guaranteed to be given by the computed style object. */ export declare function getFontShorthand(style: CSSStyleDeclaration): string; /** * Return the number of decimal places of a number. */ export declare function numberOfDecimals(number: string | number): number; /** * Return the provided value if in specified range, the lower or upper boundary otherwise. */ export declare function clamp(value: number, min?: number, max?: number): number; /** * Generate a random string. */ export declare function randomString(): string; /** * Convert a CSS time value, e.g. the computed value of a custom property, into milliseconds. * Values that are not a valid CSS time, and negative ones, are reported as 0. */ export declare function parseCssTimeToMs(value: string): number; /** Available breakpoints to subscribe to. */ export declare enum NxBreakpoints { /** Min size for BREAKPOINT_MOBILE */ BREAKPOINT_XSMALL = 0, BREAKPOINT_SMALL = 320, /** Min size for BREAKPOINT_TABLET */ BREAKPOINT_MEDIUM = 704, /** Min size for BREAKPOINT_DESKTOP */ BREAKPOINT_LARGE = 992, BREAKPOINT_XLARGE = 1280, BREAKPOINT_2XLARGE = 1472, BREAKPOINT_3XLARGE = 1760 } /** * Service subscribing to window resize events and providing breakpoint matching functions. */ export declare class NxViewportService { private readonly _platform; readonly viewportChange$: Observable; /** Returns whether the current viewport width is greater than or equal (>=) to minSize. */ min(minSize: NxBreakpoints, throttleTimeMs?: number): Observable; /** Returns whether the current viewport width is lower (<) than maxSize. */ max(maxSize: NxBreakpoints, throttleTimeMs?: number): Observable; /** Returns whether the current viewport width is greater than or equal (>=) to minSize and lower (<) than maxSize. */ between(minSize: NxBreakpoints, maxSize: NxBreakpoints, throttleTimeMs?: number): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export {};