@visactor/vtable 1.26.6 → 1.26.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.
- package/cjs/ListTable-all.js +5 -5
- package/cjs/ListTable-all.js.map +1 -1
- package/cjs/ListTable.d.ts +2 -2
- package/cjs/ListTable.js +26 -16
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +21 -20
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable-all.js +4 -3
- package/cjs/PivotTable-all.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -1
- package/cjs/PivotTable.js +65 -63
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.d.ts +1 -1
- package/cjs/body-helper/body-helper.js +3 -1
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/components/index.js +1 -2
- package/cjs/components/tooltip/TooltipHandler.d.ts +4 -0
- package/cjs/components/tooltip/TooltipHandler.js +32 -7
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/core/BaseTable.js +8 -5
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/record-helper.d.ts +1 -1
- package/cjs/core/record-helper.js +60 -12
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/data/DataSource.d.ts +3 -1
- package/cjs/data/DataSource.js +70 -21
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +9 -1
- package/cjs/dataset/dataset.js +344 -187
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.d.ts +94 -8
- package/cjs/event/event.js +697 -190
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/media-click.js +147 -12
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/event/sparkline-event.js +1 -2
- package/cjs/event/util.js +1 -1
- package/cjs/event/util.js.map +1 -1
- package/cjs/header-helper/header-helper.js +3 -1
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +33 -17
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +4 -2
- package/cjs/scenegraph/group-creater/cell-helper.js +93 -51
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/audio-cell.d.ts +7 -0
- package/cjs/scenegraph/group-creater/cell-type/audio-cell.js +83 -0
- package/cjs/scenegraph/group-creater/cell-type/audio-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/button-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/button-cell.js +5 -4
- package/cjs/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +5 -4
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +43 -15
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/index.d.ts +1 -0
- package/cjs/scenegraph/group-creater/cell-type/index.js +8 -2
- package/cjs/scenegraph/group-creater/cell-type/index.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/media-cell-helper.d.ts +13 -0
- package/cjs/scenegraph/group-creater/cell-type/media-cell-helper.js +64 -0
- package/cjs/scenegraph/group-creater/cell-type/media-cell-helper.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +23 -7
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +6 -5
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/switch-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/switch-cell.js +5 -4
- package/cjs/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +14 -10
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +44 -23
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +14 -7
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +17 -4
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -0
- package/cjs/scenegraph/group-creater/progress/proxy.js +11 -5
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.js +1 -0
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +14 -4
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +29 -8
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.d.ts +4 -3
- package/cjs/scenegraph/layout/update-height.js +44 -30
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.d.ts +2 -1
- package/cjs/scenegraph/layout/update-width.js +50 -38
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +3 -2
- package/cjs/scenegraph/scenegraph.js +60 -52
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +46 -20
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/corner-custom-merge.d.ts +10 -0
- package/cjs/scenegraph/utils/corner-custom-merge.js +68 -0
- package/cjs/scenegraph/utils/corner-custom-merge.js.map +1 -0
- package/cjs/scenegraph/utils/deal-promise-data.d.ts +1 -1
- package/cjs/scenegraph/utils/deal-promise-data.js +2 -2
- package/cjs/scenegraph/utils/deal-promise-data.js.map +1 -1
- package/cjs/state/cell-move/index.js +6 -3
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/checkbox/checkbox.d.ts +3 -1
- package/cjs/state/checkbox/checkbox.js +53 -34
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/state/radio/radio.d.ts +3 -1
- package/cjs/state/radio/radio.js +69 -12
- package/cjs/state/radio/radio.js.map +1 -1
- package/cjs/state/resize/update-resize-column.js +25 -13
- package/cjs/state/resize/update-resize-column.js.map +1 -1
- package/cjs/state/resize/update-resize-row.js +24 -12
- package/cjs/state/resize/update-resize-row.js.map +1 -1
- package/cjs/state/state.d.ts +3 -2
- package/cjs/state/state.js +6 -3
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes.d.ts +4 -2
- package/cjs/themes.js +12 -4
- package/cjs/themes.js.map +1 -1
- package/cjs/tools/get-data-path/create-dataset.js +4 -4
- package/cjs/tools/get-data-path/create-dataset.js.map +1 -1
- package/cjs/tools/get-data-path/index.js +4 -4
- package/cjs/tools/get-data-path/index.js.map +1 -1
- package/cjs/tools/media.d.ts +1 -0
- package/cjs/tools/media.js +19 -0
- package/cjs/tools/media.js.map +1 -0
- package/cjs/tools/style.d.ts +3 -1
- package/cjs/tools/style.js +2 -2
- package/cjs/tools/style.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/type.d.ts +2 -2
- package/cjs/ts-types/column/type.js.map +1 -1
- package/cjs/ts-types/common.d.ts +1 -0
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/dataset/aggregation.d.ts +1 -0
- package/cjs/ts-types/dataset/aggregation.js +21 -3
- package/cjs/ts-types/dataset/aggregation.js.map +1 -1
- package/cjs/ts-types/events.d.ts +3 -1
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/icon.d.ts +1 -0
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/list-table/define/image-define.d.ts +10 -0
- package/cjs/ts-types/list-table/define/image-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/index.d.ts +5 -4
- package/cjs/ts-types/list-table/define/index.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +4 -4
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/index.d.ts +1 -1
- package/cjs/ts-types/list-table/layout-map/index.js.map +1 -1
- package/cjs/ts-types/menu.d.ts +12 -0
- package/cjs/ts-types/menu.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +1 -0
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/image-dimension.d.ts +5 -0
- package/cjs/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/index.d.ts +5 -3
- package/cjs/ts-types/pivot-table/dimension/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/image-indicator.d.ts +10 -0
- package/cjs/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/index.d.ts +3 -3
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +9 -5
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/tooltip.d.ts +1 -0
- package/cjs/ts-types/tooltip.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +3346 -1099
- package/dist/vtable.min.js +1 -1
- package/es/ListTable-all.js +4 -4
- package/es/ListTable-all.js.map +1 -1
- package/es/ListTable.d.ts +2 -2
- package/es/ListTable.js +26 -18
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +20 -20
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable-all.js +4 -4
- package/es/PivotTable-all.js.map +1 -1
- package/es/PivotTable.d.ts +1 -1
- package/es/PivotTable.js +65 -63
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.d.ts +1 -1
- package/es/body-helper/body-helper.js +3 -1
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/components/index.js +1 -2
- package/es/components/tooltip/TooltipHandler.d.ts +4 -0
- package/es/components/tooltip/TooltipHandler.js +32 -7
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/core/BaseTable.js +8 -5
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/es/core/TABLE_EVENT_TYPE.js +1 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/record-helper.d.ts +1 -1
- package/es/core/record-helper.js +60 -12
- package/es/core/record-helper.js.map +1 -1
- package/es/data/DataSource.d.ts +3 -1
- package/es/data/DataSource.js +69 -21
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +9 -1
- package/es/dataset/dataset.js +341 -187
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.d.ts +94 -8
- package/es/event/event.js +695 -190
- package/es/event/event.js.map +1 -1
- package/es/event/media-click.js +150 -11
- package/es/event/media-click.js.map +1 -1
- package/es/event/sparkline-event.js +1 -2
- package/es/event/util.js +1 -1
- package/es/event/util.js.map +1 -1
- package/es/header-helper/header-helper.js +3 -1
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +29 -17
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +4 -2
- package/es/scenegraph/group-creater/cell-helper.js +90 -49
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/audio-cell.d.ts +7 -0
- package/es/scenegraph/group-creater/cell-type/audio-cell.js +89 -0
- package/es/scenegraph/group-creater/cell-type/audio-cell.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/button-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/button-cell.js +5 -4
- package/es/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +5 -4
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +43 -14
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/index.d.ts +1 -0
- package/es/scenegraph/group-creater/cell-type/index.js +6 -0
- package/es/scenegraph/group-creater/cell-type/index.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/media-cell-helper.d.ts +13 -0
- package/es/scenegraph/group-creater/cell-type/media-cell-helper.js +56 -0
- package/es/scenegraph/group-creater/cell-type/media-cell-helper.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/radio-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/radio-cell.js +23 -7
- package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +6 -5
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/switch-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/switch-cell.js +5 -4
- package/es/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +13 -8
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +47 -22
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +14 -8
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +17 -5
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -0
- package/es/scenegraph/group-creater/progress/proxy.js +11 -5
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/icon/icon-update.js +1 -0
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +14 -4
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +28 -8
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-height.d.ts +4 -3
- package/es/scenegraph/layout/update-height.js +41 -27
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-width.d.ts +2 -1
- package/es/scenegraph/layout/update-width.js +47 -35
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +3 -2
- package/es/scenegraph/scenegraph.js +61 -52
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +46 -18
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/corner-custom-merge.d.ts +10 -0
- package/es/scenegraph/utils/corner-custom-merge.js +59 -0
- package/es/scenegraph/utils/corner-custom-merge.js.map +1 -0
- package/es/scenegraph/utils/deal-promise-data.d.ts +1 -1
- package/es/scenegraph/utils/deal-promise-data.js +2 -2
- package/es/scenegraph/utils/deal-promise-data.js.map +1 -1
- package/es/state/cell-move/index.js +6 -3
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/checkbox/checkbox.d.ts +3 -1
- package/es/state/checkbox/checkbox.js +53 -34
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/state/radio/radio.d.ts +3 -1
- package/es/state/radio/radio.js +70 -13
- package/es/state/radio/radio.js.map +1 -1
- package/es/state/resize/update-resize-column.js +19 -10
- package/es/state/resize/update-resize-column.js.map +1 -1
- package/es/state/resize/update-resize-row.js +19 -9
- package/es/state/resize/update-resize-row.js.map +1 -1
- package/es/state/state.d.ts +3 -2
- package/es/state/state.js +6 -2
- package/es/state/state.js.map +1 -1
- package/es/themes.d.ts +4 -2
- package/es/themes.js +11 -3
- package/es/themes.js.map +1 -1
- package/es/tools/get-data-path/create-dataset.js +4 -4
- package/es/tools/get-data-path/create-dataset.js.map +1 -1
- package/es/tools/get-data-path/index.js +4 -4
- package/es/tools/get-data-path/index.js.map +1 -1
- package/es/tools/media.d.ts +1 -0
- package/es/tools/media.js +11 -0
- package/es/tools/media.js.map +1 -0
- package/es/tools/style.d.ts +3 -1
- package/es/tools/style.js +2 -2
- package/es/tools/style.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/type.d.ts +2 -2
- package/es/ts-types/column/type.js.map +1 -1
- package/es/ts-types/common.d.ts +1 -0
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/dataset/aggregation.d.ts +1 -0
- package/es/ts-types/dataset/aggregation.js +21 -3
- package/es/ts-types/dataset/aggregation.js.map +1 -1
- package/es/ts-types/events.d.ts +3 -1
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/icon.d.ts +1 -0
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/list-table/define/image-define.d.ts +10 -0
- package/es/ts-types/list-table/define/image-define.js.map +1 -1
- package/es/ts-types/list-table/define/index.d.ts +5 -4
- package/es/ts-types/list-table/define/index.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +4 -4
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/list-table/layout-map/index.d.ts +1 -1
- package/es/ts-types/list-table/layout-map/index.js.map +1 -1
- package/es/ts-types/menu.d.ts +12 -0
- package/es/ts-types/menu.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +1 -0
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/image-dimension.d.ts +5 -0
- package/es/ts-types/pivot-table/dimension/image-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/index.d.ts +5 -3
- package/es/ts-types/pivot-table/dimension/index.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/image-indicator.d.ts +10 -0
- package/es/ts-types/pivot-table/indicator/image-indicator.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/index.d.ts +3 -3
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +9 -5
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/tooltip.d.ts +1 -0
- package/es/ts-types/tooltip.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +10 -9
|
@@ -2,10 +2,12 @@ import type { IThemeSpec, Group as VGroup } from './../../vrender';
|
|
|
2
2
|
import type { CellRange, ColumnDefine, ColumnTypeOption } from '../../ts-types';
|
|
3
3
|
import type { Group } from '../graphic/group';
|
|
4
4
|
import type { BaseTableAPI } from '../../ts-types/base-table';
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function nextPromiseCellUpdateToken(cellGroup: Group): number;
|
|
6
|
+
export declare function isPromiseCellUpdateCurrent(table: BaseTableAPI, col: number, row: number, cellGroup: Group, token: number): boolean;
|
|
7
|
+
export declare function createCell(type: ColumnTypeOption, value: any, define: ColumnDefine, table: BaseTableAPI, col: number, row: number, colWidth: number, cellWidth: number, cellHeight: number, columnGroup: Group, y: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, mayHaveIcon: boolean, cellTheme: IThemeSpec, range: CellRange | undefined, customResult?: {
|
|
6
8
|
elementsGroup?: VGroup;
|
|
7
9
|
renderDefault: boolean;
|
|
8
|
-
}): Group;
|
|
10
|
+
}, cellValue?: any): Group;
|
|
9
11
|
export declare function updateCell(col: number, row: number, table: BaseTableAPI, addNew?: boolean, isShadow?: boolean, forceFastUpdate?: boolean): Group;
|
|
10
12
|
export declare function dealWithMergeCellSize(range: CellRange, cellWidth: number, cellHeight: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, table: BaseTableAPI): void;
|
|
11
13
|
export declare function dealWithMergeCellSizeForShadow(range: CellRange, cellWidth: number, cellHeight: number, padding: [number, number, number, number], textAlign: CanvasTextAlign, textBaseline: CanvasTextBaseline, table: BaseTableAPI, cellGroup: Group): void;
|
|
@@ -4,6 +4,8 @@ import { CUSTOM_CONTAINER_NAME, dealWithCustom } from "../component/custom";
|
|
|
4
4
|
|
|
5
5
|
import { getProp } from "../utils/get-prop";
|
|
6
6
|
|
|
7
|
+
import { removeCellMediaChildren } from "./cell-type/media-cell-helper";
|
|
8
|
+
|
|
7
9
|
import { getCellCornerRadius, getStyleTheme } from "../../core/tableHelper";
|
|
8
10
|
|
|
9
11
|
import { getOrApply, isPromise } from "../../tools/helper";
|
|
@@ -26,15 +28,31 @@ import { onBeforeAttributeUpdateForInvertHighlight } from "../../plugins/invert-
|
|
|
26
28
|
|
|
27
29
|
import { getCellBorderStrokeWidth } from "../utils/cell-border-stroke-width";
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
import { createCornerCustomMergeContainer, isCornerCustomMergeRange, shouldRenderCornerCustomMergeContent } from "../utils/corner-custom-merge";
|
|
32
|
+
|
|
33
|
+
const PROMISE_CELL_UPDATE_TOKEN_KEY = "__vtable_promise_cell_update_token__";
|
|
34
|
+
|
|
35
|
+
export function nextPromiseCellUpdateToken(cellGroup) {
|
|
36
|
+
var _a;
|
|
37
|
+
const token = (null !== (_a = cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY]) && void 0 !== _a ? _a : 0) + 1;
|
|
38
|
+
return cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] = token, token;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function isPromiseCellUpdateCurrent(table, col, row, cellGroup, token) {
|
|
42
|
+
return table.scenegraph.highPerformanceGetCell(col, row, !0) === cellGroup && cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] === token;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellValue) {
|
|
30
46
|
var _a, _b;
|
|
31
47
|
let cellGroup, isAsync = !1;
|
|
48
|
+
const hasCellValue = arguments.length >= 19;
|
|
49
|
+
let renderValue = hasCellValue ? cellValue : value;
|
|
32
50
|
if (isPromise(value)) {
|
|
33
51
|
if ("cell" !== table.scenegraph.highPerformanceGetCell(col, row).role) return cellGroup;
|
|
34
|
-
|
|
52
|
+
hasCellValue || (renderValue = table.getCellValue(col, row)), isAsync = !0;
|
|
35
53
|
}
|
|
36
|
-
if ("checkbox" === type && define.tree) {
|
|
37
|
-
cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0);
|
|
54
|
+
if (value = renderValue, "checkbox" === type && define.tree) {
|
|
55
|
+
cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0, value);
|
|
38
56
|
} else if ("text" === type || "link" === type || customResult) {
|
|
39
57
|
if ("link" === type) {
|
|
40
58
|
const cellValue = value, cellOriginValue = table.getCellOriginValue(col, row), headerStyle = table._getCellStyle(col, row);
|
|
@@ -66,9 +84,11 @@ export function createCell(type, value, define, table, col, row, colWidth, cellW
|
|
|
66
84
|
stroke: !1
|
|
67
85
|
}), cellGroup.clear()) : table.internalProps.layoutMap.isAxisCell(col, row) && cellGroup.clear();
|
|
68
86
|
} else if ("image" === type) {
|
|
69
|
-
cellGroup = Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
|
|
87
|
+
cellGroup = Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
|
|
88
|
+
} else if ("audio" === type) {
|
|
89
|
+
cellGroup = Factory.getFunction("createAudioCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
|
|
70
90
|
} else if ("video" === type) {
|
|
71
|
-
cellGroup = Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
|
|
91
|
+
cellGroup = Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
|
|
72
92
|
} else if ("chart" === type) {
|
|
73
93
|
const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
|
|
74
94
|
cellGroup = Factory.getFunction("createChartCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, value, define.chartModule, table.internalProps.layoutMap.getChartSpec(col, row), chartInstance, null !== (_b = table.internalProps.layoutMap.getChartDataId(col, row)) && void 0 !== _b ? _b : "data", table, cellTheme, table.internalProps.layoutMap.isShareChartSpec(col, row), isAsync, table.internalProps.layoutMap.isNoChartDataRenderNothing(col, row));
|
|
@@ -78,23 +98,23 @@ export function createCell(type, value, define, table, col, row, colWidth, cellW
|
|
|
78
98
|
const progressBarGroup = Factory.getFunction("createProgressBarCell")(define, style, colWidth, value, dataValue, col, row, padding, table, range);
|
|
79
99
|
cellGroup.firstChild ? cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild) : cellGroup.appendChild(progressBarGroup);
|
|
80
100
|
} else if ("sparkline" === type) {
|
|
81
|
-
cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
|
|
101
|
+
cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync, value);
|
|
82
102
|
} else if ("checkbox" === type) {
|
|
83
103
|
if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
|
|
84
104
|
cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
|
|
85
105
|
} else {
|
|
86
|
-
cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
|
|
106
|
+
cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1, value);
|
|
87
107
|
}
|
|
88
108
|
} else if ("radio" === type) {
|
|
89
109
|
if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
|
|
90
110
|
cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
|
|
91
111
|
} else {
|
|
92
|
-
cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
|
|
112
|
+
cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, value);
|
|
93
113
|
}
|
|
94
114
|
} else if ("switch" === type) {
|
|
95
|
-
cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
|
|
115
|
+
cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
|
|
96
116
|
} else if ("button" === type) {
|
|
97
|
-
cellGroup = Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
|
|
117
|
+
cellGroup = Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
|
|
98
118
|
}
|
|
99
119
|
return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight,
|
|
100
120
|
cellGroup;
|
|
@@ -102,13 +122,19 @@ export function createCell(type, value, define, table, col, row, colWidth, cellW
|
|
|
102
122
|
|
|
103
123
|
function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
|
|
104
124
|
let customElementsGroup, renderDefault = !0;
|
|
105
|
-
if (
|
|
125
|
+
if (!shouldRenderCornerCustomMergeContent(col, row, range, table)) return {
|
|
126
|
+
customElementsGroup: customElementsGroup,
|
|
127
|
+
renderDefault: !1
|
|
128
|
+
};
|
|
129
|
+
if (customResult) customElementsGroup = createCornerCustomMergeContainer(customResult.elementsGroup, cellWidth, cellHeight, range, table),
|
|
130
|
+
renderDefault = customResult.renderDefault; else if ((null == range ? void 0 : range.isCustom) && !table.isCornerHeader(col, row)) ; else {
|
|
106
131
|
let customRender, customLayout;
|
|
107
132
|
if ("body" !== table.getCellLocation(col, row) ? (customRender = null == define ? void 0 : define.headerCustomRender,
|
|
108
133
|
customLayout = null == define ? void 0 : define.headerCustomLayout) : (customRender = (null == define ? void 0 : define.customRender) || table.customRender,
|
|
109
134
|
customLayout = null == define ? void 0 : define.customLayout), customLayout || customRender) {
|
|
110
|
-
const customResult = dealWithCustom(customLayout, customRender,
|
|
111
|
-
customElementsGroup = customResult.elementsGroup,
|
|
135
|
+
const customCol = range && isCornerCustomMergeRange(range, table) ? range.start.col : col, customRow = range && isCornerCustomMergeRange(range, table) ? range.start.row : row, customResult = dealWithCustom(customLayout, customRender, customCol, customRow, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
|
|
136
|
+
customElementsGroup = createCornerCustomMergeContainer(customResult.elementsGroup, cellWidth, cellHeight, range, table),
|
|
137
|
+
renderDefault = customResult.renderDefault;
|
|
112
138
|
}
|
|
113
139
|
}
|
|
114
140
|
return {
|
|
@@ -128,7 +154,7 @@ export function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
|
128
154
|
if (customMerge) {
|
|
129
155
|
const {range: customMergeRange, text: customMergeText, style: customMergeStyle, customLayout: customLayout, customRender: customRender} = customMerge;
|
|
130
156
|
range = customMergeRange, isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row,
|
|
131
|
-
value = customMergeText, customStyle = customMergeStyle, (customLayout || customRender) && (customResult = dealWithCustom(customLayout, customRender, customMergeRange.start.col, customMergeRange.start.row, table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col), table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row), !1, table.isAutoRowHeight(row), [ 0, 0, 0, 0 ], range, table)),
|
|
157
|
+
value = customMergeText, customStyle = customMergeStyle, (customLayout || customRender) && shouldRenderCornerCustomMergeContent(col, row, customMergeRange, table) && (customResult = dealWithCustom(customLayout, customRender, customMergeRange.start.col, customMergeRange.start.row, table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col), table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row), !1, table.isAutoRowHeight(row), [ 0, 0, 0, 0 ], range, table)),
|
|
132
158
|
isCustomMerge = !0;
|
|
133
159
|
}
|
|
134
160
|
}
|
|
@@ -207,27 +233,30 @@ export function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
|
207
233
|
const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row), padding = cellTheme._vtable.padding, textAlign = cellTheme.text.textAlign, textBaseline = cellTheme.text.textBaseline;
|
|
208
234
|
let newCellGroup, cellWidth, cellHeight;
|
|
209
235
|
if (range ? (cellWidth = table.getColsWidth(range.start.col, range.end.col), cellHeight = table.getRowsHeight(range.start.row, range.end.row)) : (cellWidth = table.getColWidth(col),
|
|
210
|
-
cellHeight = table.getRowHeight(row)), isPromise(value)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
236
|
+
cellHeight = table.getRowHeight(row)), isPromise(value)) {
|
|
237
|
+
const updateToken = nextPromiseCellUpdateToken(oldCellGroup);
|
|
238
|
+
removeCellMediaChildren(oldCellGroup), oldCellGroup.removeAllChild(), dealPromiseData(value, table, callUpdateCellContentForPromiseValue.bind(null, {
|
|
239
|
+
type: type,
|
|
240
|
+
define: define,
|
|
241
|
+
table: table,
|
|
242
|
+
col: col,
|
|
243
|
+
row: row,
|
|
244
|
+
cellWidth: cellWidth,
|
|
245
|
+
cellHeight: cellHeight,
|
|
246
|
+
oldCellGroup: oldCellGroup,
|
|
247
|
+
padding: padding,
|
|
248
|
+
textAlign: textAlign,
|
|
249
|
+
textBaseline: textBaseline,
|
|
250
|
+
mayHaveIcon: mayHaveIcon,
|
|
251
|
+
addNew: addNew,
|
|
252
|
+
range: range,
|
|
253
|
+
customResult: customResult,
|
|
254
|
+
customStyle: customStyle,
|
|
255
|
+
promiseValue: value,
|
|
256
|
+
updateToken: updateToken
|
|
257
|
+
}));
|
|
258
|
+
} else newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
|
|
259
|
+
if (isMerge) {
|
|
231
260
|
const {width: contentWidth} = newCellGroup.attribute, {height: contentHeight} = newCellGroup.attribute;
|
|
232
261
|
newCellGroup.contentWidth = contentWidth, newCellGroup.contentHeight = contentHeight,
|
|
233
262
|
isShadow ? dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, newCellGroup) : dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);
|
|
@@ -235,9 +264,10 @@ export function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
|
235
264
|
return newCellGroup;
|
|
236
265
|
}
|
|
237
266
|
|
|
238
|
-
function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult) {
|
|
267
|
+
function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, cellValue) {
|
|
239
268
|
var _a, _b;
|
|
240
|
-
|
|
269
|
+
const hasCellValue = arguments.length >= 18;
|
|
270
|
+
if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
|
|
241
271
|
if (!addNew && oldCellGroup.parent && table.reactCustomLayout) {
|
|
242
272
|
const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME);
|
|
243
273
|
if (reactGroup) {
|
|
@@ -245,9 +275,12 @@ function updateCellContent(type, value, define, table, col, row, cellWidth, cell
|
|
|
245
275
|
isNumber(col) && isNumber(row) && table.reactCustomLayout.removeCustomCell(col, row);
|
|
246
276
|
}
|
|
247
277
|
}
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
278
|
+
const createCellArgs = [ type, value, define, table, col, row, table.getColWidth(col), cellWidth, cellHeight, addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent, addNew ? 0 : table.scenegraph.getCellGroupY(row), padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult ];
|
|
279
|
+
hasCellValue && createCellArgs.push(cellValue);
|
|
280
|
+
const newCellGroup = createCell(...createCellArgs);
|
|
281
|
+
return !addNew && oldCellGroup.parent && newCellGroup !== oldCellGroup && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup),
|
|
282
|
+
oldCellGroup.parent.removeChild(oldCellGroup), removeCellMediaChildren(oldCellGroup),
|
|
283
|
+
oldCellGroup.release(!0), (null === (_a = table.scenegraph) || void 0 === _a ? void 0 : _a.proxy.cellCache.get(col)) && (null === (_b = table.scenegraph) || void 0 === _b || _b.proxy.cellCache.set(col, newCellGroup))),
|
|
251
284
|
newCellGroup;
|
|
252
285
|
}
|
|
253
286
|
|
|
@@ -257,9 +290,11 @@ function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, tab
|
|
|
257
290
|
return !(table.isHeader(col, row) || "cell" !== oldCellGroup.role || "text" !== cellType || autoWrapText || autoRowHeight || mayHaveIcon || "text" !== (null === (_a = oldCellGroup.firstChild) || void 0 === _a ? void 0 : _a.type) || isPromise(value));
|
|
258
291
|
}
|
|
259
292
|
|
|
260
|
-
function callUpdateCellContentForPromiseValue(updateCellArgs) {
|
|
261
|
-
const {type: type,
|
|
262
|
-
|
|
293
|
+
function callUpdateCellContentForPromiseValue(updateCellArgs, resolvedValue) {
|
|
294
|
+
const {type: type, define: define, table: table, col: col, row: row, cellWidth: cellWidth, cellHeight: cellHeight, oldCellGroup: oldCellGroup, padding: padding, textAlign: textAlign, textBaseline: textBaseline, mayHaveIcon: mayHaveIcon, addNew: addNew, range: range, customResult: customResult, customStyle: customStyle, promiseValue: promiseValue, updateToken: updateToken} = updateCellArgs;
|
|
295
|
+
if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) return;
|
|
296
|
+
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row), cellTheme = getStyleTheme(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, getProp).theme;
|
|
297
|
+
cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), updateCellContent(type, promiseValue, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, resolvedValue);
|
|
263
298
|
}
|
|
264
299
|
|
|
265
300
|
export function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
|
|
@@ -326,11 +361,17 @@ export function getCustomCellMergeCustom(col, row, cellGroup, table) {
|
|
|
326
361
|
if (customMerge) {
|
|
327
362
|
const {range: customMergeRange, text: customMergeText, style: customMergeStyle, customLayout: customMergeLayout, customRender: customMergeRender} = customMerge;
|
|
328
363
|
if (customMergeLayout || customMergeRender) {
|
|
329
|
-
const
|
|
330
|
-
cellGroup.
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
364
|
+
const rangeHeight = table.getRowHeight(row), rangeWidth = table.getColWidth(col), contentWidth = table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col), contentHeight = table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row);
|
|
365
|
+
if (cellGroup.contentWidth = contentWidth, cellGroup.contentHeight = contentHeight,
|
|
366
|
+
!shouldRenderCornerCustomMergeContent(col, row, customMergeRange, table)) {
|
|
367
|
+
const customContainer = cellGroup.getChildByName(CUSTOM_CONTAINER_NAME);
|
|
368
|
+
return customContainer && cellGroup.removeChild(customContainer), cellGroup.setAttribute("clip", !0),
|
|
369
|
+
resizeCellGroup(cellGroup, rangeWidth, rangeHeight, customMergeRange, table), customMergeRange;
|
|
370
|
+
}
|
|
371
|
+
const customResult = dealWithCustom(customMergeLayout, customMergeRender, customMergeRange.start.col, customMergeRange.start.row, table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col), table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row), !1, table.isAutoRowHeight(row), [ 0, 0, 0, 0 ], customMergeRange, table), customElementsGroup = createCornerCustomMergeContainer(customResult.elementsGroup, contentWidth, contentHeight, customMergeRange, table);
|
|
372
|
+
return cellGroup.childrenCount > 0 && customElementsGroup ? cellGroup.insertBefore(customElementsGroup, cellGroup.firstChild) : customElementsGroup && cellGroup.appendChild(customElementsGroup),
|
|
373
|
+
resizeCellGroup(cellGroup, rangeWidth, rangeHeight, customMergeRange, table), isCornerCustomMergeRange(customMergeRange, table) && cellGroup.setAttribute("clip", !1),
|
|
374
|
+
customMergeRange;
|
|
334
375
|
}
|
|
335
376
|
}
|
|
336
377
|
}
|