@acuteinfo/common-base 1.0.20 → 1.0.22
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/common/hidden/hidden.d.ts +1 -0
- package/dist/components/custom/getCurrencySymbol.d.ts +1 -1
- package/dist/components/dataTable/stickyTableHead.d.ts +1 -1
- package/dist/components/dataTable/utils/attachCellComponentsToMetaData.d.ts +1 -1
- package/dist/components/dataTable/utils/sortColumnBySequence.d.ts +1 -1
- package/dist/components/dataTableStatic/utils/attachCombineValidationFns.d.ts +1 -1
- package/dist/components/dataTableStatic/utils/attachYupSchema.d.ts +1 -1
- package/dist/components/detailPopupGridData/GridDetailsWithHeader/type.d.ts +2 -2
- package/dist/components/dynamicForm/formWrapper.d.ts +2 -1
- package/dist/components/dynamicForm/types.d.ts +11 -5
- package/dist/components/formcomponent/filterform/formMeta.d.ts +2 -1
- package/dist/components/formcomponent/filterform/type.d.ts +21 -0
- package/dist/components/formcomponent/masterDetails/masterDetailsForm.d.ts +4 -2
- package/dist/components/report/gridParent.d.ts +2 -1
- package/dist/components/report/gridTable.d.ts +1 -1
- package/dist/components/report/types.d.ts +124 -0
- package/dist/components/tableCellComponents/ButtonRowCell.d.ts +1 -1
- package/dist/components/tableCellComponents/deleteRowCell.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ interface MyGridExtendedProps {
|
|
|
5
5
|
GridProps?: GridProps;
|
|
6
6
|
enableGrid: boolean;
|
|
7
7
|
setValueOnDependentFieldsChange?: any;
|
|
8
|
+
ignoreInSubmit?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export type MyHiddenFieldProps = UseFieldHookProps & MyGridExtendedProps;
|
|
10
11
|
declare const MyHiddenField: FC<MyHiddenFieldProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
3
|
ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
4
|
-
}, "
|
|
4
|
+
}, "className" | "style" | "classes" | "children" | "sx">, "classes"> & import("@mui/styles").StyledComponentProps<"root"> & object>;
|
|
@@ -4,7 +4,7 @@ export declare const attachCellComponentsToMetaData: (columns: GridColumnType[])
|
|
|
4
4
|
columnName: string;
|
|
5
5
|
accessor: string;
|
|
6
6
|
sequence: number;
|
|
7
|
-
alignment?: "
|
|
7
|
+
alignment?: "center" | "left" | "right" | undefined;
|
|
8
8
|
TableCellProps?: any;
|
|
9
9
|
disableSortBy?: boolean | undefined;
|
|
10
10
|
width?: number | undefined;
|
|
@@ -4,7 +4,7 @@ export declare const sortColumnsBySequence: (columns: GridColumnType[]) => {
|
|
|
4
4
|
accessor: string;
|
|
5
5
|
componentType: import("../../tableCellComponents").CellComponentType;
|
|
6
6
|
Cell?: any;
|
|
7
|
-
alignment?: "
|
|
7
|
+
alignment?: "center" | "left" | "right" | undefined;
|
|
8
8
|
TableCellProps?: any;
|
|
9
9
|
disableSortBy?: boolean | undefined;
|
|
10
10
|
width?: number | undefined;
|
|
@@ -7,7 +7,7 @@ export declare const attachcombinedValidationFns: (columns: GridColumnType[]) =>
|
|
|
7
7
|
sequence: number;
|
|
8
8
|
componentType: import("../../tableCellComponents").CellComponentType;
|
|
9
9
|
Cell?: any;
|
|
10
|
-
alignment?: "
|
|
10
|
+
alignment?: "center" | "left" | "right" | undefined;
|
|
11
11
|
TableCellProps?: any;
|
|
12
12
|
width?: number | undefined;
|
|
13
13
|
maxWidth?: number | undefined;
|
|
@@ -6,7 +6,7 @@ export declare const attachYupSchemaValidator: (columns: GridColumnType[]) => {
|
|
|
6
6
|
sequence: number;
|
|
7
7
|
componentType: import("../../tableCellComponents").CellComponentType;
|
|
8
8
|
Cell?: any;
|
|
9
|
-
alignment?: "
|
|
9
|
+
alignment?: "center" | "left" | "right" | undefined;
|
|
10
10
|
TableCellProps?: any;
|
|
11
11
|
width?: number | undefined;
|
|
12
12
|
maxWidth?: number | undefined;
|
|
@@ -7,7 +7,7 @@ export interface DetailsGridWithHeaderArguType {
|
|
|
7
7
|
data: any;
|
|
8
8
|
HeaderMetaData: FilterFormMetaType;
|
|
9
9
|
HeaderData: any;
|
|
10
|
-
ClickEventManage:
|
|
10
|
+
ClickEventManage: (data: any, visibleColumn: any) => void;
|
|
11
11
|
isLoading?: boolean;
|
|
12
12
|
isError?: boolean;
|
|
13
13
|
ErrorMessage?: string;
|
|
@@ -19,7 +19,7 @@ export interface DetailsGridWithHeaderArguType {
|
|
|
19
19
|
refID?: any;
|
|
20
20
|
onSubmit?: Function;
|
|
21
21
|
children?: any;
|
|
22
|
-
submitSecondAction?: any;
|
|
22
|
+
submitSecondAction?: (data: any, visibleColumn: any) => void;
|
|
23
23
|
submitSecondButtonName?: string;
|
|
24
24
|
submitSecondButtonHide?: boolean;
|
|
25
25
|
submitSecondLoading?: boolean;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { FormWrapperProps } from "./types";
|
|
3
|
+
export declare const FormWrapper: import("react").ForwardRefExoticComponent<FormWrapperProps & import("react").RefAttributes<any>>;
|
|
@@ -38,7 +38,7 @@ export interface FormMetaDataType {
|
|
|
38
38
|
resetFieldOnUnmount: boolean;
|
|
39
39
|
validationRun: "onBlur" | "onChange" | "all";
|
|
40
40
|
render: FormRenderConfigType;
|
|
41
|
-
componentProps
|
|
41
|
+
componentProps?: ComponentTypeProps;
|
|
42
42
|
formState?: any;
|
|
43
43
|
flow?: UserFlowType[];
|
|
44
44
|
submitAction?: string;
|
|
@@ -114,17 +114,23 @@ export interface FormWrapperProps {
|
|
|
114
114
|
initialValues?: InitialValuesType;
|
|
115
115
|
onSubmitHandler: SubmitFnType;
|
|
116
116
|
hidden?: boolean;
|
|
117
|
-
displayMode?: "new" | "view" | "edit";
|
|
117
|
+
displayMode?: "new" | "view" | "edit" | (string & Record<never, never>) | null;
|
|
118
118
|
hideTitleBar?: boolean;
|
|
119
119
|
hideDisplayModeInTitle?: boolean;
|
|
120
120
|
formStyle?: CSSProperties;
|
|
121
121
|
controlsAtBottom?: boolean;
|
|
122
|
-
formState?:
|
|
122
|
+
formState?: {
|
|
123
|
+
[key: string]: any;
|
|
124
|
+
};
|
|
123
125
|
hideHeader?: boolean;
|
|
124
126
|
onFormDataChange?: any;
|
|
125
|
-
subHeaderLabel?: string;
|
|
126
|
-
subHeaderLabelStyle?: CSSProperties;
|
|
127
127
|
setDataOnFieldChange?: (action: string, payload: any) => void;
|
|
128
|
+
defaultActiveStep?: number;
|
|
129
|
+
containerstyle?: CSSProperties;
|
|
130
|
+
onFormButtonClickHandel?: (id: any, dependentFields?: any) => void;
|
|
131
|
+
subHeaderLabel?: string;
|
|
132
|
+
subHeaderLabelStyle?: string;
|
|
133
|
+
children?: ReactNode | Function;
|
|
128
134
|
}
|
|
129
135
|
export interface FormProps {
|
|
130
136
|
fields: GroupWiseRenderedFieldsType;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { FormComponentViewProps } from "./type";
|
|
3
|
+
export declare const FormComponentView: import("react").ForwardRefExoticComponent<FormComponentViewProps & import("react").RefAttributes<any>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SxProps } from "@mui/material";
|
|
1
2
|
import { OptionsProps, OptionsFn } from "components/common/types";
|
|
2
3
|
import { NumericFormatProps } from "react-number-format";
|
|
3
4
|
export interface FiltergridConfig {
|
|
@@ -50,3 +51,23 @@ export interface FilterFormMetaType {
|
|
|
50
51
|
initialData?: any;
|
|
51
52
|
initialVisibleColumnData?: any;
|
|
52
53
|
}
|
|
54
|
+
export interface FormComponentViewProps {
|
|
55
|
+
finalMetaData: FilterFormMetaType;
|
|
56
|
+
onAction: (data: any, visibleColumn: any) => void;
|
|
57
|
+
loading: boolean;
|
|
58
|
+
data: any;
|
|
59
|
+
submitSecondButtonHide?: boolean;
|
|
60
|
+
submitSecondButtonName?: string;
|
|
61
|
+
submitSecondLoading?: boolean;
|
|
62
|
+
submitSecondAction?: (data: any, visibleColumn: any) => void;
|
|
63
|
+
submitSecondValidtion?: boolean;
|
|
64
|
+
onFieldAction?: (name: string, value: any) => void;
|
|
65
|
+
propStyles?: {
|
|
66
|
+
titleStyle?: SxProps;
|
|
67
|
+
toolbarStyles?: SxProps;
|
|
68
|
+
IconButtonStyle?: {
|
|
69
|
+
variant: "default" | "error" | "info" | "inherit" | "primary" | "secondary" | "success" | "warning";
|
|
70
|
+
};
|
|
71
|
+
paperStyle?: SxProps;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -9,7 +9,7 @@ export interface MasterDetailsArgumentType {
|
|
|
9
9
|
isError?: boolean;
|
|
10
10
|
errorObj?: any;
|
|
11
11
|
handelActionEvent?: any;
|
|
12
|
-
formStyle?:
|
|
12
|
+
formStyle?: CSSProperties;
|
|
13
13
|
isNewRow?: boolean | null;
|
|
14
14
|
isLoading?: boolean;
|
|
15
15
|
onSubmitData?: Function;
|
|
@@ -22,7 +22,9 @@ export interface MasterDetailsArgumentType {
|
|
|
22
22
|
hideHeader?: boolean;
|
|
23
23
|
onFormDataChange?: any;
|
|
24
24
|
isDetailHide?: boolean;
|
|
25
|
-
formState?:
|
|
25
|
+
formState?: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
26
28
|
setDataOnFieldChange?: (action: string, payload: any) => void;
|
|
27
29
|
isDetailRowRequire?: boolean;
|
|
28
30
|
}
|
|
@@ -31,7 +31,7 @@ interface GridTableType {
|
|
|
31
31
|
defaultSortOrder?: any;
|
|
32
32
|
defaultHiddenColumns?: any;
|
|
33
33
|
enablePagination?: boolean;
|
|
34
|
-
retrievalComponent?: RetrievalParametersProps
|
|
34
|
+
retrievalComponent?: React.ComponentType<RetrievalParametersProps>;
|
|
35
35
|
openDrawerFilter?: boolean;
|
|
36
36
|
onDoubleClickAction?: Function;
|
|
37
37
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { currencySymbol } from "components/custom/getCurrencySymbol";
|
|
2
|
+
import { ComponentType } from "react";
|
|
1
3
|
export interface FilterColumnType {
|
|
2
4
|
Filter?: any;
|
|
3
5
|
filterComponentType?: "valueFilter" | "valueDateFilter" | "rangeFilter" | "optionsFilter" | "multiValueFilter";
|
|
@@ -15,3 +17,125 @@ export interface RetrievalParametersProps {
|
|
|
15
17
|
loginState?: any;
|
|
16
18
|
classes?: any;
|
|
17
19
|
}
|
|
20
|
+
export interface ReportColumnsType {
|
|
21
|
+
/**
|
|
22
|
+
* Column name to display
|
|
23
|
+
*/
|
|
24
|
+
columnName: string;
|
|
25
|
+
/**
|
|
26
|
+
* Unique id matching api key of that columns
|
|
27
|
+
*/
|
|
28
|
+
accessor: string;
|
|
29
|
+
/**
|
|
30
|
+
* Column width to set in numbers
|
|
31
|
+
*/
|
|
32
|
+
width?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Specify type of cell
|
|
35
|
+
*/
|
|
36
|
+
Cell?: ComponentType<any>;
|
|
37
|
+
Filter?: ComponentType<any>;
|
|
38
|
+
/**
|
|
39
|
+
* cell type
|
|
40
|
+
*/
|
|
41
|
+
type?: string;
|
|
42
|
+
/**
|
|
43
|
+
* custom column filtering function
|
|
44
|
+
* @param rows all grid row data
|
|
45
|
+
* @param accessor current accessor in array
|
|
46
|
+
* @param inputValue user input value
|
|
47
|
+
* @returns filtered result in array
|
|
48
|
+
*/
|
|
49
|
+
filter?: (rows: any, accessor: string[], inputValue: string) => any[];
|
|
50
|
+
/**
|
|
51
|
+
* Displays amount without currency symbol
|
|
52
|
+
*/
|
|
53
|
+
isTotalWithoutCurrency?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Displays amount with currency symbol
|
|
56
|
+
*/
|
|
57
|
+
isTotalWithCurrency?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Displays amount with currency symbol
|
|
60
|
+
*/
|
|
61
|
+
isVisibleCurrSymbol?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Specify currency symbol to display.
|
|
64
|
+
*
|
|
65
|
+
* Either use currency code like INR or specify column accessor to refer for currency code.
|
|
66
|
+
*/
|
|
67
|
+
currencyRefColumn?: keyof typeof currencySymbol | (string & Record<never, never>);
|
|
68
|
+
isCurrencyCode?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Specify the position of currency symbol
|
|
71
|
+
* @default "start"
|
|
72
|
+
*/
|
|
73
|
+
currencySymbolPosition?: "start" | "end";
|
|
74
|
+
/**
|
|
75
|
+
* Specify alignment of cell content
|
|
76
|
+
* @default "left"
|
|
77
|
+
*/
|
|
78
|
+
alignment?: "left" | "center" | "right";
|
|
79
|
+
/**
|
|
80
|
+
* Set true to hide column
|
|
81
|
+
*/
|
|
82
|
+
isHiddenColumn?: boolean;
|
|
83
|
+
isDisplayValueTotal?: boolean;
|
|
84
|
+
DisplayValueLabel?: {
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface ReportFilterProps {
|
|
89
|
+
accessor: string;
|
|
90
|
+
columnName: string;
|
|
91
|
+
filterComponentType: "rangeFilter" | "valueFilter" | "optionsFilter" | "valueDateFilter" | "multiValueFilter";
|
|
92
|
+
filterProps?: {
|
|
93
|
+
type?: "date" | "amount" | "number" | "value";
|
|
94
|
+
options?: any;
|
|
95
|
+
};
|
|
96
|
+
gridProps: {
|
|
97
|
+
xs?: number;
|
|
98
|
+
sm?: number;
|
|
99
|
+
md?: number;
|
|
100
|
+
lg?: number;
|
|
101
|
+
xl?: number;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export interface ReportMetaDataType {
|
|
105
|
+
title: string;
|
|
106
|
+
disableGroupBy?: boolean | "Y" | "N";
|
|
107
|
+
hideFooter?: boolean | "Y" | "N";
|
|
108
|
+
hideAmountIn?: boolean | "Y" | "N";
|
|
109
|
+
autoFetch?: boolean;
|
|
110
|
+
filters?: ReportFilterProps[];
|
|
111
|
+
retrievalType?: string;
|
|
112
|
+
columns: ReportColumnsType[];
|
|
113
|
+
groupBy?: string[];
|
|
114
|
+
enableServerSidePagination?: boolean;
|
|
115
|
+
}
|
|
116
|
+
export interface ReportGridProps {
|
|
117
|
+
metaData: any;
|
|
118
|
+
maxHeight?: number;
|
|
119
|
+
initialState?: any;
|
|
120
|
+
title: string;
|
|
121
|
+
options?: any;
|
|
122
|
+
hideFooter?: boolean | "Y" | "N";
|
|
123
|
+
showSerialNoColumn?: boolean | "Y" | "N";
|
|
124
|
+
onClose?: Function | null;
|
|
125
|
+
reportName?: string;
|
|
126
|
+
dataFetcher: Function;
|
|
127
|
+
autoFetch?: boolean;
|
|
128
|
+
hideAmountIn?: boolean | "Y" | "N";
|
|
129
|
+
reportID: string;
|
|
130
|
+
retrievalType?: string;
|
|
131
|
+
onClickActionEvent?: (index: number | string, id: string, data: any, queryFilters: any) => void;
|
|
132
|
+
otherAPIRequestPara?: any;
|
|
133
|
+
hideHeader?: boolean | "Y" | "N";
|
|
134
|
+
hideShowFiltersSwitch?: boolean | "Y" | "N";
|
|
135
|
+
defaultFilter?: any;
|
|
136
|
+
hideStatusBar?: boolean | "Y" | "N";
|
|
137
|
+
retrievalComponent?: React.ComponentType<RetrievalParametersProps>;
|
|
138
|
+
openDrawerFilter?: boolean;
|
|
139
|
+
onDoubleClickAction?: Function;
|
|
140
|
+
enableCaching?: boolean;
|
|
141
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ButtonRowCell: (props: any) => import("react/jsx-runtime").JSX.Element
|
|
1
|
+
export declare const ButtonRowCell: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DeleteRowButton: (props: any) => import("react/jsx-runtime").JSX.Element
|
|
1
|
+
export declare const DeleteRowButton: (props: any) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./components/custom/messageBoxWrapper";
|
|
|
23
23
|
export * from "./components/custom/popupContext";
|
|
24
24
|
export * from "./components/custom/popupMessage";
|
|
25
25
|
export * from "./components/custom/popupReqest";
|
|
26
|
+
export * from "./components/custom/getCurrencySymbol";
|
|
26
27
|
export * from "./registry/rulesEngine";
|
|
27
28
|
export * from "./components/formcomponent";
|
|
28
29
|
export * from "./components/formcomponent/masterDetails/types";
|
|
@@ -53,6 +54,6 @@ export * from "./components/report";
|
|
|
53
54
|
export * from "./components/report/serverReport/ReportWrapper";
|
|
54
55
|
export * from "./components/utils/reportExport/context/exportWorkerContext";
|
|
55
56
|
export * from "./components/customNotistack";
|
|
56
|
-
export
|
|
57
|
+
export * from "./components/report/types";
|
|
57
58
|
export * from "./components/context/propertiesConfig/customProperties";
|
|
58
59
|
export { AuthContextProvider } from "./components/context/authContext/authContext";
|