@patter/ngx-components 19.0.2 → 19.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 +231 -79
- package/fesm2022/patter-ngx-components.mjs.map +1 -1
- package/lib/dialog/ptr-dialog/ptr-dialog.component.d.ts +13 -5
- package/lib/dialog/ptr-dialog.service.d.ts +11 -7
- package/lib/forms/form/form.component.d.ts +1 -1
- package/lib/forms/input/ptr-chip-input/ptr-chip-input.component.d.ts +30 -0
- package/lib/forms/interfaces.d.ts +2 -1
- package/package.json +1 -1
- package/patter-ngx-components-19.0.4.tgz +0 -0
- package/public-api.d.ts +2 -1
- package/patter-ngx-components-19.0.2.tgz +0 -0
- /package/lib/forms/input/{select → ptr-select}/select.component.d.ts +0 -0
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { ApplicationRef, EnvironmentInjector } from '@angular/core';
|
|
1
|
+
import { ApplicationRef, EnvironmentInjector, TemplateRef } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { DialogResult } from './ptr-dialog/ptr-dialog.component';
|
|
3
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
|
+
}
|
|
4
13
|
export declare class PtrDialogService {
|
|
5
14
|
private appRef;
|
|
6
15
|
private injector;
|
|
7
16
|
private dialogComponentRef;
|
|
8
17
|
constructor(appRef: ApplicationRef, injector: EnvironmentInjector);
|
|
9
|
-
open(options:
|
|
10
|
-
title: string;
|
|
11
|
-
message: string;
|
|
12
|
-
buttonText?: string;
|
|
13
|
-
buttonStyle?: 'normal' | 'error' | 'secondary';
|
|
14
|
-
}): Observable<boolean>;
|
|
18
|
+
open<T = unknown>(options: PtrDialogOptions<T>): Observable<DialogResult<T>>;
|
|
15
19
|
private removeDialog;
|
|
16
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<PtrDialogService, never>;
|
|
17
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<PtrDialogService>;
|
|
@@ -19,7 +19,7 @@ export declare class PtrFormComponent implements OnInit {
|
|
|
19
19
|
setupConditionalLogic(): void;
|
|
20
20
|
isFieldVisible(field: PtrFormField): boolean;
|
|
21
21
|
getFieldLabel(field: PtrFormField): string;
|
|
22
|
-
getFieldPlaceholder(field: PtrFormField): string
|
|
22
|
+
getFieldPlaceholder(field: PtrFormField): string;
|
|
23
23
|
private evaluateConditionalRules;
|
|
24
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<PtrFormComponent, never>;
|
|
25
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>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
}
|
|
@@ -20,7 +20,7 @@ export interface PtrOptionGroup {
|
|
|
20
20
|
}
|
|
21
21
|
export type OptionInputs = (string | PtrOption)[] | PtrOptionGroup[];
|
|
22
22
|
export interface PtrFormField {
|
|
23
|
-
type: 'text' | 'textarea' | 'number' | 'email' | 'password' | 'search' | 'select' | 'date' | 'hidden';
|
|
23
|
+
type: 'text' | 'textarea' | 'number' | 'email' | 'password' | 'search' | 'select' | 'date' | 'hidden' | 'chips';
|
|
24
24
|
name: string;
|
|
25
25
|
label: string;
|
|
26
26
|
description?: string;
|
|
@@ -34,6 +34,7 @@ export interface PtrFormField {
|
|
|
34
34
|
options?: OptionInputs;
|
|
35
35
|
dialogHelpText?: string;
|
|
36
36
|
searchFn?: (term: string) => Observable<string[]>;
|
|
37
|
+
maxItems?: number;
|
|
37
38
|
conditional?: PtrConditionalConfig;
|
|
38
39
|
}
|
|
39
40
|
export interface PtrFormConfig {
|
package/package.json
CHANGED
|
Binary file
|
package/public-api.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export * from './lib/menu/menu.component';
|
|
2
2
|
export * from './lib/forms/interfaces';
|
|
3
3
|
export { PtrFormComponent } from './lib/forms/form/form.component';
|
|
4
|
-
export { PtrSelectComponent } from './lib/forms/input/select/select.component';
|
|
4
|
+
export { PtrSelectComponent } from './lib/forms/input/ptr-select/select.component';
|
|
5
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';
|
|
6
7
|
export { PtrTitleComponent } from './lib/ptr-title/ptr-title.component';
|
|
7
8
|
export { PtrLoadingSpinnerComponent } from './lib/loading-spinner/loading-spinner.component';
|
|
8
9
|
export { PtrLoadingSpinnerDirective } from './lib/loading-spinner/loading-spinner.directive';
|
|
Binary file
|
|
File without changes
|