@zydon/common 2.0.55 → 2.0.57

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,6 +10,6 @@ import M from '@mui/material/Skeleton';
10
10
  import N from '@mui/material/Stack';
11
11
  import { styled } from '@mui/material/styles';
12
12
 
13
- var v=({showToolbar:r,disableExport:e,setFilterButtonEl:i,toolbarContent:n})=>{if(r)return jsxs(GridToolbarContainer,{children:[jsx(GridToolbarColumnsButton,{slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarFilterButton,{ref:i,slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarDensitySelector,{slotProps:{button:{color:"inherit"}}}),!e&&jsx(GridToolbarExport,{slotProps:{button:{color:"inherit"}}}),jsx(R,{sx:{flexGrow:1}}),n]})},S=v;var y=styled(R)({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px"}),A=()=>{let r=useGridApiContext(),{rowHeight:e,paginationModel:i,initialState:n}=useGridRootProps(),m=i?.pageSize||n?.pagination?.paginationModel?.pageSize||10,p=gridColumnsTotalWidthSelector(r),d=gridColumnPositionsSelector(r),g=x.useMemo(()=>d.filter(o=>o<=p).length,[p,d]),l=r.current.getVisibleColumns().slice(0,g),s=l.length>1?l:[...l,...Array.from({length:8},(o,t)=>({field:`fake${String(t+1).padStart(2,"0")}`,headerName:"",computedWidth:250,align:"center"}))],h=x.useMemo(()=>{let o=[];for(let t=0;t<m;t+=1){for(let u of s)o.push(jsx(y,{sx:{justifyContent:u.align},children:jsx(M,{width:"100%"})},`column-${t}-${u.field}`));o.push(jsx(y,{},`fill-${t}`));}return o},[m,s]);return jsx(N,{display:"grid",sx:{display:"grid",gridTemplateColumns:`${s.map(({computedWidth:o})=>`${o}px`).join(" ")} 1fr`,gridAutoRows:e,backgroundColor:"#fff",overflow:"hidden",maxHeight:"100%"},children:h})},G=A;var U=({columns:r,rows:e=[],loading:i,fetching:n,hideFooter:m,sx:p,showToolbar:d,disableExport:g,columnHeaderHeight:l=56,rowHeight:s=76,rowSpacingType:h="margin",getRowSpacing:o=()=>({top:0,bottom:0}),autoHeight:t=!1,toolbarContent:u,...P})=>{let[T,w]=useState(null),k=[{...GRID_CHECKBOX_SELECTION_COL_DEF,width:71},...r];return jsxs(Fragment,{children:[n&&jsx(a,{sx:{zIndex:1}}),jsx(DataGridPremium,{columns:k,rows:e,loading:i,autoHeight:t,hideFooter:e.length===0?!0:m,rowHeight:s,columnHeaderHeight:l,getRowSpacing:o,rowSpacingType:h,slots:{toolbar:S,noRowsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),noResultsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),loadingOverlay:G},slotProps:{panel:{anchorEl:T},toolbar:{setFilterButtonEl:w,showQuickFilter:!0,disableExport:g,showToolbar:d,toolbarContent:u}},sx:p,...P})]})},ho=U;
13
+ var v=({showToolbar:r,disableExport:e,setFilterButtonEl:i,toolbarContent:l})=>{if(r)return jsxs(GridToolbarContainer,{children:[jsx(GridToolbarColumnsButton,{slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarFilterButton,{ref:i,slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarDensitySelector,{slotProps:{button:{color:"inherit"}}}),!e&&jsx(GridToolbarExport,{slotProps:{button:{color:"inherit"}}}),jsx(R,{sx:{flexGrow:1}}),l]})},S=v;var y=styled(R)({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px"}),A=()=>{let r=useGridApiContext(),{rowHeight:e,paginationModel:i,initialState:l}=useGridRootProps(),m=i?.pageSize||l?.pagination?.paginationModel?.pageSize||10,p=gridColumnsTotalWidthSelector(r),d=gridColumnPositionsSelector(r),g=x.useMemo(()=>d.filter(o=>o<=p).length,[p,d]),n=r.current.getVisibleColumns().slice(0,g),s=n.length>1?n:[...n,...Array.from({length:8},(o,t)=>({field:`fake${String(t+1).padStart(2,"0")}`,headerName:"",computedWidth:200,align:"flex-start"}))],h=x.useMemo(()=>{let o=[];for(let t=0;t<m;t+=1){for(let u of s)o.push(jsx(y,{sx:{justifyContent:u.align},children:jsx(M,{width:"100%"})},`column-${t}-${u.field}`));o.push(jsx(y,{},`fill-${t}`));}return o},[m,s]);return jsx(N,{display:"grid",sx:{display:"grid",gridTemplateColumns:`${s.map(({computedWidth:o})=>`${o}px`).join(" ")} 1fr`,gridAutoRows:e,backgroundColor:"#fff",overflow:"hidden",maxHeight:"100%"},children:h})},G=A;var U=({columns:r,rows:e=[],loading:i,fetching:l,hideFooter:m,sx:p,showToolbar:d,disableExport:g,columnHeaderHeight:n=56,rowHeight:s=76,rowSpacingType:h="margin",getRowSpacing:o=()=>({top:0,bottom:0}),autoHeight:t=!1,toolbarContent:u,...P})=>{let[T,w]=useState(null),k=[{...GRID_CHECKBOX_SELECTION_COL_DEF,width:71},...r];return jsxs(Fragment,{children:[l&&jsx(a,{sx:{zIndex:1}}),jsx(DataGridPremium,{columns:k,rows:e,loading:i,autoHeight:t,hideFooter:e.length===0?!0:m,rowHeight:s,columnHeaderHeight:n,getRowSpacing:o,rowSpacingType:h,slots:{toolbar:S,noRowsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),noResultsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),loadingOverlay:G},slotProps:{panel:{anchorEl:T},toolbar:{setFilterButtonEl:w,showQuickFilter:!0,disableExport:g,showToolbar:d,toolbarContent:u}},sx:p,...P})]})},ho=U;
14
14
 
15
15
  export { ho as default };
@@ -1,7 +1,7 @@
1
1
  import { DateRangePicker } from '@mui/x-date-pickers-pro';
2
- import o from 'dayjs';
2
+ import r from 'dayjs';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
- var p=({label:a,value:e,onChange:l,tabIndex:n,helperText:D,required:s,...r})=>jsx(DateRangePicker,{format:"DD/MM/YYYY",value:[e?.startDate?o(e.startDate):null,e?.endDate?o(e.endDate):null],onChange:t=>l({startDate:t[0]?t[0].toDate():null,endDate:t[1]?t[1].toDate():null}),...r,slotProps:{textField:({position:t})=>({...r.slotProps?.textField,required:s,helperText:D,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:t==="start"?`${a} (Dt. In\xEDcio)`:`${a} (Dt. Fim)`,inputProps:{tabIndex:n}})},sx:{width:1}}),m=p;
5
+ var p=({label:o,value:t,onChange:l,tabIndex:n,helperText:s,required:D,...a})=>jsx(DateRangePicker,{format:"DD/MM/YYYY",value:[t?.startDate?r(t.startDate):null,t?.endDate?r(t.endDate):null],onChange:e=>l({startDate:e[0]?e[0].toDate():null,endDate:e[1]?e[1].toDate():null}),...a,slotProps:{textField:()=>({...a.slotProps?.textField,required:D,helperText:s,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:o,inputProps:{tabIndex:n}})},sx:{width:1}}),u=p;
6
6
 
7
- export { m as default };
7
+ export { u as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.0.55",
3
+ "version": "2.0.57",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -55,22 +55,21 @@
55
55
  "./styles.css": "./dist/index.css"
56
56
  },
57
57
  "devDependencies": {
58
- "@emotion/react": "^11.12.0",
59
- "@emotion/styled": "^11.12.0",
60
- "@mui/lab": "^5.0.0-alpha.172",
61
- "@mui/material": "^5.16.4",
62
- "@mui/x-data-grid-premium": "^7.13.0",
63
- "@mui/x-date-pickers-pro": "^7.13.0",
64
- "@mui/x-tree-view": "^7.11.1",
58
+ "@emotion/react": "^11.13.3",
59
+ "@emotion/styled": "^11.13.0",
60
+ "@mui/lab": "5.0.0-alpha.173",
61
+ "@mui/material": "^5.16.7",
62
+ "@mui/x-data-grid-premium": "^7.14.0",
63
+ "@mui/x-date-pickers-pro": "^7.14.0",
65
64
  "@types/color": "^3.0.6",
66
65
  "@types/lodash": "^4.17.7",
67
- "@types/react": "^18.3.3",
66
+ "@types/react": "^18.3.4",
68
67
  "@types/react-color": "^3.0.12",
69
68
  "@types/react-dom": "^18.3.0",
70
69
  "@types/react-window": "^1.8.8",
71
70
  "@typescript-eslint/eslint-plugin": "^6.4.1",
72
71
  "@typescript-eslint/parser": "^6.4.1",
73
- "autoprefixer": "^10.4.19",
72
+ "autoprefixer": "^10.4.20",
74
73
  "eslint": "^8.47.0",
75
74
  "eslint-config-prettier": "^9.0.0",
76
75
  "eslint-plugin-prettier": "^5.0.0",
@@ -78,21 +77,21 @@
78
77
  "eslint-plugin-react-hooks": "^4.6.0",
79
78
  "eslint-plugin-react-refresh": "^0.4.3",
80
79
  "eslint-plugin-simple-import-sort": "^12.1.1",
81
- "postcss": "^8.4.40",
80
+ "postcss": "^8.4.41",
82
81
  "postcss-import": "^16.1.0",
83
82
  "prettier": "^3.0.2",
84
83
  "react": "^18.3.1",
85
84
  "react-dom": "^18.3.1",
86
- "react-hook-form": "^7.52.1",
85
+ "react-hook-form": "^7.53.0",
87
86
  "tsup": "6.6.0",
88
87
  "typescript": "5.3.3"
89
88
  },
90
89
  "dependencies": {
91
90
  "color": "^4.2.3",
92
- "dayjs": "^1.11.12",
93
- "embla-carousel": "^8.1.8",
94
- "embla-carousel-react": "^8.1.8",
95
- "framer-motion": "^11.3.19",
91
+ "dayjs": "^1.11.13",
92
+ "embla-carousel": "^8.2.0",
93
+ "embla-carousel-react": "^8.2.0",
94
+ "framer-motion": "^11.3.30",
96
95
  "hugeicons-react": "^0.3.0",
97
96
  "lodash": "^4.17.21",
98
97
  "react-color": "^2.19.3",
@@ -103,18 +102,18 @@
103
102
  "react-window": "^1.8.10",
104
103
  "simplebar-react": "^3.2.6",
105
104
  "sonner": "^1.5.0",
106
- "yet-another-react-lightbox": "^3.21.1"
105
+ "yet-another-react-lightbox": "^3.21.4"
107
106
  },
108
107
  "peerDependencies": {
109
- "@emotion/react": "11.13.0",
110
- "@emotion/styled": "11.13.0",
111
- "@mui/lab": "5.0.0-alpha.173",
112
- "@mui/material": "5.16.7",
113
- "@mui/x-data-grid-premium": "7.13.0",
114
- "@mui/x-date-pickers-pro": "7.13.0",
115
- "react": "18.3.1",
116
- "react-dom": "18.3.1",
117
- "react-hook-form": "7.52.2"
108
+ "@emotion/react": "^11.13.3",
109
+ "@emotion/styled": "^11.13.0",
110
+ "@mui/lab": "^5.0.0-alpha.173",
111
+ "@mui/material": "^5.16.7",
112
+ "@mui/x-data-grid-premium": "^7.14.0",
113
+ "@mui/x-date-pickers-pro": "^7.14.0",
114
+ "react": "^18.3.1",
115
+ "react-dom": "^18.3.1",
116
+ "react-hook-form": "^7.53.0"
118
117
  },
119
118
  "publishConfig": {
120
119
  "access": "public"