@visactor/vtable 0.21.1 → 0.21.2

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 (95) hide show
  1. package/cjs/body-helper/style/ProgressBarStyle.js +1 -1
  2. package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
  3. package/cjs/core/BaseTable.js +1 -1
  4. package/cjs/core/BaseTable.js.map +1 -1
  5. package/cjs/event/event.d.ts +5 -0
  6. package/cjs/event/event.js +5 -3
  7. package/cjs/event/event.js.map +1 -1
  8. package/cjs/event/listener/container-dom.js +53 -13
  9. package/cjs/event/listener/container-dom.js.map +1 -1
  10. package/cjs/event/listener/table-group.js +1 -20
  11. package/cjs/event/listener/table-group.js.map +1 -1
  12. package/cjs/event/listener/touch.js +23 -5
  13. package/cjs/event/listener/touch.js.map +1 -1
  14. package/cjs/index.d.ts +1 -1
  15. package/cjs/index.js +1 -1
  16. package/cjs/index.js.map +1 -1
  17. package/cjs/scenegraph/graphic/contributions/index.js +4 -2
  18. package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
  19. package/cjs/scenegraph/graphic/contributions/text-contribution-render.d.ts +12 -0
  20. package/cjs/scenegraph/graphic/contributions/text-contribution-render.js +72 -0
  21. package/cjs/scenegraph/graphic/contributions/text-contribution-render.js.map +1 -0
  22. package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +6 -0
  23. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +35 -24
  24. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  25. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +2 -6
  26. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  27. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +12 -8
  28. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  29. package/cjs/scenegraph/layout/compute-col-width.js +1 -1
  30. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  31. package/cjs/scenegraph/layout/frozen.js +2 -2
  32. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  33. package/cjs/scenegraph/layout/update-width.js +3 -3
  34. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  35. package/cjs/scenegraph/scenegraph.d.ts +2 -2
  36. package/cjs/scenegraph/scenegraph.js +17 -14
  37. package/cjs/scenegraph/scenegraph.js.map +1 -1
  38. package/cjs/scenegraph/stick-text/index.js +70 -34
  39. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  40. package/cjs/scenegraph/utils/text-icon-layout.js +7 -5
  41. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  42. package/cjs/ts-types/column/style.d.ts +1 -0
  43. package/cjs/ts-types/column/style.js.map +1 -1
  44. package/cjs/ts-types/customElement.d.ts +1 -1
  45. package/cjs/ts-types/customElement.js.map +1 -1
  46. package/cjs/vrender.js.map +1 -1
  47. package/dist/vtable.js +547 -284
  48. package/dist/vtable.min.js +2 -2
  49. package/es/body-helper/style/ProgressBarStyle.js +1 -1
  50. package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
  51. package/es/core/BaseTable.js +1 -1
  52. package/es/core/BaseTable.js.map +1 -1
  53. package/es/event/event.d.ts +5 -0
  54. package/es/event/event.js +5 -3
  55. package/es/event/event.js.map +1 -1
  56. package/es/event/listener/container-dom.js +54 -12
  57. package/es/event/listener/container-dom.js.map +1 -1
  58. package/es/event/listener/table-group.js +1 -20
  59. package/es/event/listener/table-group.js.map +1 -1
  60. package/es/event/listener/touch.js +23 -5
  61. package/es/event/listener/touch.js.map +1 -1
  62. package/es/index.d.ts +1 -1
  63. package/es/index.js +1 -1
  64. package/es/index.js.map +1 -1
  65. package/es/scenegraph/graphic/contributions/index.js +5 -2
  66. package/es/scenegraph/graphic/contributions/index.js.map +1 -1
  67. package/es/scenegraph/graphic/contributions/text-contribution-render.d.ts +12 -0
  68. package/es/scenegraph/graphic/contributions/text-contribution-render.js +69 -0
  69. package/es/scenegraph/graphic/contributions/text-contribution-render.js.map +1 -0
  70. package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +6 -0
  71. package/es/scenegraph/group-creater/cell-type/image-cell.js +34 -23
  72. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  73. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +2 -6
  74. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  75. package/es/scenegraph/group-creater/cell-type/video-cell.js +12 -8
  76. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  77. package/es/scenegraph/layout/compute-col-width.js +1 -1
  78. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  79. package/es/scenegraph/layout/frozen.js +2 -2
  80. package/es/scenegraph/layout/frozen.js.map +1 -1
  81. package/es/scenegraph/layout/update-width.js +3 -3
  82. package/es/scenegraph/layout/update-width.js.map +1 -1
  83. package/es/scenegraph/scenegraph.d.ts +2 -2
  84. package/es/scenegraph/scenegraph.js +16 -14
  85. package/es/scenegraph/scenegraph.js.map +1 -1
  86. package/es/scenegraph/stick-text/index.js +70 -34
  87. package/es/scenegraph/stick-text/index.js.map +1 -1
  88. package/es/scenegraph/utils/text-icon-layout.js +5 -5
  89. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  90. package/es/ts-types/column/style.d.ts +1 -0
  91. package/es/ts-types/column/style.js.map +1 -1
  92. package/es/ts-types/customElement.d.ts +1 -1
  93. package/es/ts-types/customElement.js.map +1 -1
  94. package/es/vrender.js.map +1 -1
  95. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ts-types/column/style.ts"],"names":[],"mappings":"","file":"style.js","sourcesContent":["import type { LineWidthsPropertyDefine } from '..';\nimport { PaddingPropertyDefine } from '..';\nimport type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n IconPropertyDefine,\n LineClamp,\n LineDashsPropertyDefine,\n TextOverflow,\n UnderlinePropertyDefine,\n LineDashPropertyDefine,\n LineThroughPropertyDefine,\n TagPropertyDefine,\n PaddingsPropertyDefine,\n StylePropertyFunctionArg,\n CursorPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../style-define';\nimport type { ThemeStyle } from '../theme';\n//这个style是在绘制里面的内容时用到的,用不到borderColor和borderLineWidth,所以和IStyleOption有些不一致\nexport interface ColumnStyle {\n padding?: PaddingsPropertyDefine;\n bgColor?: ColorPropertyDefine;\n // eslint-disable-next-line no-undef\n textAlign?: TextAlignType;\n // eslint-disable-next-line no-undef\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n // doChangeStyle: () => void;\n clone: () => ColumnStyle;\n linkColor?: ColorPropertyDefine;\n}\n\nexport type IHeaderStyle = ColumnStyle;\n\nexport type ISortheaderSyle = IHeaderStyle;\n\nexport interface IStyleOption {\n bgColor?: ColorPropertyDefine;\n padding?: PaddingsPropertyDefine;\n textAlign?: TextAlignType;\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n borderColor?: ColorsPropertyDefine;\n borderLineWidth?: LineWidthsPropertyDefine;\n\n lineHeight?: number;\n underline?: UnderlinePropertyDefine;\n /** TODO */\n underlineColor?: ColorPropertyDefine;\n underlineDash?: LineDashPropertyDefine;\n underlineOffset?: number;\n lineThrough?: LineThroughPropertyDefine;\n /** TODO */\n lineThroughColor?: ColorPropertyDefine;\n /** TODO */\n lineThroughDash?: LineDashPropertyDefine;\n\n borderLineDash?: LineDashsPropertyDefine;\n linkColor?: ColorPropertyDefine;\n\n // tag?: TagPropertyDefine;\n // tagFont?: FontPropertyDefine;\n // tagColor?: ColorPropertyDefine;\n // tagBgColor?: ColorPropertyDefine;\n // tagMargin?: number | string | (number | string)[];\n\n // dropDownIcon?: IconPropertyDefine;\n // dropDownHoverIcon?: IconPropertyDefine;\n cursor?: CursorPropertyDefine;\n\n textStick?: boolean;\n\n marked?: MarkedPropertyDefine;\n}\n\nexport interface ITextStyleOption extends IStyleOption {\n // lineHeight?: string | number;//移入IStyleOption中 单行文本类型也可以有\n autoWrapText?: boolean;\n lineClamp?: LineClamp;\n}\n\nexport interface IImageStyleOption extends IStyleOption {\n // imageSizing?: 'keep-aspect-ratio';\n // imageAutoSizing?: boolean;\n margin?: number;\n}\n// export type ISortHeaderStyleOption = IStyleOption;\n\nexport type ColumnStyleOption =\n | IStyleOption\n | ITextStyleOption\n | IImageStyleOption\n | ProgressBarStyleOption\n | CheckboxStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n\nexport type HeaderStyleOption =\n | (IStyleOption & { textStick?: boolean }) //表头可以配置吸附\n | ITextStyleOption\n | IImageStyleOption\n // | ISortHeaderStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n// | ISortHeaderStyleOption\n\nexport type FullExtendStyle = HeaderStyleOption & ColumnStyleOption & ThemeStyle;\n\n// export interface BaseStyleOption {\n// bgColor?: ColorPropertyDefine;\n// }\n\n// export interface StdBaseStyleOption extends BaseStyleOption {\n// // eslint-disable-next-line no-undef\n// textAlign?: CanvasTextAlign;\n// // eslint-disable-next-line no-undef\n// textBaseline?: CanvasTextBaseline;\n// }\n// export interface StyleOption extends StdBaseStyleOption {\n// color?: ColorPropertyDefine;\n// font?: FontPropertyDefine;\n// padding?: PaddingsPropertyDefine;\n// textOverflow?: TextOverflow;\n// }\nexport interface ProgressBarStyleOption extends IStyleOption {\n // 是否显示进度条\n showBar?: boolean | ((args: StylePropertyFunctionArg) => boolean);\n // 进度条颜色\n barColor?: ColorPropertyDefine;\n // 进度条背景颜色\n barBgColor?: ColorPropertyDefine;\n // 进度条高度\n barHeight?: number | string;\n // 进度条距单元格底部距离\n barBottom?: number | string;\n // 进度条padding\n barPadding?: (number | string)[];\n // 进度条正向颜色\n barPositiveColor?: ColorPropertyDefine;\n // 进度条负向颜色\n barNegativeColor?: ColorPropertyDefine;\n // 进度条坐标轴轴颜色\n barAxisColor?: ColorPropertyDefine;\n // 进度条方向是否从右到左\n barRightToLeft?: boolean;\n\n // 是否显示进度条标记\n showBarMark?: boolean;\n // 进度条标记正向颜色\n barMarkPositiveColor?: ColorPropertyDefine;\n // 进度条标记负向颜色\n barMarkNegativeColor?: ColorPropertyDefine;\n // 进度条标记宽度\n barMarkWidth?: number;\n // 进度条标记位置\n barMarkPosition?: 'right' | 'bottom';\n}\n\nexport type CheckboxStyleOption = {\n size?: number;\n spaceBetweenTextAndIcon?: number;\n checkboxStyle?: CheckboxStyle;\n} & ITextStyleOption;\n\nexport type CheckboxStyle = {\n // 选择框尺寸\n size?: number;\n // 选择框与文字间距\n spaceBetweenTextAndIcon?: number;\n\n // 未选中状态填充颜色\n defaultFill?: string;\n // 未选中状态描边颜色\n defaultStroke?: string;\n // disable状态填充颜色\n disableFill?: string;\n // checked状态填充颜色\n checkedFill?: string;\n // checked状态描边颜色\n checkedStroke?: string;\n // checked状态填充颜色\n disableCheckedFill?: string;\n // checked状态描边颜色\n disableCheckedStroke?: string;\n\n // checked状态图标url\n checkIconImage?: string;\n // indeterminate状态图标url\n indeterminateIconImage?: string;\n};\n"]}
1
+ {"version":3,"sources":["../src/ts-types/column/style.ts"],"names":[],"mappings":"","file":"style.js","sourcesContent":["import type { LineWidthsPropertyDefine } from '..';\nimport { PaddingPropertyDefine } from '..';\nimport type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n IconPropertyDefine,\n LineClamp,\n LineDashsPropertyDefine,\n TextOverflow,\n UnderlinePropertyDefine,\n LineDashPropertyDefine,\n LineThroughPropertyDefine,\n TagPropertyDefine,\n PaddingsPropertyDefine,\n StylePropertyFunctionArg,\n CursorPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../style-define';\nimport type { ThemeStyle } from '../theme';\n//这个style是在绘制里面的内容时用到的,用不到borderColor和borderLineWidth,所以和IStyleOption有些不一致\nexport interface ColumnStyle {\n padding?: PaddingsPropertyDefine;\n bgColor?: ColorPropertyDefine;\n // eslint-disable-next-line no-undef\n textAlign?: TextAlignType;\n // eslint-disable-next-line no-undef\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n // doChangeStyle: () => void;\n clone: () => ColumnStyle;\n linkColor?: ColorPropertyDefine;\n}\n\nexport type IHeaderStyle = ColumnStyle;\n\nexport type ISortheaderSyle = IHeaderStyle;\n\nexport interface IStyleOption {\n bgColor?: ColorPropertyDefine;\n padding?: PaddingsPropertyDefine;\n textAlign?: TextAlignType;\n textBaseline?: TextBaselineType;\n color?: ColorPropertyDefine;\n\n fontSize?: FontSizePropertyDefine;\n fontFamily?: FontFamilyPropertyDefine;\n fontWeight?: FontWeightPropertyDefine;\n fontVariant?: FontVariantPropertyDefine;\n fontStyle?: FontStylePropertyDefine;\n\n textOverflow?: TextOverflow;\n borderColor?: ColorsPropertyDefine;\n borderLineWidth?: LineWidthsPropertyDefine;\n\n lineHeight?: number;\n underline?: UnderlinePropertyDefine;\n /** TODO */\n underlineColor?: ColorPropertyDefine;\n underlineDash?: LineDashPropertyDefine;\n underlineOffset?: number;\n lineThrough?: LineThroughPropertyDefine;\n /** TODO */\n lineThroughColor?: ColorPropertyDefine;\n /** TODO */\n lineThroughDash?: LineDashPropertyDefine;\n\n borderLineDash?: LineDashsPropertyDefine;\n linkColor?: ColorPropertyDefine;\n\n // tag?: TagPropertyDefine;\n // tagFont?: FontPropertyDefine;\n // tagColor?: ColorPropertyDefine;\n // tagBgColor?: ColorPropertyDefine;\n // tagMargin?: number | string | (number | string)[];\n\n // dropDownIcon?: IconPropertyDefine;\n // dropDownHoverIcon?: IconPropertyDefine;\n cursor?: CursorPropertyDefine;\n\n textStick?: boolean;\n textStickBaseOnAlign?: boolean;\n\n marked?: MarkedPropertyDefine;\n}\n\nexport interface ITextStyleOption extends IStyleOption {\n // lineHeight?: string | number;//移入IStyleOption中 单行文本类型也可以有\n autoWrapText?: boolean;\n lineClamp?: LineClamp;\n}\n\nexport interface IImageStyleOption extends IStyleOption {\n // imageSizing?: 'keep-aspect-ratio';\n // imageAutoSizing?: boolean;\n margin?: number;\n}\n// export type ISortHeaderStyleOption = IStyleOption;\n\nexport type ColumnStyleOption =\n | IStyleOption\n | ITextStyleOption\n | IImageStyleOption\n | ProgressBarStyleOption\n | CheckboxStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n\nexport type HeaderStyleOption =\n | (IStyleOption & { textStick?: boolean }) //表头可以配置吸附\n | ITextStyleOption\n | IImageStyleOption\n // | ISortHeaderStyleOption\n | ((styleArg: StylePropertyFunctionArg) => IStyleOption | ITextStyleOption | IImageStyleOption);\n// | ISortHeaderStyleOption\n\nexport type FullExtendStyle = HeaderStyleOption & ColumnStyleOption & ThemeStyle;\n\n// export interface BaseStyleOption {\n// bgColor?: ColorPropertyDefine;\n// }\n\n// export interface StdBaseStyleOption extends BaseStyleOption {\n// // eslint-disable-next-line no-undef\n// textAlign?: CanvasTextAlign;\n// // eslint-disable-next-line no-undef\n// textBaseline?: CanvasTextBaseline;\n// }\n// export interface StyleOption extends StdBaseStyleOption {\n// color?: ColorPropertyDefine;\n// font?: FontPropertyDefine;\n// padding?: PaddingsPropertyDefine;\n// textOverflow?: TextOverflow;\n// }\nexport interface ProgressBarStyleOption extends IStyleOption {\n // 是否显示进度条\n showBar?: boolean | ((args: StylePropertyFunctionArg) => boolean);\n // 进度条颜色\n barColor?: ColorPropertyDefine;\n // 进度条背景颜色\n barBgColor?: ColorPropertyDefine;\n // 进度条高度\n barHeight?: number | string;\n // 进度条距单元格底部距离\n barBottom?: number | string;\n // 进度条padding\n barPadding?: (number | string)[];\n // 进度条正向颜色\n barPositiveColor?: ColorPropertyDefine;\n // 进度条负向颜色\n barNegativeColor?: ColorPropertyDefine;\n // 进度条坐标轴轴颜色\n barAxisColor?: ColorPropertyDefine;\n // 进度条方向是否从右到左\n barRightToLeft?: boolean;\n\n // 是否显示进度条标记\n showBarMark?: boolean;\n // 进度条标记正向颜色\n barMarkPositiveColor?: ColorPropertyDefine;\n // 进度条标记负向颜色\n barMarkNegativeColor?: ColorPropertyDefine;\n // 进度条标记宽度\n barMarkWidth?: number;\n // 进度条标记位置\n barMarkPosition?: 'right' | 'bottom';\n}\n\nexport type CheckboxStyleOption = {\n size?: number;\n spaceBetweenTextAndIcon?: number;\n checkboxStyle?: CheckboxStyle;\n} & ITextStyleOption;\n\nexport type CheckboxStyle = {\n // 选择框尺寸\n size?: number;\n // 选择框与文字间距\n spaceBetweenTextAndIcon?: number;\n\n // 未选中状态填充颜色\n defaultFill?: string;\n // 未选中状态描边颜色\n defaultStroke?: string;\n // disable状态填充颜色\n disableFill?: string;\n // checked状态填充颜色\n checkedFill?: string;\n // checked状态描边颜色\n checkedStroke?: string;\n // checked状态填充颜色\n disableCheckedFill?: string;\n // checked状态描边颜色\n disableCheckedStroke?: string;\n\n // checked状态图标url\n checkIconImage?: string;\n // indeterminate状态图标url\n indeterminateIconImage?: string;\n};\n"]}
@@ -26,7 +26,7 @@ export interface TextElement extends baseElement {
26
26
  stroke?: string | ((value: string) => string);
27
27
  fill?: string | ((value: string) => string);
28
28
  color?: string | ((value: string) => string);
29
- lineWidth: number;
29
+ lineWidth?: number;
30
30
  fontSize?: number | ((value: string) => number);
31
31
  fontFamily?: string | ((value: string) => string);
32
32
  fontWeight?: string | number | ((value: string) => string | number);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ts-types/customElement.ts"],"names":[],"mappings":"","file":"customElement.js","sourcesContent":["import type { FieldData } from './table-engine';\nimport type { RectProps } from './common';\nimport type { BaseTableAPI } from './base-table';\nimport type { TextAlignType, TextBaselineType } from './style-define';\nexport interface CustomRenderFunctionArg {\n row: number;\n col: number;\n table: BaseTableAPI;\n /**format之后的值 */\n value: FieldData;\n /**原始值 */\n dataValue: FieldData;\n rect?: RectProps;\n}\ninterface baseElement {\n elementKey?: string;\n x: number | string | ((value: string) => number | string);\n y: number | string | ((value: string) => number | string);\n dx?: number;\n dy?: number;\n // clickable?: boolean; // @dispose\n pickable?: boolean;\n cursor?: string;\n name?: string;\n}\nexport interface TextElement extends baseElement {\n type: 'text';\n text: string | ((value: string) => string);\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n color?: string | ((value: string) => string);\n lineWidth: number;\n fontSize?: number | ((value: string) => number);\n fontFamily?: string | ((value: string) => string);\n fontWeight?: string | number | ((value: string) => string | number);\n fontVariant?: string;\n fontStyle?: string;\n ellipsis?: boolean | string;\n maxLineWidth?: number;\n textAlign?: TextAlignType;\n textBaseline?: TextBaselineType;\n lineHeight?: number;\n underline?: number;\n underlineDash?: number[];\n underlineOffset?: number;\n lineThrough?: number;\n heightLimit?: number;\n lineClamp?: number;\n width?: number;\n height?: number;\n background?: {\n fill?: string;\n expandY?: number;\n expandX?: number;\n cornerRadius?: number;\n };\n}\nexport interface LineElement extends Omit<baseElement, 'x' | 'y'> {\n type: 'line';\n stroke?: string | ((value: string) => string);\n points: { x: number; y: number }[];\n lineWidth?: number;\n}\n\nexport interface RectElement extends baseElement {\n type: 'rect';\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n radius?: number | string | ((value: string) => number | string);\n}\n\nexport interface CircleElement extends baseElement {\n type: 'circle';\n radius: number | string | ((value: string) => number | string);\n // radian?: number | string | ((value: string) => number | string);\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n}\nexport interface ArcElement extends baseElement {\n type: 'arc';\n radius: number | string | ((value: string) => number | string);\n startAngle?: number | ((value: string) => number);\n endAngle?: number | ((value: string) => number);\n // clockWise?: boolean;\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n}\nexport interface IconElement extends baseElement {\n type: 'icon';\n svg: string | ((value: string) => string);\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n hover?: {\n x: number | string;\n y: number | string;\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n bgColor: string;\n radius?: number;\n };\n}\nexport interface ImageElement extends baseElement {\n type: 'image';\n src: string | ((value: string) => string);\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n hover?: {\n x: number | string;\n y: number | string;\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n bgColor: string;\n radius?: number;\n };\n shape?: 'circle' | 'square';\n}\nexport type ICustomRenderElement =\n | TextElement\n | RectElement\n | CircleElement\n | IconElement\n | ImageElement\n | ArcElement\n | LineElement;\nexport type ICustomRenderElements = Array<ICustomRenderElement>;\n\nexport type ICustomRenderFuc = (args: CustomRenderFunctionArg) => ICustomRenderObj;\n\nexport type ICustomRenderObj = {\n /** 配置出来的类型集合 */\n elements: ICustomRenderElements;\n /** 期望单元格的高度 */\n expectedHeight: number;\n /** 期望单元格的宽度 */\n expectedWidth: number;\n /**\n * 是否还需要默认渲染内容 只有配置true才绘制 默认 不绘制\n */\n renderDefault?: boolean;\n};\n\nexport type ICustomRender = ICustomRenderFuc | ICustomRenderObj;\n"]}
1
+ {"version":3,"sources":["../src/ts-types/customElement.ts"],"names":[],"mappings":"","file":"customElement.js","sourcesContent":["import type { FieldData } from './table-engine';\nimport type { RectProps } from './common';\nimport type { BaseTableAPI } from './base-table';\nimport type { TextAlignType, TextBaselineType } from './style-define';\nexport interface CustomRenderFunctionArg {\n row: number;\n col: number;\n table: BaseTableAPI;\n /**format之后的值 */\n value: FieldData;\n /**原始值 */\n dataValue: FieldData;\n rect?: RectProps;\n}\ninterface baseElement {\n elementKey?: string;\n x: number | string | ((value: string) => number | string);\n y: number | string | ((value: string) => number | string);\n dx?: number;\n dy?: number;\n // clickable?: boolean; // @dispose\n pickable?: boolean;\n cursor?: string;\n name?: string;\n}\nexport interface TextElement extends baseElement {\n type: 'text';\n text: string | ((value: string) => string);\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n color?: string | ((value: string) => string);\n lineWidth?: number;\n fontSize?: number | ((value: string) => number);\n fontFamily?: string | ((value: string) => string);\n fontWeight?: string | number | ((value: string) => string | number);\n fontVariant?: string;\n fontStyle?: string;\n ellipsis?: boolean | string;\n maxLineWidth?: number;\n textAlign?: TextAlignType;\n textBaseline?: TextBaselineType;\n lineHeight?: number;\n underline?: number;\n underlineDash?: number[];\n underlineOffset?: number;\n lineThrough?: number;\n heightLimit?: number;\n lineClamp?: number;\n width?: number;\n height?: number;\n background?: {\n fill?: string;\n expandY?: number;\n expandX?: number;\n cornerRadius?: number;\n };\n}\nexport interface LineElement extends Omit<baseElement, 'x' | 'y'> {\n type: 'line';\n stroke?: string | ((value: string) => string);\n points: { x: number; y: number }[];\n lineWidth?: number;\n}\n\nexport interface RectElement extends baseElement {\n type: 'rect';\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n radius?: number | string | ((value: string) => number | string);\n}\n\nexport interface CircleElement extends baseElement {\n type: 'circle';\n radius: number | string | ((value: string) => number | string);\n // radian?: number | string | ((value: string) => number | string);\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n}\nexport interface ArcElement extends baseElement {\n type: 'arc';\n radius: number | string | ((value: string) => number | string);\n startAngle?: number | ((value: string) => number);\n endAngle?: number | ((value: string) => number);\n // clockWise?: boolean;\n stroke?: string | ((value: string) => string);\n fill?: string | ((value: string) => string);\n}\nexport interface IconElement extends baseElement {\n type: 'icon';\n svg: string | ((value: string) => string);\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n hover?: {\n x: number | string;\n y: number | string;\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n bgColor: string;\n radius?: number;\n };\n}\nexport interface ImageElement extends baseElement {\n type: 'image';\n src: string | ((value: string) => string);\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n hover?: {\n x: number | string;\n y: number | string;\n width: number | string | ((value: string) => number | string);\n height: number | string | ((value: string) => number | string);\n bgColor: string;\n radius?: number;\n };\n shape?: 'circle' | 'square';\n}\nexport type ICustomRenderElement =\n | TextElement\n | RectElement\n | CircleElement\n | IconElement\n | ImageElement\n | ArcElement\n | LineElement;\nexport type ICustomRenderElements = Array<ICustomRenderElement>;\n\nexport type ICustomRenderFuc = (args: CustomRenderFunctionArg) => ICustomRenderObj;\n\nexport type ICustomRenderObj = {\n /** 配置出来的类型集合 */\n elements: ICustomRenderElements;\n /** 期望单元格的高度 */\n expectedHeight: number;\n /** 期望单元格的宽度 */\n expectedWidth: number;\n /**\n * 是否还需要默认渲染内容 只有配置true才绘制 默认 不绘制\n */\n renderDefault?: boolean;\n};\n\nexport type ICustomRender = ICustomRenderFuc | ICustomRenderObj;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;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;IACd,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,8BAAe,GAAE,CAAC;IAClB,IAAA,gCAAiB,GAAE,CAAC;IACpB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,+BAAgB,GAAE,CAAC;AACrB,CAAC;AA/BD,gDA+BC;AAED,yDAAuC;AACvC,yDAAuC","file":"vrender.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\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 = \"0.21.1\";\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 registerWrapText();\n}\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
1
+ {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;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;IACd,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,8BAAe,GAAE,CAAC;IAClB,IAAA,gCAAiB,GAAE,CAAC;IACpB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,+BAAgB,GAAE,CAAC;AACrB,CAAC;AA/BD,gDA+BC;AAED,yDAAuC;AACvC,yDAAuC","file":"vrender.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\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 = \"0.21.2\";\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 registerWrapText();\n}\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}