ps-toolkit-ui 0.0.180 → 0.0.184
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 +37 -39
- 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 +5 -5
- package/esm2015/lib/classes/form.class.js +2 -2
- package/esm2015/lib/classes/table.class.js +19 -16
- package/esm2015/lib/components/form/label/form.label.component.js +1 -6
- package/esm2015/lib/components/table/row/table.row.component.js +10 -10
- package/fesm2015/ps-toolkit-ui.js +32 -35
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +5 -5
- package/lib/classes/table.class.d.ts +1 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -814,16 +814,16 @@
|
|
|
814
814
|
PermissionAccessTypeEnum[PermissionAccessTypeEnum["Insert"] = 2] = "Insert";
|
|
815
815
|
PermissionAccessTypeEnum[PermissionAccessTypeEnum["Update"] = 3] = "Update";
|
|
816
816
|
PermissionAccessTypeEnum[PermissionAccessTypeEnum["Delete"] = 4] = "Delete";
|
|
817
|
+
PermissionAccessTypeEnum[PermissionAccessTypeEnum["Print"] = 5] = "Print";
|
|
817
818
|
})(exports.PermissionAccessTypeEnum || (exports.PermissionAccessTypeEnum = {}));
|
|
818
819
|
(function (PermissionInputActionEnum) {
|
|
819
820
|
PermissionInputActionEnum[PermissionInputActionEnum["None"] = 0] = "None";
|
|
820
821
|
PermissionInputActionEnum[PermissionInputActionEnum["OnClick"] = 1] = "OnClick";
|
|
821
822
|
PermissionInputActionEnum[PermissionInputActionEnum["Link"] = 2] = "Link";
|
|
822
823
|
PermissionInputActionEnum[PermissionInputActionEnum["LinkNewTab"] = 3] = "LinkNewTab";
|
|
823
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
824
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
825
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
826
|
-
PermissionInputActionEnum[PermissionInputActionEnum["Confirm"] = 7] = "Confirm";
|
|
824
|
+
PermissionInputActionEnum[PermissionInputActionEnum["File"] = 4] = "File";
|
|
825
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Modal"] = 5] = "Modal";
|
|
826
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Confirm"] = 6] = "Confirm";
|
|
827
827
|
})(exports.PermissionInputActionEnum || (exports.PermissionInputActionEnum = {}));
|
|
828
828
|
(function (PermissionInputTypeEnum) {
|
|
829
829
|
PermissionInputTypeEnum[PermissionInputTypeEnum["Icon"] = 0] = "Icon";
|
|
@@ -1667,7 +1667,7 @@
|
|
|
1667
1667
|
var ivs = _.get(d, inp.name.replace('Id', ''));
|
|
1668
1668
|
inp.setValue({ Search: ivs, Value: iv }, true);
|
|
1669
1669
|
}
|
|
1670
|
-
else if (inp.type !== exports.InputType.Label) {
|
|
1670
|
+
else if (inp.type !== exports.InputType.Label || iv != null) {
|
|
1671
1671
|
inp.setValue(iv, true);
|
|
1672
1672
|
}
|
|
1673
1673
|
if (inp.type === exports.InputType.SelectAutoCompletePlaque || inp.type === exports.InputType.SelectAutoComplete) {
|
|
@@ -2644,6 +2644,15 @@
|
|
|
2644
2644
|
}
|
|
2645
2645
|
};
|
|
2646
2646
|
}
|
|
2647
|
+
else if (option.AccessType === exports.PermissionAccessTypeEnum.Print) {
|
|
2648
|
+
var p = new PermissionClass();
|
|
2649
|
+
p.RelatedId = 'Index';
|
|
2650
|
+
p.Area = this_1.table.permissions.Area;
|
|
2651
|
+
p.Controller = 'Print';
|
|
2652
|
+
p.Action = option.Controller;
|
|
2653
|
+
opt.url = '/Report' + p.getUrl() + '/' + this_1.row.Data.Id;
|
|
2654
|
+
opt.urlNewTab = true;
|
|
2655
|
+
}
|
|
2647
2656
|
else if (option.InputAction === exports.PermissionInputActionEnum.Link || option.InputAction === exports.PermissionInputActionEnum.LinkNewTab) {
|
|
2648
2657
|
var p = new PermissionClass();
|
|
2649
2658
|
p.RelatedId = this_1.table.permissions.RelatedId;
|
|
@@ -2709,15 +2718,6 @@
|
|
|
2709
2718
|
}
|
|
2710
2719
|
};
|
|
2711
2720
|
}
|
|
2712
|
-
else if (option.InputAction === exports.PermissionInputActionEnum.Report) {
|
|
2713
|
-
var p = new PermissionClass();
|
|
2714
|
-
p.RelatedId = 'Index';
|
|
2715
|
-
p.Area = this_1.table.permissions.Area;
|
|
2716
|
-
p.Controller = 'Print';
|
|
2717
|
-
p.Action = option.Controller;
|
|
2718
|
-
opt.url = '/Report' + p.getUrl() + '/' + this_1.row.Data.Id;
|
|
2719
|
-
opt.urlNewTab = true;
|
|
2720
|
-
}
|
|
2721
2721
|
else if (option.InputAction === exports.PermissionInputActionEnum.File) {
|
|
2722
2722
|
var p = new PermissionClass();
|
|
2723
2723
|
p.RelatedId = this_1.table.permissions.RelatedId;
|
|
@@ -4078,12 +4078,7 @@
|
|
|
4078
4078
|
FormLabelComponent.prototype.ngOnInit = function () {
|
|
4079
4079
|
var _this = this;
|
|
4080
4080
|
this.inp.setValue = function (v) {
|
|
4081
|
-
console.log(v);
|
|
4082
4081
|
_this.inp.value = v;
|
|
4083
|
-
console.log(_this.inp.value);
|
|
4084
|
-
setTimeout(function () {
|
|
4085
|
-
_this.inp.value = v;
|
|
4086
|
-
}, 5000);
|
|
4087
4082
|
};
|
|
4088
4083
|
this.inp.isValid = function () {
|
|
4089
4084
|
return true;
|
|
@@ -7175,19 +7170,21 @@
|
|
|
7175
7170
|
this.loading = false;
|
|
7176
7171
|
}
|
|
7177
7172
|
};
|
|
7178
|
-
TableClass.prototype.searchData = function () {
|
|
7173
|
+
TableClass.prototype.searchData = function (report) {
|
|
7179
7174
|
var e_1, _a;
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7175
|
+
if (report === void 0) { report = false; }
|
|
7176
|
+
var d = {};
|
|
7177
|
+
if (!report) {
|
|
7178
|
+
d.Page = this.page;
|
|
7179
|
+
d.PerPage = this.perPage;
|
|
7180
|
+
if (this.sortable) {
|
|
7181
|
+
d.Sort = 'Priority';
|
|
7182
|
+
d.SortType = 'ASC';
|
|
7183
|
+
}
|
|
7184
|
+
else if (this.sort) {
|
|
7185
|
+
d.Sort = this.sort;
|
|
7186
|
+
d.SortType = this.sortType;
|
|
7187
|
+
}
|
|
7191
7188
|
}
|
|
7192
7189
|
try {
|
|
7193
7190
|
for (var _b = __values(this.cols.filter(function (x) { return x.withSearch && x.search != null && x.search.data() != null && x.search.data() !== ''; })), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -7273,14 +7270,15 @@
|
|
|
7273
7270
|
}
|
|
7274
7271
|
}
|
|
7275
7272
|
}
|
|
7276
|
-
else if (access.
|
|
7277
|
-
var
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
accessInp.
|
|
7283
|
-
|
|
7273
|
+
else if (access.AccessType === exports.PermissionAccessTypeEnum.Print) {
|
|
7274
|
+
var p_1 = new PermissionClass();
|
|
7275
|
+
p_1.RelatedId = 'Index';
|
|
7276
|
+
p_1.Area = this_1.permissions.Area;
|
|
7277
|
+
p_1.Controller = 'Print';
|
|
7278
|
+
p_1.Action = this_1.permissions.Controller;
|
|
7279
|
+
accessInp.onClick = function () {
|
|
7280
|
+
window.open('/Report' + p_1.getUrl() + '?' + $.param(_this.searchData(true)), '_blank');
|
|
7281
|
+
};
|
|
7284
7282
|
}
|
|
7285
7283
|
else if (access.InputAction === exports.PermissionInputActionEnum.OnClick) {
|
|
7286
7284
|
accessInp.onClick = function (btn) {
|