@acvl/frontend-components 0.0.15 → 0.0.16
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 +9 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/v1/badges/StatusBadge/StatusBadge.d.ts +4 -1
- package/dist/cjs/types/src/components/v1/datagrids/wrappers/CreateGridWrapper.d.ts +1 -0
- package/dist/esm/index.js +9 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/v1/badges/StatusBadge/StatusBadge.d.ts +4 -1
- package/dist/esm/types/src/components/v1/datagrids/wrappers/CreateGridWrapper.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { AlertProps } from "@mui/material";
|
|
1
|
+
import { AlertProps, BoxProps } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
3
|
interface StatusBadgeProps {
|
|
4
4
|
severity?: AlertProps['severity'];
|
|
5
5
|
title: string;
|
|
6
|
+
slotProps?: {
|
|
7
|
+
box?: Partial<BoxProps>;
|
|
8
|
+
};
|
|
6
9
|
}
|
|
7
10
|
declare const StatusBadge: React.FC<StatusBadgeProps>;
|
|
8
11
|
export default StatusBadge;
|
|
@@ -16,6 +16,7 @@ export interface CreateGridWrapperProps extends CreateGridAPIProps {
|
|
|
16
16
|
renderFunction: (props: any) => JSX.Element;
|
|
17
17
|
dataGridProps?: Partial<MyDataGridProps>;
|
|
18
18
|
pathname: string;
|
|
19
|
+
navigation?: string;
|
|
19
20
|
}
|
|
20
21
|
declare const CreateGridWrapper: (props: CreateGridWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export default CreateGridWrapper;
|
package/dist/esm/index.js
CHANGED
|
@@ -26763,7 +26763,7 @@ const StatusBadge = (props) => {
|
|
|
26763
26763
|
}
|
|
26764
26764
|
}, [props?.severity]);
|
|
26765
26765
|
if (props)
|
|
26766
|
-
return (jsx(Box, { display: 'flex', justifyContent: 'center', alignItems: 'center', border: 4, borderRadius: 1, borderColor: color[800], bgcolor: color[100], height: 1, minWidth: 100, px: 1, children: jsx(Typography$1, { fontWeight: 'bold', sx: {
|
|
26766
|
+
return (jsx(Box, { display: 'flex', justifyContent: 'center', alignItems: 'center', border: 4, borderRadius: 1, borderColor: color[800], bgcolor: color[100], height: 1, minWidth: 100, px: 1, ...props.slotProps?.box, children: jsx(Typography$1, { fontWeight: 'bold', sx: {
|
|
26767
26767
|
color: color[900]
|
|
26768
26768
|
}, children: props.title }) }));
|
|
26769
26769
|
return null;
|
|
@@ -27566,7 +27566,7 @@ const CreateGridWrapper = (props) => {
|
|
|
27566
27566
|
handleClose();
|
|
27567
27567
|
}, disableRipple: true, children: option.title }, index));
|
|
27568
27568
|
})), jsx(MenuItem, { onClick: () => {
|
|
27569
|
-
navigate(`crear`);
|
|
27569
|
+
navigate(props.navigation ? `${props.navigation}crear` : `crear`);
|
|
27570
27570
|
handleClose();
|
|
27571
27571
|
}, disableRipple: true, children: "Manual" })] }), props.csv_upload?.enable && (jsx(CSVUpload, { open: csv.open, drawerToggle: handleToggleClose, data: csv.data })), props.renderFunction({ dataGridProps: createGridProps })] }));
|
|
27572
27572
|
};
|
|
@@ -27773,6 +27773,7 @@ const Base = (props) => {
|
|
|
27773
27773
|
permission: data?.permissions?.create,
|
|
27774
27774
|
renderFunction: renderFunction,
|
|
27775
27775
|
pathname: props.pathname,
|
|
27776
|
+
navigation: props.slotProps?.navigation,
|
|
27776
27777
|
...renderProps,
|
|
27777
27778
|
...props.api.create
|
|
27778
27779
|
};
|
|
@@ -27915,6 +27916,12 @@ const DetailField = (props) => {
|
|
|
27915
27916
|
if (props.fieldData)
|
|
27916
27917
|
return map(props.fieldData, function (item) { return item.label; }).join(', ');
|
|
27917
27918
|
}
|
|
27919
|
+
else if (props.type.name == 'ControlledDate') {
|
|
27920
|
+
if (props.fieldData) {
|
|
27921
|
+
if (props.extraProps.type == 'datetime')
|
|
27922
|
+
return dayjs(props.fieldData).format('YYYY-MM-DD HH:mm');
|
|
27923
|
+
}
|
|
27924
|
+
}
|
|
27918
27925
|
else {
|
|
27919
27926
|
if (props.fieldData) {
|
|
27920
27927
|
if (props.detail_name) {
|