@zydon/common 2.4.58 → 2.4.60
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.
|
@@ -10,17 +10,17 @@ import '../../chunk-D27ND54J.js';
|
|
|
10
10
|
import { a as a$1 } from '../../chunk-YQ6K2DEP.js';
|
|
11
11
|
import '../../chunk-CHLVIVDD.js';
|
|
12
12
|
import { a as a$2 } from '../../chunk-ORYAES3Q.js';
|
|
13
|
-
import { b
|
|
13
|
+
import { b } from '../../chunk-ILHUUK4X.js';
|
|
14
14
|
import { forwardRef, useState } from 'react';
|
|
15
15
|
import K from '@mui/material/Button';
|
|
16
16
|
import z from '@mui/material/Divider';
|
|
17
|
-
import
|
|
17
|
+
import p from '@mui/material/Stack';
|
|
18
18
|
import x from '@mui/material/Typography';
|
|
19
19
|
import co from '@mui/material/TablePagination';
|
|
20
20
|
import { styled, alpha } from '@mui/material/styles';
|
|
21
21
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
22
22
|
import { GridToolbarFilterButton, GridToolbarColumnsButton } from '@mui/x-data-grid-premium';
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var f="datagrid-actions";var W=styled(a,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:t})=>({position:"relative",borderRadius:12,padding:0,gap:0,overflow:"hidden",[o.breakpoints.down(t)]:{borderColor:alpha(o.palette.grey[500],.2)}})),N=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"24px 24px 0",gap:24,[o.breakpoints.down(t)]:{padding:"16px 16px 0"}})),O=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:t})=>({flexDirection:"row",alignItems:"center",gap:12,color:o.palette.text.secondary,[o.breakpoints.down(t)]:{"& button":{textIndent:"-9999px",minWidth:36,maxWidth:36,height:36,width:36,"& .MuiButton-icon":{margin:0}}}})),_=styled(z)({borderStyle:"dashed",height:16,margin:"auto"}),h=styled(z)({borderStyle:"dashed",height:12,marginTop:"auto",marginBottom:"auto"}),V=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:t})=>({position:"relative",padding:16,flexDirection:"row",alignItems:"center",color:o.palette.text.secondary,[o.breakpoints.down(t)]:{padding:"12px 16px",borderBottom:`1px solid ${o.palette.divider}`,height:60,[o.breakpoints.down(t)]:{"& button":{textIndent:"-9999px",minWidth:36,maxWidth:36,height:36,width:36,"& .MuiButton-icon":{margin:0}}}}})),j=styled(p,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:t})=>({width:320,alignItems:"center",justifyContent:"center",[o.breakpoints.down(t)]:{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}}}})),$=styled(p)({"& .MuiToolbar-root":{height:24,minHeight:24,overflow:"hidden"}}),Q=styled(p)(({theme:o})=>({height:60,alignItems:"flex-end",justifyContent:"center",borderTop:`1px solid ${o.palette.divider}`})),U=styled(p)(({theme:o})=>({flexDirection:"row",height:60,alignItems:"center",justifyContent:"space-between",borderTop:`1px solid ${o.palette.divider}`,gap:16,padding:16}));var uo=({count:o,page:t,rowsPerPage:b,onPageChange:m,onRowsPerPageChange:P})=>jsx($,{children:jsx(co,{color:"primary",component:"div",size:"small",count:o,page:t,rowsPerPage:b,onPageChange:(l,n)=>m(n),onRowsPerPageChange:l=>P(Number(l.target.value))})}),w=uo;var X=forwardRef((o,t)=>jsx(K,{...o,ref:t,color:"inherit",startIcon:jsx(a$1,{icon:"COLUMNS"}),children:"Colunas"}));X.displayName="ColumnsButton";var Y=forwardRef((o,t)=>jsx(K,{...o,ref:t,color:"inherit",startIcon:jsx(a$1,{icon:"FILTER_VERTICAL"}),children:"Filtros"}));Y.displayName="FilterButton";var ho=({setFilterButtonEl:o})=>jsxs(a$6,{container:f,children:[jsx(GridToolbarFilterButton,{ref:o,slotProps:{button:{component:Y,color:"inherit"}}}),jsx(h,{orientation:"vertical",flexItem:!0}),jsx(GridToolbarColumnsButton,{slotProps:{button:{component:X,color:"inherit"}}})]}),Z=ho;var xo=({title:o,breakpoint:t="md",columns:b$1,rows:m=[],mobileRender:P,rowCount:l=0,paginationModel:n={page:0,pageSize:25},onPaginationChange:c,actions:D,moreActions:T,onAdd:v,onSearch:I,searchValue:ro,onSearchChange:eo,slots:no,slotProps:io,...ao})=>{let u=a$2(),g=b("down",t),[po,so]=useState(null),y=!!I,B=!!v,S=!!D,lo=S||B,k=!!T,A=k||y||!g;return jsxs(W,{breakpoint:t,children:[jsxs(N,{breakpoint:t,children:[jsx(x,{variant:"overline",color:"text.secondary",noWrap:!0,children:o}),lo&&jsxs(O,{breakpoint:t,children:[S&&jsxs(Fragment,{children:[D,jsx(_,{orientation:"vertical",flexItem:!0})]}),B&&jsx(K,{startIcon:jsx(a$1,{icon:"SIMPLE_ADD"}),variant:"contained",onClick:v,children:"Adicionar"})]})]}),A&&jsxs(V,{breakpoint:t,children:[jsx(p,{flex:1,direction:"row",alignItems:"center",id:f,gap:.5,children:k&&jsxs(Fragment,{children:[jsx(K,{color:"inherit",startIcon:jsx(a$1,{icon:"MORE_BOLD"}),size:"small",onClick:u.onOpen,children:"Mais"}),!g&&jsx(h,{orientation:"vertical",flexItem:!0}),jsx(a$3,{open:u.open,anchorEl:u.open,onClose:u.onClose,sx:{minWidth:160},disabledArrow:g,children:T})]})}),y&&jsx(j,{breakpoint:t,children:jsx(a$4,{value:ro,placeholder:"Buscar",onSearch:I,onChange:e=>eo?.(e.target.value),size:"small",fullWidth:!0,iconPosition:"start"})})]}),!A&&jsx(z,{sx:{mt:2}}),g?jsxs(Fragment,{children:[m.map(e=>P(e)),jsx(Q,{children:jsx(w,{count:l,page:n.page,rowsPerPage:n.pageSize,onPageChange:e=>c(e,n.pageSize),onRowsPerPageChange:e=>c(n.page,e)})})]}):jsx(a$5,{columns:b$1,rows:m,slots:{toolbar:Z,footer:()=>jsxs(U,{children:[jsxs(p,{direction:"row",alignItems:"center",gap:.5,children:[jsx(x,{variant:"body2",color:"text.disabled",children:"Total de itens:"}),jsx(x,{variant:"body2",children:l})]}),jsx(w,{count:l,page:n.page,rowsPerPage:n.pageSize,onPageChange:e=>c(e,n.pageSize),onRowsPerPageChange:e=>c(n.page,e)})]}),...no},slotProps:{panel:{anchorEl:po},toolbar:{setFilterButtonEl:so,showQuickFilter:!0},...io},columnHeaderHeight:48,getRowHeight:()=>68,...ao})]})},tt=xo;
|
|
25
25
|
|
|
26
26
|
export { tt 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 ((string & {}) | csstype.Globals | "normal"
|
|
446
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | 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;
|