@acvl/frontend-components 0.0.34 → 0.0.36
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/cjs/index.js +231 -41
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/v1/datagrids/wrappers/CreateGridWrapper.d.ts +6 -0
- package/dist/cjs/types/src/components/v1/forms/utils.d.ts +1 -1
- package/dist/cjs/types/src/components/v1/inputs/controlled/CrudDropdown/index.d.ts +18 -0
- package/dist/cjs/types/src/components/v1/inputs/controlled/index.d.ts +1 -0
- package/dist/cjs/types/src/components/v1/lib/context/APIContext.d.ts +3 -2
- package/dist/cjs/types/src/components/v1/theme/compStyleOverride.d.ts +15 -12
- package/dist/esm/index.js +233 -44
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/v1/datagrids/wrappers/CreateGridWrapper.d.ts +6 -0
- package/dist/esm/types/src/components/v1/forms/utils.d.ts +1 -1
- package/dist/esm/types/src/components/v1/inputs/controlled/CrudDropdown/index.d.ts +18 -0
- package/dist/esm/types/src/components/v1/inputs/controlled/index.d.ts +1 -0
- package/dist/esm/types/src/components/v1/lib/context/APIContext.d.ts +3 -2
- package/dist/esm/types/src/components/v1/theme/compStyleOverride.d.ts +15 -12
- package/dist/index.d.ts +25 -3
- package/package.json +1 -1
|
@@ -6,7 +6,13 @@ export interface CSVMenuOptionProps {
|
|
|
6
6
|
custom?: string;
|
|
7
7
|
icon?: any;
|
|
8
8
|
}
|
|
9
|
+
export interface ExtraCreateOptionProps {
|
|
10
|
+
title: string;
|
|
11
|
+
icon: any;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
}
|
|
9
14
|
export interface CreateGridAPIProps {
|
|
15
|
+
extraOptions?: ExtraCreateOptionProps[];
|
|
10
16
|
csv_upload?: {
|
|
11
17
|
enable: boolean;
|
|
12
18
|
extraOptions?: CSVMenuOptionProps[];
|
|
@@ -14,5 +14,5 @@ export interface JSONFormProps {
|
|
|
14
14
|
useLabel?: boolean;
|
|
15
15
|
props?: JSONParserProps;
|
|
16
16
|
}
|
|
17
|
-
export declare const formParser: ({ type, submitData, data, useLabel, props
|
|
17
|
+
export declare const formParser: ({ type, submitData, data, useLabel, props }: JSONFormProps) => any;
|
|
18
18
|
export declare const setErrors: (form: any, error: any) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { AutocompleteProps } from "@mui/material";
|
|
3
|
+
import { ComoOpcionesProps } from "../../../types";
|
|
4
|
+
export interface CrudDropdownProps {
|
|
5
|
+
name: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
control: any;
|
|
8
|
+
fieldProps?: Partial<AutocompleteProps<any, any, any, any>>;
|
|
9
|
+
extraProps: {
|
|
10
|
+
queryArgs: ComoOpcionesProps;
|
|
11
|
+
crudExtraArgs?: Record<string, any>;
|
|
12
|
+
/** API field name for the display label. Default: "nombre" */
|
|
13
|
+
labelField?: string;
|
|
14
|
+
disableHT?: boolean;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const CrudDropdown: React.FC<CrudDropdownProps>;
|
|
18
|
+
export default CrudDropdown;
|
|
@@ -11,3 +11,4 @@ export { default as ControlledToggleButtons } from "./ControlledToggleButtons";
|
|
|
11
11
|
export { default as ControlledTimePicker } from "./ControlledTimePicker";
|
|
12
12
|
export { default as ControlledFileField } from "./ControlledFileField";
|
|
13
13
|
export { default as ControlledSimpleSlider } from "./ControlledSimpleSlider";
|
|
14
|
+
export { default as CrudDropdown } from "./CrudDropdown";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
export interface APIcontextProps {
|
|
3
3
|
useLazyGetComoOpcionesQuery: any;
|
|
4
4
|
useLazyGetHistorialQuery: any;
|
|
@@ -6,9 +6,10 @@ export interface APIcontextProps {
|
|
|
6
6
|
useValidarCSVMutation: any;
|
|
7
7
|
useSubirCSVMutation: any;
|
|
8
8
|
useRemoverCSVMutation: any;
|
|
9
|
+
useGenericCrudMutation: any;
|
|
9
10
|
}
|
|
10
11
|
declare const APIContext: import("react").Context<APIcontextProps | null>;
|
|
11
|
-
export declare const APIProvider: ({ children, hooks }: {
|
|
12
|
+
export declare const APIProvider: ({ children, hooks, }: {
|
|
12
13
|
children: ReactNode;
|
|
13
14
|
hooks: APIcontextProps;
|
|
14
15
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cambia el diseño default de ciertos componentes de Material UI
|
|
3
|
-
**/
|
|
3
|
+
**/
|
|
4
4
|
export default function componentStyleOverrides(theme: any): {
|
|
5
5
|
MuiAlert: {
|
|
6
6
|
defaultProps: {
|
|
@@ -10,12 +10,12 @@ export default function componentStyleOverrides(theme: any): {
|
|
|
10
10
|
MuiListItemButton: {
|
|
11
11
|
styleOverrides: {
|
|
12
12
|
root: {
|
|
13
|
-
|
|
13
|
+
"&:hover": {
|
|
14
14
|
backgroundColor: string;
|
|
15
|
-
|
|
15
|
+
"& .MuiTypography-root": {
|
|
16
16
|
color: string;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
"& .MuiSvgIcon-root": {
|
|
19
19
|
color: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -25,35 +25,38 @@ export default function componentStyleOverrides(theme: any): {
|
|
|
25
25
|
MuiDataGrid: {
|
|
26
26
|
styleOverrides: {
|
|
27
27
|
columnHeader: {
|
|
28
|
-
|
|
28
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
29
29
|
fontWeight: string;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
"&:focus": {
|
|
32
32
|
outline: string;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
row: {
|
|
36
|
+
"&.row-error": {
|
|
37
|
+
backgroundColor: "#ffcdd2";
|
|
38
|
+
};
|
|
36
39
|
"&.even": {
|
|
37
40
|
backgroundColor: "#fafafa";
|
|
38
41
|
};
|
|
39
|
-
|
|
42
|
+
"&:hover": {
|
|
40
43
|
backgroundColor: string;
|
|
41
|
-
|
|
44
|
+
"@media (hover: none)": {
|
|
42
45
|
backgroundColor: string;
|
|
43
46
|
};
|
|
44
47
|
};
|
|
45
48
|
};
|
|
46
49
|
cell: {
|
|
47
|
-
|
|
50
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
48
51
|
border: string;
|
|
49
52
|
};
|
|
50
|
-
|
|
53
|
+
"&.MuiDataGrid-cell--editing": {
|
|
51
54
|
backgroundColor: string;
|
|
52
|
-
|
|
55
|
+
"& .MuiInputBase-root": {
|
|
53
56
|
height: string;
|
|
54
57
|
};
|
|
55
58
|
};
|
|
56
|
-
|
|
59
|
+
"& .Mui-error": {
|
|
57
60
|
backgroundColor: string;
|
|
58
61
|
color: string;
|
|
59
62
|
fontWeight: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -177,7 +177,7 @@ interface JSONFormProps {
|
|
|
177
177
|
useLabel?: boolean;
|
|
178
178
|
props?: JSONParserProps;
|
|
179
179
|
}
|
|
180
|
-
declare const formParser: ({ type, submitData, data, useLabel, props
|
|
180
|
+
declare const formParser: ({ type, submitData, data, useLabel, props }: JSONFormProps) => any;
|
|
181
181
|
declare const setErrors: (form: any, error: any) => void;
|
|
182
182
|
|
|
183
183
|
declare const valueLabel: zod.ZodObject<{
|
|
@@ -243,7 +243,13 @@ interface CSVMenuOptionProps {
|
|
|
243
243
|
custom?: string;
|
|
244
244
|
icon?: any;
|
|
245
245
|
}
|
|
246
|
+
interface ExtraCreateOptionProps {
|
|
247
|
+
title: string;
|
|
248
|
+
icon: any;
|
|
249
|
+
onClick: () => void;
|
|
250
|
+
}
|
|
246
251
|
interface CreateGridAPIProps {
|
|
252
|
+
extraOptions?: ExtraCreateOptionProps[];
|
|
247
253
|
csv_upload?: {
|
|
248
254
|
enable: boolean;
|
|
249
255
|
extraOptions?: CSVMenuOptionProps[];
|
|
@@ -485,6 +491,21 @@ interface ControlledSliderProps extends BaseControlledFieldProps {
|
|
|
485
491
|
}
|
|
486
492
|
declare const ControlledSlider: React__default.FC<ControlledSliderProps>;
|
|
487
493
|
|
|
494
|
+
interface CrudDropdownProps {
|
|
495
|
+
name: string;
|
|
496
|
+
label?: string;
|
|
497
|
+
control: any;
|
|
498
|
+
fieldProps?: Partial<AutocompleteProps<any, any, any, any>>;
|
|
499
|
+
extraProps: {
|
|
500
|
+
queryArgs: ComoOpcionesProps;
|
|
501
|
+
crudExtraArgs?: Record<string, any>;
|
|
502
|
+
/** API field name for the display label. Default: "nombre" */
|
|
503
|
+
labelField?: string;
|
|
504
|
+
disableHT?: boolean;
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
declare const CrudDropdown: React__default.FC<CrudDropdownProps>;
|
|
508
|
+
|
|
488
509
|
interface UncontrolledTextProps {
|
|
489
510
|
name: string;
|
|
490
511
|
label: string;
|
|
@@ -751,9 +772,10 @@ interface APIcontextProps {
|
|
|
751
772
|
useValidarCSVMutation: any;
|
|
752
773
|
useSubirCSVMutation: any;
|
|
753
774
|
useRemoverCSVMutation: any;
|
|
775
|
+
useGenericCrudMutation: any;
|
|
754
776
|
}
|
|
755
777
|
declare const APIContext: React.Context<APIcontextProps | null>;
|
|
756
|
-
declare const APIProvider: ({ children, hooks }: {
|
|
778
|
+
declare const APIProvider: ({ children, hooks, }: {
|
|
757
779
|
children: ReactNode;
|
|
758
780
|
hooks: APIcontextProps;
|
|
759
781
|
}) => react_jsx_runtime.JSX.Element;
|
|
@@ -883,5 +905,5 @@ declare module '@mui/material/styles' {
|
|
|
883
905
|
}
|
|
884
906
|
declare const theme: () => _mui_material.Theme;
|
|
885
907
|
|
|
886
|
-
export { APIContext, APIProvider, ActiveCell, Base, ButtonWithDrawer, CSVUpload, ContentLayout, ControlledDate, ControlledDropdown, ControlledFileField, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber, ControlledSelect, ControlledSlider as ControlledSimpleSlider, ControlledSlider$1 as ControlledSlider, ControlledSwitch, ControlledText, ControlledTimePicker, ControlledToggleButtons, CoverPage, CreateButtonBase, CreateButtonWithMenuOptions, DeleteButton, DeleteConfirmationDialog, DetailPage, EditButton, ExportCSV, HistorialDrawer, ListPage, Loadable, LoadingComponent, Logo, MainDrawer, MenuItemWithLoading, ModuleCard, MoreOptions, MyGridEditSingleSelect, NavigationContext, NavigationProvider, NormalOrIcon, NotAllowed, NotFound, ObjectProgressStack, SaveCancelButton, StatusBadge, StyledMenu, Tabs, Transitions, UncontrolledText, changeTitle, closeProgressSnack, deleteColumn, editColumn, filterQuery, formParser, _default as headerReducer, manualCacheRefresh, mergeSettings, openProgressSnack, query, renderEditCellWithErrorTooltip, setErrors, _default$1 as snackProgressReducer, tags, theme, updateProgressSnackData, useAPI, useHasPermission, useNavigation, valueLabel };
|
|
908
|
+
export { APIContext, APIProvider, ActiveCell, Base, ButtonWithDrawer, CSVUpload, ContentLayout, ControlledDate, ControlledDropdown, ControlledFileField, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber, ControlledSelect, ControlledSlider as ControlledSimpleSlider, ControlledSlider$1 as ControlledSlider, ControlledSwitch, ControlledText, ControlledTimePicker, ControlledToggleButtons, CoverPage, CreateButtonBase, CreateButtonWithMenuOptions, CrudDropdown, DeleteButton, DeleteConfirmationDialog, DetailPage, EditButton, ExportCSV, HistorialDrawer, ListPage, Loadable, LoadingComponent, Logo, MainDrawer, MenuItemWithLoading, ModuleCard, MoreOptions, MyGridEditSingleSelect, NavigationContext, NavigationProvider, NormalOrIcon, NotAllowed, NotFound, ObjectProgressStack, SaveCancelButton, StatusBadge, StyledMenu, Tabs, Transitions, UncontrolledText, changeTitle, closeProgressSnack, deleteColumn, editColumn, filterQuery, formParser, _default as headerReducer, manualCacheRefresh, mergeSettings, openProgressSnack, query, renderEditCellWithErrorTooltip, setErrors, _default$1 as snackProgressReducer, tags, theme, updateProgressSnackData, useAPI, useHasPermission, useNavigation, valueLabel };
|
|
887
909
|
export type { APIcontextProps, ComoOpcionesProps, CustomToolbarProps, DeleteGridColumnsProps, EditGridColumnsProps, EditReadOnlyFields, FieldFilter, FieldProps, FieldValidationProps, GridArgs, GridColDefPropsOverrides, JSONFormProps, JSONParserProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, PageType };
|
package/package.json
CHANGED