@zydon/common 2.4.62 → 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.
- package/dist/components/DataView/index.d.ts +3 -1
- package/dist/components/DataView/index.js +13 -10
- package/dist/components/SelectableCards/index.js +2 -2
- package/dist/components/SwapList/index.js +1 -1
- package/dist/components/form/SelectableCards/index.js +2 -2
- package/package.json +1 -1
- package/dist/{chunk-FM5E5MVW.js → chunk-3IGXAQXD.js} +1 -1
|
@@ -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,26 +1,29 @@
|
|
|
1
1
|
import { a as a$4 } from '../../chunk-MPKHVDQH.js';
|
|
2
|
+
import { a as a$5 } from '../../chunk-TWGGHTU5.js';
|
|
2
3
|
import { a as a$3 } from '../../chunk-HOMGLSVS.js';
|
|
3
|
-
import { a as a$
|
|
4
|
+
import { a as a$9 } from '../../chunk-5YJTSVA2.js';
|
|
4
5
|
import { a } from '../../chunk-CFD2VTQ3.js';
|
|
5
|
-
import { a as a$
|
|
6
|
-
import '../../chunk-FK7DDO5L.js';
|
|
6
|
+
import { a as a$8 } from '../../chunk-JTD47UZZ.js';
|
|
7
|
+
import { a as a$6 } from '../../chunk-FK7DDO5L.js';
|
|
7
8
|
import '../../chunk-PUR4ARBY.js';
|
|
8
9
|
import '../../chunk-U26IUEAG.js';
|
|
9
10
|
import '../../chunk-D27ND54J.js';
|
|
11
|
+
import { a as a$7 } from '../../chunk-E5MGOPPQ.js';
|
|
10
12
|
import { a as a$1 } from '../../chunk-YQ6K2DEP.js';
|
|
11
13
|
import '../../chunk-CHLVIVDD.js';
|
|
12
14
|
import { a as a$2 } from '../../chunk-ORYAES3Q.js';
|
|
13
|
-
import { b } from '../../chunk-ILHUUK4X.js';
|
|
15
|
+
import { b as b$1 } from '../../chunk-ILHUUK4X.js';
|
|
14
16
|
import { forwardRef, useState } from 'react';
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
+
import ro from '@mui/material/Button';
|
|
18
|
+
import Do from '@mui/material/CircularProgress';
|
|
19
|
+
import V from '@mui/material/Divider';
|
|
17
20
|
import p from '@mui/material/Stack';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
21
|
+
import P from '@mui/material/Typography';
|
|
22
|
+
import Po from '@mui/material/TablePagination';
|
|
20
23
|
import { styled, alpha } from '@mui/material/styles';
|
|
21
24
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
22
25
|
import { GridToolbarFilterButton, GridToolbarColumnsButton } from '@mui/x-data-grid-premium';
|
|
23
26
|
|
|
24
|
-
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;
|
|
25
28
|
|
|
26
|
-
export {
|
|
29
|
+
export { ct as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-TWGGHTU5.js';
|
|
1
|
+
export { a as default } from '../../chunk-3IGXAQXD.js';
|
|
3
2
|
import '../../chunk-4ZBE3RNR.js';
|
|
4
3
|
import '../../chunk-MPKHVDQH.js';
|
|
4
|
+
import '../../chunk-TWGGHTU5.js';
|
|
5
5
|
import '../../chunk-U26IUEAG.js';
|
|
6
6
|
import '../../chunk-E5MGOPPQ.js';
|
|
7
7
|
import '../../chunk-YQ6K2DEP.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as a$1 } from '../../chunk-TWGGHTU5.js';
|
|
2
1
|
import { a as a$2 } from '../../chunk-4ZBE3RNR.js';
|
|
3
2
|
import { a } from '../../chunk-MPKHVDQH.js';
|
|
3
|
+
import { a as a$1 } from '../../chunk-TWGGHTU5.js';
|
|
4
4
|
import '../../chunk-U26IUEAG.js';
|
|
5
5
|
import { a as a$3 } from '../../chunk-E5MGOPPQ.js';
|
|
6
6
|
import { a as a$4 } from '../../chunk-YQ6K2DEP.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-TWGGHTU5.js';
|
|
1
|
+
import { a } from '../../../chunk-3IGXAQXD.js';
|
|
3
2
|
import '../../../chunk-4ZBE3RNR.js';
|
|
4
3
|
import '../../../chunk-MPKHVDQH.js';
|
|
4
|
+
import '../../../chunk-TWGGHTU5.js';
|
|
5
5
|
import '../../../chunk-U26IUEAG.js';
|
|
6
6
|
import '../../../chunk-E5MGOPPQ.js';
|
|
7
7
|
import '../../../chunk-YQ6K2DEP.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as a$3 } from './chunk-TWGGHTU5.js';
|
|
2
1
|
import { a as a$4 } from './chunk-4ZBE3RNR.js';
|
|
3
2
|
import { a as a$1 } from './chunk-MPKHVDQH.js';
|
|
3
|
+
import { a as a$3 } from './chunk-TWGGHTU5.js';
|
|
4
4
|
import { a as a$2 } from './chunk-E5MGOPPQ.js';
|
|
5
5
|
import { a as a$5 } from './chunk-YQ6K2DEP.js';
|
|
6
6
|
import { useState } from 'react';
|