@visactor/vtable 1.5.4 → 1.5.5-alpha.0
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/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +5 -6
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +2 -2
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +9 -7
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +5 -6
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/ts-types/column/style.d.ts +2 -2
- package/es/ts-types/column/style.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/es/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { getDataCellPath } from './tools/get-data-path';
|
|
|
20
20
|
export * from './render/jsx';
|
|
21
21
|
export { getTargetCell } from './event/util';
|
|
22
22
|
import * as VRender from './vrender';
|
|
23
|
-
export declare const version = "1.5.
|
|
23
|
+
export declare const version = "1.5.5-alpha.0";
|
|
24
24
|
export { TYPES, core, ListTable, ListTableSimple, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText, VRender };
|
|
25
25
|
declare function getIcons(): {
|
|
26
26
|
[key: string]: TYPES.ColumnIconOption;
|
package/es/index.js
CHANGED
|
@@ -42,7 +42,7 @@ export { getTargetCell } from "./event/util";
|
|
|
42
42
|
|
|
43
43
|
import * as VRender from "./vrender";
|
|
44
44
|
|
|
45
|
-
export const version = "1.5.
|
|
45
|
+
export const version = "1.5.5-alpha.0";
|
|
46
46
|
|
|
47
47
|
export { TYPES, core, ListTable, ListTableSimple, PivotTable, PivotTableSimple, PivotChart, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText, VRender };
|
|
48
48
|
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAsB3D,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EA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AAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAIvC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAEf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAiBV,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAClB,OAAO,EACR,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\n\n// export * as VRender from './vrender';\nimport * as VRender from './vrender';\n\nexport const version = \"1.5.5-alpha.0\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n VRender\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n"]}
|
|
@@ -16,26 +16,25 @@ export function handleTextStick(table) {
|
|
|
16
16
|
if (!(colEnd < 0 || rowEnd < 0)) {
|
|
17
17
|
for (let row = 0; row < frozenRowCount && !(colEnd < colStart); row++) [ colStart, colEnd ].forEach((col => {
|
|
18
18
|
const style = table._getCellStyle(col, row);
|
|
19
|
-
if (null == style ? void 0 : style.textStick) {
|
|
19
|
+
if ((null == style ? void 0 : style.textStick) && "vertical" !== (null == style ? void 0 : style.textStick)) {
|
|
20
20
|
adjustCellContentHorizontalLayout(table.scenegraph.getCell(col, row), frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
|
|
21
21
|
}
|
|
22
22
|
}));
|
|
23
23
|
for (let col = 0; col < frozenColCount && !(rowEnd < rowStart); col++) [ rowStart, rowEnd ].forEach((row => {
|
|
24
24
|
const style = table._getCellStyle(col, row);
|
|
25
|
-
if ((null == style ? void 0 : style.textStick) && "tree" !== table.internalProps.layoutMap.rowHierarchyType) {
|
|
25
|
+
if ((null == style ? void 0 : style.textStick) && "tree" !== table.internalProps.layoutMap.rowHierarchyType && "horizontal" !== (null == style ? void 0 : style.textStick)) {
|
|
26
26
|
adjustCellContentVerticalLayout(table.scenegraph.getCell(col, row), frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
|
|
27
27
|
}
|
|
28
28
|
}));
|
|
29
29
|
for (let col = colStart; col <= colEnd && !(rowEnd < rowStart); col++) [ rowStart, rowEnd ].forEach((row => {
|
|
30
30
|
const style = table._getCellStyle(col, row);
|
|
31
|
-
if (null == style ? void 0 : style.textStick) {
|
|
31
|
+
if ((null == style ? void 0 : style.textStick) && "horizontal" !== (null == style ? void 0 : style.textStick)) {
|
|
32
32
|
adjustCellContentVerticalLayout(table.scenegraph.getCell(col, row), frozenRowsHeight + table.tableY, table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
|
|
33
33
|
}
|
|
34
34
|
}));
|
|
35
|
-
for (let row = rowStart; row
|
|
36
|
-
var _a;
|
|
35
|
+
for (let row = rowStart; row <= rowEnd && !(colEnd < colStart); row++) [ colStart, colEnd ].forEach((col => {
|
|
37
36
|
const style = table._getCellStyle(col, row);
|
|
38
|
-
if (null
|
|
37
|
+
if ((null == style ? void 0 : style.textStick) && "vertical" !== (null == style ? void 0 : style.textStick)) {
|
|
39
38
|
adjustCellContentHorizontalLayout(table.scenegraph.getCell(col, row), frozenColsWidth + table.tableX, table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX, changedCells, null == style ? void 0 : style.textStickBaseOnAlign, table);
|
|
40
39
|
}
|
|
41
40
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/stick-text/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,UAAU,eAAe,CAAC,KAAmB;IAEjD,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IACnD,YAAY,CAAC,OAAO,CAAC,CAAC,OAAkB,EAAE,EAAE;QAC1C,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACrE,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AC,SAAS,CAAC;IAC/G,IAAI,UAAU,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"index.js","sourcesContent":["import type { IGraphic, Image, Text } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { Group } from '../graphic/group';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport type { ITextStyleOption, StickCell } from '../../ts-types';\nimport { isNumber, min } from '@visactor/vutils';\nimport { getCellMergeRange } from '../../tools/merge-range';\n\nexport function handleTextStick(table: BaseTableAPI) {\n // reset\n const { changedCells } = table.internalProps.stick; // changedCells only cache one time\n changedCells.forEach((cellPos: StickCell) => {\n const cellGroup = table.scenegraph.getCell(cellPos.col, cellPos.row);\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: cellPos.dx,\n dy: cellPos.dy\n });\n });\n });\n changedCells.clear();\n\n const { scrollTop, scrollLeft, frozenRowCount, frozenColCount } = table;\n const frozenRowsHeight = table.getFrozenRowsHeight();\n const frozenColsWidth = table.getFrozenColsWidth();\n // 计算非冻结\n const { row: rowTop } = table.getRowAt(scrollTop + frozenRowsHeight + 1);\n const { col: colLeft } = table.getColAt(scrollLeft + frozenColsWidth + 1);\n const rowStart = Math.max(rowTop, table.frozenRowCount);\n const colStart = Math.max(colLeft, table.frozenColCount);\n const rowEnd =\n table.getAllRowsHeight() > table.tableNoFrameHeight\n ? table.getRowAt(scrollTop + table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() - 1).row\n : table.rowCount - table.bottomFrozenRowCount - 1;\n const colEnd =\n table.getAllColsWidth() > table.tableNoFrameWidth\n ? table.getColAt(scrollLeft + table.tableNoFrameWidth - table.getRightFrozenColsWidth() - 1).col\n : table.colCount - table.rightFrozenColCount - 1;\n if (colEnd < 0 || rowEnd < 0) {\n return;\n }\n\n // column header\n for (let row = 0; row < frozenRowCount; row++) {\n if (colEnd < colStart) {\n break;\n }\n [colStart, colEnd].forEach((col: number) => {\n const style = table._getCellStyle(col, row);\n if (style?.textStick) {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell Horizontal\n adjustCellContentHorizontalLayout(\n cellGroup,\n frozenColsWidth + table.tableX,\n table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n\n // row header\n for (let col = 0; col < frozenColCount; col++) {\n if (rowEnd < rowStart) {\n break;\n }\n [rowStart, rowEnd].forEach((row: number) => {\n const style = table._getCellStyle(col, row);\n if (style?.textStick && (table.internalProps.layoutMap as PivotHeaderLayoutMap).rowHierarchyType !== 'tree') {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell vertical\n adjustCellContentVerticalLayout(\n cellGroup,\n frozenRowsHeight + table.tableY,\n table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n\n // body\n for (let col = colStart; col <= colEnd; col++) {\n if (rowEnd < rowStart) {\n break;\n }\n [rowStart, rowEnd].forEach((row: number) => {\n const style = table._getCellStyle(col, row);\n if (style?.textStick) {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell vertical\n adjustCellContentVerticalLayout(\n cellGroup,\n frozenRowsHeight + table.tableY,\n table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n for (let row = rowStart; row < rowEnd; row++) {\n if (colEnd < colStart) {\n break;\n }\n [colStart, colEnd].forEach((col: number) => {\n const style = table._getCellStyle(col, row);\n if (table._getCellStyle(col, row)?.textStick) {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell Horizontal\n adjustCellContentHorizontalLayout(\n cellGroup,\n frozenColsWidth + table.tableX,\n table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n}\n\n/*\n * adjust cell content vertical layout\n * @param {Group} cellGroup\n * @param {number} scrollTop\n */\nfunction adjustCellContentVerticalLayout(\n cellGroup: Group,\n minTop: number,\n maxTop: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined,\n table: BaseTableAPI\n) {\n if (\n isNumber(cellGroup.mergeStartCol) &&\n isNumber(cellGroup.mergeStartRow) &&\n isNumber(cellGroup.mergeEndCol) &&\n isNumber(cellGroup.mergeEndRow)\n ) {\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n dealVertical(singleCellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);\n }\n }\n } else {\n dealVertical(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);\n }\n}\n\nfunction dealVertical(\n cellGroup: Group,\n minTop: number,\n maxTop: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined\n) {\n // get text element\n const graphic =\n (cellGroup.getChildByName('text', true) as Text) || (cellGroup.getChildByName('image', true) as Image);\n if (!graphic) {\n return;\n }\n if (graphic.type === 'image') {\n const { image: url } = graphic.attribute;\n if (!url || !graphic.resources) {\n return;\n }\n const res = graphic.resources.get(url as any);\n if (res.state !== 'success') {\n return;\n }\n }\n\n // const textBaseline = (graphic as any).attribute.textBaseline ?? (graphic as any).textBaseline ?? 'top';\n const textBaseline = (graphic as any).textBaseline ?? 'top';\n\n graphic.AABBBounds.width();\n const textTop = graphic.globalAABBBounds.y1;\n const textBottom = graphic.globalAABBBounds.y2;\n\n if (textBaseline === 'middle' && textStickBaseOnAlign) {\n const cellTop = cellGroup.globalAABBBounds.y1 + ((cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0);\n const cellBottom = cellTop + (cellGroup.contentHeight ?? cellGroup.attribute.height ?? 0);\n if (cellTop < minTop || cellBottom > maxTop) {\n const visibleCellTop = Math.max(cellTop, minTop);\n const visibleCellBottom = Math.min(cellBottom, maxTop);\n const delta =\n graphic.globalTransMatrix.f - (visibleCellBottom + visibleCellTop) / 2 + graphic.AABBBounds.height() / 2;\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dy', (child.attribute.dy ?? 0) - delta + 2); // 2 is the buffer\n });\n }\n } else if (textTop < minTop) {\n const deltaHeight = textTop - minTop;\n // text is out of view, move all elements down\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dy', (child.attribute.dy ?? 0) - deltaHeight + 2); // 2 is the buffer\n });\n } else if (textBottom > maxTop) {\n const deltaHeight = textBottom - maxTop;\n // text is out of view, move all elements down\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dy', (child.attribute.dy ?? 0) - deltaHeight); // 2 is the buffer\n });\n }\n}\n\n/*\n * adjust cell content horizontal layout\n * @param {Group} cellGroup\n * @param {number} scrollLeft\n */\nfunction adjustCellContentHorizontalLayout(\n cellGroup: Group,\n minLeft: number,\n maxLeft: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined,\n table: BaseTableAPI\n) {\n if (\n isNumber(cellGroup.mergeStartCol) &&\n isNumber(cellGroup.mergeStartRow) &&\n isNumber(cellGroup.mergeEndCol) &&\n isNumber(cellGroup.mergeEndRow)\n ) {\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n dealHorizontal(singleCellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);\n }\n }\n } else {\n dealHorizontal(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);\n }\n}\n\nfunction dealHorizontal(\n cellGroup: Group,\n minLeft: number,\n maxLeft: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined\n) {\n // get text element\n // const text = cellGroup.getChildByName('text', true) as Text;\n // if (!text) {\n // return;\n // }\n\n // get text element\n const graphic =\n (cellGroup.getChildByName('text', true) as Text) || (cellGroup.getChildByName('image', true) as Image);\n if (!graphic) {\n return;\n }\n if (graphic.type === 'image') {\n const { image: url } = graphic.attribute;\n if (!url || !graphic.resources) {\n return;\n }\n const res = graphic.resources.get(url as any);\n if (res.state !== 'success') {\n return;\n }\n }\n const textAlign = (graphic as any).attribute.textAlign ?? (graphic as any).textAlign ?? 'left';\n graphic.AABBBounds.width();\n const textLeft = graphic.globalAABBBounds.x1;\n const textRight = graphic.globalAABBBounds.x2;\n if (textAlign === 'center' && textStickBaseOnAlign) {\n const cellLeft = cellGroup.globalAABBBounds.x1 + ((cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0);\n const cellRight = cellLeft + (cellGroup.contentWidth ?? cellGroup.attribute.width ?? 0);\n if (cellLeft < minLeft || cellRight > maxLeft) {\n const visibleCellLeft = Math.max(cellLeft, minLeft);\n const visibleCellRight = Math.min(cellRight, maxLeft);\n const delta = graphic.globalTransMatrix.e - (visibleCellRight + visibleCellLeft) / 2;\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dx', (child.attribute.dx ?? 0) - delta + 2); // 2 is the buffer\n });\n }\n } else if (textLeft < minLeft) {\n const deltaWidth = textLeft - minLeft;\n // text is out of view, move all elements right\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dx', (child.attribute.dx ?? 0) - deltaWidth + 2); // 2 is the buffer\n });\n } else if (textRight > maxLeft) {\n const deltaWidth = textRight - maxLeft;\n // text is out of view, move all elements down\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dx', (child.attribute.dx ?? 0) - deltaWidth); // 2 is the buffer\n });\n }\n}\n\nexport function checkHaveTextStick(table: BaseTableAPI) {\n const headerObjects = table.internalProps.layoutMap.headerObjects;\n const columnObjects = table.internalProps.layoutMap.columnObjects;\n for (let i = 0; i < headerObjects.length; i++) {\n const header = headerObjects[i];\n if (header && (header.style as ITextStyleOption)?.textStick) {\n return true;\n }\n }\n for (let i = 0; i < columnObjects.length; i++) {\n const column = columnObjects[i];\n if (column && (column.style as ITextStyleOption)?.textStick) {\n return true;\n }\n }\n const themeStick =\n table.theme.headerStyle.textStick || table.theme.rowHeaderStyle.textStick || table.theme.bodyStyle.textStick;\n if (themeStick) {\n return true;\n }\n return false;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/stick-text/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,UAAU,eAAe,CAAC,KAAmB;IAEjD,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IACnD,YAAY,CAAC,OAAO,CAAC,CAAC,OAAkB,EAAE,EAAE;QAC1C,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACrE,SAAS,CAAC,eAAe,CAAC,CAAC,KAAe,EAAE,EAAE;YAC5C,KAAK,CAAC,aAAa,CAAC;gBAClB,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,EAAE,EAAE,OAAO,CAAC,EAAE;aACf,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,YAAY,CAAC,KAAK,EAAE,CAAC;IAErB,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IACxE,MAAM,gBAAgB,GAAG,KAAK,CAAC,mBAAmB,EAAE,CAAC;IACrD,MAAM,eAAe,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC;IAEnD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC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AAC,MAAA,KAAK,CAAC,SAAS,CAAC,EAAE,mCAAI,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;KACJ;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAmB;;IACpD,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC;IAClE,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC;IAClE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,MAAM,KAAI,MAAC,MAAM,CAAC,KAA0B,0CAAE,SAAS,CAAA,EAAE;YAC3D,OAAO,IAAI,CAAC;SACb;KACF;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,MAAM,KAAI,MAAC,MAAM,CAAC,KAA0B,0CAAE,SAAS,CAAA,EAAE;YAC3D,OAAO,IAAI,CAAC;SACb;KACF;IACD,MAAM,UAAU,GACd,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;IAC/G,IAAI,UAAU,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"index.js","sourcesContent":["import type { IGraphic, Image, Text } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { Group } from '../graphic/group';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport type { ITextStyleOption, StickCell } from '../../ts-types';\nimport { isNumber, min } from '@visactor/vutils';\nimport { getCellMergeRange } from '../../tools/merge-range';\n\nexport function handleTextStick(table: BaseTableAPI) {\n // reset\n const { changedCells } = table.internalProps.stick; // changedCells only cache one time\n changedCells.forEach((cellPos: StickCell) => {\n const cellGroup = table.scenegraph.getCell(cellPos.col, cellPos.row);\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: cellPos.dx,\n dy: cellPos.dy\n });\n });\n });\n changedCells.clear();\n\n const { scrollTop, scrollLeft, frozenRowCount, frozenColCount } = table;\n const frozenRowsHeight = table.getFrozenRowsHeight();\n const frozenColsWidth = table.getFrozenColsWidth();\n // 计算非冻结\n const { row: rowTop } = table.getRowAt(scrollTop + frozenRowsHeight + 1);\n const { col: colLeft } = table.getColAt(scrollLeft + frozenColsWidth + 1);\n const rowStart = Math.max(rowTop, table.frozenRowCount);\n const colStart = Math.max(colLeft, table.frozenColCount);\n const rowEnd =\n table.getAllRowsHeight() > table.tableNoFrameHeight\n ? table.getRowAt(scrollTop + table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() - 1).row\n : table.rowCount - table.bottomFrozenRowCount - 1;\n const colEnd =\n table.getAllColsWidth() > table.tableNoFrameWidth\n ? table.getColAt(scrollLeft + table.tableNoFrameWidth - table.getRightFrozenColsWidth() - 1).col\n : table.colCount - table.rightFrozenColCount - 1;\n if (colEnd < 0 || rowEnd < 0) {\n return;\n }\n\n // column header\n for (let row = 0; row < frozenRowCount; row++) {\n if (colEnd < colStart) {\n break;\n }\n [colStart, colEnd].forEach((col: number) => {\n const style = table._getCellStyle(col, row);\n if (style?.textStick && style?.textStick !== 'vertical') {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell Horizontal\n adjustCellContentHorizontalLayout(\n cellGroup,\n frozenColsWidth + table.tableX,\n table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n\n // row header\n for (let col = 0; col < frozenColCount; col++) {\n if (rowEnd < rowStart) {\n break;\n }\n [rowStart, rowEnd].forEach((row: number) => {\n const style = table._getCellStyle(col, row);\n if (\n style?.textStick &&\n (table.internalProps.layoutMap as PivotHeaderLayoutMap).rowHierarchyType !== 'tree' &&\n style?.textStick !== 'horizontal'\n ) {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell vertical\n adjustCellContentVerticalLayout(\n cellGroup,\n frozenRowsHeight + table.tableY,\n table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n\n // body\n for (let col = colStart; col <= colEnd; col++) {\n if (rowEnd < rowStart) {\n break;\n }\n [rowStart, rowEnd].forEach((row: number) => {\n const style = table._getCellStyle(col, row);\n if (style?.textStick && style?.textStick !== 'horizontal') {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell vertical\n adjustCellContentVerticalLayout(\n cellGroup,\n frozenRowsHeight + table.tableY,\n table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() + table.tableY,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n for (let row = rowStart; row <= rowEnd; row++) {\n if (colEnd < colStart) {\n break;\n }\n [colStart, colEnd].forEach((col: number) => {\n const style = table._getCellStyle(col, row);\n if (style?.textStick && style?.textStick !== 'vertical') {\n const cellGroup = table.scenegraph.getCell(col, row);\n // adjust cell Horizontal\n adjustCellContentHorizontalLayout(\n cellGroup,\n frozenColsWidth + table.tableX,\n table.tableNoFrameWidth - table.getRightFrozenColsWidth() + table.tableX,\n changedCells,\n style?.textStickBaseOnAlign,\n table\n );\n }\n });\n }\n}\n\n/*\n * adjust cell content vertical layout\n * @param {Group} cellGroup\n * @param {number} scrollTop\n */\nfunction adjustCellContentVerticalLayout(\n cellGroup: Group,\n minTop: number,\n maxTop: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined,\n table: BaseTableAPI\n) {\n if (\n isNumber(cellGroup.mergeStartCol) &&\n isNumber(cellGroup.mergeStartRow) &&\n isNumber(cellGroup.mergeEndCol) &&\n isNumber(cellGroup.mergeEndRow)\n ) {\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n dealVertical(singleCellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);\n }\n }\n } else {\n dealVertical(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign);\n }\n}\n\nfunction dealVertical(\n cellGroup: Group,\n minTop: number,\n maxTop: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined\n) {\n // get text element\n const graphic =\n (cellGroup.getChildByName('text', true) as Text) || (cellGroup.getChildByName('image', true) as Image);\n if (!graphic) {\n return;\n }\n if (graphic.type === 'image') {\n const { image: url } = graphic.attribute;\n if (!url || !graphic.resources) {\n return;\n }\n const res = graphic.resources.get(url as any);\n if (res.state !== 'success') {\n return;\n }\n }\n\n // const textBaseline = (graphic as any).attribute.textBaseline ?? (graphic as any).textBaseline ?? 'top';\n const textBaseline = (graphic as any).textBaseline ?? 'top';\n\n graphic.AABBBounds.width();\n const textTop = graphic.globalAABBBounds.y1;\n const textBottom = graphic.globalAABBBounds.y2;\n\n if (textBaseline === 'middle' && textStickBaseOnAlign) {\n const cellTop = cellGroup.globalAABBBounds.y1 + ((cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0);\n const cellBottom = cellTop + (cellGroup.contentHeight ?? cellGroup.attribute.height ?? 0);\n if (cellTop < minTop || cellBottom > maxTop) {\n const visibleCellTop = Math.max(cellTop, minTop);\n const visibleCellBottom = Math.min(cellBottom, maxTop);\n const delta =\n graphic.globalTransMatrix.f - (visibleCellBottom + visibleCellTop) / 2 + graphic.AABBBounds.height() / 2;\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dy', (child.attribute.dy ?? 0) - delta + 2); // 2 is the buffer\n });\n }\n } else if (textTop < minTop) {\n const deltaHeight = textTop - minTop;\n // text is out of view, move all elements down\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dy', (child.attribute.dy ?? 0) - deltaHeight + 2); // 2 is the buffer\n });\n } else if (textBottom > maxTop) {\n const deltaHeight = textBottom - maxTop;\n // text is out of view, move all elements down\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dy', (child.attribute.dy ?? 0) - deltaHeight); // 2 is the buffer\n });\n }\n}\n\n/*\n * adjust cell content horizontal layout\n * @param {Group} cellGroup\n * @param {number} scrollLeft\n */\nfunction adjustCellContentHorizontalLayout(\n cellGroup: Group,\n minLeft: number,\n maxLeft: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined,\n table: BaseTableAPI\n) {\n if (\n isNumber(cellGroup.mergeStartCol) &&\n isNumber(cellGroup.mergeStartRow) &&\n isNumber(cellGroup.mergeEndCol) &&\n isNumber(cellGroup.mergeEndRow)\n ) {\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n const singleCellGroup = table.scenegraph.getCell(col, row);\n dealHorizontal(singleCellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);\n }\n }\n } else {\n dealHorizontal(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign);\n }\n}\n\nfunction dealHorizontal(\n cellGroup: Group,\n minLeft: number,\n maxLeft: number,\n changedCells: Map<string, StickCell>,\n textStickBaseOnAlign: boolean | undefined\n) {\n // get text element\n // const text = cellGroup.getChildByName('text', true) as Text;\n // if (!text) {\n // return;\n // }\n\n // get text element\n const graphic =\n (cellGroup.getChildByName('text', true) as Text) || (cellGroup.getChildByName('image', true) as Image);\n if (!graphic) {\n return;\n }\n if (graphic.type === 'image') {\n const { image: url } = graphic.attribute;\n if (!url || !graphic.resources) {\n return;\n }\n const res = graphic.resources.get(url as any);\n if (res.state !== 'success') {\n return;\n }\n }\n const textAlign = (graphic as any).attribute.textAlign ?? (graphic as any).textAlign ?? 'left';\n graphic.AABBBounds.width();\n const textLeft = graphic.globalAABBBounds.x1;\n const textRight = graphic.globalAABBBounds.x2;\n if (textAlign === 'center' && textStickBaseOnAlign) {\n const cellLeft = cellGroup.globalAABBBounds.x1 + ((cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0);\n const cellRight = cellLeft + (cellGroup.contentWidth ?? cellGroup.attribute.width ?? 0);\n if (cellLeft < minLeft || cellRight > maxLeft) {\n const visibleCellLeft = Math.max(cellLeft, minLeft);\n const visibleCellRight = Math.min(cellRight, maxLeft);\n const delta = graphic.globalTransMatrix.e - (visibleCellRight + visibleCellLeft) / 2;\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dx', (child.attribute.dx ?? 0) - delta + 2); // 2 is the buffer\n });\n }\n } else if (textLeft < minLeft) {\n const deltaWidth = textLeft - minLeft;\n // text is out of view, move all elements right\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dx', (child.attribute.dx ?? 0) - deltaWidth + 2); // 2 is the buffer\n });\n } else if (textRight > maxLeft) {\n const deltaWidth = textRight - maxLeft;\n // text is out of view, move all elements down\n !changedCells.has(`${cellGroup.col}-${cellGroup.row}`) &&\n changedCells.set(`${cellGroup.col}-${cellGroup.row}`, {\n col: cellGroup.col,\n row: cellGroup.row,\n dx: (cellGroup.firstChild as IGraphic)?.attribute.dx ?? 0,\n dy: (cellGroup.firstChild as IGraphic)?.attribute.dy ?? 0\n });\n cellGroup.forEachChildren((child: IGraphic) => {\n child.setAttribute('dx', (child.attribute.dx ?? 0) - deltaWidth); // 2 is the buffer\n });\n }\n}\n\nexport function checkHaveTextStick(table: BaseTableAPI) {\n const headerObjects = table.internalProps.layoutMap.headerObjects;\n const columnObjects = table.internalProps.layoutMap.columnObjects;\n for (let i = 0; i < headerObjects.length; i++) {\n const header = headerObjects[i];\n if (header && (header.style as ITextStyleOption)?.textStick) {\n return true;\n }\n }\n for (let i = 0; i < columnObjects.length; i++) {\n const column = columnObjects[i];\n if (column && (column.style as ITextStyleOption)?.textStick) {\n return true;\n }\n }\n const themeStick =\n table.theme.headerStyle.textStick || table.theme.rowHeaderStyle.textStick || table.theme.bodyStyle.textStick;\n if (themeStick) {\n return true;\n }\n return false;\n}\n"]}
|
|
@@ -44,7 +44,7 @@ export interface IStyleOption {
|
|
|
44
44
|
borderLineDash?: LineDashsPropertyDefine;
|
|
45
45
|
linkColor?: ColorPropertyDefine;
|
|
46
46
|
cursor?: CursorPropertyDefine;
|
|
47
|
-
textStick?: boolean;
|
|
47
|
+
textStick?: boolean | 'vertical' | 'horizontal';
|
|
48
48
|
textStickBaseOnAlign?: boolean;
|
|
49
49
|
marked?: MarkedPropertyDefine;
|
|
50
50
|
}
|
|
@@ -57,7 +57,7 @@ export interface IImageStyleOption extends IStyleOption {
|
|
|
57
57
|
}
|
|
58
58
|
export type ColumnStyleOption = IStyleOption | ITextStyleOption | IImageStyleOption | ProgressBarStyleOption | CheckboxStyleOption | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);
|
|
59
59
|
export type HeaderStyleOption = (IStyleOption & {
|
|
60
|
-
textStick?: boolean;
|
|
60
|
+
textStick?: boolean | 'vertical' | 'horizontal';
|
|
61
61
|
}) | ITextStyleOption | IImageStyleOption | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);
|
|
62
62
|
export type FullExtendStyle = HeaderStyleOption & ColumnStyleOption & ThemeStyle;
|
|
63
63
|
export interface ProgressBarStyleOption extends IStyleOption {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ts-types/column/style.ts"],"names":[],"mappings":"","file":"style.js","sourcesContent":["import type { LineWidthsPropertyDefine } from '..';\nimport { PaddingPropertyDefine } from '..';\nimport type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n IconPropertyDefine,\n LineClamp,\n LineDashsPropertyDefine,\n TextOverflow,\n UnderlinePropertyDefine,\n LineDashPropertyDefine,\n LineThroughPropertyDefine,\n TagPropertyDefine,\n PaddingsPropertyDefine,\n StylePropertyFunctionArg,\n CursorPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../style-define';\nimport type { ThemeStyle } from '../theme';\n//这个style是在绘制里面的内容时用到的,用不到borderColor和borderLineWidth,所以和IStyleOption有些不一致\nexport interface ColumnStyle {\n padding?: PaddingsPropertyDefine;\n bgColor?: ColorPropertyDefine;\n // eslint-disable-next-line no-undef\n textAlign?: TextAlignType;\n // eslint-disable-next-line no-undef\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n // doChangeStyle: () => void;\n clone: () => ColumnStyle;\n linkColor?: ColorPropertyDefine;\n}\n\nexport type IHeaderStyle = ColumnStyle;\n\nexport type ISortheaderSyle = IHeaderStyle;\n\nexport interface IStyleOption {\n bgColor?: ColorPropertyDefine;\n padding?: PaddingsPropertyDefine;\n textAlign?: TextAlignType;\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n strokeColor?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n borderColor?: ColorsPropertyDefine;\n borderLineWidth?: LineWidthsPropertyDefine;\n\n lineHeight?: number;\n underline?: UnderlinePropertyDefine;\n /** TODO */\n underlineColor?: ColorPropertyDefine;\n underlineDash?: LineDashPropertyDefine;\n underlineOffset?: number;\n lineThrough?: LineThroughPropertyDefine;\n /** TODO */\n lineThroughColor?: ColorPropertyDefine;\n /** TODO */\n lineThroughDash?: LineDashPropertyDefine;\n\n borderLineDash?: LineDashsPropertyDefine;\n linkColor?: ColorPropertyDefine;\n\n // tag?: TagPropertyDefine;\n // tagFont?: FontPropertyDefine;\n // tagColor?: ColorPropertyDefine;\n // tagBgColor?: ColorPropertyDefine;\n // tagMargin?: number | string | (number | string)[];\n\n // dropDownIcon?: IconPropertyDefine;\n // dropDownHoverIcon?: IconPropertyDefine;\n cursor?: CursorPropertyDefine;\n\n textStick?: boolean;\n textStickBaseOnAlign?: boolean;\n\n marked?: MarkedPropertyDefine;\n}\n\nexport interface ITextStyleOption extends IStyleOption {\n // lineHeight?: string | number;//移入IStyleOption中 单行文本类型也可以有\n autoWrapText?: boolean;\n lineClamp?: LineClamp;\n}\n\nexport interface IImageStyleOption extends IStyleOption {\n // imageSizing?: 'keep-aspect-ratio';\n // imageAutoSizing?: boolean;\n margin?: number;\n}\n// export type ISortHeaderStyleOption = IStyleOption;\n\nexport type ColumnStyleOption =\n | IStyleOption\n | ITextStyleOption\n | IImageStyleOption\n | ProgressBarStyleOption\n | CheckboxStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n\nexport type HeaderStyleOption =\n | (IStyleOption & { textStick?: boolean }) //表头可以配置吸附\n | ITextStyleOption\n | IImageStyleOption\n // | ISortHeaderStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n// | ISortHeaderStyleOption\n\nexport type FullExtendStyle = HeaderStyleOption & ColumnStyleOption & ThemeStyle;\n\n// export interface BaseStyleOption {\n// bgColor?: ColorPropertyDefine;\n// }\n\n// export interface StdBaseStyleOption extends BaseStyleOption {\n// // eslint-disable-next-line no-undef\n// textAlign?: CanvasTextAlign;\n// // eslint-disable-next-line no-undef\n// textBaseline?: CanvasTextBaseline;\n// }\n// export interface StyleOption extends StdBaseStyleOption {\n// color?: ColorPropertyDefine;\n// font?: FontPropertyDefine;\n// padding?: PaddingsPropertyDefine;\n// textOverflow?: TextOverflow;\n// }\nexport interface ProgressBarStyleOption extends IStyleOption {\n // 是否显示进度条\n showBar?: boolean | ((args: StylePropertyFunctionArg) => boolean);\n // 进度条颜色\n barColor?: ColorPropertyDefine;\n // 进度条背景颜色\n barBgColor?: ColorPropertyDefine;\n // 进度条高度\n barHeight?: number | string;\n // 进度条距单元格底部距离\n barBottom?: number | string;\n // 进度条padding\n barPadding?: (number | string)[];\n // 进度条正向颜色\n barPositiveColor?: ColorPropertyDefine;\n // 进度条负向颜色\n barNegativeColor?: ColorPropertyDefine;\n // 进度条坐标轴轴颜色\n barAxisColor?: ColorPropertyDefine;\n // 进度条方向是否从右到左\n barRightToLeft?: boolean;\n\n // 是否显示进度条标记\n showBarMark?: boolean;\n // 进度条标记正向颜色\n barMarkPositiveColor?: ColorPropertyDefine;\n // 进度条标记负向颜色\n barMarkNegativeColor?: ColorPropertyDefine;\n // 进度条标记宽度\n barMarkWidth?: number;\n // 进度条标记位置\n barMarkPosition?: 'right' | 'bottom';\n}\n\nexport type CheckboxStyleOption = {\n size?: number;\n spaceBetweenTextAndIcon?: number;\n checkboxStyle?: CheckboxStyle;\n} & ITextStyleOption;\n\nexport type RadioStyleOption = {\n size?: number;\n spaceBetweenTextAndIcon?: number;\n spaceBetweenRadio?: number;\n radioStyle?: RadioStyle;\n} & ITextStyleOption;\n\nexport type CheckboxStyle = {\n // 选择框尺寸\n size?: number;\n // 选择框与文字间距\n spaceBetweenTextAndIcon?: number;\n\n // 未选中状态填充颜色\n defaultFill?: string;\n // 未选中状态描边颜色\n defaultStroke?: string;\n // disable状态填充颜色\n disableFill?: string;\n // checked状态填充颜色\n checkedFill?: string;\n // checked状态描边颜色\n checkedStroke?: string;\n // checked状态填充颜色\n disableCheckedFill?: string;\n // checked状态描边颜色\n disableCheckedStroke?: string;\n\n // checked状态图标url\n checkIconImage?: string;\n // indeterminate状态图标url\n indeterminateIconImage?: string;\n};\n\nexport type RadioStyle = {\n // 选择框尺寸\n size?: number;\n // 选择框与文字间距\n spaceBetweenTextAndIcon?: number;\n // 单元格内多个单选框,单选框直接的间距\n spaceBetweenRadio?: number;\n\n // 单选框环形图标外半径(会覆盖size)\n outerRadius?: number;\n // 单选框环形图标内半径\n innerRadius?: number;\n\n // 未选中状态填充颜色\n defaultFill?: string;\n // 未选中状态描边颜色\n defaultStroke?: string;\n // disable状态填充颜色\n disableFill?: string;\n // checked状态填充颜色\n checkedFill?: string;\n // checked状态描边颜色\n checkedStroke?: string;\n // checked状态填充颜色\n disableCheckedFill?: string;\n // checked状态描边颜色\n disableCheckedStroke?: string;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/ts-types/column/style.ts"],"names":[],"mappings":"","file":"style.js","sourcesContent":["import type { LineWidthsPropertyDefine } from '..';\nimport { PaddingPropertyDefine } from '..';\nimport type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n IconPropertyDefine,\n LineClamp,\n LineDashsPropertyDefine,\n TextOverflow,\n UnderlinePropertyDefine,\n LineDashPropertyDefine,\n LineThroughPropertyDefine,\n TagPropertyDefine,\n PaddingsPropertyDefine,\n StylePropertyFunctionArg,\n CursorPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../style-define';\nimport type { ThemeStyle } from '../theme';\n//这个style是在绘制里面的内容时用到的,用不到borderColor和borderLineWidth,所以和IStyleOption有些不一致\nexport interface ColumnStyle {\n padding?: PaddingsPropertyDefine;\n bgColor?: ColorPropertyDefine;\n // eslint-disable-next-line no-undef\n textAlign?: TextAlignType;\n // eslint-disable-next-line no-undef\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n // doChangeStyle: () => void;\n clone: () => ColumnStyle;\n linkColor?: ColorPropertyDefine;\n}\n\nexport type IHeaderStyle = ColumnStyle;\n\nexport type ISortheaderSyle = IHeaderStyle;\n\nexport interface IStyleOption {\n bgColor?: ColorPropertyDefine;\n padding?: PaddingsPropertyDefine;\n textAlign?: TextAlignType;\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n strokeColor?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n borderColor?: ColorsPropertyDefine;\n borderLineWidth?: LineWidthsPropertyDefine;\n\n lineHeight?: number;\n underline?: UnderlinePropertyDefine;\n /** TODO */\n underlineColor?: ColorPropertyDefine;\n underlineDash?: LineDashPropertyDefine;\n underlineOffset?: number;\n lineThrough?: LineThroughPropertyDefine;\n /** TODO */\n lineThroughColor?: ColorPropertyDefine;\n /** TODO */\n lineThroughDash?: LineDashPropertyDefine;\n\n borderLineDash?: LineDashsPropertyDefine;\n linkColor?: ColorPropertyDefine;\n\n // tag?: TagPropertyDefine;\n // tagFont?: FontPropertyDefine;\n // tagColor?: ColorPropertyDefine;\n // tagBgColor?: ColorPropertyDefine;\n // tagMargin?: number | string | (number | string)[];\n\n // dropDownIcon?: IconPropertyDefine;\n // dropDownHoverIcon?: IconPropertyDefine;\n cursor?: CursorPropertyDefine;\n\n textStick?: boolean | 'vertical' | 'horizontal';\n textStickBaseOnAlign?: boolean;\n\n marked?: MarkedPropertyDefine;\n}\n\nexport interface ITextStyleOption extends IStyleOption {\n // lineHeight?: string | number;//移入IStyleOption中 单行文本类型也可以有\n autoWrapText?: boolean;\n lineClamp?: LineClamp;\n}\n\nexport interface IImageStyleOption extends IStyleOption {\n // imageSizing?: 'keep-aspect-ratio';\n // imageAutoSizing?: boolean;\n margin?: number;\n}\n// export type ISortHeaderStyleOption = IStyleOption;\n\nexport type ColumnStyleOption =\n | IStyleOption\n | ITextStyleOption\n | IImageStyleOption\n | ProgressBarStyleOption\n | CheckboxStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n\nexport type HeaderStyleOption =\n | (IStyleOption & { textStick?: boolean | 'vertical' | 'horizontal' }) //表头可以配置吸附\n | ITextStyleOption\n | IImageStyleOption\n // | ISortHeaderStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n// | ISortHeaderStyleOption\n\nexport type FullExtendStyle = HeaderStyleOption & ColumnStyleOption & ThemeStyle;\n\n// export interface BaseStyleOption {\n// bgColor?: ColorPropertyDefine;\n// }\n\n// export interface StdBaseStyleOption extends BaseStyleOption {\n// // eslint-disable-next-line no-undef\n// textAlign?: CanvasTextAlign;\n// // eslint-disable-next-line no-undef\n// textBaseline?: CanvasTextBaseline;\n// }\n// export interface StyleOption extends StdBaseStyleOption {\n// color?: ColorPropertyDefine;\n// font?: FontPropertyDefine;\n// padding?: PaddingsPropertyDefine;\n// textOverflow?: TextOverflow;\n// }\nexport interface ProgressBarStyleOption extends IStyleOption {\n // 是否显示进度条\n showBar?: boolean | ((args: StylePropertyFunctionArg) => boolean);\n // 进度条颜色\n barColor?: ColorPropertyDefine;\n // 进度条背景颜色\n barBgColor?: ColorPropertyDefine;\n // 进度条高度\n barHeight?: number | string;\n // 进度条距单元格底部距离\n barBottom?: number | string;\n // 进度条padding\n barPadding?: (number | string)[];\n // 进度条正向颜色\n barPositiveColor?: ColorPropertyDefine;\n // 进度条负向颜色\n barNegativeColor?: ColorPropertyDefine;\n // 进度条坐标轴轴颜色\n barAxisColor?: ColorPropertyDefine;\n // 进度条方向是否从右到左\n barRightToLeft?: boolean;\n\n // 是否显示进度条标记\n showBarMark?: boolean;\n // 进度条标记正向颜色\n barMarkPositiveColor?: ColorPropertyDefine;\n // 进度条标记负向颜色\n barMarkNegativeColor?: ColorPropertyDefine;\n // 进度条标记宽度\n barMarkWidth?: number;\n // 进度条标记位置\n barMarkPosition?: 'right' | 'bottom';\n}\n\nexport type CheckboxStyleOption = {\n size?: number;\n spaceBetweenTextAndIcon?: number;\n checkboxStyle?: CheckboxStyle;\n} & ITextStyleOption;\n\nexport type RadioStyleOption = {\n size?: number;\n spaceBetweenTextAndIcon?: number;\n spaceBetweenRadio?: number;\n radioStyle?: RadioStyle;\n} & ITextStyleOption;\n\nexport type CheckboxStyle = {\n // 选择框尺寸\n size?: number;\n // 选择框与文字间距\n spaceBetweenTextAndIcon?: number;\n\n // 未选中状态填充颜色\n defaultFill?: string;\n // 未选中状态描边颜色\n defaultStroke?: string;\n // disable状态填充颜色\n disableFill?: string;\n // checked状态填充颜色\n checkedFill?: string;\n // checked状态描边颜色\n checkedStroke?: string;\n // checked状态填充颜色\n disableCheckedFill?: string;\n // checked状态描边颜色\n disableCheckedStroke?: string;\n\n // checked状态图标url\n checkIconImage?: string;\n // indeterminate状态图标url\n indeterminateIconImage?: string;\n};\n\nexport type RadioStyle = {\n // 选择框尺寸\n size?: number;\n // 选择框与文字间距\n spaceBetweenTextAndIcon?: number;\n // 单元格内多个单选框,单选框直接的间距\n spaceBetweenRadio?: number;\n\n // 单选框环形图标外半径(会覆盖size)\n outerRadius?: number;\n // 单选框环形图标内半径\n innerRadius?: number;\n\n // 未选中状态填充颜色\n defaultFill?: string;\n // 未选中状态描边颜色\n defaultStroke?: string;\n // disable状态填充颜色\n disableFill?: string;\n // checked状态填充颜色\n checkedFill?: string;\n // checked状态描边颜色\n checkedStroke?: string;\n // checked状态填充颜色\n disableCheckedFill?: string;\n // checked状态描边颜色\n disableCheckedStroke?: string;\n};\n"]}
|
package/es/vrender.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EAGX,cAAc,EAEd,aAAa,EACb,aAAa,EACb,YAAY,EAIZ,YAAY,EAEZ,gBAAgB,EAEhB,cAAc,EACd,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,MAAM,UAAU,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,gBAAgB,EAAE,CAAC;IAEnB,IAAI,YAAY,EAAE,EAAE;QAClB,cAAc,CAAC,SAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,SAAS,EAAE,EAAE;QACtB,WAAW,CAAC,SAAS,CAAC,CAAC;KACxB;IACD,WAAW,EAAE,CAAC;IAGd,cAAc,EAAE,CAAC;IAEjB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;IAIf,YAAY,EAAE,CAAC;IAEf,gBAAgB,EAAE,CAAC;IAEnB,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC;IAGf,UAAU,EAAE,CAAC;AACf,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@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.5.
|
|
1
|
+
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EAGX,cAAc,EAEd,aAAa,EACb,aAAa,EACb,YAAY,EAIZ,YAAY,EAEZ,gBAAgB,EAEhB,cAAc,EACd,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,MAAM,UAAU,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,gBAAgB,EAAE,CAAC;IAEnB,IAAI,YAAY,EAAE,EAAE;QAClB,cAAc,CAAC,SAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,SAAS,EAAE,EAAE;QACtB,WAAW,CAAC,SAAS,CAAC,CAAC;KACxB;IACD,WAAW,EAAE,CAAC;IAGd,cAAc,EAAE,CAAC;IAEjB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;IAIf,YAAY,EAAE,CAAC;IAEf,gBAAgB,EAAE,CAAC;IAEnB,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC;IAGf,UAAU,EAAE,CAAC;AACf,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@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.5.5-alpha.0\";\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 loadPoptip();\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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vtable",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5-alpha.0",
|
|
4
4
|
"description": "canvas table width high performance",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"grid",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
+
"@visactor/vtable-editors": "1.5.5-alpha.0",
|
|
46
47
|
"@visactor/vrender-core": "0.19.13-beta.0",
|
|
47
48
|
"@visactor/vrender-kits": "0.19.13-beta.0",
|
|
48
49
|
"@visactor/vrender-components": "0.19.13-beta.0",
|
|
@@ -50,8 +51,7 @@
|
|
|
50
51
|
"@visactor/vscale": "~0.18.1",
|
|
51
52
|
"@visactor/vdataset": "~0.18.1",
|
|
52
53
|
"@visactor/vutils-extension": "~1.11.5",
|
|
53
|
-
"cssfontparser": "^1.2.1"
|
|
54
|
-
"@visactor/vtable-editors": "1.5.4"
|
|
54
|
+
"cssfontparser": "^1.2.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"luxon": "*",
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
"d3-hierarchy": "^3.1.1",
|
|
102
102
|
"@resvg/resvg-js": "^2.5.0",
|
|
103
103
|
"pikaday": "1.8.2",
|
|
104
|
-
"@internal/
|
|
104
|
+
"@internal/eslint-config": "0.0.1",
|
|
105
105
|
"@internal/ts-config": "0.0.1",
|
|
106
|
-
"@internal/
|
|
106
|
+
"@internal/bundler": "0.0.1"
|
|
107
107
|
},
|
|
108
108
|
"unpkg": "latest",
|
|
109
109
|
"unpkgFiles": [
|