@acuteinfo/common-base 1.0.105 → 1.0.106

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.
@@ -0,0 +1,6 @@
1
+ declare const GlobalFilter: ({ data, setGlobalFilterData, visibleKeys }: {
2
+ data: any;
3
+ setGlobalFilterData: any;
4
+ visibleKeys: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default GlobalFilter;
@@ -0,0 +1,3 @@
1
+ import "./style.css";
2
+ import { LayoutReportGridType } from "./types";
3
+ export declare const LayoutReportGrid: ({ columns, data, originalData, loading, metaData, hideFooter, }: LayoutReportGridType) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { LayoutReportTypes } from "./types";
3
+ declare const LayoutReport: React.FC<LayoutReportTypes>;
4
+ export { LayoutReport };
@@ -0,0 +1,2 @@
1
+ import { TableComponents } from "react-virtuoso";
2
+ export declare const VirtuosoTableComponents: TableComponents<any>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A custom hook that returns a debounced version of the input value.
3
+ * The debounced value updates after a specified delay, which is useful
4
+ * for scenarios like search inputs where you want to limit the number
5
+ * of updates or API calls while the user is typing.
6
+ *
7
+ * @param {string} value - The input value that you want to debounce.
8
+ * @param {number} [delay=500] - The amount of time (in milliseconds) to wait
9
+ * before updating the debounced value. Defaults to 500 milliseconds.
10
+ * @returns {string} The debounced value that updates after the specified delay.
11
+ */
12
+ export declare const useDebouncedValue: (value: string, delay?: number) => string;
@@ -0,0 +1 @@
1
+ export { LayoutReport } from "./LayoutReportParent";
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const StickyTableHead: import("react").JSXElementConstructor<Omit<import("@mui/material/TableHead").TableHeadOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & {
3
+ ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
4
+ }, "children" | "style" | "classes" | "className" | "sx">, "classes"> & import("@mui/styles").StyledComponentProps<"root"> & object>;
@@ -0,0 +1,93 @@
1
+ /// <reference types="react" />
2
+ import { currencySymbol } from "components/custom/getCurrencySymbol";
3
+ import { RetrievalParametersProps } from "components/report/types";
4
+ export interface GroupReportColumnMeta {
5
+ accessor: string;
6
+ columnName: string;
7
+ componentType?: "currency" | "number" | "date" | "dateTime" | "time" | "default";
8
+ width?: number;
9
+ maxWidth?: number;
10
+ minWidth?: number;
11
+ isVisible?: boolean;
12
+ alignment?: "left" | "center" | "right";
13
+ showTooltip?: boolean;
14
+ color?: (rowVal: string, row: Record<string, any>) => string;
15
+ dateFormat?: string;
16
+ decimalCount?: number;
17
+ currencyFormat?: string;
18
+ symbolPosition?: "start" | "end";
19
+ currencySymbol?: keyof typeof currencySymbol;
20
+ isVisibleCurrSymbol?: boolean;
21
+ isDisplayTotal?: boolean;
22
+ }
23
+ export interface LayoutReportTypes {
24
+ title: string;
25
+ reportID: string;
26
+ dataFetcher: Function;
27
+ columns: GroupReportColumnMeta[];
28
+ metaData: GroupReportMetaDataType;
29
+ groups: {
30
+ groupName: string;
31
+ accessor: string;
32
+ }[];
33
+ hideHeader?: boolean;
34
+ hideFooter?: boolean;
35
+ autoFetch?: boolean;
36
+ otherAPIRequestPara?: Record<string, any>;
37
+ retrievalComponent?: React.ComponentType<RetrievalParametersProps>;
38
+ retrievalType?: string;
39
+ onClose?: VoidFunction;
40
+ allowRefetch?: boolean;
41
+ }
42
+ export interface GroupRowType {
43
+ group: any;
44
+ level: number;
45
+ columns: GroupReportColumnMeta[];
46
+ columnWidths: Record<any, any>;
47
+ }
48
+ interface ReportFilterProps {
49
+ accessor: string;
50
+ columnName: string;
51
+ filterComponentType: "rangeFilter" | "valueFilter" | "optionsFilter" | "valueDateFilter" | "multiValueFilter";
52
+ filterProps?: {
53
+ type?: "date" | "amount" | "number" | "value";
54
+ options?: any;
55
+ };
56
+ gridProps: {
57
+ xs?: number;
58
+ sm?: number;
59
+ md?: number;
60
+ lg?: number;
61
+ xl?: number;
62
+ };
63
+ }
64
+ export interface GroupReportMetaDataType {
65
+ title: string;
66
+ hideHeader?: boolean;
67
+ hideFooter?: boolean;
68
+ gridConfig: {
69
+ minHeight: string | number;
70
+ maxHeight: string | number;
71
+ };
72
+ columns: GroupReportColumnMeta[];
73
+ groups: {
74
+ groupName: string;
75
+ accessor: string;
76
+ }[];
77
+ filters?: ReportFilterProps[];
78
+ retrievalType?: string;
79
+ autoFetch?: boolean;
80
+ }
81
+ export interface LayoutReportGridType {
82
+ columns: GroupReportColumnMeta[];
83
+ data: {
84
+ [key: string]: any;
85
+ }[];
86
+ loading?: boolean;
87
+ metaData: GroupReportMetaDataType;
88
+ originalData: {
89
+ [key: string]: any;
90
+ }[];
91
+ hideFooter?: boolean;
92
+ }
93
+ export {};
@@ -0,0 +1,7 @@
1
+ import { GroupReportColumnMeta } from "./types";
2
+ import { CustomProperties } from "components/context/propertiesConfig/customProperties";
3
+ export declare const createNestedGroups: (data: any, keys: any) => any;
4
+ export declare const getFormattedDate: (date: any, dateFormat: string) => any;
5
+ export declare const getFormattedValue: (value: string, config: GroupReportColumnMeta, customProperties: CustomProperties) => any;
6
+ export declare const calculateTotal: (data: Record<string, any>[], col: GroupReportColumnMeta, customProperties: CustomProperties) => string;
7
+ export declare const calculateGroupTotal: (group: any, col: GroupReportColumnMeta) => any;
@@ -1,7 +1,8 @@
1
- export declare const AmountRange: ({ filterValue, id, columnName, gridProps, dispatch, }: {
1
+ export declare const AmountRange: ({ filterValue, id, columnName, gridProps, dispatch, filterProps, }: {
2
2
  filterValue: any;
3
3
  id: any;
4
4
  columnName: any;
5
5
  gridProps: any;
6
6
  dispatch: any;
7
+ filterProps: any;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
- export declare const NumberRange: ({ filterValue, id, columnName, gridProps, dispatch, }: {
1
+ export declare const NumberRange: ({ filterValue, id, columnName, gridProps, dispatch, filterProps, }: {
2
2
  filterValue: any;
3
3
  id: any;
4
4
  columnName: any;
5
5
  gridProps: any;
6
6
  dispatch: any;
7
+ filterProps: any;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
- export declare const ValueRange: ({ filterValue, id, columnName, gridProps, dispatch, }: {
1
+ export declare const ValueRange: ({ filterValue, id, columnName, gridProps, dispatch, filterProps, }: {
2
2
  filterValue: any;
3
3
  id: any;
4
4
  columnName: any;
5
5
  gridProps: any;
6
6
  dispatch: any;
7
+ filterProps: any;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -61,3 +61,5 @@ export { AuthContextProvider } from "./components/context/authContext/authContex
61
61
  export { AgGridTableWrapper } from "./components/agGridTable";
62
62
  export { getAgGridSRNo, customCellAggFunc, parseDate, findLastDisplayColumn, findFirstDisplayColumn, getGridRowData, removeExistingRowData, dynamicRowHeight, displayNumber, lessThanDate, setErrorMessage, handleDeleteButtonClick, } from "./components/agGridTable/utils/helper";
63
63
  export type { AgGridMetaData } from "./components/agGridTable/types";
64
+ export { LayoutReport } from "./components/layoutReport/LayoutReportParent";
65
+ export type { GroupReportMetaDataType, LayoutReportTypes, } from "./components/layoutReport/types";