@fovestta2/web-angular 1.0.8 → 1.0.12

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 (23) hide show
  1. package/esm2022/lib/add-update-form/add-update-form.component.mjs +281 -132
  2. package/esm2022/lib/fv-date-field/fv-date-field.component.mjs +4 -6
  3. package/esm2022/lib/fv-dropdown/fv-dropdown.component.mjs +4 -4
  4. package/esm2022/lib/fv-email-field/fv-email-field.component.mjs +2 -5
  5. package/esm2022/lib/fv-entry-field/fv-entry-field.component.mjs +2 -4
  6. package/esm2022/lib/fv-file-selector/fv-file-selector.component.mjs +4 -4
  7. package/esm2022/lib/fv-iban-field/fv-iban-field.component.mjs +4 -3
  8. package/esm2022/lib/fv-image-selector/fv-image-selector.component.mjs +128 -33
  9. package/esm2022/lib/fv-micr-field/fv-micr-field.component.mjs +4 -3
  10. package/esm2022/lib/fv-month-year-field/fv-month-year-field.component.mjs +6 -8
  11. package/esm2022/lib/fv-name-code/fv-name-code.component.mjs +3 -3
  12. package/esm2022/lib/fv-number-field/fv-number-field.component.mjs +4 -6
  13. package/esm2022/lib/fv-password-field/fv-password-field.component.mjs +2 -4
  14. package/esm2022/lib/fv-phone-field/fv-phone-field.component.mjs +15 -6
  15. package/esm2022/lib/fv-rich-text-editor/fv-rich-text-editor.component.mjs +4 -6
  16. package/esm2022/lib/fv-service-period/fv-service-period.component.mjs +110 -0
  17. package/fesm2022/fovestta2-web-angular.mjs +554 -211
  18. package/fesm2022/fovestta2-web-angular.mjs.map +1 -1
  19. package/lib/add-update-form/add-update-form.component.d.ts +20 -4
  20. package/lib/fv-image-selector/fv-image-selector.component.d.ts +24 -0
  21. package/lib/fv-phone-field/fv-phone-field.component.d.ts +1 -0
  22. package/lib/fv-service-period/fv-service-period.component.d.ts +21 -0
  23. 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[];
@@ -51,6 +57,10 @@ export interface FormConfig {
51
57
  cancelLabel?: string;
52
58
  formTitle?: string;
53
59
  maxColsPerRow?: number;
60
+ disableSubmit?: boolean;
61
+ disableCancel?: boolean;
62
+ hideSubmit?: boolean;
63
+ hideCancel?: boolean;
54
64
  }
55
65
  export declare class AddUpdateFormComponent implements OnInit, OnDestroy, AfterViewInit {
56
66
  private fb;
@@ -71,12 +81,18 @@ export declare class AddUpdateFormComponent implements OnInit, OnDestroy, AfterV
71
81
  getControl(name: string): FormControl;
72
82
  getSchema(column: FormColumn): ValidationSchema;
73
83
  isImageField(column: FormColumn): boolean;
84
+ getSectionArray(section: FormSection): FormArray;
85
+ createSectionGroup(section: FormSection): FormGroup;
86
+ addSectionItem(section: FormSection): void;
87
+ removeSectionItem(section: FormSection, index: number): void;
88
+ isControlInvalid(control: AbstractControl | null): boolean;
89
+ getErrorMessageForControl(column: FormColumn, control: AbstractControl | null): string;
74
90
  initializeForm(): void;
75
91
  ngOnDestroy(): void;
76
- handleFieldChange(fieldName: string, eventValue?: any): void;
92
+ handleFieldChange(fieldName: string, eventValue?: any, control?: AbstractControl): void;
77
93
  formatMonthYearValue(value: string): string;
78
94
  parseMonthYearValue(value: string): string;
79
- handleMonthYearChange(fieldName: string, value: string): void;
95
+ handleMonthYearChange(fieldName: string, value: string, control?: AbstractControl): void;
80
96
  handleMonthYearBlur(fieldName: string): void;
81
97
  handleMonthYearPickerChange(fieldName: string, value: string): void;
82
98
  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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fovestta2/web-angular",
3
- "version": "1.0.8",
3
+ "version": "1.0.12",
4
4
  "description": "Angular UI controls for Fovestta",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^18.0.0",