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