UNPKG

acontplus-ui-components

Version:

Angular Material UI component library with dynamic tables, theming support, dialog wrappers, customer management components, and comprehensive styling utilities

1,083 lines (1,045 loc) 49.4 kB
import * as _angular_core from '@angular/core'; import { Type, InjectionToken, AfterViewInit, ViewContainerRef, ElementRef, TemplateRef, AfterContentInit, OnChanges, OnInit, OnDestroy, EventEmitter, QueryList, SimpleChanges, PipeTransform } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { ScrollStrategy } from '@angular/cdk/overlay'; import { MatChipInputEvent, MatChipEditedEvent } from '@angular/material/chips'; import { LiveAnnouncer } from '@angular/cdk/a11y'; import { ThemePalette } from '@angular/material/core'; import * as _angular_material_snack_bar from '@angular/material/snack-bar'; import { MatSnackBarConfig } from '@angular/material/snack-bar'; import * as _angular_material_paginator from '@angular/material/paginator'; import { PageEvent } from '@angular/material/paginator'; import { MatTableDataSource, MatHeaderRowDef, MatRowDef, MatFooterRowDef, MatColumnDef, MatNoDataRow, MatTable } from '@angular/material/table'; import { SelectionModel } from '@angular/cdk/collections'; import * as rxjs from 'rxjs'; import { Observable } from 'rxjs'; import { ControlValueAccessor, AbstractControl, ValidationErrors, FormGroup, FormControl } from '@angular/forms'; import { HttpContext, HttpRequest, HttpInterceptorFn } from '@angular/common/http'; import { SafeHtml } from '@angular/platform-browser'; import { ComponentType } from '@angular/cdk/portal'; import { SRI_IDENTIFICATION_CODE, CustomerListItemDto } from 'acontplus-core'; import { MatSelectChange } from '@angular/material/select'; type SnackbarType = 'success' | 'warning' | 'info' | 'error'; declare const SNACKBAR_MESSAGES: { readonly SUCCESS: { readonly SAVE: "Data saved successfully"; readonly DELETE: "Item deleted successfully"; readonly UPDATE: "Data updated successfully"; readonly UPLOAD: "File uploaded successfully"; }; readonly ERROR: { readonly SAVE: "Failed to save data"; readonly DELETE: "Failed to delete item"; readonly UPDATE: "Failed to update data"; readonly UPLOAD: "Failed to upload file"; readonly NETWORK: "Network error occurred"; readonly UNKNOWN: "An unexpected error occurred"; }; readonly WARNING: { readonly UNSAVED_CHANGES: "You have unsaved changes"; readonly SESSION_EXPIRING: "Your session is about to expire"; readonly STORAGE_FULL: "Storage is running low"; }; readonly INFO: { readonly LOADING: "Loading data..."; readonly PROCESSING: "Processing request..."; readonly MAINTENANCE: "System maintenance scheduled"; }; }; declare const SNACKBAR_DURATIONS: { readonly SHORT: 3000; readonly MEDIUM: 5000; readonly LONG: 8000; readonly PERSISTENT: 0; }; declare const SNACKBAR_ICONS: Record<SnackbarType, string>; /** * A versatile card component that wraps Angular Material's mat-card with additional functionality * and customization options. This component provides a consistent card layout with configurable * header, content, and action areas. * * @example * <acp-mat-dynamic-card * [cardTitle]="'Card Title'" * [cardSubtitle]="'Card Subtitle'" * [isHeaderVisible]="true" * [areActionsVisible]="true" * (primaryButtonClicked)="onPrimaryAction()"> * Card content goes here * </acp-mat-dynamic-card> */ declare class MatDynamicCardComponent { /** * The title text to display in the card header. * @default null */ cardTitle: _angular_core.InputSignal<string | null>; /** * The subtitle text to display in the card header. * @default null */ cardSubtitle: _angular_core.InputSignal<string | null>; /** * URL for the avatar image to display in the card header. * @default null */ avatarImageUrl: _angular_core.InputSignal<string | null>; /** * Whether to show the card header section. * @default false */ isHeaderVisible: _angular_core.InputSignalWithTransform<boolean, unknown>; /** * CSS padding value for the card content area. * @default '1rem' */ contentPadding: _angular_core.InputSignal<string>; /** * Whether to show a divider between the header and content sections. * @default false */ hasDivider: _angular_core.InputSignalWithTransform<boolean, unknown>; /** * Whether to show the action buttons section. * @default false */ areActionsVisible: _angular_core.InputSignalWithTransform<boolean, unknown>; /** * Text for the primary action button. * @default 'Confirm' */ primaryButtonText: _angular_core.InputSignal<string>; /** * Text for the secondary action button. * @default 'Cancel' */ secondaryButtonText: _angular_core.InputSignal<string>; /** * Material icon name for the primary button. * @default null */ primaryButtonIcon: _angular_core.InputSignal<string | null>; /** * Material icon name for the secondary button. * @default null */ secondaryButtonIcon: _angular_core.InputSignal<string | null>; /** * Alignment of the action buttons. * @default 'end' */ buttonsPosition: _angular_core.InputSignal<"start" | "end">; /** * Event emitted when the primary button is clicked. */ primaryButtonClicked: _angular_core.OutputEmitterRef<void>; /** * Event emitted when the secondary button is clicked. */ secondaryButtonClicked: _angular_core.OutputEmitterRef<void>; /** * Event emitted when the card is clicked. */ cardClicked: _angular_core.OutputEmitterRef<Event>; /** * Handles the primary button click event. * Stops event propagation and emits the primaryButtonClicked event. * @param event The click event */ handlePrimaryButtonClick(event: Event): void; /** * Handles the secondary button click event. * Stops event propagation and emits the secondaryButtonClicked event. * @param event The click event */ handleSecondaryButtonClick(event: Event): void; /** * Handles the card click event. * Emits the cardClicked event with the original event. * @param event The click event */ handleCardClick(event: Event): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatDynamicCardComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatDynamicCardComponent, "acp-mat-dynamic-card", never, { "cardTitle": { "alias": "cardTitle"; "required": false; "isSignal": true; }; "cardSubtitle": { "alias": "cardSubtitle"; "required": false; "isSignal": true; }; "avatarImageUrl": { "alias": "avatarImageUrl"; "required": false; "isSignal": true; }; "isHeaderVisible": { "alias": "isHeaderVisible"; "required": false; "isSignal": true; }; "contentPadding": { "alias": "contentPadding"; "required": false; "isSignal": true; }; "hasDivider": { "alias": "hasDivider"; "required": false; "isSignal": true; }; "areActionsVisible": { "alias": "areActionsVisible"; "required": false; "isSignal": true; }; "primaryButtonText": { "alias": "primaryButtonText"; "required": false; "isSignal": true; }; "secondaryButtonText": { "alias": "secondaryButtonText"; "required": false; "isSignal": true; }; "primaryButtonIcon": { "alias": "primaryButtonIcon"; "required": false; "isSignal": true; }; "secondaryButtonIcon": { "alias": "secondaryButtonIcon"; "required": false; "isSignal": true; }; "buttonsPosition": { "alias": "buttonsPosition"; "required": false; "isSignal": true; }; }, { "primaryButtonClicked": "primaryButtonClicked"; "secondaryButtonClicked": "secondaryButtonClicked"; "cardClicked": "cardClicked"; }, never, ["*"], true, never>; } type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'full'; /** * @interface MatCustomDialogConfig * This is the main configuration object for any dialog opened through the service. * It extends the standard MatDialogConfig with custom properties for convenience. */ interface MatCustomDialogConfig<T = any> { data?: T; size?: DialogSize; width?: string; height?: string; minWidth?: string; minHeight?: string; maxWidth?: string; maxHeight?: string; position?: { top?: string; bottom?: string; left?: string; right?: string; }; panelClass?: string | string[]; backdropClass?: string | string[]; hasBackdrop?: boolean; backdropClickClosable?: boolean; escapeKeyClosable?: boolean; isMobileFullScreen?: boolean; autoFocus?: boolean | 'first-tabbable' | 'dialog' | 'first-heading'; restoreFocus?: boolean; ariaLabel?: string; ariaLabelledBy?: string; ariaDescribedBy?: string; role?: 'dialog' | 'alertdialog'; scrollStrategy?: ScrollStrategy; enterAnimationDuration?: number | string; exitAnimationDuration?: number | string; } /** * Configuration interface for opening a dialog inside the custom `DialogWrapperComponent`. * This interface defines the properties needed to configure the dialog wrapper. * * @interface DialogWrapperConfig * @template T The type of data to pass to the content component * * @example * const config: DialogWrapperConfig = { * component: YourDialogContentComponent, * title: 'Dialog Title', * icon: 'info', * data: { message: 'This is some data passed to the dialog content component' }, * hideHeader: false * }; */ interface DialogWrapperConfig<T = any> { /** * The component type to render inside the dialog wrapper. * This component will be dynamically created and inserted into the dialog. */ component: Type<any>; /** * The title text to display in the dialog header. */ title: string; /** * Optional Material icon name to display in the dialog header. */ icon?: string; /** * Optional data to pass to the content component's instance. * This will be accessible via the `data` property on the component instance. */ data?: T; /** * Whether to hide the dialog header section. * If true, the title, icon, and close button will not be displayed. * @default false */ hideHeader?: boolean; } declare class AdvancedDialogService { private readonly dialog; private readonly overlay; private readonly breakpointObserver; private readonly isMobile$; /** * Main method to open any component in a dialog. * This provides maximum flexibility. * @param component The component to render. * @param config The detailed configuration for the dialog. * @returns A MatDialogRef instance. */ open<T, D = any, R = any>(component: ComponentType<T>, config?: MatCustomDialogConfig<D>): Promise<MatDialogRef<T, R>>; /** * A powerful helper to open a component inside our standard, branded "wrapper". * This provides maximum consistency. * @param wrapperConfig Configuration for the title, icon, and the content component. * @param matDialogConfig Standard MatDialog configuration (size, position, etc.). * @returns A MatDialogRef instance pointing to the wrapper. */ openInWrapper<T, R = any>(wrapperConfig: DialogWrapperConfig<T>, matDialogConfig?: MatCustomDialogConfig<T>): Promise<MatDialogRef<DialogWrapperComponent, R>>; /** * Helper to open a dialog and only get an observable of the result. */ openAndGetResult<T, D = any, R = any>(component: ComponentType<T>, config?: MatCustomDialogConfig<D>): Promise<R | undefined>; /** * Closes all currently open dialogs. */ closeAll(): void; private buildDialogConfig; private applyFullScreenConfig; private applyStandardConfig; private applyCommonConfig; private getDialogWidth; static ɵfac: _angular_core.ɵɵFactoryDeclaration<AdvancedDialogService, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<AdvancedDialogService>; } declare class OverlayService { private overlay; private overlayRef; /** Inserted by Angular inject() migration for backwards compatibility */ constructor(...args: unknown[]); showSpinner(): void; hideSpinner(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<OverlayService, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<OverlayService>; } interface SnackbarConfig extends MatSnackBarConfig { readonly defaultAction?: string; readonly iconEnabled?: boolean; readonly titleEnabled?: boolean; } declare const DEFAULT_SNACKBAR_CONFIG: SnackbarConfig; declare const SNACKBAR_CONFIG: InjectionToken<SnackbarConfig>; interface SnackbarProps { readonly type: SnackbarType; readonly message: string; readonly title?: string; readonly action?: string; readonly config?: Partial<_angular_material_snack_bar.MatSnackBarConfig>; } interface NotificationCallProps { readonly message: string; readonly title?: string; readonly config?: Partial<_angular_material_snack_bar.MatSnackBarConfig>; } interface NotificationDemo { type: SnackbarType; message: string; title?: string; duration?: number; } declare class SnackbarService { private readonly snackBar; private readonly config; /** * Display a snackbar with specific type and configuration */ show(props: SnackbarProps): void; /** * Quick success notification */ success(props: NotificationCallProps): void; /** * Quick error notification with longer duration */ error(props: NotificationCallProps): void; /** * Quick warning notification */ warning(props: NotificationCallProps): void; /** * Quick info notification */ info(props: NotificationCallProps): void; private buildPanelClasses; private buildMessage; static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnackbarService, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<SnackbarService>; } declare class ThemeService { private readonly _darkMode; isDarkMode$: rxjs.Observable<boolean>; loadMode(): void; toggleDarkMode(): void; private applyTheme; static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>; } interface AutocompleteWrapperItem { id?: string | number; name?: string; value?: string; description?: string; [key: string]: any; } interface AutocompleteWrapperSearchResult { items: AutocompleteWrapperItem[]; totalCount: number; hasMore?: boolean; } type AutocompleteWrapperSearchFunction = (query: string, filters: AutocompleteWrapperFilters, page?: number, pageSize?: number) => Observable<AutocompleteWrapperSearchResult>; interface AutocompleteWrapperConfig { placeholder?: string; clearInput?: boolean; disabled?: boolean; debounceTime?: number; minSearchLength?: number; maxHistoryItems?: number; itemsPerPage?: number; enableStockFilter?: boolean; stockProperty?: string; enablePagination?: boolean; enableFilters?: boolean; enableFooterActions?: boolean; searchFields?: AutocompleteWrapperSearchField[]; stockOptions?: AutocompleteWrapperStockOption[]; overlayWidth?: string | number; overlayMaxHeight?: string | number; searchFunction?: AutocompleteWrapperSearchFunction; searchMode?: 'local' | 'remote' | 'hybrid'; localData?: AutocompleteWrapperItem[]; noResultsText?: string; sectionTitle?: string; } interface AutocompleteWrapperSearchField { value: string; label: string; property: string; } interface AutocompleteWrapperStockOption { value: string; label: string; } interface AutocompleteWrapperFilters { searchBy: string; stockFilter: string; } interface AutocompleteWrapperEvents { itemSelected: AutocompleteWrapperItem; searchChanged: string; pageChanged: number; filterChanged: AutocompleteWrapperFilters; advancedSearchClicked: void; allResultsClicked: string; createNewClicked: string; historyCleared: void; historyItemRemoved: { item: AutocompleteWrapperItem; index: number; }; } interface AutocompleteWrapperPaginationInfo { currentPage: number; totalPages: number; totalItems: number; itemsPerPage: number; startItem: number; endItem: number; hasNextPage: boolean; hasPreviousPage: boolean; } interface AutocompleteWrapperState { query: string; isLoading: boolean; overlayOpen: boolean; selectedIndex: number; pagination: AutocompleteWrapperPaginationInfo; hasResults: boolean; isHistoryVisible: boolean; historyCount: number; filters: AutocompleteWrapperFilters; } interface AutocompleteWrapperActions { onInput(event: Event): void; showOverlay(): void; hideOverlay(): void; clearSearch(): void; onKeyDown(event: KeyboardEvent): void; selectItem(item: AutocompleteWrapperItem): void; getItemDisplayText(item: AutocompleteWrapperItem): string; clearHistory(): void; removeHistoryItem(index: number, event: Event): void; goToFirstPage(): void; goToPreviousPage(): void; goToNextPage(): void; goToLastPage(): void; goToPage(event: Event): void; onFilterChange(): void; onCreateNew(event: Event): void; onAdvancedSearch(): void; onShowAllResults(): void; overlayOpen(): boolean; isLoading(): boolean; isHistoryVisible(): boolean; historyList(): AutocompleteWrapperItem[]; selectedIndex(): number; currentPageItems(): AutocompleteWrapperItem[]; totalItems(): number; totalPages(): number; currentPage(): number; totalCount(): number; startItem(): number; endItem(): number; sectionTitle(): string; noResultsText(): string; isNoResults(): boolean; overlayWidth(): string | number; overlayMaxHeight(): string | number; } declare const AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG: AutocompleteWrapperConfig; declare const AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG: AutocompleteWrapperConfig; declare const AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG: AutocompleteWrapperConfig; declare const AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG: AutocompleteWrapperConfig; declare const AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG: AutocompleteWrapperConfig; declare const AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG: AutocompleteWrapperConfig; declare function createAutocompleteWrapperConfig(overrides: Partial<AutocompleteWrapperConfig>): AutocompleteWrapperConfig; interface ReusableAutocompleteWrapperComponent extends AutocompleteWrapperActions { config: AutocompleteWrapperConfig; filters: AutocompleteWrapperFilters; query: string; } type AutocompleteWrapperSearchMode = 'local' | 'remote' | 'hybrid'; type AutocompleteWrapperItemProperty = keyof AutocompleteWrapperItem; type AutocompleteWrapperEventHandler<T = any> = (event: T) => void; declare class AutocompleteWrapperService { private historySubject; history$: Observable<AutocompleteWrapperItem[]>; constructor(); searchLocal(items: AutocompleteWrapperItem[], query: string, filters: AutocompleteWrapperFilters, config: AutocompleteWrapperConfig): Observable<AutocompleteWrapperSearchResult>; filterItems(items: AutocompleteWrapperItem[], query: string, filters: AutocompleteWrapperFilters, config?: AutocompleteWrapperConfig): AutocompleteWrapperItem[]; searchAsync(items: AutocompleteWrapperItem[], query: string, filters: AutocompleteWrapperFilters, config?: AutocompleteWrapperConfig): Observable<AutocompleteWrapperItem[]>; private getSearchValue; addToHistory(item: AutocompleteWrapperItem, maxItems?: number): void; removeFromHistory(index: number): void; clearHistory(): void; getHistory(): AutocompleteWrapperItem[]; private loadHistoryFromStorage; private saveHistoryToStorage; paginateItems<T>(items: T[], page: number, itemsPerPage: number): T[]; getTotalPages(totalItems: number, itemsPerPage: number): number; isValidPage(page: number, totalPages: number): boolean; highlightText(text: string, query: string): string; getItemDisplayText(item: AutocompleteWrapperItem, displayField?: string): string; mergeConfig(userConfig: Partial<AutocompleteWrapperConfig>): AutocompleteWrapperConfig; createGenericSearchFunction(config: { search: (params: any) => Observable<any>; queryParam?: string; searchByParam?: string; pageParam?: string; pageSizeParam?: string; responseMapper?: (response: any) => AutocompleteWrapperSearchResult; }): AutocompleteWrapperSearchFunction; createMockData(): AutocompleteWrapperItem[]; searchProducts(query: string, filters?: Partial<AutocompleteWrapperFilters>): Observable<AutocompleteWrapperSearchResult>; createProductSearchConfig(): AutocompleteWrapperConfig; createCustomerSearchConfig(): AutocompleteWrapperConfig; static ɵfac: _angular_core.ɵɵFactoryDeclaration<AutocompleteWrapperService, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<AutocompleteWrapperService>; } /** * A wrapper component for Angular Material dialogs that provides a consistent look and feel, * including a draggable header and the ability to dynamically create components inside the dialog. * * This component is typically used with the AdvancedDialogService's openInWrapper method. * * @example * // In your service or component: * this.dialogService.openInWrapper({ * component: YourDialogContentComponent, * title: 'Dialog Title', * icon: 'info', * data: { message: 'This is some data passed to the dialog content component' } * }); */ declare class DialogWrapperComponent implements AfterViewInit { dialogRef: MatDialogRef<DialogWrapperComponent, any>; config: DialogWrapperConfig<any>; /** * A template reference that acts as an anchor for dynamic content. * This is where the component specified in the config will be rendered. */ contentHost: ViewContainerRef; /** * A reference to the header element for the z-index focus logic. * Used to bring the dialog to the front when clicked. */ header?: ElementRef; /** * Static counter to track the highest z-index for multiple dialogs. * Ensures that the most recently clicked dialog appears on top. */ private static lastZIndex; /** Inserted by Angular inject() migration for backwards compatibility */ constructor(...args: unknown[]); /** * Lifecycle hook that initializes the dynamic content after the view is ready. * Creates the component specified in the config and passes data to it. */ ngAfterViewInit(): void; /** * Closes the dialog. * Called when the close button in the header is clicked. */ onClose(): void; /** * Brings the dialog to the front by adjusting its z-index. * Called when the dialog header is clicked. */ bringToFront(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogWrapperComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<DialogWrapperComponent, "acp-dialog-wrapper", never, {}, {}, never, never, true, never>; } declare class IconUserComponent { size: _angular_core.InputSignal<string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconUserComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconUserComponent, "acp-icon-user", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class SvgIconComponent { id: _angular_core.InputSignal<string>; width: _angular_core.InputSignal<string>; height: _angular_core.InputSignal<string>; color: _angular_core.InputSignal<string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration<SvgIconComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<SvgIconComponent, "acp-svg-icon", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class MatInputChipComponent { chips: _angular_core.InputSignal<string[]>; labelText: _angular_core.InputSignal<string>; placelholder: _angular_core.InputSignal<string>; addOnBlur: boolean; readonly separatorKeysCodes: readonly [13, 188]; announcer: LiveAnnouncer; add(event: MatChipInputEvent): void; remove(value: string): void; edit(inputRaw: string, event: MatChipEditedEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatInputChipComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatInputChipComponent, "acp-mat-input-chip", never, { "chips": { "alias": "chips"; "required": true; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": true; "isSignal": true; }; "placelholder": { "alias": "placelholder"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } type ButtonVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'; type ButtonType = 'button' | 'submit' | 'reset'; type MaterialButtonStyle = 'basic' | 'raised' | 'flat' | 'stroked' | 'icon' | 'fab' | 'mini-fab'; declare class MatThemeButtonComponent { variant: _angular_core.InputSignal<ButtonVariant>; text: _angular_core.InputSignal<string>; icon: _angular_core.InputSignal<string>; outlined: _angular_core.InputSignal<boolean>; disabled: _angular_core.InputSignal<boolean>; useThemeColor: _angular_core.InputSignal<boolean>; type: _angular_core.InputSignal<ButtonType>; matStyle: _angular_core.InputSignal<MaterialButtonStyle>; title: _angular_core.InputSignal<string>; ariaLabel: _angular_core.InputSignal<string>; name: _angular_core.InputSignal<string>; id: _angular_core.InputSignal<string>; form: _angular_core.InputSignal<string>; tabIndex: _angular_core.InputSignal<number>; testId: _angular_core.InputSignal<string>; handleClick: _angular_core.OutputEmitterRef<unknown>; getButtonClasses(): Record<string, boolean>; getThemeColor(): ThemePalette | null; static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatThemeButtonComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatThemeButtonComponent, "acp-mat-theme-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "useThemeColor": { "alias": "useThemeColor"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "matStyle": { "alias": "matStyle"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; }, { "handleClick": "handleClick"; }, never, ["*", "svgIcon", "*", "*", "*", "*", "*", "*", "svgIcon", "*"], true, never>; } declare class SpinnerComponent { static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpinnerComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpinnerComponent, "acp-spinner", never, {}, {}, never, never, true, never>; } declare class SnackbarNotificationComponent { private readonly snackbarService; protected readonly customNotification: _angular_core.WritableSignal<NotificationDemo>; protected readonly quickMessages: { readonly success: "Data saved successfully"; readonly info: "Loading data..."; readonly warning: "You have unsaved changes"; readonly error: "Network error occurred"; }; protected showQuickNotification(type: SnackbarType): void; protected showCustomNotification(): void; protected isFormValid(): boolean; protected resetForm(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnackbarNotificationComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<SnackbarNotificationComponent, "acp-snackbar-notification", never, {}, {}, never, never, true, never>; } declare class CustomTabulatorComponent { static ɵfac: _angular_core.ɵɵFactoryDeclaration<CustomTabulatorComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<CustomTabulatorComponent, "lib-custom-tabulator", never, {}, {}, never, never, true, never>; } interface DateRangeConfig<T = any> { startDate: FieldDefinition<T>; endDate: FieldDefinition<T>; } declare type ControlType = 'textbox' | 'ktextbox' | 'combobox' | 'textboxNum' | 'dropdown' | 'dropdownlist' | 'multiselect' | 'autocomplete' | 'checkbox' | 'radiobutton' | 'inquiryInDialog' | 'timepicker' | 'datepicker' | 'daterange' | 'textarea' | 'slideToggle' | 'slider' | 'switch' | 'buttonToggleGroup'; declare type FieldType = 'number' | 'string' | 'boolean' | 'date' | 'month' | 'email' | 'password' | 'tel' | 'hidden' | 'image' | 'url' | 'week' | 'search' | 'reset' | 'template' | 'custom' | 'expand'; declare type ColumnType = 'text' | 'component' | 'html' | 'template'; declare class FieldDefinition<T = any> { value?: T; valueLabel?: string; defaultValue?: T; defaultValueLabel?: string; key: string; label: string; dateRangeConfig?: DateRangeConfig<T>; isDefaultSearchField?: boolean; required?: boolean; disabled?: boolean; order?: number; icon?: string; controlType?: ControlType; type?: FieldType; editor?: 'numeric' | 'boolean' | ''; options?: { label: string; value: T; }[]; valueOptions?: string[]; valuePrimitive?: boolean; textField?: string; valueField?: string; errorMessage?: string; width?: string; valueChangeCallback?: (value: T) => void; columnType?: ColumnType; body?: any; constructor(options?: Partial<FieldDefinition<T>>); } interface TableContext<T = any> { $implicit: T; index?: number; } declare class ColumnDefinition<T = any> extends FieldDefinition<T> { index?: number; format?: any; hasFooter?: boolean; hideInOverlay?: boolean; optionsAttribut?: string; templateOutlet?: TemplateRef<TableContext<T>>; constructor(options?: Partial<ColumnDefinition<T>>); } interface OptionSearchConfig<T> { displayedColumns?: string[]; displayColumnDefs?: ColumnDefinition[]; close?: boolean; } declare class TableCellIndex { row: number; column: number; constructor(row: number, column: number); } interface TableRow { colorRow?: string; [key: string]: any; } declare class Pagination { pageIndex: number; pageSize: number; maxSize: number; totalRecords: number; pageSizeOptions: number[]; /** * @param pageIndex Current page index (0-based for MatPagination compatibility) * @param pageSize Number of records per page * @param maxSize Maximum number of pages displayed in the pagination control * @param totalRecords Total number of records * @param pageSizeOptions Available page size options */ constructor(pageIndex?: number, // MatPagination starts at 0 pageSize?: number, maxSize?: number, totalRecords?: number, pageSizeOptions?: number[]); /** * Calculates the total number of pages. */ getTotalPages(): number; /** * Updates the page size and resets the page index to the first page. * @param newPageSize The new page size */ updatePageSize(newPageSize: number): void; /** * Updates pagination data based on paginator event. * @param event MatPaginator event */ updateFromPaginatorEvent(event: any): void; } declare class MatDynamicTableComponent<T extends TableRow> implements AfterContentInit, OnChanges, OnInit, OnDestroy { private componentRefs; private embeddedViews; private cdr; showExpand: boolean; showFooter: boolean; locale: string; highlightRowIndex: number; visibleColumns: string[]; columnDefinitions: ColumnDefinition<T>[]; showSelectBox: boolean; tableData: T[]; rowTemplate: TemplateRef<TableContext<T>> | null; expandedDetail: TemplateRef<TableContext<T>> | null; enablePagination: boolean; paginationConfig: Pagination | null; isLoadingData: boolean; rowSelected: EventEmitter<T[]>; copyRow: EventEmitter<T>; showExpanded: EventEmitter<T>; hideExpanded: EventEmitter<T>; pageEvent: EventEmitter<PageEvent>; isNormalRow: (_: number, row: T) => boolean; isExpandedRow: (_: number, row: T) => boolean; dataSource: MatTableDataSource<T, _angular_material_paginator.MatPaginator>; selection: SelectionModel<T>; expandedElement: T | null; columnsToDisplayWithExpand: string[]; headerRowDefs: QueryList<MatHeaderRowDef>; rowDefs: QueryList<MatRowDef<T>>; footerRowDefs: QueryList<MatFooterRowDef>; columnDefs: QueryList<MatColumnDef>; noDataRow: MatNoDataRow; table: MatTable<T>; rows: QueryList<ViewContainerRef>; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterContentInit(): void; ngOnDestroy(): void; private updateTableData; private updateColumnsToDisplay; private initializeSelection; private registerTableContent; private initializeTable; private cleanupDynamicComponents; isAllSelected(): boolean; masterToggle(): void; checkboxLabel(row?: T): string; selectRow(row: T): void; onExpand(event: Event, element: T): void; getRowColor(element: T): Record<string, string>; handlePageEvent(e: PageEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatDynamicTableComponent<any>, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatDynamicTableComponent<any>, "acp-mat-dynamic-table", never, { "showExpand": { "alias": "showExpand"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "highlightRowIndex": { "alias": "highlightRowIndex"; "required": false; }; "visibleColumns": { "alias": "visibleColumns"; "required": false; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; }; "showSelectBox": { "alias": "showSelectBox"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "expandedDetail": { "alias": "expandedDetail"; "required": false; }; "enablePagination": { "alias": "enablePagination"; "required": false; }; "paginationConfig": { "alias": "paginationConfig"; "required": false; }; "isLoadingData": { "alias": "isLoadingData"; "required": false; }; }, { "rowSelected": "rowSelected"; "copyRow": "copyRow"; "showExpanded": "showExpanded"; "hideExpanded": "hideExpanded"; "pageEvent": "pageEvent"; }, ["noDataRow", "headerRowDefs", "rowDefs", "footerRowDefs", "columnDefs", "rows"], never, true, never>; } declare class ThemeToggleComponent { private themeService; darkMode$: Observable<boolean>; /** Inserted by Angular inject() migration for backwards compatibility */ constructor(...args: unknown[]); toggleDarkMode(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeToggleComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThemeToggleComponent, "acp-theme-toggle", never, {}, {}, never, never, true, never>; } declare class ReusableAutocompleteComponent implements OnInit, OnDestroy { dataSource: AutocompleteWrapperItem[]; config: AutocompleteWrapperConfig; itemTemplate?: TemplateRef<any>; searchFunction?: AutocompleteWrapperSearchFunction; notFoundTemplate?: TemplateRef<any>; overlayWidth: _angular_core.InputSignal<string>; overlayMaxHeight: _angular_core.InputSignal<string>; itemSelected: _angular_core.OutputEmitterRef<AutocompleteWrapperItem>; searchChanged: _angular_core.OutputEmitterRef<string>; searchRequested: _angular_core.OutputEmitterRef<{ query: string; filters: AutocompleteWrapperFilters; page: number; }>; pageChanged: _angular_core.OutputEmitterRef<number>; filterChanged: _angular_core.OutputEmitterRef<AutocompleteWrapperFilters>; advancedSearchClicked: _angular_core.OutputEmitterRef<void>; allResultsClicked: _angular_core.OutputEmitterRef<string>; createClicked: _angular_core.OutputEmitterRef<string>; searchInput: ElementRef<HTMLInputElement>; historyListElement?: ElementRef<HTMLUListElement>; resultsListElement?: ElementRef<HTMLUListElement>; query: string; isLoading: _angular_core.WritableSignal<boolean>; overlayOpen: _angular_core.WritableSignal<boolean>; selectedIndex: _angular_core.WritableSignal<number>; currentPage: _angular_core.WritableSignal<number>; filteredItems: _angular_core.WritableSignal<AutocompleteWrapperItem[]>; historyList: _angular_core.WritableSignal<AutocompleteWrapperItem[]>; totalCount: _angular_core.WritableSignal<number>; filters: AutocompleteWrapperFilters; isHistoryVisible: _angular_core.Signal<boolean>; totalItems: _angular_core.Signal<number>; totalPages: _angular_core.Signal<number>; currentPageItems: _angular_core.Signal<AutocompleteWrapperItem[]>; startItem: _angular_core.Signal<number>; endItem: _angular_core.Signal<number>; sectionTitle: _angular_core.Signal<string>; isNoResults: _angular_core.Signal<boolean>; private destroy$; private searchSubject; private autocompleteService; ngOnInit(): void; ngOnDestroy(): void; private mergeDefaultConfig; private setupSearch; private performSearch; private loadHistory; private searchSubjectNext; onInput(event: Event): void; onKeyDown(event: KeyboardEvent): void; onFilterChange(): void; updateSearchResults(result: AutocompleteWrapperSearchResult): void; showOverlay(): void; hideOverlay(): void; isType(item: any): item is string; selectItem(item: AutocompleteWrapperItem): void; clearSearch(): void; removeHistoryItem(index: number, event: Event): void; clearHistory(): void; goToPage(event: Event): void; goToFirstPage(): void; goToPreviousPage(): void; goToNextPage(): void; goToLastPage(): void; onCreateNew($event: MouseEvent): void; onAdvancedSearch(): void; onShowAllResults(): void; getItemDisplayText(item: AutocompleteWrapperItem): string; noResultsText(): string; private scrollToSelected; getState(): AutocompleteWrapperState; setQuery(query: string): void; focus(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<ReusableAutocompleteComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<ReusableAutocompleteComponent, "acp-autocomplete-wrapper", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "config": { "alias": "config"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "searchFunction": { "alias": "searchFunction"; "required": false; }; "notFoundTemplate": { "alias": "notFoundTemplate"; "required": false; }; "overlayWidth": { "alias": "overlayWidth"; "required": false; "isSignal": true; }; "overlayMaxHeight": { "alias": "overlayMaxHeight"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; "searchChanged": "searchChanged"; "searchRequested": "searchRequested"; "pageChanged": "pageChanged"; "filterChanged": "filterChanged"; "advancedSearchClicked": "advancedSearchClicked"; "allResultsClicked": "allResultsClicked"; "createClicked": "createClicked"; }, never, never, true, never>; } declare class ToUpperCaseDirective implements ControlValueAccessor { private el; private renderer; onInput(): void; onChange: (_: any) => void; onTouched: () => void; writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToUpperCaseDirective, never>; static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToUpperCaseDirective, "[acpToUpperCase]", never, {}, {}, never, never, true, never>; } declare const DYNAMIC_INPUT: InjectionToken<unknown>; /** * Helper function to disable spinner for specific requests * @returns HttpContext with spinner disabled */ declare function withoutSpinner(): HttpContext; /** * Service to track active HTTP requests */ declare class ActiveRequestsTracker { get count(): number; add(request: HttpRequest<any>): void; remove(request: HttpRequest<any>): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<ActiveRequestsTracker, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration<ActiveRequestsTracker>; } /** * Interceptor that shows/hides a loading spinner based on active HTTP requests */ declare const spinnerInterceptor: HttpInterceptorFn; declare class GetTotalPipe implements PipeTransform { transform(colName: string, dataSource: any[]): any; /** * Calculate and return the total (sum) of all the column --> the column must be number */ getTotal(colName: string, dataSource: any[]): number; static ɵfac: _angular_core.ɵɵFactoryDeclaration<GetTotalPipe, never>; static ɵpipe: _angular_core.ɵɵPipeDeclaration<GetTotalPipe, "getTotal", true>; } type StatusGender = 'male' | 'female' | 'neutral'; interface StatusOptions { gender?: StatusGender; showIcon?: boolean; customActiveText?: string; customInactiveText?: string; textClass?: string; iconClass?: string; } declare class StatusDisplayPipe implements PipeTransform { private sanitizer; private transloco; transform(isActive: boolean, options?: StatusOptions): SafeHtml; private getStatusText; private getTranslationKey; private getFallbackText; static ɵfac: _angular_core.ɵɵFactoryDeclaration<StatusDisplayPipe, never>; static ɵpipe: _angular_core.ɵɵPipeDeclaration<StatusDisplayPipe, "statusDisplay", true>; } declare class CustomerAddEditComponent implements OnInit { private readonly dialogRef; btnText: _angular_core.WritableSignal<string>; readonly paramsOptions: { id: number; descripcion: null | string; dataOfSri?: boolean; numeroIdentificacion?: string; codigoSri?: string; data: any; }; readonly params: any; private tS; title: string; loading: boolean; emails: string[]; telephones: string[]; tiemposCredito: _angular_core.WritableSignal<any[]>; tipoContribuyentes: _angular_core.WritableSignal<any[]>; tiposCliente: _angular_core.WritableSignal<any[]>; tiposIdentificacion: _angular_core.WritableSignal<any[]>; formasPagoSri: _angular_core.WritableSignal<any[]>; placas: _angular_core.WritableSignal<any[]>; ciudades: _angular_core.WritableSignal<any[]>; cargos: _angular_core.WritableSignal<any[]>; empresas: _angular_core.WritableSignal<any[]>; employees: _angular_core.WritableSignal<any[]>; maritalStatuses: _angular_core.WritableSignal<any[]>; housingTypes: _angular_core.WritableSignal<any[]>; showRefresh: _angular_core.WritableSignal<boolean>; endsWith001Validator(control: AbstractControl): ValidationErrors | null; customerForm: FormGroup<{ direccion: FormControl<string | null>; idCargo: FormControl<number | null>; idCliente: FormControl<number | null>; idEmpresa: FormControl<number | null>; idFormaPagoSri: FormControl<number | null>; idTipoClienteProveedor: FormControl<number | null>; idTipoIdentificacion: FormControl<number | null>; idSubContribuyente: FormControl<number | null>; idTiempoCredito: FormControl<number | null>; idCiudad: FormControl<number | null>; idEmpleado: FormControl<number | null | undefined>; nombreFiscal: FormControl<string | null>; nombreComercial: FormControl<string | null>; numeroIdentificacion: FormControl<string | null>; correo: FormControl<string | null>; telefono: FormControl<string | null>; placa: FormControl<string | null>; nota: FormControl<string | null>; estado: FormControl<boolean | null>; birthDate: FormControl<Date | null>; validationSri: FormControl<boolean | null>; configValorBruto: FormControl<boolean | null>; dataInfoCred: FormGroup<{ maritalStatusId: FormControl<number | null>; conyugeNombre: FormControl<string | null>; conyugeTel: FormControl<string | null>; refFamNombre: FormControl<string | null>; refFamTel: FormControl<string | null>; housingTypeId: FormControl<number | null>; dirVivienda: FormControl<string | null>; refDomicilio: FormControl<string | null>; sector: FormControl<string | null>; barrio: FormControl<string | null>; calle: FormControl<string | null>; }>; }>; getCustomer(codigo: string, id: string): void; getLoadData(): Observable<any>; ngOnInit(): void; identificationTypeChange(event: MatSelectChange): void; updateFormControlNumeroIdentificacion(codigoSri: SRI_IDENTIFICATION_CODE.RUC | SRI_IDENTIFICATION_CODE.CEDULA): void; setIdentificationTypeChange(codigoSri: SRI_IDENTIFICATION_CODE.RUC | SRI_IDENTIFICATION_CODE.CEDULA): void; get numeroIdentificacionControl(): AbstractControl<string | null, string | null, any> | null; get birthDateCtrl(): AbstractControl<Date | null, Date | null, any> | null; onKeyDownGovernmentId($event?: Event): void; private isDataOfSri; private isCreate; isUpdate: () => boolean; onSave(): void; close(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<CustomerAddEditComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<CustomerAddEditComponent, "acp-customer-add-edit", never, {}, {}, never, never, true, never>; } declare class CustomerCardComponent { customer: _angular_core.InputSignal<CustomerListItemDto>; editCustomer: _angular_core.OutputEmitterRef<CustomerListItemDto>; deleteCustomer: _angular_core.OutputEmitterRef<CustomerListItemDto>; getLogoSliceBusinessName: _angular_core.Signal<string>; onEditClick(): void; onDeleteClick(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration<CustomerCardComponent, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration<CustomerCardComponent, "acp-customer-card", never, { "customer": { "alias": "customer"; "required": true; "isSignal": true; }; }, { "editCustomer": "editCustomer"; "deleteCustomer": "deleteCustomer"; }, never, never, true, never>; } export { AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG, AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG, AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG, AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG, AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG, AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG, ActiveRequestsTracker, AdvancedDialogService, AutocompleteWrapperService, ColumnDefinition, CustomTabulatorComponent, CustomerAddEditComponent, CustomerCardComponent, DEFAULT_SNACKBAR_CONFIG, DYNAMIC_INPUT, DialogWrapperComponent, FieldDefinition, GetTotalPipe, IconUserComponent, MatDynamicCardComponent, MatDynamicTableComponent, MatInputChipComponent, MatThemeButtonComponent, OverlayService, Pagination, ReusableAutocompleteComponent, SNACKBAR_CONFIG, SNACKBAR_DURATIONS, SNACKBAR_ICONS, SNACKBAR_MESSAGES, SnackbarNotificationComponent, SnackbarService, SpinnerComponent, StatusDisplayPipe, SvgIconComponent, TableCellIndex, ThemeService, ThemeToggleComponent, ToUpperCaseDirective, createAutocompleteWrapperConfig, spinnerInterceptor, withoutSpinner }; export type { AutocompleteWrapperActions, AutocompleteWrapperConfig, AutocompleteWrapperEventHandler, AutocompleteWrapperEvents, AutocompleteWrapperFilters, AutocompleteWrapperItem, AutocompleteWrapperItemProperty, AutocompleteWrapperPaginationInfo, AutocompleteWrapperSearchField, AutocompleteWrapperSearchFunction, AutocompleteWrapperSearchMode, AutocompleteWrapperSearchResult, AutocompleteWrapperState, AutocompleteWrapperStockOption, ButtonType, ButtonVariant, ColumnType, ControlType, DateRangeConfig, DialogSize, DialogWrapperConfig, FieldType, MatCustomDialogConfig, MaterialButtonStyle, NotificationCallProps, NotificationDemo, OptionSearchConfig, ReusableAutocompleteWrapperComponent, SnackbarConfig, SnackbarProps, SnackbarType, TableContext, TableRow };