@gsp-svc/formdoc-upload 0.1.27 → 0.1.28

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.
@@ -52,6 +52,7 @@
52
52
  * @fileoverview added by tsickle
53
53
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
54
54
  */
55
+ var ɵ0 = localStorage.getItem('languageCode') || 'zh-CHS';
55
56
  var FormdocUploadModule = /** @class */ (function () {
56
57
  function FormdocUploadModule() {
57
58
  }
@@ -59,7 +60,9 @@
59
60
  { type: i0.NgModule, args: [{
60
61
  declarations: [FormdocUploadComponent],
61
62
  imports: [],
62
- exports: [FormdocUploadComponent]
63
+ exports: [FormdocUploadComponent],
64
+ providers: [cafCommon.LanguageService,
65
+ { provide: i0.LOCALE_ID, useValue: ɵ0 },]
63
66
  },] }
64
67
  ];
65
68
  return FormdocUploadModule;
@@ -545,7 +548,7 @@
545
548
  var _this = this;
546
549
  /** @type {?} */
547
550
  var loading = this.loadService.show({
548
- message: '正在上传文件……'
551
+ message: this.localepipe.transform('uploading')
549
552
  });
550
553
  this.hasSelectedFile = true;
551
554
  this.selectedFiles = document.querySelector('#file');
@@ -553,7 +556,7 @@
553
556
  if (this.selectedFiles.files.length + this.files.length > this.fileCount) {
554
557
  /** @type {?} */
555
558
  var selectedNum = (( /** @type {?} */(this.selectedFiles.files.length))) + this.files.length;
556
- this.msgService.warning('已选择' + selectedNum + '个文件,超过系统设置的数量限制' + this.fileCount + '个,请重新选择上传文件。');
559
+ this.msgService.warning(this.localepipe.transform('selectedCount') + selectedNum + this.localepipe.transform('limitCount') + this.fileCount + this.localepipe.transform('rechooseFile'));
557
560
  return;
558
561
  }
559
562
  }
@@ -574,11 +577,11 @@
574
577
  // this.uploadFile(uuid, selectedFile);
575
578
  // })
576
579
  /** @type {?} */
577
- var msg_1 = this_1.msgService.show('warning', '已上传过同名文件: ' + selectedFile.name, {
580
+ var msg_1 = this_1.msgService.show('warning', this_1.localepipe.transform('haveSameName') + selectedFile.name, {
578
581
  initialState: {
579
582
  buttons: [
580
583
  {
581
- text: '重命名',
584
+ text: this_1.localepipe.transform('rename'),
582
585
  cls: 'btn btn-secondary',
583
586
  handle: ( /**
584
587
  * @return {?}
@@ -607,7 +610,7 @@
607
610
  })
608
611
  },
609
612
  {
610
- text: '替换',
613
+ text: this_1.localepipe.transform('replace'),
611
614
  cls: 'btn btn-secondary',
612
615
  handle: ( /**
613
616
  * @return {?}
@@ -632,7 +635,7 @@
632
635
  })
633
636
  },
634
637
  {
635
- text: '取消',
638
+ text: this_1.localepipe.transform('cancel'),
636
639
  cls: 'btn btn-secondary',
637
640
  handle: ( /**
638
641
  * @return {?}
@@ -671,14 +674,14 @@
671
674
  if (this.errFileList.length > 0) {
672
675
  /** @type {?} */
673
676
  var name_1 = this.listToString(this.errFileList);
674
- this.msgService.warning('已上传同名文件: ' + name_1 + '请重新选择上传文件。');
677
+ this.msgService.warning(this.localepipe.transform('haveSameName') + name_1 + this.localepipe.transform('rechooseFile'));
675
678
  this.errFileList = [];
676
679
  }
677
680
  if (this.nullFileList.length > 0) {
678
681
  /** @type {?} */
679
682
  var name_2 = this.listToString(this.nullFileList);
680
683
  name_2 = name_2.substring(0, name_2.length - 1);
681
- this.msgService.warning('文件: ' + name_2 + ' 大小为0,请重新选择上传文件。');
684
+ this.msgService.warning(name_2 + this.localepipe.transform('sizeZero') + this.localepipe.transform('rechooseFile'));
682
685
  this.nullFileList = [];
683
686
  }
684
687
  // if (this.errTypeList.length > 0) {
@@ -700,7 +703,7 @@
700
703
  * @return {?}
701
704
  */
702
705
  function (file) {
703
- this.msgService.error('上传附件失败。' + file.errorMessage);
706
+ this.msgService.error(this.localepipe.transform('uploadFailure') + file.errorMessage);
704
707
  };
705
708
  /**
706
709
  * @param {?} uuid
@@ -1177,7 +1180,7 @@
1177
1180
  // this.notifyService.success(<NotifyOptions>{
1178
1181
  // msg: '保存成功!', timeout: 3000
1179
1182
  // });
1180
- this.msgService.warning('等一下,文档正在上传。');
1183
+ this.msgService.warning(this.localepipe.transform('wait'));
1181
1184
  return rxjs.of(false);
1182
1185
  }
1183
1186
  if (this.storageExtension == null)
@@ -1188,14 +1191,14 @@
1188
1191
  else {
1189
1192
  /** @type {?} */
1190
1193
  var loading_1 = this.loadService.show({
1191
- message: '正在将文件保存到' + this.storageExtension.extensionName
1194
+ message: this.localepipe.transform('saveTo') + this.storageExtension.extensionName
1192
1195
  });
1193
1196
  return this.uploadService.changeStorageInstance(this.exStorageFileList, this.rootId).pipe(operators.map(( /**
1194
1197
  * @param {?} res
1195
1198
  * @return {?}
1196
1199
  */function (res) {
1197
- if (res != null)
1198
- _this.msgService.error('保存到' + _this.storageExtension.extensionName + "失败,上传文件自动保存到" + _this.storageExtension.defaultPropertyName + "存储。" + res.error.Message);
1200
+ // if (res != null)
1201
+ // this.msgService.error('保存到' + this.storageExtension.extensionName + "失败,上传文件自动保存到" + this.storageExtension.defaultPropertyName + "存储。" + res.error.Message);
1199
1202
  loading_1.close();
1200
1203
  return _this.uploadFileInfoList;
1201
1204
  })));
@@ -1322,7 +1325,7 @@
1322
1325
  FileUploadComponent.decorators = [
1323
1326
  { type: i0.Component, args: [{
1324
1327
  selector: 'app-file-upload',
1325
- template: "<div *ngIf=\"hasSelectedFile\">\n\n <div class=\"farris-header\" style=\"height: 50px; width: 100%\">\n <div class=\"btn btn-secondary upload_button\">\n <img [src]=\"uploadLittleIconAddress\">\n <span>\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n\n\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">\u5168\u9009</button>\n <button *ngIf=\"showType==0 && fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">\u5168\u4E0D\u9009</button>\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">\u5220\u9664</button>\n\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">\u5220\u9664</button>\n\n <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \" style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\" (click)=\"showByList()\"></button>\n </kendo-buttongroup>\n\n\n </div>\n\n <!-- <div class=\"progress\" style=\"height: 12px;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"uploadProcess\"></div>\n </div> -->\n\n <div class=\"pic_list\" *ngIf=\"showType==0\">\n <ul *ngFor=\"let file of files\">\n <li (mouseenter)=\"mouseOver(file)\" (mouseleave)=\"mouseOut(file)\">\n <div *ngIf=\"file.isUploading\">\n <farris-progress [type]=\"'circle'\" [percent]=\"file.uploadProcess\" [strokeLinecap]=\"'square'\" [status]=\"'active'\"></farris-progress>\n </div>\n\n <table *ngIf=\"!file.uploadResult && !file.isUploading\" style=\"margin: 0 auto; border: 1px solid #ddd; width: 135px; height: 160px;\">\n <tr style=\"margin: 0 auto ; height: 80px;\">\n <td style=\"text-align: center\"><span class=\"f-icon f-icon-error\"></span></td>\n </tr>\n <tr style=\"margin: 0 auto ; height: 30px;\">\n <td style=\"text-align: center\"> \u4E0A\u4F20\u5931\u8D25 </td>\n </tr>\n <tr>\n <td style=\"text-align: center\"><button style=\"margin: 0 auto ; height: 20px; \" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></td>\n </tr>\n </table>\n <div *ngIf=\"!file.isUploading && file.uploadResult\" style=\"border: 1px solid #ddd;\">\n <img [src]='file.source'>\n <div *ngIf=\"haveExtensionProperty\" style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\n\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </div>\n </div>\n </div>\n <table *ngIf=\"!file.isUploading\">\n <tr style=\"height: 20px\">\n <td style=\"width: 15px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" style=\"height: 20px\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0;height: 20px;\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0 0 10px 0; position: relative; top: -8px;\"></label>\n </div>\n </div>\n </td>\n <td style=\"width: 120px; vertical-align: middle; text-align: center\" [title]=\"file.name\">\n {{file.picListDisplayName}}</td>\n </tr>\n </table>\n <!-- <span>{{file.picListDisplayName}}</span> -->\n <!-- <p class=\"filename\">{{file.picListDisplayName}}</p> -->\n <button *ngIf=\"!file.isUploading && file.mouseOn\" style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px;\" kendoButton [icon]=\"'delete'\" (click)=\"listDeleteFile(file)\"></button>\n <!-- <button *ngIf=\"file.hasUploaded\" class=\"k-primary\" kendoButton [icon]=\"'check'\" [disabled]=\"true\"></button> -->\n </li>\n </ul>\n <br>\n </div>\n\n <div class=\"queue_list\" *ngIf=\"showType==1\">\n <table>\n <tr style=\"height: 50px; table-layout:fixed;\">\n <th style=\"width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" id=\"allCheckBox\" (click)=\"selectAllFile()\"> -->\n <div class=\"farris-input-wrap\" (click)=\"selectAllFile()\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" id=\"allCheckBox\" [(ngModel)]=\"fileAllSelected\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </th>\n <th style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\u6587\u4EF6\u540D</th>\n <th style=\"width: 100px; vertical-align: middle\">\u5927\u5C0F</th>\n <th style=\"width: 170px; vertical-align: middle; text-align: center\">\u72B6\u6001</th>\n <th *ngIf=\"haveExtensionProperty\" style=\"width: 100px; vertical-align: middle; text-align: center\">\n {{storageExtension.extensionName}}\n </th>\n <th style=\"width: 140px; vertical-align: middle; text-align: center\">\u64CD\u4F5C</th>\n </tr>\n </table>\n <div style=\"height: 370px; overflow: auto;\">\n <table>\n <tr *ngFor=\"let file of files\" style=\"height: 40px\">\n <td colspan=\"5\" *ngIf=\"file.isUploading\">\n <!-- <div style=\"width:100%; display: table-cell; vertical-align: middle; text-align: center; \"> -->\n <div style=\"width: 500px;margin:0 auto\">\n <farris-progress [percent]=\"file.uploadProcess\" [status]=\"'active'\">\n </farris-progress>\n </div>\n\n </td>\n <td *ngIf=\"!file.isUploading\" style=\" width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\n {{file.queueListDisplayName}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"width: 100px; vertical-align: middle\">{{file.size}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 170px; vertical-align: middle;\">\n <table *ngIf=\"!file.uploadResult\" style=\"margin: 0 auto\">\n <tr style=\"margin: 0 auto\">\n <td><span class=\"f-icon f-icon-error\"></span></td>\n <td> \u4E0A\u4F20\u5931\u8D25 </td>\n <td><button style=\"height: 24px\" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></td>\n </tr>\n </table>\n <!-- <span *ngIf=\"!file.uploadResult\"><span class=\"f-icon f-icon-error\"></span> \u4E0A\u4F20\u5931\u8D25 <button\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></span> -->\n <span *ngIf=\"file.uploadResult\"><span class=\"f-icon f-icon-success\"></span> \u4E0A\u4F20\u6210\u529F</span>\n </td>\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\" style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 140px; vertical-align: middle;\">\n <!-- <button *ngIf=\"file.uploadResult\" class=\"btn-link btn ng-star-inserted\" (click)=\"retryUploadFile(file.name)\">\u91CD\u8BD5</button> -->\n <button class=\"btn-link btn ng-star-inserted\" style=\"margin: 0 auto\" (click)=\"listDeleteFile(file)\">\u5220\u9664</button>\n </td>\n\n </tr>\n </table>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"!hasSelectedFile\" class='home_page'>\n <img [src]=\"uploadIconAddress\">\n <div>\n <span class=\"btn btn-primary btn-lg\">\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n</div>",
1328
+ template: "<div *ngIf=\"hasSelectedFile\">\n\n <div class=\"farris-header\" style=\"height: 50px; width: 100%\">\n <div class=\"btn btn-secondary upload_button\">\n <img [src]=\"uploadLittleIconAddress\">\n <span>{{'uploadFile' | locale}} </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n\n\n <button *ngIf=\"showType==0 && !fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectAll' | locale}}</button>\n <button *ngIf=\"showType==0 && fileAllSelected && files.length >0 \" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"selectAllFile()\">{{'selectNull' | locale}}</button>\n <button *ngIf=\"showType==0 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <button *ngIf=\"showType==1 && selectedFileCount>0\" style=\"padding-left: 20px\" class=\"btn-link btn ng-star-inserted\" (click)=\"listMultipleDeleteFile()\">{{'delete' | locale}}</button>\n\n <kendo-buttongroup [selection]=\"'single'\" class=\"button_group_upload \" style=\"background-color: #ffffff; color: #388FFF;border: 1px solid #ddd;\" look=\"flat\">\n <button kendoButton [selected]=\"true\" [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/piclist.png'\" (click)=\"showByGroup()\"></button>\n <button kendoButton [toggleable]=\"true\" [imageUrl]=\"'/platform/runtime/dfs/images/queuelist.png'\" (click)=\"showByList()\"></button>\n </kendo-buttongroup>\n\n\n </div>\n\n <!-- <div class=\"progress\" style=\"height: 12px;\">\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"uploadProcess\"></div>\n </div> -->\n\n <div class=\"pic_list\" *ngIf=\"showType==0\">\n <ul *ngFor=\"let file of files\">\n <li (mouseenter)=\"mouseOver(file)\" (mouseleave)=\"mouseOut(file)\">\n <div *ngIf=\"file.isUploading\">\n <farris-progress [type]=\"'circle'\" [percent]=\"file.uploadProcess\" [strokeLinecap]=\"'square'\" [status]=\"'active'\"></farris-progress>\n </div>\n\n <table *ngIf=\"!file.uploadResult && !file.isUploading\" style=\"margin: 0 auto; border: 1px solid #ddd; width: 135px; height: 160px;\">\n <tr style=\"margin: 0 auto ; height: 80px;\">\n <td style=\"text-align: center\"><span class=\"f-icon f-icon-error\"></span></td>\n </tr>\n <tr style=\"margin: 0 auto ; height: 30px;\">\n <td style=\"text-align: center\"> {{'uploadFailure' | locale}} </td>\n </tr>\n <tr>\n <td style=\"text-align: center\"><button style=\"margin: 0 auto ; height: 20px; \" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <div *ngIf=\"!file.isUploading && file.uploadResult\" style=\"border: 1px solid #ddd;\">\n <img [src]='file.source'>\n <div *ngIf=\"haveExtensionProperty\" style=\"width: 133px; height: 25px; background-color: white; position: absolute;bottom: 0; \">\n\n <div style=\"width: 100px;height: 25px;position:absolute;margin: 0 17px;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </div>\n </div>\n </div>\n <table *ngIf=\"!file.isUploading\">\n <tr style=\"height: 20px\">\n <td style=\"width: 15px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" style=\"height: 20px\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0;height: 20px;\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0 0 10px 0; position: relative; top: -8px;\"></label>\n </div>\n </div>\n </td>\n <td style=\"width: 120px; vertical-align: middle; text-align: center\" [title]=\"file.name\">\n {{file.picListDisplayName}}</td>\n </tr>\n </table>\n <!-- <span>{{file.picListDisplayName}}</span> -->\n <!-- <p class=\"filename\">{{file.picListDisplayName}}</p> -->\n <button *ngIf=\"!file.isUploading && file.mouseOn\" style=\"position: absolute; top: 0; right: 0px; width: 24px; height: 24px;\" kendoButton [icon]=\"'delete'\" (click)=\"listDeleteFile(file)\"></button>\n <!-- <button *ngIf=\"file.hasUploaded\" class=\"k-primary\" kendoButton [icon]=\"'check'\" [disabled]=\"true\"></button> -->\n </li>\n </ul>\n <br>\n </div>\n\n <div class=\"queue_list\" *ngIf=\"showType==1\">\n <table>\n <tr style=\"height: 50px; table-layout:fixed;\">\n <th style=\"width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" id=\"allCheckBox\" (click)=\"selectAllFile()\"> -->\n <div class=\"farris-input-wrap\" (click)=\"selectAllFile()\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" id=\"allCheckBox\" [(ngModel)]=\"fileAllSelected\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </th>\n <th style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">{{'fileName' | locale}}</th>\n <th style=\"width: 100px; vertical-align: middle\">{{'size' | locale}}</th>\n <th style=\"width: 170px; vertical-align: middle; text-align: center\">{{'state' | locale}}</th>\n <th *ngIf=\"haveExtensionProperty\" style=\"width: 100px; vertical-align: middle; text-align: center\">\n {{storageExtension.extensionName}}\n </th>\n <th style=\"width: 140px; vertical-align: middle; text-align: center\">{{'operation' | locale}}</th>\n </tr>\n </table>\n <div style=\"height: 370px; overflow: auto;\">\n <table>\n <tr *ngFor=\"let file of files\" style=\"height: 40px\">\n <td colspan=\"5\" *ngIf=\"file.isUploading\">\n <!-- <div style=\"width:100%; display: table-cell; vertical-align: middle; text-align: center; \"> -->\n <div style=\"width: 500px;margin:0 auto\">\n <farris-progress [percent]=\"file.uploadProcess\" [status]=\"'active'\">\n </farris-progress>\n </div>\n\n </td>\n <td *ngIf=\"!file.isUploading\" style=\" width: 40px; vertical-align: middle; text-align: center\">\n <!-- <input type=\"checkbox\" [id]=\"file.name\" (click)=\"checkoutSelectFile(file.name)\"> -->\n <div class=\"farris-input-wrap\" (click)=\"checkoutSelectFile(file)\">\n <div class=\"custom-control custom-checkbox\" style=\"margin: 4px 0 0\">\n <input class=\"custom-control-input\" type=\"checkbox\" [id]=\"file.name\" [(ngModel)]=\"file.selectd\">\n <label class=\"custom-control-label\" style=\"padding: 0\"></label>\n </div>\n </div>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"vertical-align: middle\" [ngStyle]=\"queueListStyle\">\n {{file.queueListDisplayName}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"width: 100px; vertical-align: middle\">{{file.size}}</td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 170px; vertical-align: middle;\">\n <table *ngIf=\"!file.uploadResult\" style=\"margin: 0 auto\">\n <tr style=\"margin: 0 auto\">\n <td><span class=\"f-icon f-icon-error\"></span></td>\n <td> {{'uploadFailure' | locale}} </td>\n <td><button style=\"height: 24px\" class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">{{'detail' | locale}}</button></td>\n </tr>\n </table>\n <!-- <span *ngIf=\"!file.uploadResult\"><span class=\"f-icon f-icon-error\"></span> \u4E0A\u4F20\u5931\u8D25 <button\n class=\"btn-link btn ng-star-inserted\" (click)=\"showErrorMessage(file)\">\u8BE6\u60C5</button></span> -->\n <span *ngIf=\"file.uploadResult\"><span class=\"f-icon f-icon-success\"></span> {{'uploadSucceed' | locale}}</span>\n </td>\n <td *ngIf=\"!file.isUploading&&haveExtensionProperty\" style=\"text-align: center; width: 100px; vertical-align: middle;\">\n <farris-combo-list [(ngModel)]=\"file.extensionDropListId\" [data]=\"propertiesNames\" [idField]=\"'id'\" [textField]=\"'name'\" (selectChange)=\"typeChange($event,file)\" [enableClear]=\"false\">\n <!-- <ng-template #itemTemp let-item>\n <div class=\"combo-list\">\n <span [class]=\"'combo-list-circle combo-list-'+item.state\"></span>\n <span class=\"combo-list-label\">{{item.label}}</span>\n </div>\n </ng-template> -->\n </farris-combo-list>\n </td>\n <td *ngIf=\"!file.isUploading\" style=\"text-align: center; width: 140px; vertical-align: middle;\">\n <!-- <button *ngIf=\"file.uploadResult\" class=\"btn-link btn ng-star-inserted\" (click)=\"retryUploadFile(file.name)\">\u91CD\u8BD5</button> -->\n <button class=\"btn-link btn ng-star-inserted\" style=\"margin: 0 auto\" (click)=\"listDeleteFile(file)\">{{'delete' | locale}}</button>\n </td>\n\n </tr>\n </table>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"!hasSelectedFile\" class='home_page'>\n <img [src]=\"uploadIconAddress\">\n <div>\n <span class=\"btn btn-primary btn-lg\">\u4E0A\u4F20\u6587\u4EF6 </span>\n <input type=\"file\" (change)=\"fileSelected($event)\" id=\"file\" multiple=\"multiple\" title=\"\" [accept]=\"fileType\">\n </div>\n</div>",
1326
1329
  styles: [".home_page{text-align:center}.home_page img{position:absolute;top:180px;margin-left:-35px;width:70px;height:56px}.home_page div{position:absolute;left:50%;top:255px;margin-left:-75px;width:150px;height:32px;overflow:hidden}.home_page div span{width:150px;height:32px;position:absolute;z-index:10;left:0}.home_page div input{position:absolute;left:0;top:0;opacity:0;filter:'alpha(opacity=0)';z-index:11}.upload_button{width:110px;height:32px;overflow:hidden}.upload_button span{position:relative;right:-4px;top:4px;width:56px;height:22px;font-size:14px}.upload_button input{height:32px;width:110px;position:absolute;left:22px;top:12px;opacity:0;filter:'alpha(opacity=0)';overflow:hidden}.upload_button img{position:relative;left:-6px;top:3px;width:14px;height:14px}.button_group_upload{position:absolute;right:18px;top:12px;height:26px;width:53px}.button_group_upload button{height:26px;width:26px}.fileinput-button{position:absolute;right:60px;bottom:40px;overflow:hidden;width:24px;height:24px;border-radius:12px;transform:scale(2.5);-ms-transform:scale(2.5);-moz-transform:scale(2.5);-webkit-transform:scale(2.5);-o-transform:scale(2.5);color:#0686fd}.fileinput-button input{position:absolute;left:0;top:0;opacity:0;filter:'alpha(opacity=0)'}.pic-droplist{height:24px;color:#e0e1e2;background-color:#e0e1e2}.pic-droplist input-group{display:table-cell;width:100px;text-align:center;border:0}.pic-droplist input-group div{border:0}.pic-droplist input-group div div,.pic-droplist input-group div input{background-color:#e0e1e2}.pic_list{padding:0;height:420px;overflow-y:auto;overflow-x:hidden}.pic_list ul{padding:0;list-style:none;width:100%;margin:20px 0 0 20px}.pic_list ul li{height:180px;width:135px;margin:8px 0 8px 12px;float:left;overflow:hidden;align-items:center;position:relative}.pic_list ul li div{width:135px;height:160px;margin:auto;display:table-cell;vertical-align:middle;text-align:center;position:relative}.pic_list ul li div img{max-width:120px;max-height:118px;align-items:center;margin:auto;vertical-align:middle;text-align:center}.pic_list ul li span.filename{width:100px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.queue_list{display:block;height:420px;overflow-y:auto}.file_list{list-style:none;margin:0;padding:0;overflow-x:hidden;overflow-y:auto}.file_list li{height:50px;line-height:35px;font-size:16px;position:relative}.file_list li button{float:right;top:6px;right:10px;width:20px}.file_list li p.title{padding:0 0 0 6px;margin:0 210px 0 0}.file_list li p.size{position:absolute;width:100px;top:0;right:100px}"]
1327
1330
  }] }
1328
1331
  ];
@@ -1516,12 +1519,162 @@
1516
1519
  * @fileoverview added by tsickle
1517
1520
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1518
1521
  */
1522
+ /** @type {?} */
1523
+ var LANG_RESOURCES = {
1524
+ 'zh-CHS': {
1525
+ 'uploadFile': '上传文件',
1526
+ 'uploading': '正在上传文件……',
1527
+ 'selectedCount': '已选择文件数量:',
1528
+ 'limitCount': '超出系统限制数量:',
1529
+ 'rechooseFile': ',重新选择上传文件。',
1530
+ 'save': '保存',
1531
+ 'cancel': '取消',
1532
+ 'haveSameName': '已上传过同名文件: ',
1533
+ 'rename': '重命名',
1534
+ 'replace': '替换',
1535
+ 'sizeZero': '文件大小为0',
1536
+ 'uploadFailure': '上传失败',
1537
+ 'uploadSucceed': '上传成功',
1538
+ 'wait': '等一下,文档正在上传。',
1539
+ 'saveTo': '正在将文件保存到',
1540
+ 'delete': '删除',
1541
+ 'selectAll': '全选',
1542
+ 'selectNull': '全不选',
1543
+ 'detail': '详情',
1544
+ 'fileName': '文件名',
1545
+ 'state': '状态',
1546
+ 'operation': '操作',
1547
+ 'size': '大小',
1548
+ 'close': '关闭',
1549
+ 'loading': '拼命加载中'
1550
+ },
1551
+ 'en-US': {
1552
+ 'uploadFile': 'Upload File',
1553
+ 'uploading': 'File Uploading……',
1554
+ 'selectedCount': 'Selected files count:',
1555
+ 'limitCount': 'System limit count:',
1556
+ 'rechooseFile': ',Reselect upload file.',
1557
+ 'save': 'Save',
1558
+ 'cancel': 'Cancel',
1559
+ 'haveSameName': 'A file with the same name has been uploaded: ',
1560
+ 'rename': 'Rename',
1561
+ 'replace': 'Replace',
1562
+ 'sizeZero': 'File size is 0',
1563
+ 'uploadFailure': 'Upload failed',
1564
+ 'uploadSucceed': 'Upload successfully',
1565
+ 'wait': 'Wait a minute, the file is uploading.',
1566
+ 'saveTo': 'Saving file to',
1567
+ 'delete': 'Delete',
1568
+ 'selectAll': 'Select all',
1569
+ 'selectNull': 'Not at all',
1570
+ 'detail': 'Details',
1571
+ 'fileName': 'Filename',
1572
+ 'state': 'State',
1573
+ 'operation': 'Operation',
1574
+ 'size': 'Size',
1575
+ 'close': 'Close',
1576
+ 'loading': 'Loading'
1577
+ },
1578
+ 'en': {
1579
+ 'uploadFile': 'Upload File',
1580
+ 'uploading': 'File Uploading……',
1581
+ 'selectedCount': 'Selected files count:',
1582
+ 'limitCount': 'System limit count:',
1583
+ 'rechooseFile': ',Reselect upload file.',
1584
+ 'save': 'Save',
1585
+ 'cancel': 'Cancel',
1586
+ 'haveSameName': 'A file with the same name has been uploaded: ',
1587
+ 'rename': 'Rename',
1588
+ 'replace': 'Replace',
1589
+ 'sizeZero': 'File size is 0',
1590
+ 'uploadFailure': 'Upload failed',
1591
+ 'uploadSucceed': 'Upload successfully',
1592
+ 'wait': 'Wait a minute, the file is uploading.',
1593
+ 'saveTo': 'Saving file to',
1594
+ 'delete': 'Delete',
1595
+ 'selectAll': 'Select all',
1596
+ 'selectNull': 'Not at all',
1597
+ 'detail': 'Details',
1598
+ 'fileName': 'Filename',
1599
+ 'state': 'State',
1600
+ 'operation': 'Operation',
1601
+ 'size': 'Size',
1602
+ 'close': 'Close',
1603
+ 'loading': 'Loading'
1604
+ },
1605
+ 'zh-CHT': {
1606
+ 'uploadFile': '上傳文件',
1607
+ 'uploading': '正在上傳文件……',
1608
+ 'selectedCount': '已選擇文件數量:',
1609
+ 'limitCount': '超出系統限制數量:',
1610
+ 'rechooseFile': ',重新選擇上傳文件。',
1611
+ 'save': '保存',
1612
+ 'cancel': '取消',
1613
+ 'haveSameName': '已上傳過同名文件: ',
1614
+ 'rename': '重命名',
1615
+ 'replace': '替換',
1616
+ 'sizeZero': '文件大小為0',
1617
+ 'uploadFailure': '上傳失敗',
1618
+ 'uploadSucceed': '上傳成功',
1619
+ 'wait': '等一下,文件正在上傳。',
1620
+ 'saveTo': '正在將文件保存到',
1621
+ 'delete': '删除',
1622
+ 'selectAll': '全選',
1623
+ 'selectNull': '全不選',
1624
+ 'detail': '詳情',
1625
+ 'fileName': '文件名',
1626
+ 'state': '狀態',
1627
+ 'operation': '操作',
1628
+ 'size': '大小',
1629
+ 'close': '關閉',
1630
+ 'loading': '拼命加載中'
1631
+ },
1632
+ };
1633
+
1634
+ /**
1635
+ * @fileoverview added by tsickle
1636
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1637
+ */
1638
+ var LocalLangPipe = /** @class */ (function () {
1639
+ function LocalLangPipe(localeId) {
1640
+ this.defaultLang = "zh-CHS";
1641
+ this.langCode = localStorage.getItem("languageCode") || localeId || this.defaultLang;
1642
+ this.lang = LANG_RESOURCES[this.langCode] || LANG_RESOURCES[this.defaultLang];
1643
+ }
1644
+ /**
1645
+ * @param {?} name
1646
+ * @return {?}
1647
+ */
1648
+ LocalLangPipe.prototype.transform = /**
1649
+ * @param {?} name
1650
+ * @return {?}
1651
+ */
1652
+ function (name) {
1653
+ return this.lang[name] || name;
1654
+ };
1655
+ LocalLangPipe.decorators = [
1656
+ { type: i0.Pipe, args: [{ name: 'locale' },] }
1657
+ ];
1658
+ /** @nocollapse */
1659
+ LocalLangPipe.ctorParameters = function () {
1660
+ return [
1661
+ { type: String, decorators: [{ type: i0.Inject, args: [i0.LOCALE_ID,] }] }
1662
+ ];
1663
+ };
1664
+ return LocalLangPipe;
1665
+ }());
1666
+
1667
+ /**
1668
+ * @fileoverview added by tsickle
1669
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1670
+ */
1671
+ var ɵ0$1 = localStorage.getItem('languageCode') || 'zh-CHS';
1519
1672
  var UploadModule = /** @class */ (function () {
1520
1673
  function UploadModule() {
1521
1674
  }
1522
1675
  UploadModule.decorators = [
1523
1676
  { type: i0.NgModule, args: [{
1524
- declarations: [FileUploadComponent],
1677
+ declarations: [FileUploadComponent, LocalLangPipe],
1525
1678
  imports: [
1526
1679
  common.CommonModule,
1527
1680
  kendoAngularButtons.ButtonsModule,
@@ -1534,7 +1687,8 @@
1534
1687
  ],
1535
1688
  exports: [FileUploadComponent],
1536
1689
  entryComponents: [FileUploadComponent],
1537
- providers: [UploadService, DownloadService]
1690
+ providers: [UploadService, DownloadService, cafCommon.LanguageService,
1691
+ { provide: i0.LOCALE_ID, useValue: ɵ0$1 },]
1538
1692
  },] }
1539
1693
  ];
1540
1694
  return UploadModule;
@@ -1622,6 +1776,11 @@
1622
1776
  this.componentFactoryResolver = componentFactoryResolver;
1623
1777
  this.injector = injector;
1624
1778
  this.fileInfoList = [];
1779
+ if (this.injector) {
1780
+ this.modalService = this.injector.get(uiModal.BsModalService);
1781
+ this.localeid = localStorage.getItem("languageCode") || this.injector.get(i0.LOCALE_ID);
1782
+ this.localpipe = new LocalLangPipe(this.localeid);
1783
+ }
1625
1784
  }
1626
1785
  /**
1627
1786
  * @param {?} formId
@@ -1648,11 +1807,11 @@
1648
1807
  viewerRef.instance.rootId = rootId;
1649
1808
  viewerRef.instance.formId = formId;
1650
1809
  _this.dlg = _this.modalService.show(viewerRef, {
1651
- title: '上传文件',
1810
+ title: _this.localpipe.transform('uploadFile'),
1652
1811
  width: 950, height: 570,
1653
1812
  buttons: [
1654
1813
  {
1655
- text: '保存', cls: 'k-button k-button-icontext k-primary', handle: ( /**
1814
+ text: _this.localpipe.transform('save'), cls: 'k-button k-button-icontext k-primary', handle: ( /**
1656
1815
  * @return {?}
1657
1816
  */function () {
1658
1817
  _this.dlg.content.upload().subscribe(( /**
@@ -1668,7 +1827,7 @@
1668
1827
  })
1669
1828
  },
1670
1829
  {
1671
- text: '关闭', cls: 'k-button k-button-icontext', handle: ( /**
1830
+ text: _this.localpipe.transform('close'), cls: 'k-button k-button-icontext', handle: ( /**
1672
1831
  * @return {?}
1673
1832
  */function () {
1674
1833
  _this.dlg.close();
@@ -1743,11 +1902,11 @@
1743
1902
  uploadRef.instance.formId = formId;
1744
1903
  uploadRef.instance.oldIdList = oldIdList;
1745
1904
  _this.dlg = _this.modalService.show(uploadRef, {
1746
- title: '上传文件',
1905
+ title: _this.localpipe.transform('uploadFile'),
1747
1906
  width: 950, height: 570,
1748
1907
  buttons: [
1749
1908
  {
1750
- text: '保存', cls: 'k-button k-button-icontext k-primary', handle: ( /**
1909
+ text: _this.localpipe.transform('save'), cls: 'k-button k-button-icontext k-primary', handle: ( /**
1751
1910
  * @return {?}
1752
1911
  */function () {
1753
1912
  _this.dlg.content.upload().subscribe(( /**
@@ -1763,7 +1922,7 @@
1763
1922
  })
1764
1923
  },
1765
1924
  {
1766
- text: '关闭', cls: 'k-button k-button-icontext', handle: ( /**
1925
+ text: _this.localpipe.transform('close'), cls: 'k-button k-button-icontext', handle: ( /**
1767
1926
  * @return {?}
1768
1927
  */function () {
1769
1928
  _this.dlg.close();
@@ -1897,6 +2056,7 @@
1897
2056
  exports.FileInfo = FileInfo;
1898
2057
  exports.OperatingModes = OperatingModes;
1899
2058
  exports.FileState = FileState;
2059
+ exports.ɵb = LocalLangPipe;
1900
2060
 
1901
2061
  Object.defineProperty(exports, '__esModule', { value: true });
1902
2062