ods-component-lib 1.18.39 → 1.18.41
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/components/antd/select/MultiSelect/OdsMultiSelect.d.ts +9 -0
- package/dist/components/antd/select/OdsMultiSelect.d.ts +9 -0
- package/dist/components/antd/select/OdsSelect.styled.d.ts +4 -0
- package/dist/components/devextreme/OdsGantt/OdsGantt.Constants.d.ts +4 -0
- package/dist/components/devextreme/OdsGantt/OdsGantt.Functions.d.ts +2 -0
- package/dist/components/devextreme/OdsGantt/OdsGantt.Types.d.ts +15 -0
- package/dist/components/devextreme/OdsGantt/OdsGantt.d.ts +5 -0
- package/dist/index.d.ts +2 -8
- package/dist/index.js +128 -693
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +134 -696
- package/dist/index.modern.js.map +1 -1
- package/dist/stories/GanttChart/Gantt.Constants.d.ts +2 -0
- package/dist/stories/GanttChart/Gantt.Functions.d.ts +6 -0
- package/dist/stories/GanttChart/Gantt.MockData.d.ts +39 -0
- package/dist/stories/GanttChart/Gantt.stories.d.ts +146 -0
- package/dist/stories/GanttChart/TaskTemplate.d.ts +4 -0
- package/dist/stories/OdsAutoComplete/OdsAutoComplete.stories.d.ts +44 -0
- package/dist/stories/OdsAutoComplete/Samples/LookupPatternsAutoComplete.Sample.d.ts +1 -0
- package/dist/stories/OdsAutoComplete/Samples/NonCaseSensitiveAutoComplete.Sample.d.ts +1 -0
- package/dist/stories/OdsBasicTable/OdsBasicTable.stories.d.ts +9 -0
- package/dist/stories/OdsBasicTable/Samples/OdsBasicTable.Sample.d.ts +1 -0
- package/dist/stories/OdsDropdownButton/OdsDropdownButton.stories.d.ts +10 -0
- package/dist/stories/OdsDropdownButton/Samples/HoverDropdownButton.Sample.d.ts +5 -0
- package/dist/stories/OdsDropdownButton/Samples/SelectableDropdownButton.Sample.d.ts +25 -0
- package/dist/stories/OdsGantt/OdsGantt.Constants.d.ts +2 -0
- package/dist/stories/OdsGantt/OdsGantt.Functions.d.ts +6 -0
- package/dist/stories/OdsGantt/OdsGantt.MockData.d.ts +39 -0
- package/dist/stories/OdsGantt/OdsGantt.stories.d.ts +146 -0
- package/dist/stories/OdsMultiSelect/OdsMultiSelect.stories.d.ts +9 -0
- package/dist/stories/OdsMultiSelect/Samples/OdsMultiSelect/OdsMultiSelect.MockData.d.ts +4 -0
- package/dist/stories/OdsMultiSelect/Samples/OdsMultiSelect/OdsMultiSelect.Sample.d.ts +1 -0
- package/dist/stories/OdsRemoteDataGrid/OdsRemoteDataGrid.Constants.d.ts +17 -0
- package/dist/stories/OdsRemoteDataGrid/OdsRemoteDataGrid.MockData.d.ts +5 -0
- package/dist/stories/OdsSelect/Samples/OdsCustomMultiSelect/OdsCustomMultiSelect.MockData.d.ts +4 -0
- package/dist/stories/OdsSelect/Samples/OdsCustomMultiSelect/OdsCustomMultiSelect.Sample.d.ts +1 -0
- package/dist/stories/OdsTable/Samples/OdsBasicTable.Sample.d.ts +1 -0
- package/dist/stories/OdsTimeline/OdsTimeline.Constants.d.ts +3 -0
- package/dist/stories/OdsTimeline/OdsTimeline.Functions.d.ts +4 -0
- package/dist/stories/OdsTimeline/OdsTimeline.MockData.d.ts +39 -0
- package/dist/stories/OdsTimeline/OdsTimeline.stories.d.ts +146 -0
- package/dist/utils/DynamicIcon.d.ts +5 -0
- package/package.json +1 -1
- /package/dist/components/antd/datepicker/{OdsDateRangepicker.d.ts → OdsDateRangePicker.d.ts} +0 -0
package/dist/index.modern.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Alert, AutoComplete, Button, Dropdown, Calendar, Card as Card$1, Checkbox, DatePicker, Divider, Image, Input, InputNumber, List, Modal, notification, Radio, Rate, Select, Space, Spin, Switch, Tabs, Table, Tag, Timeline, TimePicker, Typography,
|
|
1
|
+
import { Alert, AutoComplete, Button, Dropdown, Calendar, Card as Card$1, Checkbox, DatePicker, Divider, Image, Input, InputNumber, List, Modal, notification, Radio, Rate, Select, Space, Spin, Switch, Tabs, Table, Tag, Timeline, TimePicker, Typography, theme, Tooltip } from 'antd';
|
|
2
2
|
import styled, { ThemeProvider } from 'styled-components';
|
|
3
3
|
import React, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
4
4
|
import Marquee from 'react-fast-marquee';
|
|
5
5
|
import Card from 'antd/es/card/Card';
|
|
6
|
-
import { EyeTwoTone, EyeInvisibleOutlined, FrownOutlined, MehOutlined, SmileOutlined, HeartOutlined,
|
|
6
|
+
import { EyeTwoTone, EyeInvisibleOutlined, FrownOutlined, MehOutlined, SmileOutlined, HeartOutlined, InfoCircleOutlined } from '@ant-design/icons';
|
|
7
7
|
import 'react-phone-input-2/lib/style.css';
|
|
8
8
|
import PhoneInput from 'react-phone-input-2';
|
|
9
9
|
import Parser from 'html-react-parser';
|
|
10
10
|
import { locale, loadMessages } from 'devextreme/localization';
|
|
11
|
-
import DataGrid$1, { DataGrid, LoadPanel, Paging, Pager, SearchPanel, FilterRow, FilterPanel, HeaderFilter, ColumnChooser, Position, ColumnChooserSearch, ColumnChooserSelection, Selection, Editing, Popup, Form
|
|
11
|
+
import DataGrid$1, { DataGrid, LoadPanel, Paging, Pager, SearchPanel, FilterRow, FilterPanel, HeaderFilter, ColumnChooser, Position, ColumnChooserSearch, ColumnChooserSelection, Selection, Editing, Popup, Form, Scrolling, Export, Column, RequiredRule, Button as Button$1, Toolbar, Item as Item$1, Summary, TotalItem, StateStoring, Sorting } from 'devextreme-react/data-grid';
|
|
12
12
|
import { Item } from 'devextreme-react/form';
|
|
13
13
|
import { exportDataGrid as exportDataGrid$1 } from 'devextreme/pdf_exporter';
|
|
14
14
|
import { exportDataGrid } from 'devextreme/excel_exporter';
|
|
@@ -17,7 +17,7 @@ import { Workbook } from 'exceljs';
|
|
|
17
17
|
import { saveAs } from 'file-saver-es';
|
|
18
18
|
import moment from 'moment';
|
|
19
19
|
import { GridIcon, EditIcon, Trash1Icon, CopyIcon, DiscountIcon, KebabMenuIcon, RefreshIcon } from 'ods-icon/react/24/outline';
|
|
20
|
-
import {
|
|
20
|
+
import { TreeList, DropDownButton, Lookup } from 'devextreme-react';
|
|
21
21
|
import { TreeView } from 'devextreme-react/tree-view';
|
|
22
22
|
|
|
23
23
|
function _extends() {
|
|
@@ -415,28 +415,10 @@ function OdsButton(props) {
|
|
|
415
415
|
}, React.createElement(StyledButton, Object.assign({}, props), props.children)));
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
var onMenuClick = function onMenuClick(e) {
|
|
419
|
-
console.log('click', e);
|
|
420
|
-
};
|
|
421
|
-
var items = [{
|
|
422
|
-
key: '1',
|
|
423
|
-
label: '1st item'
|
|
424
|
-
}, {
|
|
425
|
-
key: '2',
|
|
426
|
-
label: '2nd item'
|
|
427
|
-
}, {
|
|
428
|
-
key: '3',
|
|
429
|
-
label: '3rd item'
|
|
430
|
-
}];
|
|
431
418
|
function OdsDropdownButton(props) {
|
|
432
419
|
return React.createElement(React.Fragment, null, React.createElement(ThemeProvider, {
|
|
433
420
|
theme: lightTheme
|
|
434
|
-
}, React.createElement(Dropdown.Button, {
|
|
435
|
-
menu: {
|
|
436
|
-
items: items,
|
|
437
|
-
onClick: onMenuClick
|
|
438
|
-
}
|
|
439
|
-
}, props.children)));
|
|
421
|
+
}, React.createElement(Dropdown.Button, Object.assign({}, props), props.children)));
|
|
440
422
|
}
|
|
441
423
|
|
|
442
424
|
var _templateObject$3;
|
|
@@ -940,40 +922,81 @@ function OdsRate(props) {
|
|
|
940
922
|
}
|
|
941
923
|
|
|
942
924
|
var _templateObject$e;
|
|
943
|
-
var StyledSelect = styled(Select)(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n width:100%;\n"])));
|
|
925
|
+
var StyledSelect = styled(Select)(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
|
|
944
926
|
|
|
945
|
-
function
|
|
946
|
-
var
|
|
947
|
-
|
|
948
|
-
|
|
927
|
+
var OdsMultiSelect = function OdsMultiSelect(props) {
|
|
928
|
+
var options = props.options,
|
|
929
|
+
selectAllEnabled = props.selectAllEnabled,
|
|
930
|
+
selectAllText = props.selectAllText,
|
|
931
|
+
closeButtonText = props.closeButtonText;
|
|
932
|
+
var _useState = useState([]),
|
|
933
|
+
value = _useState[0],
|
|
934
|
+
setValue = _useState[1];
|
|
935
|
+
var _useState2 = useState(false),
|
|
936
|
+
open = _useState2[0],
|
|
937
|
+
setOpen = _useState2[1];
|
|
938
|
+
var selectAllValue = "OdsMultiSelectOptionAll";
|
|
939
|
+
var newOptions = selectAllEnabled ? [{
|
|
940
|
+
value: selectAllValue,
|
|
941
|
+
label: selectAllText
|
|
942
|
+
}].concat(options) : options;
|
|
943
|
+
var handleChange = function handleChange(newValues) {
|
|
944
|
+
if (newValues && newValues.length && newValues.includes(selectAllValue)) {
|
|
945
|
+
if (newValues.length === options.length + 1) {
|
|
946
|
+
setValue([]);
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
setValue(options.map(function (item) {
|
|
950
|
+
return item.value;
|
|
951
|
+
}));
|
|
952
|
+
return;
|
|
953
|
+
}
|
|
954
|
+
setValue(newValues);
|
|
955
|
+
return;
|
|
956
|
+
};
|
|
957
|
+
var dropdownRender = function dropdownRender(menu) {
|
|
958
|
+
return React.createElement(React.Fragment, null, menu, React.createElement(OdsDivider, {
|
|
959
|
+
style: {
|
|
960
|
+
margin: "8px 0"
|
|
961
|
+
}
|
|
962
|
+
}), React.createElement(Space, {
|
|
963
|
+
style: {
|
|
964
|
+
padding: "0 8px 4px"
|
|
965
|
+
}
|
|
966
|
+
}, React.createElement(OdsButton, {
|
|
967
|
+
style: {
|
|
968
|
+
width: "100%"
|
|
969
|
+
},
|
|
970
|
+
type: "primary",
|
|
971
|
+
onClick: function onClick() {
|
|
972
|
+
return setOpen(false);
|
|
973
|
+
}
|
|
974
|
+
}, closeButtonText != null ? closeButtonText : "Close")));
|
|
975
|
+
};
|
|
976
|
+
var optionRender = function optionRender(option, __info) {
|
|
977
|
+
return React.createElement("div", null, option.data.label, option.data.value == selectAllValue ? React.createElement(OdsDivider, {
|
|
978
|
+
style: {
|
|
979
|
+
margin: "8px 0px 0px 0px"
|
|
980
|
+
}
|
|
981
|
+
}) : "");
|
|
982
|
+
};
|
|
949
983
|
return React.createElement(React.Fragment, null, React.createElement(ThemeProvider, {
|
|
950
984
|
theme: lightTheme
|
|
951
|
-
}, React.createElement(StyledSelect, Object.assign({
|
|
985
|
+
}, React.createElement(StyledSelect, Object.assign({
|
|
986
|
+
mode: "multiple",
|
|
987
|
+
allowClear: true,
|
|
988
|
+
value: value,
|
|
952
989
|
open: open,
|
|
990
|
+
onChange: handleChange,
|
|
991
|
+
optionRender: optionRender,
|
|
992
|
+
dropdownRender: dropdownRender,
|
|
953
993
|
onDropdownVisibleChange: function onDropdownVisibleChange(visible) {
|
|
954
994
|
return setOpen(visible);
|
|
955
|
-
},
|
|
956
|
-
dropdownRender: function dropdownRender(menu) {
|
|
957
|
-
return React.createElement(React.Fragment, null, menu, React.createElement(OdsDivider, {
|
|
958
|
-
style: {
|
|
959
|
-
margin: '8px 0'
|
|
960
|
-
}
|
|
961
|
-
}), React.createElement(Space, {
|
|
962
|
-
style: {
|
|
963
|
-
padding: '0 8px 4px'
|
|
964
|
-
}
|
|
965
|
-
}, React.createElement(OdsButton, {
|
|
966
|
-
style: {
|
|
967
|
-
width: "100%"
|
|
968
|
-
},
|
|
969
|
-
type: "primary",
|
|
970
|
-
onClick: function onClick() {
|
|
971
|
-
return setOpen(false);
|
|
972
|
-
}
|
|
973
|
-
}, props.buttonLabel)));
|
|
974
995
|
}
|
|
996
|
+
}, props, {
|
|
997
|
+
options: newOptions
|
|
975
998
|
}))));
|
|
976
|
-
}
|
|
999
|
+
};
|
|
977
1000
|
|
|
978
1001
|
function OdsSelect(props) {
|
|
979
1002
|
return React.createElement(React.Fragment, null, React.createElement(ThemeProvider, {
|
|
@@ -1008,7 +1031,7 @@ var StyledTabs = styled(Tabs)(_templateObject$h || (_templateObject$h = _taggedT
|
|
|
1008
1031
|
var onChange = function onChange(key) {
|
|
1009
1032
|
console.log(key);
|
|
1010
1033
|
};
|
|
1011
|
-
var items
|
|
1034
|
+
var items = [{
|
|
1012
1035
|
key: '1',
|
|
1013
1036
|
label: "Tab 1",
|
|
1014
1037
|
children: "Content of Tab Pane 1",
|
|
@@ -1037,7 +1060,7 @@ function OdsTab(props) {
|
|
|
1037
1060
|
tabPosition: tabPosition,
|
|
1038
1061
|
size: size,
|
|
1039
1062
|
defaultActiveKey: "1",
|
|
1040
|
-
items: items
|
|
1063
|
+
items: items,
|
|
1041
1064
|
onChange: onChange
|
|
1042
1065
|
}), props.children)));
|
|
1043
1066
|
}
|
|
@@ -1137,45 +1160,6 @@ function OdsTitle(props) {
|
|
|
1137
1160
|
}, React.createElement(StyledtTypography.Title, Object.assign({}, props), props === null || props === void 0 ? void 0 : props.children)));
|
|
1138
1161
|
}
|
|
1139
1162
|
|
|
1140
|
-
function OdsLogin(props) {
|
|
1141
|
-
return React.createElement(React.Fragment, null, React.createElement(Form, {
|
|
1142
|
-
name: "login-form",
|
|
1143
|
-
initialValues: {
|
|
1144
|
-
remember: true
|
|
1145
|
-
},
|
|
1146
|
-
onFinish: props.onFinish,
|
|
1147
|
-
onFinishFailed: props.onFinishFailed
|
|
1148
|
-
}, React.createElement(Form.Item, {
|
|
1149
|
-
label: "Username",
|
|
1150
|
-
name: "username",
|
|
1151
|
-
rules: [{
|
|
1152
|
-
required: true,
|
|
1153
|
-
message: 'Please input your username!'
|
|
1154
|
-
}]
|
|
1155
|
-
}, React.createElement(OdsInput, {
|
|
1156
|
-
prefix: React.createElement(UserOutlined, {
|
|
1157
|
-
className: "site-form-item-icon"
|
|
1158
|
-
}),
|
|
1159
|
-
placeholder: "Username"
|
|
1160
|
-
})), React.createElement(Form.Item, {
|
|
1161
|
-
label: "Password",
|
|
1162
|
-
name: "password",
|
|
1163
|
-
rules: [{
|
|
1164
|
-
required: true,
|
|
1165
|
-
message: 'Please input your password!'
|
|
1166
|
-
}]
|
|
1167
|
-
}, React.createElement(OdsPassword, {
|
|
1168
|
-
prefix: React.createElement(LockOutlined, {
|
|
1169
|
-
className: "site-form-item-icon"
|
|
1170
|
-
}),
|
|
1171
|
-
placeholder: "Password"
|
|
1172
|
-
})), React.createElement(Form.Item, null, React.createElement(OdsButton, {
|
|
1173
|
-
type: "primary",
|
|
1174
|
-
htmlType: "submit",
|
|
1175
|
-
loading: props.loading
|
|
1176
|
-
}, "Log in"))));
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
1163
|
var useToken = theme.useToken;
|
|
1180
1164
|
var exportFormats = ['xlsx'];
|
|
1181
1165
|
var renderMenuItem = function renderMenuItem() {
|
|
@@ -1354,7 +1338,7 @@ function OdsDataGrid(props) {
|
|
|
1354
1338
|
width: 700,
|
|
1355
1339
|
height: 300,
|
|
1356
1340
|
showCloseButton: false
|
|
1357
|
-
}), React.createElement(Form
|
|
1341
|
+
}), React.createElement(Form, null, props.formItems.map(function (formItem) {
|
|
1358
1342
|
return React.createElement(Item, {
|
|
1359
1343
|
itemType: formItem.itemType,
|
|
1360
1344
|
colCount: formItem.colCount,
|
|
@@ -1588,267 +1572,6 @@ function grid(props) {
|
|
|
1588
1572
|
}))));
|
|
1589
1573
|
}
|
|
1590
1574
|
|
|
1591
|
-
var exportFormats$2 = ['xlsx', 'pdf'];
|
|
1592
|
-
var searchEditorOptions = {
|
|
1593
|
-
placeholder: 'Search column'
|
|
1594
|
-
};
|
|
1595
|
-
var renderMenuItem$1 = function renderMenuItem() {
|
|
1596
|
-
return React.createElement(Export, {
|
|
1597
|
-
enabled: true,
|
|
1598
|
-
allowExportSelectedData: true,
|
|
1599
|
-
formats: exportFormats$2
|
|
1600
|
-
});
|
|
1601
|
-
};
|
|
1602
|
-
var customizeBooleanColumnRender = function customizeBooleanColumnRender(e) {
|
|
1603
|
-
var tagColor = e.value ? 'green' : 'gold';
|
|
1604
|
-
return React.createElement(Tag, {
|
|
1605
|
-
color: tagColor
|
|
1606
|
-
}, e.value ? 'Active' : 'Passive');
|
|
1607
|
-
};
|
|
1608
|
-
function OdsProfDataGrid(props) {
|
|
1609
|
-
var _useState = useState(true),
|
|
1610
|
-
showPageSizeSelector = _useState[0],
|
|
1611
|
-
setShowPageSizeSelector = _useState[1];
|
|
1612
|
-
var _useState2 = useState(true),
|
|
1613
|
-
enablePaging = _useState2[0],
|
|
1614
|
-
setEnablePaging = _useState2[1];
|
|
1615
|
-
var _useState3 = useState('standard'),
|
|
1616
|
-
scrollingType = _useState3[0],
|
|
1617
|
-
setScrollingType = _useState3[1];
|
|
1618
|
-
var _useState4 = useState(true),
|
|
1619
|
-
loadPanelEnabled = _useState4[0],
|
|
1620
|
-
setLoadPanelEnabled = _useState4[1];
|
|
1621
|
-
var dataGridRef = useRef(null);
|
|
1622
|
-
var headerCellRender = function headerCellRender(colProperties) {
|
|
1623
|
-
return React.createElement("th", {
|
|
1624
|
-
className: "dx-datagrid-headers"
|
|
1625
|
-
}, colProperties.column.caption);
|
|
1626
|
-
};
|
|
1627
|
-
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
1628
|
-
var onExporting = function onExporting(e) {
|
|
1629
|
-
if (e.format === 'excel') {
|
|
1630
|
-
var workbook = new Workbook();
|
|
1631
|
-
exportDataGrid({
|
|
1632
|
-
component: e.component,
|
|
1633
|
-
worksheet: workbook.addWorksheet('Main sheet'),
|
|
1634
|
-
autoFilterEnabled: true
|
|
1635
|
-
}).then(function () {
|
|
1636
|
-
workbook.xlsx.writeBuffer().then(function (buffer) {
|
|
1637
|
-
saveAs(new Blob([buffer], {
|
|
1638
|
-
type: 'application/octet-stream'
|
|
1639
|
-
}), fileName + '.xlsx');
|
|
1640
|
-
});
|
|
1641
|
-
});
|
|
1642
|
-
} else {
|
|
1643
|
-
var doc = new jsPDF();
|
|
1644
|
-
exportDataGrid$1({
|
|
1645
|
-
jsPDFDocument: doc,
|
|
1646
|
-
component: e.component,
|
|
1647
|
-
indent: 5
|
|
1648
|
-
}).then(function () {
|
|
1649
|
-
doc.save(fileName + '.pdf');
|
|
1650
|
-
});
|
|
1651
|
-
}
|
|
1652
|
-
};
|
|
1653
|
-
var onEnablePagingChange = function onEnablePagingChange(value) {
|
|
1654
|
-
setEnablePaging(value);
|
|
1655
|
-
refreshGrid();
|
|
1656
|
-
};
|
|
1657
|
-
var handleScrollingTypeChange = function handleScrollingTypeChange(newScrollingType) {
|
|
1658
|
-
setScrollingType(newScrollingType);
|
|
1659
|
-
console.log(newScrollingType);
|
|
1660
|
-
debugger;
|
|
1661
|
-
refreshGrid();
|
|
1662
|
-
};
|
|
1663
|
-
var onContentReady = function onContentReady() {
|
|
1664
|
-
setLoadPanelEnabled(false);
|
|
1665
|
-
};
|
|
1666
|
-
var refreshGrid = function refreshGrid() {
|
|
1667
|
-
if (dataGridRef.current) {
|
|
1668
|
-
dataGridRef.current.instance.refresh();
|
|
1669
|
-
}
|
|
1670
|
-
};
|
|
1671
|
-
var handleCheckboxChange = function handleCheckboxChange(e) {
|
|
1672
|
-
setShowPageSizeSelector(e);
|
|
1673
|
-
};
|
|
1674
|
-
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
1675
|
-
className: "odsDatagrid",
|
|
1676
|
-
style: {
|
|
1677
|
-
width: "100%",
|
|
1678
|
-
overflowX: 'auto'
|
|
1679
|
-
}
|
|
1680
|
-
}, React.createElement(DataGrid, {
|
|
1681
|
-
dataSource: props.dataSource,
|
|
1682
|
-
keyExpr: props.keyExpr,
|
|
1683
|
-
allowColumnResizing: true,
|
|
1684
|
-
columnResizingMode: "widget",
|
|
1685
|
-
onRowInserted: props.onRowInserted,
|
|
1686
|
-
onRowUpdated: props.onRowUpdated,
|
|
1687
|
-
onRowRemoved: props.onRowRemoved,
|
|
1688
|
-
onSaving: props.onSaving,
|
|
1689
|
-
allowColumnReordering: true,
|
|
1690
|
-
showRowLines: true,
|
|
1691
|
-
showBorders: true,
|
|
1692
|
-
ref: dataGridRef,
|
|
1693
|
-
columnAutoWidth: false,
|
|
1694
|
-
onEditCanceling: props.onEditCanceling,
|
|
1695
|
-
onExporting: onExporting,
|
|
1696
|
-
onContentReady: onContentReady
|
|
1697
|
-
}, React.createElement(Paging, {
|
|
1698
|
-
enabled: true,
|
|
1699
|
-
defaultPageSize: props.pageSize
|
|
1700
|
-
}), enablePaging && React.createElement(Pager, {
|
|
1701
|
-
visible: true,
|
|
1702
|
-
displayMode: "full",
|
|
1703
|
-
showPageSizeSelector: showPageSizeSelector,
|
|
1704
|
-
showNavigationButtons: true,
|
|
1705
|
-
showInfo: true
|
|
1706
|
-
}), props.searchEnable && React.createElement(SearchPanel, {
|
|
1707
|
-
visible: true
|
|
1708
|
-
}), props.filterEnable && React.createElement(FilterRow, {
|
|
1709
|
-
visible: true
|
|
1710
|
-
}), props.headerFilterEnable && React.createElement(HeaderFilter, {
|
|
1711
|
-
visible: true
|
|
1712
|
-
}), React.createElement(ColumnChooser, {
|
|
1713
|
-
enabled: true,
|
|
1714
|
-
mode: "select"
|
|
1715
|
-
}, React.createElement(Position, {
|
|
1716
|
-
my: "right top",
|
|
1717
|
-
at: "right bottom",
|
|
1718
|
-
of: ".dx-datagrid-column-chooser-button"
|
|
1719
|
-
}), React.createElement(ColumnChooserSearch, {
|
|
1720
|
-
enabled: true,
|
|
1721
|
-
editorOptions: searchEditorOptions
|
|
1722
|
-
}), React.createElement(ColumnChooserSelection, {
|
|
1723
|
-
allowSelectAll: true,
|
|
1724
|
-
selectByClick: true,
|
|
1725
|
-
recursive: true
|
|
1726
|
-
})), props.selectEnable && React.createElement(Selection, {
|
|
1727
|
-
mode: "multiple",
|
|
1728
|
-
deferred: true
|
|
1729
|
-
}), React.createElement(Scrolling, {
|
|
1730
|
-
mode: props.scrollingMode
|
|
1731
|
-
}), React.createElement(LoadPanel, {
|
|
1732
|
-
enabled: loadPanelEnabled
|
|
1733
|
-
}), props.editEnable === true && React.createElement(Editing, {
|
|
1734
|
-
mode: props.edit.mode,
|
|
1735
|
-
allowUpdating: props.edit.allowUpdating,
|
|
1736
|
-
allowDeleting: props.edit.allowDeleting,
|
|
1737
|
-
allowAdding: props.edit.allowAdding,
|
|
1738
|
-
useIcons: true
|
|
1739
|
-
}, props.edit.mode === "popup" && React.createElement(Popup, {
|
|
1740
|
-
title: props.popupTitle,
|
|
1741
|
-
showTitle: true,
|
|
1742
|
-
width: 700,
|
|
1743
|
-
height: 300,
|
|
1744
|
-
showCloseButton: false
|
|
1745
|
-
}), React.createElement(Form$1, null, props.formItems && props.formItems.map(function (formItem) {
|
|
1746
|
-
return React.createElement(Item, {
|
|
1747
|
-
itemType: formItem.itemType,
|
|
1748
|
-
colCount: formItem.colCount,
|
|
1749
|
-
colSpan: formItem.colSpan
|
|
1750
|
-
}, formItem.items.map(function (subItem) {
|
|
1751
|
-
return React.createElement(Item, {
|
|
1752
|
-
key: subItem.dataField,
|
|
1753
|
-
dataField: subItem.dataField
|
|
1754
|
-
});
|
|
1755
|
-
}));
|
|
1756
|
-
}))), props.exportEnable === true && React.createElement(Export, {
|
|
1757
|
-
enabled: true,
|
|
1758
|
-
allowExportSelectedData: true,
|
|
1759
|
-
formats: exportFormats$2
|
|
1760
|
-
}), props.columns.map(function (col) {
|
|
1761
|
-
return React.createElement(Column, Object.assign({
|
|
1762
|
-
key: col.dataField
|
|
1763
|
-
}, col, {
|
|
1764
|
-
headerCellRender: headerCellRender,
|
|
1765
|
-
cellRender: col.dataField === 'IsActive' || col.dataField === 'Status' ? customizeBooleanColumnRender : ""
|
|
1766
|
-
}), col.required && React.createElement(RequiredRule, {
|
|
1767
|
-
message: col.requiredMessage
|
|
1768
|
-
}), col.dataField === 'IsActive' && React.createElement(HeaderFilter, {
|
|
1769
|
-
dataSource: [{
|
|
1770
|
-
text: 'All',
|
|
1771
|
-
value: null
|
|
1772
|
-
}, {
|
|
1773
|
-
text: 'Active',
|
|
1774
|
-
value: true
|
|
1775
|
-
}, {
|
|
1776
|
-
text: 'Passive',
|
|
1777
|
-
value: false
|
|
1778
|
-
}]
|
|
1779
|
-
}));
|
|
1780
|
-
}), function () {
|
|
1781
|
-
if (props.customPopup !== undefined) {
|
|
1782
|
-
return React.createElement(Column, {
|
|
1783
|
-
type: "buttons",
|
|
1784
|
-
width: 110
|
|
1785
|
-
}, props.edit.allowUpdating && React.createElement(Button$1, {
|
|
1786
|
-
hint: "Edit",
|
|
1787
|
-
visible: true,
|
|
1788
|
-
disabled: false,
|
|
1789
|
-
icon: "edit",
|
|
1790
|
-
onClick: props.editButtonClick
|
|
1791
|
-
}), props.edit.allowDeleting && React.createElement(Button$1, {
|
|
1792
|
-
hint: "Delete",
|
|
1793
|
-
visible: true,
|
|
1794
|
-
disabled: false,
|
|
1795
|
-
icon: "trash",
|
|
1796
|
-
onClick: props.deleteButtonClick
|
|
1797
|
-
}));
|
|
1798
|
-
} else {
|
|
1799
|
-
return React.createElement(Column, {
|
|
1800
|
-
type: "buttons",
|
|
1801
|
-
width: 110
|
|
1802
|
-
}, React.createElement(React.Fragment, null, props.edit.allowUpdating && React.createElement(Button$1, {
|
|
1803
|
-
name: "edit"
|
|
1804
|
-
}), props.edit.allowDeleting && React.createElement(Button$1, {
|
|
1805
|
-
name: "delete"
|
|
1806
|
-
})));
|
|
1807
|
-
}
|
|
1808
|
-
}(), React.createElement(Toolbar, null, React.createElement(Item$1, {
|
|
1809
|
-
location: "after"
|
|
1810
|
-
}, React.createElement(Button$1, {
|
|
1811
|
-
onClick: props.onAddButton
|
|
1812
|
-
}, "Add New")), React.createElement(Item$1, {
|
|
1813
|
-
location: "after"
|
|
1814
|
-
}, React.createElement(CheckBox, {
|
|
1815
|
-
id: 'showPageSizes',
|
|
1816
|
-
text: 'Show Page Size',
|
|
1817
|
-
value: showPageSizeSelector,
|
|
1818
|
-
onValueChanged: handleCheckboxChange
|
|
1819
|
-
})), React.createElement(Item$1, {
|
|
1820
|
-
location: "after"
|
|
1821
|
-
}, React.createElement(CheckBox, {
|
|
1822
|
-
id: 'showPages',
|
|
1823
|
-
text: 'Enable Paging',
|
|
1824
|
-
value: enablePaging,
|
|
1825
|
-
onValueChanged: onEnablePagingChange
|
|
1826
|
-
})), React.createElement(Item$1, {
|
|
1827
|
-
location: "after"
|
|
1828
|
-
}, React.createElement(Lookup, {
|
|
1829
|
-
value: scrollingType,
|
|
1830
|
-
dataSource: [{
|
|
1831
|
-
value: "standard",
|
|
1832
|
-
label: "standard"
|
|
1833
|
-
}, {
|
|
1834
|
-
value: "virtual",
|
|
1835
|
-
label: "Active"
|
|
1836
|
-
}, {
|
|
1837
|
-
value: "infinite",
|
|
1838
|
-
label: "infinite"
|
|
1839
|
-
}],
|
|
1840
|
-
onValueChange: handleScrollingTypeChange
|
|
1841
|
-
})), React.createElement(Item$1, {
|
|
1842
|
-
name: "columnChooserButton"
|
|
1843
|
-
}), React.createElement(Item$1, {
|
|
1844
|
-
name: "searchPanel"
|
|
1845
|
-
}), React.createElement(Item$1, {
|
|
1846
|
-
name: "exportButton"
|
|
1847
|
-
}), React.createElement(Item$1, {
|
|
1848
|
-
menuItemRender: renderMenuItem$1
|
|
1849
|
-
})))));
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
1575
|
var DxTreeList = function DxTreeList(props) {
|
|
1853
1576
|
var _useState = useState(props.dataSource),
|
|
1854
1577
|
dataSource = _useState[0];
|
|
@@ -1921,22 +1644,37 @@ var DxTreeView = function DxTreeView(props) {
|
|
|
1921
1644
|
}));
|
|
1922
1645
|
};
|
|
1923
1646
|
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
}
|
|
1647
|
+
// A type of promise-like that resolves synchronously and supports only one observer
|
|
1648
|
+
|
|
1649
|
+
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
1650
|
+
|
|
1651
|
+
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
1652
|
+
|
|
1653
|
+
// Asynchronously call a function and send errors to recovery continuation
|
|
1654
|
+
function _catch(body, recover) {
|
|
1655
|
+
try {
|
|
1656
|
+
var result = body();
|
|
1657
|
+
} catch(e) {
|
|
1658
|
+
return recover(e);
|
|
1659
|
+
}
|
|
1660
|
+
if (result && result.then) {
|
|
1661
|
+
return result.then(void 0, recover);
|
|
1662
|
+
}
|
|
1663
|
+
return result;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
// Asynchronously await a promise and pass the result to a finally continuation
|
|
1667
|
+
function _finallyRethrows(body, finalizer) {
|
|
1668
|
+
try {
|
|
1669
|
+
var result = body();
|
|
1670
|
+
} catch (e) {
|
|
1671
|
+
return finalizer(true, e);
|
|
1672
|
+
}
|
|
1673
|
+
if (result && result.then) {
|
|
1674
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
1675
|
+
}
|
|
1676
|
+
return finalizer(false, result);
|
|
1677
|
+
}
|
|
1940
1678
|
|
|
1941
1679
|
function l(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
|
1942
1680
|
var p=Object.prototype.hasOwnProperty,fa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ha={},ia={};
|
|
@@ -16152,314 +15890,6 @@ var server_browser = {
|
|
|
16152
15890
|
renderToReadableStream: renderToReadableStream$1
|
|
16153
15891
|
};
|
|
16154
15892
|
|
|
16155
|
-
function OdsDataGridNew(props) {
|
|
16156
|
-
var _props$selectOptions, _props$selectOptions$, _props$selectOptions2, _props$selectOptions$2, _props$selectOptions3;
|
|
16157
|
-
var dataGridRef = useRef(null);
|
|
16158
|
-
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
16159
|
-
var renderMenuItem = function renderMenuItem() {
|
|
16160
|
-
return React.createElement(Export, {
|
|
16161
|
-
enabled: true,
|
|
16162
|
-
allowExportSelectedData: true,
|
|
16163
|
-
formats: props.exportFormats !== undefined ? props.exportFormats : ['xlsx']
|
|
16164
|
-
});
|
|
16165
|
-
};
|
|
16166
|
-
var onExporting = function onExporting(e) {
|
|
16167
|
-
if (e.format === 'xlsx') {
|
|
16168
|
-
var workbook = new Workbook();
|
|
16169
|
-
exportDataGrid({
|
|
16170
|
-
component: e.component,
|
|
16171
|
-
worksheet: workbook.addWorksheet('Main sheet'),
|
|
16172
|
-
autoFilterEnabled: true
|
|
16173
|
-
}).then(function () {
|
|
16174
|
-
workbook.xlsx.writeBuffer().then(function (buffer) {
|
|
16175
|
-
saveAs(new Blob([buffer], {
|
|
16176
|
-
type: 'application/octet-stream'
|
|
16177
|
-
}), fileName + '.xlsx');
|
|
16178
|
-
});
|
|
16179
|
-
});
|
|
16180
|
-
} else {
|
|
16181
|
-
var doc = new jsPDF();
|
|
16182
|
-
exportDataGrid$1({
|
|
16183
|
-
jsPDFDocument: doc,
|
|
16184
|
-
component: e.component,
|
|
16185
|
-
indent: 5
|
|
16186
|
-
}).then(function () {
|
|
16187
|
-
doc.save(fileName + '.pdf');
|
|
16188
|
-
});
|
|
16189
|
-
}
|
|
16190
|
-
};
|
|
16191
|
-
var customLoad = function customLoad() {
|
|
16192
|
-
var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
|
|
16193
|
-
if (localStorage.getItem(props.exportFileName + "Storage")) {
|
|
16194
|
-
state.selectedRowKeys = [];
|
|
16195
|
-
if (props.filterEnabledShow) state.filterPanel = {
|
|
16196
|
-
filterEnabled: false
|
|
16197
|
-
};else state.filterPanel = {
|
|
16198
|
-
filterEnabled: true
|
|
16199
|
-
};
|
|
16200
|
-
}
|
|
16201
|
-
return state;
|
|
16202
|
-
};
|
|
16203
|
-
var customSave = function customSave(state) {
|
|
16204
|
-
state.selectedRowKeys = [];
|
|
16205
|
-
if (props.filterEnabledShow) state.filterPanel = {
|
|
16206
|
-
filterEnabled: false
|
|
16207
|
-
};else state.filterPanel = {
|
|
16208
|
-
filterEnabled: true
|
|
16209
|
-
};
|
|
16210
|
-
localStorage.setItem(props.exportFileName + "Storage", JSON.stringify(state));
|
|
16211
|
-
};
|
|
16212
|
-
useEffect(function () {
|
|
16213
|
-
locale(localStorage.getItem("locale"));
|
|
16214
|
-
loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
|
|
16215
|
-
}, []);
|
|
16216
|
-
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
16217
|
-
className: "odsDatagrid",
|
|
16218
|
-
style: {
|
|
16219
|
-
width: "100%",
|
|
16220
|
-
overflowX: 'hidden',
|
|
16221
|
-
overflowY: "hidden"
|
|
16222
|
-
}
|
|
16223
|
-
}, React.createElement(DataGrid, Object.assign({
|
|
16224
|
-
dataSource: props.dataSource,
|
|
16225
|
-
keyExpr: props.keyExpr,
|
|
16226
|
-
allowColumnResizing: props.allowColumnResizing ? props.allowColumnResizing : true,
|
|
16227
|
-
columnResizingMode: "nextColumn",
|
|
16228
|
-
onContentReady: props.onContentReady,
|
|
16229
|
-
onRowInserted: props.onRowInserted,
|
|
16230
|
-
onRowUpdated: props.onRowUpdated,
|
|
16231
|
-
onRowRemoved: props.onRowRemoved,
|
|
16232
|
-
onEditorPreparing: props.onEditorPreparing,
|
|
16233
|
-
onSaving: props.onSaving,
|
|
16234
|
-
allowColumnReordering: props.allowColumnReordering ? props.allowColumnReordering : true,
|
|
16235
|
-
showRowLines: props.showRowLines ? props.showRowLines : true,
|
|
16236
|
-
showBorders: props.showBorders ? props.showBorders : true,
|
|
16237
|
-
columnAutoWidth: props.columnAutoWidth == undefined ? false : props.columnAutoWidth,
|
|
16238
|
-
focusedRowEnabled: props.focusedRowEnabled ? props.focusedRowEnabled : false,
|
|
16239
|
-
wordWrapEnabled: props.wordWrapEnabled == undefined ? false : props.wordWrapEnabled,
|
|
16240
|
-
onEditCanceling: props.onEditCanceling,
|
|
16241
|
-
onExporting: onExporting,
|
|
16242
|
-
filterSyncEnabled: props.filterSyncEnabled ? props.filterSyncEnabled : true,
|
|
16243
|
-
scrolling: {
|
|
16244
|
-
useNative: props.scrolUseNative == undefined ? false : props.scrolUseNative
|
|
16245
|
-
},
|
|
16246
|
-
height: props.height == undefined ? window.innerHeight - 164 : props.height,
|
|
16247
|
-
repaintChangesOnly: props.repaintChangesOnly ? props.repaintChangesOnly : true,
|
|
16248
|
-
remoteOperations: props.remoteOperations ? props.remoteOperations : false,
|
|
16249
|
-
ref: dataGridRef,
|
|
16250
|
-
selectedRowKeys: props.selectedRowKeys,
|
|
16251
|
-
onSelectionChanged: props.onSelectionChanged
|
|
16252
|
-
}, props), React.createElement(LoadPanel, {
|
|
16253
|
-
enabled: true
|
|
16254
|
-
}), React.createElement(Paging, {
|
|
16255
|
-
defaultPageSize: props.pageSize
|
|
16256
|
-
}), props.pagingEnable && React.createElement(Pager, {
|
|
16257
|
-
visible: false,
|
|
16258
|
-
displayMode: "full",
|
|
16259
|
-
showPageSizeSelector: false,
|
|
16260
|
-
showNavigationButtons: false,
|
|
16261
|
-
showInfo: false
|
|
16262
|
-
}), props.searchEnable && React.createElement(SearchPanel, {
|
|
16263
|
-
visible: true
|
|
16264
|
-
}), props.filterEnable && React.createElement(FilterRow, {
|
|
16265
|
-
visible: true
|
|
16266
|
-
}), React.createElement(FilterPanel, {
|
|
16267
|
-
visible: true
|
|
16268
|
-
}), props.headerFilterEnable && React.createElement(HeaderFilter, {
|
|
16269
|
-
visible: true
|
|
16270
|
-
}), React.createElement(ColumnChooser, {
|
|
16271
|
-
enabled: true,
|
|
16272
|
-
mode: "select"
|
|
16273
|
-
}, !props.columnChooserPositionDisabled && React.createElement(Position, {
|
|
16274
|
-
my: "right top",
|
|
16275
|
-
at: "right bottom",
|
|
16276
|
-
of: ".dx-datagrid-column-chooser-button"
|
|
16277
|
-
}), React.createElement(ColumnChooserSearch, {
|
|
16278
|
-
enabled: true
|
|
16279
|
-
}), React.createElement(ColumnChooserSelection, {
|
|
16280
|
-
allowSelectAll: true,
|
|
16281
|
-
selectByClick: true,
|
|
16282
|
-
recursive: true
|
|
16283
|
-
})), props.editEnable === true && React.createElement(Editing, {
|
|
16284
|
-
mode: props.edit.mode,
|
|
16285
|
-
allowUpdating: props.edit.allowUpdating,
|
|
16286
|
-
allowDeleting: props.edit.allowDeleting,
|
|
16287
|
-
allowAdding: props.edit.allowAdding,
|
|
16288
|
-
useIcons: true
|
|
16289
|
-
}, props.edit.mode === "popup" && React.createElement(Popup, {
|
|
16290
|
-
title: props.popupTitle,
|
|
16291
|
-
showTitle: true,
|
|
16292
|
-
width: 700,
|
|
16293
|
-
height: 300,
|
|
16294
|
-
showCloseButton: false
|
|
16295
|
-
}), React.createElement(Form$1, null, props.formItems.map(function (formItem) {
|
|
16296
|
-
return React.createElement(Item, {
|
|
16297
|
-
itemType: formItem.itemType,
|
|
16298
|
-
colCount: formItem.colCount,
|
|
16299
|
-
colSpan: formItem.colSpan
|
|
16300
|
-
}, formItem.items.map(function (subItem) {
|
|
16301
|
-
return React.createElement(Item, {
|
|
16302
|
-
key: subItem.dataField,
|
|
16303
|
-
dataField: subItem.dataField
|
|
16304
|
-
});
|
|
16305
|
-
}));
|
|
16306
|
-
}))), React.createElement(Scrolling, {
|
|
16307
|
-
mode: props.scroll.mode,
|
|
16308
|
-
showScrollbar: props.scroll.showScrollbar,
|
|
16309
|
-
scrollByContent: props.scroll.scrollByContent,
|
|
16310
|
-
scrollByThumb: props.scroll.scrollByThumb
|
|
16311
|
-
}), ((_props$selectOptions = props.selectOptions) === null || _props$selectOptions === void 0 ? void 0 : _props$selectOptions.selectEnable) && React.createElement(Selection, {
|
|
16312
|
-
mode: (_props$selectOptions$ = (_props$selectOptions2 = props.selectOptions) === null || _props$selectOptions2 === void 0 ? void 0 : _props$selectOptions2.mode) != null ? _props$selectOptions$ : "multiple",
|
|
16313
|
-
deferred: (_props$selectOptions$2 = (_props$selectOptions3 = props.selectOptions) === null || _props$selectOptions3 === void 0 ? void 0 : _props$selectOptions3.deferred) != null ? _props$selectOptions$2 : true
|
|
16314
|
-
}), props.exportEnable === true && React.createElement(Export, {
|
|
16315
|
-
enabled: true,
|
|
16316
|
-
allowExportSelectedData: true,
|
|
16317
|
-
formats: props.exportFormats
|
|
16318
|
-
}), props.columns.map(function (col) {
|
|
16319
|
-
return React.createElement(Column, Object.assign({
|
|
16320
|
-
key: col.dataField
|
|
16321
|
-
}, col), col.required && React.createElement(RequiredRule, {
|
|
16322
|
-
message: col.requiredMessage
|
|
16323
|
-
}), col.dataField === 'IsActive' && React.createElement(HeaderFilter, {
|
|
16324
|
-
dataSource: [{
|
|
16325
|
-
text: 'All',
|
|
16326
|
-
value: null
|
|
16327
|
-
}, {
|
|
16328
|
-
text: 'Active',
|
|
16329
|
-
value: true
|
|
16330
|
-
}, {
|
|
16331
|
-
text: 'Passive',
|
|
16332
|
-
value: false
|
|
16333
|
-
}]
|
|
16334
|
-
}));
|
|
16335
|
-
}), React.createElement(Column, {
|
|
16336
|
-
dataField: "Actions",
|
|
16337
|
-
fixed: true,
|
|
16338
|
-
allowSorting: false,
|
|
16339
|
-
caption: props.actionColumnCaption,
|
|
16340
|
-
type: "buttons",
|
|
16341
|
-
showInColumnChooser: false
|
|
16342
|
-
}, props.edit.allowUpdating && React.createElement(Button$1, {
|
|
16343
|
-
hint: props.hintForEditButton,
|
|
16344
|
-
visible: true,
|
|
16345
|
-
disabled: props.actionPermission == undefined ? false : !props.actionPermission,
|
|
16346
|
-
icon: "edit",
|
|
16347
|
-
onClick: props.editButtonClick
|
|
16348
|
-
}), props.edit.allowDeleting && React.createElement(Button$1, {
|
|
16349
|
-
hint: props.hintForDeleteButton,
|
|
16350
|
-
visible: true,
|
|
16351
|
-
disabled: props.actionPermission == undefined ? false : !props.actionPermission,
|
|
16352
|
-
icon: "trash",
|
|
16353
|
-
onClick: props.deleteButtonClick
|
|
16354
|
-
}), props.actionColumnEnable !== undefined && props.actionColumnEnable === true && React.createElement(Column, {
|
|
16355
|
-
dataField: "Actions",
|
|
16356
|
-
fixed: true,
|
|
16357
|
-
allowSorting: false,
|
|
16358
|
-
caption: props.actionColumnCaption,
|
|
16359
|
-
type: "buttons",
|
|
16360
|
-
showInColumnChooser: false
|
|
16361
|
-
}, props.actionButtonGroup && Array.isArray(props.actionButtonGroup) && props.actionButtonGroup.map(function (buttonItem) {
|
|
16362
|
-
return React.createElement(Button$1, {
|
|
16363
|
-
hint: buttonItem.hint,
|
|
16364
|
-
visible: buttonItem.visible,
|
|
16365
|
-
disabled: buttonItem.actionPermission == undefined ? false : !buttonItem.actionPermission,
|
|
16366
|
-
icon: server_browser.renderToString(React.createElement(DynamicIcon, {
|
|
16367
|
-
iconName: buttonItem.icon
|
|
16368
|
-
})),
|
|
16369
|
-
onClick: buttonItem.onClick
|
|
16370
|
-
});
|
|
16371
|
-
}))), props.edit && React.createElement(Editing, {
|
|
16372
|
-
mode: props.edit.mode,
|
|
16373
|
-
allowUpdating: props.edit.allowUpdating,
|
|
16374
|
-
allowDeleting: props.edit.allowDeleting,
|
|
16375
|
-
allowAdding: props.edit.allowAdding,
|
|
16376
|
-
useIcons: true
|
|
16377
|
-
}, props.edit.mode === "popup" && React.createElement("div", null, React.createElement(Popup, {
|
|
16378
|
-
showTitle: true,
|
|
16379
|
-
width: 700,
|
|
16380
|
-
height: 300,
|
|
16381
|
-
showCloseButton: false
|
|
16382
|
-
}), React.createElement(Form$1, null, props.edit.formItems && props.edit.formItems.map(function (formItem) {
|
|
16383
|
-
return React.createElement(Item, {
|
|
16384
|
-
itemType: formItem.itemType,
|
|
16385
|
-
colCount: formItem.colCount,
|
|
16386
|
-
colSpan: formItem.colSpan
|
|
16387
|
-
}, formItem.items.map(function (subItem) {
|
|
16388
|
-
return React.createElement(Item, {
|
|
16389
|
-
key: subItem.dataField,
|
|
16390
|
-
dataField: subItem.dataField
|
|
16391
|
-
});
|
|
16392
|
-
}));
|
|
16393
|
-
})))), React.createElement(Toolbar, null, props.pageTitle && React.createElement(Item$1, {
|
|
16394
|
-
location: "before"
|
|
16395
|
-
}, React.createElement(Typography.Title, {
|
|
16396
|
-
level: 5,
|
|
16397
|
-
style: {
|
|
16398
|
-
display: "flex",
|
|
16399
|
-
alignItems: "center",
|
|
16400
|
-
gap: "4px",
|
|
16401
|
-
alignSelf: "stretch"
|
|
16402
|
-
}
|
|
16403
|
-
}, props.pageTitle)), props.toolbarButtonGroup.map(function (buttonGroupItem) {
|
|
16404
|
-
return React.createElement(Item$1, {
|
|
16405
|
-
location: "before"
|
|
16406
|
-
}, React.createElement(OdsButton, {
|
|
16407
|
-
type: buttonGroupItem.type,
|
|
16408
|
-
disabled: buttonGroupItem.actionPermission == undefined ? false : !buttonGroupItem.actionPermission,
|
|
16409
|
-
onClick: buttonGroupItem.onclick
|
|
16410
|
-
}, buttonGroupItem.label));
|
|
16411
|
-
}), React.createElement(Item$1, {
|
|
16412
|
-
name: "searchPanel"
|
|
16413
|
-
}), React.createElement(Item$1, {
|
|
16414
|
-
name: "columnChooserButton"
|
|
16415
|
-
}), React.createElement(Item$1, {
|
|
16416
|
-
name: "exportButton"
|
|
16417
|
-
}), React.createElement(Item$1, {
|
|
16418
|
-
menuItemRender: renderMenuItem
|
|
16419
|
-
})), React.createElement(Summary, null, React.createElement(TotalItem, {
|
|
16420
|
-
column: props.summaryTotalColumnName == undefined ? "Id" : props.summaryTotalColumnName,
|
|
16421
|
-
summaryType: "count",
|
|
16422
|
-
displayFormat: props.summaryTotalDataDisplayLabel + " : " + (props.summaryTotalDataCount == undefined ? "{0}" : props.summaryTotalDataCount + " / " + props.summaryTotalPagesize)
|
|
16423
|
-
})), props.storeState && React.createElement(StateStoring, {
|
|
16424
|
-
enabled: true,
|
|
16425
|
-
type: "custom",
|
|
16426
|
-
customLoad: customLoad,
|
|
16427
|
-
customSave: customSave
|
|
16428
|
-
}))));
|
|
16429
|
-
}
|
|
16430
|
-
|
|
16431
|
-
// A type of promise-like that resolves synchronously and supports only one observer
|
|
16432
|
-
|
|
16433
|
-
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
16434
|
-
|
|
16435
|
-
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
16436
|
-
|
|
16437
|
-
// Asynchronously call a function and send errors to recovery continuation
|
|
16438
|
-
function _catch(body, recover) {
|
|
16439
|
-
try {
|
|
16440
|
-
var result = body();
|
|
16441
|
-
} catch(e) {
|
|
16442
|
-
return recover(e);
|
|
16443
|
-
}
|
|
16444
|
-
if (result && result.then) {
|
|
16445
|
-
return result.then(void 0, recover);
|
|
16446
|
-
}
|
|
16447
|
-
return result;
|
|
16448
|
-
}
|
|
16449
|
-
|
|
16450
|
-
// Asynchronously await a promise and pass the result to a finally continuation
|
|
16451
|
-
function _finallyRethrows(body, finalizer) {
|
|
16452
|
-
try {
|
|
16453
|
-
var result = body();
|
|
16454
|
-
} catch (e) {
|
|
16455
|
-
return finalizer(true, e);
|
|
16456
|
-
}
|
|
16457
|
-
if (result && result.then) {
|
|
16458
|
-
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
16459
|
-
}
|
|
16460
|
-
return finalizer(false, result);
|
|
16461
|
-
}
|
|
16462
|
-
|
|
16463
15893
|
/**
|
|
16464
15894
|
* Checks if `value` is the
|
|
16465
15895
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
@@ -17036,7 +16466,24 @@ function throttle(func, wait, options) {
|
|
|
17036
16466
|
|
|
17037
16467
|
var throttle_1 = throttle;
|
|
17038
16468
|
|
|
17039
|
-
var
|
|
16469
|
+
var iconComponents = {
|
|
16470
|
+
edit: EditIcon,
|
|
16471
|
+
"delete": Trash1Icon,
|
|
16472
|
+
copy: CopyIcon,
|
|
16473
|
+
discount: DiscountIcon,
|
|
16474
|
+
kebabMenu: KebabMenuIcon,
|
|
16475
|
+
refresh: RefreshIcon
|
|
16476
|
+
};
|
|
16477
|
+
var DynamicIcon = function DynamicIcon(_ref) {
|
|
16478
|
+
var iconName = _ref.iconName;
|
|
16479
|
+
var IconComponent = iconComponents[iconName];
|
|
16480
|
+
if (!IconComponent) {
|
|
16481
|
+
return null;
|
|
16482
|
+
}
|
|
16483
|
+
return React.createElement(IconComponent, null);
|
|
16484
|
+
};
|
|
16485
|
+
|
|
16486
|
+
var exportFormats$2 = ['xlsx'];
|
|
17040
16487
|
var totalPageCount = 1;
|
|
17041
16488
|
var loadedPageCount = 1;
|
|
17042
16489
|
var totalRecordCount = 0;
|
|
@@ -17171,7 +16618,12 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17171
16618
|
loadedPageCount = 1;
|
|
17172
16619
|
} else if (totalPageCount >= loadedPageCount) {
|
|
17173
16620
|
setData(function (prevData) {
|
|
17174
|
-
|
|
16621
|
+
var uniqueData = newData.Data.filter(function (newItem) {
|
|
16622
|
+
return !prevData.some(function (prevItem) {
|
|
16623
|
+
return prevItem.Id === newItem.Id;
|
|
16624
|
+
});
|
|
16625
|
+
});
|
|
16626
|
+
return [].concat(prevData, uniqueData);
|
|
17175
16627
|
});
|
|
17176
16628
|
}
|
|
17177
16629
|
totalPageCount = newData.PageCount;
|
|
@@ -17322,21 +16774,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17322
16774
|
}
|
|
17323
16775
|
}, []);
|
|
17324
16776
|
var renderTotal = useCallback(function () {
|
|
17325
|
-
|
|
17326
|
-
if (data.length < 50 || !props.isServerSide || loadedPageCount == totalPageCount) {
|
|
17327
|
-
totalloaded = data.length;
|
|
17328
|
-
} else {
|
|
17329
|
-
totalloaded = loadedPageCount * props.pageSize;
|
|
17330
|
-
}
|
|
17331
|
-
var result = "";
|
|
17332
|
-
if (filteredRowCount > 0) {
|
|
17333
|
-
result = "" + totalloaded + props.customSummary.summaryFilteredDataLabel + (totalRecordCount > 0 ? totalloaded + " " + props.customSummary.summaryLoadedDataLabel + ("- " + totalRecordCount) + props.customSummary.summaryTotalDataLabel : " ");
|
|
17334
|
-
} else if (!props.isServerSide && totalloaded > 0) {
|
|
17335
|
-
result = totalloaded + " " + props.customSummary.summaryLoadedDataLabel + ("- " + totalloaded) + props.customSummary.summaryTotalDataLabel;
|
|
17336
|
-
} else {
|
|
17337
|
-
result = totalRecordCount > 0 ? totalloaded + " " + props.customSummary.summaryLoadedDataLabel + ("- " + totalRecordCount) + props.customSummary.summaryTotalDataLabel : "";
|
|
17338
|
-
}
|
|
17339
|
-
return result;
|
|
16777
|
+
return totalRecordCount > 0 ? props.customSummary.summaryTotalDataLabel + " : " + totalRecordCount : "";
|
|
17340
16778
|
}, [data, filteredRowCount, loadedPageCount, props.pageSize, totalRecordCount]);
|
|
17341
16779
|
var renderTotalPaging = useCallback(function () {
|
|
17342
16780
|
var result = "";
|
|
@@ -17486,7 +16924,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17486
16924
|
width: 700,
|
|
17487
16925
|
height: 300,
|
|
17488
16926
|
showCloseButton: false
|
|
17489
|
-
}), React.createElement(Form
|
|
16927
|
+
}), React.createElement(Form, null, props.edit.formItems && props.edit.formItems.map(function (formItem) {
|
|
17490
16928
|
return React.createElement(Item, {
|
|
17491
16929
|
itemType: formItem.itemType,
|
|
17492
16930
|
colCount: formItem.colCount,
|
|
@@ -17526,7 +16964,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17526
16964
|
}), React.createElement(Export, {
|
|
17527
16965
|
enabled: true,
|
|
17528
16966
|
allowExportSelectedData: true,
|
|
17529
|
-
formats: exportFormats$
|
|
16967
|
+
formats: exportFormats$2
|
|
17530
16968
|
}), ((_props$selectOptions = props.selectOptions) === null || _props$selectOptions === void 0 ? void 0 : _props$selectOptions.selectEnable) && React.createElement(Selection, {
|
|
17531
16969
|
mode: (_props$selectOptions$ = (_props$selectOptions2 = props.selectOptions) === null || _props$selectOptions2 === void 0 ? void 0 : _props$selectOptions2.mode) != null ? _props$selectOptions$ : "multiple",
|
|
17532
16970
|
deferred: (_props$selectOptions$2 = (_props$selectOptions3 = props.selectOptions) === null || _props$selectOptions3 === void 0 ? void 0 : _props$selectOptions3.deferred) != null ? _props$selectOptions$2 : true
|
|
@@ -17593,5 +17031,5 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17593
17031
|
})));
|
|
17594
17032
|
};
|
|
17595
17033
|
|
|
17596
|
-
export { DxTreeList, DxTreeView, OdsAlert, OdsAutoComplete, OdsBannerAlert, OdsBasicTable, OdsButton, OdsCalendar, OdsCard, OdsCheckbox, OdsCheckboxGroup, OdsCollapse,
|
|
17034
|
+
export { DxTreeList, DxTreeView, OdsAlert, OdsAutoComplete, OdsBannerAlert, OdsBasicTable, OdsButton, OdsCalendar, OdsCard, OdsCheckbox, OdsCheckboxGroup, OdsCollapse, OdsDataGrid, OdsDateRangePicker, OdsDatepicker, OdsDisplayGrid, OdsDivider, OdsCollapse as OdsDropdown, OdsDropdownButton, OdsImage, OdsInput, OdsInputNumber, OdsLink, OdsList, OdsModal, OdsMultiSelect, OdsNotification, OdsParagraph, OdsPassword, OdsPhoneInput, OdsRadio, OdsRadioGroup, OdsRangeTimepicker, OdsRate, OdsRemoteDataGrid, OdsSearch, OdsSelect, OdsSelectableTable, OdsSpin, OdsSwitch, OdsTab, OdsBasicTable as OdsTable, OdsTag, OdsText, OdsTextArea, OdsTimeline, OdsTimepicker, OdsTitle };
|
|
17597
17035
|
//# sourceMappingURL=index.modern.js.map
|