ps-toolkit-ui 1.4.4 → 1.4.7
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 +17 -12
- 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/permission.class.js +3 -2
- package/esm2015/lib/components/alert/alert.component.js +2 -2
- package/esm2015/lib/components/base.component.js +5 -2
- package/esm2015/lib/components/calendar/calendar.component.js +2 -2
- package/esm2015/lib/components/confirm/confirm.component.js +2 -2
- package/esm2015/lib/components/footer/footer.component.js +2 -2
- package/esm2015/lib/components/header/header.component.js +2 -2
- package/esm2015/lib/components/loading/loading.component.js +2 -2
- package/esm2015/lib/components/notfound/notfound.component.js +2 -2
- package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +3 -3
- package/esm2015/lib/components/sidebar/sidebar.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +16 -12
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/permission.class.d.ts +2 -1
- package/lib/components/base.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
356
356
|
this.l = function (key, v) {
|
|
357
357
|
if (v === void 0) { v = null; }
|
|
358
|
-
return lang.get('
|
|
358
|
+
return lang.get('Public', 'Footer', key, v);
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
return FooterComponent;
|
|
@@ -2011,7 +2011,7 @@
|
|
|
2011
2011
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
2012
2012
|
var l = function (key, v) {
|
|
2013
2013
|
if (v === void 0) { v = null; }
|
|
2014
|
-
return lang.get('
|
|
2014
|
+
return lang.get('Public', 'Header', key, v);
|
|
2015
2015
|
};
|
|
2016
2016
|
this.logoutInp = new InputClass(config.environment, l, 'Logout', 'fa-duotone fa-right-from-bracket', exports.InputType.Button, 'grey h-30 p-0');
|
|
2017
2017
|
this.logoutInp.onClick = function () {
|
|
@@ -2067,7 +2067,7 @@
|
|
|
2067
2067
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
2068
2068
|
this.l = function (key, v) {
|
|
2069
2069
|
if (v === void 0) { v = null; }
|
|
2070
|
-
return lang.get('
|
|
2070
|
+
return lang.get('Public', 'Sidebar', key, v);
|
|
2071
2071
|
};
|
|
2072
2072
|
}
|
|
2073
2073
|
SidebarItemComponent.prototype.openClose = function (e) {
|
|
@@ -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]=\"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\" *ngFor=\"let child of item.children\"></lib-sidebar-item>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
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.includes('/home/index') ? '' : 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\" *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
|
];
|
|
@@ -2152,7 +2152,7 @@
|
|
|
2152
2152
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
2153
2153
|
this.l = function (key, v) {
|
|
2154
2154
|
if (v === void 0) { v = null; }
|
|
2155
|
-
return lang.get('
|
|
2155
|
+
return lang.get('Public', 'Sidebar', key, v);
|
|
2156
2156
|
};
|
|
2157
2157
|
router$1.events.subscribe(function (event) {
|
|
2158
2158
|
if (event instanceof router.NavigationEnd) {
|
|
@@ -2391,7 +2391,7 @@
|
|
|
2391
2391
|
};
|
|
2392
2392
|
|
|
2393
2393
|
var PermissionClass = /** @class */ (function () {
|
|
2394
|
-
function PermissionClass(Name, Icon, Type, InputType, AccessType, InputAction, Area, Controller, Action, Condition, Accesses) {
|
|
2394
|
+
function PermissionClass(Name, Icon, Type, InputType, AccessType, InputAction, Area, Controller, Action, Url, Condition, Accesses) {
|
|
2395
2395
|
if (Name === void 0) { Name = ''; }
|
|
2396
2396
|
if (Icon === void 0) { Icon = ''; }
|
|
2397
2397
|
if (Type === void 0) { Type = null; }
|
|
@@ -2401,6 +2401,7 @@
|
|
|
2401
2401
|
if (Area === void 0) { Area = ''; }
|
|
2402
2402
|
if (Controller === void 0) { Controller = ''; }
|
|
2403
2403
|
if (Action === void 0) { Action = ''; }
|
|
2404
|
+
if (Url === void 0) { Url = ''; }
|
|
2404
2405
|
if (Condition === void 0) { Condition = null; }
|
|
2405
2406
|
if (Accesses === void 0) { Accesses = []; }
|
|
2406
2407
|
this.Name = Name;
|
|
@@ -2412,6 +2413,7 @@
|
|
|
2412
2413
|
this.Area = Area;
|
|
2413
2414
|
this.Controller = Controller;
|
|
2414
2415
|
this.Action = Action;
|
|
2416
|
+
this.Url = Url;
|
|
2415
2417
|
this.Condition = Condition;
|
|
2416
2418
|
this.Accesses = Accesses;
|
|
2417
2419
|
this.RelatedId = null;
|
|
@@ -6255,7 +6257,7 @@
|
|
|
6255
6257
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
6256
6258
|
var l = function (key, v) {
|
|
6257
6259
|
if (v === void 0) { v = null; }
|
|
6258
|
-
return lang.get('
|
|
6260
|
+
return lang.get('Public', 'Alert', key, v);
|
|
6259
6261
|
};
|
|
6260
6262
|
this.alert = new ModalClass(config.environment, l, 'Alert');
|
|
6261
6263
|
this.alert.form = new FormClass(config.environment, l, 'Alert');
|
|
@@ -6290,7 +6292,7 @@
|
|
|
6290
6292
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
6291
6293
|
this.l = function (key, v) {
|
|
6292
6294
|
if (v === void 0) { v = null; }
|
|
6293
|
-
return lang.get('
|
|
6295
|
+
return lang.get('Public', 'Confirm', key, v);
|
|
6294
6296
|
};
|
|
6295
6297
|
}
|
|
6296
6298
|
ConfirmComponent.prototype.ngOnInit = function () {
|
|
@@ -6337,7 +6339,7 @@
|
|
|
6337
6339
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
6338
6340
|
this.l = function (key, v) {
|
|
6339
6341
|
if (v === void 0) { v = null; }
|
|
6340
|
-
return lang.get('
|
|
6342
|
+
return lang.get('Public', 'Notfound', key, v);
|
|
6341
6343
|
};
|
|
6342
6344
|
this.back = new InputClass(config.environment, this.l, 'Back', 'fa-duotone fa-arrow-right', exports.InputType.Button, '');
|
|
6343
6345
|
this.back.onClick = function () {
|
|
@@ -6995,7 +6997,7 @@
|
|
|
6995
6997
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
6996
6998
|
this.l = function (key, v) {
|
|
6997
6999
|
if (v === void 0) { v = null; }
|
|
6998
|
-
return lang.get('
|
|
7000
|
+
return lang.get('Public', null, key, v);
|
|
6999
7001
|
};
|
|
7000
7002
|
}
|
|
7001
7003
|
return LoadingComponent;
|
|
@@ -7087,7 +7089,7 @@
|
|
|
7087
7089
|
var lang = new LangClass(config.currentLang, config.strings);
|
|
7088
7090
|
this.l = function (key, v) {
|
|
7089
7091
|
if (v === void 0) { v = null; }
|
|
7090
|
-
return lang.get('
|
|
7092
|
+
return lang.get('Public', null, key, v);
|
|
7091
7093
|
};
|
|
7092
7094
|
this.months = [this.l('Month1'), this.l('Month2'), this.l('Month3'), this.l('Month4'), this.l('Month5'), this.l('Month6'), this.l('Month7'), this.l('Month8'), this.l('Month9'), this.l('Month10'), this.l('Month11'), this.l('Month12')];
|
|
7093
7095
|
this.setActive(moment__namespace());
|
|
@@ -7303,7 +7305,7 @@
|
|
|
7303
7305
|
return p.length > 0 ? this.getPermissionClass(p[0]) : null;
|
|
7304
7306
|
};
|
|
7305
7307
|
BaseComponent.prototype.getPermissionClass = function (p) {
|
|
7306
|
-
return new PermissionClass(p.Name, p.Icon, p.Type, p.InputType, p.AccessType, p.InputAction, this.app.area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
|
|
7308
|
+
return new PermissionClass(p.Name, p.Icon, p.Type, p.InputType, p.AccessType, p.InputAction, this.app.area, p.Controller, p.Action, p.Url, p.Condition, this.getPermissionAccessesClass(p.Id));
|
|
7307
7309
|
};
|
|
7308
7310
|
BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
|
|
7309
7311
|
var _this = this;
|
|
@@ -7312,6 +7314,9 @@
|
|
|
7312
7314
|
BaseComponent.prototype.hasAccess = function (a) {
|
|
7313
7315
|
return this.permissions ? this.permissions.hasAccessByName(a) : false;
|
|
7314
7316
|
};
|
|
7317
|
+
BaseComponent.prototype.getAccess = function (a) {
|
|
7318
|
+
return this.permissions ? this.permissions.getAccessByName(a) : null;
|
|
7319
|
+
};
|
|
7315
7320
|
BaseComponent.prototype.hasOption = function (a) {
|
|
7316
7321
|
return this.permissions ? this.permissions.hasAccessByName(a) : false;
|
|
7317
7322
|
};
|