@bnsights/bbsf-controls 1.0.144 → 1.0.146
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 +8 -0
- package/bnsights-bbsf-controls-1.0.146.tgz +0 -0
- package/esm2022/lib/Shared/Models/TextAreaOptions.mjs +13 -1
- package/esm2022/lib/controls/FileUplaod/FileUplaod.component.mjs +52 -59
- package/esm2022/lib/controls/TextArea/TextArea.component.mjs +108 -6
- package/fesm2022/bnsights-bbsf-controls.mjs +168 -62
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/Models/TextAreaOptions.d.ts +8 -0
- package/lib/controls/TextArea/TextArea.component.d.ts +16 -3
- package/package.json +2 -2
- package/src/lib/assets/Style-rtl.scss +17 -1
- package/src/lib/assets/images/mic-off.svg +11 -0
- package/src/lib/assets/images/mic.svg +5 -0
- package/src/lib/assets/sass/base.scss +71 -2
- package/src/lib/assets/sass/variables.scss +7 -0
|
@@ -2101,7 +2101,7 @@ class FileUploadComponent {
|
|
|
2101
2101
|
};
|
|
2102
2102
|
FileUploadComponent.controlContainerstatic = this.controlContainer;
|
|
2103
2103
|
this.uploader = new FileUploader({
|
|
2104
|
-
disableMultipart: false
|
|
2104
|
+
disableMultipart: false // 'DisableMultipart' must be 'true' for formatDataFunction to be called.
|
|
2105
2105
|
});
|
|
2106
2106
|
this.hasAnotherDropZoneOver = false;
|
|
2107
2107
|
}
|
|
@@ -2121,8 +2121,7 @@ class FileUploadComponent {
|
|
|
2121
2121
|
else {
|
|
2122
2122
|
if (this.options.isMultipleFile == true) {
|
|
2123
2123
|
let files = [];
|
|
2124
|
-
this.multipleFileUploadModel.existingFiles =
|
|
2125
|
-
this.options.value.existingFiles;
|
|
2124
|
+
this.multipleFileUploadModel.existingFiles = this.options.value.existingFiles;
|
|
2126
2125
|
this.multipleFileUploadModel.uploadedFiles = [];
|
|
2127
2126
|
for (let index = 0; index < this.options.value.existingFiles.length; index++) {
|
|
2128
2127
|
const element = this.options.value.existingFiles[index];
|
|
@@ -2152,7 +2151,7 @@ class FileUploadComponent {
|
|
|
2152
2151
|
this.fileLikeObject = {
|
|
2153
2152
|
name: element.nameWithExtension,
|
|
2154
2153
|
type: element.mimeType,
|
|
2155
|
-
rawFile: base64
|
|
2154
|
+
rawFile: base64
|
|
2156
2155
|
};
|
|
2157
2156
|
this.file = element;
|
|
2158
2157
|
let file = this.fileLikeObject;
|
|
@@ -2166,7 +2165,7 @@ class FileUploadComponent {
|
|
|
2166
2165
|
this.fileUploadModel = this.options.value;
|
|
2167
2166
|
this.options.value = this.fileUploadModel;
|
|
2168
2167
|
}
|
|
2169
|
-
this.uploader.queue.forEach(element => {
|
|
2168
|
+
this.uploader.queue.forEach((element) => {
|
|
2170
2169
|
element.progress = 100;
|
|
2171
2170
|
});
|
|
2172
2171
|
}
|
|
@@ -2179,7 +2178,7 @@ class FileUploadComponent {
|
|
|
2179
2178
|
this.acceptedType = this.acceptedType + Type + ',';
|
|
2180
2179
|
}
|
|
2181
2180
|
this.acceptedTypeArray = this.acceptedType.split(',');
|
|
2182
|
-
this.acceptedTypeArray = this.acceptedTypeArray.filter(value => value !=
|
|
2181
|
+
this.acceptedTypeArray = this.acceptedTypeArray.filter((value) => value != '');
|
|
2183
2182
|
for (let index = 0; index < this.acceptedTypeArray.length; index++) {
|
|
2184
2183
|
const element = this.acceptedTypeArray[index];
|
|
2185
2184
|
for (let index = 0; index < this.acceptedTypeArray.length; index++) {
|
|
@@ -2213,63 +2212,63 @@ class FileUploadComponent {
|
|
|
2213
2212
|
if (!this.toolTipTypeArray.includes('PowerPoint'))
|
|
2214
2213
|
this.toolTipTypeArray.push('PowerPoint');
|
|
2215
2214
|
break;
|
|
2216
|
-
case
|
|
2215
|
+
case 'image/png':
|
|
2217
2216
|
if (!this.toolTipTypeArray.includes('PNG'))
|
|
2218
2217
|
this.toolTipTypeArray.push('PNG');
|
|
2219
2218
|
break;
|
|
2220
|
-
case
|
|
2219
|
+
case 'image/bmp':
|
|
2221
2220
|
if (!this.toolTipTypeArray.includes('BMP'))
|
|
2222
2221
|
this.toolTipTypeArray.push('BMP');
|
|
2223
2222
|
break;
|
|
2224
|
-
case
|
|
2223
|
+
case 'image/jpeg':
|
|
2225
2224
|
if (!this.toolTipTypeArray.includes('JPEG'))
|
|
2226
2225
|
this.toolTipTypeArray.push('JPEG');
|
|
2227
2226
|
break;
|
|
2228
|
-
case
|
|
2227
|
+
case 'application/zip':
|
|
2229
2228
|
if (!this.toolTipTypeArray.includes('ZIP'))
|
|
2230
2229
|
this.toolTipTypeArray.push('ZIP');
|
|
2231
2230
|
break;
|
|
2232
|
-
case
|
|
2231
|
+
case 'application/x-rar-compressed':
|
|
2233
2232
|
if (!this.toolTipTypeArray.includes('RAR'))
|
|
2234
2233
|
this.toolTipTypeArray.push('RAR');
|
|
2235
2234
|
break;
|
|
2236
|
-
case
|
|
2235
|
+
case 'video/mp4':
|
|
2237
2236
|
if (!this.toolTipTypeArray.includes('MP4'))
|
|
2238
2237
|
this.toolTipTypeArray.push('MP4');
|
|
2239
2238
|
break;
|
|
2240
|
-
case
|
|
2239
|
+
case 'video/avi':
|
|
2241
2240
|
if (!this.toolTipTypeArray.includes('AVI'))
|
|
2242
2241
|
this.toolTipTypeArray.push('AVI');
|
|
2243
2242
|
break;
|
|
2244
|
-
case
|
|
2243
|
+
case 'video/quicktime':
|
|
2245
2244
|
if (!this.toolTipTypeArray.includes('MOV'))
|
|
2246
2245
|
this.toolTipTypeArray.push('MOV');
|
|
2247
2246
|
break;
|
|
2248
|
-
case
|
|
2247
|
+
case 'video/mpeg':
|
|
2249
2248
|
if (!this.toolTipTypeArray.includes('MPEG'))
|
|
2250
2249
|
this.toolTipTypeArray.push('MPEG');
|
|
2251
2250
|
break;
|
|
2252
|
-
case
|
|
2251
|
+
case 'audio/mpeg':
|
|
2253
2252
|
if (!this.toolTipTypeArray.includes('MP3'))
|
|
2254
2253
|
this.toolTipTypeArray.push('MP3');
|
|
2255
2254
|
break;
|
|
2256
|
-
case
|
|
2255
|
+
case 'video/x-flv':
|
|
2257
2256
|
if (!this.toolTipTypeArray.includes('FLV'))
|
|
2258
2257
|
this.toolTipTypeArray.push('FLV');
|
|
2259
2258
|
break;
|
|
2260
|
-
case
|
|
2259
|
+
case 'video/x-ms-wmv':
|
|
2261
2260
|
if (!this.toolTipTypeArray.includes('WMV'))
|
|
2262
2261
|
this.toolTipTypeArray.push('WMV');
|
|
2263
2262
|
break;
|
|
2264
|
-
case
|
|
2263
|
+
case 'image/svg+xml':
|
|
2265
2264
|
if (!this.toolTipTypeArray.includes('SVG'))
|
|
2266
2265
|
this.toolTipTypeArray.push('SVG');
|
|
2267
2266
|
break;
|
|
2268
|
-
case
|
|
2267
|
+
case 'text/plain':
|
|
2269
2268
|
if (!this.toolTipTypeArray.includes('Txt'))
|
|
2270
2269
|
this.toolTipTypeArray.push('Txt');
|
|
2271
2270
|
break;
|
|
2272
|
-
case
|
|
2271
|
+
case 'application/BN':
|
|
2273
2272
|
if (!this.toolTipTypeArray.includes('License'))
|
|
2274
2273
|
this.toolTipTypeArray.push('License');
|
|
2275
2274
|
break;
|
|
@@ -2290,7 +2289,7 @@ class FileUploadComponent {
|
|
|
2290
2289
|
if (this.options.minNoOfFiles > 0) {
|
|
2291
2290
|
this.validationMessage =
|
|
2292
2291
|
this.validationMessage +
|
|
2293
|
-
`<br /> ${this.UtilityService.getResourceValue(
|
|
2292
|
+
`<br /> ${this.UtilityService.getResourceValue('MinFileCountValidationKey') + this.options.minNoOfFiles}`;
|
|
2294
2293
|
}
|
|
2295
2294
|
if (this.options.fileUploadAcceptsTypes != null &&
|
|
2296
2295
|
this.options.fileUploadAcceptsTypes.length > 0) {
|
|
@@ -2365,7 +2364,7 @@ class FileUploadComponent {
|
|
|
2365
2364
|
this.options.minNoOfFiles > this.uploader.queue.length) {
|
|
2366
2365
|
const formControl = this.fileUploadFormControl;
|
|
2367
2366
|
formControl.setErrors({
|
|
2368
|
-
MinFileCountValidationKey: this.options.minNoOfFiles
|
|
2367
|
+
MinFileCountValidationKey: this.options.minNoOfFiles
|
|
2369
2368
|
});
|
|
2370
2369
|
formControl.markAsTouched();
|
|
2371
2370
|
this.uploader.queue = [];
|
|
@@ -2384,14 +2383,14 @@ class FileUploadComponent {
|
|
|
2384
2383
|
if (AllSizeFile > MaxSizeForAllFiles) {
|
|
2385
2384
|
const formControl = this.fileUploadFormControl;
|
|
2386
2385
|
formControl.setErrors({
|
|
2387
|
-
MaxSizeForAllFilesInMB: this.options.maxSizeForAllFilesInMB + 'M'
|
|
2386
|
+
MaxSizeForAllFilesInMB: this.options.maxSizeForAllFilesInMB + 'M'
|
|
2388
2387
|
});
|
|
2389
2388
|
formControl.markAsTouched();
|
|
2390
2389
|
this.uploader.queue = [];
|
|
2391
2390
|
return;
|
|
2392
2391
|
}
|
|
2393
2392
|
}
|
|
2394
|
-
let AddedQueue = this.uploader.queue.filter((
|
|
2393
|
+
let AddedQueue = this.uploader.queue.filter((obj) => obj['some'].lastModified != null);
|
|
2395
2394
|
for (let index = 0; index < AddedQueue.length; index++) {
|
|
2396
2395
|
const element = AddedQueue[index];
|
|
2397
2396
|
const file = element.file;
|
|
@@ -2401,7 +2400,7 @@ class FileUploadComponent {
|
|
|
2401
2400
|
if (file.size > maxFileSize) {
|
|
2402
2401
|
const formControl = this.fileUploadFormControl;
|
|
2403
2402
|
formControl.setErrors({
|
|
2404
|
-
FileMaxSizeInMB: this.options.fileMaxSizeInMB + 'M'
|
|
2403
|
+
FileMaxSizeInMB: this.options.fileMaxSizeInMB + 'M'
|
|
2405
2404
|
});
|
|
2406
2405
|
formControl.markAsTouched();
|
|
2407
2406
|
this.uploader.queue = [];
|
|
@@ -2417,20 +2416,19 @@ class FileUploadComponent {
|
|
|
2417
2416
|
this.uploader.queue = [];
|
|
2418
2417
|
return;
|
|
2419
2418
|
}
|
|
2420
|
-
if (this.options.isUploadFileAsync && !element._file[
|
|
2421
|
-
this.fileUploadService.uploadFile(element._file)
|
|
2422
|
-
.subscribe({
|
|
2419
|
+
if (this.options.isUploadFileAsync && !element._file['iD_GUID']) {
|
|
2420
|
+
this.fileUploadService.uploadFile(element._file).subscribe({
|
|
2423
2421
|
next: (event) => {
|
|
2424
|
-
let queueIndex = this.uploader.queue.findIndex(file => file == element);
|
|
2422
|
+
let queueIndex = this.uploader.queue.findIndex((file) => file == element);
|
|
2425
2423
|
if (event.type === HttpEventType.UploadProgress) {
|
|
2426
|
-
let value = Math.round(100 * event.loaded / event.total);
|
|
2424
|
+
let value = Math.round((100 * event.loaded) / event.total);
|
|
2427
2425
|
this.uploader.queue[queueIndex].progress = value >= 95 ? 95 : value;
|
|
2428
2426
|
}
|
|
2429
2427
|
else if (event.type === HttpEventType.Response) {
|
|
2430
2428
|
this.uploader.queue[queueIndex].progress = 100;
|
|
2431
2429
|
let fileID = event.body.val;
|
|
2432
|
-
this.uploader.queue[queueIndex]._file[
|
|
2433
|
-
this.uploader.queue[queueIndex]._file[
|
|
2430
|
+
this.uploader.queue[queueIndex]._file['iD_GUID'] = fileID;
|
|
2431
|
+
this.uploader.queue[queueIndex]._file['isNew'] = true;
|
|
2434
2432
|
let AddedFile = {
|
|
2435
2433
|
iD_GUID: fileID,
|
|
2436
2434
|
fileName: this.uploader.queue[queueIndex]._file['name'],
|
|
@@ -2453,11 +2451,10 @@ class FileUploadComponent {
|
|
|
2453
2451
|
this.multipleFileUploadModel.removedFiles = [];
|
|
2454
2452
|
}
|
|
2455
2453
|
}
|
|
2456
|
-
this.multipleFileUploadModel.correlationID_GUID =
|
|
2454
|
+
this.multipleFileUploadModel.correlationID_GUID =
|
|
2455
|
+
this.options.value?.correlationID_GUID;
|
|
2457
2456
|
this.fileUploadFormControl.setValue(this.multipleFileUploadModel);
|
|
2458
|
-
this.group
|
|
2459
|
-
.get(this.options.name)
|
|
2460
|
-
.setValue(this.multipleFileUploadModel);
|
|
2457
|
+
this.group.get(this.options.name).setValue(this.multipleFileUploadModel);
|
|
2461
2458
|
//Use this line to enable two way binding.
|
|
2462
2459
|
this.options.value = this.multipleFileUploadModel;
|
|
2463
2460
|
this.isUploadComplete.emit(true);
|
|
@@ -2473,10 +2470,7 @@ class FileUploadComponent {
|
|
|
2473
2470
|
reader.onload = () => {
|
|
2474
2471
|
let existingID_GUID = null;
|
|
2475
2472
|
if (!this.options.isMultipleFile && this.file)
|
|
2476
|
-
existingID_GUID =
|
|
2477
|
-
this.file.NameWithExtension == file.name
|
|
2478
|
-
? this.file.iD_GUID
|
|
2479
|
-
: null;
|
|
2473
|
+
existingID_GUID = this.file.NameWithExtension == file.name ? this.file.iD_GUID : null;
|
|
2480
2474
|
let AddedFile = {
|
|
2481
2475
|
fileName: file.name,
|
|
2482
2476
|
fileType: file.type,
|
|
@@ -2502,11 +2496,10 @@ class FileUploadComponent {
|
|
|
2502
2496
|
this.multipleFileUploadModel.removedFiles = [];
|
|
2503
2497
|
}
|
|
2504
2498
|
}
|
|
2505
|
-
this.multipleFileUploadModel.correlationID_GUID =
|
|
2499
|
+
this.multipleFileUploadModel.correlationID_GUID =
|
|
2500
|
+
this.options.value?.correlationID_GUID;
|
|
2506
2501
|
this.fileUploadFormControl.setValue(this.multipleFileUploadModel);
|
|
2507
|
-
this.group
|
|
2508
|
-
.get(this.options.name)
|
|
2509
|
-
.setValue(this.multipleFileUploadModel);
|
|
2502
|
+
this.group.get(this.options.name).setValue(this.multipleFileUploadModel);
|
|
2510
2503
|
//Use this line to enable two way binding.
|
|
2511
2504
|
this.options.value = this.multipleFileUploadModel;
|
|
2512
2505
|
}
|
|
@@ -2523,9 +2516,8 @@ class FileUploadComponent {
|
|
|
2523
2516
|
}
|
|
2524
2517
|
}
|
|
2525
2518
|
removeFromControlValue(item) {
|
|
2526
|
-
if (this.options.isUploadFileAsync && item.progress == 100 && item._file[
|
|
2527
|
-
this.fileUploadService.deleteFile(item._file[
|
|
2528
|
-
});
|
|
2519
|
+
if (this.options.isUploadFileAsync && item.progress == 100 && item._file['isNew']) {
|
|
2520
|
+
this.fileUploadService.deleteFile(item._file['iD_GUID']).subscribe((res) => { });
|
|
2529
2521
|
}
|
|
2530
2522
|
if (this.options.isMultipleFile == false) {
|
|
2531
2523
|
this.fileUploadModel = null;
|
|
@@ -2545,19 +2537,19 @@ class FileUploadComponent {
|
|
|
2545
2537
|
else {
|
|
2546
2538
|
if (this.multipleFileUploadModel.removedFiles.length == 0) {
|
|
2547
2539
|
let FileObject = item.file.rawFile;
|
|
2548
|
-
let DeletedItem = this.multipleFileUploadModel.existingFiles.filter((
|
|
2540
|
+
let DeletedItem = this.multipleFileUploadModel.existingFiles.filter((obj) => obj.nameWithExtension == FileObject.name)[0];
|
|
2549
2541
|
this.multipleFileUploadModel.existingFiles =
|
|
2550
|
-
this.multipleFileUploadModel.existingFiles.filter((
|
|
2542
|
+
this.multipleFileUploadModel.existingFiles.filter((obj) => obj.nameWithExtension != FileObject.name);
|
|
2551
2543
|
this.deletedFiles.push(DeletedItem);
|
|
2552
2544
|
this.multipleFileUploadModel.removedFiles.push(DeletedItem.iD_GUID);
|
|
2553
2545
|
}
|
|
2554
2546
|
else {
|
|
2555
2547
|
let FileObject = item.file.rawFile;
|
|
2556
|
-
let deletedList = this.deletedFiles.filter((
|
|
2548
|
+
let deletedList = this.deletedFiles.filter((obj) => obj.nameWithExtension == FileObject.name);
|
|
2557
2549
|
if (deletedList.length == 0 || deletedList == undefined) {
|
|
2558
|
-
let DeletedItem = this.multipleFileUploadModel.existingFiles.filter((
|
|
2550
|
+
let DeletedItem = this.multipleFileUploadModel.existingFiles.filter((obj) => obj.nameWithExtension == FileObject.name)[0];
|
|
2559
2551
|
this.multipleFileUploadModel.existingFiles =
|
|
2560
|
-
this.multipleFileUploadModel.existingFiles.filter((
|
|
2552
|
+
this.multipleFileUploadModel.existingFiles.filter((obj) => obj.nameWithExtension != FileObject.name);
|
|
2561
2553
|
this.deletedFiles.push(DeletedItem);
|
|
2562
2554
|
this.multipleFileUploadModel.removedFiles.push(DeletedItem.iD_GUID);
|
|
2563
2555
|
}
|
|
@@ -2569,13 +2561,14 @@ class FileUploadComponent {
|
|
|
2569
2561
|
this.multipleFileUploadModel.removedFiles = [];
|
|
2570
2562
|
}
|
|
2571
2563
|
this.multipleFileUploadModel.uploadedFiles =
|
|
2572
|
-
this.multipleFileUploadModel.uploadedFiles.filter((
|
|
2564
|
+
this.multipleFileUploadModel.uploadedFiles.filter((obj) => (obj.nameWithExtension && obj.nameWithExtension != item._file.name) ||
|
|
2565
|
+
obj.iD_GUID != item._file['iD_GUID']);
|
|
2573
2566
|
if ((this.multipleFileUploadModel.uploadedFiles == null ||
|
|
2574
2567
|
this.multipleFileUploadModel.uploadedFiles.length == 0) &&
|
|
2575
2568
|
this.options.isRequired) {
|
|
2576
2569
|
const formControl = this.fileUploadFormControl;
|
|
2577
2570
|
formControl.setErrors({
|
|
2578
|
-
MinFileCountValidationKey: this.options.minNoOfFiles
|
|
2571
|
+
MinFileCountValidationKey: this.options.minNoOfFiles
|
|
2579
2572
|
});
|
|
2580
2573
|
this.fileUploadFormControl.markAsTouched();
|
|
2581
2574
|
this.fileUploadFormControl.invalid;
|
|
@@ -2598,11 +2591,11 @@ class FileUploadComponent {
|
|
|
2598
2591
|
return roundedMegabytes;
|
|
2599
2592
|
}
|
|
2600
2593
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FileUploadComponent, deps: [{ token: i2.ControlContainer, optional: true }, { token: i2.FormGroupDirective }, { token: ControlUtility }, { token: i3.UtilityService }, { token: i3.ControlValidationService }, { token: GlobalSettings }, { token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2601
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FileUploadComponent, selector: "BBSF-FileUplaod", inputs: { group: "group", options: "options" }, outputs: { OnChange: "OnChange", isUploadComplete: "isUploadComplete" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div\r\n ng2FileDrop\r\n class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\"\r\n (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\"\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n type=\"file\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputControl.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue(\"DragAndDropHere\") }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInputControl\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\" (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue(\"Upload\") }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue(\"NA\") }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\" class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile }}\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\"></path>\r\n </svg>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\" *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div\r\n class=\"progress-bar\"\r\n role=\"progressbar\"\r\n aria-valuenow=\"70\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\"\r\n [style.width.%]=\"item?.progress\"\r\n *ngIf=\"item?.progress > 0\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7$2.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i7$2.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "directive", type: i7.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] }); }
|
|
2594
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: FileUploadComponent, selector: "BBSF-FileUplaod", inputs: { group: "group", options: "options" }, outputs: { OnChange: "OnChange", isUploadComplete: "isUploadComplete" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div\r\n ng2FileDrop\r\n class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\"\r\n (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\"\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n type=\"file\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputControl.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue('DragAndDropHere') }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInputControl\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\" (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue('Upload') }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue('NA') }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\" class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile }}\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\"></path>\r\n </svg>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\" *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div\r\n class=\"progress-bar\"\r\n role=\"progressbar\"\r\n aria-valuenow=\"70\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\"\r\n [style.width.%]=\"item?.progress\"\r\n *ngIf=\"item?.progress > 0\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7$2.FileDropDirective, selector: "[ng2FileDrop]", inputs: ["uploader"], outputs: ["fileOver", "onFileDrop"] }, { kind: "directive", type: i7$2.FileSelectDirective, selector: "[ng2FileSelect]", inputs: ["uploader"], outputs: ["onFileSelected"] }, { kind: "directive", type: i7.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] }); }
|
|
2602
2595
|
}
|
|
2603
2596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
2604
2597
|
type: Component,
|
|
2605
|
-
args: [{ selector: 'BBSF-FileUplaod', template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div\r\n ng2FileDrop\r\n class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\"\r\n (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\"\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n type=\"file\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputControl.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue(\"DragAndDropHere\") }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInputControl\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\" (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue(\"Upload\") }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue(\"NA\") }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\" class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile }}\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\"></path>\r\n </svg>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\" *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div\r\n class=\"progress-bar\"\r\n role=\"progressbar\"\r\n aria-valuenow=\"70\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\"\r\n [style.width.%]=\"item?.progress\"\r\n *ngIf=\"item?.progress > 0\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
2598
|
+
args: [{ selector: 'BBSF-FileUplaod', template: "<div class=\"form-group bbsf-control bbsf-file-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"options.viewType == 1 ? 'bbsf-vertical' : 'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.hideLabel\" class=\"bbsf-label {{ options.labelExtraClasses }}\">\r\n {{ options.labelValue }}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk && options.isRequired) || options.isRequired) && !options.isReadonly\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div\r\n ng2FileDrop\r\n class=\"bbsf-input-container {{ options.extraClasses }}\"\r\n *ngIf=\"options.isDropZone && !(options.isMultipleFile == false && uploader.queue.length > 0) && !options.isReadonly\"\r\n [ngClass]=\"{ 'another-file-over-class': hasAnotherDropZoneOver }\"\r\n (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\"\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n id=\"{{ options.name }}\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n type=\"file\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\"\r\n (click)=\"fileInputControl.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg validation-msg-header text-center\">\r\n {{ UtilityService.getResourceValue('DragAndDropHere') }}\r\n </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInputControl\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"!options.isDropZone && !isHideInput() && !options.isReadonly\" (click)=\"fileInput.click()\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"70\" height=\"70\" viewBox=\"0 0 70 70\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M58.333 48.8332C61.8957 45.8908 64.1663 41.4397 64.1663 36.4583C64.1663 27.5988 56.9843 20.4167 48.1247 20.4167C47.4874 20.4167 46.8912 20.0842 46.5675 19.5351C42.7641 13.0808 35.7417 8.75 27.708 8.75C15.6268 8.75 5.83301 18.5438 5.83301 30.625C5.83301 36.6511 8.26974 42.1082 12.2116 46.0644\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M23.333 46.6667L34.9997 35M34.9997 35L46.6663 46.6667M34.9997 35V61.25\"\r\n stroke=\"#4B5489\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{ UtilityService.getResourceValue('Upload') }}</div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"validationMessage\" [innerHTML]=\"validationMessage\"></div>\r\n <div\r\n class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\"\r\n *ngIf=\"validationCountMessage && options.isMultipleFile && options.maxNoOfFiles > 0\"\r\n [innerHTML]=\"validationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input\r\n ng2FileSelect\r\n [uploader]=\"uploader\"\r\n [accept]=\"acceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{ options.isMultipleFile ? 'multiple' : '' }}\"\r\n name=\"file\"\r\n type=\"file\"\r\n value=\"\"\r\n autocomplete=\"off\"\r\n (change)=\"onFileChange()\"\r\n [ngClass]=\"options.viewType == 1 ? '' : 'col-md-9'\"\r\n id=\"{{ options.name }}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n formControlName=\"{{ options.name }}\"\r\n #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\" />\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly && !options.value\">\r\n <span class=\"readonly-view\">{{ UtilityService.getResourceValue('NA') }}</span>\r\n </div>\r\n </div>\r\n <!--items uploaded-->\r\n <div class=\"uploaded-items\">\r\n <div class=\"btn-group\" *ngFor=\"let item of uploader.queue\">\r\n <ng-container *ngIf=\"item?.progress == 100 && options.isUploadFileAsync\">\r\n <a *ngIf=\"item?.file?.rawFile['url']\" href=\"{{ item?.file?.rawFile['url'] }}\" class=\"btn-download-file btn-sm btn-progress-upload\" download>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <a *ngIf=\"item?.file?.rawFile['url'] == null\" class=\"btn-download-file btn-sm btn-progress-upload\">\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9.33301 3.70584V3.26663C9.33301 2.65166 9.33301 2.34419 9.20587 2.1093C9.09405 1.9027 8.91555 1.73471 8.69604 1.62944C8.44647 1.50977 8.11977 1.50977 7.46638 1.50977H6.53305C5.87965 1.50977 5.55296 1.50977 5.30339 1.62944C5.08387 1.73471 4.90539 1.9027 4.79354 2.1093C4.66638 2.34419 4.66638 2.65166 4.66638 3.26663V3.70584\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M1.75 3.70605H12.25M11.0834 3.70605V9.8551C11.0834 10.7775 11.0834 11.2387 10.8926 11.591C10.7248 11.901 10.4571 12.1529 10.1278 12.3109C9.75345 12.4904 9.26345 12.4904 8.28334 12.4904H5.71666C4.73658 12.4904 4.24653 12.4904 3.87218 12.3109C3.5429 12.1529 3.27519 11.901 3.10741 11.591C2.91666 11.2387 2.91666 10.7775 2.91666 9.8551V3.70605\"\r\n stroke=\"#D83731\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngIf=\"!options.isUploadFileAsync\">\r\n <a href=\"{{ item?.file?.rawFile }}\" class=\"btn btn-download-file btn-sm\" download>\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M21 22H3C2.4 22 2 21.6 2 21C2 20.4 2.4 20 3 20H21C21.6 20 22 20.4 22 21C22 21.6 21.6 22 21 22ZM13 13.4V3C13 2.4 12.6 2 12 2C11.4 2 11 2.4 11 3V13.4H13Z\"\r\n fill=\"currentColor\"></path>\r\n <path opacity=\"0.3\" d=\"M7 13.4H17L12.7 17.7C12.3 18.1 11.7 18.1 11.3 17.7L7 13.4Z\" fill=\"currentColor\"></path>\r\n </svg>\r\n <span class=\"file-name\">{{ item?.file?.name }}</span>\r\n </a>\r\n <button *ngIf=\"!options.isReadonly\" class=\"btn btn-download-file btn-sm btn-danger\" (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <!--progress bar file upload-->\r\n <div *ngFor=\"let item of uploader.queue\">\r\n <div class=\"upload-items\" [ngClass]=\"{ 'mt-4': options.isMultipleFile == true }\" *ngIf=\"item?.progress < 100 && options.isUploadFileAsync\">\r\n <div class=\"upload-items-toolbar\">\r\n <h4>{{ item?.file?.name }}</h4>\r\n <span (click)=\"item.remove(); removeFromControlValue(item)\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\">\r\n <g clip-path=\"url(#clip0_1324_13216)\">\r\n <path\r\n opacity=\"0.4\"\r\n d=\"M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n <path\r\n d=\"M11.25 6.75L6.75 11.25M6.75 6.75L11.25 11.25\"\r\n stroke=\"#DBE1F0\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </g>\r\n <defs>\r\n <clipPath id=\"clip0_1324_13216\">\r\n <rect width=\"18\" height=\"18\" fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"progress\">\r\n <div\r\n class=\"progress-bar\"\r\n role=\"progressbar\"\r\n aria-valuenow=\"70\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\"\r\n [class.file-uploaded]=\"item?.progress < 100\"\r\n [style.width.%]=\"item?.progress\"\r\n *ngIf=\"item?.progress > 0\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"subtext-container\" *ngIf=\"!options.isReadonly\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\" *ngIf=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n {{ getErrorValidation(fileUploadFormControl.errors | keyvalue) }}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription != null\">{{ options.labelDescription }}</div>\r\n <div *ngIf=\"(group.valid && group.dirty && group.touched) || (group.untouched && group.invalid && group.dirty)\">\r\n {{ resetError() }}\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
2606
2599
|
}], ctorParameters: () => [{ type: i2.ControlContainer, decorators: [{
|
|
2607
2600
|
type: Optional
|
|
2608
2601
|
}] }, { type: i2.FormGroupDirective }, { type: ControlUtility }, { type: i3.UtilityService }, { type: i3.ControlValidationService }, { type: GlobalSettings }, { type: FileUploadService }], propDecorators: { fileInput: [{
|
|
@@ -6965,6 +6958,18 @@ class RangeNumber {
|
|
|
6965
6958
|
}
|
|
6966
6959
|
|
|
6967
6960
|
class TextAreaOptions extends ControlOptionsBase {
|
|
6961
|
+
constructor() {
|
|
6962
|
+
super(...arguments);
|
|
6963
|
+
/**To set value to Control */
|
|
6964
|
+
this.value = '';
|
|
6965
|
+
//** Set flag to enable or disable speech (mic) in textarea*/
|
|
6966
|
+
this.enableSpeechRecognition = false;
|
|
6967
|
+
//** Set array of available languages for speech to text*/
|
|
6968
|
+
this.speechLanguages = undefined;
|
|
6969
|
+
this.selectedSpeechLanguage = '';
|
|
6970
|
+
//Enable auto save speech language into local storage
|
|
6971
|
+
this.autoSaveSpeechLanguagetoLocalStorage = true;
|
|
6972
|
+
}
|
|
6968
6973
|
}
|
|
6969
6974
|
|
|
6970
6975
|
class TextBoxOptions extends ControlOptionsBase {
|
|
@@ -6995,13 +7000,15 @@ class ToggleSlideOptions extends ControlOptionsBase {
|
|
|
6995
7000
|
|
|
6996
7001
|
class TextAreaComponent {
|
|
6997
7002
|
static { this.controlContainerstatic = null; }
|
|
6998
|
-
constructor(controlUtility, controlContainer, textAreaControlHost, utilityService, controlValidationService, globalSettings) {
|
|
7003
|
+
constructor(controlUtility, controlContainer, textAreaControlHost, utilityService, controlValidationService, globalSettings, speechRecognitionService, languageService) {
|
|
6999
7004
|
this.controlUtility = controlUtility;
|
|
7000
7005
|
this.controlContainer = controlContainer;
|
|
7001
7006
|
this.textAreaControlHost = textAreaControlHost;
|
|
7002
7007
|
this.utilityService = utilityService;
|
|
7003
7008
|
this.controlValidationService = controlValidationService;
|
|
7004
7009
|
this.globalSettings = globalSettings;
|
|
7010
|
+
this.speechRecognitionService = speechRecognitionService;
|
|
7011
|
+
this.languageService = languageService;
|
|
7005
7012
|
this.onChange = new EventEmitter();
|
|
7006
7013
|
this.wordCount = 0;
|
|
7007
7014
|
this.wordCountArray = 0;
|
|
@@ -7015,6 +7022,7 @@ class TextAreaComponent {
|
|
|
7015
7022
|
this.hasCharsLimitValidationError = false;
|
|
7016
7023
|
this.minCharsLimit = -1; //To disable chars limit feature by default
|
|
7017
7024
|
this.maxLimitWarningMsg = "";
|
|
7025
|
+
this.isMicOn = false;
|
|
7018
7026
|
this.resetError = () => {
|
|
7019
7027
|
this.controlValidationService.removeGlobalError();
|
|
7020
7028
|
};
|
|
@@ -7039,6 +7047,7 @@ class TextAreaComponent {
|
|
|
7039
7047
|
this.controlUtility.isValid(this.textAreaFormControl);
|
|
7040
7048
|
};
|
|
7041
7049
|
TextAreaComponent.controlContainerstatic = this.controlContainer;
|
|
7050
|
+
this.currentLanguage = localStorage.getItem('language');
|
|
7042
7051
|
}
|
|
7043
7052
|
ngOnInit() {
|
|
7044
7053
|
if (this.options.isReadonly && !this.options.value)
|
|
@@ -7050,12 +7059,27 @@ class TextAreaComponent {
|
|
|
7050
7059
|
this.controlValidationService.isCreatedBefor = false;
|
|
7051
7060
|
this.group.addControl(this.options.name, new FormControl(''));
|
|
7052
7061
|
this.textAreaFormControl = this.group.controls[this.options.name]; // new FormControl('',validationRules);
|
|
7062
|
+
// Initialize language form control
|
|
7063
|
+
const languageControlName = this.options.name + 'Language';
|
|
7064
|
+
this.group.addControl(languageControlName, new FormControl(this.options.selectedSpeechLanguage || ''));
|
|
7053
7065
|
if (!this.options.maxLength)
|
|
7054
7066
|
this.options.maxLength = this.globalSettings.maxLengthTextArea;
|
|
7055
7067
|
if (!this.options.viewType)
|
|
7056
7068
|
this.options.viewType = this.globalSettings.viewType;
|
|
7057
7069
|
if (this.options.labelKey != null && this.options.labelKey != "")
|
|
7058
7070
|
this.options.labelValue = this.utilityService.getResourceValue(this.options.labelKey);
|
|
7071
|
+
if (this.options.enableSpeechRecognition) {
|
|
7072
|
+
//Get all languages if not set
|
|
7073
|
+
if (!this.options.speechLanguages) {
|
|
7074
|
+
this.languageService.getLanguages().subscribe(result => {
|
|
7075
|
+
this.options.speechLanguages = result;
|
|
7076
|
+
this.setSpeechLanguage();
|
|
7077
|
+
});
|
|
7078
|
+
}
|
|
7079
|
+
else {
|
|
7080
|
+
this.setSpeechLanguage();
|
|
7081
|
+
}
|
|
7082
|
+
}
|
|
7059
7083
|
this.textAreaFormControl.setValue(this.options.value);
|
|
7060
7084
|
if (this.options.customValidation.length > 0) {
|
|
7061
7085
|
let Validations = this.options.customValidation;
|
|
@@ -7165,15 +7189,97 @@ class TextAreaComponent {
|
|
|
7165
7189
|
else //onFocusOut
|
|
7166
7190
|
this.showCharsLimitMsg = false;
|
|
7167
7191
|
}
|
|
7168
|
-
|
|
7169
|
-
|
|
7192
|
+
//region Speech Recognition
|
|
7193
|
+
setSpeechLanguage() {
|
|
7194
|
+
const languageControlName = this.options.name + 'Language';
|
|
7195
|
+
if (this.options.autoSaveSpeechLanguagetoLocalStorage) {
|
|
7196
|
+
let savedLanguage = localStorage.getItem("speechLanguage");
|
|
7197
|
+
if (savedLanguage) {
|
|
7198
|
+
this.options.selectedSpeechLanguage = savedLanguage;
|
|
7199
|
+
}
|
|
7200
|
+
else {
|
|
7201
|
+
this.loadSelectedSpeechLanguage();
|
|
7202
|
+
localStorage.setItem("speechLanguage", this.options.selectedSpeechLanguage);
|
|
7203
|
+
}
|
|
7204
|
+
}
|
|
7205
|
+
else {
|
|
7206
|
+
this.loadSelectedSpeechLanguage();
|
|
7207
|
+
}
|
|
7208
|
+
this.group.get(languageControlName).setValue(this.options.selectedSpeechLanguage);
|
|
7209
|
+
}
|
|
7210
|
+
loadSelectedSpeechLanguage() {
|
|
7211
|
+
if (!this.options.selectedSpeechLanguage) {
|
|
7212
|
+
if (this.currentLanguage == "en" && this.options.speechLanguages.some(language => language.englishName === 'English')) {
|
|
7213
|
+
this.options.selectedSpeechLanguage = this.options.speechLanguages.find(language => language.englishName === 'English').dialect;
|
|
7214
|
+
}
|
|
7215
|
+
else if (this.currentLanguage == "ar" && this.options.speechLanguages.some(language => language.englishName === 'Arabic')) {
|
|
7216
|
+
this.options.selectedSpeechLanguage = this.options.speechLanguages.find(language => language.englishName === 'Arabic').dialect;
|
|
7217
|
+
}
|
|
7218
|
+
else {
|
|
7219
|
+
this.options.selectedSpeechLanguage = this.options.speechLanguages[0].dialect;
|
|
7220
|
+
}
|
|
7221
|
+
}
|
|
7222
|
+
}
|
|
7223
|
+
startSpeechRecognition() {
|
|
7224
|
+
if (!this.speechRecognitionService.isSupported) {
|
|
7225
|
+
this.utilityService.notifyErrorMessage(this.utilityService.getResourceValue("BrowserNotSupportSpeechRecognition"));
|
|
7226
|
+
return;
|
|
7227
|
+
}
|
|
7228
|
+
this.isMicOn = true;
|
|
7229
|
+
this.subscription = this.speechRecognitionService.startListening(this.options.selectedSpeechLanguage).subscribe({
|
|
7230
|
+
next: (transcript) => {
|
|
7231
|
+
if (this.options.value) {
|
|
7232
|
+
this.options.value += ' ';
|
|
7233
|
+
}
|
|
7234
|
+
let charIndex = 0;
|
|
7235
|
+
const interval = setInterval(() => {
|
|
7236
|
+
this.options.value += transcript[charIndex];
|
|
7237
|
+
charIndex++;
|
|
7238
|
+
if (charIndex === transcript.length) {
|
|
7239
|
+
clearInterval(interval);
|
|
7240
|
+
}
|
|
7241
|
+
}, 10);
|
|
7242
|
+
},
|
|
7243
|
+
error: (error) => {
|
|
7244
|
+
console.error(error);
|
|
7245
|
+
this.stopSpeechRecognition();
|
|
7246
|
+
},
|
|
7247
|
+
complete: () => {
|
|
7248
|
+
this.isMicOn = false;
|
|
7249
|
+
}
|
|
7250
|
+
});
|
|
7251
|
+
}
|
|
7252
|
+
stopSpeechRecognition() {
|
|
7253
|
+
if (!this.speechRecognitionService.isSupported) {
|
|
7254
|
+
return;
|
|
7255
|
+
}
|
|
7256
|
+
this.isMicOn = false;
|
|
7257
|
+
this.speechRecognitionService.stopListening();
|
|
7258
|
+
if (this.subscription) {
|
|
7259
|
+
this.subscription.unsubscribe();
|
|
7260
|
+
}
|
|
7261
|
+
}
|
|
7262
|
+
ngOnDestroy() {
|
|
7263
|
+
this.stopSpeechRecognition();
|
|
7264
|
+
}
|
|
7265
|
+
onSpeechLanguageChange(event) {
|
|
7266
|
+
let selectedLang = event.target.value;
|
|
7267
|
+
this.options.selectedSpeechLanguage = selectedLang;
|
|
7268
|
+
const languageControlName = this.options.name + 'Language';
|
|
7269
|
+
this.group.get(languageControlName).setValue(selectedLang);
|
|
7270
|
+
if (this.options.autoSaveSpeechLanguagetoLocalStorage) {
|
|
7271
|
+
localStorage.setItem("speechLanguage", selectedLang);
|
|
7272
|
+
}
|
|
7273
|
+
}
|
|
7274
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: TextAreaComponent, deps: [{ token: ControlUtility }, { token: i2.ControlContainer, optional: true }, { token: i2.FormGroupDirective }, { token: i3.UtilityService }, { token: i3.ControlValidationService }, { token: GlobalSettings }, { token: i3.SpeechRecognitionService }, { token: i3.LanguageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7275
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: TextAreaComponent, selector: "BBSF-TextArea", inputs: { group: "group", options: "options" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div class=\"form-group bbsf-control bbsf-textarea\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.viewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.hideLabel\" class=\"bbsf-label {{options.labelExtraClasses}}\">\r\n {{options.labelValue}}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk&&options.isRequired)||(options.isRequired))&&!options.isReadonly\"\r\n class=\"text-danger\">*</span>\r\n </label>\r\n <div *ngIf=\"!options.isReadonly\" class=\"bbsf-input-container\" [ngClass]=\"{\r\n 'p-120px': options.enableSpeechRecognition && options.enableCopyToClipboard,\r\n 'p-80px': options.enableSpeechRecognition && !options.enableCopyToClipboard,\r\n 'p-40px': !options.enableSpeechRecognition && options.enableCopyToClipboard\r\n }\">\r\n <!--input-->\r\n <textarea class=\"form-control {{options.extraClasses}}\" (focus)=\"onFocus(true)\" (focusout)=\"onFocus(false)\"\r\n [dir]=\"textDir\" aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.name}}\"\r\n [class.is-invalid]=\"textAreaFormControl.invalid && textAreaFormControl.touched\"\r\n placeholder=\"{{options.placeholder}}\" id=\"{{options.name}}\" autocomplete=\"{{options.autoComplete}}\"\r\n (change)=\"trimControlValue()\" rows=\"{{options.rows}}\" (keyup)=\"onTextChange()\" cols=\"{{options.cols}}\"\r\n maxlength=\"{{options.maxLength}}\" minlength=\"{{options.minLength}}\" [(ngModel)]=\"options.value\"\r\n (keydown)=\"wordCountArray>options.maxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #TextAreainput></textarea>\r\n <!--CopyToClipboard-->\r\n <div class=\"copy-clipboard\" *ngIf=\"options.enableCopyToClipboard\" (click)=\"copyInputMessage(TextAreainput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </div>\r\n <div [ngClass]=\"{'expanded': isFocused}\" class=\"language-container {{options.extraClassMicLanguage}}\" *ngIf=\"options.enableSpeechRecognition\">\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"options.iconMic? options.iconMic : './src/assets/images/mic.svg'\" (click)=\"startSpeechRecognition()\"\r\n *ngIf=\"!isMicOn\">\r\n </span>\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"options.iconMicOff? options.iconMicOff : './src/assets/images/mic-off.svg'\" (click)=\"stopSpeechRecognition()\"\r\n *ngIf=\"isMicOn\">\r\n </span>\r\n <select class=\"language-select\" [formControlName]=\"options.name + 'Language'\" (change)=\"onSpeechLanguageChange($event)\">\r\n <option *ngFor=\"let language of options.speechLanguages\" [value]=\"language.dialect\">{{language.displayName}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly\"><span class=\"readonly-view\">{{options.value}}</span>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!--wordCount-->\r\n <div class=\"bbsf-word-count\" *ngIf=\"options.maxWordCount>0&&isShowWordCount\">\r\n {{wordCount}}/{{options.maxWordCount}} Words</div>\r\n <!-- CharsLimitMsg-->\r\n <div class=\"bbsf-character-count\" *ngIf=\"showCharsLimitMsg\"\r\n [ngClass]=\"{'badge-light-warning': charsLimitMsgClass === 'warning', 'badge-light-danger' : charsLimitMsgClass === 'danger' }\">\r\n {{maxLimitWarningMsg}}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription!=null\">{{options.labelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" [dir]=\"textDir\" *ngIf=\"(textAreaFormControl.invalid && textAreaFormControl.touched)\">\r\n {{getErrorValidation(textAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n </div>\r\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: i7.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i8$3.InlineSVGDirective, selector: "[inlineSVG]", inputs: ["inlineSVG", "resolveSVGUrl", "replaceContents", "prepend", "injectComponent", "cacheSVG", "setSVGAttributes", "removeSVGAttributes", "forceEvalStyles", "evalScripts", "fallbackImgUrl", "fallbackSVG", "onSVGLoaded"], outputs: ["onSVGInserted", "onSVGFailed"] }, { kind: "pipe", type: i5.KeyValuePipe, name: "keyvalue" }] }); }
|
|
7170
7276
|
}
|
|
7171
7277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: TextAreaComponent, decorators: [{
|
|
7172
7278
|
type: Component,
|
|
7173
|
-
args: [{ selector: 'BBSF-TextArea', template: "<div class=\"form-group bbsf-control bbsf-textarea\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.viewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.hideLabel\" class=\"bbsf-label {{options.labelExtraClasses}}\">\r\n {{options.labelValue}}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk&&options.isRequired)||(options.isRequired))&&!options.isReadonly\"\r\n class=\"text-danger\">*</span>\r\n </label>\r\n <div *ngIf=\"!options.isReadonly\" class=\"bbsf-input-container\"\r\n
|
|
7279
|
+
args: [{ selector: 'BBSF-TextArea', template: "<div class=\"form-group bbsf-control bbsf-textarea\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.viewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.hideLabel\" class=\"bbsf-label {{options.labelExtraClasses}}\">\r\n {{options.labelValue}}\r\n <!--Asterisk-->\r\n <span *ngIf=\"((options.showAsterisk&&options.isRequired)||(options.isRequired))&&!options.isReadonly\"\r\n class=\"text-danger\">*</span>\r\n </label>\r\n <div *ngIf=\"!options.isReadonly\" class=\"bbsf-input-container\" [ngClass]=\"{\r\n 'p-120px': options.enableSpeechRecognition && options.enableCopyToClipboard,\r\n 'p-80px': options.enableSpeechRecognition && !options.enableCopyToClipboard,\r\n 'p-40px': !options.enableSpeechRecognition && options.enableCopyToClipboard\r\n }\">\r\n <!--input-->\r\n <textarea class=\"form-control {{options.extraClasses}}\" (focus)=\"onFocus(true)\" (focusout)=\"onFocus(false)\"\r\n [dir]=\"textDir\" aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.name}}\"\r\n [class.is-invalid]=\"textAreaFormControl.invalid && textAreaFormControl.touched\"\r\n placeholder=\"{{options.placeholder}}\" id=\"{{options.name}}\" autocomplete=\"{{options.autoComplete}}\"\r\n (change)=\"trimControlValue()\" rows=\"{{options.rows}}\" (keyup)=\"onTextChange()\" cols=\"{{options.cols}}\"\r\n maxlength=\"{{options.maxLength}}\" minlength=\"{{options.minLength}}\" [(ngModel)]=\"options.value\"\r\n (keydown)=\"wordCountArray>options.maxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #TextAreainput></textarea>\r\n <!--CopyToClipboard-->\r\n <div class=\"copy-clipboard\" *ngIf=\"options.enableCopyToClipboard\" (click)=\"copyInputMessage(TextAreainput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </div>\r\n <div [ngClass]=\"{'expanded': isFocused}\" class=\"language-container {{options.extraClassMicLanguage}}\" *ngIf=\"options.enableSpeechRecognition\">\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"options.iconMic? options.iconMic : './src/assets/images/mic.svg'\" (click)=\"startSpeechRecognition()\"\r\n *ngIf=\"!isMicOn\">\r\n </span>\r\n <span class=\"svg-icon svg-icon-5\" [inlineSVG]=\"options.iconMicOff? options.iconMicOff : './src/assets/images/mic-off.svg'\" (click)=\"stopSpeechRecognition()\"\r\n *ngIf=\"isMicOn\">\r\n </span>\r\n <select class=\"language-select\" [formControlName]=\"options.name + 'Language'\" (change)=\"onSpeechLanguageChange($event)\">\r\n <option *ngFor=\"let language of options.speechLanguages\" [value]=\"language.dialect\">{{language.displayName}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <!-- readonly -->\r\n <div *ngIf=\"options.isReadonly\"><span class=\"readonly-view\">{{options.value}}</span>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!--wordCount-->\r\n <div class=\"bbsf-word-count\" *ngIf=\"options.maxWordCount>0&&isShowWordCount\">\r\n {{wordCount}}/{{options.maxWordCount}} Words</div>\r\n <!-- CharsLimitMsg-->\r\n <div class=\"bbsf-character-count\" *ngIf=\"showCharsLimitMsg\"\r\n [ngClass]=\"{'badge-light-warning': charsLimitMsgClass === 'warning', 'badge-light-danger' : charsLimitMsgClass === 'danger' }\">\r\n {{maxLimitWarningMsg}}\r\n </div>\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.labelDescription!=null\">{{options.labelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" [dir]=\"textDir\" *ngIf=\"(textAreaFormControl.invalid && textAreaFormControl.touched)\">\r\n {{getErrorValidation(textAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n </div>\r\n" }]
|
|
7174
7280
|
}], ctorParameters: () => [{ type: ControlUtility }, { type: i2.ControlContainer, decorators: [{
|
|
7175
7281
|
type: Optional
|
|
7176
|
-
}] }, { type: i2.FormGroupDirective }, { type: i3.UtilityService }, { type: i3.ControlValidationService }, { type: GlobalSettings }], propDecorators: { group: [{
|
|
7282
|
+
}] }, { type: i2.FormGroupDirective }, { type: i3.UtilityService }, { type: i3.ControlValidationService }, { type: GlobalSettings }, { type: i3.SpeechRecognitionService }, { type: i3.LanguageService }], propDecorators: { group: [{
|
|
7177
7283
|
type: Input
|
|
7178
7284
|
}], options: [{
|
|
7179
7285
|
type: Input
|