raise-common-lib 0.0.72 → 0.0.73
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 +51 -27
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +2 -2
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/common-grid/index.component.js +52 -30
- package/esm5/lib/common-grid/index.component.js +55 -30
- package/fesm2015/raise-common-lib.js +49 -28
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +52 -28
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/common-grid/index.component.d.ts +5 -4
- package/package.json +1 -1
|
@@ -237,16 +237,16 @@
|
|
|
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
251
|
// col 数量过少的时候,check宽度会拉伸,这时候设置null
|
|
252
252
|
/**
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
this.contextMenuItems = [];
|
|
270
270
|
// @Input() selectionSettings = { checkboxOnly: true, type: "Multiple" };
|
|
271
271
|
this.selectionSettings = {
|
|
272
|
-
type:
|
|
272
|
+
type: "Multiple",
|
|
273
273
|
// persistSelection: true,
|
|
274
274
|
checkboxOnly: true,
|
|
275
275
|
};
|
|
@@ -292,8 +292,30 @@
|
|
|
292
292
|
this.selectId = [];
|
|
293
293
|
this.startPaging = false;
|
|
294
294
|
this.indexList = [];
|
|
295
|
-
this.className =
|
|
296
|
-
this.
|
|
295
|
+
this.className = "grid-loading";
|
|
296
|
+
this.initList = (/**
|
|
297
|
+
* @param {?=} num
|
|
298
|
+
* @param {?=} key
|
|
299
|
+
* @return {?}
|
|
300
|
+
*/
|
|
301
|
+
function (num, key) {
|
|
302
|
+
if (num === void 0) { num = 25; }
|
|
303
|
+
if (key === void 0) { key = "Id"; }
|
|
304
|
+
/** @type {?} */
|
|
305
|
+
var list = [];
|
|
306
|
+
lodash.times(num, (/**
|
|
307
|
+
* @param {?} i
|
|
308
|
+
* @return {?}
|
|
309
|
+
*/
|
|
310
|
+
function (i) {
|
|
311
|
+
var _a;
|
|
312
|
+
list.push((_a = {},
|
|
313
|
+
_a[key] = i,
|
|
314
|
+
_a));
|
|
315
|
+
}));
|
|
316
|
+
return list;
|
|
317
|
+
});
|
|
318
|
+
this.translation = JSON.parse(localStorage.getItem("translation"));
|
|
297
319
|
}
|
|
298
320
|
/**
|
|
299
321
|
* @return {?}
|
|
@@ -303,7 +325,7 @@
|
|
|
303
325
|
*/
|
|
304
326
|
function () {
|
|
305
327
|
if (this.hiddenLoaded)
|
|
306
|
-
this.className =
|
|
328
|
+
this.className = "";
|
|
307
329
|
this.ref && this.ref.markForCheck();
|
|
308
330
|
};
|
|
309
331
|
/**
|
|
@@ -335,7 +357,7 @@
|
|
|
335
357
|
this.pageSettings =
|
|
336
358
|
changes.dataSource.currentValue.length > 9
|
|
337
359
|
? {
|
|
338
|
-
pageSizes: [
|
|
360
|
+
pageSizes: ["All", "25", "50", "100"],
|
|
339
361
|
pageSize: 50,
|
|
340
362
|
}
|
|
341
363
|
: null;
|
|
@@ -367,16 +389,16 @@
|
|
|
367
389
|
var _this = this;
|
|
368
390
|
// 整个组件加载完成时的回调函数
|
|
369
391
|
/** @type {?} */
|
|
370
|
-
var pagerContainer = document.querySelector(
|
|
392
|
+
var pagerContainer = document.querySelector(".e-pagercontainer");
|
|
371
393
|
if (pagerContainer) {
|
|
372
394
|
/** @type {?} */
|
|
373
|
-
var linkElements = pagerContainer.querySelectorAll(
|
|
395
|
+
var linkElements = pagerContainer.querySelectorAll(".e-link");
|
|
374
396
|
linkElements.forEach((/**
|
|
375
397
|
* @param {?} element
|
|
376
398
|
* @return {?}
|
|
377
399
|
*/
|
|
378
400
|
function (element) {
|
|
379
|
-
element.removeAttribute(
|
|
401
|
+
element.removeAttribute("href"); // SMP2-10310 删除分页器的href属性
|
|
380
402
|
}));
|
|
381
403
|
}
|
|
382
404
|
if (this.selectedDiffKey) {
|
|
@@ -560,10 +582,10 @@
|
|
|
560
582
|
*/
|
|
561
583
|
function (args) {
|
|
562
584
|
if (this.selectedDiffKey &&
|
|
563
|
-
(args.requestType ===
|
|
564
|
-
args.requestType ===
|
|
565
|
-
args.requestType ===
|
|
566
|
-
args.requestType ===
|
|
585
|
+
(args.requestType === "paging" ||
|
|
586
|
+
args.requestType === "searching" ||
|
|
587
|
+
args.requestType === "filtering" ||
|
|
588
|
+
args.requestType === "sorting")) {
|
|
567
589
|
this.startPaging = true;
|
|
568
590
|
}
|
|
569
591
|
this.actionBegin.emit(args);
|
|
@@ -679,10 +701,10 @@
|
|
|
679
701
|
function ($event) {
|
|
680
702
|
var _this = this;
|
|
681
703
|
if (this.selectedDiffKey &&
|
|
682
|
-
($event.requestType ===
|
|
683
|
-
$event.requestType ===
|
|
684
|
-
$event.requestType ===
|
|
685
|
-
$event.requestType ===
|
|
704
|
+
($event.requestType === "paging" ||
|
|
705
|
+
$event.requestType === "searching" ||
|
|
706
|
+
$event.requestType === "filtering" ||
|
|
707
|
+
$event.requestType === "sorting")) {
|
|
686
708
|
this.indexList = [];
|
|
687
709
|
setTimeout((/**
|
|
688
710
|
* @return {?}
|
|
@@ -807,7 +829,7 @@
|
|
|
807
829
|
*/
|
|
808
830
|
function ($event) {
|
|
809
831
|
if (this.disableSystemRow && $event.data && $event.data.IsSystem) {
|
|
810
|
-
$event.row.classList.add(
|
|
832
|
+
$event.row.classList.add("e-disabled");
|
|
811
833
|
}
|
|
812
834
|
this.rowDataBound.emit($event);
|
|
813
835
|
};
|
|
@@ -906,7 +928,7 @@
|
|
|
906
928
|
* @return {?}
|
|
907
929
|
*/
|
|
908
930
|
function () {
|
|
909
|
-
this.className =
|
|
931
|
+
this.className = "grid-loading";
|
|
910
932
|
this.ref && this.ref.markForCheck();
|
|
911
933
|
this.ref && this.ref.detectChanges();
|
|
912
934
|
};
|
|
@@ -917,13 +939,13 @@
|
|
|
917
939
|
* @return {?}
|
|
918
940
|
*/
|
|
919
941
|
function () {
|
|
920
|
-
this.className =
|
|
942
|
+
this.className = "";
|
|
921
943
|
this.ref && this.ref.markForCheck();
|
|
922
944
|
this.ref && this.ref.detectChanges();
|
|
923
945
|
};
|
|
924
946
|
CommonGridComponent.decorators = [
|
|
925
947
|
{ type: core.Component, args: [{
|
|
926
|
-
selector:
|
|
948
|
+
selector: "rs-common-grid",
|
|
927
949
|
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",
|
|
928
950
|
styles: [""]
|
|
929
951
|
}] }
|
|
@@ -933,7 +955,7 @@
|
|
|
933
955
|
{ type: core.ChangeDetectorRef }
|
|
934
956
|
]; };
|
|
935
957
|
CommonGridComponent.propDecorators = {
|
|
936
|
-
grid: [{ type: core.ViewChild, args: [
|
|
958
|
+
grid: [{ type: core.ViewChild, args: ["grid", { static: false },] }],
|
|
937
959
|
showCheckBox: [{ type: core.Input }],
|
|
938
960
|
loaded: [{ type: core.Input }],
|
|
939
961
|
hiddenLoaded: [{ type: core.Input }],
|
|
@@ -1081,6 +1103,8 @@
|
|
|
1081
1103
|
CommonGridComponent.prototype.className;
|
|
1082
1104
|
/** @type {?} */
|
|
1083
1105
|
CommonGridComponent.prototype.translation;
|
|
1106
|
+
/** @type {?} */
|
|
1107
|
+
CommonGridComponent.prototype.initList;
|
|
1084
1108
|
/**
|
|
1085
1109
|
* @type {?}
|
|
1086
1110
|
* @private
|