ps-toolkit-ui 1.22.36 → 1.22.37
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 +29 -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/form/table/form.table.component.js +29 -3
- package/fesm2015/ps-toolkit-ui.js +27 -1
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/table/form.table.component.d.ts +2 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -7546,6 +7546,32 @@
|
|
|
7546
7546
|
this.inp.onChange(e);
|
|
7547
7547
|
}
|
|
7548
7548
|
};
|
|
7549
|
+
FormTableComponent.prototype.onCopy = function (event) {
|
|
7550
|
+
if (this.inp.table.data().length) {
|
|
7551
|
+
event.preventDefault();
|
|
7552
|
+
var data = JSON.stringify({
|
|
7553
|
+
table: this.inp.table.name,
|
|
7554
|
+
rows: this.inp.table.data()
|
|
7555
|
+
});
|
|
7556
|
+
navigator.clipboard.writeText(data).then(function () { });
|
|
7557
|
+
}
|
|
7558
|
+
};
|
|
7559
|
+
FormTableComponent.prototype.onPaste = function (event) {
|
|
7560
|
+
var _b;
|
|
7561
|
+
var _this = this;
|
|
7562
|
+
var _a;
|
|
7563
|
+
var text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
|
|
7564
|
+
var data = JSON.parse(text);
|
|
7565
|
+
if (data.table === this.inp.table.name) {
|
|
7566
|
+
(_b = this.inp.table.rows).push.apply(_b, __spread(data.rows.map(function (row) {
|
|
7567
|
+
row.Id = parseInt(HelperClass.random(5, false, false), 10);
|
|
7568
|
+
return {
|
|
7569
|
+
Data: row,
|
|
7570
|
+
Options: _this.inp.table.permissions.Accesses.filter(function (a) { return a.AccessType === exports.PermissionAccessTypeEnum.Update || a.AccessType === exports.PermissionAccessTypeEnum.Delete; })
|
|
7571
|
+
};
|
|
7572
|
+
})));
|
|
7573
|
+
}
|
|
7574
|
+
};
|
|
7549
7575
|
return FormTableComponent;
|
|
7550
7576
|
}());
|
|
7551
7577
|
FormTableComponent.decorators = [
|
|
@@ -7558,7 +7584,9 @@
|
|
|
7558
7584
|
FormTableComponent.ctorParameters = function () { return []; };
|
|
7559
7585
|
FormTableComponent.propDecorators = {
|
|
7560
7586
|
inp: [{ type: core.Input }],
|
|
7561
|
-
changeIndex: [{ type: core.Output }]
|
|
7587
|
+
changeIndex: [{ type: core.Output }],
|
|
7588
|
+
onCopy: [{ type: core.HostListener, args: ['document:copy', ['$event'],] }],
|
|
7589
|
+
onPaste: [{ type: core.HostListener, args: ['document:paste', ['$event'],] }]
|
|
7562
7590
|
};
|
|
7563
7591
|
|
|
7564
7592
|
var FormTextareaComponent = /** @class */ (function () {
|