@visactor/vtable 0.10.1-alpha.2 → 0.10.1-alpha.3

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 (115) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +9 -7
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.js +4 -4
  5. package/cjs/PivotChart.js.map +1 -1
  6. package/cjs/PivotTable.js +4 -4
  7. package/cjs/PivotTable.js.map +1 -1
  8. package/cjs/core/BaseTable.d.ts +6 -2
  9. package/cjs/core/BaseTable.js +37 -18
  10. package/cjs/core/BaseTable.js.map +1 -1
  11. package/cjs/event/drill.js +1 -1
  12. package/cjs/event/drill.js.map +1 -1
  13. package/cjs/event/listener/table-group.js +1 -1
  14. package/cjs/event/listener/table-group.js.map +1 -1
  15. package/cjs/header-helper/header-helper.js +1 -3
  16. package/cjs/header-helper/header-helper.js.map +1 -1
  17. package/cjs/index.d.ts +1 -1
  18. package/cjs/index.js +1 -1
  19. package/cjs/index.js.map +1 -1
  20. package/cjs/layout/chart-helper/get-axis-config.js +2 -2
  21. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  22. package/cjs/layout/pivot-header-layout.js +11 -11
  23. package/cjs/layout/pivot-header-layout.js.map +1 -1
  24. package/cjs/layout/pivot-layout.js +22 -22
  25. package/cjs/layout/pivot-layout.js.map +1 -1
  26. package/cjs/layout/simple-header-layout.js +5 -6
  27. package/cjs/layout/simple-header-layout.js.map +1 -1
  28. package/cjs/scenegraph/graphic/text.d.ts +2 -15
  29. package/cjs/scenegraph/graphic/text.js +6 -139
  30. package/cjs/scenegraph/graphic/text.js.map +1 -1
  31. package/cjs/scenegraph/layout/compute-row-height.js +1 -1
  32. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  33. package/cjs/scenegraph/scenegraph.js +8 -3
  34. package/cjs/scenegraph/scenegraph.js.map +1 -1
  35. package/cjs/scenegraph/utils/text-icon-layout.js +3 -1
  36. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  37. package/cjs/state/spark-line/index.js +1 -1
  38. package/cjs/state/spark-line/index.js.map +1 -1
  39. package/cjs/state/state.d.ts +2 -2
  40. package/cjs/state/state.js +3 -4
  41. package/cjs/state/state.js.map +1 -1
  42. package/cjs/ts-types/base-table.d.ts +3 -2
  43. package/cjs/ts-types/base-table.js.map +1 -1
  44. package/cjs/ts-types/common.d.ts +1 -1
  45. package/cjs/ts-types/common.js.map +1 -1
  46. package/cjs/ts-types/events.d.ts +1 -1
  47. package/cjs/ts-types/events.js.map +1 -1
  48. package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -2
  49. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  50. package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -2
  51. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  52. package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
  53. package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  54. package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  55. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  56. package/dist/vtable.js +8129 -4478
  57. package/dist/vtable.min.js +3 -3
  58. package/es/ListTable.d.ts +1 -0
  59. package/es/ListTable.js +9 -7
  60. package/es/ListTable.js.map +1 -1
  61. package/es/PivotChart.js +4 -4
  62. package/es/PivotChart.js.map +1 -1
  63. package/es/PivotTable.js +4 -4
  64. package/es/PivotTable.js.map +1 -1
  65. package/es/core/BaseTable.d.ts +6 -2
  66. package/es/core/BaseTable.js +33 -15
  67. package/es/core/BaseTable.js.map +1 -1
  68. package/es/event/drill.js +1 -1
  69. package/es/event/drill.js.map +1 -1
  70. package/es/event/listener/table-group.js +1 -1
  71. package/es/event/listener/table-group.js.map +1 -1
  72. package/es/header-helper/header-helper.js +1 -3
  73. package/es/header-helper/header-helper.js.map +1 -1
  74. package/es/index.d.ts +1 -1
  75. package/es/index.js +1 -1
  76. package/es/index.js.map +1 -1
  77. package/es/layout/chart-helper/get-axis-config.js +2 -2
  78. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  79. package/es/layout/pivot-header-layout.js +11 -11
  80. package/es/layout/pivot-header-layout.js.map +1 -1
  81. package/es/layout/pivot-layout.js +22 -22
  82. package/es/layout/pivot-layout.js.map +1 -1
  83. package/es/layout/simple-header-layout.js +5 -6
  84. package/es/layout/simple-header-layout.js.map +1 -1
  85. package/es/scenegraph/graphic/text.d.ts +2 -15
  86. package/es/scenegraph/graphic/text.js +1 -143
  87. package/es/scenegraph/graphic/text.js.map +1 -1
  88. package/es/scenegraph/layout/compute-row-height.js +1 -1
  89. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  90. package/es/scenegraph/scenegraph.js +7 -3
  91. package/es/scenegraph/scenegraph.js.map +1 -1
  92. package/es/scenegraph/utils/text-icon-layout.js +3 -1
  93. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  94. package/es/state/spark-line/index.js +1 -1
  95. package/es/state/spark-line/index.js.map +1 -1
  96. package/es/state/state.d.ts +2 -2
  97. package/es/state/state.js +3 -4
  98. package/es/state/state.js.map +1 -1
  99. package/es/ts-types/base-table.d.ts +3 -2
  100. package/es/ts-types/base-table.js.map +1 -1
  101. package/es/ts-types/common.d.ts +1 -1
  102. package/es/ts-types/common.js.map +1 -1
  103. package/es/ts-types/events.d.ts +1 -1
  104. package/es/ts-types/events.js.map +1 -1
  105. package/es/ts-types/list-table/define/basic-define.d.ts +1 -2
  106. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  107. package/es/ts-types/list-table/layout-map/api.d.ts +1 -2
  108. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  109. package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
  110. package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  111. package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  112. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  113. package/package.json +5 -5
  114. package/cjs/scenegraph/component/menu.d.ts +0 -41
  115. package/es/scenegraph/component/menu.d.ts +0 -41
@@ -42,45 +42,45 @@ class PivotLayoutMap {
42
42
  this.rowShowAttrs = "row" === this._indicatorShowType ? this.rows.concat(this.indicatorDimensionKey) : Array.from(this.rows),
43
43
  this._bodyRowCount = this.rowKeysPath.length * (this.indicatorsAsCol ? 1 : this.indicatorKeys.length),
44
44
  this.initHeaderObjects(), this.initIndicatorObjects(), this.rowHeaderTitle) {
45
- const cell_id = "rowHeaderTitle", caption = "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), "");
46
- this._headerObjectMap[caption] = {
47
- id: caption,
48
- caption: caption,
45
+ const cell_id = "rowHeaderTitle", title = "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), "");
46
+ this._headerObjectMap[title] = {
47
+ id: title,
48
+ title: title,
49
49
  field: cell_id,
50
50
  headerType: null !== (_a = this.rowHeaderTitle.headerType) && void 0 !== _a ? _a : "text",
51
51
  style: this.rowHeaderTitle.headerStyle,
52
52
  define: {}
53
53
  }, this._headerObjectMap[cell_id] = {
54
54
  id: cell_id,
55
- caption: "",
55
+ title: "",
56
56
  field: cell_id,
57
57
  headerType: null !== (_b = this.cornerSetting.headerType) && void 0 !== _b ? _b : "text",
58
58
  style: this.cornerSetting.headerStyle,
59
59
  define: {}
60
- }, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
60
+ }, this._headerObjects.push(this._headerObjectMap[title]), this._headerObjects.push(this._headerObjectMap[cell_id]),
61
61
  this.rowShowAttrs.unshift(cell_id), this.rowKeysPath.forEach(((rowKey, index) => {
62
- rowKey.unshift(caption);
62
+ rowKey.unshift(title);
63
63
  }));
64
64
  }
65
65
  if (this.columnHeaderTitle) {
66
- const cell_id = "columnHeaderTitleCell", caption = "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), "");
67
- this._headerObjectMap[caption] = {
68
- id: caption,
69
- caption: caption,
66
+ const cell_id = "columnHeaderTitleCell", title = "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), "");
67
+ this._headerObjectMap[title] = {
68
+ id: title,
69
+ title: title,
70
70
  field: cell_id,
71
71
  headerType: null !== (_c = this.columnHeaderTitle.headerType) && void 0 !== _c ? _c : "text",
72
72
  style: this.columnHeaderTitle.headerStyle,
73
73
  define: {}
74
74
  }, this._headerObjectMap[cell_id] = {
75
75
  id: cell_id,
76
- caption: "",
76
+ title: "",
77
77
  field: cell_id,
78
78
  headerType: null !== (_d = this.cornerSetting.headerType) && void 0 !== _d ? _d : "text",
79
79
  style: this.cornerSetting.headerStyle,
80
80
  define: {}
81
- }, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
81
+ }, this._headerObjects.push(this._headerObjectMap[title]), this._headerObjects.push(this._headerObjectMap[cell_id]),
82
82
  this.colShowAttrs.unshift(cell_id), this.colKeysPath.forEach(((columnKey, index) => {
83
- columnKey.unshift(caption);
83
+ columnKey.unshift(title);
84
84
  }));
85
85
  }
86
86
  if (this._table.isPivotChart()) if (this.hasTwoIndicatorAxes = this._indicatorObjects.some((indicatorObject => !!(indicatorObject.chartSpec && indicatorObject.chartSpec.series && indicatorObject.chartSpec.series.length > 1))),
@@ -93,7 +93,7 @@ class PivotLayoutMap {
93
93
  const cell_id = "rowHeaderEmpty";
94
94
  this._headerObjectMap[cell_id] = {
95
95
  id: cell_id,
96
- caption: "",
96
+ title: "",
97
97
  field: cell_id,
98
98
  headerType: null !== (_e = this.cornerSetting.headerType) && void 0 !== _e ? _e : "text",
99
99
  style: this.cornerSetting.headerStyle,
@@ -151,7 +151,7 @@ class PivotLayoutMap {
151
151
  }
152
152
  getIndicatorInfo(indicatorKey, indicatorValue = "") {
153
153
  var _a;
154
- return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.caption === indicatorValue)));
154
+ return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.title === indicatorValue)));
155
155
  }
156
156
  getColKeysPath() {
157
157
  return this.colKeysPath;
@@ -168,7 +168,7 @@ class PivotLayoutMap {
168
168
  this._headerObjectMap[rowKey[j]] = {
169
169
  id: rowKey[j],
170
170
  field: null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _a ? _a : this.rows[ids.length - 1],
171
- caption: ids[ids.length - 1],
171
+ title: ids[ids.length - 1],
172
172
  style: null == dimensionInfo ? void 0 : dimensionInfo.headerStyle,
173
173
  define: {
174
174
  field: null !== (_b = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _b ? _b : this.rows[ids.length - 1],
@@ -189,7 +189,7 @@ class PivotLayoutMap {
189
189
  this._headerObjectMap[colKey[j]] = {
190
190
  id: colKey[j],
191
191
  field: null !== (_e = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _e ? _e : this.columns[ids.length - 1],
192
- caption: ids[ids.length - 1],
192
+ title: ids[ids.length - 1],
193
193
  style: null == dimensionInfo ? void 0 : dimensionInfo.headerStyle,
194
194
  define: {
195
195
  field: null !== (_f = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _f ? _f : this.columns[ids.length - 1],
@@ -210,7 +210,7 @@ class PivotLayoutMap {
210
210
  this._headerObjectMap[indicatorKey] || (this._headerObjectMap[indicatorKey] = {
211
211
  id: indicatorKey,
212
212
  field: this.indicatorDimensionKey,
213
- caption: null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.caption) && void 0 !== _a ? _a : indicatorKey,
213
+ title: null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.title) && void 0 !== _a ? _a : indicatorKey,
214
214
  style: null == indicatorInfo ? void 0 : indicatorInfo.headerStyle,
215
215
  define: {
216
216
  field: this.indicatorDimensionKey,
@@ -229,7 +229,7 @@ class PivotLayoutMap {
229
229
  this._headerObjectMap[cornerAttrStr] = {
230
230
  id: cornerAttrStr,
231
231
  field: cornerAttrStr,
232
- caption: cornerAttrStr === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.dimensionTitle) && void 0 !== _a ? _a : cornerAttrStr,
232
+ title: cornerAttrStr === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.title) && void 0 !== _a ? _a : cornerAttrStr,
233
233
  style: null === (_b = this.cornerSetting) || void 0 === _b ? void 0 : _b.headerStyle,
234
234
  define: {
235
235
  field: cornerAttrStr,
@@ -564,7 +564,7 @@ class PivotLayoutMap {
564
564
  return {
565
565
  dimensionKey: indicatorObject ? void 0 : this.colShowAttrs[index],
566
566
  indicatorKey: indicatorObject ? key : void 0,
567
- value: indicatorObject ? indicatorObject.define.caption : key
567
+ value: indicatorObject ? indicatorObject.define.title : key
568
568
  };
569
569
  }))) && void 0 !== _c ? _c : [],
570
570
  rowHeaderPaths: null !== (_d = null == rowHeaderPaths ? void 0 : rowHeaderPaths.map(((key, index) => {
@@ -572,7 +572,7 @@ class PivotLayoutMap {
572
572
  return {
573
573
  dimensionKey: indicatorObject ? void 0 : this.rowShowAttrs[index],
574
574
  indicatorKey: indicatorObject ? key : void 0,
575
- value: indicatorObject ? indicatorObject.define.caption : key
575
+ value: indicatorObject ? indicatorObject.define.title : key
576
576
  };
577
577
  }))) && void 0 !== _d ? _d : []
578
578
  };