@patter/ngx-components 19.0.4 → 20.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/fesm2022/patter-ngx-components.mjs +59 -60
  2. package/fesm2022/patter-ngx-components.mjs.map +1 -1
  3. package/index.d.ts +450 -3
  4. package/package.json +3 -3
  5. package/patter-ngx-components-20.0.5.tgz +0 -0
  6. package/lib/components/tabs/ptr-tab/ptr-tab.component.d.ts +0 -8
  7. package/lib/components/tabs/ptr-tabs/ptr-tabs.component.d.ts +0 -23
  8. package/lib/dialog/ptr-dialog/ptr-dialog.component.d.ts +0 -24
  9. package/lib/dialog/ptr-dialog.service.d.ts +0 -22
  10. package/lib/dialog/ptr-tooltip/ptr-tooltip.component.d.ts +0 -11
  11. package/lib/forms/form/form.component.d.ts +0 -26
  12. package/lib/forms/input/ptr-chip-input/ptr-chip-input.component.d.ts +0 -30
  13. package/lib/forms/input/ptr-input/ptr-input.component.d.ts +0 -39
  14. package/lib/forms/input/ptr-select/select.component.d.ts +0 -33
  15. package/lib/forms/interfaces.d.ts +0 -48
  16. package/lib/forms/shared/ptr-dialog-list/ptr-dialog-list.component.d.ts +0 -43
  17. package/lib/loading-spinner/loading-spinner.component.d.ts +0 -5
  18. package/lib/loading-spinner/loading-spinner.directive.d.ts +0 -20
  19. package/lib/menu/menu.component.d.ts +0 -11
  20. package/lib/ptr-breadcrumbs/interfaces.d.ts +0 -8
  21. package/lib/ptr-breadcrumbs/ptr-breadcrumbs.component.d.ts +0 -13
  22. package/lib/ptr-button/ptr-button.component.d.ts +0 -29
  23. package/lib/ptr-title/ptr-title.component.d.ts +0 -17
  24. package/lib/ptr-toaster/interfaces.d.ts +0 -5
  25. package/lib/ptr-toaster/ptr-toaster/ptr-toaster.component.d.ts +0 -7
  26. package/lib/ptr-toaster/ptr-toaster.service.d.ts +0 -18
  27. package/lib/services/loading.service.d.ts +0 -39
  28. package/patter-ngx-components-19.0.4.tgz +0 -0
  29. package/public-api.d.ts +0 -21
@@ -1,39 +0,0 @@
1
- import { ElementRef, OnInit } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import { PtrDialogListComponent } from '../../shared/ptr-dialog-list/ptr-dialog-list.component';
4
- import { Observable } from 'rxjs';
5
- import * as i0 from "@angular/core";
6
- export declare class PtrInputComponent implements ControlValueAccessor, OnInit {
7
- type: 'text' | 'number' | 'email' | 'password' | 'search' | 'hidden' | 'date' | 'textarea';
8
- label: string;
9
- placeholder?: string | null;
10
- autocomplete?: string | undefined;
11
- description?: string | undefined;
12
- dialogHelpText?: string | undefined;
13
- searchFn?: (term: string) => Observable<string[]>;
14
- labelPosition?: 'top' | 'inline';
15
- input: ElementRef<HTMLInputElement>;
16
- dialogList: PtrDialogListComponent;
17
- private componentId;
18
- private minChars;
19
- private searchTerms;
20
- private hasSelectedOption;
21
- inputId: string;
22
- inputValue: import("@angular/core").WritableSignal<string>;
23
- searchResultOptions: import("@angular/core").WritableSignal<string[]>;
24
- onChange: (value: string) => void;
25
- onTouched: () => void;
26
- onDocumentClick(event: MouseEvent): void;
27
- ngOnInit(): void;
28
- private setupSearch;
29
- onInputChange(value: string): void;
30
- onOptionSelected(optionValue: string | null): void;
31
- onFocus(): void;
32
- onBlur(): void;
33
- writeValue(value: string): void;
34
- registerOnChange(fn: (value: string) => void): void;
35
- registerOnTouched(fn: () => void): void;
36
- setDisabledState?(isDisabled: boolean): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrInputComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrInputComponent, "ptr-input", never, { "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "description": { "alias": "description"; "required": false; }; "dialogHelpText": { "alias": "dialogHelpText"; "required": false; }; "searchFn": { "alias": "searchFn"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; }, {}, never, never, true, never>;
39
- }
@@ -1,33 +0,0 @@
1
- import { ElementRef, EventEmitter } from '@angular/core';
2
- import { PtrOption, PtrOptionGroup } from '../../interfaces';
3
- import { PtrDialogListComponent } from '../../shared/ptr-dialog-list/ptr-dialog-list.component';
4
- import * as i0 from "@angular/core";
5
- export declare class PtrSelectComponent {
6
- options: (PtrOption | PtrOptionGroup | string)[] | undefined;
7
- showSearch: boolean;
8
- placeholder?: string | null;
9
- label?: string | undefined;
10
- description?: string | undefined;
11
- labelPosition?: 'top' | 'inline';
12
- selectionChange: EventEmitter<string | null>;
13
- selectButton: ElementRef<HTMLButtonElement>;
14
- dialogList: PtrDialogListComponent;
15
- value: import("@angular/core").WritableSignal<string | null>;
16
- displayValue: import("@angular/core").Signal<string | null>;
17
- effectivePlaceholder: import("@angular/core").Signal<string>;
18
- private componentId;
19
- labelId: string;
20
- inputId: string;
21
- onChange: (value: string | null) => void;
22
- onTouched: () => void;
23
- onDocumentClick(event: MouseEvent): void;
24
- toggleDialog(): void;
25
- onOptionSelected(optionValue: string | null): void;
26
- writeValue(value: string): void;
27
- registerOnChange(fn: (value: string | null) => void): void;
28
- registerOnTouched(fn: () => void): void;
29
- setDisabledState?(isDisabled: boolean): void;
30
- private flattenOptions;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrSelectComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrSelectComponent, "ptr-select", never, { "options": { "alias": "options"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
33
- }
@@ -1,48 +0,0 @@
1
- import { AsyncValidatorFn, ValidatorFn } from "@angular/forms";
2
- import { Observable } from "rxjs";
3
- export interface PtrConditionalRule {
4
- field: string;
5
- value: string | number | boolean;
6
- result: string;
7
- }
8
- export interface PtrConditionalConfig {
9
- showWhen?: PtrConditionalRule[];
10
- label?: PtrConditionalRule[];
11
- placeholder?: PtrConditionalRule[];
12
- }
13
- export interface PtrOption {
14
- label: string;
15
- value: string;
16
- }
17
- export interface PtrOptionGroup {
18
- groupLabel: string;
19
- options: PtrOption[];
20
- }
21
- export type OptionInputs = (string | PtrOption)[] | PtrOptionGroup[];
22
- export interface PtrFormField {
23
- type: 'text' | 'textarea' | 'number' | 'email' | 'password' | 'search' | 'select' | 'date' | 'hidden' | 'chips';
24
- name: string;
25
- label: string;
26
- description?: string;
27
- value?: unknown;
28
- size?: 'full' | 'half' | 'third' | 'one-sixth' | 'quarter' | 'three-quarters' | 'two-third';
29
- placeholder?: string;
30
- validators?: ValidatorFn[];
31
- autocomplete?: string;
32
- asyncValidators?: AsyncValidatorFn[];
33
- validationMessages?: Record<string, string>;
34
- options?: OptionInputs;
35
- dialogHelpText?: string;
36
- searchFn?: (term: string) => Observable<string[]>;
37
- maxItems?: number;
38
- conditional?: PtrConditionalConfig;
39
- }
40
- export interface PtrFormConfig {
41
- title?: string;
42
- fields: PtrFormField[];
43
- formClass?: string;
44
- formValidators?: ValidatorFn[];
45
- submitText?: string;
46
- submitFullWidth?: boolean;
47
- labelPosition?: 'top' | 'inline';
48
- }
@@ -1,43 +0,0 @@
1
- import { ElementRef, EventEmitter } from '@angular/core';
2
- import { PtrOption, PtrOptionGroup } from '../../interfaces';
3
- import * as i0 from "@angular/core";
4
- interface ProcessedOption {
5
- type: 'option' | 'group';
6
- label: string;
7
- value?: string;
8
- options?: ProcessedOption[];
9
- }
10
- export declare class PtrDialogListComponent {
11
- set options(value: (PtrOption | PtrOptionGroup | string)[] | undefined);
12
- showSearch: boolean;
13
- searchPlaceholder: string;
14
- dialogTitle?: string | undefined;
15
- selectionChange: EventEmitter<string | null>;
16
- dialogClosed: EventEmitter<void>;
17
- searchTermChanged: EventEmitter<string>;
18
- dialog: ElementRef<HTMLDialogElement>;
19
- private _options;
20
- value: import("@angular/core").WritableSignal<string | null>;
21
- searchTerm: import("@angular/core").WritableSignal<string>;
22
- highlightedIndex: import("@angular/core").WritableSignal<number>;
23
- isOpen: import("@angular/core").WritableSignal<boolean>;
24
- private componentId;
25
- listId: string;
26
- filteredOptions: import("@angular/core").Signal<ProcessedOption[]>;
27
- openDialog(): void;
28
- openDialogSilent(): void;
29
- closeDialog(): void;
30
- updateSearchTerm(term: string): void;
31
- onDialogKeyDown(event: KeyboardEvent): void;
32
- onInputKeyDown(event: KeyboardEvent): void;
33
- onOptionKeyDown(event: KeyboardEvent, optionValue: string): void;
34
- focusOption(): void;
35
- selectOption(optionValue: string): void;
36
- private getTotalOptionsCount;
37
- private processOptions;
38
- adjustDialogPosition(): void;
39
- resetDialogPosition(): void;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrDialogListComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrDialogListComponent, "ptr-dialog-list", never, { "options": { "alias": "options"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "dialogTitle": { "alias": "dialogTitle"; "required": false; }; }, { "selectionChange": "selectionChange"; "dialogClosed": "dialogClosed"; "searchTermChanged": "searchTermChanged"; }, never, never, true, never>;
42
- }
43
- export {};
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class PtrLoadingSpinnerComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrLoadingSpinnerComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrLoadingSpinnerComponent, "ptr-loading-spinner", never, {}, {}, never, never, true, never>;
5
- }
@@ -1,20 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class PtrLoadingSpinnerDirective implements OnDestroy {
4
- private targetEl;
5
- private viewContainerRef;
6
- private renderer;
7
- private spinnerInstance?;
8
- private overlay?;
9
- hostPosition: string;
10
- set ptrLoadingSpinner(loading: boolean);
11
- ngOnDestroy(): void;
12
- private addProgressSpinnerComponent;
13
- private removeProgressSpinnerComponent;
14
- private addOverlay;
15
- private removeOverlay;
16
- private addBlurEffect;
17
- private removeBlurEffect;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrLoadingSpinnerDirective, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<PtrLoadingSpinnerDirective, "[ptrLoadingSpinner]", never, { "ptrLoadingSpinner": { "alias": "ptrLoadingSpinner"; "required": true; }; }, {}, never, never, true, never>;
20
- }
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export interface PtrMenuItem {
3
- label: string;
4
- link?: string;
5
- children?: PtrMenuItem[];
6
- }
7
- export declare class PtrMenuComponent {
8
- menuItems: PtrMenuItem[];
9
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrMenuComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrMenuComponent, "ptr-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; }, {}, never, never, true, never>;
11
- }
@@ -1,8 +0,0 @@
1
- export interface PtrBreadcrumb {
2
- label?: string;
3
- url?: string;
4
- }
5
- export interface BreadcrumbRouteInfo {
6
- label?: string;
7
- url?: string;
8
- }
@@ -1,13 +0,0 @@
1
- import { PtrBreadcrumb } from './interfaces';
2
- import * as i0 from "@angular/core";
3
- export declare class PtrBreadcrumbsComponent {
4
- showFirstSeparator: boolean;
5
- private router;
6
- private activatedRoute;
7
- private routeEvents;
8
- breadcrumbs: import("@angular/core").Signal<PtrBreadcrumb[]>;
9
- private createBreadcrumbs;
10
- private getLabelForRoute;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrBreadcrumbsComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrBreadcrumbsComponent, "ptr-breadcrumbs", never, { "showFirstSeparator": { "alias": "showFirstSeparator"; "required": false; }; }, {}, never, never, true, never>;
13
- }
@@ -1,29 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- type ButtonStyle = 'normal' | 'error' | 'secondary' | 'icon';
4
- export declare class PtrButtonComponent {
5
- get hostClasses(): string;
6
- style: import("@angular/core").WritableSignal<ButtonStyle>;
7
- type: import("@angular/core").WritableSignal<"button" | "submit" | "reset">;
8
- disabled: import("@angular/core").WritableSignal<boolean>;
9
- href: import("@angular/core").WritableSignal<string | null>;
10
- routerLink: import("@angular/core").WritableSignal<string | (string | number)[] | null>;
11
- additionalClasses: import("@angular/core").WritableSignal<string>;
12
- smallSize: import("@angular/core").WritableSignal<boolean>;
13
- set buttonStyle(value: ButtonStyle);
14
- set buttonType(value: 'button' | 'submit' | 'reset');
15
- set isDisabled(value: boolean);
16
- set hrefLink(value: string | null);
17
- set routerLinkValue(value: string | (string | number)[] | null);
18
- set extraClasses(value: string);
19
- set isSmallSize(value: boolean);
20
- set isIconButton(value: boolean);
21
- ariaLabel?: string | undefined;
22
- clicked: EventEmitter<Event>;
23
- isLink: import("@angular/core").Signal<boolean>;
24
- buttonClasses: import("@angular/core").Signal<string>;
25
- onClick(event: Event): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrButtonComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrButtonComponent, "ptr-button", never, { "buttonStyle": { "alias": "buttonStyle"; "required": false; }; "buttonType": { "alias": "buttonType"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "hrefLink": { "alias": "hrefLink"; "required": false; }; "routerLinkValue": { "alias": "routerLinkValue"; "required": false; }; "extraClasses": { "alias": "extraClasses"; "required": false; }; "isSmallSize": { "alias": "isSmallSize"; "required": false; }; "isIconButton": { "alias": "isIconButton"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
28
- }
29
- export {};
@@ -1,17 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare class PtrTitleComponent implements OnInit {
5
- styleClass: string;
6
- wrapperStyleClass: string;
7
- screenReaderOnly: boolean;
8
- private router;
9
- private activatedRoute;
10
- private titleStrategy;
11
- displayTitle$: Observable<string>;
12
- hideTitle$: Observable<boolean>;
13
- ngOnInit(): void;
14
- private getRoute;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrTitleComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrTitleComponent, "ptr-title", never, { "styleClass": { "alias": "styleClass"; "required": false; }; "wrapperStyleClass": { "alias": "wrapperStyleClass"; "required": false; }; "screenReaderOnly": { "alias": "screenReaderOnly"; "required": false; }; }, {}, never, never, true, never>;
17
- }
@@ -1,5 +0,0 @@
1
- export interface PtrToast {
2
- id: number;
3
- message: string;
4
- type: 'success' | 'error' | 'info' | 'warning';
5
- }
@@ -1,7 +0,0 @@
1
- import { PtrToasterService } from '../ptr-toaster.service';
2
- import * as i0 from "@angular/core";
3
- export declare class PtrToasterComponent {
4
- protected toasterService: PtrToasterService;
5
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrToasterComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<PtrToasterComponent, "ptr-toaster", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,18 +0,0 @@
1
- import { PtrToast } from './interfaces';
2
- import * as i0 from "@angular/core";
3
- export declare class PtrToasterService {
4
- private destroyRef;
5
- private injector;
6
- private environmentInjector;
7
- private appRef;
8
- private toasts;
9
- private counter;
10
- private toasterComponentRef;
11
- constructor();
12
- private injectToasterComponent;
13
- getToasts(): import("@angular/core").Signal<PtrToast[]>;
14
- show(message: string, type?: PtrToast['type']): void;
15
- remove(id: number): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrToasterService, never>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<PtrToasterService>;
18
- }
@@ -1,39 +0,0 @@
1
- import { Signal } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Optimized Async Loading Service using Angular Signals
5
- * Supports global loading state and named loading areas with auto-cleanup
6
- *
7
- * To use as a non-singleton service, add to providers array in @Component decorator:
8
- * @Component({
9
- * selector: 'app-example',
10
- * templateUrl: './example.component.html',
11
- * providers: [PtrLoadingService]
12
- * })
13
- *
14
- * Usage:
15
- * Set loading: this.loadingService.setLoading(true)
16
- * - Set loading: this.loadingService.setLoading(true, 'areaName')
17
- *
18
- * - Get loading (template): {{ loadingService.isLoading()() }}
19
- * - Get loading (template): {{ loadingService.isLoading('areaName')() }}
20
- *
21
- * - Get loading (component): this.loadingService.isLoading()()
22
- * - Get loading (component): this.loadingService.isLoading('areaName')()
23
- *
24
- * - Check if any loading: {{ loadingService.isAnyLoading()() }}
25
- *
26
- * - React to loading changes: effect(() => console.log('Loading:', this.loadingService.isLoading('areaName')()))
27
- */
28
- export declare class PtrLoadingService {
29
- private globalTaskCount;
30
- private loadingAreas;
31
- isLoading(area?: string): Signal<boolean>;
32
- isAnyLoading(): Signal<boolean>;
33
- setLoading(value: boolean, area?: string): void;
34
- resetLoading(area?: string): void;
35
- private updateNamedAreaLoading;
36
- private updateTaskCount;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<PtrLoadingService, never>;
38
- static ɵprov: i0.ɵɵInjectableDeclaration<PtrLoadingService>;
39
- }
Binary file
package/public-api.d.ts DELETED
@@ -1,21 +0,0 @@
1
- export * from './lib/menu/menu.component';
2
- export * from './lib/forms/interfaces';
3
- export { PtrFormComponent } from './lib/forms/form/form.component';
4
- export { PtrSelectComponent } from './lib/forms/input/ptr-select/select.component';
5
- export { PtrInputComponent } from './lib/forms/input/ptr-input/ptr-input.component';
6
- export { PtrChipInputComponent } from './lib/forms/input/ptr-chip-input/ptr-chip-input.component';
7
- export { PtrTitleComponent } from './lib/ptr-title/ptr-title.component';
8
- export { PtrLoadingSpinnerComponent } from './lib/loading-spinner/loading-spinner.component';
9
- export { PtrLoadingSpinnerDirective } from './lib/loading-spinner/loading-spinner.directive';
10
- export { PtrLoadingService } from './lib/services/loading.service';
11
- export { PtrButtonComponent } from './lib/ptr-button/ptr-button.component';
12
- export { PtrDialogService } from './lib/dialog/ptr-dialog.service';
13
- export { PtrDialogComponent } from './lib/dialog/ptr-dialog/ptr-dialog.component';
14
- export { PtrTooltipComponent } from './lib/dialog/ptr-tooltip/ptr-tooltip.component';
15
- export { PtrBreadcrumbsComponent } from './lib/ptr-breadcrumbs/ptr-breadcrumbs.component';
16
- export { PtrBreadcrumb } from './lib/ptr-breadcrumbs/interfaces';
17
- export { PtrTabsComponent } from './lib/components/tabs/ptr-tabs/ptr-tabs.component';
18
- export { PtrTabComponent } from './lib/components/tabs/ptr-tab/ptr-tab.component';
19
- export { PtrToasterService } from './lib/ptr-toaster/ptr-toaster.service';
20
- export { PtrToasterComponent } from './lib/ptr-toaster/ptr-toaster/ptr-toaster.component';
21
- export { PtrToast } from './lib/ptr-toaster/interfaces';