ods-component-lib 1.18.221 → 1.18.224
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/OdsFileUploadv2.d.ts +2 -2
- package/dist/components/antd/modal/OdsAdvanceModal.d.ts +7 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/utils.d.ts +19 -0
- package/dist/components/devextreme/OdsRemoteDataGrid/OdsRemoteDataGrid.Types.d.ts +5 -1
- package/dist/components/devextreme/OdsTimeline/OdsTimeline.Constants.d.ts +4 -0
- package/dist/components/devextreme/OdsTimeline/OdsTimeline.Functions.d.ts +6 -0
- package/dist/components/devextreme/OdsTimeline/OdsTimeline.Types.d.ts +77 -0
- package/dist/components/devextreme/OdsTimeline/OdsTimeline.d.ts +5 -0
- package/dist/components/devextreme/OdsTimeline/OdsTimelineDateFilter.d.ts +3 -0
- package/dist/components/devextreme/OdsTimeline/OdsTimelineSelectionColumn.d.ts +2 -0
- package/dist/components/devextreme/treeview/DxTreeView.d.ts +3 -0
- package/dist/index.js +73 -63
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +73 -63
- package/dist/index.modern.js.map +1 -1
- package/dist/stories/OdsAdvanceModal/OdsAdvanceModal.stories.d.ts +42 -0
- package/dist/stories/OdsAdvanceModal/Samples/BasicOdsAdvanceModal.sample.d.ts +8 -0
- package/dist/stories/OdsFilterPlus/OdsFilterPlus.stories.d.ts +42 -0
- package/dist/stories/OdsFilterPlus/Samples/OdsFilterPlus.Sample.d.ts +14 -0
- package/dist/stories/OdsModal/Samples/OdsModal.Sample.d.ts +1 -0
- package/dist/stories/OdsTimePicker/Samples/TimeRangePicker.d.ts +2 -0
- package/dist/stories/OdsTimeline/OdsTimeline.Constants.d.ts +3 -0
- package/dist/stories/OdsTimeline/OdsTimeline.Functions.d.ts +6 -0
- package/dist/stories/OdsTimeline/OdsTimeline.MockData.d.ts +39 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ interface IUploadRequestModel {
|
|
|
30
30
|
operatorId: number;
|
|
31
31
|
}
|
|
32
32
|
declare type FileUploadProps = {
|
|
33
|
-
|
|
33
|
+
file: any | null;
|
|
34
34
|
title: string;
|
|
35
35
|
uploadTitle?: string;
|
|
36
36
|
defaultFileList?: UploadProps["defaultFileList"];
|
|
@@ -46,7 +46,7 @@ declare type FileUploadProps = {
|
|
|
46
46
|
maxFileSizeMB?: number;
|
|
47
47
|
moduleType?: number;
|
|
48
48
|
operatorId?: number;
|
|
49
|
-
uploadFile?: (request: IUploadRequestModel) => void;
|
|
49
|
+
uploadFile?: (request: IUploadRequestModel[]) => void;
|
|
50
50
|
};
|
|
51
51
|
declare function OdsFileUploadv2(props: FileUploadProps): React.JSX.Element;
|
|
52
52
|
export default OdsFileUploadv2;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface IConcatFilteredLabelProps {
|
|
2
|
+
result: string;
|
|
3
|
+
totalLoaded: number;
|
|
4
|
+
filteredRowCount: number;
|
|
5
|
+
filterApplied: boolean;
|
|
6
|
+
summaryFilteredDataLabel: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Concatenates the filtered label with the result string.
|
|
10
|
+
*
|
|
11
|
+
* @param {IConcatFilteredLabelProps} props - The object containing the necessary properties.
|
|
12
|
+
* @returns {string} - The concatenated result string.
|
|
13
|
+
*/
|
|
14
|
+
export declare const concatFilteredLabel: ({ result, totalLoaded, filteredRowCount, filterApplied, summaryFilteredDataLabel, }: IConcatFilteredLabelProps) => string;
|
|
15
|
+
export {};
|
|
16
|
+
/**
|
|
17
|
+
* This file contains utility functions related to the OdsInlineEditDataGrid component.
|
|
18
|
+
* These utility functions are used for handling filtering and data manipulation.
|
|
19
|
+
*/
|
|
@@ -15,6 +15,10 @@ export interface IMultiCellEditableDataGridProps {
|
|
|
15
15
|
onFastUpdateFailed?: (errorInfo: any) => void;
|
|
16
16
|
}
|
|
17
17
|
export declare type IActionButtonsTooltipType = "raw" | "styled";
|
|
18
|
+
export interface IActionButtonGroup extends Partial<IButtonGroup> {
|
|
19
|
+
elementType?: "button" | "element";
|
|
20
|
+
element?: JSX.Element;
|
|
21
|
+
}
|
|
18
22
|
export interface IOdsDataGridProps extends IDataGridOptions, IMultiCellEditableDataGridProps {
|
|
19
23
|
dataGridPageName?: string;
|
|
20
24
|
language: string;
|
|
@@ -22,7 +26,7 @@ export interface IOdsDataGridProps extends IDataGridOptions, IMultiCellEditableD
|
|
|
22
26
|
filterEnabledShow: boolean;
|
|
23
27
|
pageTitle?: string;
|
|
24
28
|
toolbarButtonGroup?: IButtonGroup[];
|
|
25
|
-
actionButtonGroup?:
|
|
29
|
+
actionButtonGroup?: IActionButtonGroup[];
|
|
26
30
|
actionButtonGroupCaption?: string;
|
|
27
31
|
columns: any[];
|
|
28
32
|
pageSize?: number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const checkboxCellComponent: (props: any) => React.JSX.Element;
|
|
3
|
+
export declare const statusCellComponent: (props: any) => React.JSX.Element;
|
|
4
|
+
export declare const minimalHeaderCellComponent: (data: any, __el: any) => React.JSX.Element;
|
|
5
|
+
export declare const mapCustomTask: (item: any) => any;
|
|
6
|
+
export declare const setSelectedKeys: (datasource: any[], key?: string, selectedKeys?: number[] | string[]) => any[];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IColumnProps, IGanttOptions, IItemProps } from "devextreme-react/gantt";
|
|
3
|
+
export interface IMenuLinkItem {
|
|
4
|
+
text: string;
|
|
5
|
+
url: string;
|
|
6
|
+
queryParamNames?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface ICustomSelectionChange {
|
|
9
|
+
data: any;
|
|
10
|
+
isSelected: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface IDateRangeChange {
|
|
13
|
+
startDate: Date;
|
|
14
|
+
endDate: Date;
|
|
15
|
+
}
|
|
16
|
+
export interface IStatusColumnChange {
|
|
17
|
+
data: any;
|
|
18
|
+
status: boolean;
|
|
19
|
+
dataField: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ICheckboxColumnChange {
|
|
22
|
+
data: any;
|
|
23
|
+
isChecked: boolean;
|
|
24
|
+
dataField: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IOdsTimelineProps extends React.PropsWithChildren<IGanttOptions> {
|
|
27
|
+
/**
|
|
28
|
+
* Set columns for listview.
|
|
29
|
+
*/
|
|
30
|
+
customColumns?: IOdsTimelineColumnProps[];
|
|
31
|
+
/**
|
|
32
|
+
* Set task list. It is used for list view and timeline view.
|
|
33
|
+
*/
|
|
34
|
+
customTasks: any[];
|
|
35
|
+
/**
|
|
36
|
+
* Set data field name from task list. This is used for selection.
|
|
37
|
+
*/
|
|
38
|
+
customTaskKey?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Set key values to be selected. "multiSelectionEnabled" must be true.
|
|
41
|
+
*/
|
|
42
|
+
customSelectedKeys?: string[] | number[];
|
|
43
|
+
/**
|
|
44
|
+
* Set true if you want multi selection in list view.
|
|
45
|
+
*/
|
|
46
|
+
multiSelectionEnabled?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* This is a selection event that fired when selection is changed.
|
|
49
|
+
*/
|
|
50
|
+
onCustomSelectionChanged(e: ICustomSelectionChange): void;
|
|
51
|
+
/**
|
|
52
|
+
* This is a date range event that fired when date range is changed.
|
|
53
|
+
*/
|
|
54
|
+
onDateRangeChange(e: IDateRangeChange): void;
|
|
55
|
+
}
|
|
56
|
+
export interface IOdsTimelineColumnProps extends IColumnProps {
|
|
57
|
+
isMinimized?: boolean;
|
|
58
|
+
isStatusColumn?: boolean;
|
|
59
|
+
isCheckboxColumn?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface IOdsTimelineStatusColumnProps extends IOdsTimelineColumnProps {
|
|
62
|
+
onStatusColumnChange(e: IStatusColumnChange): void;
|
|
63
|
+
}
|
|
64
|
+
export interface IOdsTimelineCheckboxColumnProps extends IOdsTimelineColumnProps {
|
|
65
|
+
onCheckboxColumnChange(e: ICheckboxColumnChange): void;
|
|
66
|
+
}
|
|
67
|
+
export interface IOdsTimelineDateFilter extends IItemProps {
|
|
68
|
+
defaultStartDate?: Date;
|
|
69
|
+
defaultEndDate?: Date;
|
|
70
|
+
backText?: string;
|
|
71
|
+
nextText?: string;
|
|
72
|
+
onFilterRangeChange(e: IDateRangeChange): void;
|
|
73
|
+
}
|
|
74
|
+
export declare const enum DateDirection {
|
|
75
|
+
prevMonth = "previousMonth",
|
|
76
|
+
nextMonth = "nextMonth"
|
|
77
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -2117,9 +2117,7 @@ var OdsFilterPlus = function OdsFilterPlus(props) {
|
|
|
2117
2117
|
lg: 4
|
|
2118
2118
|
}, filterRow.colSize || defaultColSize({
|
|
2119
2119
|
isDisplayInline: isDisplayInline
|
|
2120
|
-
}),
|
|
2121
|
-
className: tab.children.length > 6 ? "mb-4" : ""
|
|
2122
|
-
}), filterRow.element);
|
|
2120
|
+
})), filterRow.element);
|
|
2123
2121
|
})) : null;
|
|
2124
2122
|
}));
|
|
2125
2123
|
};
|
|
@@ -35358,20 +35356,26 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
35358
35356
|
}, []);
|
|
35359
35357
|
function actionCellRender(cellData, props) {
|
|
35360
35358
|
var kebabMenuButtons = props.actionButtonGroup && props.actionButtonGroup.length > 3 && !props.edit ? props.actionButtonGroup.slice(2).map(function (button) {
|
|
35361
|
-
|
|
35362
|
-
|
|
35363
|
-
|
|
35364
|
-
|
|
35365
|
-
|
|
35366
|
-
|
|
35367
|
-
|
|
35368
|
-
|
|
35369
|
-
|
|
35370
|
-
|
|
35371
|
-
|
|
35372
|
-
|
|
35373
|
-
|
|
35374
|
-
|
|
35359
|
+
if (button.elementType === "element" && button.element) {
|
|
35360
|
+
return {
|
|
35361
|
+
icon: button.element
|
|
35362
|
+
};
|
|
35363
|
+
} else {
|
|
35364
|
+
return {
|
|
35365
|
+
icon: button.icon,
|
|
35366
|
+
onClick: function onClick(event) {
|
|
35367
|
+
var customEvent = {
|
|
35368
|
+
column: cellData.column,
|
|
35369
|
+
component: cellData.component,
|
|
35370
|
+
element: cellData.element,
|
|
35371
|
+
event: event,
|
|
35372
|
+
model: cellData.data,
|
|
35373
|
+
row: cellData.row
|
|
35374
|
+
};
|
|
35375
|
+
button.onClick(customEvent);
|
|
35376
|
+
}
|
|
35377
|
+
};
|
|
35378
|
+
}
|
|
35375
35379
|
}) : [];
|
|
35376
35380
|
var buttonElements = [];
|
|
35377
35381
|
{
|
|
@@ -36402,7 +36406,7 @@ var ModuleType;
|
|
|
36402
36406
|
})(ModuleType || (ModuleType = {}));
|
|
36403
36407
|
var Text$2 = antd.Typography.Text;
|
|
36404
36408
|
function OdsFileUploadv2(props) {
|
|
36405
|
-
var
|
|
36409
|
+
var file = props.file,
|
|
36406
36410
|
removeFile = props.removeFile,
|
|
36407
36411
|
title = props.title,
|
|
36408
36412
|
uploadTitle = props.uploadTitle,
|
|
@@ -36497,23 +36501,19 @@ function OdsFileUploadv2(props) {
|
|
|
36497
36501
|
},
|
|
36498
36502
|
onChange: function onChange(info) {
|
|
36499
36503
|
if (info.fileList) {
|
|
36500
|
-
var
|
|
36501
|
-
|
|
36502
|
-
|
|
36503
|
-
|
|
36504
|
-
|
|
36505
|
-
|
|
36506
|
-
|
|
36507
|
-
|
|
36508
|
-
|
|
36509
|
-
operatorId: operatorId
|
|
36510
|
-
});
|
|
36511
|
-
}
|
|
36512
|
-
}
|
|
36513
|
-
return file;
|
|
36504
|
+
var filesToUpload = info.fileList.map(function (file) {
|
|
36505
|
+
return {
|
|
36506
|
+
uid: file.uid,
|
|
36507
|
+
file: file.originFileObj,
|
|
36508
|
+
fileName: file.name,
|
|
36509
|
+
fileType: getFileType(file.name),
|
|
36510
|
+
moduleType: moduleType,
|
|
36511
|
+
operatorId: operatorId
|
|
36512
|
+
};
|
|
36514
36513
|
});
|
|
36515
|
-
|
|
36516
|
-
|
|
36514
|
+
uploadFile(filesToUpload);
|
|
36515
|
+
setFileList(info.fileList);
|
|
36516
|
+
} else setFileList(null);
|
|
36517
36517
|
},
|
|
36518
36518
|
onRemove: function onRemove(file) {
|
|
36519
36519
|
confirm({
|
|
@@ -36529,14 +36529,16 @@ function OdsFileUploadv2(props) {
|
|
|
36529
36529
|
return item.uid !== file.uid;
|
|
36530
36530
|
});
|
|
36531
36531
|
setFileList(updatedFileList);
|
|
36532
|
-
removeFile
|
|
36533
|
-
|
|
36534
|
-
|
|
36535
|
-
|
|
36536
|
-
|
|
36537
|
-
|
|
36538
|
-
|
|
36539
|
-
|
|
36532
|
+
if (removeFile) {
|
|
36533
|
+
removeFile({
|
|
36534
|
+
uid: file.uid,
|
|
36535
|
+
file: file.originFileObj,
|
|
36536
|
+
fileName: file.name,
|
|
36537
|
+
fileType: getFileType(file.name),
|
|
36538
|
+
moduleType: moduleType,
|
|
36539
|
+
operatorId: operatorId
|
|
36540
|
+
});
|
|
36541
|
+
}
|
|
36540
36542
|
},
|
|
36541
36543
|
onCancel: function onCancel() {}
|
|
36542
36544
|
});
|
|
@@ -36551,11 +36553,11 @@ function OdsFileUploadv2(props) {
|
|
|
36551
36553
|
return setPreviewOpen(false);
|
|
36552
36554
|
};
|
|
36553
36555
|
var handlePreview = function handlePreview() {
|
|
36554
|
-
setPreviewOpen(true);
|
|
36556
|
+
return setPreviewOpen(true);
|
|
36555
36557
|
};
|
|
36556
36558
|
React.useEffect(function () {
|
|
36557
|
-
if (
|
|
36558
|
-
var formattedFiles = isMultipleDoc ?
|
|
36559
|
+
if (file) {
|
|
36560
|
+
var formattedFiles = isMultipleDoc ? file.map(function (file) {
|
|
36559
36561
|
return {
|
|
36560
36562
|
uid: file.uid,
|
|
36561
36563
|
name: file.filename,
|
|
@@ -36566,11 +36568,11 @@ function OdsFileUploadv2(props) {
|
|
|
36566
36568
|
uid: v4(),
|
|
36567
36569
|
name: "file",
|
|
36568
36570
|
status: "done",
|
|
36569
|
-
url:
|
|
36571
|
+
url: file
|
|
36570
36572
|
}];
|
|
36571
36573
|
setFileList(formattedFiles);
|
|
36572
36574
|
}
|
|
36573
|
-
}, [
|
|
36575
|
+
}, [file]);
|
|
36574
36576
|
var renderPreviewContent = function renderPreviewContent(fileName, previewSrc) {
|
|
36575
36577
|
if (previewSrc === null) {
|
|
36576
36578
|
return "";
|
|
@@ -37919,22 +37921,30 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
|
|
|
37919
37921
|
}, [data, filteredRowCount, constants$2.loadedPageCount, props.pageSize, constants$2.totalRecordCount, filterApplied.current]);
|
|
37920
37922
|
function actionCellRender(cellData, props) {
|
|
37921
37923
|
var kebabMenuButtons = props.actionButtonGroup && props.actionButtonGroup.length >= 2 && !props.edit ? props.actionButtonGroup.slice(2).map(function (button) {
|
|
37922
|
-
|
|
37923
|
-
|
|
37924
|
-
|
|
37925
|
-
}
|
|
37926
|
-
|
|
37927
|
-
|
|
37928
|
-
|
|
37929
|
-
|
|
37930
|
-
|
|
37931
|
-
|
|
37932
|
-
|
|
37933
|
-
|
|
37934
|
-
|
|
37935
|
-
|
|
37936
|
-
|
|
37937
|
-
|
|
37924
|
+
if (button.elementType === "element" && button.element) {
|
|
37925
|
+
return {
|
|
37926
|
+
icon: button.element
|
|
37927
|
+
};
|
|
37928
|
+
} else {
|
|
37929
|
+
return {
|
|
37930
|
+
icon: React__default.createElement(DynamicIcon, {
|
|
37931
|
+
iconName: button.icon
|
|
37932
|
+
}),
|
|
37933
|
+
onClick: function onClick(event) {
|
|
37934
|
+
var customEvent = {
|
|
37935
|
+
column: cellData.column,
|
|
37936
|
+
component: cellData.component,
|
|
37937
|
+
element: cellData.element,
|
|
37938
|
+
event: event,
|
|
37939
|
+
model: cellData.data,
|
|
37940
|
+
row: cellData.row
|
|
37941
|
+
};
|
|
37942
|
+
if (button.onClick) {
|
|
37943
|
+
button.onClick(customEvent);
|
|
37944
|
+
}
|
|
37945
|
+
}
|
|
37946
|
+
};
|
|
37947
|
+
}
|
|
37938
37948
|
}) : [];
|
|
37939
37949
|
var buttonElements = [];
|
|
37940
37950
|
{
|