ods-component-lib 1.18.261 → 1.18.263

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.
Files changed (52) hide show
  1. package/dist/components/antd/form/OdsBasicForm.d.ts +18 -0
  2. package/dist/components/antd/icon/OdsIcon.d.ts +10 -0
  3. package/dist/components/antd/select/OdsCustomMultiSelect.d.ts +7 -0
  4. package/dist/components/antd/select/OdsMultiSelect.d.ts +9 -0
  5. package/dist/components/custom/OdsLogin.d.ts +8 -0
  6. package/dist/components/devextreme/DxDataPopupForm.d.ts +3 -0
  7. package/dist/components/devextreme/DynamicIcon.d.ts +5 -0
  8. package/dist/components/devextreme/OdsBatchEditDataGrid/OdsBatchEditDataGrid.Types.d.ts +1 -0
  9. package/dist/components/devextreme/OdsBatchEditDataGrid/handlers/OnActionCellRenderHandler.d.ts +11 -0
  10. package/dist/components/devextreme/OdsBatchEditDataGrid/handlers/OnContentReadyHandler.d.ts +17 -0
  11. package/dist/components/devextreme/OdsBatchEditDataGrid/handlers/OnEditorPreparedHandler.d.ts +7 -0
  12. package/dist/components/devextreme/OdsBatchEditDataGrid/handlers/OnExportingHandler.d.ts +10 -0
  13. package/dist/components/devextreme/OdsBatchEditDataGrid/handlers/OnOptionChangedHandler.d.ts +12 -0
  14. package/dist/components/devextreme/OdsBatchEditDataGrid/handlers/OnSummaryHandler.d.ts +24 -0
  15. package/dist/components/devextreme/OdsBatchEditDataGrid/partials/PageTitleAndToolbarPartial.d.ts +8 -0
  16. package/dist/components/devextreme/OdsBatchEditDataGrid/styles.d.ts +9 -0
  17. package/dist/components/devextreme/OdsBatchEditDataGrid/types.d.ts +118 -0
  18. package/dist/components/devextreme/OdsDataGridNew.d.ts +56 -0
  19. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/ContentHandlers.d.ts +14 -0
  20. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/EditorPreparedHandlers.d.ts +7 -0
  21. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OnExportingHandlers.d.ts +19 -0
  22. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OptionHandlers.d.ts +7 -0
  23. package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/SummaryHandlers.d.ts +21 -0
  24. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/ActionCellRender.d.ts +15 -0
  25. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/EditingPartial.d.ts +9 -0
  26. package/dist/components/devextreme/OdsInlineEditDataGrid/partials/PageTitle.d.ts +8 -0
  27. package/dist/components/devextreme/OdsInlineEditDataGrid/utils.d.ts +19 -0
  28. package/dist/components/devextreme/OdsProfDataGrid.d.ts +3 -0
  29. package/dist/components/devextreme/dataGridHandlers/OnToolbarButtonHandler.d.ts +7 -0
  30. package/dist/components/devextreme/dataGridStyle.d.ts +3 -0
  31. package/dist/components/devextreme/treeview/DxTreeView.d.ts +3 -0
  32. package/dist/index.js +35 -4
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.modern.js +35 -4
  35. package/dist/index.modern.js.map +1 -1
  36. package/dist/stories/OdsCustomMultiSelect/OdsCustomMultiSelect.stories.d.ts +9 -0
  37. package/dist/stories/OdsCustomMultiSelect/Samples/Basic.Sample.d.ts +1 -0
  38. package/dist/stories/OdsCustomMultiSelect/Samples/ModeMultiple.Sample.d.ts +1 -0
  39. package/dist/utils/DynamicIcon.d.ts +5 -0
  40. package/package.json +1 -1
  41. package/dist/components/devextreme/OdsTimelineTable/OdsTimelineTableSearchBox.d.ts +0 -3
  42. package/dist/stories/OdsBasicDataGrid/OdsBasicDataGrid.stories.d.ts +0 -110
  43. package/dist/stories/OdsBasicDataGrid/Samples/MergeCells/MergeCells.Constants.d.ts +0 -14
  44. package/dist/stories/OdsBasicDataGrid/Samples/MergeCells/MergeCells.MockData.d.ts +0 -7
  45. package/dist/stories/OdsBasicDataGrid/Samples/MergeCells/MergeCells.Sample.d.ts +0 -1
  46. package/dist/stories/OdsPivotGrid/OdsPivotGrid.stories.d.ts +0 -15
  47. package/dist/stories/OdsPivotGrid/Samples/BasicPivotGrid/BasicPivotGrid.Constants.d.ts +0 -2
  48. package/dist/stories/OdsPivotGrid/Samples/BasicPivotGrid/BasicPivotGrid.MockData.d.ts +0 -7
  49. package/dist/stories/OdsPivotGrid/Samples/BasicPivotGrid/BasicPivotGrid.Sample.d.ts +0 -1
  50. package/dist/stories/OdsRemoteDataGrid/Samples/MergeCells/MergeCells.Constants.d.ts +0 -5
  51. package/dist/stories/OdsRemoteDataGrid/Samples/MergeCells/MergeCells.MockData.d.ts +0 -6
  52. package/dist/stories/OdsRemoteDataGrid/Samples/MergeCells/MergeCells.Sample.d.ts +0 -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,7 @@
1
+ import React from "react";
2
+ import { SelectProps } from "antd";
3
+ export interface ISelectProps extends SelectProps {
4
+ buttonLabel: string;
5
+ }
6
+ declare function OdsCustomMultiSelect(props: ISelectProps): React.JSX.Element;
7
+ export default OdsCustomMultiSelect;
@@ -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,8 @@
1
+ import { FormProps } from "antd";
2
+ import React from "react";
3
+ export interface IFormProps extends FormProps {
4
+ items: any[];
5
+ loading: boolean;
6
+ }
7
+ declare function OdsLogin(props: IFormProps): React.JSX.Element;
8
+ export default OdsLogin;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: React.MemoExoticComponent<(props: any) => React.JSX.Element>;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const DynamicIcon: ({ iconName }: {
3
+ iconName: any;
4
+ }) => React.JSX.Element;
5
+ export default DynamicIcon;
@@ -34,6 +34,7 @@ export interface IBatchEditDataGridProps extends IDataGridOptions {
34
34
  axiosRequest?: IAxiosProps;
35
35
  customSummary?: ISummaryRowOptions;
36
36
  handleEditorPreparing?: any;
37
+ handleCellPrepared?: any;
37
38
  isFilterRow?: boolean;
38
39
  filterData?: any[];
39
40
  detailGridColums?: any[];
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { IButtonGrouOptions, IEditingOptions, IActionButtonsTooltipType } from "../types";
3
+ /**
4
+ * Custom hook that returns a callback function for rendering action buttons in a cell.
5
+ * @param visibleActionButtons - An array of options for visible action buttons.
6
+ * @param actionButtonGroup - An array of options for action buttons.
7
+ * @param edit - An object containing editing options.
8
+ * @param tooltipType - The type of tooltip to display.
9
+ * @returns The onActionCellRender callback function.
10
+ */
11
+ export declare const useOnActionCellRenderHandler: (visibleActionButtons: IButtonGrouOptions[] | undefined, actionButtonGroup: IButtonGrouOptions[] | undefined, edit: IEditingOptions | undefined, actionButtonsTooltipType: IActionButtonsTooltipType | undefined) => (cellData: any | undefined) => React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { MutableRefObject } from "react";
2
+ import { ContentReadyEvent } from "devextreme/ui/data_grid";
3
+ import { IColumnOptions } from "../types";
4
+ /**
5
+ * Custom hook to handle content ready events for the data grid.
6
+ * @param {IColumnOptions[]} columns - The column options for the data grid.
7
+ * @param {MutableRefObject<any>} lastPageIndexRef - Reference to the last page index.
8
+ * @param {boolean} filterApplied - Boolean indicating if a filter is applied.
9
+ * @param {MutableRefObject<number>} totalFilteredCount - Reference to the total filtered count.
10
+ * @param {MutableRefObject<number>} totalUnfilteredCount - Reference to the total unfiltered count.
11
+ * @param {Function} setUpdateTrigger - Function to set the update trigger.
12
+ * @param {Function} setCurrentPage - Function to set the current page.
13
+ * @param {Function} setCurrentPageSize - Function to set the current page size.
14
+ * @param {Function} [callback] - Optional callback function.
15
+ * @returns {(e: ContentReadyEvent<any, any>) => void} handleContentReady - Handler for content ready event.
16
+ */
17
+ export declare const useOnContentReadyHandler: (columns: IColumnOptions[], lastPageIndexRef: MutableRefObject<number>, filterApplied: boolean, totalFilteredCount: MutableRefObject<number>, totalUnfilteredCount: MutableRefObject<number>, setUpdateTrigger: Function, setCurrentPage: Function, setCurrentPageSize: 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 useOnEditorPreparedHandler: (callback: any) => (e: any) => void;
@@ -0,0 +1,10 @@
1
+ import { IExportOptions } from "../types";
2
+ /**
3
+ * Handles the exporting of data from the grid component.
4
+ *
5
+ * @param {IExportOptions} exportProps - The export options for the data grid.
6
+ * @param {Function} callback - The callback function to be executed after exporting.
7
+ * @param {() => string} getSummary - The callback function to get the summary info.
8
+ * @returns {Function} - The onExporting event handler function.
9
+ */
10
+ export declare const useOnExportingHandler: (exportProps: IExportOptions, getSummary: () => string, callback: Function) => (e: any) => void;
@@ -0,0 +1,12 @@
1
+ import { MutableRefObject } from "react";
2
+ /**
3
+ * Custom hook to handle option change events for the data grid.
4
+ * @param {MutableRefObject<any>} dataGridRef - The ref object for the data grid.
5
+ * @param {MutableRefObject<number>} totalFilteredCount - The ref object for the total filtered count.
6
+ * @param {any} sortingProps - The sorting properties.
7
+ * @param {Function} setFilterApplied - Function to set the filter applied state.
8
+ * @param {Function} setUpdateTrigger - Function to set the update trigger state.
9
+ * @param {Function} callback - The callback function to be called.
10
+ * @returns {Function} - Handler function for option changed event.
11
+ */
12
+ export declare const useOnOptionChangedHandler: (dataGridRef: MutableRefObject<any>, totalFilteredCount: MutableRefObject<number>, sortingProps: any, setFilterApplied: Function, setUpdateTrigger: Function, callback: Function) => (e: any) => void;
@@ -0,0 +1,24 @@
1
+ import { MutableRefObject } from "react";
2
+ import type { ISummaryRowOptions } from "../types";
3
+ /**
4
+ * Props interface for the useOnSummaryHandler hook.
5
+ */
6
+ interface IUseSummaryHandlersProps {
7
+ customSummary?: ISummaryRowOptions;
8
+ totalRecordCount: number;
9
+ currentPageSize: number;
10
+ currentPage: number;
11
+ filterApplied: boolean;
12
+ totalFilteredCount: MutableRefObject<number>;
13
+ totalUnfilteredCount: MutableRefObject<number>;
14
+ }
15
+ /**
16
+ * Custom hook that provides summary handler for a data grid.
17
+ *
18
+ * @param {IUseSummaryHandlersProps} props - The props object containing necessary parameters.
19
+ * @returns {Object} - An object containing the renderTotal function.
20
+ */
21
+ export declare const useOnSummaryHandler: ({ customSummary, totalRecordCount, currentPageSize, currentPage, filterApplied, totalFilteredCount, totalUnfilteredCount, }: IUseSummaryHandlersProps) => {
22
+ renderTotal: () => string | null;
23
+ };
24
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { IToolbarButtonOptions } from "../types";
3
+ interface PageTitleAndToolbarProps {
4
+ pageTitle?: string;
5
+ toolbarButtonGroup?: IToolbarButtonOptions[];
6
+ }
7
+ declare const MemoizedPageTitleAndToolbar: React.NamedExoticComponent<PageTitleAndToolbarProps>;
8
+ export default MemoizedPageTitleAndToolbar;
@@ -0,0 +1,9 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ grid: import("antd-style").SerializedStyles;
3
+ gridCustomSummary: import("antd-style").SerializedStyles;
4
+ }>;
5
+ export declare const usePageTitleAndToolbarStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
6
+ gridPageTitleWrapper: import("antd-style").SerializedStyles;
7
+ gridToolbarButtonGroupWrapper: import("antd-style").SerializedStyles;
8
+ gridToolbarButton: import("antd-style").SerializedStyles;
9
+ }>;
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Represents the types for the OdsBatchEditDataGrid component.
3
+ * @module OdsBatchEditDataGrid/types
4
+ */
5
+ /// <reference types="react" />
6
+ import { ButtonType } from "antd/es/button";
7
+ import { IButtonProps, IColumnProps, IDataGridOptions, IEditingProps, ISummaryProps, IPagerProps, IExportProps, IScrollingProps } from "devextreme-react/data-grid";
8
+ /**
9
+ * Represents the configuration for a column in the data grid.
10
+ */
11
+ export interface IColumnOptions extends Omit<IColumnProps, "cellRender" | "calculateFilterExpression" | "format"> {
12
+ cellRender?: (data: any) => JSX.Element | string;
13
+ calculateFilterExpression?: (value: any, operation: string, target: string) => any;
14
+ format?: string | object;
15
+ }
16
+ /**
17
+ * Represents the props for the pager component.
18
+ */
19
+ export interface IPagerOptions extends Partial<IPagerProps> {
20
+ }
21
+ /**
22
+ * Represents the props for the export functionality.
23
+ */
24
+ export interface IExportOptions extends Partial<IExportProps> {
25
+ enabled: boolean;
26
+ allowExportSelectedData?: boolean;
27
+ fileName?: string;
28
+ selectedText?: string;
29
+ activeText?: string;
30
+ passiveText?: string;
31
+ }
32
+ /**
33
+ * Represents the configuration for a toolbar button.
34
+ */
35
+ export interface IToolbarButtonOptions {
36
+ type: string;
37
+ label: string;
38
+ onClick: () => void;
39
+ disabled?: boolean;
40
+ }
41
+ /**
42
+ * Represents the options for editing data in the data grid.
43
+ */
44
+ export interface IEditingOptions extends Omit<IEditingProps, "mode"> {
45
+ mode?: "row" | "cell" | "batch";
46
+ formItems?: any[];
47
+ title?: string;
48
+ }
49
+ /**
50
+ * Represents the configuration for a button group.
51
+ */
52
+ export interface IButtonGrouOptions extends Omit<IButtonProps, "name"> {
53
+ name?: "cancel" | "delete" | "edit" | "save" | "undelete" | "unmap";
54
+ type?: ButtonType;
55
+ label?: string;
56
+ onclick?: React.MouseEventHandler<HTMLElement>;
57
+ actionPermission?: boolean;
58
+ icon: any;
59
+ }
60
+ export interface IScrollingOptions extends Partial<IScrollingProps> {
61
+ }
62
+ export declare type IActionButtonsTooltipType = "raw" | "styled";
63
+ /**
64
+ * Represents the options for summary rows in the data grid.
65
+ */
66
+ export interface ISummaryRowOptions {
67
+ summaryLoadedDataLabel?: string;
68
+ summaryTotalDataLabel?: string;
69
+ summaryFilteredDataLabel?: string;
70
+ summaryItems?: ISummaryProps[];
71
+ summaryTotalCount?: number;
72
+ summaryTotalPageCountLabel?: string;
73
+ showSumInSummary?: boolean;
74
+ showAvgInSummary?: boolean;
75
+ showCountInSummary?: boolean;
76
+ showMaxInSummary?: boolean;
77
+ showMinInSummary?: boolean;
78
+ summarySumLabel?: string;
79
+ summaryAvgLabel?: string;
80
+ summaryMinLabel?: string;
81
+ summaryMaxLabel?: string;
82
+ summaryCountLabel?: string;
83
+ }
84
+ /**
85
+ * Represents the custom options for the ODS data grid.
86
+ */
87
+ export interface IODSDataGridCustomOptions {
88
+ actionButtonGroup?: IButtonGrouOptions[];
89
+ actionColumnEnable?: boolean;
90
+ columnChooserPositionDisabled?: boolean;
91
+ columnResizingMode?: "nextColumn" | "widget";
92
+ gridColumns?: IColumnOptions[];
93
+ customSummary?: ISummaryRowOptions;
94
+ dataGridPageName?: string;
95
+ dataGridRef?: any;
96
+ editProps?: IEditingOptions;
97
+ exportProps?: IExportOptions;
98
+ isFilterPanel?: boolean;
99
+ isFilterRow?: boolean;
100
+ language?: string;
101
+ pagerProps?: IPagerOptions;
102
+ pageSize?: number;
103
+ pageTitle?: string;
104
+ scrollingProps?: IScrollingOptions;
105
+ sortingProps?: any;
106
+ toolbarButtonGroup?: IToolbarButtonOptions[];
107
+ totalRecordCount?: number;
108
+ actionButtonsTooltipType?: IActionButtonsTooltipType;
109
+ isColumnWidthFixed?: boolean;
110
+ isColumnChooserButton?: boolean;
111
+ isExportButton?: boolean;
112
+ isSearchPanel?: boolean;
113
+ }
114
+ /**
115
+ * Represents the props for a virtual data grid component.
116
+ */
117
+ export interface IBatchEditDataGridProps extends IDataGridOptions, IODSDataGridCustomOptions {
118
+ }
@@ -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,3 @@
1
+ import React from "react";
2
+ declare function OdsProfDataGrid(props: any): React.JSX.Element;
3
+ export default OdsProfDataGrid;
@@ -0,0 +1,7 @@
1
+ interface IOnToolbarPreparingOptions {
2
+ pageTitle?: string;
3
+ toolbarButtonGroup?: any[];
4
+ callback?: (e: any) => void;
5
+ }
6
+ export declare const useOnToolbarButtonHandler: ({ pageTitle, toolbarButtonGroup, callback }: IOnToolbarPreparingOptions) => (e: any) => void;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ toolbarGrid: import("antd-style").SerializedStyles;
3
+ }>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const DxTreeView: (props: any) => React.JSX.Element;
3
+ export default DxTreeView;
package/dist/index.js CHANGED
@@ -35413,6 +35413,13 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
35413
35413
  component: cellData.component,
35414
35414
  row: cellData.row
35415
35415
  }) : buttonItem.visible;
35416
+ var isDisabled = typeof buttonItem.disabled === "function" ? buttonItem.disabled({
35417
+ column: cellData.column,
35418
+ component: cellData.component,
35419
+ row: cellData.row
35420
+ }) : buttonItem.disabled;
35421
+ var permissionDisabled = buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission;
35422
+ var finalDisabled = isDisabled || permissionDisabled;
35416
35423
  if (buttonItem.elementType === "element" && buttonItem.element) {
35417
35424
  buttonElements.push(buttonItem.element);
35418
35425
  } else {
@@ -35422,7 +35429,7 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
35422
35429
  visible: isVisible,
35423
35430
  size: "small",
35424
35431
  type: "text",
35425
- disabled: buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission,
35432
+ disabled: finalDisabled,
35426
35433
  icon: buttonItem.icon
35427
35434
  }, props.actionButtonsTooltipType === "styled" && {
35428
35435
  tooltip: buttonItem.hint
@@ -35449,6 +35456,13 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
35449
35456
  component: cellData.component,
35450
35457
  row: cellData.row
35451
35458
  }) : buttonItem.visible;
35459
+ var isDisabled = typeof buttonItem.disabled === "function" ? buttonItem.disabled({
35460
+ column: cellData.column,
35461
+ component: cellData.component,
35462
+ row: cellData.row
35463
+ }) : buttonItem.disabled;
35464
+ var permissionDisabled = buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission;
35465
+ var finalDisabled = isDisabled || permissionDisabled;
35452
35466
  buttonElements.push(React__default.createElement(OdsDataGrdiRowButton, Object.assign({
35453
35467
  key: "action-button-" + index,
35454
35468
  name: buttonItem.name,
@@ -35456,7 +35470,7 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
35456
35470
  visible: isVisible,
35457
35471
  size: "small",
35458
35472
  type: "text",
35459
- disabled: buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission,
35473
+ disabled: finalDisabled,
35460
35474
  icon: buttonItem.icon
35461
35475
  }, props.actionButtonsTooltipType === "styled" && {
35462
35476
  tooltip: buttonItem.hint
@@ -36346,13 +36360,20 @@ var OdsBatchEditDataGrid = function OdsBatchEditDataGrid(props) {
36346
36360
  component: cellData.component,
36347
36361
  row: cellData.row
36348
36362
  }) : buttonItem.visible;
36363
+ var isDisabled = typeof buttonItem.disabled === "function" ? buttonItem.disabled({
36364
+ column: cellData.column,
36365
+ component: cellData.component,
36366
+ row: cellData.row
36367
+ }) : buttonItem.disabled;
36368
+ var permissionDisabled = buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission;
36369
+ var finalDisabled = isDisabled || permissionDisabled;
36349
36370
  buttonElements.push(React__default.createElement(OdsDataGrdiRowButton, Object.assign({
36350
36371
  key: "action-button-" + index,
36351
36372
  hint: buttonItem.hint,
36352
36373
  visible: isVisible,
36353
36374
  size: "small",
36354
36375
  type: "text",
36355
- disabled: buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission,
36376
+ disabled: finalDisabled,
36356
36377
  icon: buttonItem.icon
36357
36378
  }, props.actionButtonsTooltipType === "styled" && {
36358
36379
  tooltip: buttonItem.hint
@@ -36378,6 +36399,13 @@ var OdsBatchEditDataGrid = function OdsBatchEditDataGrid(props) {
36378
36399
  component: cellData.component,
36379
36400
  row: cellData.row
36380
36401
  }) : buttonItem.visible;
36402
+ var isDisabled = typeof buttonItem.disabled === "function" ? buttonItem.disabled({
36403
+ column: cellData.column,
36404
+ component: cellData.component,
36405
+ row: cellData.row
36406
+ }) : buttonItem.disabled;
36407
+ var permissionDisabled = buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission;
36408
+ var finalDisabled = isDisabled || permissionDisabled;
36381
36409
  buttonElements.push(React__default.createElement(OdsDataGrdiRowButton, Object.assign({
36382
36410
  key: "action-button-" + index,
36383
36411
  name: buttonItem.name,
@@ -36385,7 +36413,7 @@ var OdsBatchEditDataGrid = function OdsBatchEditDataGrid(props) {
36385
36413
  visible: isVisible,
36386
36414
  size: "small",
36387
36415
  type: "text",
36388
- disabled: buttonItem.actionPermission === undefined ? false : !buttonItem.actionPermission,
36416
+ disabled: finalDisabled,
36389
36417
  icon: buttonItem.icon
36390
36418
  }, props.actionButtonsTooltipType === "styled" && {
36391
36419
  tooltip: buttonItem.hint
@@ -36459,6 +36487,9 @@ var OdsBatchEditDataGrid = function OdsBatchEditDataGrid(props) {
36459
36487
  if (((_props$edit = props.edit) === null || _props$edit === void 0 ? void 0 : _props$edit.mode) == "cell" && (_props$edit2 = props.edit) !== null && _props$edit2 !== void 0 && _props$edit2.allowUpdating && e.rowType == "data" && !e.column.allowEditing) {
36460
36488
  e.cellElement.classList.add("grid-cell-disable-colored");
36461
36489
  }
36490
+ if (props.handleCellPrepared) {
36491
+ props.handleCellPrepared(e);
36492
+ }
36462
36493
  };
36463
36494
  var onToolbarPreparing = function onToolbarPreparing(e) {
36464
36495
  if (props.toolbarButtonGroup && props.toolbarButtonGroup.length > 0) {