ods-component-lib 1.18.164 → 1.18.165
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/select/OdsCustomMultiSelect.d.ts +7 -0
- package/dist/components/antd/select/OdsMultiSelect.d.ts +9 -0
- package/dist/components/antd/slider/OdsSlider.d.ts +2 -2
- package/dist/components/antd/slider/OdsTwoHandleSlider.d.ts +9 -0
- package/dist/components/antd/timeline/OdsTimeline.d.ts +2 -2
- 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/OdsInlineEditDataGrid/handlers/ContentHandlers.d.ts +14 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/EditorPreparedHandlers.d.ts +7 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OnExportingHandlers.d.ts +19 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OptionHandlers.d.ts +7 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/SummaryHandlers.d.ts +21 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/partials/ActionCellRender.d.ts +15 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/partials/EditingPartial.d.ts +9 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/partials/PageTitle.d.ts +8 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/utils.d.ts +19 -0
- package/dist/components/devextreme/OdsProfDataGrid.d.ts +3 -0
- package/dist/components/devextreme/OdsServerSideTransfer.d.ts +56 -0
- package/dist/components/devextreme/treeview/DxTreeView.d.ts +3 -0
- package/dist/index.css +53 -0
- package/dist/index.js +7 -120
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +7 -120
- 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/OdsLink/OdsLink.stories.d.ts +59 -0
- package/dist/stories/OdsSlider/OdsSlider.stories.d.ts +1 -0
- package/dist/stories/OdsSlider/Samples/TwoHandleSlider.d.ts +2 -0
- package/dist/stories/OdsTimeline/OdsTimeline.stories.d.ts +4 -42
- package/dist/stories/OdsTimeline/Samples/TimelineVertical.Sample.d.ts +2 -0
- package/package.json +1 -1
- package/dist/stories/OdsModal/Samples/OdsModal.Sample.d.ts +0 -1
- 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
- /package/dist/components/antd/datepicker/{OdsDateRangepicker.d.ts → OdsDateRangePicker.d.ts} +0 -0
|
@@ -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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SliderSingleProps } from 'antd/es/slider';
|
|
3
|
-
interface
|
|
3
|
+
interface OdsSliderProps extends SliderSingleProps {
|
|
4
4
|
decimaInput?: boolean;
|
|
5
5
|
spanSizeOfBar?: number;
|
|
6
6
|
spanSizeOfInput?: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function OdsSlider(props:
|
|
8
|
+
export declare function OdsSlider(props: OdsSliderProps): React.JSX.Element;
|
|
9
9
|
export default OdsSlider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SliderRangeProps } from 'antd/es/slider';
|
|
3
|
+
interface OdsSliderProps extends SliderRangeProps {
|
|
4
|
+
spanSizeOfBar?: number;
|
|
5
|
+
spanSizeOfInput?: number;
|
|
6
|
+
twoHandleInput?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function OdsTwoHandleSlider(props: OdsSliderProps): React.JSX.Element;
|
|
9
|
+
export default OdsTwoHandleSlider;
|
|
@@ -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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ContentReadyEvent } from "devextreme/ui/data_grid";
|
|
2
|
+
import { IColumnConfig } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook to handle content ready events for the data grid.
|
|
5
|
+
* @param {React.MutableRefObject<any>} lastPageIndexRef - Reference to the last page index.
|
|
6
|
+
* @param {boolean} contentReady - Boolean indicating if the content is ready.
|
|
7
|
+
* @param {Function} setRowCount - Function to set the row count state
|
|
8
|
+
* @param {Function} setContentReady - Function to set the content ready state.
|
|
9
|
+
* @param {Function} setCurrentPage - Function to set the current page state.
|
|
10
|
+
* @param {Function} setCurrentPageSize - Function to set the current page size state.
|
|
11
|
+
* @param {Function} [callback] - Optional callback function.
|
|
12
|
+
* @returns {(e: ContentReadyEvent<any, any>) => void} handleContentReady - Handler for content ready event.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useContentHandlers: (lastPageIndexRef: React.MutableRefObject<any>, contentReady: boolean, columns: IColumnConfig[], setRowCount: Function, setContentReady: Function, setCurrentPage: Function, setCurrentPageSize: Function, setHeaderFilterData: Function, callback?: Function) => (e: ContentReadyEvent<any, any>) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook that returns a callback function to handle the "editorPrepared" event of a DevExtreme component.
|
|
3
|
+
* This callback function is responsible for customizing the editor's behavior based on specific conditions.
|
|
4
|
+
*
|
|
5
|
+
* @returns {Function} The callback function to handle the "editorPrepared" event.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useEditorPreparedHandlers: () => (e: any) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface IOnExportingProps {
|
|
2
|
+
gridComponent: any;
|
|
3
|
+
baseFileName?: string;
|
|
4
|
+
selectedText?: string;
|
|
5
|
+
getSummary: () => string;
|
|
6
|
+
selectedRowsOnly: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Handles the exporting of data from the grid component.
|
|
10
|
+
*
|
|
11
|
+
* @param {IOnExportingProps} params - The parameters for exporting the data.
|
|
12
|
+
* @param {React.RefObject<Grid>} params.gridComponent - The reference to the grid component.
|
|
13
|
+
* @param {string} params.baseFileName - The base file name for the exported file.
|
|
14
|
+
* @param {string} params.selectedText - The text to be displayed for selected rows.
|
|
15
|
+
* @param {Function} params.getSummary - The function to get the summary of the exported data.
|
|
16
|
+
* @param {boolean} params.selectedRowsOnly - Indicates whether to export only selected rows.
|
|
17
|
+
*/
|
|
18
|
+
export declare const onExporting: ({ gridComponent, baseFileName, selectedText, getSummary, selectedRowsOnly, }: IOnExportingProps) => void;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook to handle option change events for the data grid.
|
|
3
|
+
* @param {Object} dataGridRef - The dataGridRef property passed to the hook.
|
|
4
|
+
* @param {Function} setFilterApplied - Function to set the filter applied state.
|
|
5
|
+
* @returns {Function} - Handler function for option changed event.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useOptionHandlers: (dataGridRef: any, setFilterApplied: any) => (e: any) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ISummaryRowOptions } from "../types";
|
|
2
|
+
interface IUseSummaryHandlersProps {
|
|
3
|
+
customSummary?: ISummaryRowOptions;
|
|
4
|
+
totalRecordCount: number;
|
|
5
|
+
currentPageSize: number;
|
|
6
|
+
currentPage: number;
|
|
7
|
+
filterApplied: boolean;
|
|
8
|
+
rowCount: number;
|
|
9
|
+
filteredRowCount: number;
|
|
10
|
+
isServerSide?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Custom hook that provides summary handlers for a data grid.
|
|
14
|
+
*
|
|
15
|
+
* @param {IUseSummaryHandlersProps} props - The props object containing necessary parameters.
|
|
16
|
+
* @returns {Object} - An object containing the renderTotal function.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useSummaryHandlers: ({ customSummary, totalRecordCount, currentPageSize, currentPage, filterApplied, rowCount, filteredRowCount, }: IUseSummaryHandlersProps) => {
|
|
19
|
+
renderTotal: () => string | null;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { IVirtualDataGridProps } from "../types";
|
|
3
|
+
interface ActionCellRenderProps {
|
|
4
|
+
cellData: any;
|
|
5
|
+
actionButtons: IVirtualDataGridProps["actionButtonGroup"];
|
|
6
|
+
edit?: IVirtualDataGridProps["edit"];
|
|
7
|
+
actionButtonGroup?: IVirtualDataGridProps["actionButtonGroup"];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders the action buttons for a cell in the OdsInlineEditDataGrid component.
|
|
11
|
+
* @param {ActionCellRenderProps} props - The props for the ActionCellRender component.
|
|
12
|
+
* @returns {ReactNode} - The rendered action buttons.
|
|
13
|
+
*/
|
|
14
|
+
declare const ActionCellRender: FC<ActionCellRenderProps>;
|
|
15
|
+
export default ActionCellRender;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IEditingOptions } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Component that handles editing functionalities within the data grid.
|
|
5
|
+
* @param {IEditingOptions} props - The properties passed to the component.
|
|
6
|
+
* @returns {JSX.Element} - The JSX element representing the editing handlers.
|
|
7
|
+
*/
|
|
8
|
+
declare const EditingPartial: React.FC<IEditingOptions>;
|
|
9
|
+
export default EditingPartial;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IToolbarButton } from "../types";
|
|
3
|
+
interface PageTitleAndToolbarProps {
|
|
4
|
+
pageTitle?: string;
|
|
5
|
+
toolbarButtonGroup?: IToolbarButton[];
|
|
6
|
+
}
|
|
7
|
+
declare const MemoizedPageTitleAndToolbar: React.NamedExoticComponent<PageTitleAndToolbarProps>;
|
|
8
|
+
export default MemoizedPageTitleAndToolbar;
|
|
@@ -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
|
+
*/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import 'devextreme/dist/css/dx.light.css';
|
|
3
|
+
import './styles.css';
|
|
4
|
+
export interface Column {
|
|
5
|
+
title: string;
|
|
6
|
+
dataIndex: string;
|
|
7
|
+
key?: string;
|
|
8
|
+
caption?: string;
|
|
9
|
+
tooltip?: {
|
|
10
|
+
enable: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface IAxiosProps {
|
|
14
|
+
token: string;
|
|
15
|
+
requestData?: any;
|
|
16
|
+
apiUrl: string;
|
|
17
|
+
environmentUrl: string;
|
|
18
|
+
requestQueryString?: any;
|
|
19
|
+
requestType: string;
|
|
20
|
+
}
|
|
21
|
+
interface ISummaryRowOptions {
|
|
22
|
+
summaryLoadedDataLabel?: string;
|
|
23
|
+
summaryTotalDataLabel?: string;
|
|
24
|
+
summaryFilteredDataLabel?: string;
|
|
25
|
+
summaryTotalCount?: number;
|
|
26
|
+
summaryTotalPageCountLabel?: string;
|
|
27
|
+
summarySumLabel?: string;
|
|
28
|
+
summaryAvgLabel?: string;
|
|
29
|
+
summaryMinLabel?: string;
|
|
30
|
+
summaryMaxLabel?: string;
|
|
31
|
+
summaryCountLabel?: string;
|
|
32
|
+
}
|
|
33
|
+
interface OdsTransferProps<RecordType = any> {
|
|
34
|
+
dataSource?: RecordType[];
|
|
35
|
+
language: string;
|
|
36
|
+
pagingEnable?: boolean;
|
|
37
|
+
queryPageSize?: number;
|
|
38
|
+
pageSize?: number;
|
|
39
|
+
isServerSide: boolean;
|
|
40
|
+
axiosRequest?: IAxiosProps;
|
|
41
|
+
customSummary?: ISummaryRowOptions;
|
|
42
|
+
dataGridPageName?: string;
|
|
43
|
+
columns: any[];
|
|
44
|
+
pageTitle?: string;
|
|
45
|
+
keyExpr: string;
|
|
46
|
+
noDataText: string;
|
|
47
|
+
defaultPageSize: number;
|
|
48
|
+
targetItems?: any[];
|
|
49
|
+
noContentMainText: string;
|
|
50
|
+
noContentSubText: string;
|
|
51
|
+
onTargetChange?: (selectedItems: RecordType[]) => void;
|
|
52
|
+
}
|
|
53
|
+
export declare const getRequestHeaders: (props: any) => Headers;
|
|
54
|
+
export declare const concatFilteredLabel: (result: string, totalloaded: number, filteredRowCount: number, filterApplied: boolean, props: any) => string;
|
|
55
|
+
declare const OdsServerSideTransfer: React.FC<OdsTransferProps>;
|
|
56
|
+
export default OdsServerSideTransfer;
|
package/dist/index.css
CHANGED
|
@@ -169,6 +169,59 @@ tr._2CvVM._3Xrp3._19iuB._3udtX {
|
|
|
169
169
|
|
|
170
170
|
._vOHiU {
|
|
171
171
|
justify-content: center;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
._2o0Iw {
|
|
175
|
+
display: none !important;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
._AqJeI {
|
|
179
|
+
border-radius: 16px !important;
|
|
180
|
+
background-color: white !important;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
._vOHiU {
|
|
184
|
+
justify-content: center;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
/*ServerSide Transfer*/
|
|
189
|
+
._2n8bC {
|
|
190
|
+
display: flex;
|
|
191
|
+
flex-direction: column;
|
|
192
|
+
align-items: center;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
._3eNgs {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
align-items: center;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
._1t0-Z {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
justify-content: space-between;
|
|
205
|
+
margin: 0 20px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
._1t0-Z ._3ZRJ5 {
|
|
209
|
+
margin: 10px 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
._3Ebn4 {
|
|
213
|
+
background-color: #f0f0f0;
|
|
214
|
+
color: #a0a0a0;
|
|
215
|
+
pointer-events: none;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
._4kg4r ._1LVm1 {
|
|
219
|
+
background-color: #f0f0f0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
._2eCOe {
|
|
223
|
+
pointer-events: none;
|
|
224
|
+
background-color: #f0f0f0;
|
|
172
225
|
}
|
|
173
226
|
._3n8UJ {
|
|
174
227
|
background-color: lightgreen;
|
package/dist/index.js
CHANGED
|
@@ -79,37 +79,6 @@ function _taggedTemplateLiteralLoose(strings, raw) {
|
|
|
79
79
|
strings.raw = raw;
|
|
80
80
|
return strings;
|
|
81
81
|
}
|
|
82
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
83
|
-
if (!o) return;
|
|
84
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
85
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
86
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
87
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
88
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
89
|
-
}
|
|
90
|
-
function _arrayLikeToArray(arr, len) {
|
|
91
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
92
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
93
|
-
return arr2;
|
|
94
|
-
}
|
|
95
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
96
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
97
|
-
if (it) return (it = it.call(o)).next.bind(it);
|
|
98
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
99
|
-
if (it) o = it;
|
|
100
|
-
var i = 0;
|
|
101
|
-
return function () {
|
|
102
|
-
if (i >= o.length) return {
|
|
103
|
-
done: true
|
|
104
|
-
};
|
|
105
|
-
return {
|
|
106
|
-
done: false,
|
|
107
|
-
value: o[i++]
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
112
|
-
}
|
|
113
82
|
|
|
114
83
|
var _templateObject;
|
|
115
84
|
var StyledAlert = styled__default(antd.Alert)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n //\n"])));
|
|
@@ -1114,7 +1083,9 @@ var _templateObject$l;
|
|
|
1114
1083
|
var StyledtTimeline = styled__default(antd.Timeline)(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n //\n"])));
|
|
1115
1084
|
|
|
1116
1085
|
function OdsTimeline(props) {
|
|
1117
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledtTimeline, Object.assign({}, props
|
|
1086
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledtTimeline, Object.assign({}, props, {
|
|
1087
|
+
mode: props.mode
|
|
1088
|
+
})));
|
|
1118
1089
|
}
|
|
1119
1090
|
|
|
1120
1091
|
var _templateObject$m;
|
|
@@ -34533,12 +34504,6 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
34533
34504
|
updateTrigger = _useState4[0],
|
|
34534
34505
|
setUpdateTrigger = _useState4[1];
|
|
34535
34506
|
var lastPageIndexRef = React.useRef(null);
|
|
34536
|
-
var _useState5 = React.useState({}),
|
|
34537
|
-
filterOptions = _useState5[0],
|
|
34538
|
-
setFilterOptions = _useState5[1];
|
|
34539
|
-
var _useState6 = React.useState([]),
|
|
34540
|
-
headerFilterData = _useState6[0],
|
|
34541
|
-
setHeaderFilterData = _useState6[1];
|
|
34542
34507
|
var _useStyles = useStyles$1(),
|
|
34543
34508
|
gridStyle = _useStyles.styles;
|
|
34544
34509
|
var renderTotal = React.useCallback(function () {
|
|
@@ -34563,45 +34528,6 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
34563
34528
|
var currentTotalCount = currentPageIndex == 0 ? 50 : dataGridInstance.totalCount();
|
|
34564
34529
|
var newData = dataGridInstance === null || dataGridInstance === void 0 ? void 0 : (_dataGridInstance$get = dataGridInstance.getDataSource()) === null || _dataGridInstance$get === void 0 ? void 0 : _dataGridInstance$get.items();
|
|
34565
34530
|
if ((!filterApplied && currentPageIndex == 1 && currentTotalCount != totalUnfilteredCount.current || lastPageIndexRef.current !== currentPageIndex) && newData && newData.length > 0) {
|
|
34566
|
-
setHeaderFilterData(function (prevData) {
|
|
34567
|
-
var uniqueValuesByColumn = {};
|
|
34568
|
-
props.columns.forEach(function (col) {
|
|
34569
|
-
uniqueValuesByColumn[col.dataField] = new Set(prevData.map(function (item) {
|
|
34570
|
-
return item[col.dataField];
|
|
34571
|
-
}).filter(function (val) {
|
|
34572
|
-
return val !== null && val !== "";
|
|
34573
|
-
}));
|
|
34574
|
-
});
|
|
34575
|
-
var newItems = [];
|
|
34576
|
-
newData.forEach(function (item) {
|
|
34577
|
-
var addItem = {};
|
|
34578
|
-
props.columns.forEach(function (col) {
|
|
34579
|
-
var _item$col$dataField;
|
|
34580
|
-
var colValue = (_item$col$dataField = item[col.dataField]) === null || _item$col$dataField === void 0 ? void 0 : _item$col$dataField.toString();
|
|
34581
|
-
if (props.applyCellRenderToHeaderFilter) {
|
|
34582
|
-
try {
|
|
34583
|
-
if (col.cellRender) {
|
|
34584
|
-
colValue = col.cellRender({
|
|
34585
|
-
value: colValue
|
|
34586
|
-
});
|
|
34587
|
-
} else if (col.calculateCellValue) {
|
|
34588
|
-
var _q;
|
|
34589
|
-
var q = (_q = {}, _q[col.dataField] = item[col.dataField], _q);
|
|
34590
|
-
colValue = col.calculateCellValue(q);
|
|
34591
|
-
}
|
|
34592
|
-
} catch (error) {}
|
|
34593
|
-
}
|
|
34594
|
-
if (colValue && !uniqueValuesByColumn[col.dataField].has(colValue)) {
|
|
34595
|
-
uniqueValuesByColumn[col.dataField].add(colValue);
|
|
34596
|
-
addItem[col.dataField] = colValue;
|
|
34597
|
-
}
|
|
34598
|
-
});
|
|
34599
|
-
if (Object.keys(addItem).length > 0) {
|
|
34600
|
-
newItems.push(addItem);
|
|
34601
|
-
}
|
|
34602
|
-
});
|
|
34603
|
-
return [].concat(prevData, newItems);
|
|
34604
|
-
});
|
|
34605
34531
|
setCurrentPage(currentPageIndex);
|
|
34606
34532
|
setCurrentPageSize(dataGridInstance.pageSize());
|
|
34607
34533
|
rowCount.current = currentTotalCount;
|
|
@@ -34650,45 +34576,6 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
34650
34576
|
}
|
|
34651
34577
|
}, [props.dataGridRef]);
|
|
34652
34578
|
React.useEffect(function () {}, [updateTrigger]);
|
|
34653
|
-
React.useEffect(function () {
|
|
34654
|
-
var loadFilterData = function loadFilterData() {
|
|
34655
|
-
try {
|
|
34656
|
-
var newFilterOptions = {};
|
|
34657
|
-
var _loop = function _loop() {
|
|
34658
|
-
var col = _step.value;
|
|
34659
|
-
try {
|
|
34660
|
-
if (headerFilterData.length > 0) {
|
|
34661
|
-
var newData = headerFilterData.filter(function (item) {
|
|
34662
|
-
return item[col.dataField] != null && item[col.dataField] !== "";
|
|
34663
|
-
}).map(function (item) {
|
|
34664
|
-
return item[col.dataField].toString();
|
|
34665
|
-
});
|
|
34666
|
-
var values = newData.map(function (group) {
|
|
34667
|
-
return {
|
|
34668
|
-
text: group,
|
|
34669
|
-
value: group
|
|
34670
|
-
};
|
|
34671
|
-
});
|
|
34672
|
-
newFilterOptions[col.dataField] = values;
|
|
34673
|
-
}
|
|
34674
|
-
} catch (error) {
|
|
34675
|
-
console.error('Error loading data for header filter:', error);
|
|
34676
|
-
}
|
|
34677
|
-
};
|
|
34678
|
-
for (var _iterator = _createForOfIteratorHelperLoose(props.columns), _step; !(_step = _iterator()).done;) {
|
|
34679
|
-
_loop();
|
|
34680
|
-
}
|
|
34681
|
-
setFilterOptions(newFilterOptions);
|
|
34682
|
-
return Promise.resolve();
|
|
34683
|
-
} catch (e) {
|
|
34684
|
-
return Promise.reject(e);
|
|
34685
|
-
}
|
|
34686
|
-
};
|
|
34687
|
-
loadFilterData();
|
|
34688
|
-
}, [headerFilterData, props.columns]);
|
|
34689
|
-
React.useEffect(function () {
|
|
34690
|
-
setHeaderFilterData([]);
|
|
34691
|
-
}, []);
|
|
34692
34579
|
var actionButtons = React.useMemo(function () {
|
|
34693
34580
|
if (props.actionButtonGroup) {
|
|
34694
34581
|
if (props.actionButtonGroup.length > 3 && !props.edit) {
|
|
@@ -34827,7 +34714,7 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
34827
34714
|
focusedRowEnabled: false,
|
|
34828
34715
|
onEditorPrepared: onEditorPrepared,
|
|
34829
34716
|
onCellClick: function onCellClick(e) {
|
|
34830
|
-
if (e.rowType !=
|
|
34717
|
+
if (e.rowType != "header") {
|
|
34831
34718
|
e.cellElement.style.backgroundColor = "transparent";
|
|
34832
34719
|
}
|
|
34833
34720
|
},
|
|
@@ -34888,9 +34775,9 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
34888
34775
|
text: "Passive",
|
|
34889
34776
|
value: false
|
|
34890
34777
|
}]
|
|
34891
|
-
}), React__default.createElement(DataGrid.HeaderFilter, {
|
|
34892
|
-
|
|
34893
|
-
}), col.multiLevelColumns && col.multiLevelColumns.map(function (multiLevelColItem) {
|
|
34778
|
+
}), col.headerFilter && React__default.createElement(DataGrid.HeaderFilter, Object.assign({}, col.headerFilter, {
|
|
34779
|
+
visible: true
|
|
34780
|
+
})), col.multiLevelColumns && col.multiLevelColumns.map(function (multiLevelColItem) {
|
|
34894
34781
|
return React__default.createElement(DataGrid.Column, {
|
|
34895
34782
|
dataField: multiLevelColItem.dataField,
|
|
34896
34783
|
caption: multiLevelColItem.caption,
|