@gsp-svc/formdoc-upload 0.2.2 → 0.2.20

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.
@@ -10,6 +10,7 @@ import { ProgressModule } from '@farris/ui-progress';
10
10
  import { FormsModule } from '@angular/forms';
11
11
  import { ComboListModule } from '@farris/ui-combo-list';
12
12
  import { FarrisFormsModule } from '@farris/ui-forms';
13
+ import { BasePathService, FarrisRTFModule } from '@farris/rtf';
13
14
  import { CacheService, HttpService, LanguageService, SessionService } from '@ecp-caf/caf-common';
14
15
  import { Injectable, Pipe, Inject, LOCALE_ID, Component, ViewChild, Input, Injector, ComponentFactoryResolver, NgModule, defineInjectable } from '@angular/core';
15
16
  import { BsModalService } from '@farris/ui-modal';
@@ -324,7 +325,9 @@ var UploadService = /** @class */ (function () {
324
325
  /** @type {?} */
325
326
  var url = "/api/runtime/dfs/v1.0/formdoc/slice";
326
327
  //url = "/api/runtime/dfs/v1.0/formdoc/list";
327
- return this.httpclient.post(url, formdata).pipe(tap((/**
328
+ /** @type {?} */
329
+ var baseUrl = BasePathService.convertPath(url);
330
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
328
331
  * @param {?} res
329
332
  * @return {?}
330
333
  */
@@ -427,11 +430,13 @@ var UploadService = /** @class */ (function () {
427
430
  /** @type {?} */
428
431
  var url = "/api/runtime/dfs/v1.0/formdoc/copy";
429
432
  /** @type {?} */
433
+ var baseUrl = BasePathService.convertPath(url);
434
+ /** @type {?} */
430
435
  var request = new CopyFileRequest;
431
436
  request.metadataId = metadataId;
432
437
  request.rootId = rootId;
433
438
  request.path = path;
434
- return this.httpclient.post(url, request, { responseType: 'text' }).pipe(tap((/**
439
+ return this.httpclient.post(baseUrl, request, { responseType: 'text' }).pipe(tap((/**
435
440
  * @param {?} res
436
441
  * @return {?}
437
442
  */
@@ -576,7 +581,7 @@ var LANG_RESOURCES = {
576
581
  'uploading': '正在上传文件……',
577
582
  'selectedCount': '已选择文件数量:',
578
583
  'limitCount': '超出系统限制数量:',
579
- 'rechooseFile': ',重新选择上传文件。',
584
+ 'rechooseFile': ',请重新选择上传文件。',
580
585
  'save': '保存',
581
586
  'cancel': '取消',
582
587
  'haveSameName': '已上传过同名文件: ',
@@ -598,7 +603,13 @@ var LANG_RESOURCES = {
598
603
  'size': '大小',
599
604
  'close': '关闭',
600
605
  'loading': '拼命加载中',
601
- 'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。'
606
+ 'mismatchChunkSize': '文档分片上传部分丢失,请重新上传,如果多次上传失败,请联系管理员。',
607
+ 'invalidCharacters': '文件名包含特殊字符',
608
+ 'invalidExtNames': '文档类型不允许上传',
609
+ 'whiteExtNames': '。允许上传的文件类型为:',
610
+ 'blackExtNames': '。不允许上传的文件类型为:',
611
+ 'UnrecognizedFileType': '无法确定文件类型',
612
+ 'fileNameOverSize': '文件名超出长度限制,最长允许'
602
613
  },
603
614
  'en-US': {
604
615
  'uploadFile': 'Upload File',
@@ -627,7 +638,13 @@ var LANG_RESOURCES = {
627
638
  'size': 'Size',
628
639
  'close': 'Close',
629
640
  'loading': 'Loading',
630
- 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
641
+ 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
642
+ 'invalidCharacters': 'The file name contains special characters',
643
+ 'invalidExtNames': 'Document type does not allow uploading',
644
+ 'whiteExtNames': '.The file types allowed for uploading are:',
645
+ 'blackExtNames': '.The file types that are not allowed to be uploaded are:',
646
+ 'UnrecognizedFileType': 'Unrecognized file type',
647
+ 'fileNameOverSize': 'fileName oversize,the lengthest is'
631
648
  },
632
649
  'en': {
633
650
  'uploadFile': 'Upload File',
@@ -656,7 +673,13 @@ var LANG_RESOURCES = {
656
673
  'size': 'Size',
657
674
  'close': 'Close',
658
675
  'loading': 'Loading',
659
- 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.'
676
+ 'mismatchChunkSize': 'The partial upload of document shards is missing. Please upload again. If multiple uploads fail, please contact the administrator.',
677
+ 'invalidCharacters': 'The file name contains special characters',
678
+ 'invalidExtNames': 'Document type does not allow uploading',
679
+ 'whiteExtNames': '.The file types allowed for uploading are:',
680
+ 'blackExtNames': '.The file types that are not allowed to be uploaded are:',
681
+ 'UnrecognizedFileType': 'Unrecognized file type',
682
+ 'fileNameOverSize': 'fileName oversize,the lengthest is'
660
683
  },
661
684
  'zh-CHT': {
662
685
  'uploadFile': '上傳文件',
@@ -685,7 +708,13 @@ var LANG_RESOURCES = {
685
708
  'size': '大小',
686
709
  'close': '關閉',
687
710
  'loading': '拼命加載中',
688
- 'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。'
711
+ 'mismatchChunkSize': '文檔分片上傳部分遺失,請重新上傳,如果多次上傳失敗,請聯系管理員。',
712
+ 'invalidCharacters': '文件名包含特殊字符',
713
+ 'invalidExtNames': '文檔類型不允許上傳',
714
+ 'whiteExtNames': '。允許上傳的文件類型為:',
715
+ 'blackExtNames': '。不允許上傳的文件類型為:',
716
+ 'UnrecognizedFileType': '無法確定文件類型',
717
+ 'fileNameOverSize': '文件名超出长度限制,最长允许'
689
718
  },
690
719
  };
691
720
 
@@ -787,12 +816,19 @@ var FileUploadComponent = /** @class */ (function () {
787
816
  this.errTypeList = [];
788
817
  this.nullFileList = [];
789
818
  this.beyondFileList = [];
819
+ this.fileNameOversizeList = [];
820
+ this.invalidCharactersFileList = [];
821
+ this.invalidExtNamesFileList = [];
822
+ this.unrecognizedTypeFileList = [];
823
+ this.invalidCharacters = '';
824
+ this.invalidExtNames = '';
790
825
  this.showType = 0;
791
826
  this.mouseOn = false;
827
+ this.isWhiteList = false;
792
828
  this.bufferSize = 5 * 1024 * 1024;
793
829
  this.selectedFileCount = 0;
794
- this.uploadIconAddress = '/platform/runtime/dfs/images/upload.svg';
795
- this.uploadLittleIconAddress = '/platform/runtime/dfs/images/uploadIcon.svg';
830
+ this.uploadIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/upload.svg');
831
+ this.uploadLittleIconAddress = this.createBaseUrl('/platform/runtime/dfs/images/uploadIcon.svg');
796
832
  this.hasSelectedFile = false;
797
833
  this.fileAllSelected = false;
798
834
  this.uploadProcess = { width: '0%' };
@@ -819,6 +855,7 @@ var FileUploadComponent = /** @class */ (function () {
819
855
  this.fileCount = 0;
820
856
  this.oldIdList = [];
821
857
  this.securityInfo = null;
858
+ this.fileNameLength = 0;
822
859
  this.totalLoad = null;
823
860
  this.exStorageFileList = [];
824
861
  if (this.injector) {
@@ -888,6 +925,9 @@ var FileUploadComponent = /** @class */ (function () {
888
925
  if (res != null && res.error == null) {
889
926
  _this.sameNameAllowed = res.sameNameAllowed;
890
927
  _this.maxFileSize = parseInt(JSON.parse(res.validateConfiguration).maxFileSize);
928
+ _this.isWhiteList = JSON.parse(res.validateConfiguration).whiteList;
929
+ _this.invalidCharacters = JSON.parse(res.validateConfiguration).invalidCharacters;
930
+ _this.invalidExtNames = JSON.parse(res.validateConfiguration).invalidExtNames.toLowerCase();
891
931
  _this.allowedMultiUpload = res.allowedMultiUpload;
892
932
  if (!_this.sameNameAllowed) {
893
933
  _this.uploadService.getUploadedFileInfoList(_this.formId, _this.rootId).subscribe((/**
@@ -919,6 +959,38 @@ var FileUploadComponent = /** @class */ (function () {
919
959
  // message: this.localepipe.transform('uploading')
920
960
  // });
921
961
  };
962
+ /**
963
+ * @param {?} name
964
+ * @return {?}
965
+ */
966
+ FileUploadComponent.prototype.findInvalidCharacter = /**
967
+ * @param {?} name
968
+ * @return {?}
969
+ */
970
+ function (name) {
971
+ /** @type {?} */
972
+ var charList = [];
973
+ this.invalidCharacters.split('|').forEach((/**
974
+ * @param {?} element
975
+ * @return {?}
976
+ */
977
+ function (element) {
978
+ if (name.indexOf(element) >= 0)
979
+ charList.push(element);
980
+ }));
981
+ return charList;
982
+ };
983
+ /**
984
+ * @param {?} file
985
+ * @return {?}
986
+ */
987
+ FileUploadComponent.prototype.hasFileType = /**
988
+ * @param {?} file
989
+ * @return {?}
990
+ */
991
+ function (file) {
992
+ return file.name.includes('.');
993
+ };
922
994
  /**
923
995
  * @param {?} $event
924
996
  * @return {?}
@@ -942,6 +1014,7 @@ var FileUploadComponent = /** @class */ (function () {
942
1014
  var _loop_1 = function (i) {
943
1015
  /** @type {?} */
944
1016
  var selectedFile = this_1.selectedFiles.files[i];
1017
+ selectedFile.isAllowedUpload = true;
945
1018
  //selectedFile.slice
946
1019
  /** @type {?} */
947
1020
  var uuid = UUID.UUID();
@@ -949,12 +1022,86 @@ var FileUploadComponent = /** @class */ (function () {
949
1022
  this_1.nullFileList.push(selectedFile.name);
950
1023
  return "continue";
951
1024
  }
1025
+ if (this_1.fileNameLength > 0 && selectedFile.name.length > this_1.fileNameLength) {
1026
+ this_1.fileNameOversizeList.push(selectedFile.name);
1027
+ return "continue";
1028
+ }
952
1029
  if (this_1.maxFileSize != null && this_1.maxFileSize > 0) {
953
1030
  if (selectedFile.size > this_1.maxFileSize * 1000) {
954
1031
  this_1.beyondFileList.push(selectedFile.name);
955
1032
  return "continue";
956
1033
  }
957
1034
  }
1035
+ /** @type {?} */
1036
+ var invalidCharList = this_1.findInvalidCharacter(selectedFile.name);
1037
+ /** @type {?} */
1038
+ var errorMessage = "";
1039
+ if (invalidCharList.length > 0) {
1040
+ invalidCharList.forEach((/**
1041
+ * @param {?} element
1042
+ * @param {?} index
1043
+ * @return {?}
1044
+ */
1045
+ function (element, index) {
1046
+ errorMessage += "\"";
1047
+ errorMessage += element;
1048
+ errorMessage += "\"";
1049
+ errorMessage += (index === invalidCharList.length - 1) ? "" : ",";
1050
+ }));
1051
+ if (this_1.selectedFiles.files.length === 1) {
1052
+ selectedFile.isAllowedUpload = false;
1053
+ this_1.msgService.warning(this_1.localepipe.transform('invalidCharacters') + errorMessage + this_1.localepipe.transform('rechooseFile'));
1054
+ return { value: void 0 };
1055
+ }
1056
+ if (this_1.selectedFiles.files.length > 1) {
1057
+ selectedFile.isAllowedUpload = false;
1058
+ this_1.invalidCharactersFileList.push(selectedFile.name);
1059
+ return "continue";
1060
+ }
1061
+ }
1062
+ if (!this_1.hasFileType(selectedFile)) {
1063
+ if (this_1.selectedFiles.files.length === 1) {
1064
+ selectedFile.isAllowedUpload = false;
1065
+ this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('UnrecognizedFileType') + this_1.localepipe.transform('rechooseFile'));
1066
+ return { value: void 0 };
1067
+ }
1068
+ if (this_1.selectedFiles.files.length > 1) {
1069
+ selectedFile.isAllowedUpload = false;
1070
+ this_1.unrecognizedTypeFileList.push(selectedFile.name);
1071
+ return "continue";
1072
+ }
1073
+ }
1074
+ // let curFileSuffix = selectedFile.name.split('.')[1];
1075
+ /** @type {?} */
1076
+ var curFileSuffix = selectedFile.name.substr(selectedFile.name.lastIndexOf('.') + 1).toLowerCase();
1077
+ /** @type {?} */
1078
+ var extNames = this_1.listToString(this_1.invalidExtNames.split('|'));
1079
+ /** @type {?} */
1080
+ var extNamesAry = this_1.invalidExtNames.split('|');
1081
+ if (!this_1.isWhiteList && extNamesAry.includes(curFileSuffix)) {
1082
+ if (this_1.selectedFiles.files.length === 1) {
1083
+ selectedFile.isAllowedUpload = false;
1084
+ this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('invalidExtNames') + this_1.localepipe.transform('blackExtNames') + extNames + this_1.localepipe.transform('rechooseFile'));
1085
+ return { value: void 0 };
1086
+ }
1087
+ if (this_1.selectedFiles.files.length > 1) {
1088
+ selectedFile.isAllowedUpload = false;
1089
+ this_1.invalidExtNamesFileList.push(selectedFile.name);
1090
+ return "continue";
1091
+ }
1092
+ }
1093
+ if (this_1.isWhiteList && !extNamesAry.includes(curFileSuffix)) {
1094
+ if (this_1.selectedFiles.files.length === 1) {
1095
+ selectedFile.isAllowedUpload = false;
1096
+ this_1.msgService.warning(selectedFile.name + this_1.localepipe.transform('invalidExtNames') + this_1.localepipe.transform('whiteExtNames') + extNames + this_1.localepipe.transform('rechooseFile'));
1097
+ return { value: void 0 };
1098
+ }
1099
+ if (this_1.selectedFiles.files.length > 1) {
1100
+ selectedFile.isAllowedUpload = false;
1101
+ this_1.invalidExtNamesFileList.push(selectedFile.name);
1102
+ return "continue";
1103
+ }
1104
+ }
958
1105
  if (!this_1.sameNameAllowed) {
959
1106
  if (this_1.uploadedFileInfoList.find((/**
960
1107
  * @param {?} x
@@ -1041,12 +1188,16 @@ var FileUploadComponent = /** @class */ (function () {
1041
1188
  return "continue";
1042
1189
  }
1043
1190
  }
1044
- this_1.uploadFile(uuid, selectedFile, selectedFile.name);
1191
+ if (selectedFile.isAllowedUpload === true) {
1192
+ this_1.uploadFile(uuid, selectedFile, selectedFile.name);
1193
+ }
1045
1194
  };
1046
1195
  var this_1 = this;
1047
1196
  //this.flag = 0;
1048
1197
  for (var i = 0; i < this.selectedFiles.files.length; i++) {
1049
- _loop_1(i);
1198
+ var state_1 = _loop_1(i);
1199
+ if (typeof state_1 === "object")
1200
+ return state_1.value;
1050
1201
  }
1051
1202
  if (this.errFileList.length > 0) {
1052
1203
  /** @type {?} */
@@ -1057,17 +1208,39 @@ var FileUploadComponent = /** @class */ (function () {
1057
1208
  if (this.nullFileList.length > 0) {
1058
1209
  /** @type {?} */
1059
1210
  var name_2 = this.listToString(this.nullFileList);
1060
- name_2 = name_2.substring(0, name_2.length - 1);
1061
1211
  this.msgService.warning(name_2 + this.localepipe.transform('sizeZero') + this.localepipe.transform('rechooseFile'));
1062
1212
  this.nullFileList = [];
1063
1213
  }
1214
+ if (this.fileNameOversizeList.length > 0) {
1215
+ /** @type {?} */
1216
+ var name_3 = this.listToString(this.fileNameOversizeList);
1217
+ this.msgService.warning(name_3 + this.localepipe.transform('fileNameOverSize') + this.fileNameLength + this.localepipe.transform('rechooseFile'));
1218
+ this.fileNameOversizeList = [];
1219
+ }
1064
1220
  if (this.beyondFileList.length > 0) {
1065
1221
  /** @type {?} */
1066
- var name_3 = this.listToString(this.beyondFileList);
1067
- name_3 = name_3.substring(0, name_3.length - 1);
1068
- this.msgService.warning(name_3 + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
1222
+ var name_4 = this.listToString(this.beyondFileList);
1223
+ this.msgService.warning(name_4 + this.localepipe.transform('sizeMax') + this.maxFileSize + "KB" + this.localepipe.transform('rechooseFile'));
1069
1224
  this.beyondFileList = [];
1070
1225
  }
1226
+ if (this.invalidCharactersFileList.length > 0) {
1227
+ /** @type {?} */
1228
+ var name_5 = this.listToString(this.invalidCharactersFileList);
1229
+ this.msgService.warning(name_5 + this.localepipe.transform('invalidCharacters') + this.localepipe.transform('rechooseFile'));
1230
+ this.invalidCharactersFileList = [];
1231
+ }
1232
+ if (this.invalidExtNamesFileList.length > 0) {
1233
+ /** @type {?} */
1234
+ var name_6 = this.listToString(this.invalidExtNamesFileList);
1235
+ this.msgService.warning(name_6 + this.localepipe.transform('invalidExtNames') + this.localepipe.transform('rechooseFile'));
1236
+ this.invalidExtNamesFileList = [];
1237
+ }
1238
+ if (this.unrecognizedTypeFileList.length > 0) {
1239
+ /** @type {?} */
1240
+ var name_7 = this.listToString(this.unrecognizedTypeFileList);
1241
+ this.msgService.warning(name_7 + this.localepipe.transform('UnrecognizedFileType') + this.localepipe.transform('rechooseFile'));
1242
+ this.unrecognizedTypeFileList = [];
1243
+ }
1071
1244
  this.files = this.files.slice();
1072
1245
  this.fileAllSelected = false;
1073
1246
  $event.target.value = '';
@@ -1351,7 +1524,9 @@ var FileUploadComponent = /** @class */ (function () {
1351
1524
  function (formdata) {
1352
1525
  /** @type {?} */
1353
1526
  var url = "/api/runtime/dfs/v1.0/formdoc/single";
1354
- return this.httpclient.post(url, formdata).pipe(tap((/**
1527
+ /** @type {?} */
1528
+ var baseUrl = BasePathService.convertPath(url);
1529
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
1355
1530
  * @param {?} res
1356
1531
  * @return {?}
1357
1532
  */
@@ -1374,7 +1549,9 @@ var FileUploadComponent = /** @class */ (function () {
1374
1549
  function (formdata) {
1375
1550
  /** @type {?} */
1376
1551
  var url = "/api/runtime/dfs/v1.0/formdoc/slice";
1377
- return this.httpclient.post(url, formdata).pipe(tap((/**
1552
+ /** @type {?} */
1553
+ var baseUrl = BasePathService.convertPath(url);
1554
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
1378
1555
  * @param {?} res
1379
1556
  * @return {?}
1380
1557
  */
@@ -1397,7 +1574,9 @@ var FileUploadComponent = /** @class */ (function () {
1397
1574
  function (request) {
1398
1575
  /** @type {?} */
1399
1576
  var url = "/api/runtime/dfs/v1.0/formdoc/multi/init";
1400
- return this.httpclient.post(url, request).pipe(tap((/**
1577
+ /** @type {?} */
1578
+ var baseUrl = BasePathService.convertPath(url);
1579
+ return this.httpclient.post(baseUrl, request).pipe(tap((/**
1401
1580
  * @param {?} res
1402
1581
  * @return {?}
1403
1582
  */
@@ -1420,7 +1599,9 @@ var FileUploadComponent = /** @class */ (function () {
1420
1599
  function (formdata) {
1421
1600
  /** @type {?} */
1422
1601
  var url = "/api/runtime/dfs/v1.0/formdoc/multi/upload";
1423
- return this.httpclient.post(url, formdata).pipe(tap((/**
1602
+ /** @type {?} */
1603
+ var baseUrl = BasePathService.convertPath(url);
1604
+ return this.httpclient.post(baseUrl, formdata).pipe(tap((/**
1424
1605
  * @param {?} res
1425
1606
  * @return {?}
1426
1607
  */
@@ -1443,7 +1624,9 @@ var FileUploadComponent = /** @class */ (function () {
1443
1624
  function (request) {
1444
1625
  /** @type {?} */
1445
1626
  var url = "/api/runtime/dfs/v1.0/formdoc/multi/complete";
1446
- return this.httpclient.post(url, request).pipe(tap((/**
1627
+ /** @type {?} */
1628
+ var baseUrl = BasePathService.convertPath(url);
1629
+ return this.httpclient.post(baseUrl, request).pipe(tap((/**
1447
1630
  * @param {?} res
1448
1631
  * @return {?}
1449
1632
  */
@@ -1639,32 +1822,32 @@ var FileUploadComponent = /** @class */ (function () {
1639
1822
  var _this = this;
1640
1823
  switch (docType) {
1641
1824
  case DocType.Word: {
1642
- fileInfo.source = "/platform/runtime/dfs/images/word.png";
1825
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/word.png");
1643
1826
  this.files.push(fileInfo);
1644
1827
  break;
1645
1828
  }
1646
1829
  case DocType.Pdf: {
1647
- fileInfo.source = "/platform/runtime/dfs/images/pdf.png";
1830
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/pdf.png");
1648
1831
  this.files.push(fileInfo);
1649
1832
  break;
1650
1833
  }
1651
1834
  case DocType.Excel: {
1652
- fileInfo.source = "/platform/runtime/dfs/images/excel.png";
1835
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/excel.png");
1653
1836
  this.files.push(fileInfo);
1654
1837
  break;
1655
1838
  }
1656
1839
  case DocType.Txt: {
1657
- fileInfo.source = "/platform/runtime/dfs/images/txt.png";
1840
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/txt.png");
1658
1841
  this.files.push(fileInfo);
1659
1842
  break;
1660
1843
  }
1661
1844
  case DocType.Powerpoint: {
1662
- fileInfo.source = "/platform/runtime/dfs/images/ppt.png";
1845
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/ppt.png");
1663
1846
  this.files.push(fileInfo);
1664
1847
  break;
1665
1848
  }
1666
1849
  case DocType.Other: {
1667
- fileInfo.source = "/platform/runtime/dfs/images/file.png";
1850
+ fileInfo.source = this.createBaseUrl("/platform/runtime/dfs/images/file.png");
1668
1851
  this.files.push(fileInfo);
1669
1852
  break;
1670
1853
  }
@@ -1717,10 +1900,16 @@ var FileUploadComponent = /** @class */ (function () {
1717
1900
  * @return {?}
1718
1901
  */
1719
1902
  function (strList) {
1903
+ /** @type {?} */
1904
+ var result = strList.filter((/**
1905
+ * @param {?} item
1906
+ * @return {?}
1907
+ */
1908
+ function (item) { return item.trim() !== ''; }));
1720
1909
  /** @type {?} */
1721
1910
  var name = "";
1722
- for (var i = 0; i < strList.length; i++) {
1723
- name += strList[i] + ",";
1911
+ for (var i = 0; i < result.length; i++) {
1912
+ name += result[i] + (i === result.length - 1 ? "" : ",");
1724
1913
  }
1725
1914
  return name;
1726
1915
  };
@@ -1949,6 +2138,19 @@ var FileUploadComponent = /** @class */ (function () {
1949
2138
  function (file) {
1950
2139
  file.mouseOn = false;
1951
2140
  };
2141
+ /**
2142
+ * @param {?} oldUrl
2143
+ * @return {?}
2144
+ */
2145
+ FileUploadComponent.prototype.createBaseUrl = /**
2146
+ * @param {?} oldUrl
2147
+ * @return {?}
2148
+ */
2149
+ function (oldUrl) {
2150
+ /** @type {?} */
2151
+ var baseUrl = BasePathService.convertPath(oldUrl);
2152
+ return baseUrl;
2153
+ };
1952
2154
  FileUploadComponent.decorators = [
1953
2155
  { type: Component, args: [{
1954
2156
  selector: 'app-file-upload',
@@ -1970,6 +2172,7 @@ var FileUploadComponent = /** @class */ (function () {
1970
2172
  fileCount: [{ type: Input }],
1971
2173
  oldIdList: [{ type: Input }],
1972
2174
  securityInfo: [{ type: Input }],
2175
+ fileNameLength: [{ type: Input }],
1973
2176
  opCell: [{ type: ViewChild, args: ['opCell',] }]
1974
2177
  };
1975
2178
  return FileUploadComponent;
@@ -1993,7 +2196,11 @@ var DownloadService = /** @class */ (function () {
1993
2196
  * @return {?}
1994
2197
  */
1995
2198
  function (metadataId, rootId) {
1996
- return "/api/runtime/dfs/v1.0/doc/filecontent?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2199
+ /** @type {?} */
2200
+ var url = "/api/runtime/dfs/v1.0/doc/filecontent?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2201
+ /** @type {?} */
2202
+ var baseUrl = BasePathService.convertPath(url);
2203
+ return baseUrl;
1997
2204
  };
1998
2205
  /**
1999
2206
  * @param {?} metadataId
@@ -2006,7 +2213,11 @@ var DownloadService = /** @class */ (function () {
2006
2213
  * @return {?}
2007
2214
  */
2008
2215
  function (metadataId, rootId) {
2009
- return "/api/runtime/dfs/v1.0/formdoc/stream?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2216
+ /** @type {?} */
2217
+ var url = "/api/runtime/dfs/v1.0/formdoc/stream?metadataid=" + metadataId + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2218
+ /** @type {?} */
2219
+ var baseUrl = BasePathService.convertPath(url);
2220
+ return baseUrl;
2010
2221
  };
2011
2222
  /**
2012
2223
  * @param {?} metadataIdList
@@ -2021,7 +2232,11 @@ var DownloadService = /** @class */ (function () {
2021
2232
  function (metadataIdList, rootId) {
2022
2233
  /** @type {?} */
2023
2234
  var list = JSON.parse(metadataIdList);
2024
- return "/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId));
2235
+ /** @type {?} */
2236
+ var url = "/api/runtime/dfs/v1.0/doc/multiple/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId));
2237
+ /** @type {?} */
2238
+ var baseUrl = BasePathService.convertPath(url);
2239
+ return baseUrl;
2025
2240
  };
2026
2241
  /**
2027
2242
  * @param {?} metadataIdList
@@ -2042,7 +2257,11 @@ var DownloadService = /** @class */ (function () {
2042
2257
  zipName = 'unifile.zip';
2043
2258
  if (!zipName.endsWith(".zip"))
2044
2259
  zipName += '.zip';
2045
- return "/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId)) + "&zipName=" + encodeURIComponent(zipName);
2260
+ /** @type {?} */
2261
+ var url = "/api/runtime/dfs/v1.0/doc/compress/download?metadataidlist=" + metadataIdList + "&rootid=" + rootId + "&token=" + this.getToken(this.mergeString(list[0], rootId)) + "&zipName=" + encodeURIComponent(zipName);
2262
+ /** @type {?} */
2263
+ var baseUrl = BasePathService.convertPath(url);
2264
+ return baseUrl;
2046
2265
  };
2047
2266
  /**
2048
2267
  * @param {?} metadataId
@@ -2058,7 +2277,11 @@ var DownloadService = /** @class */ (function () {
2058
2277
  */
2059
2278
  function (metadataId, rootId, version) {
2060
2279
  //let list:string[]=JSON.parse(metadataIdList);
2061
- return "/api/runtime/dfs/v1.0/doc/historycontent?metadataid=" + metadataId + "&rootid=" + rootId + "&version=" + version + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2280
+ /** @type {?} */
2281
+ var url = "/api/runtime/dfs/v1.0/doc/historycontent?metadataid=" + metadataId + "&rootid=" + rootId + "&version=" + version + "&token=" + this.getToken(this.mergeString(metadataId, rootId));
2282
+ /** @type {?} */
2283
+ var baseUrl = BasePathService.convertPath(url);
2284
+ return baseUrl;
2062
2285
  };
2063
2286
  /**
2064
2287
  * @private
@@ -2167,6 +2390,7 @@ var UploadModule = /** @class */ (function () {
2167
2390
  declarations: [FileUploadComponent, LocalLangPipe],
2168
2391
  imports: [
2169
2392
  CommonModule,
2393
+ FarrisRTFModule,
2170
2394
  NotifyModule,
2171
2395
  MessagerModule.forRoot(),
2172
2396
  LoadingModule.forRoot(),
@@ -2389,6 +2613,7 @@ var UploadDialogService = /** @class */ (function () {
2389
2613
  if (limit != null) {
2390
2614
  uploadRef.instance.fileCount = limit.fileCount;
2391
2615
  uploadRef.instance.securityInfo = limit.securityInfo;
2616
+ uploadRef.instance.fileNameLength = limit.fileNameLength;
2392
2617
  if (limit.fileType != null && limit.fileType != "")
2393
2618
  uploadRef.instance.fileType = limit.fileType;
2394
2619
  }
@@ -2486,6 +2711,7 @@ var UploadLimit = /** @class */ (function () {
2486
2711
  this.fileType = "*";
2487
2712
  this.fileCount = 0;
2488
2713
  this.securityInfo = null;
2714
+ this.fileNameLength = 0;
2489
2715
  }
2490
2716
  return UploadLimit;
2491
2717
  }());