raise-common-lib 0.0.72 → 0.0.74
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/bundles/raise-common-lib.umd.js +55 -29
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/common-grid/index.component.js +56 -32
- package/esm5/lib/common-grid/index.component.js +59 -32
- package/fesm2015/raise-common-lib.js +53 -30
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +56 -30
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/common-grid/index.component.d.ts +6 -4
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
- package/src/assets/style/reset/grid.scss +2 -2
|
@@ -237,18 +237,17 @@
|
|
|
237
237
|
this.authorized = true; // Dataset是否授权,未授权则显示权限错误提示
|
|
238
238
|
// Dataset是否授权,未授权则显示权限错误提示
|
|
239
239
|
// only use for local data pagination
|
|
240
|
-
this.selectedDiffKey =
|
|
241
|
-
this.gridHeight =
|
|
240
|
+
this.selectedDiffKey = "";
|
|
241
|
+
this.gridHeight = "";
|
|
242
242
|
// 这玩意必填,不然filter columnChooser都会报错
|
|
243
|
-
this.gridId =
|
|
244
|
-
this.resizeSettings = { mode:
|
|
245
|
-
this.filterSettings = { type:
|
|
243
|
+
this.gridId = "grid";
|
|
244
|
+
this.resizeSettings = { mode: "Auto" };
|
|
245
|
+
this.filterSettings = { type: "Menu" };
|
|
246
246
|
this.fields = [];
|
|
247
247
|
this.dataSource = [];
|
|
248
248
|
this.allowPaging = true;
|
|
249
|
-
this.clipMode =
|
|
249
|
+
this.clipMode = "EllipsisWithTooltip";
|
|
250
250
|
this.checkBoxWidth = 32; // col 数量过少的时候,check宽度会拉伸,这时候设置null
|
|
251
|
-
// col 数量过少的时候,check宽度会拉伸,这时候设置null
|
|
252
251
|
/**
|
|
253
252
|
* Sample: [
|
|
254
253
|
* {
|
|
@@ -269,7 +268,7 @@
|
|
|
269
268
|
this.contextMenuItems = [];
|
|
270
269
|
// @Input() selectionSettings = { checkboxOnly: true, type: "Multiple" };
|
|
271
270
|
this.selectionSettings = {
|
|
272
|
-
type:
|
|
271
|
+
type: "Multiple",
|
|
273
272
|
// persistSelection: true,
|
|
274
273
|
checkboxOnly: true,
|
|
275
274
|
};
|
|
@@ -292,8 +291,30 @@
|
|
|
292
291
|
this.selectId = [];
|
|
293
292
|
this.startPaging = false;
|
|
294
293
|
this.indexList = [];
|
|
295
|
-
this.className =
|
|
296
|
-
this.
|
|
294
|
+
this.className = "grid-loading";
|
|
295
|
+
this.initList = (/**
|
|
296
|
+
* @param {?=} num
|
|
297
|
+
* @param {?=} key
|
|
298
|
+
* @return {?}
|
|
299
|
+
*/
|
|
300
|
+
function (num, key) {
|
|
301
|
+
if (num === void 0) { num = 25; }
|
|
302
|
+
if (key === void 0) { key = "Id"; }
|
|
303
|
+
/** @type {?} */
|
|
304
|
+
var list = [];
|
|
305
|
+
lodash.times(num, (/**
|
|
306
|
+
* @param {?} i
|
|
307
|
+
* @return {?}
|
|
308
|
+
*/
|
|
309
|
+
function (i) {
|
|
310
|
+
var _a;
|
|
311
|
+
list.push((_a = {},
|
|
312
|
+
_a[key] = i,
|
|
313
|
+
_a));
|
|
314
|
+
}));
|
|
315
|
+
return list;
|
|
316
|
+
});
|
|
317
|
+
this.translation = JSON.parse(localStorage.getItem("translation"));
|
|
297
318
|
}
|
|
298
319
|
/**
|
|
299
320
|
* @return {?}
|
|
@@ -303,7 +324,7 @@
|
|
|
303
324
|
*/
|
|
304
325
|
function () {
|
|
305
326
|
if (this.hiddenLoaded)
|
|
306
|
-
this.className =
|
|
327
|
+
this.className = "";
|
|
307
328
|
this.ref && this.ref.markForCheck();
|
|
308
329
|
};
|
|
309
330
|
/**
|
|
@@ -335,7 +356,7 @@
|
|
|
335
356
|
this.pageSettings =
|
|
336
357
|
changes.dataSource.currentValue.length > 9
|
|
337
358
|
? {
|
|
338
|
-
pageSizes: [
|
|
359
|
+
pageSizes: ["All", "25", "50", "100"],
|
|
339
360
|
pageSize: 50,
|
|
340
361
|
}
|
|
341
362
|
: null;
|
|
@@ -367,16 +388,16 @@
|
|
|
367
388
|
var _this = this;
|
|
368
389
|
// 整个组件加载完成时的回调函数
|
|
369
390
|
/** @type {?} */
|
|
370
|
-
var pagerContainer = document.querySelector(
|
|
391
|
+
var pagerContainer = document.querySelector(".e-pagercontainer");
|
|
371
392
|
if (pagerContainer) {
|
|
372
393
|
/** @type {?} */
|
|
373
|
-
var linkElements = pagerContainer.querySelectorAll(
|
|
394
|
+
var linkElements = pagerContainer.querySelectorAll(".e-link");
|
|
374
395
|
linkElements.forEach((/**
|
|
375
396
|
* @param {?} element
|
|
376
397
|
* @return {?}
|
|
377
398
|
*/
|
|
378
399
|
function (element) {
|
|
379
|
-
element.removeAttribute(
|
|
400
|
+
element.removeAttribute("href"); // SMP2-10310 删除分页器的href属性
|
|
380
401
|
}));
|
|
381
402
|
}
|
|
382
403
|
if (this.selectedDiffKey) {
|
|
@@ -560,10 +581,10 @@
|
|
|
560
581
|
*/
|
|
561
582
|
function (args) {
|
|
562
583
|
if (this.selectedDiffKey &&
|
|
563
|
-
(args.requestType ===
|
|
564
|
-
args.requestType ===
|
|
565
|
-
args.requestType ===
|
|
566
|
-
args.requestType ===
|
|
584
|
+
(args.requestType === "paging" ||
|
|
585
|
+
args.requestType === "searching" ||
|
|
586
|
+
args.requestType === "filtering" ||
|
|
587
|
+
args.requestType === "sorting")) {
|
|
567
588
|
this.startPaging = true;
|
|
568
589
|
}
|
|
569
590
|
this.actionBegin.emit(args);
|
|
@@ -679,10 +700,10 @@
|
|
|
679
700
|
function ($event) {
|
|
680
701
|
var _this = this;
|
|
681
702
|
if (this.selectedDiffKey &&
|
|
682
|
-
($event.requestType ===
|
|
683
|
-
$event.requestType ===
|
|
684
|
-
$event.requestType ===
|
|
685
|
-
$event.requestType ===
|
|
703
|
+
($event.requestType === "paging" ||
|
|
704
|
+
$event.requestType === "searching" ||
|
|
705
|
+
$event.requestType === "filtering" ||
|
|
706
|
+
$event.requestType === "sorting")) {
|
|
686
707
|
this.indexList = [];
|
|
687
708
|
setTimeout((/**
|
|
688
709
|
* @return {?}
|
|
@@ -807,7 +828,7 @@
|
|
|
807
828
|
*/
|
|
808
829
|
function ($event) {
|
|
809
830
|
if (this.disableSystemRow && $event.data && $event.data.IsSystem) {
|
|
810
|
-
$event.row.classList.add(
|
|
831
|
+
$event.row.classList.add("e-disabled");
|
|
811
832
|
}
|
|
812
833
|
this.rowDataBound.emit($event);
|
|
813
834
|
};
|
|
@@ -906,7 +927,7 @@
|
|
|
906
927
|
* @return {?}
|
|
907
928
|
*/
|
|
908
929
|
function () {
|
|
909
|
-
this.className =
|
|
930
|
+
this.className = "grid-loading";
|
|
910
931
|
this.ref && this.ref.markForCheck();
|
|
911
932
|
this.ref && this.ref.detectChanges();
|
|
912
933
|
};
|
|
@@ -917,14 +938,14 @@
|
|
|
917
938
|
* @return {?}
|
|
918
939
|
*/
|
|
919
940
|
function () {
|
|
920
|
-
this.className =
|
|
941
|
+
this.className = "";
|
|
921
942
|
this.ref && this.ref.markForCheck();
|
|
922
943
|
this.ref && this.ref.detectChanges();
|
|
923
944
|
};
|
|
924
945
|
CommonGridComponent.decorators = [
|
|
925
946
|
{ type: core.Component, args: [{
|
|
926
|
-
selector:
|
|
927
|
-
template: "<ejs-grid\r\n\t#grid\r\n\t[id]=\"gridId\"\r\n\t[ngClass]=\"{\r\n\t\t'hide-Check-box': !alwaysShowCheckbox,\r\n\t\t'grid-loading': className === 'grid-loading'\r\n\t}\"\r\n\t[dataSource]=\"dataSource\"\r\n\t[allowPaging]=\"allowPaging && pageSettings\"\r\n\t[allowResizing]=\"true\"\r\n\t[pageSettings]=\"pageSettings\"\r\n\t[showColumnMenu]=\"true\"\r\n\t[allowSorting]=\"true\"\r\n\t[allowFiltering]=\"true\"\r\n\t[allowExcelExport]=\"true\"\r\n\t[filterSettings]=\"filterSettings\"\r\n\t[resizeSettings]=\"resizeSettings\"\r\n\t[allowSelection]=\"true\"\r\n\t[editSettings]=\"editSettings\"\r\n\t[childGrid]=\"childGrid\"\r\n\t[contextMenuItems]=\"\r\n\t\tdataSource && dataSource.length ? contextMenuItems : null\r\n\t\"\r\n\t[selectionSettings]=\"selectionSettings\"\r\n\t(recordClick)=\"_recordClick($event)\"\r\n\t(recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n\t(actionBegin)=\"_actionBegin($event)\"\r\n\t(actionComplete)=\"_actionHandler($event)\"\r\n\t(rowSelected)=\"_rowSelected($event)\"\r\n\t(rowDeselected)=\"_rowDeselected($event)\"\r\n\tstyle=\"border: none\"\r\n\t(contextMenuClick)=\"_onContextMenu($event)\"\r\n\t(contextMenuOpen)=\"contextMenuOpen($event)\"\r\n\t(queryCellInfo)=\"customiseCell($event)\"\r\n\t(dataBound)=\"_dataBound($event)\"\r\n\t(rowDataBound)=\"_rowDataBound($event)\"\r\n\t(rowSelecting)=\"_rowSelecting($event)\"\r\n\t(excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n\t(load)=\"_load()\"\r\n\t[frozenColumns]=\"frozenColumns\"\r\n>\r\n\t<e-columns>\r\n\t\t<e-column\r\n\t\t\t*ngIf=\"showCheckBox\"\r\n\t\t\ttype=\"checkbox\"\r\n\t\t\t[width]=\"checkBoxWidth\"\r\n\t\t\t[showColumnMenu]=\"false\"\r\n\t\t></e-column>\r\n\t\t<e-column\r\n\t\t\t*ngFor=\"let item of fields; trackBy: trackByFn\"\r\n\t\t\t[field]=\"item.columnName\"\r\n\t\t\t[filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n\t\t\t[customAttributes]=\"\r\n\t\t\t\titem.colName === 'entityUserList' ||\r\n\t\t\t\titem.colName === 'kycProgress'\r\n\t\t\t\t\t? { class: 'hideColumnFilterClass' }\r\n\t\t\t\t\t: {}\r\n\t\t\t\"\r\n\t\t\t[headerText]=\"item.columnDisplayName\"\r\n\t\t\t[textAlign]=\"item.textAlign\"\r\n\t\t\t[showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n\t\t\t[allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n\t\t\t[allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n\t\t\t[editType]=\"item.editType\"\r\n\t\t\t[validationRules]=\"item.validationRules\"\r\n\t\t\t[type]=\"item.dataType\"\r\n\t\t\t[width]=\"item.width\"\r\n\t\t\t[minWidth]=\"item.minWidth\"\r\n\t\t\t[format]=\"item.format\"\r\n\t\t\t[visible]=\"item.visible\"\r\n\t\t\t[template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n\t\t\t[clipMode]=\"\r\n\t\t\t\titem.clipMode\r\n\t\t\t\t\t? item.clipMode\r\n\t\t\t\t\t: clipMode || 'EllipsisWithTooltip'\r\n\t\t\t\"\r\n\t\t\t[sortComparer]=\"item.dateComparer\"\r\n\t\t>\r\n\t\t</e-column>\r\n\t</e-columns>\r\n</ejs-grid>\r\n",
|
|
947
|
+
selector: "rs-common-grid",
|
|
948
|
+
template: "<ejs-grid\r\n\t#grid\r\n\t[id]=\"gridId\"\r\n\t[ngClass]=\"{\r\n\t\t'hide-Check-box': !alwaysShowCheckbox,\r\n\t\t'grid-loading': className === 'grid-loading'\r\n\t}\"\r\n\t[dataSource]=\"dataSource\"\r\n\t[allowPaging]=\"allowPaging && pageSettings\"\r\n\t[allowResizing]=\"true\"\r\n\t[pageSettings]=\"pageSettings\"\r\n\t[showColumnMenu]=\"true\"\r\n\t[allowSorting]=\"true\"\r\n\t[allowFiltering]=\"true\"\r\n\t[allowExcelExport]=\"true\"\r\n\t[filterSettings]=\"filterSettings\"\r\n\t[resizeSettings]=\"resizeSettings\"\r\n\t[allowSelection]=\"true\"\r\n\t[editSettings]=\"editSettings\"\r\n\t[childGrid]=\"childGrid\"\r\n\t[contextMenuItems]=\"\r\n\t\tdataSource && dataSource.length ? contextMenuItems : null\r\n\t\"\r\n\t[selectionSettings]=\"selectionSettings\"\r\n\t(recordClick)=\"_recordClick($event)\"\r\n\t(recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n\t(actionBegin)=\"_actionBegin($event)\"\r\n\t(actionComplete)=\"_actionHandler($event)\"\r\n\t(rowSelected)=\"_rowSelected($event)\"\r\n\t(rowDeselected)=\"_rowDeselected($event)\"\r\n\tstyle=\"border: none\"\r\n\t(contextMenuClick)=\"_onContextMenu($event)\"\r\n\t(contextMenuOpen)=\"contextMenuOpen($event)\"\r\n\t(queryCellInfo)=\"customiseCell($event)\"\r\n\t(dataBound)=\"_dataBound($event)\"\r\n\t(rowDataBound)=\"_rowDataBound($event)\"\r\n\t(rowSelecting)=\"_rowSelecting($event)\"\r\n\t(excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n\t(load)=\"_load()\"\r\n\t[frozenColumns]=\"frozenColumns\"\r\n\t[columnChooserSettings]=\"columnChooserSettings\"\r\n\r\n>\r\n\t<e-columns>\r\n\t\t<e-column\r\n\t\t\t*ngIf=\"showCheckBox\"\r\n\t\t\ttype=\"checkbox\"\r\n\t\t\t[width]=\"checkBoxWidth\"\r\n\t\t\t[showColumnMenu]=\"false\"\r\n\t\t></e-column>\r\n\t\t<e-column\r\n\t\t\t*ngFor=\"let item of fields; trackBy: trackByFn\"\r\n\t\t\t[field]=\"item.columnName\"\r\n\t\t\t[filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n\t\t\t[customAttributes]=\"\r\n\t\t\t\titem.colName === 'entityUserList' ||\r\n\t\t\t\titem.colName === 'kycProgress'\r\n\t\t\t\t\t? { class: 'hideColumnFilterClass' }\r\n\t\t\t\t\t: {}\r\n\t\t\t\"\r\n\t\t\t[headerText]=\"item.columnDisplayName\"\r\n\t\t\t[textAlign]=\"item.textAlign\"\r\n\t\t\t[showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n\t\t\t[allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n\t\t\t[allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n\t\t\t[editType]=\"item.editType\"\r\n\t\t\t[validationRules]=\"item.validationRules\"\r\n\t\t\t[type]=\"item.dataType\"\r\n\t\t\t[width]=\"item.width\"\r\n\t\t\t[minWidth]=\"item.minWidth\"\r\n\t\t\t[format]=\"item.format\"\r\n\t\t\t[visible]=\"item.visible\"\r\n\t\t\t[template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n\t\t\t[clipMode]=\"\r\n\t\t\t\titem.clipMode\r\n\t\t\t\t\t? item.clipMode\r\n\t\t\t\t\t: clipMode || 'EllipsisWithTooltip'\r\n\t\t\t\"\r\n\t\t\t[sortComparer]=\"item.dateComparer\"\r\n\t\t>\r\n\t\t</e-column>\r\n\t</e-columns>\r\n</ejs-grid>\r\n",
|
|
928
949
|
styles: [""]
|
|
929
950
|
}] }
|
|
930
951
|
];
|
|
@@ -933,7 +954,7 @@
|
|
|
933
954
|
{ type: core.ChangeDetectorRef }
|
|
934
955
|
]; };
|
|
935
956
|
CommonGridComponent.propDecorators = {
|
|
936
|
-
grid: [{ type: core.ViewChild, args: [
|
|
957
|
+
grid: [{ type: core.ViewChild, args: ["grid", { static: false },] }],
|
|
937
958
|
showCheckBox: [{ type: core.Input }],
|
|
938
959
|
loaded: [{ type: core.Input }],
|
|
939
960
|
hiddenLoaded: [{ type: core.Input }],
|
|
@@ -954,6 +975,7 @@
|
|
|
954
975
|
checkBoxWidth: [{ type: core.Input }],
|
|
955
976
|
childGrid: [{ type: core.Input }],
|
|
956
977
|
frozenColumns: [{ type: core.Input }],
|
|
978
|
+
columnChooserSettings: [{ type: core.Input }],
|
|
957
979
|
contextMenuItems: [{ type: core.Input }],
|
|
958
980
|
selectionSettings: [{ type: core.Input }],
|
|
959
981
|
alwaysShowCheckbox: [{ type: core.Input }],
|
|
@@ -1018,6 +1040,8 @@
|
|
|
1018
1040
|
CommonGridComponent.prototype.childGrid;
|
|
1019
1041
|
/** @type {?} */
|
|
1020
1042
|
CommonGridComponent.prototype.frozenColumns;
|
|
1043
|
+
/** @type {?} */
|
|
1044
|
+
CommonGridComponent.prototype.columnChooserSettings;
|
|
1021
1045
|
/**
|
|
1022
1046
|
* Sample: [
|
|
1023
1047
|
* {
|
|
@@ -1081,6 +1105,8 @@
|
|
|
1081
1105
|
CommonGridComponent.prototype.className;
|
|
1082
1106
|
/** @type {?} */
|
|
1083
1107
|
CommonGridComponent.prototype.translation;
|
|
1108
|
+
/** @type {?} */
|
|
1109
|
+
CommonGridComponent.prototype.initList;
|
|
1084
1110
|
/**
|
|
1085
1111
|
* @type {?}
|
|
1086
1112
|
* @private
|