@visactor/vtable-gantt 1.15.2-alpha.2 → 1.15.2

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
@@ -5,5 +5,5 @@ import { Gantt } from './Gantt';
5
5
  import * as tools from './tools';
6
6
  import * as VRender from './vrender';
7
7
  import * as VTable from './vtable';
8
- export declare const version = "1.15.2-alpha.2";
8
+ export declare const version = "1.15.2";
9
9
  export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable };
package/cjs/index.js CHANGED
@@ -52,5 +52,5 @@ exports.VRender = VRender;
52
52
 
53
53
  const VTable = __importStar(require("./vtable"));
54
54
 
55
- exports.VTable = VTable, exports.version = "1.15.2-alpha.2";
55
+ exports.VTable = VTable, exports.version = "1.15.2";
56
56
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,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';\nexport const version = \"1.15.2-alpha.2\";\n/**\n * @namespace VTable\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};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,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';\nexport const version = \"1.15.2\";\n/**\n * @namespace VTable\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};\n"]}
@@ -82,4 +82,5 @@ class TaskCreationButton {
82
82
  }
83
83
  }
84
84
 
85
- exports.TaskCreationButton = TaskCreationButton;
85
+ exports.TaskCreationButton = TaskCreationButton;
86
+ //# sourceMappingURL=task-creation-button.js.map
@@ -84,7 +84,6 @@ function _syncTableSize(gantt) {
84
84
  gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt));
85
85
  }
86
86
 
87
- //# sourceMappingURL=gantt-table-sync.js.map
88
87
  exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
89
88
  exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
90
89
  exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
@@ -47,4 +47,5 @@ function debounce(func, wait, options) {
47
47
  };
48
48
  }
49
49
 
50
- exports.debounce = debounce;
50
+ exports.debounce = debounce;
51
+ //# sourceMappingURL=debounce.js.map
@@ -33,5 +33,4 @@ class Inertia {
33
33
  }
34
34
  }
35
35
 
36
- exports.Inertia = Inertia;
37
- //# sourceMappingURL=inertia.js.map
36
+ exports.Inertia = Inertia;
@@ -51332,7 +51332,7 @@
51332
51332
  constructor(container) {
51333
51333
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
51334
51334
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
51335
- if (super(), this.showFrozenIcon = !0, this.version = "1.15.2-alpha.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
51335
+ if (super(), this.showFrozenIcon = !0, this.version = "1.15.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
51336
51336
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
51337
51337
  const {
51338
51338
  frozenColCount = 0,
@@ -58205,7 +58205,7 @@
58205
58205
  width: 100,
58206
58206
  height: 100
58207
58207
  }
58208
- }, this.isReleased = !1, this.table = table, isBoolean$4(emptyTipOption) || isValid$3(emptyTipOption.displayMode) || (this.table.isListTable() ? emptyTipOption.displayMode = "basedOnTable" : emptyTipOption.displayMode = "basedOnContainer"), this._emptyTipOption = Object.assign(this._emptyTipOption, !0 === emptyTipOption ? {} : emptyTipOption), this._emptyTipComponent = this._createOrUpdateEmptyTipComponent(this._getEmptyTipAttrs());
58208
+ }, this.isReleased = !1, this.table = table, this._emptyTipOption = Object.assign(this._emptyTipOption, !0 === emptyTipOption ? {} : emptyTipOption), isValid$3(this._emptyTipOption.displayMode) || (this.table.isListTable() ? this._emptyTipOption.displayMode = "basedOnTable" : this._emptyTipOption.displayMode = "basedOnContainer"), this._emptyTipComponent = this._createOrUpdateEmptyTipComponent(this._getEmptyTipAttrs());
58209
58209
  }
58210
58210
  _createOrUpdateEmptyTipComponent(attrs) {
58211
58211
  if (this._emptyTipComponent) isEqual(attrs, this._cacheAttrs) || this._emptyTipComponent.setAttributes(attrs);else {
@@ -60398,22 +60398,42 @@
60398
60398
  }
60399
60399
 
60400
60400
  function createProgressBarCell(progressBarDefine, style, width, value, dataValue, col, row, padding, table, range) {
60401
- var _a, _b, _c, _d, _e, _f;
60402
- progressBarDefine.dependField && (dataValue = null !== (_b = null === (_a = table.getCellOriginRecord(col, row)) || void 0 === _a ? void 0 : _a[progressBarDefine.dependField]) && void 0 !== _b ? _b : dataValue), progressBarDefine.barType = null !== (_c = progressBarDefine.barType) && void 0 !== _c ? _c : "default", progressBarDefine.min = null !== (_d = getOrApply(progressBarDefine.min, {
60403
- col: col,
60404
- row: row,
60405
- table: table,
60406
- value: value,
60407
- dataValue: dataValue,
60408
- cellHeaderPaths: void 0
60409
- })) && void 0 !== _d ? _d : 0, progressBarDefine.max = null !== (_e = getOrApply(progressBarDefine.max, {
60410
- col: col,
60411
- row: row,
60412
- table: table,
60413
- value: value,
60414
- dataValue: dataValue,
60415
- cellHeaderPaths: void 0
60416
- })) && void 0 !== _e ? _e : progressBarDefine.min + 100;
60401
+ var _a, _b, _c, _d, _e;
60402
+ if (progressBarDefine.dependField) {
60403
+ const dependField = getOrApply(progressBarDefine.dependField, {
60404
+ col: col,
60405
+ row: row,
60406
+ table: table,
60407
+ value: value,
60408
+ dataValue: dataValue,
60409
+ cellHeaderPaths: void 0
60410
+ });
60411
+ dataValue = null !== (_b = null === (_a = table.getCellOriginRecord(col, row)) || void 0 === _a ? void 0 : _a[dependField]) && void 0 !== _b ? _b : dataValue;
60412
+ }
60413
+ const barType = null !== (_c = getOrApply(progressBarDefine.barType, {
60414
+ col: col,
60415
+ row: row,
60416
+ table: table,
60417
+ value: value,
60418
+ dataValue: dataValue,
60419
+ cellHeaderPaths: void 0
60420
+ })) && void 0 !== _c ? _c : "default",
60421
+ min = null !== (_d = getOrApply(progressBarDefine.min, {
60422
+ col: col,
60423
+ row: row,
60424
+ table: table,
60425
+ value: value,
60426
+ dataValue: dataValue,
60427
+ cellHeaderPaths: void 0
60428
+ })) && void 0 !== _d ? _d : 0,
60429
+ max = null !== (_e = getOrApply(progressBarDefine.max, {
60430
+ col: col,
60431
+ row: row,
60432
+ table: table,
60433
+ value: value,
60434
+ dataValue: dataValue,
60435
+ cellHeaderPaths: void 0
60436
+ })) && void 0 !== _e ? _e : min + 100;
60417
60437
  let height = 0;
60418
60438
  height = range ? table.getRowsHeight(range.start.row, range.end.row) : table.getRowHeight(row);
60419
60439
  let contentWidth = width,
@@ -60475,8 +60495,8 @@
60475
60495
  str.endsWith(svalue, "%") && (svalue = svalue.substr(0, svalue.length - 1));
60476
60496
  const num = Number(svalue);
60477
60497
  if (isNaN(num)) return percentCompleteBarGroup;
60478
- if ("default" === (null !== (_f = progressBarDefine.barType) && void 0 !== _f ? _f : "default")) {
60479
- const percentile = num < progressBarDefine.min ? 0 : num > progressBarDefine.max ? 1 : (num - progressBarDefine.min) / (progressBarDefine.max - progressBarDefine.min),
60498
+ if ("default" === (null != barType ? barType : "default")) {
60499
+ const percentile = num < min ? 0 : num > max ? 1 : (num - min) / (max - min),
60480
60500
  barMaxWidth = contentWidth,
60481
60501
  barTop = top + contentHeight - barHeight - barBottom;
60482
60502
  let barSize = Math.min(barMaxWidth * percentile, barMaxWidth);
@@ -60518,9 +60538,9 @@
60518
60538
  fill: fillColor
60519
60539
  });
60520
60540
  percentCompleteBarGroup.addChild(barMain);
60521
- } else if ("negative" === progressBarDefine.barType) {
60522
- const negativeRange = progressBarDefine.min < 0 ? -progressBarDefine.min : 0,
60523
- positiveRange = progressBarDefine.max > 0 ? progressBarDefine.max : 0,
60541
+ } else if ("negative" === barType) {
60542
+ const negativeRange = min < 0 ? -min : 0,
60543
+ positiveRange = max > 0 ? max : 0,
60524
60544
  negativeFactor = negativeRange / (negativeRange + positiveRange),
60525
60545
  positiveFactor = 1 - negativeFactor,
60526
60546
  positiveRate = num > 0 ? num / positiveRange : 0,
@@ -60693,9 +60713,9 @@
60693
60713
  });
60694
60714
  percentCompleteBarGroup.addChild(barMark);
60695
60715
  }
60696
- } else if ("negative_no_axis" === progressBarDefine.barType) {
60697
- const _negativeRange = progressBarDefine.min < 0 ? -progressBarDefine.min : 0,
60698
- _positiveRange = progressBarDefine.max > 0 ? progressBarDefine.max : 0,
60716
+ } else if ("negative_no_axis" === barType) {
60717
+ const _negativeRange = min < 0 ? -min : 0,
60718
+ _positiveRange = max > 0 ? max : 0,
60699
60719
  range = Math.max(_negativeRange, _positiveRange),
60700
60720
  percentile = 0 === range ? 0 : Math.abs(num) / range,
60701
60721
  barMaxWidth = contentWidth;
@@ -63822,7 +63842,7 @@
63822
63842
  themes: themes$1
63823
63843
  });
63824
63844
 
63825
- const version = "1.15.2-alpha.2";
63845
+ const version = "1.15.2";
63826
63846
 
63827
63847
  exports.Gantt = Gantt;
63828
63848
  exports.TYPES = index$3;