ps-toolkit-ui 1.4.1 → 1.4.4

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.
@@ -2148,7 +2148,6 @@
2148
2148
  var _this = this;
2149
2149
  this.config = config;
2150
2150
  this.router = router$1;
2151
- this.permissions = [];
2152
2151
  this.sidebar = [];
2153
2152
  var lang = new LangClass(config.currentLang, config.strings);
2154
2153
  this.l = function (key, v) {
@@ -2172,7 +2171,7 @@
2172
2171
  SidebarComponent.prototype.getSidebar = function (parentId) {
2173
2172
  var _this = this;
2174
2173
  if (parentId === void 0) { parentId = null; }
2175
- return this.permissions.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Item && x.ParentId === parentId; }).map(function (s) {
2174
+ return this.currentData.permissions.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Item && x.ParentId === parentId; }).map(function (s) {
2176
2175
  return new SidebarClass(_this.l, s.Name, s.Controller, s.Action, s.Url, s.Icon, _this.getSidebar(s.Id));
2177
2176
  });
2178
2177
  };
@@ -2207,7 +2206,7 @@
2207
2206
  SidebarComponent.decorators = [
2208
2207
  { type: core.Component, args: [{
2209
2208
  selector: 'lib-sidebar',
2210
- template: "<div id=\"Sidebar\" class=\"open\">\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', 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",
2209
+ template: "<div id=\"Sidebar\" class=\"open\">\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",
2211
2210
  styles: ["#Sidebar{background-color:var(--base);height:calc(100vh - 35px);min-height:calc(100vh - 35px);position:relative;transition:width .3s;width:78px;z-index:102}#Sidebar,#Sidebar .sidebar-shadow{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;direction:ltr;float:right}#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}#Sidebar.open{width:260px}#Sidebar .sidebar-scroll{background-color:var(--base);height:100%;position:absolute;right:0;top:0;transition:all .3s;width:100%;z-index:104}#Sidebar .sidebar-scroll .sidebar-con{direction:ltr;float:right;height:calc(100vh - 85px);overflow-x:hidden;overflow-y:auto;width:100%}#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%}#Sidebar .sidebar-scroll .brand-con .logo{background-position:50%;background-repeat:no-repeat;background-size:contain;float:right;height:30px;width:30px}#Sidebar .sidebar-scroll .brand-con .title{align-items:center;color:#fff;display:flex;font-family:VazirBold;font-size:15px;height:100%;justify-content:center;overflow:hidden;position:relative;top:-4px;transition:all .3s;white-space:nowrap;width:0}#Sidebar.open .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-scroll .brand-con .title .version{font-family:VazirLight;font-size:9px;position:absolute;top:27px}#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}#Sidebar.open .toggle{transform:scaleX(-1)}#Sidebar .toggle:hover{color:var(--primary-dark)}@media (max-width:399.98px){#Sidebar{height:calc(100vh - 60px);min-height:calc(100vh - 60px)}#Sidebar,#Sidebar.open{width:0}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:240px}#Sidebar .sidebar-scroll .sidebar-con{height:calc(100vh - 110px)}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:400px) and (max-width:499.98px){#Sidebar{height:calc(100vh - 60px);min-height:calc(100vh - 60px)}#Sidebar,#Sidebar.open{width:0}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar .sidebar-scroll .sidebar-con{height:calc(100vh - 110px)}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:500px) and (max-width:599.98px){#Sidebar{height:calc(100vh - 60px);min-height:calc(100vh - 60px)}#Sidebar,#Sidebar.open{width:0}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar .sidebar-scroll .sidebar-con{height:calc(100vh - 110px)}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:600px) and (max-width:699.98px){#Sidebar,#Sidebar.open{width:0}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:700px) and (max-width:799.98px){#Sidebar,#Sidebar.open{width:60px}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:800px) and (max-width:899.98px){#Sidebar,#Sidebar.open{width:60px}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:900px) and (max-width:999.98px){#Sidebar,#Sidebar.open{width:78px}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:1000px) and (max-width:1099.98px){#Sidebar,#Sidebar.open{width:78px}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}@media (min-width:1100px) and (max-width:1199.98px){#Sidebar,#Sidebar.open{width:78px}#Sidebar.open .sidebar-scroll{width:100%}#Sidebar .sidebar-scroll{width:260px}#Sidebar.open .sidebar-scroll .brand-con .title{width:0}#Sidebar .sidebar-scroll .brand-con .title{width:110px}#Sidebar .sidebar-shadow{opacity:.7;visibility:visible}#Sidebar.open .sidebar-shadow{opacity:0;visibility:hidden}#Sidebar .toggle{transform:scaleX(-1)}#Sidebar .toggle,#Sidebar .toggle:hover{color:var(--white)}#Sidebar.open .toggle{color:var(--primary);transform:scaleX(1)}#Sidebar.open .toggle:hover{color:var(--primary-dark)}}"]
2212
2211
  },] }
2213
2212
  ];
@@ -2216,8 +2215,7 @@
2216
2215
  { type: router.Router }
2217
2216
  ]; };
2218
2217
  SidebarComponent.propDecorators = {
2219
- permissions: [{ type: core.Input }],
2220
- version: [{ type: core.Input }]
2218
+ currentData: [{ type: core.Input }]
2221
2219
  };
2222
2220
 
2223
2221
  var StepsComponent = /** @class */ (function () {
@@ -7029,7 +7027,6 @@
7029
7027
 
7030
7028
  var LayoutComponent = /** @class */ (function () {
7031
7029
  function LayoutComponent() {
7032
- this.permissions = [];
7033
7030
  this.logout = new core.EventEmitter();
7034
7031
  }
7035
7032
  return LayoutComponent;
@@ -7037,14 +7034,13 @@
7037
7034
  LayoutComponent.decorators = [
7038
7035
  { type: core.Component, args: [{
7039
7036
  selector: 'lib-layout',
7040
- template: "<div id=\"Layout\">\r\n <div class=\"layout-con\">\r\n <div class=\"panel\">\r\n <lib-sidebar [permissions]=\"permissions\" [version]=\"version\">\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()\">\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",
7037
+ 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()\">\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",
7041
7038
  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)}}"]
7042
7039
  },] }
7043
7040
  ];
7044
7041
  LayoutComponent.ctorParameters = function () { return []; };
7045
7042
  LayoutComponent.propDecorators = {
7046
- permissions: [{ type: core.Input }],
7047
- version: [{ type: core.Input }],
7043
+ currentData: [{ type: core.Input }],
7048
7044
  logout: [{ type: core.Output }]
7049
7045
  };
7050
7046
 
@@ -7615,7 +7611,7 @@
7615
7611
  if (categories === void 0) { categories = []; }
7616
7612
  var date = this.l('Date');
7617
7613
  var data = [].concat.apply([], cOpt.series.map(function (o) { return o.data; }));
7618
- if (data.filter(function (x) { return x !== 0; }).length == 0) {
7614
+ if (data.filter(function (x) { return x !== 0; }).length === 0) {
7619
7615
  this.empty = true;
7620
7616
  return;
7621
7617
  }
@@ -7773,6 +7769,23 @@
7773
7769
  return ChartClass;
7774
7770
  }());
7775
7771
 
7772
+ var CurrentDataClass = /** @class */ (function () {
7773
+ function CurrentDataClass(data) {
7774
+ if (data === void 0) { data = null; }
7775
+ this.user = null;
7776
+ this.permissions = [];
7777
+ this.modules = [];
7778
+ this.software = { Version: '0.0' };
7779
+ if (data != null) {
7780
+ this.user = data.User;
7781
+ this.permissions = data.Permissions;
7782
+ this.modules = data.Modules;
7783
+ this.software = data.Software;
7784
+ }
7785
+ }
7786
+ return CurrentDataClass;
7787
+ }());
7788
+
7776
7789
  /*
7777
7790
  * Public API Surface of ps-toolkit-ui
7778
7791
  */
@@ -7788,6 +7801,7 @@
7788
7801
  exports.BaseComponent = BaseComponent;
7789
7802
  exports.ChartClass = ChartClass;
7790
7803
  exports.ConfirmComponent = ConfirmComponent;
7804
+ exports.CurrentDataClass = CurrentDataClass;
7791
7805
  exports.DayClass = DayClass;
7792
7806
  exports.EnumUtils = EnumUtils;
7793
7807
  exports.FooterComponent = FooterComponent;