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.
- 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
|
@@ -3302,14 +3302,12 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
3302
3302
|
function (sub) { return sub.unsubscribe(); }));
|
|
3303
3303
|
};
|
|
3304
3304
|
/**
|
|
3305
|
-
* @param {?=} title
|
|
3306
3305
|
* @return {?}
|
|
3307
3306
|
*/
|
|
3308
3307
|
MultiTabComponent.prototype.setEllipsisTitle = /**
|
|
3309
|
-
* @param {?=} title
|
|
3310
3308
|
* @return {?}
|
|
3311
3309
|
*/
|
|
3312
|
-
function (
|
|
3310
|
+
function () {
|
|
3313
3311
|
var _this = this;
|
|
3314
3312
|
this.textGap = this.GAP_NORMAL;
|
|
3315
3313
|
if (this.screenWidth <= 1100) {
|
|
@@ -3318,23 +3316,16 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
3318
3316
|
var _a = this.calcTabWidth(), allWidth = _a.allWidth, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth;
|
|
3319
3317
|
/** @type {?} */
|
|
3320
3318
|
var width = Math.floor((allWidth - rightWidth) / (this.tabList && this.tabList.length));
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
*/
|
|
3332
|
-
function (ele, idx) {
|
|
3333
|
-
ele.displayTitle = _this.cf.setMiddleEllipsis(ele.title, width > _this.TAB_WIDTH
|
|
3334
|
-
? _this.TAB_WIDTH - _this.textGap
|
|
3335
|
-
: width - _this.textGap, 12);
|
|
3336
|
-
}));
|
|
3337
|
-
}
|
|
3319
|
+
this.tabList.forEach((/**
|
|
3320
|
+
* @param {?} ele
|
|
3321
|
+
* @param {?} idx
|
|
3322
|
+
* @return {?}
|
|
3323
|
+
*/
|
|
3324
|
+
function (ele, idx) {
|
|
3325
|
+
ele.displayTitle = _this.cf.setMiddleEllipsis(_this.translation[ele.title] || ele.title, width > _this.TAB_WIDTH
|
|
3326
|
+
? _this.TAB_WIDTH - _this.textGap
|
|
3327
|
+
: width - _this.textGap, 12);
|
|
3328
|
+
}));
|
|
3338
3329
|
this.ref.markForCheck();
|
|
3339
3330
|
this.ref.detectChanges();
|
|
3340
3331
|
};
|
|
@@ -3389,38 +3380,28 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
3389
3380
|
this.tabList = TabCache || [];
|
|
3390
3381
|
if (this.tabList.length === 0) {
|
|
3391
3382
|
/** @type {?} */
|
|
3392
|
-
var
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
* @param {?} ele
|
|
3413
|
-
* @return {?}
|
|
3414
|
-
*/
|
|
3415
|
-
function (ele) { return ele.url === _this.defaultTabUrl; }));
|
|
3416
|
-
this.tabList.push({
|
|
3417
|
-
url: defaultTab.url,
|
|
3418
|
-
title: defaultTab.label,
|
|
3419
|
-
displayTitle: defaultTab.label,
|
|
3420
|
-
});
|
|
3421
|
-
}
|
|
3422
|
-
this.addTab(target.url, target.label);
|
|
3383
|
+
var pureUrl_1 = this.urlWithoutQuery(this.router.url);
|
|
3384
|
+
/** @type {?} */
|
|
3385
|
+
var target = this.flattenMenu.find((/**
|
|
3386
|
+
* @param {?} ele
|
|
3387
|
+
* @return {?}
|
|
3388
|
+
*/
|
|
3389
|
+
function (ele) { return ele.url === pureUrl_1; }));
|
|
3390
|
+
if (target) {
|
|
3391
|
+
if (target.url !== this.defaultTabUrl) {
|
|
3392
|
+
/** @type {?} */
|
|
3393
|
+
var defaultTab = this.flattenMenu.find((/**
|
|
3394
|
+
* @param {?} ele
|
|
3395
|
+
* @return {?}
|
|
3396
|
+
*/
|
|
3397
|
+
function (ele) { return ele.url === _this.defaultTabUrl; }));
|
|
3398
|
+
this.tabList.push({
|
|
3399
|
+
url: defaultTab.url,
|
|
3400
|
+
title: defaultTab.menuCode || defaultTab.label,
|
|
3401
|
+
displayTitle: defaultTab.menuCode || defaultTab.label,
|
|
3402
|
+
});
|
|
3423
3403
|
}
|
|
3404
|
+
this.addTab(target.url, target.menuCode || target.label);
|
|
3424
3405
|
}
|
|
3425
3406
|
}
|
|
3426
3407
|
};
|
|
@@ -3669,7 +3650,7 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
3669
3650
|
MultiTabComponent.decorators = [
|
|
3670
3651
|
{ type: Component, args: [{
|
|
3671
3652
|
selector: "rs-multi-tab",
|
|
3672
|
-
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",
|
|
3653
|
+
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",
|
|
3673
3654
|
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}}"]
|
|
3674
3655
|
}] }
|
|
3675
3656
|
];
|