@zydon/common 2.2.21 → 2.2.22
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-HB6UI7RP.js +17 -0
- package/dist/{chunk-RUVKZ7C3.js → chunk-TCKAUYU5.js} +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/form/Address/index.js +2 -2
- package/dist/components/form/Autocomplete/index.js +2 -2
- package/dist/components/form/Webhook/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-KKDBAR6W.js +0 -17
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { a } from './chunk-A3HKJM7C.js';
|
|
2
|
+
import { createContext, forwardRef, useContext, useState, useMemo, useRef, useEffect } from 'react';
|
|
3
|
+
import pe, { autocompleteClasses } from '@mui/material/Autocomplete';
|
|
4
|
+
import ue from '@mui/material/CircularProgress';
|
|
5
|
+
import me from '@mui/material/TextField';
|
|
6
|
+
import { VariableSizeList } from 'react-window';
|
|
7
|
+
import q from '@mui/material/ListSubheader';
|
|
8
|
+
import F from '@mui/material/Stack';
|
|
9
|
+
import { useTheme, styled } from '@mui/material/styles';
|
|
10
|
+
import O from '@mui/material/Typography';
|
|
11
|
+
import K from '@mui/material/useMediaQuery';
|
|
12
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
+
import re from '@mui/material/Popper';
|
|
14
|
+
|
|
15
|
+
var R=8,Y=u=>{let{data:o,index:i,style:m}=u,n=o[i],{showValueInLabel:s,key:c,...f}=n[0],l={...m,top:m.top+R,paddingTop:8};return Object.prototype.hasOwnProperty.call(n,"group")?jsx(q,{component:"div",style:l,children:n.group},`list-box-item-group-${c}`):jsx(O,{component:"li",...f,noWrap:!0,style:l,children:jsxs(F,{component:"div",direction:"row",flex:1,gap:1,justifyContent:"start",children:[n[1].icon&&jsx(a,{icon:n[1].icon}),n[1].label,s&&jsxs(O,{variant:"inherit",color:"grey.400",children:["(",n[1].value,")"]})]})},`list-box-item-${c}`)},k=createContext({}),z=forwardRef((u,o)=>{let i=useContext(k);return jsx("div",{ref:o,...u,...i})});z.displayName="OuterElementType";var Z=u=>{let o=useRef(null);return useEffect(()=>{o.current!=null&&o.current.resetAfterIndex(0,!0);},[u]),o},ee=forwardRef(function(o,i){let{children:m,...n}=o,s=[];m.forEach(r=>{s.push(r),s.push(...r.children||[]);});let c=useTheme(),f=K(c.breakpoints.up("sm")),l=s.length,d=f?36:48,g=r=>Object.prototype.hasOwnProperty.call(r,"group")?48:d,C=()=>l>8?8*d:s.map(g).reduce((r,L)=>r+L,0),x=Z(l);return jsx("div",{ref:i,children:jsx(k.Provider,{value:n,children:jsx(VariableSizeList,{itemData:s,height:C()+2*R,width:"100%",ref:x,outerElementType:z,innerElementType:"ul",itemSize:r=>g(s[r]),overscanCount:5,itemCount:l,children:Y})})})}),M=ee;var N=styled(re)({[`& .${autocompleteClasses.listbox}`]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}});var D=forwardRef(({label:u,value:o,options:i=[],loading:m,noOptionsText:n="Nenhum resultado encontrado.",loadingText:s="Carregando op\xE7\xF5es...",error:c,helperText:f,placeholder:l,onChange:d,groupBy:g,showValueInLabel:C,disabled:x,multiple:r,required:L,renderOption:P,tabIndex:H,onInputChange:T,onSearch:A,...X},J)=>{let[$,v]=useState(),V=e=>e&&typeof e=="object"?e.value.toString():e.toString(),y=useMemo(()=>r?(Array.isArray(o)?o:[]).reduce((p,h)=>{let E=i.find(U=>U.value.toString()===h.toString());return E?[...p,E]:[...p]},[]):i.find(t=>t.value.toString()===o?.toString())||null,[i,o,r]);return jsx(pe,{ref:J,value:$||y,onInputChange:(e,t,p)=>{if(T&&T(e,t,p),!r&&p==="input"){A&&A(t),v(t);return}v(void 0);},options:i,loading:m,noOptionsText:n,loadingText:s,disabled:m||x,disableListWrap:!0,PopperComponent:N,ListboxComponent:P?void 0:M,filterOptions:(e,t)=>e.filter(p=>`${p.value} ${p.label}`.toLocaleUpperCase().includes(t.inputValue.toLocaleUpperCase())),onChange:(e,t)=>{if(!t){d(r?[]:null);return}if(Array.isArray(t)){d(t.map(V));return}d(typeof t=="string"?t.toString():t.value.toString());},renderOption:(e,t,p,h)=>P?P(e,t,p,h):[{...e,showValueInLabel:C},t],renderGroup:e=>e,groupBy:g,multiple:r,renderInput:e=>jsx(me,{...e,placeholder:l,fullWidth:!0,error:!!c,helperText:f,label:u,required:L,InputProps:{...e.InputProps,...!r&&{startAdornment:y&&!Array.isArray(y)&&y.icon?jsx(a,{icon:y.icon}):void 0},endAdornment:jsxs(Fragment,{children:[m?jsx(ue,{color:"primary",size:20}):null,e.InputProps.endAdornment]})},inputProps:{...e.inputProps,tabIndex:H}}),...X})});D.displayName="Autocomplete";var De=D;
|
|
16
|
+
|
|
17
|
+
export { De as a };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as a$2 } from '../../../chunk-JAIK5CGA.js';
|
|
2
2
|
import { a as a$1 } from '../../../chunk-SEVJABAI.js';
|
|
3
|
-
import { a as a$3 } from '../../../chunk-
|
|
3
|
+
import { a as a$3 } from '../../../chunk-TCKAUYU5.js';
|
|
4
4
|
import '../../../chunk-QNAXGE5H.js';
|
|
5
|
-
import '../../../chunk-
|
|
5
|
+
import '../../../chunk-HB6UI7RP.js';
|
|
6
6
|
import '../../../chunk-A3HKJM7C.js';
|
|
7
7
|
import '../../../chunk-HR73D35E.js';
|
|
8
8
|
import E from '@mui/material/CircularProgress';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as default } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
1
|
+
export { a as default } from '../../../chunk-TCKAUYU5.js';
|
|
2
|
+
import '../../../chunk-HB6UI7RP.js';
|
|
3
3
|
import '../../../chunk-A3HKJM7C.js';
|
|
4
4
|
import '../../../chunk-HR73D35E.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a } from '../../../chunk-JAIK5CGA.js';
|
|
2
|
-
import { a as a$2 } from '../../../chunk-
|
|
2
|
+
import { a as a$2 } from '../../../chunk-TCKAUYU5.js';
|
|
3
3
|
import { a as a$3 } from '../../../chunk-CAZ3WGTV.js';
|
|
4
|
-
import '../../../chunk-
|
|
4
|
+
import '../../../chunk-HB6UI7RP.js';
|
|
5
5
|
import { a as a$1 } from '../../../chunk-A3HKJM7C.js';
|
|
6
6
|
import '../../../chunk-HR73D35E.js';
|
|
7
7
|
import { useFormContext, useFieldArray } from 'react-hook-form';
|
package/package.json
CHANGED
package/dist/chunk-KKDBAR6W.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-A3HKJM7C.js';
|
|
2
|
-
import { createContext, forwardRef, useContext, useState, useMemo, useRef, useEffect } from 'react';
|
|
3
|
-
import pe, { autocompleteClasses } from '@mui/material/Autocomplete';
|
|
4
|
-
import ue from '@mui/material/CircularProgress';
|
|
5
|
-
import me from '@mui/material/TextField';
|
|
6
|
-
import { VariableSizeList } from 'react-window';
|
|
7
|
-
import q from '@mui/material/ListSubheader';
|
|
8
|
-
import F from '@mui/material/Stack';
|
|
9
|
-
import { useTheme, styled } from '@mui/material/styles';
|
|
10
|
-
import I from '@mui/material/Typography';
|
|
11
|
-
import K from '@mui/material/useMediaQuery';
|
|
12
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
-
import re from '@mui/material/Popper';
|
|
14
|
-
|
|
15
|
-
var k=8,Y=u=>{let{data:o,index:i,style:m}=u,n=o[i],{showValueInLabel:s,key:c,...f}=n[0],l={...m,top:m.top+k,paddingTop:8};return Object.prototype.hasOwnProperty.call(n,"group")?jsx(q,{component:"div",style:l,children:n.group},`list-box-item-group-${c}`):jsx(I,{component:"li",...f,noWrap:!0,style:l,children:jsxs(F,{component:"div",direction:"row",flex:1,gap:1,justifyContent:"start",children:[n[1].icon&&jsx(a,{icon:n[1].icon}),n[1].label,s&&jsxs(I,{variant:"inherit",color:"grey.400",children:["(",n[1].value,")"]})]})},`list-box-item-${c}`)},z=createContext({}),M=forwardRef((u,o)=>{let i=useContext(z);return jsx("div",{ref:o,...u,...i})});M.displayName="OuterElementType";var Z=u=>{let o=useRef(null);return useEffect(()=>{o.current!=null&&o.current.resetAfterIndex(0,!0);},[u]),o},ee=forwardRef(function(o,i){let{children:m,...n}=o,s=[];m.forEach(r=>{s.push(r),s.push(...r.children||[]);});let c=useTheme(),f=K(c.breakpoints.up("sm")),l=s.length,d=f?36:48,g=r=>Object.prototype.hasOwnProperty.call(r,"group")?48:d,C=()=>l>8?8*d:s.map(g).reduce((r,L)=>r+L,0),x=Z(l);return jsx("div",{ref:i,children:jsx(z.Provider,{value:n,children:jsx(VariableSizeList,{itemData:s,height:C()+2*k,width:"100%",ref:x,outerElementType:M,innerElementType:"ul",itemSize:r=>g(s[r]),overscanCount:5,itemCount:l,children:Y})})})}),N=ee;var D=styled(re)({[`& .${autocompleteClasses.listbox}`]:{boxSizing:"border-box","& ul":{padding:0,margin:0}}});var H=forwardRef(({label:u,value:o,options:i=[],loading:m,noOptionsText:n="Nenhum resultado encontrado.",loadingText:s="Carregando op\xE7\xF5es...",error:c,helperText:f,placeholder:l,onChange:d,groupBy:g,showValueInLabel:C,disabled:x,multiple:r,required:L,renderOption:P,tabIndex:X,onInputChange:T,onSearch:A,...J},$)=>{let[v,E]=useState(),V=e=>e&&typeof e=="object"?e.value.toString():e.toString(),y=useMemo(()=>r?(Array.isArray(o)?o:[]).reduce((p,h)=>{let O=i.find(U=>U.value.toString()===h.toString());return O?[...p,O]:[...p]},[]):i.find(t=>t.value.toString()===o?.toString())||null,[i,o,r]);return jsx(pe,{ref:$,value:v?r?[]:v:y,onInputChange:(e,t,p)=>{if(T&&T(e,t,p),p==="input"){A&&A(t),E(t);return}E(void 0);},options:i,loading:m,noOptionsText:n,loadingText:s,disabled:m||x,disableListWrap:!0,PopperComponent:D,ListboxComponent:P?void 0:N,filterOptions:(e,t)=>e.filter(p=>`${p.value} ${p.label}`.toLocaleUpperCase().includes(t.inputValue.toLocaleUpperCase())),onChange:(e,t)=>{if(!t){d(r?[]:null);return}if(Array.isArray(t)){d(t.map(V));return}d(typeof t=="string"?t.toString():t.value.toString());},renderOption:(e,t,p,h)=>P?P(e,t,p,h):[{...e,showValueInLabel:C},t],renderGroup:e=>e,groupBy:g,multiple:r,renderInput:e=>jsx(me,{...e,placeholder:l,fullWidth:!0,error:!!c,helperText:f,label:u,required:L,InputProps:{...e.InputProps,...!r&&{startAdornment:y&&!Array.isArray(y)&&y.icon?jsx(a,{icon:y.icon}):void 0},endAdornment:jsxs(Fragment,{children:[m?jsx(ue,{color:"primary",size:20}):null,e.InputProps.endAdornment]})},inputProps:{...e.inputProps,tabIndex:X}}),...J})});H.displayName="Autocomplete";var De=H;
|
|
16
|
-
|
|
17
|
-
export { De as a };
|