raise-common-lib 0.0.155 → 0.0.157

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.
@@ -3494,14 +3494,12 @@
3494
3494
  function (sub) { return sub.unsubscribe(); }));
3495
3495
  };
3496
3496
  /**
3497
- * @param {?=} title
3498
3497
  * @return {?}
3499
3498
  */
3500
3499
  MultiTabComponent.prototype.setEllipsisTitle = /**
3501
- * @param {?=} title
3502
3500
  * @return {?}
3503
3501
  */
3504
- function (title) {
3502
+ function () {
3505
3503
  var _this = this;
3506
3504
  this.textGap = this.GAP_NORMAL;
3507
3505
  if (this.screenWidth <= 1100) {
@@ -3510,23 +3508,16 @@
3510
3508
  var _a = this.calcTabWidth(), allWidth = _a.allWidth, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth;
3511
3509
  /** @type {?} */
3512
3510
  var width = Math.floor((allWidth - rightWidth) / (this.tabList && this.tabList.length));
3513
- if (title) {
3514
- return this.cf.setMiddleEllipsis(title, width > this.TAB_WIDTH
3515
- ? this.TAB_WIDTH - this.textGap
3516
- : width - this.textGap, 12);
3517
- }
3518
- else {
3519
- this.tabList.forEach((/**
3520
- * @param {?} ele
3521
- * @param {?} idx
3522
- * @return {?}
3523
- */
3524
- function (ele, idx) {
3525
- ele.displayTitle = _this.cf.setMiddleEllipsis(ele.title, width > _this.TAB_WIDTH
3526
- ? _this.TAB_WIDTH - _this.textGap
3527
- : width - _this.textGap, 12);
3528
- }));
3529
- }
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
+ }));
3530
3521
  this.ref.markForCheck();
3531
3522
  this.ref.detectChanges();
3532
3523
  };
@@ -3581,38 +3572,28 @@
3581
3572
  this.tabList = TabCache || [];
3582
3573
  if (this.tabList.length === 0) {
3583
3574
  /** @type {?} */
3584
- var title = sessionStorage.getItem("firstTabTitle");
3585
- if (title) {
3586
- sessionStorage.removeItem("firstTabTitle");
3587
- /** @type {?} */
3588
- var url = this.router.url;
3589
- this.addTab(url, title);
3590
- }
3591
- else {
3592
- /** @type {?} */
3593
- var pureUrl_1 = this.urlWithoutQuery(this.router.url);
3594
- /** @type {?} */
3595
- var target = this.flattenMenu.find((/**
3596
- * @param {?} ele
3597
- * @return {?}
3598
- */
3599
- function (ele) { return ele.url === pureUrl_1; }));
3600
- if (target) {
3601
- if (target.url !== this.defaultTabUrl) {
3602
- /** @type {?} */
3603
- var defaultTab = this.flattenMenu.find((/**
3604
- * @param {?} ele
3605
- * @return {?}
3606
- */
3607
- function (ele) { return ele.url === _this.defaultTabUrl; }));
3608
- this.tabList.push({
3609
- url: defaultTab.url,
3610
- title: defaultTab.label,
3611
- displayTitle: defaultTab.label,
3612
- });
3613
- }
3614
- 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: defaultTab.menuCode || defaultTab.label,
3593
+ displayTitle: defaultTab.menuCode || defaultTab.label,
3594
+ });
3615
3595
  }
3596
+ this.addTab(target.url, target.menuCode || target.label);
3616
3597
  }
3617
3598
  }
3618
3599
  };
@@ -3861,7 +3842,7 @@
3861
3842
  MultiTabComponent.decorators = [
3862
3843
  { type: core.Component, args: [{
3863
3844
  selector: "rs-multi-tab",
3864
- 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 !== 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\">\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",
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\">{{ translation[tab.displayTitle] || 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",
3865
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}}"]
3866
3847
  }] }
3867
3848
  ];