UNPKG

shaqra-dga-platformscode-angular

Version:

Angular wrapper library for DGA Design System components. Provides Angular bindings and integration for @platformscode/core web components.

156 lines (149 loc) 5.92 kB
import { Observable } from 'rxjs'; import * as i0 from '@angular/core'; import { EventEmitter } from '@angular/core'; import * as i5 from '@angular/forms'; import { ControlValueAccessor } from '@angular/forms'; import * as i4 from '@angular/common'; interface ShaqraDgaTheme { primaryColor: string; secondaryColor: string; dangerColor: string; backgroundColor: string; textColor: string; borderRadius: string; fontFamily: string; } interface ShaqraDgaConfig { theme: ShaqraDgaTheme; globalDisabled: boolean; debugMode: boolean; } declare class ShaqraDgaPlatformscodeAngularService { private defaultConfig; private configSubject; config$: Observable<ShaqraDgaConfig>; private registeredComponents; private componentUsageStats; constructor(); /** * Get current configuration */ getConfig(): ShaqraDgaConfig; /** * Update the global configuration */ updateConfig(config: Partial<ShaqraDgaConfig>): void; /** * Update only theme settings */ updateTheme(theme: Partial<ShaqraDgaTheme>): void; /** * Reset configuration to defaults */ resetConfig(): void; /** * Enable/disable all components globally */ setGlobalDisabled(disabled: boolean): void; /** * Enable/disable debug mode */ setDebugMode(enabled: boolean): void; /** * Register a component (for tracking and debugging) */ registerComponent(componentName: string): void; /** * Get list of registered components */ getRegisteredComponents(): string[]; /** * Get component usage statistics */ getComponentStats(): Map<string, number>; /** * Generate CSS custom properties from current theme */ generateCSSVariables(): { [key: string]: string; }; /** * Apply theme to document root */ applyThemeToDocument(): void; /** * Validate component configuration */ validateComponentConfig(componentName: string, config: any): boolean; /** * Get library version and info */ getLibraryInfo(): { name: string; version: string; components: string[]; }; /** * Debug logging utility */ private logDebug; /** * Observable for theme changes */ get theme$(): Observable<ShaqraDgaTheme>; /** * Check if components are globally disabled */ isGloballyDisabled(): boolean; /** * Utility method to create component-specific configuration */ createComponentConfig(componentName: string, baseConfig?: any): any; static ɵfac: i0.ɵɵFactoryDeclaration<ShaqraDgaPlatformscodeAngularService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ShaqraDgaPlatformscodeAngularService>; } declare class ShaqraDgaPlatformscodeAngularComponent { title: string; showDemo: boolean; onDemoButtonClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ShaqraDgaPlatformscodeAngularComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ShaqraDgaPlatformscodeAngularComponent, "lib-shaqra-dga-platformscode-angular", never, { "title": { "alias": "title"; "required": false; }; "showDemo": { "alias": "showDemo"; "required": false; }; }, {}, never, never, false, never>; } declare class TextInputComponent implements ControlValueAccessor { placeholder: string; label: string; disabled: boolean; required: boolean; type: string; valueChange: EventEmitter<string>; value: string; private onChange; private onTouched; writeValue(value: string): void; registerOnChange(fn: (value: string) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; onInputChange(event: any): void; onBlur(): void; static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "shaqra-dga-text-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>; } declare class ButtonComponent { variant: 'primary' | 'secondary' | 'danger'; size: 'small' | 'medium' | 'large'; disabled: boolean; loading: boolean; type: 'button' | 'submit' | 'reset'; clicked: EventEmitter<void>; onClick(): void; get buttonClasses(): string; static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "shaqra-dga-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], false, never>; } declare class ShaqraDgaPlatformscodeAngularModule { static ɵfac: i0.ɵɵFactoryDeclaration<ShaqraDgaPlatformscodeAngularModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ShaqraDgaPlatformscodeAngularModule, [typeof ShaqraDgaPlatformscodeAngularComponent, typeof TextInputComponent, typeof ButtonComponent], [typeof i4.CommonModule, typeof i5.FormsModule], [typeof ShaqraDgaPlatformscodeAngularComponent, typeof TextInputComponent, typeof ButtonComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<ShaqraDgaPlatformscodeAngularModule>; } export { ButtonComponent, ShaqraDgaPlatformscodeAngularComponent, ShaqraDgaPlatformscodeAngularModule, ShaqraDgaPlatformscodeAngularService, TextInputComponent }; export type { ShaqraDgaConfig, ShaqraDgaTheme };