aloudata-gantt 0.0.4 → 0.0.5

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/dist/index.esm.js CHANGED
@@ -4768,7 +4768,6 @@ var GanttStore = /*#__PURE__*/function () {
4768
4768
  var bodyWidth = this.width;
4769
4769
  var viewWidth = 704;
4770
4770
  var tableWidth = 500;
4771
- this.customTableWidth = 500;
4772
4771
  this.viewWidth = viewWidth;
4773
4772
  this.tableWidth = tableWidth;
4774
4773
  this.translateX = translateX;
@@ -4821,11 +4820,6 @@ var GanttStore = /*#__PURE__*/function () {
4821
4820
  value: function setColumns(columns) {
4822
4821
  this.columns = columns;
4823
4822
  }
4824
- }, {
4825
- key: "setCustomTableWidth",
4826
- value: function setCustomTableWidth(customTableWidth) {
4827
- this.customTableWidth = customTableWidth;
4828
- }
4829
4823
  }, {
4830
4824
  key: "setDependencies",
4831
4825
  value: function setDependencies(dependencies) {
@@ -4877,7 +4871,7 @@ var GanttStore = /*#__PURE__*/function () {
4877
4871
  }, {
4878
4872
  key: "initWidth",
4879
4873
  value: function initWidth() {
4880
- this.tableWidth = this.customTableWidth;
4874
+ this.tableWidth = this.totalColumnWidth || window.customTableWidth || 500;
4881
4875
  this.viewWidth = this.width - this.tableWidth;
4882
4876
  // 图表宽度不能小于 200
4883
4877
  if (this.viewWidth < 200) {
@@ -5445,7 +5439,6 @@ __decorate([observable], GanttStore.prototype, "scrolling", void 0);
5445
5439
  __decorate([observable], GanttStore.prototype, "scrollTop", void 0);
5446
5440
  __decorate([observable], GanttStore.prototype, "collapse", void 0);
5447
5441
  __decorate([observable], GanttStore.prototype, "tableWidth", void 0);
5448
- __decorate([observable], GanttStore.prototype, "customTableWidth", void 0);
5449
5442
  __decorate([observable], GanttStore.prototype, "viewWidth", void 0);
5450
5443
  __decorate([observable], GanttStore.prototype, "width", void 0);
5451
5444
  __decorate([observable], GanttStore.prototype, "height", void 0);
@@ -5462,7 +5455,6 @@ __decorate([action], GanttStore.prototype, "toggleCollapse", null);
5462
5455
  __decorate([action], GanttStore.prototype, "setRowCollapse", null);
5463
5456
  __decorate([action], GanttStore.prototype, "setOnUpdate", null);
5464
5457
  __decorate([action], GanttStore.prototype, "setColumns", null);
5465
- __decorate([action], GanttStore.prototype, "setCustomTableWidth", null);
5466
5458
  __decorate([action], GanttStore.prototype, "setDependencies", null);
5467
5459
  __decorate([action], GanttStore.prototype, "handlePanMove", null);
5468
5460
  __decorate([action], GanttStore.prototype, "handlePanEnd", null);
@@ -6773,8 +6765,8 @@ var GanttComponent = function GanttComponent(props) {
6773
6765
  if (isRestDay) store.setIsRestDay(isRestDay);
6774
6766
  }, [isRestDay, store]);
6775
6767
  useEffect(function () {
6776
- store.setCustomTableWidth(customTableWidth || 0);
6777
- }, [customTableWidth, store]);
6768
+ window.customTableWidth = customTableWidth;
6769
+ }, [customTableWidth]);
6778
6770
  useEffect(function () {
6779
6771
  if (unit) store.switchSight(unit);
6780
6772
  }, [unit, store]);
@@ -22,7 +22,6 @@ declare class GanttStore {
22
22
  scrollTop: number;
23
23
  collapse: boolean;
24
24
  tableWidth: number;
25
- customTableWidth: number;
26
25
  viewWidth: number;
27
26
  width: number;
28
27
  height: number;
@@ -53,7 +52,6 @@ declare class GanttStore {
53
52
  setRowCollapse(item: Gantt.Item, collapsed: boolean): void;
54
53
  setOnUpdate(onUpdate: GanttProperties['onUpdate']): void;
55
54
  setColumns(columns: Gantt.Column[]): void;
56
- setCustomTableWidth(customTableWidth: number): void;
57
55
  setDependencies(dependencies: Gantt.Dependence[]): void;
58
56
  handlePanMove(translateX: number): void;
59
57
  handlePanEnd(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloudata-gantt",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "license": "MIT",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/types/index.d.ts",