@visactor/vtable 0.25.8-alpha.0 → 0.25.8

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.
Files changed (53) hide show
  1. package/cjs/ListTable.js +2 -1
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotTable.js +6 -3
  4. package/cjs/PivotTable.js.map +1 -1
  5. package/cjs/core/BaseTable.js +21 -14
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/header-helper/header-helper.js +1 -1
  8. package/cjs/header-helper/header-helper.js.map +1 -1
  9. package/cjs/index.d.ts +1 -1
  10. package/cjs/index.js +1 -1
  11. package/cjs/index.js.map +1 -1
  12. package/cjs/layout/pivot-header-layout.d.ts +5 -1
  13. package/cjs/layout/pivot-header-layout.js +82 -57
  14. package/cjs/layout/pivot-header-layout.js.map +1 -1
  15. package/cjs/scenegraph/component/table-component.js +26 -22
  16. package/cjs/scenegraph/component/table-component.js.map +1 -1
  17. package/cjs/themes/theme.js +3 -0
  18. package/cjs/themes/theme.js.map +1 -1
  19. package/cjs/tools/helper.js +2 -2
  20. package/cjs/tools/helper.js.map +1 -1
  21. package/cjs/ts-types/table-engine.d.ts +1 -0
  22. package/cjs/ts-types/table-engine.js.map +1 -1
  23. package/cjs/ts-types/theme.d.ts +1 -0
  24. package/cjs/ts-types/theme.js.map +1 -1
  25. package/cjs/vrender.js.map +1 -1
  26. package/dist/vtable.js +164 -62
  27. package/dist/vtable.min.js +2 -2
  28. package/es/ListTable.js +2 -1
  29. package/es/ListTable.js.map +1 -1
  30. package/es/PivotTable.js +6 -3
  31. package/es/PivotTable.js.map +1 -1
  32. package/es/core/BaseTable.js +21 -14
  33. package/es/core/BaseTable.js.map +1 -1
  34. package/es/header-helper/header-helper.js +1 -1
  35. package/es/header-helper/header-helper.js.map +1 -1
  36. package/es/index.d.ts +1 -1
  37. package/es/index.js +1 -1
  38. package/es/index.js.map +1 -1
  39. package/es/layout/pivot-header-layout.d.ts +5 -1
  40. package/es/layout/pivot-header-layout.js +83 -56
  41. package/es/layout/pivot-header-layout.js.map +1 -1
  42. package/es/scenegraph/component/table-component.js +27 -21
  43. package/es/scenegraph/component/table-component.js.map +1 -1
  44. package/es/themes/theme.js +3 -0
  45. package/es/themes/theme.js.map +1 -1
  46. package/es/tools/helper.js +2 -2
  47. package/es/tools/helper.js.map +1 -1
  48. package/es/ts-types/table-engine.d.ts +1 -0
  49. package/es/ts-types/table-engine.js.map +1 -1
  50. package/es/ts-types/theme.d.ts +1 -0
  51. package/es/ts-types/theme.js.map +1 -1
  52. package/es/vrender.js.map +1 -1
  53. package/package.json +5 -5
@@ -195,7 +195,7 @@ export class HeaderHelper {
195
195
  }
196
196
  setTableColumnsEditor() {
197
197
  const setEditor = (colDefines, setColumns) => {
198
- colDefines.forEach(((colDefine, index) => {
198
+ null == colDefines || colDefines.forEach(((colDefine, index) => {
199
199
  colDefine.editor && (setColumns[index].editor = colDefine.editor), colDefine.columns && setEditor(colDefine.columns, setColumns[index].columns);
200
200
  }));
201
201
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/header-helper/header-helper.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,KAAK,aAAa,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,MAAM,OAAO,YAAY;IAgBvB,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,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,EAAE,UAAyB,EAAE,EAAE;YACzE,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;gBACtC,IAAI,SAAS,CAAC,MAAM,EAAE;oBACpB,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;iBAC7C;gBACD,IAAI,SAAS,CAAC,OAAO,EAAE;oBACrB,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;iBACzD;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QACF,SAAS,CAAE,IAAI,CAAC,MAAoB,CAAC,OAAO,CAAC,OAAO,EAAG,IAAI,CAAC,MAAoB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1G,CAAC;CACF","file":"header-helper.js","sourcesContent":["import type {\n ColumnIconOption,\n ColumnsDefine,\n ListTableAPI,\n PivotTableAPI,\n RectProps,\n SortOrder,\n SvgIcon\n} from '../ts-types';\nimport { HierarchyState, IconFuncTypeEnum, IconPosition, InternalIconName } from '../ts-types';\nimport * as registerIcons from '../icons';\nimport { cellInRange } from '../tools/helper';\nimport { isMenuHighlight } from '../components/menu/dom/logic/MenuElement';\nimport { Style } from './style/Style';\nimport { ImageStyle } from './style/ImageStyle';\nimport { TextHeaderStyle } from './style';\nimport type { ListTable } from '../ListTable';\nimport type { BaseTableAPI, HeaderData } from '../ts-types/base-table';\nimport { CheckboxStyle } from './style/CheckboxStyle';\nimport { isValid } from '@visactor/vutils';\nexport class HeaderHelper {\n normalIcon: SvgIcon;\n upIcon: SvgIcon;\n downIcon: SvgIcon;\n freezeIcon: SvgIcon;\n frozenIcon: SvgIcon;\n frozenCurrentIcon: SvgIcon;\n dropDownAbsoluteIcon: SvgIcon;\n // dropDownHoverIcon: SvgIcon;\n\n expandIcon: SvgIcon;\n collapseIcon: SvgIcon;\n // //存储鼠标hover到的图标类型,后面需要用name判断,应该再拿个inline对象上赋值showFrozenIconIcon,绘制感应区域\n // _showFrozenIconIcon?: SvgIcon;\n // _showSortIcon?: SvgIcon;\n _table: BaseTableAPI;\n constructor(_table: BaseTableAPI) {\n this._table = _table;\n const regedIcons = registerIcons.get();\n //pin默认值\n this.freezeIcon = regedIcons[InternalIconName.freezeIconName] as SvgIcon;\n this.frozenIcon = regedIcons[InternalIconName.frozenIconName] as SvgIcon;\n this.frozenCurrentIcon = regedIcons[InternalIconName.frozenCurrentIconName] as SvgIcon;\n\n //sort默认值\n this.normalIcon = regedIcons[InternalIconName.normalIconName] as SvgIcon;\n this.upIcon = regedIcons[InternalIconName.upwardIconName] as SvgIcon;\n this.downIcon = regedIcons[InternalIconName.downwardIconName] as SvgIcon;\n //下拉按钮\n this.dropDownAbsoluteIcon = regedIcons[InternalIconName.dropdownIconName] as SvgIcon;\n // this.dropDownHoverIcon = regedIcons[InternalIconName.dropdownHoverIconName] as SvgIcon;\n //展开折叠按钮\n this.expandIcon = regedIcons[InternalIconName.expandIconName] as SvgIcon;\n this.collapseIcon = regedIcons[InternalIconName.collapseIconName] as SvgIcon;\n }\n\n getIcons(col: number, row: number): ColumnIconOption[] {\n //加入固定列图标 排序 文本中元素\n const icons: ColumnIconOption[] = [];\n if (this._table.isPivotTable()) {\n // 透视表显示排序按钮\n const { showSort } = this._table.internalProps.layoutMap.getHeader(col, row) as HeaderData;\n if (showSort) {\n const order = (this._table as PivotTableAPI).getPivotSortState(col, row);\n const sortIcon = order === 'asc' ? this.downIcon : order === 'desc' ? this.upIcon : this.normalIcon;\n\n if (sortIcon) {\n icons.push(sortIcon);\n }\n }\n } else {\n const states = (this._table as ListTableAPI).sortState;\n let order: SortOrder | undefined;\n order = undefined;\n const range = this._table.getCellRange(col, row);\n if (states) {\n if (Array.isArray(states)) {\n for (let i = 0; i < states.length; i++) {\n const state = states[i];\n const stateRange = this._table._getHeaderCellBySortState(state);\n if (stateRange && cellInRange(range, stateRange.col, stateRange.row)) {\n ({ order } = state);\n break;\n }\n }\n } else {\n const stateRange = this._table._getHeaderCellBySortState(states);\n if (stateRange && cellInRange(range, stateRange.col, stateRange.row)) {\n ({ order } = states);\n }\n }\n }\n const sortIcon = this.getSortIcon(order, this._table, col, row);\n if (sortIcon) {\n icons.push(sortIcon);\n }\n }\n\n if (this._table.showFrozenIcon && col < this._table.allowFrozenColCount) {\n const pinInline = this.getFrozenIcon(col, row);\n if (pinInline) {\n icons.push(pinInline);\n // context.showIcon = this.showFrozenIconIcon;//todo 暂时去掉 需要想其他方式\n }\n }\n\n if (this.checkDropDownIcon(this._table, col, row)) {\n // const dropDownMenuHoverIcon = this.dropDownHoverIcon;//this.getDropDownHoverIcon(_table, col, row);\n const dropDownMenuIcon = this.dropDownAbsoluteIcon; //this.getDropDownAbsoluteIcon(_table, col, row);\n // dropDownMenuIcon.hover.image = dropDownMenuHoverIcon.svg; // to do 规范化处理\n icons.push(dropDownMenuIcon);\n }\n\n const dropDownStateIcons = this.getDropDownStateIcons(this._table, col, row);\n if (dropDownStateIcons.length) {\n icons.push(...dropDownStateIcons);\n }\n\n const { headerIcon } = this._table._getHeaderLayoutMap(col, row) as HeaderData;\n // captionIcon && icons.push(captionIcon);\n\n const hierarchyIcon = this.getHierarchyIcon(col, row);\n if (hierarchyIcon) {\n icons.push(hierarchyIcon);\n }\n\n if (headerIcon) {\n let headerIconStrs;\n if (typeof headerIcon === 'function') {\n const arg = {\n col,\n row,\n value: this._table.getCellValue(col, row),\n dataValue: this._table.getCellOriginValue(col, row),\n table: this._table\n };\n headerIconStrs = headerIcon(arg);\n } else {\n headerIconStrs = headerIcon;\n }\n const regedIcons = registerIcons.get();\n const addIcon = (headerIcon: string | ColumnIconOption) => {\n let icon;\n if (typeof headerIcon === 'string') {\n icon = regedIcons[headerIcon];\n } else {\n icon = headerIcon;\n }\n if (icon) {\n icons.push(icon);\n }\n };\n if (Array.isArray(headerIconStrs)) {\n headerIconStrs.forEach((columnIcon: string | ColumnIconOption, index: number) => {\n addIcon(columnIcon);\n });\n } else {\n addIcon(headerIconStrs);\n }\n }\n return icons;\n }\n\n getFrozenIcon(col: number, row: number): ColumnIconOption | null {\n // this.showFrozenIconIcon = undefined;\n if (this._table.isPivotTable() || (this._table as ListTable).transpose) {\n // 透视表和转置模式不显示冻结按钮\n return null;\n }\n\n if (this._table.rightFrozenColCount && col >= this._table.colCount - this._table.rightFrozenColCount) {\n return null;\n }\n const headerC = this._table.getHeaderDefine(col, row) as any;\n if (headerC.columns && headerC.columns.length > 0) {\n return null;\n }\n\n let frozen = this.freezeIcon;\n // 使用table.options.frozenColCount原始冻结信息获取按钮\n if (this._table.options.frozenColCount - 1 > col) {\n frozen = this.frozenIcon;\n } else if (this._table.options.frozenColCount - 1 === col) {\n frozen = this.frozenCurrentIcon;\n }\n return frozen;\n }\n\n getSortIcon(order: SortOrder | undefined, _table: BaseTableAPI, col: number, row: number): ColumnIconOption | null {\n // this.showSortIcon = undefined;\n const icon = order === 'asc' ? this.downIcon : order === 'desc' ? this.upIcon : this.normalIcon;\n\n const headerC = _table.getHeaderDefine(col, row) as any;\n if (\n !headerC ||\n headerC.showSort === false ||\n (!isValid(headerC.showSort) && !headerC.sort) ||\n (headerC.columns && headerC.columns.length > 0)\n ) {\n return null;\n }\n return icon;\n }\n\n private getDropDownStateIcons(_table: BaseTableAPI, col: number, row: number): ColumnIconOption[] {\n const headerC = _table.getHeaderDefine(col, row) as any;\n const headerL = _table._getHeaderLayoutMap(col, row);\n const { dropDownMenu } = headerL as HeaderData;\n const results: ColumnIconOption[] = [];\n if (\n (Array.isArray(dropDownMenu) && dropDownMenu.length) || // header中配置dropDownMenu\n (Array.isArray(_table.globalDropDownMenu) && _table.globalDropDownMenu.length && !headerC?.columns?.length) // 全局配置dropDownMenu,只在最下级表头展示\n ) {\n const menus = dropDownMenu || _table.globalDropDownMenu;\n let highlightIndex = -1;\n let subHighlightIndex = -1;\n for (let i = 0; i < menus.length; i++) {\n const menu = menus[i];\n // 优先判断子元素\n if (typeof menu === 'object' && menu.children && menu.children.length) {\n for (let j = 0; j < menu.children.length; j++) {\n const childItem = menu.children[j];\n if (\n _table.stateManager.menu?.dropDownMenuHighlight &&\n isMenuHighlight(\n _table,\n _table.stateManager.menu?.dropDownMenuHighlight,\n typeof childItem === 'object' ? childItem?.menuKey : childItem,\n col,\n row,\n i\n )\n ) {\n highlightIndex = i;\n subHighlightIndex = j;\n break;\n }\n }\n }\n if (_table._dropDownMenuIsHighlight(col, row, i)) {\n highlightIndex = i;\n break;\n }\n }\n // const highlightIndex = _table._dropDownMenuIsHighlight(col, row);\n if (highlightIndex !== -1) {\n let menu;\n if (subHighlightIndex !== -1) {\n menu = ((dropDownMenu || _table.globalDropDownMenu)[highlightIndex] as any).children[\n subHighlightIndex\n ] as any;\n } else {\n menu = (dropDownMenu || _table.globalDropDownMenu)[highlightIndex] as any;\n }\n\n if (menu.stateIcon) {\n if (menu.stateIcon.svg) {\n results.push({\n type: 'svg',\n name: menu.stateIcon.src || menu.stateIcon.svg,\n width: menu.stateIcon.width || 22,\n height: menu.stateIcon.height || 22,\n // dropDownIndex: highlightIndex,\n svg: menu.stateIcon.svg,\n positionType: IconPosition.right,\n marginRight: 0,\n funcType: IconFuncTypeEnum.dropDownState,\n interactive: false\n // hover: {\n // width: menu.stateIcon.width || 22,\n // height: menu.stateIcon.height || 22,\n // bgColor: 'rgba(101, 117, 168, 0.1)',\n // },\n });\n } else if (menu.stateIcon.src) {\n results.push({\n type: 'image',\n name: menu.stateIcon.src || menu.stateIcon.svg,\n width: menu.stateIcon.width || 22,\n height: menu.stateIcon.height || 22,\n // dropDownIndex: highlightIndex,\n src: menu.stateIcon.src,\n positionType: IconPosition.right,\n marginRight: 0,\n funcType: IconFuncTypeEnum.dropDownState,\n interactive: false\n // hover: {\n // width: menu.stateIcon.width || 22,\n // height: menu.stateIcon.height || 22,\n // bgColor: 'rgba(101, 117, 168, 0.1)',\n // },\n });\n }\n }\n }\n }\n return results;\n }\n /**\n * 内置dropDownIcon的位置信息\n * @param cellRect\n * @param marginTop\n * @param baseline\n * @returns\n */\n getDropDownIconRect(cellRect: RectProps, marginTop: number, baseline?: string): RectProps {\n // const left = cellRect.right - (this.downIcon.box?.width || 0) - marginRight;\n // const right = cellRect.right - marginRight;\n const iconW = this.downIcon.hover?.width ?? this.downIcon?.width ?? 0;\n const iconH = this.downIcon.hover?.height ?? this.downIcon?.height ?? 0;\n const left = cellRect.right - 2 - iconW;\n const right = cellRect.right - 2;\n let top;\n if (baseline === 'middle') {\n top = cellRect.top + cellRect.height / 2 - iconW / 2;\n } else if (baseline === 'top') {\n top = cellRect.top + marginTop / 2;\n } else if (baseline === 'bottom') {\n top = cellRect.bottom - marginTop * 2;\n } else {\n top = cellRect.top;\n }\n const bottom = iconH + top;\n\n return {\n left,\n right,\n top,\n bottom,\n width: iconW,\n height: iconH\n };\n }\n\n getHierarchyIcon(col: number, row: number) {\n const { hierarchyState } = this._table._getHeaderLayoutMap(col, row) as HeaderData;\n if (hierarchyState) {\n if (hierarchyState === HierarchyState.expand) {\n //展开状态 应该显示-号\n return this.expandIcon;\n } else if (hierarchyState === HierarchyState.collapse) {\n //折叠状态 应该显示-号\n return this.collapseIcon;\n }\n }\n return undefined;\n }\n getHierarchyIconWidth() {\n return this.expandIcon.width + (this.expandIcon.marginLeft ?? 0) + (this.expandIcon.marginRight ?? 0);\n }\n private checkDropDownIcon(_table: BaseTableAPI, col: number, row: number) {\n /*\n * dropDownMenu有三种状态:\n * 1. header中未配置 =》 使用globalDropDownMenu,icon展示\n * 2. header中配置 =》 使用header中的dropDownMenu,icon展示\n * 3. header中dropDownMenu为空数组 =》 icon不展示\n */\n if (_table.isPivotTable()) {\n const headerC = _table._getHeaderLayoutMap(col, row) as any;\n if (\n Array.isArray(headerC.dropDownMenu) &&\n headerC.dropDownMenu.length // header中配置dropDownMenu\n ) {\n return true;\n }\n } else {\n const headerC = _table.getHeaderDefine(col, row) as any;\n if (\n (Array.isArray(headerC.dropDownMenu) && headerC.dropDownMenu.length) || // header中配置dropDownMenu\n ((!Array.isArray(headerC.dropDownMenu) || headerC.dropDownMenu.length !== 0) && // header中dropDownMenu为空数组,不显示\n Array.isArray(_table.globalDropDownMenu) &&\n _table.globalDropDownMenu.length && // 全局配置dropDownMenu\n !headerC?.columns?.length) // 只在最下级表头展示\n ) {\n return true;\n }\n }\n\n return false;\n }\n\n getStyleClass(headerType: 'text' | 'image' | 'video' | 'link' | 'checkbox') {\n switch (headerType) {\n case 'text':\n return TextHeaderStyle;\n case 'image':\n return ImageStyle;\n case 'video':\n return ImageStyle;\n case 'link':\n return TextHeaderStyle;\n case 'checkbox':\n return CheckboxStyle;\n }\n }\n\n setTableColumnsEditor() {\n const setEditor = (colDefines: ColumnsDefine, setColumns: ColumnsDefine) => {\n colDefines.forEach((colDefine, index) => {\n if (colDefine.editor) {\n setColumns[index].editor = colDefine.editor;\n }\n if (colDefine.columns) {\n setEditor(colDefine.columns, setColumns[index].columns);\n }\n });\n };\n setEditor((this._table as ListTable).options.columns, (this._table as ListTable).internalProps.columns);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/header-helper/header-helper.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,KAAK,aAAa,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,MAAM,OAAO,YAAY;IAgBvB,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,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B,EAAE,EAAE;YACzE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;gBACvC,IAAI,SAAS,CAAC,MAAM,EAAE;oBACpB,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;iBAC7C;gBACD,IAAI,SAAS,CAAC,OAAO,EAAE;oBACrB,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;iBACzD;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QACF,SAAS,CAAE,IAAI,CAAC,MAAoB,CAAC,OAAO,CAAC,OAAO,EAAG,IAAI,CAAC,MAAoB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1G,CAAC;CACF","file":"header-helper.js","sourcesContent":["import type {\n ColumnIconOption,\n ColumnsDefine,\n ListTableAPI,\n PivotTableAPI,\n RectProps,\n SortOrder,\n SvgIcon\n} from '../ts-types';\nimport { HierarchyState, IconFuncTypeEnum, IconPosition, InternalIconName } from '../ts-types';\nimport * as registerIcons from '../icons';\nimport { cellInRange } from '../tools/helper';\nimport { isMenuHighlight } from '../components/menu/dom/logic/MenuElement';\nimport { Style } from './style/Style';\nimport { ImageStyle } from './style/ImageStyle';\nimport { TextHeaderStyle } from './style';\nimport type { ListTable } from '../ListTable';\nimport type { BaseTableAPI, HeaderData } from '../ts-types/base-table';\nimport { CheckboxStyle } from './style/CheckboxStyle';\nimport { isValid } from '@visactor/vutils';\nexport class HeaderHelper {\n normalIcon: SvgIcon;\n upIcon: SvgIcon;\n downIcon: SvgIcon;\n freezeIcon: SvgIcon;\n frozenIcon: SvgIcon;\n frozenCurrentIcon: SvgIcon;\n dropDownAbsoluteIcon: SvgIcon;\n // dropDownHoverIcon: SvgIcon;\n\n expandIcon: SvgIcon;\n collapseIcon: SvgIcon;\n // //存储鼠标hover到的图标类型,后面需要用name判断,应该再拿个inline对象上赋值showFrozenIconIcon,绘制感应区域\n // _showFrozenIconIcon?: SvgIcon;\n // _showSortIcon?: SvgIcon;\n _table: BaseTableAPI;\n constructor(_table: BaseTableAPI) {\n this._table = _table;\n const regedIcons = registerIcons.get();\n //pin默认值\n this.freezeIcon = regedIcons[InternalIconName.freezeIconName] as SvgIcon;\n this.frozenIcon = regedIcons[InternalIconName.frozenIconName] as SvgIcon;\n this.frozenCurrentIcon = regedIcons[InternalIconName.frozenCurrentIconName] as SvgIcon;\n\n //sort默认值\n this.normalIcon = regedIcons[InternalIconName.normalIconName] as SvgIcon;\n this.upIcon = regedIcons[InternalIconName.upwardIconName] as SvgIcon;\n this.downIcon = regedIcons[InternalIconName.downwardIconName] as SvgIcon;\n //下拉按钮\n this.dropDownAbsoluteIcon = regedIcons[InternalIconName.dropdownIconName] as SvgIcon;\n // this.dropDownHoverIcon = regedIcons[InternalIconName.dropdownHoverIconName] as SvgIcon;\n //展开折叠按钮\n this.expandIcon = regedIcons[InternalIconName.expandIconName] as SvgIcon;\n this.collapseIcon = regedIcons[InternalIconName.collapseIconName] as SvgIcon;\n }\n\n getIcons(col: number, row: number): ColumnIconOption[] {\n //加入固定列图标 排序 文本中元素\n const icons: ColumnIconOption[] = [];\n if (this._table.isPivotTable()) {\n // 透视表显示排序按钮\n const { showSort } = this._table.internalProps.layoutMap.getHeader(col, row) as HeaderData;\n if (showSort) {\n const order = (this._table as PivotTableAPI).getPivotSortState(col, row);\n const sortIcon = order === 'asc' ? this.downIcon : order === 'desc' ? this.upIcon : this.normalIcon;\n\n if (sortIcon) {\n icons.push(sortIcon);\n }\n }\n } else {\n const states = (this._table as ListTableAPI).sortState;\n let order: SortOrder | undefined;\n order = undefined;\n const range = this._table.getCellRange(col, row);\n if (states) {\n if (Array.isArray(states)) {\n for (let i = 0; i < states.length; i++) {\n const state = states[i];\n const stateRange = this._table._getHeaderCellBySortState(state);\n if (stateRange && cellInRange(range, stateRange.col, stateRange.row)) {\n ({ order } = state);\n break;\n }\n }\n } else {\n const stateRange = this._table._getHeaderCellBySortState(states);\n if (stateRange && cellInRange(range, stateRange.col, stateRange.row)) {\n ({ order } = states);\n }\n }\n }\n const sortIcon = this.getSortIcon(order, this._table, col, row);\n if (sortIcon) {\n icons.push(sortIcon);\n }\n }\n\n if (this._table.showFrozenIcon && col < this._table.allowFrozenColCount) {\n const pinInline = this.getFrozenIcon(col, row);\n if (pinInline) {\n icons.push(pinInline);\n // context.showIcon = this.showFrozenIconIcon;//todo 暂时去掉 需要想其他方式\n }\n }\n\n if (this.checkDropDownIcon(this._table, col, row)) {\n // const dropDownMenuHoverIcon = this.dropDownHoverIcon;//this.getDropDownHoverIcon(_table, col, row);\n const dropDownMenuIcon = this.dropDownAbsoluteIcon; //this.getDropDownAbsoluteIcon(_table, col, row);\n // dropDownMenuIcon.hover.image = dropDownMenuHoverIcon.svg; // to do 规范化处理\n icons.push(dropDownMenuIcon);\n }\n\n const dropDownStateIcons = this.getDropDownStateIcons(this._table, col, row);\n if (dropDownStateIcons.length) {\n icons.push(...dropDownStateIcons);\n }\n\n const { headerIcon } = this._table._getHeaderLayoutMap(col, row) as HeaderData;\n // captionIcon && icons.push(captionIcon);\n\n const hierarchyIcon = this.getHierarchyIcon(col, row);\n if (hierarchyIcon) {\n icons.push(hierarchyIcon);\n }\n\n if (headerIcon) {\n let headerIconStrs;\n if (typeof headerIcon === 'function') {\n const arg = {\n col,\n row,\n value: this._table.getCellValue(col, row),\n dataValue: this._table.getCellOriginValue(col, row),\n table: this._table\n };\n headerIconStrs = headerIcon(arg);\n } else {\n headerIconStrs = headerIcon;\n }\n const regedIcons = registerIcons.get();\n const addIcon = (headerIcon: string | ColumnIconOption) => {\n let icon;\n if (typeof headerIcon === 'string') {\n icon = regedIcons[headerIcon];\n } else {\n icon = headerIcon;\n }\n if (icon) {\n icons.push(icon);\n }\n };\n if (Array.isArray(headerIconStrs)) {\n headerIconStrs.forEach((columnIcon: string | ColumnIconOption, index: number) => {\n addIcon(columnIcon);\n });\n } else {\n addIcon(headerIconStrs);\n }\n }\n return icons;\n }\n\n getFrozenIcon(col: number, row: number): ColumnIconOption | null {\n // this.showFrozenIconIcon = undefined;\n if (this._table.isPivotTable() || (this._table as ListTable).transpose) {\n // 透视表和转置模式不显示冻结按钮\n return null;\n }\n\n if (this._table.rightFrozenColCount && col >= this._table.colCount - this._table.rightFrozenColCount) {\n return null;\n }\n const headerC = this._table.getHeaderDefine(col, row) as any;\n if (headerC.columns && headerC.columns.length > 0) {\n return null;\n }\n\n let frozen = this.freezeIcon;\n // 使用table.options.frozenColCount原始冻结信息获取按钮\n if (this._table.options.frozenColCount - 1 > col) {\n frozen = this.frozenIcon;\n } else if (this._table.options.frozenColCount - 1 === col) {\n frozen = this.frozenCurrentIcon;\n }\n return frozen;\n }\n\n getSortIcon(order: SortOrder | undefined, _table: BaseTableAPI, col: number, row: number): ColumnIconOption | null {\n // this.showSortIcon = undefined;\n const icon = order === 'asc' ? this.downIcon : order === 'desc' ? this.upIcon : this.normalIcon;\n\n const headerC = _table.getHeaderDefine(col, row) as any;\n if (\n !headerC ||\n headerC.showSort === false ||\n (!isValid(headerC.showSort) && !headerC.sort) ||\n (headerC.columns && headerC.columns.length > 0)\n ) {\n return null;\n }\n return icon;\n }\n\n private getDropDownStateIcons(_table: BaseTableAPI, col: number, row: number): ColumnIconOption[] {\n const headerC = _table.getHeaderDefine(col, row) as any;\n const headerL = _table._getHeaderLayoutMap(col, row);\n const { dropDownMenu } = headerL as HeaderData;\n const results: ColumnIconOption[] = [];\n if (\n (Array.isArray(dropDownMenu) && dropDownMenu.length) || // header中配置dropDownMenu\n (Array.isArray(_table.globalDropDownMenu) && _table.globalDropDownMenu.length && !headerC?.columns?.length) // 全局配置dropDownMenu,只在最下级表头展示\n ) {\n const menus = dropDownMenu || _table.globalDropDownMenu;\n let highlightIndex = -1;\n let subHighlightIndex = -1;\n for (let i = 0; i < menus.length; i++) {\n const menu = menus[i];\n // 优先判断子元素\n if (typeof menu === 'object' && menu.children && menu.children.length) {\n for (let j = 0; j < menu.children.length; j++) {\n const childItem = menu.children[j];\n if (\n _table.stateManager.menu?.dropDownMenuHighlight &&\n isMenuHighlight(\n _table,\n _table.stateManager.menu?.dropDownMenuHighlight,\n typeof childItem === 'object' ? childItem?.menuKey : childItem,\n col,\n row,\n i\n )\n ) {\n highlightIndex = i;\n subHighlightIndex = j;\n break;\n }\n }\n }\n if (_table._dropDownMenuIsHighlight(col, row, i)) {\n highlightIndex = i;\n break;\n }\n }\n // const highlightIndex = _table._dropDownMenuIsHighlight(col, row);\n if (highlightIndex !== -1) {\n let menu;\n if (subHighlightIndex !== -1) {\n menu = ((dropDownMenu || _table.globalDropDownMenu)[highlightIndex] as any).children[\n subHighlightIndex\n ] as any;\n } else {\n menu = (dropDownMenu || _table.globalDropDownMenu)[highlightIndex] as any;\n }\n\n if (menu.stateIcon) {\n if (menu.stateIcon.svg) {\n results.push({\n type: 'svg',\n name: menu.stateIcon.src || menu.stateIcon.svg,\n width: menu.stateIcon.width || 22,\n height: menu.stateIcon.height || 22,\n // dropDownIndex: highlightIndex,\n svg: menu.stateIcon.svg,\n positionType: IconPosition.right,\n marginRight: 0,\n funcType: IconFuncTypeEnum.dropDownState,\n interactive: false\n // hover: {\n // width: menu.stateIcon.width || 22,\n // height: menu.stateIcon.height || 22,\n // bgColor: 'rgba(101, 117, 168, 0.1)',\n // },\n });\n } else if (menu.stateIcon.src) {\n results.push({\n type: 'image',\n name: menu.stateIcon.src || menu.stateIcon.svg,\n width: menu.stateIcon.width || 22,\n height: menu.stateIcon.height || 22,\n // dropDownIndex: highlightIndex,\n src: menu.stateIcon.src,\n positionType: IconPosition.right,\n marginRight: 0,\n funcType: IconFuncTypeEnum.dropDownState,\n interactive: false\n // hover: {\n // width: menu.stateIcon.width || 22,\n // height: menu.stateIcon.height || 22,\n // bgColor: 'rgba(101, 117, 168, 0.1)',\n // },\n });\n }\n }\n }\n }\n return results;\n }\n /**\n * 内置dropDownIcon的位置信息\n * @param cellRect\n * @param marginTop\n * @param baseline\n * @returns\n */\n getDropDownIconRect(cellRect: RectProps, marginTop: number, baseline?: string): RectProps {\n // const left = cellRect.right - (this.downIcon.box?.width || 0) - marginRight;\n // const right = cellRect.right - marginRight;\n const iconW = this.downIcon.hover?.width ?? this.downIcon?.width ?? 0;\n const iconH = this.downIcon.hover?.height ?? this.downIcon?.height ?? 0;\n const left = cellRect.right - 2 - iconW;\n const right = cellRect.right - 2;\n let top;\n if (baseline === 'middle') {\n top = cellRect.top + cellRect.height / 2 - iconW / 2;\n } else if (baseline === 'top') {\n top = cellRect.top + marginTop / 2;\n } else if (baseline === 'bottom') {\n top = cellRect.bottom - marginTop * 2;\n } else {\n top = cellRect.top;\n }\n const bottom = iconH + top;\n\n return {\n left,\n right,\n top,\n bottom,\n width: iconW,\n height: iconH\n };\n }\n\n getHierarchyIcon(col: number, row: number) {\n const { hierarchyState } = this._table._getHeaderLayoutMap(col, row) as HeaderData;\n if (hierarchyState) {\n if (hierarchyState === HierarchyState.expand) {\n //展开状态 应该显示-号\n return this.expandIcon;\n } else if (hierarchyState === HierarchyState.collapse) {\n //折叠状态 应该显示-号\n return this.collapseIcon;\n }\n }\n return undefined;\n }\n getHierarchyIconWidth() {\n return this.expandIcon.width + (this.expandIcon.marginLeft ?? 0) + (this.expandIcon.marginRight ?? 0);\n }\n private checkDropDownIcon(_table: BaseTableAPI, col: number, row: number) {\n /*\n * dropDownMenu有三种状态:\n * 1. header中未配置 =》 使用globalDropDownMenu,icon展示\n * 2. header中配置 =》 使用header中的dropDownMenu,icon展示\n * 3. header中dropDownMenu为空数组 =》 icon不展示\n */\n if (_table.isPivotTable()) {\n const headerC = _table._getHeaderLayoutMap(col, row) as any;\n if (\n Array.isArray(headerC.dropDownMenu) &&\n headerC.dropDownMenu.length // header中配置dropDownMenu\n ) {\n return true;\n }\n } else {\n const headerC = _table.getHeaderDefine(col, row) as any;\n if (\n (Array.isArray(headerC.dropDownMenu) && headerC.dropDownMenu.length) || // header中配置dropDownMenu\n ((!Array.isArray(headerC.dropDownMenu) || headerC.dropDownMenu.length !== 0) && // header中dropDownMenu为空数组,不显示\n Array.isArray(_table.globalDropDownMenu) &&\n _table.globalDropDownMenu.length && // 全局配置dropDownMenu\n !headerC?.columns?.length) // 只在最下级表头展示\n ) {\n return true;\n }\n }\n\n return false;\n }\n\n getStyleClass(headerType: 'text' | 'image' | 'video' | 'link' | 'checkbox') {\n switch (headerType) {\n case 'text':\n return TextHeaderStyle;\n case 'image':\n return ImageStyle;\n case 'video':\n return ImageStyle;\n case 'link':\n return TextHeaderStyle;\n case 'checkbox':\n return CheckboxStyle;\n }\n }\n\n setTableColumnsEditor() {\n const setEditor = (colDefines: ColumnsDefine, setColumns: ColumnsDefine) => {\n colDefines?.forEach((colDefine, index) => {\n if (colDefine.editor) {\n setColumns[index].editor = colDefine.editor;\n }\n if (colDefine.columns) {\n setEditor(colDefine.columns, setColumns[index].columns);\n }\n });\n };\n setEditor((this._table as ListTable).options.columns, (this._table as ListTable).internalProps.columns);\n }\n}\n"]}
package/es/index.d.ts CHANGED
@@ -16,7 +16,7 @@ import { renderChart } from './scenegraph/graphic/contributions/chart-render-hel
16
16
  import { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';
17
17
  export { getDataCellPath } from './tools/get-data-path';
18
18
  export * from './render/jsx';
19
- export declare const version = "0.25.8-alpha.0";
19
+ export declare const version = "0.25.8";
20
20
  export { TYPES, core, ListTable, ListTableConstructorOptions, PivotTable, 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 };
21
21
  declare function getIcons(): {
22
22
  [key: string]: TYPES.ColumnIconOption;
package/es/index.js CHANGED
@@ -34,7 +34,7 @@ export { getDataCellPath } from "./tools/get-data-path";
34
34
 
35
35
  export * from "./render/jsx";
36
36
 
37
- export const version = "0.25.8-alpha.0";
37
+ export const version = "0.25.8";
38
38
 
39
39
  export { TYPES, core, ListTable, PivotTable, PivotChart, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText };
40
40
 
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,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,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;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAIxC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EAET,UAAU,EAGV,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,EACnB,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","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 { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\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';\n\nexport const version = \"0.25.8-alpha.0\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\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};\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"]}
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,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,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;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EAET,UAAU,EAGV,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,EACnB,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","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 { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\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';\n\nexport const version = \"0.25.8\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\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};\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"]}
@@ -18,6 +18,10 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
18
18
  cornerHeaderObjs: HeaderData[];
19
19
  columnHeaderObjs: HeaderData[];
20
20
  rowHeaderObjs: HeaderData[];
21
+ private _cornerHeaderCellFullPathIds;
22
+ private _columnHeaderCellFullPathIds;
23
+ private _rowHeaderCellFullPathIds;
24
+ private _rowHeaderCellFullPathIds_FULL;
21
25
  private _cornerHeaderCellIds;
22
26
  private _columnHeaderCellIds;
23
27
  private _rowHeaderCellIds;
@@ -226,5 +230,5 @@ export declare class PivotHeaderLayoutMap implements LayoutMapAPI {
226
230
  getSeriesNumberHeader(col: number, row: number): SeriesNumberColumnData;
227
231
  getSeriesNumberBody(col: number, row: number): SeriesNumberColumnData;
228
232
  changeTreeNodeTitle(col: number, row: number, value: string): void;
229
- clearCellIds(): void;
233
+ generateCellIdsConsiderHideHeader(): void;
230
234
  }
@@ -25,15 +25,16 @@ export class PivotHeaderLayoutMap {
25
25
  constructor(table, dataset) {
26
26
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
27
27
  if (this.colIndex = 0, this._showHeader = !0, this.columnHeaderObjs = [], this.rowHeaderObjs = [],
28
- this._cornerHeaderCellIds = [], this._columnHeaderCellIds = [], this._rowHeaderCellIds = [],
29
- this._rowHeaderCellIds_FULL = [], this._columnWidths = [], this.columnPaths = [],
30
- this._headerObjects = [], this._headerObjectMap = {}, this._indicators = [], this.indicatorsAsCol = !0,
31
- this.hideIndicatorName = !1, this._showRowHeader = !0, this._showColumnHeader = !0,
32
- this._indicatorShowType = "column", this.rowHierarchyTextStartAlignment = !1, this.rowDimensionKeys = [],
33
- this.colDimensionKeys = [], this.indicatorKeys = [], this.indicatorDimensionKey = IndicatorDimensionKeyPlaceholder,
34
- this._rowHeaderExtensionTree = {}, this._extensionRowDimensionKeys = [], this.fullRowDimensionKeys = [],
35
- this.leftRowSeriesNumberColumnCount = 0, this.rightRowSeriesNumberColumnCount = 0,
36
- this.sharedVar = {
28
+ this._cornerHeaderCellFullPathIds = [], this._columnHeaderCellFullPathIds = [],
29
+ this._rowHeaderCellFullPathIds = [], this._rowHeaderCellFullPathIds_FULL = [], this._cornerHeaderCellIds = [],
30
+ this._columnHeaderCellIds = [], this._rowHeaderCellIds = [], this._rowHeaderCellIds_FULL = [],
31
+ this._columnWidths = [], this.columnPaths = [], this._headerObjects = [], this._headerObjectMap = {},
32
+ this._indicators = [], this.indicatorsAsCol = !0, this.hideIndicatorName = !1, this._showRowHeader = !0,
33
+ this._showColumnHeader = !0, this._indicatorShowType = "column", this.rowHierarchyTextStartAlignment = !1,
34
+ this.rowDimensionKeys = [], this.colDimensionKeys = [], this.indicatorKeys = [],
35
+ this.indicatorDimensionKey = IndicatorDimensionKeyPlaceholder, this._rowHeaderExtensionTree = {},
36
+ this._extensionRowDimensionKeys = [], this.fullRowDimensionKeys = [], this.leftRowSeriesNumberColumnCount = 0,
37
+ this.rightRowSeriesNumberColumnCount = 0, this.sharedVar = {
37
38
  seqId: 0
38
39
  }, this._table = table, "tree" === table.options.rowHierarchyType && (this.extensionRows = table.options.extensionRows),
39
40
  this.dataset = dataset, this._largeCellRangeCache = [], this._CellHeaderPathMap = new Map,
@@ -82,7 +83,7 @@ export class PivotHeaderLayoutMap {
82
83
  if (!axes.length || axes.every((axis => axis.orient !== (this.indicatorsAsCol ? "top" : "right") || !1 !== axis.visible))) return !0;
83
84
  }
84
85
  return !1;
85
- }))), this.resetColumnHeaderLevelCount(), this._rowHeaderCellIds_FULL = transpose(this._rowHeaderCellIds_FULL),
86
+ }))), this.resetColumnHeaderLevelCount(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
86
87
  "tree" === table.options.rowHierarchyType && (null === (_r = this.extensionRows) || void 0 === _r ? void 0 : _r.length) >= 1 && (this.generateExtensionRowTree(),
87
88
  this.extensionRows.forEach((extensionRow => {
88
89
  const rowKeys = [];
@@ -100,8 +101,9 @@ export class PivotHeaderLayoutMap {
100
101
  } else this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [ "" ].concat(this.rowDimensionKeys) : this.rowDimensionKeys, this.rowsDefine); else this.cornerHeaderObjs = this._addCornerHeaders(null, void 0);
101
102
  this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
102
103
  o)), {}), this.indicatorsAsCol && !this.hideIndicatorName ? this._indicatorShowType = "column" : this.indicatorsAsCol || this.hideIndicatorName ? this._indicatorShowType = "none" : this._indicatorShowType = "row",
103
- this.setPagination(table.options.pagination), this._table.isPivotChart() && (this._chartItemSpanSize = 0,
104
- this._chartItemBandSize = 0, this._indicators.find((indicatorObject => {
104
+ this.generateCellIdsConsiderHideHeader(), this.setPagination(table.options.pagination),
105
+ this._table.isPivotChart() && (this._chartItemSpanSize = 0, this._chartItemBandSize = 0,
106
+ this._indicators.find((indicatorObject => {
105
107
  var _a, _b, _c, _d, _e, _f, _g, _h;
106
108
  (null === (_a = null == indicatorObject ? void 0 : indicatorObject.style) || void 0 === _a ? void 0 : _a.padding) && (this._chartPadding = indicatorObject.style.padding),
107
109
  (null === (_b = indicatorObject.chartSpec) || void 0 === _b ? void 0 : _b.barWidth) && "number" == typeof indicatorObject.chartSpec.barWidth && (this._chartItemSpanSize = null === (_c = indicatorObject.chartSpec) || void 0 === _c ? void 0 : _c.barWidth);
@@ -111,8 +113,7 @@ export class PivotHeaderLayoutMap {
111
113
  this._chartPaddingOuter = null !== (_g = isArray(bandAxisConfig.paddingOuter) ? bandAxisConfig.paddingOuter[0] : bandAxisConfig.paddingOuter) && void 0 !== _g ? _g : 0),
112
114
  this._chartItemSpanSize > 0 || (null === (_h = indicatorObject.chartSpec.series) || void 0 === _h || _h.find((seriesObject => (seriesObject.barWidth && "number" == typeof seriesObject.barWidth && (this._chartItemSpanSize = seriesObject.barWidth),
113
115
  this._chartItemSpanSize > 0))), !1);
114
- }))), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber), this.setColumnWidths(),
115
- this.clearCellIds();
116
+ }))), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber), this.setColumnWidths();
116
117
  }
117
118
  handleRowSeriesNumber(rowSeriesNumber) {
118
119
  var _a;
@@ -146,11 +147,11 @@ export class PivotHeaderLayoutMap {
146
147
  }
147
148
  _generateColHeaderIds() {
148
149
  var _a, _b, _c, _d, _e, _f;
149
- if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && this._addHeaders(this._columnHeaderCellIds, 0, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs),
150
+ if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && this._addHeaders(this._columnHeaderCellFullPathIds, 0, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs),
150
151
  this.columnHeaderTitle) {
151
152
  this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
152
153
  const id = ++this.sharedVar.seqId, firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
153
- this._columnHeaderCellIds.unshift(firstRowIds);
154
+ this._columnHeaderCellFullPathIds.unshift(firstRowIds);
154
155
  const cell = {
155
156
  id: id,
156
157
  title: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
@@ -168,11 +169,11 @@ export class PivotHeaderLayoutMap {
168
169
  }
169
170
  _generateRowHeaderIds() {
170
171
  var _a, _b, _c, _d, _e, _f, _g, _h;
171
- if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && ("tree" === this.rowHierarchyType ? this._addHeadersForTreeMode(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs) : this._addHeaders(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs)),
172
+ if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && ("tree" === this.rowHierarchyType ? this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs) : this._addHeaders(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs)),
172
173
  this.rowHeaderTitle) {
173
174
  this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
174
- const id = ++this.sharedVar.seqId, firstColIds = Array(null !== (_c = null === (_b = this._rowHeaderCellIds_FULL[0]) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : this.rowDimensionTree.tree.size).fill(id);
175
- this._rowHeaderCellIds_FULL.unshift(firstColIds);
175
+ const id = ++this.sharedVar.seqId, firstColIds = Array(null !== (_c = null === (_b = this._rowHeaderCellFullPathIds_FULL[0]) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : this.rowDimensionTree.tree.size).fill(id);
176
+ this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
176
177
  const cell = {
177
178
  id: id,
178
179
  title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
@@ -241,10 +242,10 @@ export class PivotHeaderLayoutMap {
241
242
  description: null == dimensionInfo ? void 0 : dimensionInfo.cornerDescription
242
243
  };
243
244
  if (results[id] = cell, this._headerObjects[id] = cell, "column" === this.cornerSetting.titleOnDimension) {
244
- this._cornerHeaderCellIds[key] || (this._cornerHeaderCellIds[key] = []);
245
- for (let r = 0; r < this.rowHeaderLevelCount; r++) this._cornerHeaderCellIds[key][r] = id;
246
- } else if ("row" === this.cornerSetting.titleOnDimension) for (let r = 0; r < this.columnHeaderLevelCount; r++) this._cornerHeaderCellIds[r] || (this._cornerHeaderCellIds[r] = []),
247
- this._cornerHeaderCellIds[r][key] = id;
245
+ this._cornerHeaderCellFullPathIds[key] || (this._cornerHeaderCellFullPathIds[key] = []);
246
+ for (let r = 0; r < this.rowHeaderLevelCount; r++) this._cornerHeaderCellFullPathIds[key][r] = id;
247
+ } else if ("row" === this.cornerSetting.titleOnDimension) for (let r = 0; r < this.columnHeaderLevelCount; r++) this._cornerHeaderCellFullPathIds[r] || (this._cornerHeaderCellFullPathIds[r] = []),
248
+ this._cornerHeaderCellFullPathIds[r][key] = id;
248
249
  })); else {
249
250
  const id = ++this.sharedVar.seqId, cell = {
250
251
  id: id,
@@ -261,15 +262,15 @@ export class PivotHeaderLayoutMap {
261
262
  }
262
263
  };
263
264
  results[id] = cell, this._headerObjects[id] = cell;
264
- for (let r = 0; r < this.columnHeaderLevelCount; r++) for (let j = 0; j < this.rowHeaderLevelCount; j++) this._cornerHeaderCellIds[r] || (this._cornerHeaderCellIds[r] = []),
265
- this._cornerHeaderCellIds[r][j] = id;
265
+ for (let r = 0; r < this.columnHeaderLevelCount; r++) for (let j = 0; j < this.rowHeaderLevelCount; j++) this._cornerHeaderCellFullPathIds[r] || (this._cornerHeaderCellFullPathIds[r] = []),
266
+ this._cornerHeaderCellFullPathIds[r][j] = id;
266
267
  }
267
268
  return results;
268
269
  }
269
270
  generateExtensionRowTree() {
270
271
  this.extensionRows.forEach(((extensionRow, indexP) => {
271
- const old_rowHeaderCellIds = this._rowHeaderCellIds_FULL;
272
- this._rowHeaderCellIds_FULL = [], old_rowHeaderCellIds.forEach(((row_ids, index) => {
272
+ const old_rowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL;
273
+ this._rowHeaderCellFullPathIds_FULL = [], old_rowHeaderCellIds.forEach(((row_ids, index) => {
273
274
  const key = row_ids[row_ids.length - 1];
274
275
  let tree, rowExtensionDimensionTree;
275
276
  if (this.colIndex = 0, "function" == typeof extensionRow.rowTree) {
@@ -284,7 +285,7 @@ export class PivotHeaderLayoutMap {
284
285
  this._rowHeaderExtensionTree[key] = rowExtensionDimensionTree);
285
286
  const extensionRowTreeHeaderIds = [];
286
287
  this._addHeadersForTreeMode(extensionRowTreeHeaderIds, 0, rowExtensionDimensionTree.tree.children, [], rowExtensionDimensionTree.totalLevel, !0, extensionRow.rows, this.rowHeaderObjs);
287
- for (let i = 0; i < extensionRowTreeHeaderIds[0].length; i++) this._rowHeaderCellIds_FULL.push(row_ids.concat(extensionRowTreeHeaderIds[0][i]));
288
+ for (let i = 0; i < extensionRowTreeHeaderIds[0].length; i++) this._rowHeaderCellFullPathIds_FULL.push(row_ids.concat(extensionRowTreeHeaderIds[0][i]));
288
289
  }));
289
290
  }));
290
291
  }
@@ -735,7 +736,7 @@ export class PivotHeaderLayoutMap {
735
736
  let colPath = [], rowPath = [];
736
737
  if (row >= 0 && recordCol >= 0 && (colPath = this.columnDimensionTree.getTreePath(recordCol, this.showHeader && this.showColumnHeader ? row - (this.columnHeaderTitle ? 1 : 0) : this.columnDimensionTree.totalLevel)),
737
738
  col >= 0 && recordRow >= 0) if ("tree" === this.rowHierarchyType) {
738
- const row_pathIds = this._rowHeaderCellIds[recordRow];
739
+ const row_pathIds = this._rowHeaderCellFullPathIds[recordRow];
739
740
  let findTree = this.rowDimensionTree, level = 0;
740
741
  for (;findTree; ) {
741
742
  const pathIds = [];
@@ -815,18 +816,18 @@ export class PivotHeaderLayoutMap {
815
816
  }
816
817
  toggleHierarchyState(col, row) {
817
818
  var _a, _b, _c, _d, _e, _f;
818
- const oldRowHeaderCellIds = this._rowHeaderCellIds_FULL.slice(0), oldRowHeaderCellPositons = oldRowHeaderCellIds.map(((id, row) => ({
819
+ const oldRowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL.slice(0), oldRowHeaderCellPositons = oldRowHeaderCellIds.map(((id, row) => ({
819
820
  col: col,
820
821
  row: row + this.columnHeaderLevelCount
821
822
  }))), hd = this.getHeader(col, row);
822
823
  if (hd.define.hierarchyState = hd.define.hierarchyState === HierarchyState.collapse ? HierarchyState.expand : HierarchyState.collapse,
823
- this.rowDimensionTree.reset(this.rowDimensionTree.tree.children, !0), this._rowHeaderCellIds_FULL = [],
824
+ this.rowDimensionTree.reset(this.rowDimensionTree.tree.children, !0), this._rowHeaderCellFullPathIds_FULL = [],
824
825
  this.rowDimensionKeys = this.rowDimensionTree.dimensionKeys.valueArr(), this.fullRowDimensionKeys = [],
825
826
  this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys),
826
- this._addHeadersForTreeMode(this._rowHeaderCellIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs),
827
+ this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs),
827
828
  this.rowHeaderTitle) {
828
829
  const id = ++this.sharedVar.seqId, firstColIds = Array(this.rowCount - this.columnHeaderLevelCount).fill(id);
829
- this._rowHeaderCellIds_FULL.unshift(firstColIds);
830
+ this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
830
831
  const cell = {
831
832
  id: id,
832
833
  title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
@@ -843,11 +844,13 @@ export class PivotHeaderLayoutMap {
843
844
  };
844
845
  this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
845
846
  }
846
- this._rowHeaderCellIds_FULL = transpose(this._rowHeaderCellIds_FULL), "tree" === this.rowHierarchyType && (null === (_f = this.extensionRows) || void 0 === _f ? void 0 : _f.length) >= 1 && this.generateExtensionRowTree(),
847
+ this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
848
+ "tree" === this.rowHierarchyType && (null === (_f = this.extensionRows) || void 0 === _f ? void 0 : _f.length) >= 1 && this.generateExtensionRowTree(),
847
849
  this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
848
850
  o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0;
849
- const diffCell = diffCellAddress(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount])), this._rowHeaderCellIds_FULL.map((newCellId => newCellId[col - this.leftRowSeriesNumberColumnCount])), oldRowHeaderCellPositons, this);
850
- return this._rowHeaderCellIds = this._rowHeaderCellIds_FULL.slice(), diffCell;
851
+ const diffCell = diffCellAddress(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount])), this._rowHeaderCellFullPathIds_FULL.map((newCellId => newCellId[col - this.leftRowSeriesNumberColumnCount])), oldRowHeaderCellPositons, this);
852
+ return this.generateCellIdsConsiderHideHeader(), this.setPagination(this.pagination),
853
+ diffCell;
851
854
  }
852
855
  isHeaderForColWidth(col, row) {
853
856
  return this.isHeader(col, row);
@@ -984,10 +987,10 @@ export class PivotHeaderLayoutMap {
984
987
  const targetCellRange = this.getCellRange(target.col, sourceCellRange.start.row);
985
988
  if (targetIndex = target.col >= source.col ? targetCellRange.end.col - sourceSize + 1 : targetCellRange.start.col,
986
989
  targetIndex === sourceCellRange.start.col) return null;
987
- for (let row = 0; row < this._columnHeaderCellIds.length; row++) {
988
- const sourceIds = this._columnHeaderCellIds[row].splice(sourceCellRange.start.col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount, sourceSize);
990
+ for (let row = 0; row < this._columnHeaderCellFullPathIds.length; row++) {
991
+ const sourceIds = this._columnHeaderCellFullPathIds[row].splice(sourceCellRange.start.col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount, sourceSize);
989
992
  sourceIds.unshift(targetIndex - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount, 0),
990
- Array.prototype.splice.apply(this._columnHeaderCellIds[row], sourceIds);
993
+ Array.prototype.splice.apply(this._columnHeaderCellFullPathIds[row], sourceIds);
991
994
  }
992
995
  const sourceColumns = this._columnWidths.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
993
996
  return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0),
@@ -1008,8 +1011,12 @@ export class PivotHeaderLayoutMap {
1008
1011
  targetIndex === sourceCellRange.start.row - this.columnHeaderLevelCount) return null;
1009
1012
  const sourceIds = this._rowHeaderCellIds.splice(sourceCellRange.start.row - this.columnHeaderLevelCount, sourceSize);
1010
1013
  sourceIds.unshift(targetIndex - this.currentPageStartIndex, 0), Array.prototype.splice.apply(this._rowHeaderCellIds, sourceIds);
1014
+ const sourceIds0 = this._rowHeaderCellFullPathIds.splice(sourceCellRange.start.row - this.columnHeaderLevelCount, sourceSize);
1015
+ sourceIds0.unshift(targetIndex - this.currentPageStartIndex, 0), Array.prototype.splice.apply(this._rowHeaderCellFullPathIds, sourceIds0);
1011
1016
  const sourceIds_FULL = this._rowHeaderCellIds_FULL.splice(sourceCellRange.start.row - this.columnHeaderLevelCount + this.currentPageStartIndex, sourceSize);
1012
- return sourceIds_FULL.unshift(targetIndex, 0), Array.prototype.splice.apply(this._rowHeaderCellIds_FULL, sourceIds_FULL),
1017
+ sourceIds_FULL.unshift(targetIndex, 0), Array.prototype.splice.apply(this._rowHeaderCellIds_FULL, sourceIds_FULL);
1018
+ const sourceIds_FULL0 = this._rowHeaderCellFullPathIds_FULL.splice(sourceCellRange.start.row - this.columnHeaderLevelCount + this.currentPageStartIndex, sourceSize);
1019
+ return sourceIds_FULL0.unshift(targetIndex, 0), Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL, sourceIds_FULL0),
1013
1020
  this.rowDimensionTree.movePosition(sourceRowHeaderPaths.length - 1, sourceCellRange.start.row - this.columnHeaderLevelCount, targetIndex + (target.row > source.row ? sourceRowHeaderNode.size - 1 : 0)),
1014
1021
  this.rowDimensionTree.reset(this.rowDimensionTree.tree.children, !0), this._CellHeaderPathMap = new Map,
1015
1022
  this._largeCellRangeCache.length = 0, {
@@ -1153,15 +1160,17 @@ export class PivotHeaderLayoutMap {
1153
1160
  return getChartDataId(col, row, this);
1154
1161
  }
1155
1162
  setPagination(pagination) {
1156
- var _a, _b, _c, _d, _e;
1163
+ var _a, _b, _c, _d, _e, _f, _g;
1157
1164
  if (this.clearCellRangeMap(), this.pagination = pagination, "grid" === this.rowHierarchyType && isValid(null === (_a = this.pagination) || void 0 === _a ? void 0 : _a.perPageCount) && isValid(null === (_b = this.pagination) || void 0 === _b ? void 0 : _b.currentPage)) {
1158
1165
  !1 === this.indicatorsAsCol && (this.pagination.perPageCount = Math.ceil(this.pagination.perPageCount / this.indicatorKeys.length) * this.indicatorKeys.length);
1159
1166
  const {perPageCount: perPageCount, currentPage: currentPage} = this.pagination;
1160
1167
  this.currentPageStartIndex = perPageCount * (currentPage || 0), this.currentPageEndIndex = this.currentPageStartIndex + perPageCount,
1161
- this._rowHeaderCellIds = null === (_c = this._rowHeaderCellIds_FULL) || void 0 === _c ? void 0 : _c.slice(this.currentPageStartIndex, this.currentPageEndIndex);
1168
+ this._rowHeaderCellIds = null === (_c = this._rowHeaderCellIds_FULL) || void 0 === _c ? void 0 : _c.slice(this.currentPageStartIndex, this.currentPageEndIndex),
1169
+ this._rowHeaderCellFullPathIds = null === (_d = this._rowHeaderCellFullPathIds_FULL) || void 0 === _d ? void 0 : _d.slice(this.currentPageStartIndex, this.currentPageEndIndex);
1162
1170
  } else this.currentPageStartIndex = 0, this.currentPageEndIndex = this._rowHeaderCellIds_FULL.length,
1163
- this._rowHeaderCellIds = null === (_d = this._rowHeaderCellIds_FULL) || void 0 === _d ? void 0 : _d.slice(this.currentPageStartIndex, this.currentPageEndIndex);
1164
- this.pagination && (this.pagination.totalCount = null === (_e = this._rowHeaderCellIds_FULL) || void 0 === _e ? void 0 : _e.length);
1171
+ this._rowHeaderCellIds = null === (_e = this._rowHeaderCellIds_FULL) || void 0 === _e ? void 0 : _e.slice(this.currentPageStartIndex, this.currentPageEndIndex),
1172
+ this._rowHeaderCellFullPathIds = null === (_f = this._rowHeaderCellFullPathIds_FULL) || void 0 === _f ? void 0 : _f.slice(this.currentPageStartIndex, this.currentPageEndIndex);
1173
+ this.pagination && (this.pagination.totalCount = null === (_g = this._rowHeaderCellIds_FULL) || void 0 === _g ? void 0 : _g.length);
1165
1174
  }
1166
1175
  release() {
1167
1176
  var _a;
@@ -1360,13 +1369,14 @@ export class PivotHeaderLayoutMap {
1360
1369
  }
1361
1370
  resetHeaderTree() {
1362
1371
  var _a, _b;
1363
- this._rowHeaderCellIds_FULL = [], this._columnHeaderCellIds = [];
1372
+ this._rowHeaderCellFullPathIds_FULL = [], this._columnHeaderCellIds = [];
1364
1373
  const dataset = this.dataset;
1365
1374
  this.rowTree = dataset.rowHeaderTree, this.columnTree = dataset.colHeaderTree, this.columnDimensionTree = new DimensionTree(null !== (_a = this.columnTree) && void 0 !== _a ? _a : [], this.sharedVar),
1366
1375
  this.rowDimensionTree = new DimensionTree(null !== (_b = this.rowTree) && void 0 !== _b ? _b : [], this.sharedVar, this.rowHierarchyType, "tree" === this.rowHierarchyType ? this.rowExpandLevel : void 0),
1367
1376
  this._generateColHeaderIds(), this.colIndex = 0, this._generateRowHeaderIds(), this.resetColumnHeaderLevelCount(),
1368
- this._rowHeaderCellIds_FULL = transpose(this._rowHeaderCellIds_FULL), this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
1369
- o)), {}), this.setPagination(this.pagination), this.clearCellIds();
1377
+ this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
1378
+ this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e, o)), {}),
1379
+ this.generateCellIdsConsiderHideHeader(), this.setPagination(this.pagination);
1370
1380
  }
1371
1381
  isSeriesNumberInHeader(col, row) {
1372
1382
  return this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && row >= 0 && col < this.leftRowSeriesNumberColumnCount && row < this.headerLevelCount || this.rightRowSeriesNumberColumnCount > 0 && row >= 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount && row < this.headerLevelCount;
@@ -1395,18 +1405,35 @@ export class PivotHeaderLayoutMap {
1395
1405
  const id = this.getCellId(col, row);
1396
1406
  this._headerObjectMap[id].title = value;
1397
1407
  }
1398
- clearCellIds() {
1399
- if (!this.showColumnHeader) if (this.indicatorsAsCol && !this.hideIndicatorName) {
1400
- const indicatorIndex = this.colDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
1401
- this._columnHeaderCellIds = this._columnHeaderCellIds.splice(indicatorIndex, 1);
1408
+ generateCellIdsConsiderHideHeader() {
1409
+ if (this._columnHeaderCellIds = this._columnHeaderCellFullPathIds.slice(), !this.showColumnHeader) if (this.indicatorsAsCol && !this.hideIndicatorName) {
1410
+ const indicatorIndex = this.colDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder), indicatorIds = this._columnHeaderCellIds.splice(indicatorIndex, 1);
1411
+ this._columnHeaderCellIds.splice(0, this._columnHeaderCellIds.length), this._columnHeaderCellIds.push(indicatorIds[0]);
1402
1412
  } else this._columnHeaderCellIds.splice(0, this._columnHeaderCellIds.length);
1403
- if (!this.showRowHeader) if (this.indicatorsAsCol || this.hideIndicatorName) this._rowHeaderCellIds_FULL.forEach((cellIds => {
1404
- cellIds.splice(0, cellIds.length);
1413
+ if (this._rowHeaderCellIds_FULL = this._rowHeaderCellFullPathIds_FULL.slice(), !this.showRowHeader) if (this.indicatorsAsCol || this.hideIndicatorName) this._rowHeaderCellIds_FULL.forEach(((cellIds, index) => {
1414
+ const _cellIds = cellIds.slice();
1415
+ _cellIds.splice(0, _cellIds.length), this._rowHeaderCellIds_FULL[index] = _cellIds;
1416
+ })); else {
1417
+ const indicatorIndex = this.rowDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
1418
+ this._rowHeaderCellIds_FULL.forEach(((cellIds, index) => {
1419
+ const _cellIds = cellIds.slice(), indicator = _cellIds.splice(indicatorIndex, 1);
1420
+ _cellIds.splice(0, _cellIds.length), _cellIds.push(indicator[0]), this._rowHeaderCellIds_FULL[index] = _cellIds;
1421
+ }));
1422
+ }
1423
+ if (this._rowHeaderCellIds = this._rowHeaderCellIds_FULL.slice(), this._cornerHeaderCellIds = this._cornerHeaderCellFullPathIds.slice(),
1424
+ 0 === this.rowHeaderLevelCount || 0 === this.columnHeaderLevelCount) this._cornerHeaderCellIds = []; else if ("row" !== this.cornerSetting.titleOnDimension || this.showRowHeader) {
1425
+ if ("column" === this.cornerSetting.titleOnDimension && !this.showColumnHeader) if (this.indicatorsAsCol && !this.hideIndicatorName) {
1426
+ const indicatorIndex = this.colDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder), indicatorIds = this._cornerHeaderCellIds.splice(indicatorIndex, 1);
1427
+ this._cornerHeaderCellIds.splice(0, this._cornerHeaderCellIds.length), this._cornerHeaderCellIds.push(indicatorIds[0]);
1428
+ } else this._cornerHeaderCellIds.splice(0, this._cornerHeaderCellIds.length);
1429
+ } else if (this.indicatorsAsCol || this.hideIndicatorName) this._cornerHeaderCellIds.forEach(((cellIds, index) => {
1430
+ const _cellIds = cellIds.slice();
1431
+ _cellIds.splice(0, _cellIds.length), this._cornerHeaderCellIds[index] = _cellIds;
1405
1432
  })); else {
1406
1433
  const indicatorIndex = this.rowDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
1407
- this._rowHeaderCellIds_FULL.forEach((cellIds => {
1408
- const indicator = cellIds.splice(indicatorIndex, 1);
1409
- cellIds.splice(0, cellIds.length), cellIds.push(indicator[0]);
1434
+ this._cornerHeaderCellIds.forEach(((cellIds, index) => {
1435
+ const _cellIds = cellIds.slice(), indicator = _cellIds.splice(indicatorIndex, 1);
1436
+ _cellIds.splice(0, _cellIds.length), _cellIds.push(indicator[0]), this._cornerHeaderCellIds[index] = _cellIds;
1410
1437
  }));
1411
1438
  }
1412
1439
  }