@visactor/vtable 1.26.8 → 1.26.9-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/cjs/body-helper/body-helper.js +1 -2
  2. package/cjs/components/menu/dom/logic/MenuElement.js +17 -17
  3. package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
  4. package/cjs/components/menu/dom/logic/menu-icon.d.ts +1 -0
  5. package/cjs/components/menu/dom/logic/menu-icon.js +41 -0
  6. package/cjs/components/menu/dom/logic/menu-icon.js.map +1 -0
  7. package/cjs/core/BaseTable.js +2 -2
  8. package/cjs/core/BaseTable.js.map +1 -1
  9. package/cjs/data/DataSource.js +2 -1
  10. package/cjs/event/event.js +3 -3
  11. package/cjs/event/event.js.map +1 -1
  12. package/cjs/event/sparkline-event.js +2 -1
  13. package/cjs/header-helper/header-helper.js +1 -2
  14. package/cjs/layout/index.js +1 -1
  15. package/cjs/layout/layout-helper.js +1 -1
  16. package/cjs/layout/pivot-header-layout.js +3 -2
  17. package/cjs/layout/pivot-header-layout.js.map +1 -1
  18. package/cjs/layout/row-height-map.js +1 -1
  19. package/cjs/layout/simple-header-layout.js +1 -1
  20. package/cjs/layout/tree-helper.js +1 -1
  21. package/cjs/plugins/custom-cell-style.d.ts +17 -2
  22. package/cjs/plugins/custom-cell-style.js +121 -31
  23. package/cjs/plugins/custom-cell-style.js.map +1 -1
  24. package/cjs/plugins/index.js +1 -1
  25. package/cjs/plugins/interface.js +1 -1
  26. package/cjs/plugins/invert-highlight.js +1 -1
  27. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  28. package/cjs/plugins/plugin-manager.js +1 -1
  29. package/cjs/scenegraph/component/table-component.d.ts +2 -0
  30. package/cjs/scenegraph/component/table-component.js +22 -6
  31. package/cjs/scenegraph/component/table-component.js.map +1 -1
  32. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  33. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  34. package/cjs/scenegraph/layout/frozen.js +3 -0
  35. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  36. package/cjs/scenegraph/scenegraph.d.ts +1 -0
  37. package/cjs/scenegraph/scenegraph.js +8 -1
  38. package/cjs/scenegraph/scenegraph.js.map +1 -1
  39. package/cjs/scenegraph/select/create-select-border.d.ts +1 -0
  40. package/cjs/scenegraph/select/create-select-border.js +8 -3
  41. package/cjs/scenegraph/select/create-select-border.js.map +1 -1
  42. package/cjs/scenegraph/select/delete-select-border.d.ts +2 -0
  43. package/cjs/scenegraph/select/delete-select-border.js +16 -5
  44. package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
  45. package/cjs/scenegraph/select/move-select-border.js +2 -2
  46. package/cjs/scenegraph/select/move-select-border.js.map +1 -1
  47. package/cjs/state/select/auto-merge-ranges.d.ts +9 -0
  48. package/cjs/state/select/auto-merge-ranges.js +164 -0
  49. package/cjs/state/select/auto-merge-ranges.js.map +1 -0
  50. package/cjs/state/select/update-position.js +7 -3
  51. package/cjs/state/select/update-position.js.map +1 -1
  52. package/cjs/state/state.d.ts +3 -1
  53. package/cjs/state/state.js +18 -9
  54. package/cjs/state/state.js.map +1 -1
  55. package/cjs/themes/theme-define.js.map +1 -1
  56. package/cjs/ts-types/base-table.d.ts +1 -0
  57. package/cjs/ts-types/base-table.js.map +1 -1
  58. package/cjs/ts-types/menu.js.map +1 -1
  59. package/cjs/ts-types/theme.d.ts +1 -1
  60. package/cjs/ts-types/theme.js.map +1 -1
  61. package/dist/vtable.js +2410 -104
  62. package/dist/vtable.min.js +5 -1
  63. package/es/body-helper/body-helper.js +1 -2
  64. package/es/components/menu/dom/logic/MenuElement.js +16 -17
  65. package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
  66. package/es/components/menu/dom/logic/menu-icon.d.ts +1 -0
  67. package/es/components/menu/dom/logic/menu-icon.js +29 -0
  68. package/es/components/menu/dom/logic/menu-icon.js.map +1 -0
  69. package/es/core/BaseTable.js +2 -2
  70. package/es/core/BaseTable.js.map +1 -1
  71. package/es/data/DataSource.js +2 -1
  72. package/es/event/event.js +4 -2
  73. package/es/event/event.js.map +1 -1
  74. package/es/event/sparkline-event.js +2 -1
  75. package/es/header-helper/header-helper.js +1 -2
  76. package/es/layout/index.js +1 -1
  77. package/es/layout/layout-helper.js +1 -1
  78. package/es/layout/pivot-header-layout.js +3 -2
  79. package/es/layout/pivot-header-layout.js.map +1 -1
  80. package/es/layout/row-height-map.js +1 -1
  81. package/es/layout/simple-header-layout.js +1 -1
  82. package/es/layout/tree-helper.js +1 -1
  83. package/es/plugins/custom-cell-style.d.ts +17 -2
  84. package/es/plugins/custom-cell-style.js +121 -29
  85. package/es/plugins/custom-cell-style.js.map +1 -1
  86. package/es/plugins/index.js +1 -1
  87. package/es/plugins/interface.js +1 -1
  88. package/es/plugins/invert-highlight.js +1 -1
  89. package/es/plugins/list-tree-stick-cell.js +1 -1
  90. package/es/plugins/plugin-manager.js +1 -1
  91. package/es/scenegraph/component/table-component.d.ts +2 -0
  92. package/es/scenegraph/component/table-component.js +21 -6
  93. package/es/scenegraph/component/table-component.js.map +1 -1
  94. package/es/scenegraph/group-creater/column-helper.js +1 -1
  95. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  96. package/es/scenegraph/layout/frozen.js +3 -0
  97. package/es/scenegraph/layout/frozen.js.map +1 -1
  98. package/es/scenegraph/scenegraph.d.ts +1 -0
  99. package/es/scenegraph/scenegraph.js +9 -2
  100. package/es/scenegraph/scenegraph.js.map +1 -1
  101. package/es/scenegraph/select/create-select-border.d.ts +1 -0
  102. package/es/scenegraph/select/create-select-border.js +5 -1
  103. package/es/scenegraph/select/create-select-border.js.map +1 -1
  104. package/es/scenegraph/select/delete-select-border.d.ts +2 -0
  105. package/es/scenegraph/select/delete-select-border.js +9 -0
  106. package/es/scenegraph/select/delete-select-border.js.map +1 -1
  107. package/es/scenegraph/select/move-select-border.js +2 -2
  108. package/es/scenegraph/select/move-select-border.js.map +1 -1
  109. package/es/state/select/auto-merge-ranges.d.ts +9 -0
  110. package/es/state/select/auto-merge-ranges.js +155 -0
  111. package/es/state/select/auto-merge-ranges.js.map +1 -0
  112. package/es/state/select/update-position.js +7 -1
  113. package/es/state/select/update-position.js.map +1 -1
  114. package/es/state/state.d.ts +3 -1
  115. package/es/state/state.js +19 -8
  116. package/es/state/state.js.map +1 -1
  117. package/es/themes/theme-define.js.map +1 -1
  118. package/es/ts-types/base-table.d.ts +1 -0
  119. package/es/ts-types/base-table.js.map +1 -1
  120. package/es/ts-types/menu.js.map +1 -1
  121. package/es/ts-types/theme.d.ts +1 -1
  122. package/es/ts-types/theme.js.map +1 -1
  123. package/package.json +9 -4
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ts-types/menu.ts"],"names":[],"mappings":"","file":"menu.js","sourcesContent":["import type { ICellHeaderPaths, IDimensionInfo, RectProps } from './common';\nimport type { CellLocation, FieldData, FieldDef } from './table-engine';\nimport type { Placement } from './table-engine';\n\nexport interface DropDownMenuHighlightInfo {\n /** 设置下拉状态所在单元格列号 */\n col?: number;\n /** 设置下拉状态所在单元格行号 */\n row?: number;\n /** 设置下拉状态对应的字段名,或者透视表的话需设置维度信息 */\n field?: string | IDimensionInfo[];\n /** 指定下拉菜单项的key值 */\n menuKey?: string;\n}\n\ntype Icon = {\n width?: number;\n height?: number;\n svg?: string;\n // dropDownIndex?: number;\n};\n\nexport type MenuListItem =\n | string\n | {\n text?: string;\n type?: 'title' | 'item' | 'split';\n menuKey?: string;\n icon?: Icon;\n selectedIcon?: Icon;\n stateIcon?: Icon;\n children?: MenuListItem[];\n disabled?: boolean; // 禁用菜单项\n };\n\nexport type PivotInfo = {\n value: string;\n dimensionKey: string;\n isPivotCorner: boolean;\n customInfo?: any;\n};\n\nexport type MenuInstanceInfo = {\n type: MenuInstanceType;\n content: HTMLElement | MenuListItem[];\n /**指定下拉菜单框左上角的位置 如:右键下拉菜单 基于鼠标位置定位下拉菜单 */\n position?: {\n x: number;\n y: number;\n };\n /** 传入相对区域 如:按钮点击后弹出的下拉菜单 会基于这个按钮对下拉菜单进行定位 */\n referencePosition?: { rect: RectProps; placement?: Placement };\n pivotInfo?: PivotInfo;\n};\n\nexport type MenuInstanceType = 'dropdown-menu' | 'context-menu' | 'container';\n\n/** 显示下拉菜单设置项 或者显示指定dom内容 */\nexport type DropDownMenuOptions = {\n // menuList?: MenuListItem[];\n content: HTMLElement | MenuListItem[];\n position?: { x: number; y: number };\n referencePosition?: {\n rect: RectProps;\n /** 目前下拉菜单右对齐icon,指定位置暂未实现 */\n placement?: Placement;\n };\n};\n\nexport type DropDownMenuEventArgs = {\n col: number;\n row: number;\n menuKey: string;\n text: string;\n highlight: boolean;\n} & DropDownMenuEventInfo;\n\nexport type ContextMenuClickEventArgs = {\n col: number;\n row: number;\n contextMenu: {\n menuKey: string;\n menuText: string;\n rowIndex?: number;\n colIndex?: number;\n cellValue?: any;\n inputValue?: number | string;\n };\n};\n\nexport type DropDownMenuEventInfo = {\n field?: FieldDef;\n /**format之后的值 */\n value?: FieldData;\n /**原始值 */\n dataValue?: FieldData;\n // fieldKey: FieldKeyDef;\n subIndex?: number;\n\n dimensionKey?: string | number;\n isPivotCorner?: boolean;\n customInfo?: any;\n\n cellHeaderPaths?: ICellHeaderPaths;\n cellLocation: CellLocation;\n event: Event;\n};\n"]}
1
+ {"version":3,"sources":["../src/ts-types/menu.ts"],"names":[],"mappings":"","file":"menu.js","sourcesContent":["import type { ICellHeaderPaths, IDimensionInfo, RectProps } from './common';\nimport type { CellLocation, FieldData, FieldDef } from './table-engine';\nimport type { Placement } from './table-engine';\n\nexport interface DropDownMenuHighlightInfo {\n /** 设置下拉状态所在单元格列号 */\n col?: number;\n /** 设置下拉状态所在单元格行号 */\n row?: number;\n /** 设置下拉状态对应的字段名,或者透视表的话需设置维度信息 */\n field?: string | IDimensionInfo[];\n /** 指定下拉菜单项的key值 */\n menuKey?: string;\n}\n\ntype Icon = {\n width?: number;\n height?: number;\n svg?: string;\n // dropDownIndex?: number;\n};\n\nexport type MenuListItem =\n | string\n | {\n /** 菜单纯文本,不解析 HTML 标签或实体。 */\n text?: string;\n type?: 'title' | 'item' | 'split';\n menuKey?: string;\n /** HTML 菜单支持 HTTP(S) 图片地址或经过安全清洗的静态 SVG。 */\n icon?: Icon;\n /** 选中图标使用与 icon 相同的安全清洗规则。 */\n selectedIcon?: Icon;\n stateIcon?: Icon;\n children?: MenuListItem[];\n disabled?: boolean; // 禁用菜单项\n };\n\nexport type PivotInfo = {\n value: string;\n dimensionKey: string;\n isPivotCorner: boolean;\n customInfo?: any;\n};\n\nexport type MenuInstanceInfo = {\n type: MenuInstanceType;\n content: HTMLElement | MenuListItem[];\n /**指定下拉菜单框左上角的位置 如:右键下拉菜单 基于鼠标位置定位下拉菜单 */\n position?: {\n x: number;\n y: number;\n };\n /** 传入相对区域 如:按钮点击后弹出的下拉菜单 会基于这个按钮对下拉菜单进行定位 */\n referencePosition?: { rect: RectProps; placement?: Placement };\n pivotInfo?: PivotInfo;\n};\n\nexport type MenuInstanceType = 'dropdown-menu' | 'context-menu' | 'container';\n\n/** 显示下拉菜单设置项 或者显示指定dom内容 */\nexport type DropDownMenuOptions = {\n // menuList?: MenuListItem[];\n /** 菜单数组按纯文本渲染;自定义 HTMLElement 的内容安全由调用方负责。 */\n content: HTMLElement | MenuListItem[];\n position?: { x: number; y: number };\n referencePosition?: {\n rect: RectProps;\n /** 目前下拉菜单右对齐icon,指定位置暂未实现 */\n placement?: Placement;\n };\n};\n\nexport type DropDownMenuEventArgs = {\n col: number;\n row: number;\n menuKey: string;\n text: string;\n highlight: boolean;\n} & DropDownMenuEventInfo;\n\nexport type ContextMenuClickEventArgs = {\n col: number;\n row: number;\n contextMenu: {\n menuKey: string;\n menuText: string;\n rowIndex?: number;\n colIndex?: number;\n cellValue?: any;\n inputValue?: number | string;\n };\n};\n\nexport type DropDownMenuEventInfo = {\n field?: FieldDef;\n /**format之后的值 */\n value?: FieldData;\n /**原始值 */\n dataValue?: FieldData;\n // fieldKey: FieldKeyDef;\n subIndex?: number;\n\n dimensionKey?: string | number;\n isPivotCorner?: boolean;\n customInfo?: any;\n\n cellHeaderPaths?: ICellHeaderPaths;\n cellLocation: CellLocation;\n event: Event;\n};\n"]}
@@ -103,7 +103,7 @@ export interface ITableThemeDefine {
103
103
  width: number;
104
104
  startColor: string;
105
105
  endColor: string;
106
- visible?: 'always' | 'scrolling';
106
+ visible?: 'always' | 'scrolling' | 'overflow';
107
107
  };
108
108
  border?: {
109
109
  lineColor: ColorPropertyDefine;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ts-types/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["/* eslint-disable sort-imports */\nimport type { ColorsDef, LineDashsDef, LineWidthsDef, LineWidthsPropertyDefine, LineDashsPropertyDefine } from '.';\nimport type { ButtonStyle, CheckboxStyle, ITextStyleOption, RadioStyle, SwitchStyle } from './column/style';\nimport type { ColorPropertyDefine, ColorsPropertyDefine } from './style-define';\nimport type { ICellAxisOption } from './component/axis';\nimport type { PopTipAttributes } from './../vrender';\n// ****** Custom Theme *******\nexport type PartialTableThemeDefine = Partial<ITableThemeDefine>;\nexport type ThemeStyle = ITextStyleOption & {\n hover?: Omit<InteractionStyle, 'cellBorderColor' | 'cellBorderLineWidth'>; //鼠标hover到某个单元格\n select?: {\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n };\n frameStyle?: FrameStyle;\n};\nexport type InteractionStyle = {\n cellBorderColor?: ColorsPropertyDefine; //交互所在单元格的边框颜色\n cellBorderLineWidth?: LineWidthsPropertyDefine;\n // cellBorderLineDash?:LineDashsPropertyDefine,//用到的场景应该不多\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n // inlineRowBorderColor?: ColorsPropertyDefine,//交互所在整行的边框颜色\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n // inlineColBorderColor?: ColorsPropertyDefine,//交互所在整列的边框颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n // headerHighlightBorderColor?:ColorPropertyDefine,//表头底部高亮线\n};\nexport type FrameStyle = {\n borderColor?: ColorsDef;\n borderLineWidth?: LineWidthsDef;\n borderLineDash?: LineDashsDef;\n innerBorder?: boolean;\n};\nexport type TableFrameStyle = FrameStyle & {\n shadowBlur?: number; //阴影宽度\n shadowOffsetX?: number; //x方向偏移\n shadowOffsetY?: number; //Y方向偏移\n shadowColor?: string; //阴影颜色\n cornerRadius?: number | [number, number, number, number]; //边框圆角半径\n};\nexport type menuStyle = {\n color?: string;\n highlightColor?: string;\n fontSize?: number;\n fontFamily?: string;\n highlightFontSize?: number;\n highlightFontFamily?: string;\n hoverBgColor?: string;\n};\nexport type ScrollStyle = {\n /**滚动条滚动的颜色 */\n scrollRailColor?: string;\n /**滚动条滑块的颜色 */\n scrollSliderColor?: string;\n /**滚动条滑块的圆角半径 */\n scrollSliderCornerRadius?: number;\n /**滚动条宽度大小 */\n width?: number;\n /**滚动条是否可见 'always' | 'scrolling' | 'none' | 'focus',常驻|滚动时|不显示|聚焦在画布上时 。默认'scrolling'*/\n visible?: 'always' | 'scrolling' | 'none' | 'focus';\n horizontalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n verticalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n /*** 悬浮与容器上,还是独立于容器外 */\n hoverOn?: boolean;\n /** 是否显示到容器的边缘 尽管内容没有撑满的情况下 默认false */\n barToSide?: boolean;\n /** 横向滚动条 padding */\n horizontalPadding?: number | [number, number, number, number];\n /** 竖向滚动条 padding */\n verticalPadding?: number | [number, number, number, number];\n ignoreFrozenCols?: boolean; // 忽略所有冻结列宽度,默认false\n};\n/**\n * 气泡框,按钮的的解释信息\n */\nexport type TooltipStyle = {\n fontFamily?: string;\n fontSize?: number;\n color?: string;\n padding?: number[];\n bgColor?: string;\n maxWidth?: number;\n maxHeight?: number;\n /** !目前未实现该逻辑。触发行为:hover or click */\n // trigger?: string | string[];\n /**气泡框位置,可选 top left right bottom */\n // placement?: Placement;\n};\nexport interface ITableThemeDefine {\n /** 表格绘制范围外的canvas上填充的颜色 */\n underlayBackgroundColor?: string;\n // selectionBgColor?: ColorPropertyDefine; //多选单元格背景色 手动设置的多选 非框选\n defaultStyle?: ThemeStyle;\n cornerHeaderStyle?: ThemeStyle; //角头样式\n cornerRightTopCellStyle?: ThemeStyle; // 右上角占位单元格样式\n cornerLeftBottomCellStyle?: ThemeStyle; // 左下角占位单元格样式\n cornerRightBottomCellStyle?: ThemeStyle; // 右下角占位单元格样式\n rightFrozenStyle?: ThemeStyle; // 右侧冻结单元格样式\n bottomFrozenStyle?: ThemeStyle; // 下部冻结单元格样式\n headerStyle?: ThemeStyle;\n rowHeaderStyle?: ThemeStyle;\n bodyStyle?: ThemeStyle;\n groupTitleStyle?: ThemeStyle;\n frameStyle?: TableFrameStyle;\n //列调整宽度的直线\n columnResize?: {\n visibleOnHover?: boolean; //是否在hover时显示\n lineColor?: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth?: number; //上面线的宽度\n width?: number; //背景线的宽度\n resizeHotSpotSize?: number; //响应调整行高列宽交互行为热区的大小\n labelVisible?: boolean; //是否显示label\n labelColor?: string; //label的颜色\n labelFontSize?: number; //label的字体大小\n labelFontFamily?: string; //label的字体\n labelBackgroundFill?: string; //label的背景填充\n labelBackgroundCornerRadius?: number; //label的背景圆角\n };\n //拖拽表格换位分割线的样式\n dragHeaderSplitLine?: {\n lineColor: ColorPropertyDefine; //上面线的颜色\n lineWidth: number; //上面线的宽度\n shadowBlockColor?: string; //拖拽时阴影区域的颜色\n };\n //冻结列后面的效果\n frozenColumnLine?: {\n shadow?: {\n //默认效果 会有阴影配置\n width: number; //阴影整体宽度\n startColor: string; //开始颜色\n endColor: string; //结束颜色\n /**滚动条是否可见 'always' | 'scrolling' | 'none' | 'focus',常驻|滚动时|不显示|聚焦在画布上时 。默认'scrolling'*/\n visible?: 'always' | 'scrolling';\n };\n /** TODO 暂未生效 */\n border?: {\n //有些需求要两种效果 这里配置滚动前的边框效果(实现方式是两条线叠加产生),滚动后按上面的阴影效果\n lineColor: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth: number; //上面线的宽度\n width?: number; //背景线的宽度\n };\n };\n\n // menuStyle?: menuStyle;\n scrollStyle?: ScrollStyle;\n tooltipStyle?: TooltipStyle;\n // selectHeaderHighlight?: boolean;\n /** 选择框样式 */\n selectionStyle?: //Omit<InteractionStyle, 'inlineRowBgColor' | 'inlineColumnBgColor'>; //鼠标点击到某个单元格\n {\n cellBorderColor?: string; //边框颜色\n cellBorderLineWidth?: number; //边框线宽度\n cellBgColor?: string; //选择框背景颜色\n inlineRowBgColor?: string; //交互所在整行的背景颜色\n inlineColumnBgColor?: string; //交互所在整列的背景颜色\n selectionFillMode?: 'overlay' | 'replace'; //选择框填充模式,overlay表示选择框背景色覆盖在表格上(需要配饰透明度),replace表示背景色替换原有单元格的背景色\n dynamicUpdateSelectionSize?: boolean; // 选择框大小随滚动动态变化,用于冻结并且背景透明的场景,默认false,开启后性能会有一定影响\n };\n\n // style for axis\n axisStyle?: {\n defaultAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'>;\n leftAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingLeft?: number;\n };\n rightAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingRight?: number;\n };\n topAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingTop?: number;\n };\n bottomAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingBottom?: number;\n };\n };\n\n checkboxStyle?: CheckboxStyle;\n radioStyle?: RadioStyle;\n switchStyle?: SwitchStyle;\n buttonStyle?: ButtonStyle;\n\n // style for text pop tip\n textPopTipStyle?: PopTipAttributes;\n\n // senior config for fs\n // 表格四侧单元格,靠近边缘的border是否需要再绘制;如配置false的话,当表格左侧frame未设置情况下左侧单元格不显示左边框,其他方向同理\n cellInnerBorder?: boolean;\n // cell border clip direction\n cellBorderClipDirection?: 'top-left' | 'bottom-right'; // default is 'top-left'\n // text offset, hack for fs\n _contentOffset?: number;\n /** 内部功能性按钮图标颜色及尺寸配置 */\n functionalIconsStyle?: {\n sort_color?: string;\n sort_color_opacity?: string;\n sort_color_2?: string;\n sort_color_opacity_2?: string;\n sort_size?: number;\n sort_size_2?: number;\n frozen_color?: string;\n frozen_color_opacity?: string;\n frozen_color_2?: string;\n frozen_color_opacity_2?: string;\n frozen_size?: number;\n frozen_size_2?: number;\n collapse_color?: string;\n collapse_color_opacity?: string;\n collapse_size?: number;\n collapse_size_2?: number;\n expand_color?: string;\n expand_color_opacity?: string;\n expand_size?: number;\n expand_size_2?: number;\n dragReorder_color?: string;\n dragReorder_color_opacity?: string;\n dragReorder_size?: number;\n };\n}\n\nexport type RequiredTableThemeDefine = Required<ITableThemeDefine>;\n"]}
1
+ {"version":3,"sources":["../src/ts-types/theme.ts"],"names":[],"mappings":"","file":"theme.js","sourcesContent":["/* eslint-disable sort-imports */\nimport type { ColorsDef, LineDashsDef, LineWidthsDef, LineWidthsPropertyDefine, LineDashsPropertyDefine } from '.';\nimport type { ButtonStyle, CheckboxStyle, ITextStyleOption, RadioStyle, SwitchStyle } from './column/style';\nimport type { ColorPropertyDefine, ColorsPropertyDefine } from './style-define';\nimport type { ICellAxisOption } from './component/axis';\nimport type { PopTipAttributes } from './../vrender';\n// ****** Custom Theme *******\nexport type PartialTableThemeDefine = Partial<ITableThemeDefine>;\nexport type ThemeStyle = ITextStyleOption & {\n hover?: Omit<InteractionStyle, 'cellBorderColor' | 'cellBorderLineWidth'>; //鼠标hover到某个单元格\n select?: {\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n };\n frameStyle?: FrameStyle;\n};\nexport type InteractionStyle = {\n cellBorderColor?: ColorsPropertyDefine; //交互所在单元格的边框颜色\n cellBorderLineWidth?: LineWidthsPropertyDefine;\n // cellBorderLineDash?:LineDashsPropertyDefine,//用到的场景应该不多\n cellBgColor?: ColorPropertyDefine; //交互所在单元格的背景颜色\n // inlineRowBorderColor?: ColorsPropertyDefine,//交互所在整行的边框颜色\n inlineRowBgColor?: ColorPropertyDefine; //交互所在整行的背景颜色\n // inlineColBorderColor?: ColorsPropertyDefine,//交互所在整列的边框颜色\n inlineColumnBgColor?: ColorPropertyDefine; //交互所在整列的背景颜色\n // headerHighlightBorderColor?:ColorPropertyDefine,//表头底部高亮线\n};\nexport type FrameStyle = {\n borderColor?: ColorsDef;\n borderLineWidth?: LineWidthsDef;\n borderLineDash?: LineDashsDef;\n innerBorder?: boolean;\n};\nexport type TableFrameStyle = FrameStyle & {\n shadowBlur?: number; //阴影宽度\n shadowOffsetX?: number; //x方向偏移\n shadowOffsetY?: number; //Y方向偏移\n shadowColor?: string; //阴影颜色\n cornerRadius?: number | [number, number, number, number]; //边框圆角半径\n};\nexport type menuStyle = {\n color?: string;\n highlightColor?: string;\n fontSize?: number;\n fontFamily?: string;\n highlightFontSize?: number;\n highlightFontFamily?: string;\n hoverBgColor?: string;\n};\nexport type ScrollStyle = {\n /**滚动条滚动的颜色 */\n scrollRailColor?: string;\n /**滚动条滑块的颜色 */\n scrollSliderColor?: string;\n /**滚动条滑块的圆角半径 */\n scrollSliderCornerRadius?: number;\n /**滚动条宽度大小 */\n width?: number;\n /**滚动条是否可见 'always' | 'scrolling' | 'none' | 'focus',常驻|滚动时|不显示|聚焦在画布上时 。默认'scrolling'*/\n visible?: 'always' | 'scrolling' | 'none' | 'focus';\n horizontalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n verticalVisible?: 'always' | 'scrolling' | 'none' | 'focus';\n /*** 悬浮与容器上,还是独立于容器外 */\n hoverOn?: boolean;\n /** 是否显示到容器的边缘 尽管内容没有撑满的情况下 默认false */\n barToSide?: boolean;\n /** 横向滚动条 padding */\n horizontalPadding?: number | [number, number, number, number];\n /** 竖向滚动条 padding */\n verticalPadding?: number | [number, number, number, number];\n ignoreFrozenCols?: boolean; // 忽略所有冻结列宽度,默认false\n};\n/**\n * 气泡框,按钮的的解释信息\n */\nexport type TooltipStyle = {\n fontFamily?: string;\n fontSize?: number;\n color?: string;\n padding?: number[];\n bgColor?: string;\n maxWidth?: number;\n maxHeight?: number;\n /** !目前未实现该逻辑。触发行为:hover or click */\n // trigger?: string | string[];\n /**气泡框位置,可选 top left right bottom */\n // placement?: Placement;\n};\nexport interface ITableThemeDefine {\n /** 表格绘制范围外的canvas上填充的颜色 */\n underlayBackgroundColor?: string;\n // selectionBgColor?: ColorPropertyDefine; //多选单元格背景色 手动设置的多选 非框选\n defaultStyle?: ThemeStyle;\n cornerHeaderStyle?: ThemeStyle; //角头样式\n cornerRightTopCellStyle?: ThemeStyle; // 右上角占位单元格样式\n cornerLeftBottomCellStyle?: ThemeStyle; // 左下角占位单元格样式\n cornerRightBottomCellStyle?: ThemeStyle; // 右下角占位单元格样式\n rightFrozenStyle?: ThemeStyle; // 右侧冻结单元格样式\n bottomFrozenStyle?: ThemeStyle; // 下部冻结单元格样式\n headerStyle?: ThemeStyle;\n rowHeaderStyle?: ThemeStyle;\n bodyStyle?: ThemeStyle;\n groupTitleStyle?: ThemeStyle;\n frameStyle?: TableFrameStyle;\n //列调整宽度的直线\n columnResize?: {\n visibleOnHover?: boolean; //是否在hover时显示\n lineColor?: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth?: number; //上面线的宽度\n width?: number; //背景线的宽度\n resizeHotSpotSize?: number; //响应调整行高列宽交互行为热区的大小\n labelVisible?: boolean; //是否显示label\n labelColor?: string; //label的颜色\n labelFontSize?: number; //label的字体大小\n labelFontFamily?: string; //label的字体\n labelBackgroundFill?: string; //label的背景填充\n labelBackgroundCornerRadius?: number; //label的背景圆角\n };\n //拖拽表格换位分割线的样式\n dragHeaderSplitLine?: {\n lineColor: ColorPropertyDefine; //上面线的颜色\n lineWidth: number; //上面线的宽度\n shadowBlockColor?: string; //拖拽时阴影区域的颜色\n };\n //冻结列后面的效果\n frozenColumnLine?: {\n shadow?: {\n //默认效果 会有阴影配置\n width: number; //阴影整体宽度\n startColor: string; //开始颜色\n endColor: string; //结束颜色\n /**\n * Shadow visibility. Defaults to 'always'.\n * 'overflow' shows each frozen boundary only while body content is scrolled beneath it.\n */\n visible?: 'always' | 'scrolling' | 'overflow';\n };\n /** TODO 暂未生效 */\n border?: {\n //有些需求要两种效果 这里配置滚动前的边框效果(实现方式是两条线叠加产生),滚动后按上面的阴影效果\n lineColor: ColorPropertyDefine; //上面线的颜色\n bgColor?: ColorPropertyDefine; //背景线的颜色\n lineWidth: number; //上面线的宽度\n width?: number; //背景线的宽度\n };\n };\n\n // menuStyle?: menuStyle;\n scrollStyle?: ScrollStyle;\n tooltipStyle?: TooltipStyle;\n // selectHeaderHighlight?: boolean;\n /** 选择框样式 */\n selectionStyle?: //Omit<InteractionStyle, 'inlineRowBgColor' | 'inlineColumnBgColor'>; //鼠标点击到某个单元格\n {\n cellBorderColor?: string; //边框颜色\n cellBorderLineWidth?: number; //边框线宽度\n cellBgColor?: string; //选择框背景颜色\n inlineRowBgColor?: string; //交互所在整行的背景颜色\n inlineColumnBgColor?: string; //交互所在整列的背景颜色\n selectionFillMode?: 'overlay' | 'replace'; //选择框填充模式,overlay表示选择框背景色覆盖在表格上(需要配饰透明度),replace表示背景色替换原有单元格的背景色\n dynamicUpdateSelectionSize?: boolean; // 选择框大小随滚动动态变化,用于冻结并且背景透明的场景,默认false,开启后性能会有一定影响\n };\n\n // style for axis\n axisStyle?: {\n defaultAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'>;\n leftAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingLeft?: number;\n };\n rightAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingRight?: number;\n };\n topAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingTop?: number;\n };\n bottomAxisStyle?: Omit<ICellAxisOption, 'type' | 'domain' | 'range' | 'orient' | '__ticksForVTable'> & {\n cellPaddingBottom?: number;\n };\n };\n\n checkboxStyle?: CheckboxStyle;\n radioStyle?: RadioStyle;\n switchStyle?: SwitchStyle;\n buttonStyle?: ButtonStyle;\n\n // style for text pop tip\n textPopTipStyle?: PopTipAttributes;\n\n // senior config for fs\n // 表格四侧单元格,靠近边缘的border是否需要再绘制;如配置false的话,当表格左侧frame未设置情况下左侧单元格不显示左边框,其他方向同理\n cellInnerBorder?: boolean;\n // cell border clip direction\n cellBorderClipDirection?: 'top-left' | 'bottom-right'; // default is 'top-left'\n // text offset, hack for fs\n _contentOffset?: number;\n /** 内部功能性按钮图标颜色及尺寸配置 */\n functionalIconsStyle?: {\n sort_color?: string;\n sort_color_opacity?: string;\n sort_color_2?: string;\n sort_color_opacity_2?: string;\n sort_size?: number;\n sort_size_2?: number;\n frozen_color?: string;\n frozen_color_opacity?: string;\n frozen_color_2?: string;\n frozen_color_opacity_2?: string;\n frozen_size?: number;\n frozen_size_2?: number;\n collapse_color?: string;\n collapse_color_opacity?: string;\n collapse_size?: number;\n collapse_size_2?: number;\n expand_color?: string;\n expand_color_opacity?: string;\n expand_size?: number;\n expand_size_2?: number;\n dragReorder_color?: string;\n dragReorder_color_opacity?: string;\n dragReorder_size?: number;\n };\n}\n\nexport type RequiredTableThemeDefine = Required<ITableThemeDefine>;\n"]}