@acvl/frontend-components 0.0.32 → 0.0.34
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 +184 -182
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/v1/buttons/MoreOptions/index.d.ts +10 -0
- package/dist/cjs/types/src/components/v1/buttons/index.d.ts +7 -6
- package/dist/cjs/types/src/components/v1/drawers/MainDrawer/index.d.ts +1 -1
- package/dist/cjs/types/src/components/v1/forms/utils.d.ts +2 -2
- package/dist/cjs/types/src/components/v1/inputs/controlled/ControlledFileField/index.d.ts +15 -0
- package/dist/cjs/types/src/components/v1/inputs/controlled/index.d.ts +13 -13
- package/dist/cjs/types/src/components/v1/layout/pages/DetailPage/FieldArrayField/index.d.ts +7 -2
- package/dist/cjs/types/src/components/v1/layout/pages/DetailPage/index.d.ts +2 -1
- package/dist/esm/index.js +190 -188
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/v1/buttons/MoreOptions/index.d.ts +10 -0
- package/dist/esm/types/src/components/v1/buttons/index.d.ts +7 -6
- package/dist/esm/types/src/components/v1/drawers/MainDrawer/index.d.ts +1 -1
- package/dist/esm/types/src/components/v1/forms/utils.d.ts +2 -2
- package/dist/esm/types/src/components/v1/inputs/controlled/ControlledFileField/index.d.ts +15 -0
- package/dist/esm/types/src/components/v1/inputs/controlled/index.d.ts +13 -13
- package/dist/esm/types/src/components/v1/layout/pages/DetailPage/FieldArrayField/index.d.ts +7 -2
- package/dist/esm/types/src/components/v1/layout/pages/DetailPage/index.d.ts +2 -1
- package/dist/index.d.ts +42 -21
- package/package.json +1 -1
- package/dist/cjs/types/src/components/v1/inputs/controlled/ControlledPhotoField/index.d.ts +0 -6
- package/dist/esm/types/src/components/v1/inputs/controlled/ControlledPhotoField/index.d.ts +0 -6
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface MoreOptionsProps {
|
|
3
|
+
options: {
|
|
4
|
+
title: string;
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
}[];
|
|
8
|
+
}
|
|
9
|
+
declare const MoreOptions: (props: MoreOptionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default MoreOptions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export { default as ButtonWithDrawer } from
|
|
1
|
+
export * from "./NormalOrIcon";
|
|
2
|
+
export * from "./EditButton";
|
|
3
|
+
export * from "./DeleteButton";
|
|
4
|
+
export * from "./SaveCancelButton";
|
|
5
|
+
export * from "./CreateButton";
|
|
6
|
+
export { default as ButtonWithDrawer } from "./ButtonWithDrawer";
|
|
7
|
+
export { default as MoreOptions } from "./MoreOptions";
|
|
@@ -8,11 +8,11 @@ export interface JSONParserProps {
|
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
export interface JSONFormProps {
|
|
11
|
+
type?: "json" | "formData";
|
|
11
12
|
submitData: any;
|
|
12
13
|
data?: any;
|
|
13
14
|
useLabel?: boolean;
|
|
14
15
|
props?: JSONParserProps;
|
|
15
16
|
}
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const formDataForm: ({ submitData, data, useLabel, props }: JSONFormProps) => FormData;
|
|
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,15 @@
|
|
|
1
|
+
import { BaseControlledFieldProps } from "../types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ButtonProps } from "@mui/material";
|
|
4
|
+
export interface ControlledFileFieldProps extends BaseControlledFieldProps {
|
|
5
|
+
extraProps?: {
|
|
6
|
+
slotProps?: {
|
|
7
|
+
input?: {
|
|
8
|
+
accept?: string;
|
|
9
|
+
};
|
|
10
|
+
button?: Partial<ButtonProps>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const ControlledFileField: React.FC<ControlledFileFieldProps>;
|
|
15
|
+
export default ControlledFileField;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { default as ControlledDate } from
|
|
2
|
-
export { default as ControlledDropdown } from
|
|
3
|
-
export { default as ControlledFileUploadBox } from
|
|
4
|
-
export { default as ControlledNumber } from
|
|
5
|
-
export { default as ControlledPhoneNumber } from
|
|
6
|
-
export { default as ControlledSelect } from
|
|
7
|
-
export { default as ControlledSlider } from
|
|
8
|
-
export { default as ControlledSwitch } from
|
|
9
|
-
export { default as ControlledText } from
|
|
10
|
-
export { default as ControlledToggleButtons } from
|
|
11
|
-
export { default as ControlledTimePicker } from
|
|
12
|
-
export { default as
|
|
13
|
-
export { default as ControlledSimpleSlider } from
|
|
1
|
+
export { default as ControlledDate } from "./ControlledDate";
|
|
2
|
+
export { default as ControlledDropdown } from "./ControlledDropdown";
|
|
3
|
+
export { default as ControlledFileUploadBox } from "./ControlledFileUploadBox";
|
|
4
|
+
export { default as ControlledNumber } from "./ControlledNumber";
|
|
5
|
+
export { default as ControlledPhoneNumber } from "./ControlledPhoneNumber";
|
|
6
|
+
export { default as ControlledSelect } from "./ControlledSelect";
|
|
7
|
+
export { default as ControlledSlider } from "./ControlledSlider";
|
|
8
|
+
export { default as ControlledSwitch } from "./ControlledSwitch";
|
|
9
|
+
export { default as ControlledText } from "./ControlledText";
|
|
10
|
+
export { default as ControlledToggleButtons } from "./ControlledToggleButtons";
|
|
11
|
+
export { default as ControlledTimePicker } from "./ControlledTimePicker";
|
|
12
|
+
export { default as ControlledFileField } from "./ControlledFileField";
|
|
13
|
+
export { default as ControlledSimpleSlider } from "./ControlledSimpleSlider";
|
|
@@ -2,10 +2,11 @@ import { DataGridProps } from "@mui/x-data-grid";
|
|
|
2
2
|
import { GridProps } from "@mui/material";
|
|
3
3
|
import { PageType } from "../../../../types";
|
|
4
4
|
import { JSONParserProps } from "../../../../forms";
|
|
5
|
+
import { FieldProps } from "../Field";
|
|
6
|
+
import { MainDrawerProps } from "../../../../drawers/MainDrawer";
|
|
5
7
|
declare module "@mui/x-data-grid" {
|
|
6
8
|
interface ToolbarPropsOverrides {
|
|
7
|
-
|
|
8
|
-
handleDelete: () => void;
|
|
9
|
+
handleClick: () => void;
|
|
9
10
|
pageType: PageType;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
@@ -20,6 +21,10 @@ export interface ArrayFieldProps {
|
|
|
20
21
|
gridProps?: GridProps;
|
|
21
22
|
pageType?: PageType;
|
|
22
23
|
parser?: JSONParserProps;
|
|
24
|
+
fields: FieldProps[];
|
|
25
|
+
slotProps?: {
|
|
26
|
+
drawer?: Partial<MainDrawerProps>;
|
|
27
|
+
};
|
|
23
28
|
}
|
|
24
29
|
declare const FieldArrayField: (props: ArrayFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
30
|
export default FieldArrayField;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from "@mui/material";
|
|
2
|
-
import { ReactNode } from "react";
|
|
2
|
+
import { ReactNode, RefObject } from "react";
|
|
3
3
|
import { SectionProps } from "./Section";
|
|
4
4
|
import { PageType } from "../../../types";
|
|
5
5
|
export interface DetailPageProps {
|
|
@@ -63,5 +63,6 @@ export interface DetailPageProps {
|
|
|
63
63
|
};
|
|
64
64
|
fieldName: string;
|
|
65
65
|
};
|
|
66
|
+
ref?: RefObject<any>;
|
|
66
67
|
}
|
|
67
68
|
export default function DetailPage(props: DetailPageProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _mui_material from '@mui/material';
|
|
2
|
-
import { ButtonProps, ButtonGroupProps, AlertProps, BoxProps, AutocompleteProps, SliderProps, SwitchProps, GridProps,
|
|
2
|
+
import { ButtonProps, ButtonGroupProps, AlertProps, BoxProps, AutocompleteProps, SliderProps, SwitchProps, GridProps, DrawerProps, MenuProps, IconButtonProps, PaletteColorOptions } from '@mui/material';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { ReactNode, Dispatch, SetStateAction, JSX, RefObject } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -92,6 +92,15 @@ interface ButtonWithDrawerProps {
|
|
|
92
92
|
}
|
|
93
93
|
declare const ButtonWithDrawer: React__default.FC<ButtonWithDrawerProps>;
|
|
94
94
|
|
|
95
|
+
interface MoreOptionsProps {
|
|
96
|
+
options: {
|
|
97
|
+
title: string;
|
|
98
|
+
icon: ReactNode;
|
|
99
|
+
onClick: () => void;
|
|
100
|
+
}[];
|
|
101
|
+
}
|
|
102
|
+
declare const MoreOptions: (props: MoreOptionsProps) => react_jsx_runtime.JSX.Element;
|
|
103
|
+
|
|
95
104
|
interface StatusBadgeProps {
|
|
96
105
|
severity?: AlertProps['severity'];
|
|
97
106
|
title: string;
|
|
@@ -162,13 +171,13 @@ interface JSONParserProps {
|
|
|
162
171
|
};
|
|
163
172
|
}
|
|
164
173
|
interface JSONFormProps {
|
|
174
|
+
type?: "json" | "formData";
|
|
165
175
|
submitData: any;
|
|
166
176
|
data?: any;
|
|
167
177
|
useLabel?: boolean;
|
|
168
178
|
props?: JSONParserProps;
|
|
169
179
|
}
|
|
170
|
-
declare const
|
|
171
|
-
declare const formDataForm: ({ submitData, data, useLabel, props }: JSONFormProps) => FormData;
|
|
180
|
+
declare const formParser: ({ type, submitData, data, useLabel, props, }: JSONFormProps) => any;
|
|
172
181
|
declare const setErrors: (form: any, error: any) => void;
|
|
173
182
|
|
|
174
183
|
declare const valueLabel: zod.ZodObject<{
|
|
@@ -459,9 +468,17 @@ interface Props$3 {
|
|
|
459
468
|
}
|
|
460
469
|
declare const ControlledTimePicker: (props: Props$3) => react_jsx_runtime.JSX.Element;
|
|
461
470
|
|
|
462
|
-
interface
|
|
471
|
+
interface ControlledFileFieldProps extends BaseControlledFieldProps {
|
|
472
|
+
extraProps?: {
|
|
473
|
+
slotProps?: {
|
|
474
|
+
input?: {
|
|
475
|
+
accept?: string;
|
|
476
|
+
};
|
|
477
|
+
button?: Partial<ButtonProps>;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
463
480
|
}
|
|
464
|
-
declare const
|
|
481
|
+
declare const ControlledFileField: React__default.FC<ControlledFileFieldProps>;
|
|
465
482
|
|
|
466
483
|
interface ControlledSliderProps extends BaseControlledFieldProps {
|
|
467
484
|
fieldProps?: Partial<SliderProps>;
|
|
@@ -535,10 +552,22 @@ interface FieldProps {
|
|
|
535
552
|
readOnly?: boolean;
|
|
536
553
|
}
|
|
537
554
|
|
|
555
|
+
interface MainDrawerProps {
|
|
556
|
+
open: boolean;
|
|
557
|
+
drawerToggle: () => void;
|
|
558
|
+
title: string;
|
|
559
|
+
children: ReactNode;
|
|
560
|
+
drawerProps?: DrawerProps;
|
|
561
|
+
width?: number | string;
|
|
562
|
+
slots?: {
|
|
563
|
+
button?: ReactNode;
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
declare const MainDrawer: React__default.FC<MainDrawerProps>;
|
|
567
|
+
|
|
538
568
|
declare module "@mui/x-data-grid" {
|
|
539
569
|
interface ToolbarPropsOverrides {
|
|
540
|
-
|
|
541
|
-
handleDelete: () => void;
|
|
570
|
+
handleClick: () => void;
|
|
542
571
|
pageType: PageType;
|
|
543
572
|
}
|
|
544
573
|
}
|
|
@@ -553,6 +582,10 @@ interface ArrayFieldProps {
|
|
|
553
582
|
gridProps?: GridProps;
|
|
554
583
|
pageType?: PageType;
|
|
555
584
|
parser?: JSONParserProps;
|
|
585
|
+
fields: FieldProps[];
|
|
586
|
+
slotProps?: {
|
|
587
|
+
drawer?: Partial<MainDrawerProps>;
|
|
588
|
+
};
|
|
556
589
|
}
|
|
557
590
|
|
|
558
591
|
interface SectionProps {
|
|
@@ -633,6 +666,7 @@ interface DetailPageProps {
|
|
|
633
666
|
};
|
|
634
667
|
fieldName: string;
|
|
635
668
|
};
|
|
669
|
+
ref?: RefObject<any>;
|
|
636
670
|
}
|
|
637
671
|
declare function DetailPage(props: DetailPageProps): react_jsx_runtime.JSX.Element;
|
|
638
672
|
|
|
@@ -798,19 +832,6 @@ interface ObjectProgressStackProps {
|
|
|
798
832
|
}
|
|
799
833
|
declare const ObjectProgressStack: React__default.FC<ObjectProgressStackProps>;
|
|
800
834
|
|
|
801
|
-
interface MainDrawerProps {
|
|
802
|
-
open: boolean;
|
|
803
|
-
drawerToggle: () => void;
|
|
804
|
-
title: string;
|
|
805
|
-
children: ReactNode;
|
|
806
|
-
drawerProps?: DrawerProps;
|
|
807
|
-
width?: number | string;
|
|
808
|
-
slots?: {
|
|
809
|
-
button?: ReactNode;
|
|
810
|
-
};
|
|
811
|
-
}
|
|
812
|
-
declare const MainDrawer: React__default.FC<MainDrawerProps>;
|
|
813
|
-
|
|
814
835
|
interface _HistorialDrawerProps {
|
|
815
836
|
open: boolean;
|
|
816
837
|
handleDrawer: () => void;
|
|
@@ -862,5 +883,5 @@ declare module '@mui/material/styles' {
|
|
|
862
883
|
}
|
|
863
884
|
declare const theme: () => _mui_material.Theme;
|
|
864
885
|
|
|
865
|
-
export { APIContext, APIProvider, ActiveCell, Base, ButtonWithDrawer, CSVUpload, ContentLayout, ControlledDate, ControlledDropdown, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber,
|
|
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 };
|
|
866
887
|
export type { APIcontextProps, ComoOpcionesProps, CustomToolbarProps, DeleteGridColumnsProps, EditGridColumnsProps, EditReadOnlyFields, FieldFilter, FieldProps, FieldValidationProps, GridArgs, GridColDefPropsOverrides, JSONFormProps, JSONParserProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, PageType };
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BaseControlledFieldProps } from "../types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface ControlledPhotoFieldProps extends BaseControlledFieldProps {
|
|
4
|
-
}
|
|
5
|
-
declare const ControlledPhotoField: React.FC<ControlledPhotoFieldProps>;
|
|
6
|
-
export default ControlledPhotoField;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BaseControlledFieldProps } from "../types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface ControlledPhotoFieldProps extends BaseControlledFieldProps {
|
|
4
|
-
}
|
|
5
|
-
declare const ControlledPhotoField: React.FC<ControlledPhotoFieldProps>;
|
|
6
|
-
export default ControlledPhotoField;
|