@visactor/vtable-gantt 1.20.0 → 1.20.1-alpha.0

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.
package/cjs/index.d.ts CHANGED
@@ -6,5 +6,5 @@ import * as tools from './tools';
6
6
  import * as VRender from './vrender';
7
7
  import * as VTable from './vtable';
8
8
  import * as plugins from './plugins';
9
- export declare const version = "1.20.0";
9
+ export declare const version = "1.20.1-alpha.0";
10
10
  export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
package/cjs/index.js CHANGED
@@ -56,5 +56,5 @@ exports.VTable = VTable;
56
56
 
57
57
  const plugins = __importStar(require("./plugins"));
58
58
 
59
- exports.plugins = plugins, exports.version = "1.20.0";
59
+ exports.plugins = plugins, exports.version = "1.20.1-alpha.0";
60
60
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.20.0\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.20.1-alpha.0\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
@@ -57334,7 +57334,7 @@
57334
57334
  }
57335
57335
 
57336
57336
  function getAxisConfigInPivotChart(col, row, layout) {
57337
- var _a, _b, _c, _d, _e, _f, _g;
57337
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
57338
57338
  if (layout._table.isPivotChart()) if (layout.indicatorsAsCol) {
57339
57339
  if (layout.hasTwoIndicatorAxes && row === layout.columnHeaderLevelCount - 1 && col >= layout.rowHeaderLevelCount && col < layout.colCount - layout.rightFrozenColCount) {
57340
57340
  const axisRange = getRange("top", col, row + 1, col, layout.columnHeaderLevelCount - 1, col, row, 1, layout);
@@ -57373,7 +57373,10 @@
57373
57373
  const info = layout.getIndicatorInfo(key);
57374
57374
  info && (indicatorInfo = info);
57375
57375
  });
57376
- const axisRange = getRange("bottom", col, row - 1, col, row, col, row, 0, layout);
57376
+ const axisRange = getRange("bottom", col, row - 1, col, row, col, row, 0, layout),
57377
+ {
57378
+ chartType: chartType
57379
+ } = getAxisOption(col, row - 1, "bottom", layout);
57377
57380
  if (!axisRange) return;
57378
57381
  const chartCellStyle = layout._table._getCellStyle(col, row - 1),
57379
57382
  padding = getQuadProps(getProp("padding", chartCellStyle, col, row - 1, layout._table)),
@@ -57386,12 +57389,21 @@
57386
57389
  targetRange: targetRange,
57387
57390
  theme: theme
57388
57391
  } = axisRange;
57389
- return isNumber$4(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$4(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1)), merge$1({
57392
+ isNumber$4(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$4(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1));
57393
+ let domain = [];
57394
+ if ("heatmap" === chartType) {
57395
+ const colDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.rowCount - layout.bottomFrozenRowCount - 1, "xField"),
57396
+ data = null !== (_a = layout.dataset.collectedValues[colDimensionKey]) && void 0 !== _a ? _a : [],
57397
+ colPath = layout.getColKeysPath(col, row);
57398
+ domain = null !== (_b = null == data ? void 0 : data[null != colPath ? colPath : ""]) && void 0 !== _b ? _b : [];
57399
+ }
57400
+ return merge$1({
57390
57401
  title: {
57391
57402
  visible: !0,
57392
57403
  text: null == indicatorInfo ? void 0 : indicatorInfo.title
57393
57404
  },
57394
- range: range
57405
+ range: range,
57406
+ domain: "linear" === (null == axisOption ? void 0 : axisOption.type) ? void 0 : Array.from(domain)
57395
57407
  }, axisOption, {
57396
57408
  orient: "bottom",
57397
57409
  type: (null == axisOption ? void 0 : axisOption.type) || "linear",
@@ -57409,9 +57421,9 @@
57409
57421
  if (col === layout.rowHeaderLevelCount - 1 && row >= layout.columnHeaderLevelCount && row < layout.rowCount - layout.bottomFrozenRowCount) {
57410
57422
  let rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row);
57411
57423
  isArray$7(rowDimensionKey) && (rowDimensionKey = rowDimensionKey[0]);
57412
- const data = null !== (_a = layout.dataset.collectedValues[rowDimensionKey]) && void 0 !== _a ? _a : [],
57424
+ const data = null !== (_c = layout.dataset.collectedValues[rowDimensionKey]) && void 0 !== _c ? _c : [],
57413
57425
  rowPath = layout.getRowKeysPath(col, row),
57414
- domain = null !== (_b = data[null != rowPath ? rowPath : ""]) && void 0 !== _b ? _b : [],
57426
+ domain = null !== (_d = data[null != rowPath ? rowPath : ""]) && void 0 !== _d ? _d : [],
57415
57427
  {
57416
57428
  axisOption: axisOption,
57417
57429
  theme: theme,
@@ -57429,9 +57441,9 @@
57429
57441
  }
57430
57442
  }, axisOption, {
57431
57443
  orient: "left",
57432
- type: null !== (_c = null == axisOption ? void 0 : axisOption.type) && void 0 !== _c ? _c : "band",
57444
+ type: null !== (_e = null == axisOption ? void 0 : axisOption.type) && void 0 !== _e ? _e : "band",
57433
57445
  __vtableChartTheme: theme,
57434
- inverse: transformInverse(axisOption, "horizontal" === (null !== (_d = null == spec ? void 0 : spec.direction) && void 0 !== _d ? _d : "scatter" === chartType ? "vertical" : "horizontal")),
57446
+ inverse: transformInverse(axisOption, "horizontal" === (null !== (_f = null == spec ? void 0 : spec.direction) && void 0 !== _f ? _f : "scatter" === chartType ? "vertical" : "horizontal")),
57435
57447
  __vtablePadding: padding
57436
57448
  });
57437
57449
  }
@@ -57443,7 +57455,10 @@
57443
57455
  const info = layout.getIndicatorInfo(key);
57444
57456
  info && (indicatorInfo = info);
57445
57457
  });
57446
- const axisRange = getRange("left", col + 1, row, col, row, col, row, 0, layout);
57458
+ const axisRange = getRange("left", col + 1, row, col, row, col, row, 0, layout),
57459
+ {
57460
+ chartType: chartType
57461
+ } = getAxisOption(col + 1, row, "left", layout);
57447
57462
  if (!axisRange) return;
57448
57463
  const chartCellStyle = layout._table._getCellStyle(col + 1, row),
57449
57464
  padding = getQuadProps(getProp("padding", chartCellStyle, col + 1, row, layout._table)),
@@ -57456,13 +57471,22 @@
57456
57471
  targetRange: targetRange,
57457
57472
  theme: theme
57458
57473
  } = axisRange;
57459
- return isNumber$4(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$4(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1)), merge$1({
57474
+ isNumber$4(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$4(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1));
57475
+ let domain = [];
57476
+ if ("heatmap" === chartType) {
57477
+ const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row, "yField"),
57478
+ data = null !== (_g = layout.dataset.collectedValues[rowDimensionKey]) && void 0 !== _g ? _g : [],
57479
+ rowPath = layout.getRowKeysPath(col, row);
57480
+ domain = null !== (_h = null == data ? void 0 : data[null != rowPath ? rowPath : ""]) && void 0 !== _h ? _h : [];
57481
+ }
57482
+ return merge$1({
57460
57483
  title: {
57461
57484
  visible: !0,
57462
57485
  text: null == indicatorInfo ? void 0 : indicatorInfo.title,
57463
57486
  autoRotate: !0
57464
57487
  },
57465
- range: range
57488
+ range: range,
57489
+ domain: "linear" === (null == axisOption ? void 0 : axisOption.type) ? void 0 : Array.from(domain)
57466
57490
  }, axisOption, {
57467
57491
  orient: "left",
57468
57492
  type: (null == axisOption ? void 0 : axisOption.type) || "linear",
@@ -57478,7 +57502,10 @@
57478
57502
  });
57479
57503
  }
57480
57504
  if (col === layout.colCount - layout.rightFrozenColCount && row >= layout.columnHeaderLevelCount && row < layout.rowCount - layout.bottomFrozenRowCount) {
57481
- const axisRange = getRange("right", col - 1, row, layout.rowHeaderLevelCount - 1, row, col, row, 1, layout);
57505
+ const axisRange = getRange("right", col - 1, row, layout.rowHeaderLevelCount - 1, row, col, row, 1, layout),
57506
+ {
57507
+ chartType: chartType
57508
+ } = getAxisOption(col - 1, row, "right", layout);
57482
57509
  if (!axisRange) return;
57483
57510
  const chartCellStyle = layout._table._getCellStyle(col - 1, row),
57484
57511
  padding = getQuadProps(getProp("padding", chartCellStyle, col - 1, row, layout._table)),
@@ -57491,11 +57518,20 @@
57491
57518
  targetRange: targetRange,
57492
57519
  theme: theme
57493
57520
  } = axisRange;
57494
- return isNumber$4(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$4(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1)), merge$1({
57521
+ isNumber$4(null == axisOption ? void 0 : axisOption.min) && (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)), isNumber$4(null == axisOption ? void 0 : axisOption.max) && (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1));
57522
+ let domain = [];
57523
+ if ("heatmap" === chartType) {
57524
+ const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.colCount - layout.rightFrozenColCount - 1, row, "yField"),
57525
+ data = null !== (_j = layout.dataset.collectedValues[rowDimensionKey]) && void 0 !== _j ? _j : [],
57526
+ rowPath = layout.getRowKeysPath(col, row);
57527
+ domain = null !== (_k = null == data ? void 0 : data[null != rowPath ? rowPath : ""]) && void 0 !== _k ? _k : [];
57528
+ }
57529
+ return merge$1({
57495
57530
  range: range,
57496
57531
  title: {
57497
57532
  autoRotate: !0
57498
- }
57533
+ },
57534
+ domain: "linear" === (null == axisOption ? void 0 : axisOption.type) ? void 0 : Array.from(domain)
57499
57535
  }, axisOption, {
57500
57536
  orient: "right",
57501
57537
  type: (null == axisOption ? void 0 : axisOption.type) || "linear",
@@ -57513,9 +57549,9 @@
57513
57549
  if (row === layout.rowCount - layout.bottomFrozenRowCount && col >= layout.rowHeaderLevelCount && col < layout.colCount - layout.rightFrozenColCount) {
57514
57550
  let columnDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.columnHeaderLevelCount);
57515
57551
  isArray$7(columnDimensionKey) && (columnDimensionKey = columnDimensionKey[0]);
57516
- const data = null !== (_e = layout.dataset.collectedValues[columnDimensionKey]) && void 0 !== _e ? _e : [],
57552
+ const data = null !== (_l = layout.dataset.collectedValues[columnDimensionKey]) && void 0 !== _l ? _l : [],
57517
57553
  colPath = layout.getColKeysPath(col, row),
57518
- domain = null !== (_f = null == data ? void 0 : data[null != colPath ? colPath : ""]) && void 0 !== _f ? _f : [],
57554
+ domain = null !== (_m = null == data ? void 0 : data[null != colPath ? colPath : ""]) && void 0 !== _m ? _m : [],
57519
57555
  {
57520
57556
  axisOption: axisOption,
57521
57557
  isPercent: isPercent,
@@ -57530,7 +57566,7 @@
57530
57566
  range: "linear" === (null == axisOption ? void 0 : axisOption.type) ? domain : void 0
57531
57567
  }, axisOption, {
57532
57568
  orient: "bottom",
57533
- type: null !== (_g = null == axisOption ? void 0 : axisOption.type) && void 0 !== _g ? _g : "band",
57569
+ type: null !== (_o = null == axisOption ? void 0 : axisOption.type) && void 0 !== _o ? _o : "band",
57534
57570
  __vtableChartTheme: theme,
57535
57571
  __vtablePadding: padding
57536
57572
  });
@@ -58037,7 +58073,7 @@
58037
58073
  }
58038
58074
  constructor(container, options = {}) {
58039
58075
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
58040
- if (super(), this.showFrozenIcon = !0, this.version = "1.20.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
58076
+ if (super(), this.showFrozenIcon = !0, this.version = "1.20.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
58041
58077
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
58042
58078
  options: options,
58043
58079
  container: container
@@ -74854,7 +74890,7 @@
74854
74890
  PluginManager: PluginManager
74855
74891
  });
74856
74892
 
74857
- const version = "1.20.0";
74893
+ const version = "1.20.1-alpha.0";
74858
74894
 
74859
74895
  exports.Gantt = Gantt;
74860
74896
  exports.TYPES = index$4;