@acvl/frontend-components 0.0.35 → 0.0.37
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 +218 -33
- 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/inputs/controlled/ControlledFileField/index.d.ts +1 -0
- 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/layout/pages/DetailPage/Field/index.d.ts +1 -0
- package/dist/cjs/types/src/components/v1/layout/pages/DetailPage/Section/index.d.ts +1 -1
- package/dist/cjs/types/src/components/v1/lib/context/APIContext.d.ts +3 -2
- package/dist/esm/index.js +220 -36
- 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/inputs/controlled/ControlledFileField/index.d.ts +1 -0
- 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/layout/pages/DetailPage/Field/index.d.ts +1 -0
- package/dist/esm/types/src/components/v1/layout/pages/DetailPage/Section/index.d.ts +1 -1
- package/dist/esm/types/src/components/v1/lib/context/APIContext.d.ts +3 -2
- package/dist/index.d.ts +27 -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[];
|
|
@@ -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";
|
|
@@ -4,7 +4,7 @@ import { ReactNode } from "react";
|
|
|
4
4
|
import { FieldValidationProps, EditReadOnlyFields } from "../types";
|
|
5
5
|
import { PageType } from "../../../../types";
|
|
6
6
|
export interface SectionProps {
|
|
7
|
-
display?: boolean | FieldValidationProps;
|
|
7
|
+
display?: boolean | FieldValidationProps | FieldValidationProps[];
|
|
8
8
|
data?: any;
|
|
9
9
|
form?: any;
|
|
10
10
|
bgColor?: string;
|
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -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[];
|
|
@@ -470,6 +476,7 @@ declare const ControlledTimePicker: (props: Props$3) => react_jsx_runtime.JSX.El
|
|
|
470
476
|
|
|
471
477
|
interface ControlledFileFieldProps extends BaseControlledFieldProps {
|
|
472
478
|
extraProps?: {
|
|
479
|
+
multiple?: boolean;
|
|
473
480
|
slotProps?: {
|
|
474
481
|
input?: {
|
|
475
482
|
accept?: string;
|
|
@@ -485,6 +492,21 @@ interface ControlledSliderProps extends BaseControlledFieldProps {
|
|
|
485
492
|
}
|
|
486
493
|
declare const ControlledSlider: React__default.FC<ControlledSliderProps>;
|
|
487
494
|
|
|
495
|
+
interface CrudDropdownProps {
|
|
496
|
+
name: string;
|
|
497
|
+
label?: string;
|
|
498
|
+
control: any;
|
|
499
|
+
fieldProps?: Partial<AutocompleteProps<any, any, any, any>>;
|
|
500
|
+
extraProps: {
|
|
501
|
+
queryArgs: ComoOpcionesProps;
|
|
502
|
+
crudExtraArgs?: Record<string, any>;
|
|
503
|
+
/** API field name for the display label. Default: "nombre" */
|
|
504
|
+
labelField?: string;
|
|
505
|
+
disableHT?: boolean;
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
declare const CrudDropdown: React__default.FC<CrudDropdownProps>;
|
|
509
|
+
|
|
488
510
|
interface UncontrolledTextProps {
|
|
489
511
|
name: string;
|
|
490
512
|
label: string;
|
|
@@ -542,6 +564,7 @@ interface FieldProps {
|
|
|
542
564
|
fieldName: string;
|
|
543
565
|
value: any;
|
|
544
566
|
method: any;
|
|
567
|
+
showOnDetail?: boolean;
|
|
545
568
|
};
|
|
546
569
|
filters?: FieldFilter[];
|
|
547
570
|
navigation?: {
|
|
@@ -589,7 +612,7 @@ interface ArrayFieldProps {
|
|
|
589
612
|
}
|
|
590
613
|
|
|
591
614
|
interface SectionProps {
|
|
592
|
-
display?: boolean | FieldValidationProps;
|
|
615
|
+
display?: boolean | FieldValidationProps | FieldValidationProps[];
|
|
593
616
|
data?: any;
|
|
594
617
|
form?: any;
|
|
595
618
|
bgColor?: string;
|
|
@@ -751,9 +774,10 @@ interface APIcontextProps {
|
|
|
751
774
|
useValidarCSVMutation: any;
|
|
752
775
|
useSubirCSVMutation: any;
|
|
753
776
|
useRemoverCSVMutation: any;
|
|
777
|
+
useGenericCrudMutation: any;
|
|
754
778
|
}
|
|
755
779
|
declare const APIContext: React.Context<APIcontextProps | null>;
|
|
756
|
-
declare const APIProvider: ({ children, hooks }: {
|
|
780
|
+
declare const APIProvider: ({ children, hooks, }: {
|
|
757
781
|
children: ReactNode;
|
|
758
782
|
hooks: APIcontextProps;
|
|
759
783
|
}) => react_jsx_runtime.JSX.Element;
|
|
@@ -883,5 +907,5 @@ declare module '@mui/material/styles' {
|
|
|
883
907
|
}
|
|
884
908
|
declare const theme: () => _mui_material.Theme;
|
|
885
909
|
|
|
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 };
|
|
910
|
+
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
911
|
export type { APIcontextProps, ComoOpcionesProps, CustomToolbarProps, DeleteGridColumnsProps, EditGridColumnsProps, EditReadOnlyFields, FieldFilter, FieldProps, FieldValidationProps, GridArgs, GridColDefPropsOverrides, JSONFormProps, JSONParserProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, PageType };
|
package/package.json
CHANGED