@xpyjs/gantt-core 0.0.1-rc.2 → 0.0.1-rc.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.
package/dist/x-gantt.js CHANGED
@@ -3,10 +3,10 @@ var Yt = (f, t, e) => t in f ? Pt(f, t, { enumerable: !0, configurable: !0, writ
3
3
  var a = (f, t, e) => Yt(f, typeof t != "symbol" ? t + "" : t, e);
4
4
  import G from "dayjs";
5
5
  import { default as ai } from "dayjs";
6
- import { merge as rt, isArray as X, isString as V, isFunction as j, cloneDeep as Z, isObject as Et, isNumber as Ut, omit as yt, throttle as wt, isBoolean as ht, debounce as Xt } from "lodash-es";
6
+ import { merge as rt, isArray as X, isString as K, isFunction as j, cloneDeep as Z, isObject as Et, isNumber as Ut, omit as yt, throttle as wt, isBoolean as ht, debounce as Xt } from "lodash-es";
7
7
  import S from "konva";
8
- const Ct = "0.0.1-rc.2";
9
- function Vt() {
8
+ const Ct = "0.0.1-rc.3";
9
+ function Kt() {
10
10
  const f = "#eca710", t = "#ffffff", e = "#e7209e", i = "#ffffff", s = "#1c42e8";
11
11
  [
12
12
  " __ __ _____ _____ _____ _____ _____ ",
@@ -316,7 +316,7 @@ const lt = () => ({
316
316
  opacity: 0.1
317
317
  }
318
318
  });
319
- class Kt {
319
+ class Vt {
320
320
  constructor() {
321
321
  a(this, "options", lt());
322
322
  }
@@ -354,7 +354,7 @@ class Kt {
354
354
  var s;
355
355
  let e = "";
356
356
  const i = (s = this.options.row) == null ? void 0 : s.backgroundColor;
357
- return V(i) ? e = i : X(i) && i.length > 0 ? e = i[t.level] : j(i) && (e = i(t.getEmitData())), e;
357
+ return K(i) ? e = i : X(i) && i.length > 0 ? e = i[t.level] : j(i) && (e = i(t.getEmitData())), e;
358
358
  }
359
359
  unpackFunc(t, e) {
360
360
  return j(t) ? t(e.getEmitData()) : t;
@@ -413,7 +413,7 @@ function $(f, t, e) {
413
413
  }
414
414
  function nt(f, t) {
415
415
  let e = f;
416
- return V(e) && (/%$/.test(e) ? e = t * parseFloat(e) / 100 : e = parseFloat(e)), isNaN(e) ? 0 : e;
416
+ return K(e) && (/%$/.test(e) ? e = t * parseFloat(e) / 100 : e = parseFloat(e)), isNaN(e) ? 0 : e;
417
417
  }
418
418
  function ct(f, t) {
419
419
  if (t === 0)
@@ -532,7 +532,7 @@ class mt {
532
532
  this.store = t, this.event = e, this.fields = this.store.getOptionManager().getOptions().fields, this.id = n || i[this.fields.id] || Q(), this.data = i, this.name = i[this.fields.name] || "", this.type = i[this.fields.type] || "task", this.updateMode(), this.progress = i[this.fields.progress], this.expanded = this.store.getOptionManager().getOptions().expand.show ? this.store.getOptionManager().getOptions().expand.enabled : !0, this.children = [], this.level = s && s.level !== void 0 ? s.level + 1 : 0, this.parent = s, this.flatIndex = 0, this.store.updateTime(this.startTime, this.endTime);
533
533
  }
534
534
  getField(t) {
535
- if (!t || V(t) && t.trim() === "")
535
+ if (!t || K(t) && t.trim() === "")
536
536
  return;
537
537
  if (!t.includes("."))
538
538
  return this.data[t];
@@ -548,8 +548,8 @@ class mt {
548
548
  }
549
549
  /** 切换展示模式时,需要调整时间 */
550
550
  updateMode() {
551
- let t = !1;
552
- return this.data[this.fields.startTime] && (!this.startTime || !this.startTime.isSame(G(this.data[this.fields.startTime]))) && (this.startTime = G(this.data[this.fields.startTime]), t = !0), this.data[this.fields.endTime] && (!this.endTime || !this.endTime.isSame(G(this.data[this.fields.endTime]))) && (this.endTime = G(this.data[this.fields.endTime]), t = !0), this.startTime && this.endTime && this.duration === 0 && (this.duration = this.endTime.diff(this.startTime)), this.isMilestone() && (!this.endTime || !this.endTime.isSame(this.startTime)) && (this.endTime = this.startTime, t = !0), t;
551
+ let t = !1, e = !1;
552
+ return this.data[this.fields.startTime] && (!this.startTime || !this.startTime.isSame(G(this.data[this.fields.startTime]))) && (this.startTime = G(this.data[this.fields.startTime]), t = !0, e = !0), this.data[this.fields.endTime] && (!this.endTime || !this.endTime.isSame(G(this.data[this.fields.endTime]))) && (this.endTime = G(this.data[this.fields.endTime]), t = !0, e = !0), e && this.store.updateTime(this.startTime, this.endTime), this.startTime && this.endTime && this.duration === 0 && (this.duration = this.endTime.diff(this.startTime)), this.isMilestone() && (!this.endTime || !this.endTime.isSame(this.startTime)) && (this.endTime = this.startTime, t = !0), t;
553
553
  }
554
554
  updateData(t) {
555
555
  this.data = t;
@@ -686,40 +686,38 @@ class Jt {
686
686
  * 初始化任务
687
687
  */
688
688
  initTasks(t = !1) {
689
- t ? (this.dataLevel = 0, this.tasks = [], this.taskMap.clear(), this.collapsedTaskIds.clear(), this.rawData.forEach((e) => {
689
+ this.dataLevel = 0, this.tasks = [], this.taskMap.clear(), this.collapsedTaskIds.clear(), this.rawData.forEach((e) => {
690
690
  this.tasks.push(this.createTask(e));
691
- })) : this.rawData.length > 0 ? this.updateTask(this.rawData, this.tasks) : (this.tasks = [], this.taskMap.clear(), this.collapsedTaskIds.clear());
691
+ });
692
692
  }
693
- createTask(t, e) {
694
- const i = this.store.getOptionManager().getOptions().fields, s = new mt(this.store, this.event, t, e);
695
- return Array.isArray(t[i.children]) && (s.children = t[i.children].map(
696
- (n) => this.createTask(n, s)
697
- )), this.taskMap.set(s.id, s), this.dataLevel = Math.max(this.dataLevel, s.level), s;
693
+ createTask(t, e, i = !0) {
694
+ const s = this.store.getOptionManager().getOptions().fields, n = new mt(this.store, this.event, t, e);
695
+ return i && Array.isArray(t[s.children]) && (n.children = t[s.children].map(
696
+ (o) => this.createTask(o, n)
697
+ )), this.taskMap.set(n.id, n), this.dataLevel = Math.max(this.dataLevel, n.level), n;
698
698
  }
699
699
  updateTask(t, e, i) {
700
700
  let s = 0;
701
701
  for (; s < t.length; ) {
702
702
  const n = t[s], o = e[s];
703
703
  if (n && !o) {
704
- const r = this.createTask(n, i);
705
- e.push(r), this.taskMap.set(r.id, r), this.dataLevel = Math.max(this.dataLevel, r.level);
706
- } else !n && o ? (this.taskMap.delete(o.id), e.splice(s, 1)) : n && o && (n[this.store.getOptionManager().getOptions().fields.id] === o.id ? (o.updateData(n), this.dataLevel = Math.max(this.dataLevel, o.level)) : (this.taskMap.delete(o.id), e[s] = this.createTask(n, o.parent), this.taskMap.set(e[s].id, e[s]), this.dataLevel = Math.max(this.dataLevel, e[s].level)));
707
- if (n[this.store.getOptionManager().getOptions().fields.children]) {
708
- const r = n[this.store.getOptionManager().getOptions().fields.children];
704
+ const h = this.createTask(n, i, !1);
705
+ e.push(h), this.dataLevel = Math.max(this.dataLevel, h.level);
706
+ } else !n && o ? e.splice(s, 1) : n && o && (n[this.store.getOptionManager().getOptions().fields.id] === o.id ? (o.updateData(n), this.taskMap.set(o.id, o), this.dataLevel = Math.max(this.dataLevel, o.level)) : (e[s] = this.createTask(n, o.parent, !1), this.dataLevel = Math.max(this.dataLevel, e[s].level)));
707
+ const r = n[this.store.getOptionManager().getOptions().fields.children];
708
+ if (r)
709
709
  if (o && o.children)
710
710
  this.updateTask(r, o.children, o);
711
711
  else {
712
712
  const h = r.map(
713
- (c) => this.createTask(c, e[s])
713
+ (c) => this.createTask(c, e[s], !1)
714
714
  );
715
715
  e[s].children = h;
716
716
  }
717
- } else o && o.children && (o.children = []);
717
+ else o && o.children && (o.children = []);
718
718
  s++;
719
719
  }
720
- e.length >= s && e.splice(s).forEach((o) => {
721
- this.taskMap.delete(o.id);
722
- });
720
+ e.length >= s && e.splice(s);
723
721
  }
724
722
  /**
725
723
  * 获取源数据
@@ -733,6 +731,10 @@ class Jt {
733
731
  getTasks(t = !0) {
734
732
  return t ? this.tasks : Array.from(this.taskMap.values());
735
733
  }
734
+ /** 获取数据规模 */
735
+ getDataSize() {
736
+ return this.taskMap.size;
737
+ }
736
738
  /**
737
739
  * 通过 ID 获取任务
738
740
  */
@@ -2819,7 +2821,7 @@ class Oe {
2819
2821
  week: s.cellWidth,
2820
2822
  month: s.cellWidth,
2821
2823
  quarter: s.cellWidth
2822
- } : V(s.cellWidth) ? this.cellWidth = Z(
2824
+ } : K(s.cellWidth) ? this.cellWidth = Z(
2823
2825
  ut()[s.cellWidth] || ut().normal
2824
2826
  ) : Et(s.cellWidth) && (this.cellWidth = Object.assign(this.cellWidth, s.cellWidth))), this.headerCellFormat = s.headerCellFormat, this.headerGroupFormat = s.headerGroupFormat;
2825
2827
  }
@@ -2899,7 +2901,7 @@ class Oe {
2899
2901
  const i = this.headerGroupFormat(t.toDate(), this.unit);
2900
2902
  if (i) return i;
2901
2903
  }
2902
- if (V(this.headerGroupFormat))
2904
+ if (K(this.headerGroupFormat))
2903
2905
  return t.format(this.headerGroupFormat);
2904
2906
  switch (this.getGroupUnit()) {
2905
2907
  case "month":
@@ -2919,7 +2921,7 @@ class Oe {
2919
2921
  const i = this.headerCellFormat(t.toDate(), this.unit);
2920
2922
  if (i) return i;
2921
2923
  }
2922
- if (V(this.headerCellFormat))
2924
+ if (K(this.headerCellFormat))
2923
2925
  return t.format(this.headerCellFormat);
2924
2926
  switch (this.getChildUnit()) {
2925
2927
  case "hour":
@@ -2968,7 +2970,7 @@ class De {
2968
2970
  const i = yt(e, ["data"]), s = e == null ? void 0 : e.data;
2969
2971
  if (s && !X(s))
2970
2972
  throw O.exception("Data should be a array.");
2971
- this.optionManager = new Kt(), this.optionManager.setOptions(i), i.locale && vt(i.locale), this.timeAxis = new Oe(), this.timeAxis.init(this.optionManager.getOptions()), this.columnManager = new ee(this.context), i.table && i.table.columns && this.columnManager.init(i.table.columns), this.dataManager = new Jt(this, this.context.event), s && this.dataManager.setData(s, !0), (n = e == null ? void 0 : e.baselines) != null && n.data && this.dataManager.setBaselines(e.baselines.data), this.linkManager = new ft(this, this.context.event), X((o = e == null ? void 0 : e.links) == null ? void 0 : o.data) && this.linkManager.setLinks(e.links.data, !0), this.linkManager.setCycleDetection(((r = e == null ? void 0 : e.links) == null ? void 0 : r.enableCycleDetection) ?? !0);
2973
+ this.optionManager = new Vt(), this.optionManager.setOptions(i), i.locale && vt(i.locale), this.timeAxis = new Oe(), this.timeAxis.init(this.optionManager.getOptions()), this.columnManager = new ee(this.context), i.table && i.table.columns && this.columnManager.init(i.table.columns), this.dataManager = new Jt(this, this.context.event), s && this.dataManager.setData(s, !0), (n = e == null ? void 0 : e.baselines) != null && n.data && this.dataManager.setBaselines(e.baselines.data), this.linkManager = new ft(this, this.context.event), X((o = e == null ? void 0 : e.links) == null ? void 0 : o.data) && this.linkManager.setLinks(e.links.data, !0), this.linkManager.setCycleDetection(((r = e == null ? void 0 : e.links) == null ? void 0 : r.enableCycleDetection) ?? !0);
2972
2974
  }
2973
2975
  getOptionManager() {
2974
2976
  return this.optionManager;
@@ -4431,23 +4433,23 @@ class We {
4431
4433
  fontFamily: zt
4432
4434
  }), at = it.measureSize(F);
4433
4435
  it.width(at.width);
4434
- const K = { x: 0, y: 0 };
4436
+ const V = { x: 0, y: 0 };
4435
4437
  switch (z) {
4436
4438
  case "top-left":
4437
- K.x = -(12 + at.width), K.y = -8;
4439
+ V.x = -(12 + at.width), V.y = -8;
4438
4440
  break;
4439
4441
  case "bottom-left":
4440
- K.x = -(12 + at.width), K.y = 10;
4442
+ V.x = -(12 + at.width), V.y = 10;
4441
4443
  break;
4442
4444
  case "bottom-right":
4443
- K.x = 12, K.y = 10;
4445
+ V.x = 12, V.y = 10;
4444
4446
  break;
4445
4447
  case "top-right":
4446
4448
  default:
4447
- K.x = 12, K.y = -8;
4449
+ V.x = 12, V.y = -8;
4448
4450
  break;
4449
4451
  }
4450
- it.setAttrs(K), this.slider.add(it);
4452
+ it.setAttrs(V), this.slider.add(it);
4451
4453
  }
4452
4454
  }
4453
4455
  this.sliderType = "milestone";
@@ -5098,20 +5100,21 @@ class Fe {
5098
5100
  * 高亮指定行
5099
5101
  */
5100
5102
  highlightRow(t) {
5101
- if (this.highlightedRowId === t) return;
5102
- this.highlightedRowId = t;
5103
- const e = this.rowsCache.get(`chart-row-${t}`);
5104
- if (!e) return;
5103
+ if (this.highlightedRowId === t || (this.highlightedRowId = t, !this.rowsCache.get(`chart-row-${t}`))) return;
5105
5104
  this.highlightRect && this.highlightRect.destroy();
5106
- const s = e.task.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
5107
- this.selectedRowId !== t && (this.highlightRect = new S.Rect({
5108
- x: 0,
5109
- y: s + this.offsetY,
5110
- width: this.width,
5111
- height: this.context.getOptions().row.height,
5112
- fill: B(this.context.getOptions().row.hover.backgroundColor).alpha(this.context.getOptions().row.hover.opacity).toHex(),
5113
- name: "highlight-rect"
5114
- }), this.layer.add(this.highlightRect), this.highlightRect.moveToBottom(), this.layer.batchDraw());
5105
+ const i = this.context.store.getDataManager().getTaskById(t);
5106
+ if (i) {
5107
+ const n = i.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
5108
+ if (this.selectedRowId === t) return;
5109
+ this.highlightRect = new S.Rect({
5110
+ x: 0,
5111
+ y: n + this.offsetY,
5112
+ width: this.width,
5113
+ height: this.context.getOptions().row.height,
5114
+ fill: B(this.context.getOptions().row.hover.backgroundColor).alpha(this.context.getOptions().row.hover.opacity).toHex(),
5115
+ name: "highlight-rect"
5116
+ }), this.layer.add(this.highlightRect), this.highlightRect.moveToBottom(), this.layer.batchDraw();
5117
+ }
5115
5118
  }
5116
5119
  /**
5117
5120
  * 取消行高亮
@@ -5132,8 +5135,13 @@ class Fe {
5132
5135
  if (t)
5133
5136
  this.highlightRect.y(this.highlightRect.y() + t);
5134
5137
  else {
5135
- const s = e.task.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
5136
- this.highlightRect.y(s + this.offsetY);
5138
+ const i = this.context.store.getDataManager().getTaskById(e.task.id);
5139
+ if (!i) {
5140
+ this.clearHighlight();
5141
+ return;
5142
+ }
5143
+ const n = i.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
5144
+ this.highlightRect.y(n + this.offsetY);
5137
5145
  }
5138
5146
  this.layer.batchDraw();
5139
5147
  }
@@ -5147,15 +5155,15 @@ class Fe {
5147
5155
  * 选中指定行
5148
5156
  */
5149
5157
  selectRow(t) {
5150
- var n;
5151
- this.selectedRowId = t;
5152
- const e = this.rowsCache.get(`chart-row-${t}`);
5153
- if (!e) return;
5154
- this.selectedRect && this.selectedRect.destroy(), this.selectedRowId === this.highlightedRowId && ((n = this.highlightRect) == null || n.fill("transparent"));
5155
- const s = e.task.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
5158
+ var o;
5159
+ if (this.selectedRowId = t, !this.rowsCache.get(`chart-row-${t}`)) return;
5160
+ this.selectedRect && this.selectedRect.destroy(), this.selectedRowId === this.highlightedRowId && ((o = this.highlightRect) == null || o.fill("transparent"));
5161
+ const i = this.context.store.getDataManager().getTaskById(t);
5162
+ if (!i) return;
5163
+ const n = i.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
5156
5164
  this.selectedRect = new S.Rect({
5157
5165
  x: 0,
5158
- y: s + this.offsetY,
5166
+ y: n + this.offsetY,
5159
5167
  width: this.width,
5160
5168
  height: this.context.getOptions().row.height,
5161
5169
  fill: B(this.context.getOptions().row.select.backgroundColor).alpha(this.context.getOptions().row.select.opacity).toHex(),
@@ -5175,7 +5183,7 @@ class Fe {
5175
5183
  if (!this.selectedRect || this.selectedRowId === null) return;
5176
5184
  const e = this.rowsCache.get(`chart-row-${this.selectedRowId}`);
5177
5185
  if (e)
5178
- if (this.context.store.getDataManager().getVisibleTasks().find((i) => i.id === e.task.id)) {
5186
+ if (this.context.store.getDataManager().getTaskById(e.task.id)) {
5179
5187
  const s = e.task.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
5180
5188
  this.selectedRect.y(s + this.offsetY), this.layer.batchDraw();
5181
5189
  } else
@@ -5874,7 +5882,7 @@ class Ye {
5874
5882
  l.isMilestone() && (u += i / 2);
5875
5883
  const y = s + i * l.flatIndex;
5876
5884
  let x = !0, T = !0, b = this.context.store.getOptionManager().unpackFunc(this.context.getOptions().links.create.from, l);
5877
- if (ht(b) ? x = T = b : V(b) && (x = b === "S", T = b === "F"), x) {
5885
+ if (ht(b) ? x = T = b : K(b) && (x = b === "S", T = b === "F"), x) {
5878
5886
  const w = new S.Circle({
5879
5887
  id: `point-${l.id}-left`,
5880
5888
  x: m - u,
@@ -5933,19 +5941,20 @@ class Ye {
5933
5941
  const i = Q();
5934
5942
  e.forEach((s) => {
5935
5943
  var g, d, l, m, p, u, y, x;
5944
+ if (s.valid === !1) return;
5936
5945
  const n = this.createId(s), o = this.context.store.getDataManager().getTaskById(s.from), r = this.context.store.getDataManager().getTaskById(s.to);
5937
5946
  if (!o) {
5938
5947
  O.warn(
5939
5948
  `No corresponding FROM task [${s.from}] was found for the link. Info:`,
5940
5949
  s
5941
- );
5950
+ ), s.valid = !1;
5942
5951
  return;
5943
5952
  }
5944
5953
  if (!r) {
5945
5954
  O.warn(
5946
5955
  `No corresponding TO task [${s.to}] was found for the link. Info:`,
5947
5956
  s
5948
- );
5957
+ ), s.valid = !1;
5949
5958
  return;
5950
5959
  }
5951
5960
  if (!this.context.store.getDataManager().isTaskVisible(o) || !this.context.store.getDataManager().isTaskVisible(r) || o.flatIndex < this.tasks[0].flatIndex && r.flatIndex < this.tasks[0].flatIndex || o.flatIndex > this.tasks[this.tasks.length - 1].flatIndex && r.flatIndex > this.tasks[this.tasks.length - 1].flatIndex)
@@ -6333,7 +6342,7 @@ class Ye {
6333
6342
  j(r) && (r = r(
6334
6343
  t.getEmitData(),
6335
6344
  this.context.store.getDataManager().getTaskById(e).getEmitData()
6336
- )), ht(r) ? n = o = r : V(r) && (n = r === "S", o = r === "F");
6345
+ )), ht(r) ? n = o = r : K(r) && (n = r === "S", o = r === "F");
6337
6346
  const h = this.validateChain(t.id, e, i, s);
6338
6347
  return {
6339
6348
  allowLeft: n && h.ok,
@@ -6349,7 +6358,7 @@ class Ye {
6349
6358
  j(r) && (r = r(
6350
6359
  t.getEmitData(),
6351
6360
  this.context.store.getDataManager().getTaskById(e).getEmitData()
6352
- )), ht(r) ? n = o = r : V(r) && (n = r === "S", o = r === "F");
6361
+ )), ht(r) ? n = o = r : K(r) && (n = r === "S", o = r === "F");
6353
6362
  const h = this.validateChain(e, t.id, i, s);
6354
6363
  return {
6355
6364
  allowLeft: n && h.ok,
@@ -6593,7 +6602,7 @@ class Ue {
6593
6602
  this.indicatorGroup.add(p);
6594
6603
  let u = `${gt(i.startDiff)}${i.unit} ${m}`;
6595
6604
  const y = s.compare.indicator[m].text;
6596
- j(y) ? u = y(i.startDiff, { ...t.getEmitData(), baseline: e }) : V(y) && (u = y);
6605
+ j(y) ? u = y(i.startDiff, { ...t.getEmitData(), baseline: e }) : K(y) && (u = y);
6597
6606
  const x = new S.Text({
6598
6607
  y: l - n.fontSize / 2,
6599
6608
  text: u,
@@ -6617,7 +6626,7 @@ class Ue {
6617
6626
  this.indicatorGroup.add(p);
6618
6627
  let u = `${gt(i.endDiff)}${i.unit} ${m}`;
6619
6628
  const y = s.compare.indicator[m].text;
6620
- j(y) ? u = y(i.endDiff, { ...t.getEmitData(), baseline: e }) : V(y) && (u = y);
6629
+ j(y) ? u = y(i.endDiff, { ...t.getEmitData(), baseline: e }) : K(y) && (u = y);
6621
6630
  const x = new S.Text({
6622
6631
  x: d + n.size + 5,
6623
6632
  y: l - n.fontSize / 2,
@@ -6691,8 +6700,8 @@ class Xe {
6691
6700
  this.headerLayer.destroy(), this.gridGroup.destroy(), this.bodyLayer.destroy(), this.todayLayer.destroy(), this.holidayGroup.destroy(), this.flagGroup.destroy(), this.weekendGroup.destroy(), this.linkGroup.destroy(), this.baselineGroup.destroy(), this.axisLayer.destroy(), this.bgLayer.destroy(), this.stage.destroy();
6692
6701
  }
6693
6702
  }
6694
- const Ve = '<svg style="transition: all 0.3s" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M8.293 12.707a1 1 0 0 1 0-1.414l5.657-5.657a1 1 0 1 1 1.414 1.414L10.414 12l4.95 4.95a1 1 0 0 1-1.414 1.414z"/></g></svg>';
6695
- class Ke {
6703
+ const Ke = '<svg style="transition: all 0.3s" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M8.293 12.707a1 1 0 0 1 0-1.414l5.657-5.657a1 1 0 1 1 1.414 1.414L10.414 12l4.95 4.95a1 1 0 0 1-1.414 1.414z"/></g></svg>';
6704
+ class Ve {
6696
6705
  constructor(t, e) {
6697
6706
  a(this, "line");
6698
6707
  a(this, "initialX", 0);
@@ -6702,7 +6711,7 @@ class Ke {
6702
6711
  "border-left-color",
6703
6712
  this.root.store.getOptionManager().getOptions().border.color,
6704
6713
  "important"
6705
- ), this.line.style.cursor = "col-resize", this.collapseButton = document.createElement("div"), this.collapseButton.className = "x-gantt-collapse-button", this.collapseButton.style.position = "absolute", this.collapseButton.style.top = "50%", this.collapseButton.style.left = "0", this.collapseButton.style.transform = "translateY(-50%)", this.collapseButton.style.cursor = "pointer", this.collapseButton.style.width = "16px", this.collapseButton.style.height = "30px", this.collapseButton.style.backgroundColor = "#fff", this.collapseButton.style.borderRadius = "0 6px 6px 0", this.collapseButton.style.boxShadow = "0 0 2px rgba(0, 0, 0, 0.2)", this.collapseButton.style.display = "flex", this.collapseButton.style.alignItems = "center", this.collapseButton.style.justifyContent = "center", this.collapseButton.innerHTML = Ve, this.collapseButton.addEventListener("click", (i) => {
6714
+ ), this.line.style.cursor = "col-resize", this.collapseButton = document.createElement("div"), this.collapseButton.className = "x-gantt-collapse-button", this.collapseButton.style.position = "absolute", this.collapseButton.style.top = "50%", this.collapseButton.style.left = "0", this.collapseButton.style.transform = "translateY(-50%)", this.collapseButton.style.cursor = "pointer", this.collapseButton.style.width = "16px", this.collapseButton.style.height = "30px", this.collapseButton.style.backgroundColor = "#fff", this.collapseButton.style.borderRadius = "0 6px 6px 0", this.collapseButton.style.boxShadow = "0 0 2px rgba(0, 0, 0, 0.2)", this.collapseButton.style.display = "flex", this.collapseButton.style.alignItems = "center", this.collapseButton.style.justifyContent = "center", this.collapseButton.innerHTML = Ke, this.collapseButton.addEventListener("click", (i) => {
6706
6715
  i.stopPropagation(), this.root.store.getColumnManager().collapse();
6707
6716
  }), this.line.appendChild(this.collapseButton), this.container.appendChild(this.line), this.addDragEvents();
6708
6717
  }
@@ -7020,7 +7029,7 @@ class Qe {
7020
7029
  a(this, "handleColumnWidthChange", () => {
7021
7030
  this.table.updateWidth(), this.updateSize();
7022
7031
  });
7023
- this.context = t, this.container = e, this.rootElement = document.createElement("div"), this.rootElement.id = `x-gantt-${this._id}`, this.rootElement.className = "x-gantt", this.rootElement.style.overflow = "hidden", this.rootElement.style.display = "flex", this.rootElement.style.position = "relative", this.container.appendChild(this.rootElement), this.tableContainer = document.createElement("div"), this.tableContainer.className = "x-gantt-table", this.rootElement.appendChild(this.tableContainer), new je(this.context, this.container), this.middleLine = new Ke(this.context, this.rootElement), this.chartContainer = document.createElement("div"), this.chartContainer.className = "x-gantt-chart", this.rootElement.appendChild(this.chartContainer), this.table = new He(this.context, this.tableContainer), this.chart = new Xe(this.context, this.chartContainer), this.scrollbar = new _e(
7032
+ this.context = t, this.container = e, this.rootElement = document.createElement("div"), this.rootElement.id = `x-gantt-${this._id}`, this.rootElement.className = "x-gantt", this.rootElement.style.overflow = "hidden", this.rootElement.style.display = "flex", this.rootElement.style.position = "relative", this.container.appendChild(this.rootElement), this.tableContainer = document.createElement("div"), this.tableContainer.className = "x-gantt-table", this.rootElement.appendChild(this.tableContainer), new je(this.context, this.container), this.middleLine = new Ve(this.context, this.rootElement), this.chartContainer = document.createElement("div"), this.chartContainer.className = "x-gantt-chart", this.rootElement.appendChild(this.chartContainer), this.table = new He(this.context, this.tableContainer), this.chart = new Xe(this.context, this.chartContainer), this.scrollbar = new _e(
7024
7033
  this.context,
7025
7034
  this.rootElement,
7026
7035
  this.context.store.getOptionManager().getOptions().scrollbar || {}
@@ -7600,10 +7609,10 @@ class si {
7600
7609
  * 获取当前数据量总数。该数量为所有数据展开后的数据条数
7601
7610
  */
7602
7611
  getDataSize() {
7603
- return this.context.store.getDataManager().getVisibleSize();
7612
+ return this.context.store.getDataManager().getDataSize();
7604
7613
  }
7605
7614
  }
7606
- Vt();
7615
+ Kt();
7607
7616
  const ni = Ct;
7608
7617
  export {
7609
7618
  si as XGantt,