@visactor/vtable 1.7.9-alpha.2 → 1.8.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 (91) hide show
  1. package/cjs/ListTable.d.ts +1 -1
  2. package/cjs/components/index.js +1 -1
  3. package/cjs/core/BaseTable.js +20 -20
  4. package/cjs/core/BaseTable.js.map +1 -1
  5. package/cjs/core/style.js +1 -2
  6. package/cjs/dataset/dataset.js +1 -0
  7. package/cjs/icons.d.ts +2 -1
  8. package/cjs/icons.js +79 -45
  9. package/cjs/icons.js.map +1 -1
  10. package/cjs/index.d.ts +1 -1
  11. package/cjs/index.js +1 -1
  12. package/cjs/index.js.map +1 -1
  13. package/cjs/layout/layout-helper.js +2 -1
  14. package/cjs/layout/pivot-header-layout.js +0 -1
  15. package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
  16. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  17. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  18. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  19. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +8 -2
  20. package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  21. package/cjs/scenegraph/scenegraph.js +1 -1
  22. package/cjs/state/checkbox/checkbox.js +7 -2
  23. package/cjs/state/checkbox/checkbox.js.map +1 -1
  24. package/cjs/state/radio/radio.js +7 -2
  25. package/cjs/state/radio/radio.js.map +1 -1
  26. package/cjs/state/state.d.ts +1 -1
  27. package/cjs/state/state.js.map +1 -1
  28. package/cjs/themes/ARCO.js +1 -0
  29. package/cjs/themes/ARCO.js.map +1 -1
  30. package/cjs/themes/BRIGHT.js +1 -0
  31. package/cjs/themes/BRIGHT.js.map +1 -1
  32. package/cjs/themes/DARK.js +15 -0
  33. package/cjs/themes/DARK.js.map +1 -1
  34. package/cjs/themes/DEFAULT.js +1 -0
  35. package/cjs/themes/DEFAULT.js.map +1 -1
  36. package/cjs/themes/SIMPLIFY.js +1 -0
  37. package/cjs/themes/SIMPLIFY.js.map +1 -1
  38. package/cjs/themes/theme.d.ts +3 -0
  39. package/cjs/themes/theme.js +10 -2
  40. package/cjs/themes/theme.js.map +1 -1
  41. package/cjs/ts-types/table-engine.js.map +1 -1
  42. package/cjs/ts-types/theme.d.ts +25 -0
  43. package/cjs/ts-types/theme.js.map +1 -1
  44. package/cjs/vrender.js.map +1 -1
  45. package/dist/vtable.js +173 -59
  46. package/dist/vtable.min.js +2 -2
  47. package/es/ListTable.d.ts +1 -1
  48. package/es/components/index.js +1 -1
  49. package/es/core/BaseTable.js +20 -18
  50. package/es/core/BaseTable.js.map +1 -1
  51. package/es/core/style.js +1 -2
  52. package/es/dataset/dataset.js +2 -1
  53. package/es/icons.d.ts +2 -1
  54. package/es/icons.js +73 -43
  55. package/es/icons.js.map +1 -1
  56. package/es/index.d.ts +1 -1
  57. package/es/index.js +1 -1
  58. package/es/index.js.map +1 -1
  59. package/es/layout/layout-helper.js +2 -1
  60. package/es/layout/pivot-header-layout.js +1 -2
  61. package/es/scenegraph/group-creater/cell-helper.js +1 -1
  62. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  63. package/es/scenegraph/group-creater/column-helper.js +1 -1
  64. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  65. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +8 -2
  66. package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
  67. package/es/scenegraph/scenegraph.js +1 -1
  68. package/es/state/checkbox/checkbox.js +7 -2
  69. package/es/state/checkbox/checkbox.js.map +1 -1
  70. package/es/state/radio/radio.js +7 -2
  71. package/es/state/radio/radio.js.map +1 -1
  72. package/es/state/state.d.ts +1 -1
  73. package/es/state/state.js.map +1 -1
  74. package/es/themes/ARCO.js +1 -0
  75. package/es/themes/ARCO.js.map +1 -1
  76. package/es/themes/BRIGHT.js +1 -0
  77. package/es/themes/BRIGHT.js.map +1 -1
  78. package/es/themes/DARK.js +15 -0
  79. package/es/themes/DARK.js.map +1 -1
  80. package/es/themes/DEFAULT.js +1 -0
  81. package/es/themes/DEFAULT.js.map +1 -1
  82. package/es/themes/SIMPLIFY.js +1 -0
  83. package/es/themes/SIMPLIFY.js.map +1 -1
  84. package/es/themes/theme.d.ts +3 -0
  85. package/es/themes/theme.js +9 -2
  86. package/es/themes/theme.js.map +1 -1
  87. package/es/ts-types/table-engine.js.map +1 -1
  88. package/es/ts-types/theme.d.ts +25 -0
  89. package/es/ts-types/theme.js.map +1 -1
  90. package/es/vrender.js.map +1 -1
  91. package/package.json +3 -3
package/dist/vtable.js CHANGED
@@ -27528,6 +27528,7 @@
27528
27528
  return '#282a2e';
27529
27529
  }
27530
27530
  var darkTheme = {
27531
+ name: 'DARK',
27531
27532
  underlayBackgroundColor: 'transparent',
27532
27533
  defaultStyle: {
27533
27534
  color: '#D3D5DA',
@@ -27603,6 +27604,20 @@
27603
27604
  color: '#000',
27604
27605
  fontSize: 12,
27605
27606
  fontFamily: 'Arial,sans-serif'
27607
+ },
27608
+ functionalIconsStyle: {
27609
+ sort_color: '#FFFFFF',
27610
+ sort_color_opacity: '0.75',
27611
+ sort_color_2: '#416EFF',
27612
+ sort_color_opacity_2: '1',
27613
+ frozen_color: '#FFFFFF',
27614
+ frozen_color_opacity: '0.75',
27615
+ collapse_color: '#FFF',
27616
+ collapse_color_opacity: '0.75',
27617
+ expand_color: '#FFF',
27618
+ expand_color_opacity: '0.75',
27619
+ dragReorder_color: '#FFF',
27620
+ dragReorder_color_opacity: '0.75'
27606
27621
  }
27607
27622
  };
27608
27623
 
@@ -27615,6 +27630,7 @@
27615
27630
  return '#FFF';
27616
27631
  }
27617
27632
  var brightTheme = {
27633
+ name: 'BRIGHT',
27618
27634
  underlayBackgroundColor: '#FFF',
27619
27635
  defaultStyle: {
27620
27636
  color: '#FFF',
@@ -27683,6 +27699,7 @@
27683
27699
  return '#fbfbfc';
27684
27700
  }
27685
27701
  var arcoTheme = {
27702
+ name: 'ARCO',
27686
27703
  underlayBackgroundColor: '#FFF',
27687
27704
  defaultStyle: {
27688
27705
  color: '#1B1F23',
@@ -27794,6 +27811,7 @@
27794
27811
  return '#FDFDFD';
27795
27812
  }
27796
27813
  var defaultTheme = {
27814
+ name: 'DEFAULT',
27797
27815
  underlayBackgroundColor: '#FFF',
27798
27816
  defaultStyle: {
27799
27817
  borderColor: '#E1E4E8',
@@ -27890,6 +27908,7 @@
27890
27908
  return [top, null, bottom, null];
27891
27909
  }
27892
27910
  var materialDesignTheme = {
27911
+ name: 'SIMPLIFY',
27893
27912
  underlayBackgroundColor: '#FFF',
27894
27913
  defaultStyle: {
27895
27914
  borderColor: getBorderColor,
@@ -28014,12 +28033,15 @@
28014
28033
  _checkboxStyle = null;
28015
28034
  _radioStyle = null;
28016
28035
  _textPopTipStyle = null;
28036
+ _internalIconsStyle = null;
28017
28037
  isPivot = false;
28038
+ name = '';
28018
28039
  constructor(obj, superTheme) {
28019
28040
  this.internalTheme = {
28020
28041
  obj,
28021
28042
  superTheme
28022
28043
  };
28044
+ this.name = getProp$1(obj, superTheme, ['name']);
28023
28045
  }
28024
28046
  getExtendTheme() {
28025
28047
  return this.internalTheme.obj;
@@ -28551,6 +28573,14 @@
28551
28573
  }
28552
28574
  return this._textPopTipStyle;
28553
28575
  }
28576
+ get functionalIconsStyle() {
28577
+ if (!this._internalIconsStyle) {
28578
+ const { obj, superTheme } = this.internalTheme;
28579
+ const functionalIconsStyle = ingoreNoneValueMerge({}, superTheme.functionalIconsStyle, obj.functionalIconsStyle);
28580
+ this._internalIconsStyle = functionalIconsStyle;
28581
+ }
28582
+ return this._internalIconsStyle;
28583
+ }
28554
28584
  hasProperty(names) {
28555
28585
  const { obj, superTheme } = this.internalTheme;
28556
28586
  return hasThemeProperty(obj, names) || hasThemeProperty(superTheme, names);
@@ -32586,23 +32616,73 @@
32586
32616
  }
32587
32617
  }
32588
32618
 
32619
+ let sort_color;
32620
+ let sort_color_opacity;
32621
+ let sort_color_2;
32622
+ let sort_color_opacity_2;
32623
+ let sort_size;
32624
+ let sort_size_2;
32625
+ let frozen_color;
32626
+ let frozen_color_opacity;
32627
+ let freeze_color_opacity;
32628
+ let frozen_color_2;
32629
+ let frozen_color_opacity_2;
32630
+ let frozen_size;
32631
+ let frozen_size_2;
32632
+ let collapse_color;
32633
+ let collapse_color_opacity;
32634
+ let collapse_size;
32635
+ let collapse_size_2;
32636
+ let expand_color;
32637
+ let expand_color_opacity;
32638
+ let expand_size;
32639
+ let expand_size_2;
32640
+ let dragReorder_color;
32641
+ let dragReorder_color_opacity;
32642
+ let dragReorder_size;
32643
+ function setIconColor(themeIconsColor) {
32644
+ sort_color = themeIconsColor?.sort_color ?? '#282F38';
32645
+ sort_color_opacity = themeIconsColor?.sort_color_opacity ?? '0.35';
32646
+ sort_color_2 = themeIconsColor?.sort_color_2 ?? '#416EFF';
32647
+ sort_color_opacity_2 = themeIconsColor?.sort_color_opacity_2 ?? '1';
32648
+ sort_size = themeIconsColor?.sort_size ?? 16;
32649
+ sort_size_2 = themeIconsColor?.sort_size_2 ?? 22;
32650
+ frozen_color = themeIconsColor?.frozen_color ?? '#282F38';
32651
+ frozen_color_opacity = themeIconsColor?.frozen_color_opacity ?? '0.35';
32652
+ freeze_color_opacity = themeIconsColor?.frozen_color_opacity ?? '0.2';
32653
+ frozen_color_2 = themeIconsColor?.frozen_color_2 ?? '#416EFF';
32654
+ frozen_color_opacity_2 = themeIconsColor?.frozen_color_opacity_2 ?? '1';
32655
+ frozen_size = themeIconsColor?.frozen_size ?? 22;
32656
+ frozen_size_2 = themeIconsColor?.frozen_size_2 ?? 22;
32657
+ collapse_color = themeIconsColor?.collapse_color ?? '#141414';
32658
+ collapse_color_opacity = themeIconsColor?.collapse_color_opacity ?? '0.65';
32659
+ collapse_size = themeIconsColor?.collapse_size ?? 16;
32660
+ collapse_size_2 = themeIconsColor?.frozen_size_2 ?? 22;
32661
+ expand_color = themeIconsColor?.expand_color ?? '#141414';
32662
+ expand_color_opacity = themeIconsColor?.expand_color_opacity ?? '0.65';
32663
+ expand_size = themeIconsColor?.expand_size ?? 16;
32664
+ expand_size_2 = themeIconsColor?.expand_size_2 ?? 22;
32665
+ dragReorder_color = themeIconsColor?.dragReorder_color ?? '#666666';
32666
+ dragReorder_color_opacity = themeIconsColor?.dragReorder_color_opacity ?? '1';
32667
+ dragReorder_size = themeIconsColor?.dragReorder_size ?? 20;
32668
+ }
32589
32669
  const builtins = {
32590
32670
  get sort_downward() {
32591
32671
  return {
32592
32672
  type: 'svg',
32593
32673
  svg: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">' +
32594
- ' <path d="M4.6665 9H11.3332L7.99984 13.1667L4.6665 9Z" fill="#416EFF"/>' +
32595
- '<path d="M11.3335 7L4.66683 7L8.00016 2.83333L11.3335 7Z" fill="#282F38" fill-opacity="0.35"/>' +
32674
+ ` <path d="M4.6665 9H11.3332L7.99984 13.1667L4.6665 9Z" fill="${sort_color_2}" fill-opacity="${sort_color_opacity_2}"/>` +
32675
+ `<path d="M11.3335 7L4.66683 7L8.00016 2.83333L11.3335 7Z" fill="${sort_color}" fill-opacity="${sort_color_opacity}"/>` +
32596
32676
  '</svg> ',
32597
- width: 16,
32598
- height: 16,
32677
+ width: sort_size,
32678
+ height: sort_size,
32599
32679
  funcType: IconFuncTypeEnum.sort,
32600
32680
  name: 'sort_downward',
32601
32681
  positionType: IconPosition.contentRight,
32602
32682
  marginLeft: 3,
32603
32683
  hover: {
32604
- width: 22,
32605
- height: 22,
32684
+ width: sort_size_2,
32685
+ height: sort_size_2,
32606
32686
  bgColor: 'rgba(101, 117, 168, 0.1)'
32607
32687
  },
32608
32688
  cursor: 'pointer'
@@ -32612,18 +32692,18 @@
32612
32692
  return {
32613
32693
  type: 'svg',
32614
32694
  svg: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">' +
32615
- ' <path d="M4.6665 9H11.3332L7.99984 13.1667L4.6665 9Z" fill="#282F38" fill-opacity="0.35"/>' +
32616
- '<path d="M11.3335 7L4.66683 7L8.00016 2.83333L11.3335 7Z" fill="#416EFF"/>' +
32695
+ `<path d="M4.6665 9H11.3332L7.99984 13.1667L4.6665 9Z" fill="${sort_color}" fill-opacity="${sort_color_opacity}"/>` +
32696
+ `<path d="M11.3335 7L4.66683 7L8.00016 2.83333L11.3335 7Z" fill="${sort_color_2}" fill-opacity="${sort_color_opacity_2}"/>` +
32617
32697
  ' </svg>',
32618
- width: 16,
32619
- height: 16,
32698
+ width: sort_size,
32699
+ height: sort_size,
32620
32700
  funcType: IconFuncTypeEnum.sort,
32621
32701
  positionType: IconPosition.contentRight,
32622
32702
  name: 'sort_upward',
32623
32703
  marginLeft: 3,
32624
32704
  hover: {
32625
- width: 22,
32626
- height: 22,
32705
+ width: sort_size_2,
32706
+ height: sort_size_2,
32627
32707
  bgColor: 'rgba(101, 117, 168, 0.1)'
32628
32708
  },
32629
32709
  cursor: 'pointer'
@@ -32633,18 +32713,18 @@
32633
32713
  return {
32634
32714
  type: 'svg',
32635
32715
  svg: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">' +
32636
- '<path d="M4.6665 9H11.3332L7.99984 13.1667L4.6665 9Z" fill="#282F38" fill-opacity="0.35"/>' +
32637
- '<path d="M11.3335 7L4.66683 7L8.00016 2.83333L11.3335 7Z" fill="#282F38" fill-opacity="0.35"/>' +
32716
+ `<path d="M4.6665 9H11.3332L7.99984 13.1667L4.6665 9Z" fill="${sort_color}" fill-opacity="${sort_color_opacity}"/>` +
32717
+ `<path d="M11.3335 7L4.66683 7L8.00016 2.83333L11.3335 7Z" fill="${sort_color}" fill-opacity="${sort_color_opacity}"/>` +
32638
32718
  '</svg> ',
32639
- width: 16,
32640
- height: 16,
32719
+ width: sort_size,
32720
+ height: sort_size,
32641
32721
  funcType: IconFuncTypeEnum.sort,
32642
32722
  positionType: IconPosition.contentRight,
32643
32723
  name: 'sort_normal',
32644
32724
  marginLeft: 3,
32645
32725
  hover: {
32646
- width: 22,
32647
- height: 22,
32726
+ width: sort_size_2,
32727
+ height: sort_size_2,
32648
32728
  bgColor: 'rgba(101, 117, 168, 0.1)'
32649
32729
  },
32650
32730
  cursor: 'pointer'
@@ -32655,7 +32735,7 @@
32655
32735
  type: 'svg',
32656
32736
  svg: '<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">' +
32657
32737
  '<g clip-path="url(#clip0)">' +
32658
- '<path d="M17.1313 8.42047C17.1932 8.48238 17.2423 8.55587 17.2759 8.63676C17.3094 8.71764 17.3266 8.80434 17.3266 8.89189C17.3266 8.97944 17.3094 9.06613 17.2759 9.14702C17.2423 9.2279 17.1932 9.3014 17.1313 9.3633L13.3843 13.1103C13.7007 14.3048 13.5305 15.4443 12.8388 16.2395C12.8104 16.2781 12.7778 16.3136 12.7417 16.3451L12.712 16.3755C12.6501 16.4374 12.5766 16.4865 12.4957 16.52C12.4148 16.5535 12.3281 16.5707 12.2406 16.5707C12.153 16.5707 12.0663 16.5535 11.9854 16.52C11.9046 16.4865 11.8311 16.4374 11.7692 16.3755L9.17633 13.7826L6.05316 16.9058L5.11983 17.0925C5.09291 17.0979 5.06508 17.0965 5.03881 17.0886C5.01254 17.0806 4.98863 17.0663 4.96923 17.0469C4.94982 17.0275 4.9355 17.0036 4.92755 16.9773C4.9196 16.951 4.91827 16.9232 4.92366 16.8963L5.11033 15.963L8.23333 12.8396L5.64066 10.2471C5.57875 10.1852 5.52964 10.1117 5.49614 10.0309C5.46263 9.94997 5.44539 9.86327 5.44539 9.77572C5.44539 9.68817 5.46263 9.60148 5.49614 9.52059C5.52964 9.43971 5.57875 9.36621 5.64066 9.3043C5.65066 9.2943 5.66066 9.2843 5.67099 9.27464C5.70266 9.2383 5.73833 9.20547 5.77766 9.17664C6.57283 8.48564 7.71199 8.31564 8.90599 8.63197L12.6528 4.88497C12.7147 4.82306 12.7882 4.77395 12.8691 4.74045C12.95 4.70694 13.0367 4.6897 13.1242 4.6897C13.2118 4.6897 13.2985 4.70694 13.3794 4.74045C13.4603 4.77395 13.5338 4.82306 13.5957 4.88497L17.1312 8.42047H17.1313ZM15.7172 8.8918L13.1243 6.29914L9.56483 9.8588C9.47574 9.94788 9.36323 10.0099 9.24034 10.0376C9.11746 10.0654 8.98922 10.0578 8.87049 10.0156C8.22783 9.78764 7.63899 9.7553 7.17749 9.89814L12.1182 14.8388C12.261 14.3771 12.2287 13.7885 12.0007 13.146C11.9585 13.0272 11.9509 12.899 11.9787 12.7761C12.0064 12.6532 12.0684 12.5407 12.1575 12.4516L15.7172 8.89164V8.8918Z" fill="#282F38" fill-opacity="0.2"/>' +
32738
+ `<path d="M17.1313 8.42047C17.1932 8.48238 17.2423 8.55587 17.2759 8.63676C17.3094 8.71764 17.3266 8.80434 17.3266 8.89189C17.3266 8.97944 17.3094 9.06613 17.2759 9.14702C17.2423 9.2279 17.1932 9.3014 17.1313 9.3633L13.3843 13.1103C13.7007 14.3048 13.5305 15.4443 12.8388 16.2395C12.8104 16.2781 12.7778 16.3136 12.7417 16.3451L12.712 16.3755C12.6501 16.4374 12.5766 16.4865 12.4957 16.52C12.4148 16.5535 12.3281 16.5707 12.2406 16.5707C12.153 16.5707 12.0663 16.5535 11.9854 16.52C11.9046 16.4865 11.8311 16.4374 11.7692 16.3755L9.17633 13.7826L6.05316 16.9058L5.11983 17.0925C5.09291 17.0979 5.06508 17.0965 5.03881 17.0886C5.01254 17.0806 4.98863 17.0663 4.96923 17.0469C4.94982 17.0275 4.9355 17.0036 4.92755 16.9773C4.9196 16.951 4.91827 16.9232 4.92366 16.8963L5.11033 15.963L8.23333 12.8396L5.64066 10.2471C5.57875 10.1852 5.52964 10.1117 5.49614 10.0309C5.46263 9.94997 5.44539 9.86327 5.44539 9.77572C5.44539 9.68817 5.46263 9.60148 5.49614 9.52059C5.52964 9.43971 5.57875 9.36621 5.64066 9.3043C5.65066 9.2943 5.66066 9.2843 5.67099 9.27464C5.70266 9.2383 5.73833 9.20547 5.77766 9.17664C6.57283 8.48564 7.71199 8.31564 8.90599 8.63197L12.6528 4.88497C12.7147 4.82306 12.7882 4.77395 12.8691 4.74045C12.95 4.70694 13.0367 4.6897 13.1242 4.6897C13.2118 4.6897 13.2985 4.70694 13.3794 4.74045C13.4603 4.77395 13.5338 4.82306 13.5957 4.88497L17.1312 8.42047H17.1313ZM15.7172 8.8918L13.1243 6.29914L9.56483 9.8588C9.47574 9.94788 9.36323 10.0099 9.24034 10.0376C9.11746 10.0654 8.98922 10.0578 8.87049 10.0156C8.22783 9.78764 7.63899 9.7553 7.17749 9.89814L12.1182 14.8388C12.261 14.3771 12.2287 13.7885 12.0007 13.146C11.9585 13.0272 11.9509 12.899 11.9787 12.7761C12.0064 12.6532 12.0684 12.5407 12.1575 12.4516L15.7172 8.89164V8.8918Z" fill="${frozen_color}" fill-opacity="${freeze_color_opacity}"/>` +
32659
32739
  '</g>' +
32660
32740
  '<defs>' +
32661
32741
  '<clipPath id="clip0">' +
@@ -32663,15 +32743,15 @@
32663
32743
  '</clipPath>' +
32664
32744
  '</defs>' +
32665
32745
  '</svg>',
32666
- width: 22,
32667
- height: 22,
32746
+ width: frozen_size,
32747
+ height: frozen_size,
32668
32748
  name: 'freeze',
32669
32749
  funcType: IconFuncTypeEnum.frozen,
32670
32750
  positionType: IconPosition.right,
32671
32751
  marginRight: 0,
32672
32752
  hover: {
32673
- width: 22,
32674
- height: 22,
32753
+ width: frozen_size_2,
32754
+ height: frozen_size_2,
32675
32755
  bgColor: 'rgba(101, 117, 168, 0.1)'
32676
32756
  },
32677
32757
  cursor: 'pointer'
@@ -32681,17 +32761,17 @@
32681
32761
  return {
32682
32762
  type: 'svg',
32683
32763
  svg: '<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">' +
32684
- ' <path d="M8.49975 3.66663C8.32294 3.66663 8.15337 3.73686 8.02835 3.86189C7.90332 3.98691 7.83309 4.15648 7.83309 4.33329V9.63246C6.76475 10.2533 6.07942 11.1795 6.00625 12.2308C5.99892 12.2786 5.99692 12.3268 6.00009 12.3741L5.99975 12.4166C5.99975 12.5934 6.06999 12.763 6.19501 12.888C6.32004 13.0131 6.48961 13.0833 6.66642 13.0833H10.3333L10.3331 17.5L10.8611 18.292C10.8763 18.3148 10.8969 18.3335 10.9211 18.3464C10.9453 18.3594 10.9723 18.3662 10.9998 18.3662C11.0272 18.3662 11.0542 18.3594 11.0784 18.3464C11.1026 18.3335 11.1232 18.3148 11.1384 18.292L11.6664 17.5L11.6666 13.0833H15.3331C15.5099 13.0833 15.6795 13.0131 15.8045 12.888C15.9295 12.763 15.9998 12.5934 15.9998 12.4166C15.9998 12.4025 15.9998 12.3883 15.9994 12.3741C16.0028 12.3263 16.0008 12.2776 15.9933 12.2295C15.9196 11.1786 15.2343 10.2528 14.1664 9.63229V4.33329C14.1664 4.15648 14.0962 3.98691 13.9712 3.86189C13.8461 3.73686 13.6766 3.66663 13.4998 3.66663H8.49975Z" fill="#282F38" fill-opacity="0.35"/>' +
32764
+ `<path d="M8.49975 3.66663C8.32294 3.66663 8.15337 3.73686 8.02835 3.86189C7.90332 3.98691 7.83309 4.15648 7.83309 4.33329V9.63246C6.76475 10.2533 6.07942 11.1795 6.00625 12.2308C5.99892 12.2786 5.99692 12.3268 6.00009 12.3741L5.99975 12.4166C5.99975 12.5934 6.06999 12.763 6.19501 12.888C6.32004 13.0131 6.48961 13.0833 6.66642 13.0833H10.3333L10.3331 17.5L10.8611 18.292C10.8763 18.3148 10.8969 18.3335 10.9211 18.3464C10.9453 18.3594 10.9723 18.3662 10.9998 18.3662C11.0272 18.3662 11.0542 18.3594 11.0784 18.3464C11.1026 18.3335 11.1232 18.3148 11.1384 18.292L11.6664 17.5L11.6666 13.0833H15.3331C15.5099 13.0833 15.6795 13.0131 15.8045 12.888C15.9295 12.763 15.9998 12.5934 15.9998 12.4166C15.9998 12.4025 15.9998 12.3883 15.9994 12.3741C16.0028 12.3263 16.0008 12.2776 15.9933 12.2295C15.9196 11.1786 15.2343 10.2528 14.1664 9.63229V4.33329C14.1664 4.15648 14.0962 3.98691 13.9712 3.86189C13.8461 3.73686 13.6766 3.66663 13.4998 3.66663H8.49975Z" fill="${frozen_color}" fill-opacity="${frozen_color_opacity}"/>` +
32685
32765
  '</svg>',
32686
- width: 22,
32687
- height: 22,
32766
+ width: frozen_size,
32767
+ height: frozen_size,
32688
32768
  name: 'frozen',
32689
32769
  funcType: IconFuncTypeEnum.frozen,
32690
32770
  positionType: IconPosition.right,
32691
32771
  marginRight: 0,
32692
32772
  hover: {
32693
- width: 22,
32694
- height: 22,
32773
+ width: frozen_size_2,
32774
+ height: frozen_size_2,
32695
32775
  bgColor: 'rgba(101, 117, 168, 0.1)'
32696
32776
  },
32697
32777
  cursor: 'pointer'
@@ -32701,17 +32781,17 @@
32701
32781
  return {
32702
32782
  type: 'svg',
32703
32783
  svg: '<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">' +
32704
- '<path d="M8.49975 3.66663C8.32294 3.66663 8.15337 3.73686 8.02835 3.86189C7.90332 3.98691 7.83309 4.15648 7.83309 4.33329V9.63246C6.76475 10.2533 6.07942 11.1795 6.00625 12.2308C5.99892 12.2786 5.99692 12.3268 6.00009 12.3741L5.99975 12.4166C5.99975 12.5934 6.06999 12.763 6.19501 12.888C6.32004 13.0131 6.48961 13.0833 6.66642 13.0833H10.3333L10.3331 17.5L10.8611 18.292C10.8763 18.3148 10.8969 18.3335 10.9211 18.3464C10.9453 18.3594 10.9723 18.3662 10.9998 18.3662C11.0272 18.3662 11.0542 18.3594 11.0784 18.3464C11.1026 18.3335 11.1232 18.3148 11.1384 18.292L11.6664 17.5L11.6666 13.0833H15.3331C15.5099 13.0833 15.6795 13.0131 15.8045 12.888C15.9295 12.763 15.9998 12.5934 15.9998 12.4166C15.9998 12.4025 15.9998 12.3883 15.9994 12.3741C16.0028 12.3263 16.0008 12.2776 15.9933 12.2295C15.9196 11.1786 15.2343 10.2528 14.1664 9.63229V4.33329C14.1664 4.15648 14.0962 3.98691 13.9712 3.86189C13.8461 3.73686 13.6766 3.66663 13.4998 3.66663H8.49975Z" fill="#416EFF"/>' +
32784
+ `<path d="M8.49975 3.66663C8.32294 3.66663 8.15337 3.73686 8.02835 3.86189C7.90332 3.98691 7.83309 4.15648 7.83309 4.33329V9.63246C6.76475 10.2533 6.07942 11.1795 6.00625 12.2308C5.99892 12.2786 5.99692 12.3268 6.00009 12.3741L5.99975 12.4166C5.99975 12.5934 6.06999 12.763 6.19501 12.888C6.32004 13.0131 6.48961 13.0833 6.66642 13.0833H10.3333L10.3331 17.5L10.8611 18.292C10.8763 18.3148 10.8969 18.3335 10.9211 18.3464C10.9453 18.3594 10.9723 18.3662 10.9998 18.3662C11.0272 18.3662 11.0542 18.3594 11.0784 18.3464C11.1026 18.3335 11.1232 18.3148 11.1384 18.292L11.6664 17.5L11.6666 13.0833H15.3331C15.5099 13.0833 15.6795 13.0131 15.8045 12.888C15.9295 12.763 15.9998 12.5934 15.9998 12.4166C15.9998 12.4025 15.9998 12.3883 15.9994 12.3741C16.0028 12.3263 16.0008 12.2776 15.9933 12.2295C15.9196 11.1786 15.2343 10.2528 14.1664 9.63229V4.33329C14.1664 4.15648 14.0962 3.98691 13.9712 3.86189C13.8461 3.73686 13.6766 3.66663 13.4998 3.66663H8.49975Z" fill="${frozen_color_2}" fill-opacity="${frozen_color_opacity_2}"/>` +
32705
32785
  '</svg>',
32706
- width: 22,
32707
- height: 22,
32786
+ width: frozen_size,
32787
+ height: frozen_size,
32708
32788
  funcType: IconFuncTypeEnum.frozen,
32709
32789
  positionType: IconPosition.right,
32710
32790
  name: 'frozenCurrent',
32711
32791
  marginRight: 0,
32712
32792
  hover: {
32713
- width: 22,
32714
- height: 22,
32793
+ width: frozen_size_2,
32794
+ height: frozen_size_2,
32715
32795
  bgColor: 'rgba(101, 117, 168, 0.1)'
32716
32796
  },
32717
32797
  cursor: 'pointer'
@@ -32787,18 +32867,18 @@
32787
32867
  return {
32788
32868
  type: 'svg',
32789
32869
  svg: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
32790
- <path d="M4.64988 6.81235C4.38797 6.48497 4.62106 6 5.04031 6L10.9597 6C11.3789 6 11.612 6.48497 11.3501 6.81235L8.39043 10.512C8.19027 10.7622 7.80973 10.7622 7.60957 10.512L4.64988 6.81235Z" fill="#141414" fill-opacity="0.65"/>
32870
+ <path d="M4.64988 6.81235C4.38797 6.48497 4.62106 6 5.04031 6L10.9597 6C11.3789 6 11.612 6.48497 11.3501 6.81235L8.39043 10.512C8.19027 10.7622 7.80973 10.7622 7.60957 10.512L4.64988 6.81235Z" fill="${expand_color}" fill-opacity="${expand_color_opacity}"/>
32791
32871
  </svg>`,
32792
- width: 16,
32793
- height: 16,
32872
+ width: expand_size,
32873
+ height: expand_size,
32794
32874
  funcType: IconFuncTypeEnum.expand,
32795
32875
  name: 'expand',
32796
32876
  positionType: IconPosition.contentLeft,
32797
32877
  marginLeft: 0,
32798
32878
  marginRight: 4,
32799
32879
  hover: {
32800
- width: 22,
32801
- height: 22,
32880
+ width: expand_size_2,
32881
+ height: expand_size_2,
32802
32882
  bgColor: 'rgba(101, 117, 168, 0.1)'
32803
32883
  },
32804
32884
  cursor: 'pointer'
@@ -32808,18 +32888,18 @@
32808
32888
  return {
32809
32889
  type: 'svg',
32810
32890
  svg: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
32811
- <path d="M5.81235 11.3501C5.48497 11.612 5 11.3789 5 10.9597L5 5.04031C5 4.62106 5.48497 4.38797 5.81235 4.64988L9.51196 7.60957C9.76216 7.80973 9.76216 8.19027 9.51196 8.39044L5.81235 11.3501Z" fill="#141414" fill-opacity="0.65"/>
32891
+ <path d="M5.81235 11.3501C5.48497 11.612 5 11.3789 5 10.9597L5 5.04031C5 4.62106 5.48497 4.38797 5.81235 4.64988L9.51196 7.60957C9.76216 7.80973 9.76216 8.19027 9.51196 8.39044L5.81235 11.3501Z" fill="${collapse_color}" fill-opacity="${collapse_color_opacity}"/>
32812
32892
  </svg>`,
32813
- width: 16,
32814
- height: 16,
32893
+ width: collapse_size,
32894
+ height: collapse_size,
32815
32895
  funcType: IconFuncTypeEnum.collapse,
32816
32896
  name: 'collapse',
32817
32897
  positionType: IconPosition.contentLeft,
32818
32898
  marginLeft: 0,
32819
32899
  marginRight: 4,
32820
32900
  hover: {
32821
- width: 22,
32822
- height: 22,
32901
+ width: collapse_size_2,
32902
+ height: collapse_size_2,
32823
32903
  bgColor: 'rgba(101, 117, 168, 0.1)'
32824
32904
  },
32825
32905
  cursor: 'pointer'
@@ -32852,9 +32932,9 @@
32852
32932
  get dragReorder() {
32853
32933
  return {
32854
32934
  type: 'svg',
32855
- svg: '<svg t="1710129136961" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5166" width="200" height="200"><path d="M362.666667 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="5167"></path><path d="M661.333333 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="5168"></path><path d="M362.666667 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="5169"></path><path d="M661.333333 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="5170"></path><path d="M362.666667 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="5171"></path><path d="M661.333333 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="#666666" p-id="5172"></path></svg>',
32856
- width: 20,
32857
- height: 20,
32935
+ svg: `<svg t="1710129136961" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5166" width="200" height="200"><path d="M362.666667 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="${dragReorder_color}" fill-opacity="${dragReorder_color_opacity}" p-id="5167"></path><path d="M661.333333 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="${dragReorder_color}" fill-opacity="${dragReorder_color_opacity}" p-id="5168"></path><path d="M362.666667 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="${dragReorder_color}" fill-opacity="${dragReorder_color_opacity}" p-id="5169"></path><path d="M661.333333 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="${dragReorder_color}" fill-opacity="${dragReorder_color_opacity}" p-id="5170"></path><path d="M362.666667 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="${dragReorder_color}" fill-opacity="${dragReorder_color_opacity}" p-id="5171"></path><path d="M661.333333 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" fill="${dragReorder_color}" fill-opacity="${dragReorder_color_opacity}" p-id="5172"></path></svg>`,
32936
+ width: dragReorder_size,
32937
+ height: dragReorder_size,
32858
32938
  funcType: IconFuncTypeEnum.dragReorder,
32859
32939
  positionType: IconPosition.left,
32860
32940
  name: 'dragReorder',
@@ -34547,7 +34627,8 @@
34547
34627
  }
34548
34628
  let isVtableMerge = false;
34549
34629
  if (table.internalProps.enableTreeNodeMerge && isMerge) {
34550
- const { vtableMergeName, vtableMerge } = table.getCellRawRecord(range.start.col, range.start.row);
34630
+ const rawRecord = table.getCellRawRecord(range.start.col, range.start.row);
34631
+ const { vtableMergeName, vtableMerge } = rawRecord ?? {};
34551
34632
  isVtableMerge = vtableMerge;
34552
34633
  if (vtableMerge) {
34553
34634
  mayHaveIcon = true;
@@ -40236,7 +40317,8 @@
40236
40317
  }
40237
40318
  let isVtableMerge = false;
40238
40319
  if (table.internalProps.enableTreeNodeMerge && isMerge) {
40239
- const { vtableMergeName, vtableMerge } = table.getCellRawRecord(range.start.col, range.start.row);
40320
+ const rawRecord = table.getCellRawRecord(range.start.col, range.start.row);
40321
+ const { vtableMergeName, vtableMerge } = rawRecord ?? {};
40240
40322
  isVtableMerge = vtableMerge;
40241
40323
  if (vtableMerge) {
40242
40324
  mayHaveIcon = true;
@@ -40789,7 +40871,7 @@
40789
40871
  }
40790
40872
  }
40791
40873
  else {
40792
- y = table.getRowsHeight(table.frozenRowCount, cellGroup.row - 1);
40874
+ y = getEstimatePosition(cellGroup.row, table);
40793
40875
  }
40794
40876
  if (isValid$1(y)) {
40795
40877
  cellGroup.setAttribute('y', y);
@@ -40817,7 +40899,7 @@
40817
40899
  }
40818
40900
  }
40819
40901
  else {
40820
- y = table.getRowsHeight(table.frozenRowCount, cellGroup.row - 1);
40902
+ y = getEstimatePosition(cellGroup.row, table);
40821
40903
  }
40822
40904
  if (isValid$1(y)) {
40823
40905
  cellGroup.setAttribute('y', y);
@@ -40831,6 +40913,19 @@
40831
40913
  table.scenegraph.proxy.yLimitTop = totalBodyHeight / 2;
40832
40914
  table.scenegraph.proxy.yLimitBottom = totalHeight - totalBodyHeight / 2;
40833
40915
  }
40916
+ function getEstimatePosition(row, table) {
40917
+ let y;
40918
+ if (row < table.frozenRowCount) {
40919
+ y = table.getRowsHeight(0, row - 1);
40920
+ }
40921
+ else if (row >= table.rowCount - table.bottomFrozenRowCount) {
40922
+ y = table.getRowsHeight(table.rowCount - table.bottomFrozenRowCount, row - 1);
40923
+ }
40924
+ else {
40925
+ y = table.getRowsHeight(table.frozenRowCount, row - 1);
40926
+ }
40927
+ return y;
40928
+ }
40834
40929
 
40835
40930
  async function dynamicSetY(y, screenTop, isEnd, proxy) {
40836
40931
  if (!screenTop) {
@@ -47210,9 +47305,18 @@
47210
47305
  sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex);
47211
47306
  targetIndex = table.getRecordShowIndexByCell(0, targetIndex);
47212
47307
  }
47213
- if (sourceIndex !== targetIndex) {
47308
+ if (sourceIndex > targetIndex) {
47214
47309
  const sourceRecord = radioState[sourceIndex];
47215
- radioState[sourceIndex] = radioState[targetIndex];
47310
+ for (let i = sourceIndex; i > targetIndex; i--) {
47311
+ radioState[i] = radioState[i - 1];
47312
+ }
47313
+ radioState[targetIndex] = sourceRecord;
47314
+ }
47315
+ else if (sourceIndex < targetIndex) {
47316
+ const sourceRecord = radioState[sourceIndex];
47317
+ for (let i = sourceIndex; i < targetIndex; i++) {
47318
+ radioState[i] = radioState[i + 1];
47319
+ }
47216
47320
  radioState[targetIndex] = sourceRecord;
47217
47321
  }
47218
47322
  }
@@ -47407,9 +47511,18 @@
47407
47511
  sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex);
47408
47512
  targetIndex = table.getRecordShowIndexByCell(0, targetIndex);
47409
47513
  }
47410
- if (sourceIndex !== targetIndex) {
47514
+ if (sourceIndex > targetIndex) {
47411
47515
  const sourceRecord = checkedState[sourceIndex];
47412
- checkedState[sourceIndex] = checkedState[targetIndex];
47516
+ for (let i = sourceIndex; i > targetIndex; i--) {
47517
+ checkedState[i] = checkedState[i - 1];
47518
+ }
47519
+ checkedState[targetIndex] = sourceRecord;
47520
+ }
47521
+ else if (sourceIndex < targetIndex) {
47522
+ const sourceRecord = checkedState[sourceIndex];
47523
+ for (let i = sourceIndex; i < targetIndex; i++) {
47524
+ checkedState[i] = checkedState[i + 1];
47525
+ }
47413
47526
  checkedState[targetIndex] = sourceRecord;
47414
47527
  }
47415
47528
  }
@@ -55171,7 +55284,7 @@
55171
55284
  return TABLE_EVENT_TYPE;
55172
55285
  }
55173
55286
  options;
55174
- version = "1.7.9-alpha.2";
55287
+ version = "1.8.0";
55175
55288
  pagination;
55176
55289
  id = `VTable${Date.now()}`;
55177
55290
  headerStyleCache;
@@ -55286,6 +55399,7 @@
55286
55399
  internalProps.focusedTable = false;
55287
55400
  internalProps.theme = themes.of(options.theme ?? themes.DEFAULT);
55288
55401
  internalProps.theme.isPivot = this.isPivotTable();
55402
+ setIconColor(internalProps.theme.functionalIconsStyle);
55289
55403
  if (container) {
55290
55404
  if (clearDOM) {
55291
55405
  container.innerHTML = '';
@@ -55296,9 +55410,6 @@
55296
55410
  else {
55297
55411
  this._updateSize();
55298
55412
  }
55299
- this.options = options;
55300
- internalProps.theme = themes.of(options.theme ?? themes.DEFAULT);
55301
- internalProps.theme.isPivot = this.isPivotTable();
55302
55413
  internalProps.bodyHelper = new BodyHelper(this);
55303
55414
  internalProps.headerHelper = new HeaderHelper(this);
55304
55415
  internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this);
@@ -56507,6 +56618,7 @@
56507
56618
  internalProps.stick.changedCells.clear();
56508
56619
  internalProps.theme = themes.of(options.theme ?? themes.DEFAULT);
56509
56620
  internalProps.theme.isPivot = this.isPivotTable();
56621
+ setIconColor(internalProps.theme.functionalIconsStyle);
56510
56622
  this.scenegraph.updateStageBackground();
56511
56623
  internalProps.autoWrapText = options.autoWrapText;
56512
56624
  internalProps.enableLineBreak = options.enableLineBreak;
@@ -56765,11 +56877,13 @@
56765
56877
  this.internalProps.theme = themes.of(theme ?? themes.DEFAULT);
56766
56878
  this.internalProps.theme.isPivot = this.isPivotTable();
56767
56879
  this.options.theme = theme;
56880
+ setIconColor(this.internalProps.theme.functionalIconsStyle);
56768
56881
  }
56769
56882
  updateTheme(theme) {
56770
56883
  const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
56771
56884
  this.internalProps.theme = themes.of(theme ?? themes.DEFAULT);
56772
56885
  this.internalProps.theme.isPivot = this.isPivotTable();
56886
+ setIconColor(this.internalProps.theme.functionalIconsStyle);
56773
56887
  this.options.theme = theme;
56774
56888
  this.scenegraph.updateComponent();
56775
56889
  this.scenegraph.updateStageBackground();
@@ -74371,7 +74485,7 @@
74371
74485
  }
74372
74486
 
74373
74487
  registerForVrender();
74374
- const version = "1.7.9-alpha.2";
74488
+ const version = "1.8.0";
74375
74489
  function getIcons() {
74376
74490
  return get$2();
74377
74491
  }