@visactor/vtable-plugins 1.19.9-alpha.3 → 1.19.9

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.
@@ -16696,7 +16696,8 @@
16696
16696
  CONTEXTMENU_DEPENDENCY_LINK: "contextmenu_dependency_link",
16697
16697
  CLICK_MARKLINE_CREATE: "click_markline_create",
16698
16698
  CLICK_MARKLINE_CONTENT: "click_markline_content",
16699
- MOVE_END_TASK_BAR: "move_end_task_bar"
16699
+ MOVE_END_TASK_BAR: "move_end_task_bar",
16700
+ PROGRESS_UPDATE: "progress_update"
16700
16701
  };
16701
16702
 
16702
16703
  function throttle(func, delay) {
@@ -17581,7 +17582,7 @@
17581
17582
  return (null == scrollStyle ? void 0 : scrollStyle.hoverOn) || (null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && "none" === (null == scrollStyle ? void 0 : scrollStyle.verticalVisible) || !(null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && "none" === (null == scrollStyle ? void 0 : scrollStyle.visible) ? 0 : null !== (_a = null == scrollStyle ? void 0 : scrollStyle.width) && void 0 !== _a ? _a : 7;
17582
17583
  }
17583
17584
  function initOptions(gantt) {
17584
- 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, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85;
17585
+ 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, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87;
17585
17586
  const options = gantt.options;
17586
17587
  gantt.parsedOptions.tasksShowMode = null !== (_a = null == options ? void 0 : options.tasksShowMode) && void 0 !== _a ? _a : TasksShowMode.Tasks_Separate, gantt.parsedOptions.pixelRatio = null !== (_b = null == options ? void 0 : options.pixelRatio) && void 0 !== _b ? _b : 1, gantt.parsedOptions.rowHeight = null !== (_c = null == options ? void 0 : options.rowHeight) && void 0 !== _c ? _c : 40, gantt.parsedOptions.timelineColWidth = null !== (_e = null === (_d = null == options ? void 0 : options.timelineHeader) || void 0 === _d ? void 0 : _d.colWidth) && void 0 !== _e ? _e : 60, gantt.parsedOptions.startDateField = null !== (_g = null === (_f = options.taskBar) || void 0 === _f ? void 0 : _f.startDateField) && void 0 !== _g ? _g : "startDate", gantt.parsedOptions.endDateField = null !== (_j = null === (_h = options.taskBar) || void 0 === _h ? void 0 : _h.endDateField) && void 0 !== _j ? _j : "endDate", gantt.parsedOptions.progressField = null !== (_l = null === (_k = options.taskBar) || void 0 === _k ? void 0 : _k.progressField) && void 0 !== _l ? _l : "progress", gantt.parsedOptions.projectSubTasksExpandable = null === (_m = null == options ? void 0 : options.projectSubTasksExpandable) || void 0 === _m || _m;
17587
17588
  const {
@@ -17637,54 +17638,54 @@
17637
17638
  shadowColor: gantt.parsedOptions.taskBarStyle.barColor,
17638
17639
  borderColor: gantt.parsedOptions.taskBarStyle.barColor,
17639
17640
  borderLineWidth: 1
17640
- }, null === (_11 = null == options ? void 0 : options.taskBar) || void 0 === _11 ? void 0 : _11.selectedBarStyle), gantt.parsedOptions.taskBarLabelText = null !== (_13 = null === (_12 = null == options ? void 0 : options.taskBar) || void 0 === _12 ? void 0 : _12.labelText) && void 0 !== _13 ? _13 : "", gantt.parsedOptions.taskBarMoveable = null === (_15 = null === (_14 = null == options ? void 0 : options.taskBar) || void 0 === _14 ? void 0 : _14.moveable) || void 0 === _15 || _15, gantt.parsedOptions.moveTaskBarToExtendDateRange = null === (_17 = null === (_16 = null == options ? void 0 : options.taskBar) || void 0 === _16 ? void 0 : _16.moveToExtendDateRange) || void 0 === _17 || _17, gantt.parsedOptions.taskBarResizable = null === (_19 = null === (_18 = null == options ? void 0 : options.taskBar) || void 0 === _18 ? void 0 : _18.resizable) || void 0 === _19 || _19, gantt.parsedOptions.taskBarDragOrder = null === (_21 = null === (_20 = null == options ? void 0 : options.taskBar) || void 0 === _20 ? void 0 : _20.dragOrder) || void 0 === _21 || _21, gantt.parsedOptions.taskBarLabelStyle = {
17641
- fontFamily: null !== (_24 = null === (_23 = null === (_22 = null == options ? void 0 : options.taskBar) || void 0 === _22 ? void 0 : _22.labelTextStyle) || void 0 === _23 ? void 0 : _23.fontFamily) && void 0 !== _24 ? _24 : "Arial",
17642
- fontSize: null !== (_27 = null === (_26 = null === (_25 = null == options ? void 0 : options.taskBar) || void 0 === _25 ? void 0 : _25.labelTextStyle) || void 0 === _26 ? void 0 : _26.fontSize) && void 0 !== _27 ? _27 : 20,
17643
- color: null !== (_30 = null === (_29 = null === (_28 = null == options ? void 0 : options.taskBar) || void 0 === _28 ? void 0 : _28.labelTextStyle) || void 0 === _29 ? void 0 : _29.color) && void 0 !== _30 ? _30 : "#F01",
17644
- outsideColor: null !== (_33 = null === (_32 = null === (_31 = null == options ? void 0 : options.taskBar) || void 0 === _31 ? void 0 : _31.labelTextStyle) || void 0 === _32 ? void 0 : _32.outsideColor) && void 0 !== _33 ? _33 : "#333333",
17645
- textAlign: null !== (_36 = null === (_35 = null === (_34 = null == options ? void 0 : options.taskBar) || void 0 === _34 ? void 0 : _34.labelTextStyle) || void 0 === _35 ? void 0 : _35.textAlign) && void 0 !== _36 ? _36 : "left",
17646
- textBaseline: null !== (_39 = null === (_38 = null === (_37 = null == options ? void 0 : options.taskBar) || void 0 === _37 ? void 0 : _37.labelTextStyle) || void 0 === _38 ? void 0 : _38.textBaseline) && void 0 !== _39 ? _39 : "middle",
17647
- padding: null !== (_42 = null === (_41 = null === (_40 = null == options ? void 0 : options.taskBar) || void 0 === _40 ? void 0 : _40.labelTextStyle) || void 0 === _41 ? void 0 : _41.padding) && void 0 !== _42 ? _42 : [0, 0, 0, 10],
17648
- textOverflow: null === (_44 = null === (_43 = null == options ? void 0 : options.taskBar) || void 0 === _43 ? void 0 : _43.labelTextStyle) || void 0 === _44 ? void 0 : _44.textOverflow,
17649
- orient: null === (_46 = null === (_45 = null == options ? void 0 : options.taskBar) || void 0 === _45 ? void 0 : _45.labelTextStyle) || void 0 === _46 ? void 0 : _46.orient,
17650
- orientHandleWithOverflow: null === (_48 = null === (_47 = null == options ? void 0 : options.taskBar) || void 0 === _47 ? void 0 : _47.labelTextStyle) || void 0 === _48 ? void 0 : _48.orientHandleWithOverflow
17651
- }, gantt.parsedOptions.taskBarCustomLayout = null === (_49 = null == options ? void 0 : options.taskBar) || void 0 === _49 ? void 0 : _49.customLayout, gantt.parsedOptions.taskBarCreatable = null !== (_51 = null === (_50 = null == options ? void 0 : options.taskBar) || void 0 === _50 ? void 0 : _50.scheduleCreatable) && void 0 !== _51 ? _51 : !(gantt.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Separate && gantt.parsedOptions.tasksShowMode !== TasksShowMode.Tasks_Separate), gantt.parsedOptions.taskBarCreationButtonStyle = Object.assign({
17641
+ }, null === (_11 = null == options ? void 0 : options.taskBar) || void 0 === _11 ? void 0 : _11.selectedBarStyle), gantt.parsedOptions.taskBarLabelText = null !== (_13 = null === (_12 = null == options ? void 0 : options.taskBar) || void 0 === _12 ? void 0 : _12.labelText) && void 0 !== _13 ? _13 : "", gantt.parsedOptions.taskBarMoveable = null === (_15 = null === (_14 = null == options ? void 0 : options.taskBar) || void 0 === _14 ? void 0 : _14.moveable) || void 0 === _15 || _15, gantt.parsedOptions.moveTaskBarToExtendDateRange = null === (_17 = null === (_16 = null == options ? void 0 : options.taskBar) || void 0 === _16 ? void 0 : _16.moveToExtendDateRange) || void 0 === _17 || _17, gantt.parsedOptions.taskBarResizable = null === (_19 = null === (_18 = null == options ? void 0 : options.taskBar) || void 0 === _18 ? void 0 : _18.resizable) || void 0 === _19 || _19, gantt.parsedOptions.taskBarProgressAdjustable = null !== (_21 = null === (_20 = null == options ? void 0 : options.taskBar) || void 0 === _20 ? void 0 : _20.progressAdjustable) && void 0 !== _21 && _21, gantt.parsedOptions.taskBarDragOrder = null === (_23 = null === (_22 = null == options ? void 0 : options.taskBar) || void 0 === _22 ? void 0 : _22.dragOrder) || void 0 === _23 || _23, gantt.parsedOptions.taskBarLabelStyle = {
17642
+ fontFamily: null !== (_26 = null === (_25 = null === (_24 = null == options ? void 0 : options.taskBar) || void 0 === _24 ? void 0 : _24.labelTextStyle) || void 0 === _25 ? void 0 : _25.fontFamily) && void 0 !== _26 ? _26 : "Arial",
17643
+ fontSize: null !== (_29 = null === (_28 = null === (_27 = null == options ? void 0 : options.taskBar) || void 0 === _27 ? void 0 : _27.labelTextStyle) || void 0 === _28 ? void 0 : _28.fontSize) && void 0 !== _29 ? _29 : 20,
17644
+ color: null !== (_32 = null === (_31 = null === (_30 = null == options ? void 0 : options.taskBar) || void 0 === _30 ? void 0 : _30.labelTextStyle) || void 0 === _31 ? void 0 : _31.color) && void 0 !== _32 ? _32 : "#F01",
17645
+ outsideColor: null !== (_35 = null === (_34 = null === (_33 = null == options ? void 0 : options.taskBar) || void 0 === _33 ? void 0 : _33.labelTextStyle) || void 0 === _34 ? void 0 : _34.outsideColor) && void 0 !== _35 ? _35 : "#333333",
17646
+ textAlign: null !== (_38 = null === (_37 = null === (_36 = null == options ? void 0 : options.taskBar) || void 0 === _36 ? void 0 : _36.labelTextStyle) || void 0 === _37 ? void 0 : _37.textAlign) && void 0 !== _38 ? _38 : "left",
17647
+ textBaseline: null !== (_41 = null === (_40 = null === (_39 = null == options ? void 0 : options.taskBar) || void 0 === _39 ? void 0 : _39.labelTextStyle) || void 0 === _40 ? void 0 : _40.textBaseline) && void 0 !== _41 ? _41 : "middle",
17648
+ padding: null !== (_44 = null === (_43 = null === (_42 = null == options ? void 0 : options.taskBar) || void 0 === _42 ? void 0 : _42.labelTextStyle) || void 0 === _43 ? void 0 : _43.padding) && void 0 !== _44 ? _44 : [0, 0, 0, 10],
17649
+ textOverflow: null === (_46 = null === (_45 = null == options ? void 0 : options.taskBar) || void 0 === _45 ? void 0 : _45.labelTextStyle) || void 0 === _46 ? void 0 : _46.textOverflow,
17650
+ orient: null === (_48 = null === (_47 = null == options ? void 0 : options.taskBar) || void 0 === _47 ? void 0 : _47.labelTextStyle) || void 0 === _48 ? void 0 : _48.orient,
17651
+ orientHandleWithOverflow: null === (_50 = null === (_49 = null == options ? void 0 : options.taskBar) || void 0 === _49 ? void 0 : _49.labelTextStyle) || void 0 === _50 ? void 0 : _50.orientHandleWithOverflow
17652
+ }, gantt.parsedOptions.taskBarCustomLayout = null === (_51 = null == options ? void 0 : options.taskBar) || void 0 === _51 ? void 0 : _51.customLayout, gantt.parsedOptions.taskBarCreatable = null !== (_53 = null === (_52 = null == options ? void 0 : options.taskBar) || void 0 === _52 ? void 0 : _52.scheduleCreatable) && void 0 !== _53 ? _53 : !(gantt.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Separate && gantt.parsedOptions.tasksShowMode !== TasksShowMode.Tasks_Separate), gantt.parsedOptions.taskBarCreationButtonStyle = Object.assign({
17652
17653
  lineColor: "rgb(99, 144, 0)",
17653
17654
  lineWidth: 1,
17654
17655
  lineDash: [5, 5],
17655
17656
  cornerRadius: 4,
17656
17657
  backgroundColor: "#FFF"
17657
- }, null === (_53 = null === (_52 = null == options ? void 0 : options.taskBar) || void 0 === _52 ? void 0 : _52.scheduleCreation) || void 0 === _53 ? void 0 : _53.buttonStyle), gantt.parsedOptions.taskBarCreationCustomLayout = null === (_55 = null === (_54 = null == options ? void 0 : options.taskBar) || void 0 === _54 ? void 0 : _54.scheduleCreation) || void 0 === _55 ? void 0 : _55.customLayout, gantt.parsedOptions.taskBarCreationMaxWidth = null === (_57 = null === (_56 = null == options ? void 0 : options.taskBar) || void 0 === _56 ? void 0 : _56.scheduleCreation) || void 0 === _57 ? void 0 : _57.maxWidth, gantt.parsedOptions.taskBarCreationMinWidth = null === (_59 = null === (_58 = null == options ? void 0 : options.taskBar) || void 0 === _58 ? void 0 : _58.scheduleCreation) || void 0 === _59 ? void 0 : _59.minWidth, gantt.parsedOptions.outerFrameStyle = Object.assign({
17658
+ }, null === (_55 = null === (_54 = null == options ? void 0 : options.taskBar) || void 0 === _54 ? void 0 : _54.scheduleCreation) || void 0 === _55 ? void 0 : _55.buttonStyle), gantt.parsedOptions.taskBarCreationCustomLayout = null === (_57 = null === (_56 = null == options ? void 0 : options.taskBar) || void 0 === _56 ? void 0 : _56.scheduleCreation) || void 0 === _57 ? void 0 : _57.customLayout, gantt.parsedOptions.taskBarCreationMaxWidth = null === (_59 = null === (_58 = null == options ? void 0 : options.taskBar) || void 0 === _58 ? void 0 : _58.scheduleCreation) || void 0 === _59 ? void 0 : _59.maxWidth, gantt.parsedOptions.taskBarCreationMinWidth = null === (_61 = null === (_60 = null == options ? void 0 : options.taskBar) || void 0 === _60 ? void 0 : _60.scheduleCreation) || void 0 === _61 ? void 0 : _61.minWidth, gantt.parsedOptions.outerFrameStyle = Object.assign({
17658
17659
  borderColor: "#e1e4e8",
17659
17660
  borderLineWidth: 1,
17660
17661
  cornerRadius: 4
17661
- }, null === (_60 = options.frame) || void 0 === _60 ? void 0 : _60.outerFrameStyle), gantt.parsedOptions.markLine = generateMarkLine(null == options ? void 0 : options.markLine), null !== (_62 = null === (_61 = gantt.parsedOptions.markLine) || void 0 === _61 ? void 0 : _61.length) && void 0 !== _62 && _62 && ((null === (_63 = gantt.parsedOptions.markLine) || void 0 === _63 ? void 0 : _63.every(item => void 0 === item.scrollToMarkLine)) && (gantt.parsedOptions.markLine[0].scrollToMarkLine = !0), (null === (_64 = gantt.parsedOptions.markLine) || void 0 === _64 ? void 0 : _64.find(item => item.scrollToMarkLine)) && (gantt.parsedOptions.scrollToMarkLineDate = getStartDateByTimeUnit(new Date(null === (_65 = gantt.parsedOptions.markLine) || void 0 === _65 ? void 0 : _65.find(item => item.scrollToMarkLine).date), minTimeUnit, startOfWeek))), gantt.parsedOptions.verticalSplitLineHighlight = null === (_66 = options.frame) || void 0 === _66 ? void 0 : _66.verticalSplitLineHighlight, gantt.parsedOptions.verticalSplitLine = Object.assign({
17662
- lineColor: null === (_67 = gantt.parsedOptions.outerFrameStyle) || void 0 === _67 ? void 0 : _67.borderColor,
17663
- lineWidth: null === (_68 = gantt.parsedOptions.outerFrameStyle) || void 0 === _68 ? void 0 : _68.borderLineWidth
17664
- }, null === (_69 = options.frame) || void 0 === _69 ? void 0 : _69.verticalSplitLine), gantt.parsedOptions.horizontalSplitLine = null === (_70 = options.frame) || void 0 === _70 ? void 0 : _70.horizontalSplitLine, gantt.parsedOptions.verticalSplitLineMoveable = null === (_71 = options.frame) || void 0 === _71 ? void 0 : _71.verticalSplitLineMoveable, gantt.parsedOptions.taskKeyField = null !== (_72 = options.taskKeyField) && void 0 !== _72 ? _72 : "id", gantt.parsedOptions.dependencyLinks = null !== (_74 = null === (_73 = options.dependency) || void 0 === _73 ? void 0 : _73.links) && void 0 !== _74 ? _74 : [], gantt.parsedOptions.dependencyLinkCreatable = null !== (_76 = null === (_75 = options.dependency) || void 0 === _75 ? void 0 : _75.linkCreatable) && void 0 !== _76 && _76, gantt.parsedOptions.dependencyLinkSelectable = null === (_78 = null === (_77 = options.dependency) || void 0 === _77 ? void 0 : _77.linkSelectable) || void 0 === _78 || _78, gantt.parsedOptions.dependencyLinkDeletable = null !== (_80 = null === (_79 = options.dependency) || void 0 === _79 ? void 0 : _79.linkDeletable) && void 0 !== _80 && _80, gantt.parsedOptions.dependencyLinkLineStyle = Object.assign({
17662
+ }, null === (_62 = options.frame) || void 0 === _62 ? void 0 : _62.outerFrameStyle), gantt.parsedOptions.markLine = generateMarkLine(null == options ? void 0 : options.markLine), null !== (_64 = null === (_63 = gantt.parsedOptions.markLine) || void 0 === _63 ? void 0 : _63.length) && void 0 !== _64 && _64 && ((null === (_65 = gantt.parsedOptions.markLine) || void 0 === _65 ? void 0 : _65.every(item => void 0 === item.scrollToMarkLine)) && (gantt.parsedOptions.markLine[0].scrollToMarkLine = !0), (null === (_66 = gantt.parsedOptions.markLine) || void 0 === _66 ? void 0 : _66.find(item => item.scrollToMarkLine)) && (gantt.parsedOptions.scrollToMarkLineDate = getStartDateByTimeUnit(new Date(null === (_67 = gantt.parsedOptions.markLine) || void 0 === _67 ? void 0 : _67.find(item => item.scrollToMarkLine).date), minTimeUnit, startOfWeek))), gantt.parsedOptions.verticalSplitLineHighlight = null === (_68 = options.frame) || void 0 === _68 ? void 0 : _68.verticalSplitLineHighlight, gantt.parsedOptions.verticalSplitLine = Object.assign({
17663
+ lineColor: null === (_69 = gantt.parsedOptions.outerFrameStyle) || void 0 === _69 ? void 0 : _69.borderColor,
17664
+ lineWidth: null === (_70 = gantt.parsedOptions.outerFrameStyle) || void 0 === _70 ? void 0 : _70.borderLineWidth
17665
+ }, null === (_71 = options.frame) || void 0 === _71 ? void 0 : _71.verticalSplitLine), gantt.parsedOptions.horizontalSplitLine = null === (_72 = options.frame) || void 0 === _72 ? void 0 : _72.horizontalSplitLine, gantt.parsedOptions.verticalSplitLineMoveable = null === (_73 = options.frame) || void 0 === _73 ? void 0 : _73.verticalSplitLineMoveable, gantt.parsedOptions.taskKeyField = null !== (_74 = options.taskKeyField) && void 0 !== _74 ? _74 : "id", gantt.parsedOptions.dependencyLinks = null !== (_76 = null === (_75 = options.dependency) || void 0 === _75 ? void 0 : _75.links) && void 0 !== _76 ? _76 : [], gantt.parsedOptions.dependencyLinkCreatable = null !== (_78 = null === (_77 = options.dependency) || void 0 === _77 ? void 0 : _77.linkCreatable) && void 0 !== _78 && _78, gantt.parsedOptions.dependencyLinkSelectable = null === (_80 = null === (_79 = options.dependency) || void 0 === _79 ? void 0 : _79.linkSelectable) || void 0 === _80 || _80, gantt.parsedOptions.dependencyLinkDeletable = null !== (_82 = null === (_81 = options.dependency) || void 0 === _81 ? void 0 : _81.linkDeletable) && void 0 !== _82 && _82, gantt.parsedOptions.dependencyLinkLineStyle = Object.assign({
17665
17666
  lineColor: "red",
17666
17667
  lineWidth: 1
17667
- }, null === (_81 = options.dependency) || void 0 === _81 ? void 0 : _81.linkLineStyle), gantt.parsedOptions.dependencyLinkSelectedLineStyle = Object.assign({
17668
+ }, null === (_83 = options.dependency) || void 0 === _83 ? void 0 : _83.linkLineStyle), gantt.parsedOptions.dependencyLinkSelectedLineStyle = Object.assign({
17668
17669
  shadowBlur: 4,
17669
17670
  shadowOffset: 0,
17670
17671
  shadowColor: gantt.parsedOptions.dependencyLinkLineStyle.lineColor,
17671
17672
  lineColor: gantt.parsedOptions.dependencyLinkLineStyle.lineColor,
17672
17673
  lineWidth: gantt.parsedOptions.dependencyLinkLineStyle.lineWidth
17673
- }, null === (_82 = null == options ? void 0 : options.dependency) || void 0 === _82 ? void 0 : _82.linkSelectedLineStyle), gantt.parsedOptions.dependencyLinkLineCreatePointStyle = Object.assign({
17674
+ }, null === (_84 = null == options ? void 0 : options.dependency) || void 0 === _84 ? void 0 : _84.linkSelectedLineStyle), gantt.parsedOptions.dependencyLinkLineCreatePointStyle = Object.assign({
17674
17675
  strokeColor: "red",
17675
17676
  fillColor: "white",
17676
17677
  radius: 5,
17677
17678
  strokeWidth: 1
17678
- }, null === (_83 = null == options ? void 0 : options.dependency) || void 0 === _83 ? void 0 : _83.linkCreatePointStyle), gantt.parsedOptions.dependencyLinkLineCreatingPointStyle = Object.assign({
17679
+ }, null === (_85 = null == options ? void 0 : options.dependency) || void 0 === _85 ? void 0 : _85.linkCreatePointStyle), gantt.parsedOptions.dependencyLinkLineCreatingPointStyle = Object.assign({
17679
17680
  strokeColor: "red",
17680
17681
  fillColor: "red",
17681
17682
  radius: 5,
17682
17683
  strokeWidth: 1
17683
- }, null === (_84 = null == options ? void 0 : options.dependency) || void 0 === _84 ? void 0 : _84.linkCreatingPointStyle), gantt.parsedOptions.dependencyLinkLineCreatingStyle = Object.assign({
17684
+ }, null === (_86 = null == options ? void 0 : options.dependency) || void 0 === _86 ? void 0 : _86.linkCreatingPointStyle), gantt.parsedOptions.dependencyLinkLineCreatingStyle = Object.assign({
17684
17685
  lineColor: "red",
17685
17686
  lineWidth: 1,
17686
17687
  lineDash: [5, 5]
17687
- }, null === (_85 = null == options ? void 0 : options.dependency) || void 0 === _85 ? void 0 : _85.linkCreatingLineStyle), gantt.parsedOptions.eventOptions = null == options ? void 0 : options.eventOptions, gantt.parsedOptions.keyboardOptions = null == options ? void 0 : options.keyboardOptions, gantt.parsedOptions.markLineCreateOptions = null == options ? void 0 : options.markLineCreateOptions;
17688
+ }, null === (_87 = null == options ? void 0 : options.dependency) || void 0 === _87 ? void 0 : _87.linkCreatingLineStyle), gantt.parsedOptions.eventOptions = null == options ? void 0 : options.eventOptions, gantt.parsedOptions.keyboardOptions = null == options ? void 0 : options.keyboardOptions, gantt.parsedOptions.markLineCreateOptions = null == options ? void 0 : options.markLineCreateOptions;
17688
17689
  }
17689
17690
  function updateOptionsWhenScaleChanged(gantt) {
17690
17691
  var _a, _b, _c, _d;
@@ -18663,7 +18664,7 @@
18663
18664
  y: 0,
18664
18665
  width: 100,
18665
18666
  height: 100,
18666
- clip: !0,
18667
+ clip: !1,
18667
18668
  pickable: !1,
18668
18669
  cornerRadius: null !== (_b = null !== (_a = this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius) && void 0 !== _a ? _a : defaultTaskBarStyle.cornerRadius) && void 0 !== _b ? _b : 0,
18669
18670
  fill: this._scene._gantt.parsedOptions.taskBarHoverStyle.barOverlayColor,
@@ -18691,6 +18692,32 @@
18691
18692
  });
18692
18693
  rightIcon.name = "task-bar-hover-shadow-right-icon", this.hoverBarRightIcon = rightIcon, hoverBarGroup.appendChild(rightIcon);
18693
18694
  }
18695
+ const progressHandle = new Group({
18696
+ x: 0,
18697
+ y: 0,
18698
+ width: 12,
18699
+ height: 12,
18700
+ pickable: !0,
18701
+ cursor: "ew-resize",
18702
+ visible: !1
18703
+ }),
18704
+ triangleHandle = new Polygon({
18705
+ points: [{
18706
+ x: 6,
18707
+ y: 0
18708
+ }, {
18709
+ x: 0,
18710
+ y: 6
18711
+ }, {
18712
+ x: 12,
18713
+ y: 6
18714
+ }],
18715
+ fill: "#0064ff",
18716
+ stroke: "#ffffff",
18717
+ lineWidth: 1,
18718
+ pickable: !1
18719
+ });
18720
+ progressHandle.appendChild(triangleHandle), progressHandle.name = "task-bar-progress-handle", this.hoverBarProgressHandle = progressHandle, hoverBarGroup.appendChild(progressHandle);
18694
18721
  }
18695
18722
  setX(x) {
18696
18723
  this.barContainer.setAttribute("x", x);
@@ -18712,7 +18739,7 @@
18712
18739
  this.width = this._scene._gantt.tableNoFrameWidth, this.height = this._scene._gantt.gridHeight, this.group.setAttribute("width", this.width), this.group.setAttribute("height", this.height);
18713
18740
  }
18714
18741
  showHoverBar(x, y, width, height, target) {
18715
- var _a, _b, _c, _d;
18742
+ var _a, _b, _c, _d, _e;
18716
18743
  const {
18717
18744
  startDate: startDate,
18718
18745
  endDate: endDate,
@@ -18724,10 +18751,24 @@
18724
18751
  const cornerRadius = null !== (_b = null !== (_a = this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius) && void 0 !== _a ? _a : taskBarStyle.cornerRadius) && void 0 !== _b ? _b : 0;
18725
18752
  this.hoverBarGroup.setAttribute("cornerRadius", cornerRadius);
18726
18753
  }
18727
- null === (_c = this.hoverBarLeftIcon) || void 0 === _c || _c.setAttribute("visible", !1), null === (_d = this.hoverBarRightIcon) || void 0 === _d || _d.setAttribute("visible", !1);
18754
+ null === (_c = this.hoverBarLeftIcon) || void 0 === _c || _c.setAttribute("visible", !1), null === (_d = this.hoverBarRightIcon) || void 0 === _d || _d.setAttribute("visible", !1), null === (_e = this.hoverBarProgressHandle) || void 0 === _e || _e.setAttribute("visibleAll", !1);
18728
18755
  let leftResizable = !0,
18729
- rightResizable = !0;
18730
- if (taskRecord.type === TaskType.MILESTONE) leftResizable = !1, rightResizable = !1;else if ("function" == typeof this._scene._gantt.parsedOptions.taskBarResizable) {
18756
+ rightResizable = !0,
18757
+ progressAdjustable = !0;
18758
+ const progressField = this._scene._gantt.parsedOptions.progressField;
18759
+ if (progressField && void 0 !== taskRecord[progressField] && null !== taskRecord[progressField]) {
18760
+ if ("function" == typeof this._scene._gantt.parsedOptions.taskBarProgressAdjustable) {
18761
+ const arg = {
18762
+ index: target.task_index,
18763
+ startDate: startDate,
18764
+ endDate: endDate,
18765
+ taskRecord: taskRecord,
18766
+ ganttInstance: this._scene._gantt
18767
+ };
18768
+ progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable(arg);
18769
+ } else progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable;
18770
+ } else progressAdjustable = !1;
18771
+ if (taskRecord.type === TaskType.MILESTONE) leftResizable = !1, rightResizable = !1, progressAdjustable = !1;else if ("function" == typeof this._scene._gantt.parsedOptions.taskBarResizable) {
18731
18772
  const arg = {
18732
18773
  index: target.task_index,
18733
18774
  startDate: startDate,
@@ -18738,7 +18779,13 @@
18738
18779
  resizableResult = this._scene._gantt.parsedOptions.taskBarResizable(arg);
18739
18780
  Array.isArray(resizableResult) ? [leftResizable, rightResizable] = resizableResult : (leftResizable = resizableResult, rightResizable = resizableResult);
18740
18781
  } else Array.isArray(this._scene._gantt.parsedOptions.taskBarResizable) ? [leftResizable, rightResizable] = this._scene._gantt.parsedOptions.taskBarResizable : (leftResizable = this._scene._gantt.parsedOptions.taskBarResizable, rightResizable = this._scene._gantt.parsedOptions.taskBarResizable);
18741
- leftResizable && this.hoverBarLeftIcon.setAttribute("visible", !0), rightResizable && this.hoverBarRightIcon.setAttribute("visible", !0), this.hoverBarLeftIcon && (this.hoverBarLeftIcon.setAttribute("x", 0), this.hoverBarLeftIcon.setAttribute("y", Math.ceil(height / 10)), this.hoverBarLeftIcon.setAttribute("width", 10), this.hoverBarLeftIcon.setAttribute("height", height - 2 * Math.ceil(height / 10)), this.hoverBarRightIcon.setAttribute("x", width - 10), this.hoverBarRightIcon.setAttribute("y", Math.ceil(height / 10)), this.hoverBarRightIcon.setAttribute("width", 10), this.hoverBarRightIcon.setAttribute("height", height - 2 * Math.ceil(height / 10)));
18782
+ if (leftResizable && this.hoverBarLeftIcon.setAttribute("visible", !0), rightResizable && this.hoverBarRightIcon.setAttribute("visible", !0), progressAdjustable && this.hoverBarProgressHandle.setAttribute("visibleAll", !0), this.hoverBarLeftIcon && (this.hoverBarLeftIcon.setAttribute("x", 0), this.hoverBarLeftIcon.setAttribute("y", Math.ceil(height / 10)), this.hoverBarLeftIcon.setAttribute("width", 10), this.hoverBarLeftIcon.setAttribute("height", height - 2 * Math.ceil(height / 10)), this.hoverBarRightIcon.setAttribute("x", width - 10), this.hoverBarRightIcon.setAttribute("y", Math.ceil(height / 10)), this.hoverBarRightIcon.setAttribute("width", 10), this.hoverBarRightIcon.setAttribute("height", height - 2 * Math.ceil(height / 10))), this.hoverBarProgressHandle) {
18783
+ const {
18784
+ progress: progress
18785
+ } = this._scene._gantt.getTaskInfoByTaskListIndex(target.task_index, target.sub_task_index),
18786
+ progressX = width * progress / 100 - 6;
18787
+ this.hoverBarProgressHandle.setAttribute("x", progressX), this.hoverBarProgressHandle.setAttribute("y", height - 3);
18788
+ }
18742
18789
  }
18743
18790
  hideHoverBar() {
18744
18791
  this.hoverBarGroup.setAttribute("visibleAll", !1);
@@ -20301,7 +20348,7 @@
20301
20348
  let downBarNode, downLeftLinkPointNode, downRightLinkPointNode;
20302
20349
  if (e.detailPath.find(pathNode => "task-bar" === pathNode.name ? (downBarNode = pathNode, !0) : "task-creation-button" === pathNode.name ? (!0) : "task-bar-link-point-left" === pathNode.name ? (downLeftLinkPointNode = pathNode, !0) : "task-bar-link-point-right" === pathNode.name ? (downRightLinkPointNode = pathNode, !0) : !!pathNode.attribute.vtable_link && (pathNode.attribute.vtable_link, !0)), downBarNode) {
20303
20350
  const taskRecord = downBarNode.record;
20304
- if (!((null == taskRecord ? void 0 : taskRecord.type) === TaskType.PROJECT)) if ("task-bar-hover-shadow-left-icon" === e.target.name) stateManager.startResizeTaskBar(downBarNode, e.nativeEvent.x, e.nativeEvent.y, e.offset.y, "left"), stateManager.updateInteractionState(InteractionState.grabing);else if ("task-bar-hover-shadow-right-icon" === e.target.name) stateManager.startResizeTaskBar(downBarNode, e.nativeEvent.x, e.nativeEvent.y, e.offset.y, "right"), stateManager.updateInteractionState(InteractionState.grabing);else if (gantt.parsedOptions.taskBarMoveable) {
20351
+ if (!((null == taskRecord ? void 0 : taskRecord.type) === TaskType.PROJECT)) if ("task-bar-hover-shadow-left-icon" === e.target.name) stateManager.startResizeTaskBar(downBarNode, e.nativeEvent.x, e.nativeEvent.y, e.offset.y, "left"), stateManager.updateInteractionState(InteractionState.grabing);else if ("task-bar-hover-shadow-right-icon" === e.target.name) stateManager.startResizeTaskBar(downBarNode, e.nativeEvent.x, e.nativeEvent.y, e.offset.y, "right"), stateManager.updateInteractionState(InteractionState.grabing);else if ("task-bar-progress-handle" === e.target.name) stateManager.startAdjustProgressBar(downBarNode, e.nativeEvent.x, e.nativeEvent.y), stateManager.updateInteractionState(InteractionState.grabing);else if (gantt.parsedOptions.taskBarMoveable) {
20305
20352
  const moveTaskBar = () => {
20306
20353
  let moveable = !0;
20307
20354
  if ("function" == typeof gantt.parsedOptions.taskBarMoveable) {
@@ -20586,7 +20633,7 @@
20586
20633
  if (stateManager.interactionState === InteractionState.grabing && "draging" === gantt.eventManager.poniterState) {
20587
20634
  const lastX = null !== (_d = null === (_c = gantt.eventManager.lastDragPointerXYOnWindow) || void 0 === _c ? void 0 : _c.x) && void 0 !== _d ? _d : e.x,
20588
20635
  lastY = null !== (_f = null === (_e = gantt.eventManager.lastDragPointerXYOnWindow) || void 0 === _e ? void 0 : _e.y) && void 0 !== _f ? _f : e.y;
20589
- (Math.abs(lastX - e.x) >= 1 || Math.abs(lastY - e.y) >= 1) && (stateManager.isResizingTableWidth() ? (stateManager.hideDependencyLinkSelectedLine(), stateManager.hideTaskBarSelectedBorder(), stateManager.dealResizeTableWidth(e)) : stateManager.isMoveingTaskBar() ? (stateManager.hideDependencyLinkSelectedLine(), stateManager.hideTaskBarSelectedBorder(), stateManager.dealTaskBarMove(e)) : stateManager.isResizingTaskBar() ? (stateManager.hideDependencyLinkSelectedLine(), stateManager.hideTaskBarSelectedBorder(), stateManager.dealTaskBarResize(e)) : stateManager.isCreatingDependencyLine() && stateManager.dealCreateDependencyLine(e), gantt.eventManager.lastDragPointerXYOnWindow = {
20636
+ (Math.abs(lastX - e.x) >= 1 || Math.abs(lastY - e.y) >= 1) && (stateManager.isResizingTableWidth() ? (stateManager.hideDependencyLinkSelectedLine(), stateManager.hideTaskBarSelectedBorder(), stateManager.dealResizeTableWidth(e)) : stateManager.isMoveingTaskBar() ? (stateManager.hideDependencyLinkSelectedLine(), stateManager.hideTaskBarSelectedBorder(), stateManager.dealTaskBarMove(e)) : stateManager.isResizingTaskBar() ? (stateManager.hideDependencyLinkSelectedLine(), stateManager.hideTaskBarSelectedBorder(), stateManager.dealTaskBarResize(e)) : stateManager.isAdjustingProgressBar() ? stateManager.dealAdjustProgressBar(e) : stateManager.isCreatingDependencyLine() && stateManager.dealCreateDependencyLine(e), gantt.eventManager.lastDragPointerXYOnWindow = {
20590
20637
  x: e.x,
20591
20638
  y: e.y
20592
20639
  });
@@ -20598,7 +20645,7 @@
20598
20645
  callback: globalPointermoveCallback
20599
20646
  }), vglobal.addEventListener("pointermove", globalPointermoveCallback);
20600
20647
  const globalPointerupCallback = e => {
20601
- "grabing" === stateManager.interactionState && (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizingTableWidth() ? stateManager.endResizeTableWidth() : stateManager.isMoveingTaskBar() ? stateManager.endMoveTaskBar() : stateManager.isResizingTaskBar() && stateManager.endResizeTaskBar(e.x)), setTimeout(() => {
20648
+ "grabing" === stateManager.interactionState && (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizingTableWidth() ? stateManager.endResizeTableWidth() : stateManager.isMoveingTaskBar() ? stateManager.endMoveTaskBar() : stateManager.isResizingTaskBar() ? stateManager.endResizeTaskBar(e.x) : stateManager.isAdjustingProgressBar() && stateManager.endAdjustProgressBar(e.x)), setTimeout(() => {
20602
20649
  gantt.eventManager.lastDragPointerXYOnWindow = void 0, gantt.eventManager.poniterState = "up";
20603
20650
  }, 0);
20604
20651
  };
@@ -20771,6 +20818,12 @@
20771
20818
  target: null,
20772
20819
  resizing: !1,
20773
20820
  onIconName: ""
20821
+ }, this.adjustProgressBar = {
20822
+ startX: null,
20823
+ startY: null,
20824
+ target: null,
20825
+ adjusting: !1,
20826
+ originalProgress: 0
20774
20827
  }, this.resizeTableWidth = {
20775
20828
  lastX: null,
20776
20829
  resizing: !1
@@ -21042,6 +21095,51 @@
21042
21095
  const taskBarSize = Math.max(1, taskBarGroup.attribute.width + diffWidth);
21043
21096
  diffWidth = taskBarSize - taskBarGroup.attribute.width, resizeTaskBar(taskBarGroup, "left" === this._gantt.stateManager.resizeTaskBar.onIconName ? -diffWidth : 0, taskBarSize, this), this._gantt.scenegraph.updateNextFrame();
21044
21097
  }
21098
+ startAdjustProgressBar(target, x, y) {
21099
+ const {
21100
+ progress: progress
21101
+ } = this._gantt.getTaskInfoByTaskListIndex(target.task_index, target.sub_task_index);
21102
+ this.adjustProgressBar.target = target, this.adjustProgressBar.adjusting = !0, this.adjustProgressBar.startX = x, this.adjustProgressBar.startY = y, this.adjustProgressBar.originalProgress = progress;
21103
+ }
21104
+ isAdjustingProgressBar() {
21105
+ return this.adjustProgressBar.adjusting;
21106
+ }
21107
+ endAdjustProgressBar(x) {
21108
+ const target = this.adjustProgressBar.target,
21109
+ taskBarWidth = target.attribute.width,
21110
+ deltaX = x - this.adjustProgressBar.startX,
21111
+ newProgress = Math.max(0, Math.min(100, this.adjustProgressBar.originalProgress + deltaX / taskBarWidth * 100));
21112
+ if (Math.abs(newProgress - this.adjustProgressBar.originalProgress) >= 1) {
21113
+ const taskIndex = target.task_index,
21114
+ subTaskIndex = target.sub_task_index;
21115
+ this._gantt._updateProgressToTaskRecord(Math.round(newProgress), taskIndex, subTaskIndex);
21116
+ const newRecord = this._gantt.getRecordByIndex(taskIndex, subTaskIndex);
21117
+ this._gantt.hasListeners(GANTT_EVENT_TYPE.PROGRESS_UPDATE) && this._gantt.fireListeners(GANTT_EVENT_TYPE.PROGRESS_UPDATE, {
21118
+ federatedEvent: null,
21119
+ event: null,
21120
+ index: taskIndex,
21121
+ sub_task_index: subTaskIndex,
21122
+ progress: Math.round(newProgress),
21123
+ oldProgress: Math.round(this.adjustProgressBar.originalProgress),
21124
+ record: newRecord
21125
+ });
21126
+ }
21127
+ this.adjustProgressBar.adjusting = !1, this.adjustProgressBar.target = null, this.adjustProgressBar.startX = null, this.adjustProgressBar.startY = null, this.adjustProgressBar.originalProgress = 0;
21128
+ }
21129
+ dealAdjustProgressBar(e) {
21130
+ const target = this.adjustProgressBar.target,
21131
+ taskBarWidth = target.attribute.width,
21132
+ deltaX = e.x - this.adjustProgressBar.startX,
21133
+ newProgress = Math.max(0, Math.min(100, this.adjustProgressBar.originalProgress + deltaX / taskBarWidth * 100));
21134
+ if (target.progressRect && target.progressRect.setAttribute("width", taskBarWidth * newProgress / 100), this._gantt.scenegraph.taskBar.hoverBarProgressHandle && this._gantt.scenegraph.taskBar.hoverBarProgressHandle.attribute.visibleAll && this._gantt.scenegraph.taskBar.hoverBarProgressHandle.setAttribute("x", taskBarWidth * newProgress / 100 - 6), target.textLabel && target.record) {
21135
+ const tempRecord = Object.assign(Object.assign({}, target.record), {
21136
+ progress: Math.round(newProgress)
21137
+ }),
21138
+ newText = parseStringTemplate(this._gantt.parsedOptions.taskBarLabelText, tempRecord);
21139
+ target.textLabel.setAttribute("text", newText);
21140
+ }
21141
+ this._gantt.scenegraph && this._gantt.scenegraph.stage && this._gantt.scenegraph.stage.renderNextFrame();
21142
+ }
21045
21143
  startCreateDependencyLine(target, x, y, startOffsetY, position) {
21046
21144
  this.resizeTaskBar.resizing = !1, this.creatingDenpendencyLink.creating = !0, this.creatingDenpendencyLink.startClickedPoint = target, this.creatingDenpendencyLink.startX = x, this.creatingDenpendencyLink.startY = y, this.creatingDenpendencyLink.startOffsetY = startOffsetY, this.creatingDenpendencyLink.firstTaskBarPosition = position, this.highlightLinkPointNode(target);
21047
21145
  }
@@ -21783,6 +21881,15 @@
21783
21881
  this._updateRecordToListTable(taskRecord, indexs), Array.isArray(indexs) && this.stateManager.updateProjectTaskTimes(indexs);
21784
21882
  }
21785
21883
  }
21884
+ _updateProgressToTaskRecord(progress, index, sub_task_index) {
21885
+ const taskRecord = this.getRecordByIndex(index, sub_task_index),
21886
+ progressField = this.parsedOptions.progressField;
21887
+ if (progressField) {
21888
+ taskRecord[progressField] = progress;
21889
+ const indexs = this.getRecordIndexByTaskShowIndex(index);
21890
+ this._updateRecordToListTable(taskRecord, indexs), this._refreshTaskBar(index, sub_task_index);
21891
+ }
21892
+ }
21786
21893
  _dragOrderTaskRecord(source_index, source_sub_task_index, target_index, target_sub_task_index) {
21787
21894
  this.data.adjustOrder(source_index, source_sub_task_index, target_index, target_sub_task_index);
21788
21895
  }