@fovestta2/web-angular 1.0.7 → 1.0.11
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 +273 -132
- package/esm2022/lib/fv-date-field/fv-date-field.component.mjs +4 -6
- package/esm2022/lib/fv-dropdown/fv-dropdown.component.mjs +7 -6
- package/esm2022/lib/fv-email-field/fv-email-field.component.mjs +2 -5
- package/esm2022/lib/fv-entry-field/fv-entry-field.component.mjs +2 -4
- package/esm2022/lib/fv-file-selector/fv-file-selector.component.mjs +4 -4
- package/esm2022/lib/fv-iban-field/fv-iban-field.component.mjs +4 -3
- package/esm2022/lib/fv-image-selector/fv-image-selector.component.mjs +128 -33
- package/esm2022/lib/fv-micr-field/fv-micr-field.component.mjs +4 -3
- package/esm2022/lib/fv-month-year-field/fv-month-year-field.component.mjs +17 -9
- package/esm2022/lib/fv-name-code/fv-name-code.component.mjs +3 -3
- package/esm2022/lib/fv-number-field/fv-number-field.component.mjs +4 -6
- package/esm2022/lib/fv-password-field/fv-password-field.component.mjs +2 -4
- package/esm2022/lib/fv-phone-field/fv-phone-field.component.mjs +15 -6
- package/esm2022/lib/fv-radio-group/fv-radio-group.component.mjs +3 -3
- package/esm2022/lib/fv-rich-text-editor/fv-rich-text-editor.component.mjs +4 -6
- package/esm2022/lib/fv-service-period/fv-service-period.component.mjs +110 -0
- package/fesm2022/fovestta2-web-angular.mjs +562 -216
- package/fesm2022/fovestta2-web-angular.mjs.map +1 -1
- package/lib/add-update-form/add-update-form.component.d.ts +16 -4
- package/lib/fv-image-selector/fv-image-selector.component.d.ts +24 -0
- package/lib/fv-phone-field/fv-phone-field.component.d.ts +1 -0
- package/lib/fv-service-period/fv-service-period.component.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EventEmitter, OnInit, OnDestroy, AfterViewInit, ElementRef } from '@angular/core';
|
|
2
|
-
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
2
|
+
import { AbstractControl, FormBuilder, FormControl, FormGroup, FormArray } from '@angular/forms';
|
|
3
3
|
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
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';
|
|
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' | 'service-period';
|
|
6
6
|
export type ValidationType = 'required' | 'email' | 'minLength' | 'maxLength' | 'pattern' | 'min' | 'max' | 'custom' | 'passwordComplexity';
|
|
7
7
|
export interface FieldValidation {
|
|
8
8
|
type: ValidationType;
|
|
@@ -36,10 +36,16 @@ export interface FormColumn {
|
|
|
36
36
|
allowAlphabetsOnly?: boolean;
|
|
37
37
|
maxLength?: number;
|
|
38
38
|
layout?: 'vertical' | 'horizontal';
|
|
39
|
+
servicePeriodConfig?: {
|
|
40
|
+
startField: string;
|
|
41
|
+
endField: string;
|
|
42
|
+
};
|
|
39
43
|
}
|
|
40
44
|
export interface FormSection {
|
|
41
45
|
title?: string;
|
|
42
46
|
fields: FormColumn[];
|
|
47
|
+
isRepeatable?: boolean;
|
|
48
|
+
sectionKey?: string;
|
|
43
49
|
}
|
|
44
50
|
export interface FormConfig {
|
|
45
51
|
sections: FormSection[];
|
|
@@ -71,12 +77,18 @@ export declare class AddUpdateFormComponent implements OnInit, OnDestroy, AfterV
|
|
|
71
77
|
getControl(name: string): FormControl;
|
|
72
78
|
getSchema(column: FormColumn): ValidationSchema;
|
|
73
79
|
isImageField(column: FormColumn): boolean;
|
|
80
|
+
getSectionArray(section: FormSection): FormArray;
|
|
81
|
+
createSectionGroup(section: FormSection): FormGroup;
|
|
82
|
+
addSectionItem(section: FormSection): void;
|
|
83
|
+
removeSectionItem(section: FormSection, index: number): void;
|
|
84
|
+
isControlInvalid(control: AbstractControl | null): boolean;
|
|
85
|
+
getErrorMessageForControl(column: FormColumn, control: AbstractControl | null): string;
|
|
74
86
|
initializeForm(): void;
|
|
75
87
|
ngOnDestroy(): void;
|
|
76
|
-
handleFieldChange(fieldName: string, eventValue?: any): void;
|
|
88
|
+
handleFieldChange(fieldName: string, eventValue?: any, control?: AbstractControl): void;
|
|
77
89
|
formatMonthYearValue(value: string): string;
|
|
78
90
|
parseMonthYearValue(value: string): string;
|
|
79
|
-
handleMonthYearChange(fieldName: string, value: string): void;
|
|
91
|
+
handleMonthYearChange(fieldName: string, value: string, control?: AbstractControl): void;
|
|
80
92
|
handleMonthYearBlur(fieldName: string): void;
|
|
81
93
|
handleMonthYearPickerChange(fieldName: string, value: string): void;
|
|
82
94
|
getMonthYearPickerValue(fieldName: string): string;
|
|
@@ -21,14 +21,38 @@ export declare class FvImageSelectorComponent implements OnInit, OnDestroy {
|
|
|
21
21
|
valueChange: EventEmitter<ImageInfo | null>;
|
|
22
22
|
blur: EventEmitter<void>;
|
|
23
23
|
imageInput: ElementRef<HTMLInputElement>;
|
|
24
|
+
editorImage: ElementRef<HTMLImageElement>;
|
|
24
25
|
errorMessage: string | null;
|
|
25
26
|
selectedImage: ImageInfo | null;
|
|
26
27
|
private subscription?;
|
|
28
|
+
isEditorOpen: boolean;
|
|
29
|
+
editImageSrc: string | null;
|
|
30
|
+
editImageName: string;
|
|
31
|
+
scale: number;
|
|
32
|
+
minScale: number;
|
|
33
|
+
maxScale: number;
|
|
34
|
+
step: number;
|
|
35
|
+
panX: number;
|
|
36
|
+
panY: number;
|
|
37
|
+
isDragging: boolean;
|
|
38
|
+
startX: number;
|
|
39
|
+
startY: number;
|
|
27
40
|
constructor(sanitizer: DomSanitizer);
|
|
28
41
|
ngOnInit(): void;
|
|
29
42
|
ngOnDestroy(): void;
|
|
30
43
|
private validateValue;
|
|
31
44
|
onImageSelected(event: Event): void;
|
|
45
|
+
openEditor(): void;
|
|
46
|
+
closeEditor(): void;
|
|
47
|
+
startDrag(event: MouseEvent): void;
|
|
48
|
+
onDrag(event: MouseEvent): void;
|
|
49
|
+
endDrag(): void;
|
|
50
|
+
onSliderChange(event: Event): void;
|
|
51
|
+
zoomIn(): void;
|
|
52
|
+
zoomOut(): void;
|
|
53
|
+
resetEditor(): void;
|
|
54
|
+
applyCrop(): void;
|
|
55
|
+
private dataURLtoBlob;
|
|
32
56
|
openImageDialog(): void;
|
|
33
57
|
removeImage(): void;
|
|
34
58
|
formatFileSize(bytes: number): string;
|
|
@@ -21,6 +21,7 @@ export declare class FvPhoneFieldComponent implements OnInit, OnDestroy, OnChang
|
|
|
21
21
|
onBlur(): void;
|
|
22
22
|
onFocus(): void;
|
|
23
23
|
isRequired(): boolean;
|
|
24
|
+
getErrorMessage(): string;
|
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<FvPhoneFieldComponent, never>;
|
|
25
26
|
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>;
|
|
26
27
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FvServicePeriodComponent implements OnInit, OnDestroy {
|
|
5
|
+
label: string;
|
|
6
|
+
group: FormGroup;
|
|
7
|
+
startField: string;
|
|
8
|
+
endField: string;
|
|
9
|
+
control?: FormControl;
|
|
10
|
+
years: number;
|
|
11
|
+
months: number;
|
|
12
|
+
days: number;
|
|
13
|
+
totalDays: number;
|
|
14
|
+
private sub;
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
calculatePeriod(): void;
|
|
18
|
+
resetValues(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvServicePeriodComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvServicePeriodComponent, "fv-service-period", never, { "label": { "alias": "label"; "required": false; }; "group": { "alias": "group"; "required": false; }; "startField": { "alias": "startField"; "required": false; }; "endField": { "alias": "endField"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
|
+
}
|