ods-component-lib 1.17.145 → 1.17.147
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 +32 -31
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +33 -32
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1278,18 +1278,6 @@ 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
|
-
};
|
|
1293
1281
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
1294
1282
|
var onExporting = function onExporting(e) {
|
|
1295
1283
|
if (e.format === 'xlsx') {
|
|
@@ -1319,6 +1307,27 @@ function grid(props, dataGridRef) {
|
|
|
1319
1307
|
});
|
|
1320
1308
|
}
|
|
1321
1309
|
};
|
|
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
|
+
};
|
|
1322
1331
|
React.useEffect(function () {
|
|
1323
1332
|
localization.locale(localStorage.getItem("locale"));
|
|
1324
1333
|
localization.loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
|
|
@@ -1424,24 +1433,11 @@ function grid(props, dataGridRef) {
|
|
|
1424
1433
|
allowExportSelectedData: true,
|
|
1425
1434
|
formats: exportFormats
|
|
1426
1435
|
}), props.columns.map(function (col) {
|
|
1427
|
-
return React__default.createElement(dataGrid.Column,
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
})
|
|
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
|
-
}));
|
|
1436
|
+
return React__default.createElement(dataGrid.Column, {
|
|
1437
|
+
dataField: col.dataField,
|
|
1438
|
+
dataType: col.dataType,
|
|
1439
|
+
caption: col.caption
|
|
1440
|
+
});
|
|
1445
1441
|
}), function () {
|
|
1446
1442
|
if (props.customPopup !== undefined) {
|
|
1447
1443
|
return React__default.createElement(dataGrid.Column, {
|
|
@@ -1514,7 +1510,12 @@ function grid(props, dataGridRef) {
|
|
|
1514
1510
|
column: props.totalColumunName == undefined ? "Id" : props.totalColumunName,
|
|
1515
1511
|
summaryType: "count",
|
|
1516
1512
|
displayFormat: props.TotaDatalLanguage + " : " + props.TotalDataCount == undefined ? "{0}" : props.TotalDataCount
|
|
1517
|
-
}))
|
|
1513
|
+
})), React__default.createElement(dataGrid.StateStoring, {
|
|
1514
|
+
enabled: true,
|
|
1515
|
+
type: "custom",
|
|
1516
|
+
customLoad: customLoad,
|
|
1517
|
+
customSave: customSave
|
|
1518
|
+
}))));
|
|
1518
1519
|
}
|
|
1519
1520
|
|
|
1520
1521
|
var exportFormats$1 = ['xlsx'];
|