@acuteinfo/common-base 1.2.38-beta.1 → 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.
Files changed (57) hide show
  1. package/dist/components/common/arrayField/arrayField-stepper.d.ts +1 -1
  2. package/dist/components/common/arrayField/arrayField2.d.ts +2 -0
  3. package/dist/components/common/autocomplete/autocomplete.d.ts +3 -0
  4. package/dist/components/common/datetime/datePicker.d.ts +2 -0
  5. package/dist/components/common/datetime/datetimePicker.d.ts +2 -0
  6. package/dist/components/common/datetime/timePicker.d.ts +1 -0
  7. package/dist/components/common/divider/divider.d.ts +1 -0
  8. package/dist/components/common/formbutton/formbutton.d.ts +1 -0
  9. package/dist/components/common/hidden/hidden.d.ts +1 -0
  10. package/dist/components/common/printButton/printButton.d.ts +8 -1
  11. package/dist/components/common/select/select.d.ts +2 -0
  12. package/dist/components/common/textField/textField.d.ts +3 -1
  13. package/dist/components/common/types.d.ts +2 -0
  14. package/dist/components/common/typograhpy/typography.d.ts +1 -0
  15. package/dist/components/common/utils/optionsFetcher.d.ts +2 -0
  16. package/dist/components/context/propertiesConfig/customProperties.d.ts +5 -0
  17. package/dist/components/custom/Remarks.d.ts +19 -17
  18. package/dist/components/dataTable/atoms/index.d.ts +1 -11
  19. package/dist/components/dataTable/components/useCheckbox.d.ts +1 -1
  20. package/dist/components/dataTable/gridWrapper.d.ts +5 -0
  21. package/dist/components/dataTable/headerCellWrapper.d.ts +5 -0
  22. package/dist/components/dataTable/styledComponents/slider.d.ts +1 -1
  23. package/dist/components/dataTable/types.d.ts +6 -0
  24. package/dist/components/dataTable/utils/attachAlignmentProps.d.ts +2 -0
  25. package/dist/components/dataTable/utils/attachCellComponentsToMetaData.d.ts +1 -0
  26. package/dist/components/dataTable/utils/sortColumnBySequence.d.ts +1 -0
  27. package/dist/components/dataTableStatic/types.d.ts +18 -0
  28. package/dist/components/dataTableStatic/utils/attachCombineValidationFns.d.ts +4 -0
  29. package/dist/components/dataTableStatic/utils/attachYupSchema.d.ts +4 -0
  30. package/dist/components/dynamicForm/simpleForm.d.ts +6 -3
  31. package/dist/components/dynamicForm/types.d.ts +8 -1
  32. package/dist/components/dynamicForm/typesFields.d.ts +2 -1
  33. package/dist/components/dynamicForm/utils/constructINITValues.d.ts +1 -1
  34. package/dist/components/dynamicForm/utils/extendedFieldTypes.d.ts +1 -1
  35. package/dist/components/dynamicForm/utils/groupWiserenderer.d.ts +2 -2
  36. package/dist/components/formcomponent/masterDetails/masterDetailsForm.d.ts +4 -0
  37. package/dist/components/report/components/dateCell.d.ts +1 -1
  38. package/dist/components/report/components/footerCell.d.ts +3 -1
  39. package/dist/components/report/filterComponent/filterComponent.d.ts +2 -1
  40. package/dist/components/report/gridTable.d.ts +14 -1
  41. package/dist/components/report/serverReport/ReportWrapper.d.ts +8 -0
  42. package/dist/components/report/serverReport/serverGridTable.d.ts +13 -0
  43. package/dist/components/report/types.d.ts +18 -1
  44. package/dist/components/styledComponent/button/button.d.ts +7 -0
  45. package/dist/components/utils/utilFunctions/function.d.ts +16 -2
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +19 -19
  48. package/dist/index.js.map +1 -1
  49. package/dist/packages/form/src/atoms.d.ts +49 -16
  50. package/dist/packages/form/src/field.d.ts +5 -3
  51. package/dist/packages/form/src/fieldArrayStepper.d.ts +0 -1
  52. package/dist/packages/form/src/form.d.ts +3 -1
  53. package/dist/packages/form/src/observer.d.ts +1 -1
  54. package/dist/packages/form/src/types.d.ts +5 -0
  55. package/dist/pages_audit/common/serverGrid/serverGrid.d.ts +5 -0
  56. package/package.json +5 -4
  57. 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: (param: string) => import("recoil").RecoilState<FormAtomType>;
22
- export declare const formFieldAtom: (param: string) => import("recoil").RecoilState<FormFieldAtomType>;
23
- export declare const formFieldsErrorWatcherAtom: (param: string) => import("recoil").RecoilState<string[]>;
24
- export declare const formFieldsErrorWatcherAddSelector: (param: string) => import("recoil").RecoilState<string>;
25
- export declare const formFieldsErrorWatcherRemoveSelector: (param: string) => import("recoil").RecoilState<string>;
26
- export declare const formFieldsExcludedAtom: (param: string) => import("recoil").RecoilState<string[]>;
27
- export declare const formFieldExcludeAddSelector: (param: string) => import("recoil").RecoilState<string>;
28
- export declare const formFieldExcludeRemoveSelector: (param: string) => import("recoil").RecoilState<string>;
29
- export declare const formFieldRegistryAtom: (param: string) => import("recoil").RecoilState<FormFieldRegistryAtomType>;
30
- export declare const formFieldRegisterSelector: (param: string) => import("recoil").RecoilState<FormFieldRegisterSelectorAttributes>;
31
- export declare const formFieldUnregisterSelector: (param: string) => import("recoil").RecoilState<string>;
32
- export declare const formArrayFieldRowsAtom: (param: string) => import("recoil").RecoilState<FormArrayFieldRowsAtomType>;
33
- export declare const formArrayFieldRegistryAtom: (param: string) => import("recoil").RecoilState<string[]>;
34
- export declare const formArrayFieldRegisterSelector: (param: string) => import("recoil").RecoilState<string>;
35
- export declare const formArrayFieldUnregisterSelector: (param: string) => import("recoil").RecoilState<string>;
36
- export declare const subscribeToFormFieldsSelector: (param: SubscritionFieldsType) => import("recoil").RecoilValueReadOnly<DependentValuesType>;
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[];
@@ -15,5 +15,4 @@ export declare const useFieldArray: ({ arrayFieldName, template, shouldExclude,
15
15
  isSubmitting: boolean;
16
16
  formState: any;
17
17
  formName: string;
18
- isPending: boolean;
19
18
  };
@@ -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 declare const TimeTravelObserver: () => import("react/jsx-runtime").JSX.Element;
1
+ export {};
@@ -40,6 +40,7 @@ export interface FormAtomType {
40
40
  submitSuccessful: boolean;
41
41
  serverSentError: string;
42
42
  serverSentErrorDetail: string;
43
+ validationRunning?: boolean;
43
44
  }
44
45
  export interface FormFieldAtomType {
45
46
  fieldKey: string;
@@ -62,6 +63,7 @@ export interface FormFieldAtomType {
62
63
  prevValue?: any;
63
64
  dynamicCurrency?: string;
64
65
  filteredOptions?: Record<string, any>[];
66
+ tooltip?: any;
65
67
  }
66
68
  export interface DependentValuesType {
67
69
  [key: string]: FormFieldAtomType;
@@ -103,6 +105,8 @@ export interface UseFieldHookProps {
103
105
  componentType?: string;
104
106
  runPostValidationForInitValue?: boolean;
105
107
  dependentFieldDebounceDelay?: number;
108
+ isCurrencyField?: boolean;
109
+ showTooltip?: typeof showTooltipFnType;
106
110
  }
107
111
  export interface UseFieldArrayHookProps {
108
112
  arrayFieldName: string;
@@ -116,6 +120,7 @@ export interface SubscritionFieldsType {
116
120
  }
117
121
  export declare function getFixedRowsCountFnType(fieldData: FormArrayFieldRowsAtomType, dependentFieldsValues: DependentValuesType, formState: any): number;
118
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;
119
124
  export declare function SchemaValidateFnType(fieldData: FormFieldAtomType, formState: any): Promise<any> | any;
120
125
  export declare function ValidateFnType(fieldData: FormFieldAtomType, dependentFieldsValues: DependentValuesType, formState: any): Promise<any> | any;
121
126
  export declare function PostValidationSetCrossFieldValuesFnType(fieldData: FormFieldAtomType, formState: any, authState: any, dependentFieldsState: any): Promise<InitialValuesType | undefined | null> | InitialValuesType | undefined | null;
@@ -19,6 +19,11 @@ interface ServerGridType {
19
19
  headerToolbarStyle?: SxProps;
20
20
  enableEnterToFocus?: boolean;
21
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;
22
27
  }
23
28
  export declare const ServerGrid: import("react").ForwardRefExoticComponent<ServerGridType & import("react").RefAttributes<any>>;
24
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.1",
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
@@ -52,8 +52,9 @@ export default defineConfig({
52
52
  "match-sorter",
53
53
  "axios",
54
54
  "@koale/useworker",
55
- "ag-grid-community",
56
- "ag-grid-react",
55
+ /^ag-grid-community/,
56
+ /^ag-grid-react/,
57
+ /^jotai/,
57
58
  ],
58
59
  plugins: [
59
60
  resolve(),