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.modern.js
CHANGED
|
@@ -9,7 +9,7 @@ import PhoneInput from 'react-phone-input-2';
|
|
|
9
9
|
import message from 'antd/es/message';
|
|
10
10
|
import Parser from 'html-react-parser';
|
|
11
11
|
import { locale, loadMessages } from 'devextreme/localization';
|
|
12
|
-
import { DataGrid, LoadPanel, Paging, Pager, SearchPanel, FilterRow, FilterPanel, HeaderFilter, ColumnChooser, Position, ColumnChooserSearch, ColumnChooserSelection, Selection, Editing, Popup, Form as Form$1, Scrolling, Export, Column, Button as Button$1, Toolbar, Item as Item$1, Summary, TotalItem, StateStoring
|
|
12
|
+
import { DataGrid, LoadPanel, Paging, Pager, SearchPanel, FilterRow, FilterPanel, HeaderFilter, ColumnChooser, Position, ColumnChooserSearch, ColumnChooserSelection, Selection, Editing, Popup, Form as Form$1, Scrolling, Export, Column, RequiredRule, Button as Button$1, Toolbar, Item as Item$1, Summary, TotalItem, StateStoring } from 'devextreme-react/data-grid';
|
|
13
13
|
import { Item } from 'devextreme-react/form';
|
|
14
14
|
import { exportDataGrid as exportDataGrid$1 } from 'devextreme/pdf_exporter';
|
|
15
15
|
import { exportDataGrid } from 'devextreme/excel_exporter';
|
|
@@ -1281,7 +1281,27 @@ function grid(props, dataGridRef) {
|
|
|
1281
1281
|
exportDataGrid({
|
|
1282
1282
|
component: e.component,
|
|
1283
1283
|
worksheet: workbook.addWorksheet('Main sheet'),
|
|
1284
|
-
autoFilterEnabled: true
|
|
1284
|
+
autoFilterEnabled: true,
|
|
1285
|
+
customizeCell: function customizeCell(_ref) {
|
|
1286
|
+
var gridCell = _ref.gridCell,
|
|
1287
|
+
excelCell = _ref.excelCell;
|
|
1288
|
+
if (gridCell.rowType === 'data') {
|
|
1289
|
+
if (gridCell.column.dataField === 'IsActive') {
|
|
1290
|
+
excelCell.value = {
|
|
1291
|
+
text: gridCell.value == "Active" ? "Aktif" : "Pasif"
|
|
1292
|
+
};
|
|
1293
|
+
excelCell.font = {
|
|
1294
|
+
color: {
|
|
1295
|
+
argb: 'FF0000FF'
|
|
1296
|
+
},
|
|
1297
|
+
underline: true
|
|
1298
|
+
};
|
|
1299
|
+
excelCell.alignment = {
|
|
1300
|
+
horizontal: 'left'
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1285
1305
|
}).then(function () {
|
|
1286
1306
|
workbook.xlsx.writeBuffer().then(function (buffer) {
|
|
1287
1307
|
saveAs(new Blob([buffer], {
|
|
@@ -1429,11 +1449,22 @@ function grid(props, dataGridRef) {
|
|
|
1429
1449
|
allowExportSelectedData: true,
|
|
1430
1450
|
formats: exportFormats
|
|
1431
1451
|
}), props.columns.map(function (col) {
|
|
1432
|
-
return React.createElement(Column, {
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
})
|
|
1452
|
+
return React.createElement(Column, Object.assign({
|
|
1453
|
+
key: col.dataField
|
|
1454
|
+
}, col), col.required && React.createElement(RequiredRule, {
|
|
1455
|
+
message: col.requiredMessage
|
|
1456
|
+
}), col.dataField === 'IsActive' && React.createElement(HeaderFilter, {
|
|
1457
|
+
dataSource: [{
|
|
1458
|
+
text: 'All',
|
|
1459
|
+
value: null
|
|
1460
|
+
}, {
|
|
1461
|
+
text: 'Active',
|
|
1462
|
+
value: true
|
|
1463
|
+
}, {
|
|
1464
|
+
text: 'Passive',
|
|
1465
|
+
value: false
|
|
1466
|
+
}]
|
|
1467
|
+
}));
|
|
1437
1468
|
}), function () {
|
|
1438
1469
|
if (props.customPopup !== undefined) {
|
|
1439
1470
|
return React.createElement(Column, {
|