ps-toolkit-ui 1.20.46 → 1.20.48
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 +25 -1
- 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/table/table.component.js +26 -2
- package/fesm2015/ps-toolkit-ui.js +25 -1
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/scripts/base.js +7 -1
|
@@ -3887,7 +3887,7 @@
|
|
|
3887
3887
|
TableComponent.prototype.ngOnInit = function () {
|
|
3888
3888
|
var _this = this;
|
|
3889
3889
|
this.reload = new InputClass(this.table.environment, this.table.l, 'Reload', 'fad fa-sync-alt', exports.InputType.Icon, 'm-r-10-p');
|
|
3890
|
-
this.export = new InputClass(this.table.environment, this.table.l, 'Export', 'fad fa-download f-s-21', exports.InputType.Icon, 'm-r-10-p');
|
|
3890
|
+
this.export = new InputClass(this.table.environment, this.table.l, 'Export', 'fad fa-download f-s-21', exports.InputType.Icon, 'm-r-10-p export-dropdown-icon');
|
|
3891
3891
|
this.excel = new InputClass(this.table.environment, this.table.l, 'ExportExcel', 'fad fa-file-excel f-s-21', exports.InputType.Button, 'white f-s-11 h-35 p-0');
|
|
3892
3892
|
// this.excel = new InputClass(this.table.environment, this.table.l, 'ExportExcel', 'fad fa-file-excel f-s-21', InputType.Icon, 'm-r-10-p');
|
|
3893
3893
|
this.pdf = new InputClass(this.table.environment, this.table.l, 'ExportPdf', 'fad fa-file-pdf f-s-21', exports.InputType.Button, 'white f-s-11 h-35 p-0');
|
|
@@ -3953,10 +3953,34 @@
|
|
|
3953
3953
|
_this.table.excel();
|
|
3954
3954
|
};
|
|
3955
3955
|
this.print.onClick = function () {
|
|
3956
|
+
var getWidthValue = function (str) {
|
|
3957
|
+
var matches = __spread(str.matchAll(/w-(\d+)(?:-(\d+))?/g));
|
|
3958
|
+
if (!matches.length) {
|
|
3959
|
+
return null;
|
|
3960
|
+
}
|
|
3961
|
+
var max = matches.reduce(function (best, m) {
|
|
3962
|
+
var first = +m[1];
|
|
3963
|
+
var second = +m[2] || null;
|
|
3964
|
+
if (!best || first > best.first) {
|
|
3965
|
+
return { first: first, second: second };
|
|
3966
|
+
}
|
|
3967
|
+
return best;
|
|
3968
|
+
}, null);
|
|
3969
|
+
var s = (max.second || max.first);
|
|
3970
|
+
return s == null ? 100 : s;
|
|
3971
|
+
};
|
|
3956
3972
|
var url = _this.table.permissions.getAccess(exports.PermissionAccessTypeEnum.List).Url.replace('/list', '/report').replace('-list', '-report');
|
|
3957
3973
|
var data = _this.table.searchData();
|
|
3958
3974
|
data.Page = 1;
|
|
3959
3975
|
data.PerPage = -1;
|
|
3976
|
+
data.Cols = _this.table.cols.map(function (x) {
|
|
3977
|
+
return {
|
|
3978
|
+
Name: x.name,
|
|
3979
|
+
TrnName: _this.table.l(x.name),
|
|
3980
|
+
Width: getWidthValue(x.class),
|
|
3981
|
+
Type: x.type,
|
|
3982
|
+
};
|
|
3983
|
+
});
|
|
3960
3984
|
new RequestClass(_this.table.environment, _this.table.l).send(url, exports.Method.Post, data, _this.print, function (result) {
|
|
3961
3985
|
window.open(_this.table.environment.url + '/report' + url + '?reportId=' + result, '_blank');
|
|
3962
3986
|
}, function () { });
|