@acvl/frontend-components 0.0.33 → 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.
@@ -1,6 +1,6 @@
1
1
  import { DrawerProps } from "@mui/material";
2
2
  import React, { ReactNode } from "react";
3
- interface MainDrawerProps {
3
+ export interface MainDrawerProps {
4
4
  open: boolean;
5
5
  drawerToggle: () => void;
6
6
  title: string;
@@ -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 }: JSONFormProps) => any;
17
+ export declare const formParser: ({ type, submitData, data, useLabel, props, }: JSONFormProps) => any;
18
18
  export declare const setErrors: (form: any, error: any) => void;
@@ -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
- handleCreate: () => void;
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;
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, MenuProps, DrawerProps, IconButtonProps, PaletteColorOptions } from '@mui/material';
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';
@@ -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 }: JSONFormProps) => any;
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<{
@@ -552,10 +552,22 @@ interface FieldProps {
552
552
  readOnly?: boolean;
553
553
  }
554
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
+
555
568
  declare module "@mui/x-data-grid" {
556
569
  interface ToolbarPropsOverrides {
557
- handleCreate: () => void;
558
- handleDelete: () => void;
570
+ handleClick: () => void;
559
571
  pageType: PageType;
560
572
  }
561
573
  }
@@ -570,6 +582,10 @@ interface ArrayFieldProps {
570
582
  gridProps?: GridProps;
571
583
  pageType?: PageType;
572
584
  parser?: JSONParserProps;
585
+ fields: FieldProps[];
586
+ slotProps?: {
587
+ drawer?: Partial<MainDrawerProps>;
588
+ };
573
589
  }
574
590
 
575
591
  interface SectionProps {
@@ -816,19 +832,6 @@ interface ObjectProgressStackProps {
816
832
  }
817
833
  declare const ObjectProgressStack: React__default.FC<ObjectProgressStackProps>;
818
834
 
819
- interface MainDrawerProps {
820
- open: boolean;
821
- drawerToggle: () => void;
822
- title: string;
823
- children: ReactNode;
824
- drawerProps?: DrawerProps;
825
- width?: number | string;
826
- slots?: {
827
- button?: ReactNode;
828
- };
829
- }
830
- declare const MainDrawer: React__default.FC<MainDrawerProps>;
831
-
832
835
  interface _HistorialDrawerProps {
833
836
  open: boolean;
834
837
  handleDrawer: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acvl/frontend-components",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "Component library for ACV frontend projects.",
5
5
  "homepage": "https://github.com/ACV-Logistics/acv-frontend-components#readme",
6
6
  "access": "public",