@acuteinfo/common-base 1.2.96 → 1.2.98
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/radio/radio.d.ts +4 -0
- package/dist/components/custom/getCurrencySymbol.d.ts +4 -0
- package/dist/components/custom-hooks/index.d.ts +1 -1
- package/dist/components/custom-hooks/useNumericFormatConfig.d.ts +9 -1
- package/dist/components/dataTable/headerCellWrapper.d.ts +1 -0
- package/dist/components/dataTableStatic/utils/attachCombineValidationFns.d.ts +1 -1
- package/dist/components/dataTableStatic/utils/attachYupSchema.d.ts +1 -1
- package/dist/components/report/gridParent.d.ts +3 -3
- package/dist/components/report/gridTable.d.ts +1 -0
- package/dist/components/report/serverReport/ReportWrapper.d.ts +14 -3
- package/dist/components/report/serverReport/serverGridTable.d.ts +12 -1
- package/dist/components/report/types.d.ts +23 -0
- package/dist/components/styledComponent/tab/tab.d.ts +1 -1
- package/dist/components/styledComponent/tabs/tabs.d.ts +2 -2
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -25,6 +25,10 @@ interface MyCheckboxExtendedProps {
|
|
|
25
25
|
GridProps?: GridProps;
|
|
26
26
|
enableGrid: boolean;
|
|
27
27
|
CircularProgressProps?: CircularProgressProps;
|
|
28
|
+
setFieldLabel?: (dependentFields?: any, value?: any) => {
|
|
29
|
+
label: string;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
} | null | undefined;
|
|
28
32
|
}
|
|
29
33
|
export type MyRadioAllProps = Merge<MyRadioMixedProps, MyCheckboxExtendedProps>;
|
|
30
34
|
declare const MyRadio: FC<MyRadioAllProps>;
|
|
@@ -136,4 +136,8 @@ export interface DynamicLocaleConfig {
|
|
|
136
136
|
decimalScale: number;
|
|
137
137
|
}
|
|
138
138
|
export declare function resolveThousandsGroupStyle(locale: string): ThousandsGroupStyle;
|
|
139
|
+
/**
|
|
140
|
+
* Extracts a 3-letter ISO-4217 currency code from raw input (string, code, or symbol).
|
|
141
|
+
*/
|
|
142
|
+
export declare function extractCurrencyCode(val?: any): string | undefined;
|
|
139
143
|
export declare function getLocaleCurrencyConfig(locale: string, currency: string): DynamicLocaleConfig;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { useDebouncedValue } from "./useDebouncedValue";
|
|
2
|
-
export { useNumericFormatConfig } from "./useNumericFormatConfig";
|
|
2
|
+
export { useNumericFormatConfig, extractCurrencyCode, getDynamicLocaleForCurrency, } from "./useNumericFormatConfig";
|
|
3
3
|
export type { ResolvedNumericFormatConfig, UseNumericFormatConfigOptions, } from "./useNumericFormatConfig";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ThousandsGroupStyle } from "components/custom/getCurrencySymbol";
|
|
1
|
+
import { ThousandsGroupStyle, extractCurrencyCode } from "components/custom/getCurrencySymbol";
|
|
2
|
+
export { extractCurrencyCode };
|
|
2
3
|
export interface ResolvedNumericFormatConfig {
|
|
3
4
|
prefix: string;
|
|
4
5
|
suffix: string;
|
|
@@ -21,8 +22,15 @@ export interface UseNumericFormatConfigOptions {
|
|
|
21
22
|
locale?: string;
|
|
22
23
|
isCurrencyField?: boolean;
|
|
23
24
|
suffix?: any;
|
|
25
|
+
adornment?: any;
|
|
26
|
+
StartAdornment?: any;
|
|
24
27
|
[key: string]: any;
|
|
25
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Dynamically resolves standard banking locale for a given currency code
|
|
31
|
+
* without requiring rigid static mapping for each country.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getDynamicLocaleForCurrency(currencyCode: string, envLocale?: string): string;
|
|
26
34
|
/**
|
|
27
35
|
* Common hook/helper to resolve all Dynamic NumericFormat properties
|
|
28
36
|
* identically across form inputs, AG-Grid editors, and filters.
|
|
@@ -10,6 +10,7 @@ interface HeaderCellProps {
|
|
|
10
10
|
rightMap: Record<string, number>;
|
|
11
11
|
};
|
|
12
12
|
visibleColumns?: any[];
|
|
13
|
+
updateGridData?: (rowIndex: number, columnID: string, value: string, touched: boolean, error: string, updateFlag?: string) => void;
|
|
13
14
|
}
|
|
14
15
|
export declare const HeaderCellWrapper: React.FC<HeaderCellProps>;
|
|
15
16
|
export {};
|
|
@@ -61,7 +61,7 @@ export declare const attachcombinedValidationFns: (columns: GridColumnType[], au
|
|
|
61
61
|
setValueFUNC?: Function | undefined;
|
|
62
62
|
isAutoFocus?: boolean | undefined;
|
|
63
63
|
isVisibleInNew?: boolean | undefined;
|
|
64
|
-
currencyRefColumn?: "USA" | "USD" | "INR" | "JPY" | "KRW" | "VND" | "CLP" | "PYG" | "DJF" | "ISK" | "UGX" | "ALL" | "AFN" | "ARS" | "AWG" | "AUD" | "AZN" | "BSD" | "BBD" | "BYN" | "BZD" | "BMD" | "BOB" | "BAM" | "BWP" | "BGN" | "BRL" | "BND" | "KHR" | "BDT" | "CAD" | "KYD" | "CNY" | "COP" | "CRC" | "HRK" | "CUP" | "CZK" | "DKK" | "DOP" | "XCD" | "EGP" | "SVC" | "
|
|
64
|
+
currencyRefColumn?: "USA" | "USD" | "INR" | "EUR" | "GBP" | "JPY" | "IDR" | "AED" | "KRW" | "VND" | "CLP" | "PYG" | "DJF" | "ISK" | "UGX" | "ALL" | "AFN" | "ARS" | "AWG" | "AUD" | "AZN" | "BSD" | "BBD" | "BYN" | "BZD" | "BMD" | "BOB" | "BAM" | "BWP" | "BGN" | "BRL" | "BND" | "KHR" | "BDT" | "CAD" | "KYD" | "CNY" | "COP" | "CRC" | "HRK" | "CUP" | "CZK" | "DKK" | "DOP" | "XCD" | "EGP" | "SVC" | "FKP" | "GIP" | "GTQ" | "GGP" | "GYD" | "HNL" | "HKD" | "HUF" | "IRR" | "IMP" | "ILS" | "JMD" | "JEP" | "KZT" | "KPW" | "KGS" | "LAK" | "LBP" | "LRD" | "MKD" | "MYR" | "MUR" | "MXN" | "MNT" | "MZN" | "NAD" | "ANG" | "NZD" | "NIO" | "NGN" | "NOK" | "OMR" | "PKR" | "PAB" | "PEN" | "PHP" | "PLN" | "ZAR" | "CHF" | "RUB" | "SEK" | "TRY" | "ZWL" | "BTN" | "BYR" | "CVE" | "DZD" | "ERN" | "FJD" | "GEL" | "GHS" | "KWD" | "LKR" | "LYD" | "MDL" | "MVR" | "MWK" | "NPR" | "RSD" | "SAR" | "SCR" | "SYP" | "TND" | "TTD" | "TWD" | "YER" | "ZMW" | "XOF" | "XAF" | "TZS" | "SZL" | "STN" | "SSP" | "SOS" | "SLL" | "ETB" | "MMK" | "BLANK" | (string & Record<never, never>) | undefined;
|
|
65
65
|
isCurrencyCode?: boolean | undefined;
|
|
66
66
|
isSelectedTotal?: boolean | undefined;
|
|
67
67
|
isTotalWithCurrency?: boolean | undefined;
|
|
@@ -61,7 +61,7 @@ export declare const attachYupSchemaValidator: (columns: GridColumnType[]) => {
|
|
|
61
61
|
setValueFUNC?: Function | undefined;
|
|
62
62
|
isAutoFocus?: boolean | undefined;
|
|
63
63
|
isVisibleInNew?: boolean | undefined;
|
|
64
|
-
currencyRefColumn?: "USA" | "USD" | "INR" | "JPY" | "KRW" | "VND" | "CLP" | "PYG" | "DJF" | "ISK" | "UGX" | "ALL" | "AFN" | "ARS" | "AWG" | "AUD" | "AZN" | "BSD" | "BBD" | "BYN" | "BZD" | "BMD" | "BOB" | "BAM" | "BWP" | "BGN" | "BRL" | "BND" | "KHR" | "BDT" | "CAD" | "KYD" | "CNY" | "COP" | "CRC" | "HRK" | "CUP" | "CZK" | "DKK" | "DOP" | "XCD" | "EGP" | "SVC" | "
|
|
64
|
+
currencyRefColumn?: "USA" | "USD" | "INR" | "EUR" | "GBP" | "JPY" | "IDR" | "AED" | "KRW" | "VND" | "CLP" | "PYG" | "DJF" | "ISK" | "UGX" | "ALL" | "AFN" | "ARS" | "AWG" | "AUD" | "AZN" | "BSD" | "BBD" | "BYN" | "BZD" | "BMD" | "BOB" | "BAM" | "BWP" | "BGN" | "BRL" | "BND" | "KHR" | "BDT" | "CAD" | "KYD" | "CNY" | "COP" | "CRC" | "HRK" | "CUP" | "CZK" | "DKK" | "DOP" | "XCD" | "EGP" | "SVC" | "FKP" | "GIP" | "GTQ" | "GGP" | "GYD" | "HNL" | "HKD" | "HUF" | "IRR" | "IMP" | "ILS" | "JMD" | "JEP" | "KZT" | "KPW" | "KGS" | "LAK" | "LBP" | "LRD" | "MKD" | "MYR" | "MUR" | "MXN" | "MNT" | "MZN" | "NAD" | "ANG" | "NZD" | "NIO" | "NGN" | "NOK" | "OMR" | "PKR" | "PAB" | "PEN" | "PHP" | "PLN" | "ZAR" | "CHF" | "RUB" | "SEK" | "TRY" | "ZWL" | "BTN" | "BYR" | "CVE" | "DZD" | "ERN" | "FJD" | "GEL" | "GHS" | "KWD" | "LKR" | "LYD" | "MDL" | "MVR" | "MWK" | "NPR" | "RSD" | "SAR" | "SCR" | "SYP" | "TND" | "TTD" | "TWD" | "YER" | "ZMW" | "XOF" | "XAF" | "TZS" | "SZL" | "STN" | "SSP" | "SOS" | "SLL" | "ETB" | "MMK" | "BLANK" | (string & Record<never, never>) | undefined;
|
|
65
65
|
isCurrencyCode?: boolean | undefined;
|
|
66
66
|
isSelectedTotal?: boolean | undefined;
|
|
67
67
|
isTotalWithCurrency?: boolean | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReportGridProps } from "./types";
|
|
3
|
-
export declare const ReportGrid:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ReportGridHandle, ReportGridProps } from "./types";
|
|
3
|
+
export declare const ReportGrid: import("react").ForwardRefExoticComponent<ReportGridProps & import("react").RefAttributes<ReportGridHandle>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { SxProps } from "@mui/material";
|
|
3
|
-
import { RetrievalParametersProps } from "../types";
|
|
3
|
+
import { ReportGridHandle, RetrievalParametersProps } from "../types";
|
|
4
4
|
type TReportWrapper = {
|
|
5
5
|
reportID: string;
|
|
6
6
|
reportName: string;
|
|
@@ -18,11 +18,22 @@ type TReportWrapper = {
|
|
|
18
18
|
focusScopeId?: string;
|
|
19
19
|
retrievalComponent?: React.ComponentType<RetrievalParametersProps>;
|
|
20
20
|
title?: string;
|
|
21
|
+
gridRef?: React.Ref<any>;
|
|
21
22
|
retrieveDataShortCut?: {
|
|
22
23
|
enableShortcut?: boolean;
|
|
23
24
|
shortcut?: "alt" | "ctrl" | "shift" | "meta";
|
|
24
25
|
eventKey?: string;
|
|
25
26
|
};
|
|
27
|
+
actions?: {
|
|
28
|
+
buttonStyle?: SxProps;
|
|
29
|
+
buttonName: ReactNode;
|
|
30
|
+
callback: (event: any, originalData: any, rows: any, nonGroupedRawRows: any) => void;
|
|
31
|
+
enableShortcut?: boolean;
|
|
32
|
+
shortcut?: "alt" | "ctrl" | "shift" | "meta";
|
|
33
|
+
eventKey?: string;
|
|
34
|
+
hidden?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
}[];
|
|
26
37
|
};
|
|
27
|
-
export declare const ReportWrapper: React.
|
|
38
|
+
export declare const ReportWrapper: React.ForwardRefExoticComponent<TReportWrapper & React.RefAttributes<ReportGridHandle>>;
|
|
28
39
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
2
|
import { SxProps } from "@mui/material/styles";
|
|
3
3
|
import { RetrievalParametersProps } from "../types";
|
|
4
4
|
interface GridTableType {
|
|
5
5
|
columns: any;
|
|
6
6
|
defaultColumn: any;
|
|
7
7
|
data: any;
|
|
8
|
+
updateGridData?: (rowIndex: number, columnID: string, value: any, touched?: boolean, error?: any, updateFlag?: string) => void;
|
|
8
9
|
maxHeight: number;
|
|
9
10
|
containerHeight?: {
|
|
10
11
|
min: string;
|
|
@@ -47,6 +48,16 @@ interface GridTableType {
|
|
|
47
48
|
defaultFilter?: any;
|
|
48
49
|
disableFilters?: boolean;
|
|
49
50
|
headerToolbarStyle?: SxProps;
|
|
51
|
+
actions?: {
|
|
52
|
+
buttonStyle?: SxProps;
|
|
53
|
+
buttonName: ReactNode;
|
|
54
|
+
callback: (event: any, originalData: any, rows: any, nonGroupedRawRows: any) => void;
|
|
55
|
+
enableShortcut?: boolean;
|
|
56
|
+
shortcut?: "alt" | "ctrl" | "shift" | "meta";
|
|
57
|
+
eventKey?: string;
|
|
58
|
+
hidden?: boolean;
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
}[];
|
|
50
61
|
enableEnterToFocus?: boolean;
|
|
51
62
|
retrievalComponent?: React.ComponentType<RetrievalParametersProps>;
|
|
52
63
|
retrievalComponentMeta?: any;
|
|
@@ -40,6 +40,17 @@ export interface ReportColumnsType {
|
|
|
40
40
|
* cell type
|
|
41
41
|
*/
|
|
42
42
|
type?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Cell component registered in tableCellComponents.
|
|
45
|
+
*/
|
|
46
|
+
componentType?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Show a header checkbox that selects or clears the column's editable checkboxes.
|
|
49
|
+
*/
|
|
50
|
+
enableColumnSelection?: boolean;
|
|
51
|
+
validation?: (value: any, row: any, previousRows?: any[], nextRows?: any[]) => any;
|
|
52
|
+
isReadOnly?: boolean | ((value: any, row: any) => boolean);
|
|
53
|
+
setValueFUNC?: (value: boolean) => any;
|
|
43
54
|
/**
|
|
44
55
|
* custom column filtering function
|
|
45
56
|
* @param rows all grid row data
|
|
@@ -123,6 +134,11 @@ export interface ReportFilterProps {
|
|
|
123
134
|
}
|
|
124
135
|
export interface ReportMetaDataType {
|
|
125
136
|
title: string;
|
|
137
|
+
/**
|
|
138
|
+
* Unique row key used to preserve editable cell values across server-paginated pages.
|
|
139
|
+
* Defaults to "ROW_SR_CD_".
|
|
140
|
+
*/
|
|
141
|
+
rowIdColumn?: string;
|
|
126
142
|
disableGroupBy?: boolean | "Y" | "N";
|
|
127
143
|
hideFooter?: boolean | "Y" | "N";
|
|
128
144
|
hideAmountIn?: boolean | "Y" | "N";
|
|
@@ -154,8 +170,15 @@ export interface ReportMetaDataType {
|
|
|
154
170
|
disableFilters?: boolean;
|
|
155
171
|
expandAllGroupedRows?: boolean;
|
|
156
172
|
}
|
|
173
|
+
export interface ReportGridHandle {
|
|
174
|
+
submitHandler: () => any[];
|
|
175
|
+
cleanData: () => any[];
|
|
176
|
+
getData: () => any[];
|
|
177
|
+
updateGridData: (rowIndex: number, columnID: string, value: any, touched?: boolean, error?: any, updateFlag?: string) => void;
|
|
178
|
+
}
|
|
157
179
|
export interface ReportGridProps {
|
|
158
180
|
metaData: any;
|
|
181
|
+
gridRef?: React.Ref<any>;
|
|
159
182
|
maxHeight?: number;
|
|
160
183
|
initialState?: any;
|
|
161
184
|
title: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const StyledTab: import("@emotion/styled").StyledComponent<import("@mui/material").TabOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, "value" | "children" | "style" | "icon" | "disabled" | "classes" | "className" | "sx" | "label" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "
|
|
4
|
+
}, "value" | "children" | "style" | "icon" | "disabled" | "classes" | "className" | "sx" | "label" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "iconPosition" | "wrapped"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
5
|
export default StyledTab;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const StyledTabs: import("@mui/styles").StyledComponent<Omit<import("@mui/material/Tabs").TabsOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, "onChange" | "value" | "children" | "style" | "variant" | "classes" | "className" | "sx" | "aria-label" | "aria-labelledby" | "slotProps" | "slots" | "orientation" | "action" | "textColor" | "
|
|
4
|
+
}, "onChange" | "value" | "children" | "style" | "variant" | "classes" | "className" | "sx" | "aria-label" | "aria-labelledby" | "slotProps" | "slots" | "orientation" | "action" | "textColor" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "visibleScrollbar">, "classes" | "className"> & import("@mui/styles").StyledComponentProps<"root"> & Omit<Omit<import("@mui/material/Tabs").TabsOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
5
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
-
}, "onChange" | "value" | "children" | "style" | "variant" | "classes" | "className" | "sx" | "aria-label" | "aria-labelledby" | "slotProps" | "slots" | "orientation" | "action" | "textColor" | "
|
|
6
|
+
}, "onChange" | "value" | "children" | "style" | "variant" | "classes" | "className" | "sx" | "aria-label" | "aria-labelledby" | "slotProps" | "slots" | "orientation" | "action" | "textColor" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "visibleScrollbar">, "ref">, "className" | "theme"> & {
|
|
7
7
|
className?: string | undefined;
|
|
8
8
|
theme?: import("@mui/styles").DefaultTheme | undefined;
|
|
9
9
|
}>;
|