@acuteinfo/common-base 1.2.38-beta.0 → 1.2.38-beta.10
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/arrayField/arrayField-stepper.d.ts +1 -1
- package/dist/components/common/arrayField/arrayField2.d.ts +5 -1
- package/dist/components/common/autocomplete/autocomplete.d.ts +3 -0
- package/dist/components/common/datetime/datePicker.d.ts +2 -0
- package/dist/components/common/datetime/datetimePicker.d.ts +2 -0
- package/dist/components/common/datetime/timePicker.d.ts +1 -0
- package/dist/components/common/divider/divider.d.ts +1 -0
- package/dist/components/common/formbutton/formbutton.d.ts +1 -0
- package/dist/components/common/hidden/hidden.d.ts +1 -0
- package/dist/components/common/printButton/printButton.d.ts +8 -1
- package/dist/components/common/select/select.d.ts +2 -0
- package/dist/components/common/textField/textField.d.ts +3 -1
- package/dist/components/common/types.d.ts +2 -0
- package/dist/components/common/typograhpy/typography.d.ts +1 -0
- package/dist/components/common/utils/optionsFetcher.d.ts +2 -0
- package/dist/components/context/propertiesConfig/customProperties.d.ts +10 -0
- package/dist/components/custom/Remarks.d.ts +19 -15
- package/dist/components/custom/advanceFilter.d.ts +2 -1
- package/dist/components/custom/popupContext.d.ts +3 -0
- package/dist/components/custom/popupMessage.d.ts +3 -1
- package/dist/components/custom/popupReqest.d.ts +3 -1
- package/dist/components/dataTable/atoms/index.d.ts +1 -11
- package/dist/components/dataTable/components/useCheckbox.d.ts +1 -1
- package/dist/components/dataTable/gridWrapper.d.ts +7 -0
- package/dist/components/dataTable/headerCellWrapper.d.ts +5 -0
- package/dist/components/dataTable/styledComponents/slider.d.ts +1 -1
- package/dist/components/dataTable/types.d.ts +6 -0
- package/dist/components/dataTable/utils/attachAlignmentProps.d.ts +2 -0
- package/dist/components/dataTable/utils/attachCellComponentsToMetaData.d.ts +1 -0
- package/dist/components/dataTable/utils/sortColumnBySequence.d.ts +1 -0
- package/dist/components/dataTableStatic/grid.d.ts +2 -1
- package/dist/components/dataTableStatic/types.d.ts +21 -0
- package/dist/components/dataTableStatic/utils/attachCombineValidationFns.d.ts +5 -0
- package/dist/components/dataTableStatic/utils/attachYupSchema.d.ts +5 -0
- package/dist/components/detailPopupGridData/GridDetailsWithHeader/detailsGridWithHeader.d.ts +1 -1
- package/dist/components/detailPopupGridData/GridDetailsWithHeader/type.d.ts +2 -0
- package/dist/components/dynamicForm/simpleForm.d.ts +6 -3
- package/dist/components/dynamicForm/types.d.ts +15 -1
- package/dist/components/dynamicForm/typesFields.d.ts +2 -1
- package/dist/components/dynamicForm/utils/constructINITValues.d.ts +1 -1
- package/dist/components/dynamicForm/utils/extendedFieldTypes.d.ts +1 -1
- package/dist/components/dynamicForm/utils/groupWiserenderer.d.ts +2 -2
- package/dist/components/fileUpload/preView.d.ts +1 -0
- package/dist/components/formcomponent/filterform/type.d.ts +2 -0
- package/dist/components/formcomponent/masterDetails/masterDetailsForm.d.ts +6 -0
- package/dist/components/report/components/dateCell.d.ts +1 -1
- package/dist/components/report/components/footerCell.d.ts +3 -1
- package/dist/components/report/filterComponent/filterComponent.d.ts +2 -1
- package/dist/components/report/gridTable.d.ts +15 -1
- package/dist/components/report/serverReport/ReportWrapper.d.ts +10 -0
- package/dist/components/report/serverReport/serverGridTable.d.ts +14 -0
- package/dist/components/report/types.d.ts +20 -1
- package/dist/components/styledComponent/button/button.d.ts +7 -0
- package/dist/components/utils/reportExport/ReportExportScreen.d.ts +1 -0
- package/dist/components/utils/reportExport/exportFunctions/metaData.d.ts +181 -2
- package/dist/components/utils/utilFunctions/function.d.ts +30 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/dist/packages/form/src/atoms.d.ts +49 -16
- package/dist/packages/form/src/field.d.ts +5 -3
- package/dist/packages/form/src/fieldArrayStepper.d.ts +0 -1
- package/dist/packages/form/src/form.d.ts +3 -1
- package/dist/packages/form/src/observer.d.ts +1 -1
- package/dist/packages/form/src/types.d.ts +6 -0
- package/dist/pages_audit/common/serverGrid/serverGrid.d.ts +9 -0
- package/package.json +5 -4
- package/rollup.config.mjs +3 -2
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { RESET } from "jotai/utils";
|
|
1
2
|
import { FormAtomType, FormFieldAtomType, FormArrayFieldRowsAtomType, FormFieldRegisterSelectorAttributes, FormFieldRegistryAtomType, DependentValuesType, SubscritionFieldsType } from "./types";
|
|
3
|
+
type FieldWithResetType = string | typeof RESET;
|
|
2
4
|
export declare const atomKeys: {
|
|
3
5
|
formAtom: string;
|
|
4
6
|
formFieldAtom: string;
|
|
@@ -18,19 +20,50 @@ export declare const atomKeys: {
|
|
|
18
20
|
formFieldsErrorWatcherAddSelector: string;
|
|
19
21
|
formFieldsErrorWatcherRemoveSelector: string;
|
|
20
22
|
};
|
|
21
|
-
export declare const formAtom: (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export declare const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export declare const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export declare const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export declare const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export declare const
|
|
23
|
+
export declare const formAtom: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<FormAtomType, [FormAtomType | typeof RESET | ((prev: FormAtomType) => FormAtomType | typeof RESET)], void> & {
|
|
24
|
+
init: FormAtomType;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const formFieldAtom: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<FormFieldAtomType, [FormFieldAtomType | typeof RESET | ((prev: FormFieldAtomType) => FormFieldAtomType | typeof RESET)], void> & {
|
|
27
|
+
init: FormFieldAtomType;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const formFieldsErrorWatcherAtom: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<string[], [string[] | typeof RESET | ((prev: string[]) => string[] | typeof RESET)], void> & {
|
|
30
|
+
init: string[];
|
|
31
|
+
}>;
|
|
32
|
+
export declare const formFieldsErrorWatcherAddSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FieldWithResetType], void> & {
|
|
33
|
+
init: null;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const formFieldsErrorWatcherRemoveSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FieldWithResetType], void> & {
|
|
36
|
+
init: null;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const formFieldsExcludedAtom: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<string[], [string[] | typeof RESET | ((prev: string[]) => string[] | typeof RESET)], void> & {
|
|
39
|
+
init: string[];
|
|
40
|
+
}>;
|
|
41
|
+
export declare const formFieldExcludeAddSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FieldWithResetType], void> & {
|
|
42
|
+
init: null;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const formFieldExcludeRemoveSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FieldWithResetType], void> & {
|
|
45
|
+
init: null;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const formFieldRegistryAtom: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<FormFieldRegistryAtomType, [typeof RESET | FormFieldRegistryAtomType | ((prev: FormFieldRegistryAtomType) => typeof RESET | FormFieldRegistryAtomType)], void> & {
|
|
48
|
+
init: FormFieldRegistryAtomType;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const formFieldRegisterSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FormFieldRegisterSelectorAttributes | typeof RESET], void> & {
|
|
51
|
+
init: null;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const formFieldUnregisterSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FieldWithResetType], void> & {
|
|
54
|
+
init: null;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const formArrayFieldRowsAtom: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<FormArrayFieldRowsAtomType, [FormArrayFieldRowsAtomType | typeof RESET | ((prev: FormArrayFieldRowsAtomType) => FormArrayFieldRowsAtomType | typeof RESET)], void> & {
|
|
57
|
+
init: FormArrayFieldRowsAtomType;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const formArrayFieldRegistryAtom: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<string[], [string[] | typeof RESET | ((prev: string[]) => string[] | typeof RESET)], void> & {
|
|
60
|
+
init: string[];
|
|
61
|
+
}>;
|
|
62
|
+
export declare const formArrayFieldRegisterSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FieldWithResetType], void> & {
|
|
63
|
+
init: null;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const formArrayFieldUnregisterSelector: import("jotai-family").AtomFamily<string, import("jotai/vanilla").WritableAtom<null, [FieldWithResetType], void> & {
|
|
66
|
+
init: null;
|
|
67
|
+
}>;
|
|
68
|
+
export declare const subscribeToFormFieldsSelector: import("jotai-family").AtomFamily<SubscritionFieldsType, import("jotai/vanilla").Atom<DependentValuesType>>;
|
|
69
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UseFieldHookProps, InitialValuesType, ValidateFnType, DependentValuesType } from "./types";
|
|
2
|
-
export declare const useField: ({ fieldKey, name, dependentFields, validate, validationRun, shouldExclude, isReadOnly, postValidationSetCrossFieldValues, runPostValidationHookAlways, runValidationOnDependentFieldsChange, skipValueUpdateFromCrossFieldWhenReadOnly, runExternalFunction, onFormDataChange, txtTransform, AlwaysRunPostValidationSetCrossFieldValues, componentType, runPostValidationForInitValue, dependentFieldDebounceDelay, }: UseFieldHookProps) => {
|
|
2
|
+
export declare const useField: ({ fieldKey, name, dependentFields, validate, validationRun, shouldExclude, isReadOnly, postValidationSetCrossFieldValues, runPostValidationHookAlways, runValidationOnDependentFieldsChange, skipValueUpdateFromCrossFieldWhenReadOnly, runExternalFunction, onFormDataChange, txtTransform, AlwaysRunPostValidationSetCrossFieldValues, componentType, runPostValidationForInitValue, dependentFieldDebounceDelay, isCurrencyField, showTooltip, }: UseFieldHookProps) => {
|
|
3
3
|
formState: any;
|
|
4
4
|
whenToRunValidation: ("onChange" | "onBlur" | "all") | undefined;
|
|
5
5
|
isSubmitting: boolean;
|
|
6
|
-
handleChange: (eventOrTextValue: React.ChangeEvent<any> | Date | string | number | boolean | any[], displayValue?: Date | string | number | boolean | any[], isTransformedValue?: boolean, toMerge?: {}) => void;
|
|
6
|
+
handleChange: (eventOrTextValue: React.ChangeEvent<any> | Date | string | number | boolean | any[], displayValue?: Date | string | number | boolean | any[], isTransformedValue?: boolean, toMerge?: {}, ignoreUpdate?: boolean) => void;
|
|
7
7
|
handleBlur: (_?: {}, toMerge?: {}) => Promise<void>;
|
|
8
8
|
setTouched: () => void;
|
|
9
|
-
setValue: (val: any, displayValue: any, alwaysRun?: boolean) => void;
|
|
9
|
+
setValue: (val: any, displayValue: any, alwaysRun?: boolean, mergeObj?: Record<string, string>) => void;
|
|
10
10
|
setValueAsCB: (val: any) => void;
|
|
11
11
|
setErrorAsCB: (val: any) => void;
|
|
12
12
|
setIncomingMessage: (value: any) => void;
|
|
@@ -37,5 +37,7 @@ export declare const useField: ({ fieldKey, name, dependentFields, validate, val
|
|
|
37
37
|
prevValue?: any;
|
|
38
38
|
dynamicCurrency?: string | undefined;
|
|
39
39
|
filteredOptions?: Record<string, any>[] | undefined;
|
|
40
|
+
tooltip?: any;
|
|
40
41
|
};
|
|
41
42
|
export declare const transformDependentFieldsState: (dependentValues: DependentValuesType) => {};
|
|
43
|
+
export declare const extractDependentFields: (input: any) => any[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { UseFormHookProps } from "./types";
|
|
2
|
+
import { FieldsErrorObjType, UseFormHookProps } from "./types";
|
|
3
3
|
export declare const useForm: ({ onSubmit, readOnly }: UseFormHookProps) => {
|
|
4
4
|
submitAttempt: number;
|
|
5
5
|
isSubmitting: boolean;
|
|
6
6
|
submitSuccessful: boolean;
|
|
7
7
|
serverSentError: string;
|
|
8
8
|
serverSentErrorDetail: string;
|
|
9
|
+
validationRunning?: boolean | undefined;
|
|
9
10
|
handleSubmit: (e: import("react").FormEvent<any>, actionFlag?: String | undefined, isValidate?: boolean | undefined, optionalData?: any) => Promise<any>;
|
|
10
11
|
handleSubmitPartial: (fields: string[]) => Promise<boolean>;
|
|
11
12
|
handleReset: (e: React.FormEvent<any>) => void;
|
|
@@ -13,4 +14,5 @@ export declare const useForm: ({ onSubmit, readOnly }: UseFormHookProps) => {
|
|
|
13
14
|
handleClear: (e: any) => void;
|
|
14
15
|
handleClearPartial: (fields: string[]) => void;
|
|
15
16
|
getFieldData: () => Promise<{}>;
|
|
17
|
+
setFieldData: (fieldsValueObj?: FieldsErrorObjType | undefined) => void;
|
|
16
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -24,6 +24,7 @@ export interface FormContextType {
|
|
|
24
24
|
defaultArrayFieldValues?: InitialValuesType;
|
|
25
25
|
lastValidationValue?: any;
|
|
26
26
|
flagRef?: any;
|
|
27
|
+
setCurrentStepIndexFnRef?: Function | null;
|
|
27
28
|
}
|
|
28
29
|
export type FormFieldRegistryAtomType = string[];
|
|
29
30
|
export interface FormFieldRegisterSelectorAttributes {
|
|
@@ -39,6 +40,7 @@ export interface FormAtomType {
|
|
|
39
40
|
submitSuccessful: boolean;
|
|
40
41
|
serverSentError: string;
|
|
41
42
|
serverSentErrorDetail: string;
|
|
43
|
+
validationRunning?: boolean;
|
|
42
44
|
}
|
|
43
45
|
export interface FormFieldAtomType {
|
|
44
46
|
fieldKey: string;
|
|
@@ -61,6 +63,7 @@ export interface FormFieldAtomType {
|
|
|
61
63
|
prevValue?: any;
|
|
62
64
|
dynamicCurrency?: string;
|
|
63
65
|
filteredOptions?: Record<string, any>[];
|
|
66
|
+
tooltip?: any;
|
|
64
67
|
}
|
|
65
68
|
export interface DependentValuesType {
|
|
66
69
|
[key: string]: FormFieldAtomType;
|
|
@@ -102,6 +105,8 @@ export interface UseFieldHookProps {
|
|
|
102
105
|
componentType?: string;
|
|
103
106
|
runPostValidationForInitValue?: boolean;
|
|
104
107
|
dependentFieldDebounceDelay?: number;
|
|
108
|
+
isCurrencyField?: boolean;
|
|
109
|
+
showTooltip?: typeof showTooltipFnType;
|
|
105
110
|
}
|
|
106
111
|
export interface UseFieldArrayHookProps {
|
|
107
112
|
arrayFieldName: string;
|
|
@@ -115,6 +120,7 @@ export interface SubscritionFieldsType {
|
|
|
115
120
|
}
|
|
116
121
|
export declare function getFixedRowsCountFnType(fieldData: FormArrayFieldRowsAtomType, dependentFieldsValues: DependentValuesType, formState: any): number;
|
|
117
122
|
export declare function shouldExcludeFnType(fieldData: FormFieldAtomType, dependentFieldsValues: DependentValuesType, formState: any): Promise<boolean> | boolean;
|
|
123
|
+
export declare function showTooltipFnType(fieldData: FormFieldAtomType, dependentFieldsValues: DependentValuesType, formState: any): Promise<any> | any;
|
|
118
124
|
export declare function SchemaValidateFnType(fieldData: FormFieldAtomType, formState: any): Promise<any> | any;
|
|
119
125
|
export declare function ValidateFnType(fieldData: FormFieldAtomType, dependentFieldsValues: DependentValuesType, formState: any): Promise<any> | any;
|
|
120
126
|
export declare function PostValidationSetCrossFieldValuesFnType(fieldData: FormFieldAtomType, formState: any, authState: any, dependentFieldsState: any): Promise<InitialValuesType | undefined | null> | InitialValuesType | undefined | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ActionTypes } from "components/dataTable";
|
|
3
|
+
import { SxProps } from "@mui/material";
|
|
3
4
|
interface ServerGridType {
|
|
4
5
|
dataGridKey: string;
|
|
5
6
|
getAPIReqPara?: any;
|
|
@@ -15,6 +16,14 @@ interface ServerGridType {
|
|
|
15
16
|
reportTemplateCode?: string;
|
|
16
17
|
variant?: "standard" | "contained" | "outlined";
|
|
17
18
|
autoFetch?: boolean;
|
|
19
|
+
headerToolbarStyle?: SxProps;
|
|
20
|
+
enableEnterToFocus?: boolean;
|
|
21
|
+
focusScopeId?: string;
|
|
22
|
+
onClickActionEvent?: any;
|
|
23
|
+
handleClickAction?: (event: any, data: any) => void;
|
|
24
|
+
onDataChange?: (data: any[]) => void;
|
|
25
|
+
defaultSelectedRowId?: string | ((gridData: any) => string | null);
|
|
26
|
+
disableMultipleRowSelect?: boolean;
|
|
18
27
|
}
|
|
19
28
|
export declare const ServerGrid: import("react").ForwardRefExoticComponent<ServerGridType & import("react").RefAttributes<any>>;
|
|
20
29
|
export declare const ServerGridWrapper: import("react").ForwardRefExoticComponent<ServerGridType & import("react").RefAttributes<any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acuteinfo/common-base",
|
|
3
|
-
"version": "1.2.38-beta.
|
|
3
|
+
"version": "1.2.38-beta.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -31,8 +31,9 @@
|
|
|
31
31
|
"date-fns": "^2.30.0",
|
|
32
32
|
"dayjs": "^1.11.9",
|
|
33
33
|
"history": "^5.0.0",
|
|
34
|
-
"husky": "^4.3.0",
|
|
35
34
|
"i18next": "^23.12.2",
|
|
35
|
+
"jotai": "^2.17.1",
|
|
36
|
+
"jotai-family": "^1.0.1",
|
|
36
37
|
"js2xmlparser": "^5.0.0",
|
|
37
38
|
"json-rules-engine": "^5.0.4",
|
|
38
39
|
"jspdf": "^2.5.1",
|
|
@@ -57,7 +58,6 @@
|
|
|
57
58
|
"react-to-print": "^2.14.7",
|
|
58
59
|
"react-virtuoso": "^4.13.0",
|
|
59
60
|
"react-window": "^1.8.6",
|
|
60
|
-
"recoil": "^0.7.7",
|
|
61
61
|
"regenerator-runtime": "^0.14.1",
|
|
62
62
|
"typeface-roboto": "^0.0.75",
|
|
63
63
|
"typescript": "^4.2.2",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"@types/react": "^18.2.74",
|
|
117
117
|
"@types/react-i18next": "^8.1.0",
|
|
118
118
|
"@types/yup": "^0.29.6",
|
|
119
|
+
"husky": "^4.3.8",
|
|
119
120
|
"postcss": "^8.4.38",
|
|
120
121
|
"postcss-nested": "^6.0.1",
|
|
121
122
|
"postcss-simple-vars": "^7.0.1",
|
|
@@ -132,4 +133,4 @@
|
|
|
132
133
|
"react": "^18.2.0",
|
|
133
134
|
"react-dom": "^18.2.0"
|
|
134
135
|
}
|
|
135
|
-
}
|
|
136
|
+
}
|
package/rollup.config.mjs
CHANGED