ods-component-lib 1.17.65 → 1.17.67
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 +59 -32
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +82 -55
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -7,14 +7,14 @@ import 'react-phone-input-2/lib/style.css';
|
|
|
7
7
|
import PhoneInput from 'react-phone-input-2';
|
|
8
8
|
import message from 'antd/es/message';
|
|
9
9
|
import Parser from 'html-react-parser';
|
|
10
|
-
import { DataGrid, LoadPanel, Paging, Pager, SearchPanel, FilterRow, FilterPanel, RemoteOperations, HeaderFilter, ColumnChooser, Position, ColumnChooserSearch, ColumnChooserSelection, Selection, Editing, Scrolling, Export, Column, RequiredRule, Button as Button$1, Toolbar, Item, Summary, TotalItem, StateStoring
|
|
10
|
+
import { DataGrid, LoadPanel, Paging, Pager, SearchPanel, FilterRow, FilterPanel, RemoteOperations, 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';
|
|
11
|
+
import { Item } from 'devextreme-react/form';
|
|
11
12
|
import { exportDataGrid as exportDataGrid$1 } from 'devextreme/pdf_exporter';
|
|
12
13
|
import { exportDataGrid } from 'devextreme/excel_exporter';
|
|
13
14
|
import jsPDF from 'jspdf';
|
|
14
15
|
import { Workbook } from 'exceljs';
|
|
15
16
|
import { saveAs } from 'file-saver-es';
|
|
16
17
|
import moment from 'moment';
|
|
17
|
-
import { Item as Item$1 } from 'devextreme-react/form';
|
|
18
18
|
import { CheckBox, Lookup, TreeList } from 'devextreme-react';
|
|
19
19
|
import { createStore } from 'devextreme-aspnet-data-nojquery';
|
|
20
20
|
import { TreeView } from 'devextreme-react/tree-view';
|
|
@@ -1269,15 +1269,7 @@ function grid(props, dataGridRef) {
|
|
|
1269
1269
|
onRowInserted: props.onRowInserted,
|
|
1270
1270
|
onRowUpdated: props.onRowUpdated,
|
|
1271
1271
|
onRowRemoved: props.onRowRemoved,
|
|
1272
|
-
onEditingStart: props.onEditingStart,
|
|
1273
|
-
onInitNewRow: props.onInitNewRow,
|
|
1274
|
-
onRowInserting: props.onRowInserting,
|
|
1275
|
-
onRowUpdating: props.onRowUpdating,
|
|
1276
|
-
onRowRemoving: props.onRowRemoving,
|
|
1277
1272
|
onSaving: props.onSaving,
|
|
1278
|
-
onSaved: props.onSaved,
|
|
1279
|
-
onEditCanceling: props.onEditCanceling,
|
|
1280
|
-
onEditCanceled: props.onEditCanceled,
|
|
1281
1273
|
allowColumnReordering: true,
|
|
1282
1274
|
showRowLines: true,
|
|
1283
1275
|
showBorders: true,
|
|
@@ -1285,6 +1277,7 @@ function grid(props, dataGridRef) {
|
|
|
1285
1277
|
focusedRowEnabled: false,
|
|
1286
1278
|
wordWrapEnabled: false,
|
|
1287
1279
|
noDataText: "No Data",
|
|
1280
|
+
onEditCanceling: props.onEditCanceling,
|
|
1288
1281
|
onExporting: onExporting,
|
|
1289
1282
|
height: window.innerHeight - 164,
|
|
1290
1283
|
repaintChangesOnly: true,
|
|
@@ -1332,12 +1325,30 @@ function grid(props, dataGridRef) {
|
|
|
1332
1325
|
})), props.selectEnable && React.createElement(Selection, {
|
|
1333
1326
|
mode: "multiple",
|
|
1334
1327
|
deferred: true
|
|
1335
|
-
}), props.
|
|
1328
|
+
}), props.editEnable === true && React.createElement(Editing, {
|
|
1336
1329
|
mode: props.edit.mode,
|
|
1337
1330
|
allowUpdating: props.edit.allowUpdating,
|
|
1338
1331
|
allowDeleting: props.edit.allowDeleting,
|
|
1339
|
-
allowAdding: props.edit.allowAdding
|
|
1340
|
-
|
|
1332
|
+
allowAdding: props.edit.allowAdding,
|
|
1333
|
+
useIcons: true
|
|
1334
|
+
}, props.edit.mode === "popup" && React.createElement(Popup, {
|
|
1335
|
+
title: props.popupTitle,
|
|
1336
|
+
showTitle: true,
|
|
1337
|
+
width: 700,
|
|
1338
|
+
height: 300,
|
|
1339
|
+
showCloseButton: false
|
|
1340
|
+
}), React.createElement(Form$1, null, props.formItems.map(function (formItem) {
|
|
1341
|
+
return React.createElement(Item, {
|
|
1342
|
+
itemType: formItem.itemType,
|
|
1343
|
+
colCount: formItem.colCount,
|
|
1344
|
+
colSpan: formItem.colSpan
|
|
1345
|
+
}, formItem.items.map(function (subItem) {
|
|
1346
|
+
return React.createElement(Item, {
|
|
1347
|
+
key: subItem.dataField,
|
|
1348
|
+
dataField: subItem.dataField
|
|
1349
|
+
});
|
|
1350
|
+
}));
|
|
1351
|
+
}))), React.createElement(Scrolling, {
|
|
1341
1352
|
mode: props.scroll.mode,
|
|
1342
1353
|
showScrollbar: props.scroll.showScrollbar,
|
|
1343
1354
|
scrollByContent: props.scroll.scrollByContent,
|
|
@@ -1365,25 +1376,41 @@ function grid(props, dataGridRef) {
|
|
|
1365
1376
|
value: false
|
|
1366
1377
|
}]
|
|
1367
1378
|
}));
|
|
1368
|
-
}),
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1379
|
+
}), function () {
|
|
1380
|
+
if (props.customPopup !== undefined) {
|
|
1381
|
+
return React.createElement(Column, {
|
|
1382
|
+
dataField: "Actions",
|
|
1383
|
+
caption: "Actions",
|
|
1384
|
+
type: "buttons",
|
|
1385
|
+
width: 110,
|
|
1386
|
+
showInColumnChooser: false
|
|
1387
|
+
}, props.edit.allowUpdating && React.createElement(Button$1, {
|
|
1388
|
+
hint: "Edit",
|
|
1389
|
+
visible: true,
|
|
1390
|
+
disabled: false,
|
|
1391
|
+
icon: "edit",
|
|
1392
|
+
onClick: props.editButtonClick
|
|
1393
|
+
}), props.edit.allowDeleting && React.createElement(Button$1, {
|
|
1394
|
+
hint: "Delete",
|
|
1395
|
+
visible: true,
|
|
1396
|
+
disabled: false,
|
|
1397
|
+
icon: "trash",
|
|
1398
|
+
onClick: props.deleteButtonClick
|
|
1399
|
+
}));
|
|
1400
|
+
} else {
|
|
1401
|
+
return React.createElement(Column, {
|
|
1402
|
+
dataField: "Actions",
|
|
1403
|
+
caption: "Actions",
|
|
1404
|
+
type: "buttons",
|
|
1405
|
+
width: 110,
|
|
1406
|
+
showInColumnChooser: false
|
|
1407
|
+
}, React.createElement(React.Fragment, null, props.edit.allowUpdating && React.createElement(Button$1, {
|
|
1408
|
+
name: "edit"
|
|
1409
|
+
}), props.edit.allowDeleting && React.createElement(Button$1, {
|
|
1410
|
+
name: "delete"
|
|
1411
|
+
})));
|
|
1412
|
+
}
|
|
1413
|
+
}(), React.createElement(Toolbar, null, props.pageTitle && React.createElement(Item$1, {
|
|
1387
1414
|
location: "before"
|
|
1388
1415
|
}, React.createElement(Typography.Title, {
|
|
1389
1416
|
level: 5,
|
|
@@ -1394,7 +1421,7 @@ function grid(props, dataGridRef) {
|
|
|
1394
1421
|
gap: "4px",
|
|
1395
1422
|
alignSelf: "stretch"
|
|
1396
1423
|
}
|
|
1397
|
-
}, props.pageTitle)),
|
|
1424
|
+
}, props.pageTitle)), React.createElement(Item$1, {
|
|
1398
1425
|
location: "before"
|
|
1399
1426
|
}, React.createElement(OdsButton, {
|
|
1400
1427
|
type: "primary",
|
|
@@ -1402,15 +1429,15 @@ function grid(props, dataGridRef) {
|
|
|
1402
1429
|
style: {
|
|
1403
1430
|
marginBottom: "10px"
|
|
1404
1431
|
}
|
|
1405
|
-
}, "Add New")), React.createElement(Item, {
|
|
1432
|
+
}, "Add New")), React.createElement(Item$1, {
|
|
1406
1433
|
name: "searchPanel"
|
|
1407
|
-
}), React.createElement(Item, {
|
|
1434
|
+
}), React.createElement(Item$1, {
|
|
1408
1435
|
name: "applyFilterButton"
|
|
1409
|
-
}), React.createElement(Item, {
|
|
1436
|
+
}), React.createElement(Item$1, {
|
|
1410
1437
|
name: "columnChooserButton"
|
|
1411
|
-
}), React.createElement(Item, {
|
|
1438
|
+
}), React.createElement(Item$1, {
|
|
1412
1439
|
name: "exportButton"
|
|
1413
|
-
}), React.createElement(Item, {
|
|
1440
|
+
}), React.createElement(Item$1, {
|
|
1414
1441
|
menuItemRender: renderMenuItem
|
|
1415
1442
|
})), React.createElement(Summary, null, React.createElement(TotalItem, {
|
|
1416
1443
|
column: "Id",
|
|
@@ -1703,12 +1730,12 @@ function OdsProfDataGrid(props) {
|
|
|
1703
1730
|
height: 300,
|
|
1704
1731
|
showCloseButton: false
|
|
1705
1732
|
}), React.createElement(Form$1, null, props.formItems && props.formItems.map(function (formItem) {
|
|
1706
|
-
return React.createElement(Item
|
|
1733
|
+
return React.createElement(Item, {
|
|
1707
1734
|
itemType: formItem.itemType,
|
|
1708
1735
|
colCount: formItem.colCount,
|
|
1709
1736
|
colSpan: formItem.colSpan
|
|
1710
1737
|
}, formItem.items.map(function (subItem) {
|
|
1711
|
-
return React.createElement(Item
|
|
1738
|
+
return React.createElement(Item, {
|
|
1712
1739
|
key: subItem.dataField,
|
|
1713
1740
|
dataField: subItem.dataField
|
|
1714
1741
|
});
|
|
@@ -1765,25 +1792,25 @@ function OdsProfDataGrid(props) {
|
|
|
1765
1792
|
name: "delete"
|
|
1766
1793
|
})));
|
|
1767
1794
|
}
|
|
1768
|
-
}(), React.createElement(Toolbar, null, React.createElement(Item, {
|
|
1795
|
+
}(), React.createElement(Toolbar, null, React.createElement(Item$1, {
|
|
1769
1796
|
location: "after"
|
|
1770
1797
|
}, React.createElement(Button$1, {
|
|
1771
1798
|
onClick: props.onAddButton
|
|
1772
|
-
}, "Add New")), React.createElement(Item, {
|
|
1799
|
+
}, "Add New")), React.createElement(Item$1, {
|
|
1773
1800
|
location: "after"
|
|
1774
1801
|
}, React.createElement(CheckBox, {
|
|
1775
1802
|
id: 'showPageSizes',
|
|
1776
1803
|
text: 'Show Page Size',
|
|
1777
1804
|
value: showPageSizeSelector,
|
|
1778
1805
|
onValueChanged: handleCheckboxChange
|
|
1779
|
-
})), React.createElement(Item, {
|
|
1806
|
+
})), React.createElement(Item$1, {
|
|
1780
1807
|
location: "after"
|
|
1781
1808
|
}, React.createElement(CheckBox, {
|
|
1782
1809
|
id: 'showPages',
|
|
1783
1810
|
text: 'Enable Paging',
|
|
1784
1811
|
value: enablePaging,
|
|
1785
1812
|
onValueChanged: onEnablePagingChange
|
|
1786
|
-
})), React.createElement(Item, {
|
|
1813
|
+
})), React.createElement(Item$1, {
|
|
1787
1814
|
location: "after"
|
|
1788
1815
|
}, React.createElement(Lookup, {
|
|
1789
1816
|
value: scrollingType,
|
|
@@ -1798,13 +1825,13 @@ function OdsProfDataGrid(props) {
|
|
|
1798
1825
|
label: "infinite"
|
|
1799
1826
|
}],
|
|
1800
1827
|
onValueChange: handleScrollingTypeChange
|
|
1801
|
-
})), React.createElement(Item, {
|
|
1828
|
+
})), React.createElement(Item$1, {
|
|
1802
1829
|
name: "columnChooserButton"
|
|
1803
|
-
}), React.createElement(Item, {
|
|
1830
|
+
}), React.createElement(Item$1, {
|
|
1804
1831
|
name: "searchPanel"
|
|
1805
|
-
}), React.createElement(Item, {
|
|
1832
|
+
}), React.createElement(Item$1, {
|
|
1806
1833
|
name: "exportButton"
|
|
1807
|
-
}), React.createElement(Item, {
|
|
1834
|
+
}), React.createElement(Item$1, {
|
|
1808
1835
|
menuItemRender: renderMenuItem$1
|
|
1809
1836
|
})))));
|
|
1810
1837
|
}
|
|
@@ -1955,12 +1982,12 @@ function grid$2(props) {
|
|
|
1955
1982
|
height: 300,
|
|
1956
1983
|
showCloseButton: false
|
|
1957
1984
|
}), React.createElement(Form$1, null, props.formItems.map(function (formItem) {
|
|
1958
|
-
return React.createElement(Item
|
|
1985
|
+
return React.createElement(Item, {
|
|
1959
1986
|
itemType: formItem.itemType,
|
|
1960
1987
|
colCount: formItem.colCount,
|
|
1961
1988
|
colSpan: formItem.colSpan
|
|
1962
1989
|
}, formItem.items.map(function (subItem) {
|
|
1963
|
-
return React.createElement(Item
|
|
1990
|
+
return React.createElement(Item, {
|
|
1964
1991
|
key: subItem.dataField,
|
|
1965
1992
|
dataField: subItem.dataField
|
|
1966
1993
|
});
|
|
@@ -1985,18 +2012,18 @@ function grid$2(props) {
|
|
|
1985
2012
|
value: false
|
|
1986
2013
|
}]
|
|
1987
2014
|
}));
|
|
1988
|
-
}), React.createElement(Toolbar, null, React.createElement(Item, {
|
|
2015
|
+
}), React.createElement(Toolbar, null, React.createElement(Item$1, {
|
|
1989
2016
|
location: "after"
|
|
1990
2017
|
}, React.createElement(OdsButton, {
|
|
1991
2018
|
type: "primary",
|
|
1992
2019
|
onClick: props.onAddButton
|
|
1993
|
-
}, "Add New")), React.createElement(Item, {
|
|
2020
|
+
}, "Add New")), React.createElement(Item$1, {
|
|
1994
2021
|
name: "searchPanel"
|
|
1995
|
-
}), React.createElement(Item, {
|
|
2022
|
+
}), React.createElement(Item$1, {
|
|
1996
2023
|
name: "columnChooserButton"
|
|
1997
|
-
}), React.createElement(Item, {
|
|
2024
|
+
}), React.createElement(Item$1, {
|
|
1998
2025
|
name: "exportButton"
|
|
1999
|
-
}), React.createElement(Item, {
|
|
2026
|
+
}), React.createElement(Item$1, {
|
|
2000
2027
|
menuItemRender: renderMenuItem$2
|
|
2001
2028
|
})), React.createElement(Summary, null, React.createElement(TotalItem, {
|
|
2002
2029
|
column: "Id",
|