ods-component-lib 1.17.66 → 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.
@@ -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, Popup, Form as Form$1 } from 'devextreme-react/data-grid';
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,
@@ -1338,7 +1331,24 @@ function grid(props, dataGridRef) {
1338
1331
  allowDeleting: props.edit.allowDeleting,
1339
1332
  allowAdding: props.edit.allowAdding,
1340
1333
  useIcons: true
1341
- }), React.createElement(Scrolling, {
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, {
1342
1352
  mode: props.scroll.mode,
1343
1353
  showScrollbar: props.scroll.showScrollbar,
1344
1354
  scrollByContent: props.scroll.scrollByContent,
@@ -1366,25 +1376,41 @@ function grid(props, dataGridRef) {
1366
1376
  value: false
1367
1377
  }]
1368
1378
  }));
1369
- }), props.customEdit !== undefined && React.createElement(Column, {
1370
- dataField: "Actions",
1371
- caption: "Actions",
1372
- type: "buttons",
1373
- width: 110,
1374
- showInColumnChooser: false
1375
- }, props.edit.allowUpdating && React.createElement(Button$1, {
1376
- hint: "Edit",
1377
- visible: true,
1378
- disabled: false,
1379
- icon: "edit",
1380
- onClick: props.editButtonClick
1381
- }), props.edit.allowDeleting && React.createElement(Button$1, {
1382
- hint: "Delete",
1383
- visible: true,
1384
- disabled: false,
1385
- icon: "trash",
1386
- onClick: props.deleteButtonClick
1387
- })), React.createElement(Toolbar, null, props.pageTitle && React.createElement(Item, {
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, {
1388
1414
  location: "before"
1389
1415
  }, React.createElement(Typography.Title, {
1390
1416
  level: 5,
@@ -1395,7 +1421,7 @@ function grid(props, dataGridRef) {
1395
1421
  gap: "4px",
1396
1422
  alignSelf: "stretch"
1397
1423
  }
1398
- }, props.pageTitle)), React.createElement(Item, {
1424
+ }, props.pageTitle)), React.createElement(Item$1, {
1399
1425
  location: "before"
1400
1426
  }, React.createElement(OdsButton, {
1401
1427
  type: "primary",
@@ -1403,15 +1429,15 @@ function grid(props, dataGridRef) {
1403
1429
  style: {
1404
1430
  marginBottom: "10px"
1405
1431
  }
1406
- }, "Add New")), React.createElement(Item, {
1432
+ }, "Add New")), React.createElement(Item$1, {
1407
1433
  name: "searchPanel"
1408
- }), React.createElement(Item, {
1434
+ }), React.createElement(Item$1, {
1409
1435
  name: "applyFilterButton"
1410
- }), React.createElement(Item, {
1436
+ }), React.createElement(Item$1, {
1411
1437
  name: "columnChooserButton"
1412
- }), React.createElement(Item, {
1438
+ }), React.createElement(Item$1, {
1413
1439
  name: "exportButton"
1414
- }), React.createElement(Item, {
1440
+ }), React.createElement(Item$1, {
1415
1441
  menuItemRender: renderMenuItem
1416
1442
  })), React.createElement(Summary, null, React.createElement(TotalItem, {
1417
1443
  column: "Id",
@@ -1704,12 +1730,12 @@ function OdsProfDataGrid(props) {
1704
1730
  height: 300,
1705
1731
  showCloseButton: false
1706
1732
  }), React.createElement(Form$1, null, props.formItems && props.formItems.map(function (formItem) {
1707
- return React.createElement(Item$1, {
1733
+ return React.createElement(Item, {
1708
1734
  itemType: formItem.itemType,
1709
1735
  colCount: formItem.colCount,
1710
1736
  colSpan: formItem.colSpan
1711
1737
  }, formItem.items.map(function (subItem) {
1712
- return React.createElement(Item$1, {
1738
+ return React.createElement(Item, {
1713
1739
  key: subItem.dataField,
1714
1740
  dataField: subItem.dataField
1715
1741
  });
@@ -1766,25 +1792,25 @@ function OdsProfDataGrid(props) {
1766
1792
  name: "delete"
1767
1793
  })));
1768
1794
  }
1769
- }(), React.createElement(Toolbar, null, React.createElement(Item, {
1795
+ }(), React.createElement(Toolbar, null, React.createElement(Item$1, {
1770
1796
  location: "after"
1771
1797
  }, React.createElement(Button$1, {
1772
1798
  onClick: props.onAddButton
1773
- }, "Add New")), React.createElement(Item, {
1799
+ }, "Add New")), React.createElement(Item$1, {
1774
1800
  location: "after"
1775
1801
  }, React.createElement(CheckBox, {
1776
1802
  id: 'showPageSizes',
1777
1803
  text: 'Show Page Size',
1778
1804
  value: showPageSizeSelector,
1779
1805
  onValueChanged: handleCheckboxChange
1780
- })), React.createElement(Item, {
1806
+ })), React.createElement(Item$1, {
1781
1807
  location: "after"
1782
1808
  }, React.createElement(CheckBox, {
1783
1809
  id: 'showPages',
1784
1810
  text: 'Enable Paging',
1785
1811
  value: enablePaging,
1786
1812
  onValueChanged: onEnablePagingChange
1787
- })), React.createElement(Item, {
1813
+ })), React.createElement(Item$1, {
1788
1814
  location: "after"
1789
1815
  }, React.createElement(Lookup, {
1790
1816
  value: scrollingType,
@@ -1799,13 +1825,13 @@ function OdsProfDataGrid(props) {
1799
1825
  label: "infinite"
1800
1826
  }],
1801
1827
  onValueChange: handleScrollingTypeChange
1802
- })), React.createElement(Item, {
1828
+ })), React.createElement(Item$1, {
1803
1829
  name: "columnChooserButton"
1804
- }), React.createElement(Item, {
1830
+ }), React.createElement(Item$1, {
1805
1831
  name: "searchPanel"
1806
- }), React.createElement(Item, {
1832
+ }), React.createElement(Item$1, {
1807
1833
  name: "exportButton"
1808
- }), React.createElement(Item, {
1834
+ }), React.createElement(Item$1, {
1809
1835
  menuItemRender: renderMenuItem$1
1810
1836
  })))));
1811
1837
  }
@@ -1956,12 +1982,12 @@ function grid$2(props) {
1956
1982
  height: 300,
1957
1983
  showCloseButton: false
1958
1984
  }), React.createElement(Form$1, null, props.formItems.map(function (formItem) {
1959
- return React.createElement(Item$1, {
1985
+ return React.createElement(Item, {
1960
1986
  itemType: formItem.itemType,
1961
1987
  colCount: formItem.colCount,
1962
1988
  colSpan: formItem.colSpan
1963
1989
  }, formItem.items.map(function (subItem) {
1964
- return React.createElement(Item$1, {
1990
+ return React.createElement(Item, {
1965
1991
  key: subItem.dataField,
1966
1992
  dataField: subItem.dataField
1967
1993
  });
@@ -1986,18 +2012,18 @@ function grid$2(props) {
1986
2012
  value: false
1987
2013
  }]
1988
2014
  }));
1989
- }), React.createElement(Toolbar, null, React.createElement(Item, {
2015
+ }), React.createElement(Toolbar, null, React.createElement(Item$1, {
1990
2016
  location: "after"
1991
2017
  }, React.createElement(OdsButton, {
1992
2018
  type: "primary",
1993
2019
  onClick: props.onAddButton
1994
- }, "Add New")), React.createElement(Item, {
2020
+ }, "Add New")), React.createElement(Item$1, {
1995
2021
  name: "searchPanel"
1996
- }), React.createElement(Item, {
2022
+ }), React.createElement(Item$1, {
1997
2023
  name: "columnChooserButton"
1998
- }), React.createElement(Item, {
2024
+ }), React.createElement(Item$1, {
1999
2025
  name: "exportButton"
2000
- }), React.createElement(Item, {
2026
+ }), React.createElement(Item$1, {
2001
2027
  menuItemRender: renderMenuItem$2
2002
2028
  })), React.createElement(Summary, null, React.createElement(TotalItem, {
2003
2029
  column: "Id",