ps-toolkit-ui 1.14.15 → 1.14.17
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 +31 -46
- 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/enum.class.js +1 -2
- package/esm2015/lib/classes/header.class.js +15 -0
- package/esm2015/lib/classes/modal.class.js +1 -1
- package/esm2015/lib/classes/request.class.js +1 -7
- package/esm2015/lib/classes/table.class.js +6 -1
- package/esm2015/lib/components/header/header.component.js +5 -18
- package/esm2015/lib/components/layout/layout.component.js +4 -5
- package/fesm2015/ps-toolkit-ui.js +31 -44
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +1 -2
- package/lib/classes/header.class.d.ts +7 -0
- package/lib/components/header/header.component.d.ts +2 -6
- package/lib/components/layout/layout.component.d.ts +2 -2
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -387,6 +387,30 @@
|
|
|
387
387
|
{ type: PsToolkitUiConfigService }
|
|
388
388
|
]; };
|
|
389
389
|
|
|
390
|
+
var HeaderComponent = /** @class */ (function () {
|
|
391
|
+
function HeaderComponent(config) {
|
|
392
|
+
this.config = config;
|
|
393
|
+
this.header = null;
|
|
394
|
+
}
|
|
395
|
+
HeaderComponent.prototype.showUserDropDown = function (e) {
|
|
396
|
+
$__namespace(e.target).closest('#Header').find('.user-drop-down').slideToggle(100);
|
|
397
|
+
};
|
|
398
|
+
return HeaderComponent;
|
|
399
|
+
}());
|
|
400
|
+
HeaderComponent.decorators = [
|
|
401
|
+
{ type: core.Component, args: [{
|
|
402
|
+
selector: 'lib-header',
|
|
403
|
+
template: "<div id=\"Header\" class=\"underline\">\r\n <div class=\"content\"><ng-content></ng-content></div>\r\n <div (click)=\"showUserDropDown($event)\" class=\"user-con\">\r\n <i class=\"fa-duotone fa-user user\"></i>\r\n <div class=\"user-drop-down\">\r\n <div class=\"username\" *ngIf=\"header.username != null\">{{header.username}}</div>\r\n <lib-form-button *ngFor=\"let btn of header.buttons\" [inp]=\"btn\"></lib-form-button>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
404
|
+
styles: ["#Header{background-color:#fff;float:right;height:50px;position:relative;width:100%;z-index:11}#Header .content{float:right;height:100%;margin-right:50px;text-align:center;width:calc(100% - 150px)}#Header .user-con{align-items:center;display:flex;float:right;height:100%;justify-content:center;position:relative;width:100px}#Header .user-con .user{border-radius:50%;color:var(--primary);cursor:pointer;float:right;font-size:18px;height:30px;line-height:30px;text-align:center;width:30px}#Header .user-con .user:hover{color:var(--primary-dark)}#Header .user-con .user-drop-down{background-color:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow);display:none;left:20px;overflow:hidden;position:absolute;top:55px;width:150px}#Header .user-con .user-drop-down .username{float:right;font-weight:700;line-height:35px;text-align:center;width:100%}::ng-deep #LogoutButtonInput .control{border-radius:0}@media (max-width:399.98px){#Header .content{font-size:12px;width:calc(100% - 100px)}#Header .user-con{width:50px}}@media (min-width:400px) and (max-width:499.98px){#Header .content{font-size:12px;width:calc(100% - 100px)}#Header .user-con{width:50px}}"]
|
|
405
|
+
},] }
|
|
406
|
+
];
|
|
407
|
+
HeaderComponent.ctorParameters = function () { return [
|
|
408
|
+
{ type: PsToolkitUiConfigService }
|
|
409
|
+
]; };
|
|
410
|
+
HeaderComponent.propDecorators = {
|
|
411
|
+
header: [{ type: core.Input }]
|
|
412
|
+
};
|
|
413
|
+
|
|
390
414
|
/******************************************************************************
|
|
391
415
|
Copyright (c) Microsoft Corporation.
|
|
392
416
|
|
|
@@ -874,7 +898,6 @@
|
|
|
874
898
|
ResultStatusEnum[ResultStatusEnum["NotRegistered"] = 4] = "NotRegistered";
|
|
875
899
|
ResultStatusEnum[ResultStatusEnum["ExpiredRegistered"] = 5] = "ExpiredRegistered";
|
|
876
900
|
ResultStatusEnum[ResultStatusEnum["InvalidIp"] = 6] = "InvalidIp";
|
|
877
|
-
ResultStatusEnum[ResultStatusEnum["Redirect"] = 7] = "Redirect";
|
|
878
901
|
})(exports.ResultStatusEnum || (exports.ResultStatusEnum = {}));
|
|
879
902
|
(function (PermissionTypeEnum) {
|
|
880
903
|
PermissionTypeEnum[PermissionTypeEnum["Form"] = -1] = "Form";
|
|
@@ -1599,9 +1622,6 @@
|
|
|
1599
1622
|
if (form.onFailed) {
|
|
1600
1623
|
form.onFailed(res.message);
|
|
1601
1624
|
}
|
|
1602
|
-
if (res.status === exports.ResultStatusEnum.Redirect) {
|
|
1603
|
-
location.href = res.result;
|
|
1604
|
-
}
|
|
1605
1625
|
}
|
|
1606
1626
|
try {
|
|
1607
1627
|
for (var btns_3 = __values(btns), btns_3_1 = btns_3.next(); !btns_3_1.done; btns_3_1 = btns_3.next()) {
|
|
@@ -1771,9 +1791,6 @@
|
|
|
1771
1791
|
if (failure) {
|
|
1772
1792
|
failure(m);
|
|
1773
1793
|
}
|
|
1774
|
-
if (res.status === exports.ResultStatusEnum.Redirect) {
|
|
1775
|
-
location.href = res.result;
|
|
1776
|
-
}
|
|
1777
1794
|
if (btn) {
|
|
1778
1795
|
btn.loading = false;
|
|
1779
1796
|
}
|
|
@@ -2502,42 +2519,6 @@
|
|
|
2502
2519
|
return AccordionRowClass;
|
|
2503
2520
|
}());
|
|
2504
2521
|
|
|
2505
|
-
var HeaderComponent = /** @class */ (function () {
|
|
2506
|
-
function HeaderComponent(config) {
|
|
2507
|
-
var _this = this;
|
|
2508
|
-
this.config = config;
|
|
2509
|
-
this.currentData = null;
|
|
2510
|
-
this.logout = new core.EventEmitter();
|
|
2511
|
-
var lang = new LangClass(config.currentLang, config.strings);
|
|
2512
|
-
var l = function (key, v) {
|
|
2513
|
-
if (v === void 0) { v = null; }
|
|
2514
|
-
return lang.get('Public', 'Header', key, v);
|
|
2515
|
-
};
|
|
2516
|
-
this.logoutInp = new InputClass(config.environment, l, 'Logout', 'fa-duotone fa-right-from-bracket', exports.InputType.Button, 'grey h-30 p-0');
|
|
2517
|
-
this.logoutInp.onClick = function () {
|
|
2518
|
-
_this.logout.emit(_this.logoutInp);
|
|
2519
|
-
};
|
|
2520
|
-
}
|
|
2521
|
-
HeaderComponent.prototype.showUserDropDown = function (e) {
|
|
2522
|
-
$__namespace(e.target).closest('#Header').find('.user-drop-down').slideToggle(100);
|
|
2523
|
-
};
|
|
2524
|
-
return HeaderComponent;
|
|
2525
|
-
}());
|
|
2526
|
-
HeaderComponent.decorators = [
|
|
2527
|
-
{ type: core.Component, args: [{
|
|
2528
|
-
selector: 'lib-header',
|
|
2529
|
-
template: "<div id=\"Header\" class=\"underline\">\r\n <div class=\"content\"><ng-content></ng-content></div>\r\n <div (click)=\"showUserDropDown($event)\" class=\"user-con\">\r\n <i class=\"fa-duotone fa-user user\"></i>\r\n <div class=\"user-drop-down\">\r\n <div class=\"username\" *ngIf=\"currentData != null && currentData.user != null\">{{currentData.user.Username}}</div>\r\n <lib-form-button [inp]=\"logoutInp\"></lib-form-button>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2530
|
-
styles: ["#Header{background-color:#fff;float:right;height:50px;position:relative;width:100%;z-index:11}#Header .content{float:right;height:100%;margin-right:50px;text-align:center;width:calc(100% - 150px)}#Header .user-con{align-items:center;display:flex;float:right;height:100%;justify-content:center;position:relative;width:100px}#Header .user-con .user{border-radius:50%;color:var(--primary);cursor:pointer;float:right;font-size:18px;height:30px;line-height:30px;text-align:center;width:30px}#Header .user-con .user:hover{color:var(--primary-dark)}#Header .user-con .user-drop-down{background-color:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow);display:none;left:20px;overflow:hidden;position:absolute;top:55px;width:150px}#Header .user-con .user-drop-down .username{float:right;font-weight:700;line-height:35px;text-align:center;width:100%}::ng-deep #LogoutButtonInput .control{border-radius:0}@media (max-width:399.98px){#Header .content{font-size:12px;width:calc(100% - 100px)}#Header .user-con{width:50px}}@media (min-width:400px) and (max-width:499.98px){#Header .content{font-size:12px;width:calc(100% - 100px)}#Header .user-con{width:50px}}"]
|
|
2531
|
-
},] }
|
|
2532
|
-
];
|
|
2533
|
-
HeaderComponent.ctorParameters = function () { return [
|
|
2534
|
-
{ type: PsToolkitUiConfigService }
|
|
2535
|
-
]; };
|
|
2536
|
-
HeaderComponent.propDecorators = {
|
|
2537
|
-
currentData: [{ type: core.Input }],
|
|
2538
|
-
logout: [{ type: core.Output }]
|
|
2539
|
-
};
|
|
2540
|
-
|
|
2541
2522
|
var ModalComponent = /** @class */ (function () {
|
|
2542
2523
|
function ModalComponent() {
|
|
2543
2524
|
}
|
|
@@ -7729,21 +7710,20 @@
|
|
|
7729
7710
|
|
|
7730
7711
|
var LayoutComponent = /** @class */ (function () {
|
|
7731
7712
|
function LayoutComponent() {
|
|
7732
|
-
this.logout = new core.EventEmitter();
|
|
7733
7713
|
}
|
|
7734
7714
|
return LayoutComponent;
|
|
7735
7715
|
}());
|
|
7736
7716
|
LayoutComponent.decorators = [
|
|
7737
7717
|
{ type: core.Component, args: [{
|
|
7738
7718
|
selector: 'lib-layout',
|
|
7739
|
-
template: "<div id=\"Layout\">\r\n <div class=\"layout-con\">\r\n <div class=\"panel\" *ngIf=\"currentData.user != null\">\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
|
|
7719
|
+
template: "<div id=\"Layout\">\r\n <div class=\"layout-con\">\r\n <div class=\"panel\" *ngIf=\"currentData.user != null\">\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 [header]=\"header\">\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 <lib-footer></lib-footer>\r\n </div>\r\n</div>\r\n",
|
|
7740
7720
|
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:599.98px){#Layout .panel .content .content-scroll-con{height:calc(100vh - 50px);min-height:calc(100vh - 50px)}}"]
|
|
7741
7721
|
},] }
|
|
7742
7722
|
];
|
|
7743
7723
|
LayoutComponent.ctorParameters = function () { return []; };
|
|
7744
7724
|
LayoutComponent.propDecorators = {
|
|
7745
7725
|
currentData: [{ type: core.Input }],
|
|
7746
|
-
|
|
7726
|
+
header: [{ type: core.Input }]
|
|
7747
7727
|
};
|
|
7748
7728
|
|
|
7749
7729
|
var FormHiddenComponent = /** @class */ (function () {
|
|
@@ -8866,6 +8846,11 @@
|
|
|
8866
8846
|
window.open('/report' + _this.getOptionUrl(option.Url, _this.permissions.RelatedId, '') + (params ? '?' + params : ''), '_blank');
|
|
8867
8847
|
};
|
|
8868
8848
|
}
|
|
8849
|
+
else if (option.InputAction === exports.PermissionInputActionEnum.OnClick) {
|
|
8850
|
+
opt.onClick = function (btn) {
|
|
8851
|
+
_this.optionsActions.find(function (x) { return x.name === option.Action; }).onClick(btn);
|
|
8852
|
+
};
|
|
8853
|
+
}
|
|
8869
8854
|
else {
|
|
8870
8855
|
opt.onClick = function () {
|
|
8871
8856
|
var p = new PermissionClass();
|