@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;
|
|
@@ -2,19 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.getCustomCellMergeCustom = exports.resizeCellGroup = exports.dealWithMergeCellSizeForShadow = exports.dealWithMergeCellSize = exports.updateCell = exports.createCell = void 0;
|
|
5
|
+
}), exports.getCustomCellMergeCustom = exports.resizeCellGroup = exports.dealWithMergeCellSizeForShadow = exports.dealWithMergeCellSize = exports.updateCell = exports.createCell = exports.isPromiseCellUpdateCurrent = exports.nextPromiseCellUpdateToken = void 0;
|
|
6
6
|
|
|
7
|
-
const global_1 = require("../../tools/global"), custom_1 = require("../component/custom"), get_prop_1 = require("../utils/get-prop"), tableHelper_1 = require("../../core/tableHelper"), helper_1 = require("../../tools/helper"), deal_promise_data_1 = require("../utils/deal-promise-data"), factory_1 = require("../../core/factory"), get_hierarchy_offset_1 = require("../utils/get-hierarchy-offset"), padding_1 = require("../utils/padding"), text_icon_layout_1 = require("../utils/text-icon-layout"), vutils_1 = require("@visactor/vutils"), break_string_1 = require("../utils/break-string"), invert_highlight_1 = require("../../plugins/invert-highlight"), cell_border_stroke_width_1 = require("../utils/cell-border-stroke-width");
|
|
7
|
+
const global_1 = require("../../tools/global"), custom_1 = require("../component/custom"), get_prop_1 = require("../utils/get-prop"), media_cell_helper_1 = require("./cell-type/media-cell-helper"), tableHelper_1 = require("../../core/tableHelper"), helper_1 = require("../../tools/helper"), deal_promise_data_1 = require("../utils/deal-promise-data"), factory_1 = require("../../core/factory"), get_hierarchy_offset_1 = require("../utils/get-hierarchy-offset"), padding_1 = require("../utils/padding"), text_icon_layout_1 = require("../utils/text-icon-layout"), vutils_1 = require("@visactor/vutils"), break_string_1 = require("../utils/break-string"), invert_highlight_1 = require("../../plugins/invert-highlight"), cell_border_stroke_width_1 = require("../utils/cell-border-stroke-width"), corner_custom_merge_1 = require("../utils/corner-custom-merge"), PROMISE_CELL_UPDATE_TOKEN_KEY = "__vtable_promise_cell_update_token__";
|
|
8
8
|
|
|
9
|
-
function
|
|
9
|
+
function nextPromiseCellUpdateToken(cellGroup) {
|
|
10
|
+
var _a;
|
|
11
|
+
const token = (null !== (_a = cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY]) && void 0 !== _a ? _a : 0) + 1;
|
|
12
|
+
return cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] = token, token;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function isPromiseCellUpdateCurrent(table, col, row, cellGroup, token) {
|
|
16
|
+
return table.scenegraph.highPerformanceGetCell(col, row, !0) === cellGroup && cellGroup[PROMISE_CELL_UPDATE_TOKEN_KEY] === token;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult, cellValue) {
|
|
10
20
|
var _a, _b;
|
|
11
21
|
let cellGroup, isAsync = !1;
|
|
22
|
+
const hasCellValue = arguments.length >= 19;
|
|
23
|
+
let renderValue = hasCellValue ? cellValue : value;
|
|
12
24
|
if ((0, helper_1.isPromise)(value)) {
|
|
13
25
|
if ("cell" !== table.scenegraph.highPerformanceGetCell(col, row).role) return cellGroup;
|
|
14
|
-
|
|
26
|
+
hasCellValue || (renderValue = table.getCellValue(col, row)), isAsync = !0;
|
|
15
27
|
}
|
|
16
|
-
if ("checkbox" === type && define.tree) {
|
|
17
|
-
cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0);
|
|
28
|
+
if (value = renderValue, "checkbox" === type && define.tree) {
|
|
29
|
+
cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !0, value);
|
|
18
30
|
} else if ("text" === type || "link" === type || customResult) {
|
|
19
31
|
if ("link" === type) {
|
|
20
32
|
const cellValue = value, cellOriginValue = table.getCellOriginValue(col, row), headerStyle = table._getCellStyle(col, row);
|
|
@@ -47,9 +59,11 @@ function createCell(type, value, define, table, col, row, colWidth, cellWidth, c
|
|
|
47
59
|
stroke: !1
|
|
48
60
|
}), cellGroup.clear()) : table.internalProps.layoutMap.isAxisCell(col, row) && cellGroup.clear();
|
|
49
61
|
} else if ("image" === type) {
|
|
50
|
-
cellGroup = factory_1.Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
|
|
62
|
+
cellGroup = factory_1.Factory.getFunction("createImageCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
|
|
63
|
+
} else if ("audio" === type) {
|
|
64
|
+
cellGroup = factory_1.Factory.getFunction("createAudioCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
|
|
51
65
|
} else if ("video" === type) {
|
|
52
|
-
cellGroup = factory_1.Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync);
|
|
66
|
+
cellGroup = factory_1.Factory.getFunction("createVideoCellGroup")(columnGroup, 0, y, col, row, cellWidth, cellHeight, define.keepAspectRatio, define.imageAutoSizing, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, range, isAsync, value);
|
|
53
67
|
} else if ("chart" === type) {
|
|
54
68
|
const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
|
|
55
69
|
cellGroup = factory_1.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));
|
|
@@ -59,23 +73,23 @@ function createCell(type, value, define, table, col, row, colWidth, cellWidth, c
|
|
|
59
73
|
const progressBarGroup = factory_1.Factory.getFunction("createProgressBarCell")(define, style, colWidth, value, dataValue, col, row, padding, table, range);
|
|
60
74
|
cellGroup.firstChild ? cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild) : cellGroup.appendChild(progressBarGroup);
|
|
61
75
|
} else if ("sparkline" === type) {
|
|
62
|
-
cellGroup = factory_1.Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
|
|
76
|
+
cellGroup = factory_1.Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync, value);
|
|
63
77
|
} else if ("checkbox" === type) {
|
|
64
78
|
if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
|
|
65
79
|
cellGroup = factory_1.Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
|
|
66
80
|
} else {
|
|
67
|
-
cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
|
|
81
|
+
cellGroup = factory_1.Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1, value);
|
|
68
82
|
}
|
|
69
83
|
} else if ("radio" === type) {
|
|
70
84
|
if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
|
|
71
85
|
cellGroup = factory_1.Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
|
|
72
86
|
} else {
|
|
73
|
-
cellGroup = factory_1.Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
|
|
87
|
+
cellGroup = factory_1.Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range, isAsync, value);
|
|
74
88
|
}
|
|
75
89
|
} else if ("switch" === type) {
|
|
76
|
-
cellGroup = factory_1.Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
|
|
90
|
+
cellGroup = factory_1.Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
|
|
77
91
|
} else if ("button" === type) {
|
|
78
|
-
cellGroup = factory_1.Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
|
|
92
|
+
cellGroup = factory_1.Factory.getFunction("createButtonCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, value);
|
|
79
93
|
}
|
|
80
94
|
return cellGroup.onBeforeAttributeUpdate = invert_highlight_1.onBeforeAttributeUpdateForInvertHighlight,
|
|
81
95
|
cellGroup;
|
|
@@ -83,13 +97,21 @@ function createCell(type, value, define, table, col, row, colWidth, cellWidth, c
|
|
|
83
97
|
|
|
84
98
|
function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
|
|
85
99
|
let customElementsGroup, renderDefault = !0;
|
|
86
|
-
if (
|
|
100
|
+
if (!(0, corner_custom_merge_1.shouldRenderCornerCustomMergeContent)(col, row, range, table)) return {
|
|
101
|
+
customElementsGroup: customElementsGroup,
|
|
102
|
+
renderDefault: !1
|
|
103
|
+
};
|
|
104
|
+
if (customResult) customElementsGroup = (0, corner_custom_merge_1.createCornerCustomMergeContainer)(customResult.elementsGroup, cellWidth, cellHeight, range, table),
|
|
105
|
+
renderDefault = customResult.renderDefault; else if ((null == range ? void 0 : range.isCustom) && !table.isCornerHeader(col, row)) ; else {
|
|
87
106
|
let customRender, customLayout;
|
|
88
107
|
if ("body" !== table.getCellLocation(col, row) ? (customRender = null == define ? void 0 : define.headerCustomRender,
|
|
89
108
|
customLayout = null == define ? void 0 : define.headerCustomLayout) : (customRender = (null == define ? void 0 : define.customRender) || table.customRender,
|
|
90
109
|
customLayout = null == define ? void 0 : define.customLayout), customLayout || customRender) {
|
|
91
|
-
const
|
|
92
|
-
|
|
110
|
+
const customCol = range && (0, corner_custom_merge_1.isCornerCustomMergeRange)(range, table) ? range.start.col : col, customRow = range && (0,
|
|
111
|
+
corner_custom_merge_1.isCornerCustomMergeRange)(range, table) ? range.start.row : row, customResult = (0,
|
|
112
|
+
custom_1.dealWithCustom)(customLayout, customRender, customCol, customRow, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
|
|
113
|
+
customElementsGroup = (0, corner_custom_merge_1.createCornerCustomMergeContainer)(customResult.elementsGroup, cellWidth, cellHeight, range, table),
|
|
114
|
+
renderDefault = customResult.renderDefault;
|
|
93
115
|
}
|
|
94
116
|
}
|
|
95
117
|
return {
|
|
@@ -109,7 +131,8 @@ function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
|
109
131
|
if (customMerge) {
|
|
110
132
|
const {range: customMergeRange, text: customMergeText, style: customMergeStyle, customLayout: customLayout, customRender: customRender} = customMerge;
|
|
111
133
|
range = customMergeRange, isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row,
|
|
112
|
-
value = customMergeText, customStyle = customMergeStyle, (customLayout || customRender) && (
|
|
134
|
+
value = customMergeText, customStyle = customMergeStyle, (customLayout || customRender) && (0,
|
|
135
|
+
corner_custom_merge_1.shouldRenderCornerCustomMergeContent)(col, row, customMergeRange, table) && (customResult = (0,
|
|
113
136
|
custom_1.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)),
|
|
114
137
|
isCustomMerge = !0;
|
|
115
138
|
}
|
|
@@ -195,27 +218,31 @@ function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
|
195
218
|
const type = isVtableMerge || isCustomMerge ? "text" : table.getCellType(col, row), padding = cellTheme._vtable.padding, textAlign = cellTheme.text.textAlign, textBaseline = cellTheme.text.textBaseline;
|
|
196
219
|
let newCellGroup, cellWidth, cellHeight;
|
|
197
220
|
if (range ? (cellWidth = table.getColsWidth(range.start.col, range.end.col), cellHeight = table.getRowsHeight(range.start.row, range.end.row)) : (cellWidth = table.getColWidth(col),
|
|
198
|
-
cellHeight = table.getRowHeight(row)), (0, helper_1.isPromise)(value)
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
221
|
+
cellHeight = table.getRowHeight(row)), (0, helper_1.isPromise)(value)) {
|
|
222
|
+
const updateToken = nextPromiseCellUpdateToken(oldCellGroup);
|
|
223
|
+
(0, media_cell_helper_1.removeCellMediaChildren)(oldCellGroup), oldCellGroup.removeAllChild(),
|
|
224
|
+
(0, deal_promise_data_1.dealPromiseData)(value, table, callUpdateCellContentForPromiseValue.bind(null, {
|
|
225
|
+
type: type,
|
|
226
|
+
define: define,
|
|
227
|
+
table: table,
|
|
228
|
+
col: col,
|
|
229
|
+
row: row,
|
|
230
|
+
cellWidth: cellWidth,
|
|
231
|
+
cellHeight: cellHeight,
|
|
232
|
+
oldCellGroup: oldCellGroup,
|
|
233
|
+
padding: padding,
|
|
234
|
+
textAlign: textAlign,
|
|
235
|
+
textBaseline: textBaseline,
|
|
236
|
+
mayHaveIcon: mayHaveIcon,
|
|
237
|
+
addNew: addNew,
|
|
238
|
+
range: range,
|
|
239
|
+
customResult: customResult,
|
|
240
|
+
customStyle: customStyle,
|
|
241
|
+
promiseValue: value,
|
|
242
|
+
updateToken: updateToken
|
|
243
|
+
}));
|
|
244
|
+
} else newCellGroup = updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult);
|
|
245
|
+
if (isMerge) {
|
|
219
246
|
const {width: contentWidth} = newCellGroup.attribute, {height: contentHeight} = newCellGroup.attribute;
|
|
220
247
|
newCellGroup.contentWidth = contentWidth, newCellGroup.contentHeight = contentHeight,
|
|
221
248
|
isShadow ? dealWithMergeCellSizeForShadow(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table, newCellGroup) : dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table);
|
|
@@ -223,9 +250,10 @@ function updateCell(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
|
223
250
|
return newCellGroup;
|
|
224
251
|
}
|
|
225
252
|
|
|
226
|
-
function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult) {
|
|
253
|
+
function updateCellContent(type, value, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, cellValue) {
|
|
227
254
|
var _a, _b;
|
|
228
|
-
|
|
255
|
+
const hasCellValue = arguments.length >= 18;
|
|
256
|
+
if (!addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
|
|
229
257
|
if (!addNew && oldCellGroup.parent && table.reactCustomLayout) {
|
|
230
258
|
const reactGroup = oldCellGroup.getChildByName(custom_1.CUSTOM_CONTAINER_NAME);
|
|
231
259
|
if (reactGroup) {
|
|
@@ -233,9 +261,12 @@ function updateCellContent(type, value, define, table, col, row, cellWidth, cell
|
|
|
233
261
|
(0, vutils_1.isNumber)(col) && (0, vutils_1.isNumber)(row) && table.reactCustomLayout.removeCustomCell(col, row);
|
|
234
262
|
}
|
|
235
263
|
}
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
264
|
+
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 ];
|
|
265
|
+
hasCellValue && createCellArgs.push(cellValue);
|
|
266
|
+
const newCellGroup = createCell(...createCellArgs);
|
|
267
|
+
return !addNew && oldCellGroup.parent && newCellGroup !== oldCellGroup && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup),
|
|
268
|
+
oldCellGroup.parent.removeChild(oldCellGroup), (0, media_cell_helper_1.removeCellMediaChildren)(oldCellGroup),
|
|
269
|
+
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))),
|
|
239
270
|
newCellGroup;
|
|
240
271
|
}
|
|
241
272
|
|
|
@@ -246,11 +277,13 @@ function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, tab
|
|
|
246
277
|
helper_1.isPromise)(value));
|
|
247
278
|
}
|
|
248
279
|
|
|
249
|
-
function callUpdateCellContentForPromiseValue(updateCellArgs) {
|
|
250
|
-
const {type: type,
|
|
280
|
+
function callUpdateCellContentForPromiseValue(updateCellArgs, resolvedValue) {
|
|
281
|
+
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;
|
|
282
|
+
if (!isPromiseCellUpdateCurrent(table, col, row, oldCellGroup, updateToken)) return;
|
|
283
|
+
const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row), cellTheme = (0,
|
|
251
284
|
tableHelper_1.getStyleTheme)(cellStyle, table, range ? range.start.col : col, range ? range.start.row : row, get_prop_1.getProp).theme;
|
|
252
285
|
cellTheme.group.cornerRadius = (0, tableHelper_1.getCellCornerRadius)(col, row, table),
|
|
253
|
-
updateCellContent(type,
|
|
286
|
+
updateCellContent(type, promiseValue, define, table, col, row, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, addNew, cellTheme, range, customResult, resolvedValue);
|
|
254
287
|
}
|
|
255
288
|
|
|
256
289
|
function dealWithMergeCellSize(range, cellWidth, cellHeight, padding, textAlign, textBaseline, table) {
|
|
@@ -322,16 +355,25 @@ function getCustomCellMergeCustom(col, row, cellGroup, table) {
|
|
|
322
355
|
if (customMerge) {
|
|
323
356
|
const {range: customMergeRange, text: customMergeText, style: customMergeStyle, customLayout: customMergeLayout, customRender: customMergeRender} = customMerge;
|
|
324
357
|
if (customMergeLayout || customMergeRender) {
|
|
325
|
-
const
|
|
326
|
-
cellGroup.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
358
|
+
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);
|
|
359
|
+
if (cellGroup.contentWidth = contentWidth, cellGroup.contentHeight = contentHeight,
|
|
360
|
+
!(0, corner_custom_merge_1.shouldRenderCornerCustomMergeContent)(col, row, customMergeRange, table)) {
|
|
361
|
+
const customContainer = cellGroup.getChildByName(custom_1.CUSTOM_CONTAINER_NAME);
|
|
362
|
+
return customContainer && cellGroup.removeChild(customContainer), cellGroup.setAttribute("clip", !0),
|
|
363
|
+
resizeCellGroup(cellGroup, rangeWidth, rangeHeight, customMergeRange, table), customMergeRange;
|
|
364
|
+
}
|
|
365
|
+
const customResult = (0, custom_1.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 = (0,
|
|
366
|
+
corner_custom_merge_1.createCornerCustomMergeContainer)(customResult.elementsGroup, contentWidth, contentHeight, customMergeRange, table);
|
|
367
|
+
return cellGroup.childrenCount > 0 && customElementsGroup ? cellGroup.insertBefore(customElementsGroup, cellGroup.firstChild) : customElementsGroup && cellGroup.appendChild(customElementsGroup),
|
|
368
|
+
resizeCellGroup(cellGroup, rangeWidth, rangeHeight, customMergeRange, table), (0,
|
|
369
|
+
corner_custom_merge_1.isCornerCustomMergeRange)(customMergeRange, table) && cellGroup.setAttribute("clip", !1),
|
|
370
|
+
customMergeRange;
|
|
330
371
|
}
|
|
331
372
|
}
|
|
332
373
|
}
|
|
333
374
|
}
|
|
334
375
|
|
|
376
|
+
exports.nextPromiseCellUpdateToken = nextPromiseCellUpdateToken, exports.isPromiseCellUpdateCurrent = isPromiseCellUpdateCurrent,
|
|
335
377
|
exports.createCell = createCell, exports.updateCell = updateCell, exports.dealWithMergeCellSize = dealWithMergeCellSize,
|
|
336
378
|
exports.dealWithMergeCellSizeForShadow = dealWithMergeCellSizeForShadow, exports.resizeCellGroup = resizeCellGroup,
|
|
337
379
|
exports.getCustomCellMergeCustom = getCustomCellMergeCustom;
|