UNPKG

tanstack-table-header-rowspan

Version:
3 lines (2 loc) 1.04 kB
function e(e){for(var n=e;;){var r=n.isPlaceholder&&1===n.colSpan&&1===n.subHeaders.length?n.subHeaders[0]:null;if(!r)return n===e?null:n;n=r}}function n(n){var r=e(n);return n.depth-n.column.depth>1?null:1+(r?r.depth-n.depth:0)}function r(n){var r=e(n);return 1+(r?r.depth-n.depth:0)>1?null:n.depth-n.column.depth}function t(e){var n=e.depth-e.column.depth;return{rowSpan:n,topBorderMightBeNeeded:0===e.column.depth,styles:function(r){return{"--rowspan":n,height:"calc(var(--rowspan, 1) * "+r+")",marginTop:"calc(-1 * (var(--rowspan, 1) - 1) * "+r+")",visibility:e.isPlaceholder?"hidden":void 0}}}}function o(e){var n=e.depth-e.column.depth;return{rowSpan:n,bottomBorderMightBeNeeded:0===e.column.depth,styles:function(r){return{"--rowspan":n,height:"calc(var(--rowspan, 1) * "+r+")",marginBottom:"calc(-1*(var(--rowspan, 1) - 1) * "+r+")",visibility:e.isPlaceholder?"hidden":void 0}}}}export{o as flexTableFooterRowSpan,t as flexTableHeaderRowSpan,r as tableFooterRowSpan,n as tableHeaderRowSpan}; //# sourceMappingURL=rowspan.esm.js.map