@acuteinfo/common-base 1.0.83 → 1.0.85

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.
@@ -1,10 +1,11 @@
1
1
  import { ColDef, ICellEditorParams } from "ag-grid-community";
2
- export interface CustomColumnMeta extends Partial<ColDef> {
3
- accessor: string;
4
- columnName: string;
2
+ import { GridYupSchemaMetaDataType } from "components/dataTableStatic";
3
+ export interface AgGridMetaData extends Partial<ColDef> {
4
+ accessor?: string;
5
+ columnName?: string;
5
6
  componentType?: ColDef["cellEditor"];
6
7
  displayComponentType?: ColDef["cellRenderer"];
7
- FormatProps?: ICellEditorParams;
8
+ FormatProps?: Record<string, any>;
8
9
  className?: string;
9
10
  headerTooltip?: string;
10
11
  shouldExclude?: (params: any) => boolean;
@@ -12,13 +13,17 @@ export interface CustomColumnMeta extends Partial<ColDef> {
12
13
  isVisible?: boolean;
13
14
  isReadOnly?: boolean | ((params: any) => boolean);
14
15
  options?: any;
16
+ alignment?: "left" | "center" | "right";
17
+ schemaValidation?: GridYupSchemaMetaDataType;
18
+ validate?: (params: ICellEditorParams) => string;
19
+ name?: string;
15
20
  __EDIT__?: {
16
- isReadOnly?: boolean;
21
+ isReadOnly?: boolean | ((params: any) => boolean);
17
22
  };
18
23
  __VIEW__?: {
19
- isReadOnly?: boolean;
24
+ isReadOnly?: boolean | ((params: any) => boolean);
20
25
  };
21
26
  __NEW__?: {
22
- isReadOnly?: boolean;
27
+ isReadOnly?: boolean | ((params: any) => boolean);
23
28
  };
24
29
  }
@@ -1,4 +1,4 @@
1
1
  import { ColDef } from "ag-grid-community";
2
- import { CustomColumnMeta } from "../types";
3
- declare function transformToAgGridColumn(metaData: (CustomColumnMeta | ColDef)[], i18n: any): ColDef[];
2
+ import { AgGridMetaData } from "../types";
3
+ declare function transformToAgGridColumn(metaData: (AgGridMetaData | ColDef)[], i18n: any): ColDef[];
4
4
  export default transformToAgGridColumn;
@@ -8,6 +8,7 @@ import { UseFieldHookProps } from "packages/form";
8
8
  import { Merge, OptionsProps, dependentOptionsFn } from "../types";
9
9
  import { ChipProps } from "@mui/material/Chip";
10
10
  import { SxProps } from "@mui/material/styles";
11
+ import { GridColumnType } from "components/dataTableStatic";
11
12
  export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"root">;
12
13
  interface AutoCompleteExtendedProps {
13
14
  enableGrid: boolean;
@@ -37,6 +38,7 @@ interface AutoCompleteExtendedProps {
37
38
  defaultValueKey?: string;
38
39
  listBoxMinWidth?: number;
39
40
  setValueOnDependentFieldsChange?: any;
41
+ optionsGridColDef?: Record<string, Partial<GridColumnType>>;
40
42
  }
41
43
  type MyAutocompleteProps = Merge<AutocompleteProps<OptionsProps, true, true, true>, AutoCompleteExtendedProps>;
42
44
  export type MyAllAutocompleteProps = Merge<MyAutocompleteProps, UseFieldHookProps>;
@@ -0,0 +1,6 @@
1
+ declare const OptionsGrid: ({ handleClose, options, optionsGridColDef }: {
2
+ handleClose: any;
3
+ options: any;
4
+ optionsGridColDef: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default OptionsGrid;
@@ -1,4 +1,4 @@
1
- export declare const useOptionsFetcher: (formState: any, options: any, setOptions: any, handleChangeInterceptor: any, dependentValues: any, incomingMessage: any, runValidation: any, whenToRunValidation: any, _optionsKey: any, disableCaching: any, setIncomingMessage: any, skipDefaultOption: any, defaultOptionLabel: any, enableDefaultOption: any) => {
1
+ export declare const useOptionsFetcher: (formState: any, options: any, setOptions: any, handleChangeInterceptor: any, dependentValues: any, incomingMessage: any, runValidation: any, whenToRunValidation: any, _optionsKey: any, disableCaching: any, setIncomingMessage: any, skipDefaultOption: any, defaultOptionLabel: any, enableDefaultOption: any, setGridProps?: Function | undefined) => {
2
2
  loadingOptions: boolean;
3
3
  };
4
4
  /****** ---- */
@@ -85,6 +85,11 @@ export interface CustomProperties {
85
85
  */
86
86
  enablePdfPrint?: boolean;
87
87
  };
88
+ /**
89
+ * Opens options grid on pressing f9 for autocomplete field
90
+ * @default true
91
+ */
92
+ enableOptionsGridForAutocomplete?: boolean;
88
93
  }
89
94
  interface ContextProps {
90
95
  config?: CustomProperties;
@@ -1,4 +1,4 @@
1
1
  import { InitialValuesType } from "packages/form";
2
2
  import { FieldMetaDataType } from "../types";
3
3
  export declare const constructInitialValue: (fields: FieldMetaDataType[], initialValues?: InitialValuesType) => {};
4
- export declare const constructInitialValuesForArrayFields: (fields: FieldMetaDataType[]) => {};
4
+ export declare const constructInitialValuesForArrayFields: (fields: FieldMetaDataType[], formState?: any, authState?: any) => {};
package/dist/index.d.ts CHANGED
@@ -60,3 +60,4 @@ export * from "./components/context/propertiesConfig/customProperties";
60
60
  export { AuthContextProvider } from "./components/context/authContext/authContext";
61
61
  export { AgGridTableWrapper } from "./components/agGridTable";
62
62
  export { getAgGridSRNo, customCellAggFunc, parseDate, findLastDisplayColumn, findFirstDisplayColumn, getGridRowData, removeExistingRowData, dynamicRowHeight, displayNumber, lessThanDate, setErrorMessage, handleDeleteButtonClick, } from "./components/agGridTable/utils/helper";
63
+ export type { AgGridMetaData } from "./components/agGridTable/types";