ods-component-lib 1.17.141 → 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 +16 -28
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +16 -28
- 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,9 @@ 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, {
|
|
1439
1432
|
message: col.requiredMessage
|
|
1440
1433
|
}), col.dataField === 'IsActive' && React__default.createElement(dataGrid.HeaderFilter, {
|
|
1441
1434
|
dataSource: [{
|
|
@@ -1521,12 +1514,7 @@ function grid(props, dataGridRef) {
|
|
|
1521
1514
|
column: props.totalColumunName == undefined ? "Id" : props.totalColumunName,
|
|
1522
1515
|
summaryType: "count",
|
|
1523
1516
|
displayFormat: props.TotaDatalLanguage + " : " + props.TotalDataCount == undefined ? "{0}" : props.TotalDataCount
|
|
1524
|
-
}))
|
|
1525
|
-
enabled: true,
|
|
1526
|
-
type: "custom",
|
|
1527
|
-
customLoad: customLoad,
|
|
1528
|
-
customSave: customSave
|
|
1529
|
-
}))));
|
|
1517
|
+
})))));
|
|
1530
1518
|
}
|
|
1531
1519
|
|
|
1532
1520
|
var exportFormats$1 = ['xlsx'];
|