ods-component-lib 1.18.10 → 1.18.12
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/timepicker/OdsTimepicker.styled.d.ts +1 -1
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +29 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/devextreme/OdsCustomDataSourceGrid.d.ts +0 -5
- package/dist/components/devextreme/OdsDatagridProps.d.ts +0 -2
- package/dist/components/devextreme/OdsRefactoredGrid.d.ts +0 -54
package/dist/index.modern.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Alert, AutoComplete, Button, Dropdown, Calendar, Card as Card$1, Checkbox, DatePicker, Divider, Input, Form, Image, InputNumber, List, Modal, notification, Radio, Rate, Select, Space, Spin, Switch, Tabs, Table, Tag, Timeline, TimePicker, Typography, theme } from 'antd';
|
|
1
|
+
import { Alert, AutoComplete, Button, Dropdown, Calendar, Card as Card$1, Checkbox, DatePicker, Divider, Input, Form, Image, 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, UserOutlined, LockOutlined } from '@ant-design/icons';
|
|
6
|
+
import { EyeTwoTone, EyeInvisibleOutlined, FrownOutlined, MehOutlined, SmileOutlined, HeartOutlined, UserOutlined, LockOutlined, 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 message from 'antd/es/message';
|
|
@@ -17127,6 +17127,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17127
17127
|
var gridRef = useRef(null);
|
|
17128
17128
|
var _useState3 = useState(0),
|
|
17129
17129
|
filteredRowCount = _useState3[0];
|
|
17130
|
+
var _useState4 = useState(props.columns),
|
|
17131
|
+
columns = _useState4[0],
|
|
17132
|
+
setColumns = _useState4[1];
|
|
17130
17133
|
var headers = new Headers({
|
|
17131
17134
|
'Content-Type': 'application/json',
|
|
17132
17135
|
'Authorization': 'Bearer ' + (props.axiosRequest ? props.axiosRequest.token : ""),
|
|
@@ -17142,6 +17145,26 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17142
17145
|
fetchData();
|
|
17143
17146
|
}
|
|
17144
17147
|
}, [(_props$axiosRequest2 = props.axiosRequest) === null || _props$axiosRequest2 === void 0 ? void 0 : _props$axiosRequest2.requestData]);
|
|
17148
|
+
useEffect(function () {
|
|
17149
|
+
if (columns !== undefined && columns.length > 0) {
|
|
17150
|
+
var newColumns = columns.map(function (colItem) {
|
|
17151
|
+
if (colItem.tooltip !== undefined && colItem.tooltip.enable) {
|
|
17152
|
+
var headerCellRenderr = function headerCellRenderr() {
|
|
17153
|
+
return React.createElement("div", null, React.createElement("span", null, colItem.caption), React.createElement(Tooltip, {
|
|
17154
|
+
title: colItem.tooltip.title
|
|
17155
|
+
}, React.createElement(InfoCircleOutlined, {
|
|
17156
|
+
style: {
|
|
17157
|
+
marginLeft: 5
|
|
17158
|
+
}
|
|
17159
|
+
})));
|
|
17160
|
+
};
|
|
17161
|
+
colItem.headerCellRender = headerCellRenderr;
|
|
17162
|
+
}
|
|
17163
|
+
return colItem;
|
|
17164
|
+
});
|
|
17165
|
+
setColumns(newColumns);
|
|
17166
|
+
}
|
|
17167
|
+
}, [props.columns]);
|
|
17145
17168
|
useEffect(function () {
|
|
17146
17169
|
locale(localStorage.getItem("locale"));
|
|
17147
17170
|
loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
|
|
@@ -17367,7 +17390,6 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17367
17390
|
var scrollHeight = (_scrollable$scrollHei = scrollable === null || scrollable === void 0 ? void 0 : scrollable.scrollHeight) != null ? _scrollable$scrollHei : 0;
|
|
17368
17391
|
var maxHeight = Math.max(top, height, scrollHeight) - 1;
|
|
17369
17392
|
var reachedBottom = Math.ceil(top + height) >= maxHeight;
|
|
17370
|
-
console.log("reachedBottom", Math.ceil(top + height), maxHeight, reachedBottom);
|
|
17371
17393
|
var lastScrollTop = 0;
|
|
17372
17394
|
if (top < lastScrollTop) {
|
|
17373
17395
|
return;
|
|
@@ -17390,7 +17412,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17390
17412
|
}
|
|
17391
17413
|
};
|
|
17392
17414
|
}, [data.length]);
|
|
17393
|
-
return React.createElement(React.Fragment, null, React.createElement(DataGrid$1, {
|
|
17415
|
+
return React.createElement(React.Fragment, null, React.createElement(DataGrid$1, Object.assign({
|
|
17394
17416
|
keyExpr: props.keyExpr,
|
|
17395
17417
|
dataSource: props.isServerSide ? data : props.dataSource,
|
|
17396
17418
|
showBorders: true,
|
|
@@ -17420,7 +17442,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17420
17442
|
columnFixing: {
|
|
17421
17443
|
enabled: true
|
|
17422
17444
|
}
|
|
17423
|
-
}, props
|
|
17445
|
+
}, props), columns.map(function (col) {
|
|
17424
17446
|
return React.createElement(Column, Object.assign({
|
|
17425
17447
|
key: col.dataField
|
|
17426
17448
|
}, col, {
|
|
@@ -17564,12 +17586,12 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
17564
17586
|
name: "exportButton",
|
|
17565
17587
|
cssClass: 'toolbarPanelItems'
|
|
17566
17588
|
})), React.createElement(Summary, null, React.createElement(TotalItem, {
|
|
17567
|
-
column:
|
|
17589
|
+
column: columns[0].dataField,
|
|
17568
17590
|
summaryType: "sum",
|
|
17569
17591
|
displayFormat: "customizeText",
|
|
17570
17592
|
customizeText: renderTotal
|
|
17571
17593
|
}), React.createElement(TotalItem, {
|
|
17572
|
-
column:
|
|
17594
|
+
column: columns[1].dataField,
|
|
17573
17595
|
summaryType: "sum",
|
|
17574
17596
|
displayFormat: "customizeText",
|
|
17575
17597
|
customizeText: renderTotalPaging
|