@fovestta2/web-angular 1.0.21 → 1.0.23
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 +33 -5
- package/esm2022/lib/fv-controls.module.mjs +10 -4
- package/esm2022/lib/fv-dropdown/fv-dropdown.component.mjs +111 -37
- package/esm2022/lib/fv-file-selector/fv-file-selector.component.mjs +3 -3
- package/esm2022/lib/fv-name-code/fv-name-code.component.mjs +20 -7
- package/esm2022/lib/fv-time-field/fv-time-field.component.mjs +166 -0
- package/esm2022/lib/query-form/query-form.component.mjs +2 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/fovestta2-web-angular.mjs +332 -53
- package/fesm2022/fovestta2-web-angular.mjs.map +1 -1
- package/lib/add-update-form/add-update-form.component.d.ts +1 -1
- package/lib/fv-controls.module.d.ts +2 -1
- package/lib/fv-dropdown/fv-dropdown.component.d.ts +19 -5
- package/lib/fv-name-code/fv-name-code.component.d.ts +5 -4
- package/lib/fv-time-field/fv-time-field.component.d.ts +40 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
|
@@ -2,7 +2,7 @@ import { EventEmitter, OnInit, OnDestroy, AfterViewInit, ElementRef } from '@ang
|
|
|
2
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' | 'service-period' | 'document';
|
|
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' | 'document' | 'time';
|
|
6
6
|
export type ValidationType = 'required' | 'email' | 'minLength' | 'maxLength' | 'pattern' | 'min' | 'max' | 'custom' | 'passwordComplexity';
|
|
7
7
|
export interface FieldValidation {
|
|
8
8
|
type: ValidationType;
|
|
@@ -17,8 +17,9 @@ import * as i15 from "./query-form/query-form.component";
|
|
|
17
17
|
import * as i16 from "./fv-email-field/fv-email-field.component";
|
|
18
18
|
import * as i17 from "./fv-password-field/fv-password-field.component";
|
|
19
19
|
import * as i18 from "./fv-document-field/fv-document-field.component";
|
|
20
|
+
import * as i19 from "./fv-time-field/fv-time-field.component";
|
|
20
21
|
export declare class FvControlsModule {
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<FvControlsModule, never>;
|
|
22
|
-
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 i15.QueryFormComponent, typeof i16.FvEmailFieldComponent, typeof i17.FvPasswordFieldComponent, typeof i18.FvDocumentFieldComponent], [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 i15.QueryFormComponent, typeof i16.FvEmailFieldComponent, typeof i17.FvPasswordFieldComponent, typeof i18.FvDocumentFieldComponent]>;
|
|
23
|
+
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 i15.QueryFormComponent, typeof i16.FvEmailFieldComponent, typeof i17.FvPasswordFieldComponent, typeof i18.FvDocumentFieldComponent, typeof i19.FvTimeFieldComponent], [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 i15.QueryFormComponent, typeof i16.FvEmailFieldComponent, typeof i17.FvPasswordFieldComponent, typeof i18.FvDocumentFieldComponent, typeof i19.FvTimeFieldComponent]>;
|
|
23
24
|
static ɵinj: i0.ɵɵInjectorDeclaration<FvControlsModule>;
|
|
24
25
|
}
|
|
@@ -6,11 +6,22 @@ export interface DropdownOption {
|
|
|
6
6
|
label: string;
|
|
7
7
|
value: string | number;
|
|
8
8
|
}
|
|
9
|
+
export interface DropdownGroup {
|
|
10
|
+
label: string;
|
|
11
|
+
items: DropdownOption[];
|
|
12
|
+
}
|
|
13
|
+
export interface DropdownViewItem {
|
|
14
|
+
isGroupLabel: boolean;
|
|
15
|
+
label: string;
|
|
16
|
+
value?: string | number;
|
|
17
|
+
option?: DropdownOption;
|
|
18
|
+
isChild?: boolean;
|
|
19
|
+
}
|
|
9
20
|
export declare class FvDropdownComponent implements OnInit, OnDestroy, OnChanges {
|
|
10
21
|
private el;
|
|
11
22
|
label: string;
|
|
12
23
|
placeholder: string;
|
|
13
|
-
options: DropdownOption[];
|
|
24
|
+
options: (DropdownOption | DropdownGroup)[];
|
|
14
25
|
schema: ValidationSchema;
|
|
15
26
|
control: FormControl;
|
|
16
27
|
disabled: boolean;
|
|
@@ -22,7 +33,7 @@ export declare class FvDropdownComponent implements OnInit, OnDestroy, OnChanges
|
|
|
22
33
|
isOpen: boolean;
|
|
23
34
|
private subscription?;
|
|
24
35
|
searchControl: FormControl<string | null>;
|
|
25
|
-
filteredOptions:
|
|
36
|
+
filteredOptions: DropdownViewItem[];
|
|
26
37
|
highlightedIndex: number;
|
|
27
38
|
constructor(el: ElementRef);
|
|
28
39
|
ngOnInit(): void;
|
|
@@ -30,20 +41,23 @@ export declare class FvDropdownComponent implements OnInit, OnDestroy, OnChanges
|
|
|
30
41
|
ngOnChanges(changes: SimpleChanges): void;
|
|
31
42
|
private validateValue;
|
|
32
43
|
filterOptions(term: string): void;
|
|
44
|
+
private generateViewItems;
|
|
45
|
+
private isGroup;
|
|
46
|
+
private findOption;
|
|
33
47
|
toggleDropdown(): void;
|
|
34
48
|
openDropdown(): void;
|
|
35
49
|
onContainerClick(event: MouseEvent): void;
|
|
36
50
|
closeDropdown(): void;
|
|
37
|
-
selectOption(
|
|
51
|
+
selectOption(viewItem: DropdownViewItem): void;
|
|
38
52
|
onKeyDown(event: KeyboardEvent): void;
|
|
53
|
+
private moveHighlight;
|
|
39
54
|
private scrollToHighlighted;
|
|
40
55
|
onBlur(): void;
|
|
41
56
|
onClickOutside(event: MouseEvent): void;
|
|
42
57
|
onInputFocus(): void;
|
|
43
58
|
isRequired(): boolean;
|
|
44
59
|
getErrorMessage(): string;
|
|
45
|
-
|
|
46
|
-
isSelected(option: DropdownOption): boolean;
|
|
60
|
+
isSelected(viewItem: DropdownViewItem): boolean;
|
|
47
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<FvDropdownComponent, never>;
|
|
48
62
|
static ɵcmp: i0.ɵɵComponentDeclaration<FvDropdownComponent, "fv-dropdown", 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; }; }, { "valueChange": "valueChange"; "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
49
63
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
3
|
import { ValidationSchema } from '@fovestta2/validation-engine';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -7,14 +7,14 @@ export interface SearchSelectOption {
|
|
|
7
7
|
name: string;
|
|
8
8
|
value: any;
|
|
9
9
|
}
|
|
10
|
-
export declare class FvNameCodeComponent implements ControlValueAccessor {
|
|
10
|
+
export declare class FvNameCodeComponent implements ControlValueAccessor, OnChanges {
|
|
11
11
|
label: string;
|
|
12
12
|
placeholder: string;
|
|
13
13
|
options: SearchSelectOption[];
|
|
14
14
|
schema?: ValidationSchema;
|
|
15
15
|
control?: FormControl;
|
|
16
16
|
disabled: boolean;
|
|
17
|
-
|
|
17
|
+
valueChange: EventEmitter<any>;
|
|
18
18
|
searchControl: FormControl<string | null>;
|
|
19
19
|
filteredOptions: SearchSelectOption[];
|
|
20
20
|
isOpen: boolean;
|
|
@@ -22,6 +22,7 @@ export declare class FvNameCodeComponent implements ControlValueAccessor {
|
|
|
22
22
|
private onChange;
|
|
23
23
|
private onTouched;
|
|
24
24
|
value: any;
|
|
25
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
26
|
ngOnInit(): void;
|
|
26
27
|
filterOptions(term: string): void;
|
|
27
28
|
openDropdown(): void;
|
|
@@ -40,5 +41,5 @@ export declare class FvNameCodeComponent implements ControlValueAccessor {
|
|
|
40
41
|
onKeyDown(event: KeyboardEvent): void;
|
|
41
42
|
private scrollToHighlighted;
|
|
42
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<FvNameCodeComponent, never>;
|
|
43
|
-
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; }; }, { "
|
|
44
|
+
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; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
44
45
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges } 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 FvTimeFieldComponent implements OnInit, OnDestroy, OnChanges {
|
|
6
|
+
label: string;
|
|
7
|
+
schema: ValidationSchema;
|
|
8
|
+
control: FormControl;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
readonly: boolean;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
valueChange: EventEmitter<string>;
|
|
13
|
+
blur: EventEmitter<void>;
|
|
14
|
+
focus: EventEmitter<void>;
|
|
15
|
+
errorMessage: string | null;
|
|
16
|
+
private subscription?;
|
|
17
|
+
showPicker: boolean;
|
|
18
|
+
hours: number[];
|
|
19
|
+
minutes: number[];
|
|
20
|
+
selectedHour: number | null;
|
|
21
|
+
selectedMinute: number | null;
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
ngOnDestroy(): void;
|
|
24
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
|
+
private parseTimeValue;
|
|
26
|
+
private validateValue;
|
|
27
|
+
togglePicker(): void;
|
|
28
|
+
selectHour(hour: number): void;
|
|
29
|
+
selectMinute(minute: number): void;
|
|
30
|
+
private updateTimeValue;
|
|
31
|
+
padZero(num: number): string;
|
|
32
|
+
getDisplayValue(): string;
|
|
33
|
+
onBlur(event?: FocusEvent): void;
|
|
34
|
+
onFocus(event?: FocusEvent): void;
|
|
35
|
+
isRequired(): boolean;
|
|
36
|
+
getErrorMessage(): string;
|
|
37
|
+
closePicker(): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FvTimeFieldComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FvTimeFieldComponent, "fv-time-field", never, { "label": { "alias": "label"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "valueChange": "valueChange"; "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
|
|
40
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ 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
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';
|
|
8
|
+
export { FvDropdownComponent, type DropdownOption, type DropdownGroup, } from './lib/fv-dropdown/fv-dropdown.component';
|
|
9
9
|
export { FvFileSelectorComponent, type FileInfo, } from './lib/fv-file-selector/fv-file-selector.component';
|
|
10
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';
|
|
@@ -23,3 +23,4 @@ export * from './lib/fv-email-field/fv-email-field.component';
|
|
|
23
23
|
export * from './lib/fv-password-field/fv-password-field.component';
|
|
24
24
|
export * from './lib/fv-document-field/fv-document-field.component';
|
|
25
25
|
export * from './lib/fv-service-period/fv-service-period.component';
|
|
26
|
+
export * from './lib/fv-time-field/fv-time-field.component';
|