@fovestta2/web-angular 1.0.1 → 1.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/esm2022/lib/add-update-form/add-update-form.component.mjs +1044 -0
- package/esm2022/lib/fv-controls.module.mjs +16 -4
- package/esm2022/lib/fv-dropdown/fv-dropdown.component.mjs +116 -17
- package/esm2022/lib/fv-entry-field/fv-entry-field.component.mjs +29 -3
- package/esm2022/lib/fv-esi-field/fv-esi-field.component.mjs +63 -0
- package/esm2022/lib/fv-iban-field/fv-iban-field.component.mjs +63 -0
- package/esm2022/lib/fv-ifsc-field/fv-ifsc-field.component.mjs +63 -0
- package/esm2022/lib/fv-micr-field/fv-micr-field.component.mjs +63 -0
- package/esm2022/lib/fv-name-code/fv-name-code.component.mjs +273 -0
- package/esm2022/lib/fv-pf-field/fv-pf-field.component.mjs +63 -0
- package/esm2022/lib/fv-phone-field/fv-phone-field.component.mjs +105 -0
- package/esm2022/lib/fv-radio-group/fv-radio-group.component.mjs +3 -3
- package/esm2022/lib/fv-uan-field/fv-uan-field.component.mjs +65 -0
- package/esm2022/lib/query-form/query-form.component.mjs +569 -0
- package/esm2022/public-api.mjs +15 -5
- package/fesm2022/fovestta2-web-angular.mjs +2492 -88
- package/fesm2022/fovestta2-web-angular.mjs.map +1 -1
- package/lib/add-update-form/add-update-form.component.d.ts +102 -0
- package/lib/fv-controls.module.d.ts +3 -1
- package/lib/fv-dropdown/fv-dropdown.component.d.ts +14 -2
- package/lib/fv-entry-field/fv-entry-field.component.d.ts +4 -1
- package/lib/fv-esi-field/fv-esi-field.component.d.ts +21 -0
- package/lib/fv-iban-field/fv-iban-field.component.d.ts +21 -0
- package/lib/fv-ifsc-field/fv-ifsc-field.component.d.ts +21 -0
- package/lib/fv-micr-field/fv-micr-field.component.d.ts +21 -0
- package/lib/fv-name-code/fv-name-code.component.d.ts +41 -0
- package/lib/fv-pf-field/fv-pf-field.component.d.ts +21 -0
- package/lib/fv-phone-field/fv-phone-field.component.d.ts +25 -0
- package/lib/fv-uan-field/fv-uan-field.component.d.ts +21 -0
- package/lib/query-form/query-form.component.d.ts +53 -0
- package/package.json +2 -2
- package/public-api.d.ts +14 -4
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy, AfterViewInit, ElementRef } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type FieldType = 'text' | 'email' | 'number' | 'select' | 'name-code' | 'checkbox' | 'textarea' | 'date' | 'password' | 'radio' | 'file' | 'month-year' | 'phone' | 'uan' | 'pf' | 'esi' | 'ifsc' | 'micr' | 'iban';
|
|
6
|
+
export type ValidationType = 'required' | 'email' | 'minLength' | 'maxLength' | 'pattern' | 'min' | 'max' | 'custom';
|
|
7
|
+
export interface FieldValidation {
|
|
8
|
+
type: ValidationType;
|
|
9
|
+
value?: any;
|
|
10
|
+
message?: string;
|
|
11
|
+
validator?: (value: any, formGroup?: FormGroup) => boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface FormColumn {
|
|
14
|
+
name: string;
|
|
15
|
+
label: string;
|
|
16
|
+
type: FieldType;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
options?: {
|
|
20
|
+
label: string;
|
|
21
|
+
value: any;
|
|
22
|
+
}[];
|
|
23
|
+
validations?: FieldValidation[];
|
|
24
|
+
value?: any;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
hidden?: boolean;
|
|
28
|
+
hint?: string;
|
|
29
|
+
colSpan?: number;
|
|
30
|
+
onChange?: (value: any, formGroup: FormGroup) => void;
|
|
31
|
+
accept?: string;
|
|
32
|
+
filePreview?: boolean;
|
|
33
|
+
showTimePicker?: boolean;
|
|
34
|
+
allowAlphabetsOnly?: boolean;
|
|
35
|
+
maxLength?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface FormSection {
|
|
38
|
+
title?: string;
|
|
39
|
+
fields: FormColumn[];
|
|
40
|
+
}
|
|
41
|
+
export interface FormConfig {
|
|
42
|
+
sections: FormSection[];
|
|
43
|
+
submitLabel?: string;
|
|
44
|
+
resetLabel?: string;
|
|
45
|
+
onSubmit: (data: any) => void;
|
|
46
|
+
onReset?: () => void;
|
|
47
|
+
onCancel: () => void;
|
|
48
|
+
cancelLabel?: string;
|
|
49
|
+
formTitle?: string;
|
|
50
|
+
maxColsPerRow?: number;
|
|
51
|
+
}
|
|
52
|
+
export declare class AddUpdateFormComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
53
|
+
private fb;
|
|
54
|
+
private hostRef;
|
|
55
|
+
config: FormConfig;
|
|
56
|
+
validationError: EventEmitter<string>;
|
|
57
|
+
form: FormGroup;
|
|
58
|
+
submitted: boolean;
|
|
59
|
+
private filePreviews;
|
|
60
|
+
private fileNames;
|
|
61
|
+
private valueChangeSubscriptions;
|
|
62
|
+
private passwordVisibility;
|
|
63
|
+
private searchQueries;
|
|
64
|
+
constructor(fb: FormBuilder, hostRef: ElementRef<HTMLElement>);
|
|
65
|
+
ngOnInit(): void;
|
|
66
|
+
ngAfterViewInit(): void;
|
|
67
|
+
getColumnWidth(column: FormColumn): string;
|
|
68
|
+
getControl(name: string): FormControl;
|
|
69
|
+
getSchema(column: FormColumn): ValidationSchema;
|
|
70
|
+
isImageField(column: FormColumn): boolean;
|
|
71
|
+
initializeForm(): void;
|
|
72
|
+
ngOnDestroy(): void;
|
|
73
|
+
handleFieldChange(fieldName: string, eventValue?: any): void;
|
|
74
|
+
formatMonthYearValue(value: string): string;
|
|
75
|
+
parseMonthYearValue(value: string): string;
|
|
76
|
+
handleMonthYearChange(fieldName: string, value: string): void;
|
|
77
|
+
handleMonthYearBlur(fieldName: string): void;
|
|
78
|
+
handleMonthYearPickerChange(fieldName: string, value: string): void;
|
|
79
|
+
getMonthYearPickerValue(fieldName: string): string;
|
|
80
|
+
openMonthPicker(fieldName: string): void;
|
|
81
|
+
getColumnByName(name: string): FormColumn | undefined;
|
|
82
|
+
getFileFields(fields: FormColumn[]): FormColumn[];
|
|
83
|
+
getNonFileFields(fields: FormColumn[]): FormColumn[];
|
|
84
|
+
togglePasswordVisibility(fieldName: string): void;
|
|
85
|
+
hasRequiredValidation(column: FormColumn): boolean;
|
|
86
|
+
isPasswordVisible(fieldName: string): boolean;
|
|
87
|
+
buildValidators(validations?: FieldValidation[], formGroup?: FormGroup): any[];
|
|
88
|
+
triggerFileUpload(fieldName: string): void;
|
|
89
|
+
openTimePicker(fieldName: string): void;
|
|
90
|
+
onFileChange(event: any, fieldName: string): void;
|
|
91
|
+
extractFileName(value: string): string;
|
|
92
|
+
getFilePreview(fieldName: string): string | null;
|
|
93
|
+
getFileName(fieldName: string): string | null;
|
|
94
|
+
mapSearchOptions(options: any[]): any[];
|
|
95
|
+
deleteFile(fieldName: string): void;
|
|
96
|
+
handleSubmit(): void;
|
|
97
|
+
handleReset(): void;
|
|
98
|
+
isFieldInvalid(fieldName: string): boolean;
|
|
99
|
+
getErrorMessage(fieldName: string): string;
|
|
100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AddUpdateFormComponent, never>;
|
|
101
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AddUpdateFormComponent, "lib-add-update-form", never, { "config": { "alias": "config"; "required": false; }; }, { "validationError": "validationError"; }, never, never, true, never>;
|
|
102
|
+
}
|
|
@@ -11,8 +11,10 @@ import * as i9 from "./fv-dropdown/fv-dropdown.component";
|
|
|
11
11
|
import * as i10 from "./fv-file-selector/fv-file-selector.component";
|
|
12
12
|
import * as i11 from "./fv-image-selector/fv-image-selector.component";
|
|
13
13
|
import * as i12 from "./fv-rich-text-editor/fv-rich-text-editor.component";
|
|
14
|
+
import * as i13 from "./fv-name-code/fv-name-code.component";
|
|
15
|
+
import * as i14 from "./add-update-form/add-update-form.component";
|
|
14
16
|
export declare class FvControlsModule {
|
|
15
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<FvControlsModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FvControlsModule, never, [typeof i1.CommonModule, typeof i2.ReactiveFormsModule, typeof i3.FvEntryFieldComponent, typeof i4.FvDateFieldComponent, typeof i5.FvMonthYearFieldComponent, typeof i6.FvNumberFieldComponent, typeof i7.FvCheckboxComponent, typeof i8.FvRadioGroupComponent, typeof i9.FvDropdownComponent, typeof i10.FvFileSelectorComponent, typeof i11.FvImageSelectorComponent, typeof i12.FvRichTextEditorComponent], [typeof i3.FvEntryFieldComponent, typeof i4.FvDateFieldComponent, typeof i5.FvMonthYearFieldComponent, typeof i6.FvNumberFieldComponent, typeof i7.FvCheckboxComponent, typeof i8.FvRadioGroupComponent, typeof i9.FvDropdownComponent, typeof i10.FvFileSelectorComponent, typeof i11.FvImageSelectorComponent, typeof i12.FvRichTextEditorComponent]>;
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FvControlsModule, never, [typeof i1.CommonModule, typeof i2.ReactiveFormsModule, typeof i3.FvEntryFieldComponent, typeof i4.FvDateFieldComponent, typeof i5.FvMonthYearFieldComponent, typeof i6.FvNumberFieldComponent, typeof i7.FvCheckboxComponent, typeof i8.FvRadioGroupComponent, typeof i9.FvDropdownComponent, typeof i10.FvFileSelectorComponent, typeof i11.FvImageSelectorComponent, typeof i12.FvRichTextEditorComponent, typeof i13.FvNameCodeComponent, typeof i14.AddUpdateFormComponent], [typeof i3.FvEntryFieldComponent, typeof i4.FvDateFieldComponent, typeof i5.FvMonthYearFieldComponent, typeof i6.FvNumberFieldComponent, typeof i7.FvCheckboxComponent, typeof i8.FvRadioGroupComponent, typeof i9.FvDropdownComponent, typeof i10.FvFileSelectorComponent, typeof i11.FvImageSelectorComponent, typeof i12.FvRichTextEditorComponent, typeof i13.FvNameCodeComponent, typeof i14.AddUpdateFormComponent]>;
|
|
17
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<FvControlsModule>;
|
|
18
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -6,7 +6,8 @@ export interface DropdownOption {
|
|
|
6
6
|
label: string;
|
|
7
7
|
value: string | number;
|
|
8
8
|
}
|
|
9
|
-
export declare class FvDropdownComponent implements OnInit, OnDestroy {
|
|
9
|
+
export declare class FvDropdownComponent implements OnInit, OnDestroy, OnChanges {
|
|
10
|
+
private el;
|
|
10
11
|
label: string;
|
|
11
12
|
placeholder: string;
|
|
12
13
|
options: DropdownOption[];
|
|
@@ -16,15 +17,26 @@ export declare class FvDropdownComponent implements OnInit, OnDestroy {
|
|
|
16
17
|
valueChange: EventEmitter<string | number>;
|
|
17
18
|
blur: EventEmitter<void>;
|
|
18
19
|
focus: EventEmitter<void>;
|
|
20
|
+
searchInput: ElementRef<HTMLInputElement>;
|
|
19
21
|
errorMessage: string | null;
|
|
20
22
|
isOpen: boolean;
|
|
21
23
|
private subscription?;
|
|
24
|
+
searchControl: FormControl<string | null>;
|
|
25
|
+
filteredOptions: DropdownOption[];
|
|
26
|
+
constructor(el: ElementRef);
|
|
22
27
|
ngOnInit(): void;
|
|
23
28
|
ngOnDestroy(): void;
|
|
29
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
24
30
|
private validateValue;
|
|
31
|
+
filterOptions(term: string): void;
|
|
25
32
|
toggleDropdown(): void;
|
|
33
|
+
openDropdown(): void;
|
|
34
|
+
onContainerClick(event: MouseEvent): void;
|
|
35
|
+
closeDropdown(): void;
|
|
26
36
|
selectOption(option: DropdownOption): void;
|
|
27
37
|
onBlur(): void;
|
|
38
|
+
onClickOutside(event: MouseEvent): void;
|
|
39
|
+
onInputFocus(): void;
|
|
28
40
|
isRequired(): boolean;
|
|
29
41
|
getErrorMessage(): string;
|
|
30
42
|
getSelectedLabel(): string;
|
|
@@ -10,6 +10,8 @@ export declare class FvEntryFieldComponent implements OnInit, OnDestroy {
|
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
readonly: boolean;
|
|
12
12
|
type: 'text' | 'password' | 'email';
|
|
13
|
+
allowAlphabetsOnly: boolean;
|
|
14
|
+
maxLength: number | null;
|
|
13
15
|
valueChange: EventEmitter<string>;
|
|
14
16
|
blur: EventEmitter<void>;
|
|
15
17
|
focus: EventEmitter<void>;
|
|
@@ -20,8 +22,9 @@ export declare class FvEntryFieldComponent implements OnInit, OnDestroy {
|
|
|
20
22
|
private validateValue;
|
|
21
23
|
onBlur(event?: FocusEvent): void;
|
|
22
24
|
onFocus(event?: FocusEvent): void;
|
|
25
|
+
onInput(event: Event): void;
|
|
23
26
|
isRequired(): boolean;
|
|
24
27
|
getErrorMessage(): string;
|
|
25
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<FvEntryFieldComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FvEntryFieldComponent, "fv-entry-field", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "valueChange": "valueChange"; "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvEntryFieldComponent, "fv-entry-field", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "type": { "alias": "type"; "required": false; }; "allowAlphabetsOnly": { "alias": "allowAlphabetsOnly"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; }, { "valueChange": "valueChange"; "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
27
30
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FvEsiFieldComponent implements OnInit, OnDestroy {
|
|
6
|
+
label: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
schema: ValidationSchema;
|
|
10
|
+
blur: EventEmitter<void>;
|
|
11
|
+
focus: EventEmitter<void>;
|
|
12
|
+
errorMessage: string | null;
|
|
13
|
+
private subscription?;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
onInput(event: Event): void;
|
|
17
|
+
validateValue(value: any): void;
|
|
18
|
+
isRequired(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvEsiFieldComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvEsiFieldComponent, "fv-esi-field", never, { "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; }, { "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FvIbanFieldComponent implements OnInit, OnDestroy {
|
|
6
|
+
label: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
schema: ValidationSchema;
|
|
10
|
+
blur: EventEmitter<void>;
|
|
11
|
+
focus: EventEmitter<void>;
|
|
12
|
+
errorMessage: string | null;
|
|
13
|
+
private subscription?;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
onInput(event: Event): void;
|
|
17
|
+
validateValue(value: any): void;
|
|
18
|
+
isRequired(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvIbanFieldComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvIbanFieldComponent, "fv-iban-field", never, { "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; }, { "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FvIfscFieldComponent implements OnInit, OnDestroy {
|
|
6
|
+
label: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
schema: ValidationSchema;
|
|
10
|
+
blur: EventEmitter<void>;
|
|
11
|
+
focus: EventEmitter<void>;
|
|
12
|
+
errorMessage: string | null;
|
|
13
|
+
private subscription?;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
onInput(event: Event): void;
|
|
17
|
+
validateValue(value: any): void;
|
|
18
|
+
isRequired(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvIfscFieldComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvIfscFieldComponent, "fv-ifsc-field", never, { "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; }, { "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FvMicrFieldComponent implements OnInit, OnDestroy {
|
|
6
|
+
label: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
schema: ValidationSchema;
|
|
10
|
+
blur: EventEmitter<void>;
|
|
11
|
+
focus: EventEmitter<void>;
|
|
12
|
+
errorMessage: string | null;
|
|
13
|
+
private subscription?;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
onInput(event: Event): void;
|
|
17
|
+
validateValue(value: any): void;
|
|
18
|
+
isRequired(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvMicrFieldComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvMicrFieldComponent, "fv-micr-field", never, { "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; }, { "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface SearchSelectOption {
|
|
6
|
+
code: string;
|
|
7
|
+
name: string;
|
|
8
|
+
value: any;
|
|
9
|
+
}
|
|
10
|
+
export declare class FvNameCodeComponent implements ControlValueAccessor {
|
|
11
|
+
label: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
options: SearchSelectOption[];
|
|
14
|
+
schema?: ValidationSchema;
|
|
15
|
+
control?: FormControl;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
selectionChange: EventEmitter<any>;
|
|
18
|
+
searchControl: FormControl<string | null>;
|
|
19
|
+
filteredOptions: SearchSelectOption[];
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
private onChange;
|
|
22
|
+
private onTouched;
|
|
23
|
+
value: any;
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
filterOptions(term: string): void;
|
|
26
|
+
openDropdown(): void;
|
|
27
|
+
onBlur(): void;
|
|
28
|
+
closeDropdown(): void;
|
|
29
|
+
selectOption(option: SearchSelectOption): void;
|
|
30
|
+
writeValue(value: any): void;
|
|
31
|
+
registerOnChange(fn: any): void;
|
|
32
|
+
registerOnTouched(fn: any): void;
|
|
33
|
+
setDisabledState(isDisabled: boolean): void;
|
|
34
|
+
isInvalid(): boolean;
|
|
35
|
+
isRequired(): boolean;
|
|
36
|
+
getErrorMessage(): string;
|
|
37
|
+
getReadableError(key: string): string;
|
|
38
|
+
onClickOutside(event: MouseEvent): void;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvNameCodeComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvNameCodeComponent, "fv-name-code", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FvPfFieldComponent implements OnInit, OnDestroy {
|
|
6
|
+
label: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
schema: ValidationSchema;
|
|
10
|
+
blur: EventEmitter<void>;
|
|
11
|
+
focus: EventEmitter<void>;
|
|
12
|
+
errorMessage: string | null;
|
|
13
|
+
private subscription?;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
onInput(event: Event): void;
|
|
17
|
+
validateValue(value: any): void;
|
|
18
|
+
isRequired(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvPfFieldComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvPfFieldComponent, "fv-pf-field", never, { "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; }, { "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FvPhoneFieldComponent implements OnInit, OnDestroy {
|
|
6
|
+
label: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
schema: ValidationSchema;
|
|
10
|
+
blur: EventEmitter<void>;
|
|
11
|
+
focus: EventEmitter<void>;
|
|
12
|
+
countryCode: string;
|
|
13
|
+
countryCodes: string[];
|
|
14
|
+
errorMessage: string | null;
|
|
15
|
+
private subscription?;
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
onInput(event: Event): void;
|
|
19
|
+
validateValue(value: any): void;
|
|
20
|
+
onBlur(): void;
|
|
21
|
+
onFocus(): void;
|
|
22
|
+
isRequired(): boolean;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvPhoneFieldComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvPhoneFieldComponent, "fv-phone-field", never, { "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; }, { "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FvUanFieldComponent implements OnInit, OnDestroy {
|
|
6
|
+
label: string;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
schema: ValidationSchema;
|
|
10
|
+
blur: EventEmitter<void>;
|
|
11
|
+
focus: EventEmitter<void>;
|
|
12
|
+
errorMessage: string | null;
|
|
13
|
+
private subscription?;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
onInput(event: Event): void;
|
|
17
|
+
validateValue(value: any): void;
|
|
18
|
+
isRequired(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvUanFieldComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvUanFieldComponent, "fv-uan-field", never, { "label": { "alias": "label"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; }, { "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
|
|
3
|
+
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface QueryFormColumn {
|
|
6
|
+
label: string;
|
|
7
|
+
key: string;
|
|
8
|
+
type: 'dropdown' | 'text' | 'number' | 'date' | 'month' | 'file' | 'name-code' | 'phone' | 'uan' | 'pf' | 'esi' | 'ifsc' | 'micr' | 'iban';
|
|
9
|
+
options?: any[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
onChange?: (value: any) => void;
|
|
12
|
+
accept?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface QueryFormRow {
|
|
17
|
+
columns: QueryFormColumn[];
|
|
18
|
+
}
|
|
19
|
+
export interface QueryFormConfig {
|
|
20
|
+
title: string;
|
|
21
|
+
rows: QueryFormRow[];
|
|
22
|
+
buttonText?: string;
|
|
23
|
+
showExportButton?: boolean;
|
|
24
|
+
exportFormats?: string[];
|
|
25
|
+
showBackButton?: boolean;
|
|
26
|
+
backButtonText?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class QueryFormComponent implements OnInit, OnDestroy {
|
|
29
|
+
private fb;
|
|
30
|
+
config: QueryFormConfig;
|
|
31
|
+
onSubmit: EventEmitter<any>;
|
|
32
|
+
onExport: EventEmitter<string>;
|
|
33
|
+
onBack: EventEmitter<void>;
|
|
34
|
+
form: FormGroup;
|
|
35
|
+
showExportMenu: boolean;
|
|
36
|
+
showValidationError: boolean;
|
|
37
|
+
private subs;
|
|
38
|
+
constructor(fb: FormBuilder);
|
|
39
|
+
ngOnInit(): void;
|
|
40
|
+
ngOnDestroy(): void;
|
|
41
|
+
getControl(key: string): FormControl;
|
|
42
|
+
getSchema(column: QueryFormColumn): ValidationSchema;
|
|
43
|
+
mapType(type: string): any;
|
|
44
|
+
mapSearchOptions(options: any[]): any[];
|
|
45
|
+
triggerFileUpload(columnKey: string): void;
|
|
46
|
+
toggleExportMenu(event: Event): void;
|
|
47
|
+
clickOutside(event: any): void;
|
|
48
|
+
exportToFormat(format: string): void;
|
|
49
|
+
onButtonClick(): void;
|
|
50
|
+
onBackClick(): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryFormComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QueryFormComponent, "lib-query-form", never, { "config": { "alias": "config"; "required": false; }; }, { "onSubmit": "onSubmit"; "onExport": "onExport"; "onBack": "onBack"; }, never, never, true, never>;
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fovestta2/web-angular",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Angular UI controls for Fovestta",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^18.0.0",
|
|
7
7
|
"@angular/core": "^18.0.0",
|
|
8
8
|
"@angular/forms": "^18.0.0",
|
|
9
|
-
"@fovestta2/validation-engine": "^1.0.
|
|
9
|
+
"@fovestta2/validation-engine": "^1.0.2"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
|
@@ -4,8 +4,18 @@ export * from './lib/fv-date-field/fv-date-field.component';
|
|
|
4
4
|
export * from './lib/fv-month-year-field/fv-month-year-field.component';
|
|
5
5
|
export * from './lib/fv-number-field/fv-number-field.component';
|
|
6
6
|
export * from './lib/fv-checkbox/fv-checkbox.component';
|
|
7
|
-
export { FvRadioGroupComponent, type RadioOption } from './lib/fv-radio-group/fv-radio-group.component';
|
|
8
|
-
export { FvDropdownComponent, type DropdownOption } from './lib/fv-dropdown/fv-dropdown.component';
|
|
9
|
-
export { FvFileSelectorComponent, type FileInfo } from './lib/fv-file-selector/fv-file-selector.component';
|
|
10
|
-
export { FvImageSelectorComponent, type ImageInfo } from './lib/fv-image-selector/fv-image-selector.component';
|
|
7
|
+
export { FvRadioGroupComponent, type RadioOption, } from './lib/fv-radio-group/fv-radio-group.component';
|
|
8
|
+
export { FvDropdownComponent, type DropdownOption, } from './lib/fv-dropdown/fv-dropdown.component';
|
|
9
|
+
export { FvFileSelectorComponent, type FileInfo, } from './lib/fv-file-selector/fv-file-selector.component';
|
|
10
|
+
export { FvImageSelectorComponent, type ImageInfo, } from './lib/fv-image-selector/fv-image-selector.component';
|
|
11
11
|
export * from './lib/fv-rich-text-editor/fv-rich-text-editor.component';
|
|
12
|
+
export * from './lib/add-update-form/add-update-form.component';
|
|
13
|
+
export * from './lib/query-form/query-form.component';
|
|
14
|
+
export { FvNameCodeComponent, type SearchSelectOption } from './lib/fv-name-code/fv-name-code.component';
|
|
15
|
+
export * from './lib/fv-phone-field/fv-phone-field.component';
|
|
16
|
+
export * from './lib/fv-uan-field/fv-uan-field.component';
|
|
17
|
+
export * from './lib/fv-pf-field/fv-pf-field.component';
|
|
18
|
+
export * from './lib/fv-esi-field/fv-esi-field.component';
|
|
19
|
+
export * from './lib/fv-ifsc-field/fv-ifsc-field.component';
|
|
20
|
+
export * from './lib/fv-micr-field/fv-micr-field.component';
|
|
21
|
+
export * from './lib/fv-iban-field/fv-iban-field.component';
|