raise-common-lib 0.0.155 → 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.
- package/bundles/raise-common-lib.umd.js +33 -52
- 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/layout/multi-tab/index.component.js +32 -50
- package/esm5/lib/layout/multi-tab/index.component.js +34 -53
- package/fesm2015/raise-common-lib.js +31 -49
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +33 -52
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/multi-tab/index.component.d.ts +1 -1
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -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 (
|
|
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
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
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
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
}
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
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: this.translation[defaultTab.menuCode] || defaultTab.label,
|
|
3593
|
+
displayTitle: this.translation[defaultTab.menuCode] || defaultTab.label,
|
|
3594
|
+
});
|
|
3615
3595
|
}
|
|
3596
|
+
this.addTab(target.url, this.translation[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\">{{ 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
|
];
|