@patter/ngx-components 19.0.4 → 20.0.4
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.
- package/fesm2022/patter-ngx-components.mjs +58 -59
- package/fesm2022/patter-ngx-components.mjs.map +1 -1
- package/index.d.ts +450 -3
- package/package.json +3 -3
- package/patter-ngx-components-20.0.4.tgz +0 -0
- package/lib/components/tabs/ptr-tab/ptr-tab.component.d.ts +0 -8
- package/lib/components/tabs/ptr-tabs/ptr-tabs.component.d.ts +0 -23
- package/lib/dialog/ptr-dialog/ptr-dialog.component.d.ts +0 -24
- package/lib/dialog/ptr-dialog.service.d.ts +0 -22
- package/lib/dialog/ptr-tooltip/ptr-tooltip.component.d.ts +0 -11
- package/lib/forms/form/form.component.d.ts +0 -26
- package/lib/forms/input/ptr-chip-input/ptr-chip-input.component.d.ts +0 -30
- package/lib/forms/input/ptr-input/ptr-input.component.d.ts +0 -39
- package/lib/forms/input/ptr-select/select.component.d.ts +0 -33
- package/lib/forms/interfaces.d.ts +0 -48
- package/lib/forms/shared/ptr-dialog-list/ptr-dialog-list.component.d.ts +0 -43
- package/lib/loading-spinner/loading-spinner.component.d.ts +0 -5
- package/lib/loading-spinner/loading-spinner.directive.d.ts +0 -20
- package/lib/menu/menu.component.d.ts +0 -11
- package/lib/ptr-breadcrumbs/interfaces.d.ts +0 -8
- package/lib/ptr-breadcrumbs/ptr-breadcrumbs.component.d.ts +0 -13
- package/lib/ptr-button/ptr-button.component.d.ts +0 -29
- package/lib/ptr-title/ptr-title.component.d.ts +0 -17
- package/lib/ptr-toaster/interfaces.d.ts +0 -5
- package/lib/ptr-toaster/ptr-toaster/ptr-toaster.component.d.ts +0 -7
- package/lib/ptr-toaster/ptr-toaster.service.d.ts +0 -18
- package/lib/services/loading.service.d.ts +0 -39
- package/patter-ngx-components-19.0.4.tgz +0 -0
- package/public-api.d.ts +0 -21
package/index.d.ts
CHANGED
|
@@ -1,5 +1,452 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, EventEmitter, ElementRef, OnDestroy, Signal, AfterViewInit, TemplateRef, ApplicationRef, EnvironmentInjector, QueryList } from '@angular/core';
|
|
3
|
+
import { ValidatorFn, AsyncValidatorFn, FormGroup, ControlValueAccessor, FormControl } from '@angular/forms';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
interface PtrMenuItem {
|
|
7
|
+
label: string;
|
|
8
|
+
link?: string;
|
|
9
|
+
children?: PtrMenuItem[];
|
|
10
|
+
}
|
|
11
|
+
declare class PtrMenuComponent {
|
|
12
|
+
menuItems: PtrMenuItem[];
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrMenuComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrMenuComponent, "ptr-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface PtrConditionalRule {
|
|
18
|
+
field: string;
|
|
19
|
+
value: string | number | boolean;
|
|
20
|
+
result: string;
|
|
21
|
+
}
|
|
22
|
+
interface PtrConditionalConfig {
|
|
23
|
+
showWhen?: PtrConditionalRule[];
|
|
24
|
+
label?: PtrConditionalRule[];
|
|
25
|
+
placeholder?: PtrConditionalRule[];
|
|
26
|
+
}
|
|
27
|
+
interface PtrOption {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}
|
|
31
|
+
interface PtrOptionGroup {
|
|
32
|
+
groupLabel: string;
|
|
33
|
+
options: PtrOption[];
|
|
34
|
+
}
|
|
35
|
+
type OptionInputs = (string | PtrOption)[] | PtrOptionGroup[];
|
|
36
|
+
interface PtrFormField {
|
|
37
|
+
type: 'text' | 'textarea' | 'number' | 'email' | 'password' | 'search' | 'select' | 'date' | 'hidden' | 'chips';
|
|
38
|
+
name: string;
|
|
39
|
+
label: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
value?: unknown;
|
|
42
|
+
size?: 'full' | 'half' | 'third' | 'one-sixth' | 'quarter' | 'three-quarters' | 'two-third';
|
|
43
|
+
placeholder?: string;
|
|
44
|
+
validators?: ValidatorFn[];
|
|
45
|
+
autocomplete?: string;
|
|
46
|
+
asyncValidators?: AsyncValidatorFn[];
|
|
47
|
+
validationMessages?: Record<string, string>;
|
|
48
|
+
options?: OptionInputs;
|
|
49
|
+
dialogHelpText?: string;
|
|
50
|
+
searchFn?: (term: string) => Observable<string[]>;
|
|
51
|
+
maxItems?: number;
|
|
52
|
+
conditional?: PtrConditionalConfig;
|
|
53
|
+
}
|
|
54
|
+
interface PtrFormConfig {
|
|
55
|
+
title?: string;
|
|
56
|
+
fields: PtrFormField[];
|
|
57
|
+
formClass?: string;
|
|
58
|
+
formValidators?: ValidatorFn[];
|
|
59
|
+
submitText?: string;
|
|
60
|
+
submitFullWidth?: boolean;
|
|
61
|
+
labelPosition?: 'top' | 'inline';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare class PtrFormComponent implements OnInit {
|
|
65
|
+
config: PtrFormConfig;
|
|
66
|
+
loading: boolean;
|
|
67
|
+
error: string | null;
|
|
68
|
+
formSubmit: EventEmitter<any>;
|
|
69
|
+
formGroupCreated: EventEmitter<FormGroup<any>>;
|
|
70
|
+
formGroup: FormGroup;
|
|
71
|
+
private fb;
|
|
72
|
+
private cdr;
|
|
73
|
+
private destroyRef;
|
|
74
|
+
ngOnInit(): void;
|
|
75
|
+
buildForm(): void;
|
|
76
|
+
onSubmit(): void;
|
|
77
|
+
resetForm(): void;
|
|
78
|
+
setupConditionalLogic(): void;
|
|
79
|
+
isFieldVisible(field: PtrFormField): boolean;
|
|
80
|
+
getFieldLabel(field: PtrFormField): string;
|
|
81
|
+
getFieldPlaceholder(field: PtrFormField): string;
|
|
82
|
+
private evaluateConditionalRules;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrFormComponent, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrFormComponent, "ptr-form", never, { "config": { "alias": "config"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "error": { "alias": "error"; "required": false; }; }, { "formSubmit": "formSubmit"; "formGroupCreated": "formGroupCreated"; }, never, never, true, never>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface ProcessedOption {
|
|
88
|
+
type: 'option' | 'group';
|
|
89
|
+
label: string;
|
|
90
|
+
value?: string;
|
|
91
|
+
options?: ProcessedOption[];
|
|
92
|
+
}
|
|
93
|
+
declare class PtrDialogListComponent {
|
|
94
|
+
set options(value: (PtrOption | PtrOptionGroup | string)[] | undefined);
|
|
95
|
+
showSearch: boolean;
|
|
96
|
+
searchPlaceholder: string;
|
|
97
|
+
dialogTitle?: string | undefined;
|
|
98
|
+
selectionChange: EventEmitter<string | null>;
|
|
99
|
+
dialogClosed: EventEmitter<void>;
|
|
100
|
+
searchTermChanged: EventEmitter<string>;
|
|
101
|
+
dialog: ElementRef<HTMLDialogElement>;
|
|
102
|
+
private _options;
|
|
103
|
+
value: i0.WritableSignal<string | null>;
|
|
104
|
+
searchTerm: i0.WritableSignal<string>;
|
|
105
|
+
highlightedIndex: i0.WritableSignal<number>;
|
|
106
|
+
isOpen: i0.WritableSignal<boolean>;
|
|
107
|
+
private componentId;
|
|
108
|
+
listId: string;
|
|
109
|
+
filteredOptions: i0.Signal<ProcessedOption[]>;
|
|
110
|
+
openDialog(): void;
|
|
111
|
+
openDialogSilent(): void;
|
|
112
|
+
closeDialog(): void;
|
|
113
|
+
updateSearchTerm(term: string): void;
|
|
114
|
+
onDialogKeyDown(event: KeyboardEvent): void;
|
|
115
|
+
onInputKeyDown(event: KeyboardEvent): void;
|
|
116
|
+
onOptionKeyDown(event: KeyboardEvent, optionValue: string): void;
|
|
117
|
+
focusOption(): void;
|
|
118
|
+
selectOption(optionValue: string): void;
|
|
119
|
+
private getTotalOptionsCount;
|
|
120
|
+
private processOptions;
|
|
121
|
+
adjustDialogPosition(): void;
|
|
122
|
+
resetDialogPosition(): void;
|
|
123
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrDialogListComponent, never>;
|
|
124
|
+
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>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare class PtrSelectComponent {
|
|
128
|
+
options: (PtrOption | PtrOptionGroup | string)[] | undefined;
|
|
129
|
+
showSearch: boolean;
|
|
130
|
+
placeholder?: string | null;
|
|
131
|
+
label?: string | undefined;
|
|
132
|
+
description?: string | undefined;
|
|
133
|
+
labelPosition?: 'top' | 'inline';
|
|
134
|
+
selectionChange: EventEmitter<string | null>;
|
|
135
|
+
selectButton: ElementRef<HTMLButtonElement>;
|
|
136
|
+
dialogList: PtrDialogListComponent;
|
|
137
|
+
value: i0.WritableSignal<string | null>;
|
|
138
|
+
displayValue: i0.Signal<string | null>;
|
|
139
|
+
effectivePlaceholder: i0.Signal<string>;
|
|
140
|
+
private componentId;
|
|
141
|
+
labelId: string;
|
|
142
|
+
inputId: string;
|
|
143
|
+
onChange: (value: string | null) => void;
|
|
144
|
+
onTouched: () => void;
|
|
145
|
+
onDocumentClick(event: MouseEvent): void;
|
|
146
|
+
toggleDialog(): void;
|
|
147
|
+
onOptionSelected(optionValue: string | null): void;
|
|
148
|
+
writeValue(value: string): void;
|
|
149
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
150
|
+
registerOnTouched(fn: () => void): void;
|
|
151
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
152
|
+
private flattenOptions;
|
|
153
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrSelectComponent, never>;
|
|
154
|
+
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>;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare class PtrInputComponent implements ControlValueAccessor, OnInit {
|
|
158
|
+
type: 'text' | 'number' | 'email' | 'password' | 'search' | 'hidden' | 'date' | 'textarea';
|
|
159
|
+
label: string;
|
|
160
|
+
placeholder?: string | null;
|
|
161
|
+
autocomplete?: string | undefined;
|
|
162
|
+
description?: string | undefined;
|
|
163
|
+
dialogHelpText?: string | undefined;
|
|
164
|
+
searchFn?: (term: string) => Observable<string[]>;
|
|
165
|
+
labelPosition?: 'top' | 'inline';
|
|
166
|
+
input: ElementRef<HTMLInputElement>;
|
|
167
|
+
dialogList: PtrDialogListComponent;
|
|
168
|
+
private componentId;
|
|
169
|
+
private minChars;
|
|
170
|
+
private searchTerms;
|
|
171
|
+
private hasSelectedOption;
|
|
172
|
+
inputId: string;
|
|
173
|
+
inputValue: i0.WritableSignal<string>;
|
|
174
|
+
searchResultOptions: i0.WritableSignal<string[]>;
|
|
175
|
+
onChange: (value: string) => void;
|
|
176
|
+
onTouched: () => void;
|
|
177
|
+
onDocumentClick(event: MouseEvent): void;
|
|
178
|
+
ngOnInit(): void;
|
|
179
|
+
private setupSearch;
|
|
180
|
+
onInputChange(value: string): void;
|
|
181
|
+
onOptionSelected(optionValue: string | null): void;
|
|
182
|
+
onFocus(): void;
|
|
183
|
+
onBlur(): void;
|
|
184
|
+
writeValue(value: string): void;
|
|
185
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
186
|
+
registerOnTouched(fn: () => void): void;
|
|
187
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
188
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrInputComponent, never>;
|
|
189
|
+
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>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare class PtrChipInputComponent implements ControlValueAccessor, OnInit {
|
|
193
|
+
label: string;
|
|
194
|
+
placeholder?: string | null;
|
|
195
|
+
description?: string | undefined;
|
|
196
|
+
labelPosition?: 'top' | 'inline';
|
|
197
|
+
maxItems?: number;
|
|
198
|
+
chipInput: ElementRef<HTMLInputElement>;
|
|
199
|
+
private componentId;
|
|
200
|
+
inputId: string;
|
|
201
|
+
inputValue: i0.WritableSignal<string>;
|
|
202
|
+
chipItems: i0.WritableSignal<string[]>;
|
|
203
|
+
isDisabled: i0.WritableSignal<boolean>;
|
|
204
|
+
tempInputControl: FormControl<string | null>;
|
|
205
|
+
onChange: (value: string[]) => void;
|
|
206
|
+
onTouched: () => void;
|
|
207
|
+
ngOnInit(): void;
|
|
208
|
+
addChip(): void;
|
|
209
|
+
removeChip(index: number): void;
|
|
210
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
211
|
+
onBlur(): void;
|
|
212
|
+
writeValue(value: string[]): void;
|
|
213
|
+
registerOnChange(fn: (value: string[]) => void): void;
|
|
214
|
+
registerOnTouched(fn: () => void): void;
|
|
215
|
+
setDisabledState(isDisabled: boolean): void;
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrChipInputComponent, never>;
|
|
217
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrChipInputComponent, "ptr-chip-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "description": { "alias": "description"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "maxItems": { "alias": "maxItems"; "required": false; }; }, {}, never, never, true, never>;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare class PtrTitleComponent implements OnInit {
|
|
221
|
+
styleClass: string;
|
|
222
|
+
wrapperStyleClass: string;
|
|
223
|
+
screenReaderOnly: boolean;
|
|
224
|
+
private router;
|
|
225
|
+
private activatedRoute;
|
|
226
|
+
private titleStrategy;
|
|
227
|
+
displayTitle$: Observable<string>;
|
|
228
|
+
hideTitle$: Observable<boolean>;
|
|
229
|
+
ngOnInit(): void;
|
|
230
|
+
private getRoute;
|
|
231
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrTitleComponent, never>;
|
|
232
|
+
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>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
declare class PtrLoadingSpinnerComponent {
|
|
236
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrLoadingSpinnerComponent, never>;
|
|
237
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrLoadingSpinnerComponent, "ptr-loading-spinner", never, {}, {}, never, never, true, never>;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare class PtrLoadingSpinnerDirective implements OnDestroy {
|
|
241
|
+
private targetEl;
|
|
242
|
+
private viewContainerRef;
|
|
243
|
+
private renderer;
|
|
244
|
+
private spinnerInstance?;
|
|
245
|
+
private overlay?;
|
|
246
|
+
hostPosition: string;
|
|
247
|
+
set ptrLoadingSpinner(loading: boolean);
|
|
248
|
+
ngOnDestroy(): void;
|
|
249
|
+
private addProgressSpinnerComponent;
|
|
250
|
+
private removeProgressSpinnerComponent;
|
|
251
|
+
private addOverlay;
|
|
252
|
+
private removeOverlay;
|
|
253
|
+
private addBlurEffect;
|
|
254
|
+
private removeBlurEffect;
|
|
255
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrLoadingSpinnerDirective, never>;
|
|
256
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PtrLoadingSpinnerDirective, "[ptrLoadingSpinner]", never, { "ptrLoadingSpinner": { "alias": "ptrLoadingSpinner"; "required": true; }; }, {}, never, never, true, never>;
|
|
257
|
+
}
|
|
258
|
+
|
|
1
259
|
/**
|
|
2
|
-
*
|
|
260
|
+
* Optimized Async Loading Service using Angular Signals
|
|
261
|
+
* Supports global loading state and named loading areas with auto-cleanup
|
|
262
|
+
*
|
|
263
|
+
* To use as a non-singleton service, add to providers array in @Component decorator:
|
|
264
|
+
* @Component({
|
|
265
|
+
* selector: 'app-example',
|
|
266
|
+
* templateUrl: './example.component.html',
|
|
267
|
+
* providers: [PtrLoadingService]
|
|
268
|
+
* })
|
|
269
|
+
*
|
|
270
|
+
* Usage:
|
|
271
|
+
* Set loading: this.loadingService.setLoading(true)
|
|
272
|
+
* - Set loading: this.loadingService.setLoading(true, 'areaName')
|
|
273
|
+
*
|
|
274
|
+
* - Get loading (template): {{ loadingService.isLoading()() }}
|
|
275
|
+
* - Get loading (template): {{ loadingService.isLoading('areaName')() }}
|
|
276
|
+
*
|
|
277
|
+
* - Get loading (component): this.loadingService.isLoading()()
|
|
278
|
+
* - Get loading (component): this.loadingService.isLoading('areaName')()
|
|
279
|
+
*
|
|
280
|
+
* - Check if any loading: {{ loadingService.isAnyLoading()() }}
|
|
281
|
+
*
|
|
282
|
+
* - React to loading changes: effect(() => console.log('Loading:', this.loadingService.isLoading('areaName')()))
|
|
3
283
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
284
|
+
declare class PtrLoadingService {
|
|
285
|
+
private globalTaskCount;
|
|
286
|
+
private loadingAreas;
|
|
287
|
+
isLoading(area?: string): Signal<boolean>;
|
|
288
|
+
isAnyLoading(): Signal<boolean>;
|
|
289
|
+
setLoading(value: boolean, area?: string): void;
|
|
290
|
+
resetLoading(area?: string): void;
|
|
291
|
+
private updateNamedAreaLoading;
|
|
292
|
+
private updateTaskCount;
|
|
293
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrLoadingService, never>;
|
|
294
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PtrLoadingService>;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
type ButtonStyle = 'normal' | 'error' | 'secondary' | 'icon';
|
|
298
|
+
declare class PtrButtonComponent {
|
|
299
|
+
get hostClasses(): string;
|
|
300
|
+
style: i0.WritableSignal<ButtonStyle>;
|
|
301
|
+
type: i0.WritableSignal<"button" | "submit" | "reset">;
|
|
302
|
+
disabled: i0.WritableSignal<boolean>;
|
|
303
|
+
href: i0.WritableSignal<string | null>;
|
|
304
|
+
routerLink: i0.WritableSignal<string | (string | number)[] | null>;
|
|
305
|
+
additionalClasses: i0.WritableSignal<string>;
|
|
306
|
+
smallSize: i0.WritableSignal<boolean>;
|
|
307
|
+
set buttonStyle(value: ButtonStyle);
|
|
308
|
+
set buttonType(value: 'button' | 'submit' | 'reset');
|
|
309
|
+
set isDisabled(value: boolean);
|
|
310
|
+
set hrefLink(value: string | null);
|
|
311
|
+
set routerLinkValue(value: string | (string | number)[] | null);
|
|
312
|
+
set extraClasses(value: string);
|
|
313
|
+
set isSmallSize(value: boolean);
|
|
314
|
+
set isIconButton(value: boolean);
|
|
315
|
+
ariaLabel?: string | undefined;
|
|
316
|
+
clicked: EventEmitter<Event>;
|
|
317
|
+
isLink: i0.Signal<boolean>;
|
|
318
|
+
buttonClasses: i0.Signal<string>;
|
|
319
|
+
onClick(event: Event): void;
|
|
320
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrButtonComponent, never>;
|
|
321
|
+
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>;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
interface DialogResult<T = unknown> {
|
|
325
|
+
result: boolean;
|
|
326
|
+
data: T | null;
|
|
327
|
+
}
|
|
328
|
+
declare class PtrDialogComponent<T = unknown> implements AfterViewInit {
|
|
329
|
+
dialogElement: ElementRef<HTMLDialogElement>;
|
|
330
|
+
title: string;
|
|
331
|
+
message: string;
|
|
332
|
+
buttonText: string;
|
|
333
|
+
buttonStyle: 'normal' | 'error' | 'secondary';
|
|
334
|
+
contentTemplate: TemplateRef<unknown> | null;
|
|
335
|
+
hasDefaultContent: boolean;
|
|
336
|
+
data: T | null;
|
|
337
|
+
closed: EventEmitter<DialogResult<T>>;
|
|
338
|
+
ngAfterViewInit(): void;
|
|
339
|
+
close(): void;
|
|
340
|
+
confirm(): void;
|
|
341
|
+
onClose(): void;
|
|
342
|
+
setData(data: T): void;
|
|
343
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrDialogComponent<any>, never>;
|
|
344
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrDialogComponent<any>, "ptr-dialog", never, { "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "buttonText": { "alias": "buttonText"; "required": false; }; "buttonStyle": { "alias": "buttonStyle"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; "hasDefaultContent": { "alias": "hasDefaultContent"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "closed": "closed"; }, never, never, true, never>;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
interface PtrDialogOptions<T = unknown> {
|
|
348
|
+
title: string;
|
|
349
|
+
message?: string;
|
|
350
|
+
buttonText?: string;
|
|
351
|
+
buttonStyle?: 'normal' | 'error' | 'secondary';
|
|
352
|
+
contentTemplate?: TemplateRef<unknown>;
|
|
353
|
+
data?: T;
|
|
354
|
+
}
|
|
355
|
+
declare class PtrDialogService {
|
|
356
|
+
private appRef;
|
|
357
|
+
private injector;
|
|
358
|
+
private dialogComponentRef;
|
|
359
|
+
constructor(appRef: ApplicationRef, injector: EnvironmentInjector);
|
|
360
|
+
open<T = unknown>(options: PtrDialogOptions<T>): Observable<DialogResult<T>>;
|
|
361
|
+
private removeDialog;
|
|
362
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrDialogService, never>;
|
|
363
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PtrDialogService>;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
declare class PtrTooltipComponent {
|
|
367
|
+
content: string;
|
|
368
|
+
tooltipDialog: ElementRef<HTMLDialogElement>;
|
|
369
|
+
private tooltipTimer;
|
|
370
|
+
showTooltip(): void;
|
|
371
|
+
hideTooltip(): void;
|
|
372
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrTooltipComponent, never>;
|
|
373
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrTooltipComponent, "ptr-tooltip", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
interface PtrBreadcrumb {
|
|
377
|
+
label?: string;
|
|
378
|
+
url?: string;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
declare class PtrBreadcrumbsComponent {
|
|
382
|
+
showFirstSeparator: boolean;
|
|
383
|
+
private router;
|
|
384
|
+
private activatedRoute;
|
|
385
|
+
private routeEvents;
|
|
386
|
+
breadcrumbs: i0.Signal<PtrBreadcrumb[]>;
|
|
387
|
+
private createBreadcrumbs;
|
|
388
|
+
private getLabelForRoute;
|
|
389
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrBreadcrumbsComponent, never>;
|
|
390
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrBreadcrumbsComponent, "ptr-breadcrumbs", never, { "showFirstSeparator": { "alias": "showFirstSeparator"; "required": false; }; }, {}, never, never, true, never>;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
declare class PtrTabComponent {
|
|
394
|
+
label: string;
|
|
395
|
+
link?: string;
|
|
396
|
+
active: i0.WritableSignal<boolean>;
|
|
397
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrTabComponent, never>;
|
|
398
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrTabComponent, "ptr-tab", never, { "label": { "alias": "label"; "required": false; }; "link": { "alias": "link"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
declare class PtrTabsComponent implements AfterViewInit {
|
|
402
|
+
tabComponents: QueryList<PtrTabComponent>;
|
|
403
|
+
buttons: QueryList<ElementRef>;
|
|
404
|
+
private router;
|
|
405
|
+
private destroyRef;
|
|
406
|
+
tabs: i0.WritableSignal<PtrTabComponent[]>;
|
|
407
|
+
activeTabIndex: i0.WritableSignal<number>;
|
|
408
|
+
useLinks: i0.WritableSignal<boolean>;
|
|
409
|
+
sliderPosition: i0.WritableSignal<{
|
|
410
|
+
transform: string;
|
|
411
|
+
width: string;
|
|
412
|
+
}>;
|
|
413
|
+
constructor();
|
|
414
|
+
ngAfterViewInit(): void;
|
|
415
|
+
updateTabs(): void;
|
|
416
|
+
selectTab(index: number): void;
|
|
417
|
+
updateSliderPosition(): void;
|
|
418
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrTabsComponent, never>;
|
|
419
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrTabsComponent, "ptr-tabs", never, {}, {}, ["tabComponents"], ["*"], true, never>;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
interface PtrToast {
|
|
423
|
+
id: number;
|
|
424
|
+
message: string;
|
|
425
|
+
type: 'success' | 'error' | 'info' | 'warning';
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
declare class PtrToasterService {
|
|
429
|
+
private destroyRef;
|
|
430
|
+
private injector;
|
|
431
|
+
private environmentInjector;
|
|
432
|
+
private appRef;
|
|
433
|
+
private toasts;
|
|
434
|
+
private counter;
|
|
435
|
+
private toasterComponentRef;
|
|
436
|
+
constructor();
|
|
437
|
+
private injectToasterComponent;
|
|
438
|
+
getToasts(): i0.Signal<PtrToast[]>;
|
|
439
|
+
show(message: string, type?: PtrToast['type']): void;
|
|
440
|
+
remove(id: number): void;
|
|
441
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrToasterService, never>;
|
|
442
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PtrToasterService>;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare class PtrToasterComponent {
|
|
446
|
+
protected toasterService: PtrToasterService;
|
|
447
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PtrToasterComponent, never>;
|
|
448
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PtrToasterComponent, "ptr-toaster", never, {}, {}, never, never, true, never>;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export { PtrBreadcrumbsComponent, PtrButtonComponent, PtrChipInputComponent, PtrDialogComponent, PtrDialogService, PtrFormComponent, PtrInputComponent, PtrLoadingService, PtrLoadingSpinnerComponent, PtrLoadingSpinnerDirective, PtrMenuComponent, PtrSelectComponent, PtrTabComponent, PtrTabsComponent, PtrTitleComponent, PtrToasterComponent, PtrToasterService, PtrTooltipComponent };
|
|
452
|
+
export type { OptionInputs, PtrBreadcrumb, PtrConditionalConfig, PtrConditionalRule, PtrFormConfig, PtrFormField, PtrMenuItem, PtrOption, PtrOptionGroup, PtrToast };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patter/ngx-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^20.0.0",
|
|
6
|
+
"@angular/core": "^20.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class PtrTabComponent {
|
|
3
|
-
label: string;
|
|
4
|
-
link?: string;
|
|
5
|
-
active: import("@angular/core").WritableSignal<boolean>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PtrTabComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PtrTabComponent, "ptr-tab", never, { "label": { "alias": "label"; "required": false; }; "link": { "alias": "link"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
8
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, QueryList } from '@angular/core';
|
|
2
|
-
import { PtrTabComponent } from '../ptr-tab/ptr-tab.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class PtrTabsComponent implements AfterViewInit {
|
|
5
|
-
tabComponents: QueryList<PtrTabComponent>;
|
|
6
|
-
buttons: QueryList<ElementRef>;
|
|
7
|
-
private router;
|
|
8
|
-
private destroyRef;
|
|
9
|
-
tabs: import("@angular/core").WritableSignal<PtrTabComponent[]>;
|
|
10
|
-
activeTabIndex: import("@angular/core").WritableSignal<number>;
|
|
11
|
-
useLinks: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
-
sliderPosition: import("@angular/core").WritableSignal<{
|
|
13
|
-
transform: string;
|
|
14
|
-
width: string;
|
|
15
|
-
}>;
|
|
16
|
-
constructor();
|
|
17
|
-
ngAfterViewInit(): void;
|
|
18
|
-
updateTabs(): void;
|
|
19
|
-
selectTab(index: number): void;
|
|
20
|
-
updateSliderPosition(): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PtrTabsComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PtrTabsComponent, "ptr-tabs", never, {}, {}, ["tabComponents"], ["*"], true, never>;
|
|
23
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter, AfterViewInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export interface DialogResult<T = unknown> {
|
|
4
|
-
result: boolean;
|
|
5
|
-
data: T | null;
|
|
6
|
-
}
|
|
7
|
-
export declare class PtrDialogComponent<T = unknown> implements AfterViewInit {
|
|
8
|
-
dialogElement: ElementRef<HTMLDialogElement>;
|
|
9
|
-
title: string;
|
|
10
|
-
message: string;
|
|
11
|
-
buttonText: string;
|
|
12
|
-
buttonStyle: 'normal' | 'error' | 'secondary';
|
|
13
|
-
contentTemplate: TemplateRef<unknown> | null;
|
|
14
|
-
hasDefaultContent: boolean;
|
|
15
|
-
data: T | null;
|
|
16
|
-
closed: EventEmitter<DialogResult<T>>;
|
|
17
|
-
ngAfterViewInit(): void;
|
|
18
|
-
close(): void;
|
|
19
|
-
confirm(): void;
|
|
20
|
-
onClose(): void;
|
|
21
|
-
setData(data: T): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PtrDialogComponent<any>, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PtrDialogComponent<any>, "ptr-dialog", never, { "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "buttonText": { "alias": "buttonText"; "required": false; }; "buttonStyle": { "alias": "buttonStyle"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; "hasDefaultContent": { "alias": "hasDefaultContent"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "closed": "closed"; }, never, never, true, never>;
|
|
24
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ApplicationRef, EnvironmentInjector, TemplateRef } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DialogResult } from './ptr-dialog/ptr-dialog.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export interface PtrDialogOptions<T = unknown> {
|
|
6
|
-
title: string;
|
|
7
|
-
message?: string;
|
|
8
|
-
buttonText?: string;
|
|
9
|
-
buttonStyle?: 'normal' | 'error' | 'secondary';
|
|
10
|
-
contentTemplate?: TemplateRef<unknown>;
|
|
11
|
-
data?: T;
|
|
12
|
-
}
|
|
13
|
-
export declare class PtrDialogService {
|
|
14
|
-
private appRef;
|
|
15
|
-
private injector;
|
|
16
|
-
private dialogComponentRef;
|
|
17
|
-
constructor(appRef: ApplicationRef, injector: EnvironmentInjector);
|
|
18
|
-
open<T = unknown>(options: PtrDialogOptions<T>): Observable<DialogResult<T>>;
|
|
19
|
-
private removeDialog;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PtrDialogService, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PtrDialogService>;
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class PtrTooltipComponent {
|
|
4
|
-
content: string;
|
|
5
|
-
tooltipDialog: ElementRef<HTMLDialogElement>;
|
|
6
|
-
private tooltipTimer;
|
|
7
|
-
showTooltip(): void;
|
|
8
|
-
hideTooltip(): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PtrTooltipComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PtrTooltipComponent, "ptr-tooltip", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
11
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { PtrFormConfig, PtrFormField } from '../interfaces';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class PtrFormComponent implements OnInit {
|
|
6
|
-
config: PtrFormConfig;
|
|
7
|
-
loading: boolean;
|
|
8
|
-
error: string | null;
|
|
9
|
-
formSubmit: EventEmitter<any>;
|
|
10
|
-
formGroupCreated: EventEmitter<FormGroup<any>>;
|
|
11
|
-
formGroup: FormGroup;
|
|
12
|
-
private fb;
|
|
13
|
-
private cdr;
|
|
14
|
-
private destroyRef;
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
buildForm(): void;
|
|
17
|
-
onSubmit(): void;
|
|
18
|
-
resetForm(): void;
|
|
19
|
-
setupConditionalLogic(): void;
|
|
20
|
-
isFieldVisible(field: PtrFormField): boolean;
|
|
21
|
-
getFieldLabel(field: PtrFormField): string;
|
|
22
|
-
getFieldPlaceholder(field: PtrFormField): string;
|
|
23
|
-
private evaluateConditionalRules;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PtrFormComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PtrFormComponent, "ptr-form", never, { "config": { "alias": "config"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "error": { "alias": "error"; "required": false; }; }, { "formSubmit": "formSubmit"; "formGroupCreated": "formGroupCreated"; }, never, never, true, never>;
|
|
26
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class PtrChipInputComponent implements ControlValueAccessor, OnInit {
|
|
5
|
-
label: string;
|
|
6
|
-
placeholder?: string | null;
|
|
7
|
-
description?: string | undefined;
|
|
8
|
-
labelPosition?: 'top' | 'inline';
|
|
9
|
-
maxItems?: number;
|
|
10
|
-
chipInput: ElementRef<HTMLInputElement>;
|
|
11
|
-
private componentId;
|
|
12
|
-
inputId: string;
|
|
13
|
-
inputValue: import("@angular/core").WritableSignal<string>;
|
|
14
|
-
chipItems: import("@angular/core").WritableSignal<string[]>;
|
|
15
|
-
isDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
-
tempInputControl: FormControl<string | null>;
|
|
17
|
-
onChange: (value: string[]) => void;
|
|
18
|
-
onTouched: () => void;
|
|
19
|
-
ngOnInit(): void;
|
|
20
|
-
addChip(): void;
|
|
21
|
-
removeChip(index: number): void;
|
|
22
|
-
onKeyDown(event: KeyboardEvent): void;
|
|
23
|
-
onBlur(): void;
|
|
24
|
-
writeValue(value: string[]): void;
|
|
25
|
-
registerOnChange(fn: (value: string[]) => void): void;
|
|
26
|
-
registerOnTouched(fn: () => void): void;
|
|
27
|
-
setDisabledState(isDisabled: boolean): void;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PtrChipInputComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PtrChipInputComponent, "ptr-chip-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "description": { "alias": "description"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "maxItems": { "alias": "maxItems"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
|
-
}
|