prosperita-dumbo-react 3.1.0 → 3.1.1

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.
@@ -12107,7 +12107,7 @@ const u5 = /* @__PURE__ */ a(G, { children: /* @__PURE__ */ a(
12107
12107
  C.map((y, k) => /* @__PURE__ */ a(
12108
12108
  a5,
12109
12109
  {
12110
- onClick: () => y.onClick ? y.onClick(l + k) : null,
12110
+ onClick: () => y.onClick ? y.onClick() : null,
12111
12111
  children: Object.keys(y).map((H) => /* @__PURE__ */ a(o5, { children: y[H] }, H))
12112
12112
  },
12113
12113
  k
@@ -2209,4 +2209,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2209
2209
  align-self: end;
2210
2210
  width: 100%;
2211
2211
  }
2212
- `,Xf=({rowdata:e,pageSizes:t,buttonsTable:n,textLabel:i,searchPlaceholder:r,columnTitles:o,messageDataLength:s,widthTable:d})=>{const[l,u]=B.useState(0),[f,p]=B.useState(t[0]),[b,h]=B.useState([]),m=y=>{const G=y.target.value.toLocaleLowerCase(),L=e.filter(z=>o.some(re=>{var Y;const K=(Y=String(z[re]))==null?void 0:Y.toLocaleLowerCase();return K==null?void 0:K.includes(G)}));h(L),u(0)},v=b.length>0?b:e,C=B.useMemo(()=>v.slice(l,l+f),[v,l,f]),I=B.useMemo(()=>Math.ceil(v.length/f),[v.length,f]),E=B.useMemo(()=>Math.floor(l/f)+1,[l,f]),S=B.useCallback(()=>{u(y=>{const G=y+f;return G>=v.length?y:G})},[f,v.length]),V=B.useCallback(()=>{u(y=>{const G=y-f;return G<0?0:G})},[f]),A=B.useCallback(y=>{const G=Number(y.target.value);u((G-1)*f)},[f]),P=B.useCallback(y=>{const G=Number(y.target.value);p(G),u(0)},[]);return a(T,{children:w($f,{widthTable:d,pageSizes:t,rowdata:e,columnTitles:o,messageDataLength:s,style:{position:"relative"},children:[a(Rf,{children:i}),w("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[r&&a(Yo,{kind:"default",size:"medium",ContainedListMenu:!0,placeholder:"Digite Para Pesquisar",onChange:m}),a("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(y=>y.position==="left").map((y,G)=>w("div",{style:{marginLeft:"1px"},children:[" ",a(kt,{onClick:y.onClick,kind:y.kind,size:"medium",icon:y.icon,label:y.label,borderNone:!0})]},G))}),a("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(y=>y.position==="right").map((y,G)=>w("div",{style:{marginRight:"1px"},children:[" ",a(kt,{onClick:y.onClick,kind:y.kind,size:"medium",icon:y.icon,label:y.label,borderNone:!0})]},G))})]}),e&&e.length>0?w(T,{children:[w(bl,{children:[a(hl,{children:o.map((y,G)=>a(ml,{children:a(Cl,{children:y})},G))}),C.map((y,G)=>a(Df,{onClick:()=>y.onClick?y.onClick(l+G):null,children:Object.keys(y).map(L=>a(Lf,{children:y[L]},L))},G))]}),w(Nf,{children:[w("div",{style:{display:"flex",alignItems:"center",borderRight:`1px solid ${c.borderSubtle01}`},children:[a(yl,{name:"select",onChange:P,children:t.map((y,G)=>a(xl,{value:y,children:y},G))}),w(Il,{children:[l+1," – ",Math.min(l+f,v.length)," de ",v.length," itens"]})]}),w(Wf,{children:[w("div",{style:{display:"flex",alignItems:"center",border:`1px solid ${c.borderSubtle01}`,borderTop:"1px solid transparent",borderBottom:"1px solid transparent",cursor:"pointer"},children:[a(yl,{name:"select",value:E,onChange:A,children:Array.from({length:I},(y,G)=>a(xl,{value:G+1,children:G+1},G+1))}),w(Il,{children:["de ",I," páginas"]})]}),a(qe,{align:"top",size:"small",label:"Previous page",width:"110px",children:a(vl,{onClick:V,disabled:l===0,style:{borderLeft:"none",opacity:l===0?".5":"1",cursor:l===0?"not-allowed":"pointer"},children:Zf})}),a(qe,{align:"top-right",size:"small",label:"Next page",width:"100px",children:a(vl,{onClick:S,disabled:l+f>=v.length,style:{borderRight:"none",opacity:l+f>=v.length?".5":"1",cursor:l+f>=v.length?"not-allowed":"pointer"},children:Of})})]})]})]}):a(T,{children:w(bl,{children:[a(hl,{children:a(ml,{children:a(Cl,{})})}),a("div",{style:{height:"350px",width:"100%"},children:a("h4",{style:{fontFamily:"IBM Plex Sans",fontSize:"20px",display:"flex",padding:"0",alignItems:"center",justifyContent:"center",height:"100%",fontStyle:"normal",fontWeight:"400",lineHeight:"18px",letterSpacing:"0.16px",width:"100%",margin:"0"},children:s})})]})})]})})};ie.Breadcrumb=Hf,ie.Button=kt,ie.Checkbox=e1,ie.ContentSwitcher=uf,ie.Dropdown=j1,ie.FileUploader=G1,ie.InlineLoading=So,ie.Input=Ac,ie.InputFluid=Tc,ie.InputSelect=tf,ie.Loading=dr,ie.Margin=rf,ie.MenuButton=h1,ie.Modal=uo,ie.Radio=W1,ie.Search=Yo,ie.TableBatchActions=Xf,ie.Tag=C1,ie.Tile=L1,ie.Toogle=_1,ie.Tooltip=qe,ie.UIHeaderNav=Vf,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
2212
+ `,Xf=({rowdata:e,pageSizes:t,buttonsTable:n,textLabel:i,searchPlaceholder:r,columnTitles:o,messageDataLength:s,widthTable:d})=>{const[l,u]=B.useState(0),[f,p]=B.useState(t[0]),[b,h]=B.useState([]),m=y=>{const G=y.target.value.toLocaleLowerCase(),L=e.filter(z=>o.some(re=>{var Y;const K=(Y=String(z[re]))==null?void 0:Y.toLocaleLowerCase();return K==null?void 0:K.includes(G)}));h(L),u(0)},v=b.length>0?b:e,C=B.useMemo(()=>v.slice(l,l+f),[v,l,f]),I=B.useMemo(()=>Math.ceil(v.length/f),[v.length,f]),E=B.useMemo(()=>Math.floor(l/f)+1,[l,f]),S=B.useCallback(()=>{u(y=>{const G=y+f;return G>=v.length?y:G})},[f,v.length]),V=B.useCallback(()=>{u(y=>{const G=y-f;return G<0?0:G})},[f]),A=B.useCallback(y=>{const G=Number(y.target.value);u((G-1)*f)},[f]),P=B.useCallback(y=>{const G=Number(y.target.value);p(G),u(0)},[]);return a(T,{children:w($f,{widthTable:d,pageSizes:t,rowdata:e,columnTitles:o,messageDataLength:s,style:{position:"relative"},children:[a(Rf,{children:i}),w("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[r&&a(Yo,{kind:"default",size:"medium",ContainedListMenu:!0,placeholder:"Digite Para Pesquisar",onChange:m}),a("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(y=>y.position==="left").map((y,G)=>w("div",{style:{marginLeft:"1px"},children:[" ",a(kt,{onClick:y.onClick,kind:y.kind,size:"medium",icon:y.icon,label:y.label,borderNone:!0})]},G))}),a("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(y=>y.position==="right").map((y,G)=>w("div",{style:{marginRight:"1px"},children:[" ",a(kt,{onClick:y.onClick,kind:y.kind,size:"medium",icon:y.icon,label:y.label,borderNone:!0})]},G))})]}),e&&e.length>0?w(T,{children:[w(bl,{children:[a(hl,{children:o.map((y,G)=>a(ml,{children:a(Cl,{children:y})},G))}),C.map((y,G)=>a(Df,{onClick:()=>y.onClick?y.onClick():null,children:Object.keys(y).map(L=>a(Lf,{children:y[L]},L))},G))]}),w(Nf,{children:[w("div",{style:{display:"flex",alignItems:"center",borderRight:`1px solid ${c.borderSubtle01}`},children:[a(yl,{name:"select",onChange:P,children:t.map((y,G)=>a(xl,{value:y,children:y},G))}),w(Il,{children:[l+1," – ",Math.min(l+f,v.length)," de ",v.length," itens"]})]}),w(Wf,{children:[w("div",{style:{display:"flex",alignItems:"center",border:`1px solid ${c.borderSubtle01}`,borderTop:"1px solid transparent",borderBottom:"1px solid transparent",cursor:"pointer"},children:[a(yl,{name:"select",value:E,onChange:A,children:Array.from({length:I},(y,G)=>a(xl,{value:G+1,children:G+1},G+1))}),w(Il,{children:["de ",I," páginas"]})]}),a(qe,{align:"top",size:"small",label:"Previous page",width:"110px",children:a(vl,{onClick:V,disabled:l===0,style:{borderLeft:"none",opacity:l===0?".5":"1",cursor:l===0?"not-allowed":"pointer"},children:Zf})}),a(qe,{align:"top-right",size:"small",label:"Next page",width:"100px",children:a(vl,{onClick:S,disabled:l+f>=v.length,style:{borderRight:"none",opacity:l+f>=v.length?".5":"1",cursor:l+f>=v.length?"not-allowed":"pointer"},children:Of})})]})]})]}):a(T,{children:w(bl,{children:[a(hl,{children:a(ml,{children:a(Cl,{})})}),a("div",{style:{height:"350px",width:"100%"},children:a("h4",{style:{fontFamily:"IBM Plex Sans",fontSize:"20px",display:"flex",padding:"0",alignItems:"center",justifyContent:"center",height:"100%",fontStyle:"normal",fontWeight:"400",lineHeight:"18px",letterSpacing:"0.16px",width:"100%",margin:"0"},children:s})})]})})]})})};ie.Breadcrumb=Hf,ie.Button=kt,ie.Checkbox=e1,ie.ContentSwitcher=uf,ie.Dropdown=j1,ie.FileUploader=G1,ie.InlineLoading=So,ie.Input=Ac,ie.InputFluid=Tc,ie.InputSelect=tf,ie.Loading=dr,ie.Margin=rf,ie.MenuButton=h1,ie.Modal=uo,ie.Radio=W1,ie.Search=Yo,ie.TableBatchActions=Xf,ie.Tag=C1,ie.Tile=L1,ie.Toogle=_1,ie.Tooltip=qe,ie.UIHeaderNav=Vf,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from "react";
2
2
  import "@fontsource/ibm-plex-sans";
3
3
  type TableRow = Record<string, React.ReactNode> & {
4
- onClick?: (indexId: number) => void;
4
+ onClick?: () => void;
5
5
  };
6
6
  type DateProps = {
7
7
  columnTitles: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Components/TableBatchActions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EACV,MAAM,OAAO,CAAC;AAiBf,OAAO,2BAA2B,CAAC;AASnC,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG;IAChD,OAAO,CAAC,EAAE,CAAC,OAAO,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OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EACF,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,GACP,eAAe,GACf,gBAAgB,GAChB,aAAa,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC7B,CAAC;AAkBF,eAAO,MAAM,iBAAiB,oHAS3B,SAAS,4CAuQX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosperita-dumbo-react",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "main": "dist/prosperita-dumbo-react.umd.js",
5
5
  "module": "dist/prosperita-dumbo-react.es.js",
6
6
  "types": "dist/types/index.d.ts",