ps-toolkit-ui 1.3.97 → 1.4.0
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 +9 -16
- 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/lang.class.js +3 -3
- package/esm2015/lib/classes/sidebar.class.js +3 -2
- package/esm2015/lib/components/base.component.js +4 -12
- package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +2 -2
- package/esm2015/lib/components/sidebar/sidebar.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +9 -16
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/sidebar.class.d.ts +2 -1
- package/package.json +2 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -326,10 +326,10 @@
|
|
|
326
326
|
}
|
|
327
327
|
var cv = _.get(this.lang, area ? area + "." + c + "." + k : c + "." + k);
|
|
328
328
|
if (!cv) {
|
|
329
|
-
cv = _.get(this.lang, "
|
|
329
|
+
cv = _.get(this.lang, "public." + c + "." + k);
|
|
330
330
|
}
|
|
331
331
|
if (!cv) {
|
|
332
|
-
cv = _.get(this.lang, "
|
|
332
|
+
cv = _.get(this.lang, "public." + k);
|
|
333
333
|
}
|
|
334
334
|
if (!cv) {
|
|
335
335
|
return k;
|
|
@@ -2111,7 +2111,7 @@
|
|
|
2111
2111
|
SidebarItemComponent.decorators = [
|
|
2112
2112
|
{ type: core.Component, args: [{
|
|
2113
2113
|
selector: 'lib-sidebar-item',
|
|
2114
|
-
template: "<div [className]=\"(isActive(item) ? 'parent-active open ' : '') + 'user-sidebar-item'\">\r\n <a (click)=\"closeSidebar()\" [style]=\"{paddingRight: (i * 25) + 'px'}\" *ngIf=\"item.children.length == 0\" [className]=\"(currentSidebar && item.name == currentSidebar.name ? 'active ' : '') + 'content'\" [routerLink]=\"
|
|
2114
|
+
template: "<div [className]=\"(isActive(item) ? 'parent-active open ' : '') + 'user-sidebar-item'\">\r\n <a (click)=\"closeSidebar()\" [style]=\"{paddingRight: (i * 25) + 'px'}\" *ngIf=\"item.children.length == 0\" [className]=\"(currentSidebar && item.name == currentSidebar.name ? 'active ' : '') + 'content'\" [routerLink]=\"item.url\">\r\n <i [className]=\"item.icon + ' icon'\"></i>\r\n <div class=\"title\">{{ l(item.name) }}</div>\r\n </a>\r\n <div [style]=\"{paddingRight: (i * 25) + 'px'}\" *ngIf=\"item.children.length > 0\" (click)=\"openClose($event)\" class=\"content parent\">\r\n <i [className]=\"item.icon + ' icon'\"></i>\r\n <div class=\"title\">{{ l(item.name) }}</div>\r\n <i [className]=\"'fa-duotone fa-angle-left arrow'\"></i>\r\n </div>\r\n <div *ngIf=\"item.children.length > 0\" class=\"children\">\r\n <div class=\"items\">\r\n <lib-sidebar-item [i]=\"i + 1\" [item]=\"child\" [currentSidebar]=\"currentSidebar\" [area]=\"area\" *ngFor=\"let child of item.children\"></lib-sidebar-item>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2115
2115
|
styles: [".user-sidebar-item{float:left;position:relative;text-align:center;width:100%}.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%}.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}.user-sidebar-item .dot.active{background-color:var(--base-white);border:2px solid var(--base-white)}.user-sidebar-item.parent-active>.dot.parent{background-color:hsla(0,0%,93.3%,.4);border:none}.user-sidebar-item .dot.back{background-color:var(--base);border:none;z-index:1}.user-sidebar-item .children{display:none;float:left;position:relative;width:100%}.user-sidebar-item .children .items{float:left;width:100%}.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}.user-sidebar-item .content .title{color:hsla(0,0%,100%,.8);float:right;font-family:VazirLight;font-size:12px;height:45px;line-height:45px;overflow:hidden;transition:all .3s;width:0}.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%}.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.open .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.close .user-sidebar-item .content{padding:0!important}.user-sidebar-item.open .content .arrow{transform:rotate(-90deg)}.user-sidebar-item>.children .content .icon{font-size:11px}.user-sidebar-item.parent-active>.content,.user-sidebar-item:hover>.content{background-color:var(--base-dark)}.user-sidebar-item.parent-active>.content .title,.user-sidebar-item:hover>.content .title{color:#fff;font-family:VazirBold}.user-sidebar-item.parent-active>.content .icon,.user-sidebar-item:hover>.content .icon{color:var(--primary)}.user-sidebar-item.parent-active>.content .arrow,.user-sidebar-item:hover>.content .arrow{color:#fff}.user-sidebar-item.parent-active>.children{display:block}@media (max-width:399.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:400px) and (max-width:499.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:500px) and (max-width:599.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:600px) and (max-width:699.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:700px) and (max-width:799.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:800px) and (max-width:899.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:900px) and (max-width:999.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:1000px) and (max-width:1099.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}@media (min-width:1100px) and (max-width:1199.98px){::ng-deep #Sidebar .user-sidebar-item .content .title{width:calc(100% - 100px)}::ng-deep #Sidebar.open .user-sidebar-item .content .title{width:0}::ng-deep #Sidebar .user-sidebar-item .content .icon{width:70px}::ng-deep #Sidebar.open .user-sidebar-item .content .icon{width:100%}::ng-deep #Sidebar .user-sidebar-item .content .arrow{width:30px}::ng-deep #Sidebar.open .user-sidebar-item .content .arrow{width:0}}"]
|
|
2116
2116
|
},] }
|
|
2117
2117
|
];
|
|
@@ -2127,7 +2127,7 @@
|
|
|
2127
2127
|
};
|
|
2128
2128
|
|
|
2129
2129
|
var SidebarClass = /** @class */ (function () {
|
|
2130
|
-
function SidebarClass(l, name, controller, action, icon, children, count) {
|
|
2130
|
+
function SidebarClass(l, name, controller, action, url, icon, children, count) {
|
|
2131
2131
|
if (children === void 0) { children = []; }
|
|
2132
2132
|
if (count === void 0) { count = 0; }
|
|
2133
2133
|
this.count = 0;
|
|
@@ -2135,6 +2135,7 @@
|
|
|
2135
2135
|
this.l = l;
|
|
2136
2136
|
this.controller = controller;
|
|
2137
2137
|
this.action = action;
|
|
2138
|
+
this.url = url;
|
|
2138
2139
|
this.name = name;
|
|
2139
2140
|
this.icon = icon;
|
|
2140
2141
|
this.count = count;
|
|
@@ -2173,7 +2174,7 @@
|
|
|
2173
2174
|
var _this = this;
|
|
2174
2175
|
if (parentId === void 0) { parentId = null; }
|
|
2175
2176
|
return this.permissions.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Item && x.ParentId === parentId; }).map(function (s) {
|
|
2176
|
-
return new SidebarClass(_this.l, s.Name, s.Controller, s.Action, s.Icon, _this.getSidebar(s.Id));
|
|
2177
|
+
return new SidebarClass(_this.l, s.Name, s.Controller, s.Action, s.Url, s.Icon, _this.getSidebar(s.Id));
|
|
2177
2178
|
});
|
|
2178
2179
|
};
|
|
2179
2180
|
SidebarComponent.prototype.getSidebarActive = function (item, active) {
|
|
@@ -7296,17 +7297,9 @@
|
|
|
7296
7297
|
if (v === void 0) { v = null; }
|
|
7297
7298
|
return app.getL("" + c + (a ? "." + a : ''), key, v);
|
|
7298
7299
|
};
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
this.permissions.Area = app.area;
|
|
7303
|
-
}
|
|
7304
|
-
}
|
|
7305
|
-
else {
|
|
7306
|
-
this.permissions = this.getPermission(this.c, this.a);
|
|
7307
|
-
if (this.permissions) {
|
|
7308
|
-
this.permissions.Area = app.area;
|
|
7309
|
-
}
|
|
7300
|
+
this.permissions = this.getPermission(this.c, this.a);
|
|
7301
|
+
if (this.permissions) {
|
|
7302
|
+
this.permissions.Area = app.area;
|
|
7310
7303
|
}
|
|
7311
7304
|
}
|
|
7312
7305
|
BaseComponent.prototype.getPermission = function (c, a) {
|