ods-component-lib 1.18.98 → 1.18.101
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/fileUpload/OdsFileUpload.d.ts +1 -2
- package/dist/components/antd/form/OdsBasicForm.d.ts +18 -0
- package/dist/components/antd/icon/OdsIcon.d.ts +10 -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/OdsRemoteDataGrid.Functions.d.ts +2 -2
- package/dist/components/devextreme/treeview/DxTreeView.d.ts +3 -0
- package/dist/index.js +59 -41
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +60 -42
- 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/stories/OdsFileUpload/OdsFileUpload.stories.d.ts +2 -13
- package/dist/stories/OdsFilter/OdsFilter.stories.d.ts +39 -0
- package/dist/stories/OdsFilter/Samples/OdsFilter.Sample.d.ts +12 -0
- package/dist/utils/DynamicIcon.d.ts +5 -0
- package/package.json +2 -2
- package/dist/stories/OdsPivotGrid/OdsPivotGrid.stories.d.ts +0 -15
- package/dist/stories/OdsPivotGrid/Samples/BasicPivotGrid/BasicPivotGrid.Constants.d.ts +0 -2
- package/dist/stories/OdsPivotGrid/Samples/BasicPivotGrid/BasicPivotGrid.MockData.d.ts +0 -7
- package/dist/stories/OdsPivotGrid/Samples/BasicPivotGrid/BasicPivotGrid.Sample.d.ts +0 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare type FileUploadProps = {
|
|
3
3
|
image: any | null;
|
|
4
|
-
setFile?: (file: any) => void;
|
|
5
4
|
title: string;
|
|
6
5
|
sendDataToParent: (obj: any) => void;
|
|
7
6
|
allowDocumentUpload?: boolean;
|
|
8
7
|
multipleDoc?: boolean;
|
|
9
8
|
removeFile?: (file: any) => void;
|
|
10
9
|
};
|
|
11
|
-
declare
|
|
10
|
+
declare function OdsFileUpload(props: FileUploadProps): React.JSX.Element;
|
|
12
11
|
export default OdsFileUpload;
|
|
@@ -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;
|
|
@@ -6,6 +6,6 @@ export declare const addNewFieldForFastUpdate: (data: any[]) => any[];
|
|
|
6
6
|
export declare const getRequestHeaders: (props: any) => Headers;
|
|
7
7
|
export declare const concatFilteredLabel: (result: string, totalloaded: number, filteredRowCount: number, filterApplied: boolean, props: any) => string;
|
|
8
8
|
export declare const showSummaryItems: (props: IOdsDataGridProps) => boolean;
|
|
9
|
-
export declare const getSummaryItems: (props: IOdsDataGridProps, columns: any[], grid: any) => ReactElement[];
|
|
10
|
-
export declare const getSummaryItem: (col: any, visibleIndex: number, summaryType: SummaryTypes, label?: string) => ReactElement;
|
|
9
|
+
export declare const getSummaryItems: (props: IOdsDataGridProps, columns: any[], grid: any, isMultiLevelColumn?: boolean) => ReactElement[];
|
|
10
|
+
export declare const getSummaryItem: (col: any, visibleIndex: number, summaryType: SummaryTypes, isMultiLevelColumn: boolean, label?: string) => ReactElement;
|
|
11
11
|
export declare const getMultiLevelColumns: (col: any) => any;
|
package/dist/index.js
CHANGED
|
@@ -33420,7 +33420,8 @@ var iconComponents = {
|
|
|
33420
33420
|
refresh: outline.RefreshIcon,
|
|
33421
33421
|
unmap: outline.LinkBreakIcon,
|
|
33422
33422
|
save: outline.FloppyDiskIcon,
|
|
33423
|
-
cancel: outline.Loop1Icon
|
|
33423
|
+
cancel: outline.Loop1Icon,
|
|
33424
|
+
discount2Icon: outline.Discount2Icon
|
|
33424
33425
|
};
|
|
33425
33426
|
var DynamicIcon = function DynamicIcon(_ref) {
|
|
33426
33427
|
var iconName = _ref.iconName;
|
|
@@ -33476,21 +33477,32 @@ var showSummaryItems = function showSummaryItems(props) {
|
|
|
33476
33477
|
var _props$customSummary, _props$customSummary2, _props$customSummary3, _props$customSummary4, _props$customSummary5;
|
|
33477
33478
|
return ((_props$customSummary = props.customSummary) === null || _props$customSummary === void 0 ? void 0 : _props$customSummary.showAvgInSummary) || ((_props$customSummary2 = props.customSummary) === null || _props$customSummary2 === void 0 ? void 0 : _props$customSummary2.showCountInSummary) || ((_props$customSummary3 = props.customSummary) === null || _props$customSummary3 === void 0 ? void 0 : _props$customSummary3.showMaxInSummary) || ((_props$customSummary4 = props.customSummary) === null || _props$customSummary4 === void 0 ? void 0 : _props$customSummary4.showMinInSummary) || ((_props$customSummary5 = props.customSummary) === null || _props$customSummary5 === void 0 ? void 0 : _props$customSummary5.showSumInSummary);
|
|
33478
33479
|
};
|
|
33479
|
-
var getSummaryItems = function getSummaryItems(props, columns, grid) {
|
|
33480
|
+
var getSummaryItems = function getSummaryItems(props, columns, grid, isMultiLevelColumn) {
|
|
33481
|
+
if (isMultiLevelColumn === void 0) {
|
|
33482
|
+
isMultiLevelColumn = false;
|
|
33483
|
+
}
|
|
33480
33484
|
var totalItems = [];
|
|
33481
33485
|
columns.map(function (col, _index) {
|
|
33482
|
-
|
|
33483
|
-
|
|
33484
|
-
|
|
33485
|
-
|
|
33486
|
-
|
|
33487
|
-
|
|
33488
|
-
|
|
33486
|
+
if (col.multiLevelColumns && col.multiLevelColumns.length > 0) {
|
|
33487
|
+
totalItems = [].concat(totalItems, getSummaryItems(props, col.multiLevelColumns, grid, true));
|
|
33488
|
+
} else {
|
|
33489
|
+
var _props$customSummary6, _props$customSummary7, _props$customSummary8, _props$customSummary9, _props$customSummary10, _props$customSummary11, _props$customSummary12, _props$customSummary13, _props$customSummary14, _props$customSummary15;
|
|
33490
|
+
var colOption = grid.columnOption(col.dataField);
|
|
33491
|
+
if (!colOption) {
|
|
33492
|
+
return col;
|
|
33493
|
+
}
|
|
33494
|
+
((_props$customSummary6 = props.customSummary) === null || _props$customSummary6 === void 0 ? void 0 : _props$customSummary6.showAvgInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "avg", isMultiLevelColumn, (_props$customSummary7 = props.customSummary) === null || _props$customSummary7 === void 0 ? void 0 : _props$customSummary7.summaryAvgLabel));
|
|
33495
|
+
((_props$customSummary8 = props.customSummary) === null || _props$customSummary8 === void 0 ? void 0 : _props$customSummary8.showCountInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "count", isMultiLevelColumn, (_props$customSummary9 = props.customSummary) === null || _props$customSummary9 === void 0 ? void 0 : _props$customSummary9.summaryCountLabel));
|
|
33496
|
+
((_props$customSummary10 = props.customSummary) === null || _props$customSummary10 === void 0 ? void 0 : _props$customSummary10.showMaxInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "max", isMultiLevelColumn, (_props$customSummary11 = props.customSummary) === null || _props$customSummary11 === void 0 ? void 0 : _props$customSummary11.summaryMaxLabel));
|
|
33497
|
+
((_props$customSummary12 = props.customSummary) === null || _props$customSummary12 === void 0 ? void 0 : _props$customSummary12.showMinInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "min", isMultiLevelColumn, (_props$customSummary13 = props.customSummary) === null || _props$customSummary13 === void 0 ? void 0 : _props$customSummary13.summaryMinLabel));
|
|
33498
|
+
((_props$customSummary14 = props.customSummary) === null || _props$customSummary14 === void 0 ? void 0 : _props$customSummary14.showSumInSummary) && totalItems.push(getSummaryItem(col, colOption.visibleIndex, "sum", isMultiLevelColumn, (_props$customSummary15 = props.customSummary) === null || _props$customSummary15 === void 0 ? void 0 : _props$customSummary15.summarySumLabel));
|
|
33499
|
+
}
|
|
33500
|
+
return col;
|
|
33489
33501
|
});
|
|
33490
33502
|
return totalItems;
|
|
33491
33503
|
};
|
|
33492
|
-
var getSummaryItem = function getSummaryItem(col, visibleIndex, summaryType, label) {
|
|
33493
|
-
if (visibleIndex == 0) {
|
|
33504
|
+
var getSummaryItem = function getSummaryItem(col, visibleIndex, summaryType, isMultiLevelColumn, label) {
|
|
33505
|
+
if (!isMultiLevelColumn && visibleIndex == 0) {
|
|
33494
33506
|
return React__default.createElement(DataGrid.TotalItem, {
|
|
33495
33507
|
column: col.dataField,
|
|
33496
33508
|
summaryType: "custom",
|
|
@@ -33559,39 +33571,42 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
33559
33571
|
var filterApplied = React.useRef(false);
|
|
33560
33572
|
var pkName = keyExpr && keyExpr.toString();
|
|
33561
33573
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
33562
|
-
var _useState = React.useState(
|
|
33563
|
-
|
|
33564
|
-
|
|
33565
|
-
var _useState2 = React.useState(
|
|
33566
|
-
|
|
33567
|
-
|
|
33568
|
-
var _useState3 = React.useState(
|
|
33569
|
-
|
|
33570
|
-
|
|
33571
|
-
var _useState4 = React.useState(
|
|
33572
|
-
|
|
33573
|
-
|
|
33574
|
-
var _useState5 = React.useState(
|
|
33575
|
-
|
|
33576
|
-
|
|
33577
|
-
var _useState6 = React.useState(
|
|
33578
|
-
|
|
33579
|
-
|
|
33574
|
+
var _useState = React.useState(false),
|
|
33575
|
+
render = _useState[0],
|
|
33576
|
+
rerender = _useState[1];
|
|
33577
|
+
var _useState2 = React.useState(props.columns),
|
|
33578
|
+
gridColumns = _useState2[0],
|
|
33579
|
+
setGridColumns = _useState2[1];
|
|
33580
|
+
var _useState3 = React.useState(false),
|
|
33581
|
+
loading = _useState3[0],
|
|
33582
|
+
setLoading = _useState3[1];
|
|
33583
|
+
var _useState4 = React.useState([]),
|
|
33584
|
+
data = _useState4[0],
|
|
33585
|
+
setData = _useState4[1];
|
|
33586
|
+
var _useState5 = React.useState(0),
|
|
33587
|
+
filteredRowCount = _useState5[0],
|
|
33588
|
+
setFilteredRowCount = _useState5[1];
|
|
33589
|
+
var _useState6 = React.useState(false),
|
|
33590
|
+
isFastUpdateModalOpen = _useState6[0],
|
|
33591
|
+
setIsFastUpdateModalOpen = _useState6[1];
|
|
33580
33592
|
var _useState7 = React.useState([]),
|
|
33581
|
-
|
|
33582
|
-
|
|
33593
|
+
selectedCells = _useState7[0],
|
|
33594
|
+
setSelectedCells = _useState7[1];
|
|
33583
33595
|
var _useState8 = React.useState([]),
|
|
33584
|
-
|
|
33585
|
-
|
|
33586
|
-
var _useState9 = React.useState(
|
|
33587
|
-
|
|
33588
|
-
|
|
33596
|
+
hoveredCells = _useState8[0],
|
|
33597
|
+
setHoveredCells = _useState8[1];
|
|
33598
|
+
var _useState9 = React.useState([]),
|
|
33599
|
+
ctrlSelectedCells = _useState9[0],
|
|
33600
|
+
setCtrlSelectedCells = _useState9[1];
|
|
33589
33601
|
var _useState10 = React.useState(false),
|
|
33590
|
-
|
|
33591
|
-
|
|
33592
|
-
var _useState11 = React.useState(
|
|
33593
|
-
|
|
33594
|
-
|
|
33602
|
+
ctrlSelection = _useState10[0],
|
|
33603
|
+
setCtrlSelection = _useState10[1];
|
|
33604
|
+
var _useState11 = React.useState(false),
|
|
33605
|
+
contentReady = _useState11[0],
|
|
33606
|
+
setContentReady = _useState11[1];
|
|
33607
|
+
var _useState12 = React.useState(0),
|
|
33608
|
+
scrollPosition = _useState12[0],
|
|
33609
|
+
setScrollPosition = _useState12[1];
|
|
33595
33610
|
React.useEffect(function () {
|
|
33596
33611
|
constants.totalPageCount = 1;
|
|
33597
33612
|
constants.loadedPageCount = 1;
|
|
@@ -33628,6 +33643,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
33628
33643
|
setGridColumns(newColumns);
|
|
33629
33644
|
}
|
|
33630
33645
|
}, [props.columns]);
|
|
33646
|
+
React.useEffect(function () {
|
|
33647
|
+
rerender(!render);
|
|
33648
|
+
}, [gridColumns]);
|
|
33631
33649
|
React.useEffect(function () {
|
|
33632
33650
|
if (Array.isArray(props.dataSource)) {
|
|
33633
33651
|
setData(props.dataSource);
|