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

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 (155) 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/components/axis/axis.js +7 -5
  9. package/cjs/components/axis/axis.js.map +1 -1
  10. package/cjs/components/axis/get-axis-attributes.d.ts +2 -0
  11. package/cjs/components/axis/get-axis-attributes.js +3 -1
  12. package/cjs/components/axis/get-axis-attributes.js.map +1 -1
  13. package/cjs/components/axis/get-axis-component-size.js +66 -34
  14. package/cjs/components/axis/get-axis-component-size.js.map +1 -1
  15. package/cjs/core/BaseTable.d.ts +6 -2
  16. package/cjs/core/BaseTable.js +39 -19
  17. package/cjs/core/BaseTable.js.map +1 -1
  18. package/cjs/event/drill.js +1 -1
  19. package/cjs/event/drill.js.map +1 -1
  20. package/cjs/event/listener/table-group.js +1 -1
  21. package/cjs/event/listener/table-group.js.map +1 -1
  22. package/cjs/header-helper/header-helper.js +1 -3
  23. package/cjs/header-helper/header-helper.js.map +1 -1
  24. package/cjs/index.d.ts +1 -1
  25. package/cjs/index.js +1 -1
  26. package/cjs/index.js.map +1 -1
  27. package/cjs/layout/chart-helper/get-axis-config.js +14 -6
  28. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  29. package/cjs/layout/chart-helper/get-chart-spec.js +7 -1
  30. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  31. package/cjs/layout/pivot-header-layout.js +11 -11
  32. package/cjs/layout/pivot-header-layout.js.map +1 -1
  33. package/cjs/layout/pivot-layout.js +22 -22
  34. package/cjs/layout/pivot-layout.js.map +1 -1
  35. package/cjs/layout/simple-header-layout.js +5 -6
  36. package/cjs/layout/simple-header-layout.js.map +1 -1
  37. package/cjs/scenegraph/graphic/text.d.ts +2 -15
  38. package/cjs/scenegraph/graphic/text.js +6 -139
  39. package/cjs/scenegraph/graphic/text.js.map +1 -1
  40. package/cjs/scenegraph/group-creater/progress/proxy.d.ts +2 -1
  41. package/cjs/scenegraph/group-creater/progress/proxy.js +8 -21
  42. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  43. package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.d.ts +2 -0
  44. package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js +52 -0
  45. package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -0
  46. package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.d.ts +2 -0
  47. package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js +52 -0
  48. package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -0
  49. package/cjs/scenegraph/layout/compute-row-height.d.ts +1 -1
  50. package/cjs/scenegraph/layout/compute-row-height.js +14 -7
  51. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  52. package/cjs/scenegraph/layout/update-width.js +1 -1
  53. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  54. package/cjs/scenegraph/scenegraph.js +10 -8
  55. package/cjs/scenegraph/scenegraph.js.map +1 -1
  56. package/cjs/scenegraph/utils/text-icon-layout.js +3 -1
  57. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  58. package/cjs/state/spark-line/index.js +1 -1
  59. package/cjs/state/spark-line/index.js.map +1 -1
  60. package/cjs/state/state.d.ts +2 -2
  61. package/cjs/state/state.js +3 -4
  62. package/cjs/state/state.js.map +1 -1
  63. package/cjs/ts-types/base-table.d.ts +3 -2
  64. package/cjs/ts-types/base-table.js.map +1 -1
  65. package/cjs/ts-types/common.d.ts +1 -1
  66. package/cjs/ts-types/common.js.map +1 -1
  67. package/cjs/ts-types/events.d.ts +1 -1
  68. package/cjs/ts-types/events.js.map +1 -1
  69. package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -2
  70. package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
  71. package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -2
  72. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  73. package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
  74. package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  75. package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  76. package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  77. package/dist/vtable.js +6153 -2780
  78. package/dist/vtable.min.js +3 -3
  79. package/es/ListTable.d.ts +1 -0
  80. package/es/ListTable.js +9 -7
  81. package/es/ListTable.js.map +1 -1
  82. package/es/PivotChart.js +4 -4
  83. package/es/PivotChart.js.map +1 -1
  84. package/es/PivotTable.js +4 -4
  85. package/es/PivotTable.js.map +1 -1
  86. package/es/components/axis/axis.js +7 -6
  87. package/es/components/axis/axis.js.map +1 -1
  88. package/es/components/axis/get-axis-attributes.d.ts +2 -0
  89. package/es/components/axis/get-axis-attributes.js +3 -1
  90. package/es/components/axis/get-axis-attributes.js.map +1 -1
  91. package/es/components/axis/get-axis-component-size.js +66 -34
  92. package/es/components/axis/get-axis-component-size.js.map +1 -1
  93. package/es/core/BaseTable.d.ts +6 -2
  94. package/es/core/BaseTable.js +35 -16
  95. package/es/core/BaseTable.js.map +1 -1
  96. package/es/event/drill.js +1 -1
  97. package/es/event/drill.js.map +1 -1
  98. package/es/event/listener/table-group.js +1 -1
  99. package/es/event/listener/table-group.js.map +1 -1
  100. package/es/header-helper/header-helper.js +1 -3
  101. package/es/header-helper/header-helper.js.map +1 -1
  102. package/es/index.d.ts +1 -1
  103. package/es/index.js +1 -1
  104. package/es/index.js.map +1 -1
  105. package/es/layout/chart-helper/get-axis-config.js +15 -7
  106. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  107. package/es/layout/chart-helper/get-chart-spec.js +7 -1
  108. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  109. package/es/layout/pivot-header-layout.js +11 -11
  110. package/es/layout/pivot-header-layout.js.map +1 -1
  111. package/es/layout/pivot-layout.js +22 -22
  112. package/es/layout/pivot-layout.js.map +1 -1
  113. package/es/layout/simple-header-layout.js +5 -6
  114. package/es/layout/simple-header-layout.js.map +1 -1
  115. package/es/scenegraph/graphic/text.d.ts +2 -15
  116. package/es/scenegraph/graphic/text.js +1 -143
  117. package/es/scenegraph/graphic/text.js.map +1 -1
  118. package/es/scenegraph/group-creater/progress/proxy.d.ts +2 -1
  119. package/es/scenegraph/group-creater/progress/proxy.js +11 -20
  120. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  121. package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.d.ts +2 -0
  122. package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js +45 -0
  123. package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -0
  124. package/es/scenegraph/group-creater/progress/update-position/sort-vertical.d.ts +2 -0
  125. package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js +47 -0
  126. package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -0
  127. package/es/scenegraph/layout/compute-row-height.d.ts +1 -1
  128. package/es/scenegraph/layout/compute-row-height.js +14 -7
  129. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  130. package/es/scenegraph/layout/update-width.js +1 -1
  131. package/es/scenegraph/layout/update-width.js.map +1 -1
  132. package/es/scenegraph/scenegraph.js +10 -8
  133. package/es/scenegraph/scenegraph.js.map +1 -1
  134. package/es/scenegraph/utils/text-icon-layout.js +3 -1
  135. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  136. package/es/state/spark-line/index.js +1 -1
  137. package/es/state/spark-line/index.js.map +1 -1
  138. package/es/state/state.d.ts +2 -2
  139. package/es/state/state.js +3 -4
  140. package/es/state/state.js.map +1 -1
  141. package/es/ts-types/base-table.d.ts +3 -2
  142. package/es/ts-types/base-table.js.map +1 -1
  143. package/es/ts-types/common.d.ts +1 -1
  144. package/es/ts-types/common.js.map +1 -1
  145. package/es/ts-types/events.d.ts +1 -1
  146. package/es/ts-types/events.js.map +1 -1
  147. package/es/ts-types/list-table/define/basic-define.d.ts +1 -2
  148. package/es/ts-types/list-table/define/basic-define.js.map +1 -1
  149. package/es/ts-types/list-table/layout-map/api.d.ts +1 -2
  150. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  151. package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
  152. package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
  153. package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
  154. package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
  155. package/package.json +7 -7
@@ -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
  };