ps-toolkit-ui 1.3.38 → 1.3.41
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 +6 -6
- 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/components/base.component.js +4 -4
- package/esm2015/lib/components/login/login.component.js +3 -3
- package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +6 -6
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -2107,7 +2107,7 @@
|
|
|
2107
2107
|
SidebarItemComponent.decorators = [
|
|
2108
2108
|
{ type: core.Component, args: [{
|
|
2109
2109
|
selector: 'lib-sidebar-item',
|
|
2110
|
-
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]=\"(area ? '/' + area
|
|
2110
|
+
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]=\"(area ? '/' + area : '') + '/' + (item.controller == 'Home' ? '' : (item.controller + (item.action ? '/' + item.action : '')))\">\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",
|
|
2111
2111
|
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}}"]
|
|
2112
2112
|
},] }
|
|
2113
2113
|
];
|
|
@@ -6710,7 +6710,7 @@
|
|
|
6710
6710
|
loginForm_1.subName = this.login.l('LoginSmsSubTitle', '');
|
|
6711
6711
|
loginForm_1.onSuccess = function (result) {
|
|
6712
6712
|
_this.login.setCookie(result);
|
|
6713
|
-
if (_this.login.steps.length > 2 && result.
|
|
6713
|
+
if (_this.login.steps.length > 2 && result.User === null) {
|
|
6714
6714
|
_this.login.steps[2].show(result.StepData);
|
|
6715
6715
|
setTimeout(function () { _this.login.steps[2].form.inputs.find(function (x) { return true; }).focus(); }, 100);
|
|
6716
6716
|
}
|
|
@@ -6782,7 +6782,7 @@
|
|
|
6782
6782
|
var login = new InputClass(this.config.environment, this.login.l, 'LoginPassword', 'fa-duotone fa-sign-in-alt', exports.InputType.Submit, 'h-45' + (this.loginTemplate === 'Simple' ? ' primary' : ''));
|
|
6783
6783
|
loginForm_2.onSuccess = function (result) {
|
|
6784
6784
|
_this.login.setCookie(result);
|
|
6785
|
-
if (_this.login.steps.length > 1 && result.
|
|
6785
|
+
if (_this.login.steps.length > 1 && result.User === null) {
|
|
6786
6786
|
_this.login.steps[1].show(result.StepData);
|
|
6787
6787
|
setTimeout(function () { _this.login.steps[1].form.inputs.find(function (x) { return true; }).focus(); }, 100);
|
|
6788
6788
|
}
|
|
@@ -7132,7 +7132,7 @@
|
|
|
7132
7132
|
if (v === void 0) { v = null; }
|
|
7133
7133
|
return app.getL("" + c + (a ? "." + a : ''), key, v);
|
|
7134
7134
|
};
|
|
7135
|
-
if (app.
|
|
7135
|
+
if (app.currentData.user !== null) {
|
|
7136
7136
|
this.permissions = this.getPermission(this.c, this.a);
|
|
7137
7137
|
if (this.permissions) {
|
|
7138
7138
|
this.permissions.Area = app.area;
|
|
@@ -7141,7 +7141,7 @@
|
|
|
7141
7141
|
}
|
|
7142
7142
|
BaseComponent.prototype.getPermission = function (c, a) {
|
|
7143
7143
|
if (a === void 0) { a = null; }
|
|
7144
|
-
var p = this.app.
|
|
7144
|
+
var p = this.app.currentData.permissions.filter(function (per) { return per.Controller === c && (a == null || per.Action === a) &&
|
|
7145
7145
|
per.Type === exports.PermissionTypeEnum.Item; });
|
|
7146
7146
|
return p.length > 0 ? this.getPermissionClass(p[0]) : null;
|
|
7147
7147
|
};
|
|
@@ -7150,7 +7150,7 @@
|
|
|
7150
7150
|
};
|
|
7151
7151
|
BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
|
|
7152
7152
|
var _this = this;
|
|
7153
|
-
return this.app.
|
|
7153
|
+
return this.app.currentData.permissions.filter(function (x) { return x.ParentId === parentId; }).map(function (x) { return _this.getPermissionClass(x); });
|
|
7154
7154
|
};
|
|
7155
7155
|
BaseComponent.prototype.hasAccess = function (a) {
|
|
7156
7156
|
return this.permissions ? this.permissions.hasAccessByName(a) : false;
|