@visactor/vtable 1.4.2-alpha.4 → 1.4.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/compute-col-width.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AASA,6CAA8D;AAC9D,uDAAyC;AAEzC,8CAAgD;AAChD,gDAA4C;AAG5C,+EAAsF;AACtF,2FAA0F;AAC1F,6CAAkD;AAClD,6CAAoF;AACpF,gDAAsE;AACtE,wDAAoD;AAEpD,SAAgB,gBAAgB,CAAC,KAAmB,EAAE,QAAiB,EAAE,MAAe,EAAE,MAAgB;;IACxG,MAAM,IAAI,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,QAAQ,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,CAAC;IACzB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;IAGtC,IAAI,QAAQ,KAAK,CAAC,IAAI,MAAM,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE;QACnD,KAAK,CAAC,uBAAuB,EAAE,CAAC;KAKjC;IAED,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,IAAI,MAAM,EAAE;QACV,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;YAC7C,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;SAC5C;KACF;IACD,KAAK,IAAI,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EA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AC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;wBACzC,IAAI,GAAG,KAAK,GAAG,EAAE;4BACf,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;yBACjE;wBACD,OAAO,GAAG,CAAC;oBACb,CAAC,EAAE,CAAC,CAAC,CAAC;SACT;aAAM;YACL,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;SACpF;QACD,IAAI,MAAM,EAAE;YACV,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;SACvD;aAAM,IAAI,cAAc,EAAE;YACzB,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;SACzE;aAAM;YACL,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;SAC5E;KACF;AACH,CAAC;AAjFD,4CAiFC","file":"compute-col-width.js","sourcesContent":["import type { SimpleHeaderLayoutMap } from '../../layout';\nimport type {\n ColumnDefine,\n ColumnTypeOption,\n IRowSeriesNumber,\n RadioColumnDefine,\n RadioStyleOption,\n TextColumnDefine\n} from '../../ts-types';\nimport { HierarchyState, IconPosition } from '../../ts-types';\nimport * as calc from '../../tools/calc';\nimport { validToString } from '../../tools/util';\nimport { getQuadProps } from '../utils/padding';\nimport { getProp } from '../utils/get-prop';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getAxisConfigInPivotChart } from '../../layout/chart-helper/get-axis-config';\nimport { computeAxisComponentWidth } from '../../components/axis/get-axis-component-size';\nimport { Group as VGroup } from './../../vrender';\nimport { isArray, isFunction, isNumber, isObject, isValid } from '@visactor/vutils';\nimport { decodeReactDom, dealPercentCalc } from '../component/custom';\nimport { breakString } from '../utils/break-string';\n\nexport function computeColsWidth(table: BaseTableAPI, colStart?: number, colEnd?: number, update?: boolean): void {\n const time = typeof window !== 'undefined' ? window.performance.now() : 0;\n colStart = colStart ?? 0;\n colEnd = colEnd ?? table.colCount - 1;\n // table._clearColRangeWidthsMap();\n // clear colRangeWidthsMap\n if (colStart === 0 && colEnd === table.colCount - 1) {\n table._clearColRangeWidthsMap();\n // } else {\n // for (let col = colStart; col <= colEnd; col++) {\n // table._clearColRangeWidthsMap(col);\n // }\n }\n\n const oldColWidths: number[] = [];\n const newWidths: number[] = [];\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n oldColWidths[col] = table.getColWidth(col);\n }\n }\n for (let col = colStart; col <= colEnd; col++) {\n let maxWidth;\n if (\n !table.internalProps.transpose &&\n (table.internalProps.layoutMap.columnObjects?.[col]?.columnWidthComputeMode === 'only-header' ||\n table.columnWidthComputeMode === 'only-header') &&\n 'showHeader' in table.internalProps.layoutMap\n ) {\n const temp = table.internalProps.layoutMap.showHeader;\n table.internalProps.layoutMap.showHeader = true;\n maxWidth = computeColWidth(col, 0, table.internalProps.layoutMap.headerLevelCount - 1, table);\n table.internalProps.layoutMap.showHeader = temp;\n } else if (\n !table.internalProps.transpose &&\n (table.internalProps.layoutMap.columnObjects?.[col]?.columnWidthComputeMode === 'only-body' ||\n table.columnWidthComputeMode === 'only-body')\n ) {\n maxWidth = computeColWidth(\n col,\n table.internalProps.layoutMap.getBodyRange().start.row,\n table.internalProps.layoutMap.getBodyRange().end.row,\n table\n );\n } else {\n maxWidth = computeColWidth(col, 0, table.rowCount - 1, table);\n }\n\n table._setColContentWidth(col, maxWidth);\n\n const oldWidth = table.getColWidth(col);\n if (oldWidth !== maxWidth) {\n table._clearColRangeWidthsMap(col);\n }\n if (update) {\n newWidths[col] = Math.round(table._adjustColWidth(col, maxWidth));\n } else {\n table._setColWidth(col, table._adjustColWidth(col, maxWidth), false, true);\n }\n }\n\n // 处理adaptive宽度\n if (table.widthMode === 'adaptive') {\n // const rowHeaderWidth = table.getColsWidth(0, table.rowHeaderLevelCount - 1);\n // const rightHeaderWidth = table.isPivotChart() ? table.getRightFrozenColsWidth() : 0;\n // const totalDrawWidth = table.tableNoFrameWidth - rowHeaderWidth - rightHeaderWidth;\n\n table._clearColRangeWidthsMap();\n const canvasWidth = table.tableNoFrameWidth;\n let actualHeaderWidth = 0;\n let startCol = 0;\n let endCol = table.colCount;\n if (table.widthAdaptiveMode === 'only-body') {\n for (let col = 0; col < table.colCount; col++) {\n const colWidth = update ? newWidths[col] : table.getColWidth(col);\n if (\n col < table.rowHeaderLevelCount ||\n (table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount)\n ) {\n actualHeaderWidth += colWidth;\n }\n }\n startCol = table.rowHeaderLevelCount;\n endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;\n }\n getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, update, newWidths, table);\n // const canvasWidth = table.internalProps.canvas.width;\n // const rowHeaderWidth = table.getColsWidth(0, table.rowHeaderLevelCount - 1);\n // const rightHeaderWidth = table.isPivotChart() ? table.getRightFrozenColsWidth() : 0;\n // const totalDrawWidth = table.tableNoFrameWidth - rowHeaderWidth - rightHeaderWidth;\n // const startCol = table.rowHeaderLevelCount;\n // const endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;\n // let actualWidth = 0;\n // for (let col = startCol; col < endCol; col++) {\n // actualWidth += update ? newWidths[col] : table.getColWidth(col);\n // }\n // const factor = totalDrawWidth / actualWidth;\n // for (let col = startCol; col < endCol; col++) {\n // let colWidth;\n // if (col === endCol - 1) {\n // colWidth =\n // totalDrawWidth -\n // (update\n // ? newWidths.reduce((acr, cur, index) => {\n // if (index >= startCol && index <= endCol - 2) {\n // return acr + cur;\n // }\n // return acr;\n // }, 0)\n // : table.getColsWidth(startCol, endCol - 2));\n // } else {\n // colWidth = Math.round((update ? newWidths[col] : table.getColWidth(col)) * factor);\n // }\n // if (update) {\n // newWidths[col] = table._adjustColWidth(col, colWidth);\n // } else {\n // table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n // }\n // }\n } else if (table.autoFillWidth) {\n table._clearColRangeWidthsMap();\n const canvasWidth = table.tableNoFrameWidth;\n let actualHeaderWidth = 0;\n let actualWidth = 0;\n for (let col = 0; col < table.colCount; col++) {\n const colWidth = update ? newWidths[col] : table.getColWidth(col);\n if (\n col < table.rowHeaderLevelCount ||\n (table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount)\n ) {\n actualHeaderWidth += colWidth;\n }\n actualWidth += colWidth;\n }\n // 如果内容宽度小于canvas宽度,执行adaptive放大\n if (actualWidth < canvasWidth && actualWidth > actualHeaderWidth) {\n const startCol = table.rowHeaderLevelCount;\n const endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;\n getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, update, newWidths, table);\n }\n\n // // 如果内容宽度小于canvas宽度,执行adaptive放大\n // if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {\n // const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);\n // for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {\n // let colWidth;\n // if (col === table.colCount - table.rightFrozenColCount - 1) {\n // colWidth =\n // canvasWidth -\n // actualHeaderWidth -\n // (update\n // ? newWidths.reduce((acr, cur, index) => {\n // if (index >= table.frozenColCount && index <= table.colCount - table.rightFrozenColCount - 2) {\n // return acr + cur;\n // }\n // return acr;\n // }, 0)\n // : table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2));\n // } else {\n // colWidth = Math.round((update ? newWidths[col] : table.getColWidth(col)) * factor);\n // }\n // if (update) {\n // // newWidths[col] = newWidths[col] * factor;\n // newWidths[col] = table._adjustColWidth(col, colWidth);\n // } else {\n // // table.setColWidth(col, table.getColWidth(col) * factor, false, true);\n // table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n // }\n // }\n // }\n }\n // console.log('computeColsWidth time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time);\n\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n // newColWidth could not be in column min max range possibly\n // const newColWidth = table._adjustColWidth(col, newWidths[col]) ?? table.getColWidth(col);\n const newColWidth = newWidths[col] ?? table.getColWidth(col);\n if (newColWidth !== oldColWidths[col]) {\n // update the column width in scenegraph\n table._setColWidth(col, newColWidth, false, true);\n // table.scenegraph.updateColWidth(col, newColWidth - oldColWidths[col], true, true);\n }\n }\n table.stateManager.checkFrozen();\n for (let col = 0; col < table.colCount; col++) {\n // newColWidth could not be in column min max range possibly\n // const newColWidth = table._adjustColWidth(col, newWidths[col]) ?? table.getColWidth(col);\n const newColWidth = table.getColWidth(col);\n if (newColWidth !== oldColWidths[col]) {\n // update the column width in scenegraph\n // table._setColWidth(col, newColWidth);\n table.scenegraph.updateColWidth(col, newColWidth - oldColWidths[col], true, true);\n }\n }\n table.scenegraph.updateContainer(true);\n }\n // console.log('computeColsWidth time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time, colStart, colEnd);\n}\n\n/**\n * @description: 计算列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {BaseTableAPI} table\n * @param {boolean} forceCompute\n * @return {*}\n */\nexport function computeColWidth(\n col: number,\n startRow: number,\n endRow: number,\n table: BaseTableAPI,\n forceCompute: boolean = false //forceCompute如果设置为true 即便不是自动列宽的列也会按内容计算列宽\n): number {\n let width = getColWidthDefinedWidthResizedWidth(col, table);\n if (\n table.internalProps.transpose &&\n width === 'auto' &&\n ((table.columnWidthComputeMode === 'only-header' && col >= table.rowHeaderLevelCount) ||\n (table.columnWidthComputeMode === 'only-body' && col < table.rowHeaderLevelCount))\n ) {\n width = table.getDefaultColumnWidth(col);\n }\n\n if (forceCompute && !table.internalProps.transpose) {\n return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);\n } else if (typeof width === 'number') {\n return width;\n } else if (width !== 'auto' && typeof width === 'string') {\n // return calc.toPx(width, table.internalProps.calcWidthContext);\n return table._adjustColWidth(col, table._colWidthDefineToPxWidth(width));\n }\n return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);\n}\n\n/**\n * @description: 计算width: auto情况下的列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeAutoColWidth(\n widthDeifne: string | number,\n col: number,\n startRow: number,\n endRow: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number {\n // 处理 auto width\n let maxWidth = 0;\n let deltaRow = 1;\n let prepareDeltaRow = 1; // 当计算完表头单元格的宽度后再采用采用逻辑,prepareDeltaRow这个值为期body部分做准备\n if (endRow - startRow > 5000) {\n // 超过5000行启动列宽自动计算采样\n prepareDeltaRow = Math.ceil((endRow - startRow) / 5000);\n }\n // 如果是透视图\n if (table.isPivotChart() && col >= table.rowHeaderLevelCount && col < table.colCount - table.rightFrozenColCount) {\n if (!(table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol) {\n //并且指标是以行展示 计算列宽需要根据x轴的值域范围\n const optimunWidth = (table.internalProps.layoutMap as PivotHeaderLayoutMap).getOptimunWidthForChart(col);\n if (optimunWidth > 0) {\n return optimunWidth;\n }\n } else {\n //直接拿表头的默认列宽\n return table.defaultColWidth;\n }\n }\n\n for (let row = startRow; row <= endRow; row += deltaRow) {\n // 判断透视图轴组件\n if (table.isPivotChart()) {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const axisConfig = getAxisConfigInPivotChart(col, row, layout);\n if (axisConfig) {\n const axisWidth = computeAxisComponentWidth(axisConfig, table);\n if (typeof axisWidth === 'number') {\n maxWidth = Math.max(axisWidth, maxWidth);\n continue;\n }\n } else if (\n layout.isLeftBottomCorner(col, row) ||\n layout.isRightTopCorner(col, row) ||\n layout.isRightBottomCorner(col, row)\n ) {\n // 透视图三角为无效单元格,不参与宽度计算\n continue;\n }\n }\n\n // 判断CustomRender\n const customWidth = computeCustomRenderWidth(col, row, table);\n if (customWidth) {\n maxWidth = Math.max(customWidth.width, maxWidth);\n if (!customWidth.renderDefault) {\n continue;\n }\n }\n\n // 判断透视表如果在指标\n // const indicatorWidth = computeIndicatorWidth(col, row, forceCompute, table);\n // const indicatorWidth = table.internalProps.layoutMap.getColumnWidthDefined(col);\n const indicatorWidth = widthDeifne;\n if (typeof indicatorWidth === 'number' && table.widthMode === 'standard' && !forceCompute) {\n maxWidth = Math.max(indicatorWidth, maxWidth);\n continue;\n }\n\n const cellType = table.isHeader(col, row)\n ? (table._getHeaderLayoutMap(col, row) as HeaderData)?.headerType\n : table.getBodyColumnType(col, row);\n if (\n isValid(cellType) &&\n cellType !== 'text' &&\n cellType !== 'link' &&\n cellType !== 'progressbar' &&\n cellType !== 'checkbox' &&\n cellType !== 'radio'\n ) {\n // text&link&progressbar测量文字宽度\n // image&video&sparkline使用默认宽度\n maxWidth = Math.max(maxWidth, table.getColWidthDefinedNumber(col) || 0);\n continue;\n }\n\n // 处理树形展开\n let cellHierarchyIndent = 0;\n const layoutMap = table.internalProps.layoutMap;\n //判断是否为表头\n if (layoutMap.isHeader(col, row)) {\n const hd = layoutMap.getHeader(col, row);\n // 如果某级表头设置了only-body,在计算表头内容宽度时跳过改级表头\n if ((hd as HeaderData)?.define?.columnWidthComputeMode === 'only-body') {\n continue;\n }\n if (isValid((hd as HeaderData)?.hierarchyLevel)) {\n cellHierarchyIndent =\n ((hd as HeaderData).hierarchyLevel ?? 0) * ((layoutMap as PivotHeaderLayoutMap).rowHierarchyIndent ?? 0);\n if (\n (layoutMap as PivotHeaderLayoutMap).rowHierarchyTextStartAlignment &&\n !table.internalProps.headerHelper.getHierarchyIcon(col, row)\n ) {\n cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth();\n }\n }\n } else {\n deltaRow = prepareDeltaRow;\n // 基本表格表身body单元格 如果是树形展开 需要考虑缩进值\n // const cellHierarchyState = table.getHierarchyState(col, row);\n // if (cellHierarchyState === HierarchyState.expand || cellHierarchyState === HierarchyState.collapse) {\n const define = table.getBodyColumnDefine(col, row);\n if ((define as ColumnDefine)?.tree) {\n const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row));\n cellHierarchyIndent =\n Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none\n ? (indexArr.length - 1) * ((layoutMap as SimpleHeaderLayoutMap).hierarchyIndent ?? 0)\n : 0;\n if (\n (layoutMap as SimpleHeaderLayoutMap).hierarchyTextStartAlignment &&\n !table.internalProps.bodyHelper.getHierarchyIcon(col, row)\n ) {\n cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth();\n }\n }\n }\n\n // 测量文字宽度\n const textWidth = computeTextWidth(col, row, cellType, table);\n maxWidth = Math.max(textWidth + cellHierarchyIndent, maxWidth);\n //在前面设置了采用规则的情况下,为了确保底部冻结的每一行都测到\n if (\n deltaRow > 1 &&\n table.bottomFrozenRowCount > 0 &&\n row < table.rowCount - table.bottomFrozenRowCount &&\n row + deltaRow >= table.rowCount - table.bottomFrozenRowCount\n ) {\n row = table.rowCount - table.bottomFrozenRowCount - deltaRow;\n deltaRow = 1;\n prepareDeltaRow = 1;\n }\n }\n\n // 处理宽度限制\n const colMinWidth = table.getMinColWidth(col);\n const colMaxWidth = table.getMaxColWidth(col);\n if (maxWidth < colMinWidth) {\n return colMinWidth;\n } else if (maxWidth > colMaxWidth) {\n return colMaxWidth;\n } else if (maxWidth <= 0) {\n // In the case of partially hiding the header, the width calculation may be 0.\n // In this case, the default value is used to prevent it from being unable to be displayed\n maxWidth = table.defaultColWidth;\n }\n return maxWidth;\n}\n\n/**\n * @description: 计算customRender相关列宽\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeCustomRenderWidth(col: number, row: number, table: BaseTableAPI) {\n const customRender = table.getCustomRender(col, row);\n const customLayout = table.getCustomLayout(col, row);\n if (customRender || customLayout) {\n let spanCol = 1;\n let width = 0;\n let renderDefault = false;\n let enableCellPadding = false;\n if (\n table.isHeader(col, row) ||\n (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell ||\n table.hasCustomMerge()\n ) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: getCellRect(col, row, table),\n table\n };\n if (isFunction(customLayout)) {\n // 处理customLayout\n const customLayoutObj = customLayout(arg);\n if (customLayoutObj.rootContainer instanceof VGroup) {\n customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n dealPercentCalc(customLayoutObj.rootContainer, 0, table.getRowHeight(row));\n const setedWidth = (customLayoutObj.rootContainer as VGroup).attribute.width;\n customLayoutObj.rootContainer.setStage(table.scenegraph.stage);\n width = setedWidth > 0 ? setedWidth : (customLayoutObj.rootContainer as VGroup).AABBBounds.width() ?? 0;\n renderDefault = customLayoutObj.renderDefault;\n enableCellPadding = customLayoutObj.enableCellPadding;\n } else {\n width = 0;\n renderDefault = customLayoutObj.renderDefault;\n enableCellPadding = customLayoutObj.enableCellPadding;\n }\n } else if (typeof customRender === 'function') {\n // 处理customRender\n const customRenderObj = customRender(arg);\n width = customRenderObj?.expectedWidth ?? 0;\n renderDefault = customRenderObj?.renderDefault;\n } else {\n width = customRender?.expectedWidth ?? 0;\n renderDefault = customRender?.renderDefault;\n }\n width = Math.ceil(width);\n if (enableCellPadding) {\n const actStyle = table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n width += padding[1] + padding[3];\n }\n return {\n width: width / spanCol,\n renderDefault\n };\n }\n return undefined;\n}\n\n/**\n * @description: 计算指标相关列宽\n * @param {number} col\n * @param {number} row\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeIndicatorWidth(\n col: number,\n row: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number | undefined {\n const { layoutMap } = table.internalProps;\n if (table.isPivotTable() && (layoutMap as PivotHeaderLayoutMap).isColumnIndicatorHeader(col, row)) {\n // 透视表如果在指标中配置了宽度,使用该宽度作为指标单元格及下面内容单元格的列宽\n const body = layoutMap.getBody(col, row);\n if (body && body.width && body.width !== 'auto' && !forceCompute) {\n const width = Math.round(calc.toPx(body.width, table.internalProps.calcWidthContext));\n return width;\n }\n }\n return undefined;\n}\n\n/**\n * @description: 计算文字宽度\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeTextWidth(col: number, row: number, cellType: ColumnTypeOption, table: BaseTableAPI): number {\n let maxWidth = 0;\n const cellValue = table.getCellValue(col, row);\n // const dataValue = table.getCellOriginValue(col, row);\n const actStyle = table._getCellStyle(col, row);\n let iconWidth = 0;\n\n // const define = table.getBodyColumnDefine(col, row);\n // const mayHaveIcon = table.getCellLocation(col, row) !== 'body' ? true : !!define?.icon || !!define?.tree;\n\n let mayHaveIcon = false;\n if (table.getCellLocation(col, row) !== 'body') {\n mayHaveIcon = true;\n } else {\n const define = table.getBodyColumnDefine(col, row);\n mayHaveIcon = !!define?.icon || !!(define as ColumnDefine)?.tree || (define as IRowSeriesNumber)?.dragOrder;\n }\n if (mayHaveIcon) {\n const icons = table.getCellIcons(col, row);\n icons?.forEach(icon => {\n if (icon.positionType !== IconPosition.absoluteRight) {\n iconWidth += (icon.width ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0);\n }\n });\n }\n\n let spanCol = 1;\n if (\n table.isHeader(col, row) ||\n (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell ||\n table.hasCustomMerge()\n ) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n const paddingWidth = padding[1] + padding[3]; // + cellHierarchyIndent\n\n const fontSize = getProp('fontSize', actStyle, col, row, table);\n const fontFamily = getProp('fontFamily', actStyle, col, row, table);\n const fontWeight = getProp('fontWeight', actStyle, col, row, table);\n let text: string;\n if (cellType === 'checkbox') {\n text = isObject(cellValue) ? (cellValue as any).text : cellValue;\n } else if (cellType === 'radio') {\n if (isArray(cellValue)) {\n text = '';\n const define = table.getBodyColumnDefine(col, row);\n const radioDirectionInCell = (define as RadioColumnDefine)?.radioDirectionInCell ?? 'vertical';\n if (radioDirectionInCell === 'vertical') {\n cellValue.forEach(line => {\n text += (isObject(line) ? (line as any).text : line).toString() + '\\n';\n });\n } else if (radioDirectionInCell === 'horizontal') {\n cellValue.forEach(line => {\n text += (isObject(line) ? (line as any).text : line).toString();\n });\n }\n } else {\n text = isObject(cellValue) ? (cellValue as any).text : cellValue;\n }\n } else {\n text = cellValue;\n }\n const lines = breakString(text, table).text;\n if (lines.length >= 1) {\n // eslint-disable-next-line no-loop-func\n lines.forEach((line: string) => {\n const width = table.measureText(line, {\n fontSize,\n fontFamily,\n fontWeight\n }).width;\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (width + paddingWidth + 4 + iconWidth) / spanCol, // 这里+4为列宽测量结果的buffer\n maxWidth\n );\n });\n } else {\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (paddingWidth + 4 + iconWidth) / spanCol,\n maxWidth\n );\n }\n // 判断是否需要限制最大宽度 之前写死的450 需要使用配置来判断\n if (table.internalProps.limitMaxAutoWidth !== false) {\n maxWidth = Math.min(\n typeof table.internalProps.limitMaxAutoWidth === 'number' ? table.internalProps.limitMaxAutoWidth : 450,\n maxWidth\n );\n }\n\n if (cellType === 'checkbox') {\n const size = getProp('size', actStyle, col, row, table);\n maxWidth += size;\n\n if (text) {\n const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);\n maxWidth += spaceBetweenTextAndIcon;\n }\n } else if (cellType === 'radio') {\n const size = getProp('size', actStyle, col, row, table);\n const outerRadius = getProp('outerRadius', actStyle, col, row, table);\n const circleSize = isNumber(outerRadius) ? outerRadius * 2 : size;\n const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);\n\n if (isArray(cellValue)) {\n const define = table.getBodyColumnDefine(col, row);\n const spaceBetweenRadio = getProp('spaceBetweenRadio', actStyle, col, row, table);\n const radioDirectionInCell = (define as RadioColumnDefine)?.radioDirectionInCell ?? 'vertical';\n if (radioDirectionInCell === 'vertical') {\n // one icon\n maxWidth += circleSize;\n maxWidth += spaceBetweenTextAndIcon;\n } else if (radioDirectionInCell === 'horizontal') {\n // multi icon\n maxWidth += (circleSize + spaceBetweenTextAndIcon) * cellValue.length;\n maxWidth += spaceBetweenRadio * (cellValue.length - 1);\n }\n } else {\n // one icon\n maxWidth += circleSize;\n if (text) {\n maxWidth += spaceBetweenTextAndIcon;\n }\n }\n }\n\n return maxWidth;\n}\n\nfunction getCellRect(col: number, row: number, table: BaseTableAPI): any {\n return {\n left: 0,\n top: 0,\n right: table.getColWidth(col),\n bottom: table.getRowHeight(row),\n width: null, // vrender 逻辑中通过判断null对flex的元素来自动计算宽高\n height: null\n };\n}\n\nfunction getColWidthDefinedWidthResizedWidth(col: number, table: BaseTableAPI) {\n const widthDefined = table.getColWidthDefined(col);\n if (table.internalProps._widthResizedColMap.has(col)) {\n return table.getColWidth(col);\n }\n return widthDefined;\n}\n\nexport function getAdaptiveWidth(\n totalDrawWidth: number,\n startCol: number,\n endColPlus1: number,\n update: boolean,\n newWidths: number[],\n table: BaseTableAPI,\n fromScenegraph?: boolean\n) {\n let actualWidth = 0;\n const adaptiveColumns: number[] = [];\n const sparklineColumns = [];\n let totalSparklineAbleWidth = 0;\n for (let col = startCol; col < endColPlus1; col++) {\n const width = update ? newWidths[col] : table.getColWidth(col);\n const maxWidth = table.getMaxColWidth(col);\n const minWidth = table.getMinColWidth(col);\n if (width !== maxWidth && width !== minWidth) {\n actualWidth += width;\n adaptiveColumns.push(col);\n } else {\n // fixed width, do not adaptive\n totalDrawWidth -= width;\n }\n\n if (table.options.customConfig?.shrinkSparklineFirst) {\n const bodyCellType = table.getBodyColumnType(col, 0);\n if (bodyCellType === 'sparkline') {\n sparklineColumns.push({ col, width });\n totalSparklineAbleWidth += width - table.defaultColWidth;\n }\n }\n }\n\n const factor = totalDrawWidth / actualWidth;\n\n if (\n table.options.customConfig?.shrinkSparklineFirst &&\n factor < 1 &&\n totalDrawWidth - actualWidth < totalSparklineAbleWidth\n ) {\n // only shrink sparkline column\n for (let i = 0; i < sparklineColumns.length; i++) {\n const { col, width } = sparklineColumns[i];\n const deltaWidth = (actualWidth - totalDrawWidth) / sparklineColumns.length;\n const colWidth = Math.floor(width - deltaWidth);\n\n if (update) {\n newWidths[col] = table._adjustColWidth(col, colWidth);\n } else if (fromScenegraph) {\n table.scenegraph.setColWidth(col, table._adjustColWidth(col, colWidth));\n } else {\n table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n }\n }\n return;\n }\n\n for (let i = 0; i < adaptiveColumns.length; i++) {\n const col = adaptiveColumns[i];\n let colWidth;\n if (i === adaptiveColumns.length - 1) {\n colWidth =\n totalDrawWidth -\n adaptiveColumns.reduce((acr, cur, index) => {\n if (cur !== col) {\n return acr + (update ? newWidths[cur] : table.getColWidth(cur));\n }\n return acr;\n }, 0);\n } else {\n colWidth = Math.round((update ? newWidths[col] : table.getColWidth(col)) * factor);\n }\n if (update) {\n newWidths[col] = table._adjustColWidth(col, colWidth);\n } else if (fromScenegraph) {\n table.scenegraph.setColWidth(col, table._adjustColWidth(col, colWidth));\n } else {\n table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/compute-col-width.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AASA,6CAA8D;AAC9D,uDAAyC;AAEzC,8CAAgD;AAChD,gDAA4C;AAG5C,+EAAsF;AACtF,2FAA0F;AAC1F,6CAAkD;AAClD,6CAAoF;AACpF,gDAAsE;AACtE,wDAAoD;AAEpD,SAAgB,gBAAgB,CAAC,KAAmB,EAAE,QAAiB,EAAE,MAAe,EAAE,MAAgB;;IACxG,MAAM,IAAI,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,QAAQ,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,CAAC;IACzB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;IAGtC,IAAI,QAAQ,KAAK,CAAC,IAAI,MAAM,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE;QACnD,KAAK,CAAC,uBAAuB,EAAE,CAAC;KAKjC;IAED,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,IAAI,MAAM,EAAE;QACV,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;YAC7C,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;SAC5C;KACF;IACD,KAAK,IAAI,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QAC7C,IAAI,QAAQ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EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;wBACzC,IAAI,GAAG,KAAK,GAAG,EAAE;4BACf,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;yBACjE;wBACD,OAAO,GAAG,CAAC;oBACb,CAAC,EAAE,CAAC,CAAC,CAAC;SACT;aAAM;YACL,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;SACpF;QACD,IAAI,MAAM,EAAE;YACV,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;SACvD;aAAM,IAAI,cAAc,EAAE;YACzB,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;SACzE;aAAM;YACL,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;SAC5E;KACF;AACH,CAAC;AAjFD,4CAiFC","file":"compute-col-width.js","sourcesContent":["import type { SimpleHeaderLayoutMap } from '../../layout';\nimport type {\n ColumnDefine,\n ColumnTypeOption,\n IRowSeriesNumber,\n RadioColumnDefine,\n RadioStyleOption,\n TextColumnDefine\n} from '../../ts-types';\nimport { HierarchyState, IconPosition } from '../../ts-types';\nimport * as calc from '../../tools/calc';\nimport { validToString } from '../../tools/util';\nimport { getQuadProps } from '../utils/padding';\nimport { getProp } from '../utils/get-prop';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getAxisConfigInPivotChart } from '../../layout/chart-helper/get-axis-config';\nimport { computeAxisComponentWidth } from '../../components/axis/get-axis-component-size';\nimport { Group as VGroup } from './../../vrender';\nimport { isArray, isFunction, isNumber, isObject, isValid } from '@visactor/vutils';\nimport { decodeReactDom, dealPercentCalc } from '../component/custom';\nimport { breakString } from '../utils/break-string';\n\nexport function computeColsWidth(table: BaseTableAPI, colStart?: number, colEnd?: number, update?: boolean): void {\n const time = typeof window !== 'undefined' ? window.performance.now() : 0;\n colStart = colStart ?? 0;\n colEnd = colEnd ?? table.colCount - 1;\n // table._clearColRangeWidthsMap();\n // clear colRangeWidthsMap\n if (colStart === 0 && colEnd === table.colCount - 1) {\n table._clearColRangeWidthsMap();\n // } else {\n // for (let col = colStart; col <= colEnd; col++) {\n // table._clearColRangeWidthsMap(col);\n // }\n }\n\n const oldColWidths: number[] = [];\n const newWidths: number[] = [];\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n oldColWidths[col] = table.getColWidth(col);\n }\n }\n for (let col = colStart; col <= colEnd; col++) {\n let maxWidth;\n if (\n !table.internalProps.transpose &&\n (table.internalProps.layoutMap.columnObjects?.[col]?.columnWidthComputeMode === 'only-header' ||\n table.columnWidthComputeMode === 'only-header') &&\n 'showHeader' in table.internalProps.layoutMap\n ) {\n const temp = table.internalProps.layoutMap.showHeader;\n table.internalProps.layoutMap.showHeader = true;\n maxWidth = computeColWidth(col, 0, table.internalProps.layoutMap.headerLevelCount - 1, table);\n table.internalProps.layoutMap.showHeader = temp;\n } else if (\n !table.internalProps.transpose &&\n (table.internalProps.layoutMap.columnObjects?.[col]?.columnWidthComputeMode === 'only-body' ||\n table.columnWidthComputeMode === 'only-body')\n ) {\n maxWidth = computeColWidth(\n col,\n table.internalProps.layoutMap.getBodyRange().start.row,\n table.internalProps.layoutMap.getBodyRange().end.row,\n table\n );\n } else {\n maxWidth = computeColWidth(col, 0, table.rowCount - 1, table);\n }\n\n table._setColContentWidth(col, maxWidth);\n\n const oldWidth = table.getColWidth(col);\n if (oldWidth !== maxWidth) {\n table._clearColRangeWidthsMap(col);\n }\n if (update) {\n newWidths[col] = Math.round(table._adjustColWidth(col, maxWidth));\n } else {\n table._setColWidth(col, table._adjustColWidth(col, maxWidth), false, true);\n }\n }\n\n // 处理adaptive宽度\n if (table.widthMode === 'adaptive') {\n // const rowHeaderWidth = table.getColsWidth(0, table.rowHeaderLevelCount - 1);\n // const rightHeaderWidth = table.isPivotChart() ? table.getRightFrozenColsWidth() : 0;\n // const totalDrawWidth = table.tableNoFrameWidth - rowHeaderWidth - rightHeaderWidth;\n\n table._clearColRangeWidthsMap();\n const canvasWidth = table.tableNoFrameWidth;\n let actualHeaderWidth = 0;\n let startCol = 0;\n let endCol = table.colCount;\n if (table.widthAdaptiveMode === 'only-body') {\n for (let col = 0; col < table.colCount; col++) {\n const colWidth = update ? newWidths[col] : table.getColWidth(col);\n if (\n col < table.rowHeaderLevelCount ||\n (table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount)\n ) {\n actualHeaderWidth += colWidth;\n }\n }\n startCol = table.rowHeaderLevelCount;\n endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;\n }\n getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, update, newWidths, table);\n // const canvasWidth = table.internalProps.canvas.width;\n // const rowHeaderWidth = table.getColsWidth(0, table.rowHeaderLevelCount - 1);\n // const rightHeaderWidth = table.isPivotChart() ? table.getRightFrozenColsWidth() : 0;\n // const totalDrawWidth = table.tableNoFrameWidth - rowHeaderWidth - rightHeaderWidth;\n // const startCol = table.rowHeaderLevelCount;\n // const endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;\n // let actualWidth = 0;\n // for (let col = startCol; col < endCol; col++) {\n // actualWidth += update ? newWidths[col] : table.getColWidth(col);\n // }\n // const factor = totalDrawWidth / actualWidth;\n // for (let col = startCol; col < endCol; col++) {\n // let colWidth;\n // if (col === endCol - 1) {\n // colWidth =\n // totalDrawWidth -\n // (update\n // ? newWidths.reduce((acr, cur, index) => {\n // if (index >= startCol && index <= endCol - 2) {\n // return acr + cur;\n // }\n // return acr;\n // }, 0)\n // : table.getColsWidth(startCol, endCol - 2));\n // } else {\n // colWidth = Math.round((update ? newWidths[col] : table.getColWidth(col)) * factor);\n // }\n // if (update) {\n // newWidths[col] = table._adjustColWidth(col, colWidth);\n // } else {\n // table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n // }\n // }\n } else if (table.autoFillWidth) {\n table._clearColRangeWidthsMap();\n const canvasWidth = table.tableNoFrameWidth;\n let actualHeaderWidth = 0;\n let actualWidth = 0;\n for (let col = 0; col < table.colCount; col++) {\n const colWidth = update ? newWidths[col] : table.getColWidth(col);\n if (\n col < table.rowHeaderLevelCount ||\n (table.isPivotChart() && col >= table.colCount - table.rightFrozenColCount)\n ) {\n actualHeaderWidth += colWidth;\n }\n actualWidth += colWidth;\n }\n // 如果内容宽度小于canvas宽度,执行adaptive放大\n if (actualWidth < canvasWidth && actualWidth > actualHeaderWidth) {\n const startCol = table.rowHeaderLevelCount;\n const endCol = table.isPivotChart() ? table.colCount - table.rightFrozenColCount : table.colCount;\n getAdaptiveWidth(canvasWidth - actualHeaderWidth, startCol, endCol, update, newWidths, table);\n }\n\n // // 如果内容宽度小于canvas宽度,执行adaptive放大\n // if (actualWidth < canvasWidth && actualWidth - actualHeaderWidth > 0) {\n // const factor = (canvasWidth - actualHeaderWidth) / (actualWidth - actualHeaderWidth);\n // for (let col = table.frozenColCount; col < table.colCount - table.rightFrozenColCount; col++) {\n // let colWidth;\n // if (col === table.colCount - table.rightFrozenColCount - 1) {\n // colWidth =\n // canvasWidth -\n // actualHeaderWidth -\n // (update\n // ? newWidths.reduce((acr, cur, index) => {\n // if (index >= table.frozenColCount && index <= table.colCount - table.rightFrozenColCount - 2) {\n // return acr + cur;\n // }\n // return acr;\n // }, 0)\n // : table.getColsWidth(table.frozenColCount, table.colCount - table.rightFrozenColCount - 2));\n // } else {\n // colWidth = Math.round((update ? newWidths[col] : table.getColWidth(col)) * factor);\n // }\n // if (update) {\n // // newWidths[col] = newWidths[col] * factor;\n // newWidths[col] = table._adjustColWidth(col, colWidth);\n // } else {\n // // table.setColWidth(col, table.getColWidth(col) * factor, false, true);\n // table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n // }\n // }\n // }\n }\n // console.log('computeColsWidth time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time);\n\n if (update) {\n for (let col = 0; col < table.colCount; col++) {\n // newColWidth could not be in column min max range possibly\n // const newColWidth = table._adjustColWidth(col, newWidths[col]) ?? table.getColWidth(col);\n const newColWidth = newWidths[col] ?? table.getColWidth(col);\n if (newColWidth !== oldColWidths[col]) {\n // update the column width in scenegraph\n table._setColWidth(col, newColWidth, false, true);\n // table.scenegraph.updateColWidth(col, newColWidth - oldColWidths[col], true, true);\n }\n }\n table.stateManager.checkFrozen();\n for (let col = 0; col < table.colCount; col++) {\n // newColWidth could not be in column min max range possibly\n // const newColWidth = table._adjustColWidth(col, newWidths[col]) ?? table.getColWidth(col);\n const newColWidth = table.getColWidth(col);\n if (newColWidth !== oldColWidths[col]) {\n // update the column width in scenegraph\n // table._setColWidth(col, newColWidth);\n table.scenegraph.updateColWidth(col, newColWidth - oldColWidths[col], true, true);\n }\n }\n table.scenegraph.updateContainer(true);\n }\n // console.log('computeColsWidth time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time, colStart, colEnd);\n}\n\n/**\n * @description: 计算列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {BaseTableAPI} table\n * @param {boolean} forceCompute\n * @return {*}\n */\nexport function computeColWidth(\n col: number,\n startRow: number,\n endRow: number,\n table: BaseTableAPI,\n forceCompute: boolean = false //forceCompute如果设置为true 即便不是自动列宽的列也会按内容计算列宽\n): number {\n let width = getColWidthDefinedWidthResizedWidth(col, table);\n if (\n table.internalProps.transpose &&\n width === 'auto' &&\n ((table.columnWidthComputeMode === 'only-header' && col >= table.rowHeaderLevelCount) ||\n (table.columnWidthComputeMode === 'only-body' && col < table.rowHeaderLevelCount))\n ) {\n width = table.getDefaultColumnWidth(col);\n }\n\n if (forceCompute && !table.internalProps.transpose) {\n return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);\n } else if (typeof width === 'number') {\n return width;\n } else if (width !== 'auto' && typeof width === 'string') {\n // return calc.toPx(width, table.internalProps.calcWidthContext);\n return table._adjustColWidth(col, table._colWidthDefineToPxWidth(width));\n }\n return computeAutoColWidth(width, col, startRow, endRow, forceCompute, table);\n}\n\n/**\n * @description: 计算width: auto情况下的列宽\n * @param {number} col\n * @param {number} startRow\n * @param {number} endRow\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeAutoColWidth(\n widthDeifne: string | number,\n col: number,\n startRow: number,\n endRow: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number {\n // 处理 auto width\n let maxWidth = 0;\n let deltaRow = 1;\n let prepareDeltaRow = 1; // 当计算完表头单元格的宽度后再采用采用逻辑,prepareDeltaRow这个值为期body部分做准备\n if (endRow - startRow > 5000) {\n // 超过5000行启动列宽自动计算采样\n prepareDeltaRow = Math.ceil((endRow - startRow) / 5000);\n }\n // 如果是透视图\n if (table.isPivotChart() && col >= table.rowHeaderLevelCount && col < table.colCount - table.rightFrozenColCount) {\n if (!(table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol) {\n //并且指标是以行展示 计算列宽需要根据x轴的值域范围\n const optimunWidth = (table.internalProps.layoutMap as PivotHeaderLayoutMap).getOptimunWidthForChart(col);\n if (optimunWidth > 0) {\n return optimunWidth;\n }\n } else {\n //直接拿表头的默认列宽\n return table.defaultColWidth;\n }\n }\n\n for (let row = startRow; row <= endRow; row += deltaRow) {\n // 判断透视图轴组件\n if (table.isPivotChart()) {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const axisConfig = getAxisConfigInPivotChart(col, row, layout);\n if (axisConfig) {\n const axisWidth = computeAxisComponentWidth(axisConfig, table);\n if (typeof axisWidth === 'number') {\n maxWidth = Math.max(axisWidth, maxWidth);\n continue;\n }\n } else if (\n layout.isLeftBottomCorner(col, row) ||\n layout.isRightTopCorner(col, row) ||\n layout.isRightBottomCorner(col, row)\n ) {\n // 透视图三角为无效单元格,不参与宽度计算\n continue;\n }\n }\n\n // 判断CustomRender\n const customWidth = computeCustomRenderWidth(col, row, table);\n if (customWidth) {\n maxWidth = Math.max(customWidth.width, maxWidth);\n if (!customWidth.renderDefault) {\n continue;\n }\n }\n\n // 判断透视表如果在指标\n // const indicatorWidth = computeIndicatorWidth(col, row, forceCompute, table);\n // const indicatorWidth = table.internalProps.layoutMap.getColumnWidthDefined(col);\n const indicatorWidth = widthDeifne;\n if (typeof indicatorWidth === 'number' && table.widthMode === 'standard' && !forceCompute) {\n maxWidth = Math.max(indicatorWidth, maxWidth);\n continue;\n }\n\n const cellType = table.isHeader(col, row)\n ? (table._getHeaderLayoutMap(col, row) as HeaderData)?.headerType\n : table.getBodyColumnType(col, row);\n if (\n isValid(cellType) &&\n cellType !== 'text' &&\n cellType !== 'link' &&\n cellType !== 'progressbar' &&\n cellType !== 'checkbox' &&\n cellType !== 'radio'\n ) {\n // text&link&progressbar测量文字宽度\n // image&video&sparkline使用默认宽度\n maxWidth = Math.max(maxWidth, table.getColWidthDefinedNumber(col) || 0);\n continue;\n }\n\n // 处理树形展开\n let cellHierarchyIndent = 0;\n const layoutMap = table.internalProps.layoutMap;\n //判断是否为表头\n if (layoutMap.isHeader(col, row)) {\n const hd = layoutMap.getHeader(col, row);\n // 如果某级表头设置了only-body,在计算表头内容宽度时跳过改级表头\n if ((hd as HeaderData)?.define?.columnWidthComputeMode === 'only-body') {\n continue;\n }\n if (isValid((hd as HeaderData)?.hierarchyLevel)) {\n cellHierarchyIndent =\n ((hd as HeaderData).hierarchyLevel ?? 0) * ((layoutMap as PivotHeaderLayoutMap).rowHierarchyIndent ?? 0);\n if (\n (layoutMap as PivotHeaderLayoutMap).rowHierarchyTextStartAlignment &&\n !table.internalProps.headerHelper.getHierarchyIcon(col, row)\n ) {\n cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth();\n }\n }\n } else {\n deltaRow = prepareDeltaRow;\n // 基本表格表身body单元格 如果是树形展开 需要考虑缩进值\n // const cellHierarchyState = table.getHierarchyState(col, row);\n // if (cellHierarchyState === HierarchyState.expand || cellHierarchyState === HierarchyState.collapse) {\n const define = table.getBodyColumnDefine(col, row);\n if ((define as ColumnDefine)?.tree) {\n const indexArr = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row));\n cellHierarchyIndent =\n Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none\n ? (indexArr.length - 1) * ((layoutMap as SimpleHeaderLayoutMap).hierarchyIndent ?? 0)\n : 0;\n if (\n (layoutMap as SimpleHeaderLayoutMap).hierarchyTextStartAlignment &&\n !table.internalProps.bodyHelper.getHierarchyIcon(col, row)\n ) {\n cellHierarchyIndent += table.internalProps.headerHelper.getHierarchyIconWidth();\n }\n }\n }\n\n // 测量文字宽度\n const textWidth = computeTextWidth(col, row, cellType, table);\n maxWidth = Math.max(textWidth + cellHierarchyIndent, maxWidth);\n //在前面设置了采用规则的情况下,为了确保底部冻结的每一行都测到\n if (\n deltaRow > 1 &&\n table.bottomFrozenRowCount > 0 &&\n row < table.rowCount - table.bottomFrozenRowCount &&\n row + deltaRow >= table.rowCount - table.bottomFrozenRowCount\n ) {\n row = table.rowCount - table.bottomFrozenRowCount - deltaRow;\n deltaRow = 1;\n prepareDeltaRow = 1;\n }\n }\n\n // 处理宽度限制\n const colMinWidth = table.getMinColWidth(col);\n const colMaxWidth = table.getMaxColWidth(col);\n if (maxWidth < colMinWidth) {\n return colMinWidth;\n } else if (maxWidth > colMaxWidth) {\n return colMaxWidth;\n } else if (maxWidth <= 0) {\n // In the case of partially hiding the header, the width calculation may be 0.\n // In this case, the default value is used to prevent it from being unable to be displayed\n maxWidth = table.defaultColWidth;\n }\n return maxWidth;\n}\n\n/**\n * @description: 计算customRender相关列宽\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeCustomRenderWidth(col: number, row: number, table: BaseTableAPI) {\n const customRender = table.getCustomRender(col, row);\n const customLayout = table.getCustomLayout(col, row);\n if (customRender || customLayout) {\n let spanCol = 1;\n let width = 0;\n let renderDefault = false;\n let enableCellPadding = false;\n if (\n table.isHeader(col, row) ||\n (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell ||\n table.hasCustomMerge()\n ) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: getCellRect(col, row, table),\n table\n };\n if (isFunction(customLayout)) {\n // 处理customLayout\n const customLayoutObj = customLayout(arg);\n if (customLayoutObj.rootContainer instanceof VGroup) {\n customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n dealPercentCalc(customLayoutObj.rootContainer, 0, table.getRowHeight(row));\n const setedWidth = (customLayoutObj.rootContainer as VGroup).attribute.width;\n customLayoutObj.rootContainer.setStage(table.scenegraph.stage);\n width = setedWidth > 0 ? setedWidth : (customLayoutObj.rootContainer as VGroup).AABBBounds.width() ?? 0;\n renderDefault = customLayoutObj.renderDefault;\n enableCellPadding = customLayoutObj.enableCellPadding;\n } else {\n width = 0;\n renderDefault = customLayoutObj.renderDefault;\n enableCellPadding = customLayoutObj.enableCellPadding;\n }\n } else if (typeof customRender === 'function') {\n // 处理customRender\n const customRenderObj = customRender(arg);\n width = customRenderObj?.expectedWidth ?? 0;\n renderDefault = customRenderObj?.renderDefault;\n } else {\n width = customRender?.expectedWidth ?? 0;\n renderDefault = customRender?.renderDefault;\n }\n width = Math.ceil(width);\n if (enableCellPadding) {\n const actStyle = table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n width += padding[1] + padding[3];\n }\n return {\n width: width / spanCol,\n renderDefault\n };\n }\n return undefined;\n}\n\n/**\n * @description: 计算指标相关列宽\n * @param {number} col\n * @param {number} row\n * @param {boolean} forceCompute\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeIndicatorWidth(\n col: number,\n row: number,\n forceCompute: boolean,\n table: BaseTableAPI\n): number | undefined {\n const { layoutMap } = table.internalProps;\n if (table.isPivotTable() && (layoutMap as PivotHeaderLayoutMap).isColumnIndicatorHeader(col, row)) {\n // 透视表如果在指标中配置了宽度,使用该宽度作为指标单元格及下面内容单元格的列宽\n const body = layoutMap.getBody(col, row);\n if (body && body.width && body.width !== 'auto' && !forceCompute) {\n const width = Math.round(calc.toPx(body.width, table.internalProps.calcWidthContext));\n return width;\n }\n }\n return undefined;\n}\n\n/**\n * @description: 计算文字宽度\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeTextWidth(col: number, row: number, cellType: ColumnTypeOption, table: BaseTableAPI): number {\n let maxWidth = 0;\n const cellValue = table.getCellValue(col, row);\n // const dataValue = table.getCellOriginValue(col, row);\n const actStyle = table._getCellStyle(col, row);\n let iconWidth = 0;\n\n // const define = table.getBodyColumnDefine(col, row);\n // const mayHaveIcon = table.getCellLocation(col, row) !== 'body' ? true : !!define?.icon || !!define?.tree;\n\n let mayHaveIcon = false;\n if (table.getCellLocation(col, row) !== 'body') {\n mayHaveIcon = true;\n } else {\n const define = table.getBodyColumnDefine(col, row);\n mayHaveIcon = !!define?.icon || !!(define as ColumnDefine)?.tree || (define as IRowSeriesNumber)?.dragOrder;\n }\n if (mayHaveIcon) {\n const icons = table.getCellIcons(col, row);\n icons?.forEach(icon => {\n if (icon.positionType !== IconPosition.absoluteRight) {\n iconWidth += (icon.width ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0);\n }\n });\n }\n\n let spanCol = 1;\n if (\n table.isHeader(col, row) ||\n (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell ||\n table.hasCustomMerge()\n ) {\n const cellRange = table.getCellRange(col, row);\n spanCol = cellRange.end.col - cellRange.start.col + 1;\n }\n\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n const paddingWidth = padding[1] + padding[3]; // + cellHierarchyIndent\n\n const fontSize = getProp('fontSize', actStyle, col, row, table);\n const fontFamily = getProp('fontFamily', actStyle, col, row, table);\n const fontWeight = getProp('fontWeight', actStyle, col, row, table);\n let text: string;\n if (cellType === 'checkbox') {\n text = isObject(cellValue) ? (cellValue as any).text : cellValue;\n } else if (cellType === 'radio') {\n if (isArray(cellValue)) {\n text = '';\n const define = table.getBodyColumnDefine(col, row);\n const radioDirectionInCell = (define as RadioColumnDefine)?.radioDirectionInCell ?? 'vertical';\n if (radioDirectionInCell === 'vertical') {\n cellValue.forEach(line => {\n text += (isObject(line) ? (line as any).text : line).toString() + '\\n';\n });\n } else if (radioDirectionInCell === 'horizontal') {\n cellValue.forEach(line => {\n text += (isObject(line) ? (line as any).text : line).toString();\n });\n }\n } else {\n text = isObject(cellValue) ? (cellValue as any).text : cellValue;\n }\n } else {\n text = cellValue;\n }\n const lines = breakString(text, table).text;\n if (lines.length >= 1) {\n // eslint-disable-next-line no-loop-func\n lines.forEach((line: string) => {\n const width = table.measureText(line, {\n fontSize,\n fontFamily,\n fontWeight\n }).width;\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (width + paddingWidth + 4 + iconWidth) / spanCol, // 这里+4为列宽测量结果的buffer\n maxWidth\n );\n });\n } else {\n maxWidth = Math.max(\n // 最大字符上限控制测量的字符\n (paddingWidth + 4 + iconWidth) / spanCol,\n maxWidth\n );\n }\n // 判断是否需要限制最大宽度 之前写死的450 需要使用配置来判断\n if (table.internalProps.limitMaxAutoWidth !== false) {\n maxWidth = Math.min(\n typeof table.internalProps.limitMaxAutoWidth === 'number' ? table.internalProps.limitMaxAutoWidth : 450,\n maxWidth\n );\n }\n\n if (cellType === 'checkbox') {\n const size = getProp('size', actStyle, col, row, table);\n maxWidth += size;\n\n if (text) {\n const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);\n maxWidth += spaceBetweenTextAndIcon;\n }\n } else if (cellType === 'radio') {\n const size = getProp('size', actStyle, col, row, table);\n const outerRadius = getProp('outerRadius', actStyle, col, row, table);\n const circleSize = isNumber(outerRadius) ? outerRadius * 2 : size;\n const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);\n\n if (isArray(cellValue)) {\n const define = table.getBodyColumnDefine(col, row);\n const spaceBetweenRadio = getProp('spaceBetweenRadio', actStyle, col, row, table);\n const radioDirectionInCell = (define as RadioColumnDefine)?.radioDirectionInCell ?? 'vertical';\n if (radioDirectionInCell === 'vertical') {\n // one icon\n maxWidth += circleSize;\n maxWidth += spaceBetweenTextAndIcon;\n } else if (radioDirectionInCell === 'horizontal') {\n // multi icon\n maxWidth += (circleSize + spaceBetweenTextAndIcon) * cellValue.length;\n maxWidth += spaceBetweenRadio * (cellValue.length - 1);\n }\n } else {\n // one icon\n maxWidth += circleSize;\n if (text) {\n maxWidth += spaceBetweenTextAndIcon;\n }\n }\n }\n\n return maxWidth;\n}\n\nfunction getCellRect(col: number, row: number, table: BaseTableAPI): any {\n return {\n left: 0,\n top: 0,\n right: table.getColWidth(col),\n bottom: table.getRowHeight(row),\n width: null, // vrender 逻辑中通过判断null对flex的元素来自动计算宽高\n height: null\n };\n}\n\nfunction getColWidthDefinedWidthResizedWidth(col: number, table: BaseTableAPI) {\n const widthDefined = table.getColWidthDefined(col);\n if (table.internalProps._widthResizedColMap.has(col)) {\n return table.getColWidth(col);\n }\n return widthDefined;\n}\n\nexport function getAdaptiveWidth(\n totalDrawWidth: number,\n startCol: number,\n endColPlus1: number,\n update: boolean,\n newWidths: number[],\n table: BaseTableAPI,\n fromScenegraph?: boolean\n) {\n let actualWidth = 0;\n const adaptiveColumns: number[] = [];\n const sparklineColumns = [];\n let totalSparklineAbleWidth = 0;\n for (let col = startCol; col < endColPlus1; col++) {\n const width = update ? newWidths[col] : table.getColWidth(col);\n const maxWidth = table.getMaxColWidth(col);\n const minWidth = table.getMinColWidth(col);\n if (width !== maxWidth && width !== minWidth) {\n actualWidth += width;\n adaptiveColumns.push(col);\n } else {\n // fixed width, do not adaptive\n totalDrawWidth -= width;\n }\n\n if (table.options.customConfig?.shrinkSparklineFirst) {\n const bodyCellType = table.getBodyColumnType(col, 0);\n if (bodyCellType === 'sparkline') {\n sparklineColumns.push({ col, width });\n totalSparklineAbleWidth += width - table.defaultColWidth;\n }\n }\n }\n\n const factor = totalDrawWidth / actualWidth;\n\n if (\n table.options.customConfig?.shrinkSparklineFirst &&\n factor < 1 &&\n actualWidth - totalDrawWidth < totalSparklineAbleWidth\n ) {\n // only shrink sparkline column\n for (let i = 0; i < sparklineColumns.length; i++) {\n const { col, width } = sparklineColumns[i];\n const deltaWidth = (actualWidth - totalDrawWidth) / sparklineColumns.length;\n const colWidth = Math.floor(width - deltaWidth);\n\n if (update) {\n newWidths[col] = table._adjustColWidth(col, colWidth);\n } else if (fromScenegraph) {\n table.scenegraph.setColWidth(col, table._adjustColWidth(col, colWidth));\n } else {\n table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n }\n }\n return;\n }\n\n for (let i = 0; i < adaptiveColumns.length; i++) {\n const col = adaptiveColumns[i];\n let colWidth;\n if (i === adaptiveColumns.length - 1) {\n colWidth =\n totalDrawWidth -\n adaptiveColumns.reduce((acr, cur, index) => {\n if (cur !== col) {\n return acr + (update ? newWidths[cur] : table.getColWidth(cur));\n }\n return acr;\n }, 0);\n } else {\n colWidth = Math.round((update ? newWidths[col] : table.getColWidth(col)) * factor);\n }\n if (update) {\n newWidths[col] = table._adjustColWidth(col, colWidth);\n } else if (fromScenegraph) {\n table.scenegraph.setColWidth(col, table._adjustColWidth(col, colWidth));\n } else {\n table._setColWidth(col, table._adjustColWidth(col, colWidth), false, true);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IACd,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,8BAAe,GAAE,CAAC;IAClB,IAAA,gCAAiB,GAAE,CAAC;IACpB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,+BAAgB,GAAE,CAAC;AACrB,CAAC;AA/BD,gDA+BC;AAED,uDAAmD;AAA1C,yGAAA,SAAS,OAAA;AAClB,uDAAqD;AAA5C,2GAAA,WAAW,OAAA;AACpB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AAErB,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C","file":"vrender.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.4.2-alpha.4\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n registerArc3d();\n registerArea();\n registerCircle();\n registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n registerPath();\n registerPolygon();\n registerPyramid3d();\n registerRect();\n registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerWrapText();\n}\n\nexport { Direction } from '@visactor/vrender-core';\nexport { GroupFadeIn } from '@visactor/vrender-core';\nexport { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\n"]}
1
+ {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IACd,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,8BAAe,GAAE,CAAC;IAClB,IAAA,gCAAiB,GAAE,CAAC;IACpB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,+BAAgB,GAAE,CAAC;AACrB,CAAC;AA/BD,gDA+BC;AAED,uDAAmD;AAA1C,yGAAA,SAAS,OAAA;AAClB,uDAAqD;AAA5C,2GAAA,WAAW,OAAA;AACpB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AAErB,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C","file":"vrender.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.4.2\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n registerArc3d();\n registerArea();\n registerCircle();\n registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n registerPath();\n registerPolygon();\n registerPyramid3d();\n registerRect();\n registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerWrapText();\n}\n\nexport { Direction } from '@visactor/vrender-core';\nexport { GroupFadeIn } from '@visactor/vrender-core';\nexport { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\n"]}
package/dist/vtable.js CHANGED
@@ -59280,8 +59280,6 @@
59280
59280
  const isPart = Array.isArray(part);
59281
59281
  const isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;
59282
59282
  context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);
59283
- const oldLineCap = context.lineCap;
59284
- context.lineCap = 'square';
59285
59283
  const { lineDash = groupAttribute.lineDash } = group.attribute;
59286
59284
  let isDash = false;
59287
59285
  if (lineDash.length && lineDash.some((dash) => Array.isArray(dash))) {
@@ -59294,8 +59292,8 @@
59294
59292
  const strokeBottom = (isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2]);
59295
59293
  const strokeLeft = (isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3]);
59296
59294
  if (strokeTop) {
59297
- const deltaLeft = strokeLeft ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;
59298
- const deltaRight = strokeRight ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;
59295
+ const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;
59296
+ const deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;
59299
59297
  if (isPart && Array.isArray(part[0])) {
59300
59298
  context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[0][0], y);
59301
59299
  context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[0][1] - part[0][0]), y);
@@ -59328,8 +59326,8 @@
59328
59326
  context.moveTo(x + width, y);
59329
59327
  }
59330
59328
  if (strokeRight) {
59331
- const deltaTop = strokeTop ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;
59332
- const deltaBottom = strokeBottom ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;
59329
+ const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;
59330
+ const deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;
59333
59331
  if (isPart && Array.isArray(part[1])) {
59334
59332
  context.moveTo(x + width, y - deltaTop + height * part[1][0]);
59335
59333
  context.lineTo(x + width, y - deltaTop + (height + deltaTop + deltaBottom) * (part[1][1] - part[1][0]));
@@ -59362,8 +59360,8 @@
59362
59360
  context.moveTo(x + width, y + height);
59363
59361
  }
59364
59362
  if (strokeBottom) {
59365
- const deltaLeft = strokeLeft ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;
59366
- const deltaRight = strokeRight ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;
59363
+ const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;
59364
+ const deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;
59367
59365
  if (isPart && Array.isArray(part[2])) {
59368
59366
  context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[2][0], y + height);
59369
59367
  context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[2][1] - part[2][0]), y + height);
@@ -59396,8 +59394,8 @@
59396
59394
  context.moveTo(x, y + height);
59397
59395
  }
59398
59396
  if (strokeLeft) {
59399
- const deltaTop = strokeTop ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;
59400
- const deltaBottom = strokeBottom ? 0 : (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;
59397
+ const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;
59398
+ const deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;
59401
59399
  if (isPart && Array.isArray(part[3])) {
59402
59400
  context.moveTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * part[3][0]);
59403
59401
  context.lineTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * (part[3][1] - part[3][0]));
@@ -59436,7 +59434,6 @@
59436
59434
  context.stroke();
59437
59435
  }
59438
59436
  context.lineDashOffset = 0;
59439
- context.lineCap = oldLineCap;
59440
59437
  context.setLineDash([]);
59441
59438
  }
59442
59439
  let DashGroupBeforeRenderContribution = class DashGroupBeforeRenderContribution {
@@ -60513,7 +60510,7 @@
60513
60510
  const factor = totalDrawWidth / actualWidth;
60514
60511
  if (table.options.customConfig?.shrinkSparklineFirst &&
60515
60512
  factor < 1 &&
60516
- totalDrawWidth - actualWidth < totalSparklineAbleWidth) {
60513
+ actualWidth - totalDrawWidth < totalSparklineAbleWidth) {
60517
60514
  for (let i = 0; i < sparklineColumns.length; i++) {
60518
60515
  const { col, width } = sparklineColumns[i];
60519
60516
  const deltaWidth = (actualWidth - totalDrawWidth) / sparklineColumns.length;
@@ -75022,7 +75019,7 @@
75022
75019
  return TABLE_EVENT_TYPE;
75023
75020
  }
75024
75021
  options;
75025
- version = "1.4.2-alpha.4";
75022
+ version = "1.4.2";
75026
75023
  pagination;
75027
75024
  id = `VTable${Date.now()}`;
75028
75025
  headerStyleCache;
@@ -77710,14 +77707,6 @@
77710
77707
  get headerDomContainer() {
77711
77708
  return this.internalProps.headerDomContainer;
77712
77709
  }
77713
- showMoverLine(col, row) {
77714
- this.scenegraph.component.showMoveCol(col, row, 0);
77715
- this.scenegraph.renderSceneGraph();
77716
- }
77717
- hideMoverLine(col, row) {
77718
- this.scenegraph.component.hideMoveCol();
77719
- this.scenegraph.renderSceneGraph();
77720
- }
77721
77710
  }
77722
77711
 
77723
77712
  var core = /*#__PURE__*/Object.freeze({
@@ -88699,7 +88688,7 @@
88699
88688
  }
88700
88689
 
88701
88690
  registerForVrender();
88702
- const version = "1.4.2-alpha.4";
88691
+ const version = "1.4.2";
88703
88692
  function getIcons() {
88704
88693
  return get$2();
88705
88694
  }