@bnsights/bbsf-controls 1.0.84 → 1.0.86

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.
@@ -1000,8 +1000,9 @@
1000
1000
  this.controlValidationService = controlValidationService;
1001
1001
  this.globalSettings = globalSettings;
1002
1002
  this.OnChange = new i0.EventEmitter();
1003
- this.ValidationMessage = "";
1004
- this.AcceptedType = "";
1003
+ this.ValidationMessage = '';
1004
+ this.ValidationCountMessage = '';
1005
+ this.AcceptedType = '';
1005
1006
  this.AcceptedTypeArray = [];
1006
1007
  this.ToolTipTypeArray = [];
1007
1008
  this.markAllAsTouched = false;
@@ -1054,7 +1055,8 @@
1054
1055
  else {
1055
1056
  if (this.options.IsMultipleFile == true) {
1056
1057
  var files = [];
1057
- this.multipleFileUploadModel.ExistingFiles = this.options.Value.ExistingFiles;
1058
+ this.multipleFileUploadModel.ExistingFiles =
1059
+ this.options.Value.ExistingFiles;
1058
1060
  this.multipleFileUploadModel.UploadedFiles = [];
1059
1061
  for (var index = 0; index < this.options.Value.ExistingFiles.length; index++) {
1060
1062
  var element = this.options.Value.ExistingFiles[index];
@@ -1092,28 +1094,81 @@
1092
1094
  this.uploader.addToQueue([file]);
1093
1095
  }
1094
1096
  }
1095
- if (this.options.LabelKey != null && this.options.LabelKey != "")
1097
+ if (this.options.LabelKey != null && this.options.LabelKey != '')
1096
1098
  this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
1097
- if (this.options.FileUploadAcceptsTypes != null && this.options.FileUploadAcceptsTypes.length > 0) {
1099
+ if (this.options.FileUploadAcceptsTypes != null &&
1100
+ this.options.FileUploadAcceptsTypes.length > 0) {
1098
1101
  for (var index = 0; index < this.options.FileUploadAcceptsTypes.length; index++) {
1099
1102
  var Type = this.options.FileUploadAcceptsTypes[index];
1100
- this.AcceptedType = this.AcceptedType + Type + ",";
1103
+ this.AcceptedType = this.AcceptedType + Type + ',';
1101
1104
  }
1102
- this.AcceptedTypeArray = this.AcceptedType.split(",");
1105
+ this.AcceptedTypeArray = this.AcceptedType.split(',');
1103
1106
  for (var index = 0; index < this.AcceptedTypeArray.length; index++) {
1104
1107
  var element = this.AcceptedTypeArray[index];
1105
- var TypeToolTipe = element.split('/')[1];
1106
- this.ToolTipTypeArray.push(TypeToolTipe);
1108
+ for (var index_1 = 0; index_1 < this.AcceptedTypeArray.length; index_1++) {
1109
+ var element_1 = this.AcceptedTypeArray[index_1];
1110
+ switch (element_1) {
1111
+ case 'application/pdf':
1112
+ if (!this.ToolTipTypeArray.includes('PDF'))
1113
+ this.ToolTipTypeArray.push('PDF');
1114
+ break;
1115
+ case 'application/msword':
1116
+ if (!this.ToolTipTypeArray.includes('Word'))
1117
+ this.ToolTipTypeArray.push('Word');
1118
+ break;
1119
+ case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
1120
+ if (!this.ToolTipTypeArray.includes('Word'))
1121
+ this.ToolTipTypeArray.push('Word');
1122
+ break;
1123
+ case 'application/vnd.ms-excel':
1124
+ if (!this.ToolTipTypeArray.includes('Excel'))
1125
+ this.ToolTipTypeArray.push('Excel');
1126
+ break;
1127
+ case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
1128
+ if (!this.ToolTipTypeArray.includes('Excel'))
1129
+ this.ToolTipTypeArray.push('Excel');
1130
+ break;
1131
+ case 'application/vnd.ms-powerpoint':
1132
+ if (!this.ToolTipTypeArray.includes('PowerPoint'))
1133
+ this.ToolTipTypeArray.push('PowerPoint');
1134
+ break;
1135
+ case 'applicationapplication/vnd.openxmlformats-officedocument.presentationml.presentation':
1136
+ if (!this.ToolTipTypeArray.includes('PowerPoint'))
1137
+ this.ToolTipTypeArray.push('PowerPoint');
1138
+ break;
1139
+ case "image/png":
1140
+ if (!this.ToolTipTypeArray.includes('PNG'))
1141
+ this.ToolTipTypeArray.push('PNG');
1142
+ break;
1143
+ case "image/bmp":
1144
+ if (!this.ToolTipTypeArray.includes('BMP'))
1145
+ this.ToolTipTypeArray.push('BMP');
1146
+ break;
1147
+ case "image/jpeg":
1148
+ if (!this.ToolTipTypeArray.includes('JPEG'))
1149
+ this.ToolTipTypeArray.push('JPEG');
1150
+ break;
1151
+ default:
1152
+ break;
1153
+ }
1154
+ }
1107
1155
  }
1108
- this.ValidationMessage = this.ValidationMessage + ("Allowed extenstions (" + this.ToolTipTypeArray + ") ");
1156
+ this.ValidationMessage =
1157
+ this.ValidationMessage +
1158
+ (this.UtilityService.getResourceValue('Extensions') + " (" + this.ToolTipTypeArray + ") ");
1109
1159
  }
1110
1160
  if (this.options.FileMaxSizeInMB > 0) {
1111
- this.ValidationMessage = this.ValidationMessage + ("<br /> Max File Size " + this.options.FileMaxSizeInMB + " MB");
1161
+ this.ValidationMessage =
1162
+ this.ValidationMessage +
1163
+ ("<br /> Max File Size " + this.options.FileMaxSizeInMB + " MB");
1112
1164
  }
1113
1165
  if (this.options.MinNoOfFiles > 0) {
1114
- this.ValidationMessage = this.ValidationMessage + ("<br /> Min File Number is " + this.options.MinNoOfFiles);
1166
+ this.ValidationMessage =
1167
+ this.ValidationMessage +
1168
+ ("<br /> Min File Number is " + this.options.MinNoOfFiles);
1115
1169
  }
1116
- if (this.options.FileUploadAcceptsTypes != null && this.options.FileUploadAcceptsTypes.length > 0) {
1170
+ if (this.options.FileUploadAcceptsTypes != null &&
1171
+ this.options.FileUploadAcceptsTypes.length > 0) {
1117
1172
  }
1118
1173
  this.group.addControl(this.options.Name, new forms.FormControl(''));
1119
1174
  this.fileUploadFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
@@ -1124,6 +1179,9 @@
1124
1179
  this.validationRules.push(Validation.functionBody);
1125
1180
  }
1126
1181
  }
1182
+ if (this.options.IsMultipleFile && this.options.MaxNoOfFiles > 0) {
1183
+ this.ValidationCountMessage = this.UtilityService.getResourceValue('MaxFilesCount') + " : " + this.options.MaxNoOfFiles;
1184
+ }
1127
1185
  if (this.options.IsRequired) {
1128
1186
  this.validationRules.push(forms.Validators.required);
1129
1187
  }
@@ -1159,24 +1217,51 @@
1159
1217
  FileUploadComponent.prototype.fileOverAnother = function (event) {
1160
1218
  this.hasAnotherDropZoneOver = event;
1161
1219
  };
1220
+ FileUploadComponent.prototype.isHideInput = function () {
1221
+ if (this.options.IsMultipleFile) {
1222
+ if (this.options.MaxNoOfFiles != null &&
1223
+ this.options.MaxNoOfFiles > 0 &&
1224
+ this.options.MaxNoOfFiles == this.uploader.queue.length) {
1225
+ return true;
1226
+ }
1227
+ }
1228
+ else {
1229
+ if (this.uploader.queue.length > 0) {
1230
+ return true;
1231
+ }
1232
+ }
1233
+ return false;
1234
+ };
1162
1235
  FileUploadComponent.prototype.onFileChange = function () {
1163
1236
  var _this = this;
1164
1237
  var FilesArray = [];
1165
- if (this.options.IsMultipleFile && this.options.MinNoOfFiles != null && this.options.MinNoOfFiles > 0 && this.options.MinNoOfFiles > this.uploader.queue.length) {
1238
+ if (this.options.IsMultipleFile &&
1239
+ this.options.MinNoOfFiles != null &&
1240
+ this.options.MinNoOfFiles > 0 &&
1241
+ this.options.MinNoOfFiles > this.uploader.queue.length) {
1166
1242
  var formControl = this.fileUploadFormControl;
1167
- formControl.setErrors({ MinFileCountValidationKey: this.options.MinNoOfFiles });
1243
+ formControl.setErrors({
1244
+ MinFileCountValidationKey: this.options.MinNoOfFiles,
1245
+ });
1168
1246
  formControl.markAsTouched();
1169
1247
  this.uploader.queue = [];
1170
1248
  return;
1171
1249
  }
1172
- if (this.options.IsMultipleFile && this.options.MaxNoOfFiles != null && this.options.MaxNoOfFiles > 0 && this.options.MaxNoOfFiles < this.uploader.queue.length) {
1250
+ if (this.options.IsMultipleFile &&
1251
+ this.options.MaxNoOfFiles != null &&
1252
+ this.options.MaxNoOfFiles > 0 &&
1253
+ this.options.MaxNoOfFiles < this.uploader.queue.length) {
1173
1254
  var formControl = this.fileUploadFormControl;
1174
- formControl.setErrors({ MaxFileCountValidationKey: this.options.MaxNoOfFiles });
1255
+ formControl.setErrors({
1256
+ MaxFileCountValidationKey: this.options.MaxNoOfFiles,
1257
+ });
1175
1258
  formControl.markAsTouched();
1176
1259
  this.uploader.queue = [];
1177
1260
  return;
1178
1261
  }
1179
- if (this.options.IsMultipleFile && (this.options.MaxSizeForAllFilesInMB != null && this.options.MaxSizeForAllFilesInMB > 0)) {
1262
+ if (this.options.IsMultipleFile &&
1263
+ this.options.MaxSizeForAllFilesInMB != null &&
1264
+ this.options.MaxSizeForAllFilesInMB > 0) {
1180
1265
  var AllSizeFile = 0;
1181
1266
  for (var index = 0; index < this.uploader.queue.length; index++) {
1182
1267
  var element = this.uploader.queue[index];
@@ -1186,13 +1271,15 @@
1186
1271
  var MaxSizeForAllFiles = this.options.MaxSizeForAllFilesInMB * 1000 * 1000;
1187
1272
  if (AllSizeFile > MaxSizeForAllFiles) {
1188
1273
  var formControl = this.fileUploadFormControl;
1189
- formControl.setErrors({ MaxSizeForAllFilesInMB: this.options.MaxSizeForAllFilesInMB + 'M' });
1274
+ formControl.setErrors({
1275
+ MaxSizeForAllFilesInMB: this.options.MaxSizeForAllFilesInMB + 'M',
1276
+ });
1190
1277
  formControl.markAsTouched();
1191
1278
  this.uploader.queue = [];
1192
1279
  return;
1193
1280
  }
1194
1281
  }
1195
- var AddedQueue = this.uploader.queue.filter(function (object) { return object["some"].lastModified != null; });
1282
+ var AddedQueue = this.uploader.queue.filter(function (object) { return object['some'].lastModified != null; });
1196
1283
  var _loop_1 = function (index) {
1197
1284
  var element = AddedQueue[index];
1198
1285
  var file = element.file;
@@ -1201,12 +1288,17 @@
1201
1288
  var fileType = file.type;
1202
1289
  if (file.size > maxFileSize) {
1203
1290
  var formControl = this_1.fileUploadFormControl;
1204
- formControl.setErrors({ FileMaxSizeInMB: this_1.options.FileMaxSizeInMB + 'M' });
1291
+ formControl.setErrors({
1292
+ FileMaxSizeInMB: this_1.options.FileMaxSizeInMB + 'M',
1293
+ });
1205
1294
  formControl.markAsTouched();
1206
1295
  this_1.uploader.queue = [];
1207
1296
  return { value: void 0 };
1208
1297
  }
1209
- if (this_1.options.FileUploadAcceptsTypes != null && this_1.options.FileUploadAcceptsTypes.length > 0 && !(this_1.AcceptedTypeArray.includes(fileType.toUpperCase()) || this_1.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
1298
+ if (this_1.options.FileUploadAcceptsTypes != null &&
1299
+ this_1.options.FileUploadAcceptsTypes.length > 0 &&
1300
+ !(this_1.AcceptedTypeArray.includes(fileType.toUpperCase()) ||
1301
+ this_1.AcceptedTypeArray.includes(fileType.toLowerCase()))) {
1210
1302
  var formControl = this_1.fileUploadFormControl;
1211
1303
  formControl.setErrors({ ToolTipTypeError: this_1.ToolTipTypeArray });
1212
1304
  formControl.markAsTouched();
@@ -1219,14 +1311,17 @@
1219
1311
  reader_1.onload = function () {
1220
1312
  var existingID_GUID = null;
1221
1313
  if (!_this.options.IsMultipleFile && _this.file)
1222
- existingID_GUID = _this.file.NameWithExtension == file.name ? _this.file.ID_GUID : null;
1314
+ existingID_GUID =
1315
+ _this.file.NameWithExtension == file.name
1316
+ ? _this.file.ID_GUID
1317
+ : null;
1223
1318
  var AddedFile = {
1224
1319
  FileName: file.name,
1225
1320
  FileType: file.type,
1226
1321
  FileBase64: reader_1.result.toString().split(',')[1],
1227
- FileSizeInMB: ((file.size / 1000) / 1000),
1322
+ FileSizeInMB: file.size / 1000 / 1000,
1228
1323
  NameWithExtension: file.name,
1229
- ID_GUID: existingID_GUID
1324
+ ID_GUID: existingID_GUID,
1230
1325
  };
1231
1326
  if (_this.options.IsMultipleFile == false) {
1232
1327
  _this.fileUploadModel = new FileUploadModel();
@@ -1245,13 +1340,17 @@
1245
1340
  }
1246
1341
  }
1247
1342
  _this.fileUploadFormControl.setValue(_this.multipleFileUploadModel);
1248
- _this.group.get(_this.options.Name).setValue(_this.multipleFileUploadModel);
1343
+ _this.group
1344
+ .get(_this.options.Name)
1345
+ .setValue(_this.multipleFileUploadModel);
1249
1346
  //Use this line to enable two way binding.
1250
1347
  _this.options.Value = _this.multipleFileUploadModel;
1251
1348
  }
1252
1349
  };
1253
1350
  var originalValue = this_1.group.get(this_1.options.Name).value;
1254
- if (this_1.options.PatchFunction && this_1.options.PatchPath && this_1.group.get(this_1.options.Name).valid) {
1351
+ if (this_1.options.PatchFunction &&
1352
+ this_1.options.PatchPath &&
1353
+ this_1.group.get(this_1.options.Name).valid) {
1255
1354
  this_1.controlUtility.patchControlValue(originalValue, this_1.options.PatchFunction, this_1.options.PatchPath);
1256
1355
  }
1257
1356
  this_1.OnChange.emit(originalValue);
@@ -1284,7 +1383,8 @@
1284
1383
  if (this.multipleFileUploadModel.RemovedFiles.length == 0) {
1285
1384
  var FileObject_1 = item.file.rawFile;
1286
1385
  var DeletedItem = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_1.name; })[0];
1287
- this.multipleFileUploadModel.ExistingFiles = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_1.name; });
1386
+ this.multipleFileUploadModel.ExistingFiles =
1387
+ this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_1.name; });
1288
1388
  this.deletedFiles.push(DeletedItem);
1289
1389
  this.multipleFileUploadModel.RemovedFiles.push(DeletedItem.ID_GUID);
1290
1390
  }
@@ -1293,7 +1393,8 @@
1293
1393
  var deletedList = this.deletedFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_2.name; });
1294
1394
  if (deletedList.length == 0 || deletedList == undefined) {
1295
1395
  var DeletedItem = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension == FileObject_2.name; })[0];
1296
- this.multipleFileUploadModel.ExistingFiles = this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_2.name; });
1396
+ this.multipleFileUploadModel.ExistingFiles =
1397
+ this.multipleFileUploadModel.ExistingFiles.filter(function (Object) { return Object.NameWithExtension != FileObject_2.name; });
1297
1398
  this.deletedFiles.push(DeletedItem);
1298
1399
  this.multipleFileUploadModel.RemovedFiles.push(DeletedItem.ID_GUID);
1299
1400
  }
@@ -1304,8 +1405,11 @@
1304
1405
  this.deletedFiles = [];
1305
1406
  this.multipleFileUploadModel.RemovedFiles = [];
1306
1407
  }
1307
- this.multipleFileUploadModel.UploadedFiles = this.multipleFileUploadModel.UploadedFiles.filter(function (Object) { return Object.NameWithExtension != item._file.name; });
1308
- if ((this.multipleFileUploadModel.UploadedFiles == null || this.multipleFileUploadModel.UploadedFiles == []) && this.options.IsRequired) {
1408
+ this.multipleFileUploadModel.UploadedFiles =
1409
+ this.multipleFileUploadModel.UploadedFiles.filter(function (Object) { return Object.NameWithExtension != item._file.name; });
1410
+ if ((this.multipleFileUploadModel.UploadedFiles == null ||
1411
+ this.multipleFileUploadModel.UploadedFiles == []) &&
1412
+ this.options.IsRequired) {
1309
1413
  this.fileUploadFormControl.markAsTouched();
1310
1414
  this.fileUploadFormControl.invalid;
1311
1415
  }
@@ -1321,7 +1425,7 @@
1321
1425
  FileUploadComponent.decorators = [
1322
1426
  { type: i0.Component, args: [{
1323
1427
  selector: 'BBSF-FileUplaod',
1324
- 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)\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div ng2FileDrop class=\"bbsf-input-container {{options.ExtraClasses}}\"\r\n *ngIf=\"(options.IsDropZone)&&(!((options.IsMultipleFile==false)&&(uploader.queue.length)>0))\"\r\n [ngClass]=\"{'another-file-over-class': hasAnotherDropZoneOver}\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n (change)=\"onFileChange()\" id=\"{{options.Name}}\" multiple=\"{{options.IsMultipleFile?'multiple':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" type=\"file\" formControlName=\"{{options.Name}}\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 50px; height: 50px;\">\r\n <path opacity=\"0.3\" d=\"M5 16C3.3 16 2 14.7 2 13C2 11.3 3.3 10 5 10H5.1C5 9.7 5 9.3 5 9C5 6.2 7.2 4 10 4C11.9 4 13.5 5 14.3 6.5C14.8 6.2 15.4 6 16 6C17.7 6 19 7.3 19 9C19 9.4 18.9 9.7 18.8 10C18.9 10 18.9 10 19 10C20.7 10 22 11.3 22 13C22 14.7 20.7 16 19 16H5ZM8 13.6H16L12.7 10.3C12.3 9.89999 11.7 9.89999 11.3 10.3L8 13.6Z\" fill=\"currentColor\" style=\"fill: #a1a1a1;\"></path>\r\n <path d=\"M11 13.6V19C11 19.6 11.4 20 12 20C12.6 20 13 19.6 13 19V13.6H11Z\" fill=\"currentColor\" style=\"fill: #989898;\"></path>\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg\">{{UtilityService.getResourceValue(\"DragAndDropHere\")}} </div>\r\n <div class=\"bbsf-validation-msg\" *ngIf=\"ValidationMessage\" [innerHTML]=\"ValidationMessage\"></div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"(!options.IsDropZone)&&!((uploader.queue.length>0)&&(!options.IsMultipleFile))\" (click)=\"fileInput.click();\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 50px; height: 50px;\">\r\n <path opacity=\"0.3\" d=\"M5 16C3.3 16 2 14.7 2 13C2 11.3 3.3 10 5 10H5.1C5 9.7 5 9.3 5 9C5 6.2 7.2 4 10 4C11.9 4 13.5 5 14.3 6.5C14.8 6.2 15.4 6 16 6C17.7 6 19 7.3 19 9C19 9.4 18.9 9.7 18.8 10C18.9 10 18.9 10 19 10C20.7 10 22 11.3 22 13C22 14.7 20.7 16 19 16H5ZM8 13.6H16L12.7 10.3C12.3 9.89999 11.7 9.89999 11.3 10.3L8 13.6Z\" fill=\"currentColor\" style=\"fill: #a1a1a1;\"></path>\r\n <path d=\"M11 13.6V19C11 19.6 11.4 20 12 20C12.6 20 13 19.6 13 19V13.6H11Z\" fill=\"currentColor\" style=\"fill: #989898;\"></path>\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg\">{{UtilityService.getResourceValue(\"Upload\")}} </div>\r\n <div class=\"bbsf-validation-msg\" *ngIf=\"ValidationMessage\" [innerHTML]=\"ValidationMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{options.IsMultipleFile?'multiple':''}}\" name=\"file\" type=\"file\" value=\"\"\r\n autocomplete=\"off\" (change)=\"onFileChange()\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n id=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{options.Name}}\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\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 <button type=\"button\" class=\"btn btn-download-file btn-sm\" href=\"{{ item?._file?.url}}\" 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 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\" 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 </button>\r\n <button class=\"btn btn-download-file btn-sm btn-danger\"\r\n (click)=\"item.remove();removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\"\r\n *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) \">{{resetError()}}</div>\r\n </div>\r\n\r\n</div>\r\n\r\n"
1428
+ 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)\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div ng2FileDrop class=\"bbsf-input-container {{options.ExtraClasses}}\"\r\n *ngIf=\"(options.IsDropZone)&&(!((options.IsMultipleFile==false)&&(uploader.queue.length)>0))\"\r\n [ngClass]=\"{'another-file-over-class': hasAnotherDropZoneOver}\" (onFileDrop)=\"onFileChange()\"\r\n (fileOver)=\"fileOverAnother($event)\" [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n (change)=\"onFileChange()\" id=\"{{options.Name}}\" multiple=\"{{options.IsMultipleFile?'multiple':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" type=\"file\" formControlName=\"{{options.Name}}\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 50px; height: 50px;\">\r\n <path opacity=\"0.3\" d=\"M5 16C3.3 16 2 14.7 2 13C2 11.3 3.3 10 5 10H5.1C5 9.7 5 9.3 5 9C5 6.2 7.2 4 10 4C11.9 4 13.5 5 14.3 6.5C14.8 6.2 15.4 6 16 6C17.7 6 19 7.3 19 9C19 9.4 18.9 9.7 18.8 10C18.9 10 18.9 10 19 10C20.7 10 22 11.3 22 13C22 14.7 20.7 16 19 16H5ZM8 13.6H16L12.7 10.3C12.3 9.89999 11.7 9.89999 11.3 10.3L8 13.6Z\" fill=\"currentColor\" style=\"fill: #a1a1a1;\"></path>\r\n <path d=\"M11 13.6V19C11 19.6 11.4 20 12 20C12.6 20 13 19.6 13 19V13.6H11Z\" fill=\"currentColor\" style=\"fill: #989898;\"></path>\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg text-center\">{{UtilityService.getResourceValue(\"DragAndDropHere\")}} </div>\r\n <div class=\"bbsf-validation-msg text-center\" *ngIf=\"ValidationMessage\" [innerHTML]=\"ValidationMessage\"></div>\r\n <div class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\" *ngIf=\"ValidationCountMessage &&options.IsMultipleFile &&options.MaxNoOfFiles>0\" [innerHTML]=\"ValidationCountMessage\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div class=\"bbsf-input-container\" *ngIf=\"(!options.IsDropZone)&&!(isHideInput())\" (click)=\"fileInput.click();\">\r\n <div class=\"dropzone-label\">\r\n <div class=\"svg-and-validation\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 50px; height: 50px;\">\r\n <path opacity=\"0.3\" d=\"M5 16C3.3 16 2 14.7 2 13C2 11.3 3.3 10 5 10H5.1C5 9.7 5 9.3 5 9C5 6.2 7.2 4 10 4C11.9 4 13.5 5 14.3 6.5C14.8 6.2 15.4 6 16 6C17.7 6 19 7.3 19 9C19 9.4 18.9 9.7 18.8 10C18.9 10 18.9 10 19 10C20.7 10 22 11.3 22 13C22 14.7 20.7 16 19 16H5ZM8 13.6H16L12.7 10.3C12.3 9.89999 11.7 9.89999 11.3 10.3L8 13.6Z\" fill=\"currentColor\" style=\"fill: #a1a1a1;\"></path>\r\n <path d=\"M11 13.6V19C11 19.6 11.4 20 12 20C12.6 20 13 19.6 13 19V13.6H11Z\" fill=\"currentColor\" style=\"fill: #989898;\"></path>\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 class=\"bbsf-validation-msg ng-star-inserted text-center text-danger\" *ngIf=\"ValidationCountMessage &&options.IsMultipleFile &&options.MaxNoOfFiles>0\" [innerHTML]=\"ValidationCountMessage\"></div>\r\n </div>\r\n </div>\r\n <input ng2FileSelect [uploader]=\"uploader\" [accept]=\"AcceptedType\"\r\n class=\"fileSelector customFileUploadPlacment hidden v-required-multiplefiles d-none\"\r\n multiple=\"{{options.IsMultipleFile?'multiple':''}}\" name=\"file\" type=\"file\" value=\"\"\r\n autocomplete=\"off\" (change)=\"onFileChange()\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n id=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{options.Name}}\" #fileInput\r\n [class.is-invalid]=\"fileUploadFormControl.invalid && fileUploadFormControl.touched\">\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 <button type=\"button\" class=\"btn btn-download-file btn-sm\" href=\"{{ item?._file?.url}}\" 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 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\" 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 </button>\r\n <button class=\"btn btn-download-file btn-sm btn-danger\"\r\n (click)=\"item.remove();removeFromControlValue(item)\">\r\n <i class=\"fa fa-times px-0\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\"\r\n *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) \">{{resetError()}}</div>\r\n </div>\r\n\r\n</div>\r\n\r\n"
1325
1429
  },] }
1326
1430
  ];
1327
1431
  FileUploadComponent.ctorParameters = function () { return [
@@ -2122,7 +2226,7 @@
2122
2226
  this.controlUtility.arabicValidator({ ArabicIsRequiredAndOnly50CharactersEnglish: this.ArabicLetterOnly }),
2123
2227
  ]));
2124
2228
  this.EnglishValidationRules.push(forms.Validators.compose([
2125
- this.controlUtility.patternValidator(/^[~`!@#$%^&*()‘’“”_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9- ]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
2229
+ this.controlUtility.patternValidator(/^[~`!@#$%^&*()‘’“”_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9- \n]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
2126
2230
  ]));
2127
2231
  this.ArabicTextAreaFormControl.setValidators(this.ArabicValidationRules);
2128
2232
  this.ArabicTextAreaFormControl.setAsyncValidators(this.ArabicValidationRulesasync);