raise-common-lib 0.0.154 → 0.0.156

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.
@@ -990,7 +990,7 @@
990
990
  CommonGridComponent.decorators = [
991
991
  { type: core.Component, args: [{
992
992
  selector: "rs-common-grid",
993
- template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
993
+ template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [minWidth]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
994
994
  styles: [""]
995
995
  }] }
996
996
  ];
@@ -3378,14 +3378,11 @@
3378
3378
  this.timer = null;
3379
3379
  this.keepAlive = (/** @type {?} */ (this.routeReuseStrategy));
3380
3380
  }
3381
- // 初始化屏幕宽度
3382
3381
  /**
3383
3382
  * @param {?} event
3384
3383
  * @return {?}
3385
3384
  */
3386
- MultiTabComponent.prototype.onResize =
3387
- // 初始化屏幕宽度
3388
- /**
3385
+ MultiTabComponent.prototype.onResize = /**
3389
3386
  * @param {?} event
3390
3387
  * @return {?}
3391
3388
  */
@@ -3401,6 +3398,7 @@
3401
3398
  */
3402
3399
  function () {
3403
3400
  var _this = this;
3401
+ this.translation = JSON.parse(localStorage.getItem("translation"));
3404
3402
  this.initTab();
3405
3403
  // 解决刷新页面后,选中的 tab 丢失问题
3406
3404
  /** @type {?} */
@@ -3496,14 +3494,12 @@
3496
3494
  function (sub) { return sub.unsubscribe(); }));
3497
3495
  };
3498
3496
  /**
3499
- * @param {?=} title
3500
3497
  * @return {?}
3501
3498
  */
3502
3499
  MultiTabComponent.prototype.setEllipsisTitle = /**
3503
- * @param {?=} title
3504
3500
  * @return {?}
3505
3501
  */
3506
- function (title) {
3502
+ function () {
3507
3503
  var _this = this;
3508
3504
  this.textGap = this.GAP_NORMAL;
3509
3505
  if (this.screenWidth <= 1100) {
@@ -3512,23 +3508,16 @@
3512
3508
  var _a = this.calcTabWidth(), allWidth = _a.allWidth, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth;
3513
3509
  /** @type {?} */
3514
3510
  var width = Math.floor((allWidth - rightWidth) / (this.tabList && this.tabList.length));
3515
- if (title) {
3516
- return this.cf.setMiddleEllipsis(title, width > this.TAB_WIDTH
3517
- ? this.TAB_WIDTH - this.textGap
3518
- : width - this.textGap, 12);
3519
- }
3520
- else {
3521
- this.tabList.forEach((/**
3522
- * @param {?} ele
3523
- * @param {?} idx
3524
- * @return {?}
3525
- */
3526
- function (ele, idx) {
3527
- ele.displayTitle = _this.cf.setMiddleEllipsis(ele.title, width > _this.TAB_WIDTH
3528
- ? _this.TAB_WIDTH - _this.textGap
3529
- : width - _this.textGap, 12);
3530
- }));
3531
- }
3511
+ this.tabList.forEach((/**
3512
+ * @param {?} ele
3513
+ * @param {?} idx
3514
+ * @return {?}
3515
+ */
3516
+ function (ele, idx) {
3517
+ ele.displayTitle = _this.cf.setMiddleEllipsis(_this.translation[ele.title] || ele.title, width > _this.TAB_WIDTH
3518
+ ? _this.TAB_WIDTH - _this.textGap
3519
+ : width - _this.textGap, 12);
3520
+ }));
3532
3521
  this.ref.markForCheck();
3533
3522
  this.ref.detectChanges();
3534
3523
  };
@@ -3583,38 +3572,28 @@
3583
3572
  this.tabList = TabCache || [];
3584
3573
  if (this.tabList.length === 0) {
3585
3574
  /** @type {?} */
3586
- var title = sessionStorage.getItem("firstTabTitle");
3587
- if (title) {
3588
- sessionStorage.removeItem("firstTabTitle");
3589
- /** @type {?} */
3590
- var url = this.router.url;
3591
- this.addTab(url, title);
3592
- }
3593
- else {
3594
- /** @type {?} */
3595
- var pureUrl_1 = this.urlWithoutQuery(this.router.url);
3596
- /** @type {?} */
3597
- var target = this.flattenMenu.find((/**
3598
- * @param {?} ele
3599
- * @return {?}
3600
- */
3601
- function (ele) { return ele.url === pureUrl_1; }));
3602
- if (target) {
3603
- if (target.url !== this.defaultTabUrl) {
3604
- /** @type {?} */
3605
- var defaultTab = this.flattenMenu.find((/**
3606
- * @param {?} ele
3607
- * @return {?}
3608
- */
3609
- function (ele) { return ele.url === _this.defaultTabUrl; }));
3610
- this.tabList.push({
3611
- url: defaultTab.url,
3612
- title: defaultTab.label,
3613
- displayTitle: defaultTab.label,
3614
- });
3615
- }
3616
- this.addTab(target.url, target.label);
3575
+ var pureUrl_1 = this.urlWithoutQuery(this.router.url);
3576
+ /** @type {?} */
3577
+ var target = this.flattenMenu.find((/**
3578
+ * @param {?} ele
3579
+ * @return {?}
3580
+ */
3581
+ function (ele) { return ele.url === pureUrl_1; }));
3582
+ if (target) {
3583
+ if (target.url !== this.defaultTabUrl) {
3584
+ /** @type {?} */
3585
+ var defaultTab = this.flattenMenu.find((/**
3586
+ * @param {?} ele
3587
+ * @return {?}
3588
+ */
3589
+ function (ele) { return ele.url === _this.defaultTabUrl; }));
3590
+ this.tabList.push({
3591
+ url: defaultTab.url,
3592
+ title: this.translation[defaultTab.menuCode] || defaultTab.label,
3593
+ displayTitle: this.translation[defaultTab.menuCode] || defaultTab.label,
3594
+ });
3617
3595
  }
3596
+ this.addTab(target.url, this.translation[target.menuCode] || target.label);
3618
3597
  }
3619
3598
  }
3620
3599
  };
@@ -3863,7 +3842,7 @@
3863
3842
  MultiTabComponent.decorators = [
3864
3843
  { type: core.Component, args: [{
3865
3844
  selector: "rs-multi-tab",
3866
- template: "<div class=\"rs-multi-tab\" [ngClass]=\"{ 'b-line': tabList.length > 0 }\">\r\n <ul\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"onTabDrop($event)\"\r\n >\r\n <li\r\n class=\"tab-item\"\r\n *ngFor=\"let tab of tabList; let i = index\"\r\n [ngClass]=\"selectedTab === i ? 'isSelect' : 'notSelect'\"\r\n [cdkDragDisabled]=\"i === 0\"\r\n cdkDrag\r\n (click)=\"changeTab(tab, i)\"\r\n >\r\n <ng-template cdkDragPlaceholder let-item>\r\n <div class=\"placeholder\">\r\n\t\t</div>\r\n </ng-template>\r\n\t \r\n <ejs-tooltip\r\n id=\"notSelectTooltip\"\r\n [showTipPointer]=\"false\"\r\n [openDelay]=\"500\"\r\n *ngIf=\"tab.displayTitle !== tab.title; else originText\"\r\n style=\"height: 27px\"\r\n >\r\n <ng-template #content>\r\n <div class=\"tooltip-content\">\r\n {{ tab.title }}\r\n </div>\r\n </ng-template>\r\n <span class=\"tabTitle\">{{ tab.displayTitle }}</span>\r\n </ejs-tooltip>\r\n <ng-template #originText>\r\n <span class=\"tabTitle\">\r\n {{ tab.displayTitle }}\r\n </span>\r\n </ng-template>\r\n <span class=\"img-block\" *ngIf=\"selectedTab !== i && i !== 0\"></span>\r\n <img\r\n *ngIf=\"i !== 0\"\r\n src=\"../../../assets/img/close-url.svg\"\r\n (click)=\"closeTab(i)\"\r\n />\r\n </li>\r\n </ul>\r\n <div class=\"refresh-tab\" (click)=\"refreshTab()\" *ngIf=\"tabList.length > 0\">\r\n <ejs-tooltip\r\n id=\"notSelectTooltip\"\r\n cssClass=\"notSelectTooltip\"\r\n [showTipPointer]=\"false\"\r\n [openDelay]=\"500\"\r\n style=\"height: 27px\"\r\n >\r\n <ng-template #content>\r\n <div class=\"tooltip-content\">Refresh Current Tab</div>\r\n </ng-template>\r\n <img\r\n id=\"loadingIcon\"\r\n alt\r\n class=\"refresh-btn\"\r\n src=\"../../../assets/img/desktop-refresh-btn.svg\"\r\n />\r\n </ejs-tooltip>\r\n </div>\r\n</div>\r\n",
3845
+ template: "<div class=\"rs-multi-tab\" [ngClass]=\"{ 'b-line': tabList.length > 0 }\">\r\n <ul\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"onTabDrop($event)\"\r\n >\r\n <li\r\n class=\"tab-item\"\r\n *ngFor=\"let tab of tabList; let i = index\"\r\n [ngClass]=\"selectedTab === i ? 'isSelect' : 'notSelect'\"\r\n [cdkDragDisabled]=\"i === 0\"\r\n cdkDrag\r\n (click)=\"changeTab(tab, i)\"\r\n >\r\n <ng-template cdkDragPlaceholder let-item>\r\n <div class=\"placeholder\"></div>\r\n </ng-template>\r\n <ejs-tooltip\r\n id=\"notSelectTooltip\"\r\n [showTipPointer]=\"false\"\r\n [openDelay]=\"500\"\r\n *ngIf=\"tab.displayTitle !== (translation[tab.title] || tab.title) ; else originText\"\r\n style=\"height: 27px\"\r\n >\r\n <ng-template #content>\r\n <div class=\"tooltip-content\">\r\n {{ translation[tab.title] || tab.title }}\r\n </div>\r\n </ng-template>\r\n <span class=\"tabTitle\">{{ tab.displayTitle }}</span>\r\n </ejs-tooltip>\r\n <ng-template #originText>\r\n <span class=\"tabTitle\">\r\n {{ tab.displayTitle }}\r\n </span>\r\n </ng-template>\r\n <span class=\"img-block\" *ngIf=\"selectedTab !== i && i !== 0\"></span>\r\n <img\r\n *ngIf=\"i !== 0\"\r\n src=\"../../../assets/img/close-url.svg\"\r\n (click)=\"closeTab(i)\"\r\n />\r\n </li>\r\n </ul>\r\n <div class=\"refresh-tab\" (click)=\"refreshTab()\" *ngIf=\"tabList.length > 0\">\r\n <ejs-tooltip\r\n id=\"notSelectTooltip\"\r\n cssClass=\"notSelectTooltip\"\r\n [showTipPointer]=\"false\"\r\n [openDelay]=\"500\"\r\n style=\"height: 27px\"\r\n >\r\n <ng-template #content>\r\n <div class=\"tooltip-content\">\r\n {{ translation.REFRESH_CURRENT_TAB || \".REFRESH_CURRENT_TAB\" }}\r\n </div>\r\n </ng-template>\r\n <img\r\n id=\"loadingIcon\"\r\n alt\r\n class=\"refresh-btn\"\r\n src=\"../../../assets/img/desktop-refresh-btn.svg\"\r\n />\r\n </ejs-tooltip>\r\n </div>\r\n</div>\r\n",
3867
3846
  styles: ["@charset \"UTF-8\";.rs-multi-tab{width:100%;display:flex;justify-content:space-between;margin:0 auto;max-width:1886px}.rs-multi-tab.b-line{border-bottom:1px solid #e5eaef}.rs-multi-tab ul{display:flex;margin:0 8px;padding:0;overflow:hidden;height:100%}.rs-multi-tab ul .tab-item{max-width:164px;padding:0 12px;display:flex;align-items:center;flex:auto;border:1px solid #e5eaef;border-bottom:none;color:#5f6f81;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:28px;height:28px;background:#f8fafb;vertical-align:top;position:relative;cursor:default}.rs-multi-tab ul .tab-item .tabTitle{display:inline-block;white-space:nowrap;font-size:11px;font-family:Arial;font-style:normal;font-weight:400;line-height:16px;transition:width .3s}.rs-multi-tab ul .tab-item img{border-radius:4px;padding:4px;margin-left:6px;margin-top:1px;vertical-align:top;cursor:pointer}.rs-multi-tab ul .tab-item img:hover{background:#dce8f6}.rs-multi-tab ul .tab-item:not(:last-child){border-right:none}.rs-multi-tab ul .tab-item:first-of-type{border-top-left-radius:8px}.rs-multi-tab ul .tab-item:last-child{border-top-right-radius:8px}.rs-multi-tab ul.cdk-drop-list-dragging .tab-item.cdk-drag-disabled:hover{background:#f8fafb!important;cursor:no-drop}.rs-multi-tab ul .isSelect{color:#1f3f5c;background:#fff}.rs-multi-tab ul .notSelect img{display:none}.rs-multi-tab ul .notSelect .img-block{display:inline-block;width:22px}.rs-multi-tab ul .notSelect:hover{color:#1f3f5c;background-color:rgba(31,123,255,.04)}.rs-multi-tab ul .notSelect:hover .img-block{display:none}.rs-multi-tab ul .notSelect:hover img{display:inline-block}.rs-multi-tab .refresh-tab{cursor:pointer;text-align:right;color:#6c7c90;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:28px;padding-right:12px}.rs-multi-tab .refresh-tab img{vertical-align:middle;margin-right:4px}.refresh-tab-loading{-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}.notSelectTooltip{transform:translateX(-12px)}.tab-item.cdk-drag{max-width:164px;padding:0 12px;display:flex;align-items:center;flex:auto;border:1px solid #e5eaef;border-bottom:none;color:#5f6f81;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:28px;height:28px;background:#f8fafb;vertical-align:top;position:relative;cursor:default}.tab-item.cdk-drag .tabTitle{display:inline-block;white-space:nowrap;font-size:11px;font-family:Arial;font-style:normal;font-weight:400;line-height:16px;transition:width .3s}.tab-item.cdk-drag img{border-radius:4px;padding:4px;margin-left:6px;margin-top:1px;vertical-align:top;cursor:pointer}.tab-item.cdk-drag img:hover{background:#dce8f6}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.tooltip-content{padding:4px;color:#f8fafb;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:14px}@media (max-width:1400px){.refresh-tab{padding-right:0!important}.refresh-tab span{display:none!important}}@media (max-width:1100px){.rs-multi-tab ul .tab-item img{position:absolute;right:3px;background-color:#fff}.notSelect:hover img{position:absolute;right:3px;background-color:#eff5fb}.img-block{display:none!important}.isSelect:not(:first-child){padding-right:20px!important}}@media (max-width:600px){.rs-multi-tab ul .tab-item{padding:0 8px}.rs-multi-tab ul .notSelect .img-block{width:0!important}}"]
3868
3847
  }] }
3869
3848
  ];
@@ -3925,6 +3904,8 @@
3925
3904
  /** @type {?} */
3926
3905
  MultiTabComponent.prototype.screenWidth;
3927
3906
  /** @type {?} */
3907
+ MultiTabComponent.prototype.translation;
3908
+ /** @type {?} */
3928
3909
  MultiTabComponent.prototype.timer;
3929
3910
  /** @type {?} */
3930
3911
  MultiTabComponent.prototype.router;