@zydon/common 2.4.63 → 2.4.64
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,10 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { StackProps } from '@mui/material/Stack';
|
|
3
4
|
import { Breakpoint } from '@mui/material/styles';
|
|
4
5
|
import { DataGridProps } from '../../types/dataGridProps.js';
|
|
5
6
|
import '@mui/x-data-grid-premium';
|
|
6
7
|
|
|
7
8
|
interface DataViewProps extends DataGridProps {
|
|
9
|
+
containerProps?: StackProps;
|
|
8
10
|
title: string;
|
|
9
11
|
breakpoint?: Breakpoint | number;
|
|
10
12
|
onPaginationChange: (page: number, rowsPerPage: number) => void;
|
|
@@ -17,6 +19,6 @@ interface DataViewProps extends DataGridProps {
|
|
|
17
19
|
onSearchChange?: (value: string) => void;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
declare const DataView: ({ title, breakpoint, columns, rows, mobileRender, rowCount, paginationModel, onPaginationChange, actions, moreActions, onAdd, onSearch, searchValue, onSearchChange, slots, slotProps, loading, fetching, ...others }: DataViewProps) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare const DataView: ({ title, breakpoint, columns, rows, mobileRender, rowCount, paginationModel, onPaginationChange, actions, moreActions, onAdd, onSearch, searchValue, onSearchChange, slots, slotProps, loading, fetching, containerProps, ...others }: DataViewProps) => react_jsx_runtime.JSX.Element;
|
|
21
23
|
|
|
22
24
|
export { DataView as default };
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { a as a$4 } from '../../chunk-MPKHVDQH.js';
|
|
2
2
|
import { a as a$5 } from '../../chunk-TWGGHTU5.js';
|
|
3
3
|
import { a as a$3 } from '../../chunk-HOMGLSVS.js';
|
|
4
|
-
import { a as a$
|
|
4
|
+
import { a as a$9 } from '../../chunk-5YJTSVA2.js';
|
|
5
5
|
import { a } from '../../chunk-CFD2VTQ3.js';
|
|
6
|
-
import { a as a$
|
|
6
|
+
import { a as a$8 } from '../../chunk-JTD47UZZ.js';
|
|
7
7
|
import { a as a$6 } from '../../chunk-FK7DDO5L.js';
|
|
8
8
|
import '../../chunk-PUR4ARBY.js';
|
|
9
9
|
import '../../chunk-U26IUEAG.js';
|
|
10
10
|
import '../../chunk-D27ND54J.js';
|
|
11
|
+
import { a as a$7 } from '../../chunk-E5MGOPPQ.js';
|
|
11
12
|
import { a as a$1 } from '../../chunk-YQ6K2DEP.js';
|
|
12
13
|
import '../../chunk-CHLVIVDD.js';
|
|
13
14
|
import { a as a$2 } from '../../chunk-ORYAES3Q.js';
|
|
14
|
-
import { b } from '../../chunk-ILHUUK4X.js';
|
|
15
|
+
import { b as b$1 } from '../../chunk-ILHUUK4X.js';
|
|
15
16
|
import { forwardRef, useState } from 'react';
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import ro from '@mui/material/Button';
|
|
18
|
+
import Do from '@mui/material/CircularProgress';
|
|
19
|
+
import V from '@mui/material/Divider';
|
|
19
20
|
import p from '@mui/material/Stack';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
21
|
+
import P from '@mui/material/Typography';
|
|
22
|
+
import Po from '@mui/material/TablePagination';
|
|
22
23
|
import { styled, alpha } from '@mui/material/styles';
|
|
23
24
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
24
25
|
import { GridToolbarFilterButton, GridToolbarColumnsButton } from '@mui/x-data-grid-premium';
|
|
25
26
|
|
|
26
|
-
var h="datagrid-actions";var
|
|
27
|
+
var h="datagrid-actions";var $=styled(a,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({position:"relative",borderRadius:12,padding:0,gap:0,overflow:"hidden",[o.breakpoints.down(r)]:{borderColor:alpha(o.palette.grey[500],.2)}})),Q=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"24px 24px 0",gap:24,[o.breakpoints.down(r)]:{padding:"16px 16px 0"}})),U=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({flexDirection:"row",alignItems:"center",gap:12,color:o.palette.text.secondary,[o.breakpoints.down(r)]:{"& button":{textIndent:"-9999px",minWidth:36,maxWidth:36,height:36,width:36,"& .MuiButton-icon":{margin:0}}}})),q=styled(V)({borderStyle:"dashed",height:16,margin:"auto"}),b=styled(V)({borderStyle:"dashed",height:12,marginTop:"auto",marginBottom:"auto"}),J=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({position:"relative",padding:16,flexDirection:"row",alignItems:"center",color:o.palette.text.secondary,[o.breakpoints.down(r)]:{padding:"12px 16px",borderBottom:`1px solid ${o.palette.divider}`,minHeight:60,[o.breakpoints.down(r)]:{"& button":{textIndent:"-9999px",minWidth:36,maxWidth:36,height:36,width:36,"& .MuiButton-icon":{margin:0}}}}})),K=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({width:320,alignItems:"center",justifyContent:"center",[o.breakpoints.down(r)]:{width:36,height:36,"& fieldset, & input":{display:"none"},"& .MuiInputAdornment-root":{marginLeft:-14},"&:hover":{position:"absolute",left:0,width:"100%",padding:"0 12px","& fieldset, & input":{display:"flex"},"& .MuiInputAdornment-root":{marginLeft:0}}}})),X=styled(p)({"& .MuiToolbar-root":{height:24,minHeight:24,overflow:"hidden"}}),Y=styled(p)(({theme:o})=>({minHeight:60,alignItems:"flex-end",justifyContent:"center",borderTop:`1px solid ${o.palette.divider}`})),Z=styled(p)(({theme:o})=>({flexDirection:"row",height:60,alignItems:"center",justifyContent:"space-between",borderTop:`1px solid ${o.palette.divider}`,gap:16,padding:16}));var xo=({count:o,page:r,rowsPerPage:x,onPageChange:l,onRowsPerPageChange:w})=>jsx(X,{children:jsx(Po,{color:"primary",component:"div",size:"small",count:o,page:r,rowsPerPage:x,onPageChange:(m,n)=>l(n),onRowsPerPageChange:m=>w(Number(m.target.value))})}),y=xo;var eo=forwardRef((o,r)=>jsx(ro,{...o,ref:r,color:"inherit",startIcon:jsx(a$1,{icon:"COLUMNS"}),children:"Colunas"}));eo.displayName="ColumnsButton";var no=forwardRef((o,r)=>jsx(ro,{...o,ref:r,color:"inherit",startIcon:jsx(a$1,{icon:"FILTER_VERTICAL"}),children:"Filtros"}));no.displayName="FilterButton";var yo=({setFilterButtonEl:o})=>jsxs(a$9,{container:h,children:[jsx(GridToolbarFilterButton,{ref:o,slotProps:{button:{component:no,color:"inherit"}}}),jsx(b,{orientation:"vertical",flexItem:!0}),jsx(GridToolbarColumnsButton,{slotProps:{button:{component:eo,color:"inherit"}}})]}),io=yo;var So=({title:o,breakpoint:r="md",columns:x,rows:l=[],mobileRender:w,rowCount:m=0,paginationModel:n={page:0,pageSize:25},onPaginationChange:g,actions:T,moreActions:D,onAdd:I,onSearch:S,searchValue:so,onSearchChange:lo,slots:C,slotProps:mo,loading:c,fetching:k,containerProps:co={height:562,maxHeight:562},...go})=>{let u=a$2(),f=b$1("down",r),[uo,fo]=useState(null),B=!!S,A=!!I,R=!!T,ho=R||A,F=!!D,H=F||B||!f;return jsxs($,{breakpoint:r,...co,flex:c?1:void 0,minHeight:!c&&l.length===0?562:void 0,children:[jsxs(Q,{breakpoint:r,children:[jsx(P,{variant:"overline",color:"text.secondary",noWrap:!0,children:o}),ho&&jsxs(U,{breakpoint:r,children:[R&&jsxs(Fragment,{children:[T,jsx(q,{orientation:"vertical",flexItem:!0})]}),A&&jsx(ro,{startIcon:jsx(a$1,{icon:"SIMPLE_ADD"}),variant:"contained",onClick:I,children:"Adicionar"})]})]}),H&&jsxs(J,{breakpoint:r,children:[jsx(p,{flex:1,direction:"row",alignItems:"center",id:h,gap:.5,children:F&&jsxs(Fragment,{children:[jsx(ro,{color:"inherit",startIcon:jsx(a$1,{icon:"MORE_BOLD"}),size:"small",onClick:u.onOpen,children:"Mais"}),!f&&jsx(b,{orientation:"vertical",flexItem:!0}),jsx(a$3,{open:u.open,anchorEl:u.open,onClose:u.onClose,sx:{minWidth:160},disabledArrow:f,children:D})]})}),B&&jsx(K,{breakpoint:r,children:jsx(a$4,{value:so,placeholder:"Buscar",onSearch:S,onChange:e=>lo?.(e.target.value),size:"small",fullWidth:!0,iconPosition:"start"})})]}),!H&&jsx(V,{sx:{mt:2}}),f?jsxs(a$5,{isFetching:k,fetching:jsx(a$6,{}),isLoading:c,loading:jsx(Do,{sx:{m:"160px auto"}}),isEmpty:l.length===0,empty:jsx(p,{flex:1,alignItems:"center",justifyContent:"center",children:C?.noRowsOverlay?jsx(C.noRowsOverlay,{}):jsx(P,{variant:"body2",color:"text.secondary",children:"Nenhum registro encontrado"})}),children:[jsx(a$7,{fillContent:!0,children:l.map(e=>w(e))}),jsx(Y,{children:jsx(y,{count:m,page:n.page,rowsPerPage:n.pageSize,onPageChange:e=>g(e,n.pageSize),onRowsPerPageChange:e=>g(n.page,e)})})]}):jsx(a$8,{columns:x,rows:l,slots:{toolbar:io,footer:()=>jsxs(Z,{children:[jsxs(p,{direction:"row",alignItems:"center",gap:.5,children:[jsx(P,{variant:"body2",color:"text.disabled",children:"Total de itens:"}),jsx(P,{variant:"body2",children:m})]}),jsx(y,{count:m,page:n.page,rowsPerPage:n.pageSize,onPageChange:e=>g(e,n.pageSize),onRowsPerPageChange:e=>g(n.page,e)})]}),...C},slotProps:{panel:{anchorEl:uo},toolbar:{setFilterButtonEl:fo,showQuickFilter:!0},...mo},columnHeaderHeight:48,getRowHeight:()=>68,loading:c,fetching:k,...go})]},c?"loading":"data")},ct=So;
|
|
27
28
|
|
|
28
|
-
export {
|
|
29
|
+
export { ct as default };
|
|
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
443
443
|
wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
|
|
444
444
|
writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
445
445
|
zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
|
|
446
|
-
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly (
|
|
446
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
|
|
447
447
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
448
448
|
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "auto" | "none" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
449
449
|
animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
|