1 line
5.7 KiB
JSON
1 line
5.7 KiB
JSON
|
{"ast":null,"code":"export function getCellFixedInfo(colStart, colEnd, columns, stickyOffsets, direction) {\n var startColumn = columns[colStart] || {};\n var endColumn = columns[colEnd] || {};\n var fixLeft;\n var fixRight;\n if (startColumn.fixed === 'left') {\n fixLeft = stickyOffsets.left[direction === 'rtl' ? colEnd : colStart];\n } else if (endColumn.fixed === 'right') {\n fixRight = stickyOffsets.right[direction === 'rtl' ? colStart : colEnd];\n }\n var lastFixLeft = false;\n var firstFixRight = false;\n var lastFixRight = false;\n var firstFixLeft = false;\n var nextColumn = columns[colEnd + 1];\n var prevColumn = columns[colStart - 1];\n\n // need show shadow only when canLastFix is true\n var canLastFix = nextColumn && !nextColumn.fixed || prevColumn && !prevColumn.fixed || columns.every(function (col) {\n return col.fixed === 'left';\n });\n if (direction === 'rtl') {\n if (fixLeft !== undefined) {\n var prevFixLeft = prevColumn && prevColumn.fixed === 'left';\n firstFixLeft = !prevFixLeft && canLastFix;\n } else if (fixRight !== undefined) {\n var nextFixRight = nextColumn && nextColumn.fixed === 'right';\n lastFixRight = !nextFixRight && canLastFix;\n }\n } else if (fixLeft !== undefined) {\n var nextFixLeft = nextColumn && nextColumn.fixed === 'left';\n lastFixLeft = !nextFixLeft && canLastFix;\n } else if (fixRight !== undefined) {\n var prevFixRight = prevColumn && prevColumn.fixed === 'right';\n firstFixRight = !prevFixRight && canLastFix;\n }\n return {\n fixLeft: fixLeft,\n fixRight: fixRight,\n lastFixLeft: lastFixLeft,\n firstFixRight: firstFixRight,\n lastFixRight: lastFixRight,\n firstFixLeft: firstFixLeft,\n isSticky: stickyOffsets.isSticky\n };\n}","map":{"version":3,"names":["getCellFixedInfo","colStart","colEnd","columns","stickyOffsets","direction","startColumn","endColumn","fixLeft","fixRight","fixed","left","right","lastFixLeft","firstFixRight","lastFixRight","firstFixLeft","nextColumn","prevColumn","canLastFix","every","col","undefined","prevFixLeft","nextFixRight","nextFixLeft","prevFixRight","isSticky"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-table/es/utils/fixUtil.js"],"sourcesContent":["export function getCellFixedInfo(colStart, colEnd, columns, stickyOffsets, direction) {\n var startColumn = columns[colStart] || {};\n var endColumn = columns[colEnd] || {};\n var fixLeft;\n var fixRight;\n if (startColumn.fixed === 'left') {\n fixLeft = stickyOffsets.left[direction === 'rtl' ? colEnd : colStart];\n } else if (endColumn.fixed === 'right') {\n fixRight = stickyOffsets.right[direction === 'rtl' ? colStart : colEnd];\n }\n var lastFixLeft = false;\n var firstFixRight = false;\n var lastFixRight = false;\n var firstFixLeft = false;\n var nextColumn = columns[colEnd + 1];\n var prevColumn = columns[colStart - 1];\n\n // need show shadow only when canLastFix is true\n var canLastFix = nextColumn && !nextColumn.fixed || prevColumn && !prevColumn.fixed || columns.every(function (col) {\n return col.fixed === 'left';\n });\n if (direction === 'rtl') {\n if (fixLeft !== undefined) {\n var prevFixLeft = prevColumn && prevColumn.fixed === 'left';\n firstFixLeft = !prevFixLeft && canLastFix;\n } else if (fixRight !== undefined) {\n var nextFixRight = nextColumn && nextColumn.fixed === 'right';\n lastFixRight = !nextFixRight && canLastFix;\n }\n } else if (fixLeft !== undefined) {\n var nextFixLeft = nextColumn && nextColumn.fixed === 'left';\n lastFixLeft = !nextFixLeft && canLastFix;\n } else if (fixRight !== undefined) {\n var prevFixRight = prevColumn && prevColumn.fixed === 'right';\n firstFixRight = !prevFixRight && canLastFix;\n }\n return {\n fixLeft: fixLeft,\n fixRight: fixRight,\n lastFixLeft: lastFixLeft,\n firstFixRight: firstFixRight,\n lastFixRight: lastFixRight,\n firstFixLeft: firstFixLeft,\n isSticky: stickyOffsets.isSticky\n };\n}"],"mappings":"AAAA,OAAO,SAASA,g
|