@acuteinfo/common-base 1.0.79 → 1.0.81
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/agGridTable/index.d.ts +35 -0
- package/dist/components/agGridTable/types.d.ts +24 -0
- package/dist/components/agGridTable/useGridTable.d.ts +26 -0
- package/dist/components/agGridTable/useTableContext.d.ts +2 -0
- package/dist/components/agGridTable/utils/attachYupschema.d.ts +10 -0
- package/dist/components/agGridTable/utils/helper.d.ts +22 -0
- package/dist/components/agGridTable/utils/transformAgGridMetadata.d.ts +4 -0
- package/dist/components/agGridTable/widgets/AutoCompleteCell.d.ts +3 -0
- package/dist/components/agGridTable/widgets/CommonComponents.d.ts +13 -0
- package/dist/components/agGridTable/widgets/CustomButtonCell.d.ts +3 -0
- package/dist/components/agGridTable/widgets/CustomCurrencyEditor.d.ts +2 -0
- package/dist/components/agGridTable/widgets/DatePickerCell.d.ts +3 -0
- package/dist/components/agGridTable/widgets/DisplayCell.d.ts +2 -0
- package/dist/components/agGridTable/widgets/DisplayCurrencyCell.d.ts +2 -0
- package/dist/components/agGridTable/widgets/DisplayDateCell.d.ts +2 -0
- package/dist/components/agGridTable/widgets/DisplaySelectCell.d.ts +2 -0
- package/dist/components/agGridTable/widgets/ErrorComponent.d.ts +4 -0
- package/dist/components/agGridTable/widgets/HeaderButtonGroup.d.ts +4 -0
- package/dist/components/agGridTable/widgets/NumberFormat.d.ts +3 -0
- package/dist/components/detailPopupGridData/GridDetailsWithHeader/detailsGridWithHeader.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/rollup.config.mjs +2 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CellKeyDownEvent, Column } from "ag-grid-community";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
type AgGridTableWrapperProps = {
|
|
5
|
+
autoSelectFirst?: boolean;
|
|
6
|
+
getGridApi: any;
|
|
7
|
+
components?: Record<string, any>;
|
|
8
|
+
gridConfig: any;
|
|
9
|
+
subLabel?: string;
|
|
10
|
+
onClickOnAdd?: () => void;
|
|
11
|
+
onCellValueChanged?: any;
|
|
12
|
+
context?: any;
|
|
13
|
+
onCellKeyDown?: any;
|
|
14
|
+
defaultColDef?: any;
|
|
15
|
+
stopEditingWhenCellsLoseFocus?: any;
|
|
16
|
+
suppressCellSelection?: any;
|
|
17
|
+
defaultView?: any;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
agGridProps: any;
|
|
20
|
+
hideHeader?: boolean;
|
|
21
|
+
updatePinnedBottomRow?: any;
|
|
22
|
+
handleCustomCellKeyDown?: (params: CellKeyDownEvent, lastColumn: Column) => Promise<void> | void;
|
|
23
|
+
gridContext?: any;
|
|
24
|
+
buttons?: any;
|
|
25
|
+
handleAddNewRow?: () => Promise<void> | void;
|
|
26
|
+
height?: any;
|
|
27
|
+
isNewButtonVisible?: boolean;
|
|
28
|
+
newButtonLabel?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const GridDataContext: React.Context<{
|
|
31
|
+
gridData: never[];
|
|
32
|
+
setGridData: (data: any) => void;
|
|
33
|
+
}>;
|
|
34
|
+
declare const AgGridTableWrapper: React.FC<AgGridTableWrapperProps>;
|
|
35
|
+
export { AgGridTableWrapper };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ColDef, ICellEditorParams } from "ag-grid-community";
|
|
2
|
+
export interface CustomColumnMeta extends Partial<ColDef> {
|
|
3
|
+
accessor: string;
|
|
4
|
+
columnName: string;
|
|
5
|
+
componentType?: ColDef["cellEditor"];
|
|
6
|
+
displayComponentType?: ColDef["cellRenderer"];
|
|
7
|
+
FormatProps?: ICellEditorParams;
|
|
8
|
+
className?: string;
|
|
9
|
+
headerTooltip?: string;
|
|
10
|
+
shouldExclude?: (params: any) => boolean;
|
|
11
|
+
postValidationSetCrossAccessorValues?: any;
|
|
12
|
+
isVisible?: boolean;
|
|
13
|
+
isReadOnly?: boolean | ((params: any) => boolean);
|
|
14
|
+
options?: any;
|
|
15
|
+
__EDIT__?: {
|
|
16
|
+
isReadOnly?: boolean;
|
|
17
|
+
};
|
|
18
|
+
__VIEW__?: {
|
|
19
|
+
isReadOnly?: boolean;
|
|
20
|
+
};
|
|
21
|
+
__NEW__?: {
|
|
22
|
+
isReadOnly?: boolean;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const useGridTable: (props: any) => {
|
|
3
|
+
gridApi: React.MutableRefObject<any>;
|
|
4
|
+
tableId: any;
|
|
5
|
+
allColumns: import("ag-grid-community").ColDef<any, any>[];
|
|
6
|
+
gridContext: any;
|
|
7
|
+
onGridReady: (parameters: any) => void;
|
|
8
|
+
onFirstDataRendered: (parameters: any) => void;
|
|
9
|
+
onCellKeyDown: (params: any) => Promise<void>;
|
|
10
|
+
onAddClick: () => void;
|
|
11
|
+
components: {
|
|
12
|
+
autocomplete: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
13
|
+
CustomButtonCellEditor: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
14
|
+
amountField: (props: any) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
NumberFormat: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
16
|
+
DatePickerCell: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
17
|
+
DisplayCurrencyCell: (params: any) => any;
|
|
18
|
+
DisplayDateCell: (params: any) => any;
|
|
19
|
+
DisplaySelectCell: (params: any) => any;
|
|
20
|
+
DisplayCell: (params: any) => any;
|
|
21
|
+
};
|
|
22
|
+
onCellEditingStopped: (params: any) => Promise<void>;
|
|
23
|
+
noDataComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
i18n: import("i18next").i18n;
|
|
25
|
+
};
|
|
26
|
+
export default useGridTable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface GridYupSchemaMetaDataType {
|
|
2
|
+
type: "string" | "number" | "boolean" | "date";
|
|
3
|
+
rules?: YupRulesType[];
|
|
4
|
+
}
|
|
5
|
+
interface YupRulesType {
|
|
6
|
+
name: string;
|
|
7
|
+
params: any[];
|
|
8
|
+
}
|
|
9
|
+
export declare const parseYupSchemaAndAttachMethod: (schemaValidation?: GridYupSchemaMetaDataType, node?: any, field?: string) => ((value: number | string | boolean | Date, node: any, field: any) => Promise<any>) | undefined;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const getAgGridSRNo: ({ rowIndex, agGridReact, data, node, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
rowIndex: any;
|
|
4
|
+
agGridReact: any;
|
|
5
|
+
data: any;
|
|
6
|
+
node: any;
|
|
7
|
+
}) => any;
|
|
8
|
+
declare const customCellAggFunc: (params: any) => number;
|
|
9
|
+
declare const parseDate: (dateValue: any) => Date | null;
|
|
10
|
+
declare const findLastDisplayColumn: (gridApi: any, params: any) => any;
|
|
11
|
+
declare const findFirstDisplayColumn: (gridApi: any, params: any) => any;
|
|
12
|
+
declare const getGridRowData: (gridApi: any) => any[];
|
|
13
|
+
declare const removeExistingRowData: (gridApi: any) => Promise<void>;
|
|
14
|
+
declare const dynamicRowHeight: (errors: any, params: any) => void;
|
|
15
|
+
declare const displayNumber: (num: any) => string | 0;
|
|
16
|
+
declare const lessThanDate: (factValue: any, jsonValue: any, options?: {
|
|
17
|
+
ignoreTime: boolean;
|
|
18
|
+
}) => boolean;
|
|
19
|
+
declare const setErrorMessage: (node: any, field: any, message?: string) => void;
|
|
20
|
+
declare const validateChequeDate: (params: any) => string | undefined;
|
|
21
|
+
declare const handleDeleteButtonClick: (params: any) => Promise<void>;
|
|
22
|
+
export { getAgGridSRNo, customCellAggFunc, parseDate, findLastDisplayColumn, findFirstDisplayColumn, getGridRowData, removeExistingRowData, dynamicRowHeight, displayNumber, lessThanDate, setErrorMessage, validateChequeDate, handleDeleteButtonClick, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const commonComponents: {
|
|
3
|
+
autocomplete: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
|
|
4
|
+
CustomButtonCellEditor: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
|
|
5
|
+
amountField: (props: any) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
NumberFormat: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
|
|
7
|
+
DatePickerCell: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
|
|
8
|
+
DisplayCurrencyCell: (params: any) => any;
|
|
9
|
+
DisplayDateCell: (params: any) => any;
|
|
10
|
+
DisplaySelectCell: (params: any) => any;
|
|
11
|
+
DisplayCell: (params: any) => any;
|
|
12
|
+
};
|
|
13
|
+
export { commonComponents };
|
package/dist/components/detailPopupGridData/GridDetailsWithHeader/detailsGridWithHeader.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DetailsGridWithHeaderArguType } from "./type";
|
|
2
2
|
export declare const useDialogStyles: (props?: any) => import("@mui/styles").ClassNameMap<"title" | "topScrollPaper" | "topPaperScrollBody">;
|
|
3
|
-
export declare const DetailsGridWithHeader: ({ metadata, ClosedEventCall, data, HeaderMetaData, HeaderData, ClickEventManage, children, isLoading, isError, ErrorMessage, actions, setData, setCurrentAction, mode, isEditableForm, refID, onSubmit, submitSecondAction, submitSecondButtonName, submitSecondButtonHide, submitSecondLoading, onFieldAction, formComponentPropStyles, dialogProps }: DetailsGridWithHeaderArguType) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const DetailsGridWithHeader: ({ metadata, ClosedEventCall, data, HeaderMetaData, HeaderData, ClickEventManage, children, isLoading, isError, ErrorMessage, actions, setData, setCurrentAction, mode, isEditableForm, refID, onSubmit, submitSecondAction, submitSecondButtonName, submitSecondButtonHide, submitSecondLoading, onFieldAction, formComponentPropStyles, dialogProps, }: DetailsGridWithHeaderArguType) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,3 +58,5 @@ export * from "./components/customNotistack";
|
|
|
58
58
|
export * from "./components/report/types";
|
|
59
59
|
export * from "./components/context/propertiesConfig/customProperties";
|
|
60
60
|
export { AuthContextProvider } from "./components/context/authContext/authContext";
|
|
61
|
+
export { AgGridTableWrapper } from "./components/agGridTable";
|
|
62
|
+
export { getAgGridSRNo, customCellAggFunc, parseDate, findLastDisplayColumn, findFirstDisplayColumn, getGridRowData, removeExistingRowData, dynamicRowHeight, displayNumber, lessThanDate, setErrorMessage, validateChequeDate, handleDeleteButtonClick, } from "./components/agGridTable/utils/helper";
|