@colijnit/corecomponents_v12 257.1.34 → 257.1.35
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/colijnit-corecomponents_v12.umd.js +14 -2
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/simple-grid/base-simple-grid.component.js +9 -1
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +3 -3
- package/fesm2015/colijnit-corecomponents_v12.js +10 -2
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/simple-grid/base-simple-grid.component.d.ts +3 -0
- package/package.json +1 -1
|
@@ -9960,6 +9960,7 @@
|
|
|
9960
9960
|
this.headerColumns = [];
|
|
9961
9961
|
this.headerColumnsCopy = [];
|
|
9962
9962
|
this._data = [];
|
|
9963
|
+
this._exportData = [];
|
|
9963
9964
|
this.disabledRows = [];
|
|
9964
9965
|
this._prepared = false;
|
|
9965
9966
|
}
|
|
@@ -9983,6 +9984,16 @@
|
|
|
9983
9984
|
enumerable: false,
|
|
9984
9985
|
configurable: true
|
|
9985
9986
|
});
|
|
9987
|
+
Object.defineProperty(BaseSimpleGridComponent.prototype, "exportData", {
|
|
9988
|
+
get: function () {
|
|
9989
|
+
return this._exportData;
|
|
9990
|
+
},
|
|
9991
|
+
set: function (value) {
|
|
9992
|
+
this._exportData = value;
|
|
9993
|
+
},
|
|
9994
|
+
enumerable: false,
|
|
9995
|
+
configurable: true
|
|
9996
|
+
});
|
|
9986
9997
|
Object.defineProperty(BaseSimpleGridComponent.prototype, "extraColumns", {
|
|
9987
9998
|
set: function (value) {
|
|
9988
9999
|
this._setColumns(value);
|
|
@@ -10091,6 +10102,7 @@
|
|
|
10091
10102
|
BaseSimpleGridComponent.propDecorators = {
|
|
10092
10103
|
content: [{ type: i0.ContentChildren, args: [SimpleGridColumnDirective,] }],
|
|
10093
10104
|
data: [{ type: i0.Input }],
|
|
10105
|
+
exportData: [{ type: i0.Input }],
|
|
10094
10106
|
dragDropEnabled: [{ type: i0.Input }],
|
|
10095
10107
|
resizable: [{ type: i0.Input }],
|
|
10096
10108
|
inlineEdit: [{ type: i0.Input }],
|
|
@@ -10562,7 +10574,7 @@
|
|
|
10562
10574
|
};
|
|
10563
10575
|
SimpleGridComponent.prototype.exportToExcel = function () {
|
|
10564
10576
|
this.isSettingsMenuOpen = false;
|
|
10565
|
-
var exportData = this._filterSelectedOrReturnAll(this.data);
|
|
10577
|
+
var exportData = this.exportData.length > 0 ? this._filterSelectedOrReturnAll(this.exportData) : this._filterSelectedOrReturnAll(this.data);
|
|
10566
10578
|
var columns = this.headerColumnsCopy.map(function (column) {
|
|
10567
10579
|
return ({
|
|
10568
10580
|
key: column.field,
|
|
@@ -10579,7 +10591,7 @@
|
|
|
10579
10591
|
}
|
|
10580
10592
|
else if (typeof value === 'number') {
|
|
10581
10593
|
var hasDecimal = function (num) { return !Number.isInteger(num); };
|
|
10582
|
-
return hasDecimal ? value.toFixed(2) : value.toFixed(0);
|
|
10594
|
+
return hasDecimal(value) ? value.toFixed(2) : value.toFixed(0);
|
|
10583
10595
|
}
|
|
10584
10596
|
else if (Array.isArray(value)) {
|
|
10585
10597
|
return value.join(', ');
|