ods-component-lib 1.17.143 → 1.17.145
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 +29 -28
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +30 -29
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1278,6 +1278,18 @@ function OdsDataGrid(props) {
|
|
|
1278
1278
|
return grid(props, dataGridRef);
|
|
1279
1279
|
}
|
|
1280
1280
|
function grid(props, dataGridRef) {
|
|
1281
|
+
var headerCellRender = function headerCellRender(colProperties) {
|
|
1282
|
+
return React__default.createElement("th", {
|
|
1283
|
+
className: "dx-datagrid-headers",
|
|
1284
|
+
style: {
|
|
1285
|
+
fontFamily: "Manrope",
|
|
1286
|
+
fontSize: "14px",
|
|
1287
|
+
fontStyle: "normal",
|
|
1288
|
+
fontWeight: "600",
|
|
1289
|
+
lineHeight: "22px"
|
|
1290
|
+
}
|
|
1291
|
+
}, colProperties.column.caption);
|
|
1292
|
+
};
|
|
1281
1293
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
1282
1294
|
var onExporting = function onExporting(e) {
|
|
1283
1295
|
if (e.format === 'xlsx') {
|
|
@@ -1307,27 +1319,6 @@ function grid(props, dataGridRef) {
|
|
|
1307
1319
|
});
|
|
1308
1320
|
}
|
|
1309
1321
|
};
|
|
1310
|
-
var customLoad = function customLoad() {
|
|
1311
|
-
var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
|
|
1312
|
-
if (localStorage.getItem(props.exportFileName + "Storage")) {
|
|
1313
|
-
state.selectedRowKeys = [];
|
|
1314
|
-
if (props.filterEnabledShow) state.filterPanel = {
|
|
1315
|
-
filterEnabled: false
|
|
1316
|
-
};else state.filterPanel = {
|
|
1317
|
-
filterEnabled: true
|
|
1318
|
-
};
|
|
1319
|
-
}
|
|
1320
|
-
return state;
|
|
1321
|
-
};
|
|
1322
|
-
var customSave = function customSave(state) {
|
|
1323
|
-
state.selectedRowKeys = [];
|
|
1324
|
-
if (props.filterEnabledShow) state.filterPanel = {
|
|
1325
|
-
filterEnabled: false
|
|
1326
|
-
};else state.filterPanel = {
|
|
1327
|
-
filterEnabled: true
|
|
1328
|
-
};
|
|
1329
|
-
localStorage.setItem(props.exportFileName + "Storage", JSON.stringify(state));
|
|
1330
|
-
};
|
|
1331
1322
|
React.useEffect(function () {
|
|
1332
1323
|
localization.locale(localStorage.getItem("locale"));
|
|
1333
1324
|
localization.loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
|
|
@@ -1435,7 +1426,22 @@ function grid(props, dataGridRef) {
|
|
|
1435
1426
|
}), props.columns.map(function (col) {
|
|
1436
1427
|
return React__default.createElement(dataGrid.Column, Object.assign({
|
|
1437
1428
|
key: col.dataField
|
|
1438
|
-
}, col
|
|
1429
|
+
}, col, {
|
|
1430
|
+
headerCellRender: headerCellRender
|
|
1431
|
+
}), col.required && React__default.createElement(dataGrid.RequiredRule, {
|
|
1432
|
+
message: col.requiredMessage
|
|
1433
|
+
}), col.dataField === 'IsActive' && React__default.createElement(dataGrid.HeaderFilter, {
|
|
1434
|
+
dataSource: [{
|
|
1435
|
+
text: 'All',
|
|
1436
|
+
value: null
|
|
1437
|
+
}, {
|
|
1438
|
+
text: 'Active',
|
|
1439
|
+
value: true
|
|
1440
|
+
}, {
|
|
1441
|
+
text: 'Passive',
|
|
1442
|
+
value: false
|
|
1443
|
+
}]
|
|
1444
|
+
}));
|
|
1439
1445
|
}), function () {
|
|
1440
1446
|
if (props.customPopup !== undefined) {
|
|
1441
1447
|
return React__default.createElement(dataGrid.Column, {
|
|
@@ -1508,12 +1514,7 @@ function grid(props, dataGridRef) {
|
|
|
1508
1514
|
column: props.totalColumunName == undefined ? "Id" : props.totalColumunName,
|
|
1509
1515
|
summaryType: "count",
|
|
1510
1516
|
displayFormat: props.TotaDatalLanguage + " : " + props.TotalDataCount == undefined ? "{0}" : props.TotalDataCount
|
|
1511
|
-
}))
|
|
1512
|
-
enabled: true,
|
|
1513
|
-
type: "custom",
|
|
1514
|
-
customLoad: customLoad,
|
|
1515
|
-
customSave: customSave
|
|
1516
|
-
}))));
|
|
1517
|
+
})))));
|
|
1517
1518
|
}
|
|
1518
1519
|
|
|
1519
1520
|
var exportFormats$1 = ['xlsx'];
|