ods-component-lib 1.18.66 → 1.18.68
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/form/OdsBasicForm.d.ts +18 -0
- package/dist/components/antd/icon/OdsIcon.d.ts +10 -0
- package/dist/components/antd/message/OdsMessage.d.ts +3 -0
- package/dist/components/antd/select/OdsCustomMultiSelect.d.ts +7 -0
- package/dist/components/antd/select/OdsMultiSelect.d.ts +9 -0
- package/dist/components/custom/OdsLogin.d.ts +8 -0
- package/dist/components/devextreme/DxDataPopupForm.d.ts +3 -0
- package/dist/components/devextreme/DynamicIcon.d.ts +5 -0
- package/dist/components/devextreme/OdsDataGridNew.d.ts +56 -0
- package/dist/components/devextreme/OdsProfDataGrid.d.ts +3 -0
- package/dist/components/devextreme/OdsRemoteDataGrid.d.ts +2 -2
- package/dist/components/devextreme/treeview/DxTreeView.d.ts +3 -0
- package/dist/index.js +12 -14
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +12 -14
- package/dist/index.modern.js.map +1 -1
- package/dist/stories/OdsCustomMultiSelect/OdsCustomMultiSelect.stories.d.ts +9 -0
- package/dist/stories/OdsCustomMultiSelect/Samples/Basic.Sample.d.ts +1 -0
- package/dist/stories/OdsCustomMultiSelect/Samples/ModeMultiple.Sample.d.ts +1 -0
- package/dist/utils/DynamicIcon.d.ts +5 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconBaseProps } from "@ant-design/icons/lib/components/Icon";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface IconProps extends IconBaseProps {
|
|
4
|
+
type: string;
|
|
5
|
+
twoToneColor?: string;
|
|
6
|
+
iconComponent?: string;
|
|
7
|
+
iconSVCName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function OdsIcon(props: IconProps): React.JSX.Element;
|
|
10
|
+
export default OdsIcon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SelectProps } from "antd";
|
|
3
|
+
import { IOdsSelectOption } from "./OdsSelect.styled";
|
|
4
|
+
export interface OdsMultiSelectProps extends SelectProps {
|
|
5
|
+
selectAllText?: string | undefined;
|
|
6
|
+
dataSource: IOdsSelectOption[];
|
|
7
|
+
}
|
|
8
|
+
declare const OdsMultiSelect: (props: OdsMultiSelectProps) => React.JSX.Element;
|
|
9
|
+
export default OdsMultiSelect;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IDataGridOptions, IEditingProps, ISelectionProps, IButtonProps } from 'devextreme-react/data-grid';
|
|
3
|
+
import { ButtonType } from "antd/es/button/buttonHelpers";
|
|
4
|
+
interface IButtonGroup extends IButtonProps {
|
|
5
|
+
type?: ButtonType;
|
|
6
|
+
label?: string;
|
|
7
|
+
onclick?: React.MouseEventHandler<HTMLElement>;
|
|
8
|
+
actionPermission?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface IEditingoptions extends IEditingProps {
|
|
11
|
+
formItems?: any[];
|
|
12
|
+
title?: string;
|
|
13
|
+
}
|
|
14
|
+
interface ISelectOptions extends ISelectionProps {
|
|
15
|
+
selectEnable: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface IOdsDataGridProps extends IDataGridOptions {
|
|
18
|
+
actionButtonGroup?: IButtonGroup[];
|
|
19
|
+
toolbarButtonGroup?: IButtonGroup[];
|
|
20
|
+
exportFileName?: string;
|
|
21
|
+
summaryTotalColumnName?: string;
|
|
22
|
+
storeState?: boolean;
|
|
23
|
+
summaryTotalDataCount?: number;
|
|
24
|
+
summaryTotalDataDisplayLabel?: string;
|
|
25
|
+
summaryTotalPagesize?: number;
|
|
26
|
+
editHintLabel?: string;
|
|
27
|
+
editButtonClick?: any;
|
|
28
|
+
deleteButtonClick?: any;
|
|
29
|
+
pageTitle?: string;
|
|
30
|
+
pageSize?: number;
|
|
31
|
+
pagingEnable?: boolean;
|
|
32
|
+
searchEnable?: boolean;
|
|
33
|
+
filterEnable?: boolean;
|
|
34
|
+
headerFilterEnable?: boolean;
|
|
35
|
+
columnChooserPositionDisabled?: boolean;
|
|
36
|
+
editEnable?: boolean;
|
|
37
|
+
popupTitle?: string;
|
|
38
|
+
scroll?: any;
|
|
39
|
+
exportEnable?: boolean;
|
|
40
|
+
customPopup?: boolean;
|
|
41
|
+
onExportingCustom?: any;
|
|
42
|
+
filterEnabledShow?: boolean;
|
|
43
|
+
scrolUseNative?: boolean;
|
|
44
|
+
formItems?: any[];
|
|
45
|
+
hintForDeleteButton?: string;
|
|
46
|
+
hintForEditButton?: string;
|
|
47
|
+
exportFormats?: string[];
|
|
48
|
+
actionPermission?: boolean;
|
|
49
|
+
columns: any[];
|
|
50
|
+
actionColumnEnable?: boolean;
|
|
51
|
+
edit?: IEditingoptions;
|
|
52
|
+
selectOptions?: ISelectOptions;
|
|
53
|
+
actionColumnCaption?: string;
|
|
54
|
+
}
|
|
55
|
+
declare function OdsDataGridNew(props: IOdsDataGridProps): React.JSX.Element;
|
|
56
|
+
export default OdsDataGridNew;
|
|
@@ -22,7 +22,7 @@ export interface IOdsDataGridProps extends IDataGridOptions {
|
|
|
22
22
|
customSummary?: ISummaryRowOptions;
|
|
23
23
|
handleEditorPreparing?: any;
|
|
24
24
|
isFilterRow?: boolean;
|
|
25
|
-
|
|
25
|
+
filterData?: any[];
|
|
26
26
|
}
|
|
27
27
|
interface ISummaryRowOptions {
|
|
28
28
|
summaryLoadedDataLabel?: string;
|
|
@@ -37,7 +37,7 @@ interface IAxiosProps {
|
|
|
37
37
|
requestData?: any;
|
|
38
38
|
apiUrl: string;
|
|
39
39
|
environmentUrl: string;
|
|
40
|
-
requestQueryString?:
|
|
40
|
+
requestQueryString?: any;
|
|
41
41
|
requestType: string;
|
|
42
42
|
}
|
|
43
43
|
interface IEditingoptions extends IEditingProps {
|
package/dist/index.js
CHANGED
|
@@ -16770,13 +16770,11 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16770
16770
|
props.axiosRequest.requestData.PaginatedRequest.PageSize = props.pageSize;
|
|
16771
16771
|
}
|
|
16772
16772
|
if (props.axiosRequest.requestQueryString !== undefined) {
|
|
16773
|
-
|
|
16774
|
-
queryParams.maxResultCount = props.pageSize.toString();
|
|
16775
|
-
var query = props.axiosRequest.requestQueryString;
|
|
16773
|
+
props.axiosRequest.requestQueryString.maxResultCount = props.pageSize;
|
|
16776
16774
|
if (loadedPageCount > 1 && totalPageCount >= loadedPageCount) {
|
|
16777
|
-
|
|
16775
|
+
props.axiosRequest.requestQueryString.skipCount = ((loadedPageCount - 1) * props.pageSize).toString();
|
|
16778
16776
|
}
|
|
16779
|
-
query = queryString.stringify(
|
|
16777
|
+
var query = queryString.stringify(props.axiosRequest.requestQueryString);
|
|
16780
16778
|
apiUrl = apiUrl + "?" + query;
|
|
16781
16779
|
}
|
|
16782
16780
|
var requestOptions = {
|
|
@@ -16861,16 +16859,16 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16861
16859
|
var onExporting = React.useCallback(function (e) {
|
|
16862
16860
|
if (e.format === 'xlsx') {
|
|
16863
16861
|
var workbook = new exceljs.Workbook();
|
|
16864
|
-
if (props.
|
|
16865
|
-
var
|
|
16862
|
+
if (props.filterData != null) {
|
|
16863
|
+
var newColumnFromFilterData = props.filterData.map(function (filterItem) {
|
|
16866
16864
|
return {
|
|
16867
|
-
dataField:
|
|
16868
|
-
caption:
|
|
16865
|
+
dataField: filterItem.key,
|
|
16866
|
+
caption: filterItem.key
|
|
16869
16867
|
};
|
|
16870
16868
|
});
|
|
16871
|
-
var
|
|
16869
|
+
var newColumns = [].concat(columns.current, newColumnFromFilterData);
|
|
16872
16870
|
e.component.beginUpdate();
|
|
16873
|
-
e.component.option("columns",
|
|
16871
|
+
e.component.option("columns", newColumns);
|
|
16874
16872
|
e.component.endUpdate();
|
|
16875
16873
|
}
|
|
16876
16874
|
excel_exporter.exportDataGrid({
|
|
@@ -16893,8 +16891,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16893
16891
|
excelCell.value = formattedDate;
|
|
16894
16892
|
}
|
|
16895
16893
|
}
|
|
16896
|
-
if (gridCell.rowType !== 'header' && props.
|
|
16897
|
-
var matchingItem = props.
|
|
16894
|
+
if (gridCell.rowType !== 'header' && props.filterData != null) {
|
|
16895
|
+
var matchingItem = props.filterData.find(function (item) {
|
|
16898
16896
|
return item.key === gridCell.column.dataField;
|
|
16899
16897
|
});
|
|
16900
16898
|
if (matchingItem) {
|
|
@@ -16919,7 +16917,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
16919
16917
|
doc.save(fileName + '.pdf');
|
|
16920
16918
|
});
|
|
16921
16919
|
}
|
|
16922
|
-
}, [fileName]);
|
|
16920
|
+
}, [fileName, props.filterData]);
|
|
16923
16921
|
var customLoad = React.useCallback(function () {
|
|
16924
16922
|
var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
|
|
16925
16923
|
if (localStorage.getItem(props.exportFileName + "Storage")) {
|