@ieeesa-npm/presentation 0.1.6 → 0.1.7
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/assets/constants.json +2 -1
- package/esm2022/lib/components/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/lib/components/date-picker/date-picker.component.mjs +3 -3
- package/esm2022/lib/components/date-picker-header/date-picker-header.component.mjs +3 -3
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +9 -3
- package/esm2022/lib/components/footer/footer.component.mjs +3 -3
- package/esm2022/lib/components/form-error/form-error.component.mjs +3 -3
- package/esm2022/lib/components/header/header.component.mjs +3 -3
- package/esm2022/lib/components/input/input.component.mjs +3 -3
- package/esm2022/lib/components/modal/modal.component.mjs +36 -12
- package/esm2022/lib/components/modal-confirmation/modal-confirmation.component.mjs +3 -3
- package/esm2022/lib/components/navigation-menu/navigation-menu.component.mjs +3 -3
- package/esm2022/lib/components/notification/notification.component.mjs +3 -3
- package/esm2022/lib/components/radio/radio.component.mjs +3 -3
- package/esm2022/lib/components/search/search.component.mjs +3 -3
- package/esm2022/lib/components/select/select.component.mjs +3 -3
- package/esm2022/lib/components/text-area/text-area.component.mjs +6 -3
- package/esm2022/lib/components/toggle-button/toggle-button.component.mjs +3 -3
- package/esm2022/lib/directives/dynamic-form-field/focus-invalid-form-field.directive.mjs +34 -0
- package/esm2022/lib/models/alignment-types.model.mjs +8 -0
- package/esm2022/lib/models/field-config.model.mjs +1 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +86 -47
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +4 -1
- package/lib/components/modal/modal.component.d.ts +8 -0
- package/lib/directives/dynamic-form-field/focus-invalid-form-field.directive.d.ts +18 -0
- package/lib/models/alignment-types.model.d.ts +5 -0
- package/lib/models/field-config.model.d.ts +4 -0
- package/package.json +2 -2
- package/src/lib/assets/constants.json +2 -1
|
@@ -4,6 +4,7 @@ import { FormModel } from '../../models/form.model';
|
|
|
4
4
|
import { FieldConfig } from '../../models/field-config.model';
|
|
5
5
|
import { FormGrid } from '../../models/form-grid.model';
|
|
6
6
|
import { DynamicFormFieldDirective } from '../../directives/dynamic-form-field/dynamic-form-field.directive';
|
|
7
|
+
import { AlignmentType } from '../../models/alignment-types.model';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* Creates a reactive form dynamically based on the passed form field configuration and handles the form events.
|
|
@@ -67,6 +68,8 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
67
68
|
formGroupArray: FormGroup[];
|
|
68
69
|
formControlArray: any[];
|
|
69
70
|
legendsArray: string[];
|
|
71
|
+
actionButtonAlignment: AlignmentType;
|
|
72
|
+
alignmentType: typeof AlignmentType;
|
|
70
73
|
constructor(fb: FormBuilder);
|
|
71
74
|
/**
|
|
72
75
|
* Implementation of ngOnInit lifecycle hook method to create form group
|
|
@@ -182,5 +185,5 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
182
185
|
*/
|
|
183
186
|
getRowClassName(className: string): string;
|
|
184
187
|
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>;
|
|
188
|
+
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; }; "actionButtonAlignment": { "alias": "actionButtonAlignment"; "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
189
|
}
|
|
@@ -2,6 +2,7 @@ import { ComponentRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from
|
|
|
2
2
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { ModalType } from '@ieeesa-npm/utility';
|
|
4
4
|
import { ToggleButton } from '../../models/toggle-button.model';
|
|
5
|
+
import { Subscription, Subject } from 'rxjs';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* This component encapsulates the functionality of a modal dialog and implements reusable contents part of the modal components such as text content, loading another component into the modal and emitting modal events to consumed component.
|
|
@@ -14,7 +15,13 @@ export declare class ModalComponent implements OnInit, OnDestroy {
|
|
|
14
15
|
dialogRef: MatDialogRef<ModalComponent>;
|
|
15
16
|
modalData: any;
|
|
16
17
|
componentContainer: ViewContainerRef;
|
|
18
|
+
destroy$: Subject<boolean>;
|
|
17
19
|
componentRef: ComponentRef<any>;
|
|
20
|
+
formSubmit: EventEmitter<any>;
|
|
21
|
+
submitFormResponse: EventEmitter<any>;
|
|
22
|
+
formCancel: EventEmitter<any>;
|
|
23
|
+
submitFormResponseSubscription: Subscription;
|
|
24
|
+
formCancelSubscription: Subscription;
|
|
18
25
|
toggleButtonClicked: EventEmitter<any>;
|
|
19
26
|
isComponentLoaded: boolean;
|
|
20
27
|
heading: string;
|
|
@@ -22,6 +29,7 @@ export declare class ModalComponent implements OnInit, OnDestroy {
|
|
|
22
29
|
promptMessage: string;
|
|
23
30
|
leftButtonLabel: string;
|
|
24
31
|
rightButtonLabel: string;
|
|
32
|
+
closeAriaLabel: string;
|
|
25
33
|
toggleButtons: ToggleButton[];
|
|
26
34
|
componentReference: any;
|
|
27
35
|
modalType: ModalType;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Directive used to set the focus of first invalid field of the form when the form is submitted
|
|
5
|
+
* @export
|
|
6
|
+
* @class FocusInvalidFormFieldDirective
|
|
7
|
+
*/
|
|
8
|
+
export declare class FocusInvalidFormFieldDirective {
|
|
9
|
+
private el;
|
|
10
|
+
constructor(el: ElementRef);
|
|
11
|
+
/**
|
|
12
|
+
* Listens to the ngSubmit event and apply focus to first invalid form field
|
|
13
|
+
* @memberof FocusInvalidFormFieldDirective
|
|
14
|
+
*/
|
|
15
|
+
submitForm(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FocusInvalidFormFieldDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusInvalidFormFieldDirective, "[ieeesaFocusInvalidFormField]", never, {}, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -21,6 +21,7 @@ export interface FieldConfig {
|
|
|
21
21
|
invalidEmailErrorMessage?: string;
|
|
22
22
|
minErrorMessage?: string;
|
|
23
23
|
maxErrorMessage?: string;
|
|
24
|
+
supportMessage?: string;
|
|
24
25
|
validation?: ValidatorFn[];
|
|
25
26
|
isMultiSelect?: boolean;
|
|
26
27
|
value?: any;
|
|
@@ -39,4 +40,7 @@ export interface FieldConfig {
|
|
|
39
40
|
startDate: string;
|
|
40
41
|
endDate: string;
|
|
41
42
|
};
|
|
43
|
+
clear?: boolean;
|
|
44
|
+
ariaLabel?: string;
|
|
45
|
+
ariaDescribedById?: string;
|
|
42
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ieeesa-npm/presentation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^16.1.0",
|
|
6
6
|
"@angular/core": "^16.1.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"moment": "^2.29.4",
|
|
19
19
|
"rxjs": "~7.8.0",
|
|
20
20
|
"zone.js": "~0.13.0",
|
|
21
|
-
"@ieeesa-npm/shared-styles": "^0.0.
|
|
21
|
+
"@ieeesa-npm/shared-styles": "^0.0.3",
|
|
22
22
|
"@ieeesa-npm/feature": "^0.1.2"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|