ods-component-lib 1.17.147 → 1.17.149
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/dist/index.js +37 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +38 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1285,7 +1285,27 @@ function grid(props, dataGridRef) {
|
|
|
1285
1285
|
excel_exporter.exportDataGrid({
|
|
1286
1286
|
component: e.component,
|
|
1287
1287
|
worksheet: workbook.addWorksheet('Main sheet'),
|
|
1288
|
-
autoFilterEnabled: true
|
|
1288
|
+
autoFilterEnabled: true,
|
|
1289
|
+
customizeCell: function customizeCell(_ref) {
|
|
1290
|
+
var gridCell = _ref.gridCell,
|
|
1291
|
+
excelCell = _ref.excelCell;
|
|
1292
|
+
if (gridCell.rowType === 'data') {
|
|
1293
|
+
if (gridCell.column.dataField === 'IsActive') {
|
|
1294
|
+
excelCell.value = {
|
|
1295
|
+
text: gridCell.value == "Active" ? "Aktif" : "Pasif"
|
|
1296
|
+
};
|
|
1297
|
+
excelCell.font = {
|
|
1298
|
+
color: {
|
|
1299
|
+
argb: 'FF0000FF'
|
|
1300
|
+
},
|
|
1301
|
+
underline: true
|
|
1302
|
+
};
|
|
1303
|
+
excelCell.alignment = {
|
|
1304
|
+
horizontal: 'left'
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1289
1309
|
}).then(function () {
|
|
1290
1310
|
workbook.xlsx.writeBuffer().then(function (buffer) {
|
|
1291
1311
|
fileSaverEs.saveAs(new Blob([buffer], {
|
|
@@ -1433,11 +1453,22 @@ function grid(props, dataGridRef) {
|
|
|
1433
1453
|
allowExportSelectedData: true,
|
|
1434
1454
|
formats: exportFormats
|
|
1435
1455
|
}), props.columns.map(function (col) {
|
|
1436
|
-
return React__default.createElement(dataGrid.Column, {
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
})
|
|
1456
|
+
return React__default.createElement(dataGrid.Column, Object.assign({
|
|
1457
|
+
key: col.dataField
|
|
1458
|
+
}, col), col.required && React__default.createElement(dataGrid.RequiredRule, {
|
|
1459
|
+
message: col.requiredMessage
|
|
1460
|
+
}), col.dataField === 'IsActive' && React__default.createElement(dataGrid.HeaderFilter, {
|
|
1461
|
+
dataSource: [{
|
|
1462
|
+
text: 'All',
|
|
1463
|
+
value: null
|
|
1464
|
+
}, {
|
|
1465
|
+
text: 'Active',
|
|
1466
|
+
value: true
|
|
1467
|
+
}, {
|
|
1468
|
+
text: 'Passive',
|
|
1469
|
+
value: false
|
|
1470
|
+
}]
|
|
1471
|
+
}));
|
|
1441
1472
|
}), function () {
|
|
1442
1473
|
if (props.customPopup !== undefined) {
|
|
1443
1474
|
return React__default.createElement(dataGrid.Column, {
|