prosperita-dumbo-react 1.0.31 → 1.0.33

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.
@@ -12071,7 +12071,7 @@ const I5 = /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
12071
12071
  flex-direction: column;
12072
12072
  min-width: ${({ width: e }) => e || "100%"};
12073
12073
  `, L3 = ({
12074
- rowdata: e,
12074
+ rowData: e,
12075
12075
  pageSizes: t,
12076
12076
  buttons: n,
12077
12077
  label: i,
@@ -12080,9 +12080,9 @@ const I5 = /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
12080
12080
  messagedatalength: a,
12081
12081
  width: c,
12082
12082
  expandedRowData: s,
12083
- columskeys: d,
12083
+ columsKeys: d,
12084
12084
  actions: f,
12085
- header_action: p
12085
+ headerAction: p
12086
12086
  }) => {
12087
12087
  const [g, m] = ie(0), [b, C] = ie(t[0]), [y, v] = ie([]), [S, T] = ie(Array(e.length).fill(!1)), V = (B) => {
12088
12088
  const R = B.target.value.toLocaleLowerCase(), J = e.filter((le) => o.some((ae) => {
@@ -12133,7 +12133,7 @@ const I5 = /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
12133
12133
  {
12134
12134
  width: c,
12135
12135
  pageSizes: t,
12136
- rowdata: e,
12136
+ rowData: e,
12137
12137
  columnTitles: o,
12138
12138
  messagedatalength: a,
12139
12139
  expandedRowData: s,
@@ -2227,7 +2227,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2227
2227
  background: ${u.layer01};
2228
2228
  flex-direction: column;
2229
2229
  min-width: ${({width:e})=>e||"100%"};
2230
- `,u5=({rowdata:e,pageSizes:t,buttons:n,label:i,search:r,columnTitles:o,messagedatalength:a,width:c,expandedRowData:s,columskeys:d,actions:f,header_action:p})=>{const[g,m]=x.useState(0),[h,C]=x.useState(t[0]),[y,v]=x.useState([]),[E,P]=x.useState(Array(e.length).fill(!1)),B=k=>{const M=k.target.value.toLocaleLowerCase(),U=e.filter(le=>o.some(ae=>{var Se;const ge=(Se=String(le[typeof ae=="string"?ae:""]))==null?void 0:Se.toLocaleLowerCase();return ge==null?void 0:ge.includes(M)}));v(U),m(0)},w=y.length>0?y:e,V=x.useMemo(()=>w.slice(g,g+h),[w,g,h]),S=x.useMemo(()=>Math.ceil(w.length/h),[w.length,h]),O=x.useMemo(()=>Math.floor(g/h)+1,[g,h]),z=x.useCallback(()=>{m(k=>{const M=k+h;return M>=w.length?k:M})},[h,w.length]),Y=x.useCallback(()=>{m(k=>{const M=k-h;return M<0?0:M})},[h]),H=x.useCallback(k=>{const M=Number(k.target.value);m((M-1)*h)},[h]),J=x.useCallback(k=>{const M=Number(k.target.value);C(M),m(0)},[]),_=k=>{P(M=>{const U=[...M];return U[k]=!U[k],U})},R=k=>E[k]?"up":"down";return l(G,{children:A(c5,{width:c,pageSizes:t,rowdata:e,columnTitles:o,messagedatalength:a,expandedRowData:s,style:{position:"relative"},children:[i&&l(n5,{children:i}),A("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[r&&l(bl,{kind:"default",size:"small",ContainedListMenu:!0,placeholder:"Digite Para Pesquisar",onChange:B}),l("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(k=>k.position==="left").map((k,M)=>l("div",{style:{marginLeft:"1px"},children:l(dn,{onClick:k.onClick,kind:k.kind,size:"small",icon:k.icon,label:k.label,borderNone:!0})},M))}),l("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(k=>k.position==="right").map((k,M)=>l("div",{style:{marginRight:"1px"},children:l(dn,{onClick:k.onClick,kind:k.kind,size:"small",icon:k.icon,label:k.label,borderNone:!0})},M))})]}),e&&e.length>0?A(G,{children:[(p==null?void 0:p.active)&&l("div",{style:{width:"100%",height:"45px",background:u.buttonPrimary,display:"flex",justifyContent:"space-between",alignItems:"center",color:u.textOnColor},children:A(G,{children:[A("p",{style:{textAlign:"start",fontSize:"14px"},children:[l("span",{style:{margin:"0 5px 0 20px"},children:p==null?void 0:p.count}),"item selecionados"]}),l("div",{style:{display:"flex",gap:"10px",marginRight:"10px",alignItems:"center"},children:f==null?void 0:f.map(k=>l(G,{children:A("p",{style:{display:"flex",gap:"8px",marginRight:"10px",cursor:"pointer",fontFamily:"IBM Plex sans,sans-serif",fontWeight:"400",fontSize:"14px"},onClick:k.onClick,children:[k.text,l("img",{style:{objectFit:"none"},src:k.icon})]})}))})]})}),A(e5,{children:[A(t5,{children:[l(Ns,{}),o.map((k,M)=>l(Ns,{children:l(r5,{children:k})},M))]}),V.map((k,M)=>A(G,{children:[A($s,{onClick:()=>{_(M)},children:[l(Hi,{children:l("p",{style:{margin:"0",textAlign:"center",transform:R(M)==="up"?"rotate(180deg) translateY(10%)":"rotate(0deg) translateY(20%)",padding:"0"},children:s5})}),d==null?void 0:d.map((U,le)=>l(Hi,{children:typeof U=="string"?k[U]:U},le))]},M),E[M]&&l($s,{children:l(Hi,{colSpan:o.length+2,style:{background:u.borderSubtle00},children:l("div",{style:{margin:"10px auto",textAlign:"start",minHeight:"100px",width:"95%",borderTop:`1px solid ${u.borderSubtle01}`},children:l(G,{children:l("div",{style:{width:"90%",margin:"20px auto"},children:s==null?void 0:s.map(U=>l("p",{style:{margin:"2px"},children:U+""+k[typeof U=="string"?U:""]}))})})})})})]}))]}),A(i5,{children:[A("div",{style:{display:"flex",alignItems:"center",borderRight:`1px solid ${u.borderSubtle01}`},children:[l(Ws,{name:"select",onChange:J,children:t.map((k,M)=>l(Rs,{value:k,children:k},M))}),A(Ri,{children:[g+1," – ",Math.min(g+h,w.length)," de ",w.length," itens"]})]}),A(o5,{children:[A("div",{style:{display:"flex",alignItems:"center",border:`1px solid ${u.borderSubtle01}`,borderTop:"1px solid transparent",borderBottom:"1px solid transparent",cursor:"pointer"},children:[l(Ws,{name:"select",value:O,onChange:H,children:Array.from({length:S},(k,M)=>l(Rs,{value:M+1,children:M+1},M+1))}),A(Ri,{children:["de ",S," páginas"]})]}),l(mt,{align:"top",size:"small",label:"Página Anterior",width:"110px",children:l(Hs,{onClick:Y,disabled:g===0,style:{borderLeft:"none",opacity:g===0?".5":"1",cursor:g===0?"not-allowed":"pointer"},children:l5})}),l(mt,{align:"top-right",size:"small",label:"Próxima página",width:"110px",children:l(Hs,{onClick:z,disabled:g+h>=w.length,style:{borderRight:"none",opacity:g+h>=w.length?".5":"1",cursor:g+h>=w.length?"not-allowed":"pointer"},children:a5})})]})]})]}):l(Ri,{children:a||"Nenhum item encontrado"})]})})},d5=I.button`
2230
+ `,u5=({rowData:e,pageSizes:t,buttons:n,label:i,search:r,columnTitles:o,messagedatalength:a,width:c,expandedRowData:s,columsKeys:d,actions:f,headerAction:p})=>{const[g,m]=x.useState(0),[h,C]=x.useState(t[0]),[y,v]=x.useState([]),[E,P]=x.useState(Array(e.length).fill(!1)),B=k=>{const M=k.target.value.toLocaleLowerCase(),U=e.filter(le=>o.some(ae=>{var Se;const ge=(Se=String(le[typeof ae=="string"?ae:""]))==null?void 0:Se.toLocaleLowerCase();return ge==null?void 0:ge.includes(M)}));v(U),m(0)},w=y.length>0?y:e,V=x.useMemo(()=>w.slice(g,g+h),[w,g,h]),S=x.useMemo(()=>Math.ceil(w.length/h),[w.length,h]),O=x.useMemo(()=>Math.floor(g/h)+1,[g,h]),z=x.useCallback(()=>{m(k=>{const M=k+h;return M>=w.length?k:M})},[h,w.length]),Y=x.useCallback(()=>{m(k=>{const M=k-h;return M<0?0:M})},[h]),H=x.useCallback(k=>{const M=Number(k.target.value);m((M-1)*h)},[h]),J=x.useCallback(k=>{const M=Number(k.target.value);C(M),m(0)},[]),_=k=>{P(M=>{const U=[...M];return U[k]=!U[k],U})},R=k=>E[k]?"up":"down";return l(G,{children:A(c5,{width:c,pageSizes:t,rowData:e,columnTitles:o,messagedatalength:a,expandedRowData:s,style:{position:"relative"},children:[i&&l(n5,{children:i}),A("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[r&&l(bl,{kind:"default",size:"small",ContainedListMenu:!0,placeholder:"Digite Para Pesquisar",onChange:B}),l("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(k=>k.position==="left").map((k,M)=>l("div",{style:{marginLeft:"1px"},children:l(dn,{onClick:k.onClick,kind:k.kind,size:"small",icon:k.icon,label:k.label,borderNone:!0})},M))}),l("div",{style:{display:"flex",alignItems:"center"},children:n==null?void 0:n.filter(k=>k.position==="right").map((k,M)=>l("div",{style:{marginRight:"1px"},children:l(dn,{onClick:k.onClick,kind:k.kind,size:"small",icon:k.icon,label:k.label,borderNone:!0})},M))})]}),e&&e.length>0?A(G,{children:[(p==null?void 0:p.active)&&l("div",{style:{width:"100%",height:"45px",background:u.buttonPrimary,display:"flex",justifyContent:"space-between",alignItems:"center",color:u.textOnColor},children:A(G,{children:[A("p",{style:{textAlign:"start",fontSize:"14px"},children:[l("span",{style:{margin:"0 5px 0 20px"},children:p==null?void 0:p.count}),"item selecionados"]}),l("div",{style:{display:"flex",gap:"10px",marginRight:"10px",alignItems:"center"},children:f==null?void 0:f.map(k=>l(G,{children:A("p",{style:{display:"flex",gap:"8px",marginRight:"10px",cursor:"pointer",fontFamily:"IBM Plex sans,sans-serif",fontWeight:"400",fontSize:"14px"},onClick:k.onClick,children:[k.text,l("img",{style:{objectFit:"none"},src:k.icon})]})}))})]})}),A(e5,{children:[A(t5,{children:[l(Ns,{}),o.map((k,M)=>l(Ns,{children:l(r5,{children:k})},M))]}),V.map((k,M)=>A(G,{children:[A($s,{onClick:()=>{_(M)},children:[l(Hi,{children:l("p",{style:{margin:"0",textAlign:"center",transform:R(M)==="up"?"rotate(180deg) translateY(10%)":"rotate(0deg) translateY(20%)",padding:"0"},children:s5})}),d==null?void 0:d.map((U,le)=>l(Hi,{children:typeof U=="string"?k[U]:U},le))]},M),E[M]&&l($s,{children:l(Hi,{colSpan:o.length+2,style:{background:u.borderSubtle00},children:l("div",{style:{margin:"10px auto",textAlign:"start",minHeight:"100px",width:"95%",borderTop:`1px solid ${u.borderSubtle01}`},children:l(G,{children:l("div",{style:{width:"90%",margin:"20px auto"},children:s==null?void 0:s.map(U=>l("p",{style:{margin:"2px"},children:U+""+k[typeof U=="string"?U:""]}))})})})})})]}))]}),A(i5,{children:[A("div",{style:{display:"flex",alignItems:"center",borderRight:`1px solid ${u.borderSubtle01}`},children:[l(Ws,{name:"select",onChange:J,children:t.map((k,M)=>l(Rs,{value:k,children:k},M))}),A(Ri,{children:[g+1," – ",Math.min(g+h,w.length)," de ",w.length," itens"]})]}),A(o5,{children:[A("div",{style:{display:"flex",alignItems:"center",border:`1px solid ${u.borderSubtle01}`,borderTop:"1px solid transparent",borderBottom:"1px solid transparent",cursor:"pointer"},children:[l(Ws,{name:"select",value:O,onChange:H,children:Array.from({length:S},(k,M)=>l(Rs,{value:M+1,children:M+1},M+1))}),A(Ri,{children:["de ",S," páginas"]})]}),l(mt,{align:"top",size:"small",label:"Página Anterior",width:"110px",children:l(Hs,{onClick:Y,disabled:g===0,style:{borderLeft:"none",opacity:g===0?".5":"1",cursor:g===0?"not-allowed":"pointer"},children:l5})}),l(mt,{align:"top-right",size:"small",label:"Próxima página",width:"110px",children:l(Hs,{onClick:z,disabled:g+h>=w.length,style:{borderRight:"none",opacity:g+h>=w.length?".5":"1",cursor:g+h>=w.length?"not-allowed":"pointer"},children:a5})})]})]})]}):l(Ri,{children:a||"Nenhum item encontrado"})]})})},d5=I.button`
2231
2231
  color: ${u.textSecondary};
2232
2232
  font-size: 14px;
2233
2233
  font-style: normal;
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/Components/Dropdown/style.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,2BAA2B,CAAC;AASnC,eAAO,MAAM,SAAS,kPA4BrB,CAAC;AAEF,eAAO,MAAM,cAAc,2PA4C1B,CAAC;AAIF,eAAO,MAAM,WAAW,kPAgBvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,2PAK5B,CAAC;AAEF,eAAO,MAAM,SAAS,oPAIrB,CAAC;AAEF,eAAO,MAAM,aAAa,oPAQzB,CAAC;AAEF,eAAO,MAAM,eAAe,yPAO3B,CAAC;AAEF,eAAO,MAAM,UAAU,kPAuBtB,CAAC;AAEF,eAAO,MAAM,KAAK,8PAqBjB,CAAC;AAEF,eAAO,MAAM,QAAQ,8PAyBpB,CAAC"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/Components/Dropdown/style.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,2BAA2B,CAAC;AASnC,eAAO,MAAM,SAAS,kPA2BrB,CAAC;AAEF,eAAO,MAAM,cAAc,2PA4C1B,CAAC;AAIF,eAAO,MAAM,WAAW,kPAgBvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,2PAK5B,CAAC;AAEF,eAAO,MAAM,SAAS,oPAIrB,CAAC;AAEF,eAAO,MAAM,aAAa,oPAQzB,CAAC;AAEF,eAAO,MAAM,eAAe,yPAO3B,CAAC;AAEF,eAAO,MAAM,UAAU,kPAuBtB,CAAC;AAEF,eAAO,MAAM,KAAK,8PAqBjB,CAAC;AAEF,eAAO,MAAM,QAAQ,8PAyBpB,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { ReactNode } from "react";
2
2
  import "@fontsource/ibm-plex-sans";
3
- type TableRow = Record<string, JSX.Element> & {
4
- onClick?: (event: React.MouseEvent) => void;
3
+ type TableRow = {
4
+ [key: string]: ReactNode | string | JSX.Element | any;
5
+ onClick: (event: React.MouseEvent) => void;
5
6
  };
6
7
  type TableProps = {
7
8
  columnTitles: ReactNode[];
8
- rowdata: TableRow[];
9
+ rowData: TableRow[];
9
10
  pageSizes: number[];
10
11
  actions?: OptionsActions[];
11
12
  label?: string;
@@ -14,8 +15,8 @@ type TableProps = {
14
15
  messagedatalength?: string;
15
16
  width?: string;
16
17
  expandedRowData?: Array<string>;
17
- columskeys?: Array<string>;
18
- header_action?: {
18
+ columsKeys?: Array<string>;
19
+ headerAction?: {
19
20
  active: boolean;
20
21
  count: number;
21
22
  };
@@ -32,6 +33,6 @@ type ButtonTable = {
32
33
  kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
33
34
  position?: "right" | "left";
34
35
  };
35
- export declare const TableBatchActions: ({ rowdata, pageSizes, buttons, label, search, columnTitles, messagedatalength, width, expandedRowData, columskeys, actions, header_action }: TableProps) => import("react/jsx-runtime").JSX.Element;
36
+ export declare const TableBatchActions: ({ rowData: rowdata, pageSizes, buttons, label, search, columnTitles, messagedatalength, width, expandedRowData, columsKeys, actions, headerAction }: TableProps) => import("react/jsx-runtime").JSX.Element;
36
37
  export {};
37
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Components/TableBatchActions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAEV,MAAM,OAAO,CAAC;AAiBf,OAAO,2BAA2B,CAAC;AAUnC,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,M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C,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,CAAC,EAAE;QACb,MAAM,EAAE,OAAO,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,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;AAYF,eAAO,MAAM,iBAAiB,wJAa3B,UAAU,4CA0WZ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosperita-dumbo-react",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
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",