@zydon/common 2.7.61 → 2.7.63
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/{chunk-75G5RNV4.js → chunk-5LQLLZ5L.js} +2 -2
- package/dist/chunk-5NIMUEW5.js +25 -0
- package/dist/chunk-5NIMUEW5.js.map +1 -0
- package/dist/chunk-6WGKIN5L.js +18 -0
- package/dist/chunk-6WGKIN5L.js.map +1 -0
- package/dist/chunk-7MVZYOHX.js +13 -0
- package/dist/chunk-7MVZYOHX.js.map +1 -0
- package/dist/{chunk-KRT2AT6N.js → chunk-CWCEG2DZ.js} +2 -2
- package/dist/{chunk-HLMZQG27.js → chunk-HWYA3EGC.js} +2 -2
- package/dist/chunk-HWYA3EGC.js.map +1 -0
- package/dist/chunk-IEGF6HVV.js +43 -0
- package/dist/{chunk-XTTDUDXX.js.map → chunk-IEGF6HVV.js.map} +1 -1
- package/dist/chunk-JFZOAS75.js +23 -0
- package/dist/{chunk-MJQ5FMYR.js → chunk-JZ55NEMI.js} +2 -2
- package/dist/{chunk-WVXEXDGZ.js → chunk-KR3DUHA6.js} +3 -3
- package/dist/{chunk-X7VVV26F.js → chunk-LEMPYV5U.js} +2 -2
- package/dist/{chunk-AA2DXMIC.js → chunk-LNXA53QR.js} +2 -2
- package/dist/{chunk-CDJKO3NN.js → chunk-LY3IB5VH.js} +2 -2
- package/dist/{chunk-YEVAAROT.js → chunk-MP2LAJS5.js} +3 -3
- package/dist/{chunk-BX2JPTSO.js → chunk-N4DW7EIC.js} +2 -2
- package/dist/{chunk-DLIHGNBS.js → chunk-NQNNMRLC.js} +3 -3
- package/dist/{chunk-DLIHGNBS.js.map → chunk-NQNNMRLC.js.map} +1 -1
- package/dist/{chunk-QHXITV2M.js → chunk-OTVEMGF2.js} +2 -2
- package/dist/chunk-POTVACYB.js +8 -0
- package/dist/chunk-POTVACYB.js.map +1 -0
- package/dist/chunk-QVU6HSYP.js +12 -0
- package/dist/chunk-QVU6HSYP.js.map +1 -0
- package/dist/{chunk-GFXVOSAE.js → chunk-R76WTFYC.js} +2 -2
- package/dist/chunk-RBTYTONM.js +13 -0
- package/dist/chunk-RBTYTONM.js.map +1 -0
- package/dist/{chunk-BOKTSYI5.js → chunk-RFRLNTFN.js} +2 -2
- package/dist/{chunk-MTBVMYTS.js → chunk-U7BH6DMJ.js} +2 -2
- package/dist/{chunk-CU7PKEY2.js → chunk-VPKUUY5Q.js} +2 -2
- package/dist/chunk-VYNBVZSA.js +37 -0
- package/dist/chunk-VYNBVZSA.js.map +1 -0
- package/dist/chunk-WQSRNCNF.js +5 -0
- package/dist/chunk-WQSRNCNF.js.map +1 -0
- package/dist/{chunk-BBFBNDAZ.js → chunk-XZFBTUAG.js} +2 -2
- package/dist/{chunk-C7VQJ35F.js → chunk-ZFRNMT3P.js} +2 -2
- package/dist/{chunk-SSLZPI3M.js → chunk-ZGSSTXUO.js} +2 -2
- package/dist/components/ActionButton/index.js +2 -2
- package/dist/components/Autocomplete/index.js +2 -2
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/AvatarButton/index.js +3 -3
- package/dist/components/BuilderLayout/index.js +2 -2
- package/dist/components/BuilderSidebar/index.js +1 -1
- package/dist/components/BulkEditModal/index.d.ts +64 -0
- package/dist/components/BulkEditModal/index.js +28 -0
- package/dist/components/BulkEditModal/index.js.map +1 -0
- package/dist/components/CardBrand/index.js +1 -1
- package/dist/components/Common/index.js +3 -3
- package/dist/components/CopyButton/index.js +2 -2
- package/dist/components/DataGrid/index.js +2 -1
- package/dist/components/DataView/index.js +8 -6
- package/dist/components/DragButton/index.js +2 -2
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/DynamicDataView/index.d.ts +4 -2
- package/dist/components/DynamicDataView/index.js +20 -14
- package/dist/components/DynamicDataView/index.js.map +1 -1
- package/dist/components/EasyCropModal/index.js +3 -3
- package/dist/components/Error/index.js +1 -1
- package/dist/components/ExpandableGroup/index.js +7 -7
- package/dist/components/ExpandableGroup/index.js.map +1 -1
- package/dist/components/FieldMentions/index.js.map +1 -1
- package/dist/components/FileUpload/index.js +7 -6
- package/dist/components/FrameSkeleton/index.js +4 -4
- package/dist/components/HelpButton/index.js +2 -2
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/IconButton/index.js +2 -2
- package/dist/components/ImageCropModal/index.js +3 -3
- package/dist/components/Incrementer/index.js +2 -2
- package/dist/components/InfoCircle/index.js +1 -1
- package/dist/components/ListBundles/index.js +2 -2
- package/dist/components/MenuItem/index.js +1 -1
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/MoreMenu/index.js +1 -1
- package/dist/components/PasswordRules/index.js +1 -1
- package/dist/components/PopoverSelect/index.js +1 -1
- package/dist/components/SearchInput/index.js +2 -2
- package/dist/components/SelectableCards/index.js +3 -3
- package/dist/components/SeoPreview/index.js +1 -1
- package/dist/components/StateDisplay/index.js +2 -2
- package/dist/components/Steps/index.js +1 -1
- package/dist/components/StyledTab/index.js +1 -1
- package/dist/components/SwapList/index.js +2 -2
- package/dist/components/ToggleTheme/index.js +2 -2
- package/dist/components/WebhookCard/index.js +2 -2
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/form/Address/index.js +3 -3
- package/dist/components/form/Autocomplete/index.js +3 -3
- package/dist/components/form/FileUpload/index.js +8 -7
- package/dist/components/form/FileUpload/index.js.map +1 -1
- package/dist/components/form/Incrementer/index.js +2 -2
- package/dist/components/form/Password/index.js +1 -1
- package/dist/components/form/SelectableCards/index.js +3 -3
- package/dist/components/form/UploadAvatarWithCrop/index.js +6 -5
- package/dist/components/form/UploadAvatarWithCrop/index.js.map +1 -1
- package/dist/components/form/UploadWithCrop/index.js +8 -7
- package/dist/components/form/UploadWithCrop/index.js.map +1 -1
- package/dist/components/form/Webhook/index.js +12 -12
- package/dist/components/form/Webhook/index.js.map +1 -1
- package/dist/components/lightbox/index.js +1 -1
- package/dist/components/table/index.js +2 -2
- package/dist/components/upload/index.js +11 -10
- package/dist/components/upload/index.js.map +1 -1
- package/dist/hooks/useCollapseSidebarOnMount.js +3 -3
- package/dist/hooks/useEventCallback.d.ts +2 -3
- package/dist/hooks/useEventCallback.js +1 -1
- package/dist/hooks/useLocalStorage.js +2 -2
- package/dist/hooks/useSnackbar.d.ts +1 -1
- package/dist/hooks/useThemeToggle.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/theme/core/index.d.ts +1 -1
- package/dist/theme/styles/index.d.ts +13 -13
- package/dist/theme/theme-provider.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-F4T3RPSV.js +0 -36
- package/dist/chunk-F4T3RPSV.js.map +0 -1
- package/dist/chunk-HLMZQG27.js.map +0 -1
- package/dist/chunk-JBPWWO5D.js +0 -15
- package/dist/chunk-JBPWWO5D.js.map +0 -1
- package/dist/chunk-MQAMSYYK.js +0 -8
- package/dist/chunk-MQAMSYYK.js.map +0 -1
- package/dist/chunk-NCNSNAJ5.js +0 -27
- package/dist/chunk-NCNSNAJ5.js.map +0 -1
- package/dist/chunk-SA2BESEB.js +0 -17
- package/dist/chunk-SA2BESEB.js.map +0 -1
- package/dist/chunk-XTTDUDXX.js +0 -42
- package/dist/chunk-YCKZD2H6.js +0 -23
- package/dist/{chunk-75G5RNV4.js.map → chunk-5LQLLZ5L.js.map} +0 -0
- package/dist/{chunk-KRT2AT6N.js.map → chunk-CWCEG2DZ.js.map} +0 -0
- package/dist/{chunk-YCKZD2H6.js.map → chunk-JFZOAS75.js.map} +0 -0
- package/dist/{chunk-MJQ5FMYR.js.map → chunk-JZ55NEMI.js.map} +0 -0
- package/dist/{chunk-WVXEXDGZ.js.map → chunk-KR3DUHA6.js.map} +0 -0
- package/dist/{chunk-X7VVV26F.js.map → chunk-LEMPYV5U.js.map} +0 -0
- package/dist/{chunk-AA2DXMIC.js.map → chunk-LNXA53QR.js.map} +0 -0
- package/dist/{chunk-CDJKO3NN.js.map → chunk-LY3IB5VH.js.map} +0 -0
- package/dist/{chunk-YEVAAROT.js.map → chunk-MP2LAJS5.js.map} +0 -0
- package/dist/{chunk-BX2JPTSO.js.map → chunk-N4DW7EIC.js.map} +0 -0
- package/dist/{chunk-QHXITV2M.js.map → chunk-OTVEMGF2.js.map} +0 -0
- package/dist/{chunk-GFXVOSAE.js.map → chunk-R76WTFYC.js.map} +0 -0
- package/dist/{chunk-BOKTSYI5.js.map → chunk-RFRLNTFN.js.map} +0 -0
- package/dist/{chunk-MTBVMYTS.js.map → chunk-U7BH6DMJ.js.map} +0 -0
- package/dist/{chunk-CU7PKEY2.js.map → chunk-VPKUUY5Q.js.map} +0 -0
- package/dist/{chunk-BBFBNDAZ.js.map → chunk-XZFBTUAG.js.map} +0 -0
- package/dist/{chunk-C7VQJ35F.js.map → chunk-ZFRNMT3P.js.map} +0 -0
- package/dist/{chunk-SSLZPI3M.js.map → chunk-ZGSSTXUO.js.map} +0 -0
- package/dist/{index-c8f1e6e7.d.ts → index-5a5e5dc8.d.ts} +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-NQNNMRLC.js';
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
import A from '@mui/material/IconButton';
|
|
4
4
|
import l from '@mui/material/InputAdornment';
|
|
@@ -9,4 +9,4 @@ var h=({onSearch:n,onChange:i,trigger:d="click",iconPosition:r="end",tabIndex:f,
|
|
|
9
9
|
|
|
10
10
|
export { R as a };
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-OTVEMGF2.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-ET3WPQIO.js';
|
|
2
|
+
import { useRef, useCallback } from 'react';
|
|
3
|
+
|
|
4
|
+
var a=e=>{let r=useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return a$1(()=>{r.current=e;},[e]),useCallback((...s)=>r.current?.(...s),[r])},f=a;
|
|
5
|
+
|
|
6
|
+
export { f as a };
|
|
7
|
+
//# sourceMappingURL=out.js.map
|
|
8
|
+
//# sourceMappingURL=chunk-POTVACYB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useEventCallback.ts"],"names":["useCallback","useRef","useEventCallback","fn","ref","useIsomorphicLayoutEffect_default","args","useEventCallback_default"],"mappings":"wCAAA,OAAS,eAAAA,EAAa,UAAAC,MAAc,QAIpC,IAAMC,EACJC,GAC2B,CAC3B,IAAMC,EAAMH,EAAkB,IAAM,CAClC,MAAM,IAAI,MAAM,+CAA+C,CACjE,CAAC,EAED,OAAAI,EAA0B,IAAM,CAC9BD,EAAI,QAAUD,CAChB,EAAG,CAACA,CAAE,CAAC,EAEAH,EAAY,IAAIM,IAAeF,EAAI,UAAU,GAAGE,CAAI,EAAG,CAACF,CAAG,CAAC,CAGrE,EAEOG,EAAQL","sourcesContent":["import { useCallback, useRef } from 'react';\n\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\n\nconst useEventCallback = <Args extends unknown[], R>(\n fn: ((...args: Args) => R) | undefined,\n): ((...args: Args) => R) => {\n const ref = useRef<typeof fn>(() => {\n throw new Error('Cannot call an event handler while rendering.');\n });\n\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n\n return useCallback((...args: Args) => ref.current?.(...args), [ref]) as (\n ...args: Args\n ) => R;\n};\n\nexport default useEventCallback;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { a } from './chunk-UVPQR2Q2.js';
|
|
2
|
+
import p from '@mui/material/Divider';
|
|
3
|
+
import n from '@mui/material/Stack';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import u from '@mui/material/TablePagination';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var k=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:o.palette.divider}})),C=styled(n,{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"}})),v=styled(n,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:t})=>({flexDirection:"row",alignItems:"center",gap:12,color:o.palette.text.secondary,[o.breakpoints.down(t)]:{"& button, & a":{textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:0}}}})),D=styled(p)({borderStyle:"dashed",height:16,margin:"auto"}),y=styled(p)({borderStyle:"dashed",height:12,marginTop:"auto",marginBottom:"auto"}),I=styled(n,{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}`,minHeight:60,[o.breakpoints.down(t)]:{"& button":{textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:0}}}}})),S=styled(n,{shouldForwardProp:o=>o!=="breakpoint"})(({theme:o,breakpoint:t})=>({width:320,alignItems:"center",justifyContent:"center",[o.breakpoints.down(t)]:{position:"absolute",left:0,width:"100%",padding:"0 12px",zIndex:1,"& fieldset, & input":{display:"flex"},"& .MuiInputAdornment-root":{marginLeft:0}}})),d=styled(n)(({theme:o})=>({"& .MuiToolbar-root":{height:24,minHeight:24,overflow:"hidden",[o.breakpoints.down("sm")]:{height:"auto",flexWrap:"wrap",justifyContent:"center"}}})),B=styled(n)(({theme:o})=>({minHeight:60,alignItems:"flex-end",justifyContent:"center",borderTop:`1px solid ${o.palette.divider}`,[o.breakpoints.down("sm")]:{minHeight:"auto"}})),M=styled(n)(({theme:o})=>({flexDirection:"row",height:60,alignItems:"center",justifyContent:"space-between",borderTop:`1px solid ${o.palette.divider}`,gap:16,padding:16}));var f=({count:o,page:t,rowsPerPage:i,onPageChange:l,onRowsPerPageChange:g})=>{let c=Math.ceil(o/i)||1;return jsx(d,{"aria-label":`P\xE1gina ${t+1} de ${c}`,"aria-live":"polite",role:"navigation",children:jsx(u,{color:"primary",component:"div",size:"small",count:o,page:t,rowsPerPage:i,onPageChange:(r,m)=>l(m),onRowsPerPageChange:r=>g(Number(r.target.value))})})},W=f;
|
|
9
|
+
|
|
10
|
+
export { k as a, C as b, v as c, D as d, y as e, I as f, S as g, B as h, M as i, W as j };
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=chunk-QVU6HSYP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DataView/styles.ts","../src/components/DataView/Pagination.tsx"],"names":["Divider","Stack","styled","Container","Panel_default","prop","theme","breakpoint","Header","ActionsContainer","ActionsDivider","ToolbarActionsDivider","Topbar","SearchContainer","PaginationContainer","MobilePaginationContainer","DesktopPaginationContainer","MuiPagination","jsx","Pagination","count","page","rowsPerPage","onPageChange","onRowsPerPageChange","totalPages","_","newPage","event","Pagination_default"],"mappings":"mCAAA,OAAOA,MAAa,wBACpB,OAAOC,MAA2B,sBAClC,OAAS,UAAAC,MAAc,uBAahB,IAAMC,EAAYD,EAAOE,EAAO,CACrC,kBAAmBC,GAAQA,IAAS,YACtC,CAAC,EAAkB,CAAC,CAAE,MAAAC,EAAO,WAAAC,CAAW,KAAO,CAC7C,SAAU,WACV,aAAc,GACd,QAAS,EACT,IAAK,EACL,SAAU,SAEV,CAACD,EAAM,YAAY,KAAKC,CAAU,CAAC,EAAG,CACpC,YAAaD,EAAM,QAAQ,OAC7B,CACF,EAAE,EAEWE,EAASN,EAAOD,EAAO,CAClC,kBAAmBI,GAAQA,IAAS,YACtC,CAAC,EAAgB,CAAC,CAAE,MAAAC,EAAO,WAAAC,CAAW,KAAO,CAC3C,cAAe,MACf,WAAY,SACZ,eAAgB,gBAChB,QAAS,cACT,IAAK,GAEL,CAACD,EAAM,YAAY,KAAKC,CAAU,CAAC,EAAG,CACpC,QAAS,aACX,CACF,EAAE,EAEWE,EAAmBP,EAAOD,EAAO,CAC5C,kBAAmBI,GAAQA,IAAS,YACtC,CAAC,EAAgB,CAAC,CAAE,MAAAC,EAAO,WAAAC,CAAW,KAAO,CAC3C,cAAe,MACf,WAAY,SACZ,IAAK,GACL,MAAOD,EAAM,QAAQ,KAAK,UAE1B,CAACA,EAAM,YAAY,KAAKC,CAAU,CAAC,EAAG,CACpC,gBAAiB,CACf,WAAY,UACZ,SAAU,EACV,SAAU,GACV,SAAU,GACV,OAAQ,GACR,MAAO,GACP,SAAU,SAEV,oBAAqB,CACnB,OAAQ,CACV,CACF,CACF,CACF,EAAE,EAEWG,EAAiBR,EAAOF,CAAO,EAAE,CAC5C,YAAa,SACb,OAAQ,GACR,OAAQ,MACV,CAAC,EAEYW,EAAwBT,EAAOF,CAAO,EAAE,CACnD,YAAa,SACb,OAAQ,GACR,UAAW,OACX,aAAc,MAChB,CAAC,EAEYY,EAASV,EAAOD,EAAO,CAClC,kBAAmBI,GAAQA,IAAS,YACtC,CAAC,EAAgB,CAAC,CAAE,MAAAC,EAAO,WAAAC,CAAW,KAAO,CAC3C,SAAU,WACV,QAAS,GACT,cAAe,MACf,WAAY,SACZ,MAAOD,EAAM,QAAQ,KAAK,UAE1B,CAACA,EAAM,YAAY,KAAKC,CAAU,CAAC,EAAG,CACpC,QAAS,YACT,aAAc,aAAaD,EAAM,QAAQ,UACzC,UAAW,GAEX,CAACA,EAAM,YAAY,KAAKC,CAAU,CAAC,EAAG,CACpC,WAAY,CACV,WAAY,UACZ,SAAU,EACV,SAAU,GACV,SAAU,GACV,OAAQ,GACR,MAAO,GACP,SAAU,SAEV,oBAAqB,CACnB,OAAQ,CACV,CACF,CACF,CACF,CACF,EAAE,EAEWM,EAAkBX,EAAOD,EAAO,CAC3C,kBAAmBI,GAAQA,IAAS,YACtC,CAAC,EAAgB,CAAC,CAAE,MAAAC,EAAO,WAAAC,CAAW,KAAO,CAC3C,MAAO,IACP,WAAY,SACZ,eAAgB,SAEhB,CAACD,EAAM,YAAY,KAAKC,CAAU,CAAC,EAAG,CACpC,SAAU,WACV,KAAM,EACN,MAAO,OACP,QAAS,SACT,OAAQ,EAER,sBAAuB,CACrB,QAAS,MACX,EAEA,4BAA6B,CAC3B,WAAY,CACd,CACF,CACF,EAAE,EAEWO,EAAsBZ,EAAOD,CAAK,EAAE,CAAC,CAAE,MAAAK,CAAM,KAAO,CAC/D,qBAAsB,CACpB,OAAQ,GACR,UAAW,GACX,SAAU,SAEV,CAACA,EAAM,YAAY,KAAK,IAAI,CAAC,EAAG,CAC9B,OAAQ,OACR,SAAU,OACV,eAAgB,QAClB,CACF,CACF,EAAE,EAEWS,EAA4Bb,EAAOD,CAAK,EAAE,CAAC,CAAE,MAAAK,CAAM,KAAO,CACrE,UAAW,GACX,WAAY,WACZ,eAAgB,SAChB,UAAW,aAAaA,EAAM,QAAQ,UAEtC,CAACA,EAAM,YAAY,KAAK,IAAI,CAAC,EAAG,CAC9B,UAAW,MACb,CACF,EAAE,EAEWU,EAA6Bd,EAAOD,CAAK,EAAE,CAAC,CAAE,MAAAK,CAAM,KAAO,CACtE,cAAe,MACf,OAAQ,GACR,WAAY,SACZ,eAAgB,gBAChB,UAAW,aAAaA,EAAM,QAAQ,UACtC,IAAK,GACL,QAAS,EACX,EAAE,EC1KF,OAAOW,MAAmB,gCAmBpB,cAAAC,MAAA,oBAdN,IAAMC,EAAa,CAAC,CAClB,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,aAAAC,EACA,oBAAAC,CACF,IAAuB,CACrB,IAAMC,EAAa,KAAK,KAAKL,EAAQE,CAAW,GAAK,EACrD,OACEJ,EAACJ,EAAA,CACC,aAAY,aAAUO,EAAO,QAAQI,IACrC,YAAU,SACV,KAAK,aAEL,SAAAP,EAACD,EAAA,CACC,MAAM,UACN,UAAU,MACV,KAAK,QACL,MAAOG,EACP,KAAMC,EACN,YAAaC,EACb,aAAc,CAACI,EAAGC,IAAYJ,EAAaI,CAAO,EAClD,oBAAqBC,GACnBJ,EAAoB,OAAOI,EAAM,OAAO,KAAK,CAAC,EAElD,EACF,CAEJ,EAEOC,EAAQV","sourcesContent":["import Divider from '@mui/material/Divider';\nimport Stack, { StackProps } from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\nimport { Breakpoint } from '@mui/material/styles';\n\nimport Panel from 'components/Panel';\n\nexport interface DefaultProps {\n breakpoint: Breakpoint | number;\n}\n\nexport interface ContainerProps extends StackProps {\n breakpoint: Breakpoint | number;\n}\n\nexport const Container = styled(Panel, {\n shouldForwardProp: prop => prop !== 'breakpoint',\n})<ContainerProps>(({ theme, breakpoint }) => ({\n position: 'relative',\n borderRadius: 12,\n padding: 0,\n gap: 0,\n overflow: 'hidden',\n\n [theme.breakpoints.down(breakpoint)]: {\n borderColor: theme.palette.divider,\n },\n}));\n\nexport const Header = styled(Stack, {\n shouldForwardProp: prop => prop !== 'breakpoint',\n})<DefaultProps>(({ theme, breakpoint }) => ({\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: '24px 24px 0',\n gap: 24,\n\n [theme.breakpoints.down(breakpoint)]: {\n padding: '16px 16px 0',\n },\n}));\n\nexport const ActionsContainer = styled(Stack, {\n shouldForwardProp: prop => prop !== 'breakpoint',\n})<DefaultProps>(({ theme, breakpoint }) => ({\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n color: theme.palette.text.secondary,\n\n [theme.breakpoints.down(breakpoint)]: {\n '& button, & a': {\n textIndent: '-9999em',\n fontSize: 0,\n minWidth: 36,\n maxWidth: 36,\n height: 36,\n width: 36,\n overflow: 'hidden',\n\n '& .MuiButton-icon': {\n margin: 0,\n },\n },\n },\n}));\n\nexport const ActionsDivider = styled(Divider)({\n borderStyle: 'dashed',\n height: 16,\n margin: 'auto',\n});\n\nexport const ToolbarActionsDivider = styled(Divider)({\n borderStyle: 'dashed',\n height: 12,\n marginTop: 'auto',\n marginBottom: 'auto',\n});\n\nexport const Topbar = styled(Stack, {\n shouldForwardProp: prop => prop !== 'breakpoint',\n})<DefaultProps>(({ theme, breakpoint }) => ({\n position: 'relative',\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n color: theme.palette.text.secondary,\n\n [theme.breakpoints.down(breakpoint)]: {\n padding: '12px 16px',\n borderBottom: `1px solid ${theme.palette.divider}`,\n minHeight: 60,\n\n [theme.breakpoints.down(breakpoint)]: {\n '& button': {\n textIndent: '-9999em',\n fontSize: 0,\n minWidth: 36,\n maxWidth: 36,\n height: 36,\n width: 36,\n overflow: 'hidden',\n\n '& .MuiButton-icon': {\n margin: 0,\n },\n },\n },\n },\n}));\n\nexport const SearchContainer = styled(Stack, {\n shouldForwardProp: prop => prop !== 'breakpoint',\n})<DefaultProps>(({ theme, breakpoint }) => ({\n width: 320,\n alignItems: 'center',\n justifyContent: 'center',\n\n [theme.breakpoints.down(breakpoint)]: {\n position: 'absolute',\n left: 0,\n width: '100%',\n padding: '0 12px',\n zIndex: 1,\n\n '& fieldset, & input': {\n display: 'flex',\n },\n\n '& .MuiInputAdornment-root': {\n marginLeft: 0,\n },\n },\n}));\n\nexport const PaginationContainer = styled(Stack)(({ theme }) => ({\n '& .MuiToolbar-root': {\n height: 24,\n minHeight: 24,\n overflow: 'hidden',\n\n [theme.breakpoints.down('sm')]: {\n height: 'auto',\n flexWrap: 'wrap',\n justifyContent: 'center',\n },\n },\n}));\n\nexport const MobilePaginationContainer = styled(Stack)(({ theme }) => ({\n minHeight: 60,\n alignItems: 'flex-end',\n justifyContent: 'center',\n borderTop: `1px solid ${theme.palette.divider}`,\n\n [theme.breakpoints.down('sm')]: {\n minHeight: 'auto',\n },\n}));\n\nexport const DesktopPaginationContainer = styled(Stack)(({ theme }) => ({\n flexDirection: 'row',\n height: 60,\n alignItems: 'center',\n justifyContent: 'space-between',\n borderTop: `1px solid ${theme.palette.divider}`,\n gap: 16,\n padding: 16,\n}));\n","import MuiPagination from '@mui/material/TablePagination';\n\nimport { PaginationProps } from './props';\nimport { PaginationContainer } from './styles';\n\nconst Pagination = ({\n count,\n page,\n rowsPerPage,\n onPageChange,\n onRowsPerPageChange,\n}: PaginationProps) => {\n const totalPages = Math.ceil(count / rowsPerPage) || 1;\n return (\n <PaginationContainer\n aria-label={`Página ${page + 1} de ${totalPages}`}\n aria-live=\"polite\"\n role=\"navigation\"\n >\n <MuiPagination\n color=\"primary\"\n component=\"div\"\n size=\"small\"\n count={count}\n page={page}\n rowsPerPage={rowsPerPage}\n onPageChange={(_, newPage) => onPageChange(newPage)}\n onRowsPerPageChange={event =>\n onRowsPerPageChange(Number(event.target.value))\n }\n />\n </PaginationContainer>\n );\n};\n\nexport default Pagination;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-NQNNMRLC.js';
|
|
2
2
|
import { k, b } from './chunk-GLRLKFPS.js';
|
|
3
3
|
import { forwardRef, Children, isValidElement, useMemo, useState, useCallback, useEffect, useRef } from 'react';
|
|
4
4
|
import N from '@mui/material/Box';
|
|
@@ -14,4 +14,4 @@ var Ge={xs:"(min-width: 0px)",sm:"(min-width: 600px)",md:"(min-width: 900px)",lg
|
|
|
14
14
|
|
|
15
15
|
export { Ge as a, p as b, w as c, T as d, R as e, io as f, Co as g, ho as h, So as i, h as j, To as k, Lo as l, Ne as m, qo as n, St as o };
|
|
16
16
|
//# sourceMappingURL=out.js.map
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-R76WTFYC.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import p from 'react';
|
|
2
|
+
import C from '@mui/material/Box';
|
|
3
|
+
import S from '@mui/material/Skeleton';
|
|
4
|
+
import k from '@mui/material/Stack';
|
|
5
|
+
import { styled } from '@mui/material/styles';
|
|
6
|
+
import { useGridApiContext, useGridRootProps, gridColumnsTotalWidthSelector, gridColumnPositionsSelector } from '@mui/x-data-grid-premium';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var c=styled(C)({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px"}),b=()=>{let e=useGridApiContext(),{rowHeight:m,paginationModel:g,initialState:u}=useGridRootProps(),l=g?.pageSize||u?.pagination?.paginationModel?.pageSize||10,a=gridColumnsTotalWidthSelector(e),s=gridColumnPositionsSelector(e),f=p.useMemo(()=>s.filter(o=>o<=a).length,[a,s]),n=e.current?e.current.getVisibleColumns().slice(0,f):[],r=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=p.useMemo(()=>{let o=[];for(let t=0;t<l;t+=1){for(let d of r)o.push(jsx(c,{sx:{justifyContent:d.align},children:jsx(S,{width:"100%"})},`column-${t}-${d.field}`));o.push(jsx(c,{},`fill-${t}`));}return o},[l,r]);return jsx(k,{display:"grid",sx:{display:"grid",gridTemplateColumns:`${r.map(({computedWidth:o})=>`${o}px`).join(" ")} 1fr`,gridAutoRows:m,backgroundColor:o=>o.palette.background.paper,overflow:"hidden",maxHeight:"100%"},children:h})},H=b;
|
|
10
|
+
|
|
11
|
+
export { H as a };
|
|
12
|
+
//# sourceMappingURL=out.js.map
|
|
13
|
+
//# sourceMappingURL=chunk-RBTYTONM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DataGrid/LoadingOverlay/index.tsx"],"names":["React","Box","Skeleton","Stack","styled","gridColumnPositionsSelector","gridColumnsTotalWidthSelector","useGridApiContext","useGridRootProps","jsx","SkeletonCell","LoadingOverlay","apiRef","rowHeight","paginationModel","initialState","skeletonRowsCount","totalWidth","positions","inViewportCount","value","visibleColumns","columns","_","i","children","array","column","computedWidth","theme","LoadingOverlay_default"],"mappings":"AAAA,OAAOA,MAAW,QAClB,OAAOC,MAAS,oBAChB,OAAOC,MAAc,yBACrB,OAAOC,MAAW,sBAClB,OAAS,UAAAC,MAAc,uBACvB,OACE,+BAAAC,EACA,iCAAAC,EACA,qBAAAC,EACA,oBAAAC,MACK,2BAoDK,cAAAC,MAAA,oBAlDZ,IAAMC,EAAeN,EAAOH,CAAG,EAAE,CAC/B,QAAS,OACT,cAAe,MACf,WAAY,SACZ,QAAS,QACX,CAAC,EAEKU,EAAiB,IAAM,CAC3B,IAAMC,EAASL,EAAkB,EAE3B,CAAE,UAAAM,EAAW,gBAAAC,EAAiB,aAAAC,CAAa,EAAIP,EAAiB,EAChEQ,EACJF,GAAiB,UACjBC,GAAc,YAAY,iBAAiB,UAC3C,GAEIE,EAAaX,EAA8BM,CAAM,EACjDM,EAAYb,EAA4BO,CAAM,EAC9CO,EAAkBnB,EAAM,QAC5B,IAAMkB,EAAU,OAAOE,GAASA,GAASH,CAAU,EAAE,OACrD,CAACA,EAAYC,CAAS,CACxB,EACMG,EAAkBT,EAAO,QAE3BA,EAAO,QAAQ,kBAAkB,EAAE,MAAM,EAAGO,CAAe,EAD3D,CAAC,EAGCG,EACJD,EAAe,OAAS,EACpBA,EACA,CACE,GAAGA,EACH,GAAG,MAAM,KAAK,CAAE,OAAQ,CAAE,EAAG,CAACE,EAAGC,KAAO,CACtC,MAAO,OAAO,OAAOA,EAAI,CAAC,EAAE,SAAS,EAAG,GAAG,IAC3C,WAAY,GACZ,cAAe,IACf,MAAO,YACT,EAAE,CACJ,EACAC,EAAWzB,EAAM,QAAQ,IAAM,CACnC,IAAM0B,EAA2B,CAAC,EAElC,QAASF,EAAI,EAAGA,EAAIR,EAAmBQ,GAAK,EAAG,CAC7C,QAAWG,KAAUL,EACnBI,EAAM,KACJjB,EAACC,EAAA,CAEC,GAAI,CACF,eAAgBiB,EAAO,KACzB,EAEA,SAAAlB,EAACP,EAAA,CAAS,MAAM,OAAO,GALlB,UAAUsB,KAAKG,EAAO,OAM7B,CACF,EAGFD,EAAM,KAAKjB,EAACC,EAAA,GAAkB,QAAQc,GAAK,CAAE,EAG/C,OAAOE,CACT,EAAG,CAACV,EAAmBM,CAAO,CAAC,EAE/B,OACEb,EAACN,EAAA,CACC,QAAQ,OACR,GAAI,CACF,QAAS,OACT,oBAAqB,GAAGmB,EACrB,IAAI,CAAC,CAAE,cAAAM,CAAc,IAAM,GAAGA,KAAiB,EAC/C,KAAK,GAAG,QACX,aAAcf,EACd,gBAAiBgB,GAASA,EAAM,QAAQ,WAAW,MACnD,SAAU,SACV,UAAW,MACb,EAEC,SAAAJ,EACH,CAEJ,EAEOK,EAAQnB","sourcesContent":["import React from 'react';\nimport Box from '@mui/material/Box';\nimport Skeleton from '@mui/material/Skeleton';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\nimport {\n gridColumnPositionsSelector,\n gridColumnsTotalWidthSelector,\n useGridApiContext,\n useGridRootProps,\n} from '@mui/x-data-grid-premium';\n\nconst SkeletonCell = styled(Box)({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n padding: '0 16px',\n});\n\nconst LoadingOverlay = () => {\n const apiRef = useGridApiContext();\n\n const { rowHeight, paginationModel, initialState } = useGridRootProps();\n const skeletonRowsCount =\n paginationModel?.pageSize ||\n initialState?.pagination?.paginationModel?.pageSize ||\n 10;\n\n const totalWidth = gridColumnsTotalWidthSelector(apiRef);\n const positions = gridColumnPositionsSelector(apiRef);\n const inViewportCount = React.useMemo(\n () => positions.filter(value => value <= totalWidth).length,\n [totalWidth, positions],\n );\n const visibleColumns = !apiRef.current\n ? []\n : apiRef.current.getVisibleColumns().slice(0, inViewportCount);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const columns =\n visibleColumns.length > 1\n ? visibleColumns\n : [\n ...visibleColumns,\n ...Array.from({ length: 8 }, (_, i) => ({\n field: `fake${String(i + 1).padStart(2, '0')}`,\n headerName: '',\n computedWidth: 200,\n align: 'flex-start',\n })),\n ];\n const children = React.useMemo(() => {\n const array: React.ReactNode[] = [];\n\n for (let i = 0; i < skeletonRowsCount; i += 1) {\n for (const column of columns) {\n array.push(\n <SkeletonCell\n key={`column-${i}-${column.field}`}\n sx={{\n justifyContent: column.align,\n }}\n >\n <Skeleton width=\"100%\" />\n </SkeletonCell>,\n );\n }\n\n array.push(<SkeletonCell key={`fill-${i}`} />);\n }\n\n return array;\n }, [skeletonRowsCount, columns]);\n\n return (\n <Stack\n display=\"grid\"\n sx={{\n display: 'grid',\n gridTemplateColumns: `${columns\n .map(({ computedWidth }) => `${computedWidth}px`)\n .join(' ')} 1fr`,\n gridAutoRows: rowHeight,\n backgroundColor: theme => theme.palette.background.paper,\n overflow: 'hidden',\n maxHeight: '100%',\n }}\n >\n {children}\n </Stack>\n );\n};\n\nexport default LoadingOverlay;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a } from './chunk-
|
|
1
|
+
import { a } from './chunk-NQNNMRLC.js';
|
|
2
2
|
import M from '@mui/material/Dialog';
|
|
3
3
|
import k from '@mui/material/DialogTitle';
|
|
4
4
|
import B from '@mui/material/IconButton';
|
|
@@ -12,4 +12,4 @@ var s=styled(P)(({theme:o})=>({flexDirection:"row",alignItems:"center",justifyCo
|
|
|
12
12
|
|
|
13
13
|
export { U as a };
|
|
14
14
|
//# sourceMappingURL=out.js.map
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-RFRLNTFN.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-
|
|
1
|
+
import { a as a$1 } from './chunk-NQNNMRLC.js';
|
|
2
2
|
import p from '@mui/material/Button';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -6,4 +6,4 @@ var e=({link:o,...n})=>jsx(p,{...n,startIcon:jsx(a$1,{icon:"HELP_CIRCLE"}),varia
|
|
|
6
6
|
|
|
7
7
|
export { a };
|
|
8
8
|
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-U7BH6DMJ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a } from './chunk-LDGBS7ZI.js';
|
|
2
|
+
import { a as a$5 } from './chunk-WUFEPE2G.js';
|
|
2
3
|
import { c, b as b$1 } from './chunk-2WG6OWB4.js';
|
|
3
4
|
import { a as a$1, e } from './chunk-6W52DPH4.js';
|
|
4
5
|
import { a as a$3, b } from './chunk-TWSAWMZ3.js';
|
|
5
6
|
import { p, r, a as a$2 } from './chunk-EQYL7U3J.js';
|
|
6
|
-
import { a as a$5 } from './chunk-WUFEPE2G.js';
|
|
7
7
|
import { d, a as a$4 } from './chunk-GLRLKFPS.js';
|
|
8
8
|
import { useEffect, useMemo } from 'react';
|
|
9
9
|
import M from '@mui/material/CssBaseline';
|
|
@@ -15,4 +15,4 @@ var W=t=>({lighter:lighten(t,.815),light:lighten(t,.225),main:t,dark:darken(t,.1
|
|
|
15
15
|
|
|
16
16
|
export { x as a, te as b };
|
|
17
17
|
//# sourceMappingURL=out.js.map
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-VPKUUY5Q.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { a as a$6 } from './chunk-DTIGB5NW.js';
|
|
2
|
+
import { a as a$4, b } from './chunk-WQSRNCNF.js';
|
|
3
|
+
import { a as a$7 } from './chunk-ZFRNMT3P.js';
|
|
4
|
+
import { a } from './chunk-LNXA53QR.js';
|
|
5
|
+
import { e } from './chunk-OF6623HG.js';
|
|
6
|
+
import { a as a$2 } from './chunk-N4DW7EIC.js';
|
|
7
|
+
import { x } from './chunk-33C6UWPV.js';
|
|
8
|
+
import { a as a$3 } from './chunk-45OMMG7D.js';
|
|
9
|
+
import { a as a$8 } from './chunk-6U5LS7MP.js';
|
|
10
|
+
import { a as a$5 } from './chunk-NQNNMRLC.js';
|
|
11
|
+
import { j } from './chunk-VITOOMKK.js';
|
|
12
|
+
import { a as a$9 } from './chunk-SVX7EWV4.js';
|
|
13
|
+
import { a as a$1 } from './chunk-XNKYJHNL.js';
|
|
14
|
+
import { memo, forwardRef, useMemo, useLayoutEffect, useState, useCallback, useRef, useEffect } from 'react';
|
|
15
|
+
import Ho from '@mui/material/FormHelperText';
|
|
16
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
|
+
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
|
|
18
|
+
import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
|
19
|
+
import { useSortable, sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy } from '@dnd-kit/sortable';
|
|
20
|
+
import { m, AnimatePresence } from 'framer-motion';
|
|
21
|
+
import xe from '@mui/material/Stack';
|
|
22
|
+
import Je from '@mui/material/Typography';
|
|
23
|
+
import De from '@mui/material/Box';
|
|
24
|
+
import Xo from '@mui/material/IconButton';
|
|
25
|
+
import Vo from '@mui/material/Paper';
|
|
26
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
27
|
+
import Qo from '@mui/material/Badge';
|
|
28
|
+
import yr from '@mui/material/ButtonBase';
|
|
29
|
+
import Or from '@mui/material/Tooltip';
|
|
30
|
+
import { useDropzone } from 'react-dropzone';
|
|
31
|
+
import _t from '@mui/material/CircularProgress';
|
|
32
|
+
|
|
33
|
+
var $o=({helperText:e,disabled:o,isError:r})=>e?jsx(Ho,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,y=memo($o);var Me=styled(xe)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),Ne=styled(xe)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),lo=styled(De,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`dashed 1px ${e.palette.divider}`,...o&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...t&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}})),po=styled(Xo)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),He=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),mo=styled(xe,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:o,isDragging:r})=>({width:o,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),co=styled(m.div)(({theme:e,width:o,isDragging:r})=>({width:o,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),go=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),uo=styled(De,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:t})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),fo=styled(De)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover .single-file-preview-img":{filter:"blur(3px)",transition:"all 0.1s ease-in-out"},"&:hover .single-file-preview-hover-overlay":{opacity:1}})),xo=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"&&e!=="maxWidth"&&e!=="maxHeight"&&e!=="cropSize"&&e!=="fill"})(({theme:e,aspectRatio:o,maxWidth:r,maxHeight:t,isLoading:l,isUploading:s,fill:i})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,backgroundColor:e.palette.background.paper,...i&&{width:"100%",height:"100%"},...!i&&Math.abs(o)>=1&&{maxWidth:r,maxHeight:t,aspectRatio:Math.abs(o),width:"calc(100% - 16px)",height:void 0},...!i&&Math.abs(o)<1&&{maxWidth:r,maxHeight:t,aspectRatio:Math.abs(o),width:void 0,height:"calc(100% - 16px)"},transition:"all 0.3s ease-in-out",...l||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{}})),ho=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:o})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...o&&{opacity:.7,filter:"blur(2rem)"}})),bo=styled(xe)(({theme:e})=>({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:alpha(e.palette.primary.darker,.75),zIndex:2,pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease-in-out"})),Po=styled(xe)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(Vo)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var $e=styled(De,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:o,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...o&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),Io=styled(xe)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(xe)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.divider,color:e.palette.text.disabled,height:160}));var vo=styled(De,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:t,hasFile:l})=>({padding:e.spacing(1),margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${e.palette.divider}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...l&&{...t&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),Eo=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),wo=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var Yo=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:l,listeners:s,innerWidth:i,isDragging:p})=>{let d=r?.id;return d?jsx(Qo,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(co,{width:i,isDragging:p,"data-testid":`preview-multi-img-${d}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...l,...s}),jsx(Ee,{imageView:!0,file:r}),jsx(Ne,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(wo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${d}`):null},Fo=memo(Yo);var ir=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:l=!1,disableTransitions:s=!1})=>{let i=e$1.size||0,p=e$1.name||e$1.id,d=e$1.id,m=typeof e$1=="string",a$1=l?70:80,{attributes:g,listeners:x$1,setNodeRef:P,transform:A,transition:I,isDragging:C}=useSortable({id:d,disabled:l}),h={transform:s?void 0:x.Transform.toString(A),transition:s?"none":I,opacity:s?.2:1,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${a$1+8}px`,height:"68px"};return o&&e$1?jsx(He,{ref:P,style:h,children:jsx(Fo,{innerWidth:a$1,isDragging:C,sx:t,file:e$1,disableDrag:l,attributes:g,listeners:x$1,onRemove:r})}):jsx(He,{ref:P,style:{...h,height:"80px",width:`${a$1+38}px`},children:jsxs(mo,{width:a$1+30,isDragging:C,"data-testid":`preview-multi-img-${d}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:l,...g,...x$1}),e$1&&jsx(Ee,{file:e$1}),jsxs(xe,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:p,children:jsx(Je,{variant:"subtitle2",noWrap:!0,children:p})}),jsx(Je,{variant:"caption",sx:{color:"text.secondary"},children:m?"":e(i)})]}),jsx(Ne,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},Ro=memo(ir);var Ir=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:l})=>{let[s,i]=useState(!1),p=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),d=useCallback(a=>{let{active:g,over:x}=a;if(!(!g||!x||g.id===x.id)&&t){let P=o.findIndex(({id:I})=>I===g.id),A=o.findIndex(({id:I})=>I===x.id);P!==-1&&A!==-1&&(t(P,A,o),i(!0),setTimeout(()=>{i(!1);},300));}},[o,t]),m=jsx(AnimatePresence,{initial:!1,children:o.map(a=>jsx(Ro,{sx:l,id:`preview-file-${a.id}`,file:a,onRemove:r,thumbnail:e,disableDrag:!t,disableTransitions:s},`preview-file-${a.id}`))});return t?jsx(DndContext,{sensors:p,collisionDetection:closestCenter,onDragEnd:d,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(a=>a.id),strategy:horizontalListSortingStrategy,children:m})}):m},Se=memo(Ir);var _o=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},l)=>{let{maxWidth:s,maxHeight:i}=useMemo(()=>r&&typeof r=="object"?{maxWidth:r.width,maxHeight:r.height}:r&&typeof r=="number"?{maxWidth:r,maxHeight:r}:{maxWidth:"100%",maxHeight:"100%"},[r]);a$1(()=>{e?.(!0);}),useLayoutEffect(()=>{typeof l=="object"&&l?.current?e?.(!l.current.complete):e?.(!1);},[l,e]);function p(){e?.(!1);}return jsx(xo,{...t,maxWidth:s,maxHeight:i,ref:l,aspectRatio:o,onLoad:p,onError:p})});_o.displayName="LoadingPreviewImage";var yo=_o;var Rr=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:l,cropSize:s,maxWidth:i,maxHeight:p,hoverAlt:d,fill:m})=>{let a=useRef(null),g=e?.id||"",x=e?.name||"",P=URL.createObjectURL(e);return g?jsxs(fo,{className:"single-file-preview-box",children:[jsx(yo,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:x,src:P,ref:a,loading:"lazy",onLoading:l,onLoad:()=>l?.(!1),onError:()=>l?.(!1),maxWidth:i,maxHeight:p,fill:m},`image-preview-${g}`),jsx(ho,{className:"single-file-preview-bg",alt:x,src:P,isLoading:t,isUploading:r}),d&&jsx(bo,{className:"single-file-preview-hover-overlay",children:d})]}):null},Xe=memo(Rr);var ke={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},Ee=({sx:e,file:o,tooltip:r,onRemove:t,imageView:l,slotProps:s,onDownload:i,...p})=>{let d=URL.createObjectURL(o),m=o?.name||"",g=o.type.startsWith("image/")?"image":a$4(d),x=jsx(De,{component:"img",src:d,className:ke.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),P=jsx(a$5,{icon:b(g),sx:{width:32,height:32,flexShrink:0,...e}}),A=jsxs(xe,{component:"span",className:ke.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...p,children:[g==="image"&&l?x:P,t&&jsx(yr,{onClick:t,className:ke.removeBtn,sx:s?.removeBtn,children:jsx(a$5,{icon:"CLOSE_MARK_BUTTON",width:24})}),i&&jsx(Xo,{onClick:i,className:ke.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$5,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(Or,{arrow:!0,title:m,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:A}):A};var Ji=e=>e.startsWith("image/"),Uo=(e,o=.8)=>new Promise((r,t)=>{let l=document.createElement("canvas"),s=l.getContext("2d"),i=new Image;i.onload=()=>{l.width=i.width,l.height=i.height,s?(s.drawImage(i,0,0),l.toBlob(p=>{if(p){let d=new File([p],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(d);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},i.onerror=()=>t(new Error("Falha ao carregar imagem")),i.src=URL.createObjectURL(e);}),To=(e,o=.8,r,t)=>new Promise((l,s)=>{let i=document.createElement("canvas"),p=i.getContext("2d"),d=new Image;d.onload=()=>{let{width:m,height:a}=d;r&&m>r&&(a=a*r/m,m=r),t&&a>t&&(m=m*t/a,a=t),i.width=m,i.height=a,p?(p.imageSmoothingEnabled=!0,p.imageSmoothingQuality="high",p.drawImage(d,0,0,m,a),i.toBlob(g=>{if(g){let x=new File([g],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});l(x);}else s(new Error("Falha ao comprimir imagem"));},"image/webp",o)):s(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},d.onerror=()=>s(new Error("Falha ao carregar imagem")),d.src=URL.createObjectURL(e);}),Oo=e=>{let o=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return o?.[1]||o?.[2]||""},Lo=e=>`UTF-8''${encodeURIComponent(e)}`;var kr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:l,filesPreview:s,dropzoneOptions:i,enableCrop:p=!1,customAspectRatio:d,convertToWebp:m=!0,cropSize:a,maxFiles:g,compressionQuality:x=.8,maxCompressedWidth:P,maxCompressedHeight:A})=>{let{showErrorMessage:I}=a$9(),C=useMemo(()=>d||(a&&typeof a!="number"?a.width/a.height:1),[d,a]),[h,w]=useState([]),[v,b]=useState(!1),[S,L]=useState(null),[u,E]=useState(null),[c,R]=useState(""),[z,O]=useState(!1),[T,M]=useState([]),[B,K]=useState(0),[oe,j]=useState(0),ne=f=>{if(f.length<1)return;let F=f[0];L(F),K(_=>_+1);let D=new FileReader;D.onload=()=>{R(D.result),b(!0);},D.readAsDataURL(F);},ge=(f,F)=>{E(F);},se=async f=>!S||!u?null:new Promise(F=>{let D=document.createElement("canvas"),_=D.getContext("2d"),N=new Image;N.onload=async()=>{let{width:G,height:pe,x:_e,y:Go}=u,Wo=Math.abs(C),ye=G,Ue=pe;a&&typeof a=="object"?(ye=a.width,Ue=a.height):a&&typeof a=="number"&&(ye=a,Ue=a/Wo),D.width=ye,D.height=Ue,_?(_.drawImage(N,_e,Go,G,pe,0,0,ye,Ue),D.toBlob(async oo=>{if(oo){let Ze=new File([oo],S.name,{type:S.type,lastModified:Date.now()});if(m)try{Ze=await Uo(Ze,x);}catch(jo){I(jo,"Erro ao converter para WebP");}let ro=Ze;ro.id=f,F(ro);}else F(null);},"image/png")):F(null);},N.src=c;}),le=async()=>{if(!(!S||!u||T.length===0)){O(!0);try{let f=T[0],F=await se(f.id);if(F){let _=await l([F]);_&&(!e$1&&!o&&w(N=>[...N,..._]),e$1?.([...s||[],..._]),o?.(F));}b(!1),O(!1),R(""),L(null);let D=T.slice(1);M(D),ne(D);}catch(f){I(f,"Erro ao processar imagem"),O(!1);}}},Z=()=>{b(!1),O(!1),R(""),L(null),M([]),K(0),j(0);},J=async f=>{if(f.length===0)return;let F=Object.keys(i?.accept||{}).some(_=>_.includes("image/")),D=h.length+f.length;if(g&&D>g){I(new Error(`M\xE1ximo de ${g} arquivos`),"Erro ao fazer upload");return}try{if(F&&p){let N=f.filter(G=>G.type.startsWith("image/")).map((G,pe)=>{let _e=G;return _e.id=`temp-crop-${Date.now()}-${pe}`,_e});j(N.length),K(0),M(N),ne(N);}else {let _=[];for(let G of f)if(G.type.startsWith("image/")&&m)try{let pe=await To(G,x,P,A);_.push(pe);}catch(pe){I(pe,"Erro ao comprimir imagem"),_.push(G);}else _.push(G);let N=await l(_);N&&(!e$1&&!o&&w(G=>[...G,...N]),e$1?.([...s||[],...N]),o?.(N[0]));}}catch(_){I(_,"Erro ao processar arquivos");}},Q=f=>{if(!f.length)return;let F=f[0]?.errors[0]?.code,D=i?.maxSize||3145728;I(F==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(D)}`):F==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):f[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:re,getInputProps:H,isDragActive:n,isDragReject:ue,fileRejections:te}=useDropzone({onDrop:J,onDropRejected:Q,...i}),Fe=f=>{if(!f){t||w([]),t?.(void 0);return}let F=h.filter(D=>D.id!==f.id);t||w(F),t?.(f);},fe=(f,F,D)=>{r?.(f,F,D);},be=useRef("");return useEffect(()=>{let f=s?.map(F=>F.id).join(",")||"";f!==be.current&&(be.current=f,w(s||[]));},[s]),{file:h?.[0],files:h,aspectRatio:C,dropzoneProps:{getRootProps:re,getInputProps:H,isDragActive:n,isDragReject:ue,fileRejections:te},cropState:{cropModalOpen:v,imagePreview:c,cropLoading:z,setCropModalOpen:b,onCropInitialized:ge,handleCropSave:le,handleCropCancel:Z,currentImageIndex:B,totalPendingImages:oe},setInitialFiles:w,handleRemove:Fe,handleReorder:fe}},q=kr;var Ve=(n=>(n.APPLICATION_OCTET_STREAM="application/octet-stream",n.IMAGE_JPEG="image/jpeg",n.IMAGE_JPG="image/jpg",n.IMAGE_PNG="image/png",n.IMAGE_GIF="image/gif",n.IMAGE_WEBP="image/webp",n.IMAGE_SVG="image/svg+xml",n.IMAGE_BMP="image/bmp",n.IMAGE_TIFF="image/tiff",n.IMAGE_ICO="image/x-icon",n.IMAGE_AVIF="image/avif",n.APPLICATION_PDF="application/pdf",n.TEXT_PLAIN="text/plain",n.TEXT_CSV="text/csv",n.APPLICATION_RTF="application/rtf",n.APPLICATION_MSWORD="application/msword",n.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",n.APPLICATION_MSEXCEL="application/vnd.ms-excel",n.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",n.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",n.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",n.APPLICATION_ODT="application/vnd.oasis.opendocument.text",n.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",n.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",n.APPLICATION_XML="application/xml",n.TEXT_XML="text/xml",n.TEXT_HTML="text/html",n.TEXT_CSS="text/css",n.APPLICATION_JSON="application/json",n.TEXT_JAVASCRIPT="text/javascript",n.APPLICATION_ZIP="application/zip",n.APPLICATION_GZIP="application/gzip",n.APPLICATION_RAR="application/vnd.rar",n.APPLICATION_7Z="application/x-7z-compressed",n.AUDIO_MPEG="audio/mpeg",n.AUDIO_WAV="audio/wav",n.AUDIO_OGG="audio/ogg",n.AUDIO_WEBM="audio/webm",n.AUDIO_AAC="audio/aac",n.VIDEO_MP4="video/mp4",n.VIDEO_MPEG="video/mpeg",n.VIDEO_OGG="video/ogg",n.VIDEO_WEBM="video/webm",n.VIDEO_QUICKTIME="video/quicktime",n))(Ve||{}),Be=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(Be||{});var jr=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r}=a$9(),[t,l]=useState(!1),[s,i]=useState(!1),[p,d]=useState(null),[m,a]=useState([]),g=useMemo(()=>m?.[0],[m]),x=s||t,P=useCallback(async h=>{if(!h.length){a([]),i(!1);return}i(!0);try{let v=(await Promise.all(h.map(async({url:b,id:S,name:L})=>{try{if(!b)return null;let u=await fetch(b);if(!u.ok)throw new Error(u.statusText);let E=await u.blob(),c=null;if(!L){let O=u.headers.get("content-disposition")||void 0;if(O){let T=Oo(O);if(T)try{c=decodeURIComponent(T);}catch{c=T;}}}let R=c||L||S,z=new File([E],R,{type:E.type});return z.id=S,z.url=b,z}catch{return null}}))).filter(Boolean);a(v),i(!1);}catch(w){r(w,"Erro ao carregar arquivos"),a([]),i(!1);}},[r]),A=useRef("");useEffect(()=>{let h=o?.map(({id:w})=>w).join(",")||"";h!==A.current&&(async()=>(A.current=h,await P(o)))();},[o,P]);let I=async h=>{if(!h||!Array.isArray(h))throw new Error("Arquivos inv\xE1lidos");let w=h.filter(v=>v instanceof File);if(w?.length){l(!0);try{let v=w.map(u=>{let E=u.type||"application/octet-stream",c=Be[E];if(!c)throw new Error(`Tipo de arquivo n\xE3o suportado: ${E}`);return {file:u,mimeType:E,contentTypeEnum:c}}),b=await e({files:v.map(({file:u,contentTypeEnum:E})=>({content_type:E,name:u.name}))}).unwrap(),S=b.files.map((u,E)=>{let c=v[E].file,R=c;return R.id=u.id,R.url=URL.createObjectURL(c),R});return await(await Promise.all(b.files.map((u,E)=>{let{mimeType:c}=v[E],R=S[E];return fetch(u.url,{method:"PUT",headers:{"Content-Type":c,"Content-Disposition":`inline; filename*=${Lo(R.name)}`,"X-File-Id":u.id},body:R})}))).forEach(async u=>{if(!u.ok)throw new Error("Erro no upload do arquivo.")}),S}catch(v){throw d(v),r(v,"Erro no upload"),v}finally{l(!1);}}},C=useMemo(()=>p&&p instanceof Error?p.message:p,[p]);return {setFilesPreview:a,uploadFiles:I,filesPreview:m,filePreview:g,isLoadingPreview:s,isUploadingFiles:t,isUploadOrLoadingFiles:x,uploadErrorText:C}},X=jr;var Hr=({sx:e,id:o,name:r,tabIndex:t,uploading:l,getRootProps:s,getInputProps:i,isDragActive:p,isError:d,disabled:m,dropZoneSxProps:a,dropZoneContent:g,children:x,...P})=>jsxs(Me,{children:[l&&jsx(a$8,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(De,{sx:{width:1,position:"relative",...e},children:[jsxs(lo,{...s(),"data-testid":"drop-zone-styled-area",isError:d,isDragActive:p,disabled:!!m,sx:a,...P,children:[jsx("input",{...i(),id:o,tabIndex:t,name:r}),g]}),x]})]}),de=Hr;var Xr=({header:e,description:o,sx:r,...t})=>jsxs(xe,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...t,children:[jsx(a$6,{sx:{width:220}}),jsxs("div",{children:[jsx(Je,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(Je,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(Je,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),me=memo(Xr);var Yr=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:l=[],id:s,disabled:i,error:p,helperText:d,thumbnail:m,dropZoneSxProps:a,uploading:g,tabIndex:x,maxFiles:P,placeholderAlt:A,placeholderProps:I,...C})=>{let{filesPreview:h,isUploadOrLoadingFiles:w,uploadErrorText:v,uploadFiles:b}=X({createFilesMutation:t,filesDetails:l}),{files:S,dropzoneProps:L,handleRemove:u,handleReorder:E}=q({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:h,dropzoneOptions:{multiple:!0,disabled:i,...C},maxFiles:P,uploadFiles:b}),{getRootProps:c,getInputProps:R,isDragActive:z,isDragReject:O}=L,T=!!S?.filter(B=>!!B.id).length,M=O||!!p||!!v;return jsxs(de,{id:s,uploading:g||w,disabled:i,dropZoneSxProps:a,tabIndex:x,getRootProps:c,getInputProps:R,isDragActive:z,isError:M,dropZoneContent:jsx(Fragment,{children:A?jsx(xe,{children:A}):jsx(me,{header:I?.header,description:I?.description})}),children:[jsx(y,{disabled:i,helperText:d,isError:M}),p?jsx(y,{helperText:p,isError:!0}):null,v?jsx(y,{helperText:v,isError:!0}):null,T&&jsx(De,{sx:{my:3},children:jsx(Se,{files:S,thumbnail:!!m,onRemove:e?u:void 0,onReorder:o?E:void 0})})]})},et=memo(Yr);var st=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:l=[],id:s,disabled:i,error:p,helperText:d,dropZoneSxProps:m,placeholderProps:a,placeholderAlt:g,uploading:x,tabIndex:P,maxFiles:A,aspectRatio:I,enableCrop:C=!0,convertToWebp:h=!0,cropSize:w,name:v,label:b,...S})=>{let{filesPreview:L,isUploadOrLoadingFiles:u,uploadErrorText:E,uploadFiles:c}=X({createFilesMutation:t,filesDetails:l}),R=x||u,{files:z,dropzoneProps:O,cropState:T,aspectRatio:M,handleRemove:B,handleReorder:K}=q({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:L,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:i,...S},enableCrop:C,customAspectRatio:I,convertToWebp:h,maxFiles:A,cropSize:w,uploadFiles:c}),{getRootProps:oe,getInputProps:j,isDragActive:ne,isDragReject:ge}=O,{cropModalOpen:se,imagePreview:le,cropLoading:Z,onCropInitialized:J,handleCropSave:Q,handleCropCancel:re,currentImageIndex:H,totalPendingImages:n}=T,ue=!!z?.filter(fe=>!!fe.id).length,te=ge||!!p||!!E,Fe=useMemo(()=>{let fe=b??"Ajustar Imagem",be=n>1||H>1?` (${H} de ${n})`:"";return `${fe}${be}`},[b,n,H]);return jsxs(de,{id:s,name:v,uploading:R,disabled:i,dropZoneSxProps:m,tabIndex:P,getRootProps:oe,getInputProps:j,isDragActive:ne,isError:te,dropZoneContent:jsx(Fragment,{children:g?jsx(xe,{children:g}):jsx(me,{header:a?.header,description:a?.description})}),children:[jsx(y,{disabled:i,helperText:d,isError:te}),p?jsx(y,{helperText:p,isError:!0}):null,E?jsx(y,{helperText:E,isError:!0}):null,ue&&jsx(De,{sx:{my:3,ml:.5},children:jsx(Se,{files:z,thumbnail:!0,onRemove:B,onReorder:o?K:void 0})}),jsx(a$7,{open:se,onClose:re,label:Fe,imageSrc:le,aspectRatio:M,onInitialized:J,onSave:Q,loading:Z,cropSize:w})]})},lt=memo(st);var ut=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:l,disabled:s,error:i,helperText:p,sx:d,dropZoneSxProps:m$1,uploading:a,tabIndex:g,placeholderAlt:x,placeholderProps:P,...A})=>{let{filesPreview:I,isUploadOrLoadingFiles:C,uploadErrorText:h,uploadFiles:w}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),v=C||a,{file:b,dropzoneProps:S,handleRemove:L}=q({uploadFiles:w,onFileSelect:e$1,onRemove:o,filesPreview:I,dropzoneOptions:{multiple:!1,disabled:s,...A}}),{getRootProps:u,getInputProps:E,isDragActive:c,isDragReject:R}=S,z=useCallback(B=>{B.stopPropagation(),L(b||void 0);},[b,L]),O=!!b,T=typeof b=="string",M=R||!!i||!!h;return jsxs(de,{id:l,uploading:v,disabled:s,dropZoneSxProps:m$1,tabIndex:g,getRootProps:u,getInputProps:E,isDragActive:c,isError:M,dropZoneContent:jsxs(Fragment,{children:[!O&&(x?jsx(xe,{...P,children:x}):jsx(me,{})),O&&jsxs(xe,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:B=>`solid 1px ${B.palette.divider}`,...d},children:[jsx(Ee,{file:b}),jsxs(xe,{flexGrow:1,sx:{minWidth:0},children:[jsx(Je,{variant:"subtitle2",noWrap:!0,children:T?b:b.name}),jsx(Je,{variant:"caption",sx:{color:"text.secondary"},children:T?"":e(b.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(po,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:z,children:jsx(a$5,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(y,{disabled:s,helperText:p,isError:M}),i?jsx(y,{helperText:i,isError:!0}):null,h?jsx(y,{helperText:h,isError:!0}):null]})},ft=memo(ut);var Et=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:l,disabled:s,error:i,helperText:p,dropZoneSxProps:d,placeholderProps:m,placeholderAlt:a,hoverAlt:g,uploading:x,tabIndex:P,aspectRatio:A,enableCrop:I=!0,convertToWebp:C=!0,name:h,label:w,cropSize:v,sx:b,maxWidth:S,maxHeight:L,compressionQuality:u=.8,maxCompressedWidth:E,maxCompressedHeight:c,fill:R,...z})=>{let{filesPreview:O,isUploadOrLoadingFiles:T,uploadErrorText:M,uploadFiles:B}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),[K,oe]=useState(!1),{file:j,dropzoneProps:ne,cropState:ge,handleRemove:se,aspectRatio:le}=q({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...z},filesPreview:O,enableCrop:I,customAspectRatio:A,convertToWebp:C,cropSize:v,uploadFiles:B,compressionQuality:u,maxCompressedWidth:E,maxCompressedHeight:c}),{getRootProps:Z,getInputProps:J,isDragActive:Q,isDragReject:re}=ne,{cropModalOpen:H,imagePreview:n,cropLoading:ue,onCropInitialized:te,handleCropSave:Fe,handleCropCancel:fe}=ge,be=useCallback(()=>{se(j||void 0);},[j,se]),f=!!j,F=re||!!i||!!M,D=x||T,_=f?{opacity:0}:{opacity:1},N=d?.width;return useEffect(()=>{f||oe(!1);},[f]),jsxs(Me,{sx:{...b,...N&&{width:N}},children:[(D||K)&&jsx(a$8,{}),jsxs(de,{id:l,uploading:D,disabled:s,dropZoneSxProps:d,tabIndex:P,getRootProps:Z,getInputProps:J,isDragActive:Q,isError:F,name:h,dropZoneContent:jsxs(Fragment,{children:[a?jsx(xe,{sx:_,children:a}):jsx(me,{sx:_,header:m?.title,description:m?.description}),f&&jsx(Xe,{file:j,cropSize:v,isLoading:K,isUploading:D,onLoading:oe,aspectRatio:le,maxWidth:S,maxHeight:L,hoverAlt:g,fill:R})]}),children:[jsx(y,{disabled:s,helperText:p,isError:F}),i?jsx(y,{helperText:i,isError:!0}):null,M?jsx(y,{helperText:M,isError:!0}):null,f&&e&&jsx(go,{size:"small",onClick:be,disabled:s,label:"Remover arquivo",children:jsx(a$5,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$7,{open:H,onClose:fe,label:w??"Ajustar Imagem",imageSrc:n,aspectRatio:le,onInitialized:te,onSave:Fe,loading:ue,cropSize:v})]})]})},wt=memo(Et);var yt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:l,label:s,id:i,tabIndex:p,error:d,helperText:m,sx:a,name:g,maxSize:x,uploading:P,aspectRatio:A=1,enableCrop:I=!0,convertToWebp:C=!0,cropSize:h,...w})=>{let[v,b]=useState(!1),{filesPreview:S,isUploadOrLoadingFiles:L,uploadErrorText:u,uploadFiles:E}=X({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:c,dropzoneProps:R,cropState:z,handleRemove:O}=q({filesPreview:S,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:l,maxSize:x,...w},enableCrop:I,customAspectRatio:A,convertToWebp:C,cropSize:h,uploadFiles:E}),{getRootProps:T,getInputProps:M,isDragActive:B,isDragReject:K}=R,{cropModalOpen:oe,imagePreview:j,cropLoading:ne,onCropInitialized:ge,handleCropSave:se,handleCropCancel:le}=z,Z=K||!!d||!!u,J=v||L||P,Q=!!e,re=useRef(t?.url||""),H=useRef();useEffect(()=>{if(!c){re.current="",H.current=void 0;return}if(H.current===c.id)return;H.current=c.id,b(!0);let te=URL.createObjectURL(c);return re.current=te,()=>{URL.revokeObjectURL(te);}},[c]);let n=()=>{b(!1);},ue=useCallback(()=>Q&&c?()=>O(c):T().onClick,[Q,c,T,O]);return jsxs(Fragment,{children:[jsxs(xe,{sx:{alignItems:"center"},children:[jsxs(vo,{sx:a,isError:Z,isDragActive:B,hasFile:!!c,...T(),onClick:ue(),children:[jsxs(Po,{children:[J&&jsx(Io,{children:jsx(_t,{size:135,thickness:2,color:"primary"})}),c&&jsx(Eo,{alt:"Avatar Preview",src:re.current,onLoad:n,...J&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!c&&!J&&jsxs($e,{isError:Z,hasFile:!1,children:[jsx(a$5,{icon:"ADD_IMAGE",width:32}),jsx(Je,{variant:"caption",textAlign:"center",sx:{color:Z?"error.main":"text.disabled"},children:"Adicionar foto"})]}),c&&!J&&jsxs($e,{isError:Z,hasFile:!0,children:[jsx(a$5,{icon:Q?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(Je,{variant:"caption",textAlign:"center",sx:{color:Z?"error.main":"common.white"},children:Q?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:g,id:i,tabIndex:p,...M()})]}),jsx(xe,{sx:{alignItems:"center",mt:-.5},children:jsx(y,{helperText:m,disabled:l,isError:Z})}),u?jsx(y,{helperText:u,isError:!0}):null,d?jsx(y,{helperText:d,isError:!0}):null]}),oe&&j&&jsx(a$7,{open:oe,onClose:le,label:s??"Ajustar Imagem",imageSrc:j,aspectRatio:A,onInitialized:ge,onSave:se,loading:ne,cropSize:h,cropShape:"round"})]})},Ut=memo(yt);var Ct=({error:e,name:o,disabled:r,sx:t,...l})=>{let{getRootProps:s,getInputProps:i,isDragActive:p,isDragReject:d}=useDropzone({disabled:r,...l}),m=d||e;return jsxs(uo,{...s(),isDragActive:p,hasError:!!m,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...i()}),"Selecionar arquivo"]})},Mt=memo(Ct);
|
|
34
|
+
|
|
35
|
+
export { y as a, Se as b, Xe as c, ke as d, Ee as e, Ji as f, Uo as g, To as h, Oo as i, Lo as j, q as k, Ve as l, Be as m, X as n, et as o, lt as p, ft as q, wt as r, Ut as s, Mt as t };
|
|
36
|
+
//# sourceMappingURL=out.js.map
|
|
37
|
+
//# sourceMappingURL=chunk-VYNBVZSA.js.map
|