@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
@@ -116,7 +116,7 @@ class PivotHeaderLayoutMap {
116
116
  this._columnHeaderCellIds.unshift(firstRowIds);
117
117
  const cell = {
118
118
  id: id,
119
- caption: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), ""),
119
+ title: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
120
120
  field: void 0,
121
121
  headerType: null !== (_p = this.columnHeaderTitle.headerType) && void 0 !== _p ? _p : "text",
122
122
  style: this.columnHeaderTitle.headerStyle,
@@ -132,7 +132,7 @@ class PivotHeaderLayoutMap {
132
132
  this._rowHeaderCellIds.unshift(firstColIds);
133
133
  const cell = {
134
134
  id: id,
135
- caption: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), ""),
135
+ title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
136
136
  field: void 0,
137
137
  headerType: null !== (_q = this.rowHeaderTitle.headerType) && void 0 !== _q ? _q : "text",
138
138
  style: this.rowHeaderTitle.headerStyle,
@@ -156,9 +156,9 @@ class PivotHeaderLayoutMap {
156
156
  for (let col = 0; col < (null == prev ? void 0 : prev.length); col++) newRow[col] = prev[col];
157
157
  }(row), header.forEach((hd => {
158
158
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
159
- const id = hd.id, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey)), indicatorInfo = null === (_d = this.indicatorsDefine) || void 0 === _d ? void 0 : _d.find((indicator => "string" != typeof indicator && (hd.indicatorKey ? indicator.indicatorKey === hd.indicatorKey : indicator.caption === hd.value))), cell = {
159
+ const id = hd.id, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey)), indicatorInfo = null === (_d = this.indicatorsDefine) || void 0 === _d ? void 0 : _d.find((indicator => "string" != typeof indicator && (hd.indicatorKey ? indicator.indicatorKey === hd.indicatorKey : indicator.title === hd.value))), cell = {
160
160
  id: id,
161
- caption: null !== (_e = hd.value) && void 0 !== _e ? _e : indicatorInfo.caption,
161
+ title: null !== (_e = hd.value) && void 0 !== _e ? _e : indicatorInfo.title,
162
162
  field: hd.dimensionKey,
163
163
  style: "function" == typeof (null === (_f = null != indicatorInfo ? indicatorInfo : dimensionInfo) || void 0 === _f ? void 0 : _f.headerStyle) ? null === (_g = null != indicatorInfo ? indicatorInfo : dimensionInfo) || void 0 === _g ? void 0 : _g.headerStyle : Object.assign({}, null === (_h = null != indicatorInfo ? indicatorInfo : dimensionInfo) || void 0 === _h ? void 0 : _h.headerStyle),
164
164
  headerType: null !== (_k = null !== (_j = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _j ? _j : null == dimensionInfo ? void 0 : dimensionInfo.headerType) && void 0 !== _k ? _k : "text",
@@ -221,7 +221,7 @@ class PivotHeaderLayoutMap {
221
221
  var _a, _b, _c, _d, _e, _f;
222
222
  const id = hd.id, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey)), cell = {
223
223
  id: id,
224
- caption: hd.value,
224
+ title: hd.value,
225
225
  field: hd.dimensionKey,
226
226
  style: hd.level + 1 === totalLevel || "function" == typeof (null == dimensionInfo ? void 0 : dimensionInfo.headerStyle) ? null == dimensionInfo ? void 0 : dimensionInfo.headerStyle : Object.assign({}, null == dimensionInfo ? void 0 : dimensionInfo.headerStyle, {
227
227
  textAlign: "left"
@@ -268,7 +268,7 @@ class PivotHeaderLayoutMap {
268
268
  var _a, _b, _c, _d, _e, _f;
269
269
  const id = ++seqId, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === dimensionKey)), cell = {
270
270
  id: id,
271
- caption: dimensionKey === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_d = null == dimensionInfo ? void 0 : dimensionInfo.dimensionTitle) && void 0 !== _d ? _d : "",
271
+ title: dimensionKey === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_d = null == dimensionInfo ? void 0 : dimensionInfo.title) && void 0 !== _d ? _d : "",
272
272
  field: "维度名称",
273
273
  style: this.cornerSetting.headerStyle,
274
274
  headerType: null !== (_e = this.cornerSetting.headerType) && void 0 !== _e ? _e : "text",
@@ -279,7 +279,7 @@ class PivotHeaderLayoutMap {
279
279
  },
280
280
  dropDownMenu: null == dimensionInfo ? void 0 : dimensionInfo.cornerDropDownMenu,
281
281
  pivotInfo: {
282
- value: null !== (_f = null == dimensionInfo ? void 0 : dimensionInfo.dimensionTitle) && void 0 !== _f ? _f : "",
282
+ value: null !== (_f = null == dimensionInfo ? void 0 : dimensionInfo.title) && void 0 !== _f ? _f : "",
283
283
  dimensionKey: dimensionKey,
284
284
  isPivotCorner: !0
285
285
  },
@@ -293,7 +293,7 @@ class PivotHeaderLayoutMap {
293
293
  })); else {
294
294
  const id = ++seqId, cell = {
295
295
  id: id,
296
- caption: "",
296
+ title: "",
297
297
  field: "维度名称",
298
298
  style: this.cornerSetting.headerStyle,
299
299
  headerType: null !== (_a = this.cornerSetting.headerType) && void 0 !== _a ? _a : "text",
@@ -647,13 +647,13 @@ class PivotHeaderLayoutMap {
647
647
  var _a, _b, _c;
648
648
  const colHeaderPath = {};
649
649
  colHeaderPath.dimensionKey = colHeader.dimensionKey, colHeaderPath.indicatorKey = colHeader.indicatorKey,
650
- colHeaderPath.value = null !== (_c = null !== (_a = colHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(colHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.caption) && void 0 !== _c ? _c : "",
650
+ colHeaderPath.value = null !== (_c = null !== (_a = colHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(colHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.title) && void 0 !== _c ? _c : "",
651
651
  headerPaths.colHeaderPaths.push(colHeaderPath);
652
652
  })), headerPathsWidthNode.rowHeaderPaths.forEach((rowHeader => {
653
653
  var _a, _b, _c;
654
654
  const rowHeaderPath = {};
655
655
  rowHeaderPath.dimensionKey = rowHeader.dimensionKey, rowHeaderPath.indicatorKey = rowHeader.indicatorKey,
656
- rowHeaderPath.value = null !== (_c = null !== (_a = rowHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(rowHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.caption) && void 0 !== _c ? _c : "",
656
+ rowHeaderPath.value = null !== (_c = null !== (_a = rowHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(rowHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.title) && void 0 !== _c ? _c : "",
657
657
  headerPaths.rowHeaderPaths.push(rowHeaderPath);
658
658
  })), headerPaths;
659
659
  }
@@ -688,7 +688,7 @@ class PivotHeaderLayoutMap {
688
688
  this._rowHeaderCellIds.unshift(firstColIds);
689
689
  const cell = {
690
690
  id: id,
691
- caption: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.dimensionTitle}` : `${value.dimensionTitle}`)), ""),
691
+ title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
692
692
  field: void 0,
693
693
  headerType: null !== (_a = this.rowHeaderTitle.headerType) && void 0 !== _a ? _a : "text",
694
694
  style: this.rowHeaderTitle.headerStyle,