@visactor/vseed 0.0.27 → 0.0.28

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.
@@ -64,11 +64,14 @@ export declare class Builder implements VSeedBuilder {
64
64
  bodyFontColor?: string | undefined;
65
65
  bodyBackgroundColor?: string | undefined;
66
66
  hoverBodyBackgroundColor?: string | undefined;
67
+ hoverBodyInlineBackgroundColor?: string | undefined;
67
68
  headerFontSize?: number | undefined;
68
69
  headerFontColor?: string | undefined;
69
70
  headerBackgroundColor?: string | undefined;
70
71
  hoverHeaderBackgroundColor?: string | undefined;
72
+ hoverHeaderInlineBackgroundColor?: string | undefined;
71
73
  selectedBorderColor?: string | undefined;
74
+ selectedBackgroundColor?: string | undefined;
72
75
  } | undefined;
73
76
  pivotTable?: {
74
77
  borderColor?: string | undefined;
@@ -76,11 +79,14 @@ export declare class Builder implements VSeedBuilder {
76
79
  bodyFontColor?: string | undefined;
77
80
  bodyBackgroundColor?: string | undefined;
78
81
  hoverBodyBackgroundColor?: string | undefined;
82
+ hoverBodyInlineBackgroundColor?: string | undefined;
79
83
  headerFontSize?: number | undefined;
80
84
  headerFontColor?: string | undefined;
81
85
  headerBackgroundColor?: string | undefined;
82
86
  hoverHeaderBackgroundColor?: string | undefined;
87
+ hoverHeaderInlineBackgroundColor?: string | undefined;
83
88
  selectedBorderColor?: string | undefined;
89
+ selectedBackgroundColor?: string | undefined;
84
90
  } | undefined;
85
91
  line?: {
86
92
  backgroundColor?: string | undefined;
@@ -1705,11 +1711,14 @@ export declare class Builder implements VSeedBuilder {
1705
1711
  bodyFontColor?: string | undefined;
1706
1712
  bodyBackgroundColor?: string | undefined;
1707
1713
  hoverBodyBackgroundColor?: string | undefined;
1714
+ hoverBodyInlineBackgroundColor?: string | undefined;
1708
1715
  headerFontSize?: number | undefined;
1709
1716
  headerFontColor?: string | undefined;
1710
1717
  headerBackgroundColor?: string | undefined;
1711
1718
  hoverHeaderBackgroundColor?: string | undefined;
1719
+ hoverHeaderInlineBackgroundColor?: string | undefined;
1712
1720
  selectedBorderColor?: string | undefined;
1721
+ selectedBackgroundColor?: string | undefined;
1713
1722
  } | undefined;
1714
1723
  pivotTable?: {
1715
1724
  borderColor?: string | undefined;
@@ -1717,11 +1726,14 @@ export declare class Builder implements VSeedBuilder {
1717
1726
  bodyFontColor?: string | undefined;
1718
1727
  bodyBackgroundColor?: string | undefined;
1719
1728
  hoverBodyBackgroundColor?: string | undefined;
1729
+ hoverBodyInlineBackgroundColor?: string | undefined;
1720
1730
  headerFontSize?: number | undefined;
1721
1731
  headerFontColor?: string | undefined;
1722
1732
  headerBackgroundColor?: string | undefined;
1723
1733
  hoverHeaderBackgroundColor?: string | undefined;
1734
+ hoverHeaderInlineBackgroundColor?: string | undefined;
1724
1735
  selectedBorderColor?: string | undefined;
1736
+ selectedBackgroundColor?: string | undefined;
1725
1737
  } | undefined;
1726
1738
  line?: {
1727
1739
  backgroundColor?: string | undefined;
@@ -3447,11 +3459,14 @@ export declare class Builder implements VSeedBuilder {
3447
3459
  bodyFontColor?: string | undefined;
3448
3460
  bodyBackgroundColor?: string | undefined;
3449
3461
  hoverBodyBackgroundColor?: string | undefined;
3462
+ hoverBodyInlineBackgroundColor?: string | undefined;
3450
3463
  headerFontSize?: number | undefined;
3451
3464
  headerFontColor?: string | undefined;
3452
3465
  headerBackgroundColor?: string | undefined;
3453
3466
  hoverHeaderBackgroundColor?: string | undefined;
3467
+ hoverHeaderInlineBackgroundColor?: string | undefined;
3454
3468
  selectedBorderColor?: string | undefined;
3469
+ selectedBackgroundColor?: string | undefined;
3455
3470
  } | undefined;
3456
3471
  pivotTable?: {
3457
3472
  borderColor?: string | undefined;
@@ -3459,11 +3474,14 @@ export declare class Builder implements VSeedBuilder {
3459
3474
  bodyFontColor?: string | undefined;
3460
3475
  bodyBackgroundColor?: string | undefined;
3461
3476
  hoverBodyBackgroundColor?: string | undefined;
3477
+ hoverBodyInlineBackgroundColor?: string | undefined;
3462
3478
  headerFontSize?: number | undefined;
3463
3479
  headerFontColor?: string | undefined;
3464
3480
  headerBackgroundColor?: string | undefined;
3465
3481
  hoverHeaderBackgroundColor?: string | undefined;
3482
+ hoverHeaderInlineBackgroundColor?: string | undefined;
3466
3483
  selectedBorderColor?: string | undefined;
3484
+ selectedBackgroundColor?: string | undefined;
3467
3485
  } | undefined;
3468
3486
  line?: {
3469
3487
  backgroundColor?: string | undefined;
@@ -4865,11 +4883,14 @@ export declare class Builder implements VSeedBuilder {
4865
4883
  bodyFontColor?: string | undefined;
4866
4884
  bodyBackgroundColor?: string | undefined;
4867
4885
  hoverBodyBackgroundColor?: string | undefined;
4886
+ hoverBodyInlineBackgroundColor?: string | undefined;
4868
4887
  headerFontSize?: number | undefined;
4869
4888
  headerFontColor?: string | undefined;
4870
4889
  headerBackgroundColor?: string | undefined;
4871
4890
  hoverHeaderBackgroundColor?: string | undefined;
4891
+ hoverHeaderInlineBackgroundColor?: string | undefined;
4872
4892
  selectedBorderColor?: string | undefined;
4893
+ selectedBackgroundColor?: string | undefined;
4873
4894
  } | undefined;
4874
4895
  pivotTable?: {
4875
4896
  borderColor?: string | undefined;
@@ -4877,11 +4898,14 @@ export declare class Builder implements VSeedBuilder {
4877
4898
  bodyFontColor?: string | undefined;
4878
4899
  bodyBackgroundColor?: string | undefined;
4879
4900
  hoverBodyBackgroundColor?: string | undefined;
4901
+ hoverBodyInlineBackgroundColor?: string | undefined;
4880
4902
  headerFontSize?: number | undefined;
4881
4903
  headerFontColor?: string | undefined;
4882
4904
  headerBackgroundColor?: string | undefined;
4883
4905
  hoverHeaderBackgroundColor?: string | undefined;
4906
+ hoverHeaderInlineBackgroundColor?: string | undefined;
4884
4907
  selectedBorderColor?: string | undefined;
4908
+ selectedBackgroundColor?: string | undefined;
4885
4909
  } | undefined;
4886
4910
  line?: {
4887
4911
  backgroundColor?: string | undefined;
@@ -6336,11 +6360,14 @@ export declare class Builder implements VSeedBuilder {
6336
6360
  bodyFontColor?: string | undefined;
6337
6361
  bodyBackgroundColor?: string | undefined;
6338
6362
  hoverBodyBackgroundColor?: string | undefined;
6363
+ hoverBodyInlineBackgroundColor?: string | undefined;
6339
6364
  headerFontSize?: number | undefined;
6340
6365
  headerFontColor?: string | undefined;
6341
6366
  headerBackgroundColor?: string | undefined;
6342
6367
  hoverHeaderBackgroundColor?: string | undefined;
6368
+ hoverHeaderInlineBackgroundColor?: string | undefined;
6343
6369
  selectedBorderColor?: string | undefined;
6370
+ selectedBackgroundColor?: string | undefined;
6344
6371
  } | undefined;
6345
6372
  pivotTable?: {
6346
6373
  borderColor?: string | undefined;
@@ -6348,11 +6375,14 @@ export declare class Builder implements VSeedBuilder {
6348
6375
  bodyFontColor?: string | undefined;
6349
6376
  bodyBackgroundColor?: string | undefined;
6350
6377
  hoverBodyBackgroundColor?: string | undefined;
6378
+ hoverBodyInlineBackgroundColor?: string | undefined;
6351
6379
  headerFontSize?: number | undefined;
6352
6380
  headerFontColor?: string | undefined;
6353
6381
  headerBackgroundColor?: string | undefined;
6354
6382
  hoverHeaderBackgroundColor?: string | undefined;
6383
+ hoverHeaderInlineBackgroundColor?: string | undefined;
6355
6384
  selectedBorderColor?: string | undefined;
6385
+ selectedBackgroundColor?: string | undefined;
6356
6386
  } | undefined;
6357
6387
  line?: {
6358
6388
  backgroundColor?: string | undefined;
@@ -7977,11 +8007,14 @@ export declare class Builder implements VSeedBuilder {
7977
8007
  bodyFontColor?: string | undefined;
7978
8008
  bodyBackgroundColor?: string | undefined;
7979
8009
  hoverBodyBackgroundColor?: string | undefined;
8010
+ hoverBodyInlineBackgroundColor?: string | undefined;
7980
8011
  headerFontSize?: number | undefined;
7981
8012
  headerFontColor?: string | undefined;
7982
8013
  headerBackgroundColor?: string | undefined;
7983
8014
  hoverHeaderBackgroundColor?: string | undefined;
8015
+ hoverHeaderInlineBackgroundColor?: string | undefined;
7984
8016
  selectedBorderColor?: string | undefined;
8017
+ selectedBackgroundColor?: string | undefined;
7985
8018
  } | undefined;
7986
8019
  pivotTable?: {
7987
8020
  borderColor?: string | undefined;
@@ -7989,11 +8022,14 @@ export declare class Builder implements VSeedBuilder {
7989
8022
  bodyFontColor?: string | undefined;
7990
8023
  bodyBackgroundColor?: string | undefined;
7991
8024
  hoverBodyBackgroundColor?: string | undefined;
8025
+ hoverBodyInlineBackgroundColor?: string | undefined;
7992
8026
  headerFontSize?: number | undefined;
7993
8027
  headerFontColor?: string | undefined;
7994
8028
  headerBackgroundColor?: string | undefined;
7995
8029
  hoverHeaderBackgroundColor?: string | undefined;
8030
+ hoverHeaderInlineBackgroundColor?: string | undefined;
7996
8031
  selectedBorderColor?: string | undefined;
8032
+ selectedBackgroundColor?: string | undefined;
7997
8033
  } | undefined;
7998
8034
  line?: {
7999
8035
  backgroundColor?: string | undefined;
@@ -9766,11 +9802,14 @@ export declare class Builder implements VSeedBuilder {
9766
9802
  bodyFontColor?: string | undefined;
9767
9803
  bodyBackgroundColor?: string | undefined;
9768
9804
  hoverBodyBackgroundColor?: string | undefined;
9805
+ hoverBodyInlineBackgroundColor?: string | undefined;
9769
9806
  headerFontSize?: number | undefined;
9770
9807
  headerFontColor?: string | undefined;
9771
9808
  headerBackgroundColor?: string | undefined;
9772
9809
  hoverHeaderBackgroundColor?: string | undefined;
9810
+ hoverHeaderInlineBackgroundColor?: string | undefined;
9773
9811
  selectedBorderColor?: string | undefined;
9812
+ selectedBackgroundColor?: string | undefined;
9774
9813
  } | undefined;
9775
9814
  pivotTable?: {
9776
9815
  borderColor?: string | undefined;
@@ -9778,11 +9817,14 @@ export declare class Builder implements VSeedBuilder {
9778
9817
  bodyFontColor?: string | undefined;
9779
9818
  bodyBackgroundColor?: string | undefined;
9780
9819
  hoverBodyBackgroundColor?: string | undefined;
9820
+ hoverBodyInlineBackgroundColor?: string | undefined;
9781
9821
  headerFontSize?: number | undefined;
9782
9822
  headerFontColor?: string | undefined;
9783
9823
  headerBackgroundColor?: string | undefined;
9784
9824
  hoverHeaderBackgroundColor?: string | undefined;
9825
+ hoverHeaderInlineBackgroundColor?: string | undefined;
9785
9826
  selectedBorderColor?: string | undefined;
9827
+ selectedBackgroundColor?: string | undefined;
9786
9828
  } | undefined;
9787
9829
  line?: {
9788
9830
  backgroundColor?: string | undefined;
@@ -11407,11 +11449,14 @@ export declare class Builder implements VSeedBuilder {
11407
11449
  bodyFontColor?: string | undefined;
11408
11450
  bodyBackgroundColor?: string | undefined;
11409
11451
  hoverBodyBackgroundColor?: string | undefined;
11452
+ hoverBodyInlineBackgroundColor?: string | undefined;
11410
11453
  headerFontSize?: number | undefined;
11411
11454
  headerFontColor?: string | undefined;
11412
11455
  headerBackgroundColor?: string | undefined;
11413
11456
  hoverHeaderBackgroundColor?: string | undefined;
11457
+ hoverHeaderInlineBackgroundColor?: string | undefined;
11414
11458
  selectedBorderColor?: string | undefined;
11459
+ selectedBackgroundColor?: string | undefined;
11415
11460
  } | undefined;
11416
11461
  pivotTable?: {
11417
11462
  borderColor?: string | undefined;
@@ -11419,11 +11464,14 @@ export declare class Builder implements VSeedBuilder {
11419
11464
  bodyFontColor?: string | undefined;
11420
11465
  bodyBackgroundColor?: string | undefined;
11421
11466
  hoverBodyBackgroundColor?: string | undefined;
11467
+ hoverBodyInlineBackgroundColor?: string | undefined;
11422
11468
  headerFontSize?: number | undefined;
11423
11469
  headerFontColor?: string | undefined;
11424
11470
  headerBackgroundColor?: string | undefined;
11425
11471
  hoverHeaderBackgroundColor?: string | undefined;
11472
+ hoverHeaderInlineBackgroundColor?: string | undefined;
11426
11473
  selectedBorderColor?: string | undefined;
11474
+ selectedBackgroundColor?: string | undefined;
11427
11475
  } | undefined;
11428
11476
  line?: {
11429
11477
  backgroundColor?: string | undefined;
package/dist/index.cjs CHANGED
@@ -6138,23 +6138,20 @@ const pivotIndicators_pivotIndicators = (spec, context)=>{
6138
6138
  }))
6139
6139
  };
6140
6140
  };
6141
- const external_d3_color_namespaceObject = require("d3-color");
6142
6141
  const bodyStyle = (spec, context)=>{
6143
6142
  const result = {
6144
6143
  ...spec
6145
6144
  };
6146
6145
  const { advancedVSeed } = context;
6147
6146
  const { customTheme, chartType } = advancedVSeed;
6148
- const themConfig = customTheme?.config?.[chartType];
6149
- if (!result.theme || !themConfig) return result;
6150
- const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
6151
- const backgroundColor = themConfig.bodyBackgroundColor || '#fff';
6152
- const fontColor = themConfig.bodyFontColor || '#1B1F23';
6153
- const fontSize = themConfig.bodyFontSize || 12;
6154
- const hoverCellBgColor = themConfig.hoverBodyBackgroundColor || '#bedaff';
6155
- const hoverInlineColor = (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
6156
- opacity: 0.2
6157
- }).toString();
6147
+ const themeConfig = customTheme?.config?.[chartType];
6148
+ if (!result.theme || !themeConfig) return result;
6149
+ const borderColor = themeConfig.borderColor || 'rgb(224, 224, 224)';
6150
+ const backgroundColor = themeConfig.bodyBackgroundColor || '#fff';
6151
+ const fontColor = themeConfig.bodyFontColor || '#1B1F23';
6152
+ const fontSize = themeConfig.bodyFontSize || 12;
6153
+ const hoverCellBgColor = themeConfig.hoverBodyBackgroundColor || '#bedaff';
6154
+ const hoverInlineColor = themeConfig.hoverBodyInlineBackgroundColor || '#bedaff';
6158
6155
  result.theme.bodyStyle = {
6159
6156
  borderColor: borderColor,
6160
6157
  borderLineWidth: 1,
@@ -6193,7 +6190,7 @@ const headerStyle = (spec, context)=>{
6193
6190
  const fontColor = themConfig.headerFontColor || '#1B1F23';
6194
6191
  const fontSize = themConfig.headerFontSize || 12;
6195
6192
  const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
6196
- const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
6193
+ const hoverInlineColor = themConfig.hoverHeaderInlineBackgroundColor || '#bedaff';
6197
6194
  result.theme.headerStyle = {
6198
6195
  borderColor: borderColor,
6199
6196
  borderLineWidth: 1,
@@ -6205,9 +6202,7 @@ const headerStyle = (spec, context)=>{
6205
6202
  ],
6206
6203
  textAlign: 'center',
6207
6204
  hover: {
6208
- cellBgColor: (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
6209
- opacity: 1
6210
- }).brighter(0.5).toString(),
6205
+ cellBgColor: hoverCellBgColor,
6211
6206
  inlineRowBgColor: hoverInlineColor,
6212
6207
  inlineColumnBgColor: hoverInlineColor
6213
6208
  },
@@ -6243,7 +6238,7 @@ const rowHeaderStyle = (spec, context)=>{
6243
6238
  const fontColor = themConfig.headerFontColor || '#1B1F23';
6244
6239
  const fontSize = themConfig.headerFontSize || 12;
6245
6240
  const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
6246
- const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
6241
+ const hoverInlineColor = themConfig.hoverBodyInlineBackgroundColor || '#bedaff';
6247
6242
  result.theme.rowHeaderStyle = {
6248
6243
  borderColor: borderColor,
6249
6244
  borderLineWidth: 1,
@@ -6255,9 +6250,7 @@ const rowHeaderStyle = (spec, context)=>{
6255
6250
  ],
6256
6251
  textAlign: 'left',
6257
6252
  hover: {
6258
- cellBgColor: (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
6259
- opacity: 1
6260
- }).brighter(0.5).toString(),
6253
+ cellBgColor: hoverCellBgColor,
6261
6254
  inlineRowBgColor: hoverInlineColor,
6262
6255
  inlineColumnBgColor: hoverInlineColor
6263
6256
  },
@@ -6292,8 +6285,8 @@ const cornerHeaderStyle = (spec, context)=>{
6292
6285
  const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
6293
6286
  const fontColor = themConfig.headerFontColor || '#1B1F23';
6294
6287
  const fontSize = themConfig.headerFontSize || 12;
6295
- const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
6296
- const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
6288
+ const hoverInlineColor = themConfig.hoverHeaderInlineBackgroundColor;
6289
+ const hoverCellColor = themConfig.hoverHeaderBackgroundColor;
6297
6290
  result.theme.cornerHeaderStyle = {
6298
6291
  borderColor: [
6299
6292
  borderColor,
@@ -6308,9 +6301,7 @@ const cornerHeaderStyle = (spec, context)=>{
6308
6301
  ],
6309
6302
  textAlign: 'left',
6310
6303
  hover: {
6311
- cellBgColor: (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
6312
- opacity: 1
6313
- }).brighter(0.5).toString(),
6304
+ cellBgColor: hoverCellColor,
6314
6305
  inlineRowBgColor: hoverInlineColor,
6315
6306
  inlineColumnBgColor: hoverInlineColor
6316
6307
  },
@@ -6358,12 +6349,11 @@ const selectionStyle = (spec, context)=>{
6358
6349
  const themConfig = customTheme?.config?.[chartType];
6359
6350
  if (!result.theme || !themConfig) return result;
6360
6351
  const borderColor = themConfig.selectedBorderColor || 'rgb(224, 224, 224)';
6352
+ const backgroundColor = themConfig.selectedBackgroundColor || 'rgb(224, 224, 224, 0.5)';
6361
6353
  result.theme.selectionStyle = {
6362
6354
  cellBorderColor: borderColor,
6363
6355
  cellBorderLineWidth: 2,
6364
- cellBgColor: (0, external_d3_color_namespaceObject.color)(borderColor)?.copy({
6365
- opacity: 0.15
6366
- }).toString()
6356
+ cellBgColor: backgroundColor
6367
6357
  };
6368
6358
  return result;
6369
6359
  };
@@ -6743,8 +6733,11 @@ const lightTheme = ()=>{
6743
6733
  headerFontColor: '#21252c',
6744
6734
  headerBackgroundColor: '#f6f7f9',
6745
6735
  hoverBodyBackgroundColor: '#bedaff',
6746
- hoverHeaderBackgroundColor: '#D9DDE488',
6747
- selectedBorderColor: '#4080ff'
6736
+ hoverBodyInlineBackgroundColor: '#bedaff33',
6737
+ hoverHeaderBackgroundColor: '#D9DDE4',
6738
+ hoverHeaderInlineBackgroundColor: '#D9DDE455',
6739
+ selectedBorderColor: '#4080ffee',
6740
+ selectedBackgroundColor: '#4080ff10'
6748
6741
  };
6749
6742
  return {
6750
6743
  config: {
@@ -7062,8 +7055,11 @@ const darkTheme = ()=>{
7062
7055
  headerFontColor: '#fdfdfd',
7063
7056
  headerBackgroundColor: '#36393e',
7064
7057
  hoverBodyBackgroundColor: '#4284ff66',
7065
- hoverHeaderBackgroundColor: '#5f5f5f88',
7066
- selectedBorderColor: '#3073F2'
7058
+ hoverBodyInlineBackgroundColor: '#4284ff10',
7059
+ hoverHeaderBackgroundColor: '#6f7984cc',
7060
+ hoverHeaderInlineBackgroundColor: '#4b4f54',
7061
+ selectedBorderColor: '#3073F2',
7062
+ selectedBackgroundColor: '#3073F210'
7067
7063
  };
7068
7064
  return {
7069
7065
  config: {
@@ -7585,11 +7581,14 @@ const zTableConfig = external_zod_namespaceObject.z.object({
7585
7581
  bodyFontColor: external_zod_namespaceObject.z.string().optional(),
7586
7582
  bodyBackgroundColor: external_zod_namespaceObject.z.string().optional(),
7587
7583
  hoverBodyBackgroundColor: external_zod_namespaceObject.z.string().optional(),
7584
+ hoverBodyInlineBackgroundColor: external_zod_namespaceObject.z.string().optional(),
7588
7585
  headerFontSize: external_zod_namespaceObject.z.number().optional(),
7589
7586
  headerFontColor: external_zod_namespaceObject.z.string().optional(),
7590
7587
  headerBackgroundColor: external_zod_namespaceObject.z.string().optional(),
7591
7588
  hoverHeaderBackgroundColor: external_zod_namespaceObject.z.string().optional(),
7592
- selectedBorderColor: external_zod_namespaceObject.z.string().optional()
7589
+ hoverHeaderInlineBackgroundColor: external_zod_namespaceObject.z.string().optional(),
7590
+ selectedBorderColor: external_zod_namespaceObject.z.string().optional(),
7591
+ selectedBackgroundColor: external_zod_namespaceObject.z.string().optional()
7593
7592
  });
7594
7593
  const zPivotTableConfig = zTableConfig;
7595
7594
  const zLineConfig = external_zod_namespaceObject.z.object({