@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
@@ -44,45 +44,45 @@ export class PivotLayoutMap {
44
44
  this.rowShowAttrs = "row" === this._indicatorShowType ? this.rows.concat(this.indicatorDimensionKey) : Array.from(this.rows),
45
45
  this._bodyRowCount = this.rowKeysPath.length * (this.indicatorsAsCol ? 1 : this.indicatorKeys.length),
46
46
  this.initHeaderObjects(), this.initIndicatorObjects(), this.rowHeaderTitle) {
47
- 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}`)), "");
48
- this._headerObjectMap[caption] = {
49
- id: caption,
50
- caption: caption,
47
+ 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}`)), "");
48
+ this._headerObjectMap[title] = {
49
+ id: title,
50
+ title: title,
51
51
  field: cell_id,
52
52
  headerType: null !== (_a = this.rowHeaderTitle.headerType) && void 0 !== _a ? _a : "text",
53
53
  style: this.rowHeaderTitle.headerStyle,
54
54
  define: {}
55
55
  }, this._headerObjectMap[cell_id] = {
56
56
  id: cell_id,
57
- caption: "",
57
+ title: "",
58
58
  field: cell_id,
59
59
  headerType: null !== (_b = this.cornerSetting.headerType) && void 0 !== _b ? _b : "text",
60
60
  style: this.cornerSetting.headerStyle,
61
61
  define: {}
62
- }, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
62
+ }, this._headerObjects.push(this._headerObjectMap[title]), this._headerObjects.push(this._headerObjectMap[cell_id]),
63
63
  this.rowShowAttrs.unshift(cell_id), this.rowKeysPath.forEach(((rowKey, index) => {
64
- rowKey.unshift(caption);
64
+ rowKey.unshift(title);
65
65
  }));
66
66
  }
67
67
  if (this.columnHeaderTitle) {
68
- 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}`)), "");
69
- this._headerObjectMap[caption] = {
70
- id: caption,
71
- caption: caption,
68
+ 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}`)), "");
69
+ this._headerObjectMap[title] = {
70
+ id: title,
71
+ title: title,
72
72
  field: cell_id,
73
73
  headerType: null !== (_c = this.columnHeaderTitle.headerType) && void 0 !== _c ? _c : "text",
74
74
  style: this.columnHeaderTitle.headerStyle,
75
75
  define: {}
76
76
  }, this._headerObjectMap[cell_id] = {
77
77
  id: cell_id,
78
- caption: "",
78
+ title: "",
79
79
  field: cell_id,
80
80
  headerType: null !== (_d = this.cornerSetting.headerType) && void 0 !== _d ? _d : "text",
81
81
  style: this.cornerSetting.headerStyle,
82
82
  define: {}
83
- }, this._headerObjects.push(this._headerObjectMap[caption]), this._headerObjects.push(this._headerObjectMap[cell_id]),
83
+ }, this._headerObjects.push(this._headerObjectMap[title]), this._headerObjects.push(this._headerObjectMap[cell_id]),
84
84
  this.colShowAttrs.unshift(cell_id), this.colKeysPath.forEach(((columnKey, index) => {
85
- columnKey.unshift(caption);
85
+ columnKey.unshift(title);
86
86
  }));
87
87
  }
88
88
  if (this._table.isPivotChart()) if (this.hasTwoIndicatorAxes = this._indicatorObjects.some((indicatorObject => !!(indicatorObject.chartSpec && indicatorObject.chartSpec.series && indicatorObject.chartSpec.series.length > 1))),
@@ -95,7 +95,7 @@ export class PivotLayoutMap {
95
95
  const cell_id = "rowHeaderEmpty";
96
96
  this._headerObjectMap[cell_id] = {
97
97
  id: cell_id,
98
- caption: "",
98
+ title: "",
99
99
  field: cell_id,
100
100
  headerType: null !== (_e = this.cornerSetting.headerType) && void 0 !== _e ? _e : "text",
101
101
  style: this.cornerSetting.headerStyle,
@@ -153,7 +153,7 @@ export class PivotLayoutMap {
153
153
  }
154
154
  getIndicatorInfo(indicatorKey, indicatorValue = "") {
155
155
  var _a;
156
- return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.caption === indicatorValue)));
156
+ return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.title === indicatorValue)));
157
157
  }
158
158
  getColKeysPath() {
159
159
  return this.colKeysPath;
@@ -170,7 +170,7 @@ export class PivotLayoutMap {
170
170
  this._headerObjectMap[rowKey[j]] = {
171
171
  id: rowKey[j],
172
172
  field: null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _a ? _a : this.rows[ids.length - 1],
173
- caption: ids[ids.length - 1],
173
+ title: ids[ids.length - 1],
174
174
  style: null == dimensionInfo ? void 0 : dimensionInfo.headerStyle,
175
175
  define: {
176
176
  field: null !== (_b = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _b ? _b : this.rows[ids.length - 1],
@@ -191,7 +191,7 @@ export class PivotLayoutMap {
191
191
  this._headerObjectMap[colKey[j]] = {
192
192
  id: colKey[j],
193
193
  field: null !== (_e = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _e ? _e : this.columns[ids.length - 1],
194
- caption: ids[ids.length - 1],
194
+ title: ids[ids.length - 1],
195
195
  style: null == dimensionInfo ? void 0 : dimensionInfo.headerStyle,
196
196
  define: {
197
197
  field: null !== (_f = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _f ? _f : this.columns[ids.length - 1],
@@ -212,7 +212,7 @@ export class PivotLayoutMap {
212
212
  this._headerObjectMap[indicatorKey] || (this._headerObjectMap[indicatorKey] = {
213
213
  id: indicatorKey,
214
214
  field: this.indicatorDimensionKey,
215
- caption: null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.caption) && void 0 !== _a ? _a : indicatorKey,
215
+ title: null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.title) && void 0 !== _a ? _a : indicatorKey,
216
216
  style: null == indicatorInfo ? void 0 : indicatorInfo.headerStyle,
217
217
  define: {
218
218
  field: this.indicatorDimensionKey,
@@ -231,7 +231,7 @@ export class PivotLayoutMap {
231
231
  this._headerObjectMap[cornerAttrStr] = {
232
232
  id: cornerAttrStr,
233
233
  field: cornerAttrStr,
234
- caption: cornerAttrStr === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.dimensionTitle) && void 0 !== _a ? _a : cornerAttrStr,
234
+ title: cornerAttrStr === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.title) && void 0 !== _a ? _a : cornerAttrStr,
235
235
  style: null === (_b = this.cornerSetting) || void 0 === _b ? void 0 : _b.headerStyle,
236
236
  define: {
237
237
  field: cornerAttrStr,
@@ -566,7 +566,7 @@ export class PivotLayoutMap {
566
566
  return {
567
567
  dimensionKey: indicatorObject ? void 0 : this.colShowAttrs[index],
568
568
  indicatorKey: indicatorObject ? key : void 0,
569
- value: indicatorObject ? indicatorObject.define.caption : key
569
+ value: indicatorObject ? indicatorObject.define.title : key
570
570
  };
571
571
  }))) && void 0 !== _c ? _c : [],
572
572
  rowHeaderPaths: null !== (_d = null == rowHeaderPaths ? void 0 : rowHeaderPaths.map(((key, index) => {
@@ -574,7 +574,7 @@ export class PivotLayoutMap {
574
574
  return {
575
575
  dimensionKey: indicatorObject ? void 0 : this.rowShowAttrs[index],
576
576
  indicatorKey: indicatorObject ? key : void 0,
577
- value: indicatorObject ? indicatorObject.define.caption : key
577
+ value: indicatorObject ? indicatorObject.define.title : key
578
578
  };
579
579
  }))) && void 0 !== _d ? _d : []
580
580
  };