@inntechcorp/it-design 2.1.14 → 2.1.15
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/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/types/TableProps.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -6142,7 +6142,7 @@ function pu(e,t){if(fu(e))for(let o=0;o<e.length&&!1!==t(e[o],o,e);o++);else e&&
|
|
|
6142
6142
|
display : block;
|
|
6143
6143
|
`}}
|
|
6144
6144
|
|
|
6145
|
-
`,$R=t.forwardRef((({columns:o,data:p,cellHeight:b,size:n="default",headless:M=!1,bordered:r=!1,dashed:c=!1,noGaps:z=!1,hideGroupButtons:i=!1,getTRProps:a},O)=>{const{t:s}=De(),[d,A]=t.useState(new Set),l=e=>{A((t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o}))};t.useImperativeHandle(O,(()=>({toggleRow:l,expandedRows:d})));const u=(e,t)=>{let o={};return"string"==typeof e.width?o.width=e.width:"number"==typeof e.width?o.minWidth=e.width+"px":o.width="auto",void 0!==e.maxWidth&&("string"==typeof e.maxWidth?o.maxWidth=e.maxWidth:"number"==typeof e.maxWidth&&(o.maxWidth=e.maxWidth+"px")),"td"===t&&("string"==typeof b?o.height=b:"number"==typeof b?o.minHeight=b+"px":o.height="auto"),o},f=()=>{let e=!1;return p?.map((t=>{t.hasOwnProperty("children")&&(e=!0)})),!i&&e},q=(e,t,o)=>a?a(e,t,o):{},h=(e,t,o)=>{let p={"data-index":t+"_"+e,"data-level":t};return t>0&&(0===e&&(p["data-first"]="true"),e===o-1&&(p["data-last"]="true")),p},W=(p,b=0)=>p.map(((n,M)=>e.jsxs(t.Fragment,{children:[e.jsxs("tr",{...h(M,b,p?.length),...q(n,M,b),children:[f()?n.children?e.jsx("td",{style:{width:"40px"},children:e.jsx("div",{className:"expand-button",children:e.jsx(da,{variant:"filled",size:"x-small",onClick:()=>l(n.key),circle:!0,children:e.jsx("span",{children:d.has(n.key)?"-":"+"})})})}):e.jsx("td",{}):null,o.map((t=>e.jsx("td",{style:u(t,"td"),children:e.jsx(FR,{$overflow:t.overflow,title:String(n[t.dataIndex]),children:t.render?t.render(n[t.dataIndex],n,b):t.dataIndex?String(n[t.dataIndex]):null})},String(t.key)+"_"+M+"_"+b)))]}),n.children&&d.has(n.key)&&W(n.children,b+1)]},String(b+"_"+M+"_"+n.key))));return e.jsx(DR,{$size:n,$noGaps:z,children:e.jsxs("table",{className:(()=>{let e="itd-table";return e+=" itd-table-"+Ma(n),M&&(e+=" itd-table-headless"),r&&(e+=" itd-table-bordered"),z&&(e+=" itd-table-no-gaps"),p||(e+=" itd-table-empty"),0===p?.length&&(e+=" itd-table-no-data"),e+=c?" itd-table-dashed":" itd-table-solid",e+=" itd-table-main-table",e})(),children:[(()=>{if(!M)return e.jsx("thead",{children:e.jsxs("tr",{children:[f()&&e.jsx("th",{style:{maxWidth:"40px"}}),o.map((t=>e.jsx("th",{style:u(t,"th"),children:e.jsx(IR,{$overflow:t.overflow,children:t.title})},String(t.key))))]})})})(),p?0===p.length?e.jsx("tbody",{children:e.jsx("tr",{children:e.jsx("td",{colSpan:o.length,children:e.jsx(jR,{children:e.jsxs("div",{children:[e.jsx(ul,{height:30}),e.jsx("span",{children:s("table.noData")})]})})})})}):e.jsx("tbody",{children:W(p)}):e.jsx("tbody",{children:e.jsx("tr",{children:e.jsx("td",{colSpan:o.length,children:e.jsx(jR,{})})})})]})})})),UR=Di.div`
|
|
6145
|
+
`,$R=t.forwardRef((({columns:o,data:p,cellHeight:b,size:n="default",headless:M=!1,bordered:r=!1,dashed:c=!1,noGaps:z=!1,hideGroupButtons:i=!1,getTRProps:a},O)=>{const{t:s}=De(),[d,A]=t.useState(new Set),l=e=>{A((t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o}))};t.useImperativeHandle(O,(()=>({toggleRow:l,expandedRows:d})));const u=(e,t)=>{let o={};return"string"==typeof e.width?o.width=e.width:"number"==typeof e.width?o.minWidth=e.width+"px":o.width="auto",void 0!==e.maxWidth&&("string"==typeof e.maxWidth?o.maxWidth=e.maxWidth:"number"==typeof e.maxWidth&&(o.maxWidth=e.maxWidth+"px")),void 0!==e.minWidth&&("string"==typeof e.minWidth?o.minWidth=e.minWidth:"number"==typeof e.minWidth&&(o.minWidth=e.minWidth+"px")),"td"===t&&("string"==typeof b?o.height=b:"number"==typeof b?o.minHeight=b+"px":o.height="auto"),o},f=()=>{let e=!1;return p?.map((t=>{t.hasOwnProperty("children")&&(e=!0)})),!i&&e},q=(e,t,o)=>a?a(e,t,o):{},h=(e,t,o)=>{let p={"data-index":t+"_"+e,"data-level":t};return t>0&&(0===e&&(p["data-first"]="true"),e===o-1&&(p["data-last"]="true")),p},W=(p,b=0)=>p.map(((n,M)=>e.jsxs(t.Fragment,{children:[e.jsxs("tr",{...h(M,b,p?.length),...q(n,M,b),children:[f()?n.children?e.jsx("td",{style:{width:"40px"},children:e.jsx("div",{className:"expand-button",children:e.jsx(da,{variant:"filled",size:"x-small",onClick:()=>l(n.key),circle:!0,children:e.jsx("span",{children:d.has(n.key)?"-":"+"})})})}):e.jsx("td",{}):null,o.map((t=>e.jsx("td",{style:u(t,"td"),children:e.jsx(FR,{$overflow:t.overflow,title:String(n[t.dataIndex]),children:t.render?t.render(n[t.dataIndex],n,b):t.dataIndex?String(n[t.dataIndex]):null})},String(t.key)+"_"+M+"_"+b)))]}),n.children&&d.has(n.key)&&W(n.children,b+1)]},String(b+"_"+M+"_"+n.key))));return e.jsx(DR,{$size:n,$noGaps:z,children:e.jsxs("table",{className:(()=>{let e="itd-table";return e+=" itd-table-"+Ma(n),M&&(e+=" itd-table-headless"),r&&(e+=" itd-table-bordered"),z&&(e+=" itd-table-no-gaps"),p||(e+=" itd-table-empty"),0===p?.length&&(e+=" itd-table-no-data"),e+=c?" itd-table-dashed":" itd-table-solid",e+=" itd-table-main-table",e})(),children:[(()=>{if(!M)return e.jsx("thead",{children:e.jsxs("tr",{children:[f()&&e.jsx("th",{style:{maxWidth:"40px"}}),o.map((t=>e.jsx("th",{style:u(t,"th"),children:e.jsx(IR,{$overflow:t.overflow,children:t.title})},String(t.key))))]})})})(),p?0===p.length?e.jsx("tbody",{children:e.jsx("tr",{children:e.jsx("td",{colSpan:o.length,children:e.jsx(jR,{children:e.jsxs("div",{children:[e.jsx(ul,{height:30}),e.jsx("span",{children:s("table.noData")})]})})})})}):e.jsx("tbody",{children:W(p)}):e.jsx("tbody",{children:e.jsx("tr",{children:e.jsx("td",{colSpan:o.length,children:e.jsx(jR,{})})})})]})})})),UR=Di.div`
|
|
6146
6146
|
|
|
6147
6147
|
display : flex;
|
|
6148
6148
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1447,6 +1447,7 @@ type TableColumnType<T> = {
|
|
|
1447
1447
|
overflow?: boolean;
|
|
1448
1448
|
width?: number | string;
|
|
1449
1449
|
maxWidth?: number | string;
|
|
1450
|
+
minWidth?: number | string;
|
|
1450
1451
|
render?: (value: any, record: T, index: number, level?: number) => React.ReactNode;
|
|
1451
1452
|
};
|
|
1452
1453
|
type TableProps<T extends TableRow> = {
|
package/dist/index.esm.js
CHANGED
|
@@ -6142,7 +6142,7 @@ function Of(e,t){if(yf(e))for(let o=0;o<e.length&&!1!==t(e[o],o,e);o++);else e&&
|
|
|
6142
6142
|
display : block;
|
|
6143
6143
|
`}}
|
|
6144
6144
|
|
|
6145
|
-
`,oL=u((({columns:t,data:p,cellHeight:n,size:M="default",headless:c=!1,bordered:z=!1,dashed:i=!1,noGaps:a=!1,hideGroupButtons:O=!1,getTRProps:s},A)=>{const{t:d}=it(),[l,u]=r(new Set),f=e=>{u((t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o}))};q(A,(()=>({toggleRow:f,expandedRows:l})));const h=(e,t)=>{let o={};return"string"==typeof e.width?o.width=e.width:"number"==typeof e.width?o.minWidth=e.width+"px":o.width="auto",void 0!==e.maxWidth&&("string"==typeof e.maxWidth?o.maxWidth=e.maxWidth:"number"==typeof e.maxWidth&&(o.maxWidth=e.maxWidth+"px")),"td"===t&&("string"==typeof n?o.height=n:"number"==typeof n?o.minHeight=n+"px":o.height="auto"),o},W=()=>{let e=!1;return p?.map((t=>{t.hasOwnProperty("children")&&(e=!0)})),!O&&e},g=(e,t,o)=>s?s(e,t,o):{},m=(e,t,o)=>{let p={"data-index":t+"_"+e,"data-level":t};return t>0&&(0===e&&(p["data-first"]="true"),e===o-1&&(p["data-last"]="true")),p},R=(p,n=0)=>p.map(((M,r)=>o(b.Fragment,{children:[o("tr",{...m(r,n,p?.length),...g(M,r,n),children:[W()?M.children?e("td",{style:{width:"40px"},children:e("div",{className:"expand-button",children:e(Ya,{variant:"filled",size:"x-small",onClick:()=>f(M.key),circle:!0,children:e("span",{children:l.has(M.key)?"-":"+"})})})}):e("td",{}):null,t.map((t=>e("td",{style:h(t,"td"),children:e(tL,{$overflow:t.overflow,title:String(M[t.dataIndex]),children:t.render?t.render(M[t.dataIndex],M,n):t.dataIndex?String(M[t.dataIndex]):null})},String(t.key)+"_"+r+"_"+n)))]}),M.children&&l.has(M.key)&&R(M.children,n+1)]},String(n+"_"+r+"_"+M.key))));return e(Jv,{$size:M,$noGaps:a,children:o("table",{className:(()=>{let e="itd-table";return e+=" itd-table-"+Da(M),c&&(e+=" itd-table-headless"),z&&(e+=" itd-table-bordered"),a&&(e+=" itd-table-no-gaps"),p||(e+=" itd-table-empty"),0===p?.length&&(e+=" itd-table-no-data"),e+=i?" itd-table-dashed":" itd-table-solid",e+=" itd-table-main-table",e})(),children:[(()=>{if(!c)return e("thead",{children:o("tr",{children:[W()&&e("th",{style:{maxWidth:"40px"}}),t.map((t=>e("th",{style:h(t,"th"),children:e(eL,{$overflow:t.overflow,children:t.title})},String(t.key))))]})})})(),p?0===p.length?e("tbody",{children:e("tr",{children:e("td",{colSpan:t.length,children:e(Zv,{children:o("div",{children:[e(vu,{height:30}),e("span",{children:d("table.noData")})]})})})})}):e("tbody",{children:R(p)}):e("tbody",{children:e("tr",{children:e("td",{colSpan:t.length,children:e(Zv,{})})})})]})})})),pL=ha.div`
|
|
6145
|
+
`,oL=u((({columns:t,data:p,cellHeight:n,size:M="default",headless:c=!1,bordered:z=!1,dashed:i=!1,noGaps:a=!1,hideGroupButtons:O=!1,getTRProps:s},A)=>{const{t:d}=it(),[l,u]=r(new Set),f=e=>{u((t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o}))};q(A,(()=>({toggleRow:f,expandedRows:l})));const h=(e,t)=>{let o={};return"string"==typeof e.width?o.width=e.width:"number"==typeof e.width?o.minWidth=e.width+"px":o.width="auto",void 0!==e.maxWidth&&("string"==typeof e.maxWidth?o.maxWidth=e.maxWidth:"number"==typeof e.maxWidth&&(o.maxWidth=e.maxWidth+"px")),void 0!==e.minWidth&&("string"==typeof e.minWidth?o.minWidth=e.minWidth:"number"==typeof e.minWidth&&(o.minWidth=e.minWidth+"px")),"td"===t&&("string"==typeof n?o.height=n:"number"==typeof n?o.minHeight=n+"px":o.height="auto"),o},W=()=>{let e=!1;return p?.map((t=>{t.hasOwnProperty("children")&&(e=!0)})),!O&&e},g=(e,t,o)=>s?s(e,t,o):{},m=(e,t,o)=>{let p={"data-index":t+"_"+e,"data-level":t};return t>0&&(0===e&&(p["data-first"]="true"),e===o-1&&(p["data-last"]="true")),p},R=(p,n=0)=>p.map(((M,r)=>o(b.Fragment,{children:[o("tr",{...m(r,n,p?.length),...g(M,r,n),children:[W()?M.children?e("td",{style:{width:"40px"},children:e("div",{className:"expand-button",children:e(Ya,{variant:"filled",size:"x-small",onClick:()=>f(M.key),circle:!0,children:e("span",{children:l.has(M.key)?"-":"+"})})})}):e("td",{}):null,t.map((t=>e("td",{style:h(t,"td"),children:e(tL,{$overflow:t.overflow,title:String(M[t.dataIndex]),children:t.render?t.render(M[t.dataIndex],M,n):t.dataIndex?String(M[t.dataIndex]):null})},String(t.key)+"_"+r+"_"+n)))]}),M.children&&l.has(M.key)&&R(M.children,n+1)]},String(n+"_"+r+"_"+M.key))));return e(Jv,{$size:M,$noGaps:a,children:o("table",{className:(()=>{let e="itd-table";return e+=" itd-table-"+Da(M),c&&(e+=" itd-table-headless"),z&&(e+=" itd-table-bordered"),a&&(e+=" itd-table-no-gaps"),p||(e+=" itd-table-empty"),0===p?.length&&(e+=" itd-table-no-data"),e+=i?" itd-table-dashed":" itd-table-solid",e+=" itd-table-main-table",e})(),children:[(()=>{if(!c)return e("thead",{children:o("tr",{children:[W()&&e("th",{style:{maxWidth:"40px"}}),t.map((t=>e("th",{style:h(t,"th"),children:e(eL,{$overflow:t.overflow,children:t.title})},String(t.key))))]})})})(),p?0===p.length?e("tbody",{children:e("tr",{children:e("td",{colSpan:t.length,children:e(Zv,{children:o("div",{children:[e(vu,{height:30}),e("span",{children:d("table.noData")})]})})})})}):e("tbody",{children:R(p)}):e("tbody",{children:e("tr",{children:e("td",{colSpan:t.length,children:e(Zv,{})})})})]})})})),pL=ha.div`
|
|
6146
6146
|
|
|
6147
6147
|
display : flex;
|
|
6148
6148
|
|
|
@@ -7,6 +7,7 @@ export type TableColumnType<T> = {
|
|
|
7
7
|
overflow?: boolean;
|
|
8
8
|
width?: number | string;
|
|
9
9
|
maxWidth?: number | string;
|
|
10
|
+
minWidth?: number | string;
|
|
10
11
|
render?: (value: any, record: T, index: number, level?: number) => React.ReactNode;
|
|
11
12
|
};
|
|
12
13
|
export type TableProps<T extends TableRow> = {
|