@visactor/vtable 1.22.7 → 1.22.8-alpha.13

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 (67) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +6 -3
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/body-helper/style.js +1 -2
  5. package/cjs/core/BaseTable.js +5 -3
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
  8. package/cjs/core/TABLE_EVENT_TYPE.js +3 -1
  9. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  10. package/cjs/data/DataSource.d.ts +1 -1
  11. package/cjs/data/DataSource.js +4 -3
  12. package/cjs/data/DataSource.js.map +1 -1
  13. package/cjs/dataset/dataset-pivot-table.js +1 -2
  14. package/cjs/dataset/dataset.js +5 -3
  15. package/cjs/dataset/dataset.js.map +1 -1
  16. package/cjs/event/drill.js +2 -1
  17. package/cjs/event/event.js.map +1 -1
  18. package/cjs/index.d.ts +1 -1
  19. package/cjs/index.js +1 -1
  20. package/cjs/index.js.map +1 -1
  21. package/cjs/layout/index.js +1 -2
  22. package/cjs/layout/pivot-header-layout.js +1 -0
  23. package/cjs/plugins/plugin-manager.d.ts +2 -0
  24. package/cjs/plugins/plugin-manager.js +13 -6
  25. package/cjs/plugins/plugin-manager.js.map +1 -1
  26. package/cjs/state/state.js +11 -9
  27. package/cjs/state/state.js.map +1 -1
  28. package/cjs/ts-types/events.d.ts +8 -0
  29. package/cjs/ts-types/events.js.map +1 -1
  30. package/cjs/ts-types/list-table/define/index.d.ts +9 -2
  31. package/cjs/ts-types/list-table/define/index.js.map +1 -1
  32. package/cjs/vrender.js.map +1 -1
  33. package/dist/vtable.js +62 -26
  34. package/dist/vtable.min.js +2 -2
  35. package/es/ListTable.d.ts +1 -0
  36. package/es/ListTable.js +7 -4
  37. package/es/ListTable.js.map +1 -1
  38. package/es/body-helper/style.js +1 -2
  39. package/es/core/BaseTable.js +5 -3
  40. package/es/core/BaseTable.js.map +1 -1
  41. package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
  42. package/es/core/TABLE_EVENT_TYPE.js +3 -1
  43. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  44. package/es/data/DataSource.d.ts +1 -1
  45. package/es/data/DataSource.js +4 -3
  46. package/es/data/DataSource.js.map +1 -1
  47. package/es/dataset/dataset-pivot-table.js +1 -2
  48. package/es/dataset/dataset.js +5 -3
  49. package/es/dataset/dataset.js.map +1 -1
  50. package/es/event/drill.js +2 -1
  51. package/es/event/event.js.map +1 -1
  52. package/es/index.d.ts +1 -1
  53. package/es/index.js +1 -1
  54. package/es/index.js.map +1 -1
  55. package/es/layout/index.js +1 -2
  56. package/es/layout/pivot-header-layout.js +2 -1
  57. package/es/plugins/plugin-manager.d.ts +2 -0
  58. package/es/plugins/plugin-manager.js +13 -6
  59. package/es/plugins/plugin-manager.js.map +1 -1
  60. package/es/state/state.js +11 -9
  61. package/es/state/state.js.map +1 -1
  62. package/es/ts-types/events.d.ts +8 -0
  63. package/es/ts-types/events.js.map +1 -1
  64. package/es/ts-types/list-table/define/index.d.ts +9 -2
  65. package/es/ts-types/list-table/define/index.js.map +1 -1
  66. package/es/vrender.js.map +1 -1
  67. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ts-types/events.ts"],"names":[],"mappings":"","file":"events.js","sourcesContent":["import type {\n CellAddress,\n CellRange,\n CellLocation,\n FieldDef,\n CellAddressWithBound,\n ListTableConstructorOptions,\n PivotTableConstructorOptions\n} from './table-engine';\nimport type { DropDownMenuEventArgs, MenuListItem, PivotInfo } from './menu';\n\nimport type { IDimensionInfo, MergeCellInfo, RectProps, SortOrder } from './common';\nimport type { IconFuncTypeEnum, CellInfo, HierarchyState, ColumnsDefine } from '.';\nimport type { Icon } from '../scenegraph/graphic/icon';\nimport type { FederatedPointerEvent, Group, IEventTarget } from './../vrender';\nimport type { BaseTableConstructorOptions, BaseTableAPI } from './base-table';\n\nexport type KeyboardEventListener = (e: KeyboardEvent) => void;\nexport type TableEventListener<TYPE extends keyof TableEventHandlersEventArgumentMap> = (\n args: TableEventHandlersEventArgumentMap[TYPE]\n) => TableEventHandlersReturnMap[TYPE]; //AnyFunction;\nexport type EventListenerId = number;\n\nexport type SelectedCellEvent = CellAddress & {\n ranges: CellRange[];\n};\n\n// export type MouseCellEvent = CellAddress & {\n// event: MouseEvent | PointerEvent | TouchEvent;\n// };\n\nexport type MenuEvent = CellAddress & {\n dropDownMenu: MenuListItem[];\n pivotInfo: PivotInfo;\n};\n\nexport type TouchCellEvent = CellAddress & {\n event: TouchEvent;\n};\n\nexport type KeydownEvent = {\n keyCode: number;\n code: string;\n event: KeyboardEvent;\n stopCellMoving?: () => void;\n scaleRatio?: number;\n};\n\nexport type MousePointerCellEvent = CellAddressWithBound &\n CellInfo & {\n scaleRatio?: number;\n targetIcon?: { name: string; position: RectProps; funcType: string };\n event?: MouseEvent | PointerEvent | TouchEvent;\n federatedEvent?: FederatedPointerEvent;\n target: IEventTarget | undefined;\n\n mergeCellInfo?: MergeCellInfo;\n };\n// 多单元格的事件传出参数 需要将当前鼠标处的单元格的信息FocusedCellInfo也带着\nexport type MousePointerMultiCellEvent = MousePointerCellEvent & {\n cells: CellInfo[][];\n // menuKey?: string;\n};\n\nexport type MousePointerSparklineEvent = MousePointerCellEvent & {\n sparkline: {\n pointData: any;\n };\n};\n\nexport interface TableEventHandlersEventArgumentMap {\n selected_cell: SelectedCellEvent;\n selected_clear: {};\n click_cell: MousePointerCellEvent;\n dblclick_cell: MousePointerCellEvent;\n mouseenter_table: { event?: MouseEvent | PointerEvent | TouchEvent };\n mouseleave_table: { event?: MouseEvent | PointerEvent | TouchEvent };\n mousedown_table: { event?: MouseEvent | PointerEvent | TouchEvent };\n mousemove_table: MousePointerCellEvent;\n mouseenter_cell: MousePointerCellEvent;\n mouseleave_cell: MousePointerCellEvent;\n mousemove_cell: MousePointerCellEvent;\n mousedown_cell: MousePointerCellEvent;\n mouseup_cell: MousePointerCellEvent;\n contextmenu_cell: MousePointerMultiCellEvent;\n contextmenu_canvas: MousePointerCellEvent;\n before_keydown: KeydownEvent;\n keydown: KeydownEvent;\n scroll: {\n event: WheelEvent;\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n scrollDirection: 'horizontal' | 'vertical';\n scrollRatioX?: number;\n scrollRatioY?: number;\n dx?: number;\n dy?: number;\n };\n can_scroll: {\n event: WheelEvent;\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n scrollDirection: 'horizontal' | 'vertical';\n scrollRatioX?: number;\n scrollRatioY?: number;\n dx?: number;\n dy?: number;\n };\n scroll_vertical_end: {\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n };\n scroll_horizontal_end: {\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n };\n resize_column: { col: number; colWidth: number };\n resize_column_end: { col: number; colWidths: number[] };\n resize_row: { row: number; rowHeight: number };\n resize_row_end: { row: number; rowHeight: number };\n change_header_position: {\n source: CellAddress;\n target: CellAddress;\n movingColumnOrRow?: 'column' | 'row';\n event: Event;\n };\n change_header_position_start: {\n col: number;\n row: number;\n x: number;\n y: number;\n backX: number;\n lineX: number;\n backY: number;\n lineY: number;\n event: Event;\n movingColumnOrRow?: 'column' | 'row';\n };\n changing_header_position: {\n col: number;\n row: number;\n x: number;\n y: number;\n backX: number;\n lineX: number;\n backY: number;\n lineY: number;\n event: Event;\n movingColumnOrRow?: 'column' | 'row';\n };\n change_header_position_fail: {\n source: CellAddress;\n target: CellAddress;\n movingColumnOrRow?: 'column' | 'row';\n event: Event;\n };\n sort_click: {\n field: FieldDef;\n order: SortOrder;\n event: Event;\n };\n after_sort: {\n field: FieldDef;\n order: SortOrder;\n event: Event;\n };\n freeze_click: { col: number; row: number; fields: FieldDef[]; colCount: number };\n dropdown_menu_click: DropDownMenuEventArgs;\n\n mouseover_chart_symbol: MousePointerSparklineEvent;\n\n drag_select_end: MousePointerMultiCellEvent;\n selected_changed: {\n col: number;\n row: number;\n ranges: CellRange[];\n };\n copy_data: { cellRange: CellRange[]; copyData: string; isCut: boolean };\n drillmenu_click: DrillMenuEventInfo;\n\n dropdown_icon_click: CellAddress & { event: Event };\n dropdown_menu_clear: CellAddress;\n\n show_menu: {\n x: number;\n y: number;\n col: number;\n row: number;\n type: 'dropDown' | 'contextmenu' | 'custom';\n };\n hide_menu: [];\n icon_click: {\n name: string;\n col: number;\n row: number;\n x: number;\n y: number;\n funcType?: IconFuncTypeEnum | string;\n icon: Icon;\n event: Event;\n };\n\n pivot_sort_click: {\n col: number;\n row: number;\n order: SortOrder;\n dimensionInfo: IDimensionInfo[];\n cellLocation: CellLocation;\n event: Event;\n };\n tree_hierarchy_state_change: {\n col: number;\n row: number;\n changeAll?: boolean;\n hierarchyState: HierarchyState;\n dimensionInfo?: IDimensionInfo[];\n /**整条数据-原始数据 */\n originData?: any;\n cellLocation?: CellLocation;\n };\n vchart_event_type: {\n eventName: string;\n col: number;\n row: number;\n chartEventArguments: any;\n };\n //datasource部分的事件\n change_order: [];\n source_length_update: number;\n\n legend_item_click: { model: any; value: any; event: PointerEvent };\n legend_item_hover: { model: any; value: any; event: PointerEvent };\n legend_item_unHover: { model: any; value: any; event: PointerEvent };\n legend_change: { model: any; value: any; event: PointerEvent };\n\n mouseenter_axis: MousePointerCellEvent & { axisPosition: 'left' | 'right' | 'top' | 'bottom' };\n mouseleave_axis: MousePointerCellEvent & { axisPosition: 'left' | 'right' | 'top' | 'bottom' };\n\n checkbox_state_change: MousePointerCellEvent & { checked: boolean };\n radio_state_change: MousePointerCellEvent & { radioIndexInCell: number | undefined };\n switch_state_change: MousePointerCellEvent & { checked: boolean };\n before_init: { options: BaseTableConstructorOptions; container: HTMLElement | null };\n before_update_option: { options: BaseTableConstructorOptions; container: HTMLElement | null };\n before_set_size: { width: number; height: number };\n after_render: null;\n initialized: null;\n updated: null;\n after_update_cell_content_width: {\n col: number;\n row: number;\n cellHeight: number;\n cellGroup: Group;\n padding: [number, number, number, number];\n textBaseline: CanvasTextBaseline;\n };\n\n after_update_select_border_height: {\n startRow: number;\n endRow: number;\n currentHeight: number;\n selectComp: { rect: any; fillhandle?: any; role: string };\n };\n\n change_cell_value: {\n col: number;\n row: number;\n rawValue: string | number;\n currentValue: string | number;\n changedValue: string | number;\n };\n\n mousedown_fill_handle: {};\n drag_fill_handle_end: { direction?: 'top' | 'bottom' | 'left' | 'right' };\n dblclick_fill_handle: {};\n\n empty_tip_click: {};\n empty_tip_dblclick: {};\n\n button_click: {\n col: number;\n row: number;\n event: Event;\n };\n before_cache_chart_image: { chartInstance: any };\n pasted_data: {\n col: number;\n row: number;\n pasteData: (string | number)[][];\n changedCellResults: boolean[][];\n };\n plugin_event: {\n event: any;\n plugin: any;\n pluginEventInfo: any;\n };\n\n add_record: {\n records: any[];\n recordIndex?: number | number[];\n recordCount: number;\n };\n\n delete_record: {\n recordIndexs: number[] | number[][];\n rowIndexs: number[];\n deletedCount: number;\n };\n\n update_record: {\n records: any[];\n recordIndexs: (number | number[])[];\n updateCount: number;\n };\n add_column: {\n columnIndex: number;\n columnCount: number;\n columns: ColumnsDefine;\n };\n delete_column: {\n // deleteBeforeColumns: ColumnsDefine;\n deleteColIndexs: number[];\n columns: ColumnsDefine;\n };\n}\nexport interface DrillMenuEventInfo {\n dimensionKey: string | number;\n title: string;\n drillDown: boolean;\n drillUp: boolean;\n col: number;\n row: number;\n event: Event;\n}\nexport interface TableEventHandlersReturnMap {\n selected_cell: void;\n selected_clear: void;\n click_cell: void;\n dblclick_cell: void;\n mouseenter_table: void;\n mouseleave_table: void;\n mousedown_table: void;\n mousemove_table: void;\n mouseenter_cell: void;\n mouseleave_cell: void;\n // mouseover_cell: void;\n mouseout_cell: void;\n mousemove_cell: void;\n mousedown_cell: void;\n mouseup_cell: void;\n contextmenu_cell: void;\n contextmenu_canvas: void;\n before_keydown: void;\n keydown: void;\n scroll: void;\n can_scroll: void | boolean;\n focus_table: void;\n blur_table: void;\n resize_column: void;\n resize_column_end: void;\n resize_row: void;\n resize_row_end: void;\n change_header_position: void;\n change_header_position_start: void;\n changing_header_position: void;\n change_header_position_fail: void;\n sort_click: boolean;\n after_sort: void;\n freeze_click: void;\n dropdown_menu_click: void;\n\n mouseover_chart_symbol: void;\n drag_select_end: void;\n selected_changed: void;\n copy_data: void;\n drillmenu_click: void;\n\n dropdown_icon_click: void;\n dropdown_menu_clear: void;\n\n show_menu: void;\n hide_menu: void;\n icon_click: void;\n\n pivot_sort_click: void;\n\n tree_hierarchy_state_change: void;\n\n vchart_event_type: void;\n //datasource部分的事件\n change_order: void;\n source_length_update: void;\n legend_item_click: void;\n legend_item_hover: void;\n legend_item_unHover: void;\n legend_change: void;\n\n mouseenter_axis: void;\n mouseleave_axis: void;\n\n checkbox_state_change: void;\n radio_state_change: void;\n switch_state_change: void;\n before_init: void;\n before_update_option: void;\n before_set_size: void;\n after_render: void;\n initialized: void;\n updated: void;\n after_update_cell_content_width: void;\n\n after_update_select_border_height: void;\n change_cell_value: void;\n mousedown_fill_handle: void;\n drag_fill_handle_end: void;\n dblclick_fill_handle: void;\n\n scroll_vertical_end: void;\n\n scroll_horizontal_end: void;\n\n empty_tip_click: void;\n empty_tip_dblclick: void;\n\n button_click: void;\n before_cache_chart_image: void;\n pasted_data: void;\n plugin_event: void;\n\n add_record: void;\n delete_record: void;\n update_record: void;\n add_column: void;\n delete_column: void;\n}\n"]}
1
+ {"version":3,"sources":["../src/ts-types/events.ts"],"names":[],"mappings":"","file":"events.js","sourcesContent":["import type {\n CellAddress,\n CellRange,\n CellLocation,\n FieldDef,\n CellAddressWithBound,\n ListTableConstructorOptions,\n PivotTableConstructorOptions\n} from './table-engine';\nimport type { DropDownMenuEventArgs, MenuListItem, PivotInfo } from './menu';\n\nimport type { IDimensionInfo, MergeCellInfo, RectProps, SortOrder } from './common';\nimport type { IconFuncTypeEnum, CellInfo, HierarchyState, ColumnsDefine } from '.';\nimport type { Icon } from '../scenegraph/graphic/icon';\nimport type { FederatedPointerEvent, Group, IEventTarget } from './../vrender';\nimport type { BaseTableConstructorOptions, BaseTableAPI } from './base-table';\n\nexport type KeyboardEventListener = (e: KeyboardEvent) => void;\nexport type TableEventListener<TYPE extends keyof TableEventHandlersEventArgumentMap> = (\n args: TableEventHandlersEventArgumentMap[TYPE]\n) => TableEventHandlersReturnMap[TYPE]; //AnyFunction;\nexport type EventListenerId = number;\n\nexport type SelectedCellEvent = CellAddress & {\n ranges: CellRange[];\n};\n\n// export type MouseCellEvent = CellAddress & {\n// event: MouseEvent | PointerEvent | TouchEvent;\n// };\n\nexport type MenuEvent = CellAddress & {\n dropDownMenu: MenuListItem[];\n pivotInfo: PivotInfo;\n};\n\nexport type TouchCellEvent = CellAddress & {\n event: TouchEvent;\n};\n\nexport type KeydownEvent = {\n keyCode: number;\n code: string;\n event: KeyboardEvent;\n stopCellMoving?: () => void;\n scaleRatio?: number;\n};\n\nexport type MousePointerCellEvent = CellAddressWithBound &\n CellInfo & {\n scaleRatio?: number;\n targetIcon?: { name: string; position: RectProps; funcType: string };\n event?: MouseEvent | PointerEvent | TouchEvent;\n federatedEvent?: FederatedPointerEvent;\n target: IEventTarget | undefined;\n\n mergeCellInfo?: MergeCellInfo;\n };\n// 多单元格的事件传出参数 需要将当前鼠标处的单元格的信息FocusedCellInfo也带着\nexport type MousePointerMultiCellEvent = MousePointerCellEvent & {\n cells: CellInfo[][];\n // menuKey?: string;\n};\n\nexport type MousePointerSparklineEvent = MousePointerCellEvent & {\n sparkline: {\n pointData: any;\n };\n};\n\nexport interface TableEventHandlersEventArgumentMap {\n selected_cell: SelectedCellEvent;\n selected_clear: {};\n click_cell: MousePointerCellEvent;\n dblclick_cell: MousePointerCellEvent;\n mouseenter_table: { event?: MouseEvent | PointerEvent | TouchEvent };\n mouseleave_table: { event?: MouseEvent | PointerEvent | TouchEvent };\n mousedown_table: { event?: MouseEvent | PointerEvent | TouchEvent };\n mousemove_table: MousePointerCellEvent;\n mouseenter_cell: MousePointerCellEvent;\n mouseleave_cell: MousePointerCellEvent;\n mousemove_cell: MousePointerCellEvent;\n mousedown_cell: MousePointerCellEvent;\n mouseup_cell: MousePointerCellEvent;\n contextmenu_cell: MousePointerMultiCellEvent;\n contextmenu_canvas: MousePointerCellEvent;\n before_keydown: KeydownEvent;\n keydown: KeydownEvent;\n scroll: {\n event: WheelEvent;\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n scrollDirection: 'horizontal' | 'vertical';\n scrollRatioX?: number;\n scrollRatioY?: number;\n dx?: number;\n dy?: number;\n };\n can_scroll: {\n event: WheelEvent;\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n scrollDirection: 'horizontal' | 'vertical';\n scrollRatioX?: number;\n scrollRatioY?: number;\n dx?: number;\n dy?: number;\n };\n scroll_vertical_end: {\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n };\n scroll_horizontal_end: {\n scrollLeft: number;\n scrollTop: number;\n scrollWidth: number;\n scrollHeight: number;\n viewWidth: number;\n viewHeight: number;\n };\n resize_column: { col: number; colWidth: number };\n resize_column_end: { col: number; colWidths: number[] };\n resize_row: { row: number; rowHeight: number };\n resize_row_end: { row: number; rowHeight: number };\n change_header_position: {\n source: CellAddress;\n target: CellAddress;\n movingColumnOrRow?: 'column' | 'row';\n event: Event;\n };\n change_header_position_start: {\n col: number;\n row: number;\n x: number;\n y: number;\n backX: number;\n lineX: number;\n backY: number;\n lineY: number;\n event: Event;\n movingColumnOrRow?: 'column' | 'row';\n };\n changing_header_position: {\n col: number;\n row: number;\n x: number;\n y: number;\n backX: number;\n lineX: number;\n backY: number;\n lineY: number;\n event: Event;\n movingColumnOrRow?: 'column' | 'row';\n };\n change_header_position_fail: {\n source: CellAddress;\n target: CellAddress;\n movingColumnOrRow?: 'column' | 'row';\n event: Event;\n };\n sort_click: {\n field: FieldDef;\n order: SortOrder;\n event: Event;\n };\n after_sort: {\n field: FieldDef;\n order: SortOrder;\n event: Event;\n };\n freeze_click: { col: number; row: number; fields: FieldDef[]; colCount: number };\n dropdown_menu_click: DropDownMenuEventArgs;\n\n mouseover_chart_symbol: MousePointerSparklineEvent;\n\n drag_select_end: MousePointerMultiCellEvent;\n selected_changed: {\n col: number;\n row: number;\n ranges: CellRange[];\n };\n copy_data: { cellRange: CellRange[]; copyData: string; isCut: boolean };\n drillmenu_click: DrillMenuEventInfo;\n\n dropdown_icon_click: CellAddress & { event: Event };\n dropdown_menu_clear: CellAddress;\n\n show_menu: {\n x: number;\n y: number;\n col: number;\n row: number;\n type: 'dropDown' | 'contextmenu' | 'custom';\n };\n hide_menu: [];\n icon_click: {\n name: string;\n col: number;\n row: number;\n x: number;\n y: number;\n funcType?: IconFuncTypeEnum | string;\n icon: Icon;\n event: Event;\n };\n\n pivot_sort_click: {\n col: number;\n row: number;\n order: SortOrder;\n dimensionInfo: IDimensionInfo[];\n cellLocation: CellLocation;\n event: Event;\n };\n tree_hierarchy_state_change: {\n col: number;\n row: number;\n changeAll?: boolean;\n hierarchyState: HierarchyState;\n dimensionInfo?: IDimensionInfo[];\n /**整条数据-原始数据 */\n originData?: any;\n cellLocation?: CellLocation;\n };\n vchart_event_type: {\n eventName: string;\n col: number;\n row: number;\n chartEventArguments: any;\n };\n //datasource部分的事件\n change_order: [];\n source_length_update: number;\n\n legend_item_click: { model: any; value: any; event: PointerEvent };\n legend_item_hover: { model: any; value: any; event: PointerEvent };\n legend_item_unHover: { model: any; value: any; event: PointerEvent };\n legend_change: { model: any; value: any; event: PointerEvent };\n\n mouseenter_axis: MousePointerCellEvent & { axisPosition: 'left' | 'right' | 'top' | 'bottom' };\n mouseleave_axis: MousePointerCellEvent & { axisPosition: 'left' | 'right' | 'top' | 'bottom' };\n\n checkbox_state_change: MousePointerCellEvent & { checked: boolean };\n radio_state_change: MousePointerCellEvent & { radioIndexInCell: number | undefined };\n switch_state_change: MousePointerCellEvent & { checked: boolean };\n before_init: { options: BaseTableConstructorOptions; container: HTMLElement | null };\n before_update_option: { options: BaseTableConstructorOptions; container: HTMLElement | null };\n before_set_size: { width: number; height: number };\n after_render: null;\n initialized: null;\n updated: null;\n after_update_cell_content_width: {\n col: number;\n row: number;\n cellHeight: number;\n cellGroup: Group;\n padding: [number, number, number, number];\n textBaseline: CanvasTextBaseline;\n };\n\n after_update_select_border_height: {\n startRow: number;\n endRow: number;\n currentHeight: number;\n selectComp: { rect: any; fillhandle?: any; role: string };\n };\n\n change_cell_value: {\n col: number;\n row: number;\n rawValue: string | number;\n currentValue: string | number;\n changedValue: string | number;\n };\n\n mousedown_fill_handle: {};\n drag_fill_handle_end: { direction?: 'top' | 'bottom' | 'left' | 'right' };\n dblclick_fill_handle: {};\n\n empty_tip_click: {};\n empty_tip_dblclick: {};\n\n button_click: {\n col: number;\n row: number;\n event: Event;\n };\n before_cache_chart_image: { chartInstance: any };\n pasted_data: {\n col: number;\n row: number;\n pasteData: (string | number)[][];\n changedCellResults: boolean[][];\n };\n plugin_event: {\n event: any;\n plugin: any;\n pluginEventInfo: any;\n };\n\n add_record: {\n records: any[];\n recordIndex?: number | number[];\n recordCount: number;\n };\n\n delete_record: {\n recordIndexs: number[] | number[][];\n rowIndexs: number[];\n deletedCount: number;\n };\n\n update_record: {\n records: any[];\n recordIndexs: (number | number[])[];\n updateCount: number;\n };\n add_column: {\n columnIndex: number;\n columnCount: number;\n columns: ColumnsDefine;\n };\n delete_column: {\n // deleteBeforeColumns: ColumnsDefine;\n deleteColIndexs: number[];\n columns: ColumnsDefine;\n };\n}\nexport interface DrillMenuEventInfo {\n dimensionKey: string | number;\n title: string;\n drillDown: boolean;\n drillUp: boolean;\n col: number;\n row: number;\n event: Event;\n}\nexport interface TableEventHandlersReturnMap {\n selected_cell: void;\n selected_clear: void;\n click_cell: void;\n dblclick_cell: void;\n mouseenter_table: void;\n mouseleave_table: void;\n mousedown_table: void;\n mousemove_table: void;\n mouseenter_cell: void;\n mouseleave_cell: void;\n // mouseover_cell: void;\n mouseout_cell: void;\n mousemove_cell: void;\n mousedown_cell: void;\n mouseup_cell: void;\n contextmenu_cell: void;\n contextmenu_canvas: void;\n before_keydown: void;\n keydown: void;\n scroll: void;\n can_scroll: void | boolean;\n focus_table: void;\n blur_table: void;\n resize_column: void;\n resize_column_end: void;\n resize_row: void;\n resize_row_end: void;\n change_header_position: void;\n change_header_position_start: void;\n changing_header_position: void;\n change_header_position_fail: void;\n sort_click: boolean;\n after_sort: void;\n freeze_click: void;\n dropdown_menu_click: void;\n\n mouseover_chart_symbol: void;\n drag_select_end: void;\n selected_changed: void;\n copy_data: void;\n drillmenu_click: void;\n\n dropdown_icon_click: void;\n dropdown_menu_clear: void;\n\n show_menu: void;\n hide_menu: void;\n icon_click: void;\n\n pivot_sort_click: void;\n\n tree_hierarchy_state_change: void;\n\n vchart_event_type: void;\n //datasource部分的事件\n change_order: void;\n source_length_update: void;\n legend_item_click: void;\n legend_item_hover: void;\n legend_item_unHover: void;\n legend_change: void;\n\n mouseenter_axis: void;\n mouseleave_axis: void;\n\n checkbox_state_change: void;\n radio_state_change: void;\n switch_state_change: void;\n before_init: void;\n before_update_option: void;\n before_set_size: void;\n after_render: void;\n initialized: void;\n updated: void;\n after_update_cell_content_width: void;\n\n after_update_select_border_height: void;\n change_cell_value: void;\n mousedown_fill_handle: void;\n drag_fill_handle_end: void;\n dblclick_fill_handle: void;\n\n scroll_vertical_end: void;\n\n scroll_horizontal_end: void;\n\n empty_tip_click: void;\n empty_tip_dblclick: void;\n\n button_click: void;\n before_cache_chart_image: void;\n pasted_data: void;\n plugin_event: void;\n\n add_record: void;\n delete_record: void;\n update_record: void;\n add_column: void;\n delete_column: void;\n\n filter_menu_show: { col: number; row: number };\n filter_menu_hide: { col: number; row: number };\n}\n"]}
@@ -11,7 +11,10 @@ import type { IRadioColumnBodyDefine } from './radio-define';
11
11
  import type { ISwitchColumnBodyDefine } from './switch-define';
12
12
  import type { IButtonColumnBodyDefine } from './button-define';
13
13
  export type HeaderDefine = IImageHeaderDefine | ILinkHeaderDefine | ICheckboxHeaderDefine | ITextHeaderDefine;
14
- export type ColumnBodyDefine = ILinkColumnBodyDefine | IImageColumnBodyDefine | ISparklineColumnBodyDefine | IProgressbarColumnBodyDefine | ICheckboxColumnBodyDefine | IRadioColumnBodyDefine | IChartColumnBodyDefine | ITextColumnBodyDefine | ISwitchColumnBodyDefine | IButtonColumnBodyDefine;
14
+ export type BuiltinColumnBodyDefine = ILinkColumnBodyDefine | IImageColumnBodyDefine | ISparklineColumnBodyDefine | IProgressbarColumnBodyDefine | ICheckboxColumnBodyDefine | IRadioColumnBodyDefine | IChartColumnBodyDefine | ITextColumnBodyDefine | ISwitchColumnBodyDefine | IButtonColumnBodyDefine;
15
+ export interface CustomColumnBodyDefineMap {
16
+ }
17
+ export type ColumnBodyDefine = BuiltinColumnBodyDefine | CustomColumnBodyDefineMap[keyof CustomColumnBodyDefineMap];
15
18
  export type TextColumnDefine = ITextColumnBodyDefine & HeaderDefine;
16
19
  export type LinkColumnDefine = ILinkColumnBodyDefine & HeaderDefine;
17
20
  export type ImageColumnDefine = IImageColumnBodyDefine & HeaderDefine;
@@ -23,9 +26,13 @@ export type ChartColumnDefine = IChartColumnBodyDefine & HeaderDefine;
23
26
  export type CompositeColumnDefine = ICompositeColumnBodyDefine & HeaderDefine;
24
27
  export type SwitchColumnDefine = ISwitchColumnBodyDefine & HeaderDefine;
25
28
  export type ButtonColumnDefine = IButtonColumnBodyDefine & HeaderDefine;
29
+ export type BuiltinSimpleColumnDefine = LinkColumnDefine | ImageColumnDefine | SparklineColumnDefine | ProgressbarColumnDefine | CheckboxColumnDefine | RadioColumnDefine | ChartColumnDefine | TextColumnDefine | CompositeColumnDefine | SwitchColumnDefine | ButtonColumnDefine;
30
+ export interface CustomColumnDefineMap {
31
+ }
26
32
  export type GroupColumnDefine = HeaderDefine & {
27
33
  columns: ColumnsDefine;
28
34
  hideColumnsSubHeader?: boolean;
29
35
  };
30
- export type ColumnDefine = Either<LinkColumnDefine | ImageColumnDefine | SparklineColumnDefine | ProgressbarColumnDefine | CheckboxColumnDefine | RadioColumnDefine | ChartColumnDefine | TextColumnDefine | CompositeColumnDefine | SwitchColumnDefine | ButtonColumnDefine, GroupColumnDefine>;
36
+ export type SimpleColumnDefine = BuiltinSimpleColumnDefine | CustomColumnDefineMap[keyof CustomColumnDefineMap];
37
+ export type ColumnDefine = Either<SimpleColumnDefine, GroupColumnDefine>;
31
38
  export type ColumnsDefine = ColumnDefine[];
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ts-types/list-table/define/index.ts"],"names":[],"mappings":"","file":"index.js","sourcesContent":["import type { Either } from '../../../tools/helper';\nimport type { ICompositeColumnBodyDefine } from './composite-define';\nimport type { IChartColumnBodyDefine } from './chart-define';\nimport type { ICheckboxColumnBodyDefine, ICheckboxHeaderDefine } from './checkbox-define';\nimport type { IImageColumnBodyDefine, IImageHeaderDefine } from './image-define';\nimport type { ILinkColumnBodyDefine, ILinkHeaderDefine } from './link-define';\nimport type { ITextColumnBodyDefine, ITextHeaderDefine } from './multilinetext-define';\nimport type { IProgressbarColumnBodyDefine } from './progressbar-define';\nimport type { ISparklineColumnBodyDefine } from './sparkline-define';\nimport type { IRadioColumnBodyDefine } from './radio-define';\nimport type { ISwitchColumnBodyDefine } from './switch-define';\nimport type { IButtonColumnBodyDefine } from './button-define';\n\nexport type HeaderDefine = IImageHeaderDefine | ILinkHeaderDefine | ICheckboxHeaderDefine | ITextHeaderDefine;\n\nexport type ColumnBodyDefine =\n | ILinkColumnBodyDefine\n | IImageColumnBodyDefine\n | ISparklineColumnBodyDefine\n | IProgressbarColumnBodyDefine\n | ICheckboxColumnBodyDefine\n | IRadioColumnBodyDefine\n | IChartColumnBodyDefine\n | ITextColumnBodyDefine\n | ISwitchColumnBodyDefine\n | IButtonColumnBodyDefine;\nexport type TextColumnDefine = ITextColumnBodyDefine & HeaderDefine;\nexport type LinkColumnDefine = ILinkColumnBodyDefine & HeaderDefine;\nexport type ImageColumnDefine = IImageColumnBodyDefine & HeaderDefine;\nexport type SparklineColumnDefine = ISparklineColumnBodyDefine & HeaderDefine;\nexport type ProgressbarColumnDefine = IProgressbarColumnBodyDefine & HeaderDefine;\nexport type CheckboxColumnDefine = ICheckboxColumnBodyDefine & HeaderDefine;\nexport type RadioColumnDefine = IRadioColumnBodyDefine & HeaderDefine;\nexport type ChartColumnDefine = IChartColumnBodyDefine & HeaderDefine;\nexport type CompositeColumnDefine = ICompositeColumnBodyDefine & HeaderDefine;\nexport type SwitchColumnDefine = ISwitchColumnBodyDefine & HeaderDefine;\nexport type ButtonColumnDefine = IButtonColumnBodyDefine & HeaderDefine;\n// export type GroupColumnDefine = IChartColumnBodyDefine & HeaderDefine;\nexport type GroupColumnDefine = HeaderDefine & {\n columns: ColumnsDefine;\n hideColumnsSubHeader?: boolean;\n};\nexport type ColumnDefine = Either<\n | LinkColumnDefine\n | ImageColumnDefine\n | SparklineColumnDefine\n | ProgressbarColumnDefine\n | CheckboxColumnDefine\n | RadioColumnDefine\n | ChartColumnDefine\n | TextColumnDefine\n | CompositeColumnDefine\n | SwitchColumnDefine\n | ButtonColumnDefine,\n GroupColumnDefine\n>;\n\n// export type ColumnDefine = HeaderDefine & ColumnBodyDefine;\n\nexport type ColumnsDefine = ColumnDefine[];\n"]}
1
+ {"version":3,"sources":["../src/ts-types/list-table/define/index.ts"],"names":[],"mappings":"","file":"index.js","sourcesContent":["import type { Either } from '../../../tools/helper';\nimport type { ICompositeColumnBodyDefine } from './composite-define';\nimport type { IChartColumnBodyDefine } from './chart-define';\nimport type { ICheckboxColumnBodyDefine, ICheckboxHeaderDefine } from './checkbox-define';\nimport type { IImageColumnBodyDefine, IImageHeaderDefine } from './image-define';\nimport type { ILinkColumnBodyDefine, ILinkHeaderDefine } from './link-define';\nimport type { ITextColumnBodyDefine, ITextHeaderDefine } from './multilinetext-define';\nimport type { IProgressbarColumnBodyDefine } from './progressbar-define';\nimport type { ISparklineColumnBodyDefine } from './sparkline-define';\nimport type { IRadioColumnBodyDefine } from './radio-define';\nimport type { ISwitchColumnBodyDefine } from './switch-define';\nimport type { IButtonColumnBodyDefine } from './button-define';\n\nexport type HeaderDefine = IImageHeaderDefine | ILinkHeaderDefine | ICheckboxHeaderDefine | ITextHeaderDefine;\n\n/**\n * 内置列 body 类型联合\n * 保留原有导出,方便使用者直接引用\n */\nexport type BuiltinColumnBodyDefine =\n | ILinkColumnBodyDefine\n | IImageColumnBodyDefine\n | ISparklineColumnBodyDefine\n | IProgressbarColumnBodyDefine\n | ICheckboxColumnBodyDefine\n | IRadioColumnBodyDefine\n | IChartColumnBodyDefine\n | ITextColumnBodyDefine\n | ISwitchColumnBodyDefine\n | IButtonColumnBodyDefine;\n\n/**\n * 用户扩展的列 body 类型映射表。\n *\n * 使用者可以通过 module augmentation 扩展:\n * ```typescript\n * declare module '@visactor/vtable/es/ts-types' {\n * interface CustomColumnBodyDefineMap {\n * myCustom: IMyCustomColumnBodyDefine;\n * }\n * }\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface CustomColumnBodyDefineMap {}\n\n/**\n * 所有 ColumnBodyDefine 的最终联合:\n * - 内置列 body\n * - 用户通过 CustomColumnBodyDefineMap 扩展的列 body\n */\nexport type ColumnBodyDefine = BuiltinColumnBodyDefine | CustomColumnBodyDefineMap[keyof CustomColumnBodyDefineMap];\n\nexport type TextColumnDefine = ITextColumnBodyDefine & HeaderDefine;\nexport type LinkColumnDefine = ILinkColumnBodyDefine & HeaderDefine;\nexport type ImageColumnDefine = IImageColumnBodyDefine & HeaderDefine;\nexport type SparklineColumnDefine = ISparklineColumnBodyDefine & HeaderDefine;\nexport type ProgressbarColumnDefine = IProgressbarColumnBodyDefine & HeaderDefine;\nexport type CheckboxColumnDefine = ICheckboxColumnBodyDefine & HeaderDefine;\nexport type RadioColumnDefine = IRadioColumnBodyDefine & HeaderDefine;\nexport type ChartColumnDefine = IChartColumnBodyDefine & HeaderDefine;\nexport type CompositeColumnDefine = ICompositeColumnBodyDefine & HeaderDefine;\nexport type SwitchColumnDefine = ISwitchColumnBodyDefine & HeaderDefine;\nexport type ButtonColumnDefine = IButtonColumnBodyDefine & HeaderDefine;\n\n/**\n * 内置的「普通列」定义联合,不含分组列\n */\nexport type BuiltinSimpleColumnDefine =\n | LinkColumnDefine\n | ImageColumnDefine\n | SparklineColumnDefine\n | ProgressbarColumnDefine\n | CheckboxColumnDefine\n | RadioColumnDefine\n | ChartColumnDefine\n | TextColumnDefine\n | CompositeColumnDefine\n | SwitchColumnDefine\n | ButtonColumnDefine;\n\n/**\n * 用户扩展的完整列定义映射表。\n *\n * 使用者可以通过 module augmentation 扩展:\n * ```typescript\n * declare module '@visactor/vtable/es/ts-types' {\n * interface CustomColumnDefineMap {\n * myCustomColumn: MyCustomColumnDefine;\n * }\n * }\n * ```\n * 其中 MyCustomColumnDefine 一般形如:\n * ```typescript\n * type MyCustomColumnDefine = IMyCustomColumnBodyDefine & HeaderDefine;\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface CustomColumnDefineMap {}\n\nexport type GroupColumnDefine = HeaderDefine & {\n columns: ColumnsDefine;\n hideColumnsSubHeader?: boolean;\n};\n\n/**\n * 所有「普通列」(simple column) 的最终联合:\n * - 内置列定义\n * - 用户扩展列定义\n */\nexport type SimpleColumnDefine = BuiltinSimpleColumnDefine | CustomColumnDefineMap[keyof CustomColumnDefineMap];\n\n/**\n * 最终导出的 ColumnDefine:\n * - Either<普通列, 分组列>\n */\nexport type ColumnDefine = Either<SimpleColumnDefine, GroupColumnDefine>;\n\nexport type ColumnsDefine = ColumnDefine[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.22.7\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n\n registerFlexLayoutPlugin();\n}\n\nexport type { Direction } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}
1
+ {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.22.8-alpha.13\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n\n registerFlexLayoutPlugin();\n}\n\nexport type { Direction } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}
package/dist/vtable.js CHANGED
@@ -36463,7 +36463,9 @@
36463
36463
  DELETE_RECORD: 'delete_record',
36464
36464
  UPDATE_RECORD: 'update_record',
36465
36465
  ADD_COLUMN: 'add_column',
36466
- DELETE_COLUMN: 'delete_column'
36466
+ DELETE_COLUMN: 'delete_column',
36467
+ FILTER_MENU_SHOW: 'filter_menu_show',
36468
+ FILTER_MENU_HIDE: 'filter_menu_hide'
36467
36469
  };
36468
36470
 
36469
36471
  const judgeType = (value) => {
@@ -39310,10 +39312,13 @@
39310
39312
  this.pagination.totalCount = this._sourceLength;
39311
39313
  }
39312
39314
  }
39313
- updateFilterRules(filterRules) {
39315
+ updateFilterRules(filterRules, onFilterRecordsEnd) {
39314
39316
  this.lastFilterRules = this.dataConfig.filterRules;
39315
39317
  this.dataConfig.filterRules = filterRules;
39316
39318
  this._source = this.processRecords(this.dataSourceObj?.records ?? this.dataSourceObj);
39319
+ if (onFilterRecordsEnd) {
39320
+ onFilterRecordsEnd(this._source);
39321
+ }
39317
39322
  this._sourceLength = this._source?.length || 0;
39318
39323
  this.currentIndexedData = Array.from({ length: this._sourceLength }, (_, i) => i);
39319
39324
  if (this.userPagination) {
@@ -62460,12 +62465,15 @@
62460
62465
  }
62461
62466
  }
62462
62467
  setScrollTop(top, event, triggerEvent = true) {
62468
+ if (!this.table || !this.table.scenegraph) {
62469
+ return;
62470
+ }
62463
62471
  const totalHeight = this.table.getAllRowsHeight();
62464
62472
  const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
62465
- top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance));
62473
+ top = Math.max(0, Math.min(top, totalHeight - (this.table.scenegraph?.height ?? 0) - sizeTolerance));
62466
62474
  top = Math.ceil(top);
62467
62475
  const oldVerticalBarPos = this.scroll.verticalBarPos;
62468
- const yRatio = top / (totalHeight - this.table.scenegraph.height);
62476
+ const yRatio = top / (totalHeight - (this.table.scenegraph?.height ?? 0));
62469
62477
  if ((oldVerticalBarPos !== top || this.table.options?.customConfig?.scrollEventAlwaysTrigger === true) &&
62470
62478
  triggerEvent) {
62471
62479
  let verticalBarPos = top;
@@ -62486,7 +62494,7 @@
62486
62494
  dy
62487
62495
  });
62488
62496
  if (canScroll.some(value => value === false)) {
62489
- const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
62497
+ const yRatio = this.scroll.verticalBarPos / (totalHeight - (this.table.scenegraph?.height ?? 0));
62490
62498
  this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
62491
62499
  return;
62492
62500
  }
@@ -62518,6 +62526,9 @@
62518
62526
  }
62519
62527
  }
62520
62528
  setScrollLeft(left, event, triggerEvent = true) {
62529
+ if (!this.table || !this.table.scenegraph) {
62530
+ return;
62531
+ }
62521
62532
  this.table.scrollLeft;
62522
62533
  const totalWidth = this.table.getAllColsWidth();
62523
62534
  this.table.getFrozenColsWidth();
@@ -65584,7 +65595,7 @@
65584
65595
  }
65585
65596
  const shiftMultiSelect = this.table.keyboardOptions?.shiftMultiSelect ?? true;
65586
65597
  const ctrlMultiSelect = this.table.keyboardOptions?.ctrlMultiSelect ?? true;
65587
- this.table.stateManager.updateSelectPos(this.table.stateManager.select.selectInline === 'row' ? this.table.colCount - 1 : eventArgs.col, this.table.stateManager.select.selectInline === 'col' ? this.table.rowCount - 1 : eventArgs.row, eventArgs.event.shiftKey && shiftMultiSelect, (eventArgs.event.ctrlKey || eventArgs.event.metaKey) && ctrlMultiSelect, false, isSelectMoving ? false : this.table.options.select?.makeSelectCellVisible ?? true);
65598
+ this.table.stateManager.updateSelectPos(this.table.stateManager.select.selectInline === 'row' ? this.table.colCount - 1 : eventArgs.col, this.table.stateManager.select.selectInline === 'col' ? this.table.rowCount - 1 : eventArgs.row, eventArgs.event.shiftKey && shiftMultiSelect, (eventArgs.event.ctrlKey || eventArgs.event.metaKey) && ctrlMultiSelect, false, isSelectMoving ? false : (this.table.options.select?.makeSelectCellVisible ?? true));
65588
65599
  return true;
65589
65600
  }
65590
65601
  return false;
@@ -70083,6 +70094,7 @@
70083
70094
  class PluginManager {
70084
70095
  plugins = new Map();
70085
70096
  table;
70097
+ pluginEventMap = new Map();
70086
70098
  constructor(table, options) {
70087
70099
  this.table = table;
70088
70100
  options.plugins?.map(plugin => {
@@ -70103,29 +70115,35 @@
70103
70115
  return Array.from(this.plugins.values()).find(plugin => plugin.name === name);
70104
70116
  }
70105
70117
  _bindTableEventForPlugin(plugin) {
70106
- plugin.runTime?.forEach(runTime => {
70107
- this.table.on(runTime, (...args) => {
70118
+ plugin.runTime?.forEach((runTime) => {
70119
+ const id = this.table.on(runTime, (...args) => {
70108
70120
  plugin.run?.(...args, runTime, this.table);
70109
70121
  });
70122
+ this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
70110
70123
  });
70111
70124
  }
70112
- updatePlugins(plugins) {
70125
+ removeOrAddPlugins(plugins) {
70113
70126
  const removedPlugins = Array.from(this.plugins.values()).filter(plugin => !plugins?.some(p => p.id === plugin.id));
70114
70127
  removedPlugins.forEach(plugin => {
70128
+ this.pluginEventMap.get(plugin.id)?.forEach(id => {
70129
+ this.table.off(id);
70130
+ });
70115
70131
  this.release();
70116
70132
  this.plugins.delete(plugin.id);
70117
70133
  });
70118
- this.plugins.forEach(plugin => {
70119
- if (plugin.update) {
70120
- plugin.update();
70121
- }
70122
- });
70123
70134
  const addedPlugins = plugins?.filter(plugin => !this.plugins.has(plugin.id));
70124
70135
  addedPlugins?.forEach(plugin => {
70125
70136
  this.register(plugin);
70126
70137
  this._bindTableEventForPlugin(plugin);
70127
70138
  });
70128
70139
  }
70140
+ updatePlugins(plugins) {
70141
+ plugins?.forEach(plugin => {
70142
+ if (plugin.update) {
70143
+ plugin.update();
70144
+ }
70145
+ });
70146
+ }
70129
70147
  release() {
70130
70148
  this.plugins.forEach(plugin => {
70131
70149
  plugin.release?.(this.table);
@@ -70170,7 +70188,7 @@
70170
70188
  return TABLE_EVENT_TYPE;
70171
70189
  }
70172
70190
  options;
70173
- version = "1.22.7";
70191
+ version = "1.22.8-alpha.13";
70174
70192
  pagination;
70175
70193
  id = `VTable${Date.now()}`;
70176
70194
  headerStyleCache;
@@ -71049,13 +71067,13 @@
71049
71067
  getDefaultColumnWidth(col) {
71050
71068
  if (this.isRowHeader(col, 0) || this.isCornerHeader(col, 0)) {
71051
71069
  return Array.isArray(this.defaultHeaderColWidth)
71052
- ? this.defaultHeaderColWidth[col] ?? this.defaultColWidth
71070
+ ? (this.defaultHeaderColWidth[col] ?? this.defaultColWidth)
71053
71071
  : this.defaultHeaderColWidth;
71054
71072
  }
71055
71073
  else if (this.isRightFrozenColumn(col, this.columnHeaderLevelCount)) {
71056
71074
  if (this.isPivotTable()) {
71057
71075
  return Array.isArray(this.defaultHeaderColWidth)
71058
- ? this.defaultHeaderColWidth[this.rowHeaderLevelCount - this.rightFrozenColCount] ?? this.defaultColWidth
71076
+ ? (this.defaultHeaderColWidth[this.rowHeaderLevelCount - this.rightFrozenColCount] ?? this.defaultColWidth)
71059
71077
  : this.defaultHeaderColWidth;
71060
71078
  }
71061
71079
  return this.defaultColWidth;
@@ -71065,12 +71083,12 @@
71065
71083
  getDefaultRowHeight(row) {
71066
71084
  if (this.isColumnHeader(0, row) || this.isCornerHeader(0, row) || this.isSeriesNumberInHeader(0, row)) {
71067
71085
  return Array.isArray(this.defaultHeaderRowHeight)
71068
- ? this.defaultHeaderRowHeight[row] ?? this.internalProps.defaultRowHeight
71086
+ ? (this.defaultHeaderRowHeight[row] ?? this.internalProps.defaultRowHeight)
71069
71087
  : this.defaultHeaderRowHeight;
71070
71088
  }
71071
71089
  if (this.isBottomFrozenRow(row)) {
71072
71090
  return Array.isArray(this.defaultHeaderRowHeight)
71073
- ? this.defaultHeaderRowHeight[this.columnHeaderLevelCount > 0 ? this.columnHeaderLevelCount - this.bottomFrozenRowCount : 0] ?? this.internalProps.defaultRowHeight
71091
+ ? (this.defaultHeaderRowHeight[this.columnHeaderLevelCount > 0 ? this.columnHeaderLevelCount - this.bottomFrozenRowCount : 0] ?? this.internalProps.defaultRowHeight)
71074
71092
  : this.defaultHeaderRowHeight;
71075
71093
  }
71076
71094
  return this.internalProps.defaultRowHeight;
@@ -71274,14 +71292,14 @@
71274
71292
  this.colContentWidthsMap.put(col, width);
71275
71293
  }
71276
71294
  getAllRowsHeight() {
71277
- if (this.internalProps.rowCount <= 0) {
71295
+ if (!this.internalProps?.rowCount || this.internalProps.rowCount <= 0) {
71278
71296
  return 0;
71279
71297
  }
71280
71298
  const h = this.getRowsHeight(0, this.internalProps.rowCount - 1);
71281
71299
  return h;
71282
71300
  }
71283
71301
  getAllColsWidth() {
71284
- if (this.internalProps.colCount <= 0) {
71302
+ if (!this.internalProps?.colCount || this.internalProps.colCount <= 0) {
71285
71303
  return 0;
71286
71304
  }
71287
71305
  const w = this.getColsWidth(0, this.internalProps.colCount - 1);
@@ -78337,6 +78355,7 @@
78337
78355
  clearRowHeightCache: true
78338
78356
  }) {
78339
78357
  const internalProps = this.internalProps;
78358
+ this.pluginManager.removeOrAddPlugins(options.plugins);
78340
78359
  super.updateOption(options, updateConfig);
78341
78360
  internalProps.frozenColDragHeaderMode =
78342
78361
  options.dragOrder?.frozenColDragHeaderMode ?? options.frozenColDragHeaderMode;
@@ -78796,11 +78815,12 @@
78796
78815
  sortRecords(this);
78797
78816
  }
78798
78817
  else {
78799
- this.dataSource.updateFilterRules(filterRules);
78818
+ this.dataSource.updateFilterRules(filterRules, options?.onFilterRecordsEnd);
78800
78819
  }
78801
78820
  this.refreshRowColCount();
78802
78821
  this.stateManager.initCheckedState(this.records);
78803
78822
  this.scenegraph.createSceneGraph(!!!options?.clearRowHeightCache);
78823
+ this.internalProps.emptyTip?.resetVisible();
78804
78824
  this.resize();
78805
78825
  }
78806
78826
  getFilteredRecords() {
@@ -78832,7 +78852,7 @@
78832
78852
  return state && state[field];
78833
78853
  });
78834
78854
  }
78835
- return new Array(...this.stateManager.checkedState.values());
78855
+ return [...this.stateManager.checkedState.values()];
78836
78856
  }
78837
78857
  getCellCheckboxState(col, row) {
78838
78858
  const define = this.getBodyColumnDefine(col, row);
@@ -90482,6 +90502,20 @@
90482
90502
  }
90483
90503
  getAggregator(rowKey = [], colKey = [], indicator, considerChangedValue = true, indicatorPosition) {
90484
90504
  const indicatorIndex = this.indicatorKeys.indexOf(indicator);
90505
+ let rowDimensionKey;
90506
+ if (indicatorPosition?.position === 'row') {
90507
+ rowDimensionKey = rowKey.length >= 2 ? this.rows[rowKey.length - 2] : undefined;
90508
+ }
90509
+ else {
90510
+ rowDimensionKey = this.rows[rowKey.length - 1];
90511
+ }
90512
+ let colDimensionKey;
90513
+ if (indicatorPosition?.position === 'col') {
90514
+ colDimensionKey = colKey.length >= 2 ? this.columns[colKey.length - 2] : undefined;
90515
+ }
90516
+ else {
90517
+ colDimensionKey = this.columns[colKey.length - 1];
90518
+ }
90485
90519
  let flatRowKey;
90486
90520
  let flatColKey;
90487
90521
  if (typeof rowKey === 'string') {
@@ -90499,7 +90533,8 @@
90499
90533
  if (rowKey[0] === this.rowGrandTotalLabel) ;
90500
90534
  else if (this.totals?.row?.subTotalsDimensions &&
90501
90535
  this.totals?.row?.subTotalsDimensions?.length >= 1 &&
90502
- rowKey[rowKey.length - 1] !== this.rowSubTotalLabel) {
90536
+ rowKey[rowKey.length - 1] !== this.rowSubTotalLabel &&
90537
+ this.totals.row.subTotalsDimensions.find(dimension => dimension === rowDimensionKey)) {
90503
90538
  rowKey.push(this.rowSubTotalLabel);
90504
90539
  }
90505
90540
  }
@@ -90520,7 +90555,8 @@
90520
90555
  if (colKey[0] === this.colGrandTotalLabel) ;
90521
90556
  else if (this.totals?.column?.subTotalsDimensions &&
90522
90557
  this.totals?.column?.subTotalsDimensions?.length >= 1 &&
90523
- colKey[colKey.length - 1] !== this.colSubTotalLabel) {
90558
+ colKey[colKey.length - 1] !== this.colSubTotalLabel &&
90559
+ this.totals.column.subTotalsDimensions.find(dimension => dimension === colDimensionKey)) {
90524
90560
  colKey.push(this.colSubTotalLabel);
90525
90561
  }
90526
90562
  }
@@ -94904,7 +94940,7 @@
94904
94940
  }
94905
94941
 
94906
94942
  registerForVrender();
94907
- const version = "1.22.7";
94943
+ const version = "1.22.8-alpha.13";
94908
94944
  function getIcons() {
94909
94945
  return get$2();
94910
94946
  }