@s_mart/minha-conta 11.0.4 → 11.0.5

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +10 -8
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{Grid2 as fr,Tab as ua,Tabs as ol}from"@mui/material";import{createContext as Ma,useContext as Sr,useMemo as Ta,useState as we}from"react";import{jwtDecode as Ia}from"jwt-decode";import Aa from"axios";import{createStore as Ea,useStore as Dr}from"zustand";import{Backdrop as ba,CircularProgress as va}from"@mui/material";import{jsx as Pr}from"react/jsx-runtime";function Sa({show:o}){return Pr(ba,{open:o,style:{zIndex:1e4},children:Pr(va,{size:50,sx:{color:e=>e.palette.primary.main}})})}var xr=Sa;import{create as Da}from"zustand";var Ge={loading:!1};var U=Da(o=>({...Ge,setLoading:e=>o({loading:e}),resetState:()=>o(Ge)}));import{createStore as Ra}from"zustand";var br={axiosInstance:null,endpointsV2:!1,ready:!1,tabAtiva:"minhaEmpresa",sistemaNome:"",telefoneSuporte:"",telefoneCS:"",minhaEmpresa:{},meuPlano:{},recursosDialog:{},planosDialog:{}};var vr=o=>Ra()(e=>({...br,...o,setTabAtiva:r=>e({tabAtiva:r})}));import{jsx as Fa,jsxs as Ga}from"react/jsx-runtime";var Ve=Ma(null);function xo(o){let e=U(i=>i.loading),[r]=we(()=>Aa.create(o.axiosInstance.defaults)),[t]=we(()=>Ea(()=>o.slotProps??{})),[a]=we(()=>{let i,n=r?.defaults.headers.common.Authorization?.toString().replace("Bearer ","");if(n)try{i=Ia(n)}catch{}return vr({...o,axiosInstance:r,usuario:i,ready:!0})});return Ga(Ve.Provider,{value:Ta(()=>({storeMinhaConta:a,storeSlotProps:t}),[a,t]),children:[o.children,Fa(xr,{show:e})]})}function s(o){let e=Sr(Ve);if(e===null)throw new Error("useMinhaContaStore deve ser utilizado dentro de um MinhaContaProvider");return Dr(e.storeMinhaConta,o)}function Rr(o){let e=Sr(Ve);if(e===null)throw new Error("useSlotProps deve ser utilizado dentro de um MinhaContaProvider");return Dr(e.storeSlotProps,o)}import{useContext as Va,createContext as qa}from"react";var wa=o=>{let e=[];return typeof o!="object"||(Array.isArray(o)&&typeof o[0]=="string"?e=o:Array.isArray(o.errors)?e=o.errors:typeof o.errors=="string"?e=[o.errors]:typeof o.error=="string"?e=[o.error]:typeof o.erro=="string"?e=[o.erro]:o.erro?.mensagem?e=[o.erro.mensagem]:typeof o.message=="string"?e=[o.message]:typeof o.mensagem=="string"?e=[o.mensagem]:typeof o.authErrors?.[0]=="string"&&(e=o.authErrors)),e},re=wa;import{jsx as La}from"react/jsx-runtime";var Mr=qa(null),to=({onNotification:o,children:e})=>{let r=t=>{let a=re(t);console.error(t),o({variant:"error",title:a[0]})};return La(Mr.Provider,{value:{setNotification:o,handleErrors:r},children:e})},R=()=>{let o=Va(Mr);if(o===null)throw new Error("Hook `useMinhaContaContext` must be used inside a MinhaContaProvider");return o};import{colorPalette as qe}from"@s_mart/tokens";var Tr=o=>({"& .MuiTabs-indicator":{top:0,height:"100%",background:`linear-gradient(${o.palette.primary.main} 0%, ${o.palette.primary.main} 3%, ${qe.neutral[0]} 4%, ${qe.neutral[0]} 100%)`,zIndex:1},"&:not(.MuiTbs-selected)":{background:qe.neutral[30]},borderRadius:"8px 8px 0 0","& > .MuiTabs-scroller > .MuiTabs-flexContainer > .MuiButtonBase-root":{zIndex:2}});import{memo as Kn}from"react";import{Grid2 as nr,Paper as Qn,useMediaQuery as Jn}from"@mui/material";import{CircularProgress as Qi,Grid2 as Oo,Paper as Ji,Typography as uo,useMediaQuery as Zi}from"@mui/material";import{Button as Et,LIcon as Ft}from"@s_mart/core";import{decimal as on,valor as Gt}from"@s_mart/masks";import{lineShoppingCard as en,lineStar as rn}from"@s_mart/solid-icons";import{colorPalette as wt}from"@s_mart/tokens";import{useState as tn}from"react";import{Button as it,Dialog as le,LIcon as Di}from"@s_mart/core";import{Form as Ri,SelectV2 as Mi}from"@s_mart/form";import{lineWhatsApp as Ti}from"@s_mart/regular-icons";import{colorPalette as Ii}from"@s_mart/tokens";import{useState as za}from"react";var H=o=>{let[e,r]=za(!0);return{open:e,onCloseDialog:()=>{r(!1),setTimeout(()=>o(),100)}}};var ka=o=>{let e=`https://api.whatsapp.com/send?phone=${o}`;window.open(e,"_blank","noopener noreferrer")},ao=ka;import{CircularProgress as Na}from"@mui/material";import{jsx as Ir}from"react/jsx-runtime";function Ar(){return Ir("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"20vh"},children:Ir(Na,{})})}import{LIcon as Nr}from"@s_mart/core";import{lineChevronLeft as ei,lineChevronRight as ri}from"@s_mart/regular-icons";import{styled as Ba}from"@mui/material";import{colorPalette as $a}from"@s_mart/tokens";var Le=Ba("div")`
1
+ import{Grid2 as fr,Tab as ua,Tabs as ol}from"@mui/material";import{createContext as Ma,useContext as Sr,useMemo as Ta,useState as we}from"react";import{jwtDecode as Ia}from"jwt-decode";import Aa from"axios";import{createStore as Ea,useStore as Dr}from"zustand";import{Backdrop as ba,CircularProgress as va}from"@mui/material";import{jsx as Pr}from"react/jsx-runtime";function Sa({show:o}){return Pr(ba,{open:o,style:{zIndex:1e4},children:Pr(va,{size:50,sx:{color:e=>e.palette.primary.main}})})}var xr=Sa;import{create as Da}from"zustand";var Ge={loading:!1};var U=Da(o=>({...Ge,setLoading:e=>o({loading:e}),resetState:()=>o(Ge)}));import{createStore as Ra}from"zustand";var br={axiosInstance:null,endpointsV2:!1,ready:!1,tabAtiva:"minhaEmpresa",sistemaNome:"",telefoneSuporte:"",telefoneCS:"",minhaEmpresa:{},meuPlano:{},recursosDialog:{},planosDialog:{}};var vr=o=>Ra()(e=>({...br,...o,setTabAtiva:r=>e({tabAtiva:r})}));import{jsx as Fa,jsxs as Ga}from"react/jsx-runtime";var Ve=Ma(null);function xo(o){let e=U(i=>i.loading),[r]=we(()=>Aa.create(o.axiosInstance.defaults)),[t]=we(()=>Ea(()=>o.slotProps??{})),[a]=we(()=>{let i,n=r?.defaults.headers.common.Authorization?.toString().replace("Bearer ","");if(n)try{i=Ia(n)}catch{}return vr({...o,axiosInstance:r,usuario:i,ready:!0})});return Ga(Ve.Provider,{value:Ta(()=>({storeMinhaConta:a,storeSlotProps:t}),[a,t]),children:[o.children,Fa(xr,{show:e})]})}function s(o){let e=Sr(Ve);if(e===null)throw new Error("useMinhaContaStore deve ser utilizado dentro de um MinhaContaProvider");return Dr(e.storeMinhaConta,o)}function Rr(o){let e=Sr(Ve);if(e===null)throw new Error("useSlotProps deve ser utilizado dentro de um MinhaContaProvider");return Dr(e.storeSlotProps,o)}import{useContext as Va,createContext as qa}from"react";var wa=o=>{let e=[];return typeof o!="object"||(Array.isArray(o)&&typeof o[0]=="string"?e=o:Array.isArray(o.errors)?e=o.errors:typeof o.errors=="string"?e=[o.errors]:typeof o.error=="string"?e=[o.error]:typeof o.erro=="string"?e=[o.erro]:o.erro?.mensagem?e=[o.erro.mensagem]:typeof o.message=="string"?e=[o.message]:typeof o.mensagem=="string"?e=[o.mensagem]:typeof o.authErrors?.[0]=="string"&&(e=o.authErrors)),e},re=wa;import{jsx as La}from"react/jsx-runtime";var Mr=qa(null),to=({onNotification:o,children:e})=>{let r=t=>{let a=re(t);console.error(t),o({variant:"error",title:a[0]})};return La(Mr.Provider,{value:{setNotification:o,handleErrors:r},children:e})},R=()=>{let o=Va(Mr);if(o===null)throw new Error("Hook `useMinhaContaContext` must be used inside a MinhaContaProvider");return o};import{colorPalette as qe}from"@s_mart/tokens";var Tr=o=>({"& .MuiTabs-indicator":{top:0,height:"100%",background:`linear-gradient(${o.palette.primary.main} 0%, ${o.palette.primary.main} 3%, ${qe.neutral[0]} 4%, ${qe.neutral[0]} 100%)`,zIndex:1},"&:not(.MuiTbs-selected)":{background:qe.neutral[30]},borderRadius:"8px 8px 0 0","& > .MuiTabs-scroller > .MuiTabs-flexContainer > .MuiButtonBase-root":{zIndex:2}});import{memo as Kn}from"react";import{Grid2 as nr,Paper as Qn,useMediaQuery as Jn}from"@mui/material";import{CircularProgress as Qi,Grid2 as Oo,Paper as Ji,Typography as uo,useMediaQuery as Zi}from"@mui/material";import{Button as Et,LIcon as Ft}from"@s_mart/core";import{decimal as on,valor as Gt}from"@s_mart/masks";import{lineShoppingCard as en,lineStar as rn}from"@s_mart/solid-icons";import{colorPalette as wt}from"@s_mart/tokens";import{useState as tn}from"react";import{Button as it,Dialog as le,LIcon as Di}from"@s_mart/core";import{Form as Ri,SelectV2 as Mi}from"@s_mart/form";import{lineWhatsApp as Ti}from"@s_mart/regular-icons";import{colorPalette as Ii}from"@s_mart/tokens";import{useState as za}from"react";var H=o=>{let[e,r]=za(!0);return{open:e,onCloseDialog:()=>{r(!1),setTimeout(()=>o(),100)}}};var ka=o=>{let e=`https://api.whatsapp.com/send?phone=${o}`;window.open(e,"_blank","noopener noreferrer")},ao=ka;import{CircularProgress as Na}from"@mui/material";import{jsx as Ir}from"react/jsx-runtime";function Ar(){return Ir("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"20vh"},children:Ir(Na,{})})}import{LIcon as Nr}from"@s_mart/core";import{lineChevronLeft as ei,lineChevronRight as ri}from"@s_mart/regular-icons";import{styled as Ba}from"@mui/material";import{colorPalette as $a}from"@s_mart/tokens";import"@mui/system";var Le=Ba("div")`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  border-radius: 4px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s_mart/minha-conta",
3
- "version": "11.0.4",
3
+ "version": "11.0.5",
4
4
  "main": "./dist/index.mjs",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.mts",
@@ -16,6 +16,7 @@
16
16
  "@emotion/react": "^11.11.4",
17
17
  "@emotion/styled": "^11.13.0",
18
18
  "@mui/material": "^6.1.3",
19
+ "@mui/system": "^6.4.0",
19
20
  "@mui/x-data-grid": "^7.4.0",
20
21
  "@types/lodash-es": ">=4.17.12",
21
22
  "@types/node": ">=20.0.0",
@@ -31,9 +32,9 @@
31
32
  "react-hook-form": "^7.51.0",
32
33
  "typescript": ">=5.4.2",
33
34
  "zustand": "^4.5.2",
34
- "@s_mart/core": "9.0.4",
35
- "@s_mart/data": "10.0.4",
36
- "@s_mart/form": "9.0.4",
35
+ "@s_mart/core": "9.0.5",
36
+ "@s_mart/data": "10.0.5",
37
+ "@s_mart/form": "9.0.5",
37
38
  "@s_mart/hooks": "8.0.9",
38
39
  "@s_mart/masks": "5.2.0",
39
40
  "@s_mart/regular-icons": "6.0.6",
@@ -50,6 +51,7 @@
50
51
  "@emotion/react": "^11.11.4",
51
52
  "@emotion/styled": "^11.13.0",
52
53
  "@mui/material": "^6.1.3",
54
+ "@mui/system": "^6.4.0",
53
55
  "@mui/x-data-grid": "^7.4.0",
54
56
  "@types/lodash-es": ">=4.17.12",
55
57
  "@types/node": ">=20.0.0",
@@ -65,16 +67,16 @@
65
67
  "react-hook-form": "^7.51.0",
66
68
  "typescript": ">=5.4.2",
67
69
  "zustand": "^4.5.2",
68
- "@s_mart/core": "9.0.4",
69
- "@s_mart/data": "10.0.4",
70
- "@s_mart/form": "9.0.4",
71
- "@s_mart/hooks": "8.0.9",
70
+ "@s_mart/data": "10.0.5",
71
+ "@s_mart/form": "9.0.5",
72
+ "@s_mart/core": "9.0.5",
72
73
  "@s_mart/masks": "5.2.0",
73
74
  "@s_mart/regular-icons": "6.0.6",
74
75
  "@s_mart/rules": "5.1.1",
75
76
  "@s_mart/solid-icons": "6.0.3",
76
77
  "@s_mart/tokens": "5.1.1",
77
78
  "@s_mart/typed": "7.2.1",
79
+ "@s_mart/hooks": "8.0.9",
78
80
  "@s_mart/utils": "5.3.4"
79
81
  },
80
82
  "scripts": {