@ieeesa-npm/presentation 0.0.1
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/README.md +24 -0
- package/esm2022/ieeesa-npm-presentation.mjs +5 -0
- package/esm2022/lib/assets/constants.json +91 -0
- package/esm2022/lib/components/autocomplete/autocomplete.component.mjs +143 -0
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +102 -0
- package/esm2022/lib/components/date-picker/date-picker.component.mjs +306 -0
- package/esm2022/lib/components/date-picker-header/date-picker-header.component.mjs +153 -0
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +310 -0
- package/esm2022/lib/components/form-error/form-error.component.mjs +24 -0
- package/esm2022/lib/components/input/input.component.mjs +78 -0
- package/esm2022/lib/components/notification/notification.component.mjs +43 -0
- package/esm2022/lib/components/radio/radio.component.mjs +93 -0
- package/esm2022/lib/components/search/search.component.mjs +137 -0
- package/esm2022/lib/components/select/select.component.mjs +253 -0
- package/esm2022/lib/components/text-area/text-area.component.mjs +31 -0
- package/esm2022/lib/date-formats.mjs +11 -0
- package/esm2022/lib/directives/dynamic-form-field/dynamic-form-field.directive.mjs +209 -0
- package/esm2022/lib/models/autocomplete-option.model.mjs +2 -0
- package/esm2022/lib/models/calendar.model.mjs +10 -0
- package/esm2022/lib/models/checkbox-option.model.mjs +2 -0
- package/esm2022/lib/models/date-picker.model.mjs +2 -0
- package/esm2022/lib/models/field-config.model.mjs +2 -0
- package/esm2022/lib/models/form-control-types.model.mjs +20 -0
- package/esm2022/lib/models/form-field.model.mjs +2 -0
- package/esm2022/lib/models/form-grid.model.mjs +2 -0
- package/esm2022/lib/models/form.model.mjs +2 -0
- package/esm2022/lib/models/radio-option.model.mjs +2 -0
- package/esm2022/lib/models/search.model.mjs +10 -0
- package/esm2022/lib/models/select-option.model.mjs +2 -0
- package/esm2022/lib/presentation.module.mjs +16 -0
- package/esm2022/lib/services/datepicker.service.mjs +55 -0
- package/esm2022/lib/services/form-utility.service.mjs +47 -0
- package/esm2022/lib/validation-patterns.mjs +7 -0
- package/esm2022/public-api.mjs +20 -0
- package/fesm2022/ieeesa-npm-presentation.mjs +1868 -0
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/autocomplete/autocomplete.component.d.ts +64 -0
- package/lib/components/checkbox/checkbox.component.d.ts +55 -0
- package/lib/components/date-picker/date-picker.component.d.ts +130 -0
- package/lib/components/date-picker-header/date-picker-header.component.d.ts +76 -0
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +186 -0
- package/lib/components/form-error/form-error.component.d.ts +15 -0
- package/lib/components/input/input.component.d.ts +34 -0
- package/lib/components/notification/notification.component.d.ts +21 -0
- package/lib/components/radio/radio.component.d.ts +49 -0
- package/lib/components/search/search.component.d.ts +66 -0
- package/lib/components/select/select.component.d.ts +116 -0
- package/lib/components/text-area/text-area.component.d.ts +11 -0
- package/lib/date-formats.d.ts +10 -0
- package/lib/directives/dynamic-form-field/dynamic-form-field.directive.d.ts +78 -0
- package/lib/models/autocomplete-option.model.d.ts +4 -0
- package/lib/models/calendar.model.d.ts +5 -0
- package/lib/models/checkbox-option.model.d.ts +6 -0
- package/lib/models/date-picker.model.d.ts +13 -0
- package/lib/models/field-config.model.d.ts +42 -0
- package/lib/models/form-control-types.model.d.ts +10 -0
- package/lib/models/form-field.model.d.ts +6 -0
- package/lib/models/form-grid.model.d.ts +7 -0
- package/lib/models/form.model.d.ts +7 -0
- package/lib/models/radio-option.model.d.ts +5 -0
- package/lib/models/search.model.d.ts +5 -0
- package/lib/models/select-option.model.d.ts +5 -0
- package/lib/presentation.module.d.ts +6 -0
- package/lib/services/datepicker.service.d.ts +48 -0
- package/lib/services/form-utility.service.d.ts +29 -0
- package/lib/validation-patterns.d.ts +6 -0
- package/package.json +25 -0
- package/public-api.d.ts +16 -0
- package/src/lib/assets/constants.json +91 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
+
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
4
|
+
import { DatePickerHeaderComponent } from '@presentation/components/date-picker-header/date-picker-header.component';
|
|
5
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
6
|
+
import { CalendarType } from '@presentation/models/calendar.model';
|
|
7
|
+
import { DatepickerService } from '@presentation/services/datepicker.service';
|
|
8
|
+
import { FormField } from '@presentation/models/form-field.model';
|
|
9
|
+
import { FormUtilityService } from '@presentation/services/form-utility.service';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class CustomDateAdapter extends MomentDateAdapter {
|
|
12
|
+
/**
|
|
13
|
+
* Overrides the getDayOfWeekNames method of MomentDateAdapter to show first letter of day in capital in date picker header.
|
|
14
|
+
* @return {string[]}
|
|
15
|
+
* @memberof CustomDateAdapter
|
|
16
|
+
*/
|
|
17
|
+
getDayOfWeekNames(): string[];
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomDateAdapter, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CustomDateAdapter>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Date selection of type SINGLE_DATE_SELECTION, DATE_RANGE_SELECTION and CALENDAR and handling of calendar events.
|
|
23
|
+
* @export
|
|
24
|
+
* @class DatePickerComponent
|
|
25
|
+
* @implements {FormField}
|
|
26
|
+
* @implements {OnInit}
|
|
27
|
+
* @implements {AfterViewInit}
|
|
28
|
+
*/
|
|
29
|
+
export declare class DatePickerComponent implements FormField, OnInit {
|
|
30
|
+
private fb;
|
|
31
|
+
private changeDetectorRef;
|
|
32
|
+
private datepickerService;
|
|
33
|
+
private formUtilityService;
|
|
34
|
+
config: FieldConfig;
|
|
35
|
+
group: FormGroup;
|
|
36
|
+
datePickerHeader: typeof DatePickerHeaderComponent;
|
|
37
|
+
calendarTypes: typeof CalendarType;
|
|
38
|
+
private _selectedDates;
|
|
39
|
+
/**
|
|
40
|
+
* Gets preselected dates as an input.
|
|
41
|
+
* @memberof DatePickerComponent
|
|
42
|
+
*/
|
|
43
|
+
set selectedDates(value: string[]);
|
|
44
|
+
/**
|
|
45
|
+
* Returns selected dates
|
|
46
|
+
* @readonly
|
|
47
|
+
* @type {string[]}
|
|
48
|
+
* @memberof DatePickerComponent
|
|
49
|
+
*/
|
|
50
|
+
get selectedDates(): string[];
|
|
51
|
+
private _selectedRange;
|
|
52
|
+
/**
|
|
53
|
+
* Gets preselected date range as an input.
|
|
54
|
+
* @memberof DatePickerComponent
|
|
55
|
+
*/
|
|
56
|
+
set selectedRange(value: string[]);
|
|
57
|
+
/**
|
|
58
|
+
* Returns selected date range
|
|
59
|
+
* @readonly
|
|
60
|
+
* @type {string[]}
|
|
61
|
+
* @memberof DatePickerComponent
|
|
62
|
+
*/
|
|
63
|
+
get selectedRange(): string[];
|
|
64
|
+
calendarType: CalendarType;
|
|
65
|
+
formControlName: string;
|
|
66
|
+
placeholderLabel: string;
|
|
67
|
+
isDisabled: boolean;
|
|
68
|
+
isLabelAlignedLeft: boolean;
|
|
69
|
+
datepickerLabel: string;
|
|
70
|
+
dateRange: {
|
|
71
|
+
minDate: string;
|
|
72
|
+
maxDate: string;
|
|
73
|
+
};
|
|
74
|
+
selectedDate: EventEmitter<string>;
|
|
75
|
+
selectedDateRange: EventEmitter<{
|
|
76
|
+
startDate: string;
|
|
77
|
+
endDate: string;
|
|
78
|
+
}>;
|
|
79
|
+
calendarSelectedDate: Date;
|
|
80
|
+
buttonActionsInfo: any;
|
|
81
|
+
constructor(fb: FormBuilder, changeDetectorRef: ChangeDetectorRef, datepickerService: DatepickerService, formUtilityService: FormUtilityService);
|
|
82
|
+
/**
|
|
83
|
+
* Implementation of ngOnInit lifecycle hook method to creates config if its undefined and sets components instance variables if config is defined. Sets the form group value if form group is defined.
|
|
84
|
+
* @memberof DatePickerComponent
|
|
85
|
+
*/
|
|
86
|
+
ngOnInit(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Initializes properties from the config input
|
|
89
|
+
* @memberof DatePickerComponent
|
|
90
|
+
*/
|
|
91
|
+
initializePropertiesFromConfig(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Handle date change event and emits the selected date.
|
|
94
|
+
* @memberof DatePickerComponent
|
|
95
|
+
*/
|
|
96
|
+
onDateChange(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Sets and emits selected date range
|
|
99
|
+
* @memberof DatePickerComponent
|
|
100
|
+
*/
|
|
101
|
+
onDateRangeChange(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the min and max date range.
|
|
104
|
+
* @param {(string | Date)} startDate
|
|
105
|
+
* @param {(string | Date)} endDate
|
|
106
|
+
* @memberof DatePickerComponent
|
|
107
|
+
*/
|
|
108
|
+
setDateRange(startDate: string | Date, endDate: string | Date): void;
|
|
109
|
+
/**
|
|
110
|
+
* Creates form group and initializes form value
|
|
111
|
+
* @param {string} [date]
|
|
112
|
+
* @memberof DatePickerComponent
|
|
113
|
+
*/
|
|
114
|
+
createFormGroup(date?: string): void;
|
|
115
|
+
/**
|
|
116
|
+
* Creates form group with range type of controls and sets the min and max range values.
|
|
117
|
+
* @param {string} [startDate]
|
|
118
|
+
* @param {string} [endDate]
|
|
119
|
+
* @memberof DatePickerComponent
|
|
120
|
+
*/
|
|
121
|
+
createFormGroupWithRangeControls(startDate?: string, endDate?: string): void;
|
|
122
|
+
/**
|
|
123
|
+
* Checks if the form control has required validator.
|
|
124
|
+
* @return {boolean}
|
|
125
|
+
* @memberof DatePickerComponent
|
|
126
|
+
*/
|
|
127
|
+
isRequired(): boolean;
|
|
128
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
129
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "ieeesa-date-picker", never, { "selectedDates": { "alias": "selectedDates"; "required": false; }; "selectedRange": { "alias": "selectedRange"; "required": false; }; "calendarType": { "alias": "calendarType"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholderLabel": { "alias": "placeholderLabel"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isLabelAlignedLeft": { "alias": "isLabelAlignedLeft"; "required": false; }; "datepickerLabel": { "alias": "datepickerLabel"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; }, { "selectedDate": "selectedDate"; "selectedDateRange": "selectedDateRange"; }, never, never, true, never>;
|
|
130
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { MatCalendar } from '@angular/material/datepicker';
|
|
3
|
+
import { DateAdapter, MatDateFormats } from '@angular/material/core';
|
|
4
|
+
import { FormGroup } from '@angular/forms';
|
|
5
|
+
import { DatepickerService } from '@presentation/services/datepicker.service';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Provides implementation of date picker custom header and being used in date-picker component.
|
|
10
|
+
* @export
|
|
11
|
+
* @class DatePickerHeaderComponent
|
|
12
|
+
* @implements {OnInit}
|
|
13
|
+
* @implements {OnDestroy}
|
|
14
|
+
*/
|
|
15
|
+
export declare class DatePickerHeaderComponent implements OnInit, OnDestroy {
|
|
16
|
+
calendar: MatCalendar<Date>;
|
|
17
|
+
dateAdapter: DateAdapter<Date>;
|
|
18
|
+
dateFormats: MatDateFormats;
|
|
19
|
+
private datepickerService;
|
|
20
|
+
destroy$: Subject<boolean>;
|
|
21
|
+
group: FormGroup;
|
|
22
|
+
arrowDirection: boolean;
|
|
23
|
+
range: {
|
|
24
|
+
start: string;
|
|
25
|
+
end: string;
|
|
26
|
+
};
|
|
27
|
+
isRangeSelection: boolean;
|
|
28
|
+
selectedDate: string;
|
|
29
|
+
datePickerInfo: any;
|
|
30
|
+
constructor(calendar: MatCalendar<Date>, dateAdapter: DateAdapter<Date>, dateFormats: MatDateFormats, datepickerService: DatepickerService);
|
|
31
|
+
/**
|
|
32
|
+
* Implementation of ngOnInit lifecycle hook method to initialize components instance properties.
|
|
33
|
+
* @memberof DatePickerHeaderComponent
|
|
34
|
+
*/
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Sets the min and max date range.
|
|
38
|
+
* @param {({ start: Date | string; end: Date | string })} range
|
|
39
|
+
* @memberof DatePickerHeaderComponent
|
|
40
|
+
*/
|
|
41
|
+
setRange(range: {
|
|
42
|
+
start: Date | string;
|
|
43
|
+
end: Date | string;
|
|
44
|
+
}): void;
|
|
45
|
+
/**
|
|
46
|
+
* Implementation of getMonthLabel method to get the month label.
|
|
47
|
+
* @readonly
|
|
48
|
+
* @return {string}
|
|
49
|
+
* @memberof DatePickerHeaderComponent
|
|
50
|
+
*/
|
|
51
|
+
get getMonthLabel(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Sets previous month in a calendar on click of previous month arrow in date picker.
|
|
54
|
+
* @param {('month' | 'year')} mode
|
|
55
|
+
* @memberof DatePickerHeaderComponent
|
|
56
|
+
*/
|
|
57
|
+
setPreviousMonth(mode: 'month' | 'year'): void;
|
|
58
|
+
/**
|
|
59
|
+
* Sets next month in a calendar on click of previous month arrow in date picker.
|
|
60
|
+
* @param {('month' | 'year')} mode
|
|
61
|
+
* @memberof DatePickerHeaderComponent
|
|
62
|
+
*/
|
|
63
|
+
setNextMonth(mode: 'month' | 'year'): void;
|
|
64
|
+
/**
|
|
65
|
+
* Sets the calendar current view on the open of year drop down in date picker.
|
|
66
|
+
* @memberof DatePickerHeaderComponent
|
|
67
|
+
*/
|
|
68
|
+
setCalendarView(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
|
|
71
|
+
* @memberof DatePickerHeaderComponent
|
|
72
|
+
*/
|
|
73
|
+
ngOnDestroy(): void;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerHeaderComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerHeaderComponent, "ieeesa-date-picker-header", never, { "group": { "alias": "group"; "required": false; }; }, {}, never, never, true, never>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { AfterContentInit, EventEmitter, OnInit, QueryList } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { FormModel } from '@presentation/models/form.model';
|
|
4
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
5
|
+
import { FormGrid } from '@presentation/models/form-grid.model';
|
|
6
|
+
import { DynamicFormFieldDirective } from '@presentation/directives/dynamic-form-field/dynamic-form-field.directive';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Creates a reactive form dynamically based on the passed form field configuration and handles the form events.
|
|
10
|
+
* @export
|
|
11
|
+
* @class DynamicFormComponent
|
|
12
|
+
* @implements {OnInit}
|
|
13
|
+
* @implements {AfterContentInit}
|
|
14
|
+
*/
|
|
15
|
+
export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
16
|
+
private fb;
|
|
17
|
+
formFields: QueryList<DynamicFormFieldDirective>;
|
|
18
|
+
private _formGroups;
|
|
19
|
+
/**
|
|
20
|
+
* FormGroups passed an an input and which contains configuration information of every form fields.
|
|
21
|
+
* @memberof DynamicFormComponent
|
|
22
|
+
*/
|
|
23
|
+
set formGroups(value: FormModel);
|
|
24
|
+
get formGroups(): FormModel;
|
|
25
|
+
private _submitResponse;
|
|
26
|
+
/**
|
|
27
|
+
* Sets submit response on form submit
|
|
28
|
+
* @memberof DynamicFormComponent
|
|
29
|
+
*/
|
|
30
|
+
set submitResponse(value: any);
|
|
31
|
+
get submitResponse(): any;
|
|
32
|
+
private _searchResponse;
|
|
33
|
+
/**
|
|
34
|
+
* Sets search response on form search event
|
|
35
|
+
* @memberof DynamicFormComponent
|
|
36
|
+
*/
|
|
37
|
+
set searchResponse(value: any);
|
|
38
|
+
get searchResponse(): any;
|
|
39
|
+
colWidth: FormGrid;
|
|
40
|
+
isLegendVisible: boolean;
|
|
41
|
+
rightButtonLabel: string;
|
|
42
|
+
leftButtonLabel: string;
|
|
43
|
+
isSubmitButtonDisabled: boolean;
|
|
44
|
+
isLeftButtonDisabled: boolean;
|
|
45
|
+
isLeftButtonNeeded: boolean;
|
|
46
|
+
formSubmit: EventEmitter<any>;
|
|
47
|
+
formChange: EventEmitter<any>;
|
|
48
|
+
formInput: EventEmitter<any>;
|
|
49
|
+
formLeftButtonClicked: EventEmitter<any>;
|
|
50
|
+
formSearchApply: EventEmitter<any>;
|
|
51
|
+
formGroupsReference: EventEmitter<FormGroup<any>[]>;
|
|
52
|
+
dropdownChange: EventEmitter<any>;
|
|
53
|
+
formDateSelected: EventEmitter<string>;
|
|
54
|
+
formSelectSearch: EventEmitter<{
|
|
55
|
+
searchEvent: Event;
|
|
56
|
+
controlName: string;
|
|
57
|
+
}>;
|
|
58
|
+
formControlChange: EventEmitter<Event>;
|
|
59
|
+
formAutoCompleteSearch: EventEmitter<Event>;
|
|
60
|
+
autoCompleteOptionSelected: EventEmitter<FormGroup<any>[]>;
|
|
61
|
+
formAfterContentInit: EventEmitter<FormGroup<any>[]>;
|
|
62
|
+
formSelectedDateRange: EventEmitter<{
|
|
63
|
+
startDate: string;
|
|
64
|
+
endDate: string;
|
|
65
|
+
}>;
|
|
66
|
+
form: FormGroup;
|
|
67
|
+
formGroupArray: FormGroup[];
|
|
68
|
+
formControlArray: any[];
|
|
69
|
+
legendsArray: string[];
|
|
70
|
+
constructor(fb: FormBuilder);
|
|
71
|
+
/**
|
|
72
|
+
* Implementation of ngOnInit lifecycle hook method to create form group
|
|
73
|
+
* @memberof DynamicFormComponent
|
|
74
|
+
*/
|
|
75
|
+
ngOnInit(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Emit generated form reference on ngAfterContentInit lifecycle hook.
|
|
78
|
+
* @memberof DynamicFormComponent
|
|
79
|
+
*/
|
|
80
|
+
ngAfterContentInit(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Creates form group on the basis of formGroups configuration input
|
|
83
|
+
* @return {void}
|
|
84
|
+
* @memberof DynamicFormComponent
|
|
85
|
+
*/
|
|
86
|
+
createFormGroupArray(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Creates form group using form builder
|
|
89
|
+
* @param {any[]} controls
|
|
90
|
+
* @return {FormGroup}
|
|
91
|
+
* @memberof DynamicFormComponent
|
|
92
|
+
*/
|
|
93
|
+
createGroup(controls: any[]): FormGroup;
|
|
94
|
+
/**
|
|
95
|
+
* Creates form control based on form field configuration
|
|
96
|
+
* @param {FieldConfig} control
|
|
97
|
+
* @return {FormControl}
|
|
98
|
+
* @memberof DynamicFormComponent
|
|
99
|
+
*/
|
|
100
|
+
createControl(control: FieldConfig): FormControl;
|
|
101
|
+
/**
|
|
102
|
+
* Emits formGroupArray
|
|
103
|
+
* @memberof DynamicFormComponent
|
|
104
|
+
*/
|
|
105
|
+
onFormSubmit(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Emits formGroupArray
|
|
108
|
+
* @memberof DynamicFormComponent
|
|
109
|
+
*/
|
|
110
|
+
onLeftButtonClicked(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Emits formGroupArray
|
|
113
|
+
* @memberof DynamicFormComponent
|
|
114
|
+
*/
|
|
115
|
+
onFormChange(): void;
|
|
116
|
+
/**
|
|
117
|
+
* Handles form field select type drop down selection event
|
|
118
|
+
* @memberof DynamicFormComponent
|
|
119
|
+
*/
|
|
120
|
+
onDropdownChange(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Handles form input change event
|
|
123
|
+
* @param {Event} event
|
|
124
|
+
* @memberof DynamicFormComponent
|
|
125
|
+
*/
|
|
126
|
+
formInputChange(event: Event): void;
|
|
127
|
+
/**
|
|
128
|
+
* Handles form field search apply event
|
|
129
|
+
* @param {Event} event
|
|
130
|
+
* @memberof DynamicFormComponent
|
|
131
|
+
*/
|
|
132
|
+
onSearchApply(event: Event): void;
|
|
133
|
+
/**
|
|
134
|
+
* Handles search event inside form field select
|
|
135
|
+
* @param {Event} event
|
|
136
|
+
* @memberof DynamicFormComponent
|
|
137
|
+
*/
|
|
138
|
+
onSelectSearch(event: {
|
|
139
|
+
searchEvent: Event;
|
|
140
|
+
controlName: string;
|
|
141
|
+
}): void;
|
|
142
|
+
/**
|
|
143
|
+
* Takes the index and the formGroup as arguments and needs to return the unique identifier for this formGroup.
|
|
144
|
+
* @param {number} index
|
|
145
|
+
* @param {FormGroup} formGroup
|
|
146
|
+
* @memberof DynamicFormComponent
|
|
147
|
+
*/
|
|
148
|
+
trackByFormGroup(index: number, formGroup: FormGroup): {
|
|
149
|
+
[key: string]: import("@angular/forms").AbstractControl<any, any>;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Handles form date selection event
|
|
153
|
+
* @param {string[]} event
|
|
154
|
+
* @memberof DynamicFormComponent
|
|
155
|
+
*/
|
|
156
|
+
onDateSelected(event: string): void;
|
|
157
|
+
/**
|
|
158
|
+
* Emits selected form date range
|
|
159
|
+
* @param {{startDate: string, endDate: string}} dateRange
|
|
160
|
+
* @memberof DynamicFormComponent
|
|
161
|
+
*/
|
|
162
|
+
onSelectedDateRange(dateRange: {
|
|
163
|
+
startDate: string;
|
|
164
|
+
endDate: string;
|
|
165
|
+
}): void;
|
|
166
|
+
/**
|
|
167
|
+
* Handles form field auto complete search event
|
|
168
|
+
* @param {Event} event
|
|
169
|
+
* @memberof DynamicFormComponent
|
|
170
|
+
*/
|
|
171
|
+
onAutoCompleteSearch(event: Event): void;
|
|
172
|
+
/**
|
|
173
|
+
* Handles form field auto complete option selection event
|
|
174
|
+
* @memberof DynamicFormComponent
|
|
175
|
+
*/
|
|
176
|
+
onAutoCompleteOptionSelected(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Converts passed control name in hyphenated css class name
|
|
179
|
+
* @param {string} className
|
|
180
|
+
* @return {string}
|
|
181
|
+
* @memberof DynamicFormComponent
|
|
182
|
+
*/
|
|
183
|
+
getRowClassName(className: string): string;
|
|
184
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
|
|
185
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "ieeesa-dynamic-form", ["dynamicForm"], { "formGroups": { "alias": "formGroups"; "required": false; }; "submitResponse": { "alias": "submitResponse"; "required": false; }; "searchResponse": { "alias": "searchResponse"; "required": false; }; "colWidth": { "alias": "colWidth"; "required": false; }; "isLegendVisible": { "alias": "isLegendVisible"; "required": false; }; "rightButtonLabel": { "alias": "rightButtonLabel"; "required": false; }; "leftButtonLabel": { "alias": "leftButtonLabel"; "required": false; }; "isSubmitButtonDisabled": { "alias": "isSubmitButtonDisabled"; "required": false; }; "isLeftButtonDisabled": { "alias": "isLeftButtonDisabled"; "required": false; }; "isLeftButtonNeeded": { "alias": "isLeftButtonNeeded"; "required": false; }; }, { "formSubmit": "formSubmit"; "formChange": "formChange"; "formInput": "formInput"; "formLeftButtonClicked": "formLeftButtonClicked"; "formSearchApply": "formSearchApply"; "formGroupsReference": "formGroupsReference"; "dropdownChange": "dropdownChange"; "formDateSelected": "formDateSelected"; "formSelectSearch": "formSelectSearch"; "formControlChange": "formControlChange"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formAfterContentInit": "formAfterContentInit"; "formSelectedDateRange": "formSelectedDateRange"; }, never, never, true, never>;
|
|
186
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Implements and displays form error messages and form submission error response message on submission of form.
|
|
6
|
+
* @export
|
|
7
|
+
* @class FormErrorComponent
|
|
8
|
+
*/
|
|
9
|
+
export declare class FormErrorComponent {
|
|
10
|
+
formGroup: FormGroup;
|
|
11
|
+
config: FieldConfig;
|
|
12
|
+
submitResponse: any;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormErrorComponent, "ieeesa-form-error", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "config": { "alias": "config"; "required": false; }; "submitResponse": { "alias": "submitResponse"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
3
|
+
import { FormField } from '@presentation/models/form-field.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Provides implementation of input type number and text
|
|
7
|
+
* @export
|
|
8
|
+
* @class InputComponent
|
|
9
|
+
* @implements {FormField}
|
|
10
|
+
*/
|
|
11
|
+
export declare class InputComponent implements FormField {
|
|
12
|
+
config: FieldConfig;
|
|
13
|
+
group: FormGroup;
|
|
14
|
+
invalidChars: string[];
|
|
15
|
+
buttonActionsInfo: any;
|
|
16
|
+
/**
|
|
17
|
+
* Handles keyboard event of type keydown to restrict invalid characters.
|
|
18
|
+
* @param {KeyboardEvent} event
|
|
19
|
+
* @memberof InputComponent
|
|
20
|
+
*/
|
|
21
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
22
|
+
/**
|
|
23
|
+
* Clears the form group control value of type input
|
|
24
|
+
* @memberof InputComponent
|
|
25
|
+
*/
|
|
26
|
+
clear(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Handles form control input on change event to set min and max value errors
|
|
29
|
+
* @memberof InputComponent
|
|
30
|
+
*/
|
|
31
|
+
onChange(): void;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "ieeesa-input", never, {}, {}, never, never, true, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* The NotificationComponent displays a notification with a heading, title, content, and an optional button.
|
|
5
|
+
* Component can be reused in page not found, access denied, session expired notification, logged out pages.
|
|
6
|
+
* @class NotificationComponent
|
|
7
|
+
*/
|
|
8
|
+
export declare class NotificationComponent {
|
|
9
|
+
heading: string;
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
buttonLabel: string;
|
|
13
|
+
buttonIcon: boolean;
|
|
14
|
+
notify: EventEmitter<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Emits the notify event on clicking notify button.
|
|
17
|
+
*/
|
|
18
|
+
onClick(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationComponent, "ieeesa-notification", never, { "heading": { "alias": "heading"; "required": false; }; "title": { "alias": "title"; "required": false; }; "content": { "alias": "content"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "buttonIcon": { "alias": "buttonIcon"; "required": false; }; }, { "notify": "notify"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
4
|
+
import { FormField } from '@presentation/models/form-field.model';
|
|
5
|
+
import { RadioOption } from '@presentation/models/radio-option.model';
|
|
6
|
+
import { FormUtilityService } from '@presentation/services/form-utility.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Provides implementation of form field radio type component
|
|
10
|
+
* @export
|
|
11
|
+
* @class RadioComponent
|
|
12
|
+
* @implements {OnInit}
|
|
13
|
+
* @implements {FormField}
|
|
14
|
+
*/
|
|
15
|
+
export declare class RadioComponent implements OnInit, FormField {
|
|
16
|
+
private formUtilityService;
|
|
17
|
+
config: FieldConfig;
|
|
18
|
+
group: FormGroup;
|
|
19
|
+
formControlName: string;
|
|
20
|
+
radioGroup: RadioOption[];
|
|
21
|
+
isDisabled: boolean;
|
|
22
|
+
selectedRadioOption: EventEmitter<RadioOption>;
|
|
23
|
+
constructor(formUtilityService: FormUtilityService);
|
|
24
|
+
/**
|
|
25
|
+
* Implementation of ngOnInit lifecycle hook method to create form group and initialize components instance properties
|
|
26
|
+
* @memberof RadioComponent
|
|
27
|
+
*/
|
|
28
|
+
ngOnInit(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Initializes the components instance properties from config else it defines config
|
|
31
|
+
* @memberof RadioComponent
|
|
32
|
+
*/
|
|
33
|
+
initializeConfigProperties(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Handles radio selection event on change of it
|
|
36
|
+
* @param {RadioOption} value
|
|
37
|
+
* @memberof RadioComponent
|
|
38
|
+
*/
|
|
39
|
+
onChange(value: RadioOption): void;
|
|
40
|
+
/**
|
|
41
|
+
* Allows Angular to detect the specific radio option that needs to change or be added instead of rebuilding the whole radio options in DOM by tracking option unique Id.
|
|
42
|
+
* @param {number} index
|
|
43
|
+
* @return {number}
|
|
44
|
+
* @memberof RadioComponent
|
|
45
|
+
*/
|
|
46
|
+
trackById(index: number, radio: RadioOption): number | string;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadioComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent, "ieeesa-radio", never, { "formControlName": { "alias": "formControlName"; "required": false; }; "radioGroup": { "alias": "radioGroup"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; }, { "selectedRadioOption": "selectedRadioOption"; }, never, never, true, never>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
4
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
5
|
+
import { FormField } from '@presentation/models/form-field.model';
|
|
6
|
+
import { SearchType } from '@presentation/models/search.model';
|
|
7
|
+
import { FormUtilityService } from '@presentation/services/form-utility.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Component support search capability and used as a form filed with type search and independently as search component.
|
|
11
|
+
* @export
|
|
12
|
+
* @class SearchComponent
|
|
13
|
+
* @implements {OnInit}
|
|
14
|
+
* @implements {AfterViewInit}
|
|
15
|
+
* @implements {OnDestroy}
|
|
16
|
+
* @implements {FormField}
|
|
17
|
+
*/
|
|
18
|
+
export declare class SearchComponent implements OnInit, AfterViewInit, OnDestroy, FormField {
|
|
19
|
+
private formUtilityService;
|
|
20
|
+
config: FieldConfig;
|
|
21
|
+
group: FormGroup;
|
|
22
|
+
formControlName: string;
|
|
23
|
+
placeholderLabel: string;
|
|
24
|
+
searchType: SearchType;
|
|
25
|
+
searchTerm: string;
|
|
26
|
+
searchValue: EventEmitter<any>;
|
|
27
|
+
searchControl: ElementRef;
|
|
28
|
+
searchResponse: string;
|
|
29
|
+
destroy$: Subject<boolean>;
|
|
30
|
+
searchInfo: any;
|
|
31
|
+
constructor(formUtilityService: FormUtilityService);
|
|
32
|
+
/**
|
|
33
|
+
* Implementation of ngOnInit lifecycle hook method to initialize config and form group if its undefined
|
|
34
|
+
* @memberof SearchComponent
|
|
35
|
+
*/
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Handles form control search keyup event and emits searched value
|
|
39
|
+
* @memberof SearchComponent
|
|
40
|
+
*/
|
|
41
|
+
ngAfterViewInit(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Validates email based on defined validation patterns
|
|
44
|
+
* @param {string} email
|
|
45
|
+
* @return {boolean}
|
|
46
|
+
* @memberof SearchComponent
|
|
47
|
+
*/
|
|
48
|
+
isValidateEmail(email: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Clears search response on change of form search control value
|
|
51
|
+
* @memberof SearchComponent
|
|
52
|
+
*/
|
|
53
|
+
onChange(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Clears search response and emits searched value on search input change
|
|
56
|
+
* @memberof SearchComponent
|
|
57
|
+
*/
|
|
58
|
+
onSearchInputChange(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
|
|
61
|
+
* @memberof SearchComponent
|
|
62
|
+
*/
|
|
63
|
+
ngOnDestroy(): void;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchComponent, never>;
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchComponent, "ieeesa-search", never, { "formControlName": { "alias": "formControlName"; "required": false; }; "placeholderLabel": { "alias": "placeholderLabel"; "required": false; }; "searchType": { "alias": "searchType"; "required": false; }; "searchTerm": { "alias": "searchTerm"; "required": false; }; }, { "searchValue": "searchValue"; }, never, never, true, never>;
|
|
66
|
+
}
|