import * as _angular_core from '@angular/core'; import { EnvironmentProviders } from '@angular/core'; import { TbxReturnUrl, TbxUrlService, TbxUrlModel } from '@lacera/ngx-toolbox/http'; import { Observable } from 'rxjs'; import { Router, TitleStrategy, RouterStateSnapshot, Routes, RouterFeatures, ActivatedRouteSnapshot, RedirectCommand } from '@angular/router'; import { Title } from '@angular/platform-browser'; /** * Displays the standard dropdown actions usually in a table row for an item. */ declare class TbxActionLinksComponent { readonly showCreate: _angular_core.InputSignal; readonly createUrl: _angular_core.InputSignal; readonly createText: _angular_core.InputSignal; readonly createIcon: _angular_core.InputSignal; readonly createClass: _angular_core.InputSignal; readonly createPlaceholder: _angular_core.InputSignal; readonly create: _angular_core.OutputEmitterRef; readonly showRefresh: _angular_core.InputSignal; readonly refreshUrl: _angular_core.InputSignal; readonly refreshText: _angular_core.InputSignal; readonly refreshIcon: _angular_core.InputSignal; readonly refreshClass: _angular_core.InputSignal; readonly refreshPlaceholder: _angular_core.InputSignal; readonly refresh: _angular_core.OutputEmitterRef; /** The return URL usually used for the action routes. */ returnUrl: _angular_core.InputSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Displays the standard action buttons in a table row for an item. */ declare class TbxRowActionLinksComponent { readonly showEdit: _angular_core.InputSignal; readonly showDelete: _angular_core.InputSignal; readonly showUndo: _angular_core.InputSignal; readonly detailsUrl: _angular_core.InputSignal; readonly editUrl: _angular_core.InputSignal; readonly deleteUrl: _angular_core.InputSignal; readonly auditUrl: _angular_core.InputSignal; readonly returnUrl: _angular_core.InputSignal; /** The class to apply to the buttons (defaults to 'btn btn-sm btn-light'). */ readonly buttonClass: _angular_core.InputSignal; readonly deleteIcon: _angular_core.InputSignal; readonly editClick: _angular_core.OutputEmitterRef; readonly undoClick: _angular_core.OutputEmitterRef; readonly deleteClick: _angular_core.OutputEmitterRef; protected showEditUrl: _angular_core.Signal; protected showEditButton: _angular_core.Signal; protected showDeleteButton: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Displays the standard dropdown actions usually in a table row for an item. */ declare class TbxRowActionsMenuComponent { detailsUrl: _angular_core.InputSignal; editUrl: _angular_core.InputSignal; deleteUrl: _angular_core.InputSignal; auditUrl: _angular_core.InputSignal; detailsIcon: _angular_core.InputSignal; detailsText: _angular_core.InputSignal; editIcon: _angular_core.InputSignal; editText: _angular_core.InputSignal; deleteIcon: _angular_core.InputSignal; deleteText: _angular_core.InputSignal; auditIcon: _angular_core.InputSignal; auditText: _angular_core.InputSignal; /** The return URL usually used for the Audit Trail route. */ returnUrl: _angular_core.InputSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class TbxFormButtonsComponent { /** The type of button Save is (defaults to 'submit'). */ saveButtonType: _angular_core.InputSignal; /** The text to display in the save button (defaults to 'Save'). */ saveText: _angular_core.InputSignal; cancelText: _angular_core.InputSignal; saveUrl: _angular_core.InputSignal; saveIconClass: _angular_core.InputSignal; saveButtonClass: _angular_core.InputSignal; cancelUrl: _angular_core.InputSignal; cancelIconClass: _angular_core.InputSignal; cancelButtonClass: _angular_core.InputSignal; showCancelButton: _angular_core.InputSignal; /** Indicates to disable the controls. */ disabled: _angular_core.InputSignal; saveClick: _angular_core.OutputEmitterRef; cancelClick: _angular_core.OutputEmitterRef; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class TbxDetailsLinksComponent { readonly deleteMode: _angular_core.InputSignal; readonly createUrl: _angular_core.InputSignal; readonly editUrl: _angular_core.InputSignal; readonly deleteUrl: _angular_core.InputSignal; readonly auditUrl: _angular_core.InputSignal; readonly returnUrl: _angular_core.InputSignal; readonly createClass: _angular_core.InputSignal; readonly editClass: _angular_core.InputSignal; readonly deleteClass: _angular_core.InputSignal; readonly auditClass: _angular_core.InputSignal; readonly returnClass: _angular_core.InputSignal; readonly createIcon: _angular_core.InputSignal; readonly editIcon: _angular_core.InputSignal; readonly deleteIcon: _angular_core.InputSignal; readonly auditIcon: _angular_core.InputSignal; readonly returnIcon: _angular_core.InputSignal; readonly deleteClick: _angular_core.OutputEmitterRef; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Provides basic navigation routes. It also exposes the helper class */ declare class TbxRoutesService { readonly router: Router; baseUrl?: string | null | undefined; urlService?: TbxUrlService | null | undefined; /** Gets a list of all available server endpoints. */ get urls(): TbxUrlModel[]; /** Gets the current URL in the router. */ get currentUrl(): string; /** Gets the home URL. */ get homeUrl(): string; /** Gets the home absolute URL. */ get homeAbsoluteUrl(): string; /** * Creates the URL string to navigate to the list of audit trail entries. * @param source The audit trail source for which to display entries. * @param sourceId The audit trail source ID for which to display entries. * @param returnUrl An optional URL to return to. * @returns The audit trail list route string. */ auditUrl(source: string, sourceId: number, returnUrl?: string | TbxReturnUrl): string; /** * Converts the given URL to its string representation (ru=?&pru=?). * @param url string | TbxReturnUrl The given url to convert. * @returns The string representation of the given URL, or an empty string. */ toReturnUrl(url?: string | TbxReturnUrl): string; /** * Creates the return URL for {@link queryParams} links. * @param returnUrl An optional URL to return to (defaults to current URL). * @returns The return URL. */ returnUrl(returnUrl?: string): TbxReturnUrl; /** * Navigates to the home route. * @returns A promise that resolves to true when the navigation succeeds, * false when it fails, or is rejected when an error happens. */ goHome(): Promise; /** * Navigates to the home absolute route. * @returns A promise that resolves to true when the navigation succeeds, * false when it fails, or is rejected when an error happens. */ goHomeAbsolute(): Promise; /** * Navigates to the unauthorized path. * @returns The promise from the router navigation. */ goToUnauthorized(): Promise; /** * Navigates to the Audit Trail list route. * @param source The source for which to retrieve audit trail. * @param sourceId The ID of the source for which to retrieve audit trail. * @param returnUrl The return URL, if any. * @returns The promise from the router navigation. */ goToAudit(source: string, sourceId: number, returnUrl?: string): Promise; /** * Gets the links URL which will forward to the correct URL for the specified ID. * @param [linkId] - The link ID to find and forward to. * @returns The forward link URL. */ forwardLinks(linkId: number): string; /** * Gets the link URL to the feedback website with proper query strings. * @param userName The current user name or full name. * @param appName The application name to send feedback for. * @param options The options for the feedback. * @returns The feedback link URL. */ feedback(userName: string, appName: string, options: { /** The subject of the feedback. */ subject?: string; /** The system the feedback is about. */ system?: string; /** The URL to return the user to. */ returnUrl?: string; }): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Provides base functionality for route resolver services. */ declare class TbxBaseResolver { readonly routes: TbxRoutesService; /** Gets or sets the message service to call on error if provided. */ messageService: any | undefined; constructor(routes: TbxRoutesService); /** * Pipes into the given stream to catch an error and navigate. * @param stream The stream to pipe into. * @param url The URL for error handling to navigate to. */ pipeError(stream: Observable, url: string): Observable; static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; static ɵprov: _angular_core.ɵɵInjectableDeclaration>; } declare class TbxPageTitleStrategy extends TitleStrategy { #private; updateTitle(snapshot: RouterStateSnapshot): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Defines routes for error, unauthorized, and not found (**). It displays * a generic component showing the error details. */ declare const TBX_ERROR_ROUTES: Routes; /** * Provides a Browser title strategy using {@link TbxPageTitleStrategy}, which * appends the page title to the application name (e.g., 'Tagger - Agents') * * @returns The page title strategy. */ declare const tbxProvideTitleStrategy: () => { provide: typeof TitleStrategy; useClass: typeof TbxPageTitleStrategy; }; /** * Provides the {@link Router} with the given {@link Routes}, and it defaults to * the {@link PreloadAllModules} preloading strategy. * * @param routes The routes to provide. * @param features The additional features. * @returns The route provider. */ declare const tbxProvideAppRoutes: (routes: Routes, ...features: RouterFeatures[]) => EnvironmentProviders; /** * Gets the ID parameter from the given route. * @throws Error The ID parameter was not found. * @param route The route from which to get the ID parameter. * @returns The ID parameter value. */ declare const getParamId: (route: ActivatedRouteSnapshot) => number; /** * Handles errors that may be encountered in resolvers, which need to be handled * a little different from general errors like navigating to unauthorized. * @param stream The resolver observable. * @param url The optional URL to navigate on error. * @returns An observable of type {@link RedirectCommand}. */ declare const pipeError: (stream: Observable, url: string) => Observable; /** The root route paths for the application. */ declare const TBX_ROOT_PATHS: { home: string; audit: string; error: string; unauth: string; notFound: string; }; /** Defaults paths that most standard routes have. */ declare const TBX_CHILD_PATHS: { index: string; details: string; create: string; edit: string; delete: string; }; /** Default data names passed in the router's route. */ declare const TBX_DATA_NAMES: { action: string; metadata: string; pageTitle: string; index: string; details: string; create: string; edit: string; delete: string; id: string; }; /** Global constants to be used in query parameters. */ declare const TBX_ROOT_PARAMS: { id: string; returnUrl: string; parentUrl: string; }; /** * Updates the Browser page title with the current route title. */ declare class TbxPageTitleService { private readonly router; private readonly titleService; /** The ToolBox spinner service. */ spinnerService: any | undefined; /** The application name. */ applicationName: string; /** * Initializes a new instance of the {@link TbxPageTitleService} class. * @param router The Angular router service. * @param titleService The Browser window title service. */ constructor(router: Router, titleService: Title); /** * Subscribes to the {@link Router} events to update the Browser page title * when the route changes while showing a spinner if the service is provided. * @param applicationName The name of the application to show in the page. * @param spinnerService The ToolBox spinner service to show a spinner when the * user navigates to a new route. */ updatePageTitle(applicationName: string, spinnerService?: any): void; /** * Updates the page title based on the data found in each of the routes. * @param event The Router event that was triggered. * @param activatedRoute The route that was activated. */ private setPageTitle; /** * Shows or hides the spinner when a navigation router event occurs. * @param event The Router event that was triggered. */ private navigationSpinner; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } export { TBX_CHILD_PATHS, TBX_DATA_NAMES, TBX_ERROR_ROUTES, TBX_ROOT_PARAMS, TBX_ROOT_PATHS, TbxActionLinksComponent, TbxBaseResolver, TbxDetailsLinksComponent, TbxFormButtonsComponent, TbxPageTitleService, TbxPageTitleStrategy, TbxRoutesService, TbxRowActionLinksComponent, TbxRowActionsMenuComponent, getParamId, pipeError, tbxProvideAppRoutes, tbxProvideTitleStrategy };