import * as i0 from '@angular/core'; import { ComponentRef, Type } from '@angular/core'; import { AuditEntry, SchemaResponseFieldDefinition, TranslateService, ResolvedObjectConfigItem, RendererType } from '@yuuvis/client-core'; import * as dist_libs_yuuvis_client_core_types_yuuvis_client_core from 'dist/libs/yuuvis/client-core/types/yuuvis-client-core'; /** * Abstract class to be extended by audit-entry renderers. The renderer controls the * inner content of an audit timeline entry; the surrounding framing (date column, * timeline line, version badge, creator) stays with the host component. */ declare abstract class AbstractAuditRendererComponent { auditEntry: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface ResolvedAuditLabel { label: string; more?: string; } declare class DefaultAuditRendererComponent extends AbstractAuditRendererComponent { #private; protected resolved: i0.Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Attribute directive that renders an `AuditEntry` using the component registered with * `AuditRendererService` for the entry's `action` (and optionally `subaction`). Falls * back to `DefaultAuditRendererComponent` when no override is registered. */ declare class AuditRendererDirective { #private; component: ComponentRef; yuvAuditRenderer: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Service for managing audit-entry renderers. Renderers are components that render the * inner content of an audit entry in the timeline view of `ObjectAuditComponent`. * * Register a renderer for an `action` to override the default rendering of all audit * entries with that action, or for an `action` + `subaction` pair to override a specific * variant. Lookup prefers the subaction-specific renderer over the action-only renderer; * if neither is registered, `DefaultAuditRendererComponent` is used. */ declare class AuditRendererService { #private; /** * Register a renderer for a specific audit `action`. Pass `subaction` to scope the * renderer to a particular (action, subaction) pair. */ registerAuditRenderer(cmp: Type, action: number, subaction?: number): void; /** * Resolve the renderer for an audit entry. Tries `(action, subaction)` first, falls * back to `(action)`, then to `DefaultAuditRendererComponent`. */ getAuditRenderer(action: number, subaction?: number): Type; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Abstract class to be extended by property renderers */ declare abstract class AbstractRendererComponent { #private; propertyName: i0.InputSignal; value: i0.InputSignal; meta: i0.InputSignal | undefined>; protected getProperty(): SchemaResponseFieldDefinition | undefined; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "yuv-abstract-renderer", never, { "propertyName": { "alias": "propertyName"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class BooleanRendererComponent extends AbstractRendererComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DateTimeRendererComponent extends AbstractRendererComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DecimalRendererComponent extends AbstractRendererComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FileSizeRendererComponent extends AbstractRendererComponent { parsedValue: i0.Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class IconRendererComponent extends AbstractRendererComponent { #private; protected readonly customId: `${string}-${string}-${string}-${string}-${string}`; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class IntegerRendererComponent extends AbstractRendererComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class OrganizationRendererComponent extends AbstractRendererComponent { #private; resolvedValue: i0.Signal; userAndRole: i0.WritableSignal<{ type: string; label: string | undefined; }[]>; userAndRoleLoading: i0.Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class StringRendererComponent extends AbstractRendererComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TableRendererComponent extends AbstractRendererComponent { #private; readonly translate: TranslateService; protected tableHeaders: i0.Signal<{ id: string; key: any; label: any; }[]>; protected tableData: i0.Signal; protected reducedData: i0.Signal; protected getCellValue(row: any[], key: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class UnknownRendererComponent extends AbstractRendererComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type RendererComponent = IntegerRendererComponent | DecimalRendererComponent | DateTimeRendererComponent | IconRendererComponent | StringRendererComponent | BooleanRendererComponent | TableRendererComponent; type RendererDirectiveInput = ResolvedObjectConfigItem; /** * Service for managing property type renderers. Renderers are components that will render certain * property types. * * You are able to register your own renderer to overwrite an existing one or provide a custom * renderer for your context. */ declare class RendererService { #private; private system; constructor(); getRendererByType(type: RendererType): Type; getRenderer(propertyName: string, typeName?: string): Type; /** * Register a renderer for a particular property. Providing `typeName` will register that renderer * for a certain context (use same inputs when calling `getRenderer()`). * @param cmp The component to actually render the property * @param propertyName property name (used for registering the renderer for a certain context) * @param typeName Optional type name (used for registering the renderer for a certain context) */ registerRenderer(cmp: Type, propertyName: string, typeName?: string): void; /** * * @param type The type of property this renderer is supposed to be used for */ registerRendererByType(type: RendererType, cmp: Type): void; private _getKey; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Structural directive for rendering an obect type property */ declare class RendererDirective { #private; component: ComponentRef; yuvRenderer: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export { AbstractAuditRendererComponent, AbstractRendererComponent, AuditRendererDirective, AuditRendererService, BooleanRendererComponent, DateTimeRendererComponent, DecimalRendererComponent, DefaultAuditRendererComponent, FileSizeRendererComponent, IconRendererComponent, IntegerRendererComponent, OrganizationRendererComponent, RendererDirective, RendererService, StringRendererComponent, TableRendererComponent, UnknownRendererComponent }; export type { RendererComponent, RendererDirectiveInput };