basesite-shared-grid-lib 1.3.2 → 15.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/basesite-shared-grid-lib-15.0.6.tgz +0 -0
- package/esm2020/lib/grid-library.component.mjs +151 -98
- package/esm2020/lib/grid-library.module.mjs +10 -7
- package/esm2020/lib/grid-library.service.mjs +3 -3
- package/esm2020/lib/helpers/oDataProvider.mjs +59 -43
- package/esm2020/lib/renderer/button-renderer/button-renderer.component.mjs +3 -3
- package/esm2020/lib/renderer/dropdown-renderer/drop-down-renderer.mjs +52 -0
- package/esm2020/lib/renderer/tooltip-renderer/custom-tooltip-renderer.mjs +3 -3
- package/fesm2015/basesite-shared-grid-lib.mjs +273 -154
- package/fesm2015/basesite-shared-grid-lib.mjs.map +1 -1
- package/fesm2020/basesite-shared-grid-lib.mjs +273 -154
- package/fesm2020/basesite-shared-grid-lib.mjs.map +1 -1
- package/lib/grid-library.component.d.ts +2 -1
- package/lib/grid-library.module.d.ts +5 -4
- package/lib/helpers/oDataProvider.d.ts +115 -115
- package/lib/renderer/dropdown-renderer/drop-down-renderer.d.ts +11 -0
- package/package.json +3 -3
- package/src/lib/styles/styles.scss +51 -21
- package/basesite-shared-grid-lib-1.3.2.tgz +0 -0
|
@@ -37,9 +37,9 @@ class GridLibraryService {
|
|
|
37
37
|
return this.httpClient.get(`${this.baseUrl}/GridConfiguration?gridId=${gridId}&userId=${loggedInUserId}`);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
GridLibraryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
41
|
-
GridLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
40
|
+
GridLibraryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
GridLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryService, providedIn: 'root' });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryService, decorators: [{
|
|
43
43
|
type: Injectable,
|
|
44
44
|
args: [{
|
|
45
45
|
providedIn: 'root',
|
|
@@ -160,8 +160,30 @@ class OdataProvider {
|
|
|
160
160
|
}
|
|
161
161
|
let query = '';
|
|
162
162
|
if (path.length > 0) {
|
|
163
|
-
|
|
163
|
+
var defaultFilters = path.filter((x) => {
|
|
164
|
+
if (x.indexOf('$count') >= 0 ||
|
|
165
|
+
x.indexOf('$top') >= 0 ||
|
|
166
|
+
x.indexOf('$orderby') >= 0 ||
|
|
167
|
+
x.indexOf('$apply') >= 0 ||
|
|
168
|
+
x.indexOf('$expand') >= 0 ||
|
|
169
|
+
x.indexOf('$select') >= 0) {
|
|
170
|
+
return x;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
if (defaultFilters && defaultFilters.length > 0) {
|
|
174
|
+
query = '?' + defaultFilters.join('&');
|
|
175
|
+
}
|
|
176
|
+
var customFilters = path.filter(function (obj) {
|
|
177
|
+
return defaultFilters.indexOf(obj) == -1;
|
|
178
|
+
});
|
|
179
|
+
if (customFilters && customFilters.length > 0) {
|
|
180
|
+
if (customFilters.length == 1)
|
|
181
|
+
query = query + '&' + customFilters;
|
|
182
|
+
else
|
|
183
|
+
query = query + customFilters.join('and');
|
|
184
|
+
}
|
|
164
185
|
}
|
|
186
|
+
query = query.replace('and$filter=', '&filter=');
|
|
165
187
|
return query;
|
|
166
188
|
};
|
|
167
189
|
/**
|
|
@@ -417,41 +439,41 @@ class OdataProvider {
|
|
|
417
439
|
return result;
|
|
418
440
|
};
|
|
419
441
|
/**
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
442
|
+
* Calculate distinct values for input field from Odata api
|
|
443
|
+
* @param field The field of the row to get the cells data from
|
|
444
|
+
* @param callback The function for return distinct values for input field
|
|
445
|
+
* @param beforeRequest The function for customize request
|
|
446
|
+
* @example
|
|
447
|
+
* <pre><code>
|
|
448
|
+
* const setFilterValuesFuncParams = params => {
|
|
449
|
+
* const me = this
|
|
450
|
+
* const col = params.colDef.field
|
|
451
|
+
* const storeName = me.getStoreName(col)
|
|
452
|
+
* const callback = data => {
|
|
453
|
+
* if (data) {
|
|
454
|
+
* me.setState({ [storeName]: data })
|
|
455
|
+
* params.success(data)
|
|
456
|
+
* }
|
|
457
|
+
* }
|
|
458
|
+
* odataProviderInstance.getFilterValuesParams(params.colDef.field, callback)
|
|
459
|
+
* }
|
|
460
|
+
*
|
|
461
|
+
* ///....
|
|
462
|
+
* <AgGridColumn
|
|
463
|
+
field="product"
|
|
464
|
+
headerName={'PRODUCT'}
|
|
465
|
+
filter="agSetColumnFilter"
|
|
466
|
+
// rowGroup
|
|
467
|
+
// enablePivot
|
|
468
|
+
enableRowGroup
|
|
469
|
+
filterParams={{
|
|
470
|
+
values: setFilterValuesFuncParams,
|
|
471
|
+
newRowsAction: 'keep'
|
|
472
|
+
}}
|
|
473
|
+
// filterParams={{caseSensitive: true}}
|
|
474
|
+
/>
|
|
475
|
+
* </code></pre>
|
|
476
|
+
*/
|
|
455
477
|
this.getFilterValuesParams = (field, callback, beforeRequest) => {
|
|
456
478
|
const me = this;
|
|
457
479
|
const options = {
|
|
@@ -491,14 +513,12 @@ class OdataProvider {
|
|
|
491
513
|
*/
|
|
492
514
|
this.setResult = (params, isServerMode, rowsThisBlock, rowCount) => {
|
|
493
515
|
if (isServerMode) {
|
|
494
|
-
;
|
|
495
516
|
params.success({
|
|
496
517
|
rowData: rowsThisBlock,
|
|
497
518
|
rowCount: rowCount,
|
|
498
519
|
});
|
|
499
520
|
}
|
|
500
521
|
else {
|
|
501
|
-
;
|
|
502
522
|
params.successCallback(rowsThisBlock, rowCount);
|
|
503
523
|
}
|
|
504
524
|
};
|
|
@@ -700,12 +720,10 @@ class OdataProvider {
|
|
|
700
720
|
let fn = params.columnApi.setPivotResultColumns;
|
|
701
721
|
if (fn != null) {
|
|
702
722
|
// if ((params as any).columnApi.isPivotMode()) {
|
|
703
|
-
;
|
|
704
723
|
params.columnApi.setPivotResultColumns([]);
|
|
705
724
|
// }
|
|
706
725
|
}
|
|
707
726
|
else {
|
|
708
|
-
;
|
|
709
727
|
params.columnApi.setSecondaryColumns([]);
|
|
710
728
|
}
|
|
711
729
|
}
|
|
@@ -796,11 +814,9 @@ class OdataProvider {
|
|
|
796
814
|
}
|
|
797
815
|
let fn = params.columnApi.setPivotResultColumns;
|
|
798
816
|
if (fn) {
|
|
799
|
-
;
|
|
800
817
|
params.columnApi.setPivotResultColumns(secondaryColDefs);
|
|
801
818
|
}
|
|
802
819
|
else {
|
|
803
|
-
;
|
|
804
820
|
params.columnApi.setSecondaryColumns(secondaryColDefs);
|
|
805
821
|
}
|
|
806
822
|
}
|
|
@@ -849,15 +865,15 @@ class ButtonRendererComponent {
|
|
|
849
865
|
}
|
|
850
866
|
}
|
|
851
867
|
}
|
|
852
|
-
ButtonRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
853
|
-
ButtonRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
868
|
+
ButtonRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ButtonRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
869
|
+
ButtonRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ButtonRendererComponent, selector: "lib-button-renderer", ngImport: i0, template: `
|
|
854
870
|
<button class="btn-actions" type="button" (click)="onClick($event)" [attr.data-title]="params.tooltip">
|
|
855
871
|
<span *ngIf="icon && !label"> <i class="{{ icon }}"></i> </span>
|
|
856
872
|
<span *ngIf="!icon && label">{{ label }}</span>
|
|
857
873
|
<span *ngIf="icon && label"><i class="{{ icon }}"></i> {{ label }}</span>
|
|
858
874
|
</button>
|
|
859
875
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ButtonRendererComponent, decorators: [{
|
|
861
877
|
type: Component,
|
|
862
878
|
args: [{
|
|
863
879
|
selector: 'lib-button-renderer',
|
|
@@ -886,13 +902,13 @@ class CustomTooltip {
|
|
|
886
902
|
}
|
|
887
903
|
}
|
|
888
904
|
}
|
|
889
|
-
CustomTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
890
|
-
CustomTooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
905
|
+
CustomTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CustomTooltip, deps: [{ token: i1$1.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
906
|
+
CustomTooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: CustomTooltip, selector: "tooltip-component", ngImport: i0, template: ` <div class="custom-tooltip">
|
|
891
907
|
<p>
|
|
892
908
|
<span>{{ params.value }}</span>
|
|
893
909
|
</p>
|
|
894
910
|
</div>`, isInline: true });
|
|
895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CustomTooltip, decorators: [{
|
|
896
912
|
type: Component,
|
|
897
913
|
args: [{
|
|
898
914
|
selector: 'tooltip-component',
|
|
@@ -904,6 +920,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
904
920
|
}]
|
|
905
921
|
}], ctorParameters: function () { return [{ type: i1$1.DatePipe }]; } });
|
|
906
922
|
|
|
923
|
+
class DropdownRenderer {
|
|
924
|
+
agInit(params) {
|
|
925
|
+
this.params = params;
|
|
926
|
+
this.dropDownData = this.params.dropDownData ? this.params.dropDownData.split(',') : [];
|
|
927
|
+
}
|
|
928
|
+
refresh(params) {
|
|
929
|
+
return false;
|
|
930
|
+
}
|
|
931
|
+
onClick($event) {
|
|
932
|
+
if (this.params.onClick instanceof Function) {
|
|
933
|
+
const params = {
|
|
934
|
+
event: $event,
|
|
935
|
+
rowData: Object.assign({}, this.params.node.data, {
|
|
936
|
+
buttonName: $event.target.innerText,
|
|
937
|
+
}),
|
|
938
|
+
};
|
|
939
|
+
console.log('Hit', params);
|
|
940
|
+
this.params.onClick(params);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
DropdownRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DropdownRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
945
|
+
DropdownRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: DropdownRenderer, selector: "lib-dropdown-renderer", ngImport: i0, template: `
|
|
946
|
+
<div class="dropdown">
|
|
947
|
+
<button type="button" class="btn btn-white" data-toggle="dropdown">
|
|
948
|
+
<i class="fa fa-ellipsis-v"></i>
|
|
949
|
+
</button>
|
|
950
|
+
<div class="dropdown-menu">
|
|
951
|
+
<span *ngFor='let data of dropDownData' class="dropdown-item" (click)="onClick($event)">{{data}}</span>
|
|
952
|
+
</div>
|
|
953
|
+
</div>
|
|
954
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DropdownRenderer, decorators: [{
|
|
956
|
+
type: Component,
|
|
957
|
+
args: [{
|
|
958
|
+
selector: 'lib-dropdown-renderer',
|
|
959
|
+
template: `
|
|
960
|
+
<div class="dropdown">
|
|
961
|
+
<button type="button" class="btn btn-white" data-toggle="dropdown">
|
|
962
|
+
<i class="fa fa-ellipsis-v"></i>
|
|
963
|
+
</button>
|
|
964
|
+
<div class="dropdown-menu">
|
|
965
|
+
<span *ngFor='let data of dropDownData' class="dropdown-item" (click)="onClick($event)">{{data}}</span>
|
|
966
|
+
</div>
|
|
967
|
+
</div>
|
|
968
|
+
`,
|
|
969
|
+
}]
|
|
970
|
+
}] });
|
|
971
|
+
|
|
907
972
|
class GridLibraryComponent {
|
|
908
973
|
constructor(gridService, datePipe) {
|
|
909
974
|
this.gridService = gridService;
|
|
@@ -912,6 +977,7 @@ class GridLibraryComponent {
|
|
|
912
977
|
this.rowSelection = 'multiple';
|
|
913
978
|
this.enableServerSidePaging = false;
|
|
914
979
|
this.cacheBlockSize = 0;
|
|
980
|
+
this.rowMultiSelectWithClick = false;
|
|
915
981
|
//event emitters
|
|
916
982
|
this.btnClickHandler = new EventEmitter();
|
|
917
983
|
this.tooltipShowDelay = 0;
|
|
@@ -959,39 +1025,82 @@ class GridLibraryComponent {
|
|
|
959
1025
|
if (response.status == 1) {
|
|
960
1026
|
let coldef = response.list.map((res) => {
|
|
961
1027
|
if (res.isButton === false) {
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
:
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1028
|
+
if (res.columnType === 'checkbox') {
|
|
1029
|
+
return {
|
|
1030
|
+
field: res.field,
|
|
1031
|
+
headerName: res.title,
|
|
1032
|
+
sortable: false,
|
|
1033
|
+
tooltipField: res.field,
|
|
1034
|
+
resizable: true,
|
|
1035
|
+
headerCheckboxSelection: false,
|
|
1036
|
+
filterable: false,
|
|
1037
|
+
checkboxSelection: true,
|
|
1038
|
+
showDisabledCheckboxes: true,
|
|
1039
|
+
suppressFilter: true,
|
|
1040
|
+
suppressSorting: true,
|
|
1041
|
+
suppressMenu: true,
|
|
1042
|
+
width: 20,
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
1045
|
+
else if (res.columnType === 'dropdown') {
|
|
1046
|
+
return {
|
|
1047
|
+
field: res.field,
|
|
1048
|
+
headerName: res.title,
|
|
1049
|
+
resizable: true,
|
|
1050
|
+
sortable: false,
|
|
1051
|
+
suppressFilter: true,
|
|
1052
|
+
suppressSorting: true,
|
|
1053
|
+
suppressMenu: true,
|
|
1054
|
+
tooltipField: res.field,
|
|
1055
|
+
cellRenderer: DropdownRenderer,
|
|
1056
|
+
cellRendererParams: {
|
|
1057
|
+
onClick: this.onBtnClick.bind(this),
|
|
1058
|
+
tooltip: res.tooltip,
|
|
1059
|
+
dropDownData: res.dropDownData,
|
|
1060
|
+
},
|
|
1061
|
+
onCellClicked: (e) => {
|
|
1062
|
+
e.node.setSelected(false);
|
|
1063
|
+
},
|
|
1064
|
+
width: 35,
|
|
1065
|
+
pinned: res.pinPosition,
|
|
1066
|
+
lockPinned: true,
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
else {
|
|
1070
|
+
return {
|
|
1071
|
+
field: res.field,
|
|
1072
|
+
headerName: res.title,
|
|
1073
|
+
resizable: true,
|
|
1074
|
+
hide: !res.visible,
|
|
1075
|
+
sortable: true,
|
|
1076
|
+
tooltipField: res.field,
|
|
1077
|
+
valueFormatter: this.colValueFormatter.bind(this),
|
|
1078
|
+
filterable: res.filterable,
|
|
1079
|
+
filter: res.columnType == 'string'
|
|
1080
|
+
? 'agTextColumnFilter'
|
|
1081
|
+
: res.columnType == 'number'
|
|
1082
|
+
? 'agNumberColumnFilter'
|
|
1083
|
+
: 'agDateColumnFilter',
|
|
1084
|
+
filterParams: {
|
|
1085
|
+
comparator: (filterLocalDateAtMidnight, cellValue) => {
|
|
1086
|
+
const dateAsString = cellValue;
|
|
1087
|
+
if (dateAsString == null) {
|
|
1088
|
+
return 0;
|
|
986
1089
|
}
|
|
987
|
-
|
|
988
|
-
|
|
1090
|
+
if (res.columnType == 'date') {
|
|
1091
|
+
const cellDate = new Date(dateAsString);
|
|
1092
|
+
if (cellDate < filterLocalDateAtMidnight) {
|
|
1093
|
+
return -1;
|
|
1094
|
+
}
|
|
1095
|
+
else if (cellDate > filterLocalDateAtMidnight) {
|
|
1096
|
+
return 1;
|
|
1097
|
+
}
|
|
989
1098
|
}
|
|
990
|
-
|
|
991
|
-
|
|
1099
|
+
return 0;
|
|
1100
|
+
},
|
|
992
1101
|
},
|
|
993
|
-
}
|
|
994
|
-
}
|
|
1102
|
+
};
|
|
1103
|
+
}
|
|
995
1104
|
}
|
|
996
1105
|
else {
|
|
997
1106
|
return {
|
|
@@ -1036,18 +1145,19 @@ class GridLibraryComponent {
|
|
|
1036
1145
|
}
|
|
1037
1146
|
}
|
|
1038
1147
|
setExternalFilters(options) {
|
|
1039
|
-
|
|
1040
|
-
|
|
1148
|
+
var serverUrl = '';
|
|
1149
|
+
if (this.serverDataUrl.indexOf('filter') >= 0 && options.indexOf('filter') >= 0) {
|
|
1041
1150
|
let slug = this.serverDataUrl.split('?$filter=');
|
|
1042
1151
|
if (slug && slug.length > 0) {
|
|
1043
|
-
options = options + '
|
|
1044
|
-
|
|
1152
|
+
options = options + ' and ' + slug[1];
|
|
1153
|
+
serverUrl = slug[0];
|
|
1045
1154
|
}
|
|
1046
1155
|
}
|
|
1047
1156
|
else if (this.serverDataUrl.indexOf('?') >= 0) {
|
|
1157
|
+
serverUrl = this.serverDataUrl;
|
|
1048
1158
|
options = options.replace('?', '&');
|
|
1049
1159
|
}
|
|
1050
|
-
return `${
|
|
1160
|
+
return `${serverUrl}${options}`;
|
|
1051
1161
|
}
|
|
1052
1162
|
onGridReady(params) {
|
|
1053
1163
|
this.gridPageSize = this.pageSize;
|
|
@@ -1072,11 +1182,13 @@ class GridLibraryComponent {
|
|
|
1072
1182
|
}
|
|
1073
1183
|
else {
|
|
1074
1184
|
var columns = this.agGrid.columnApi.getColumns();
|
|
1075
|
-
if (columns && columns.length >
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1185
|
+
if (columns && columns.length > 0) {
|
|
1186
|
+
if (columns.length > 10) {
|
|
1187
|
+
this.agGrid.columnApi.autoSizeAllColumns();
|
|
1188
|
+
}
|
|
1189
|
+
else {
|
|
1190
|
+
this.agGrid.api.sizeColumnsToFit();
|
|
1191
|
+
}
|
|
1080
1192
|
}
|
|
1081
1193
|
}
|
|
1082
1194
|
}
|
|
@@ -1098,6 +1210,7 @@ class GridLibraryComponent {
|
|
|
1098
1210
|
}
|
|
1099
1211
|
}
|
|
1100
1212
|
onBtnClick(e) {
|
|
1213
|
+
console.log('btn click=>', e);
|
|
1101
1214
|
this.btnClickHandler.emit(e.rowData);
|
|
1102
1215
|
}
|
|
1103
1216
|
onSaveGridColumnState(event) {
|
|
@@ -1131,64 +1244,66 @@ class GridLibraryComponent {
|
|
|
1131
1244
|
return params.value;
|
|
1132
1245
|
}
|
|
1133
1246
|
}
|
|
1134
|
-
GridLibraryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1135
|
-
GridLibraryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
1136
|
-
<ag-grid-angular
|
|
1137
|
-
style="width: 100%;height:98.2vh"
|
|
1138
|
-
class="ag-theme-balham"
|
|
1139
|
-
[columnDefs]="columnDefs"
|
|
1140
|
-
[defaultColDef]="defaultColDef"
|
|
1141
|
-
[rowData]="rowData"
|
|
1142
|
-
[rowSelection]="rowSelection"
|
|
1143
|
-
[animateRows]="true"
|
|
1144
|
-
(gridReady)="onGridReady($event)"
|
|
1145
|
-
[pagination]="true"
|
|
1146
|
-
[paginationPageSize]="gridPageSize"
|
|
1147
|
-
[paginationNumberFormatter]="paginationNumberFormatter"
|
|
1148
|
-
(modelUpdated)="onModelUpdated()"
|
|
1149
|
-
[tooltipShowDelay]="tooltipShowDelay"
|
|
1150
|
-
[tooltipHideDelay]="tooltipHideDelay"
|
|
1151
|
-
[rowModelType]="rowModelType"
|
|
1152
|
-
[cacheBlockSize]="cacheBlockSize"
|
|
1153
|
-
[maxConcurrentDatasourceRequests]="1"
|
|
1154
|
-
[blockLoadDebounceMillis]="100"
|
|
1155
|
-
(columnVisible)="onSaveGridColumnState($event)"
|
|
1156
|
-
(columnPinned)="onSaveGridColumnState($event)"
|
|
1157
|
-
(columnResized)="onSaveGridColumnState($event)"
|
|
1158
|
-
(columnMoved)="onSaveGridColumnState($event)"
|
|
1159
|
-
(sortChanged)="onSortChangedEvent()"
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1247
|
+
GridLibraryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryComponent, deps: [{ token: GridLibraryService }, { token: i1$1.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
1248
|
+
GridLibraryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: GridLibraryComponent, selector: "lib-basesite-shared-grid-lib", inputs: { columnDefs: "columnDefs", rowData: "rowData", pageSize: "pageSize", rowSelection: "rowSelection", gridId: "gridId", loggedInUser: "loggedInUser", enableServerSidePaging: "enableServerSidePaging", serverDataUrl: "serverDataUrl", environment: "environment", cacheBlockSize: "cacheBlockSize", rowMultiSelectWithClick: "rowMultiSelectWithClick" }, outputs: { btnClickHandler: "btnClickHandler" }, viewQueries: [{ propertyName: "agGrid", first: true, predicate: AgGridAngular, descendants: true }], ngImport: i0, template: `
|
|
1249
|
+
<ag-grid-angular
|
|
1250
|
+
style="width: 100%;height:98.2vh"
|
|
1251
|
+
class="ag-theme-balham shared-grid-lib"
|
|
1252
|
+
[columnDefs]="columnDefs"
|
|
1253
|
+
[defaultColDef]="defaultColDef"
|
|
1254
|
+
[rowData]="rowData"
|
|
1255
|
+
[rowSelection]="rowSelection"
|
|
1256
|
+
[animateRows]="true"
|
|
1257
|
+
(gridReady)="onGridReady($event)"
|
|
1258
|
+
[pagination]="true"
|
|
1259
|
+
[paginationPageSize]="gridPageSize"
|
|
1260
|
+
[paginationNumberFormatter]="paginationNumberFormatter"
|
|
1261
|
+
(modelUpdated)="onModelUpdated()"
|
|
1262
|
+
[tooltipShowDelay]="tooltipShowDelay"
|
|
1263
|
+
[tooltipHideDelay]="tooltipHideDelay"
|
|
1264
|
+
[rowModelType]="rowModelType"
|
|
1265
|
+
[cacheBlockSize]="cacheBlockSize"
|
|
1266
|
+
[maxConcurrentDatasourceRequests]="1"
|
|
1267
|
+
[blockLoadDebounceMillis]="100"
|
|
1268
|
+
(columnVisible)="onSaveGridColumnState($event)"
|
|
1269
|
+
(columnPinned)="onSaveGridColumnState($event)"
|
|
1270
|
+
(columnResized)="onSaveGridColumnState($event)"
|
|
1271
|
+
(columnMoved)="onSaveGridColumnState($event)"
|
|
1272
|
+
(sortChanged)="onSortChangedEvent()"
|
|
1273
|
+
[rowMultiSelectWithClick]="rowMultiSelectWithClick"
|
|
1274
|
+
>
|
|
1275
|
+
</ag-grid-angular>
|
|
1276
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i3.AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "suppressMenuHide", "enableBrowserTooltips", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "maintainColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "components", "frameworkComponents", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "excludeHiddenColumnsFromQuickFilter", "excludeChildrenWhenTreeDataFiltering", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "suppressChartToolPanelsButton", "chartToolPanelsDef", "loadingCellRenderer", "loadingCellRendererFramework", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererFramework", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentFramework", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentFramework", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDelay", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererFramework", "fullWidthCellRendererParams", "embedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererFramework", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "groupRowsSticky", "rememberGroupStateWhenNewData", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "immutableData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "serverSideStoreType", "suppressServerSideInfiniteScroll", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSideSortingAlwaysResets", "serverSideFilteringAlwaysResets", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellSelection", "suppressCellFocus", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "deltaSort", "treeDataDisplayType", "functionsPassive", "enableGroupEdit", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "localeTextFunc", "getLocaleText", "getDocument", "paginationNumberFormatter", "groupRowAggNodes", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "defaultGroupOrderComparator", "processSecondaryColDef", "processSecondaryColGroupDef", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "getServerSideStoreParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowNodeId", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSort", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthCell", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "filterOpened", "filterChanged", "filterModified", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "cellKeyPress", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pinnedRowDataChanged", "rowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }] });
|
|
1277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryComponent, decorators: [{
|
|
1164
1278
|
type: Component,
|
|
1165
|
-
args: [{ selector: 'lib-basesite-shared-grid-lib', template: `
|
|
1166
|
-
<ag-grid-angular
|
|
1167
|
-
style="width: 100%;height:98.2vh"
|
|
1168
|
-
class="ag-theme-balham"
|
|
1169
|
-
[columnDefs]="columnDefs"
|
|
1170
|
-
[defaultColDef]="defaultColDef"
|
|
1171
|
-
[rowData]="rowData"
|
|
1172
|
-
[rowSelection]="rowSelection"
|
|
1173
|
-
[animateRows]="true"
|
|
1174
|
-
(gridReady)="onGridReady($event)"
|
|
1175
|
-
[pagination]="true"
|
|
1176
|
-
[paginationPageSize]="gridPageSize"
|
|
1177
|
-
[paginationNumberFormatter]="paginationNumberFormatter"
|
|
1178
|
-
(modelUpdated)="onModelUpdated()"
|
|
1179
|
-
[tooltipShowDelay]="tooltipShowDelay"
|
|
1180
|
-
[tooltipHideDelay]="tooltipHideDelay"
|
|
1181
|
-
[rowModelType]="rowModelType"
|
|
1182
|
-
[cacheBlockSize]="cacheBlockSize"
|
|
1183
|
-
[maxConcurrentDatasourceRequests]="1"
|
|
1184
|
-
[blockLoadDebounceMillis]="100"
|
|
1185
|
-
(columnVisible)="onSaveGridColumnState($event)"
|
|
1186
|
-
(columnPinned)="onSaveGridColumnState($event)"
|
|
1187
|
-
(columnResized)="onSaveGridColumnState($event)"
|
|
1188
|
-
(columnMoved)="onSaveGridColumnState($event)"
|
|
1189
|
-
(sortChanged)="onSortChangedEvent()"
|
|
1190
|
-
|
|
1191
|
-
|
|
1279
|
+
args: [{ selector: 'lib-basesite-shared-grid-lib', template: `
|
|
1280
|
+
<ag-grid-angular
|
|
1281
|
+
style="width: 100%;height:98.2vh"
|
|
1282
|
+
class="ag-theme-balham shared-grid-lib"
|
|
1283
|
+
[columnDefs]="columnDefs"
|
|
1284
|
+
[defaultColDef]="defaultColDef"
|
|
1285
|
+
[rowData]="rowData"
|
|
1286
|
+
[rowSelection]="rowSelection"
|
|
1287
|
+
[animateRows]="true"
|
|
1288
|
+
(gridReady)="onGridReady($event)"
|
|
1289
|
+
[pagination]="true"
|
|
1290
|
+
[paginationPageSize]="gridPageSize"
|
|
1291
|
+
[paginationNumberFormatter]="paginationNumberFormatter"
|
|
1292
|
+
(modelUpdated)="onModelUpdated()"
|
|
1293
|
+
[tooltipShowDelay]="tooltipShowDelay"
|
|
1294
|
+
[tooltipHideDelay]="tooltipHideDelay"
|
|
1295
|
+
[rowModelType]="rowModelType"
|
|
1296
|
+
[cacheBlockSize]="cacheBlockSize"
|
|
1297
|
+
[maxConcurrentDatasourceRequests]="1"
|
|
1298
|
+
[blockLoadDebounceMillis]="100"
|
|
1299
|
+
(columnVisible)="onSaveGridColumnState($event)"
|
|
1300
|
+
(columnPinned)="onSaveGridColumnState($event)"
|
|
1301
|
+
(columnResized)="onSaveGridColumnState($event)"
|
|
1302
|
+
(columnMoved)="onSaveGridColumnState($event)"
|
|
1303
|
+
(sortChanged)="onSortChangedEvent()"
|
|
1304
|
+
[rowMultiSelectWithClick]="rowMultiSelectWithClick"
|
|
1305
|
+
>
|
|
1306
|
+
</ag-grid-angular>
|
|
1192
1307
|
` }]
|
|
1193
1308
|
}], ctorParameters: function () { return [{ type: GridLibraryService }, { type: i1$1.DatePipe }]; }, propDecorators: { columnDefs: [{
|
|
1194
1309
|
type: Input
|
|
@@ -1210,6 +1325,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
1210
1325
|
type: Input
|
|
1211
1326
|
}], cacheBlockSize: [{
|
|
1212
1327
|
type: Input
|
|
1328
|
+
}], rowMultiSelectWithClick: [{
|
|
1329
|
+
type: Input
|
|
1213
1330
|
}], btnClickHandler: [{
|
|
1214
1331
|
type: Output
|
|
1215
1332
|
}], agGrid: [{
|
|
@@ -1220,22 +1337,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
1220
1337
|
LicenseManager.setLicenseKey("CompanyName=Basesite,LicensedGroup=Basesite,LicenseType=MultipleApplications,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=2,AssetReference=AG-028469,ExpiryDate=19_May_2023_[v2]_MTY4NDQ1MDgwMDAwMA==ed6f437ea331cf602f669128db7b5387");
|
|
1221
1338
|
class GridLibraryModule {
|
|
1222
1339
|
}
|
|
1223
|
-
GridLibraryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1224
|
-
GridLibraryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
1340
|
+
GridLibraryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1341
|
+
GridLibraryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryModule, declarations: [GridLibraryComponent,
|
|
1225
1342
|
ButtonRendererComponent,
|
|
1226
|
-
CustomTooltip
|
|
1343
|
+
CustomTooltip,
|
|
1344
|
+
DropdownRenderer], imports: [AgGridModule,
|
|
1227
1345
|
HttpClientModule,
|
|
1228
1346
|
CommonModule], exports: [GridLibraryComponent] });
|
|
1229
|
-
GridLibraryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
1347
|
+
GridLibraryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryModule, providers: [DatePipe], imports: [AgGridModule,
|
|
1230
1348
|
HttpClientModule,
|
|
1231
1349
|
CommonModule] });
|
|
1232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: GridLibraryModule, decorators: [{
|
|
1233
1351
|
type: NgModule,
|
|
1234
1352
|
args: [{
|
|
1235
1353
|
declarations: [
|
|
1236
1354
|
GridLibraryComponent,
|
|
1237
1355
|
ButtonRendererComponent,
|
|
1238
|
-
CustomTooltip
|
|
1356
|
+
CustomTooltip,
|
|
1357
|
+
DropdownRenderer
|
|
1239
1358
|
],
|
|
1240
1359
|
imports: [
|
|
1241
1360
|
AgGridModule,
|