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.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,
|
|
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, RequiredRule } 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';
|
|
@@ -1274,18 +1274,6 @@ function OdsDataGrid(props) {
|
|
|
1274
1274
|
return grid(props, dataGridRef);
|
|
1275
1275
|
}
|
|
1276
1276
|
function grid(props, dataGridRef) {
|
|
1277
|
-
var headerCellRender = function headerCellRender(colProperties) {
|
|
1278
|
-
return React.createElement("th", {
|
|
1279
|
-
className: "dx-datagrid-headers",
|
|
1280
|
-
style: {
|
|
1281
|
-
fontFamily: "Manrope",
|
|
1282
|
-
fontSize: "14px",
|
|
1283
|
-
fontStyle: "normal",
|
|
1284
|
-
fontWeight: "600",
|
|
1285
|
-
lineHeight: "22px"
|
|
1286
|
-
}
|
|
1287
|
-
}, colProperties.column.caption);
|
|
1288
|
-
};
|
|
1289
1277
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
1290
1278
|
var onExporting = function onExporting(e) {
|
|
1291
1279
|
if (e.format === 'xlsx') {
|
|
@@ -1315,6 +1303,27 @@ function grid(props, dataGridRef) {
|
|
|
1315
1303
|
});
|
|
1316
1304
|
}
|
|
1317
1305
|
};
|
|
1306
|
+
var customLoad = function customLoad() {
|
|
1307
|
+
var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
|
|
1308
|
+
if (localStorage.getItem(props.exportFileName + "Storage")) {
|
|
1309
|
+
state.selectedRowKeys = [];
|
|
1310
|
+
if (props.filterEnabledShow) state.filterPanel = {
|
|
1311
|
+
filterEnabled: false
|
|
1312
|
+
};else state.filterPanel = {
|
|
1313
|
+
filterEnabled: true
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
return state;
|
|
1317
|
+
};
|
|
1318
|
+
var customSave = function customSave(state) {
|
|
1319
|
+
state.selectedRowKeys = [];
|
|
1320
|
+
if (props.filterEnabledShow) state.filterPanel = {
|
|
1321
|
+
filterEnabled: false
|
|
1322
|
+
};else state.filterPanel = {
|
|
1323
|
+
filterEnabled: true
|
|
1324
|
+
};
|
|
1325
|
+
localStorage.setItem(props.exportFileName + "Storage", JSON.stringify(state));
|
|
1326
|
+
};
|
|
1318
1327
|
useEffect(function () {
|
|
1319
1328
|
locale(localStorage.getItem("locale"));
|
|
1320
1329
|
loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
|
|
@@ -1420,24 +1429,11 @@ function grid(props, dataGridRef) {
|
|
|
1420
1429
|
allowExportSelectedData: true,
|
|
1421
1430
|
formats: exportFormats
|
|
1422
1431
|
}), props.columns.map(function (col) {
|
|
1423
|
-
return React.createElement(Column,
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
})
|
|
1428
|
-
message: col.requiredMessage
|
|
1429
|
-
}), col.dataField === 'IsActive' && React.createElement(HeaderFilter, {
|
|
1430
|
-
dataSource: [{
|
|
1431
|
-
text: 'All',
|
|
1432
|
-
value: null
|
|
1433
|
-
}, {
|
|
1434
|
-
text: 'Active',
|
|
1435
|
-
value: true
|
|
1436
|
-
}, {
|
|
1437
|
-
text: 'Passive',
|
|
1438
|
-
value: false
|
|
1439
|
-
}]
|
|
1440
|
-
}));
|
|
1432
|
+
return React.createElement(Column, {
|
|
1433
|
+
dataField: col.dataField,
|
|
1434
|
+
dataType: col.dataType,
|
|
1435
|
+
caption: col.caption
|
|
1436
|
+
});
|
|
1441
1437
|
}), function () {
|
|
1442
1438
|
if (props.customPopup !== undefined) {
|
|
1443
1439
|
return React.createElement(Column, {
|
|
@@ -1510,7 +1506,12 @@ function grid(props, dataGridRef) {
|
|
|
1510
1506
|
column: props.totalColumunName == undefined ? "Id" : props.totalColumunName,
|
|
1511
1507
|
summaryType: "count",
|
|
1512
1508
|
displayFormat: props.TotaDatalLanguage + " : " + props.TotalDataCount == undefined ? "{0}" : props.TotalDataCount
|
|
1513
|
-
}))
|
|
1509
|
+
})), React.createElement(StateStoring, {
|
|
1510
|
+
enabled: true,
|
|
1511
|
+
type: "custom",
|
|
1512
|
+
customLoad: customLoad,
|
|
1513
|
+
customSave: customSave
|
|
1514
|
+
}))));
|
|
1514
1515
|
}
|
|
1515
1516
|
|
|
1516
1517
|
var exportFormats$1 = ['xlsx'];
|