@acuteinfo/common-base 1.0.44 → 1.0.46
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/dataTableStatic/grid.d.ts +1 -1
- package/dist/components/dataTableStatic/types.d.ts +35 -0
- package/dist/components/dataTableStatic/utils/attachCombineValidationFns.d.ts +12 -0
- package/dist/components/dataTableStatic/utils/attachYupSchema.d.ts +12 -0
- package/dist/components/tableCellComponents/customIconCellRenderer.d.ts +1 -0
- package/dist/components/tableCellComponents/footerCell.d.ts +4 -1
- package/dist/components/tableCellComponents/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DataGrid: ({ label, dense, columns, data, loading, getRowId, defaultColumn, allowColumnReordering, disableSorting, defaultHiddenColumns, defaultSortOrder, defaultGroupBy, multipleActions, singleActions, doubleClickAction, alwaysAvailableAction, setGridAction, updateGridData, hideFooter, hideHeader, disableGlobalFilter, disableGroupBy, disableLoader, containerHeight, gridProps, pageSizes, defaultPageSize, enablePagination, allowRowSelection, hideNoDataFound, refetchData, hiddenFlag, autoRefreshInterval, allowFilter, filterMeta, allowColumnHiding, defaultFilter, isCusrsorFocused, onButtonActionHandel, controlsAtBottom, actionContextAtBottom, headerToolbarStyle, disableMultipleRowSelect, columnHeaderStyle, variant, enablePaginationInput, defaultSelectedRowId, footerNote, paginationText, searchPlaceholder, enableExport, subGridLabel, hideActionBar, finalMetaData }: {
|
|
1
|
+
export declare const DataGrid: ({ label, dense, columns, data, loading, getRowId, defaultColumn, allowColumnReordering, disableSorting, defaultHiddenColumns, defaultSortOrder, defaultGroupBy, multipleActions, singleActions, doubleClickAction, alwaysAvailableAction, setGridAction, updateGridData, hideFooter, hideHeader, disableGlobalFilter, disableGroupBy, disableLoader, containerHeight, gridProps, pageSizes, defaultPageSize, enablePagination, allowRowSelection, hideNoDataFound, refetchData, hiddenFlag, autoRefreshInterval, allowFilter, filterMeta, allowColumnHiding, defaultFilter, isCusrsorFocused, onButtonActionHandel, controlsAtBottom, actionContextAtBottom, headerToolbarStyle, disableMultipleRowSelect, columnHeaderStyle, variant, enablePaginationInput, defaultSelectedRowId, footerNote, paginationText, searchPlaceholder, enableExport, subGridLabel, hideActionBar, finalMetaData, }: {
|
|
2
2
|
label: any;
|
|
3
3
|
dense: any;
|
|
4
4
|
columns: any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SxProps } from "@mui/material";
|
|
2
2
|
import { ActionTypes } from "components/dataTable/types";
|
|
3
3
|
import { CellComponentType } from "components/tableCellComponents";
|
|
4
|
+
import { ReactNode } from "react";
|
|
4
5
|
export interface GridColumnType {
|
|
5
6
|
columnName: string;
|
|
6
7
|
accessor: string;
|
|
@@ -105,6 +106,40 @@ export interface GridColumnType {
|
|
|
105
106
|
* @default false
|
|
106
107
|
*/
|
|
107
108
|
enableColumnSelection?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Function to set customized footer value
|
|
111
|
+
* @param total sum of current column
|
|
112
|
+
* @param rows grid data
|
|
113
|
+
* @returns number[] | string[] | string | number
|
|
114
|
+
*/
|
|
115
|
+
setFooterValue?: (total: number, rows: any) => number[] | string[] | string | number;
|
|
116
|
+
/**
|
|
117
|
+
* Set label of footer label for displaying total
|
|
118
|
+
* @default "Total"
|
|
119
|
+
*/
|
|
120
|
+
footerLabel?: string;
|
|
121
|
+
/**
|
|
122
|
+
* For customized footer value having more than one calculation.
|
|
123
|
+
*
|
|
124
|
+
* Need to use setFooterValue function returning multiple values that replaces {0}, {1}, ...{n}
|
|
125
|
+
*
|
|
126
|
+
* For e.g. Sum {0} Average {1}
|
|
127
|
+
*/
|
|
128
|
+
footerIsMultivalue?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Set custom icon and tooltip for customIconCell component on active state
|
|
131
|
+
*/
|
|
132
|
+
activeIcon?: {
|
|
133
|
+
icon: ReactNode;
|
|
134
|
+
tooltip?: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Set custom icon and tooltip for customIconCell component on inActive state
|
|
138
|
+
*/
|
|
139
|
+
inActiveIcon?: {
|
|
140
|
+
icon: ReactNode;
|
|
141
|
+
tooltip?: string;
|
|
142
|
+
};
|
|
108
143
|
}
|
|
109
144
|
export interface GridConfigType {
|
|
110
145
|
dense?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { GridColumnType } from "../types";
|
|
2
3
|
export declare const combineAndRunValidation: (schemaValidation: any, validation: any, authState: any) => (value: any, row: any, prev: any, next: any) => Promise<any>;
|
|
3
4
|
export declare const attachcombinedValidationFns: (columns: GridColumnType[], authState: any) => {
|
|
@@ -69,4 +70,15 @@ export declare const attachcombinedValidationFns: (columns: GridColumnType[], au
|
|
|
69
70
|
currencySymbolPosition?: "end" | "start" | undefined;
|
|
70
71
|
showDeleteIconOnly?: boolean | undefined;
|
|
71
72
|
enableColumnSelection?: boolean | undefined;
|
|
73
|
+
setFooterValue?: ((total: number, rows: any) => string | number | string[] | number[]) | undefined;
|
|
74
|
+
footerLabel?: string | undefined;
|
|
75
|
+
footerIsMultivalue?: boolean | undefined;
|
|
76
|
+
activeIcon?: {
|
|
77
|
+
icon: import("react").ReactNode;
|
|
78
|
+
tooltip?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
inActiveIcon?: {
|
|
81
|
+
icon: import("react").ReactNode;
|
|
82
|
+
tooltip?: string | undefined;
|
|
83
|
+
} | undefined;
|
|
72
84
|
}[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { GridColumnType } from "../types";
|
|
2
3
|
export declare const attachYupSchemaValidator: (columns: GridColumnType[]) => {
|
|
3
4
|
schemaValidation: ((value: number | string | boolean | Date) => Promise<any>) | undefined;
|
|
@@ -69,4 +70,15 @@ export declare const attachYupSchemaValidator: (columns: GridColumnType[]) => {
|
|
|
69
70
|
currencySymbolPosition?: "end" | "start" | undefined;
|
|
70
71
|
showDeleteIconOnly?: boolean | undefined;
|
|
71
72
|
enableColumnSelection?: boolean | undefined;
|
|
73
|
+
setFooterValue?: ((total: number, rows: any) => string | number | string[] | number[]) | undefined;
|
|
74
|
+
footerLabel?: string | undefined;
|
|
75
|
+
footerIsMultivalue?: boolean | undefined;
|
|
76
|
+
activeIcon?: {
|
|
77
|
+
icon: import("react").ReactNode;
|
|
78
|
+
tooltip?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
inActiveIcon?: {
|
|
81
|
+
icon: import("react").ReactNode;
|
|
82
|
+
tooltip?: string | undefined;
|
|
83
|
+
} | undefined;
|
|
72
84
|
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CustomIconRowCell: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export declare const FooterCell: ({ rows, column: { id: columnName, isDisplayTotal, totalDecimalCount, isSelectedTotal, }, }: {
|
|
1
|
+
export declare const FooterCell: ({ rows, column: { id: columnName, isDisplayTotal, totalDecimalCount, isSelectedTotal, setFooterValue, footerLabel, footerIsMultivalue, }, }: {
|
|
2
2
|
rows: any;
|
|
3
3
|
column: {
|
|
4
4
|
id: any;
|
|
5
5
|
isDisplayTotal?: boolean | undefined;
|
|
6
6
|
totalDecimalCount: any;
|
|
7
7
|
isSelectedTotal?: boolean | undefined;
|
|
8
|
+
setFooterValue: any;
|
|
9
|
+
footerLabel?: string | undefined;
|
|
10
|
+
footerIsMultivalue?: boolean | undefined;
|
|
8
11
|
};
|
|
9
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CellComponentType = "currency" | "date" | "default" | "icondefault" | "action" | "editableAutocomplete" | "editableSelect" | "editableTextField" | "editableMaskInputField" | "editableNumberFormat" | "dateDiffere" | "deleteRowCell" | "buttonRowCell" | "percentageDiff" | "editableCheckbox" | "editableDatetimePicker" | "editableDatePicker" | "editableNumberFormatLessValidation" | "disableSelect";
|
|
1
|
+
export type CellComponentType = "currency" | "date" | "default" | "icondefault" | "action" | "editableAutocomplete" | "editableSelect" | "editableTextField" | "editableMaskInputField" | "editableNumberFormat" | "dateDiffere" | "deleteRowCell" | "buttonRowCell" | "percentageDiff" | "editableCheckbox" | "editableDatetimePicker" | "editableDatePicker" | "editableNumberFormatLessValidation" | "disableSelect" | "customIconCell";
|