ngx-rs-ant 0.9.9 → 0.10.5

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, HostBinding, EventEmitter, Output, HostListener, ViewContainerRef, ViewChild, Directive, ViewChildren, NgModule, Injectable, LOCALE_ID, Inject, ContentChild } from '@angular/core';
2
+ import { Component, Input, HostBinding, EventEmitter, Output, HostListener, ViewContainerRef, ViewChild, Directive, ViewChildren, NgModule, Injectable, ContentChild } from '@angular/core';
3
3
  import { PluginFactory } from 'coast-plugin-register';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
@@ -8,16 +8,17 @@ import { Subject, map, lastValueFrom } from 'rxjs';
8
8
  import * as i2$1 from 'ng-devui/input-number';
9
9
  import * as i5 from '@angular/forms';
10
10
  import { FormsModule, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
11
- import { DevUIModule, FormLayout } from 'ng-devui';
12
- import * as i3 from 'devextreme-angular';
11
+ import { DevUIModule, HelperUtils, FormLayout } from 'ng-devui';
12
+ import * as i3$1 from 'devextreme-angular';
13
13
  import { DxDataGridComponent, DxDataGridModule } from 'devextreme-angular';
14
14
  import * as i1$1 from '@angular/common/http';
15
15
  import CustomStore from 'devextreme/data/custom_store';
16
16
  import * as i4 from 'devextreme-angular/ui/nested';
17
17
  import * as i5$1 from 'devextreme-angular/core';
18
- import * as i6 from 'ng-devui/popover';
19
- import * as i2$2 from 'ng-devui/button';
20
- import * as i3$1 from 'ng-devui/form';
18
+ import * as i3 from 'ng-devui/popover';
19
+ import * as i2$2 from '@angular/platform-browser';
20
+ import * as i2$3 from 'ng-devui/button';
21
+ import * as i3$2 from 'ng-devui/form';
21
22
  import * as i4$1 from 'ng-devui/text-input';
22
23
  import * as i4$2 from 'ng-devui/loading';
23
24
 
@@ -754,10 +755,11 @@ class DataGridService {
754
755
  return response.data;
755
756
  }));
756
757
  }
757
- getUserColumnDataSource(className, view, field) {
758
+ getUserColumnDataSource(tenant, className, view, field) {
758
759
  return this.http.get('api/data/custom', {
759
760
  params: {
760
761
  executor: 'com.cs.system.data.grid.header.filter.GetUserColumnDataSource',
762
+ tenant,
761
763
  className,
762
764
  view: view || '',
763
765
  field
@@ -775,10 +777,11 @@ class DataGridService {
775
777
  return response.data.list;
776
778
  }));
777
779
  }
778
- getUnitColumnDataSource(className, view, field) {
780
+ getUnitColumnDataSource(tenant, className, view, field) {
779
781
  return this.http.get('api/data/custom', {
780
782
  params: {
781
783
  executor: 'com.cs.system.data.grid.header.filter.GetUnitColumnDataSource',
784
+ tenant,
782
785
  className,
783
786
  view: view || '',
784
787
  field
@@ -796,10 +799,11 @@ class DataGridService {
796
799
  return response.data.list;
797
800
  }));
798
801
  }
799
- getConstraintColumnDataSource(className, view, field, constraintName) {
802
+ getConstraintColumnDataSource(tenant, className, view, field, constraintName) {
800
803
  return this.http.get('api/data/custom', {
801
804
  params: {
802
805
  executor: 'com.cs.system.data.grid.header.filter.GetConstraintColumnDataSource',
806
+ tenant,
803
807
  className,
804
808
  view: view || '',
805
809
  field,
@@ -830,6 +834,12 @@ class DataGridService {
830
834
  return response.data.list;
831
835
  }));
832
836
  }
837
+ downloadAttachment(id, filename, onSuccess) {
838
+ HelperUtils.downloadFileByHttpClient(this.http, 'api/file/download/' + id, {
839
+ method: 'GET',
840
+ filename
841
+ }, undefined, onSuccess);
842
+ }
833
843
  }
834
844
  DataGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
835
845
  DataGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridService });
@@ -851,10 +861,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
851
861
  }]
852
862
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
853
863
 
864
+ class RowButtonsTemplateDirective {
865
+ constructor(templateRef) {
866
+ this.templateRef = templateRef;
867
+ }
868
+ }
869
+ RowButtonsTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RowButtonsTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
870
+ RowButtonsTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: RowButtonsTemplateDirective, selector: "[rsRowButtonsTemplate]", ngImport: i0 });
871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RowButtonsTemplateDirective, decorators: [{
872
+ type: Directive,
873
+ args: [{
874
+ selector: '[rsRowButtonsTemplate]'
875
+ }]
876
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
877
+
878
+ class FileCellTemplateComponent {
879
+ constructor(service, domSanitizer) {
880
+ this.service = service;
881
+ this.domSanitizer = domSanitizer;
882
+ this.loading = false;
883
+ }
884
+ ngOnInit() {
885
+ this.service.getOne('S', 'Attachment', this.oid).subscribe(response => {
886
+ this.file = response.data;
887
+ this.filename = this.file.fileName;
888
+ this.content = this.domSanitizer.bypassSecurityTrustHtml(`名称:${this.file.fileName}<br />
889
+ 大小:${this.getFileSize(this.file.fileSize)}<br />
890
+ 时间:${this.file.modifyTime}`);
891
+ const type = this.file.fileName.substring(this.file.fileName.lastIndexOf('.') + 1).toLocaleLowerCase();
892
+ switch (type) {
893
+ case 'xls':
894
+ case 'xlsx':
895
+ case 'doc':
896
+ case 'docx':
897
+ case 'ppt':
898
+ case 'pptx':
899
+ case 'pdf':
900
+ case 'txt':
901
+ case 'rtf':
902
+ this.icon = type + 'file';
903
+ break;
904
+ case 'jpg':
905
+ case 'jpeg':
906
+ case 'png':
907
+ case 'gif':
908
+ this.icon = 'image';
909
+ break;
910
+ default:
911
+ this.icon = 'file';
912
+ break;
913
+ }
914
+ // 重绘表格宽高
915
+ setTimeout(() => {
916
+ this.table.resize();
917
+ });
918
+ });
919
+ }
920
+ download() {
921
+ this.loading = true;
922
+ this.service.downloadAttachment(this.oid, this.filename, () => {
923
+ this.loading = false;
924
+ });
925
+ }
926
+ getFileSize(size) {
927
+ const labels = ['b', 'Kb', 'Mb', 'Gb'];
928
+ const count = labels.length - 1;
929
+ let i = 0;
930
+ while (i < count && size >= 1024) {
931
+ size /= 1024;
932
+ i++;
933
+ }
934
+ return Math.round(size * 100) / 100 + " " + labels[i];
935
+ }
936
+ }
937
+ FileCellTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FileCellTemplateComponent, deps: [{ token: DataGridService }, { token: i2$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
938
+ FileCellTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FileCellTemplateComponent, selector: "rs-file-cell-template", inputs: { table: "table", oid: "oid" }, ngImport: i0, template: "<button (click)=\"download()\"\n [disabled]=\"loading\"\n dPopover\n [content]=\"content\"\n [trigger]=\"'hover'\"\n [controlled]=\"true\"\n [popMaxWidth]=\"300\">\n <i class=\"dx-icon-{{icon}}\"></i>\n {{filename}}\n</button><br/>\n", styles: [":host{height:20px;padding-right:4px}:host button{color:var(--devui-link, #526ecc)}\n"], dependencies: [{ kind: "directive", type: i3.PopoverDirective, selector: "[dPopover]", inputs: ["content", "controlled", "position", "showAnimation", "showAnimate", "scrollElement", "appendToBody", "zIndex", "popType", "popMaxWidth", "trigger", "hoverToContent", "hoverDelayTime", "popoverStyle", "mouseEnterDelay", "mouseLeaveDelay", "visible"], exportAs: ["dPopover"] }] });
939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FileCellTemplateComponent, decorators: [{
940
+ type: Component,
941
+ args: [{ selector: 'rs-file-cell-template', template: "<button (click)=\"download()\"\n [disabled]=\"loading\"\n dPopover\n [content]=\"content\"\n [trigger]=\"'hover'\"\n [controlled]=\"true\"\n [popMaxWidth]=\"300\">\n <i class=\"dx-icon-{{icon}}\"></i>\n {{filename}}\n</button><br/>\n", styles: [":host{height:20px;padding-right:4px}:host button{color:var(--devui-link, #526ecc)}\n"] }]
942
+ }], ctorParameters: function () { return [{ type: DataGridService }, { type: i2$2.DomSanitizer }]; }, propDecorators: { table: [{
943
+ type: Input
944
+ }], oid: [{
945
+ type: Input
946
+ }] } });
947
+
854
948
  class DataGridComponent {
855
- constructor(service, locale) {
949
+ constructor(service) {
856
950
  this.service = service;
857
- this.locale = locale;
858
951
  this.enableMasterDetail = false;
859
952
  this.dataSource = {};
860
953
  this.columns = [];
@@ -899,247 +992,268 @@ class DataGridComponent {
899
992
  this.service.getMetadataByView(this.tenant, this.className, this.view || '').subscribe((response) => {
900
993
  const columns = [];
901
994
  for (let field of response.data.columns) {
902
- if (field.type === 'FILE') {
903
- columns.push({
904
- dataField: field.name,
905
- caption: field.caption,
906
- dataType: 'string',
907
- alignment: 'left',
908
- allowHeaderFiltering: false,
909
- filterOperations: [],
910
- visible: field.visible
911
- });
912
- }
913
- else if (field.type === 'NORMAL') {
914
- const column = {
915
- dataField: field.name,
916
- caption: field.caption,
917
- dataType: this.typeMap[field.dataType].dataType,
918
- alignment: 'left',
919
- allowHeaderFiltering: true,
920
- headerFilter: {
921
- allowSelectAll: false
922
- },
923
- filterOperations: this.typeMap[field.dataType].filterOperations,
924
- format: this.typeMap[field.dataType].format,
925
- visible: field.visible
926
- };
927
- columns.push(column);
928
- switch (field.dataType) {
929
- case 'BOOLEAN':
930
- column.allowHeaderFiltering = false;
931
- column.alignment = 'center';
932
- column.trueText = '是';
933
- column.falseText = '否';
934
- break;
935
- case 'DATE':
936
- case 'DATETIME':
937
- column.headerFilter.dataSource = (options) => {
938
- options.dataSource.group.length = 3;
939
- options.dataSource.postProcess = (data) => {
940
- data.forEach((year) => {
941
- year.text = year.key + '';
942
- year.items.forEach((month) => {
943
- month.text = month.key + '月';
944
- month.items.forEach((day) => {
945
- day.text = day.key + '日';
946
- day.items = [];
995
+ switch (field.type) {
996
+ case 'FILE':
997
+ columns.push({
998
+ dataField: field.name,
999
+ caption: field.caption,
1000
+ dataType: 'string',
1001
+ alignment: 'center',
1002
+ allowHeaderFiltering: false,
1003
+ allowFiltering: false,
1004
+ allowSorting: false,
1005
+ cellTemplate: 'fileCellTemplate',
1006
+ visible: field.visible,
1007
+ fixed: field.fixed
1008
+ });
1009
+ break;
1010
+ case 'NORMAL':
1011
+ const column = {
1012
+ dataField: field.name,
1013
+ caption: field.caption,
1014
+ dataType: this.typeMap[field.dataType].dataType,
1015
+ alignment: 'left',
1016
+ allowHeaderFiltering: true,
1017
+ headerFilter: {
1018
+ allowSelectAll: false
1019
+ },
1020
+ filterOperations: this.typeMap[field.dataType].filterOperations,
1021
+ format: this.typeMap[field.dataType].format,
1022
+ visible: field.visible,
1023
+ fixed: field.fixed
1024
+ };
1025
+ columns.push(column);
1026
+ switch (field.dataType) {
1027
+ case 'BOOLEAN':
1028
+ column.allowHeaderFiltering = false;
1029
+ column.alignment = 'center';
1030
+ column.trueText = '是';
1031
+ column.falseText = '否';
1032
+ break;
1033
+ case 'DATE':
1034
+ case 'DATETIME':
1035
+ column.headerFilter.dataSource = (options) => {
1036
+ options.dataSource.group.length = 3;
1037
+ options.dataSource.postProcess = (data) => {
1038
+ data.forEach((year) => {
1039
+ year.text = year.key + '年';
1040
+ year.items.forEach((month) => {
1041
+ month.text = month.key + '月';
1042
+ month.items.forEach((day) => {
1043
+ day.text = day.key + '日';
1044
+ day.items = [];
1045
+ });
947
1046
  });
948
1047
  });
949
- });
950
- data.unshift({
951
- key: '',
952
- value: null,
953
- text: '(空白)'
954
- });
955
- };
956
- };
957
- break;
958
- case 'DOUBLE':
959
- case 'INTEGER':
960
- column.headerFilter.dataSource = (options) => {
961
- options.dataSource.postProcess = (data) => {
962
- data.unshift({
963
- key: '',
964
- value: null,
965
- text: '(空白)'
966
- });
967
- data.push({
968
- key: '__',
969
- value: '__',
970
- text: '__',
971
- visible: false
972
- });
1048
+ data.unshift({
1049
+ key: '',
1050
+ value: null,
1051
+ text: '(空白)'
1052
+ });
1053
+ };
973
1054
  };
974
- };
975
- break;
976
- case 'STRING':
977
- column.headerFilter.dataSource = (options) => {
978
- options.dataSource.postProcess = (data) => {
979
- data.unshift({
980
- key: '',
981
- value: null,
982
- text: '(空白)'
983
- });
984
- data.push({
985
- key: '__',
986
- value: '__',
987
- text: '__',
988
- visible: false
989
- });
1055
+ break;
1056
+ case 'DOUBLE':
1057
+ case 'INTEGER':
1058
+ column.headerFilter.dataSource = (options) => {
1059
+ options.dataSource.postProcess = (data) => {
1060
+ data.unshift({
1061
+ key: '',
1062
+ value: null,
1063
+ text: '(空白)'
1064
+ });
1065
+ data.push({
1066
+ key: '__',
1067
+ value: '__',
1068
+ text: '__',
1069
+ visible: false
1070
+ });
1071
+ };
990
1072
  };
991
- };
992
- if (field.config.constraint.multiple) {
993
- column.width = 120;
994
- }
995
- switch (field.config.constraint.type) {
996
- case 'USER':
997
- column.headerFilter.dataSource = {
998
- store: new CustomStore({
999
- load: () => {
1000
- return lastValueFrom(this.service.getUserColumnDataSource(this.className, this.view, field.name));
1001
- }
1002
- }),
1003
- paginate: true
1073
+ break;
1074
+ case 'STRING':
1075
+ column.headerFilter.dataSource = (options) => {
1076
+ options.dataSource.postProcess = (data) => {
1077
+ data.unshift({
1078
+ key: '',
1079
+ value: null,
1080
+ text: '(空白)'
1081
+ });
1082
+ data.push({
1083
+ key: '__',
1084
+ value: '__',
1085
+ text: '__',
1086
+ visible: false
1087
+ });
1004
1088
  };
1005
- if (field.config.constraint.multiple) {
1006
- column.allowFiltering = false;
1007
- column.lookup = {
1008
- dataSource: {
1009
- store: new CustomStore({
1010
- load: () => {
1011
- return lastValueFrom(this.service.getUserColumnDataSource(this.className, this.view, field.name));
1012
- }
1013
- }),
1014
- paginate: true
1015
- },
1016
- valueExpr: 'value',
1017
- displayExpr: 'text'
1089
+ };
1090
+ switch (field.config.constraint.type) {
1091
+ case 'USER':
1092
+ column.headerFilter.dataSource = {
1093
+ store: new CustomStore({
1094
+ load: () => {
1095
+ return lastValueFrom(this.service.getUserColumnDataSource(this.tenant, this.className, this.view, field.name));
1096
+ }
1097
+ }),
1098
+ paginate: true
1018
1099
  };
1019
- column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1020
- if (this.defaultCalculateFilterExpression) {
1021
- return this.defaultCalculateFilterExpression.apply(this, [filterValue, 'contains', target]);
1022
- }
1023
- return '';
1100
+ if (field.config.constraint.multiple) {
1101
+ column.allowFiltering = false;
1102
+ column.lookup = {
1103
+ dataSource: {
1104
+ store: new CustomStore({
1105
+ load: () => {
1106
+ return lastValueFrom(this.service.getUserColumnDataSource(this.tenant, this.className, this.view, field.name));
1107
+ }
1108
+ }),
1109
+ paginate: true
1110
+ },
1111
+ valueExpr: 'value',
1112
+ displayExpr: 'text'
1113
+ };
1114
+ column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1115
+ if (this.defaultCalculateFilterExpression) {
1116
+ return this.defaultCalculateFilterExpression.apply(this, [filterValue, 'contains', target]);
1117
+ }
1118
+ return '';
1119
+ };
1120
+ column.cellTemplate = 'multipleValueCellTemplate';
1121
+ }
1122
+ else {
1123
+ column.dataField = '__' + field.name + '\u0001User_displayName';
1124
+ column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1125
+ if (target === 'headerFilter') {
1126
+ if (this.defaultCalculateFilterExpression) {
1127
+ this.dataField = '__' + field.name + '\u0001User_username';
1128
+ return this.defaultCalculateFilterExpression.apply(this, [filterValue, selectedFilterOperation, target]);
1129
+ }
1130
+ }
1131
+ return [
1132
+ [column.name, selectedFilterOperation, filterValue],
1133
+ 'or',
1134
+ ['__' + field.name + '\u0001User_username', selectedFilterOperation, filterValue]
1135
+ ];
1136
+ };
1137
+ }
1138
+ break;
1139
+ case 'UNIT':
1140
+ column.headerFilter.dataSource = {
1141
+ store: new CustomStore({
1142
+ load: () => {
1143
+ return lastValueFrom(this.service.getUnitColumnDataSource(this.tenant, this.className, this.view, field.name));
1144
+ }
1145
+ }),
1146
+ paginate: true
1024
1147
  };
1025
- column.cellTemplate = 'multipleValueCellTemplate';
1026
- }
1027
- else {
1028
- column.dataField = '__' + field.name + '\u0001User_displayName';
1029
- column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1030
- if (target === 'headerFilter') {
1148
+ if (field.config.constraint.multiple) {
1149
+ column.allowFiltering = false;
1150
+ column.lookup = {
1151
+ dataSource: {
1152
+ store: new CustomStore({
1153
+ load: () => {
1154
+ return lastValueFrom(this.service.getUnitColumnDataSource(this.tenant, this.className, this.view, field.name));
1155
+ }
1156
+ }),
1157
+ paginate: true
1158
+ },
1159
+ valueExpr: 'value',
1160
+ displayExpr: 'text'
1161
+ };
1162
+ column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1031
1163
  if (this.defaultCalculateFilterExpression) {
1032
- this.dataField = '__' + field.name + '\u0001User_username';
1033
- return this.defaultCalculateFilterExpression.apply(this, [filterValue, selectedFilterOperation, target]);
1164
+ return this.defaultCalculateFilterExpression.apply(this, [filterValue, 'contains', target]);
1034
1165
  }
1035
- }
1036
- return [
1037
- [column.name, selectedFilterOperation, filterValue],
1038
- 'or',
1039
- ['__' + field.name + '\u0001User_username', selectedFilterOperation, filterValue]
1040
- ];
1166
+ return '';
1167
+ };
1168
+ column.cellTemplate = 'multipleValueCellTemplate';
1169
+ }
1170
+ else {
1171
+ column.dataField = '__' + field.name + '\u0001Role_displayName';
1172
+ column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1173
+ if (target === 'headerFilter') {
1174
+ if (this.defaultCalculateFilterExpression) {
1175
+ this.dataField = '__' + field.name + '\u0001Role_name';
1176
+ return this.defaultCalculateFilterExpression.apply(this, [filterValue, selectedFilterOperation, target]);
1177
+ }
1178
+ }
1179
+ return [
1180
+ [column.name, selectedFilterOperation, filterValue],
1181
+ 'or',
1182
+ ['__' + field.name + '\u0001Role_name', selectedFilterOperation, filterValue]
1183
+ ];
1184
+ };
1185
+ }
1186
+ break;
1187
+ case 'CUSTOM':
1188
+ column.headerFilter.dataSource = {
1189
+ store: new CustomStore({
1190
+ load: () => {
1191
+ return lastValueFrom(this.service.getConstraintColumnDataSource(this.tenant, this.className, this.view, field.name, field.config.constraint.name));
1192
+ }
1193
+ }),
1194
+ paginate: true
1041
1195
  };
1042
- }
1043
- break;
1044
- case 'UNIT':
1045
- column.headerFilter.dataSource = {
1046
- store: new CustomStore({
1047
- load: () => {
1048
- return lastValueFrom(this.service.getUnitColumnDataSource(this.className, this.view, field.name));
1049
- }
1050
- }),
1051
- paginate: true
1052
- };
1053
- if (field.config.constraint.multiple) {
1054
- column.allowFiltering = false;
1055
1196
  column.lookup = {
1056
1197
  dataSource: {
1057
1198
  store: new CustomStore({
1058
1199
  load: () => {
1059
- return lastValueFrom(this.service.getUnitColumnDataSource(this.className, this.view, field.name));
1200
+ return lastValueFrom(this.service.getConstraintEntries(field.config.constraint.name));
1060
1201
  }
1061
1202
  }),
1062
1203
  paginate: true
1063
1204
  },
1064
- valueExpr: 'value',
1065
- displayExpr: 'text'
1205
+ valueExpr: 'store',
1206
+ displayExpr: 'display'
1066
1207
  };
1067
- column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1068
- if (this.defaultCalculateFilterExpression) {
1069
- return this.defaultCalculateFilterExpression.apply(this, [filterValue, 'contains', target]);
1070
- }
1071
- return '';
1072
- };
1073
- column.cellTemplate = 'multipleValueCellTemplate';
1074
- }
1075
- else {
1076
- column.dataField = '__' + field.name + '\u0001Role_displayName';
1077
- column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1078
- if (target === 'headerFilter') {
1208
+ column.filterOperations = [];
1209
+ if (field.config.constraint.multiple) {
1210
+ column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1079
1211
  if (this.defaultCalculateFilterExpression) {
1080
- this.dataField = '__' + field.name + '\u0001Role_name';
1081
- return this.defaultCalculateFilterExpression.apply(this, [filterValue, selectedFilterOperation, target]);
1212
+ return this.defaultCalculateFilterExpression.apply(this, [filterValue, 'contains', target]);
1082
1213
  }
1083
- }
1084
- return [
1085
- [column.name, selectedFilterOperation, filterValue],
1086
- 'or',
1087
- ['__' + field.name + '\u0001Role_name', selectedFilterOperation, filterValue]
1088
- ];
1089
- };
1090
- }
1091
- break;
1092
- case 'CUSTOM':
1093
- column.headerFilter.dataSource = {
1094
- store: new CustomStore({
1095
- load: () => {
1096
- return lastValueFrom(this.service.getConstraintColumnDataSource(this.className, this.view, field.name, field.config.constraint.name));
1097
- }
1098
- }),
1099
- paginate: true
1100
- };
1101
- column.lookup = {
1102
- dataSource: {
1103
- store: new CustomStore({
1104
- load: () => {
1105
- return lastValueFrom(this.service.getConstraintEntries(field.config.constraint.name));
1106
- }
1107
- }),
1108
- paginate: true
1109
- },
1110
- valueExpr: 'store',
1111
- displayExpr: 'display'
1112
- };
1113
- column.filterOperations = [];
1114
- if (field.config.constraint.multiple) {
1115
- column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
1116
- if (this.defaultCalculateFilterExpression) {
1117
- return this.defaultCalculateFilterExpression.apply(this, [filterValue, 'contains', target]);
1118
- }
1119
- return '';
1120
- };
1121
- }
1122
- column.cellTemplate = 'multipleValueCellTemplate';
1123
- break;
1124
- }
1125
- break;
1126
- case 'TEXT':
1127
- column.allowHeaderFiltering = false;
1128
- column.width = 240;
1129
- column.cellTemplate = 'textCellTemplate';
1130
- break;
1131
- }
1132
- }
1133
- else if (field.type === 'RELATION') {
1134
- columns.push({
1135
- dataField: field.name,
1136
- caption: field.caption,
1137
- dataType: 'string',
1138
- alignment: 'left',
1139
- allowHeaderFiltering: false,
1140
- filterOperations: ['='],
1141
- visible: field.visible
1142
- });
1214
+ return '';
1215
+ };
1216
+ }
1217
+ column.cellTemplate = 'multipleValueCellTemplate';
1218
+ break;
1219
+ }
1220
+ break;
1221
+ case 'TEXT':
1222
+ column.allowHeaderFiltering = false;
1223
+ column.width = 240;
1224
+ column.cellTemplate = 'textCellTemplate';
1225
+ break;
1226
+ }
1227
+ break;
1228
+ case 'RELATION':
1229
+ switch (field.relationType) {
1230
+ case 'MANY_TO_MANY':
1231
+ case 'ONE_TO_MANY':
1232
+ columns.push({
1233
+ dataField: field.name,
1234
+ caption: field.caption,
1235
+ dataType: 'string',
1236
+ alignment: 'left',
1237
+ allowHeaderFiltering: false,
1238
+ allowFiltering: false,
1239
+ visible: field.visible,
1240
+ fixed: field.fixed
1241
+ });
1242
+ break;
1243
+ case 'MANY_TO_ONE':
1244
+ case 'ONE_TO_ONE':
1245
+ columns.push({
1246
+ dataField: field.name,
1247
+ caption: field.caption,
1248
+ dataType: 'string',
1249
+ alignment: 'left',
1250
+ allowHeaderFiltering: false,
1251
+ filterOperations: ['='],
1252
+ visible: field.visible,
1253
+ fixed: field.fixed
1254
+ });
1255
+ break;
1256
+ }
1143
1257
  }
1144
1258
  }
1145
1259
  if (this.customColumnFn) {
@@ -1200,15 +1314,12 @@ class DataGridComponent {
1200
1314
  }
1201
1315
  });
1202
1316
  }
1203
- convertMultipleValueCellText(cellInfo, wrap) {
1317
+ convertMultipleValueCellText(cellInfo) {
1204
1318
  if (!cellInfo.value) {
1205
1319
  return;
1206
1320
  }
1207
1321
  if (Array.isArray(cellInfo.value)) {
1208
- if (wrap) {
1209
- return cellInfo.value.map((item) => cellInfo.column.lookup.calculateCellValue(item)).join('<br />');
1210
- }
1211
- return cellInfo.value.map((item) => cellInfo.column.lookup.calculateCellValue(item)).join(';');
1322
+ return cellInfo.value.map((item) => cellInfo.column.lookup.calculateCellValue(item)).join('<br />');
1212
1323
  }
1213
1324
  return cellInfo.column.lookup.calculateCellValue(cellInfo.value);
1214
1325
  }
@@ -1223,15 +1334,12 @@ class DataGridComponent {
1223
1334
  return this.dxDataGrid.instance.getSelectedRowKeys();
1224
1335
  }
1225
1336
  }
1226
- DataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridComponent, deps: [{ token: DataGridService }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component });
1227
- DataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DataGridComponent, selector: "rs-data-grid", inputs: { tenant: "tenant", className: "className", view: "view", filter: "filter", enableMasterDetail: "enableMasterDetail", customColumnFn: "customColumnFn" }, providers: [DataGridService], queries: [{ propertyName: "masterDetailTemplate", first: true, predicate: MasterDetailTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "dxDataGrid", first: true, predicate: DxDataGridComponent, descendants: true, static: true }], ngImport: i0, template: "<dx-data-grid [dataSource]=\"dataSource\"\n [columns]=\"columns\"\n [syncLookupFilterValues]=\"false\"\n [showBorders]=\"true\"\n [showColumnLines]=\"true\"\n [showRowLines]=\"true\"\n [hoverStateEnabled]=\"true\"\n [rowAlternationEnabled]=\"true\"\n [columnAutoWidth]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n dateSerializationFormat=\"yyyy/MM/dd HH:mm:ss\"\n (onRowExpanding)=\"$event.component.collapseAll(-1)\"\n>\n <dxo-sorting mode=\"multiple\"></dxo-sorting>\n <dxo-selection mode=\"multiple\" selectAllMode=\"page\"></dxo-selection>\n <dxo-header-filter [visible]=\"true\">\n <dxo-search [enabled]=\"true\"></dxo-search>\n <dxo-texts [ok]=\"'\u786E\u5B9A'\"></dxo-texts>\n </dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-remote-operations [filtering]=\"true\"\n [sorting]=\"true\"\n [paging]=\"true\">\n </dxo-remote-operations>\n <dxo-master-detail [enabled]=\"enableMasterDetail\" template=\"masterDetailTemplate\"></dxo-master-detail>\n <dxo-paging [pageSize]=\"15\"></dxo-paging>\n <dxo-pager [visible]=\"true\"\n [showInfo]=\"true\"\n infoText=\"\u7B2C{0}\u9875\uFF0C\u5171{1}\u9875\uFF08\u5171{2}\u4E2A\u9879\u76EE\uFF09\"\n [showPageSizeSelector]=\"true\"\n [allowedPageSizes]=\"[15, 30, 50]\"\n ></dxo-pager>\n <dxo-scrolling showScrollbar=\"always\"></dxo-scrolling>\n <dxo-export [allowExportSelectedData]=\"true\"\n [fileName]=\"className\"></dxo-export>\n <div *dxTemplate=\"let rowInfo of 'masterDetailTemplate'\">\n <ng-container [ngTemplateOutlet]=\"masterDetailTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{$implicit: rowInfo}\"></ng-container>\n </div>\n <div *dxTemplate=\"let cellInfo of 'rowIndexTemplate'\">\n {{cellInfo.rowIndex + 1}}\n </div>\n <div *dxTemplate=\"let cellInfo of 'multipleValueCellTemplate'\">\n <div dPopover #textDiv\n [content]=\"convertMultipleValueCellText(cellInfo, true)\"\n [controlled]=\"textDiv.clientWidth < textDiv.scrollWidth\"\n [popoverStyle]=\"{ backgroundColor: '#fff', color: 'rgb(51, 51, 51)' }\"\n style=\"text-overflow: ellipsis; overflow: hidden;\"\n [ngStyle]=\"{ cursor: textDiv.clientWidth < textDiv.scrollWidth ? 'pointer': 'default'}\">\n {{convertMultipleValueCellText(cellInfo)}}\n </div>\n </div>\n <div *dxTemplate=\"let cellInfo of 'textCellTemplate'\">\n <div dPopover #textDiv\n [content]=\"cellInfo.value\"\n [controlled]=\"textDiv.clientWidth < textDiv.scrollWidth\"\n [popMaxWidth]=\"300\"\n [popoverStyle]=\"{ backgroundColor: '#fff', color: 'rgb(51, 51, 51)' }\"\n style=\"text-overflow: ellipsis; overflow: hidden;\"\n [ngStyle]=\"{ cursor: textDiv.clientWidth < textDiv.scrollWidth ? 'pointer': 'default'}\">{{cellInfo.value}}</div>\n </div>\n</dx-data-grid>\n", styles: [":host{display:flex;flex-flow:column nowrap}:host dx-data-grid{flex:auto;height:0}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i4.DxoSearchComponent, selector: "dxo-search", inputs: ["editorOptions", "enabled", "timeout", "mode", "searchExpr"] }, { kind: "component", type: i4.DxoSelectionComponent, selector: "dxo-selection", inputs: ["allowSelectAll", "recursive", "selectByClick", "deferred", "mode", "selectAllMode", "showCheckBoxesMode"] }, { kind: "component", type: i4.DxoTextsComponent, selector: "dxo-texts", inputs: ["fix", "leftPosition", "rightPosition", "unfix", "addRow", "cancelAllChanges", "cancelRowChanges", "confirmDeleteMessage", "confirmDeleteTitle", "deleteRow", "editRow", "saveAllChanges", "saveRowChanges", "undeleteRow", "validationCancelChanges", "exportAll", "exportSelectedRows", "exportTo", "clearFilter", "createFilter", "filterEnabledHint", "groupByThisColumn", "groupContinuedMessage", "groupContinuesMessage", "ungroup", "ungroupAll", "cancel", "emptyValue", "ok", "avg", "avgOtherColumn", "count", "max", "maxOtherColumn", "min", "minOtherColumn", "sum", "sumOtherColumn", "allFields", "columnFields", "dataFields", "filterFields", "rowFields", "columnFieldArea", "dataFieldArea", "filterFieldArea", "rowFieldArea", "collapseAll", "dataNotAvailable", "expandAll", "exportToExcel", "grandTotal", "noData", "removeAllSorting", "showFieldChooser", "sortColumnBySummary", "sortRowBySummary", "total", "addRowToNode"] }, { kind: "component", type: i4.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "allowSelectAll", "dataSource", "groupInterval", "height", "search", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i4.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i4.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i4.DxoMasterDetailComponent, selector: "dxo-master-detail", inputs: ["autoExpandAll", "enabled", "template"] }, { kind: "component", type: i4.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i4.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i4.DxoRemoteOperationsComponent, selector: "dxo-remote-operations", inputs: ["filtering", "grouping", "groupPaging", "paging", "sorting", "summary"] }, { kind: "component", type: i4.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i4.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }, { kind: "directive", type: i5$1.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "directive", type: i6.PopoverDirective, selector: "[dPopover]", inputs: ["content", "controlled", "position", "showAnimation", "showAnimate", "scrollElement", "appendToBody", "zIndex", "popType", "popMaxWidth", "trigger", "hoverToContent", "hoverDelayTime", "popoverStyle", "mouseEnterDelay", "mouseLeaveDelay", "visible"], exportAs: ["dPopover"] }] });
1337
+ DataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridComponent, deps: [{ token: DataGridService }], target: i0.ɵɵFactoryTarget.Component });
1338
+ DataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DataGridComponent, selector: "rs-data-grid", inputs: { tenant: "tenant", className: "className", view: "view", filter: "filter", enableMasterDetail: "enableMasterDetail", customColumnFn: "customColumnFn" }, providers: [DataGridService], queries: [{ propertyName: "masterDetailTemplate", first: true, predicate: MasterDetailTemplateDirective, descendants: true }, { propertyName: "rowButtonsTemplate", first: true, predicate: RowButtonsTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "dxDataGrid", first: true, predicate: DxDataGridComponent, descendants: true, static: true }], ngImport: i0, template: "<dx-data-grid [dataSource]=\"dataSource\"\n [columns]=\"columns\"\n [syncLookupFilterValues]=\"false\"\n [showBorders]=\"true\"\n [showColumnLines]=\"true\"\n [showRowLines]=\"true\"\n [hoverStateEnabled]=\"true\"\n [rowAlternationEnabled]=\"true\"\n [columnAutoWidth]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n dateSerializationFormat=\"yyyy/MM/dd HH:mm:ss\"\n (onRowExpanding)=\"$event.component.collapseAll(-1)\"\n>\n <dxo-sorting mode=\"multiple\"></dxo-sorting>\n <dxo-selection mode=\"multiple\" selectAllMode=\"page\" showCheckBoxesMode=\"always\"></dxo-selection>\n <dxo-header-filter [visible]=\"true\">\n <dxo-search [enabled]=\"true\"></dxo-search>\n <dxo-texts [ok]=\"'\u786E\u5B9A'\"></dxo-texts>\n </dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-remote-operations [filtering]=\"true\"\n [sorting]=\"true\"\n [paging]=\"true\">\n </dxo-remote-operations>\n <dxo-master-detail [enabled]=\"enableMasterDetail\" template=\"masterDetailTemplate\"></dxo-master-detail>\n <dxo-paging [pageSize]=\"15\"></dxo-paging>\n <dxo-pager [visible]=\"true\"\n [showInfo]=\"true\"\n infoText=\"\u7B2C{0}\u9875\uFF0C\u5171{1}\u9875\uFF08\u5171{2}\u4E2A\u9879\u76EE\uFF09\"\n [showPageSizeSelector]=\"true\"\n [allowedPageSizes]=\"[15, 30, 50]\"\n ></dxo-pager>\n <dxo-scrolling showScrollbar=\"always\"></dxo-scrolling>\n <dxo-export [allowExportSelectedData]=\"true\"\n [fileName]=\"className\"></dxo-export>\n <div *dxTemplate=\"let rowInfo of 'masterDetailTemplate'\">\n <ng-container [ngTemplateOutlet]=\"masterDetailTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{$implicit: rowInfo}\"></ng-container>\n </div>\n <div *dxTemplate=\"let rowInfo of 'rowButtonsTemplate'\">\n <ng-container [ngTemplateOutlet]=\"rowButtonsTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{$implicit: rowInfo}\"></ng-container>\n </div>\n <div *dxTemplate=\"let cellInfo of 'rowIndexTemplate'\">\n {{cellInfo.rowIndex + 1}}\n </div>\n <div *dxTemplate=\"let cellInfo of 'multipleValueCellTemplate'\">\n <div [innerHTML]=\"convertMultipleValueCellText(cellInfo)\"></div>\n </div>\n <div *dxTemplate=\"let cellInfo of 'textCellTemplate'\">\n <div dPopover #textDiv\n [content]=\"cellInfo.value\"\n [trigger]=\"'hover'\"\n [controlled]=\"textDiv.clientWidth < textDiv.scrollWidth\"\n [popMaxWidth]=\"300\"\n style=\"text-overflow: ellipsis; overflow: hidden;\"\n [ngStyle]=\"{ cursor: textDiv.clientWidth < textDiv.scrollWidth ? 'pointer': 'default'}\">{{cellInfo.value}}</div>\n </div>\n <div *dxTemplate=\"let cellInfo of 'fileCellTemplate'\">\n <ng-container *ngFor=\"let file of cellInfo.value\">\n <rs-file-cell-template [table]=\"cellInfo.component\" [oid]=\"file\"></rs-file-cell-template>\n </ng-container>\n </div>\n</dx-data-grid>\n", styles: [":host{display:flex;flex-flow:column nowrap}:host dx-data-grid{flex:auto;height:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i4.DxoSearchComponent, selector: "dxo-search", inputs: ["editorOptions", "enabled", "timeout", "mode", "searchExpr"] }, { kind: "component", type: i4.DxoSelectionComponent, selector: "dxo-selection", inputs: ["allowSelectAll", "recursive", "selectByClick", "deferred", "mode", "selectAllMode", "showCheckBoxesMode"] }, { kind: "component", type: i4.DxoTextsComponent, selector: "dxo-texts", inputs: ["fix", "leftPosition", "rightPosition", "unfix", "addRow", "cancelAllChanges", "cancelRowChanges", "confirmDeleteMessage", "confirmDeleteTitle", "deleteRow", "editRow", "saveAllChanges", "saveRowChanges", "undeleteRow", "validationCancelChanges", "exportAll", "exportSelectedRows", "exportTo", "clearFilter", "createFilter", "filterEnabledHint", "groupByThisColumn", "groupContinuedMessage", "groupContinuesMessage", "ungroup", "ungroupAll", "cancel", "emptyValue", "ok", "avg", "avgOtherColumn", "count", "max", "maxOtherColumn", "min", "minOtherColumn", "sum", "sumOtherColumn", "allFields", "columnFields", "dataFields", "filterFields", "rowFields", "columnFieldArea", "dataFieldArea", "filterFieldArea", "rowFieldArea", "collapseAll", "dataNotAvailable", "expandAll", "exportToExcel", "grandTotal", "noData", "removeAllSorting", "showFieldChooser", "sortColumnBySummary", "sortRowBySummary", "total", "addRowToNode"] }, { kind: "component", type: i4.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "allowSelectAll", "dataSource", "groupInterval", "height", "search", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i4.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i4.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i4.DxoMasterDetailComponent, selector: "dxo-master-detail", inputs: ["autoExpandAll", "enabled", "template"] }, { kind: "component", type: i4.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i4.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i4.DxoRemoteOperationsComponent, selector: "dxo-remote-operations", inputs: ["filtering", "grouping", "groupPaging", "paging", "sorting", "summary"] }, { kind: "component", type: i4.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i4.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }, { kind: "directive", type: i5$1.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "directive", type: i3.PopoverDirective, selector: "[dPopover]", inputs: ["content", "controlled", "position", "showAnimation", "showAnimate", "scrollElement", "appendToBody", "zIndex", "popType", "popMaxWidth", "trigger", "hoverToContent", "hoverDelayTime", "popoverStyle", "mouseEnterDelay", "mouseLeaveDelay", "visible"], exportAs: ["dPopover"] }, { kind: "component", type: FileCellTemplateComponent, selector: "rs-file-cell-template", inputs: ["table", "oid"] }] });
1228
1339
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridComponent, decorators: [{
1229
1340
  type: Component,
1230
- args: [{ selector: 'rs-data-grid', providers: [DataGridService], template: "<dx-data-grid [dataSource]=\"dataSource\"\n [columns]=\"columns\"\n [syncLookupFilterValues]=\"false\"\n [showBorders]=\"true\"\n [showColumnLines]=\"true\"\n [showRowLines]=\"true\"\n [hoverStateEnabled]=\"true\"\n [rowAlternationEnabled]=\"true\"\n [columnAutoWidth]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n dateSerializationFormat=\"yyyy/MM/dd HH:mm:ss\"\n (onRowExpanding)=\"$event.component.collapseAll(-1)\"\n>\n <dxo-sorting mode=\"multiple\"></dxo-sorting>\n <dxo-selection mode=\"multiple\" selectAllMode=\"page\"></dxo-selection>\n <dxo-header-filter [visible]=\"true\">\n <dxo-search [enabled]=\"true\"></dxo-search>\n <dxo-texts [ok]=\"'\u786E\u5B9A'\"></dxo-texts>\n </dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-remote-operations [filtering]=\"true\"\n [sorting]=\"true\"\n [paging]=\"true\">\n </dxo-remote-operations>\n <dxo-master-detail [enabled]=\"enableMasterDetail\" template=\"masterDetailTemplate\"></dxo-master-detail>\n <dxo-paging [pageSize]=\"15\"></dxo-paging>\n <dxo-pager [visible]=\"true\"\n [showInfo]=\"true\"\n infoText=\"\u7B2C{0}\u9875\uFF0C\u5171{1}\u9875\uFF08\u5171{2}\u4E2A\u9879\u76EE\uFF09\"\n [showPageSizeSelector]=\"true\"\n [allowedPageSizes]=\"[15, 30, 50]\"\n ></dxo-pager>\n <dxo-scrolling showScrollbar=\"always\"></dxo-scrolling>\n <dxo-export [allowExportSelectedData]=\"true\"\n [fileName]=\"className\"></dxo-export>\n <div *dxTemplate=\"let rowInfo of 'masterDetailTemplate'\">\n <ng-container [ngTemplateOutlet]=\"masterDetailTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{$implicit: rowInfo}\"></ng-container>\n </div>\n <div *dxTemplate=\"let cellInfo of 'rowIndexTemplate'\">\n {{cellInfo.rowIndex + 1}}\n </div>\n <div *dxTemplate=\"let cellInfo of 'multipleValueCellTemplate'\">\n <div dPopover #textDiv\n [content]=\"convertMultipleValueCellText(cellInfo, true)\"\n [controlled]=\"textDiv.clientWidth < textDiv.scrollWidth\"\n [popoverStyle]=\"{ backgroundColor: '#fff', color: 'rgb(51, 51, 51)' }\"\n style=\"text-overflow: ellipsis; overflow: hidden;\"\n [ngStyle]=\"{ cursor: textDiv.clientWidth < textDiv.scrollWidth ? 'pointer': 'default'}\">\n {{convertMultipleValueCellText(cellInfo)}}\n </div>\n </div>\n <div *dxTemplate=\"let cellInfo of 'textCellTemplate'\">\n <div dPopover #textDiv\n [content]=\"cellInfo.value\"\n [controlled]=\"textDiv.clientWidth < textDiv.scrollWidth\"\n [popMaxWidth]=\"300\"\n [popoverStyle]=\"{ backgroundColor: '#fff', color: 'rgb(51, 51, 51)' }\"\n style=\"text-overflow: ellipsis; overflow: hidden;\"\n [ngStyle]=\"{ cursor: textDiv.clientWidth < textDiv.scrollWidth ? 'pointer': 'default'}\">{{cellInfo.value}}</div>\n </div>\n</dx-data-grid>\n", styles: [":host{display:flex;flex-flow:column nowrap}:host dx-data-grid{flex:auto;height:0}\n"] }]
1231
- }], ctorParameters: function () { return [{ type: DataGridService }, { type: undefined, decorators: [{
1232
- type: Inject,
1233
- args: [LOCALE_ID]
1234
- }] }]; }, propDecorators: { tenant: [{
1341
+ args: [{ selector: 'rs-data-grid', providers: [DataGridService], template: "<dx-data-grid [dataSource]=\"dataSource\"\n [columns]=\"columns\"\n [syncLookupFilterValues]=\"false\"\n [showBorders]=\"true\"\n [showColumnLines]=\"true\"\n [showRowLines]=\"true\"\n [hoverStateEnabled]=\"true\"\n [rowAlternationEnabled]=\"true\"\n [columnAutoWidth]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n dateSerializationFormat=\"yyyy/MM/dd HH:mm:ss\"\n (onRowExpanding)=\"$event.component.collapseAll(-1)\"\n>\n <dxo-sorting mode=\"multiple\"></dxo-sorting>\n <dxo-selection mode=\"multiple\" selectAllMode=\"page\" showCheckBoxesMode=\"always\"></dxo-selection>\n <dxo-header-filter [visible]=\"true\">\n <dxo-search [enabled]=\"true\"></dxo-search>\n <dxo-texts [ok]=\"'\u786E\u5B9A'\"></dxo-texts>\n </dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-remote-operations [filtering]=\"true\"\n [sorting]=\"true\"\n [paging]=\"true\">\n </dxo-remote-operations>\n <dxo-master-detail [enabled]=\"enableMasterDetail\" template=\"masterDetailTemplate\"></dxo-master-detail>\n <dxo-paging [pageSize]=\"15\"></dxo-paging>\n <dxo-pager [visible]=\"true\"\n [showInfo]=\"true\"\n infoText=\"\u7B2C{0}\u9875\uFF0C\u5171{1}\u9875\uFF08\u5171{2}\u4E2A\u9879\u76EE\uFF09\"\n [showPageSizeSelector]=\"true\"\n [allowedPageSizes]=\"[15, 30, 50]\"\n ></dxo-pager>\n <dxo-scrolling showScrollbar=\"always\"></dxo-scrolling>\n <dxo-export [allowExportSelectedData]=\"true\"\n [fileName]=\"className\"></dxo-export>\n <div *dxTemplate=\"let rowInfo of 'masterDetailTemplate'\">\n <ng-container [ngTemplateOutlet]=\"masterDetailTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{$implicit: rowInfo}\"></ng-container>\n </div>\n <div *dxTemplate=\"let rowInfo of 'rowButtonsTemplate'\">\n <ng-container [ngTemplateOutlet]=\"rowButtonsTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{$implicit: rowInfo}\"></ng-container>\n </div>\n <div *dxTemplate=\"let cellInfo of 'rowIndexTemplate'\">\n {{cellInfo.rowIndex + 1}}\n </div>\n <div *dxTemplate=\"let cellInfo of 'multipleValueCellTemplate'\">\n <div [innerHTML]=\"convertMultipleValueCellText(cellInfo)\"></div>\n </div>\n <div *dxTemplate=\"let cellInfo of 'textCellTemplate'\">\n <div dPopover #textDiv\n [content]=\"cellInfo.value\"\n [trigger]=\"'hover'\"\n [controlled]=\"textDiv.clientWidth < textDiv.scrollWidth\"\n [popMaxWidth]=\"300\"\n style=\"text-overflow: ellipsis; overflow: hidden;\"\n [ngStyle]=\"{ cursor: textDiv.clientWidth < textDiv.scrollWidth ? 'pointer': 'default'}\">{{cellInfo.value}}</div>\n </div>\n <div *dxTemplate=\"let cellInfo of 'fileCellTemplate'\">\n <ng-container *ngFor=\"let file of cellInfo.value\">\n <rs-file-cell-template [table]=\"cellInfo.component\" [oid]=\"file\"></rs-file-cell-template>\n </ng-container>\n </div>\n</dx-data-grid>\n", styles: [":host{display:flex;flex-flow:column nowrap}:host dx-data-grid{flex:auto;height:0}\n"] }]
1342
+ }], ctorParameters: function () { return [{ type: DataGridService }]; }, propDecorators: { tenant: [{
1235
1343
  type: Input
1236
1344
  }], className: [{
1237
1345
  type: Input
@@ -1249,16 +1357,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1249
1357
  }], masterDetailTemplate: [{
1250
1358
  type: ContentChild,
1251
1359
  args: [MasterDetailTemplateDirective]
1360
+ }], rowButtonsTemplate: [{
1361
+ type: ContentChild,
1362
+ args: [RowButtonsTemplateDirective]
1252
1363
  }] } });
1253
1364
 
1254
1365
  class DataGridModule {
1255
1366
  }
1256
1367
  DataGridModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1257
1368
  DataGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: DataGridModule, declarations: [DataGridComponent,
1258
- MasterDetailTemplateDirective], imports: [CommonModule,
1369
+ MasterDetailTemplateDirective,
1370
+ FileCellTemplateComponent,
1371
+ RowButtonsTemplateDirective], imports: [CommonModule,
1259
1372
  DxDataGridModule,
1260
1373
  DevUIModule], exports: [DataGridComponent,
1261
- MasterDetailTemplateDirective] });
1374
+ MasterDetailTemplateDirective,
1375
+ RowButtonsTemplateDirective] });
1262
1376
  DataGridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridModule, imports: [CommonModule,
1263
1377
  DxDataGridModule,
1264
1378
  DevUIModule] });
@@ -1267,7 +1381,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1267
1381
  args: [{
1268
1382
  declarations: [
1269
1383
  DataGridComponent,
1270
- MasterDetailTemplateDirective
1384
+ MasterDetailTemplateDirective,
1385
+ FileCellTemplateComponent,
1386
+ RowButtonsTemplateDirective
1271
1387
  ],
1272
1388
  imports: [
1273
1389
  CommonModule,
@@ -1276,7 +1392,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1276
1392
  ],
1277
1393
  exports: [
1278
1394
  DataGridComponent,
1279
- MasterDetailTemplateDirective
1395
+ MasterDetailTemplateDirective,
1396
+ RowButtonsTemplateDirective
1280
1397
  ]
1281
1398
  }]
1282
1399
  }] });
@@ -1290,7 +1407,7 @@ class DynamicParamsComponent {
1290
1407
  }
1291
1408
  }
1292
1409
  DynamicParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DynamicParamsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1293
- DynamicParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DynamicParamsComponent, selector: "rs-dynamic-params", inputs: { params: "params" }, ngImport: i0, template: "<form dForm labelSize=\"sm\">\n <d-form-item>\n <d-form-label>\u52A8\u6001\u53C2\u6570</d-form-label>\n <d-form-control>\n <d-button icon=\"icon-add\" [bsSize]=\"'sm'\" (btnClick)=\"add()\"></d-button>\n </d-form-control>\n </d-form-item>\n <d-form-item>\n <d-form-label></d-form-label>\n <d-form-control>\n <div *ngFor=\"let param of params; let index = index\">\n <input dTextInput [name]=\"'name' + index\" placeholder=\"\u53C2\u6570\u540D\" [(ngModel)]=\"param.name\"/>\n <input dTextInput [name]=\"'value' + index\" placeholder=\"\u53C2\u6570\u503C\" [(ngModel)]=\"param.value\"/>\n <d-button icon=\"icon-close\" [bsStyle]=\"'text'\" (btnClick)=\"delete(index)\"></d-button>\n </div>\n </d-form-control>\n </d-form-item>\n</form>\n", styles: [":host form d-form-item{margin-bottom:8px}:host form d-form-item d-form-control{margin:0}:host form d-form-item d-form-control div{position:relative;display:flex;flex-flow:row nowrap}:host form d-form-item d-form-control div d-button{display:none;position:absolute;left:-30px}:host form d-form-item:hover d-form-control div d-button{display:inline-block!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "d-button", inputs: ["id", "type", "bsStyle", "shape", "bsSize", "bsPosition", "bordered", "icon", "disabled", "showLoading", "width", "autofocus", "loadingTemplateRef"], outputs: ["btnClick"] }, { kind: "component", type: i3$1.FormItemComponent, selector: "d-form-item", inputs: ["dFeedbackType", "dHasFeedback"] }, { kind: "component", type: i3$1.FormLabelComponent, selector: "d-form-label", inputs: ["required", "hasHelp", "helpTips"] }, { kind: "component", type: i3$1.FormControlComponent, selector: "d-form-control", inputs: ["extraInfo", "feedbackStatus", "suffixTemplate"] }, { kind: "directive", type: i3$1.FormDirective, selector: "[dForm]", inputs: ["layout", "labelSize", "labelAlign", "dFeedbackType", "dHasFeedback"], outputs: ["dSubmit"], exportAs: ["dForm"] }, { kind: "directive", type: i4$1.TextDirective, selector: "[dTextInput]", inputs: ["error", "size", "styleType"], exportAs: ["dTextInput"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
1410
+ DynamicParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DynamicParamsComponent, selector: "rs-dynamic-params", inputs: { params: "params" }, ngImport: i0, template: "<form dForm labelSize=\"sm\">\n <d-form-item>\n <d-form-label>\u52A8\u6001\u53C2\u6570</d-form-label>\n <d-form-control>\n <d-button icon=\"icon-add\" [bsSize]=\"'sm'\" (btnClick)=\"add()\"></d-button>\n </d-form-control>\n </d-form-item>\n <d-form-item>\n <d-form-label></d-form-label>\n <d-form-control>\n <div *ngFor=\"let param of params; let index = index\">\n <input dTextInput [name]=\"'name' + index\" placeholder=\"\u53C2\u6570\u540D\" [(ngModel)]=\"param.name\"/>\n <input dTextInput [name]=\"'value' + index\" placeholder=\"\u53C2\u6570\u503C\" [(ngModel)]=\"param.value\"/>\n <d-button icon=\"icon-close\" [bsStyle]=\"'text'\" (btnClick)=\"delete(index)\"></d-button>\n </div>\n </d-form-control>\n </d-form-item>\n</form>\n", styles: [":host form d-form-item{margin-bottom:8px}:host form d-form-item d-form-control{margin:0}:host form d-form-item d-form-control div{position:relative;display:flex;flex-flow:row nowrap}:host form d-form-item d-form-control div d-button{display:none;position:absolute;left:-30px}:host form d-form-item:hover d-form-control div d-button{display:inline-block!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$3.ButtonComponent, selector: "d-button", inputs: ["id", "type", "bsStyle", "shape", "bsSize", "bsPosition", "bordered", "icon", "disabled", "showLoading", "width", "autofocus", "loadingTemplateRef"], outputs: ["btnClick"] }, { kind: "component", type: i3$2.FormItemComponent, selector: "d-form-item", inputs: ["dFeedbackType", "dHasFeedback"] }, { kind: "component", type: i3$2.FormLabelComponent, selector: "d-form-label", inputs: ["required", "hasHelp", "helpTips"] }, { kind: "component", type: i3$2.FormControlComponent, selector: "d-form-control", inputs: ["extraInfo", "feedbackStatus", "suffixTemplate"] }, { kind: "directive", type: i3$2.FormDirective, selector: "[dForm]", inputs: ["layout", "labelSize", "labelAlign", "dFeedbackType", "dHasFeedback"], outputs: ["dSubmit"], exportAs: ["dForm"] }, { kind: "directive", type: i4$1.TextDirective, selector: "[dTextInput]", inputs: ["error", "size", "styleType"], exportAs: ["dTextInput"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
1294
1411
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DynamicParamsComponent, decorators: [{
1295
1412
  type: Component,
1296
1413
  args: [{ selector: 'rs-dynamic-params', template: "<form dForm labelSize=\"sm\">\n <d-form-item>\n <d-form-label>\u52A8\u6001\u53C2\u6570</d-form-label>\n <d-form-control>\n <d-button icon=\"icon-add\" [bsSize]=\"'sm'\" (btnClick)=\"add()\"></d-button>\n </d-form-control>\n </d-form-item>\n <d-form-item>\n <d-form-label></d-form-label>\n <d-form-control>\n <div *ngFor=\"let param of params; let index = index\">\n <input dTextInput [name]=\"'name' + index\" placeholder=\"\u53C2\u6570\u540D\" [(ngModel)]=\"param.name\"/>\n <input dTextInput [name]=\"'value' + index\" placeholder=\"\u53C2\u6570\u503C\" [(ngModel)]=\"param.value\"/>\n <d-button icon=\"icon-close\" [bsStyle]=\"'text'\" (btnClick)=\"delete(index)\"></d-button>\n </div>\n </d-form-control>\n </d-form-item>\n</form>\n", styles: [":host form d-form-item{margin-bottom:8px}:host form d-form-item d-form-control{margin:0}:host form d-form-item d-form-control div{position:relative;display:flex;flex-flow:row nowrap}:host form d-form-item d-form-control div d-button{display:none;position:absolute;left:-30px}:host form d-form-item:hover d-form-control div d-button{display:inline-block!important}\n"] }]
@@ -1336,12 +1453,12 @@ class FormService {
1336
1453
  }
1337
1454
  });
1338
1455
  }
1339
- getOne(tenant, className, oid, attributes) {
1456
+ getOne(tenant, className, oid, template) {
1340
1457
  let api = 'api/data/' + className + '/' + oid;
1341
1458
  return this.http.get(api, {
1342
1459
  params: {
1343
1460
  tenant,
1344
- attributes: attributes || []
1461
+ template: template || ''
1345
1462
  }
1346
1463
  });
1347
1464
  }
@@ -1377,8 +1494,8 @@ class FormComponent {
1377
1494
  this.config = response.data.template;
1378
1495
  if (this.copyOid || this.oid) {
1379
1496
  this.loading = true;
1380
- const attributes = Object.keys(this.formGroup.controls);
1381
- this.service.getOne(this.tenant, this.className, this.copyOid || this.oid, attributes).subscribe((response) => {
1497
+ this.service.getOne(this.tenant, this.className, this.copyOid || this.oid, this.template)
1498
+ .subscribe((response) => {
1382
1499
  if (this.copyOid) {
1383
1500
  delete response.data.oid;
1384
1501
  }
@@ -1417,7 +1534,7 @@ class FormComponent {
1417
1534
  }
1418
1535
  }
1419
1536
  FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, deps: [{ token: FormService }], target: i0.ɵɵFactoryTarget.Component });
1420
- FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FormComponent, selector: "rs-form", inputs: { tenant: "tenant", className: "className", oid: "oid", copyOid: "copyOid", template: "template" }, outputs: { submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: true }], ngImport: i0, template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\"\n dLoading [loading]=\"loading\">\n <ng-container *ngIf=\"loaded\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\" [model]=\"model\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n", styles: ["form{display:flex;flex-flow:row nowrap}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.FormDirective, selector: "[dForm]", inputs: ["layout", "labelSize", "labelAlign", "dFeedbackType", "dHasFeedback"], outputs: ["dSubmit"], exportAs: ["dForm"] }, { kind: "directive", type: i3$1.DFormSubmitDirective, selector: "[dFormSubmit]", inputs: ["dFormSubmit", "dFormSubmitData"] }, { kind: "directive", type: i4$2.LoadingDirective, selector: "[dLoading]", inputs: ["backdrop", "message", "positionType", "showLoading", "view", "zIndex", "loading", "loadingStyle", "loadingTemplateRef"], exportAs: ["dLoading"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: BoxContainerComponent, selector: "rs-box-container", inputs: ["editMode", "config", "formGroup", "model", "tabViewContainerRef"] }] });
1537
+ FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FormComponent, selector: "rs-form", inputs: { tenant: "tenant", className: "className", oid: "oid", copyOid: "copyOid", template: "template" }, outputs: { submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: true }], ngImport: i0, template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\"\n dLoading [loading]=\"loading\">\n <ng-container *ngIf=\"loaded\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\" [model]=\"model\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n", styles: ["form{display:flex;flex-flow:row nowrap}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.FormDirective, selector: "[dForm]", inputs: ["layout", "labelSize", "labelAlign", "dFeedbackType", "dHasFeedback"], outputs: ["dSubmit"], exportAs: ["dForm"] }, { kind: "directive", type: i3$2.DFormSubmitDirective, selector: "[dFormSubmit]", inputs: ["dFormSubmit", "dFormSubmitData"] }, { kind: "directive", type: i4$2.LoadingDirective, selector: "[dLoading]", inputs: ["backdrop", "message", "positionType", "showLoading", "view", "zIndex", "loading", "loadingStyle", "loadingTemplateRef"], exportAs: ["dLoading"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: BoxContainerComponent, selector: "rs-box-container", inputs: ["editMode", "config", "formGroup", "model", "tabViewContainerRef"] }] });
1421
1538
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, decorators: [{
1422
1539
  type: Component,
1423
1540
  args: [{ selector: 'rs-form', providers: [FormService], template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\"\n dLoading [loading]=\"loading\">\n <ng-container *ngIf=\"loaded\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\" [model]=\"model\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n", styles: ["form{display:flex;flex-flow:row nowrap}\n"] }]
@@ -1681,5 +1798,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1681
1798
  * Generated bundle index. Do not edit.
1682
1799
  */
1683
1800
 
1684
- export { BoxContainerComponent, BoxContainerModule, DataGridComponent, DataGridModule, DataGridService, DynamicParamsComponent, DynamicParamsModule, FormComponent, FormModule, FormService, ItemConfigComponent, ItemStyleComponent, MasterDetailTemplateDirective, ModalComponent, ModalModule, ModalService, PluginManager };
1801
+ export { BoxContainerComponent, BoxContainerModule, DataGridComponent, DataGridModule, DataGridService, DynamicParamsComponent, DynamicParamsModule, FormComponent, FormModule, FormService, ItemConfigComponent, ItemStyleComponent, MasterDetailTemplateDirective, ModalComponent, ModalModule, ModalService, PluginManager, RowButtonsTemplateDirective };
1685
1802
  //# sourceMappingURL=ngx-rs-ant.mjs.map