@zydon/common 2.2.87 → 2.2.88

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.
@@ -0,0 +1,9 @@
1
+ import { a } from './chunk-D27ND54J.js';
2
+ import { forwardRef } from 'react';
3
+ import d from '@mui/material/Box';
4
+ import { styled, lighten, useTheme } from '@mui/material/styles';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ var l={root:"mnl__label__root",icon:"mnl__label__icon"};var i=styled(d)(({theme:o,ownerState:{color:t,variant:r}})=>{let e={...t==="default"&&{...r==="filled"&&{color:o.vars.palette.common.white,backgroundColor:o.vars.palette.text.primary,[a.dark]:{color:o.vars.palette.grey[800]}},...r==="outlined"&&{backgroundColor:"transparent",color:o.vars.palette.text.primary,border:`2px solid ${o.vars.palette.text.primary}`},...r==="soft"&&{color:o.vars.palette.text.secondary,border:`1px solid ${lighten(o.palette.grey[500],.32)}`},...r==="inverted"&&{color:o.vars.palette.grey[800],backgroundColor:o.vars.palette.grey[300]}}},a$1={...t!=="default"&&{...r==="filled"&&{color:o.vars.palette[t].contrastText,backgroundColor:o.vars.palette[t].main},...r==="outlined"&&{backgroundColor:"transparent",color:o.vars.palette[t].main,border:`2px solid ${o.vars.palette[t].main}`},...r==="soft"&&{color:o.vars.palette[t].dark,backgroundColor:lighten(o.palette[t].main,.84),[a.dark]:{color:o.vars.palette[t].light}},...r==="inverted"&&{color:o.vars.palette[t].darker,backgroundColor:o.vars.palette[t].lighter}}};return {height:24,minWidth:24,lineHeight:0,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",padding:o.spacing(0,.75),fontSize:o.typography.pxToRem(12),fontWeight:o.typography.fontWeightBold,borderRadius:o.shape.borderRadius*.75,transition:o.transitions.create("all",{duration:o.transitions.duration.shorter}),...e,...a$1}});var L=o=>o.charAt(0).toUpperCase()+o.slice(1),f=forwardRef(({children:o,color:t="default",variant:r="soft",startIcon:e,endIcon:a,sx:m,...b},g)=>{let y=useTheme(),p={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return jsxs(i,{ref:g,component:"span",className:l.root,ownerState:{color:t,variant:r},sx:{...e&&{pl:.75},...a&&{pr:.75},...m},theme:y,...b,children:[e&&jsx(d,{component:"span",className:l.icon,sx:{mr:.75,...p},children:e}),typeof o=="string"?L(o):o,a&&jsx(d,{component:"span",className:l.icon,sx:{ml:.75,...p},children:a})]})});f.displayName="Label";var H=f;
8
+
9
+ export { H as a };
@@ -0,0 +1,3 @@
1
+ var r=(e=>(e.GET="GET",e.POST="POST",e.PATCH="PATCH",e.DELETE="DELETE",e.PUT="PUT",e))(r||{}),T=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BIN\xC1RIO",value:"BYTEA"}],a=[{label:"PUT",value:"PUT"},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"}],n=(e=>(e.GET="info",e.POST="success",e.PATCH="secondary",e.DELETE="error",e.PUT="warning",e))(n||{});
2
+
3
+ export { r as a, T as b, a as c, n as d };
@@ -1,9 +1,9 @@
1
- import { a } from '../../chunk-5COMELEB.js';
1
+ import { a } from '../../chunk-O3BL3FHF.js';
2
+ import '../../chunk-GOC7PC2S.js';
2
3
  import '../../chunk-MCT77MRN.js';
3
4
  import '../../chunk-CFVUZ4S5.js';
4
- import '../../chunk-ZVXT3QOF.js';
5
- import '../../chunk-GOC7PC2S.js';
6
5
  import '../../chunk-CFYNJQGN.js';
6
+ import '../../chunk-ZVXT3QOF.js';
7
7
  import { i } from '../../chunk-D27ND54J.js';
8
8
  import { a as a$1 } from '../../chunk-NYMDPEVU.js';
9
9
  import '../../chunk-RI5SVG3Y.js';
@@ -1,9 +1,2 @@
1
- import { a } from '../../chunk-D27ND54J.js';
2
- import { forwardRef } from 'react';
3
- import d from '@mui/material/Box';
4
- import { styled, lighten, useTheme } from '@mui/material/styles';
5
- import { jsxs, jsx } from 'react/jsx-runtime';
6
-
7
- var l={root:"mnl__label__root",icon:"mnl__label__icon"};var i=styled(d)(({theme:o,ownerState:{color:t,variant:r}})=>{let e={...t==="default"&&{...r==="filled"&&{color:o.vars.palette.common.white,backgroundColor:o.vars.palette.text.primary,[a.dark]:{color:o.vars.palette.grey[800]}},...r==="outlined"&&{backgroundColor:"transparent",color:o.vars.palette.text.primary,border:`2px solid ${o.vars.palette.text.primary}`},...r==="soft"&&{color:o.vars.palette.text.secondary,border:`1px solid ${lighten(o.palette.grey[500],.32)}`},...r==="inverted"&&{color:o.vars.palette.grey[800],backgroundColor:o.vars.palette.grey[300]}}},a$1={...t!=="default"&&{...r==="filled"&&{color:o.vars.palette[t].contrastText,backgroundColor:o.vars.palette[t].main},...r==="outlined"&&{backgroundColor:"transparent",color:o.vars.palette[t].main,border:`2px solid ${o.vars.palette[t].main}`},...r==="soft"&&{color:o.vars.palette[t].dark,backgroundColor:lighten(o.palette[t].main,.84),[a.dark]:{color:o.vars.palette[t].light}},...r==="inverted"&&{color:o.vars.palette[t].darker,backgroundColor:o.vars.palette[t].lighter}}};return {height:24,minWidth:24,lineHeight:0,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",padding:o.spacing(0,.75),fontSize:o.typography.pxToRem(12),fontWeight:o.typography.fontWeightBold,borderRadius:o.shape.borderRadius*.75,transition:o.transitions.create("all",{duration:o.transitions.duration.shorter}),...e,...a$1}});var L=o=>o.charAt(0).toUpperCase()+o.slice(1),f=forwardRef(({children:o,color:t="default",variant:r="soft",startIcon:e,endIcon:a,sx:m,...b},g)=>{let y=useTheme(),p={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return jsxs(i,{ref:g,component:"span",className:l.root,ownerState:{color:t,variant:r},sx:{...e&&{pl:.75},...a&&{pr:.75},...m},theme:y,...b,children:[e&&jsx(d,{component:"span",className:l.icon,sx:{mr:.75,...p},children:e}),typeof o=="string"?L(o):o,a&&jsx(d,{component:"span",className:l.icon,sx:{ml:.75,...p},children:a})]})});f.displayName="Label";var H=f;
8
-
9
- export { H as default };
1
+ export { a as default } from '../../chunk-UA7OPAW7.js';
2
+ import '../../chunk-D27ND54J.js';
@@ -0,0 +1,19 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HttpMethodStatus } from '../../types/webhook.js';
3
+
4
+ interface WebhookCardProps {
5
+ name?: string;
6
+ onChangeActive?(value: boolean): void;
7
+ onCreate(): void;
8
+ onEdit(): void;
9
+ onDelete(): void;
10
+ data?: {
11
+ active: boolean;
12
+ url: string;
13
+ method: HttpMethodStatus;
14
+ };
15
+ }
16
+
17
+ declare const WebhookCard: ({ onCreate, data, name, onChangeActive, onDelete, onEdit, }: WebhookCardProps) => react_jsx_runtime.JSX.Element;
18
+
19
+ export { WebhookCard as default };
@@ -0,0 +1,21 @@
1
+ import { d } from '../../chunk-WUQSPJPN.js';
2
+ import { a as a$3 } from '../../chunk-UA7OPAW7.js';
3
+ import { a } from '../../chunk-HOMGLSVS.js';
4
+ import { a as a$2 } from '../../chunk-BYAPKKGB.js';
5
+ import '../../chunk-D27ND54J.js';
6
+ import { a as a$4 } from '../../chunk-NYMDPEVU.js';
7
+ import '../../chunk-RI5SVG3Y.js';
8
+ import { a as a$1 } from '../../chunk-ORYAES3Q.js';
9
+ import E from '@mui/material/Button';
10
+ import N from '@mui/material/FormControlLabel';
11
+ import O from '@mui/material/IconButton';
12
+ import w from '@mui/material/Link';
13
+ import l from '@mui/material/Stack';
14
+ import M from '@mui/material/Switch';
15
+ import m from '@mui/material/Typography';
16
+ import { styled } from '@mui/material/styles';
17
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
18
+
19
+ var u=styled(l)(({theme:t})=>({flexDirection:"row",padding:12,backgroundColor:t.palette.grey[100],borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginLeft:"auto"}})),h=styled(m)(({theme:t})=>({color:t.palette.grey[500],textTransform:"uppercase",fontSize:12,span:{color:t.palette.text.primary,fontWeight:700}})),b=styled(l)({padding:12}),x=styled(l)({padding:12,alignItems:"center",textAlign:"center"}),C=styled(l)(({theme:t})=>({flexDirection:"row",alignItems:"center",gap:8,fontSize:t.typography.body2.fontSize,color:t.palette.grey[500],padding:"8px 0"})),k=styled(a)(()=>({"& .MuiPopover-paper":{width:"144px",padding:"16px"},"& button":{justifyContent:"flex-start"}}));var z=({onCreate:t,data:r,name:v,onChangeActive:s,onDelete:I,onEdit:L})=>{let{active:i=!1}=r||{},p=a$1(),S=()=>{L(),p.onClose();},W=()=>{I(),p.onClose();};return jsxs(a$2,{padding:0,gap:0,sx:{opacity:r&&!i?.55:1},children:[jsxs(u,{children:[jsxs(l,{direction:"row",alignItems:"center",gap:2,children:[jsxs(h,{children:["EVENTO: ",jsx("span",{children:v||"NOME DO EVENTO"})]}),s&&r&&jsx(N,{control:jsx(M,{checked:i,onChange:(D,P)=>s(P),size:"small"}),label:jsx(a$3,{color:i?"success":"error",children:i?"Ativo":"Inativo"})})]}),r&&jsxs(Fragment,{children:[jsx(O,{onClick:p.onOpen,children:jsx(a$4,{icon:"MORE_OPTIONS_VERTICAL",color:"primary.grey",width:24})}),jsx(k,{open:p.open,onClose:p.onClose,children:jsxs(l,{gap:1,children:[jsx(E,{variant:"text",size:"small",fullWidth:!0,color:"inherit",startIcon:jsx(a$4,{icon:"PENCIL_EDIT",color:"grey"}),onClick:S,children:jsx(m,{variant:"body2",children:"Editar"})}),jsx(E,{variant:"text",size:"small",fullWidth:!0,color:"inherit",onClick:W,startIcon:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",color:"grey"}),children:jsx(m,{variant:"body2",children:"Limpar"})})]})})]})]}),jsx(b,{children:r?jsxs(C,{children:[jsx(a$3,{color:d[r.method],children:r.method}),r.url]}):jsxs(x,{children:[jsx(m,{variant:"caption",color:"text.disabled",children:"Ainda n\xE3o h\xE1 webhook vinculado."}),jsx(w,{component:"button",fontSize:12,underline:"always",onClick:t,type:"button",children:"Clique aqui para adicionar"})]})})]})},ro=z;
20
+
21
+ export { ro as default };
@@ -1,7 +1,7 @@
1
- export { a as default } from '../chunk-5COMELEB.js';
1
+ export { a as default } from '../chunk-O3BL3FHF.js';
2
+ import '../chunk-GOC7PC2S.js';
2
3
  import '../chunk-MCT77MRN.js';
3
4
  import '../chunk-CFVUZ4S5.js';
4
- import '../chunk-ZVXT3QOF.js';
5
- import '../chunk-GOC7PC2S.js';
6
5
  import '../chunk-CFYNJQGN.js';
6
+ import '../chunk-ZVXT3QOF.js';
7
7
  import '../chunk-D27ND54J.js';
@@ -41,5 +41,12 @@ declare const httpMethods: {
41
41
  label: string;
42
42
  value: HttpMethodStatus;
43
43
  }[];
44
+ declare enum HttpConfigLabelMethodStatus {
45
+ GET = "info",
46
+ POST = "success",
47
+ PATCH = "secondary",
48
+ DELETE = "error",
49
+ PUT = "warning"
50
+ }
44
51
 
45
- export { WebhookHeaders, WebhookType, contentType, httpMethods };
52
+ export { HttpConfigLabelMethodStatus, HttpMethodStatus, WebhookHeaders, WebhookType, contentType, httpMethods };
@@ -1,3 +1 @@
1
- var e=[{label:"JSON",value:"JSON"},{label:"XML",value:"XML"},{label:"BIN\xC1RIO",value:"BYTEA"}],t=[{label:"PUT",value:"PUT"},{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"}];
2
-
3
- export { e as contentType, t as httpMethods };
1
+ export { d as HttpConfigLabelMethodStatus, a as HttpMethodStatus, b as contentType, c as httpMethods } from '../chunk-WUQSPJPN.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.2.87",
3
+ "version": "2.2.88",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,7 +1,7 @@
1
- import { a as a$3, b as b$1 } from './chunk-MCT77MRN.js';
2
- import { a } from './chunk-ZVXT3QOF.js';
3
1
  import { a as a$1, e } from './chunk-GOC7PC2S.js';
2
+ import { a as a$3, b as b$1 } from './chunk-MCT77MRN.js';
4
3
  import { q, s, a as a$2 } from './chunk-CFYNJQGN.js';
4
+ import { a } from './chunk-ZVXT3QOF.js';
5
5
  import { c } from './chunk-D27ND54J.js';
6
6
  import A from '@mui/material/CssBaseline';
7
7
  import { Experimental_CssVarsProvider, experimental_extendTheme, lighten, darken } from '@mui/material/styles';