@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,116 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, AfterViewInit, QueryList } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { SelectOption } from '@presentation/models/select-option.model';
|
|
4
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
5
|
+
import { SearchType } from '@presentation/models/search.model';
|
|
6
|
+
import { SearchComponent } from '@presentation/components/search/search.component';
|
|
7
|
+
import { FormUtilityService } from '@presentation/services/form-utility.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Component implementation supports select type of form filed and select type is configurable to support single selection or multi-selection with multilevel or single level.
|
|
11
|
+
* @export
|
|
12
|
+
* @class SelectComponent
|
|
13
|
+
* @implements {OnInit}
|
|
14
|
+
* @implements {AfterViewInit}
|
|
15
|
+
* @implements {OnDestroy}
|
|
16
|
+
*/
|
|
17
|
+
export declare class SelectComponent implements OnInit, AfterViewInit {
|
|
18
|
+
private formUtilityService;
|
|
19
|
+
formFields: QueryList<SearchComponent>;
|
|
20
|
+
group: FormGroup;
|
|
21
|
+
config: FieldConfig;
|
|
22
|
+
arrowDirection: boolean;
|
|
23
|
+
searchType: SearchType;
|
|
24
|
+
sortedOptions: SelectOption[];
|
|
25
|
+
dropdownInfo: any;
|
|
26
|
+
private _dropdownOptions;
|
|
27
|
+
private _selectedOptions;
|
|
28
|
+
private _isSortNeeded;
|
|
29
|
+
/**
|
|
30
|
+
* Takes isSortNeeded as input to check if the passed options are sorted or not.
|
|
31
|
+
* @memberof SelectComponent
|
|
32
|
+
*/
|
|
33
|
+
set isSortNeeded(value: boolean);
|
|
34
|
+
get isSortNeeded(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the dropdown options for selection.
|
|
37
|
+
* @memberof SelectComponent
|
|
38
|
+
*/
|
|
39
|
+
set dropdownOptions(value: SelectOption[]);
|
|
40
|
+
get dropdownOptions(): SelectOption[];
|
|
41
|
+
/**
|
|
42
|
+
* Sets the selected option
|
|
43
|
+
* @memberof SelectComponent
|
|
44
|
+
*/
|
|
45
|
+
set selectedOptions(value: SelectOption | SelectOption[]);
|
|
46
|
+
get selectedOptions(): SelectOption | SelectOption[];
|
|
47
|
+
formControlName: string;
|
|
48
|
+
isMultiLevel: boolean;
|
|
49
|
+
isLabelAlignedLeft: boolean;
|
|
50
|
+
selectLabel: string;
|
|
51
|
+
isMultiSelect: boolean;
|
|
52
|
+
isDisabled: boolean;
|
|
53
|
+
isSearch: boolean;
|
|
54
|
+
placeholderText: any;
|
|
55
|
+
optionSelected: EventEmitter<SelectOption>;
|
|
56
|
+
optionSearched: EventEmitter<string>;
|
|
57
|
+
constructor(formUtilityService: FormUtilityService);
|
|
58
|
+
/**
|
|
59
|
+
* Initializes components instance properties from config if its defined otherwise creates form group and config.
|
|
60
|
+
* @memberof SelectComponent
|
|
61
|
+
*/
|
|
62
|
+
ngOnInit(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Emits selected option on changes the selected option.
|
|
65
|
+
* @param {SelectOption} event
|
|
66
|
+
* @memberof SelectComponent
|
|
67
|
+
*/
|
|
68
|
+
onChange(event: SelectOption): void;
|
|
69
|
+
/**
|
|
70
|
+
* Sets the select dropdown arrow direction
|
|
71
|
+
* @param {boolean} opened
|
|
72
|
+
* @memberof SelectComponent
|
|
73
|
+
*/
|
|
74
|
+
updateArrowDirection(opened: boolean): void;
|
|
75
|
+
/**
|
|
76
|
+
* Takes the index and the current option as arguments and needs to return the unique identifier for this option.
|
|
77
|
+
* @param {number} index
|
|
78
|
+
* @param {SelectOption} option
|
|
79
|
+
* @return {(number | string)}
|
|
80
|
+
* @memberof SelectComponent
|
|
81
|
+
*/
|
|
82
|
+
trackByFn(index: number, option: SelectOption): number | string;
|
|
83
|
+
/**
|
|
84
|
+
* Emits searched options on filtering options in select dropdown
|
|
85
|
+
* @param {string} searchText
|
|
86
|
+
* @memberof SelectComponent
|
|
87
|
+
*/
|
|
88
|
+
onOptionSearch(searchText: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Compares the two passed options
|
|
91
|
+
* @param {any} option1
|
|
92
|
+
* @param {any} option2
|
|
93
|
+
* @return {boolean}
|
|
94
|
+
* @memberof SelectComponent
|
|
95
|
+
*/
|
|
96
|
+
comparer(option1: any, option2: any): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Sorts the options
|
|
99
|
+
* @memberof SelectComponent
|
|
100
|
+
*/
|
|
101
|
+
ngAfterViewInit(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Sorts the options by using arraySorting method
|
|
104
|
+
* @memberof SelectComponent
|
|
105
|
+
*/
|
|
106
|
+
sortOptions(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Utility method to sort dropdown options in ascending order.
|
|
109
|
+
* @param {SelectOption[]} list
|
|
110
|
+
* @return {SelectOption[]}
|
|
111
|
+
* @memberof SelectComponent
|
|
112
|
+
*/
|
|
113
|
+
arraySorting(list: SelectOption[]): SelectOption[];
|
|
114
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
115
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "ieeesa-select", never, { "isSortNeeded": { "alias": "isSortNeeded"; "required": false; }; "dropdownOptions": { "alias": "dropdownOptions"; "required": false; }; "selectedOptions": { "alias": "selectedOptions"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "isMultiLevel": { "alias": "isMultiLevel"; "required": false; }; "isLabelAlignedLeft": { "alias": "isLabelAlignedLeft"; "required": false; }; "selectLabel": { "alias": "selectLabel"; "required": false; }; "isMultiSelect": { "alias": "isMultiSelect"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isSearch": { "alias": "isSearch"; "required": false; }; "placeholderText": { "alias": "placeholderText"; "required": false; }; }, { "optionSelected": "optionSelected"; "optionSearched": "optionSearched"; }, never, never, true, never>;
|
|
116
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export declare class TextAreaComponent implements FormField {
|
|
6
|
+
config: FieldConfig;
|
|
7
|
+
group: FormGroup;
|
|
8
|
+
constants: any;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextAreaComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextAreaComponent, "ieeesa-text-area", never, {}, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ComponentRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
5
|
+
import { FormField } from '@presentation/models/form-field.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Provides the implementation of DynamicFormFieldDirective which hosts and creates the form fields components dynamically.
|
|
9
|
+
* @export
|
|
10
|
+
* @class DynamicFormFieldDirective
|
|
11
|
+
* @implements {FormField}
|
|
12
|
+
* @implements {OnInit}
|
|
13
|
+
* @implements {OnDestroy}
|
|
14
|
+
*/
|
|
15
|
+
export declare class DynamicFormFieldDirective implements FormField, OnInit, OnDestroy {
|
|
16
|
+
container: ViewContainerRef;
|
|
17
|
+
destroy$: Subject<boolean>;
|
|
18
|
+
private _config;
|
|
19
|
+
private _group;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the form field configuration
|
|
22
|
+
* @memberof DynamicFormFieldDirective
|
|
23
|
+
*/
|
|
24
|
+
set config(value: FieldConfig);
|
|
25
|
+
get config(): FieldConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the form group
|
|
28
|
+
* @memberof DynamicFormFieldDirective
|
|
29
|
+
*/
|
|
30
|
+
set group(value: FormGroup);
|
|
31
|
+
get group(): FormGroup;
|
|
32
|
+
private _submitResponse;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the submit response of form submit event
|
|
35
|
+
* @memberof DynamicFormFieldDirective
|
|
36
|
+
*/
|
|
37
|
+
set submitResponse(value: any);
|
|
38
|
+
get submitResponse(): any;
|
|
39
|
+
private _searchResponse;
|
|
40
|
+
/**
|
|
41
|
+
* Sets the form search response of form search apply.
|
|
42
|
+
* @memberof DynamicFormFieldDirective
|
|
43
|
+
*/
|
|
44
|
+
set searchResponse(value: any);
|
|
45
|
+
get searchResponse(): any;
|
|
46
|
+
formSearchApply: EventEmitter<Event>;
|
|
47
|
+
formDropdownSelected: EventEmitter<Event>;
|
|
48
|
+
formDateSelected: EventEmitter<string>;
|
|
49
|
+
formSelectedDateRange: EventEmitter<{
|
|
50
|
+
startDate: string;
|
|
51
|
+
endDate: string;
|
|
52
|
+
}>;
|
|
53
|
+
formSelectSearch: EventEmitter<{
|
|
54
|
+
searchEvent: Event;
|
|
55
|
+
controlName: string;
|
|
56
|
+
}>;
|
|
57
|
+
formAutoCompleteSearch: EventEmitter<Event>;
|
|
58
|
+
autoCompleteOptionSelected: EventEmitter<Event>;
|
|
59
|
+
component: ComponentRef<any>;
|
|
60
|
+
constructor(container: ViewContainerRef);
|
|
61
|
+
/**
|
|
62
|
+
* Implementation of ngOnInit lifecycle hook method to call loadComponents method.
|
|
63
|
+
* @memberof DynamicFormFieldDirective
|
|
64
|
+
*/
|
|
65
|
+
ngOnInit(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Creates the component dynamically and initializes the instance properties of created component, also handles the created component events.
|
|
68
|
+
* @memberof DynamicFormFieldDirective
|
|
69
|
+
*/
|
|
70
|
+
loadComponent(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
|
|
73
|
+
* @memberof DynamicFormFieldDirective
|
|
74
|
+
*/
|
|
75
|
+
ngOnDestroy(): void;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormFieldDirective, never>;
|
|
77
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicFormFieldDirective, "[ieeesaDynamicFormField]", never, { "config": { "alias": "config"; "required": false; }; "group": { "alias": "group"; "required": false; }; "submitResponse": { "alias": "submitResponse"; "required": false; }; "searchResponse": { "alias": "searchResponse"; "required": false; }; }, { "formSearchApply": "formSearchApply"; "formDropdownSelected": "formDropdownSelected"; "formDateSelected": "formDateSelected"; "formSelectedDateRange": "formSelectedDateRange"; "formSelectSearch": "formSelectSearch"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; }, never, never, true, never>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CalendarType } from '@presentation/models/calendar.model';
|
|
2
|
+
export interface DatePicker {
|
|
3
|
+
placeholderLabel?: string;
|
|
4
|
+
selectedDates?: string[];
|
|
5
|
+
isDisabled?: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
isLabelAlignedLeft?: boolean;
|
|
8
|
+
dateRange?: {
|
|
9
|
+
minDate: string;
|
|
10
|
+
maxDate: string;
|
|
11
|
+
};
|
|
12
|
+
calendarType: CalendarType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { CheckboxOption } from '@presentation/models/checkbox-option.model';
|
|
3
|
+
import { DatePicker } from '@presentation/models/date-picker.model';
|
|
4
|
+
import { RadioOption } from '@presentation/models/radio-option.model';
|
|
5
|
+
import { SearchType } from '@presentation/models/search.model';
|
|
6
|
+
import { SelectOption } from '@presentation/models/select-option.model';
|
|
7
|
+
import { AutoCompleteOption } from '@presentation/models/autocomplete-option.model';
|
|
8
|
+
export interface FieldConfig {
|
|
9
|
+
isSortNeeded?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
controlName: string;
|
|
13
|
+
dropdownOptions?: SelectOption[];
|
|
14
|
+
checkboxOptions?: CheckboxOption[];
|
|
15
|
+
autoCompleteOptions?: AutoCompleteOption[];
|
|
16
|
+
radioOptions?: RadioOption[];
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
type: string;
|
|
19
|
+
requiredErrorMessage?: string;
|
|
20
|
+
patternErrorMessage?: string;
|
|
21
|
+
invalidEmailErrorMessage?: string;
|
|
22
|
+
minErrorMessage?: string;
|
|
23
|
+
maxErrorMessage?: string;
|
|
24
|
+
validation?: ValidatorFn[];
|
|
25
|
+
isMultiSelect?: boolean;
|
|
26
|
+
value?: any;
|
|
27
|
+
isNumber?: boolean;
|
|
28
|
+
min?: number;
|
|
29
|
+
max?: number;
|
|
30
|
+
maxLength?: number;
|
|
31
|
+
minLength?: number;
|
|
32
|
+
isInteger?: boolean;
|
|
33
|
+
isResize?: boolean;
|
|
34
|
+
isReadonly?: boolean;
|
|
35
|
+
isLabelAlignedLeft?: boolean;
|
|
36
|
+
datePicker?: DatePicker;
|
|
37
|
+
searchType?: SearchType;
|
|
38
|
+
dateRangeControls?: {
|
|
39
|
+
startDate: string;
|
|
40
|
+
endDate: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class PresentationModule {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PresentationModule, never>;
|
|
4
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PresentationModule, never, never, never>;
|
|
5
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PresentationModule>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* DatepickerService is used in date-picker and date-picker-header component to get date range, isRangeSelection, and selected date(s).
|
|
6
|
+
* @export
|
|
7
|
+
* @class DatepickerService
|
|
8
|
+
*/
|
|
9
|
+
export declare class DatepickerService implements OnDestroy {
|
|
10
|
+
destroy$: Subject<boolean>;
|
|
11
|
+
range: Subject<{
|
|
12
|
+
start: Date | string;
|
|
13
|
+
end: Date | string;
|
|
14
|
+
}>;
|
|
15
|
+
range$: import("rxjs").Observable<{
|
|
16
|
+
start: Date | string;
|
|
17
|
+
end: Date | string;
|
|
18
|
+
}>;
|
|
19
|
+
selectedRange: {
|
|
20
|
+
start: Date | string;
|
|
21
|
+
end: Date | string;
|
|
22
|
+
};
|
|
23
|
+
selectedDate: Date | string;
|
|
24
|
+
isRangeSelection: boolean;
|
|
25
|
+
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* Returns the calendar type.
|
|
28
|
+
* @return {boolean}
|
|
29
|
+
* @memberof DatepickerService
|
|
30
|
+
*/
|
|
31
|
+
getCalendarType(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Returns selected range
|
|
34
|
+
* @return {({ start: Date | string; end: Date | string })}
|
|
35
|
+
* @memberof DatepickerService
|
|
36
|
+
*/
|
|
37
|
+
getSelectedRange(): {
|
|
38
|
+
start: Date | string;
|
|
39
|
+
end: Date | string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
|
|
43
|
+
* @memberof DatePickerHeaderComponent
|
|
44
|
+
*/
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerService, never>;
|
|
47
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DatepickerService>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
2
|
+
import { FieldConfig } from '@presentation/models/field-config.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Creates form fields configuration and form group based on passed parameters.
|
|
6
|
+
* @export
|
|
7
|
+
* @class FormUtilityService
|
|
8
|
+
*/
|
|
9
|
+
export declare class FormUtilityService {
|
|
10
|
+
private fb;
|
|
11
|
+
constructor(fb: FormBuilder);
|
|
12
|
+
/**
|
|
13
|
+
* Returns form fields configuration based on passed control name and type.
|
|
14
|
+
* @param {string} controlName
|
|
15
|
+
* @param {string} controlType
|
|
16
|
+
* @return {FieldConfig}
|
|
17
|
+
* @memberof FormUtilityService
|
|
18
|
+
*/
|
|
19
|
+
getFormFieldConfig(controlName: string, controlType: string): FieldConfig;
|
|
20
|
+
/**
|
|
21
|
+
* Creates and returns form group with passed control name added.
|
|
22
|
+
* @param {string} controlName
|
|
23
|
+
* @return {FormGroup}
|
|
24
|
+
* @memberof FormUtilityService
|
|
25
|
+
*/
|
|
26
|
+
getFormGroup(controlName: string): FormGroup;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormUtilityService, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormUtilityService>;
|
|
29
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ieeesa-npm/presentation",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^16.1.0",
|
|
6
|
+
"@angular/core": "^16.1.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/ieeesa-npm-presentation.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"esm2022": "./esm2022/ieeesa-npm-presentation.mjs",
|
|
21
|
+
"esm": "./esm2022/ieeesa-npm-presentation.mjs",
|
|
22
|
+
"default": "./fesm2022/ieeesa-npm-presentation.mjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './lib/components/dynamic-form/dynamic-form.component';
|
|
2
|
+
export * from './lib/directives/dynamic-form-field/dynamic-form-field.directive';
|
|
3
|
+
export * from './lib/components/form-error/form-error.component';
|
|
4
|
+
export * from './lib/components/notification/notification.component';
|
|
5
|
+
export * from './lib/components/input/input.component';
|
|
6
|
+
export * from './lib/components/text-area/text-area.component';
|
|
7
|
+
export * from './lib/components/radio/radio.component';
|
|
8
|
+
export * from './lib/components/checkbox/checkbox.component';
|
|
9
|
+
export * from './lib/components/autocomplete/autocomplete.component';
|
|
10
|
+
export * from './lib/components/search/search.component';
|
|
11
|
+
export * from './lib/components/date-picker/date-picker.component';
|
|
12
|
+
export * from './lib/components/date-picker-header/date-picker-header.component';
|
|
13
|
+
export * from './lib/components/select/select.component';
|
|
14
|
+
export * from './lib/services/form-utility.service';
|
|
15
|
+
export * from './lib/services/datepicker.service';
|
|
16
|
+
export * from './lib/presentation.module';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ariaLabel": {
|
|
3
|
+
"clear": "Clear",
|
|
4
|
+
"warning": "Warning",
|
|
5
|
+
"previousMonth": "Previous month",
|
|
6
|
+
"nextMonth": "Next month"
|
|
7
|
+
},
|
|
8
|
+
"button": {
|
|
9
|
+
"cancel": "Cancel",
|
|
10
|
+
"ok": "Ok"
|
|
11
|
+
},
|
|
12
|
+
"datePicker": {
|
|
13
|
+
"selectDateLabel": "Select Date",
|
|
14
|
+
"dateFormatLabel": "DD-MMM-YYYY",
|
|
15
|
+
"startDateLabel": "Start Date",
|
|
16
|
+
"endDateLabel": "End Date"
|
|
17
|
+
},
|
|
18
|
+
"dropdown": {
|
|
19
|
+
"placeholderText": "Select your option(s)"
|
|
20
|
+
},
|
|
21
|
+
"textarea": {
|
|
22
|
+
"maxLengthDefault": 1000
|
|
23
|
+
},
|
|
24
|
+
"autocomplete": {
|
|
25
|
+
"minCharToSearch": 3,
|
|
26
|
+
"debounceTime": 1000
|
|
27
|
+
},
|
|
28
|
+
"header": {
|
|
29
|
+
"alt": {
|
|
30
|
+
"logo": "Logo"
|
|
31
|
+
},
|
|
32
|
+
"ariaLabel": {
|
|
33
|
+
"helpLink": "Help Link",
|
|
34
|
+
"userProfile": "User profile",
|
|
35
|
+
"hamburgerMenu": "Hamburger Menu"
|
|
36
|
+
},
|
|
37
|
+
"label": {
|
|
38
|
+
"signOut": "Sign Out"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"footer": {
|
|
42
|
+
"alt": {
|
|
43
|
+
"logo": "IEEE Logo"
|
|
44
|
+
},
|
|
45
|
+
"links": [
|
|
46
|
+
{
|
|
47
|
+
"label": "Dashboard",
|
|
48
|
+
"ariaLabel": "Dashboard",
|
|
49
|
+
"redirectUrl": "#"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"label": "Contact & Support",
|
|
53
|
+
"ariaLabel": "Contact & Support",
|
|
54
|
+
"redirectUrl": "https://www.ieee.org/about/contact.html"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"label": "Accessibility",
|
|
58
|
+
"ariaLabel": "Accessibility",
|
|
59
|
+
"redirectUrl": "https://www.ieee.org/accessibility_statement.html"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"label": "Nondiscrimination Policy",
|
|
63
|
+
"ariaLabel": "Nondiscrimination Policy",
|
|
64
|
+
"redirectUrl": "https://www.ieee.org/about/corporate/governance/p9-26.html"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"label": "IEEE Ethics Reporting",
|
|
68
|
+
"ariaLabel": "",
|
|
69
|
+
"redirectUrl": "https://secure.ethicspoint.com/domain/media/en/gui/20410/index.html"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"label": "IEEE Privacy Policy",
|
|
73
|
+
"ariaLabel": "IEEE Privacy Policy",
|
|
74
|
+
"redirectUrl": "https://www.ieee.org/security-privacy.html"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"label": "IEEE SA Copyright Policy",
|
|
78
|
+
"ariaLabel": "IEEE SA Copyright Policy",
|
|
79
|
+
"redirectUrl": "https://standards.ieee.org/ipr/"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"ieeeLogo": "assets/images/ieee-logo.svg",
|
|
83
|
+
"copyright": {
|
|
84
|
+
"link": "https://www.ieee.org/about/help/site-terms-conditions.html",
|
|
85
|
+
"textPart1": "© Copyright",
|
|
86
|
+
"textPart2": "IEEE – All rights reserved. Use of this website signifies your agreement to the",
|
|
87
|
+
"hyperLinkPart3": " IEEE Terms and Conditions.",
|
|
88
|
+
"textPart4": "A not-for-profit organization, IEEE is the world's largest technical professional organization dedicated to advancing technology for the benefit of humanity."
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|