@ieeesa-npm/presentation 0.13.4 → 0.13.6
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 +50 -0
- package/esm2022/lib/components/color-picker/color-picker.component.mjs +157 -0
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +36 -3
- package/esm2022/lib/components/file-upload/file-upload.component.mjs +281 -0
- package/esm2022/lib/components/form-error/form-error.component.mjs +3 -3
- package/esm2022/lib/directives/dynamic-form-field/dynamic-form-field.directive.mjs +36 -2
- package/esm2022/lib/directives/file-upload/file-upload.directive.mjs +85 -0
- package/esm2022/lib/models/allowed-file-types.model.mjs +8 -0
- package/esm2022/lib/models/color-format.model.mjs +13 -0
- package/esm2022/lib/models/field-config.model.mjs +1 -1
- package/esm2022/lib/models/file-upload-presigned-url-res.model.mjs +2 -0
- package/esm2022/lib/models/form-control-types.model.mjs +3 -2
- package/esm2022/lib/services/file-upload.service.mjs +263 -0
- package/esm2022/public-api.mjs +8 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +959 -74
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/chips/chips.component.d.ts +48 -0
- package/lib/components/color-picker/color-picker.component.d.ts +64 -0
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +23 -1
- package/lib/components/file-upload/file-upload.component.d.ts +340 -0
- package/lib/directives/dynamic-form-field/dynamic-form-field.directive.d.ts +5 -1
- package/lib/directives/file-upload/file-upload.directive.d.ts +42 -0
- package/lib/models/allowed-file-types.model.d.ts +5 -0
- package/lib/models/color-format.model.d.ts +9 -0
- package/lib/models/field-config.model.d.ts +20 -0
- package/lib/models/file-upload-presigned-url-res.model.d.ts +5 -0
- package/lib/models/form-control-types.model.d.ts +3 -1
- package/lib/services/file-upload.service.d.ts +365 -0
- package/package.json +3 -2
- package/public-api.d.ts +7 -0
- package/src/lib/assets/constants.json +50 -0
|
@@ -183,6 +183,54 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
|
|
|
183
183
|
timePicker: {
|
|
184
184
|
defaultTimeFormat: number;
|
|
185
185
|
};
|
|
186
|
+
colorPicker: {
|
|
187
|
+
selectLabel: string;
|
|
188
|
+
cancelLabel: string;
|
|
189
|
+
defaultColor: string;
|
|
190
|
+
ariaLabel: string;
|
|
191
|
+
ariaDescription: string;
|
|
192
|
+
ariaDescribedById: string;
|
|
193
|
+
};
|
|
194
|
+
fileUpload: {
|
|
195
|
+
label: {
|
|
196
|
+
fileUpload: string;
|
|
197
|
+
allowedFileSize1: string;
|
|
198
|
+
allowedFileSize2: string;
|
|
199
|
+
allowedFileFormat: string;
|
|
200
|
+
browseFiles: string;
|
|
201
|
+
uploadProgress: string;
|
|
202
|
+
};
|
|
203
|
+
ariaLabel: {
|
|
204
|
+
fileUpload: string;
|
|
205
|
+
browseFiles: string;
|
|
206
|
+
fileUploadIcon: string;
|
|
207
|
+
removeFileIcon: string;
|
|
208
|
+
deleteFileIcon: string;
|
|
209
|
+
fileDownload: string;
|
|
210
|
+
fileUploadInput: string;
|
|
211
|
+
};
|
|
212
|
+
iconUrl: {
|
|
213
|
+
fileUploadIcon: string;
|
|
214
|
+
fileRemoveIcon: string;
|
|
215
|
+
deleteIcon: string;
|
|
216
|
+
};
|
|
217
|
+
buttons: {
|
|
218
|
+
id: number;
|
|
219
|
+
ariaLabel: string;
|
|
220
|
+
iconURL: string;
|
|
221
|
+
toolTip: string;
|
|
222
|
+
disabled: boolean;
|
|
223
|
+
}[];
|
|
224
|
+
message: {
|
|
225
|
+
error: {
|
|
226
|
+
errorReadingFile: string;
|
|
227
|
+
invalidFileFormat: string;
|
|
228
|
+
invalidFileSize: string;
|
|
229
|
+
"2025": string;
|
|
230
|
+
"2026": string;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
186
234
|
};
|
|
187
235
|
chipsType: typeof ChipsType;
|
|
188
236
|
orientations: typeof ChipOrientation;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgxColorsTriggerDirective } from 'ngx-colors';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
4
|
+
import { ColorFormat, ColorsAnimation } from '../../models/color-format.model';
|
|
5
|
+
import { FieldConfig } from '../../models/field-config.model';
|
|
6
|
+
import { FormUtilityService } from '../../services/form-utility.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class ColorPickerComponent implements OnInit {
|
|
9
|
+
private formUtilityService;
|
|
10
|
+
colorPickerDirective: NgxColorsTriggerDirective;
|
|
11
|
+
colorPickerTexts: any;
|
|
12
|
+
group: FormGroup;
|
|
13
|
+
config: FieldConfig;
|
|
14
|
+
colorPickerChange: EventEmitter<string>;
|
|
15
|
+
colorPickerSliderChange: EventEmitter<string>;
|
|
16
|
+
defaultColor: string;
|
|
17
|
+
canShowPalette: boolean;
|
|
18
|
+
palette: string[];
|
|
19
|
+
overlayClassName: string;
|
|
20
|
+
colorFormat: ColorFormat;
|
|
21
|
+
colorAnimation: ColorsAnimation;
|
|
22
|
+
formControlName: string;
|
|
23
|
+
paletteSelectLabel: any;
|
|
24
|
+
paletteCancelLabel: any;
|
|
25
|
+
colorPickerLabel: string;
|
|
26
|
+
isColorCodeLabelNeeded: boolean;
|
|
27
|
+
isArrowIconNeeded: boolean;
|
|
28
|
+
canHideTextInput: boolean;
|
|
29
|
+
canHideColorPicker: boolean;
|
|
30
|
+
constructor(formUtilityService: FormUtilityService);
|
|
31
|
+
ngOnInit(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the color to form group control.
|
|
34
|
+
* @memberof ColorPickerComponent
|
|
35
|
+
* @param {string} color
|
|
36
|
+
* @returns {void}
|
|
37
|
+
*/
|
|
38
|
+
inputChange(color: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Sets canShowPalette to true when the palette is opened.
|
|
41
|
+
* @memberof ColorPickerComponent
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
44
|
+
onOpenPalette(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Sets canShowPalette to false when the palette is closed.
|
|
47
|
+
* @memberof ColorPickerComponent
|
|
48
|
+
* @returns {void}
|
|
49
|
+
*/
|
|
50
|
+
onClosePalette(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Gets triggered when the the alpha, hue or Lightness sliders are changed
|
|
53
|
+
* @param {string} color
|
|
54
|
+
*/
|
|
55
|
+
onSliderChange(color: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* Toggles the palette panel.
|
|
58
|
+
* @memberof ColorPickerComponent
|
|
59
|
+
* @returns {void}
|
|
60
|
+
*/
|
|
61
|
+
togglePalette(): void;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColorPickerComponent, "ieeesa-color-picker", never, { "defaultColor": { "alias": "defaultColor"; "required": false; }; "palette": { "alias": "palette"; "required": false; }; "overlayClassName": { "alias": "overlayClassName"; "required": false; }; "colorFormat": { "alias": "colorFormat"; "required": false; }; "colorAnimation": { "alias": "colorAnimation"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "paletteSelectLabel": { "alias": "paletteSelectLabel"; "required": false; }; "paletteCancelLabel": { "alias": "paletteCancelLabel"; "required": false; }; "colorPickerLabel": { "alias": "colorPickerLabel"; "required": false; }; "isColorCodeLabelNeeded": { "alias": "isColorCodeLabelNeeded"; "required": false; }; "isArrowIconNeeded": { "alias": "isArrowIconNeeded"; "required": false; }; "canHideTextInput": { "alias": "canHideTextInput"; "required": false; }; "canHideColorPicker": { "alias": "canHideColorPicker"; "required": false; }; }, { "colorPickerChange": "colorPickerChange"; "colorPickerSliderChange": "colorPickerSliderChange"; }, never, never, true, never>;
|
|
64
|
+
}
|
|
@@ -11,6 +11,7 @@ import { SelectedTime } from '../../models/selected-time.model';
|
|
|
11
11
|
import { LinkEventEmitType } from '../../models/event-emit-type.model';
|
|
12
12
|
import { SlideToggleOption } from '../../models/slide-toggle-options.model';
|
|
13
13
|
import { SelectOpenedState } from '../../models/select-opened-state.model';
|
|
14
|
+
import { RadioOption } from '../../models/radio-option.model';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
/**
|
|
16
17
|
* Creates a reactive form dynamically based on the passed form field configuration and handles the form events.
|
|
@@ -78,7 +79,10 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
78
79
|
formTimeSelected: EventEmitter<SelectedTime>;
|
|
79
80
|
supportTextLinkClick: EventEmitter<LinkEventEmitType>;
|
|
80
81
|
formSlideToggleChange: EventEmitter<SlideToggleOption>;
|
|
82
|
+
formFileUpload: EventEmitter<FileList | File>;
|
|
81
83
|
dropdownOpenedChange: EventEmitter<SelectOpenedState>;
|
|
84
|
+
formColorPickerChange: EventEmitter<string>;
|
|
85
|
+
formRadioOptionSelected: EventEmitter<RadioOption>;
|
|
82
86
|
form: FormGroup;
|
|
83
87
|
formGroupArray: FormGroup[];
|
|
84
88
|
formControlArray: any[];
|
|
@@ -228,6 +232,24 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
228
232
|
* @memberof DynamicFormComponent
|
|
229
233
|
*/
|
|
230
234
|
onFormSlideToggleChange(toggle: SlideToggleOption): void;
|
|
235
|
+
/**
|
|
236
|
+
* Handles form color picker event and emits formColorPickerChange event.
|
|
237
|
+
* @param {string} colorCode
|
|
238
|
+
* @memberof DynamicFormComponent
|
|
239
|
+
*/
|
|
240
|
+
onFormColorPickerChange(colorCode: string): void;
|
|
241
|
+
/**
|
|
242
|
+
* Handles file upload event and emits formFileUpload event
|
|
243
|
+
* @param {(File | FileList)} file
|
|
244
|
+
* @memberof DynamicFormComponent
|
|
245
|
+
*/
|
|
246
|
+
onFileUpload(file: File | FileList): void;
|
|
247
|
+
/**
|
|
248
|
+
* Handles form field radio button selection event
|
|
249
|
+
* @param {RadioOption} option
|
|
250
|
+
* @memberof DynamicFormComponent
|
|
251
|
+
*/
|
|
252
|
+
onRadioOptionSelection(option: RadioOption): void;
|
|
231
253
|
/**
|
|
232
254
|
* Converts passed control name in hyphenated css class name
|
|
233
255
|
* @param {string} className
|
|
@@ -255,5 +277,5 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
255
277
|
*/
|
|
256
278
|
onDropdownOpenedChange(event: SelectOpenedState): void;
|
|
257
279
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
|
|
258
|
-
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; }; "actionButtonAlign": { "alias": "actionButtonAlign"; "required": false; }; }, { "formSubmit": "formSubmit"; "formChange": "formChange"; "formInput": "formInput"; "formLeftButtonClicked": "formLeftButtonClicked"; "formSearchApply": "formSearchApply"; "formGroupsReference": "formGroupsReference"; "dropdownChange": "dropdownChange"; "formCheckboxSelection": "formCheckboxSelection"; "formDateSelected": "formDateSelected"; "formSelectSearch": "formSelectSearch"; "formControlChange": "formControlChange"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "formAutoCompleteClearSearchValue": "formAutoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formAfterContentInit": "formAfterContentInit"; "formSelectedDateRange": "formSelectedDateRange"; "addFormGroup": "addFormGroup"; "formTimeSelected": "formTimeSelected"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "dropdownOpenedChange": "dropdownOpenedChange"; }, never, never, true, never>;
|
|
280
|
+
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; }; "actionButtonAlign": { "alias": "actionButtonAlign"; "required": false; }; }, { "formSubmit": "formSubmit"; "formChange": "formChange"; "formInput": "formInput"; "formLeftButtonClicked": "formLeftButtonClicked"; "formSearchApply": "formSearchApply"; "formGroupsReference": "formGroupsReference"; "dropdownChange": "dropdownChange"; "formCheckboxSelection": "formCheckboxSelection"; "formDateSelected": "formDateSelected"; "formSelectSearch": "formSelectSearch"; "formControlChange": "formControlChange"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "formAutoCompleteClearSearchValue": "formAutoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formAfterContentInit": "formAfterContentInit"; "formSelectedDateRange": "formSelectedDateRange"; "addFormGroup": "addFormGroup"; "formTimeSelected": "formTimeSelected"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "formFileUpload": "formFileUpload"; "dropdownOpenedChange": "dropdownOpenedChange"; "formColorPickerChange": "formColorPickerChange"; "formRadioOptionSelected": "formRadioOptionSelected"; }, never, never, true, never>;
|
|
259
281
|
}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { FormUtilityService } from '../../services/form-utility.service';
|
|
4
|
+
import { FieldConfig } from '../../models/field-config.model';
|
|
5
|
+
import { AllowedFileTypes } from '../../models/allowed-file-types.model';
|
|
6
|
+
import { FileUploadService } from '../../services/file-upload.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Provides functionality for uploading files to aws s3 bucket.
|
|
10
|
+
* @export
|
|
11
|
+
* @class FileUploadComponent
|
|
12
|
+
* @implements {OnInit}
|
|
13
|
+
*/
|
|
14
|
+
export declare class FileUploadComponent implements OnInit {
|
|
15
|
+
formUtilityService: FormUtilityService;
|
|
16
|
+
fileUploadService: FileUploadService;
|
|
17
|
+
constants: {
|
|
18
|
+
ariaLabel: {
|
|
19
|
+
clear: string;
|
|
20
|
+
warning: string;
|
|
21
|
+
previousMonth: string;
|
|
22
|
+
nextMonth: string;
|
|
23
|
+
menuIcon: string;
|
|
24
|
+
close: string;
|
|
25
|
+
search: string;
|
|
26
|
+
addFormGroup: string;
|
|
27
|
+
};
|
|
28
|
+
button: {
|
|
29
|
+
cancel: string;
|
|
30
|
+
ok: string;
|
|
31
|
+
add: string;
|
|
32
|
+
};
|
|
33
|
+
modalConfig: {
|
|
34
|
+
ariaLabel: string;
|
|
35
|
+
autoFocus: string;
|
|
36
|
+
width: string;
|
|
37
|
+
};
|
|
38
|
+
chips: {
|
|
39
|
+
noOfDefaultVisibleChips: number;
|
|
40
|
+
label: {
|
|
41
|
+
viewAll: string;
|
|
42
|
+
viewLess: string;
|
|
43
|
+
};
|
|
44
|
+
ariaLabel: {
|
|
45
|
+
chipsList: string;
|
|
46
|
+
};
|
|
47
|
+
icons: {
|
|
48
|
+
arrow: {
|
|
49
|
+
id: number;
|
|
50
|
+
iconURL: string;
|
|
51
|
+
toolTip: string;
|
|
52
|
+
ariaLabel: string;
|
|
53
|
+
};
|
|
54
|
+
remove: {
|
|
55
|
+
id: number;
|
|
56
|
+
iconURL: string;
|
|
57
|
+
toolTip: string;
|
|
58
|
+
ariaLabel: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
dataTable: {
|
|
63
|
+
label: {
|
|
64
|
+
clearAll: string;
|
|
65
|
+
};
|
|
66
|
+
message: {
|
|
67
|
+
noRecordFound: string;
|
|
68
|
+
};
|
|
69
|
+
ariaLabel: {
|
|
70
|
+
search: string;
|
|
71
|
+
selectAll: string;
|
|
72
|
+
select: string;
|
|
73
|
+
link: string;
|
|
74
|
+
pagination: string;
|
|
75
|
+
};
|
|
76
|
+
buttons: {
|
|
77
|
+
id: number;
|
|
78
|
+
iconURL: string;
|
|
79
|
+
toolTip: string;
|
|
80
|
+
ariaLabel: string;
|
|
81
|
+
}[];
|
|
82
|
+
};
|
|
83
|
+
datePicker: {
|
|
84
|
+
selectDateLabel: string;
|
|
85
|
+
dateFormatLabel: string;
|
|
86
|
+
startDateLabel: string;
|
|
87
|
+
endDateLabel: string;
|
|
88
|
+
};
|
|
89
|
+
dropdown: {
|
|
90
|
+
placeholderText: string;
|
|
91
|
+
};
|
|
92
|
+
filter: {
|
|
93
|
+
label: {
|
|
94
|
+
filterBy: string;
|
|
95
|
+
applyButton: string;
|
|
96
|
+
clearAll: string;
|
|
97
|
+
};
|
|
98
|
+
buttons: {
|
|
99
|
+
id: number;
|
|
100
|
+
iconURL: string;
|
|
101
|
+
toolTip: string;
|
|
102
|
+
ariaLabel: string;
|
|
103
|
+
}[];
|
|
104
|
+
};
|
|
105
|
+
textarea: {
|
|
106
|
+
maxLengthDefault: number;
|
|
107
|
+
leftCharacters: string;
|
|
108
|
+
};
|
|
109
|
+
autocomplete: {
|
|
110
|
+
minCharToSearch: number;
|
|
111
|
+
debounceTime: number;
|
|
112
|
+
};
|
|
113
|
+
header: {
|
|
114
|
+
alt: {
|
|
115
|
+
logo: string;
|
|
116
|
+
};
|
|
117
|
+
ariaLabel: {
|
|
118
|
+
helpLink: string;
|
|
119
|
+
hamburgerMenu: string;
|
|
120
|
+
};
|
|
121
|
+
label: {
|
|
122
|
+
signOut: string;
|
|
123
|
+
};
|
|
124
|
+
buttons: {
|
|
125
|
+
id: number;
|
|
126
|
+
iconURL: string;
|
|
127
|
+
toolTip: string;
|
|
128
|
+
ariaLabel: string;
|
|
129
|
+
}[];
|
|
130
|
+
userProfileMenuOptions: {
|
|
131
|
+
id: number;
|
|
132
|
+
iconURL: string;
|
|
133
|
+
label: string;
|
|
134
|
+
ariaLabel: string;
|
|
135
|
+
toolTip: string;
|
|
136
|
+
isToolTipNeeded: boolean;
|
|
137
|
+
}[];
|
|
138
|
+
};
|
|
139
|
+
footer: {
|
|
140
|
+
alt: {
|
|
141
|
+
logo: string;
|
|
142
|
+
};
|
|
143
|
+
links: {
|
|
144
|
+
label: string;
|
|
145
|
+
ariaLabel: string;
|
|
146
|
+
redirectUrl: string;
|
|
147
|
+
}[];
|
|
148
|
+
ieeeLogo: string;
|
|
149
|
+
copyright: {
|
|
150
|
+
link: string;
|
|
151
|
+
textPart1: string;
|
|
152
|
+
textPart2: string;
|
|
153
|
+
hyperLinkPart3: string;
|
|
154
|
+
textPart4: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
welcome: {
|
|
158
|
+
buttons: {
|
|
159
|
+
label: string;
|
|
160
|
+
ariaLabel: string;
|
|
161
|
+
url: string;
|
|
162
|
+
}[];
|
|
163
|
+
};
|
|
164
|
+
breadcrumb: {
|
|
165
|
+
label: {
|
|
166
|
+
dashboard: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
loader: {
|
|
170
|
+
ariaLabel: {
|
|
171
|
+
spinner: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
defaultWelcomeBgColor: string;
|
|
175
|
+
timePicker: {
|
|
176
|
+
defaultTimeFormat: number;
|
|
177
|
+
};
|
|
178
|
+
colorPicker: {
|
|
179
|
+
selectLabel: string;
|
|
180
|
+
cancelLabel: string;
|
|
181
|
+
defaultColor: string;
|
|
182
|
+
ariaLabel: string;
|
|
183
|
+
ariaDescription: string;
|
|
184
|
+
ariaDescribedById: string;
|
|
185
|
+
};
|
|
186
|
+
fileUpload: {
|
|
187
|
+
label: {
|
|
188
|
+
fileUpload: string;
|
|
189
|
+
allowedFileSize1: string;
|
|
190
|
+
allowedFileSize2: string;
|
|
191
|
+
allowedFileFormat: string;
|
|
192
|
+
browseFiles: string;
|
|
193
|
+
uploadProgress: string;
|
|
194
|
+
};
|
|
195
|
+
ariaLabel: {
|
|
196
|
+
fileUpload: string;
|
|
197
|
+
browseFiles: string;
|
|
198
|
+
fileUploadIcon: string;
|
|
199
|
+
removeFileIcon: string;
|
|
200
|
+
deleteFileIcon: string;
|
|
201
|
+
fileDownload: string;
|
|
202
|
+
fileUploadInput: string;
|
|
203
|
+
};
|
|
204
|
+
iconUrl: {
|
|
205
|
+
fileUploadIcon: string;
|
|
206
|
+
fileRemoveIcon: string;
|
|
207
|
+
deleteIcon: string;
|
|
208
|
+
};
|
|
209
|
+
buttons: {
|
|
210
|
+
id: number;
|
|
211
|
+
ariaLabel: string;
|
|
212
|
+
iconURL: string;
|
|
213
|
+
toolTip: string;
|
|
214
|
+
disabled: boolean;
|
|
215
|
+
}[];
|
|
216
|
+
message: {
|
|
217
|
+
error: {
|
|
218
|
+
errorReadingFile: string;
|
|
219
|
+
invalidFileFormat: string;
|
|
220
|
+
invalidFileSize: string;
|
|
221
|
+
"2025": string;
|
|
222
|
+
"2026": string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
fileUploadLabel: {
|
|
228
|
+
fileUpload: string;
|
|
229
|
+
allowedFileSize1: string;
|
|
230
|
+
allowedFileSize2: string;
|
|
231
|
+
allowedFileFormat: string;
|
|
232
|
+
browseFiles: string;
|
|
233
|
+
uploadProgress: string;
|
|
234
|
+
};
|
|
235
|
+
fileUploadAriaLabel: {
|
|
236
|
+
fileUpload: string;
|
|
237
|
+
browseFiles: string;
|
|
238
|
+
fileUploadIcon: string;
|
|
239
|
+
removeFileIcon: string;
|
|
240
|
+
deleteFileIcon: string;
|
|
241
|
+
fileDownload: string;
|
|
242
|
+
fileUploadInput: string;
|
|
243
|
+
};
|
|
244
|
+
fileUploadIconUrl: {
|
|
245
|
+
fileUploadIcon: string;
|
|
246
|
+
fileRemoveIcon: string;
|
|
247
|
+
deleteIcon: string;
|
|
248
|
+
};
|
|
249
|
+
fileUploadBtn: {
|
|
250
|
+
id: number;
|
|
251
|
+
ariaLabel: string;
|
|
252
|
+
iconURL: string;
|
|
253
|
+
toolTip: string;
|
|
254
|
+
disabled: boolean;
|
|
255
|
+
};
|
|
256
|
+
allowedFileTypeErrorMessage: string;
|
|
257
|
+
maxFileSizeErrorMessage: string;
|
|
258
|
+
allowedFileTypesAndSizeText: string;
|
|
259
|
+
config: FieldConfig;
|
|
260
|
+
group: FormGroup;
|
|
261
|
+
isFileSelected: boolean;
|
|
262
|
+
isValidFileType: boolean;
|
|
263
|
+
isValidFileSize: boolean;
|
|
264
|
+
selectedFiles: FileList | File | any;
|
|
265
|
+
selectedFileNames: string;
|
|
266
|
+
isFormField: boolean;
|
|
267
|
+
totalSize: number;
|
|
268
|
+
uploadedFiles: FileList | File | any;
|
|
269
|
+
formControlName: string;
|
|
270
|
+
supportMessage: string;
|
|
271
|
+
allowedFileTypes: AllowedFileTypes[];
|
|
272
|
+
isMultiFileUpload: boolean;
|
|
273
|
+
isUploadInProgress: boolean;
|
|
274
|
+
fileUploadHeading: string;
|
|
275
|
+
maxUploadFileSize: number;
|
|
276
|
+
private uploadedSizeValue;
|
|
277
|
+
get uploadedSize(): number;
|
|
278
|
+
set uploadedSize(value: number);
|
|
279
|
+
uploadSelectedFiles: EventEmitter<FileList | File>;
|
|
280
|
+
downloadSelectedFile: EventEmitter<FileList | File>;
|
|
281
|
+
constructor(formUtilityService: FormUtilityService, fileUploadService: FileUploadService);
|
|
282
|
+
/**
|
|
283
|
+
* Initializes component properties and retrieves configuration.
|
|
284
|
+
* @memberof FileUploadComponent
|
|
285
|
+
*/
|
|
286
|
+
ngOnInit(): void;
|
|
287
|
+
/**
|
|
288
|
+
* Formats allowed file format and size message in required format.
|
|
289
|
+
* @memberof FileUploadComponent
|
|
290
|
+
*/
|
|
291
|
+
getAllowedFileFormatSizeMessage(): void;
|
|
292
|
+
/**
|
|
293
|
+
* Handles the selected of file(s) and emits FileUpload event emitter for uploading the file(s).
|
|
294
|
+
* @param {(File | FileList)} file
|
|
295
|
+
* @memberof FileUploadComponent
|
|
296
|
+
*/
|
|
297
|
+
getFile(file: File | FileList): void;
|
|
298
|
+
/**
|
|
299
|
+
* Validates the selected file(s) format and size.
|
|
300
|
+
* @param {(File | FileList)} file
|
|
301
|
+
* @memberof FileUploadComponent
|
|
302
|
+
*/
|
|
303
|
+
validateFile(file: File | FileList): void;
|
|
304
|
+
/**
|
|
305
|
+
* Initiates the file upload process for independent file upload component.
|
|
306
|
+
* @memberof FileUploadComponent
|
|
307
|
+
*/
|
|
308
|
+
onUpload(): void;
|
|
309
|
+
/**
|
|
310
|
+
* Clears the form group control value of type input and resets other file upload properties.
|
|
311
|
+
* @memberof FileUploadComponent
|
|
312
|
+
*/
|
|
313
|
+
resetUpload(): void;
|
|
314
|
+
/**
|
|
315
|
+
* Removes the selected file from the uploaded files list.
|
|
316
|
+
* @param {number} index
|
|
317
|
+
* @memberof FileUploadComponent
|
|
318
|
+
*/
|
|
319
|
+
onDeleteFile(file: File, index: number): void;
|
|
320
|
+
/**
|
|
321
|
+
* For tab key keydown event it passes event and restricts other keys from keyboard.
|
|
322
|
+
* @param {KeyboardEvent} event -Keydown event object.
|
|
323
|
+
* @memberof FileUploadComponent
|
|
324
|
+
*/
|
|
325
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
326
|
+
/**
|
|
327
|
+
* Emits file download event emitter.
|
|
328
|
+
* @memberof FileUploadComponent
|
|
329
|
+
*/
|
|
330
|
+
downloadFile(): void;
|
|
331
|
+
/**
|
|
332
|
+
* Returns unique identifier for the file list.
|
|
333
|
+
* @param {number} index
|
|
334
|
+
* @return {(number | string)}
|
|
335
|
+
* @memberof FileUploadComponent
|
|
336
|
+
*/
|
|
337
|
+
trackByFn(index: number): number | string;
|
|
338
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
|
339
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ieeesa-file-upload", never, { "formControlName": { "alias": "formControlName"; "required": false; }; "supportMessage": { "alias": "supportMessage"; "required": false; }; "allowedFileTypes": { "alias": "allowedFileTypes"; "required": false; }; "isMultiFileUpload": { "alias": "isMultiFileUpload"; "required": false; }; "isUploadInProgress": { "alias": "isUploadInProgress"; "required": false; }; "fileUploadHeading": { "alias": "fileUploadHeading"; "required": false; }; "maxUploadFileSize": { "alias": "maxUploadFileSize"; "required": false; }; "uploadedSize": { "alias": "uploadedSize"; "required": false; }; }, { "uploadSelectedFiles": "uploadSelectedFiles"; "downloadSelectedFile": "downloadSelectedFile"; }, never, never, true, never>;
|
|
340
|
+
}
|
|
@@ -9,6 +9,7 @@ import { SelectedTime } from '../../models/selected-time.model';
|
|
|
9
9
|
import { LinkEventEmitType } from '../../models/event-emit-type.model';
|
|
10
10
|
import { SlideToggleOption } from '../../models/slide-toggle-options.model';
|
|
11
11
|
import { SelectOpenedState } from '../../models/select-opened-state.model';
|
|
12
|
+
import { RadioOption } from '../../models/radio-option.model';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
/**
|
|
14
15
|
* Provides the implementation of DynamicFormFieldDirective which hosts and creates the form fields components dynamically.
|
|
@@ -70,6 +71,9 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
70
71
|
supportTextLinkClick: EventEmitter<LinkEventEmitType>;
|
|
71
72
|
formSlideToggleChange: EventEmitter<SlideToggleOption>;
|
|
72
73
|
dropdownOpenedChange: EventEmitter<SelectOpenedState>;
|
|
74
|
+
formColorPickerChange: EventEmitter<string>;
|
|
75
|
+
formFileUpload: EventEmitter<FileList | File>;
|
|
76
|
+
formRadioOptionSelected: EventEmitter<RadioOption>;
|
|
73
77
|
component: ComponentRef<any>;
|
|
74
78
|
constructor(container: ViewContainerRef);
|
|
75
79
|
/**
|
|
@@ -88,5 +92,5 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
88
92
|
*/
|
|
89
93
|
ngOnDestroy(): void;
|
|
90
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormFieldDirective, never>;
|
|
91
|
-
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"; "formTimeSelected": "formTimeSelected"; "formSelectedDateRange": "formSelectedDateRange"; "formSelectSearch": "formSelectSearch"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "autoCompleteClearSearchValue": "autoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formCheckboxSelection": "formCheckboxSelection"; "formInputValue": "formInputValue"; "addFormGroup": "addFormGroup"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "dropdownOpenedChange": "dropdownOpenedChange"; }, never, never, true, never>;
|
|
95
|
+
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"; "formTimeSelected": "formTimeSelected"; "formSelectedDateRange": "formSelectedDateRange"; "formSelectSearch": "formSelectSearch"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "autoCompleteClearSearchValue": "autoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formCheckboxSelection": "formCheckboxSelection"; "formInputValue": "formInputValue"; "addFormGroup": "addFormGroup"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "dropdownOpenedChange": "dropdownOpenedChange"; "formColorPickerChange": "formColorPickerChange"; "formFileUpload": "formFileUpload"; "formRadioOptionSelected": "formRadioOptionSelected"; }, never, never, true, never>;
|
|
92
96
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Directive, enables to drag and drop files on the predefined area and emits the event with dropped files to upload.
|
|
5
|
+
* @export
|
|
6
|
+
* @class FileUploadDirective
|
|
7
|
+
*/
|
|
8
|
+
export declare class FileUploadDirective {
|
|
9
|
+
allowedFileTypes: string[];
|
|
10
|
+
isMultiFileUpload: boolean;
|
|
11
|
+
fileDropped: EventEmitter<FileList | File>;
|
|
12
|
+
/**
|
|
13
|
+
* Binds the 'multiple' attribute based on the value of allowMultiple property.
|
|
14
|
+
* @readonly
|
|
15
|
+
* @type {(string | null)}
|
|
16
|
+
* @memberof FileUploadDirective
|
|
17
|
+
*/
|
|
18
|
+
get isMultiple(): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Host listener for 'dragover' event.
|
|
21
|
+
* Prevents default behavior and stops event propagation.
|
|
22
|
+
* @param {DragEvent} event
|
|
23
|
+
* @memberof FileUploadDirective
|
|
24
|
+
*/
|
|
25
|
+
onDragOver(event: DragEvent): void;
|
|
26
|
+
/**
|
|
27
|
+
* Host listener for 'dragleave' event.
|
|
28
|
+
* Prevents default behavior and stops event propagation.
|
|
29
|
+
* @param {DragEvent} event
|
|
30
|
+
* @memberof FileUploadDirective
|
|
31
|
+
*/
|
|
32
|
+
onDragLeave(event: DragEvent): void;
|
|
33
|
+
/**
|
|
34
|
+
* Host listener for 'drop' event.
|
|
35
|
+
* Prevents default behavior, stops event propagation, and emits dropped files.
|
|
36
|
+
* @param {DragEvent} event -DragEvent object.
|
|
37
|
+
* @memberof FileUploadDirective
|
|
38
|
+
*/
|
|
39
|
+
onDrop(event: DragEvent): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadDirective, never>;
|
|
41
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileUploadDirective, "[ieeesaFileUpload]", never, { "allowedFileTypes": { "alias": "allowedFileTypes"; "required": false; }; "isMultiFileUpload": { "alias": "isMultiFileUpload"; "required": false; }; }, { "fileDropped": "fileDropped"; }, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -7,6 +7,8 @@ import { SelectOption } from '../models/select-option.model';
|
|
|
7
7
|
import { AutoCompleteOption } from '../models/autocomplete-option.model';
|
|
8
8
|
import { LinkType } from './link-type.model';
|
|
9
9
|
import { SlideToggleOption } from './slide-toggle-options.model';
|
|
10
|
+
import { ColorFormat, ColorsAnimation } from './color-format.model';
|
|
11
|
+
import { AllowedFileTypes } from './allowed-file-types.model';
|
|
10
12
|
export interface FieldConfig {
|
|
11
13
|
isSortNeeded?: boolean;
|
|
12
14
|
disabled?: boolean;
|
|
@@ -59,5 +61,23 @@ export interface FieldConfig {
|
|
|
59
61
|
is24HoursTimeFormat?: boolean;
|
|
60
62
|
linkType?: LinkType;
|
|
61
63
|
slideToggleOption?: SlideToggleOption;
|
|
64
|
+
isMultiFileUpload?: boolean;
|
|
65
|
+
maxUploadFileSize?: number;
|
|
66
|
+
allowedFileTypes?: AllowedFileTypes[];
|
|
67
|
+
maxFileSizeErrorMessage?: string;
|
|
68
|
+
allowedFileTypeErrorMessage?: string;
|
|
62
69
|
invalidDateRangeErrorMessage?: string;
|
|
70
|
+
invalidColorErrorMessage?: string;
|
|
71
|
+
palette?: string[];
|
|
72
|
+
fileUploadHeading?: string;
|
|
73
|
+
defaultColor?: string;
|
|
74
|
+
colorFormat?: ColorFormat;
|
|
75
|
+
overlayClassName?: string;
|
|
76
|
+
colorAnimation?: ColorsAnimation;
|
|
77
|
+
paletteSelectLabel?: string;
|
|
78
|
+
paletteCancelLabel?: string;
|
|
79
|
+
isColorCodeLabelNeeded?: boolean;
|
|
80
|
+
isArrowIconNeeded?: boolean;
|
|
81
|
+
canHideColorPicker?: boolean;
|
|
82
|
+
canHideTextInput?: boolean;
|
|
63
83
|
}
|
|
@@ -9,5 +9,7 @@ export declare enum FormControlType {
|
|
|
9
9
|
AUTO_COMPLETE = "AUTO_COMPLETE",
|
|
10
10
|
ADD_FORM_GROUP = "ADD_FORM_GROUP",
|
|
11
11
|
TIME_PICKER = "TIME_PICKER",
|
|
12
|
-
SLIDE_TOGGLE = "SLIDE_TOGGLE"
|
|
12
|
+
SLIDE_TOGGLE = "SLIDE_TOGGLE",
|
|
13
|
+
COLOR_PICKER = "COLOR_PICKER",
|
|
14
|
+
FILE_UPLOAD = "FILE_UPLOAD"
|
|
13
15
|
}
|