ps-toolkit-ui 1.4.5 → 1.4.8

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.
@@ -322,6 +322,7 @@
322
322
  var _this = this;
323
323
  if (v === void 0) { v = null; }
324
324
  if (k != null && (/^-?\d+$/.test(k) || /^\d+\.\d+$/.test(k))) {
325
+ console.log(area, c, k, v, '=>', k);
325
326
  return k;
326
327
  }
327
328
  var cv = _.get(this.lang, area ? area + "." + c + "." + k : c + "." + k);
@@ -332,6 +333,7 @@
332
333
  cv = _.get(this.lang, "public." + k);
333
334
  }
334
335
  if (!cv) {
336
+ console.log(area, c, k, v, '=>', k);
335
337
  return k;
336
338
  }
337
339
  if (v !== null) {
@@ -344,6 +346,7 @@
344
346
  cv = cv.replace('{}', this.get(area, c, v, null));
345
347
  }
346
348
  }
349
+ console.log(area, c, k, v, '=>', cv);
347
350
  return cv;
348
351
  };
349
352
  return LangClass;
@@ -355,7 +358,7 @@
355
358
  var lang = new LangClass(config.currentLang, config.strings);
356
359
  this.l = function (key, v) {
357
360
  if (v === void 0) { v = null; }
358
- return lang.get('public', 'footer', key, v);
361
+ return lang.get('Public', 'Footer', key, v);
359
362
  };
360
363
  }
361
364
  return FooterComponent;
@@ -2011,7 +2014,7 @@
2011
2014
  var lang = new LangClass(config.currentLang, config.strings);
2012
2015
  var l = function (key, v) {
2013
2016
  if (v === void 0) { v = null; }
2014
- return lang.get('public', 'header', key, v);
2017
+ return lang.get('Public', 'Header', key, v);
2015
2018
  };
2016
2019
  this.logoutInp = new InputClass(config.environment, l, 'Logout', 'fa-duotone fa-right-from-bracket', exports.InputType.Button, 'grey h-30 p-0');
2017
2020
  this.logoutInp.onClick = function () {
@@ -2067,7 +2070,7 @@
2067
2070
  var lang = new LangClass(config.currentLang, config.strings);
2068
2071
  this.l = function (key, v) {
2069
2072
  if (v === void 0) { v = null; }
2070
- return lang.get('sublic', 'Sidebar', key, v);
2073
+ return lang.get('Public', 'Sidebar', key, v);
2071
2074
  };
2072
2075
  }
2073
2076
  SidebarItemComponent.prototype.openClose = function (e) {
@@ -2111,7 +2114,7 @@
2111
2114
  SidebarItemComponent.decorators = [
2112
2115
  { type: core.Component, args: [{
2113
2116
  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",
2117
+ 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
2118
  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
2119
  },] }
2117
2120
  ];
@@ -2152,7 +2155,7 @@
2152
2155
  var lang = new LangClass(config.currentLang, config.strings);
2153
2156
  this.l = function (key, v) {
2154
2157
  if (v === void 0) { v = null; }
2155
- return lang.get('public', 'sidebar', key, v);
2158
+ return lang.get('Public', 'Sidebar', key, v);
2156
2159
  };
2157
2160
  router$1.events.subscribe(function (event) {
2158
2161
  if (event instanceof router.NavigationEnd) {
@@ -2391,7 +2394,7 @@
2391
2394
  };
2392
2395
 
2393
2396
  var PermissionClass = /** @class */ (function () {
2394
- function PermissionClass(Name, Icon, Type, InputType, AccessType, InputAction, Area, Controller, Action, Condition, Accesses) {
2397
+ function PermissionClass(Name, Icon, Type, InputType, AccessType, InputAction, Area, Controller, Action, Url, Condition, Accesses) {
2395
2398
  if (Name === void 0) { Name = ''; }
2396
2399
  if (Icon === void 0) { Icon = ''; }
2397
2400
  if (Type === void 0) { Type = null; }
@@ -2401,6 +2404,7 @@
2401
2404
  if (Area === void 0) { Area = ''; }
2402
2405
  if (Controller === void 0) { Controller = ''; }
2403
2406
  if (Action === void 0) { Action = ''; }
2407
+ if (Url === void 0) { Url = ''; }
2404
2408
  if (Condition === void 0) { Condition = null; }
2405
2409
  if (Accesses === void 0) { Accesses = []; }
2406
2410
  this.Name = Name;
@@ -2412,6 +2416,7 @@
2412
2416
  this.Area = Area;
2413
2417
  this.Controller = Controller;
2414
2418
  this.Action = Action;
2419
+ this.Url = Url;
2415
2420
  this.Condition = Condition;
2416
2421
  this.Accesses = Accesses;
2417
2422
  this.RelatedId = null;
@@ -6255,7 +6260,7 @@
6255
6260
  var lang = new LangClass(config.currentLang, config.strings);
6256
6261
  var l = function (key, v) {
6257
6262
  if (v === void 0) { v = null; }
6258
- return lang.get('public', 'alert', key, v);
6263
+ return lang.get('Public', 'Alert', key, v);
6259
6264
  };
6260
6265
  this.alert = new ModalClass(config.environment, l, 'Alert');
6261
6266
  this.alert.form = new FormClass(config.environment, l, 'Alert');
@@ -6290,7 +6295,7 @@
6290
6295
  var lang = new LangClass(config.currentLang, config.strings);
6291
6296
  this.l = function (key, v) {
6292
6297
  if (v === void 0) { v = null; }
6293
- return lang.get('public', 'confirm', key, v);
6298
+ return lang.get('Public', 'Confirm', key, v);
6294
6299
  };
6295
6300
  }
6296
6301
  ConfirmComponent.prototype.ngOnInit = function () {
@@ -6337,7 +6342,7 @@
6337
6342
  var lang = new LangClass(config.currentLang, config.strings);
6338
6343
  this.l = function (key, v) {
6339
6344
  if (v === void 0) { v = null; }
6340
- return lang.get('public', 'notfound', key, v);
6345
+ return lang.get('Public', 'Notfound', key, v);
6341
6346
  };
6342
6347
  this.back = new InputClass(config.environment, this.l, 'Back', 'fa-duotone fa-arrow-right', exports.InputType.Button, '');
6343
6348
  this.back.onClick = function () {
@@ -6995,7 +7000,7 @@
6995
7000
  var lang = new LangClass(config.currentLang, config.strings);
6996
7001
  this.l = function (key, v) {
6997
7002
  if (v === void 0) { v = null; }
6998
- return lang.get('public', null, key, v);
7003
+ return lang.get('Public', null, key, v);
6999
7004
  };
7000
7005
  }
7001
7006
  return LoadingComponent;
@@ -7087,7 +7092,7 @@
7087
7092
  var lang = new LangClass(config.currentLang, config.strings);
7088
7093
  this.l = function (key, v) {
7089
7094
  if (v === void 0) { v = null; }
7090
- return lang.get('public', null, key, v);
7095
+ return lang.get('Public', null, key, v);
7091
7096
  };
7092
7097
  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
7098
  this.setActive(moment__namespace());
@@ -7303,7 +7308,7 @@
7303
7308
  return p.length > 0 ? this.getPermissionClass(p[0]) : null;
7304
7309
  };
7305
7310
  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));
7311
+ 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
7312
  };
7308
7313
  BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
7309
7314
  var _this = this;