ods-component-lib 1.18.73 → 1.18.74
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.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormProps, ButtonProps } from 'antd';
|
|
3
|
+
export interface IFormItemRuleProps {
|
|
4
|
+
required?: boolean;
|
|
5
|
+
message?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IFormItemProps {
|
|
8
|
+
label?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
formItemType: string;
|
|
11
|
+
rules?: IFormItemRuleProps[];
|
|
12
|
+
}
|
|
13
|
+
export interface IFormProps extends FormProps {
|
|
14
|
+
formItems: IFormItemProps[];
|
|
15
|
+
formButtons: ButtonProps[];
|
|
16
|
+
}
|
|
17
|
+
declare function OdsBasicForm(props: IFormProps): React.JSX.Element;
|
|
18
|
+
export default OdsBasicForm;
|
package/dist/index.js
CHANGED
|
@@ -16703,6 +16703,32 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16703
16703
|
React.useEffect(function () {
|
|
16704
16704
|
if (contentReady) checkSortingPropertyForInitilaize();
|
|
16705
16705
|
}, [contentReady]);
|
|
16706
|
+
React.useEffect(function () {
|
|
16707
|
+
var cssRules = "\n .data-exists .dx-datagrid-borders > .dx-datagrid-filter-panel,\n .data-exists .dx-datagrid-borders > .dx-datagrid-headers {\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n padding-right: 0px !important;\n }\n \n .data-exists .dx-datagrid-headers .dx-datagrid-content {\n margin-bottom: -1px;\n padding-right: 17px !important;\n }\n ";
|
|
16708
|
+
var styleSheet = document.createElement('style');
|
|
16709
|
+
styleSheet.type = 'text/css';
|
|
16710
|
+
styleSheet.innerText = cssRules;
|
|
16711
|
+
document.head.appendChild(styleSheet);
|
|
16712
|
+
var checkData = function checkData() {
|
|
16713
|
+
if (gridRef.current) {
|
|
16714
|
+
var _dataGridInstance = gridRef.current.instance;
|
|
16715
|
+
var dataExists = data.length > 0;
|
|
16716
|
+
var gridElement = _dataGridInstance.element();
|
|
16717
|
+
if (dataExists) {
|
|
16718
|
+
gridElement.classList.add('data-exists');
|
|
16719
|
+
} else {
|
|
16720
|
+
gridElement.classList.remove('data-exists');
|
|
16721
|
+
}
|
|
16722
|
+
}
|
|
16723
|
+
};
|
|
16724
|
+
var dataGridInstance = gridRef.current.instance;
|
|
16725
|
+
dataGridInstance.on('dataChanged', checkData);
|
|
16726
|
+
checkData();
|
|
16727
|
+
return function () {
|
|
16728
|
+
document.head.removeChild(styleSheet);
|
|
16729
|
+
dataGridInstance.off('dataChanged', checkData);
|
|
16730
|
+
};
|
|
16731
|
+
}, [data]);
|
|
16706
16732
|
var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
|
|
16707
16733
|
var onOptionChanged = props.onOptionChanged;
|
|
16708
16734
|
if (onOptionChanged) {
|