@zydon/common 2.0.3 → 2.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.
- package/dist/chunk-JWVPX7Y7.mjs +6 -0
- package/dist/components/ModalActions/index.d.ts +10 -0
- package/dist/components/ModalActions/index.mjs +6 -0
- package/dist/components/Portal/index.mjs +1 -6
- package/dist/components/SelectableCards/index.mjs +2 -2
- package/dist/components/SwapList/index.mjs +1 -1
- package/dist/components/form/Address/index.mjs +1 -1
- package/dist/components/form/SelectableCards/index.mjs +2 -2
- package/dist/components/form/Webhook/index.mjs +3 -3
- package/dist/types/webhook.d.ts +1 -1
- package/package.json +1 -1
- package/dist/{chunk-CKOWGDWH.mjs → chunk-XKSDKMZ4.mjs} +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
3
|
+
|
|
4
|
+
var d=({children:e,container:o,waitBeforeShow:t=50})=>{let[m,n]=useState(!1);return useEffect(()=>{let s=setTimeout(()=>n(!0),t);return ()=>clearTimeout(s)},[t]),t?m?createPortal(e,document.getElementById(o)||document.body):null:createPortal(e,document.getElementById(o)||document.body)},P=d;
|
|
5
|
+
|
|
6
|
+
export { P as a };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ModalActionsProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare const ModalActions: ({ children, id, }: PropsWithChildren<ModalActionsProps>) => react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { ModalActions as default };
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
|
-
|
|
4
|
-
var d=({children:e,container:o,waitBeforeShow:t=50})=>{let[m,n]=useState(!1);return useEffect(()=>{let s=setTimeout(()=>n(!0),t);return ()=>clearTimeout(s)},[t]),t?m?createPortal(e,document.getElementById(o)||document.body):null:createPortal(e,document.getElementById(o)||document.body)},P=d;
|
|
5
|
-
|
|
6
|
-
export { P as default };
|
|
1
|
+
export { a as default } from '../../chunk-JWVPX7Y7.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { a as default } from '../../chunk-
|
|
2
|
-
import '../../chunk-2ZLS7IUJ.mjs';
|
|
1
|
+
export { a as default } from '../../chunk-XKSDKMZ4.mjs';
|
|
3
2
|
import '../../chunk-OUPUY4L2.mjs';
|
|
3
|
+
import '../../chunk-2ZLS7IUJ.mjs';
|
|
4
4
|
import '../../chunk-WHA7HOMZ.mjs';
|
|
5
5
|
import '../../chunk-SXVKHA6L.mjs';
|
|
6
6
|
import '../../chunk-MUAMRRNL.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b, a as a$4 } from '../../chunk-MAKO5GLN.mjs';
|
|
2
|
-
import { a as a$1 } from '../../chunk-2ZLS7IUJ.mjs';
|
|
3
2
|
import { a } from '../../chunk-OUPUY4L2.mjs';
|
|
3
|
+
import { a as a$1 } from '../../chunk-2ZLS7IUJ.mjs';
|
|
4
4
|
import { a as a$2 } from '../../chunk-WHA7HOMZ.mjs';
|
|
5
5
|
import { a as a$3 } from '../../chunk-SXVKHA6L.mjs';
|
|
6
6
|
import '../../chunk-MUAMRRNL.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as a$1 } from '../../../chunk-HQYCK4C3.mjs';
|
|
2
1
|
import { a as a$2 } from '../../../chunk-ZREC5BF3.mjs';
|
|
2
|
+
import { a as a$1 } from '../../../chunk-HQYCK4C3.mjs';
|
|
3
3
|
import { a as a$3 } from '../../../chunk-POP3P3YE.mjs';
|
|
4
4
|
import '../../../chunk-6UGYYTYE.mjs';
|
|
5
5
|
import '../../../chunk-D6NU2WRK.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-2ZLS7IUJ.mjs';
|
|
1
|
+
import { a } from '../../../chunk-XKSDKMZ4.mjs';
|
|
3
2
|
import '../../../chunk-OUPUY4L2.mjs';
|
|
3
|
+
import '../../../chunk-2ZLS7IUJ.mjs';
|
|
4
4
|
import '../../../chunk-WHA7HOMZ.mjs';
|
|
5
5
|
import '../../../chunk-SXVKHA6L.mjs';
|
|
6
6
|
import '../../../chunk-MUAMRRNL.mjs';
|
|
@@ -5,15 +5,15 @@ import '../../../chunk-D6NU2WRK.mjs';
|
|
|
5
5
|
import { a as a$1 } from '../../../chunk-QHCGLZFD.mjs';
|
|
6
6
|
import '../../../chunk-KLIYANST.mjs';
|
|
7
7
|
import { useFormContext, useFieldArray } from 'react-hook-form';
|
|
8
|
-
import
|
|
8
|
+
import D from '@mui/material/Divider';
|
|
9
9
|
import T from '@mui/material/IconButton';
|
|
10
10
|
import q from '@mui/material/InputAdornment';
|
|
11
11
|
import l from '@mui/material/Stack';
|
|
12
12
|
import O from '@mui/material/Typography';
|
|
13
|
-
import
|
|
13
|
+
import I from '@mui/material/Alert';
|
|
14
14
|
import { styled, alpha } from '@mui/material/styles';
|
|
15
15
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
16
16
|
|
|
17
|
-
var s=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],c=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}];var b=styled(T)(({theme:o})=>({svg:{color:`${o.palette.primary.main} !important`}}));styled(T)(()=>({height:"38px",alignSelf:"center"}));var y=styled(O)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),h=styled(
|
|
17
|
+
var s=[{label:"XML",value:"XML"},{label:"JSON",value:"JSON"},{label:"BYTEA",value:"BYTEA"}],c=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"}];var b=styled(T)(({theme:o})=>({svg:{color:`${o.palette.primary.main} !important`}}));styled(T)(()=>({height:"38px",alignSelf:"center"}));var y=styled(O)(()=>({textDecoration:"underline",fontWeight:"600",cursor:"pointer"})),h=styled(I)(({theme:o})=>({backgroundColor:`${alpha(o.palette.primary.main,.03)}`,border:`1px solid ${alpha(o.palette.primary.main,.4)}`,flexDirection:"row",alignItems:"center",padding:"2px 12px",gap:8,borderRadius:8,marginBottom:16,"& svg":{color:o.palette.primary.main}}));var W=()=>{let o=()=>{let a="https://ajuda.zydon.com.br/pt-BR/articles/9180603-sobre-webhooks";window.open(a,"_blank");};return jsx(h,{severity:"info",children:jsxs(O,{color:"grey",variant:"caption",children:["Webhooks permitem que servi\xE7os externos sejam notificados quando determinados eventos acontecem. Saiba mais"," ",jsx(y,{variant:"caption",color:"primary",onClick:()=>o(),children:"acessando a documenta\xE7\xE3o do Webhook"})]})})},g=W;var _=({webhookData:o,isEditing:a$4=!1,haveTip:S=!1})=>{let{control:k}=useFormContext(),{fields:E,append:A,remove:C}=useFieldArray({name:"headers",control:k}),P=()=>{A({value:"",name:""});};return jsxs(Fragment,{children:[S&&jsx(g,{}),a$4&&jsx(a,{name:"name",label:"Nome do webhook"}),jsxs(l,{direction:"row",gap:2,children:[jsx(a,{name:"url",label:"URL de endpoint",rules:{required:{value:!0,message:"Url \xE9 obrigat\xF3rio"}}}),jsx(a,{name:"filter",label:"Filtro"})]}),a$4&&o&&jsxs(Fragment,{children:[jsx(a,{variant:"filled",name:"solution",label:"Solu\xE7\xE3o",disabled:!0}),jsxs(l,{direction:"row",gap:2,children:[jsx(a,{variant:"filled",name:"resource",label:"Origem",disabled:!0}),jsx(a,{variant:"filled",name:"resource_id",label:"ID origem",disabled:!0,InputProps:{endAdornment:jsx(q,{position:"end",children:jsx(b,{onClick:()=>navigator.clipboard.writeText(o.resource_id),children:jsx(a$1,{className:"copyIcon",icon:"COPY_CONTENT"})})})}}),jsx(a,{variant:"filled",name:"event",label:"Evento",disabled:!0})]})]}),jsxs(l,{direction:"row",gap:2,alignItems:"center",children:[jsx(a$2,{fullWidth:!0,options:s,name:"content_type",label:"Tipo de conte\xFAdo",required:!0,rules:{required:{value:!0,message:"Campo Tipo de conte\xFAdo \xE9 obrigat\xF3rio"}}}),jsx(a$2,{fullWidth:!0,options:c,name:"http_method",label:"M\xE9todo HTTP",required:!0,rules:{required:{value:!0,message:"Campo M\xE9todo HTTP \xE9 obrigat\xF3rio"}}})]}),jsx(O,{variant:"overline",color:"grey",children:"Cabe\xE7alho"}),E?.map((x,i)=>jsxs(l,{direction:"row",gap:2,alignItems:"center",children:[jsx(a,{name:`headers.${i}.name`,label:"Chave",required:!0,rules:{required:{value:!0,message:""}}}),jsx(a,{name:`headers.${i}.value`,label:"Valor"}),jsx(T,{color:"error",onClick:()=>C(i),children:jsx(a$1,{icon:"DELETE_MARK_BUTTON_02"})})]},x.id)),jsx(a$3,{actionType:"NEW",size:"large",variant:"outlined",color:"inherit",fullWidth:!0,onClick:()=>P(),children:"Adicionar novo cabe\xE7alho"}),jsx(D,{})]})},se=_;
|
|
18
18
|
|
|
19
19
|
export { se as default };
|
package/dist/types/webhook.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as a$3 } from './chunk-2ZLS7IUJ.mjs';
|
|
2
1
|
import { a as a$1 } from './chunk-OUPUY4L2.mjs';
|
|
2
|
+
import { a as a$3 } from './chunk-2ZLS7IUJ.mjs';
|
|
3
3
|
import { a as a$4 } from './chunk-WHA7HOMZ.mjs';
|
|
4
4
|
import { a as a$2 } from './chunk-SXVKHA6L.mjs';
|
|
5
5
|
import { a as a$5 } from './chunk-QHCGLZFD.mjs';
|