ps-toolkit-ui 1.11.80 → 1.11.83
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/ps-toolkit-ui.umd.js +21 -13
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/sidebar.class.js +2 -4
- package/esm2015/lib/components/layout/layout.component.js +2 -3
- package/esm2015/lib/components/sidebar/sidebar.component.js +19 -6
- package/fesm2015/ps-toolkit-ui.js +18 -9
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/sidebar.class.d.ts +1 -1
- package/lib/components/layout/layout.component.d.ts +0 -1
- package/lib/components/sidebar/sidebar.component.d.ts +0 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -2387,10 +2387,8 @@
|
|
|
2387
2387
|
};
|
|
2388
2388
|
|
|
2389
2389
|
var SidebarClass = /** @class */ (function () {
|
|
2390
|
-
function SidebarClass(l, id, name, controller, action, url, icon, children
|
|
2390
|
+
function SidebarClass(l, id, name, controller, action, url, icon, children) {
|
|
2391
2391
|
if (children === void 0) { children = []; }
|
|
2392
|
-
if (countAll === void 0) { countAll = 0; }
|
|
2393
|
-
if (count === void 0) { count = 0; }
|
|
2394
2392
|
this.count = 0;
|
|
2395
2393
|
this.countAll = 0;
|
|
2396
2394
|
this.active = false;
|
|
@@ -2401,8 +2399,6 @@
|
|
|
2401
2399
|
this.name = name;
|
|
2402
2400
|
this.id = id;
|
|
2403
2401
|
this.icon = icon;
|
|
2404
|
-
this.countAll = countAll;
|
|
2405
|
-
this.count = count;
|
|
2406
2402
|
this.children = children;
|
|
2407
2403
|
}
|
|
2408
2404
|
return SidebarClass;
|
|
@@ -2431,8 +2427,22 @@
|
|
|
2431
2427
|
this.currentSidebar = this.getSidebarActive(this.sidebar, active);
|
|
2432
2428
|
};
|
|
2433
2429
|
SidebarComponent.prototype.ngOnInit = function () {
|
|
2430
|
+
var _this = this;
|
|
2431
|
+
var _a;
|
|
2434
2432
|
this.sidebar = this.getSidebar();
|
|
2433
|
+
console.log(this.sidebar);
|
|
2435
2434
|
this.setActive();
|
|
2435
|
+
if (((_a = this.currentData.setting.sidebar) === null || _a === void 0 ? void 0 : _a.countUrl) != null) {
|
|
2436
|
+
new RequestClass(this.config.environment).send(this.currentData.setting.sidebar.countUrl, exports.Method.Post, null, null, function (result) {
|
|
2437
|
+
result.forEach(function (x) {
|
|
2438
|
+
var s = _this.sidebar.find(function (f) { return f.controller === x.Controller; });
|
|
2439
|
+
if (s != null) {
|
|
2440
|
+
s.count = x.Count;
|
|
2441
|
+
s.countAll = x.CountAll;
|
|
2442
|
+
}
|
|
2443
|
+
});
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2436
2446
|
};
|
|
2437
2447
|
SidebarComponent.prototype.getSidebar = function (parentId) {
|
|
2438
2448
|
var _this = this;
|
|
@@ -2442,11 +2452,11 @@
|
|
|
2442
2452
|
if (children.length === 0) {
|
|
2443
2453
|
_this.countItems++;
|
|
2444
2454
|
}
|
|
2445
|
-
return new SidebarClass(_this.l, s.Id, s.Name, s.Controller, s.Action, s.Url, s.Icon, children
|
|
2455
|
+
return new SidebarClass(_this.l, s.Id, s.Name, s.Controller, s.Action, s.Url, s.Icon, children);
|
|
2446
2456
|
});
|
|
2447
2457
|
};
|
|
2448
2458
|
SidebarComponent.prototype.getSidebarActive = function (item, active) {
|
|
2449
|
-
var e_1,
|
|
2459
|
+
var e_1, _b;
|
|
2450
2460
|
try {
|
|
2451
2461
|
for (var item_1 = __values(item), item_1_1 = item_1.next(); !item_1_1.done; item_1_1 = item_1.next()) {
|
|
2452
2462
|
var i = item_1_1.value;
|
|
@@ -2462,7 +2472,7 @@
|
|
|
2462
2472
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2463
2473
|
finally {
|
|
2464
2474
|
try {
|
|
2465
|
-
if (item_1_1 && !item_1_1.done && (
|
|
2475
|
+
if (item_1_1 && !item_1_1.done && (_b = item_1.return)) _b.call(item_1);
|
|
2466
2476
|
}
|
|
2467
2477
|
finally { if (e_1) throw e_1.error; }
|
|
2468
2478
|
}
|
|
@@ -2476,7 +2486,7 @@
|
|
|
2476
2486
|
SidebarComponent.decorators = [
|
|
2477
2487
|
{ type: core.Component, args: [{
|
|
2478
2488
|
selector: 'lib-sidebar',
|
|
2479
|
-
template: "<div id=\"Sidebar\" [class]=\"(countItems > 1 ? 'open' : 'one-item') + (mini ? ' mini' : '')\">\r\n <div class=\"sidebar-shadow\" (click)=\"toggleSidebar()\"></div>\r\n <div class=\"sidebar-scroll\">\r\n <i (click)=\"toggleSidebar()\" class=\"toggle fa-duotone fa-angle-double-left\"></i>\r\n <div class=\"brand-con\">\r\n <div class=\"logo\"></div>\r\n <div class=\"title\">\r\n {{l('SoftwareName')}}\r\n <div class=\"version\">{{l('Version', currentData.software.Version)}}</div>\r\n </div>\r\n </div>\r\n <div class=\"sidebar-con\" id=\"sidebar-con\">\r\n <span *ngFor=\"let item of sidebar\">\r\n <lib-sidebar-item [i]=\"0\" [item]=\"item\" [base]=\"true\" [currentSidebar]=\"currentSidebar\"></lib-sidebar-item>\r\n </span>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2489
|
+
template: "<div id=\"Sidebar\" [class]=\"(countItems > 1 ? 'open' : 'one-item') + (currentData.setting.sidebar?.mini ? ' mini' : '')\">\r\n <div class=\"sidebar-shadow\" (click)=\"toggleSidebar()\"></div>\r\n <div class=\"sidebar-scroll\">\r\n <i (click)=\"toggleSidebar()\" class=\"toggle fa-duotone fa-angle-double-left\"></i>\r\n <div class=\"brand-con\">\r\n <div class=\"logo\"></div>\r\n <div class=\"title\">\r\n {{l('SoftwareName')}}\r\n <div class=\"version\">{{l('Version', currentData.software.Version)}}</div>\r\n </div>\r\n </div>\r\n <div class=\"sidebar-con\" id=\"sidebar-con\">\r\n <span *ngFor=\"let item of sidebar\">\r\n <lib-sidebar-item [i]=\"0\" [item]=\"item\" [base]=\"true\" [currentSidebar]=\"currentSidebar\"></lib-sidebar-item>\r\n </span>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2480
2490
|
styles: ["::ng-deep #Sidebar{background-color:var(--base);height:calc(100vh - 35px);min-height:calc(100vh - 35px);position:relative;transition:width .3s;width:78px;z-index:102}::ng-deep #Sidebar,::ng-deep #Sidebar .sidebar-shadow{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;direction:ltr;float:right}::ng-deep #Sidebar .sidebar-shadow{background-color:var(--black);height:100vh;left:0;min-height:100vh;opacity:0;overflow:hidden;position:fixed;transition:all .3s;visibility:hidden;width:100%;z-index:103}::ng-deep #Sidebar .toggle{color:var(--primary);cursor:pointer;float:left;font-size:18px;height:50px;left:-50px;line-height:50px;position:absolute;text-align:center;transform:scaleX(1);transition:all .3s;width:50px}::ng-deep #Sidebar .toggle:hover{color:var(--primary-dark)}::ng-deep #Sidebar .sidebar-scroll{background-color:var(--base);height:100%;position:absolute;right:0;top:0;transition:all .3s;width:100%;z-index:104}::ng-deep #Sidebar .sidebar-scroll .brand-con{align-items:center;background-color:var(--base-dark);direction:rtl;display:flex;float:right;height:50px;justify-content:center;width:100%}::ng-deep #Sidebar .sidebar-scroll .brand-con .logo{background-position:50%;background-repeat:no-repeat;background-size:contain;float:right;height:30px;width:30px}::ng-deep #Sidebar .sidebar-scroll .brand-con .title{align-items:center;color:#fff;display:flex;font-size:15px;font-weight:700;height:100%;justify-content:center;overflow:hidden;position:relative;top:-4px;transition:all .3s;white-space:nowrap;width:0}::ng-deep #Sidebar .sidebar-scroll .brand-con .title .version{font-size:9px;font-weight:200;position:absolute;top:27px}::ng-deep #Sidebar .sidebar-scroll .sidebar-con{direction:ltr;float:right;height:calc(100vh - 85px);overflow-x:hidden;overflow-y:auto;width:100%}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item{float:left;position:relative;text-align:center;width:100%}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content{align-items:center;cursor:pointer;direction:rtl;display:flex;float:right;justify-content:right;position:relative;transition:all .3s;width:100%}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .dot{background-color:var(--base);border:2px solid hsla(0,0%,93.3%,.4);border-radius:50%;height:10px;position:absolute;right:-15px;top:15px;width:10px;z-index:2}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .dot.active{background-color:var(--base-white);border:2px solid var(--base-white)}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item.parent-active>.dot.parent{background-color:hsla(0,0%,93.3%,.4);border:none}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .dot.back{background-color:var(--base);border:none;z-index:1}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .children{display:none;float:left;position:relative;width:100%}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .children .items{float:left;width:100%}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .children .line{background-color:hsla(0,0%,93.3%,.4);height:calc(100% - 20px);left:calc(85% + 10px);position:absolute;top:0;width:1px}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{color:hsla(0,0%,100%,.8);float:right;font-size:12px;font-weight:400;height:45px;line-height:45px;overflow:hidden;transition:all .3s;width:0}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{height:0;width:0}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .count-all{background-color:var(--primary);border-radius:50%;color:#fff;font-size:12px;height:20px;left:10px;line-height:22px;min-width:20px;padding:0 5px;position:absolute;top:calc(50% - 10px)}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .count-all .count{background-color:var(--red);border-radius:50%;bottom:-5px;color:#fff;font-size:11px;height:17px;line-height:19px;min-width:17px;padding:0 3px;position:absolute;right:-15px}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .icon{color:hsla(0,0%,100%,.6666666666666666);float:right;font-size:18px;height:45px;line-height:45px;transition:all .3s;width:100%}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow{color:hsla(0,0%,100%,.8);font-size:13px;height:45px;line-height:45px;overflow:hidden;text-align:center;transition:all .3s;width:0}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item>.children .content .icon{font-size:11px}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item.parent-active>.content,::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item:hover>.content{background-color:var(--base-dark)}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item.parent-active>.content .title,::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item:hover>.content .title{color:#fff;font-weight:700}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item.parent-active>.content .icon,::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item:hover>.content .icon{color:var(--primary)}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item.parent-active>.content .arrow,::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item:hover>.content .arrow{color:#fff}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item.parent-active>.children{display:block}::ng-deep #Sidebar.open{width:260px}::ng-deep #Sidebar.open .toggle{transform:scaleX(-1)}::ng-deep #Sidebar.open .sidebar-scroll .brand-con .title{width:110px}::ng-deep #Sidebar.open .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{height:30px;line-height:20px;width:100%}::ng-deep #Sidebar.open .sidebar-scroll .sidebar-con .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content{flex-direction:column;padding:10px 0}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .icon{font-size:25px;height:60px;line-height:60px}::ng-deep #Sidebar.open.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .icon{height:45px;line-height:45px}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow{bottom:0;height:20px;line-height:20px;position:absolute}::ng-deep #Sidebar.open.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow:before{content:\"\\f107\"}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow:after{content:\"\\f107\\f107\"}::ng-deep #Sidebar.open.mini{width:150px}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item.open .content .arrow{transform:rotate(-90deg)}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item.open .content .arrow{transform:rotate(-180deg)}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item>.children .content .icon{font-size:20px;height:60px;line-height:60px}::ng-deep #Sidebar.open.mini .sidebar-scroll .sidebar-con .user-sidebar-item>.children .content .icon{height:40px;line-height:40px}::ng-deep #Sidebar.one-item{width:0!important}::ng-deep #Sidebar.one-item .sidebar-shadow,::ng-deep #Sidebar.one-item .toggle{display:none}::ng-deep #Sidebar.one-item .sidebar-scroll{width:0!important}@media (max-width:1199.98px){::ng-deep #Sidebar{height:calc(100vh - 35px);min-height:calc(100vh - 35px)}::ng-deep #Sidebar,::ng-deep #Sidebar.mini,::ng-deep #Sidebar.open,::ng-deep #Sidebar.open.mini{width:78px}::ng-deep #Sidebar .sidebar-scroll{width:260px}::ng-deep #Sidebar.mini .sidebar-scroll{width:150px}::ng-deep #Sidebar.open .sidebar-scroll{width:100%}::ng-deep #Sidebar.open .sidebar-scroll .brand-con .title{width:0}::ng-deep #Sidebar .sidebar-scroll .brand-con .title{width:110px}::ng-deep #Sidebar .sidebar-shadow{opacity:.7;visibility:visible}::ng-deep #Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}::ng-deep #Sidebar .toggle{color:var(--white);transform:scaleX(-1)}::ng-deep #Sidebar .toggle:hover{color:var(--white)}::ng-deep #Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}::ng-deep #Sidebar.open .toggle:hover{color:var(--primary-dark)}::ng-deep #Sidebar .sidebar-scroll .sidebar-con{height:calc(100vh - 85px)}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{height:30px;line-height:30px;width:100%}::ng-deep #Sidebar.open.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .title{height:0;width:0}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .icon{height:45px;line-height:45px;width:45px}::ng-deep #Sidebar.mini .sidebar-scroll .sidebar-con .user-sidebar-item>.children .content .icon{height:40px;line-height:40px;width:40px}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .count-all{bottom:5px;left:5px;top:unset}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .sidebar-scroll .sidebar-con .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open.mini .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow,::ng-deep #Sidebar.open .sidebar-scroll .sidebar-con .user-sidebar-item .content .arrow{width:0}}@media (max-width:399.98px){::ng-deep #Sidebar .sidebar-scroll{width:240px}}@media (max-width:599.98px){::ng-deep #Sidebar{height:calc(100vh - 60px);min-height:calc(100vh - 60px)}::ng-deep #Sidebar .sidebar-scroll .sidebar-con{height:calc(100vh - 110px)}::ng-deep #Sidebar,::ng-deep #Sidebar.mini,::ng-deep #Sidebar.open,::ng-deep #Sidebar.open.mini{width:0}}"]
|
|
2481
2491
|
},] }
|
|
2482
2492
|
];
|
|
@@ -2485,8 +2495,7 @@
|
|
|
2485
2495
|
{ type: router.Router }
|
|
2486
2496
|
]; };
|
|
2487
2497
|
SidebarComponent.propDecorators = {
|
|
2488
|
-
currentData: [{ type: core.Input }]
|
|
2489
|
-
mini: [{ type: core.Input }]
|
|
2498
|
+
currentData: [{ type: core.Input }]
|
|
2490
2499
|
};
|
|
2491
2500
|
|
|
2492
2501
|
var StepsComponent = /** @class */ (function () {
|
|
@@ -7460,14 +7469,13 @@
|
|
|
7460
7469
|
LayoutComponent.decorators = [
|
|
7461
7470
|
{ type: core.Component, args: [{
|
|
7462
7471
|
selector: 'lib-layout',
|
|
7463
|
-
template: "<div id=\"Layout\">\r\n <div class=\"layout-con\">\r\n <div class=\"panel\">\r\n <lib-sidebar [
|
|
7472
|
+
template: "<div id=\"Layout\">\r\n <div class=\"layout-con\">\r\n <div class=\"panel\">\r\n <lib-sidebar [currentData]=\"currentData\">\r\n <ng-content select=\"[slot=sidebar]\"></ng-content>\r\n </lib-sidebar>\r\n <div class=\"content\">\r\n <lib-header (logout)=\"logout.emit()\" [currentData]=\"currentData\">\r\n <ng-content select=\"[slot=header]\"></ng-content>\r\n </lib-header>\r\n\r\n <div class=\"content-scroll-con\">\r\n <div class=\"content-scroll\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
7464
7473
|
styles: ["#Layout,#Layout .layout-con,#Layout .panel{float:right;width:100%}#Layout .panel{display:flex;flex-direction:row;position:relative}#Layout .panel .content{background-color:var(--base-white);direction:rtl;float:left;overflow:hidden;position:relative;transition:width .3s;width:100%}#Layout .panel .content .content-scroll-con{height:calc(100vh - 85px);min-height:calc(100vh - 85px);overflow-y:auto;width:100%}#Layout .panel .content .content-scroll-con .content-scroll{float:right;padding:20px;width:100%}@media (max-width:399.98px){#Layout .panel .content .content-scroll-con{height:calc(100vh - 110px);min-height:calc(100vh - 110px)}}@media (min-width:400px) and (max-width:499.98px){#Layout .panel .content .content-scroll-con{height:calc(100vh - 110px);min-height:calc(100vh - 110px)}}@media (min-width:500px) and (max-width:599.98px){#Layout .panel .content .content-scroll-con{height:calc(100vh - 110px);min-height:calc(100vh - 110px)}}"]
|
|
7465
7474
|
},] }
|
|
7466
7475
|
];
|
|
7467
7476
|
LayoutComponent.ctorParameters = function () { return []; };
|
|
7468
7477
|
LayoutComponent.propDecorators = {
|
|
7469
7478
|
currentData: [{ type: core.Input }],
|
|
7470
|
-
miniSidebar: [{ type: core.Input }],
|
|
7471
7479
|
logout: [{ type: core.Output }]
|
|
7472
7480
|
};
|
|
7473
7481
|
|