@zydon/common 2.4.98 → 2.5.0
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.js +2 -2
- package/dist/components/EasyCropModal/index.js +2 -2
- package/dist/components/FileUpload/index.js +2 -2
- package/dist/components/form/UploadAvatarWithCrop/index.js +3 -3
- package/dist/components/form/UploadWithCrop/index.js +3 -3
- package/dist/components/upload/index.js +3 -3
- package/dist/hooks/useIsVisible.d.ts +3 -0
- package/dist/hooks/useIsVisible.js +5 -0
- package/package.json +1 -1
- package/dist/{chunk-JY5CJQSA.js → chunk-6GEASWVI.js} +1 -1
- package/dist/{chunk-24VAKKNR.js → chunk-JEX3SO7Q.js} +1 -1
- package/dist/{chunk-BHFIVY73.js → chunk-XBU7CMPL.js} +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as a$4 } from '../../chunk-CNMWNRJP.js';
|
|
2
|
+
import { a as a$9 } from '../../chunk-5YJTSVA2.js';
|
|
2
3
|
import { a as a$5 } from '../../chunk-TWGGHTU5.js';
|
|
3
4
|
import { a as a$3 } from '../../chunk-HOMGLSVS.js';
|
|
4
|
-
import { a as a$9 } from '../../chunk-5YJTSVA2.js';
|
|
5
5
|
import { a } from '../../chunk-CFD2VTQ3.js';
|
|
6
6
|
import { a as a$8 } from '../../chunk-JTD47UZZ.js';
|
|
7
7
|
import { a as a$6 } from '../../chunk-FK7DDO5L.js';
|
|
@@ -24,6 +24,6 @@ import { styled, alpha } from '@mui/material/styles';
|
|
|
24
24
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
25
25
|
import { GridToolbarFilterButton, GridToolbarColumnsButton } from '@mui/x-data-grid-premium';
|
|
26
26
|
|
|
27
|
-
var P="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)}})),U=styled(d,{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"}})),Q=styled(d,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({flexDirection:"row",alignItems:"center",gap:12,color:o.palette.text.secondary,[o.breakpoints.down(r)]:{"& button, & a":{textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:0}}}})),q=styled(j)({borderStyle:"dashed",height:16,margin:"auto"}),b=styled(j)({borderStyle:"dashed",height:12,marginTop:"auto",marginBottom:"auto"}),J=styled(d,{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:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:0}}}}})),K=styled(d,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({width:320,alignItems:"center",justifyContent:"center",[o.breakpoints.down(r)]:{
|
|
27
|
+
var P="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)}})),U=styled(d,{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"}})),Q=styled(d,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({flexDirection:"row",alignItems:"center",gap:12,color:o.palette.text.secondary,[o.breakpoints.down(r)]:{"& button, & a":{textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:0}}}})),q=styled(j)({borderStyle:"dashed",height:16,margin:"auto"}),b=styled(j)({borderStyle:"dashed",height:12,marginTop:"auto",marginBottom:"auto"}),J=styled(d,{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:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:0}}}}})),K=styled(d,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:r})=>({width:320,alignItems:"center",justifyContent:"center",[o.breakpoints.down(r)]:{position:"absolute",left:0,width:"100%",padding:"0 12px",zIndex:1,"& fieldset, & input":{display:"flex"},"& .MuiInputAdornment-root":{marginLeft:0}}})),X=styled(d)(({theme:o})=>({"& .MuiToolbar-root":{height:24,minHeight:24,overflow:"hidden",[o.breakpoints.down("sm")]:{height:"auto",flexWrap:"wrap",justifyContent:"center"}}})),Y=styled(d)(({theme:o})=>({minHeight:60,alignItems:"flex-end",justifyContent:"center",borderTop:`1px solid ${o.palette.divider}`})),Z=styled(d)(({theme:o})=>({flexDirection:"row",height:60,alignItems:"center",justifyContent:"space-between",borderTop:`1px solid ${o.palette.divider}`,gap:16,padding:16}));var Po=({count:o,page:r,rowsPerPage:l,onPageChange:m,onRowsPerPageChange:w})=>jsx(X,{children:jsx(ho,{color:"primary",component:"div",size:"small",count:o,page:r,rowsPerPage:l,onPageChange:(c,n)=>m(n),onRowsPerPageChange:c=>w(Number(c.target.value))})}),y=Po;var wo=forwardRef(({children:o,...r},l)=>jsx(ro,{...r,ref:l,color:"inherit",startIcon:jsx(a$1,{icon:"COLUMNS"}),children:o??"Colunas"}));wo.displayName="ColumnsButton";var Co=forwardRef(({children:o,...r},l)=>jsx(ro,{...r,ref:l,color:"inherit",startIcon:jsx(a$1,{icon:"FILTER_VERTICAL"}),children:o??"Filtros"}));Co.displayName="FilterButton";var vo=({setFilterButtonEl:o})=>jsxs(a$9,{container:P,children:[jsx(GridToolbarFilterButton,{ref:o,slotProps:{button:{color:"inherit",startIcon:jsx(a$1,{icon:"FILTER_VERTICAL"}),children:"Filtros"}}}),jsx(b,{orientation:"vertical",flexItem:!0}),jsx(GridToolbarColumnsButton,{slotProps:{button:{color:"inherit",startIcon:jsx(a$1,{icon:"COLUMNS"}),children:"Colunas"}}})]}),eo=vo;var So=({title:o,breakpoint:r="md",columns:l,rows:m=[],mobileRender:w,rowCount:c=0,paginationModel:n={page:0,pageSize:25},onPaginationChange:g,actions:T,moreActions:D,onAdd:S,onSearch:B,searchValue:ao,onSearchChange:po,slots:C,slotProps:so,loading:u,fetching:k,containerProps:lo={height:562,maxHeight:562},...mo})=>{let f=a$2(),h=b$1("down",r),[co,uo]=useState(null),A=!!B,v=!!S,R=!!T,go=R||v,F=!!D,E=F||A||!h;return jsxs($,{breakpoint:r,...lo,flex:u?1:void 0,minHeight:!u&&m.length===0?562:void 0,children:[jsxs(U,{breakpoint:r,children:[jsx(x,{variant:"overline",color:"text.secondary",noWrap:!0,children:o}),go&&jsxs(Q,{breakpoint:r,children:[R&&jsxs(Fragment,{children:[T,v&&jsx(q,{orientation:"vertical",flexItem:!0})]}),v&&jsx(ro,{startIcon:jsx(a$1,{icon:"SIMPLE_ADD"}),variant:"contained",onClick:S,children:"Adicionar"})]})]}),E&&jsxs(J,{breakpoint:r,children:[jsx(d,{flex:1,direction:"row",alignItems:"center",id:P,gap:.5,children:F&&jsxs(Fragment,{children:[jsx(ro,{color:"inherit",startIcon:jsx(a$1,{icon:"MORE_BOLD"}),size:"small",onClick:f.onOpen,children:"Mais"}),!h&&jsx(b,{orientation:"vertical",flexItem:!0}),jsx(a$3,{open:f.open,anchorEl:f.open,onClose:f.onClose,sx:{minWidth:160},disabledArrow:h,children:D})]})}),A&&jsx(K,{breakpoint:r,children:jsx(a$4,{value:ao,placeholder:"Buscar",onSearch:B,onChange:e=>po?.(e.target.value),size:"small",fullWidth:!0,iconPosition:"start"})})]}),!E&&jsx(j,{sx:{mt:2}}),h?jsxs(a$5,{isFetching:k,fetching:jsx(a$6,{}),isLoading:u,loading:jsx(To,{sx:{m:"160px auto"}}),isEmpty:m.length===0,empty:jsx(d,{flex:1,alignItems:"center",justifyContent:"center",children:C?.noRowsOverlay?jsx(C.noRowsOverlay,{}):jsx(x,{variant:"body2",color:"text.secondary",children:"Nenhum registro encontrado"})}),children:[jsx(a$7,{fillContent:!0,children:m.map(e=>w(e))}),jsx(Y,{children:jsx(y,{count:c,page:n.page,rowsPerPage:n.pageSize,onPageChange:e=>g(e,n.pageSize),onRowsPerPageChange:e=>g(n.page,e)})})]}):jsx(a$8,{columns:l,rows:m,slots:{toolbar:eo,footer:()=>jsxs(Z,{children:[jsxs(d,{direction:"row",alignItems:"center",gap:.5,children:[jsx(x,{variant:"body2",color:"text.disabled",children:"Total de itens:"}),jsx(x,{variant:"body2",children:c})]}),jsx(y,{count:c,page:n.page,rowsPerPage:n.pageSize,onPageChange:e=>g(e,n.pageSize),onRowsPerPageChange:e=>g(n.page,e)})]}),...C},slotProps:{panel:{anchorEl:co},toolbar:{setFilterButtonEl:uo,showQuickFilter:!0},...so},columnHeaderHeight:48,getRowHeight:()=>68,loading:u,fetching:k,...mo})]},u?"loading":"data")},ut=So;
|
|
28
28
|
|
|
29
29
|
export { ut as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-INWICD33.js';
|
|
1
|
+
export { a as default } from '../../chunk-JEX3SO7Q.js';
|
|
3
2
|
import '../../chunk-XSYQAWOD.js';
|
|
3
|
+
import '../../chunk-INWICD33.js';
|
|
4
4
|
import '../../chunk-I6Y6PKTA.js';
|
|
5
5
|
import '../../chunk-75E6MEWM.js';
|
|
@@ -3,9 +3,9 @@ import { e } from '../../chunk-ANAHA3L6.js';
|
|
|
3
3
|
import { a as a$3 } from '../../chunk-IPOTBSM7.js';
|
|
4
4
|
import { a } from '../../chunk-OFA5VB7M.js';
|
|
5
5
|
import { f } from '../../chunk-NANDXKZD.js';
|
|
6
|
-
import { a as a$5 } from '../../chunk-
|
|
7
|
-
import '../../chunk-INWICD33.js';
|
|
6
|
+
import { a as a$5 } from '../../chunk-JEX3SO7Q.js';
|
|
8
7
|
import '../../chunk-XSYQAWOD.js';
|
|
8
|
+
import '../../chunk-INWICD33.js';
|
|
9
9
|
import { a as a$2 } from '../../chunk-7R3XV4AP.js';
|
|
10
10
|
import { x } from '../../chunk-2P4CXK3O.js';
|
|
11
11
|
import { a as a$7 } from '../../chunk-FK7DDO5L.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { b } from '../../../chunk-
|
|
1
|
+
import { b } from '../../../chunk-XBU7CMPL.js';
|
|
2
2
|
import '../../../chunk-4VAXJ4XM.js';
|
|
3
3
|
import '../../../chunk-YFT2GBNW.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
5
5
|
import '../../../chunk-ANAHA3L6.js';
|
|
6
6
|
import '../../../chunk-INWICD33.js';
|
|
7
7
|
import '../../../chunk-D27ND54J.js';
|
|
8
|
+
import '../../../chunk-X24QANPC.js';
|
|
8
9
|
import '../../../chunk-I6Y6PKTA.js';
|
|
9
10
|
import '../../../chunk-75E6MEWM.js';
|
|
10
11
|
import '../../../chunk-KFZEM7KS.js';
|
|
11
|
-
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
12
|
-
import '../../../chunk-X24QANPC.js';
|
|
13
12
|
import '../../../chunk-W3MYAMTH.js';
|
|
13
|
+
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
14
14
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
15
15
|
import W from '@mui/material/FormHelperText';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e } from '../../../chunk-
|
|
1
|
+
import { e } from '../../../chunk-6GEASWVI.js';
|
|
2
2
|
import '../../../chunk-4VAXJ4XM.js';
|
|
3
3
|
import '../../../chunk-YFT2GBNW.js';
|
|
4
4
|
import '../../../chunk-T7I256S6.js';
|
|
@@ -9,14 +9,14 @@ import '../../../chunk-7R3XV4AP.js';
|
|
|
9
9
|
import '../../../chunk-2P4CXK3O.js';
|
|
10
10
|
import '../../../chunk-FK7DDO5L.js';
|
|
11
11
|
import '../../../chunk-D27ND54J.js';
|
|
12
|
+
import '../../../chunk-X24QANPC.js';
|
|
12
13
|
import '../../../chunk-DMQW3LDF.js';
|
|
13
14
|
import '../../../chunk-I6Y6PKTA.js';
|
|
14
15
|
import '../../../chunk-75E6MEWM.js';
|
|
15
16
|
import '../../../chunk-ILHUUK4X.js';
|
|
16
17
|
import '../../../chunk-KFZEM7KS.js';
|
|
17
|
-
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
18
|
-
import '../../../chunk-X24QANPC.js';
|
|
19
18
|
import '../../../chunk-W3MYAMTH.js';
|
|
19
|
+
import { a } from '../../../chunk-GA4A5P3S.js';
|
|
20
20
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
21
21
|
import b from '@mui/material/FormHelperText';
|
|
22
22
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-
|
|
2
|
-
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-
|
|
1
|
+
export { a as UploadAvatar, b as UploadAvatarWithCrop } from '../../chunk-XBU7CMPL.js';
|
|
2
|
+
export { c as DeleteButton, a as MultiFilePreview, b as SingleFilePreview, d as Upload, e as UploadWithCrop } from '../../chunk-6GEASWVI.js';
|
|
3
3
|
import { o } from '../../chunk-4VAXJ4XM.js';
|
|
4
4
|
export { p as RejectionFiles } from '../../chunk-4VAXJ4XM.js';
|
|
5
5
|
import '../../chunk-YFT2GBNW.js';
|
|
@@ -11,12 +11,12 @@ import '../../chunk-7R3XV4AP.js';
|
|
|
11
11
|
import '../../chunk-2P4CXK3O.js';
|
|
12
12
|
import '../../chunk-FK7DDO5L.js';
|
|
13
13
|
import '../../chunk-D27ND54J.js';
|
|
14
|
+
import '../../chunk-X24QANPC.js';
|
|
14
15
|
import '../../chunk-DMQW3LDF.js';
|
|
15
16
|
import '../../chunk-I6Y6PKTA.js';
|
|
16
17
|
import '../../chunk-75E6MEWM.js';
|
|
17
18
|
import '../../chunk-ILHUUK4X.js';
|
|
18
19
|
import '../../chunk-KFZEM7KS.js';
|
|
19
|
-
import '../../chunk-X24QANPC.js';
|
|
20
20
|
import '../../chunk-W3MYAMTH.js';
|
|
21
21
|
import { useDropzone } from 'react-dropzone';
|
|
22
22
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
var b=()=>{let[t,r]=useState(!1),e=useRef(null),o=useCallback(n=>{if(e.current?.disconnect(),e.current=null,!n||typeof IntersectionObserver>"u")return;let s=new IntersectionObserver(([l])=>{r(l.isIntersecting);},{threshold:0});s.observe(n),e.current=s;},[]);return useEffect(()=>()=>e.current?.disconnect(),[]),[o,t]},a=b;
|
|
4
|
+
|
|
5
|
+
export { a as default };
|
package/package.json
CHANGED
|
@@ -6,10 +6,10 @@ import { a as a$7 } from './chunk-7R3XV4AP.js';
|
|
|
6
6
|
import { x } from './chunk-2P4CXK3O.js';
|
|
7
7
|
import { a as a$4 } from './chunk-FK7DDO5L.js';
|
|
8
8
|
import { i, o } from './chunk-D27ND54J.js';
|
|
9
|
+
import { a as a$2 } from './chunk-X24QANPC.js';
|
|
9
10
|
import { j } from './chunk-DMQW3LDF.js';
|
|
10
11
|
import { a } from './chunk-I6Y6PKTA.js';
|
|
11
12
|
import { a as a$3 } from './chunk-KFZEM7KS.js';
|
|
12
|
-
import { a as a$2 } from './chunk-X24QANPC.js';
|
|
13
13
|
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
|
|
14
14
|
import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
|
15
15
|
import { sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
|
|
@@ -2,9 +2,9 @@ import { p, f } from './chunk-4VAXJ4XM.js';
|
|
|
2
2
|
import { a as a$3 } from './chunk-YFT2GBNW.js';
|
|
3
3
|
import { e } from './chunk-ANAHA3L6.js';
|
|
4
4
|
import { i } from './chunk-D27ND54J.js';
|
|
5
|
+
import { a as a$1 } from './chunk-X24QANPC.js';
|
|
5
6
|
import { a } from './chunk-I6Y6PKTA.js';
|
|
6
7
|
import { a as a$2 } from './chunk-KFZEM7KS.js';
|
|
7
|
-
import { a as a$1 } from './chunk-X24QANPC.js';
|
|
8
8
|
import { useState, useEffect } from 'react';
|
|
9
9
|
import { useDropzone } from 'react-dropzone';
|
|
10
10
|
import U from '@mui/material/Box';
|