Index: arms/html/pdService =================================================================== diff -u -r0c91a1c753ab4064b41a6669091e3be9fc2b94f3 -r0fc9cdf566a919f98a017a6d6dc654e27ee576e2 --- arms/html/pdService (.../pdService) (revision 0c91a1c753ab4064b41a6669091e3be9fc2b94f3) +++ arms/html/pdService (.../pdService) (revision 0fc9cdf566a919f98a017a6d6dc654e27ee576e2) @@ -234,10 +234,10 @@ media="screen" /> + rel="stylesheet" + type="text/css" + href="../arms/css/style.css" + media="screen" /> Index: reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.js =================================================================== diff -u -r86c7f799884e640e23af17250c07265a21af1c33 -r0fc9cdf566a919f98a017a6d6dc654e27ee576e2 --- reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.js (.../frappe-gantt.js) (revision 86c7f799884e640e23af17250c07265a21af1c33) +++ reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.js (.../frappe-gantt.js) (revision 0fc9cdf566a919f98a017a6d6dc654e27ee576e2) @@ -604,18 +604,18 @@ update_bar_position({ x = null, width = null }) { const bar = this.$bar; if (x) { - // get all x values of parent task - const xs = this.task.dependencies.map((dep) => { - return this.gantt.get_bar(dep).$bar.getX(); - }); - // child task must not go before parent - const valid_x = xs.reduce((prev, curr) => { - return x >= curr; - }, x); - if (!valid_x) { - width = null; - return; - } + // // get all x values of parent task + // const xs = this.task.dependencies.map((dep) => { + // return this.gantt.get_bar(dep).$bar.getX(); + // }); + // // child task must not go before parent + // const valid_x = xs.reduce((prev, curr) => { + // return x >= curr; + // }, x); + // if (!valid_x) { + // width = null; + // return; + // } this.update_attr(bar, 'x', x); } if (width && width >= this.gantt.options.column_width) { Index: reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.js.map =================================================================== diff -u -r86c7f799884e640e23af17250c07265a21af1c33 -r0fc9cdf566a919f98a017a6d6dc654e27ee576e2 --- reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.js.map (.../frappe-gantt.js.map) (revision 86c7f799884e640e23af17250c07265a21af1c33) +++ reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.js.map (.../frappe-gantt.js.map) (revision 0fc9cdf566a919f98a017a6d6dc654e27ee576e2) @@ -1 +1 @@ -{"version":3,"file":"frappe-gantt.js","sources":["../src/date_utils.js","../src/svg_utils.js","../src/bar.js","../src/arrow.js","../src/popup.js","../src/table.js","../src/split.js","../src/index.js"],"sourcesContent":["const YEAR = 'year';\r\nconst MONTH = 'month';\r\nconst DAY = 'day';\r\nconst HOUR = 'hour';\r\nconst MINUTE = 'minute';\r\nconst SECOND = 'second';\r\nconst MILLISECOND = 'millisecond';\r\n\r\nexport default {\r\n parse(date, date_separator = '-', time_separator = /[.:]/) {\r\n if (date instanceof Date) {\r\n return date;\r\n }\r\n if (typeof date === 'string') {\r\n let date_parts, time_parts;\r\n const parts = date.split(' ');\r\n\r\n date_parts = parts[0]\r\n .split(date_separator)\r\n .map((val) => parseInt(val, 10));\r\n time_parts = parts[1] && parts[1].split(time_separator);\r\n\r\n // month is 0 indexed\r\n date_parts[1] = date_parts[1] - 1;\r\n\r\n let vals = date_parts;\r\n\r\n if (time_parts && time_parts.length) {\r\n if (time_parts.length == 4) {\r\n time_parts[3] = '0.' + time_parts[3];\r\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\r\n }\r\n vals = vals.concat(time_parts);\r\n }\r\n\r\n return new Date(...vals);\r\n }\r\n },\r\n\r\n to_string(date, with_time = false) {\r\n if (!(date instanceof Date)) {\r\n throw new TypeError('Invalid argument type');\r\n }\r\n const vals = this.get_date_values(date).map((val, i) => {\r\n if (i === 1) {\r\n // add 1 for month\r\n val = val + 1;\r\n }\r\n\r\n if (i === 6) {\r\n return padStart(val + '', 3, '0');\r\n }\r\n\r\n return padStart(val + '', 2, '0');\r\n });\r\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\r\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\r\n\r\n return date_string + (with_time ? ' ' + time_string : '');\r\n },\r\n\r\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'ko') {\r\n const dateTimeFormat = new Intl.DateTimeFormat(lang, {\r\n month: 'long'\r\n });\r\n const month_name = dateTimeFormat.format(date);\r\n const month_name_capitalized =\r\n month_name.charAt(0).toUpperCase() + month_name.slice(1);\r\n\r\n const values = this.get_date_values(date).map(d => padStart(d, 2, 0));\r\n const format_map = {\r\n YYYY: values[0],\r\n MM: padStart(+values[1] + 1, 2, 0),\r\n DD: values[2],\r\n HH: values[3],\r\n mm: values[4],\r\n ss: values[5],\r\n SSS: values[6],\r\n D: values[2],\r\n MMMM: month_name_capitalized,\r\n MMM: month_name_capitalized,\r\n };\r\n\r\n let str = format_string;\r\n const formatted_values = [];\r\n\r\n Object.keys(format_map)\r\n .sort((a, b) => b.length - a.length) // big string first\r\n .forEach((key) => {\r\n if (str.includes(key)) {\r\n str = str.replace(key, `$${formatted_values.length}`);\r\n formatted_values.push(format_map[key]);\r\n }\r\n });\r\n\r\n formatted_values.forEach((value, i) => {\r\n str = str.replace(`$${i}`, value);\r\n });\r\n\r\n return str;\r\n },\r\n\r\n diff(date_a, date_b, scale = DAY) {\r\n let milliseconds, seconds, hours, minutes, days, months, years;\r\n\r\n milliseconds = date_a - date_b;\r\n seconds = milliseconds / 1000;\r\n minutes = seconds / 60;\r\n hours = minutes / 60;\r\n days = hours / 24;\r\n months = days / 30;\r\n years = months / 12;\r\n\r\n if (!scale.endsWith('s')) {\r\n scale += 's';\r\n }\r\n\r\n return Math.floor(\r\n {\r\n milliseconds,\r\n seconds,\r\n minutes,\r\n hours,\r\n days,\r\n months,\r\n years,\r\n }[scale]\r\n );\r\n },\r\n\r\n today() {\r\n const vals = this.get_date_values(new Date()).slice(0, 3);\r\n return new Date(...vals);\r\n },\r\n\r\n now() {\r\n return new Date();\r\n },\r\n\r\n add(date, qty, scale) {\r\n qty = parseInt(qty, 10);\r\n const vals = [\r\n date.getFullYear() + (scale === YEAR ? qty : 0),\r\n date.getMonth() + (scale === MONTH ? qty : 0),\r\n date.getDate() + (scale === DAY ? qty : 0),\r\n date.getHours() + (scale === HOUR ? qty : 0),\r\n date.getMinutes() + (scale === MINUTE ? qty : 0),\r\n date.getSeconds() + (scale === SECOND ? qty : 0),\r\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\r\n ];\r\n return new Date(...vals);\r\n },\r\n\r\n start_of(date, scale) {\r\n const scores = {\r\n [YEAR]: 6,\r\n [MONTH]: 5,\r\n [DAY]: 4,\r\n [HOUR]: 3,\r\n [MINUTE]: 2,\r\n [SECOND]: 1,\r\n [MILLISECOND]: 0,\r\n };\r\n\r\n function should_reset(_scale) {\r\n const max_score = scores[scale];\r\n return scores[_scale] <= max_score;\r\n }\r\n\r\n const vals = [\r\n date.getFullYear(),\r\n should_reset(YEAR) ? 0 : date.getMonth(),\r\n should_reset(MONTH) ? 1 : date.getDate(),\r\n should_reset(DAY) ? 0 : date.getHours(),\r\n should_reset(HOUR) ? 0 : date.getMinutes(),\r\n should_reset(MINUTE) ? 0 : date.getSeconds(),\r\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\r\n ];\r\n\r\n return new Date(...vals);\r\n },\r\n\r\n clone(date) {\r\n return new Date(...this.get_date_values(date));\r\n },\r\n\r\n get_date_values(date) {\r\n return [\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds(),\r\n ];\r\n },\r\n\r\n get_days_in_month(date) {\r\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n const month = date.getMonth();\r\n\r\n if (month !== 1) {\r\n return no_of_days[month];\r\n }\r\n\r\n // Feb\r\n const year = date.getFullYear();\r\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\r\n return 29;\r\n }\r\n return 28;\r\n },\r\n};\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\r\nfunction padStart(str, targetLength, padString) {\r\n str = str + '';\r\n targetLength = targetLength >> 0;\r\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\r\n if (str.length > targetLength) {\r\n return String(str);\r\n } else {\r\n targetLength = targetLength - str.length;\r\n if (targetLength > padString.length) {\r\n padString += padString.repeat(targetLength / padString.length);\r\n }\r\n return padString.slice(0, targetLength) + String(str);\r\n }\r\n}\r\n","export function $(expr, con) {\r\n return typeof expr === 'string'\r\n ? (con || document).querySelector(expr)\r\n : expr || null;\r\n}\r\n\r\nexport function createSVG(tag, attrs) {\r\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\r\n for (let attr in attrs) {\r\n if (attr === 'append_to') {\r\n const parent = attrs.append_to;\r\n parent.appendChild(elem);\r\n } else if (attr === 'innerHTML') {\r\n elem.innerHTML = attrs.innerHTML;\r\n } else {\r\n elem.setAttribute(attr, attrs[attr]);\r\n }\r\n }\r\n return elem;\r\n}\r\n\r\nexport function animateSVG(svgElement, attr, from, to) {\r\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\r\n\r\n if (animatedSvgElement === svgElement) {\r\n // triggered 2nd time programmatically\r\n // trigger artificial click event\r\n const event = document.createEvent('HTMLEvents');\r\n event.initEvent('click', true, true);\r\n event.eventName = 'click';\r\n animatedSvgElement.dispatchEvent(event);\r\n }\r\n}\r\n\r\nfunction getAnimationElement(\r\n svgElement,\r\n attr,\r\n from,\r\n to,\r\n dur = '0.4s',\r\n begin = '0.1s'\r\n) {\r\n const animEl = svgElement.querySelector('animate');\r\n if (animEl) {\r\n $.attr(animEl, {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin: 'click + ' + begin, // artificial click\r\n });\r\n return svgElement;\r\n }\r\n\r\n const animateElement = createSVG('animate', {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin,\r\n calcMode: 'spline',\r\n values: from + ';' + to,\r\n keyTimes: '0; 1',\r\n keySplines: cubic_bezier('ease-out'),\r\n });\r\n svgElement.appendChild(animateElement);\r\n\r\n return svgElement;\r\n}\r\n\r\nfunction cubic_bezier(name) {\r\n return {\r\n ease: '.25 .1 .25 1',\r\n linear: '0 0 1 1',\r\n 'ease-in': '.42 0 1 1',\r\n 'ease-out': '0 0 .58 1',\r\n 'ease-in-out': '.42 0 .58 1',\r\n }[name];\r\n}\r\n\r\n$.on = (element, event, selector, callback) => {\r\n if (!callback) {\r\n callback = selector;\r\n $.bind(element, event, callback);\r\n } else {\r\n $.delegate(element, event, selector, callback);\r\n }\r\n};\r\n\r\n$.off = (element, event, handler) => {\r\n element.removeEventListener(event, handler);\r\n};\r\n\r\n$.bind = (element, event, callback) => {\r\n event.split(/\\s+/).forEach(function (event) {\r\n element.addEventListener(event, callback);\r\n });\r\n};\r\n\r\n$.delegate = (element, event, selector, callback) => {\r\n element.addEventListener(event, function (e) {\r\n const delegatedTarget = e.target.closest(selector);\r\n if (delegatedTarget) {\r\n e.delegatedTarget = delegatedTarget;\r\n callback.call(this, e, delegatedTarget);\r\n }\r\n });\r\n};\r\n\r\n$.closest = (selector, element) => {\r\n if (!element) return null;\r\n\r\n if (element.matches(selector)) {\r\n return element;\r\n }\r\n\r\n return $.closest(selector, element.parentNode);\r\n};\r\n\r\n$.attr = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.attr(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.setAttribute(attr, value);\r\n};\r\n\r\n$.style = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.style(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.style[attr] = value;\r\n};\r\n","import date_utils from './date_utils';\r\nimport { $, createSVG, animateSVG } from './svg_utils';\r\n\r\nexport default class Bar {\r\n constructor(gantt, task) {\r\n this.set_defaults(gantt, task);\r\n this.prepare();\r\n this.draw();\r\n this.bind();\r\n }\r\n\r\n set_defaults(gantt, task) {\r\n this.action_completed = false;\r\n this.gantt = gantt;\r\n this.task = task;\r\n }\r\n\r\n prepare() {\r\n this.prepare_values();\r\n this.prepare_helpers();\r\n }\r\n\r\n prepare_values() {\r\n this.invalid = this.task.invalid;\r\n this.height = this.gantt.options.bar_height;\r\n this.x = this.compute_x();\r\n this.y = this.compute_y();\r\n this.corner_radius = this.gantt.options.bar_corner_radius;\r\n this.duration =\r\n date_utils.diff(this.task._end, this.task._start, 'hour') /\r\n this.gantt.options.step;\r\n this.width = this.gantt.options.column_width * this.duration;\r\n this.progress_width =\r\n this.gantt.options.column_width *\r\n this.duration *\r\n (this.task.progress / 100) || 0;\r\n this.group = createSVG('g', {\r\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\r\n 'data-id': this.task.id,\r\n });\r\n this.bar_group = createSVG('g', {\r\n class: 'bar-group',\r\n append_to: this.group,\r\n });\r\n this.handle_group = createSVG('g', {\r\n class: 'handle-group',\r\n append_to: this.group,\r\n });\r\n }\r\n\r\n prepare_helpers() {\r\n SVGElement.prototype.getX = function () {\r\n return +this.getAttribute('x');\r\n };\r\n SVGElement.prototype.getY = function () {\r\n return +this.getAttribute('y');\r\n };\r\n SVGElement.prototype.getWidth = function () {\r\n return +this.getAttribute('width');\r\n };\r\n SVGElement.prototype.getHeight = function () {\r\n return +this.getAttribute('height');\r\n };\r\n SVGElement.prototype.getEndX = function () {\r\n return this.getX() + this.getWidth();\r\n };\r\n }\r\n\r\n draw() {\r\n this.draw_bar();\r\n this.draw_progress_bar();\r\n this.draw_label();\r\n this.draw_resize_handles();\r\n }\r\n\r\n draw_bar() {\r\n this.$bar = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar, 'width', 0, this.width);\r\n\r\n if (this.invalid) {\r\n this.$bar.classList.add('bar-invalid');\r\n }\r\n }\r\n\r\n draw_progress_bar() {\r\n if (this.invalid) return;\r\n this.$bar_progress = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.progress_width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar-progress',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\r\n }\r\n\r\n draw_label() {\r\n createSVG('text', {\r\n x: this.x + this.width / 2,\r\n y: this.y + this.height / 2,\r\n innerHTML: this.task.name,\r\n class: 'bar-label',\r\n append_to: this.bar_group,\r\n });\r\n // labels get BBox in the next tick\r\n requestAnimationFrame(() => this.update_label_position());\r\n }\r\n\r\n draw_resize_handles() {\r\n if (this.invalid) return;\r\n\r\n const bar = this.$bar;\r\n const handle_width = 8;\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + bar.getWidth() - 9,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle right',\r\n append_to: this.handle_group,\r\n });\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + 1,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle left',\r\n append_to: this.handle_group,\r\n });\r\n\r\n if (this.task.progress && this.task.progress < 100) {\r\n this.$handle_progress = createSVG('polygon', {\r\n points: this.get_progress_polygon_points().join(','),\r\n class: 'handle progress',\r\n append_to: this.handle_group,\r\n });\r\n }\r\n }\r\n\r\n get_progress_polygon_points() {\r\n const bar_progress = this.$bar_progress;\r\n return [\r\n bar_progress.getEndX() - 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX() + 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX(),\r\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\r\n ];\r\n }\r\n\r\n bind() {\r\n if (this.invalid) return;\r\n this.setup_click_event();\r\n }\r\n\r\n setup_click_event() {\r\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.show_popup();\r\n this.gantt.unselect_all();\r\n this.group.classList.add('active');\r\n });\r\n\r\n $.on(this.group, 'dblclick', (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.gantt.trigger_event('click', [this.task]);\r\n });\r\n }\r\n\r\n show_popup() {\r\n if (this.gantt.bar_being_dragged) return;\r\n\r\n const start_date = date_utils.format(\r\n this.task._start,\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const end_date = date_utils.format(\r\n date_utils.add(this.task._end, -1, 'second'),\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const subtitle = start_date + ' - ' + end_date;\r\n\r\n this.gantt.show_popup({\r\n target_element: this.$bar,\r\n title: this.task.name,\r\n subtitle: subtitle,\r\n task: this.task,\r\n });\r\n this.gantt.handle_selected(this.task);\r\n }\r\n\r\n update_bar_position({ x = null, width = null }) {\r\n const bar = this.$bar;\r\n if (x) {\r\n // get all x values of parent task\r\n const xs = this.task.dependencies.map((dep) => {\r\n return this.gantt.get_bar(dep).$bar.getX();\r\n });\r\n // child task must not go before parent\r\n const valid_x = xs.reduce((prev, curr) => {\r\n return x >= curr;\r\n }, x);\r\n if (!valid_x) {\r\n width = null;\r\n return;\r\n }\r\n this.update_attr(bar, 'x', x);\r\n }\r\n if (width && width >= this.gantt.options.column_width) {\r\n this.update_attr(bar, 'width', width);\r\n }\r\n this.update_label_position();\r\n this.update_handle_position();\r\n this.update_progressbar_position();\r\n this.update_arrow_position();\r\n }\r\n\r\n date_changed() {\r\n let changed = false;\r\n const { new_start_date, new_end_date } = this.compute_start_end_date();\r\n\r\n if (Number(this.task._start) !== Number(new_start_date)) {\r\n changed = true;\r\n this.task._start = new_start_date;\r\n }\r\n\r\n if (Number(this.task._end) !== Number(new_end_date)) {\r\n changed = true;\r\n this.task._end = new_end_date;\r\n }\r\n\r\n if (!changed) return;\r\n\r\n this.gantt.trigger_event('date_change', [\r\n this.task,\r\n new_start_date,\r\n date_utils.add(new_end_date, -1, 'second'),\r\n ]);\r\n }\r\n\r\n progress_changed() {\r\n const new_progress = this.compute_progress();\r\n this.task.progress = new_progress;\r\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\r\n }\r\n\r\n set_action_completed() {\r\n this.action_completed = true;\r\n setTimeout(() => (this.action_completed = false), 1000);\r\n }\r\n\r\n compute_start_end_date() {\r\n const bar = this.$bar;\r\n const x_in_units = bar.getX() / this.gantt.options.column_width;\r\n const new_start_date = date_utils.add(\r\n this.gantt.gantt_start,\r\n x_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\r\n const new_end_date = date_utils.add(\r\n new_start_date,\r\n width_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n\r\n return { new_start_date, new_end_date };\r\n }\r\n\r\n compute_progress() {\r\n const progress =\r\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\r\n return parseInt(progress, 10);\r\n }\r\n\r\n compute_x() {\r\n const { step, column_width } = this.gantt.options;\r\n const task_start = this.task._start;\r\n const gantt_start = this.gantt.gantt_start;\r\n\r\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\r\n let x = (diff / step) * column_width;\r\n\r\n if (this.gantt.view_is('Month')) {\r\n const diff = date_utils.diff(task_start, gantt_start, 'day');\r\n x = (diff * column_width) / 30;\r\n }\r\n return x;\r\n }\r\n\r\n compute_y() {\r\n return (\r\n this.gantt.options.header_height +\r\n this.gantt.options.padding +\r\n this.task._index * (this.height + this.gantt.options.padding)\r\n );\r\n }\r\n\r\n get_snap_position(dx) {\r\n let odx = dx,\r\n rem,\r\n position;\r\n\r\n if (this.gantt.view_is('Week')) {\r\n rem = dx % (this.gantt.options.column_width / 7);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 14\r\n ? 0\r\n : this.gantt.options.column_width / 7);\r\n } else if (this.gantt.view_is('Month')) {\r\n rem = dx % (this.gantt.options.column_width / 30);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 60\r\n ? 0\r\n : this.gantt.options.column_width / 30);\r\n } else {\r\n rem = dx % this.gantt.options.column_width;\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 2\r\n ? 0\r\n : this.gantt.options.column_width);\r\n }\r\n return position;\r\n }\r\n\r\n update_attr(element, attr, value) {\r\n value = +value;\r\n if (!isNaN(value)) {\r\n element.setAttribute(attr, value);\r\n }\r\n return element;\r\n }\r\n\r\n update_progressbar_position() {\r\n if (this.invalid) return;\r\n this.$bar_progress.setAttribute('x', this.$bar.getX());\r\n this.$bar_progress.setAttribute(\r\n 'width',\r\n this.$bar.getWidth() * (this.task.progress / 100)\r\n );\r\n }\r\n\r\n update_label_position() {\r\n const bar = this.$bar,\r\n label = this.group.querySelector('.bar-label');\r\n\r\n if (label.getBBox().width > bar.getWidth()) {\r\n label.classList.add('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\r\n } else {\r\n label.classList.remove('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\r\n }\r\n }\r\n\r\n update_handle_position() {\r\n if (this.invalid) return;\r\n const bar = this.$bar;\r\n this.handle_group\r\n .querySelector('.handle.left')\r\n .setAttribute('x', bar.getX() + 1);\r\n this.handle_group\r\n .querySelector('.handle.right')\r\n .setAttribute('x', bar.getEndX() - 9);\r\n const handle = this.group.querySelector('.handle.progress');\r\n handle &&\r\n handle.setAttribute('points', this.get_progress_polygon_points());\r\n }\r\n\r\n update_arrow_position() {\r\n this.arrows = this.arrows || [];\r\n for (let arrow of this.arrows) {\r\n arrow.update();\r\n }\r\n }\r\n}\r\n\r\nfunction isFunction(functionToCheck) {\r\n var getType = {};\r\n return (\r\n functionToCheck &&\r\n getType.toString.call(functionToCheck) === '[object Function]'\r\n );\r\n}\r\n","import { createSVG } from './svg_utils';\r\n\r\nexport default class Arrow {\r\n constructor(gantt, from_task, to_task) {\r\n this.gantt = gantt;\r\n this.from_task = from_task;\r\n this.to_task = to_task;\r\n\r\n this.calculate_path();\r\n this.draw();\r\n }\r\n\r\n calculate_path() {\r\n let start_x =\r\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\r\n\r\n const condition = () =>\r\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\r\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\r\n\r\n while (condition()) {\r\n start_x -= 10;\r\n }\r\n\r\n const start_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.from_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\r\n const end_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height / 2 +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.to_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const from_is_below_to =\r\n this.from_task.task._index > this.to_task.task._index;\r\n const curve = this.gantt.options.arrow_curve;\r\n const clockwise = from_is_below_to ? 1 : 0;\r\n const curve_y = from_is_below_to ? -curve : curve;\r\n const offset = from_is_below_to\r\n ? end_y + this.gantt.options.arrow_curve\r\n : end_y - this.gantt.options.arrow_curve;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n V ${offset}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n\r\n if (\r\n this.to_task.$bar.getX() <\r\n this.from_task.$bar.getX() + this.gantt.options.padding\r\n ) {\r\n const down_1 = this.gantt.options.padding / 2 - curve;\r\n const down_2 =\r\n this.to_task.$bar.getY() +\r\n this.to_task.$bar.getHeight() / 2 -\r\n curve_y;\r\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n v ${down_1}\r\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\r\n H ${left}\r\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\r\n V ${down_2}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n }\r\n }\r\n\r\n draw() {\r\n this.element = createSVG('path', {\r\n d: this.path,\r\n 'data-from': this.from_task.task.id,\r\n 'data-to': this.to_task.task.id,\r\n });\r\n }\r\n\r\n update() {\r\n this.calculate_path();\r\n this.element.setAttribute('d', this.path);\r\n }\r\n}\r\n","export default class Popup {\r\n constructor(parent, custom_html) {\r\n this.parent = parent;\r\n this.custom_html = custom_html;\r\n this.make();\r\n }\r\n\r\n make() {\r\n this.parent.innerHTML = `\r\n
\r\n
\r\n
\r\n `;\r\n\r\n this.hide();\r\n\r\n this.title = this.parent.querySelector('.title');\r\n this.subtitle = this.parent.querySelector('.subtitle');\r\n this.pointer = this.parent.querySelector('.pointer');\r\n }\r\n\r\n show(options) {\r\n if (!options.target_element) {\r\n throw new Error('target_element is required to show popup');\r\n }\r\n if (!options.position) {\r\n options.position = 'left';\r\n }\r\n const target_element = options.target_element;\r\n\r\n if (this.custom_html) {\r\n let html = this.custom_html(options.task);\r\n html += '
';\r\n this.parent.innerHTML = html;\r\n this.pointer = this.parent.querySelector('.pointer');\r\n } else {\r\n // set data\r\n this.title.innerHTML = options.title;\r\n this.subtitle.innerHTML = options.subtitle;\r\n this.parent.style.width = this.parent.clientWidth + 'px';\r\n }\r\n\r\n // set position\r\n let position_meta;\r\n if (target_element instanceof HTMLElement) {\r\n position_meta = target_element.getBoundingClientRect();\r\n } else if (target_element instanceof SVGElement) {\r\n position_meta = options.target_element.getBBox();\r\n }\r\n\r\n if (options.position === 'left') {\r\n this.parent.style.left =\r\n position_meta.x + (position_meta.width + 10) + 'px';\r\n this.parent.style.top = position_meta.y + 'px';\r\n\r\n this.pointer.style.transform = 'rotateZ(90deg)';\r\n this.pointer.style.left = '-7px';\r\n this.pointer.style.top = '2px';\r\n }\r\n\r\n // show\r\n this.parent.style.opacity = 1;\r\n }\r\n\r\n hide() {\r\n this.parent.style.opacity = 0;\r\n this.parent.style.left = 0;\r\n }\r\n}\r\n","import { $ } from './svg_utils';\n\nexport default class Table {\n dragStartY = 0;\n constructor(gantt, columns) {\n this.set_defaults(gantt, columns);\n }\n\n set_defaults(gantt, columns) {\n this.gantt = gantt;\n this.columns = columns;\n }\n\n draw_table_header() {\n const $thead = document.createElement('thead');\n const $tr = document.createElement('tr');\n\n this.columns.forEach((column) => {\n const $th = document.createElement('th');\n $th.textContent = column.title;\n\n $tr.appendChild($th);\n });\n\n $thead.appendChild($tr);\n $thead.classList.add('table-header');\n\n $.style($tr, 'height', this.gantt.options.header_height + 9 + 'px');\n\n return $thead;\n }\n\n get_parentNode(tag, target) {\n if (target.tagName === tag.toUpperCase()) return target;\n return this.get_parentNode(tag, target.parentNode);\n }\n\n draw_table_body(tasks) {\n this.tasks = this.gantt.setGroupPosition(tasks);\n\n const $tbody = document.createElement('tbody');\n $tbody.classList.add('table-body');\n\n this.make_table_row().forEach((row) => $tbody.append(row));\n\n $tbody.addEventListener('mousedown', (e) => {\n const $td = this.get_parentNode('td', e.target);\n\n $td.classList.contains('draggable-item') &&\n this.bind_draggable_event($tbody);\n });\n\n return $tbody;\n }\n\n isRowLine(id) {\n if (id <= 2) return false;\n const target = this.tasks.find((t) => t.id === `${id}`);\n\n return !target.groupPosition.includes('last');\n }\n\n make_table_row() {\n return this.tasks.map((task, index) => {\n const deps = task.level - 1;\n const $tr = document.createElement('tr');\n $tr.setAttribute('draggable', 'true');\n $tr.setAttribute('data-id', task.id);\n $.style($tr, {\n height:\n this.gantt.options.bar_height +\n this.gantt.options.padding +\n 'px',\n });\n\n if (deps === 1 && task.groupPosition.includes('last')) {\n $tr.classList.add('root-last');\n }\n\n this.columns.forEach((column) => {\n const $td = document.createElement('td');\n const { data, render } = column;\n\n if (data === 'drag') {\n $td.innerHTML = ``;\n $td.className = 'draggable-item';\n $tr.append($td);\n return;\n }\n\n if (data === 'wbs') {\n $td.className = data;\n }\n\n if (data === 'name' && task.level > 1) {\n $td.setAttribute('rel', task.type);\n $td.className = `work-name indent-${deps} indent-${deps}-${task.groupPosition[0]}`;\n\n if (task.groupPosition[1]) {\n $td.classList.add(\n `indent-${deps}-${task.groupPosition[1]}`\n );\n }\n\n if (task.type !== 'default') {\n $td.classList.add(task.closed ? 'closed' : 'opened');\n }\n\n for (let i = 0; i < deps; i++) {\n const $ins = document.createElement('ins');\n $ins.textContent = '';\n\n this.isRowLine(task.parentId) &&\n $ins.classList.add('row-line');\n\n if (deps === 1 || i === deps - 2) {\n $ins.classList.add('marker');\n\n deps > 1 && $ins.classList.add('row-line');\n\n $td.append($ins);\n break;\n }\n\n $td.append($ins);\n }\n }\n\n if (render) {\n const child_node = render(task[data], task);\n $td.append(child_node);\n } else {\n const text = document.createTextNode(task[data] ?? '');\n $td.append(text);\n }\n\n $tr.append($td);\n });\n\n $tr.addEventListener('mousedown', (e) => {\n const $td = this.get_parentNode('td', e.target);\n\n if ($td.classList.contains('draggable-item')) {\n $tr.addEventListener('dragstart', (e) => {\n e.target.classList.add('dragging');\n });\n\n $tr.addEventListener('dragend', (e) => {\n e.target.classList.remove('dragging');\n });\n }\n });\n\n return $tr;\n });\n }\n\n get_drag_after_element(container, y) {\n const draggableElements = [\n ...container.querySelectorAll('tr:not(.dragging)'),\n ];\n\n return draggableElements.reduce(\n (closest, child) => {\n const box = child.getBoundingClientRect();\n const offset = y - box.top - box.height / 2;\n if (offset < 0 && offset > closest.offset) {\n return { offset: offset, element: child };\n } else {\n return closest;\n }\n },\n { offset: Number.NEGATIVE_INFINITY }\n ).element;\n }\n\n find_task_item(id) {\n return this.tasks.find((t) => t.id === id);\n }\n\n bind_draggable_event($tbody) {\n $tbody.addEventListener('dragover', (e) => {\n e.preventDefault();\n if (!this.dragStartY) this.dragStartY = e.clientY;\n\n this.draggableEl = document.querySelector('.dragging');\n this.afterElement = this.get_drag_after_element($tbody, e.clientY);\n\n $tbody.insertBefore(this.draggableEl, this.afterElement);\n });\n\n $tbody.addEventListener('drop', async (e) => {\n e.preventDefault();\n const targetItem = this.find_task_item(\n this.get_parentNode('tr', e.target).getAttribute('data-id')\n );\n const dragItem = this.find_task_item(\n this.draggableEl.getAttribute('data-id')\n );\n const afterItem = this.find_task_item(\n this.afterElement.getAttribute('data-id')\n );\n\n const params = {\n c_id: dragItem.id,\n ref: afterItem.parentId,\n c_position:\n e.clientY > this.dragStartY\n ? afterItem.position - 1\n : afterItem.position,\n level: afterItem.level,\n p_position: dragItem.position,\n p_parentId: dragItem.parentId,\n };\n\n if (targetItem.type !== 'default') {\n const arr = this.tasks.filter(\n (t) => t.parentId === Number(targetItem.id)\n ).length;\n params.ref = targetItem.id;\n params.level = targetItem.level + 1;\n params.c_position = arr ? arr : 0;\n }\n\n this.dragStartY = 0;\n this.gantt.draggble_rerender(params);\n this.gantt.trigger_event('drag_row', [params]);\n });\n }\n}\n","import { $ } from './svg_utils';\r\n\r\nexport default class Split {\r\n constructor(wrapper) {\r\n this.draw_split_bar(wrapper);\r\n }\r\n\r\n draw_split_bar(elem) {\r\n const $split_bar = document.createElement('div');\r\n $split_bar.classList.add('split-bar');\r\n\r\n let x = 0;\r\n\r\n const mouseDownHandler = function (e) {\r\n x = e.clientX;\r\n\r\n document.addEventListener('mousemove', mouseMoveHandler);\r\n document.addEventListener('mouseup', mouseUpHandler);\r\n };\r\n\r\n const mouseMoveHandler = function (e) {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n const dx = e.clientX - x;\r\n const left =\r\n (Math.max(\r\n 0,\r\n Math.min($split_bar.offsetLeft + dx, elem.clientWidth)\r\n ) /\r\n elem.clientWidth) *\r\n 100;\r\n\r\n $.style($split_bar, { left: `${left}%` });\r\n $.style($table, { 'flex-basis': `${left}%` });\r\n $.style($gantt, { 'flex-basis': `${100 - left}%` });\r\n $.style($table, { 'overflow-x': 'hidden' });\r\n $.style($gantt, { 'overflow-x': 'hidden' });\r\n\r\n x = e.clientX;\r\n };\r\n\r\n const mouseUpHandler = function () {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n document.removeEventListener('mousemove', mouseMoveHandler);\r\n document.removeEventListener('mouseup', mouseUpHandler);\r\n\r\n $.style($table, { 'overflow-x': 'auto' });\r\n $.style($gantt, { 'overflow-x': 'auto' });\r\n };\r\n\r\n $split_bar.addEventListener('mousedown', mouseDownHandler);\r\n elem.prepend($split_bar);\r\n }\r\n}\r\n","import date_utils from './date_utils';\nimport { $, createSVG } from './svg_utils';\nimport Bar from './bar';\nimport Arrow from './arrow';\nimport Popup from './popup';\nimport Table from './table';\nimport Split from './split';\n\nimport './gantt.scss';\n\nconst VIEW_MODE = {\n QUARTER_DAY: 'Quarter Day',\n HALF_DAY: 'Half Day',\n DAY: 'Day',\n WEEK: 'Week',\n MONTH: 'Month',\n YEAR: 'Year',\n};\n\nexport default class Gantt {\n constructor(wrapper, tasks, options, contents) {\n this.originTasks = tasks;\n\n this.setup_options(options);\n this.setup_tasks(tasks);\n\n this.setup_wrapper(wrapper);\n\n // initialize with default view mode\n this.change_view_mode();\n this.setup_split_bar();\n this.setup_table(contents);\n\n this.bind_events();\n }\n\n setup_wrapper(element) {\n let svg_element;\n let wrapper_element;\n\n // CSS Selector is passed\n if (typeof element === 'string') {\n element = document.querySelector(element);\n }\n\n // get the SVGElement\n if (element instanceof HTMLElement) {\n wrapper_element = element;\n svg_element = element.querySelector('svg');\n } else if (element instanceof SVGElement) {\n svg_element = element;\n } else {\n throw new TypeError(\n 'Frappé Gantt only supports usage of a string CSS selector,' +\n \" HTML DOM element or SVG DOM element for the 'element' parameter\"\n );\n }\n\n // svg element\n if (!svg_element) {\n // create it\n this.$svg = createSVG('svg', {\n append_to: wrapper_element,\n class: 'gantt',\n });\n } else {\n this.$svg = svg_element;\n this.$svg.classList.add('gantt');\n }\n\n this.$wrapper = document.createElement('div');\n this.$wrapper.classList.add('wrapper');\n\n // wrapper element\n this.$container = document.createElement('div');\n this.$container.classList.add('gantt-container');\n\n const parent_element = this.$svg.parentElement;\n element.appendChild(this.setup_mode_handler());\n parent_element.appendChild(this.$wrapper);\n this.$wrapper.appendChild(this.$container);\n this.$container.appendChild(this.$svg);\n\n // popup wrapper\n this.popup_wrapper = document.createElement('div');\n this.popup_wrapper.classList.add('popup-wrapper');\n this.$container.appendChild(this.popup_wrapper);\n }\n\n setup_mode_handler() {\n const wrapper = document.createElement('div');\n const excel_export = document.createElement('button');\n const btn_group = document.createElement('div');\n\n wrapper.className = 'mt well well-sm clearfix';\n excel_export.className = 'btn btn-default btn-sm mr-xs';\n\n excel_export.innerText = 'Excel';\n\n $.style(btn_group, { float: 'right' });\n\n Object.keys(VIEW_MODE).forEach((key) => {\n const btn = document.createElement('button');\n btn.className = `btn btn-default btn-sm mr-xs ${\n VIEW_MODE[key] === this.options.view_mode ? 'active' : ''\n }`;\n btn.innerText = VIEW_MODE[key];\n btn.addEventListener('click', (e) => {\n e.target.classList.add('active');\n e.target.parentNode.childNodes.forEach((b) =>\n b.classList.remove('active')\n );\n\n this.change_view_mode(VIEW_MODE[key]);\n });\n\n btn_group.appendChild(btn);\n });\n\n wrapper.append(excel_export);\n wrapper.append(btn_group);\n\n return wrapper;\n }\n\n setup_options(options) {\n const default_options = {\n header_height: 50,\n column_width: 30,\n step: 24,\n view_modes: [...Object.values(VIEW_MODE)],\n bar_height: 20,\n bar_corner_radius: 3,\n arrow_curve: 5,\n padding: 18,\n view_mode: 'Day',\n date_format: 'YYYY-MM-DD',\n popup_trigger: 'click',\n custom_popup_html: null,\n language: 'ko',\n };\n this.options = Object.assign({}, default_options, options);\n }\n\n setup_tasks(tasks) {\n // prepare tasks\n this.tasks = this.sort_tasks(tasks).map((task, i) => {\n // convert to Date objects\n task._start = date_utils.parse(task.start);\n task._end = date_utils.parse(task.end);\n\n // make task invalid if duration too large\n if (date_utils.diff(task._end, task._start, 'year') > 10) {\n task.end = null;\n }\n\n // cache index\n task._index = i;\n\n // invalid dates\n if (!task.start && !task.end) {\n const today = date_utils.today();\n task._start = today;\n task._end = date_utils.add(today, 2, 'day');\n }\n\n if (!task.start && task.end) {\n task._start = date_utils.add(task._end, -2, 'day');\n }\n\n if (task.start && !task.end) {\n task._end = date_utils.add(task._start, 2, 'day');\n }\n\n // if hours is not set, assume the last day is full day\n // e.g: 2018-09-09 becomes 2018-09-09 23:59:59\n const task_end_values = date_utils.get_date_values(task._end);\n if (task_end_values.slice(3).every((d) => d === 0)) {\n task._end = date_utils.add(task._end, 24, 'hour');\n }\n\n // invalid flag\n if (!task.start || !task.end) {\n task.invalid = true;\n }\n\n // dependencies\n if (typeof task.dependencies === 'string' || !task.dependencies) {\n let deps = [];\n if (task.dependencies) {\n deps = task.dependencies\n .split(',')\n .map((d) => d.trim())\n .filter((d) => d);\n }\n task.dependencies = deps;\n }\n\n // uids\n if (!task.id) {\n task.id = generate_id(task);\n }\n\n return task;\n });\n\n this.setup_dependencies();\n }\n\n setup_dependencies() {\n this.dependency_map = {};\n for (let t of this.tasks) {\n for (let d of t.dependencies) {\n this.dependency_map[d] = this.dependency_map[d] || [];\n this.dependency_map[d].push(t.id);\n }\n }\n }\n\n refresh(tasks) {\n this.setup_tasks(tasks);\n this.change_view_mode();\n this.rerender_table();\n this.originTasks = tasks;\n }\n\n change_view_mode(mode = this.options.view_mode) {\n this.update_view_scale(mode);\n this.setup_dates();\n this.render();\n // fire viewmode_change event\n this.trigger_event('view_change', [mode]);\n }\n\n update_view_scale(view_mode) {\n this.options.view_mode = view_mode;\n\n if (view_mode === VIEW_MODE.DAY) {\n this.options.step = 24;\n this.options.column_width = 38;\n } else if (view_mode === VIEW_MODE.HALF_DAY) {\n this.options.step = 24 / 2;\n this.options.column_width = 38;\n } else if (view_mode === VIEW_MODE.QUARTER_DAY) {\n this.options.step = 24 / 4;\n this.options.column_width = 38;\n } else if (view_mode === VIEW_MODE.WEEK) {\n this.options.step = 24 * 7;\n this.options.column_width = 140;\n } else if (view_mode === VIEW_MODE.MONTH) {\n this.options.step = 24 * 30;\n this.options.column_width = 120;\n } else if (view_mode === VIEW_MODE.YEAR) {\n this.options.step = 24 * 365;\n this.options.column_width = 120;\n }\n }\n\n setup_dates() {\n this.setup_gantt_dates();\n this.setup_date_values();\n }\n\n setup_gantt_dates() {\n this.gantt_start = this.gantt_end = null;\n\n for (let task of this.tasks) {\n // set global start and end date\n if (!this.gantt_start || task._start < this.gantt_start) {\n this.gantt_start = task._start;\n }\n if (!this.gantt_end || task._end > this.gantt_end) {\n this.gantt_end = task._end;\n }\n }\n\n this.gantt_start = date_utils.start_of(this.gantt_start, 'day');\n this.gantt_end = date_utils.start_of(this.gantt_end, 'day');\n\n // add date padding on both sides\n if (this.view_is([VIEW_MODE.QUARTER_DAY, VIEW_MODE.HALF_DAY])) {\n this.gantt_start = date_utils.add(this.gantt_start, -7, 'day');\n this.gantt_end = date_utils.add(this.gantt_end, 7, 'day');\n } else if (this.view_is(VIEW_MODE.MONTH)) {\n this.gantt_start = date_utils.start_of(this.gantt_start, 'year');\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'year');\n } else if (this.view_is(VIEW_MODE.YEAR)) {\n this.gantt_start = date_utils.add(this.gantt_start, -2, 'year');\n this.gantt_end = date_utils.add(this.gantt_end, 2, 'year');\n } else {\n this.gantt_start = date_utils.add(this.gantt_start, -1, 'month');\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'month');\n }\n }\n\n setup_date_values() {\n this.dates = [];\n let cur_date = null;\n\n while (cur_date === null || cur_date < this.gantt_end) {\n if (!cur_date) {\n cur_date = date_utils.clone(this.gantt_start);\n } else {\n if (this.view_is(VIEW_MODE.YEAR)) {\n cur_date = date_utils.add(cur_date, 1, 'year');\n } else if (this.view_is(VIEW_MODE.MONTH)) {\n cur_date = date_utils.add(cur_date, 1, 'month');\n } else {\n cur_date = date_utils.add(\n cur_date,\n this.options.step,\n 'hour'\n );\n }\n }\n this.dates.push(cur_date);\n }\n }\n\n bind_events() {\n this.bind_grid_click();\n this.bind_bar_events();\n this.bind_scroll_event();\n }\n\n render() {\n this.clear();\n this.setup_layers();\n this.make_grid();\n this.make_grid_header();\n this.make_dates();\n this.make_bars();\n this.make_arrows();\n this.map_arrows_on_bars();\n this.set_width();\n this.set_scroll_position();\n }\n\n rerender_table() {\n document.querySelector('.table-body')?.remove();\n\n const $table_body = this.table.draw_table_body(this.tasks, {\n height: this.options.bar_height + this.options.padding + 'px',\n });\n\n document\n .querySelector('.table-container table')\n .appendChild($table_body);\n\n $table_body.addEventListener('click', (event) =>\n this.bind_table_event(event)\n );\n }\n\n draggble_rerender(item) {\n this.update_origin_tasks(item);\n this.render();\n this.rerender_table();\n }\n\n sort_tasks(tasks) {\n const sorted_tasks = [...tasks];\n const children_idx_info = {};\n\n sorted_tasks\n .sort((a, b) => a.level - b.level || a.position - b.position)\n .forEach((task, taskIdx) => {\n if (task.parentId !== 2) {\n if (children_idx_info.hasOwnProperty(task.parentId)) {\n children_idx_info[task.parentId].push(taskIdx);\n } else {\n children_idx_info[task.parentId] = [taskIdx];\n }\n\n const parentIdx = sorted_tasks.findIndex(\n (item) => +item.id === task.parentId\n );\n\n sorted_tasks.splice(taskIdx, 1);\n sorted_tasks.splice(\n parentIdx + children_idx_info[task.parentId].length,\n 0,\n task\n );\n }\n }, []);\n\n return sorted_tasks;\n }\n\n setGroupPosition(data) {\n return data.reduce((acc, cur) => {\n const group = data.filter((t) => t.parentId === cur.parentId);\n\n cur.groupPosition = [];\n\n if (group[0].id === cur.id) {\n cur.groupPosition.push('first');\n }\n if (group[group.length - 1].id === cur.id) {\n cur.groupPosition.push('last');\n }\n if (!cur.groupPosition.length) {\n cur.groupPosition.push('middle');\n }\n\n acc.push(cur);\n return acc;\n }, []);\n }\n\n update_dependecies(id) {\n if (id === 2) return [];\n\n const dependencies = this.tasks.find(\n (task) => task.id === id\n ).dependencies;\n\n if (!dependencies.length) return [id];\n return [...dependencies, id];\n }\n\n update_origin_tasks(item) {\n let tasks = this.tasks.reduce((acc, cur) => {\n if (cur.id === item.c_id) {\n const dependencies = this.update_dependecies(item.ref);\n\n cur = {\n ...cur,\n parentId: Number(item.ref),\n dependencies,\n position: item.c_position,\n level: item.level,\n wbs: dependencies.length\n ? `${dependencies.join('-')}-${item.c_id}`\n : `${item.c_id}`,\n };\n } else {\n if (\n cur.parentId === Number(item.ref) &&\n item.c_position === item.p_position\n ) {\n acc.push(cur);\n return acc;\n }\n\n if (cur.parentId === Number(item.ref)) {\n cur.position =\n item.c_position > item.p_position\n ? cur.position < item.p_position\n ? cur.position\n : cur.position <= item.c_position\n ? cur.position - 1\n : cur.position\n : cur.position > item.p_position\n ? cur.position\n : cur.position >= item.c_position\n ? cur.position + 1\n : cur.position;\n } else {\n if (cur.parentId === item.p_parentId) {\n cur.position =\n cur.position < item.p_position\n ? cur.position\n : cur.position - 1;\n }\n }\n }\n\n acc.push(cur);\n return acc;\n }, []);\n\n tasks = this.setGroupPosition(tasks);\n\n this.setup_tasks(tasks);\n this.originTasks = tasks;\n }\n\n setup_layers() {\n this.layers = {};\n const layers = [\n 'grid',\n 'arrow',\n 'progress',\n 'bar',\n 'details',\n 'header',\n 'date',\n ];\n // make group layers\n for (let layer of layers) {\n this.layers[layer] = createSVG('g', {\n class: layer,\n append_to: this.$svg,\n });\n }\n }\n\n setup_split_bar() {\n this.split = new Split(this.$wrapper);\n }\n\n setup_table(contents, handler) {\n this.table = new Table(this, contents, handler);\n this.make_table();\n }\n\n bind_table_event(event) {\n const $tr = event.target.closest('tr');\n const id = $tr.dataset.id;\n\n if (\n event.target.tagName !== 'INS' &&\n !event.target.classList.contains('marker')\n ) {\n const task = this.get_task(id);\n\n this.handle_selected(task);\n\n return;\n }\n\n const $target = event.target.closest('td');\n\n if (\n $target.getAttribute('rel') === 'folder' ||\n $target.getAttribute('rel') === 'drive'\n ) {\n let tasks = [...this.tasks];\n\n if ($target.classList.contains('closed')) {\n this.originTasks.forEach((task) => {\n if (task.id === id) {\n delete task.closed;\n return tasks.splice(task._index, 1, task);\n }\n\n if (task.dependencies.includes(id))\n tasks.splice(task._index, 0, task);\n });\n } else {\n tasks = this.tasks.reduce((acc, task) => {\n if (task.id === id) {\n return [...acc, { ...task, closed: true }];\n }\n\n if (!task.dependencies.includes(id)) {\n return [...acc, task];\n }\n\n return acc;\n }, []);\n }\n\n this.setup_tasks(tasks);\n this.render();\n this.rerender_table();\n }\n }\n\n make_table() {\n const $table_container = document.createElement('div');\n const $table = document.createElement('table');\n\n $table_container.className = 'table-container';\n\n const $table_header = this.table.draw_table_header();\n const $table_body = this.table.draw_table_body(this.tasks);\n\n $table.append($table_header);\n $table.append($table_body);\n\n $table_body.addEventListener('click', (event) =>\n this.bind_table_event(event)\n );\n\n $table_container.append($table);\n\n this.$wrapper.prepend($table_container);\n }\n\n make_grid() {\n this.make_grid_background();\n this.make_grid_rows();\n this.make_grid_ticks();\n this.make_grid_highlights();\n }\n\n handle_selected(task) {\n const $tr = this.$wrapper.querySelectorAll('tr')[task._index + 1];\n const $grid_row =\n this.$wrapper.querySelectorAll('.grid-row')[task._index];\n\n if (!$tr.classList.contains('selected')) {\n Array.prototype.forEach.call(\n this.$wrapper.querySelectorAll('.selected'),\n (elem) => elem.classList.remove('selected')\n );\n }\n\n $tr?.classList.toggle('selected');\n $grid_row?.classList.toggle('selected');\n }\n\n make_grid_background() {\n const grid_width = this.dates.length * this.options.column_width;\n const grid_height =\n this.options.header_height +\n this.options.padding +\n (this.options.bar_height + this.options.padding) *\n this.tasks.length;\n\n createSVG('rect', {\n x: 0,\n y: 0,\n width: grid_width,\n height: grid_height,\n class: 'grid-background',\n append_to: this.layers.grid,\n });\n\n $.attr(this.$svg, {\n height: grid_height,\n width: '100%',\n });\n }\n\n make_grid_rows() {\n const rows_layer = createSVG('g', { append_to: this.layers.grid });\n // const lines_layer = createSVG('g', { append_to: this.layers.grid });\n\n const row_width = this.dates.length * this.options.column_width;\n const row_height = this.options.bar_height + this.options.padding;\n\n let row_y = this.options.header_height + this.options.padding / 2;\n\n for (let task of this.tasks) {\n createSVG('rect', {\n x: 0,\n y: row_y,\n width: row_width,\n height: row_height,\n class: 'grid-row',\n append_to: rows_layer,\n });\n\n // createSVG('line', {\n // x1: 0,\n // y1: row_y + row_height,\n // x2: row_width,\n // y2: row_y + row_height,\n // class: 'row-line',\n // append_to: lines_layer,\n // });\n\n row_y += this.options.bar_height + this.options.padding;\n }\n }\n\n make_grid_header() {\n const header_width = this.dates.length * this.options.column_width;\n const header_height = this.options.header_height + 10;\n\n const pageScroll = window.scrollY;\n const originOffset =\n pageScroll + this.$wrapper.getBoundingClientRect().top;\n\n if (originOffset <= pageScroll) {\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\n window.scrollY - originOffset\n )}px)`;\n }\n\n createSVG('rect', {\n x: 0,\n y: 0,\n width: header_width,\n height: header_height,\n class: 'grid-header',\n append_to: this.layers.header,\n });\n }\n\n make_grid_ticks() {\n let tick_x = 0;\n let tick_y = this.options.header_height + this.options.padding / 2;\n let tick_height =\n (this.options.bar_height + this.options.padding) *\n this.tasks.length;\n\n for (let date of this.dates) {\n let tick_class = 'tick';\n // thick tick for monday\n if (this.view_is(VIEW_MODE.DAY) && date.getDate() === 1) {\n tick_class += ' thick';\n }\n // thick tick for first week\n if (\n this.view_is(VIEW_MODE.WEEK) &&\n date.getDate() >= 1 &&\n date.getDate() < 8\n ) {\n tick_class += ' thick';\n }\n // thick ticks for quarters\n if (this.view_is(VIEW_MODE.MONTH) && date.getMonth() % 3 === 0) {\n tick_class += ' thick';\n }\n\n createSVG('path', {\n d: `M ${tick_x} ${tick_y} v ${tick_height}`,\n class: tick_class,\n append_to: this.layers.grid,\n });\n\n if (this.view_is(VIEW_MODE.MONTH)) {\n tick_x +=\n (date_utils.get_days_in_month(date) *\n this.options.column_width) /\n 30;\n } else {\n tick_x += this.options.column_width;\n }\n }\n }\n\n make_grid_highlights() {\n // highlight today's date\n if (this.view_is(VIEW_MODE.DAY)) {\n const x =\n (date_utils.diff(date_utils.today(), this.gantt_start, 'hour') /\n this.options.step) *\n this.options.column_width;\n const y = 0;\n\n const width = this.options.column_width;\n const height =\n (this.options.bar_height + this.options.padding) *\n this.tasks.length +\n this.options.header_height +\n this.options.padding / 2;\n\n createSVG('rect', {\n x,\n y,\n width,\n height,\n class: 'today-highlight',\n append_to: this.layers.grid,\n });\n }\n }\n\n make_dates() {\n const pageScroll = window.scrollY;\n const originOffset =\n pageScroll + this.$wrapper.getBoundingClientRect().top;\n\n if (originOffset <= pageScroll) {\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\n window.scrollY - originOffset\n )}px)`;\n }\n\n for (let date of this.get_dates_to_draw()) {\n createSVG('text', {\n x: date.lower_x,\n y: date.lower_y,\n innerHTML: date.lower_text,\n class: 'lower-text',\n append_to: this.layers.date,\n });\n\n if (date.upper_text) {\n const $upper_text = createSVG('text', {\n x: date.upper_x,\n y: date.upper_y,\n innerHTML: date.upper_text,\n class: 'upper-text',\n append_to: this.layers.date,\n });\n\n // remove out-of-bound dates\n if (\n $upper_text.getBBox().x2 > this.layers.grid.getBBox().width\n ) {\n $upper_text.remove();\n }\n }\n }\n }\n\n get_dates_to_draw() {\n let last_date = null;\n const dates = this.dates.map((date, i) => {\n const d = this.get_date_info(date, last_date, i);\n last_date = date;\n return d;\n });\n return dates;\n }\n\n get_date_info(date, last_date, i) {\n if (!last_date) {\n last_date = date_utils.add(date, 1, 'year');\n }\n const date_text = {\n 'Quarter Day_lower': date_utils.format(\n date,\n 'HH',\n this.options.language\n ),\n 'Half Day_lower': date_utils.format(\n date,\n 'HH',\n this.options.language\n ),\n Day_lower:\n date.getDate() !== last_date.getDate()\n ? date_utils.format(date, 'D', this.options.language)\n : '',\n Week_lower:\n date.getMonth() !== last_date.getMonth()\n ? date_utils.format(date, 'D MMM', this.options.language)\n : date_utils.format(date, 'D', this.options.language),\n Month_lower: date_utils.format(date, 'MMMM', this.options.language),\n Year_lower: date_utils.format(date, 'YYYY', this.options.language),\n 'Quarter Day_upper':\n date.getDate() !== last_date.getDate()\n ? date_utils.format(date, 'D MMM', this.options.language)\n : '',\n 'Half Day_upper':\n date.getDate() !== last_date.getDate()\n ? date.getMonth() !== last_date.getMonth()\n ? date_utils.format(\n date,\n 'D MMM',\n this.options.language\n )\n : date_utils.format(date, 'D', this.options.language)\n : '',\n Day_upper:\n date.getMonth() !== last_date.getMonth()\n ? date_utils.format(date, 'MMMM', this.options.language)\n : '',\n Week_upper:\n date.getMonth() !== last_date.getMonth()\n ? date_utils.format(date, 'MMMM', this.options.language)\n : '',\n Month_upper:\n date.getFullYear() !== last_date.getFullYear()\n ? date_utils.format(date, 'YYYY', this.options.language)\n : '',\n Year_upper:\n date.getFullYear() !== last_date.getFullYear()\n ? date_utils.format(date, 'YYYY', this.options.language)\n : '',\n };\n\n const base_pos = {\n x: i * this.options.column_width,\n lower_y: this.options.header_height,\n upper_y: this.options.header_height - 25,\n };\n\n const x_pos = {\n 'Quarter Day_lower': (this.options.column_width * 4) / 2,\n 'Quarter Day_upper': 0,\n 'Half Day_lower': (this.options.column_width * 2) / 2,\n 'Half Day_upper': 0,\n Day_lower: this.options.column_width / 2,\n Day_upper: (this.options.column_width * 30) / 2,\n Week_lower: 0,\n Week_upper: (this.options.column_width * 4) / 2,\n Month_lower: this.options.column_width / 2,\n Month_upper: (this.options.column_width * 12) / 2,\n Year_lower: this.options.column_width / 2,\n Year_upper: (this.options.column_width * 30) / 2,\n };\n\n return {\n upper_text: date_text[`${this.options.view_mode}_upper`],\n lower_text: date_text[`${this.options.view_mode}_lower`],\n upper_x: base_pos.x + x_pos[`${this.options.view_mode}_upper`],\n upper_y: base_pos.upper_y,\n lower_x: base_pos.x + x_pos[`${this.options.view_mode}_lower`],\n lower_y: base_pos.lower_y,\n };\n }\n\n make_bars() {\n this.bars = this.tasks.map((task) => {\n const bar = new Bar(this, task);\n this.layers.bar.appendChild(bar.group);\n return bar;\n });\n }\n\n make_arrows() {\n this.arrows = [];\n for (let task of this.tasks) {\n let arrows = [];\n arrows = task.dependencies\n .map((task_id) => {\n const dependency = this.get_task(task_id);\n if (!dependency) return;\n const arrow = new Arrow(\n this,\n this.bars[dependency._index], // from_task\n this.bars[task._index] // to_task\n );\n this.layers.arrow.appendChild(arrow.element);\n return arrow;\n })\n .filter(Boolean); // filter falsy values\n this.arrows = this.arrows.concat(arrows);\n }\n }\n\n map_arrows_on_bars() {\n for (let bar of this.bars) {\n bar.arrows = this.arrows.filter((arrow) => {\n return (\n arrow.from_task.task.id === bar.task.id ||\n arrow.to_task.task.id === bar.task.id\n );\n });\n }\n }\n\n set_width() {\n const cur_width = this.$svg.getBoundingClientRect().width;\n const actual_width = this.$svg\n .querySelector('.grid .grid-row')\n .getAttribute('width');\n if (cur_width < actual_width) {\n this.$svg.setAttribute('width', actual_width);\n }\n }\n\n set_scroll_position() {\n const parent_element = this.$svg.parentElement;\n if (!parent_element) return;\n\n const hours_before_first_task = date_utils.diff(\n this.get_oldest_starting_date(),\n this.gantt_start,\n 'hour'\n );\n\n const scroll_pos =\n (hours_before_first_task / this.options.step) *\n this.options.column_width -\n this.options.column_width;\n\n parent_element.scrollLeft = scroll_pos;\n }\n\n bind_scroll_event() {\n const originOffset =\n window.scrollY + this.$wrapper.getBoundingClientRect().top;\n const $table_header = $('.table-header');\n let ticking = false;\n\n $.bind(\n window,\n 'scroll',\n () => {\n const pageScroll = window.scrollY;\n\n if (ticking) return;\n\n ticking = true;\n window.requestAnimationFrame(() => {\n if (originOffset <= pageScroll) {\n $table_header.style.top = `${Math.floor(\n pageScroll - originOffset\n )}px`;\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\n pageScroll - originOffset\n )}px)`;\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\n pageScroll - originOffset\n )}px)`;\n } else {\n $table_header.style.top = '0px';\n this.layers.header.style.transform =\n 'translate(0px, 0px)';\n this.layers.date.style.transform =\n 'translate(0px, 0px)';\n }\n\n ticking = false;\n });\n },\n { passive: true }\n );\n }\n\n bind_grid_click() {\n $.on(\n this.$svg,\n this.options.popup_trigger,\n '.grid-row, .grid-header',\n () => {\n this.unselect_all();\n this.hide_popup();\n }\n );\n }\n\n bind_bar_events() {\n let is_dragging = false;\n let x_on_start = 0;\n let y_on_start = 0;\n let is_resizing_left = false;\n let is_resizing_right = false;\n let parent_bar_id = null;\n let bars = []; // instanceof Bar\n this.bar_being_dragged = null;\n\n function action_in_progress() {\n return is_dragging || is_resizing_left || is_resizing_right;\n }\n\n $.on(this.$svg, 'mousedown', '.bar-wrapper, .handle', (e, element) => {\n const bar_wrapper = $.closest('.bar-wrapper', element);\n\n if (element.classList.contains('left')) {\n is_resizing_left = true;\n } else if (element.classList.contains('right')) {\n is_resizing_right = true;\n } else if (element.classList.contains('bar-wrapper')) {\n is_dragging = true;\n }\n\n bar_wrapper.classList.add('active');\n\n x_on_start = e.offsetX;\n y_on_start = e.offsetY;\n\n parent_bar_id = bar_wrapper.getAttribute('data-id');\n const ids = [\n parent_bar_id,\n ...this.get_all_dependent_tasks(parent_bar_id),\n ];\n bars = ids.map((id) => this.get_bar(id));\n\n this.bar_being_dragged = parent_bar_id;\n\n bars.forEach((bar) => {\n const $bar = bar.$bar;\n $bar.ox = $bar.getX();\n $bar.oy = $bar.getY();\n $bar.owidth = $bar.getWidth();\n $bar.finaldx = 0;\n });\n });\n\n $.on(this.$svg, 'mousemove', (e) => {\n if (!action_in_progress()) return;\n const dx = e.offsetX - x_on_start;\n const dy = e.offsetY - y_on_start;\n\n bars.forEach((bar) => {\n const $bar = bar.$bar;\n $bar.finaldx = this.get_snap_position(dx);\n this.hide_popup();\n if (is_resizing_left) {\n if (parent_bar_id === bar.task.id) {\n bar.update_bar_position({\n x: $bar.ox + $bar.finaldx,\n width: $bar.owidth - $bar.finaldx,\n });\n } else {\n bar.update_bar_position({\n x: $bar.ox + $bar.finaldx,\n });\n }\n } else if (is_resizing_right) {\n if (parent_bar_id === bar.task.id) {\n bar.update_bar_position({\n width: $bar.owidth + $bar.finaldx,\n });\n }\n } else if (is_dragging) {\n bar.update_bar_position({ x: $bar.ox + $bar.finaldx });\n }\n });\n });\n\n document.addEventListener('mouseup', (e) => {\n if (is_dragging || is_resizing_left || is_resizing_right) {\n bars.forEach((bar) => bar.group.classList.remove('active'));\n }\n\n is_dragging = false;\n is_resizing_left = false;\n is_resizing_right = false;\n });\n\n $.on(this.$svg, 'mouseup', (e) => {\n this.bar_being_dragged = null;\n bars.forEach((bar) => {\n const $bar = bar.$bar;\n if (!$bar.finaldx) return;\n bar.date_changed();\n bar.set_action_completed();\n });\n });\n\n this.bind_bar_progress();\n }\n\n bind_bar_progress() {\n let x_on_start = 0;\n let y_on_start = 0;\n let is_resizing = null;\n let bar = null;\n let $bar_progress = null;\n let $bar = null;\n\n $.on(this.$svg, 'mousedown', '.handle.progress', (e, handle) => {\n is_resizing = true;\n x_on_start = e.offsetX;\n y_on_start = e.offsetY;\n\n const $bar_wrapper = $.closest('.bar-wrapper', handle);\n const id = $bar_wrapper.getAttribute('data-id');\n bar = this.get_bar(id);\n\n $bar_progress = bar.$bar_progress;\n $bar = bar.$bar;\n\n $bar_progress.finaldx = 0;\n $bar_progress.owidth = $bar_progress.getWidth();\n $bar_progress.min_dx = -$bar_progress.getWidth();\n $bar_progress.max_dx = $bar.getWidth() - $bar_progress.getWidth();\n });\n\n $.on(this.$svg, 'mousemove', (e) => {\n if (!is_resizing) return;\n let dx = e.offsetX - x_on_start;\n let dy = e.offsetY - y_on_start;\n\n if (dx > $bar_progress.max_dx) {\n dx = $bar_progress.max_dx;\n }\n if (dx < $bar_progress.min_dx) {\n dx = $bar_progress.min_dx;\n }\n\n const $handle = bar.$handle_progress;\n $.attr($bar_progress, 'width', $bar_progress.owidth + dx);\n $.attr($handle, 'points', bar.get_progress_polygon_points());\n $bar_progress.finaldx = dx;\n });\n\n $.on(this.$svg, 'mouseup', () => {\n is_resizing = false;\n if (!($bar_progress && $bar_progress.finaldx)) return;\n bar.progress_changed();\n bar.set_action_completed();\n });\n }\n\n get_all_dependent_tasks(task_id) {\n let out = [];\n let to_process = [task_id];\n while (to_process.length) {\n const deps = to_process.reduce((acc, curr) => {\n acc = acc.concat(this.dependency_map[curr]);\n return acc;\n }, []);\n\n out = out.concat(deps);\n to_process = deps.filter((d) => !to_process.includes(d));\n }\n\n return out.filter(Boolean);\n }\n\n get_snap_position(dx) {\n let odx = dx,\n rem,\n position;\n\n if (this.view_is(VIEW_MODE.WEEK)) {\n rem = dx % (this.options.column_width / 7);\n position =\n odx -\n rem +\n (rem < this.options.column_width / 14\n ? 0\n : this.options.column_width / 7);\n } else if (this.view_is(VIEW_MODE.MONTH)) {\n rem = dx % (this.options.column_width / 30);\n position =\n odx -\n rem +\n (rem < this.options.column_width / 60\n ? 0\n : this.options.column_width / 30);\n } else {\n rem = dx % this.options.column_width;\n position =\n odx -\n rem +\n (rem < this.options.column_width / 2\n ? 0\n : this.options.column_width);\n }\n return position;\n }\n\n unselect_all() {\n [...this.$svg.querySelectorAll('.bar-wrapper')].forEach((el) => {\n el.classList.remove('active');\n });\n }\n\n view_is(modes) {\n if (typeof modes === 'string') {\n return this.options.view_mode === modes;\n }\n\n if (Array.isArray(modes)) {\n return modes.some((mode) => this.options.view_mode === mode);\n }\n\n return false;\n }\n\n get_task(id) {\n return this.tasks.find((task) => {\n return task.id === id;\n });\n }\n\n get_bar(id) {\n return this.bars.find((bar) => {\n return bar.task.id === id;\n });\n }\n\n show_popup(options) {\n if (!this.popup) {\n this.popup = new Popup(\n this.popup_wrapper,\n this.options.custom_popup_html\n );\n }\n this.popup.show(options);\n }\n\n hide_popup() {\n this.popup && this.popup.hide();\n }\n\n trigger_event(event, args) {\n if (this.options['on_' + event]) {\n this.options['on_' + event].apply(null, args);\n }\n }\n\n /**\n * Gets the oldest starting date from the list of tasks\n *\n * @returns Date\n * @memberof Gantt\n */\n get_oldest_starting_date() {\n return this.tasks\n .map((task) => task._start)\n .reduce((prev_date, cur_date) =>\n cur_date <= prev_date ? cur_date : prev_date\n );\n }\n\n /**\n * Clear all elements from the parent svg element\n *\n * @memberof Gantt\n */\n clear() {\n this.$svg.innerHTML = '';\n }\n}\n\nGantt.VIEW_MODE = VIEW_MODE;\n\nfunction generate_id(task) {\n return task.name + '_' + Math.random().toString(36).slice(2, 12);\n}\n"],"names":[],"mappings":";;;IAAA,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,MAAM,KAAK,GAAG,OAAO,CAAC;IACtB,MAAM,GAAG,GAAG,KAAK,CAAC;IAClB,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,MAAM,MAAM,GAAG,QAAQ,CAAC;IACxB,MAAM,MAAM,GAAG,QAAQ,CAAC;IACxB,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC;AACA,qBAAe;IACf,IAAI,KAAK,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE;IAC/D,QAAQ,IAAI,IAAI,YAAY,IAAI,EAAE;IAClC,YAAY,OAAO,IAAI,CAAC;IACxB,SAAS;IACT,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;IACtC,YAAY,IAAI,UAAU,EAAE,UAAU,CAAC;IACvC,YAAY,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC1C;IACA,YAAY,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC;IACjC,iBAAiB,KAAK,CAAC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CAAC;IACrE;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"frappe-gantt.js","sources":["../src/date_utils.js","../src/svg_utils.js","../src/bar.js","../src/arrow.js","../src/popup.js","../src/table.js","../src/split.js","../src/index.js"],"sourcesContent":["const YEAR = 'year';\r\nconst MONTH = 'month';\r\nconst DAY = 'day';\r\nconst HOUR = 'hour';\r\nconst MINUTE = 'minute';\r\nconst SECOND = 'second';\r\nconst MILLISECOND = 'millisecond';\r\n\r\nexport default {\r\n parse(date, date_separator = '-', time_separator = /[.:]/) {\r\n if (date instanceof Date) {\r\n return date;\r\n }\r\n if (typeof date === 'string') {\r\n let date_parts, time_parts;\r\n const parts = date.split(' ');\r\n\r\n date_parts = parts[0]\r\n .split(date_separator)\r\n .map((val) => parseInt(val, 10));\r\n time_parts = parts[1] && parts[1].split(time_separator);\r\n\r\n // month is 0 indexed\r\n date_parts[1] = date_parts[1] - 1;\r\n\r\n let vals = date_parts;\r\n\r\n if (time_parts && time_parts.length) {\r\n if (time_parts.length == 4) {\r\n time_parts[3] = '0.' + time_parts[3];\r\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\r\n }\r\n vals = vals.concat(time_parts);\r\n }\r\n\r\n return new Date(...vals);\r\n }\r\n },\r\n\r\n to_string(date, with_time = false) {\r\n if (!(date instanceof Date)) {\r\n throw new TypeError('Invalid argument type');\r\n }\r\n const vals = this.get_date_values(date).map((val, i) => {\r\n if (i === 1) {\r\n // add 1 for month\r\n val = val + 1;\r\n }\r\n\r\n if (i === 6) {\r\n return padStart(val + '', 3, '0');\r\n }\r\n\r\n return padStart(val + '', 2, '0');\r\n });\r\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\r\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\r\n\r\n return date_string + (with_time ? ' ' + time_string : '');\r\n },\r\n\r\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'ko') {\r\n const dateTimeFormat = new Intl.DateTimeFormat(lang, {\r\n month: 'long'\r\n });\r\n const month_name = dateTimeFormat.format(date);\r\n const month_name_capitalized =\r\n month_name.charAt(0).toUpperCase() + month_name.slice(1);\r\n\r\n const values = this.get_date_values(date).map(d => padStart(d, 2, 0));\r\n const format_map = {\r\n YYYY: values[0],\r\n MM: padStart(+values[1] + 1, 2, 0),\r\n DD: values[2],\r\n HH: values[3],\r\n mm: values[4],\r\n ss: values[5],\r\n SSS: values[6],\r\n D: values[2],\r\n MMMM: month_name_capitalized,\r\n MMM: month_name_capitalized,\r\n };\r\n\r\n let str = format_string;\r\n const formatted_values = [];\r\n\r\n Object.keys(format_map)\r\n .sort((a, b) => b.length - a.length) // big string first\r\n .forEach((key) => {\r\n if (str.includes(key)) {\r\n str = str.replace(key, `$${formatted_values.length}`);\r\n formatted_values.push(format_map[key]);\r\n }\r\n });\r\n\r\n formatted_values.forEach((value, i) => {\r\n str = str.replace(`$${i}`, value);\r\n });\r\n\r\n return str;\r\n },\r\n\r\n diff(date_a, date_b, scale = DAY) {\r\n let milliseconds, seconds, hours, minutes, days, months, years;\r\n\r\n milliseconds = date_a - date_b;\r\n seconds = milliseconds / 1000;\r\n minutes = seconds / 60;\r\n hours = minutes / 60;\r\n days = hours / 24;\r\n months = days / 30;\r\n years = months / 12;\r\n\r\n if (!scale.endsWith('s')) {\r\n scale += 's';\r\n }\r\n\r\n return Math.floor(\r\n {\r\n milliseconds,\r\n seconds,\r\n minutes,\r\n hours,\r\n days,\r\n months,\r\n years,\r\n }[scale]\r\n );\r\n },\r\n\r\n today() {\r\n const vals = this.get_date_values(new Date()).slice(0, 3);\r\n return new Date(...vals);\r\n },\r\n\r\n now() {\r\n return new Date();\r\n },\r\n\r\n add(date, qty, scale) {\r\n qty = parseInt(qty, 10);\r\n const vals = [\r\n date.getFullYear() + (scale === YEAR ? qty : 0),\r\n date.getMonth() + (scale === MONTH ? qty : 0),\r\n date.getDate() + (scale === DAY ? qty : 0),\r\n date.getHours() + (scale === HOUR ? qty : 0),\r\n date.getMinutes() + (scale === MINUTE ? qty : 0),\r\n date.getSeconds() + (scale === SECOND ? qty : 0),\r\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\r\n ];\r\n return new Date(...vals);\r\n },\r\n\r\n start_of(date, scale) {\r\n const scores = {\r\n [YEAR]: 6,\r\n [MONTH]: 5,\r\n [DAY]: 4,\r\n [HOUR]: 3,\r\n [MINUTE]: 2,\r\n [SECOND]: 1,\r\n [MILLISECOND]: 0,\r\n };\r\n\r\n function should_reset(_scale) {\r\n const max_score = scores[scale];\r\n return scores[_scale] <= max_score;\r\n }\r\n\r\n const vals = [\r\n date.getFullYear(),\r\n should_reset(YEAR) ? 0 : date.getMonth(),\r\n should_reset(MONTH) ? 1 : date.getDate(),\r\n should_reset(DAY) ? 0 : date.getHours(),\r\n should_reset(HOUR) ? 0 : date.getMinutes(),\r\n should_reset(MINUTE) ? 0 : date.getSeconds(),\r\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\r\n ];\r\n\r\n return new Date(...vals);\r\n },\r\n\r\n clone(date) {\r\n return new Date(...this.get_date_values(date));\r\n },\r\n\r\n get_date_values(date) {\r\n return [\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds(),\r\n ];\r\n },\r\n\r\n get_days_in_month(date) {\r\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n const month = date.getMonth();\r\n\r\n if (month !== 1) {\r\n return no_of_days[month];\r\n }\r\n\r\n // Feb\r\n const year = date.getFullYear();\r\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\r\n return 29;\r\n }\r\n return 28;\r\n },\r\n};\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\r\nfunction padStart(str, targetLength, padString) {\r\n str = str + '';\r\n targetLength = targetLength >> 0;\r\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\r\n if (str.length > targetLength) {\r\n return String(str);\r\n } else {\r\n targetLength = targetLength - str.length;\r\n if (targetLength > padString.length) {\r\n padString += padString.repeat(targetLength / padString.length);\r\n }\r\n return padString.slice(0, targetLength) + String(str);\r\n }\r\n}\r\n","export function $(expr, con) {\r\n return typeof expr === 'string'\r\n ? (con || document).querySelector(expr)\r\n : expr || null;\r\n}\r\n\r\nexport function createSVG(tag, attrs) {\r\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\r\n for (let attr in attrs) {\r\n if (attr === 'append_to') {\r\n const parent = attrs.append_to;\r\n parent.appendChild(elem);\r\n } else if (attr === 'innerHTML') {\r\n elem.innerHTML = attrs.innerHTML;\r\n } else {\r\n elem.setAttribute(attr, attrs[attr]);\r\n }\r\n }\r\n return elem;\r\n}\r\n\r\nexport function animateSVG(svgElement, attr, from, to) {\r\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\r\n\r\n if (animatedSvgElement === svgElement) {\r\n // triggered 2nd time programmatically\r\n // trigger artificial click event\r\n const event = document.createEvent('HTMLEvents');\r\n event.initEvent('click', true, true);\r\n event.eventName = 'click';\r\n animatedSvgElement.dispatchEvent(event);\r\n }\r\n}\r\n\r\nfunction getAnimationElement(\r\n svgElement,\r\n attr,\r\n from,\r\n to,\r\n dur = '0.4s',\r\n begin = '0.1s'\r\n) {\r\n const animEl = svgElement.querySelector('animate');\r\n if (animEl) {\r\n $.attr(animEl, {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin: 'click + ' + begin, // artificial click\r\n });\r\n return svgElement;\r\n }\r\n\r\n const animateElement = createSVG('animate', {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin,\r\n calcMode: 'spline',\r\n values: from + ';' + to,\r\n keyTimes: '0; 1',\r\n keySplines: cubic_bezier('ease-out'),\r\n });\r\n svgElement.appendChild(animateElement);\r\n\r\n return svgElement;\r\n}\r\n\r\nfunction cubic_bezier(name) {\r\n return {\r\n ease: '.25 .1 .25 1',\r\n linear: '0 0 1 1',\r\n 'ease-in': '.42 0 1 1',\r\n 'ease-out': '0 0 .58 1',\r\n 'ease-in-out': '.42 0 .58 1',\r\n }[name];\r\n}\r\n\r\n$.on = (element, event, selector, callback) => {\r\n if (!callback) {\r\n callback = selector;\r\n $.bind(element, event, callback);\r\n } else {\r\n $.delegate(element, event, selector, callback);\r\n }\r\n};\r\n\r\n$.off = (element, event, handler) => {\r\n element.removeEventListener(event, handler);\r\n};\r\n\r\n$.bind = (element, event, callback) => {\r\n event.split(/\\s+/).forEach(function (event) {\r\n element.addEventListener(event, callback);\r\n });\r\n};\r\n\r\n$.delegate = (element, event, selector, callback) => {\r\n element.addEventListener(event, function (e) {\r\n const delegatedTarget = e.target.closest(selector);\r\n if (delegatedTarget) {\r\n e.delegatedTarget = delegatedTarget;\r\n callback.call(this, e, delegatedTarget);\r\n }\r\n });\r\n};\r\n\r\n$.closest = (selector, element) => {\r\n if (!element) return null;\r\n\r\n if (element.matches(selector)) {\r\n return element;\r\n }\r\n\r\n return $.closest(selector, element.parentNode);\r\n};\r\n\r\n$.attr = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.attr(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.setAttribute(attr, value);\r\n};\r\n\r\n$.style = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.style(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.style[attr] = value;\r\n};\r\n","import date_utils from './date_utils';\r\nimport { $, createSVG, animateSVG } from './svg_utils';\r\n\r\nexport default class Bar {\r\n constructor(gantt, task) {\r\n this.set_defaults(gantt, task);\r\n this.prepare();\r\n this.draw();\r\n this.bind();\r\n }\r\n\r\n set_defaults(gantt, task) {\r\n this.action_completed = false;\r\n this.gantt = gantt;\r\n this.task = task;\r\n }\r\n\r\n prepare() {\r\n this.prepare_values();\r\n this.prepare_helpers();\r\n }\r\n\r\n prepare_values() {\r\n this.invalid = this.task.invalid;\r\n this.height = this.gantt.options.bar_height;\r\n this.x = this.compute_x();\r\n this.y = this.compute_y();\r\n this.corner_radius = this.gantt.options.bar_corner_radius;\r\n this.duration =\r\n date_utils.diff(this.task._end, this.task._start, 'hour') /\r\n this.gantt.options.step;\r\n this.width = this.gantt.options.column_width * this.duration;\r\n this.progress_width =\r\n this.gantt.options.column_width *\r\n this.duration *\r\n (this.task.progress / 100) || 0;\r\n this.group = createSVG('g', {\r\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\r\n 'data-id': this.task.id,\r\n });\r\n this.bar_group = createSVG('g', {\r\n class: 'bar-group',\r\n append_to: this.group,\r\n });\r\n this.handle_group = createSVG('g', {\r\n class: 'handle-group',\r\n append_to: this.group,\r\n });\r\n }\r\n\r\n prepare_helpers() {\r\n SVGElement.prototype.getX = function () {\r\n return +this.getAttribute('x');\r\n };\r\n SVGElement.prototype.getY = function () {\r\n return +this.getAttribute('y');\r\n };\r\n SVGElement.prototype.getWidth = function () {\r\n return +this.getAttribute('width');\r\n };\r\n SVGElement.prototype.getHeight = function () {\r\n return +this.getAttribute('height');\r\n };\r\n SVGElement.prototype.getEndX = function () {\r\n return this.getX() + this.getWidth();\r\n };\r\n }\r\n\r\n draw() {\r\n this.draw_bar();\r\n this.draw_progress_bar();\r\n this.draw_label();\r\n this.draw_resize_handles();\r\n }\r\n\r\n draw_bar() {\r\n this.$bar = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar, 'width', 0, this.width);\r\n\r\n if (this.invalid) {\r\n this.$bar.classList.add('bar-invalid');\r\n }\r\n }\r\n\r\n draw_progress_bar() {\r\n if (this.invalid) return;\r\n this.$bar_progress = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.progress_width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar-progress',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\r\n }\r\n\r\n draw_label() {\r\n createSVG('text', {\r\n x: this.x + this.width / 2,\r\n y: this.y + this.height / 2,\r\n innerHTML: this.task.name,\r\n class: 'bar-label',\r\n append_to: this.bar_group,\r\n });\r\n // labels get BBox in the next tick\r\n requestAnimationFrame(() => this.update_label_position());\r\n }\r\n\r\n draw_resize_handles() {\r\n if (this.invalid) return;\r\n\r\n const bar = this.$bar;\r\n const handle_width = 8;\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + bar.getWidth() - 9,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle right',\r\n append_to: this.handle_group,\r\n });\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + 1,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle left',\r\n append_to: this.handle_group,\r\n });\r\n\r\n if (this.task.progress && this.task.progress < 100) {\r\n this.$handle_progress = createSVG('polygon', {\r\n points: this.get_progress_polygon_points().join(','),\r\n class: 'handle progress',\r\n append_to: this.handle_group,\r\n });\r\n }\r\n }\r\n\r\n get_progress_polygon_points() {\r\n const bar_progress = this.$bar_progress;\r\n return [\r\n bar_progress.getEndX() - 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX() + 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX(),\r\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\r\n ];\r\n }\r\n\r\n bind() {\r\n if (this.invalid) return;\r\n this.setup_click_event();\r\n }\r\n\r\n setup_click_event() {\r\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.show_popup();\r\n this.gantt.unselect_all();\r\n this.group.classList.add('active');\r\n });\r\n\r\n $.on(this.group, 'dblclick', (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.gantt.trigger_event('click', [this.task]);\r\n });\r\n }\r\n\r\n show_popup() {\r\n if (this.gantt.bar_being_dragged) return;\r\n\r\n const start_date = date_utils.format(\r\n this.task._start,\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const end_date = date_utils.format(\r\n date_utils.add(this.task._end, -1, 'second'),\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const subtitle = start_date + ' - ' + end_date;\r\n\r\n this.gantt.show_popup({\r\n target_element: this.$bar,\r\n title: this.task.name,\r\n subtitle: subtitle,\r\n task: this.task,\r\n });\r\n this.gantt.handle_selected(this.task);\r\n }\r\n\r\n update_bar_position({ x = null, width = null }) {\r\n const bar = this.$bar;\r\n if (x) {\r\n // // get all x values of parent task\r\n // const xs = this.task.dependencies.map((dep) => {\r\n // return this.gantt.get_bar(dep).$bar.getX();\r\n // });\r\n // // child task must not go before parent\r\n // const valid_x = xs.reduce((prev, curr) => {\r\n // return x >= curr;\r\n // }, x);\r\n // if (!valid_x) {\r\n // width = null;\r\n // return;\r\n // }\r\n this.update_attr(bar, 'x', x);\r\n }\r\n if (width && width >= this.gantt.options.column_width) {\r\n this.update_attr(bar, 'width', width);\r\n }\r\n this.update_label_position();\r\n this.update_handle_position();\r\n this.update_progressbar_position();\r\n this.update_arrow_position();\r\n }\r\n\r\n date_changed() {\r\n let changed = false;\r\n const { new_start_date, new_end_date } = this.compute_start_end_date();\r\n\r\n if (Number(this.task._start) !== Number(new_start_date)) {\r\n changed = true;\r\n this.task._start = new_start_date;\r\n }\r\n\r\n if (Number(this.task._end) !== Number(new_end_date)) {\r\n changed = true;\r\n this.task._end = new_end_date;\r\n }\r\n\r\n if (!changed) return;\r\n\r\n this.gantt.trigger_event('date_change', [\r\n this.task,\r\n new_start_date,\r\n date_utils.add(new_end_date, -1, 'second'),\r\n ]);\r\n }\r\n\r\n progress_changed() {\r\n const new_progress = this.compute_progress();\r\n this.task.progress = new_progress;\r\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\r\n }\r\n\r\n set_action_completed() {\r\n this.action_completed = true;\r\n setTimeout(() => (this.action_completed = false), 1000);\r\n }\r\n\r\n compute_start_end_date() {\r\n const bar = this.$bar;\r\n const x_in_units = bar.getX() / this.gantt.options.column_width;\r\n const new_start_date = date_utils.add(\r\n this.gantt.gantt_start,\r\n x_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\r\n const new_end_date = date_utils.add(\r\n new_start_date,\r\n width_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n\r\n return { new_start_date, new_end_date };\r\n }\r\n\r\n compute_progress() {\r\n const progress =\r\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\r\n return parseInt(progress, 10);\r\n }\r\n\r\n compute_x() {\r\n const { step, column_width } = this.gantt.options;\r\n const task_start = this.task._start;\r\n const gantt_start = this.gantt.gantt_start;\r\n\r\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\r\n let x = (diff / step) * column_width;\r\n\r\n if (this.gantt.view_is('Month')) {\r\n const diff = date_utils.diff(task_start, gantt_start, 'day');\r\n x = (diff * column_width) / 30;\r\n }\r\n return x;\r\n }\r\n\r\n compute_y() {\r\n return (\r\n this.gantt.options.header_height +\r\n this.gantt.options.padding +\r\n this.task._index * (this.height + this.gantt.options.padding)\r\n );\r\n }\r\n\r\n get_snap_position(dx) {\r\n let odx = dx,\r\n rem,\r\n position;\r\n\r\n if (this.gantt.view_is('Week')) {\r\n rem = dx % (this.gantt.options.column_width / 7);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 14\r\n ? 0\r\n : this.gantt.options.column_width / 7);\r\n } else if (this.gantt.view_is('Month')) {\r\n rem = dx % (this.gantt.options.column_width / 30);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 60\r\n ? 0\r\n : this.gantt.options.column_width / 30);\r\n } else {\r\n rem = dx % this.gantt.options.column_width;\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 2\r\n ? 0\r\n : this.gantt.options.column_width);\r\n }\r\n return position;\r\n }\r\n\r\n update_attr(element, attr, value) {\r\n value = +value;\r\n if (!isNaN(value)) {\r\n element.setAttribute(attr, value);\r\n }\r\n return element;\r\n }\r\n\r\n update_progressbar_position() {\r\n if (this.invalid) return;\r\n this.$bar_progress.setAttribute('x', this.$bar.getX());\r\n this.$bar_progress.setAttribute(\r\n 'width',\r\n this.$bar.getWidth() * (this.task.progress / 100)\r\n );\r\n }\r\n\r\n update_label_position() {\r\n const bar = this.$bar,\r\n label = this.group.querySelector('.bar-label');\r\n\r\n if (label.getBBox().width > bar.getWidth()) {\r\n label.classList.add('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\r\n } else {\r\n label.classList.remove('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\r\n }\r\n }\r\n\r\n update_handle_position() {\r\n if (this.invalid) return;\r\n const bar = this.$bar;\r\n this.handle_group\r\n .querySelector('.handle.left')\r\n .setAttribute('x', bar.getX() + 1);\r\n this.handle_group\r\n .querySelector('.handle.right')\r\n .setAttribute('x', bar.getEndX() - 9);\r\n const handle = this.group.querySelector('.handle.progress');\r\n handle &&\r\n handle.setAttribute('points', this.get_progress_polygon_points());\r\n }\r\n\r\n update_arrow_position() {\r\n this.arrows = this.arrows || [];\r\n for (let arrow of this.arrows) {\r\n arrow.update();\r\n }\r\n }\r\n}\r\n\r\nfunction isFunction(functionToCheck) {\r\n var getType = {};\r\n return (\r\n functionToCheck &&\r\n getType.toString.call(functionToCheck) === '[object Function]'\r\n );\r\n}\r\n","import { createSVG } from './svg_utils';\r\n\r\nexport default class Arrow {\r\n constructor(gantt, from_task, to_task) {\r\n this.gantt = gantt;\r\n this.from_task = from_task;\r\n this.to_task = to_task;\r\n\r\n this.calculate_path();\r\n this.draw();\r\n }\r\n\r\n calculate_path() {\r\n let start_x =\r\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\r\n\r\n const condition = () =>\r\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\r\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\r\n\r\n while (condition()) {\r\n start_x -= 10;\r\n }\r\n\r\n const start_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.from_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\r\n const end_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height / 2 +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.to_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const from_is_below_to =\r\n this.from_task.task._index > this.to_task.task._index;\r\n const curve = this.gantt.options.arrow_curve;\r\n const clockwise = from_is_below_to ? 1 : 0;\r\n const curve_y = from_is_below_to ? -curve : curve;\r\n const offset = from_is_below_to\r\n ? end_y + this.gantt.options.arrow_curve\r\n : end_y - this.gantt.options.arrow_curve;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n V ${offset}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n\r\n if (\r\n this.to_task.$bar.getX() <\r\n this.from_task.$bar.getX() + this.gantt.options.padding\r\n ) {\r\n const down_1 = this.gantt.options.padding / 2 - curve;\r\n const down_2 =\r\n this.to_task.$bar.getY() +\r\n this.to_task.$bar.getHeight() / 2 -\r\n curve_y;\r\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n v ${down_1}\r\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\r\n H ${left}\r\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\r\n V ${down_2}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n }\r\n }\r\n\r\n draw() {\r\n this.element = createSVG('path', {\r\n d: this.path,\r\n 'data-from': this.from_task.task.id,\r\n 'data-to': this.to_task.task.id,\r\n });\r\n }\r\n\r\n update() {\r\n this.calculate_path();\r\n this.element.setAttribute('d', this.path);\r\n }\r\n}\r\n","export default class Popup {\r\n constructor(parent, custom_html) {\r\n this.parent = parent;\r\n this.custom_html = custom_html;\r\n this.make();\r\n }\r\n\r\n make() {\r\n this.parent.innerHTML = `\r\n
\r\n
\r\n
\r\n `;\r\n\r\n this.hide();\r\n\r\n this.title = this.parent.querySelector('.title');\r\n this.subtitle = this.parent.querySelector('.subtitle');\r\n this.pointer = this.parent.querySelector('.pointer');\r\n }\r\n\r\n show(options) {\r\n if (!options.target_element) {\r\n throw new Error('target_element is required to show popup');\r\n }\r\n if (!options.position) {\r\n options.position = 'left';\r\n }\r\n const target_element = options.target_element;\r\n\r\n if (this.custom_html) {\r\n let html = this.custom_html(options.task);\r\n html += '
';\r\n this.parent.innerHTML = html;\r\n this.pointer = this.parent.querySelector('.pointer');\r\n } else {\r\n // set data\r\n this.title.innerHTML = options.title;\r\n this.subtitle.innerHTML = options.subtitle;\r\n this.parent.style.width = this.parent.clientWidth + 'px';\r\n }\r\n\r\n // set position\r\n let position_meta;\r\n if (target_element instanceof HTMLElement) {\r\n position_meta = target_element.getBoundingClientRect();\r\n } else if (target_element instanceof SVGElement) {\r\n position_meta = options.target_element.getBBox();\r\n }\r\n\r\n if (options.position === 'left') {\r\n this.parent.style.left =\r\n position_meta.x + (position_meta.width + 10) + 'px';\r\n this.parent.style.top = position_meta.y + 'px';\r\n\r\n this.pointer.style.transform = 'rotateZ(90deg)';\r\n this.pointer.style.left = '-7px';\r\n this.pointer.style.top = '2px';\r\n }\r\n\r\n // show\r\n this.parent.style.opacity = 1;\r\n }\r\n\r\n hide() {\r\n this.parent.style.opacity = 0;\r\n this.parent.style.left = 0;\r\n }\r\n}\r\n","import { $ } from './svg_utils';\r\n\r\nexport default class Table {\r\n dragStartY = 0;\r\n constructor(gantt, columns) {\r\n this.set_defaults(gantt, columns);\r\n }\r\n\r\n set_defaults(gantt, columns) {\r\n this.gantt = gantt;\r\n this.columns = columns;\r\n }\r\n\r\n draw_table_header() {\r\n const $thead = document.createElement('thead');\r\n const $tr = document.createElement('tr');\r\n\r\n this.columns.forEach((column) => {\r\n const $th = document.createElement('th');\r\n $th.textContent = column.title;\r\n\r\n $tr.appendChild($th);\r\n });\r\n\r\n $thead.appendChild($tr);\r\n $thead.classList.add('table-header');\r\n\r\n $.style($tr, 'height', this.gantt.options.header_height + 9 + 'px');\r\n\r\n return $thead;\r\n }\r\n\r\n get_parentNode(tag, target) {\r\n if (target.tagName === tag.toUpperCase()) return target;\r\n return this.get_parentNode(tag, target.parentNode);\r\n }\r\n\r\n draw_table_body(tasks) {\r\n this.tasks = this.gantt.setGroupPosition(tasks);\r\n\r\n const $tbody = document.createElement('tbody');\r\n $tbody.classList.add('table-body');\r\n\r\n this.make_table_row().forEach((row) => $tbody.append(row));\r\n\r\n $tbody.addEventListener('mousedown', (e) => {\r\n const $td = this.get_parentNode('td', e.target);\r\n\r\n $td.classList.contains('draggable-item') &&\r\n this.bind_draggable_event($tbody);\r\n });\r\n\r\n return $tbody;\r\n }\r\n\r\n isRowLine(id) {\r\n if (id <= 2) return false;\r\n const target = this.tasks.find((t) => t.id === `${id}`);\r\n\r\n return !target.groupPosition.includes('last');\r\n }\r\n\r\n make_table_row() {\r\n return this.tasks.map((task, index) => {\r\n const deps = task.level - 1;\r\n const $tr = document.createElement('tr');\r\n $tr.setAttribute('draggable', 'true');\r\n $tr.setAttribute('data-id', task.id);\r\n $.style($tr, {\r\n height:\r\n this.gantt.options.bar_height +\r\n this.gantt.options.padding +\r\n 'px',\r\n });\r\n\r\n if (deps === 1 && task.groupPosition.includes('last')) {\r\n $tr.classList.add('root-last');\r\n }\r\n\r\n this.columns.forEach((column) => {\r\n const $td = document.createElement('td');\r\n const { data, render } = column;\r\n\r\n if (data === 'drag') {\r\n $td.innerHTML = ``;\r\n $td.className = 'draggable-item';\r\n $tr.append($td);\r\n return;\r\n }\r\n\r\n if (data === 'wbs') {\r\n $td.className = data;\r\n }\r\n\r\n if (data === 'name' && task.level > 1) {\r\n $td.setAttribute('rel', task.type);\r\n $td.className = `work-name indent-${deps} indent-${deps}-${task.groupPosition[0]}`;\r\n\r\n if (task.groupPosition[1]) {\r\n $td.classList.add(\r\n `indent-${deps}-${task.groupPosition[1]}`\r\n );\r\n }\r\n\r\n if (task.type !== 'default') {\r\n $td.classList.add(task.closed ? 'closed' : 'opened');\r\n }\r\n\r\n for (let i = 0; i < deps; i++) {\r\n const $ins = document.createElement('ins');\r\n $ins.textContent = '';\r\n\r\n this.isRowLine(task.parentId) &&\r\n $ins.classList.add('row-line');\r\n\r\n if (deps === 1 || i === deps - 2) {\r\n $ins.classList.add('marker');\r\n\r\n deps > 1 && $ins.classList.add('row-line');\r\n\r\n $td.append($ins);\r\n break;\r\n }\r\n\r\n $td.append($ins);\r\n }\r\n }\r\n\r\n if (render) {\r\n const child_node = render(task[data], task);\r\n $td.append(child_node);\r\n } else {\r\n const text = document.createTextNode(task[data] ?? '');\r\n $td.append(text);\r\n }\r\n\r\n $tr.append($td);\r\n });\r\n\r\n $tr.addEventListener('mousedown', (e) => {\r\n const $td = this.get_parentNode('td', e.target);\r\n\r\n if ($td.classList.contains('draggable-item')) {\r\n $tr.addEventListener('dragstart', (e) => {\r\n e.target.classList.add('dragging');\r\n });\r\n\r\n $tr.addEventListener('dragend', (e) => {\r\n e.target.classList.remove('dragging');\r\n });\r\n }\r\n });\r\n\r\n return $tr;\r\n });\r\n }\r\n\r\n get_drag_after_element(container, y) {\r\n const draggableElements = [\r\n ...container.querySelectorAll('tr:not(.dragging)'),\r\n ];\r\n\r\n return draggableElements.reduce(\r\n (closest, child) => {\r\n const box = child.getBoundingClientRect();\r\n const offset = y - box.top - box.height / 2;\r\n if (offset < 0 && offset > closest.offset) {\r\n return { offset: offset, element: child };\r\n } else {\r\n return closest;\r\n }\r\n },\r\n { offset: Number.NEGATIVE_INFINITY }\r\n ).element;\r\n }\r\n\r\n find_task_item(id) {\r\n return this.tasks.find((t) => t.id === id);\r\n }\r\n\r\n bind_draggable_event($tbody) {\r\n $tbody.addEventListener('dragover', (e) => {\r\n e.preventDefault();\r\n if (!this.dragStartY) this.dragStartY = e.clientY;\r\n\r\n this.draggableEl = document.querySelector('.dragging');\r\n this.afterElement = this.get_drag_after_element($tbody, e.clientY);\r\n\r\n $tbody.insertBefore(this.draggableEl, this.afterElement);\r\n });\r\n\r\n $tbody.addEventListener('drop', async (e) => {\r\n e.preventDefault();\r\n const targetItem = this.find_task_item(\r\n this.get_parentNode('tr', e.target).getAttribute('data-id')\r\n );\r\n const dragItem = this.find_task_item(\r\n this.draggableEl.getAttribute('data-id')\r\n );\r\n const afterItem = this.find_task_item(\r\n this.afterElement.getAttribute('data-id')\r\n );\r\n\r\n const params = {\r\n c_id: dragItem.id,\r\n ref: afterItem.parentId,\r\n c_position:\r\n e.clientY > this.dragStartY\r\n ? afterItem.position - 1\r\n : afterItem.position,\r\n level: afterItem.level,\r\n p_position: dragItem.position,\r\n p_parentId: dragItem.parentId,\r\n };\r\n\r\n if (targetItem.type !== 'default') {\r\n const arr = this.tasks.filter(\r\n (t) => t.parentId === Number(targetItem.id)\r\n ).length;\r\n params.ref = targetItem.id;\r\n params.level = targetItem.level + 1;\r\n params.c_position = arr ? arr : 0;\r\n }\r\n\r\n this.dragStartY = 0;\r\n this.gantt.draggble_rerender(params);\r\n this.gantt.trigger_event('drag_row', [params]);\r\n });\r\n }\r\n}\r\n","import { $ } from './svg_utils';\r\n\r\nexport default class Split {\r\n constructor(wrapper) {\r\n this.draw_split_bar(wrapper);\r\n }\r\n\r\n draw_split_bar(elem) {\r\n const $split_bar = document.createElement('div');\r\n $split_bar.classList.add('split-bar');\r\n\r\n let x = 0;\r\n\r\n const mouseDownHandler = function (e) {\r\n x = e.clientX;\r\n\r\n document.addEventListener('mousemove', mouseMoveHandler);\r\n document.addEventListener('mouseup', mouseUpHandler);\r\n };\r\n\r\n const mouseMoveHandler = function (e) {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n const dx = e.clientX - x;\r\n const left =\r\n (Math.max(\r\n 0,\r\n Math.min($split_bar.offsetLeft + dx, elem.clientWidth)\r\n ) /\r\n elem.clientWidth) *\r\n 100;\r\n\r\n $.style($split_bar, { left: `${left}%` });\r\n $.style($table, { 'flex-basis': `${left}%` });\r\n $.style($gantt, { 'flex-basis': `${100 - left}%` });\r\n $.style($table, { 'overflow-x': 'hidden' });\r\n $.style($gantt, { 'overflow-x': 'hidden' });\r\n\r\n x = e.clientX;\r\n };\r\n\r\n const mouseUpHandler = function () {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n document.removeEventListener('mousemove', mouseMoveHandler);\r\n document.removeEventListener('mouseup', mouseUpHandler);\r\n\r\n $.style($table, { 'overflow-x': 'auto' });\r\n $.style($gantt, { 'overflow-x': 'auto' });\r\n };\r\n\r\n $split_bar.addEventListener('mousedown', mouseDownHandler);\r\n elem.prepend($split_bar);\r\n }\r\n}\r\n","import date_utils from './date_utils';\r\nimport { $, createSVG } from './svg_utils';\r\nimport Bar from './bar';\r\nimport Arrow from './arrow';\r\nimport Popup from './popup';\r\nimport Table from './table';\r\nimport Split from './split';\r\n\r\nimport './gantt.scss';\r\n\r\nconst VIEW_MODE = {\r\n QUARTER_DAY: 'Quarter Day',\r\n HALF_DAY: 'Half Day',\r\n DAY: 'Day',\r\n WEEK: 'Week',\r\n MONTH: 'Month',\r\n YEAR: 'Year',\r\n};\r\n\r\nexport default class Gantt {\r\n constructor(wrapper, tasks, options, contents) {\r\n this.originTasks = tasks;\r\n\r\n this.setup_options(options);\r\n this.setup_tasks(tasks);\r\n\r\n this.setup_wrapper(wrapper);\r\n\r\n // initialize with default view mode\r\n this.change_view_mode();\r\n this.setup_split_bar();\r\n this.setup_table(contents);\r\n\r\n this.bind_events();\r\n }\r\n\r\n setup_wrapper(element) {\r\n let svg_element;\r\n let wrapper_element;\r\n\r\n // CSS Selector is passed\r\n if (typeof element === 'string') {\r\n element = document.querySelector(element);\r\n }\r\n\r\n // get the SVGElement\r\n if (element instanceof HTMLElement) {\r\n wrapper_element = element;\r\n svg_element = element.querySelector('svg');\r\n } else if (element instanceof SVGElement) {\r\n svg_element = element;\r\n } else {\r\n throw new TypeError(\r\n 'Frappé Gantt only supports usage of a string CSS selector,' +\r\n \" HTML DOM element or SVG DOM element for the 'element' parameter\"\r\n );\r\n }\r\n\r\n // svg element\r\n if (!svg_element) {\r\n // create it\r\n this.$svg = createSVG('svg', {\r\n append_to: wrapper_element,\r\n class: 'gantt',\r\n });\r\n } else {\r\n this.$svg = svg_element;\r\n this.$svg.classList.add('gantt');\r\n }\r\n\r\n this.$wrapper = document.createElement('div');\r\n this.$wrapper.classList.add('wrapper');\r\n\r\n // wrapper element\r\n this.$container = document.createElement('div');\r\n this.$container.classList.add('gantt-container');\r\n\r\n const parent_element = this.$svg.parentElement;\r\n element.appendChild(this.setup_mode_handler());\r\n parent_element.appendChild(this.$wrapper);\r\n this.$wrapper.appendChild(this.$container);\r\n this.$container.appendChild(this.$svg);\r\n\r\n // popup wrapper\r\n this.popup_wrapper = document.createElement('div');\r\n this.popup_wrapper.classList.add('popup-wrapper');\r\n this.$container.appendChild(this.popup_wrapper);\r\n }\r\n\r\n setup_mode_handler() {\r\n const wrapper = document.createElement('div');\r\n const excel_export = document.createElement('button');\r\n const btn_group = document.createElement('div');\r\n\r\n wrapper.className = 'mt well well-sm clearfix';\r\n excel_export.className = 'btn btn-default btn-sm mr-xs';\r\n\r\n excel_export.innerText = 'Excel';\r\n\r\n $.style(btn_group, { float: 'right' });\r\n\r\n Object.keys(VIEW_MODE).forEach((key) => {\r\n const btn = document.createElement('button');\r\n btn.className = `btn btn-default btn-sm mr-xs ${\r\n VIEW_MODE[key] === this.options.view_mode ? 'active' : ''\r\n }`;\r\n btn.innerText = VIEW_MODE[key];\r\n btn.addEventListener('click', (e) => {\r\n e.target.classList.add('active');\r\n e.target.parentNode.childNodes.forEach((b) =>\r\n b.classList.remove('active')\r\n );\r\n\r\n this.change_view_mode(VIEW_MODE[key]);\r\n });\r\n\r\n btn_group.appendChild(btn);\r\n });\r\n\r\n wrapper.append(excel_export);\r\n wrapper.append(btn_group);\r\n\r\n return wrapper;\r\n }\r\n\r\n setup_options(options) {\r\n const default_options = {\r\n header_height: 50,\r\n column_width: 30,\r\n step: 24,\r\n view_modes: [...Object.values(VIEW_MODE)],\r\n bar_height: 20,\r\n bar_corner_radius: 3,\r\n arrow_curve: 5,\r\n padding: 18,\r\n view_mode: 'Day',\r\n date_format: 'YYYY-MM-DD',\r\n popup_trigger: 'click',\r\n custom_popup_html: null,\r\n language: 'ko',\r\n };\r\n this.options = Object.assign({}, default_options, options);\r\n }\r\n\r\n setup_tasks(tasks) {\r\n // prepare tasks\r\n this.tasks = this.sort_tasks(tasks).map((task, i) => {\r\n // convert to Date objects\r\n task._start = date_utils.parse(task.start);\r\n task._end = date_utils.parse(task.end);\r\n\r\n // make task invalid if duration too large\r\n if (date_utils.diff(task._end, task._start, 'year') > 10) {\r\n task.end = null;\r\n }\r\n\r\n // cache index\r\n task._index = i;\r\n\r\n // invalid dates\r\n if (!task.start && !task.end) {\r\n const today = date_utils.today();\r\n task._start = today;\r\n task._end = date_utils.add(today, 2, 'day');\r\n }\r\n\r\n if (!task.start && task.end) {\r\n task._start = date_utils.add(task._end, -2, 'day');\r\n }\r\n\r\n if (task.start && !task.end) {\r\n task._end = date_utils.add(task._start, 2, 'day');\r\n }\r\n\r\n // if hours is not set, assume the last day is full day\r\n // e.g: 2018-09-09 becomes 2018-09-09 23:59:59\r\n const task_end_values = date_utils.get_date_values(task._end);\r\n if (task_end_values.slice(3).every((d) => d === 0)) {\r\n task._end = date_utils.add(task._end, 24, 'hour');\r\n }\r\n\r\n // invalid flag\r\n if (!task.start || !task.end) {\r\n task.invalid = true;\r\n }\r\n\r\n // dependencies\r\n if (typeof task.dependencies === 'string' || !task.dependencies) {\r\n let deps = [];\r\n if (task.dependencies) {\r\n deps = task.dependencies\r\n .split(',')\r\n .map((d) => d.trim())\r\n .filter((d) => d);\r\n }\r\n task.dependencies = deps;\r\n }\r\n\r\n // uids\r\n if (!task.id) {\r\n task.id = generate_id(task);\r\n }\r\n\r\n return task;\r\n });\r\n\r\n this.setup_dependencies();\r\n }\r\n\r\n setup_dependencies() {\r\n this.dependency_map = {};\r\n for (let t of this.tasks) {\r\n for (let d of t.dependencies) {\r\n this.dependency_map[d] = this.dependency_map[d] || [];\r\n this.dependency_map[d].push(t.id);\r\n }\r\n }\r\n }\r\n\r\n refresh(tasks) {\r\n this.setup_tasks(tasks);\r\n this.change_view_mode();\r\n this.rerender_table();\r\n this.originTasks = tasks;\r\n }\r\n\r\n change_view_mode(mode = this.options.view_mode) {\r\n this.update_view_scale(mode);\r\n this.setup_dates();\r\n this.render();\r\n // fire viewmode_change event\r\n this.trigger_event('view_change', [mode]);\r\n }\r\n\r\n update_view_scale(view_mode) {\r\n this.options.view_mode = view_mode;\r\n\r\n if (view_mode === VIEW_MODE.DAY) {\r\n this.options.step = 24;\r\n this.options.column_width = 38;\r\n } else if (view_mode === VIEW_MODE.HALF_DAY) {\r\n this.options.step = 24 / 2;\r\n this.options.column_width = 38;\r\n } else if (view_mode === VIEW_MODE.QUARTER_DAY) {\r\n this.options.step = 24 / 4;\r\n this.options.column_width = 38;\r\n } else if (view_mode === VIEW_MODE.WEEK) {\r\n this.options.step = 24 * 7;\r\n this.options.column_width = 140;\r\n } else if (view_mode === VIEW_MODE.MONTH) {\r\n this.options.step = 24 * 30;\r\n this.options.column_width = 120;\r\n } else if (view_mode === VIEW_MODE.YEAR) {\r\n this.options.step = 24 * 365;\r\n this.options.column_width = 120;\r\n }\r\n }\r\n\r\n setup_dates() {\r\n this.setup_gantt_dates();\r\n this.setup_date_values();\r\n }\r\n\r\n setup_gantt_dates() {\r\n this.gantt_start = this.gantt_end = null;\r\n\r\n for (let task of this.tasks) {\r\n // set global start and end date\r\n if (!this.gantt_start || task._start < this.gantt_start) {\r\n this.gantt_start = task._start;\r\n }\r\n if (!this.gantt_end || task._end > this.gantt_end) {\r\n this.gantt_end = task._end;\r\n }\r\n }\r\n\r\n this.gantt_start = date_utils.start_of(this.gantt_start, 'day');\r\n this.gantt_end = date_utils.start_of(this.gantt_end, 'day');\r\n\r\n // add date padding on both sides\r\n if (this.view_is([VIEW_MODE.QUARTER_DAY, VIEW_MODE.HALF_DAY])) {\r\n this.gantt_start = date_utils.add(this.gantt_start, -7, 'day');\r\n this.gantt_end = date_utils.add(this.gantt_end, 7, 'day');\r\n } else if (this.view_is(VIEW_MODE.MONTH)) {\r\n this.gantt_start = date_utils.start_of(this.gantt_start, 'year');\r\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'year');\r\n } else if (this.view_is(VIEW_MODE.YEAR)) {\r\n this.gantt_start = date_utils.add(this.gantt_start, -2, 'year');\r\n this.gantt_end = date_utils.add(this.gantt_end, 2, 'year');\r\n } else {\r\n this.gantt_start = date_utils.add(this.gantt_start, -1, 'month');\r\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'month');\r\n }\r\n }\r\n\r\n setup_date_values() {\r\n this.dates = [];\r\n let cur_date = null;\r\n\r\n while (cur_date === null || cur_date < this.gantt_end) {\r\n if (!cur_date) {\r\n cur_date = date_utils.clone(this.gantt_start);\r\n } else {\r\n if (this.view_is(VIEW_MODE.YEAR)) {\r\n cur_date = date_utils.add(cur_date, 1, 'year');\r\n } else if (this.view_is(VIEW_MODE.MONTH)) {\r\n cur_date = date_utils.add(cur_date, 1, 'month');\r\n } else {\r\n cur_date = date_utils.add(\r\n cur_date,\r\n this.options.step,\r\n 'hour'\r\n );\r\n }\r\n }\r\n this.dates.push(cur_date);\r\n }\r\n }\r\n\r\n bind_events() {\r\n this.bind_grid_click();\r\n this.bind_bar_events();\r\n this.bind_scroll_event();\r\n }\r\n\r\n render() {\r\n this.clear();\r\n this.setup_layers();\r\n this.make_grid();\r\n this.make_grid_header();\r\n this.make_dates();\r\n this.make_bars();\r\n this.make_arrows();\r\n this.map_arrows_on_bars();\r\n this.set_width();\r\n this.set_scroll_position();\r\n }\r\n\r\n rerender_table() {\r\n document.querySelector('.table-body')?.remove();\r\n\r\n const $table_body = this.table.draw_table_body(this.tasks, {\r\n height: this.options.bar_height + this.options.padding + 'px',\r\n });\r\n\r\n document\r\n .querySelector('.table-container table')\r\n .appendChild($table_body);\r\n\r\n $table_body.addEventListener('click', (event) =>\r\n this.bind_table_event(event)\r\n );\r\n }\r\n\r\n draggble_rerender(item) {\r\n this.update_origin_tasks(item);\r\n this.render();\r\n this.rerender_table();\r\n }\r\n\r\n sort_tasks(tasks) {\r\n const sorted_tasks = [...tasks];\r\n const children_idx_info = {};\r\n\r\n sorted_tasks\r\n .sort((a, b) => a.level - b.level || a.position - b.position)\r\n .forEach((task, taskIdx) => {\r\n if (task.parentId !== 2) {\r\n if (children_idx_info.hasOwnProperty(task.parentId)) {\r\n children_idx_info[task.parentId].push(taskIdx);\r\n } else {\r\n children_idx_info[task.parentId] = [taskIdx];\r\n }\r\n\r\n const parentIdx = sorted_tasks.findIndex(\r\n (item) => +item.id === task.parentId\r\n );\r\n\r\n sorted_tasks.splice(taskIdx, 1);\r\n sorted_tasks.splice(\r\n parentIdx + children_idx_info[task.parentId].length,\r\n 0,\r\n task\r\n );\r\n }\r\n }, []);\r\n\r\n return sorted_tasks;\r\n }\r\n\r\n setGroupPosition(data) {\r\n return data.reduce((acc, cur) => {\r\n const group = data.filter((t) => t.parentId === cur.parentId);\r\n\r\n cur.groupPosition = [];\r\n\r\n if (group[0].id === cur.id) {\r\n cur.groupPosition.push('first');\r\n }\r\n if (group[group.length - 1].id === cur.id) {\r\n cur.groupPosition.push('last');\r\n }\r\n if (!cur.groupPosition.length) {\r\n cur.groupPosition.push('middle');\r\n }\r\n\r\n acc.push(cur);\r\n return acc;\r\n }, []);\r\n }\r\n\r\n update_dependecies(id) {\r\n if (id === 2) return [];\r\n\r\n const dependencies = this.tasks.find(\r\n (task) => task.id === id\r\n ).dependencies;\r\n\r\n if (!dependencies.length) return [id];\r\n return [...dependencies, id];\r\n }\r\n\r\n update_origin_tasks(item) {\r\n let tasks = this.tasks.reduce((acc, cur) => {\r\n if (cur.id === item.c_id) {\r\n const dependencies = this.update_dependecies(item.ref);\r\n\r\n cur = {\r\n ...cur,\r\n parentId: Number(item.ref),\r\n dependencies,\r\n position: item.c_position,\r\n level: item.level,\r\n wbs: dependencies.length\r\n ? `${dependencies.join('-')}-${item.c_id}`\r\n : `${item.c_id}`,\r\n };\r\n } else {\r\n if (\r\n cur.parentId === Number(item.ref) &&\r\n item.c_position === item.p_position\r\n ) {\r\n acc.push(cur);\r\n return acc;\r\n }\r\n\r\n if (cur.parentId === Number(item.ref)) {\r\n cur.position =\r\n item.c_position > item.p_position\r\n ? cur.position < item.p_position\r\n ? cur.position\r\n : cur.position <= item.c_position\r\n ? cur.position - 1\r\n : cur.position\r\n : cur.position > item.p_position\r\n ? cur.position\r\n : cur.position >= item.c_position\r\n ? cur.position + 1\r\n : cur.position;\r\n } else {\r\n if (cur.parentId === item.p_parentId) {\r\n cur.position =\r\n cur.position < item.p_position\r\n ? cur.position\r\n : cur.position - 1;\r\n }\r\n }\r\n }\r\n\r\n acc.push(cur);\r\n return acc;\r\n }, []);\r\n\r\n tasks = this.setGroupPosition(tasks);\r\n\r\n this.setup_tasks(tasks);\r\n this.originTasks = tasks;\r\n }\r\n\r\n setup_layers() {\r\n this.layers = {};\r\n const layers = [\r\n 'grid',\r\n 'arrow',\r\n 'progress',\r\n 'bar',\r\n 'details',\r\n 'header',\r\n 'date',\r\n ];\r\n // make group layers\r\n for (let layer of layers) {\r\n this.layers[layer] = createSVG('g', {\r\n class: layer,\r\n append_to: this.$svg,\r\n });\r\n }\r\n }\r\n\r\n setup_split_bar() {\r\n this.split = new Split(this.$wrapper);\r\n }\r\n\r\n setup_table(contents, handler) {\r\n this.table = new Table(this, contents, handler);\r\n this.make_table();\r\n }\r\n\r\n bind_table_event(event) {\r\n const $tr = event.target.closest('tr');\r\n const id = $tr.dataset.id;\r\n\r\n if (\r\n event.target.tagName !== 'INS' &&\r\n !event.target.classList.contains('marker')\r\n ) {\r\n const task = this.get_task(id);\r\n\r\n this.handle_selected(task);\r\n\r\n return;\r\n }\r\n\r\n const $target = event.target.closest('td');\r\n\r\n if (\r\n $target.getAttribute('rel') === 'folder' ||\r\n $target.getAttribute('rel') === 'drive'\r\n ) {\r\n let tasks = [...this.tasks];\r\n\r\n if ($target.classList.contains('closed')) {\r\n this.originTasks.forEach((task) => {\r\n if (task.id === id) {\r\n delete task.closed;\r\n return tasks.splice(task._index, 1, task);\r\n }\r\n\r\n if (task.dependencies.includes(id))\r\n tasks.splice(task._index, 0, task);\r\n });\r\n } else {\r\n tasks = this.tasks.reduce((acc, task) => {\r\n if (task.id === id) {\r\n return [...acc, { ...task, closed: true }];\r\n }\r\n\r\n if (!task.dependencies.includes(id)) {\r\n return [...acc, task];\r\n }\r\n\r\n return acc;\r\n }, []);\r\n }\r\n\r\n this.setup_tasks(tasks);\r\n this.render();\r\n this.rerender_table();\r\n }\r\n }\r\n\r\n make_table() {\r\n const $table_container = document.createElement('div');\r\n const $table = document.createElement('table');\r\n\r\n $table_container.className = 'table-container';\r\n\r\n const $table_header = this.table.draw_table_header();\r\n const $table_body = this.table.draw_table_body(this.tasks);\r\n\r\n $table.append($table_header);\r\n $table.append($table_body);\r\n\r\n $table_body.addEventListener('click', (event) =>\r\n this.bind_table_event(event)\r\n );\r\n\r\n $table_container.append($table);\r\n\r\n this.$wrapper.prepend($table_container);\r\n }\r\n\r\n make_grid() {\r\n this.make_grid_background();\r\n this.make_grid_rows();\r\n this.make_grid_ticks();\r\n this.make_grid_highlights();\r\n }\r\n\r\n handle_selected(task) {\r\n const $tr = this.$wrapper.querySelectorAll('tr')[task._index + 1];\r\n const $grid_row =\r\n this.$wrapper.querySelectorAll('.grid-row')[task._index];\r\n\r\n if (!$tr.classList.contains('selected')) {\r\n Array.prototype.forEach.call(\r\n this.$wrapper.querySelectorAll('.selected'),\r\n (elem) => elem.classList.remove('selected')\r\n );\r\n }\r\n\r\n $tr?.classList.toggle('selected');\r\n $grid_row?.classList.toggle('selected');\r\n }\r\n\r\n make_grid_background() {\r\n const grid_width = this.dates.length * this.options.column_width;\r\n const grid_height =\r\n this.options.header_height +\r\n this.options.padding +\r\n (this.options.bar_height + this.options.padding) *\r\n this.tasks.length;\r\n\r\n createSVG('rect', {\r\n x: 0,\r\n y: 0,\r\n width: grid_width,\r\n height: grid_height,\r\n class: 'grid-background',\r\n append_to: this.layers.grid,\r\n });\r\n\r\n $.attr(this.$svg, {\r\n height: grid_height,\r\n width: '100%',\r\n });\r\n }\r\n\r\n make_grid_rows() {\r\n const rows_layer = createSVG('g', { append_to: this.layers.grid });\r\n // const lines_layer = createSVG('g', { append_to: this.layers.grid });\r\n\r\n const row_width = this.dates.length * this.options.column_width;\r\n const row_height = this.options.bar_height + this.options.padding;\r\n\r\n let row_y = this.options.header_height + this.options.padding / 2;\r\n\r\n for (let task of this.tasks) {\r\n createSVG('rect', {\r\n x: 0,\r\n y: row_y,\r\n width: row_width,\r\n height: row_height,\r\n class: 'grid-row',\r\n append_to: rows_layer,\r\n });\r\n\r\n // createSVG('line', {\r\n // x1: 0,\r\n // y1: row_y + row_height,\r\n // x2: row_width,\r\n // y2: row_y + row_height,\r\n // class: 'row-line',\r\n // append_to: lines_layer,\r\n // });\r\n\r\n row_y += this.options.bar_height + this.options.padding;\r\n }\r\n }\r\n\r\n make_grid_header() {\r\n const header_width = this.dates.length * this.options.column_width;\r\n const header_height = this.options.header_height + 10;\r\n\r\n const pageScroll = window.scrollY;\r\n const originOffset =\r\n pageScroll + this.$wrapper.getBoundingClientRect().top;\r\n\r\n if (originOffset <= pageScroll) {\r\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\r\n window.scrollY - originOffset\r\n )}px)`;\r\n }\r\n\r\n createSVG('rect', {\r\n x: 0,\r\n y: 0,\r\n width: header_width,\r\n height: header_height,\r\n class: 'grid-header',\r\n append_to: this.layers.header,\r\n });\r\n }\r\n\r\n make_grid_ticks() {\r\n let tick_x = 0;\r\n let tick_y = this.options.header_height + this.options.padding / 2;\r\n let tick_height =\r\n (this.options.bar_height + this.options.padding) *\r\n this.tasks.length;\r\n\r\n for (let date of this.dates) {\r\n let tick_class = 'tick';\r\n // thick tick for monday\r\n if (this.view_is(VIEW_MODE.DAY) && date.getDate() === 1) {\r\n tick_class += ' thick';\r\n }\r\n // thick tick for first week\r\n if (\r\n this.view_is(VIEW_MODE.WEEK) &&\r\n date.getDate() >= 1 &&\r\n date.getDate() < 8\r\n ) {\r\n tick_class += ' thick';\r\n }\r\n // thick ticks for quarters\r\n if (this.view_is(VIEW_MODE.MONTH) && date.getMonth() % 3 === 0) {\r\n tick_class += ' thick';\r\n }\r\n\r\n createSVG('path', {\r\n d: `M ${tick_x} ${tick_y} v ${tick_height}`,\r\n class: tick_class,\r\n append_to: this.layers.grid,\r\n });\r\n\r\n if (this.view_is(VIEW_MODE.MONTH)) {\r\n tick_x +=\r\n (date_utils.get_days_in_month(date) *\r\n this.options.column_width) /\r\n 30;\r\n } else {\r\n tick_x += this.options.column_width;\r\n }\r\n }\r\n }\r\n\r\n make_grid_highlights() {\r\n // highlight today's date\r\n if (this.view_is(VIEW_MODE.DAY)) {\r\n const x =\r\n (date_utils.diff(date_utils.today(), this.gantt_start, 'hour') /\r\n this.options.step) *\r\n this.options.column_width;\r\n const y = 0;\r\n\r\n const width = this.options.column_width;\r\n const height =\r\n (this.options.bar_height + this.options.padding) *\r\n this.tasks.length +\r\n this.options.header_height +\r\n this.options.padding / 2;\r\n\r\n createSVG('rect', {\r\n x,\r\n y,\r\n width,\r\n height,\r\n class: 'today-highlight',\r\n append_to: this.layers.grid,\r\n });\r\n }\r\n }\r\n\r\n make_dates() {\r\n const pageScroll = window.scrollY;\r\n const originOffset =\r\n pageScroll + this.$wrapper.getBoundingClientRect().top;\r\n\r\n if (originOffset <= pageScroll) {\r\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\r\n window.scrollY - originOffset\r\n )}px)`;\r\n }\r\n\r\n for (let date of this.get_dates_to_draw()) {\r\n createSVG('text', {\r\n x: date.lower_x,\r\n y: date.lower_y,\r\n innerHTML: date.lower_text,\r\n class: 'lower-text',\r\n append_to: this.layers.date,\r\n });\r\n\r\n if (date.upper_text) {\r\n const $upper_text = createSVG('text', {\r\n x: date.upper_x,\r\n y: date.upper_y,\r\n innerHTML: date.upper_text,\r\n class: 'upper-text',\r\n append_to: this.layers.date,\r\n });\r\n\r\n // remove out-of-bound dates\r\n if (\r\n $upper_text.getBBox().x2 > this.layers.grid.getBBox().width\r\n ) {\r\n $upper_text.remove();\r\n }\r\n }\r\n }\r\n }\r\n\r\n get_dates_to_draw() {\r\n let last_date = null;\r\n const dates = this.dates.map((date, i) => {\r\n const d = this.get_date_info(date, last_date, i);\r\n last_date = date;\r\n return d;\r\n });\r\n return dates;\r\n }\r\n\r\n get_date_info(date, last_date, i) {\r\n if (!last_date) {\r\n last_date = date_utils.add(date, 1, 'year');\r\n }\r\n const date_text = {\r\n 'Quarter Day_lower': date_utils.format(\r\n date,\r\n 'HH',\r\n this.options.language\r\n ),\r\n 'Half Day_lower': date_utils.format(\r\n date,\r\n 'HH',\r\n this.options.language\r\n ),\r\n Day_lower:\r\n date.getDate() !== last_date.getDate()\r\n ? date_utils.format(date, 'D', this.options.language)\r\n : '',\r\n Week_lower:\r\n date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(date, 'D MMM', this.options.language)\r\n : date_utils.format(date, 'D', this.options.language),\r\n Month_lower: date_utils.format(date, 'MMMM', this.options.language),\r\n Year_lower: date_utils.format(date, 'YYYY', this.options.language),\r\n 'Quarter Day_upper':\r\n date.getDate() !== last_date.getDate()\r\n ? date_utils.format(date, 'D MMM', this.options.language)\r\n : '',\r\n 'Half Day_upper':\r\n date.getDate() !== last_date.getDate()\r\n ? date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(\r\n date,\r\n 'D MMM',\r\n this.options.language\r\n )\r\n : date_utils.format(date, 'D', this.options.language)\r\n : '',\r\n Day_upper:\r\n date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(date, 'MMMM', this.options.language)\r\n : '',\r\n Week_upper:\r\n date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(date, 'MMMM', this.options.language)\r\n : '',\r\n Month_upper:\r\n date.getFullYear() !== last_date.getFullYear()\r\n ? date_utils.format(date, 'YYYY', this.options.language)\r\n : '',\r\n Year_upper:\r\n date.getFullYear() !== last_date.getFullYear()\r\n ? date_utils.format(date, 'YYYY', this.options.language)\r\n : '',\r\n };\r\n\r\n const base_pos = {\r\n x: i * this.options.column_width,\r\n lower_y: this.options.header_height,\r\n upper_y: this.options.header_height - 25,\r\n };\r\n\r\n const x_pos = {\r\n 'Quarter Day_lower': (this.options.column_width * 4) / 2,\r\n 'Quarter Day_upper': 0,\r\n 'Half Day_lower': (this.options.column_width * 2) / 2,\r\n 'Half Day_upper': 0,\r\n Day_lower: this.options.column_width / 2,\r\n Day_upper: (this.options.column_width * 30) / 2,\r\n Week_lower: 0,\r\n Week_upper: (this.options.column_width * 4) / 2,\r\n Month_lower: this.options.column_width / 2,\r\n Month_upper: (this.options.column_width * 12) / 2,\r\n Year_lower: this.options.column_width / 2,\r\n Year_upper: (this.options.column_width * 30) / 2,\r\n };\r\n\r\n return {\r\n upper_text: date_text[`${this.options.view_mode}_upper`],\r\n lower_text: date_text[`${this.options.view_mode}_lower`],\r\n upper_x: base_pos.x + x_pos[`${this.options.view_mode}_upper`],\r\n upper_y: base_pos.upper_y,\r\n lower_x: base_pos.x + x_pos[`${this.options.view_mode}_lower`],\r\n lower_y: base_pos.lower_y,\r\n };\r\n }\r\n\r\n make_bars() {\r\n this.bars = this.tasks.map((task) => {\r\n const bar = new Bar(this, task);\r\n this.layers.bar.appendChild(bar.group);\r\n return bar;\r\n });\r\n }\r\n\r\n make_arrows() {\r\n this.arrows = [];\r\n for (let task of this.tasks) {\r\n let arrows = [];\r\n arrows = task.dependencies\r\n .map((task_id) => {\r\n const dependency = this.get_task(task_id);\r\n if (!dependency) return;\r\n const arrow = new Arrow(\r\n this,\r\n this.bars[dependency._index], // from_task\r\n this.bars[task._index] // to_task\r\n );\r\n this.layers.arrow.appendChild(arrow.element);\r\n return arrow;\r\n })\r\n .filter(Boolean); // filter falsy values\r\n this.arrows = this.arrows.concat(arrows);\r\n }\r\n }\r\n\r\n map_arrows_on_bars() {\r\n for (let bar of this.bars) {\r\n bar.arrows = this.arrows.filter((arrow) => {\r\n return (\r\n arrow.from_task.task.id === bar.task.id ||\r\n arrow.to_task.task.id === bar.task.id\r\n );\r\n });\r\n }\r\n }\r\n\r\n set_width() {\r\n const cur_width = this.$svg.getBoundingClientRect().width;\r\n const actual_width = this.$svg\r\n .querySelector('.grid .grid-row')\r\n .getAttribute('width');\r\n if (cur_width < actual_width) {\r\n this.$svg.setAttribute('width', actual_width);\r\n }\r\n }\r\n\r\n set_scroll_position() {\r\n const parent_element = this.$svg.parentElement;\r\n if (!parent_element) return;\r\n\r\n const hours_before_first_task = date_utils.diff(\r\n this.get_oldest_starting_date(),\r\n this.gantt_start,\r\n 'hour'\r\n );\r\n\r\n const scroll_pos =\r\n (hours_before_first_task / this.options.step) *\r\n this.options.column_width -\r\n this.options.column_width;\r\n\r\n parent_element.scrollLeft = scroll_pos;\r\n }\r\n\r\n bind_scroll_event() {\r\n const originOffset =\r\n window.scrollY + this.$wrapper.getBoundingClientRect().top;\r\n const $table_header = $('.table-header');\r\n let ticking = false;\r\n\r\n $.bind(\r\n window,\r\n 'scroll',\r\n () => {\r\n const pageScroll = window.scrollY;\r\n\r\n if (ticking) return;\r\n\r\n ticking = true;\r\n window.requestAnimationFrame(() => {\r\n if (originOffset <= pageScroll) {\r\n $table_header.style.top = `${Math.floor(\r\n pageScroll - originOffset\r\n )}px`;\r\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\r\n pageScroll - originOffset\r\n )}px)`;\r\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\r\n pageScroll - originOffset\r\n )}px)`;\r\n } else {\r\n $table_header.style.top = '0px';\r\n this.layers.header.style.transform =\r\n 'translate(0px, 0px)';\r\n this.layers.date.style.transform =\r\n 'translate(0px, 0px)';\r\n }\r\n\r\n ticking = false;\r\n });\r\n },\r\n { passive: true }\r\n );\r\n }\r\n\r\n bind_grid_click() {\r\n $.on(\r\n this.$svg,\r\n this.options.popup_trigger,\r\n '.grid-row, .grid-header',\r\n () => {\r\n this.unselect_all();\r\n this.hide_popup();\r\n }\r\n );\r\n }\r\n\r\n bind_bar_events() {\r\n let is_dragging = false;\r\n let x_on_start = 0;\r\n let y_on_start = 0;\r\n let is_resizing_left = false;\r\n let is_resizing_right = false;\r\n let parent_bar_id = null;\r\n let bars = []; // instanceof Bar\r\n this.bar_being_dragged = null;\r\n\r\n function action_in_progress() {\r\n return is_dragging || is_resizing_left || is_resizing_right;\r\n }\r\n\r\n $.on(this.$svg, 'mousedown', '.bar-wrapper, .handle', (e, element) => {\r\n const bar_wrapper = $.closest('.bar-wrapper', element);\r\n\r\n if (element.classList.contains('left')) {\r\n is_resizing_left = true;\r\n } else if (element.classList.contains('right')) {\r\n is_resizing_right = true;\r\n } else if (element.classList.contains('bar-wrapper')) {\r\n is_dragging = true;\r\n }\r\n\r\n bar_wrapper.classList.add('active');\r\n\r\n x_on_start = e.offsetX;\r\n y_on_start = e.offsetY;\r\n\r\n parent_bar_id = bar_wrapper.getAttribute('data-id');\r\n const ids = [\r\n parent_bar_id,\r\n ...this.get_all_dependent_tasks(parent_bar_id),\r\n ];\r\n bars = ids.map((id) => this.get_bar(id));\r\n\r\n this.bar_being_dragged = parent_bar_id;\r\n\r\n bars.forEach((bar) => {\r\n const $bar = bar.$bar;\r\n $bar.ox = $bar.getX();\r\n $bar.oy = $bar.getY();\r\n $bar.owidth = $bar.getWidth();\r\n $bar.finaldx = 0;\r\n });\r\n });\r\n\r\n $.on(this.$svg, 'mousemove', (e) => {\r\n if (!action_in_progress()) return;\r\n const dx = e.offsetX - x_on_start;\r\n const dy = e.offsetY - y_on_start;\r\n\r\n bars.forEach((bar) => {\r\n const $bar = bar.$bar;\r\n $bar.finaldx = this.get_snap_position(dx);\r\n this.hide_popup();\r\n if (is_resizing_left) {\r\n if (parent_bar_id === bar.task.id) {\r\n bar.update_bar_position({\r\n x: $bar.ox + $bar.finaldx,\r\n width: $bar.owidth - $bar.finaldx,\r\n });\r\n } else {\r\n bar.update_bar_position({\r\n x: $bar.ox + $bar.finaldx,\r\n });\r\n }\r\n } else if (is_resizing_right) {\r\n if (parent_bar_id === bar.task.id) {\r\n bar.update_bar_position({\r\n width: $bar.owidth + $bar.finaldx,\r\n });\r\n }\r\n } else if (is_dragging) {\r\n bar.update_bar_position({ x: $bar.ox + $bar.finaldx });\r\n }\r\n });\r\n });\r\n\r\n document.addEventListener('mouseup', (e) => {\r\n if (is_dragging || is_resizing_left || is_resizing_right) {\r\n bars.forEach((bar) => bar.group.classList.remove('active'));\r\n }\r\n\r\n is_dragging = false;\r\n is_resizing_left = false;\r\n is_resizing_right = false;\r\n });\r\n\r\n $.on(this.$svg, 'mouseup', (e) => {\r\n this.bar_being_dragged = null;\r\n bars.forEach((bar) => {\r\n const $bar = bar.$bar;\r\n if (!$bar.finaldx) return;\r\n bar.date_changed();\r\n bar.set_action_completed();\r\n });\r\n });\r\n\r\n this.bind_bar_progress();\r\n }\r\n\r\n bind_bar_progress() {\r\n let x_on_start = 0;\r\n let y_on_start = 0;\r\n let is_resizing = null;\r\n let bar = null;\r\n let $bar_progress = null;\r\n let $bar = null;\r\n\r\n $.on(this.$svg, 'mousedown', '.handle.progress', (e, handle) => {\r\n is_resizing = true;\r\n x_on_start = e.offsetX;\r\n y_on_start = e.offsetY;\r\n\r\n const $bar_wrapper = $.closest('.bar-wrapper', handle);\r\n const id = $bar_wrapper.getAttribute('data-id');\r\n bar = this.get_bar(id);\r\n\r\n $bar_progress = bar.$bar_progress;\r\n $bar = bar.$bar;\r\n\r\n $bar_progress.finaldx = 0;\r\n $bar_progress.owidth = $bar_progress.getWidth();\r\n $bar_progress.min_dx = -$bar_progress.getWidth();\r\n $bar_progress.max_dx = $bar.getWidth() - $bar_progress.getWidth();\r\n });\r\n\r\n $.on(this.$svg, 'mousemove', (e) => {\r\n if (!is_resizing) return;\r\n let dx = e.offsetX - x_on_start;\r\n let dy = e.offsetY - y_on_start;\r\n\r\n if (dx > $bar_progress.max_dx) {\r\n dx = $bar_progress.max_dx;\r\n }\r\n if (dx < $bar_progress.min_dx) {\r\n dx = $bar_progress.min_dx;\r\n }\r\n\r\n const $handle = bar.$handle_progress;\r\n $.attr($bar_progress, 'width', $bar_progress.owidth + dx);\r\n $.attr($handle, 'points', bar.get_progress_polygon_points());\r\n $bar_progress.finaldx = dx;\r\n });\r\n\r\n $.on(this.$svg, 'mouseup', () => {\r\n is_resizing = false;\r\n if (!($bar_progress && $bar_progress.finaldx)) return;\r\n bar.progress_changed();\r\n bar.set_action_completed();\r\n });\r\n }\r\n\r\n get_all_dependent_tasks(task_id) {\r\n let out = [];\r\n let to_process = [task_id];\r\n while (to_process.length) {\r\n const deps = to_process.reduce((acc, curr) => {\r\n acc = acc.concat(this.dependency_map[curr]);\r\n return acc;\r\n }, []);\r\n\r\n out = out.concat(deps);\r\n to_process = deps.filter((d) => !to_process.includes(d));\r\n }\r\n\r\n return out.filter(Boolean);\r\n }\r\n\r\n get_snap_position(dx) {\r\n let odx = dx,\r\n rem,\r\n position;\r\n\r\n if (this.view_is(VIEW_MODE.WEEK)) {\r\n rem = dx % (this.options.column_width / 7);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.options.column_width / 14\r\n ? 0\r\n : this.options.column_width / 7);\r\n } else if (this.view_is(VIEW_MODE.MONTH)) {\r\n rem = dx % (this.options.column_width / 30);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.options.column_width / 60\r\n ? 0\r\n : this.options.column_width / 30);\r\n } else {\r\n rem = dx % this.options.column_width;\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.options.column_width / 2\r\n ? 0\r\n : this.options.column_width);\r\n }\r\n return position;\r\n }\r\n\r\n unselect_all() {\r\n [...this.$svg.querySelectorAll('.bar-wrapper')].forEach((el) => {\r\n el.classList.remove('active');\r\n });\r\n }\r\n\r\n view_is(modes) {\r\n if (typeof modes === 'string') {\r\n return this.options.view_mode === modes;\r\n }\r\n\r\n if (Array.isArray(modes)) {\r\n return modes.some((mode) => this.options.view_mode === mode);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n get_task(id) {\r\n return this.tasks.find((task) => {\r\n return task.id === id;\r\n });\r\n }\r\n\r\n get_bar(id) {\r\n return this.bars.find((bar) => {\r\n return bar.task.id === id;\r\n });\r\n }\r\n\r\n show_popup(options) {\r\n if (!this.popup) {\r\n this.popup = new Popup(\r\n this.popup_wrapper,\r\n this.options.custom_popup_html\r\n );\r\n }\r\n this.popup.show(options);\r\n }\r\n\r\n hide_popup() {\r\n this.popup && this.popup.hide();\r\n }\r\n\r\n trigger_event(event, args) {\r\n if (this.options['on_' + event]) {\r\n this.options['on_' + event].apply(null, args);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the oldest starting date from the list of tasks\r\n *\r\n * @returns Date\r\n * @memberof Gantt\r\n */\r\n get_oldest_starting_date() {\r\n return this.tasks\r\n .map((task) => task._start)\r\n .reduce((prev_date, cur_date) =>\r\n cur_date <= prev_date ? cur_date : prev_date\r\n );\r\n }\r\n\r\n /**\r\n * Clear all elements from the parent svg element\r\n *\r\n * @memberof Gantt\r\n */\r\n clear() {\r\n this.$svg.innerHTML = '';\r\n }\r\n}\r\n\r\nGantt.VIEW_MODE = VIEW_MODE;\r\n\r\nfunction generate_id(task) {\r\n return task.name + '_' + Math.random().toString(36).slice(2, 12);\r\n}\r\n"],"names":[],"mappings":";;;IAAA,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,MAAM,KAAK,GAAG,OAAO,CAAC;IACtB,MAAM,GAAG,GAAG,KAAK,CAAC;IAClB,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,MAAM,MAAM,GAAG,QAAQ,CAAC;IACxB,MAAM,MAAM,GAAG,QAAQ,CAAC;IACxB,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC;AACA,qBAAe;IACf,IAAI,KAAK,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE;IAC/D,QAAQ,IAAI,IAAI,YAAY,IAAI,EAAE;IAClC,YAAY,OAAO,IAAI,CAAC;IACxB,SAAS;IACT,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;IACtC,YAAY,IAAI,UAAU,EAAE,UAAU,CAAC;IACvC,YAAY,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC1C;IACA,YAAY,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC;IACjC,iBAAiB,KAAK,CAAC,cAAc,CAAC;IACtC,iBAAiB,GAAG,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAA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L;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,wBAAwB,GAAG;IAC/B,QAAQ,OAAO,IAAI,CAAC,KAAK;IACzB,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC;IACvC,aAAa,MAAM,CAAC,CAAC,SAAS,EAAE,QAAQ;IACxC,gBAAgB,QAAQ,IAAI,SAAS,GAAG,QAAQ,GAAG,SAAS;IAC5D,aAAa,CAAC;IACd,KAAK;AACL;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,KAAK,GAAG;IACZ,QAAQ,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACjC,KAAK;IACL,CAAC;AACD;IACA,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;AAC5B;IACA,SAAS,WAAW,CAAC,IAAI,EAAE;IAC3B,IAAI,OAAO,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrE;;;;;;;;"} \ No newline at end of file Index: reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.min.js =================================================================== diff -u -r86c7f799884e640e23af17250c07265a21af1c33 -r0fc9cdf566a919f98a017a6d6dc654e27ee576e2 --- reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.min.js (.../frappe-gantt.min.js) (revision 86c7f799884e640e23af17250c07265a21af1c33) +++ reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.min.js (.../frappe-gantt.min.js) (revision 0fc9cdf566a919f98a017a6d6dc654e27ee576e2) @@ -1,2 +1,2 @@ -var Gantt=function(){"use strict";const t="year",e="month",s="day",i="hour",n="minute",a="second",o="millisecond";var r={parse(t,e="-",s=/[.:]/){if(t instanceof Date)return t;if("string"==typeof t){let i,n;const a=t.split(" ");i=a[0].split(e).map((t=>parseInt(t,10))),n=a[1]&&a[1].split(s),i[1]=i[1]-1;let o=i;return n&&n.length&&(4==n.length&&(n[3]="0."+n[3],n[3]=1e3*parseFloat(n[3])),o=o.concat(n)),new Date(...o)}},to_string(t,e=!1){if(!(t instanceof Date))throw new TypeError("Invalid argument type");const s=this.get_date_values(t).map(((t,e)=>(1===e&&(t+=1),h(t+"",6===e?3:2,"0")))),i=`${s[0]}-${s[1]}-${s[2]}`,n=`${s[3]}:${s[4]}:${s[5]}.${s[6]}`;return i+(e?" "+n:"")},format(t,e="YYYY-MM-DD HH:mm:ss.SSS",s="ko"){const i=new Intl.DateTimeFormat(s,{month:"long"}).format(t),n=i.charAt(0).toUpperCase()+i.slice(1),a=this.get_date_values(t).map((t=>h(t,2,0))),o={YYYY:a[0],MM:h(+a[1]+1,2,0),DD:a[2],HH:a[3],mm:a[4],ss:a[5],SSS:a[6],D:a[2],MMMM:n,MMM:n};let r=e;const d=[];return Object.keys(o).sort(((t,e)=>e.length-t.length)).forEach((t=>{r.includes(t)&&(r=r.replace(t,`$${d.length}`),d.push(o[t]))})),d.forEach(((t,e)=>{r=r.replace(`$${e}`,t)})),r},diff(t,e,i=s){let n,a,o,r,h,d,p;return n=t-e,a=n/1e3,r=a/60,o=r/60,h=o/24,d=h/30,p=d/12,i.endsWith("s")||(i+="s"),Math.floor({milliseconds:n,seconds:a,minutes:r,hours:o,days:h,months:d,years:p}[i])},today(){const t=this.get_date_values(new Date).slice(0,3);return new Date(...t)},now:()=>new Date,add(r,h,d){h=parseInt(h,10);const p=[r.getFullYear()+(d===t?h:0),r.getMonth()+(d===e?h:0),r.getDate()+(d===s?h:0),r.getHours()+(d===i?h:0),r.getMinutes()+(d===n?h:0),r.getSeconds()+(d===a?h:0),r.getMilliseconds()+(d===o?h:0)];return new Date(...p)},start_of(r,h){const d={[t]:6,[e]:5,[s]:4,[i]:3,[n]:2,[a]:1,[o]:0};function p(t){return d[t]<=d[h]}const l=[r.getFullYear(),p(t)?0:r.getMonth(),p(e)?1:r.getDate(),p(s)?0:r.getHours(),p(i)?0:r.getMinutes(),p(n)?0:r.getSeconds(),p(a)?0:r.getMilliseconds()];return new Date(...l)},clone(t){return new Date(...this.get_date_values(t))},get_date_values:t=>[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()],get_days_in_month(t){const e=[31,28,31,30,31,30,31,31,30,31,30,31],s=t.getMonth();if(1!==s)return e[s];const i=t.getFullYear();return i%4==0&&i%100!=0||i%400==0?29:28}};function h(t,e,s){return t+="",e>>=0,s=String(void 0!==s?s:" "),t.length>e?String(t):((e-=t.length)>s.length&&(s+=s.repeat(e/s.length)),s.slice(0,e)+String(t))}function d(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function p(t,e){const s=document.createElementNS("http://www.w3.org/2000/svg",t);for(let t in e)if("append_to"===t){e.append_to.appendChild(s)}else"innerHTML"===t?s.innerHTML=e.innerHTML:s.setAttribute(t,e[t]);return s}function l(t,e,s,i){const n=function(t,e,s,i,n="0.4s",a="0.1s"){const o=t.querySelector("animate");if(o)return d.attr(o,{attributeName:e,from:s,to:i,dur:n,begin:"click + "+a}),t;const r=p("animate",{attributeName:e,from:s,to:i,dur:n,begin:a,calcMode:"spline",values:s+";"+i,keyTimes:"0; 1",keySplines:_("ease-out")});return t.appendChild(r),t}(t,e,s,i);if(n===t){const t=document.createEvent("HTMLEvents");t.initEvent("click",!0,!0),t.eventName="click",n.dispatchEvent(t)}}function _(t){return{ease:".25 .1 .25 1",linear:"0 0 1 1","ease-in":".42 0 1 1","ease-out":"0 0 .58 1","ease-in-out":".42 0 .58 1"}[t]}d.on=(t,e,s,i)=>{i?d.delegate(t,e,s,i):(i=s,d.bind(t,e,i))},d.off=(t,e,s)=>{t.removeEventListener(e,s)},d.bind=(t,e,s)=>{e.split(/\s+/).forEach((function(e){t.addEventListener(e,s)}))},d.delegate=(t,e,s,i)=>{t.addEventListener(e,(function(t){const e=t.target.closest(s);e&&(t.delegatedTarget=e,i.call(this,t,e))}))},d.closest=(t,e)=>e?e.matches(t)?e:d.closest(t,e.parentNode):null,d.attr=(t,e,s)=>{if(!s&&"string"==typeof e)return t.getAttribute(e);if("object"!=typeof e)t.setAttribute(e,s);else for(let s in e)d.attr(t,s,e[s])},d.style=(t,e,s)=>{if(!s&&"string"==typeof e)return t.getAttribute(e);if("object"!=typeof e)t.style[e]=s;else for(let s in e)d.style(t,s,e[s])};class g{constructor(t,e){this.set_defaults(t,e),this.prepare(),this.draw(),this.bind()}set_defaults(t,e){this.action_completed=!1,this.gantt=t,this.task=e}prepare(){this.prepare_values(),this.prepare_helpers()}prepare_values(){this.invalid=this.task.invalid,this.height=this.gantt.options.bar_height,this.x=this.compute_x(),this.y=this.compute_y(),this.corner_radius=this.gantt.options.bar_corner_radius,this.duration=r.diff(this.task._end,this.task._start,"hour")/this.gantt.options.step,this.width=this.gantt.options.column_width*this.duration,this.progress_width=this.gantt.options.column_width*this.duration*(this.task.progress/100)||0,this.group=p("g",{class:"bar-wrapper "+(this.task.custom_class||""),"data-id":this.task.id}),this.bar_group=p("g",{class:"bar-group",append_to:this.group}),this.handle_group=p("g",{class:"handle-group",append_to:this.group})}prepare_helpers(){SVGElement.prototype.getX=function(){return+this.getAttribute("x")},SVGElement.prototype.getY=function(){return+this.getAttribute("y")},SVGElement.prototype.getWidth=function(){return+this.getAttribute("width")},SVGElement.prototype.getHeight=function(){return+this.getAttribute("height")},SVGElement.prototype.getEndX=function(){return this.getX()+this.getWidth()}}draw(){this.draw_bar(),this.draw_progress_bar(),this.draw_label(),this.draw_resize_handles()}draw_bar(){this.$bar=p("rect",{x:this.x,y:this.y,width:this.width,height:this.height,rx:this.corner_radius,ry:this.corner_radius,class:"bar",append_to:this.bar_group}),l(this.$bar,"width",0,this.width),this.invalid&&this.$bar.classList.add("bar-invalid")}draw_progress_bar(){this.invalid||(this.$bar_progress=p("rect",{x:this.x,y:this.y,width:this.progress_width,height:this.height,rx:this.corner_radius,ry:this.corner_radius,class:"bar-progress",append_to:this.bar_group}),l(this.$bar_progress,"width",0,this.progress_width))}draw_label(){p("text",{x:this.x+this.width/2,y:this.y+this.height/2,innerHTML:this.task.name,class:"bar-label",append_to:this.bar_group}),requestAnimationFrame((()=>this.update_label_position()))}draw_resize_handles(){if(this.invalid)return;const t=this.$bar;p("rect",{x:t.getX()+t.getWidth()-9,y:t.getY()+1,width:8,height:this.height-2,rx:this.corner_radius,ry:this.corner_radius,class:"handle right",append_to:this.handle_group}),p("rect",{x:t.getX()+1,y:t.getY()+1,width:8,height:this.height-2,rx:this.corner_radius,ry:this.corner_radius,class:"handle left",append_to:this.handle_group}),this.task.progress&&this.task.progress<100&&(this.$handle_progress=p("polygon",{points:this.get_progress_polygon_points().join(","),class:"handle progress",append_to:this.handle_group}))}get_progress_polygon_points(){const t=this.$bar_progress;return[t.getEndX()-5,t.getY()+t.getHeight(),t.getEndX()+5,t.getY()+t.getHeight(),t.getEndX(),t.getY()+t.getHeight()-8.66]}bind(){this.invalid||this.setup_click_event()}setup_click_event(){d.on(this.group,"focus "+this.gantt.options.popup_trigger,(t=>{this.action_completed||(this.show_popup(),this.gantt.unselect_all(),this.group.classList.add("active"))})),d.on(this.group,"dblclick",(t=>{this.action_completed||this.gantt.trigger_event("click",[this.task])}))}show_popup(){if(this.gantt.bar_being_dragged)return;const t=r.format(this.task._start,"MMM D",this.gantt.options.language)+" - "+r.format(r.add(this.task._end,-1,"second"),"MMM D",this.gantt.options.language);this.gantt.show_popup({target_element:this.$bar,title:this.task.name,subtitle:t,task:this.task}),this.gantt.handle_selected(this.task)}update_bar_position({x:t=null,width:e=null}){const s=this.$bar;if(t){if(!this.task.dependencies.map((t=>this.gantt.get_bar(t).$bar.getX())).reduce(((e,s)=>t>=s),t))return void(e=null);this.update_attr(s,"x",t)}e&&e>=this.gantt.options.column_width&&this.update_attr(s,"width",e),this.update_label_position(),this.update_handle_position(),this.update_progressbar_position(),this.update_arrow_position()}date_changed(){let t=!1;const{new_start_date:e,new_end_date:s}=this.compute_start_end_date();Number(this.task._start)!==Number(e)&&(t=!0,this.task._start=e),Number(this.task._end)!==Number(s)&&(t=!0,this.task._end=s),t&&this.gantt.trigger_event("date_change",[this.task,e,r.add(s,-1,"second")])}progress_changed(){const t=this.compute_progress();this.task.progress=t,this.gantt.trigger_event("progress_change",[this.task,t])}set_action_completed(){this.action_completed=!0,setTimeout((()=>this.action_completed=!1),1e3)}compute_start_end_date(){const t=this.$bar,e=t.getX()/this.gantt.options.column_width,s=r.add(this.gantt.gantt_start,e*this.gantt.options.step,"hour"),i=t.getWidth()/this.gantt.options.column_width;return{new_start_date:s,new_end_date:r.add(s,i*this.gantt.options.step,"hour")}}compute_progress(){const t=this.$bar_progress.getWidth()/this.$bar.getWidth()*100;return parseInt(t,10)}compute_x(){const{step:t,column_width:e}=this.gantt.options,s=this.task._start,i=this.gantt.gantt_start;let n=r.diff(s,i,"hour")/t*e;if(this.gantt.view_is("Month")){n=r.diff(s,i,"day")*e/30}return n}compute_y(){return this.gantt.options.header_height+this.gantt.options.padding+this.task._index*(this.height+this.gantt.options.padding)}get_snap_position(t){let e,s,i=t;return this.gantt.view_is("Week")?(e=t%(this.gantt.options.column_width/7),s=i-e+(et.getWidth()?(e.classList.add("big"),e.setAttribute("x",t.getX()+t.getWidth()+5)):(e.classList.remove("big"),e.setAttribute("x",t.getX()+t.getWidth()/2))}update_handle_position(){if(this.invalid)return;const t=this.$bar;this.handle_group.querySelector(".handle.left").setAttribute("x",t.getX()+1),this.handle_group.querySelector(".handle.right").setAttribute("x",t.getEndX()-9);const e=this.group.querySelector(".handle.progress");e&&e.setAttribute("points",this.get_progress_polygon_points())}update_arrow_position(){this.arrows=this.arrows||[];for(let t of this.arrows)t.update()}}class c{constructor(t,e,s){this.gantt=t,this.from_task=e,this.to_task=s,this.calculate_path(),this.draw()}calculate_path(){let t=this.from_task.$bar.getX()+this.from_task.$bar.getWidth()/2;const e=()=>this.to_task.$bar.getX()this.from_task.$bar.getX()+this.gantt.options.padding;for(;e();)t-=10;const s=this.gantt.options.header_height+this.gantt.options.bar_height+(this.gantt.options.padding+this.gantt.options.bar_height)*this.from_task.task._index+this.gantt.options.padding,i=this.to_task.$bar.getX()-this.gantt.options.padding/2,n=this.gantt.options.header_height+this.gantt.options.bar_height/2+(this.gantt.options.padding+this.gantt.options.bar_height)*this.to_task.task._index+this.gantt.options.padding,a=this.from_task.task._index>this.to_task.task._index,o=this.gantt.options.arrow_curve,r=a?1:0,h=a?-o:o,d=a?n+this.gantt.options.arrow_curve:n-this.gantt.options.arrow_curve;if(this.path=`\n M ${t} ${s}\n V ${d}\n a ${o} ${o} 0 0 ${r} ${o} ${h}\n L ${i} ${n}\n m -5 -5\n l 5 5\n l -5 5`,this.to_task.$bar.getX()\n
\n
\n ',this.hide(),this.title=this.parent.querySelector(".title"),this.subtitle=this.parent.querySelector(".subtitle"),this.pointer=this.parent.querySelector(".pointer")}show(t){if(!t.target_element)throw new Error("target_element is required to show popup");t.position||(t.position="left");const e=t.target_element;if(this.custom_html){let e=this.custom_html(t.task);e+='
',this.parent.innerHTML=e,this.pointer=this.parent.querySelector(".pointer")}else this.title.innerHTML=t.title,this.subtitle.innerHTML=t.subtitle,this.parent.style.width=this.parent.clientWidth+"px";let s;e instanceof HTMLElement?s=e.getBoundingClientRect():e instanceof SVGElement&&(s=t.target_element.getBBox()),"left"===t.position&&(this.parent.style.left=s.x+(s.width+10)+"px",this.parent.style.top=s.y+"px",this.pointer.style.transform="rotateZ(90deg)",this.pointer.style.left="-7px",this.pointer.style.top="2px"),this.parent.style.opacity=1}hide(){this.parent.style.opacity=0,this.parent.style.left=0}}class m{dragStartY=0;constructor(t,e){this.set_defaults(t,e)}set_defaults(t,e){this.gantt=t,this.columns=e}draw_table_header(){const t=document.createElement("thead"),e=document.createElement("tr");return this.columns.forEach((t=>{const s=document.createElement("th");s.textContent=t.title,e.appendChild(s)})),t.appendChild(e),t.classList.add("table-header"),d.style(e,"height",this.gantt.options.header_height+9+"px"),t}get_parentNode(t,e){return e.tagName===t.toUpperCase()?e:this.get_parentNode(t,e.parentNode)}draw_table_body(t){this.tasks=this.gantt.setGroupPosition(t);const e=document.createElement("tbody");return e.classList.add("table-body"),this.make_table_row().forEach((t=>e.append(t))),e.addEventListener("mousedown",(t=>{this.get_parentNode("td",t.target).classList.contains("draggable-item")&&this.bind_draggable_event(e)})),e}isRowLine(t){if(t<=2)return!1;return!this.tasks.find((e=>e.id===`${t}`)).groupPosition.includes("last")}make_table_row(){return this.tasks.map(((t,e)=>{const s=t.level-1,i=document.createElement("tr");return i.setAttribute("draggable","true"),i.setAttribute("data-id",t.id),d.style(i,{height:this.gantt.options.bar_height+this.gantt.options.padding+"px"}),1===s&&t.groupPosition.includes("last")&&i.classList.add("root-last"),this.columns.forEach((e=>{const n=document.createElement("td"),{data:a,render:o}=e;if("drag"===a)return n.innerHTML='',n.className="draggable-item",void i.append(n);if("wbs"===a&&(n.className=a),"name"===a&&t.level>1){n.setAttribute("rel",t.type),n.className=`work-name indent-${s} indent-${s}-${t.groupPosition[0]}`,t.groupPosition[1]&&n.classList.add(`indent-${s}-${t.groupPosition[1]}`),"default"!==t.type&&n.classList.add(t.closed?"closed":"opened");for(let e=0;e1&&i.classList.add("row-line"),n.append(i);break}n.append(i)}}if(o){const e=o(t[a],t);n.append(e)}else{const e=document.createTextNode(t[a]??"");n.append(e)}i.append(n)})),i.addEventListener("mousedown",(t=>{this.get_parentNode("td",t.target).classList.contains("draggable-item")&&(i.addEventListener("dragstart",(t=>{t.target.classList.add("dragging")})),i.addEventListener("dragend",(t=>{t.target.classList.remove("dragging")})))})),i}))}get_drag_after_element(t,e){return[...t.querySelectorAll("tr:not(.dragging)")].reduce(((t,s)=>{const i=s.getBoundingClientRect(),n=e-i.top-i.height/2;return n<0&&n>t.offset?{offset:n,element:s}:t}),{offset:Number.NEGATIVE_INFINITY}).element}find_task_item(t){return this.tasks.find((e=>e.id===t))}bind_draggable_event(t){t.addEventListener("dragover",(e=>{e.preventDefault(),this.dragStartY||(this.dragStartY=e.clientY),this.draggableEl=document.querySelector(".dragging"),this.afterElement=this.get_drag_after_element(t,e.clientY),t.insertBefore(this.draggableEl,this.afterElement)})),t.addEventListener("drop",(async t=>{t.preventDefault();const e=this.find_task_item(this.get_parentNode("tr",t.target).getAttribute("data-id")),s=this.find_task_item(this.draggableEl.getAttribute("data-id")),i=this.find_task_item(this.afterElement.getAttribute("data-id")),n={c_id:s.id,ref:i.parentId,c_position:t.clientY>this.dragStartY?i.position-1:i.position,level:i.level,p_position:s.position,p_parentId:s.parentId};if("default"!==e.type){const t=this.tasks.filter((t=>t.parentId===Number(e.id))).length;n.ref=e.id,n.level=e.level+1,n.c_position=t||0}this.dragStartY=0,this.gantt.draggble_rerender(n),this.gantt.trigger_event("drag_row",[n])}))}}class f{constructor(t){this.draw_split_bar(t)}draw_split_bar(t){const e=document.createElement("div");e.classList.add("split-bar");let s=0;const i=function(i){const n=e.previousElementSibling,a=e.nextSibling,o=i.clientX-s,r=Math.max(0,Math.min(e.offsetLeft+o,t.clientWidth))/t.clientWidth*100;d.style(e,{left:`${r}%`}),d.style(n,{"flex-basis":`${r}%`}),d.style(a,{"flex-basis":100-r+"%"}),d.style(n,{"overflow-x":"hidden"}),d.style(a,{"overflow-x":"hidden"}),s=i.clientX},n=function(){const t=e.previousElementSibling,s=e.nextSibling;document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n),d.style(t,{"overflow-x":"auto"}),d.style(s,{"overflow-x":"auto"})};e.addEventListener("mousedown",(function(t){s=t.clientX,document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)})),t.prepend(e)}}const w={QUARTER_DAY:"Quarter Day",HALF_DAY:"Half Day",DAY:"Day",WEEK:"Week",MONTH:"Month",YEAR:"Year"};class b{constructor(t,e,s,i){this.originTasks=e,this.setup_options(s),this.setup_tasks(e),this.setup_wrapper(t),this.change_view_mode(),this.setup_split_bar(),this.setup_table(i),this.bind_events()}setup_wrapper(t){let e,s;if("string"==typeof t&&(t=document.querySelector(t)),t instanceof HTMLElement)s=t,e=t.querySelector("svg");else{if(!(t instanceof SVGElement))throw new TypeError("Frappé Gantt only supports usage of a string CSS selector, HTML DOM element or SVG DOM element for the 'element' parameter");e=t}e?(this.$svg=e,this.$svg.classList.add("gantt")):this.$svg=p("svg",{append_to:s,class:"gantt"}),this.$wrapper=document.createElement("div"),this.$wrapper.classList.add("wrapper"),this.$container=document.createElement("div"),this.$container.classList.add("gantt-container");const i=this.$svg.parentElement;t.appendChild(this.setup_mode_handler()),i.appendChild(this.$wrapper),this.$wrapper.appendChild(this.$container),this.$container.appendChild(this.$svg),this.popup_wrapper=document.createElement("div"),this.popup_wrapper.classList.add("popup-wrapper"),this.$container.appendChild(this.popup_wrapper)}setup_mode_handler(){const t=document.createElement("div"),e=document.createElement("button"),s=document.createElement("div");return t.className="mt well well-sm clearfix",e.className="btn btn-default btn-sm mr-xs",e.innerText="Excel",d.style(s,{float:"right"}),Object.keys(w).forEach((t=>{const e=document.createElement("button");e.className="btn btn-default btn-sm mr-xs "+(w[t]===this.options.view_mode?"active":""),e.innerText=w[t],e.addEventListener("click",(e=>{e.target.classList.add("active"),e.target.parentNode.childNodes.forEach((t=>t.classList.remove("active"))),this.change_view_mode(w[t])})),s.appendChild(e)})),t.append(e),t.append(s),t}setup_options(t){const e={header_height:50,column_width:30,step:24,view_modes:[...Object.values(w)],bar_height:20,bar_corner_radius:3,arrow_curve:5,padding:18,view_mode:"Day",date_format:"YYYY-MM-DD",popup_trigger:"click",custom_popup_html:null,language:"ko"};this.options=Object.assign({},e,t)}setup_tasks(t){this.tasks=this.sort_tasks(t).map(((t,e)=>{if(t._start=r.parse(t.start),t._end=r.parse(t.end),r.diff(t._end,t._start,"year")>10&&(t.end=null),t._index=e,!t.start&&!t.end){const e=r.today();t._start=e,t._end=r.add(e,2,"day")}!t.start&&t.end&&(t._start=r.add(t._end,-2,"day")),t.start&&!t.end&&(t._end=r.add(t._start,2,"day"));if(r.get_date_values(t._end).slice(3).every((t=>0===t))&&(t._end=r.add(t._end,24,"hour")),t.start&&t.end||(t.invalid=!0),"string"==typeof t.dependencies||!t.dependencies){let e=[];t.dependencies&&(e=t.dependencies.split(",").map((t=>t.trim())).filter((t=>t))),t.dependencies=e}return t.id||(t.id=function(t){return t.name+"_"+Math.random().toString(36).slice(2,12)}(t)),t})),this.setup_dependencies()}setup_dependencies(){this.dependency_map={};for(let t of this.tasks)for(let e of t.dependencies)this.dependency_map[e]=this.dependency_map[e]||[],this.dependency_map[e].push(t.id)}refresh(t){this.setup_tasks(t),this.change_view_mode(),this.rerender_table(),this.originTasks=t}change_view_mode(t=this.options.view_mode){this.update_view_scale(t),this.setup_dates(),this.render(),this.trigger_event("view_change",[t])}update_view_scale(t){this.options.view_mode=t,t===w.DAY?(this.options.step=24,this.options.column_width=38):t===w.HALF_DAY?(this.options.step=12,this.options.column_width=38):t===w.QUARTER_DAY?(this.options.step=6,this.options.column_width=38):t===w.WEEK?(this.options.step=168,this.options.column_width=140):t===w.MONTH?(this.options.step=720,this.options.column_width=120):t===w.YEAR&&(this.options.step=8760,this.options.column_width=120)}setup_dates(){this.setup_gantt_dates(),this.setup_date_values()}setup_gantt_dates(){this.gantt_start=this.gantt_end=null;for(let t of this.tasks)(!this.gantt_start||t._startthis.gantt_end)&&(this.gantt_end=t._end);this.gantt_start=r.start_of(this.gantt_start,"day"),this.gantt_end=r.start_of(this.gantt_end,"day"),this.view_is([w.QUARTER_DAY,w.HALF_DAY])?(this.gantt_start=r.add(this.gantt_start,-7,"day"),this.gantt_end=r.add(this.gantt_end,7,"day")):this.view_is(w.MONTH)?(this.gantt_start=r.start_of(this.gantt_start,"year"),this.gantt_end=r.add(this.gantt_end,1,"year")):this.view_is(w.YEAR)?(this.gantt_start=r.add(this.gantt_start,-2,"year"),this.gantt_end=r.add(this.gantt_end,2,"year")):(this.gantt_start=r.add(this.gantt_start,-1,"month"),this.gantt_end=r.add(this.gantt_end,1,"month"))}setup_date_values(){this.dates=[];let t=null;for(;null===t||tthis.bind_table_event(t)))}draggble_rerender(t){this.update_origin_tasks(t),this.render(),this.rerender_table()}sort_tasks(t){const e=[...t],s={};return e.sort(((t,e)=>t.level-e.level||t.position-e.position)).forEach(((t,i)=>{if(2!==t.parentId){s.hasOwnProperty(t.parentId)?s[t.parentId].push(i):s[t.parentId]=[i];const n=e.findIndex((e=>+e.id===t.parentId));e.splice(i,1),e.splice(n+s[t.parentId].length,0,t)}}),[]),e}setGroupPosition(t){return t.reduce(((e,s)=>{const i=t.filter((t=>t.parentId===s.parentId));return s.groupPosition=[],i[0].id===s.id&&s.groupPosition.push("first"),i[i.length-1].id===s.id&&s.groupPosition.push("last"),s.groupPosition.length||s.groupPosition.push("middle"),e.push(s),e}),[])}update_dependecies(t){if(2===t)return[];const e=this.tasks.find((e=>e.id===t)).dependencies;return e.length?[...e,t]:[t]}update_origin_tasks(t){let e=this.tasks.reduce(((e,s)=>{if(s.id===t.c_id){const e=this.update_dependecies(t.ref);s={...s,parentId:Number(t.ref),dependencies:e,position:t.c_position,level:t.level,wbs:e.length?`${e.join("-")}-${t.c_id}`:`${t.c_id}`}}else{if(s.parentId===Number(t.ref)&&t.c_position===t.p_position)return e.push(s),e;s.parentId===Number(t.ref)?s.position=t.c_position>t.p_position?s.positiont.p_position?s.position:s.position>=t.c_position?s.position+1:s.position:s.parentId===t.p_parentId&&(s.position=s.position{if(s.id===e)return delete s.closed,t.splice(s._index,1,s);s.dependencies.includes(e)&&t.splice(s._index,0,s)})):t=this.tasks.reduce(((t,s)=>s.id===e?[...t,{...s,closed:!0}]:s.dependencies.includes(e)?t:[...t,s]),[]),this.setup_tasks(t),this.render(),this.rerender_table()}}make_table(){const t=document.createElement("div"),e=document.createElement("table");t.className="table-container";const s=this.table.draw_table_header(),i=this.table.draw_table_body(this.tasks);e.append(s),e.append(i),i.addEventListener("click",(t=>this.bind_table_event(t))),t.append(e),this.$wrapper.prepend(t)}make_grid(){this.make_grid_background(),this.make_grid_rows(),this.make_grid_ticks(),this.make_grid_highlights()}handle_selected(t){const e=this.$wrapper.querySelectorAll("tr")[t._index+1],s=this.$wrapper.querySelectorAll(".grid-row")[t._index];e.classList.contains("selected")||Array.prototype.forEach.call(this.$wrapper.querySelectorAll(".selected"),(t=>t.classList.remove("selected"))),e?.classList.toggle("selected"),s?.classList.toggle("selected")}make_grid_background(){const t=this.dates.length*this.options.column_width,e=this.options.header_height+this.options.padding+(this.options.bar_height+this.options.padding)*this.tasks.length;p("rect",{x:0,y:0,width:t,height:e,class:"grid-background",append_to:this.layers.grid}),d.attr(this.$svg,{height:e,width:"100%"})}make_grid_rows(){const t=p("g",{append_to:this.layers.grid}),e=this.dates.length*this.options.column_width,s=this.options.bar_height+this.options.padding;let i=this.options.header_height+this.options.padding/2;for(let n of this.tasks)p("rect",{x:0,y:i,width:e,height:s,class:"grid-row",append_to:t}),i+=this.options.bar_height+this.options.padding}make_grid_header(){const t=this.dates.length*this.options.column_width,e=this.options.header_height+10,s=window.scrollY,i=s+this.$wrapper.getBoundingClientRect().top;i<=s&&(this.layers.header.style.transform=`translate(0px, ${Math.floor(window.scrollY-i)}px)`),p("rect",{x:0,y:0,width:t,height:e,class:"grid-header",append_to:this.layers.header})}make_grid_ticks(){let t=0,e=this.options.header_height+this.options.padding/2,s=(this.options.bar_height+this.options.padding)*this.tasks.length;for(let i of this.dates){let n="tick";this.view_is(w.DAY)&&1===i.getDate()&&(n+=" thick"),this.view_is(w.WEEK)&&i.getDate()>=1&&i.getDate()<8&&(n+=" thick"),this.view_is(w.MONTH)&&i.getMonth()%3==0&&(n+=" thick"),p("path",{d:`M ${t} ${e} v ${s}`,class:n,append_to:this.layers.grid}),this.view_is(w.MONTH)?t+=r.get_days_in_month(i)*this.options.column_width/30:t+=this.options.column_width}}make_grid_highlights(){if(this.view_is(w.DAY)){p("rect",{x:r.diff(r.today(),this.gantt_start,"hour")/this.options.step*this.options.column_width,y:0,width:this.options.column_width,height:(this.options.bar_height+this.options.padding)*this.tasks.length+this.options.header_height+this.options.padding/2,class:"today-highlight",append_to:this.layers.grid})}}make_dates(){const t=window.scrollY,e=t+this.$wrapper.getBoundingClientRect().top;e<=t&&(this.layers.date.style.transform=`translate(0px, ${Math.floor(window.scrollY-e)}px)`);for(let t of this.get_dates_to_draw())if(p("text",{x:t.lower_x,y:t.lower_y,innerHTML:t.lower_text,class:"lower-text",append_to:this.layers.date}),t.upper_text){const e=p("text",{x:t.upper_x,y:t.upper_y,innerHTML:t.upper_text,class:"upper-text",append_to:this.layers.date});e.getBBox().x2>this.layers.grid.getBBox().width&&e.remove()}}get_dates_to_draw(){let t=null;return this.dates.map(((e,s)=>{const i=this.get_date_info(e,t,s);return t=e,i}))}get_date_info(t,e,s){e||(e=r.add(t,1,"year"));const i={"Quarter Day_lower":r.format(t,"HH",this.options.language),"Half Day_lower":r.format(t,"HH",this.options.language),Day_lower:t.getDate()!==e.getDate()?r.format(t,"D",this.options.language):"",Week_lower:t.getMonth()!==e.getMonth()?r.format(t,"D MMM",this.options.language):r.format(t,"D",this.options.language),Month_lower:r.format(t,"MMMM",this.options.language),Year_lower:r.format(t,"YYYY",this.options.language),"Quarter Day_upper":t.getDate()!==e.getDate()?r.format(t,"D MMM",this.options.language):"","Half Day_upper":t.getDate()!==e.getDate()?t.getMonth()!==e.getMonth()?r.format(t,"D MMM",this.options.language):r.format(t,"D",this.options.language):"",Day_upper:t.getMonth()!==e.getMonth()?r.format(t,"MMMM",this.options.language):"",Week_upper:t.getMonth()!==e.getMonth()?r.format(t,"MMMM",this.options.language):"",Month_upper:t.getFullYear()!==e.getFullYear()?r.format(t,"YYYY",this.options.language):"",Year_upper:t.getFullYear()!==e.getFullYear()?r.format(t,"YYYY",this.options.language):""},n={x:s*this.options.column_width,lower_y:this.options.header_height,upper_y:this.options.header_height-25},a={"Quarter Day_lower":4*this.options.column_width/2,"Quarter Day_upper":0,"Half Day_lower":2*this.options.column_width/2,"Half Day_upper":0,Day_lower:this.options.column_width/2,Day_upper:30*this.options.column_width/2,Week_lower:0,Week_upper:4*this.options.column_width/2,Month_lower:this.options.column_width/2,Month_upper:12*this.options.column_width/2,Year_lower:this.options.column_width/2,Year_upper:30*this.options.column_width/2};return{upper_text:i[`${this.options.view_mode}_upper`],lower_text:i[`${this.options.view_mode}_lower`],upper_x:n.x+a[`${this.options.view_mode}_upper`],upper_y:n.upper_y,lower_x:n.x+a[`${this.options.view_mode}_lower`],lower_y:n.lower_y}}make_bars(){this.bars=this.tasks.map((t=>{const e=new g(this,t);return this.layers.bar.appendChild(e.group),e}))}make_arrows(){this.arrows=[];for(let t of this.tasks){let e=[];e=t.dependencies.map((e=>{const s=this.get_task(e);if(!s)return;const i=new c(this,this.bars[s._index],this.bars[t._index]);return this.layers.arrow.appendChild(i.element),i})).filter(Boolean),this.arrows=this.arrows.concat(e)}}map_arrows_on_bars(){for(let t of this.bars)t.arrows=this.arrows.filter((e=>e.from_task.task.id===t.task.id||e.to_task.task.id===t.task.id))}set_width(){const t=this.$svg.getBoundingClientRect().width,e=this.$svg.querySelector(".grid .grid-row").getAttribute("width");t{const i=window.scrollY;s||(s=!0,window.requestAnimationFrame((()=>{t<=i?(e.style.top=`${Math.floor(i-t)}px`,this.layers.header.style.transform=`translate(0px, ${Math.floor(i-t)}px)`,this.layers.date.style.transform=`translate(0px, ${Math.floor(i-t)}px)`):(e.style.top="0px",this.layers.header.style.transform="translate(0px, 0px)",this.layers.date.style.transform="translate(0px, 0px)"),s=!1})))}),{passive:!0})}bind_grid_click(){d.on(this.$svg,this.options.popup_trigger,".grid-row, .grid-header",(()=>{this.unselect_all(),this.hide_popup()}))}bind_bar_events(){let t=!1,e=0,s=0,i=!1,n=!1,a=null,o=[];this.bar_being_dragged=null,d.on(this.$svg,"mousedown",".bar-wrapper, .handle",((r,h)=>{const p=d.closest(".bar-wrapper",h);h.classList.contains("left")?i=!0:h.classList.contains("right")?n=!0:h.classList.contains("bar-wrapper")&&(t=!0),p.classList.add("active"),e=r.offsetX,s=r.offsetY,a=p.getAttribute("data-id");const l=[a,...this.get_all_dependent_tasks(a)];o=l.map((t=>this.get_bar(t))),this.bar_being_dragged=a,o.forEach((t=>{const e=t.$bar;e.ox=e.getX(),e.oy=e.getY(),e.owidth=e.getWidth(),e.finaldx=0}))})),d.on(this.$svg,"mousemove",(s=>{if(!(t||i||n))return;const r=s.offsetX-e;s.offsetY,o.forEach((e=>{const s=e.$bar;s.finaldx=this.get_snap_position(r),this.hide_popup(),i?a===e.task.id?e.update_bar_position({x:s.ox+s.finaldx,width:s.owidth-s.finaldx}):e.update_bar_position({x:s.ox+s.finaldx}):n?a===e.task.id&&e.update_bar_position({width:s.owidth+s.finaldx}):t&&e.update_bar_position({x:s.ox+s.finaldx})}))})),document.addEventListener("mouseup",(e=>{(t||i||n)&&o.forEach((t=>t.group.classList.remove("active"))),t=!1,i=!1,n=!1})),d.on(this.$svg,"mouseup",(t=>{this.bar_being_dragged=null,o.forEach((t=>{t.$bar.finaldx&&(t.date_changed(),t.set_action_completed())}))})),this.bind_bar_progress()}bind_bar_progress(){let t=0,e=0,s=null,i=null,n=null,a=null;d.on(this.$svg,"mousedown",".handle.progress",((o,r)=>{s=!0,t=o.offsetX,e=o.offsetY;const h=d.closest(".bar-wrapper",r).getAttribute("data-id");i=this.get_bar(h),n=i.$bar_progress,a=i.$bar,n.finaldx=0,n.owidth=n.getWidth(),n.min_dx=-n.getWidth(),n.max_dx=a.getWidth()-n.getWidth()})),d.on(this.$svg,"mousemove",(e=>{if(!s)return;let a=e.offsetX-t;e.offsetY,a>n.max_dx&&(a=n.max_dx),a{s=!1,n&&n.finaldx&&(i.progress_changed(),i.set_action_completed())}))}get_all_dependent_tasks(t){let e=[],s=[t];for(;s.length;){const t=s.reduce(((t,e)=>t=t.concat(this.dependency_map[e])),[]);e=e.concat(t),s=t.filter((t=>!s.includes(t)))}return e.filter(Boolean)}get_snap_position(t){let e,s,i=t;return this.view_is(w.WEEK)?(e=t%(this.options.column_width/7),s=i-e+(e{t.classList.remove("active")}))}view_is(t){return"string"==typeof t?this.options.view_mode===t:!!Array.isArray(t)&&t.some((t=>this.options.view_mode===t))}get_task(t){return this.tasks.find((e=>e.id===t))}get_bar(t){return this.bars.find((e=>e.task.id===t))}show_popup(t){this.popup||(this.popup=new u(this.popup_wrapper,this.options.custom_popup_html)),this.popup.show(t)}hide_popup(){this.popup&&this.popup.hide()}trigger_event(t,e){this.options["on_"+t]&&this.options["on_"+t].apply(null,e)}get_oldest_starting_date(){return this.tasks.map((t=>t._start)).reduce(((t,e)=>e<=t?e:t))}clear(){this.$svg.innerHTML=""}}return b.VIEW_MODE=w,b}(); +var Gantt=function(){"use strict";const t="year",e="month",s="day",i="hour",n="minute",a="second",o="millisecond";var r={parse(t,e="-",s=/[.:]/){if(t instanceof Date)return t;if("string"==typeof t){let i,n;const a=t.split(" ");i=a[0].split(e).map((t=>parseInt(t,10))),n=a[1]&&a[1].split(s),i[1]=i[1]-1;let o=i;return n&&n.length&&(4==n.length&&(n[3]="0."+n[3],n[3]=1e3*parseFloat(n[3])),o=o.concat(n)),new Date(...o)}},to_string(t,e=!1){if(!(t instanceof Date))throw new TypeError("Invalid argument type");const s=this.get_date_values(t).map(((t,e)=>(1===e&&(t+=1),h(t+"",6===e?3:2,"0")))),i=`${s[0]}-${s[1]}-${s[2]}`,n=`${s[3]}:${s[4]}:${s[5]}.${s[6]}`;return i+(e?" "+n:"")},format(t,e="YYYY-MM-DD HH:mm:ss.SSS",s="ko"){const i=new Intl.DateTimeFormat(s,{month:"long"}).format(t),n=i.charAt(0).toUpperCase()+i.slice(1),a=this.get_date_values(t).map((t=>h(t,2,0))),o={YYYY:a[0],MM:h(+a[1]+1,2,0),DD:a[2],HH:a[3],mm:a[4],ss:a[5],SSS:a[6],D:a[2],MMMM:n,MMM:n};let r=e;const d=[];return Object.keys(o).sort(((t,e)=>e.length-t.length)).forEach((t=>{r.includes(t)&&(r=r.replace(t,`$${d.length}`),d.push(o[t]))})),d.forEach(((t,e)=>{r=r.replace(`$${e}`,t)})),r},diff(t,e,i=s){let n,a,o,r,h,d,p;return n=t-e,a=n/1e3,r=a/60,o=r/60,h=o/24,d=h/30,p=d/12,i.endsWith("s")||(i+="s"),Math.floor({milliseconds:n,seconds:a,minutes:r,hours:o,days:h,months:d,years:p}[i])},today(){const t=this.get_date_values(new Date).slice(0,3);return new Date(...t)},now:()=>new Date,add(r,h,d){h=parseInt(h,10);const p=[r.getFullYear()+(d===t?h:0),r.getMonth()+(d===e?h:0),r.getDate()+(d===s?h:0),r.getHours()+(d===i?h:0),r.getMinutes()+(d===n?h:0),r.getSeconds()+(d===a?h:0),r.getMilliseconds()+(d===o?h:0)];return new Date(...p)},start_of(r,h){const d={[t]:6,[e]:5,[s]:4,[i]:3,[n]:2,[a]:1,[o]:0};function p(t){return d[t]<=d[h]}const l=[r.getFullYear(),p(t)?0:r.getMonth(),p(e)?1:r.getDate(),p(s)?0:r.getHours(),p(i)?0:r.getMinutes(),p(n)?0:r.getSeconds(),p(a)?0:r.getMilliseconds()];return new Date(...l)},clone(t){return new Date(...this.get_date_values(t))},get_date_values:t=>[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()],get_days_in_month(t){const e=[31,28,31,30,31,30,31,31,30,31,30,31],s=t.getMonth();if(1!==s)return e[s];const i=t.getFullYear();return i%4==0&&i%100!=0||i%400==0?29:28}};function h(t,e,s){return t+="",e>>=0,s=String(void 0!==s?s:" "),t.length>e?String(t):((e-=t.length)>s.length&&(s+=s.repeat(e/s.length)),s.slice(0,e)+String(t))}function d(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function p(t,e){const s=document.createElementNS("http://www.w3.org/2000/svg",t);for(let t in e)if("append_to"===t){e.append_to.appendChild(s)}else"innerHTML"===t?s.innerHTML=e.innerHTML:s.setAttribute(t,e[t]);return s}function l(t,e,s,i){const n=function(t,e,s,i,n="0.4s",a="0.1s"){const o=t.querySelector("animate");if(o)return d.attr(o,{attributeName:e,from:s,to:i,dur:n,begin:"click + "+a}),t;const r=p("animate",{attributeName:e,from:s,to:i,dur:n,begin:a,calcMode:"spline",values:s+";"+i,keyTimes:"0; 1",keySplines:_("ease-out")});return t.appendChild(r),t}(t,e,s,i);if(n===t){const t=document.createEvent("HTMLEvents");t.initEvent("click",!0,!0),t.eventName="click",n.dispatchEvent(t)}}function _(t){return{ease:".25 .1 .25 1",linear:"0 0 1 1","ease-in":".42 0 1 1","ease-out":"0 0 .58 1","ease-in-out":".42 0 .58 1"}[t]}d.on=(t,e,s,i)=>{i?d.delegate(t,e,s,i):(i=s,d.bind(t,e,i))},d.off=(t,e,s)=>{t.removeEventListener(e,s)},d.bind=(t,e,s)=>{e.split(/\s+/).forEach((function(e){t.addEventListener(e,s)}))},d.delegate=(t,e,s,i)=>{t.addEventListener(e,(function(t){const e=t.target.closest(s);e&&(t.delegatedTarget=e,i.call(this,t,e))}))},d.closest=(t,e)=>e?e.matches(t)?e:d.closest(t,e.parentNode):null,d.attr=(t,e,s)=>{if(!s&&"string"==typeof e)return t.getAttribute(e);if("object"!=typeof e)t.setAttribute(e,s);else for(let s in e)d.attr(t,s,e[s])},d.style=(t,e,s)=>{if(!s&&"string"==typeof e)return t.getAttribute(e);if("object"!=typeof e)t.style[e]=s;else for(let s in e)d.style(t,s,e[s])};class g{constructor(t,e){this.set_defaults(t,e),this.prepare(),this.draw(),this.bind()}set_defaults(t,e){this.action_completed=!1,this.gantt=t,this.task=e}prepare(){this.prepare_values(),this.prepare_helpers()}prepare_values(){this.invalid=this.task.invalid,this.height=this.gantt.options.bar_height,this.x=this.compute_x(),this.y=this.compute_y(),this.corner_radius=this.gantt.options.bar_corner_radius,this.duration=r.diff(this.task._end,this.task._start,"hour")/this.gantt.options.step,this.width=this.gantt.options.column_width*this.duration,this.progress_width=this.gantt.options.column_width*this.duration*(this.task.progress/100)||0,this.group=p("g",{class:"bar-wrapper "+(this.task.custom_class||""),"data-id":this.task.id}),this.bar_group=p("g",{class:"bar-group",append_to:this.group}),this.handle_group=p("g",{class:"handle-group",append_to:this.group})}prepare_helpers(){SVGElement.prototype.getX=function(){return+this.getAttribute("x")},SVGElement.prototype.getY=function(){return+this.getAttribute("y")},SVGElement.prototype.getWidth=function(){return+this.getAttribute("width")},SVGElement.prototype.getHeight=function(){return+this.getAttribute("height")},SVGElement.prototype.getEndX=function(){return this.getX()+this.getWidth()}}draw(){this.draw_bar(),this.draw_progress_bar(),this.draw_label(),this.draw_resize_handles()}draw_bar(){this.$bar=p("rect",{x:this.x,y:this.y,width:this.width,height:this.height,rx:this.corner_radius,ry:this.corner_radius,class:"bar",append_to:this.bar_group}),l(this.$bar,"width",0,this.width),this.invalid&&this.$bar.classList.add("bar-invalid")}draw_progress_bar(){this.invalid||(this.$bar_progress=p("rect",{x:this.x,y:this.y,width:this.progress_width,height:this.height,rx:this.corner_radius,ry:this.corner_radius,class:"bar-progress",append_to:this.bar_group}),l(this.$bar_progress,"width",0,this.progress_width))}draw_label(){p("text",{x:this.x+this.width/2,y:this.y+this.height/2,innerHTML:this.task.name,class:"bar-label",append_to:this.bar_group}),requestAnimationFrame((()=>this.update_label_position()))}draw_resize_handles(){if(this.invalid)return;const t=this.$bar;p("rect",{x:t.getX()+t.getWidth()-9,y:t.getY()+1,width:8,height:this.height-2,rx:this.corner_radius,ry:this.corner_radius,class:"handle right",append_to:this.handle_group}),p("rect",{x:t.getX()+1,y:t.getY()+1,width:8,height:this.height-2,rx:this.corner_radius,ry:this.corner_radius,class:"handle left",append_to:this.handle_group}),this.task.progress&&this.task.progress<100&&(this.$handle_progress=p("polygon",{points:this.get_progress_polygon_points().join(","),class:"handle progress",append_to:this.handle_group}))}get_progress_polygon_points(){const t=this.$bar_progress;return[t.getEndX()-5,t.getY()+t.getHeight(),t.getEndX()+5,t.getY()+t.getHeight(),t.getEndX(),t.getY()+t.getHeight()-8.66]}bind(){this.invalid||this.setup_click_event()}setup_click_event(){d.on(this.group,"focus "+this.gantt.options.popup_trigger,(t=>{this.action_completed||(this.show_popup(),this.gantt.unselect_all(),this.group.classList.add("active"))})),d.on(this.group,"dblclick",(t=>{this.action_completed||this.gantt.trigger_event("click",[this.task])}))}show_popup(){if(this.gantt.bar_being_dragged)return;const t=r.format(this.task._start,"MMM D",this.gantt.options.language)+" - "+r.format(r.add(this.task._end,-1,"second"),"MMM D",this.gantt.options.language);this.gantt.show_popup({target_element:this.$bar,title:this.task.name,subtitle:t,task:this.task}),this.gantt.handle_selected(this.task)}update_bar_position({x:t=null,width:e=null}){const s=this.$bar;t&&this.update_attr(s,"x",t),e&&e>=this.gantt.options.column_width&&this.update_attr(s,"width",e),this.update_label_position(),this.update_handle_position(),this.update_progressbar_position(),this.update_arrow_position()}date_changed(){let t=!1;const{new_start_date:e,new_end_date:s}=this.compute_start_end_date();Number(this.task._start)!==Number(e)&&(t=!0,this.task._start=e),Number(this.task._end)!==Number(s)&&(t=!0,this.task._end=s),t&&this.gantt.trigger_event("date_change",[this.task,e,r.add(s,-1,"second")])}progress_changed(){const t=this.compute_progress();this.task.progress=t,this.gantt.trigger_event("progress_change",[this.task,t])}set_action_completed(){this.action_completed=!0,setTimeout((()=>this.action_completed=!1),1e3)}compute_start_end_date(){const t=this.$bar,e=t.getX()/this.gantt.options.column_width,s=r.add(this.gantt.gantt_start,e*this.gantt.options.step,"hour"),i=t.getWidth()/this.gantt.options.column_width;return{new_start_date:s,new_end_date:r.add(s,i*this.gantt.options.step,"hour")}}compute_progress(){const t=this.$bar_progress.getWidth()/this.$bar.getWidth()*100;return parseInt(t,10)}compute_x(){const{step:t,column_width:e}=this.gantt.options,s=this.task._start,i=this.gantt.gantt_start;let n=r.diff(s,i,"hour")/t*e;if(this.gantt.view_is("Month")){n=r.diff(s,i,"day")*e/30}return n}compute_y(){return this.gantt.options.header_height+this.gantt.options.padding+this.task._index*(this.height+this.gantt.options.padding)}get_snap_position(t){let e,s,i=t;return this.gantt.view_is("Week")?(e=t%(this.gantt.options.column_width/7),s=i-e+(et.getWidth()?(e.classList.add("big"),e.setAttribute("x",t.getX()+t.getWidth()+5)):(e.classList.remove("big"),e.setAttribute("x",t.getX()+t.getWidth()/2))}update_handle_position(){if(this.invalid)return;const t=this.$bar;this.handle_group.querySelector(".handle.left").setAttribute("x",t.getX()+1),this.handle_group.querySelector(".handle.right").setAttribute("x",t.getEndX()-9);const e=this.group.querySelector(".handle.progress");e&&e.setAttribute("points",this.get_progress_polygon_points())}update_arrow_position(){this.arrows=this.arrows||[];for(let t of this.arrows)t.update()}}class c{constructor(t,e,s){this.gantt=t,this.from_task=e,this.to_task=s,this.calculate_path(),this.draw()}calculate_path(){let t=this.from_task.$bar.getX()+this.from_task.$bar.getWidth()/2;const e=()=>this.to_task.$bar.getX()this.from_task.$bar.getX()+this.gantt.options.padding;for(;e();)t-=10;const s=this.gantt.options.header_height+this.gantt.options.bar_height+(this.gantt.options.padding+this.gantt.options.bar_height)*this.from_task.task._index+this.gantt.options.padding,i=this.to_task.$bar.getX()-this.gantt.options.padding/2,n=this.gantt.options.header_height+this.gantt.options.bar_height/2+(this.gantt.options.padding+this.gantt.options.bar_height)*this.to_task.task._index+this.gantt.options.padding,a=this.from_task.task._index>this.to_task.task._index,o=this.gantt.options.arrow_curve,r=a?1:0,h=a?-o:o,d=a?n+this.gantt.options.arrow_curve:n-this.gantt.options.arrow_curve;if(this.path=`\n M ${t} ${s}\n V ${d}\n a ${o} ${o} 0 0 ${r} ${o} ${h}\n L ${i} ${n}\n m -5 -5\n l 5 5\n l -5 5`,this.to_task.$bar.getX()\n
\n
\n ',this.hide(),this.title=this.parent.querySelector(".title"),this.subtitle=this.parent.querySelector(".subtitle"),this.pointer=this.parent.querySelector(".pointer")}show(t){if(!t.target_element)throw new Error("target_element is required to show popup");t.position||(t.position="left");const e=t.target_element;if(this.custom_html){let e=this.custom_html(t.task);e+='
',this.parent.innerHTML=e,this.pointer=this.parent.querySelector(".pointer")}else this.title.innerHTML=t.title,this.subtitle.innerHTML=t.subtitle,this.parent.style.width=this.parent.clientWidth+"px";let s;e instanceof HTMLElement?s=e.getBoundingClientRect():e instanceof SVGElement&&(s=t.target_element.getBBox()),"left"===t.position&&(this.parent.style.left=s.x+(s.width+10)+"px",this.parent.style.top=s.y+"px",this.pointer.style.transform="rotateZ(90deg)",this.pointer.style.left="-7px",this.pointer.style.top="2px"),this.parent.style.opacity=1}hide(){this.parent.style.opacity=0,this.parent.style.left=0}}class m{dragStartY=0;constructor(t,e){this.set_defaults(t,e)}set_defaults(t,e){this.gantt=t,this.columns=e}draw_table_header(){const t=document.createElement("thead"),e=document.createElement("tr");return this.columns.forEach((t=>{const s=document.createElement("th");s.textContent=t.title,e.appendChild(s)})),t.appendChild(e),t.classList.add("table-header"),d.style(e,"height",this.gantt.options.header_height+9+"px"),t}get_parentNode(t,e){return e.tagName===t.toUpperCase()?e:this.get_parentNode(t,e.parentNode)}draw_table_body(t){this.tasks=this.gantt.setGroupPosition(t);const e=document.createElement("tbody");return e.classList.add("table-body"),this.make_table_row().forEach((t=>e.append(t))),e.addEventListener("mousedown",(t=>{this.get_parentNode("td",t.target).classList.contains("draggable-item")&&this.bind_draggable_event(e)})),e}isRowLine(t){if(t<=2)return!1;return!this.tasks.find((e=>e.id===`${t}`)).groupPosition.includes("last")}make_table_row(){return this.tasks.map(((t,e)=>{const s=t.level-1,i=document.createElement("tr");return i.setAttribute("draggable","true"),i.setAttribute("data-id",t.id),d.style(i,{height:this.gantt.options.bar_height+this.gantt.options.padding+"px"}),1===s&&t.groupPosition.includes("last")&&i.classList.add("root-last"),this.columns.forEach((e=>{const n=document.createElement("td"),{data:a,render:o}=e;if("drag"===a)return n.innerHTML='',n.className="draggable-item",void i.append(n);if("wbs"===a&&(n.className=a),"name"===a&&t.level>1){n.setAttribute("rel",t.type),n.className=`work-name indent-${s} indent-${s}-${t.groupPosition[0]}`,t.groupPosition[1]&&n.classList.add(`indent-${s}-${t.groupPosition[1]}`),"default"!==t.type&&n.classList.add(t.closed?"closed":"opened");for(let e=0;e1&&i.classList.add("row-line"),n.append(i);break}n.append(i)}}if(o){const e=o(t[a],t);n.append(e)}else{const e=document.createTextNode(t[a]??"");n.append(e)}i.append(n)})),i.addEventListener("mousedown",(t=>{this.get_parentNode("td",t.target).classList.contains("draggable-item")&&(i.addEventListener("dragstart",(t=>{t.target.classList.add("dragging")})),i.addEventListener("dragend",(t=>{t.target.classList.remove("dragging")})))})),i}))}get_drag_after_element(t,e){return[...t.querySelectorAll("tr:not(.dragging)")].reduce(((t,s)=>{const i=s.getBoundingClientRect(),n=e-i.top-i.height/2;return n<0&&n>t.offset?{offset:n,element:s}:t}),{offset:Number.NEGATIVE_INFINITY}).element}find_task_item(t){return this.tasks.find((e=>e.id===t))}bind_draggable_event(t){t.addEventListener("dragover",(e=>{e.preventDefault(),this.dragStartY||(this.dragStartY=e.clientY),this.draggableEl=document.querySelector(".dragging"),this.afterElement=this.get_drag_after_element(t,e.clientY),t.insertBefore(this.draggableEl,this.afterElement)})),t.addEventListener("drop",(async t=>{t.preventDefault();const e=this.find_task_item(this.get_parentNode("tr",t.target).getAttribute("data-id")),s=this.find_task_item(this.draggableEl.getAttribute("data-id")),i=this.find_task_item(this.afterElement.getAttribute("data-id")),n={c_id:s.id,ref:i.parentId,c_position:t.clientY>this.dragStartY?i.position-1:i.position,level:i.level,p_position:s.position,p_parentId:s.parentId};if("default"!==e.type){const t=this.tasks.filter((t=>t.parentId===Number(e.id))).length;n.ref=e.id,n.level=e.level+1,n.c_position=t||0}this.dragStartY=0,this.gantt.draggble_rerender(n),this.gantt.trigger_event("drag_row",[n])}))}}class w{constructor(t){this.draw_split_bar(t)}draw_split_bar(t){const e=document.createElement("div");e.classList.add("split-bar");let s=0;const i=function(i){const n=e.previousElementSibling,a=e.nextSibling,o=i.clientX-s,r=Math.max(0,Math.min(e.offsetLeft+o,t.clientWidth))/t.clientWidth*100;d.style(e,{left:`${r}%`}),d.style(n,{"flex-basis":`${r}%`}),d.style(a,{"flex-basis":100-r+"%"}),d.style(n,{"overflow-x":"hidden"}),d.style(a,{"overflow-x":"hidden"}),s=i.clientX},n=function(){const t=e.previousElementSibling,s=e.nextSibling;document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n),d.style(t,{"overflow-x":"auto"}),d.style(s,{"overflow-x":"auto"})};e.addEventListener("mousedown",(function(t){s=t.clientX,document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)})),t.prepend(e)}}const f={QUARTER_DAY:"Quarter Day",HALF_DAY:"Half Day",DAY:"Day",WEEK:"Week",MONTH:"Month",YEAR:"Year"};class b{constructor(t,e,s,i){this.originTasks=e,this.setup_options(s),this.setup_tasks(e),this.setup_wrapper(t),this.change_view_mode(),this.setup_split_bar(),this.setup_table(i),this.bind_events()}setup_wrapper(t){let e,s;if("string"==typeof t&&(t=document.querySelector(t)),t instanceof HTMLElement)s=t,e=t.querySelector("svg");else{if(!(t instanceof SVGElement))throw new TypeError("Frappé Gantt only supports usage of a string CSS selector, HTML DOM element or SVG DOM element for the 'element' parameter");e=t}e?(this.$svg=e,this.$svg.classList.add("gantt")):this.$svg=p("svg",{append_to:s,class:"gantt"}),this.$wrapper=document.createElement("div"),this.$wrapper.classList.add("wrapper"),this.$container=document.createElement("div"),this.$container.classList.add("gantt-container");const i=this.$svg.parentElement;t.appendChild(this.setup_mode_handler()),i.appendChild(this.$wrapper),this.$wrapper.appendChild(this.$container),this.$container.appendChild(this.$svg),this.popup_wrapper=document.createElement("div"),this.popup_wrapper.classList.add("popup-wrapper"),this.$container.appendChild(this.popup_wrapper)}setup_mode_handler(){const t=document.createElement("div"),e=document.createElement("button"),s=document.createElement("div");return t.className="mt well well-sm clearfix",e.className="btn btn-default btn-sm mr-xs",e.innerText="Excel",d.style(s,{float:"right"}),Object.keys(f).forEach((t=>{const e=document.createElement("button");e.className="btn btn-default btn-sm mr-xs "+(f[t]===this.options.view_mode?"active":""),e.innerText=f[t],e.addEventListener("click",(e=>{e.target.classList.add("active"),e.target.parentNode.childNodes.forEach((t=>t.classList.remove("active"))),this.change_view_mode(f[t])})),s.appendChild(e)})),t.append(e),t.append(s),t}setup_options(t){const e={header_height:50,column_width:30,step:24,view_modes:[...Object.values(f)],bar_height:20,bar_corner_radius:3,arrow_curve:5,padding:18,view_mode:"Day",date_format:"YYYY-MM-DD",popup_trigger:"click",custom_popup_html:null,language:"ko"};this.options=Object.assign({},e,t)}setup_tasks(t){this.tasks=this.sort_tasks(t).map(((t,e)=>{if(t._start=r.parse(t.start),t._end=r.parse(t.end),r.diff(t._end,t._start,"year")>10&&(t.end=null),t._index=e,!t.start&&!t.end){const e=r.today();t._start=e,t._end=r.add(e,2,"day")}!t.start&&t.end&&(t._start=r.add(t._end,-2,"day")),t.start&&!t.end&&(t._end=r.add(t._start,2,"day"));if(r.get_date_values(t._end).slice(3).every((t=>0===t))&&(t._end=r.add(t._end,24,"hour")),t.start&&t.end||(t.invalid=!0),"string"==typeof t.dependencies||!t.dependencies){let e=[];t.dependencies&&(e=t.dependencies.split(",").map((t=>t.trim())).filter((t=>t))),t.dependencies=e}return t.id||(t.id=function(t){return t.name+"_"+Math.random().toString(36).slice(2,12)}(t)),t})),this.setup_dependencies()}setup_dependencies(){this.dependency_map={};for(let t of this.tasks)for(let e of t.dependencies)this.dependency_map[e]=this.dependency_map[e]||[],this.dependency_map[e].push(t.id)}refresh(t){this.setup_tasks(t),this.change_view_mode(),this.rerender_table(),this.originTasks=t}change_view_mode(t=this.options.view_mode){this.update_view_scale(t),this.setup_dates(),this.render(),this.trigger_event("view_change",[t])}update_view_scale(t){this.options.view_mode=t,t===f.DAY?(this.options.step=24,this.options.column_width=38):t===f.HALF_DAY?(this.options.step=12,this.options.column_width=38):t===f.QUARTER_DAY?(this.options.step=6,this.options.column_width=38):t===f.WEEK?(this.options.step=168,this.options.column_width=140):t===f.MONTH?(this.options.step=720,this.options.column_width=120):t===f.YEAR&&(this.options.step=8760,this.options.column_width=120)}setup_dates(){this.setup_gantt_dates(),this.setup_date_values()}setup_gantt_dates(){this.gantt_start=this.gantt_end=null;for(let t of this.tasks)(!this.gantt_start||t._startthis.gantt_end)&&(this.gantt_end=t._end);this.gantt_start=r.start_of(this.gantt_start,"day"),this.gantt_end=r.start_of(this.gantt_end,"day"),this.view_is([f.QUARTER_DAY,f.HALF_DAY])?(this.gantt_start=r.add(this.gantt_start,-7,"day"),this.gantt_end=r.add(this.gantt_end,7,"day")):this.view_is(f.MONTH)?(this.gantt_start=r.start_of(this.gantt_start,"year"),this.gantt_end=r.add(this.gantt_end,1,"year")):this.view_is(f.YEAR)?(this.gantt_start=r.add(this.gantt_start,-2,"year"),this.gantt_end=r.add(this.gantt_end,2,"year")):(this.gantt_start=r.add(this.gantt_start,-1,"month"),this.gantt_end=r.add(this.gantt_end,1,"month"))}setup_date_values(){this.dates=[];let t=null;for(;null===t||tthis.bind_table_event(t)))}draggble_rerender(t){this.update_origin_tasks(t),this.render(),this.rerender_table()}sort_tasks(t){const e=[...t],s={};return e.sort(((t,e)=>t.level-e.level||t.position-e.position)).forEach(((t,i)=>{if(2!==t.parentId){s.hasOwnProperty(t.parentId)?s[t.parentId].push(i):s[t.parentId]=[i];const n=e.findIndex((e=>+e.id===t.parentId));e.splice(i,1),e.splice(n+s[t.parentId].length,0,t)}}),[]),e}setGroupPosition(t){return t.reduce(((e,s)=>{const i=t.filter((t=>t.parentId===s.parentId));return s.groupPosition=[],i[0].id===s.id&&s.groupPosition.push("first"),i[i.length-1].id===s.id&&s.groupPosition.push("last"),s.groupPosition.length||s.groupPosition.push("middle"),e.push(s),e}),[])}update_dependecies(t){if(2===t)return[];const e=this.tasks.find((e=>e.id===t)).dependencies;return e.length?[...e,t]:[t]}update_origin_tasks(t){let e=this.tasks.reduce(((e,s)=>{if(s.id===t.c_id){const e=this.update_dependecies(t.ref);s={...s,parentId:Number(t.ref),dependencies:e,position:t.c_position,level:t.level,wbs:e.length?`${e.join("-")}-${t.c_id}`:`${t.c_id}`}}else{if(s.parentId===Number(t.ref)&&t.c_position===t.p_position)return e.push(s),e;s.parentId===Number(t.ref)?s.position=t.c_position>t.p_position?s.positiont.p_position?s.position:s.position>=t.c_position?s.position+1:s.position:s.parentId===t.p_parentId&&(s.position=s.position{if(s.id===e)return delete s.closed,t.splice(s._index,1,s);s.dependencies.includes(e)&&t.splice(s._index,0,s)})):t=this.tasks.reduce(((t,s)=>s.id===e?[...t,{...s,closed:!0}]:s.dependencies.includes(e)?t:[...t,s]),[]),this.setup_tasks(t),this.render(),this.rerender_table()}}make_table(){const t=document.createElement("div"),e=document.createElement("table");t.className="table-container";const s=this.table.draw_table_header(),i=this.table.draw_table_body(this.tasks);e.append(s),e.append(i),i.addEventListener("click",(t=>this.bind_table_event(t))),t.append(e),this.$wrapper.prepend(t)}make_grid(){this.make_grid_background(),this.make_grid_rows(),this.make_grid_ticks(),this.make_grid_highlights()}handle_selected(t){const e=this.$wrapper.querySelectorAll("tr")[t._index+1],s=this.$wrapper.querySelectorAll(".grid-row")[t._index];e.classList.contains("selected")||Array.prototype.forEach.call(this.$wrapper.querySelectorAll(".selected"),(t=>t.classList.remove("selected"))),e?.classList.toggle("selected"),s?.classList.toggle("selected")}make_grid_background(){const t=this.dates.length*this.options.column_width,e=this.options.header_height+this.options.padding+(this.options.bar_height+this.options.padding)*this.tasks.length;p("rect",{x:0,y:0,width:t,height:e,class:"grid-background",append_to:this.layers.grid}),d.attr(this.$svg,{height:e,width:"100%"})}make_grid_rows(){const t=p("g",{append_to:this.layers.grid}),e=this.dates.length*this.options.column_width,s=this.options.bar_height+this.options.padding;let i=this.options.header_height+this.options.padding/2;for(let n of this.tasks)p("rect",{x:0,y:i,width:e,height:s,class:"grid-row",append_to:t}),i+=this.options.bar_height+this.options.padding}make_grid_header(){const t=this.dates.length*this.options.column_width,e=this.options.header_height+10,s=window.scrollY,i=s+this.$wrapper.getBoundingClientRect().top;i<=s&&(this.layers.header.style.transform=`translate(0px, ${Math.floor(window.scrollY-i)}px)`),p("rect",{x:0,y:0,width:t,height:e,class:"grid-header",append_to:this.layers.header})}make_grid_ticks(){let t=0,e=this.options.header_height+this.options.padding/2,s=(this.options.bar_height+this.options.padding)*this.tasks.length;for(let i of this.dates){let n="tick";this.view_is(f.DAY)&&1===i.getDate()&&(n+=" thick"),this.view_is(f.WEEK)&&i.getDate()>=1&&i.getDate()<8&&(n+=" thick"),this.view_is(f.MONTH)&&i.getMonth()%3==0&&(n+=" thick"),p("path",{d:`M ${t} ${e} v ${s}`,class:n,append_to:this.layers.grid}),this.view_is(f.MONTH)?t+=r.get_days_in_month(i)*this.options.column_width/30:t+=this.options.column_width}}make_grid_highlights(){if(this.view_is(f.DAY)){p("rect",{x:r.diff(r.today(),this.gantt_start,"hour")/this.options.step*this.options.column_width,y:0,width:this.options.column_width,height:(this.options.bar_height+this.options.padding)*this.tasks.length+this.options.header_height+this.options.padding/2,class:"today-highlight",append_to:this.layers.grid})}}make_dates(){const t=window.scrollY,e=t+this.$wrapper.getBoundingClientRect().top;e<=t&&(this.layers.date.style.transform=`translate(0px, ${Math.floor(window.scrollY-e)}px)`);for(let t of this.get_dates_to_draw())if(p("text",{x:t.lower_x,y:t.lower_y,innerHTML:t.lower_text,class:"lower-text",append_to:this.layers.date}),t.upper_text){const e=p("text",{x:t.upper_x,y:t.upper_y,innerHTML:t.upper_text,class:"upper-text",append_to:this.layers.date});e.getBBox().x2>this.layers.grid.getBBox().width&&e.remove()}}get_dates_to_draw(){let t=null;return this.dates.map(((e,s)=>{const i=this.get_date_info(e,t,s);return t=e,i}))}get_date_info(t,e,s){e||(e=r.add(t,1,"year"));const i={"Quarter Day_lower":r.format(t,"HH",this.options.language),"Half Day_lower":r.format(t,"HH",this.options.language),Day_lower:t.getDate()!==e.getDate()?r.format(t,"D",this.options.language):"",Week_lower:t.getMonth()!==e.getMonth()?r.format(t,"D MMM",this.options.language):r.format(t,"D",this.options.language),Month_lower:r.format(t,"MMMM",this.options.language),Year_lower:r.format(t,"YYYY",this.options.language),"Quarter Day_upper":t.getDate()!==e.getDate()?r.format(t,"D MMM",this.options.language):"","Half Day_upper":t.getDate()!==e.getDate()?t.getMonth()!==e.getMonth()?r.format(t,"D MMM",this.options.language):r.format(t,"D",this.options.language):"",Day_upper:t.getMonth()!==e.getMonth()?r.format(t,"MMMM",this.options.language):"",Week_upper:t.getMonth()!==e.getMonth()?r.format(t,"MMMM",this.options.language):"",Month_upper:t.getFullYear()!==e.getFullYear()?r.format(t,"YYYY",this.options.language):"",Year_upper:t.getFullYear()!==e.getFullYear()?r.format(t,"YYYY",this.options.language):""},n={x:s*this.options.column_width,lower_y:this.options.header_height,upper_y:this.options.header_height-25},a={"Quarter Day_lower":4*this.options.column_width/2,"Quarter Day_upper":0,"Half Day_lower":2*this.options.column_width/2,"Half Day_upper":0,Day_lower:this.options.column_width/2,Day_upper:30*this.options.column_width/2,Week_lower:0,Week_upper:4*this.options.column_width/2,Month_lower:this.options.column_width/2,Month_upper:12*this.options.column_width/2,Year_lower:this.options.column_width/2,Year_upper:30*this.options.column_width/2};return{upper_text:i[`${this.options.view_mode}_upper`],lower_text:i[`${this.options.view_mode}_lower`],upper_x:n.x+a[`${this.options.view_mode}_upper`],upper_y:n.upper_y,lower_x:n.x+a[`${this.options.view_mode}_lower`],lower_y:n.lower_y}}make_bars(){this.bars=this.tasks.map((t=>{const e=new g(this,t);return this.layers.bar.appendChild(e.group),e}))}make_arrows(){this.arrows=[];for(let t of this.tasks){let e=[];e=t.dependencies.map((e=>{const s=this.get_task(e);if(!s)return;const i=new c(this,this.bars[s._index],this.bars[t._index]);return this.layers.arrow.appendChild(i.element),i})).filter(Boolean),this.arrows=this.arrows.concat(e)}}map_arrows_on_bars(){for(let t of this.bars)t.arrows=this.arrows.filter((e=>e.from_task.task.id===t.task.id||e.to_task.task.id===t.task.id))}set_width(){const t=this.$svg.getBoundingClientRect().width,e=this.$svg.querySelector(".grid .grid-row").getAttribute("width");t{const i=window.scrollY;s||(s=!0,window.requestAnimationFrame((()=>{t<=i?(e.style.top=`${Math.floor(i-t)}px`,this.layers.header.style.transform=`translate(0px, ${Math.floor(i-t)}px)`,this.layers.date.style.transform=`translate(0px, ${Math.floor(i-t)}px)`):(e.style.top="0px",this.layers.header.style.transform="translate(0px, 0px)",this.layers.date.style.transform="translate(0px, 0px)"),s=!1})))}),{passive:!0})}bind_grid_click(){d.on(this.$svg,this.options.popup_trigger,".grid-row, .grid-header",(()=>{this.unselect_all(),this.hide_popup()}))}bind_bar_events(){let t=!1,e=0,s=0,i=!1,n=!1,a=null,o=[];this.bar_being_dragged=null,d.on(this.$svg,"mousedown",".bar-wrapper, .handle",((r,h)=>{const p=d.closest(".bar-wrapper",h);h.classList.contains("left")?i=!0:h.classList.contains("right")?n=!0:h.classList.contains("bar-wrapper")&&(t=!0),p.classList.add("active"),e=r.offsetX,s=r.offsetY,a=p.getAttribute("data-id");const l=[a,...this.get_all_dependent_tasks(a)];o=l.map((t=>this.get_bar(t))),this.bar_being_dragged=a,o.forEach((t=>{const e=t.$bar;e.ox=e.getX(),e.oy=e.getY(),e.owidth=e.getWidth(),e.finaldx=0}))})),d.on(this.$svg,"mousemove",(s=>{if(!(t||i||n))return;const r=s.offsetX-e;s.offsetY,o.forEach((e=>{const s=e.$bar;s.finaldx=this.get_snap_position(r),this.hide_popup(),i?a===e.task.id?e.update_bar_position({x:s.ox+s.finaldx,width:s.owidth-s.finaldx}):e.update_bar_position({x:s.ox+s.finaldx}):n?a===e.task.id&&e.update_bar_position({width:s.owidth+s.finaldx}):t&&e.update_bar_position({x:s.ox+s.finaldx})}))})),document.addEventListener("mouseup",(e=>{(t||i||n)&&o.forEach((t=>t.group.classList.remove("active"))),t=!1,i=!1,n=!1})),d.on(this.$svg,"mouseup",(t=>{this.bar_being_dragged=null,o.forEach((t=>{t.$bar.finaldx&&(t.date_changed(),t.set_action_completed())}))})),this.bind_bar_progress()}bind_bar_progress(){let t=0,e=0,s=null,i=null,n=null,a=null;d.on(this.$svg,"mousedown",".handle.progress",((o,r)=>{s=!0,t=o.offsetX,e=o.offsetY;const h=d.closest(".bar-wrapper",r).getAttribute("data-id");i=this.get_bar(h),n=i.$bar_progress,a=i.$bar,n.finaldx=0,n.owidth=n.getWidth(),n.min_dx=-n.getWidth(),n.max_dx=a.getWidth()-n.getWidth()})),d.on(this.$svg,"mousemove",(e=>{if(!s)return;let a=e.offsetX-t;e.offsetY,a>n.max_dx&&(a=n.max_dx),a{s=!1,n&&n.finaldx&&(i.progress_changed(),i.set_action_completed())}))}get_all_dependent_tasks(t){let e=[],s=[t];for(;s.length;){const t=s.reduce(((t,e)=>t=t.concat(this.dependency_map[e])),[]);e=e.concat(t),s=t.filter((t=>!s.includes(t)))}return e.filter(Boolean)}get_snap_position(t){let e,s,i=t;return this.view_is(f.WEEK)?(e=t%(this.options.column_width/7),s=i-e+(e{t.classList.remove("active")}))}view_is(t){return"string"==typeof t?this.options.view_mode===t:!!Array.isArray(t)&&t.some((t=>this.options.view_mode===t))}get_task(t){return this.tasks.find((e=>e.id===t))}get_bar(t){return this.bars.find((e=>e.task.id===t))}show_popup(t){this.popup||(this.popup=new u(this.popup_wrapper,this.options.custom_popup_html)),this.popup.show(t)}hide_popup(){this.popup&&this.popup.hide()}trigger_event(t,e){this.options["on_"+t]&&this.options["on_"+t].apply(null,e)}get_oldest_starting_date(){return this.tasks.map((t=>t._start)).reduce(((t,e)=>e<=t?e:t))}clear(){this.$svg.innerHTML=""}}return b.VIEW_MODE=f,b}(); //# sourceMappingURL=frappe-gantt.min.js.map Index: reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.min.js.map =================================================================== diff -u -r86c7f799884e640e23af17250c07265a21af1c33 -r0fc9cdf566a919f98a017a6d6dc654e27ee576e2 --- reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.min.js.map (.../frappe-gantt.min.js.map) (revision 86c7f799884e640e23af17250c07265a21af1c33) +++ reference/jquery-plugins/gantt-0.6.1/dist/frappe-gantt.min.js.map (.../frappe-gantt.min.js.map) (revision 0fc9cdf566a919f98a017a6d6dc654e27ee576e2) @@ -1 +1 @@ -{"version":3,"file":"frappe-gantt.min.js","sources":["../src/date_utils.js","../src/svg_utils.js","../src/bar.js","../src/arrow.js","../src/popup.js","../src/table.js","../src/split.js","../src/index.js"],"sourcesContent":["const YEAR = 'year';\r\nconst MONTH = 'month';\r\nconst DAY = 'day';\r\nconst HOUR = 'hour';\r\nconst MINUTE = 'minute';\r\nconst SECOND = 'second';\r\nconst MILLISECOND = 'millisecond';\r\n\r\nexport default {\r\n parse(date, date_separator = '-', time_separator = /[.:]/) {\r\n if (date instanceof Date) {\r\n return date;\r\n }\r\n if (typeof date === 'string') {\r\n let date_parts, time_parts;\r\n const parts = date.split(' ');\r\n\r\n date_parts = parts[0]\r\n .split(date_separator)\r\n .map((val) => parseInt(val, 10));\r\n time_parts = parts[1] && parts[1].split(time_separator);\r\n\r\n // month is 0 indexed\r\n date_parts[1] = date_parts[1] - 1;\r\n\r\n let vals = date_parts;\r\n\r\n if (time_parts && time_parts.length) {\r\n if (time_parts.length == 4) {\r\n time_parts[3] = '0.' + time_parts[3];\r\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\r\n }\r\n vals = vals.concat(time_parts);\r\n }\r\n\r\n return new Date(...vals);\r\n }\r\n },\r\n\r\n to_string(date, with_time = false) {\r\n if (!(date instanceof Date)) {\r\n throw new TypeError('Invalid argument type');\r\n }\r\n const vals = this.get_date_values(date).map((val, i) => {\r\n if (i === 1) {\r\n // add 1 for month\r\n val = val + 1;\r\n }\r\n\r\n if (i === 6) {\r\n return padStart(val + '', 3, '0');\r\n }\r\n\r\n return padStart(val + '', 2, '0');\r\n });\r\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\r\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\r\n\r\n return date_string + (with_time ? ' ' + time_string : '');\r\n },\r\n\r\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'ko') {\r\n const dateTimeFormat = new Intl.DateTimeFormat(lang, {\r\n month: 'long'\r\n });\r\n const month_name = dateTimeFormat.format(date);\r\n const month_name_capitalized =\r\n month_name.charAt(0).toUpperCase() + month_name.slice(1);\r\n\r\n const values = this.get_date_values(date).map(d => padStart(d, 2, 0));\r\n const format_map = {\r\n YYYY: values[0],\r\n MM: padStart(+values[1] + 1, 2, 0),\r\n DD: values[2],\r\n HH: values[3],\r\n mm: values[4],\r\n ss: values[5],\r\n SSS: values[6],\r\n D: values[2],\r\n MMMM: month_name_capitalized,\r\n MMM: month_name_capitalized,\r\n };\r\n\r\n let str = format_string;\r\n const formatted_values = [];\r\n\r\n Object.keys(format_map)\r\n .sort((a, b) => b.length - a.length) // big string first\r\n .forEach((key) => {\r\n if (str.includes(key)) {\r\n str = str.replace(key, `$${formatted_values.length}`);\r\n formatted_values.push(format_map[key]);\r\n }\r\n });\r\n\r\n formatted_values.forEach((value, i) => {\r\n str = str.replace(`$${i}`, value);\r\n });\r\n\r\n return str;\r\n },\r\n\r\n diff(date_a, date_b, scale = DAY) {\r\n let milliseconds, seconds, hours, minutes, days, months, years;\r\n\r\n milliseconds = date_a - date_b;\r\n seconds = milliseconds / 1000;\r\n minutes = seconds / 60;\r\n hours = minutes / 60;\r\n days = hours / 24;\r\n months = days / 30;\r\n years = months / 12;\r\n\r\n if (!scale.endsWith('s')) {\r\n scale += 's';\r\n }\r\n\r\n return Math.floor(\r\n {\r\n milliseconds,\r\n seconds,\r\n minutes,\r\n hours,\r\n days,\r\n months,\r\n years,\r\n }[scale]\r\n );\r\n },\r\n\r\n today() {\r\n const vals = this.get_date_values(new Date()).slice(0, 3);\r\n return new Date(...vals);\r\n },\r\n\r\n now() {\r\n return new Date();\r\n },\r\n\r\n add(date, qty, scale) {\r\n qty = parseInt(qty, 10);\r\n const vals = [\r\n date.getFullYear() + (scale === YEAR ? qty : 0),\r\n date.getMonth() + (scale === MONTH ? qty : 0),\r\n date.getDate() + (scale === DAY ? qty : 0),\r\n date.getHours() + (scale === HOUR ? qty : 0),\r\n date.getMinutes() + (scale === MINUTE ? qty : 0),\r\n date.getSeconds() + (scale === SECOND ? qty : 0),\r\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\r\n ];\r\n return new Date(...vals);\r\n },\r\n\r\n start_of(date, scale) {\r\n const scores = {\r\n [YEAR]: 6,\r\n [MONTH]: 5,\r\n [DAY]: 4,\r\n [HOUR]: 3,\r\n [MINUTE]: 2,\r\n [SECOND]: 1,\r\n [MILLISECOND]: 0,\r\n };\r\n\r\n function should_reset(_scale) {\r\n const max_score = scores[scale];\r\n return scores[_scale] <= max_score;\r\n }\r\n\r\n const vals = [\r\n date.getFullYear(),\r\n should_reset(YEAR) ? 0 : date.getMonth(),\r\n should_reset(MONTH) ? 1 : date.getDate(),\r\n should_reset(DAY) ? 0 : date.getHours(),\r\n should_reset(HOUR) ? 0 : date.getMinutes(),\r\n should_reset(MINUTE) ? 0 : date.getSeconds(),\r\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\r\n ];\r\n\r\n return new Date(...vals);\r\n },\r\n\r\n clone(date) {\r\n return new Date(...this.get_date_values(date));\r\n },\r\n\r\n get_date_values(date) {\r\n return [\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds(),\r\n ];\r\n },\r\n\r\n get_days_in_month(date) {\r\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n const month = date.getMonth();\r\n\r\n if (month !== 1) {\r\n return no_of_days[month];\r\n }\r\n\r\n // Feb\r\n const year = date.getFullYear();\r\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\r\n return 29;\r\n }\r\n return 28;\r\n },\r\n};\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\r\nfunction padStart(str, targetLength, padString) {\r\n str = str + '';\r\n targetLength = targetLength >> 0;\r\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\r\n if (str.length > targetLength) {\r\n return String(str);\r\n } else {\r\n targetLength = targetLength - str.length;\r\n if (targetLength > padString.length) {\r\n padString += padString.repeat(targetLength / padString.length);\r\n }\r\n return padString.slice(0, targetLength) + String(str);\r\n }\r\n}\r\n","export function $(expr, con) {\r\n return typeof expr === 'string'\r\n ? (con || document).querySelector(expr)\r\n : expr || null;\r\n}\r\n\r\nexport function createSVG(tag, attrs) {\r\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\r\n for (let attr in attrs) {\r\n if (attr === 'append_to') {\r\n const parent = attrs.append_to;\r\n parent.appendChild(elem);\r\n } else if (attr === 'innerHTML') {\r\n elem.innerHTML = attrs.innerHTML;\r\n } else {\r\n elem.setAttribute(attr, attrs[attr]);\r\n }\r\n }\r\n return elem;\r\n}\r\n\r\nexport function animateSVG(svgElement, attr, from, to) {\r\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\r\n\r\n if (animatedSvgElement === svgElement) {\r\n // triggered 2nd time programmatically\r\n // trigger artificial click event\r\n const event = document.createEvent('HTMLEvents');\r\n event.initEvent('click', true, true);\r\n event.eventName = 'click';\r\n animatedSvgElement.dispatchEvent(event);\r\n }\r\n}\r\n\r\nfunction getAnimationElement(\r\n svgElement,\r\n attr,\r\n from,\r\n to,\r\n dur = '0.4s',\r\n begin = '0.1s'\r\n) {\r\n const animEl = svgElement.querySelector('animate');\r\n if (animEl) {\r\n $.attr(animEl, {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin: 'click + ' + begin, // artificial click\r\n });\r\n return svgElement;\r\n }\r\n\r\n const animateElement = createSVG('animate', {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin,\r\n calcMode: 'spline',\r\n values: from + ';' + to,\r\n keyTimes: '0; 1',\r\n keySplines: cubic_bezier('ease-out'),\r\n });\r\n svgElement.appendChild(animateElement);\r\n\r\n return svgElement;\r\n}\r\n\r\nfunction cubic_bezier(name) {\r\n return {\r\n ease: '.25 .1 .25 1',\r\n linear: '0 0 1 1',\r\n 'ease-in': '.42 0 1 1',\r\n 'ease-out': '0 0 .58 1',\r\n 'ease-in-out': '.42 0 .58 1',\r\n }[name];\r\n}\r\n\r\n$.on = (element, event, selector, callback) => {\r\n if (!callback) {\r\n callback = selector;\r\n $.bind(element, event, callback);\r\n } else {\r\n $.delegate(element, event, selector, callback);\r\n }\r\n};\r\n\r\n$.off = (element, event, handler) => {\r\n element.removeEventListener(event, handler);\r\n};\r\n\r\n$.bind = (element, event, callback) => {\r\n event.split(/\\s+/).forEach(function (event) {\r\n element.addEventListener(event, callback);\r\n });\r\n};\r\n\r\n$.delegate = (element, event, selector, callback) => {\r\n element.addEventListener(event, function (e) {\r\n const delegatedTarget = e.target.closest(selector);\r\n if (delegatedTarget) {\r\n e.delegatedTarget = delegatedTarget;\r\n callback.call(this, e, delegatedTarget);\r\n }\r\n });\r\n};\r\n\r\n$.closest = (selector, element) => {\r\n if (!element) return null;\r\n\r\n if (element.matches(selector)) {\r\n return element;\r\n }\r\n\r\n return $.closest(selector, element.parentNode);\r\n};\r\n\r\n$.attr = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.attr(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.setAttribute(attr, value);\r\n};\r\n\r\n$.style = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.style(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.style[attr] = value;\r\n};\r\n","import date_utils from './date_utils';\r\nimport { $, createSVG, animateSVG } from './svg_utils';\r\n\r\nexport default class Bar {\r\n constructor(gantt, task) {\r\n this.set_defaults(gantt, task);\r\n this.prepare();\r\n this.draw();\r\n this.bind();\r\n }\r\n\r\n set_defaults(gantt, task) {\r\n this.action_completed = false;\r\n this.gantt = gantt;\r\n this.task = task;\r\n }\r\n\r\n prepare() {\r\n this.prepare_values();\r\n this.prepare_helpers();\r\n }\r\n\r\n prepare_values() {\r\n this.invalid = this.task.invalid;\r\n this.height = this.gantt.options.bar_height;\r\n this.x = this.compute_x();\r\n this.y = this.compute_y();\r\n this.corner_radius = this.gantt.options.bar_corner_radius;\r\n this.duration =\r\n date_utils.diff(this.task._end, this.task._start, 'hour') /\r\n this.gantt.options.step;\r\n this.width = this.gantt.options.column_width * this.duration;\r\n this.progress_width =\r\n this.gantt.options.column_width *\r\n this.duration *\r\n (this.task.progress / 100) || 0;\r\n this.group = createSVG('g', {\r\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\r\n 'data-id': this.task.id,\r\n });\r\n this.bar_group = createSVG('g', {\r\n class: 'bar-group',\r\n append_to: this.group,\r\n });\r\n this.handle_group = createSVG('g', {\r\n class: 'handle-group',\r\n append_to: this.group,\r\n });\r\n }\r\n\r\n prepare_helpers() {\r\n SVGElement.prototype.getX = function () {\r\n return +this.getAttribute('x');\r\n };\r\n SVGElement.prototype.getY = function () {\r\n return +this.getAttribute('y');\r\n };\r\n SVGElement.prototype.getWidth = function () {\r\n return +this.getAttribute('width');\r\n };\r\n SVGElement.prototype.getHeight = function () {\r\n return +this.getAttribute('height');\r\n };\r\n SVGElement.prototype.getEndX = function () {\r\n return this.getX() + this.getWidth();\r\n };\r\n }\r\n\r\n draw() {\r\n this.draw_bar();\r\n this.draw_progress_bar();\r\n this.draw_label();\r\n this.draw_resize_handles();\r\n }\r\n\r\n draw_bar() {\r\n this.$bar = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar, 'width', 0, this.width);\r\n\r\n if (this.invalid) {\r\n this.$bar.classList.add('bar-invalid');\r\n }\r\n }\r\n\r\n draw_progress_bar() {\r\n if (this.invalid) return;\r\n this.$bar_progress = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.progress_width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar-progress',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\r\n }\r\n\r\n draw_label() {\r\n createSVG('text', {\r\n x: this.x + this.width / 2,\r\n y: this.y + this.height / 2,\r\n innerHTML: this.task.name,\r\n class: 'bar-label',\r\n append_to: this.bar_group,\r\n });\r\n // labels get BBox in the next tick\r\n requestAnimationFrame(() => this.update_label_position());\r\n }\r\n\r\n draw_resize_handles() {\r\n if (this.invalid) return;\r\n\r\n const bar = this.$bar;\r\n const handle_width = 8;\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + bar.getWidth() - 9,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle right',\r\n append_to: this.handle_group,\r\n });\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + 1,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle left',\r\n append_to: this.handle_group,\r\n });\r\n\r\n if (this.task.progress && this.task.progress < 100) {\r\n this.$handle_progress = createSVG('polygon', {\r\n points: this.get_progress_polygon_points().join(','),\r\n class: 'handle progress',\r\n append_to: this.handle_group,\r\n });\r\n }\r\n }\r\n\r\n get_progress_polygon_points() {\r\n const bar_progress = this.$bar_progress;\r\n return [\r\n bar_progress.getEndX() - 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX() + 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX(),\r\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\r\n ];\r\n }\r\n\r\n bind() {\r\n if (this.invalid) return;\r\n this.setup_click_event();\r\n }\r\n\r\n setup_click_event() {\r\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.show_popup();\r\n this.gantt.unselect_all();\r\n this.group.classList.add('active');\r\n });\r\n\r\n $.on(this.group, 'dblclick', (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.gantt.trigger_event('click', [this.task]);\r\n });\r\n }\r\n\r\n show_popup() {\r\n if (this.gantt.bar_being_dragged) return;\r\n\r\n const start_date = date_utils.format(\r\n this.task._start,\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const end_date = date_utils.format(\r\n date_utils.add(this.task._end, -1, 'second'),\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const subtitle = start_date + ' - ' + end_date;\r\n\r\n this.gantt.show_popup({\r\n target_element: this.$bar,\r\n title: this.task.name,\r\n subtitle: subtitle,\r\n task: this.task,\r\n });\r\n this.gantt.handle_selected(this.task);\r\n }\r\n\r\n update_bar_position({ x = null, width = null }) {\r\n const bar = this.$bar;\r\n if (x) {\r\n // get all x values of parent task\r\n const xs = this.task.dependencies.map((dep) => {\r\n return this.gantt.get_bar(dep).$bar.getX();\r\n });\r\n // child task must not go before parent\r\n const valid_x = xs.reduce((prev, curr) => {\r\n return x >= curr;\r\n }, x);\r\n if (!valid_x) {\r\n width = null;\r\n return;\r\n }\r\n this.update_attr(bar, 'x', x);\r\n }\r\n if (width && width >= this.gantt.options.column_width) {\r\n this.update_attr(bar, 'width', width);\r\n }\r\n this.update_label_position();\r\n this.update_handle_position();\r\n this.update_progressbar_position();\r\n this.update_arrow_position();\r\n }\r\n\r\n date_changed() {\r\n let changed = false;\r\n const { new_start_date, new_end_date } = this.compute_start_end_date();\r\n\r\n if (Number(this.task._start) !== Number(new_start_date)) {\r\n changed = true;\r\n this.task._start = new_start_date;\r\n }\r\n\r\n if (Number(this.task._end) !== Number(new_end_date)) {\r\n changed = true;\r\n this.task._end = new_end_date;\r\n }\r\n\r\n if (!changed) return;\r\n\r\n this.gantt.trigger_event('date_change', [\r\n this.task,\r\n new_start_date,\r\n date_utils.add(new_end_date, -1, 'second'),\r\n ]);\r\n }\r\n\r\n progress_changed() {\r\n const new_progress = this.compute_progress();\r\n this.task.progress = new_progress;\r\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\r\n }\r\n\r\n set_action_completed() {\r\n this.action_completed = true;\r\n setTimeout(() => (this.action_completed = false), 1000);\r\n }\r\n\r\n compute_start_end_date() {\r\n const bar = this.$bar;\r\n const x_in_units = bar.getX() / this.gantt.options.column_width;\r\n const new_start_date = date_utils.add(\r\n this.gantt.gantt_start,\r\n x_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\r\n const new_end_date = date_utils.add(\r\n new_start_date,\r\n width_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n\r\n return { new_start_date, new_end_date };\r\n }\r\n\r\n compute_progress() {\r\n const progress =\r\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\r\n return parseInt(progress, 10);\r\n }\r\n\r\n compute_x() {\r\n const { step, column_width } = this.gantt.options;\r\n const task_start = this.task._start;\r\n const gantt_start = this.gantt.gantt_start;\r\n\r\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\r\n let x = (diff / step) * column_width;\r\n\r\n if (this.gantt.view_is('Month')) {\r\n const diff = date_utils.diff(task_start, gantt_start, 'day');\r\n x = (diff * column_width) / 30;\r\n }\r\n return x;\r\n }\r\n\r\n compute_y() {\r\n return (\r\n this.gantt.options.header_height +\r\n this.gantt.options.padding +\r\n this.task._index * (this.height + this.gantt.options.padding)\r\n );\r\n }\r\n\r\n get_snap_position(dx) {\r\n let odx = dx,\r\n rem,\r\n position;\r\n\r\n if (this.gantt.view_is('Week')) {\r\n rem = dx % (this.gantt.options.column_width / 7);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 14\r\n ? 0\r\n : this.gantt.options.column_width / 7);\r\n } else if (this.gantt.view_is('Month')) {\r\n rem = dx % (this.gantt.options.column_width / 30);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 60\r\n ? 0\r\n : this.gantt.options.column_width / 30);\r\n } else {\r\n rem = dx % this.gantt.options.column_width;\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 2\r\n ? 0\r\n : this.gantt.options.column_width);\r\n }\r\n return position;\r\n }\r\n\r\n update_attr(element, attr, value) {\r\n value = +value;\r\n if (!isNaN(value)) {\r\n element.setAttribute(attr, value);\r\n }\r\n return element;\r\n }\r\n\r\n update_progressbar_position() {\r\n if (this.invalid) return;\r\n this.$bar_progress.setAttribute('x', this.$bar.getX());\r\n this.$bar_progress.setAttribute(\r\n 'width',\r\n this.$bar.getWidth() * (this.task.progress / 100)\r\n );\r\n }\r\n\r\n update_label_position() {\r\n const bar = this.$bar,\r\n label = this.group.querySelector('.bar-label');\r\n\r\n if (label.getBBox().width > bar.getWidth()) {\r\n label.classList.add('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\r\n } else {\r\n label.classList.remove('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\r\n }\r\n }\r\n\r\n update_handle_position() {\r\n if (this.invalid) return;\r\n const bar = this.$bar;\r\n this.handle_group\r\n .querySelector('.handle.left')\r\n .setAttribute('x', bar.getX() + 1);\r\n this.handle_group\r\n .querySelector('.handle.right')\r\n .setAttribute('x', bar.getEndX() - 9);\r\n const handle = this.group.querySelector('.handle.progress');\r\n handle &&\r\n handle.setAttribute('points', this.get_progress_polygon_points());\r\n }\r\n\r\n update_arrow_position() {\r\n this.arrows = this.arrows || [];\r\n for (let arrow of this.arrows) {\r\n arrow.update();\r\n }\r\n }\r\n}\r\n\r\nfunction isFunction(functionToCheck) {\r\n var getType = {};\r\n return (\r\n functionToCheck &&\r\n getType.toString.call(functionToCheck) === '[object Function]'\r\n );\r\n}\r\n","import { createSVG } from './svg_utils';\r\n\r\nexport default class Arrow {\r\n constructor(gantt, from_task, to_task) {\r\n this.gantt = gantt;\r\n this.from_task = from_task;\r\n this.to_task = to_task;\r\n\r\n this.calculate_path();\r\n this.draw();\r\n }\r\n\r\n calculate_path() {\r\n let start_x =\r\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\r\n\r\n const condition = () =>\r\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\r\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\r\n\r\n while (condition()) {\r\n start_x -= 10;\r\n }\r\n\r\n const start_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.from_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\r\n const end_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height / 2 +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.to_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const from_is_below_to =\r\n this.from_task.task._index > this.to_task.task._index;\r\n const curve = this.gantt.options.arrow_curve;\r\n const clockwise = from_is_below_to ? 1 : 0;\r\n const curve_y = from_is_below_to ? -curve : curve;\r\n const offset = from_is_below_to\r\n ? end_y + this.gantt.options.arrow_curve\r\n : end_y - this.gantt.options.arrow_curve;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n V ${offset}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n\r\n if (\r\n this.to_task.$bar.getX() <\r\n this.from_task.$bar.getX() + this.gantt.options.padding\r\n ) {\r\n const down_1 = this.gantt.options.padding / 2 - curve;\r\n const down_2 =\r\n this.to_task.$bar.getY() +\r\n this.to_task.$bar.getHeight() / 2 -\r\n curve_y;\r\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n v ${down_1}\r\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\r\n H ${left}\r\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\r\n V ${down_2}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n }\r\n }\r\n\r\n draw() {\r\n this.element = createSVG('path', {\r\n d: this.path,\r\n 'data-from': this.from_task.task.id,\r\n 'data-to': this.to_task.task.id,\r\n });\r\n }\r\n\r\n update() {\r\n this.calculate_path();\r\n this.element.setAttribute('d', this.path);\r\n }\r\n}\r\n","export default class Popup {\r\n constructor(parent, custom_html) {\r\n this.parent = parent;\r\n this.custom_html = custom_html;\r\n this.make();\r\n }\r\n\r\n make() {\r\n this.parent.innerHTML = `\r\n
\r\n
\r\n
\r\n `;\r\n\r\n this.hide();\r\n\r\n this.title = this.parent.querySelector('.title');\r\n this.subtitle = this.parent.querySelector('.subtitle');\r\n this.pointer = this.parent.querySelector('.pointer');\r\n }\r\n\r\n show(options) {\r\n if (!options.target_element) {\r\n throw new Error('target_element is required to show popup');\r\n }\r\n if (!options.position) {\r\n options.position = 'left';\r\n }\r\n const target_element = options.target_element;\r\n\r\n if (this.custom_html) {\r\n let html = this.custom_html(options.task);\r\n html += '
';\r\n this.parent.innerHTML = html;\r\n this.pointer = this.parent.querySelector('.pointer');\r\n } else {\r\n // set data\r\n this.title.innerHTML = options.title;\r\n this.subtitle.innerHTML = options.subtitle;\r\n this.parent.style.width = this.parent.clientWidth + 'px';\r\n }\r\n\r\n // set position\r\n let position_meta;\r\n if (target_element instanceof HTMLElement) {\r\n position_meta = target_element.getBoundingClientRect();\r\n } else if (target_element instanceof SVGElement) {\r\n position_meta = options.target_element.getBBox();\r\n }\r\n\r\n if (options.position === 'left') {\r\n this.parent.style.left =\r\n position_meta.x + (position_meta.width + 10) + 'px';\r\n this.parent.style.top = position_meta.y + 'px';\r\n\r\n this.pointer.style.transform = 'rotateZ(90deg)';\r\n this.pointer.style.left = '-7px';\r\n this.pointer.style.top = '2px';\r\n }\r\n\r\n // show\r\n this.parent.style.opacity = 1;\r\n }\r\n\r\n hide() {\r\n this.parent.style.opacity = 0;\r\n this.parent.style.left = 0;\r\n }\r\n}\r\n","import { $ } from './svg_utils';\n\nexport default class Table {\n dragStartY = 0;\n constructor(gantt, columns) {\n this.set_defaults(gantt, columns);\n }\n\n set_defaults(gantt, columns) {\n this.gantt = gantt;\n this.columns = columns;\n }\n\n draw_table_header() {\n const $thead = document.createElement('thead');\n const $tr = document.createElement('tr');\n\n this.columns.forEach((column) => {\n const $th = document.createElement('th');\n $th.textContent = column.title;\n\n $tr.appendChild($th);\n });\n\n $thead.appendChild($tr);\n $thead.classList.add('table-header');\n\n $.style($tr, 'height', this.gantt.options.header_height + 9 + 'px');\n\n return $thead;\n }\n\n get_parentNode(tag, target) {\n if (target.tagName === tag.toUpperCase()) return target;\n return this.get_parentNode(tag, target.parentNode);\n }\n\n draw_table_body(tasks) {\n this.tasks = this.gantt.setGroupPosition(tasks);\n\n const $tbody = document.createElement('tbody');\n $tbody.classList.add('table-body');\n\n this.make_table_row().forEach((row) => $tbody.append(row));\n\n $tbody.addEventListener('mousedown', (e) => {\n const $td = this.get_parentNode('td', e.target);\n\n $td.classList.contains('draggable-item') &&\n this.bind_draggable_event($tbody);\n });\n\n return $tbody;\n }\n\n isRowLine(id) {\n if (id <= 2) return false;\n const target = this.tasks.find((t) => t.id === `${id}`);\n\n return !target.groupPosition.includes('last');\n }\n\n make_table_row() {\n return this.tasks.map((task, index) => {\n const deps = task.level - 1;\n const $tr = document.createElement('tr');\n $tr.setAttribute('draggable', 'true');\n $tr.setAttribute('data-id', task.id);\n $.style($tr, {\n height:\n this.gantt.options.bar_height +\n this.gantt.options.padding +\n 'px',\n });\n\n if (deps === 1 && task.groupPosition.includes('last')) {\n $tr.classList.add('root-last');\n }\n\n this.columns.forEach((column) => {\n const $td = document.createElement('td');\n const { data, render } = column;\n\n if (data === 'drag') {\n $td.innerHTML = ``;\n $td.className = 'draggable-item';\n $tr.append($td);\n return;\n }\n\n if (data === 'wbs') {\n $td.className = data;\n }\n\n if (data === 'name' && task.level > 1) {\n $td.setAttribute('rel', task.type);\n $td.className = `work-name indent-${deps} indent-${deps}-${task.groupPosition[0]}`;\n\n if (task.groupPosition[1]) {\n $td.classList.add(\n `indent-${deps}-${task.groupPosition[1]}`\n );\n }\n\n if (task.type !== 'default') {\n $td.classList.add(task.closed ? 'closed' : 'opened');\n }\n\n for (let i = 0; i < deps; i++) {\n const $ins = document.createElement('ins');\n $ins.textContent = '';\n\n this.isRowLine(task.parentId) &&\n $ins.classList.add('row-line');\n\n if (deps === 1 || i === deps - 2) {\n $ins.classList.add('marker');\n\n deps > 1 && $ins.classList.add('row-line');\n\n $td.append($ins);\n break;\n }\n\n $td.append($ins);\n }\n }\n\n if (render) {\n const child_node = render(task[data], task);\n $td.append(child_node);\n } else {\n const text = document.createTextNode(task[data] ?? '');\n $td.append(text);\n }\n\n $tr.append($td);\n });\n\n $tr.addEventListener('mousedown', (e) => {\n const $td = this.get_parentNode('td', e.target);\n\n if ($td.classList.contains('draggable-item')) {\n $tr.addEventListener('dragstart', (e) => {\n e.target.classList.add('dragging');\n });\n\n $tr.addEventListener('dragend', (e) => {\n e.target.classList.remove('dragging');\n });\n }\n });\n\n return $tr;\n });\n }\n\n get_drag_after_element(container, y) {\n const draggableElements = [\n ...container.querySelectorAll('tr:not(.dragging)'),\n ];\n\n return draggableElements.reduce(\n (closest, child) => {\n const box = child.getBoundingClientRect();\n const offset = y - box.top - box.height / 2;\n if (offset < 0 && offset > closest.offset) {\n return { offset: offset, element: child };\n } else {\n return closest;\n }\n },\n { offset: Number.NEGATIVE_INFINITY }\n ).element;\n }\n\n find_task_item(id) {\n return this.tasks.find((t) => t.id === id);\n }\n\n bind_draggable_event($tbody) {\n $tbody.addEventListener('dragover', (e) => {\n e.preventDefault();\n if (!this.dragStartY) this.dragStartY = e.clientY;\n\n this.draggableEl = document.querySelector('.dragging');\n this.afterElement = this.get_drag_after_element($tbody, e.clientY);\n\n $tbody.insertBefore(this.draggableEl, this.afterElement);\n });\n\n $tbody.addEventListener('drop', async (e) => {\n e.preventDefault();\n const targetItem = this.find_task_item(\n this.get_parentNode('tr', e.target).getAttribute('data-id')\n );\n const dragItem = this.find_task_item(\n this.draggableEl.getAttribute('data-id')\n );\n const afterItem = this.find_task_item(\n this.afterElement.getAttribute('data-id')\n );\n\n const params = {\n c_id: dragItem.id,\n ref: afterItem.parentId,\n c_position:\n e.clientY > this.dragStartY\n ? afterItem.position - 1\n : afterItem.position,\n level: afterItem.level,\n p_position: dragItem.position,\n p_parentId: dragItem.parentId,\n };\n\n if (targetItem.type !== 'default') {\n const arr = this.tasks.filter(\n (t) => t.parentId === Number(targetItem.id)\n ).length;\n params.ref = targetItem.id;\n params.level = targetItem.level + 1;\n params.c_position = arr ? arr : 0;\n }\n\n this.dragStartY = 0;\n this.gantt.draggble_rerender(params);\n this.gantt.trigger_event('drag_row', [params]);\n });\n }\n}\n","import { $ } from './svg_utils';\r\n\r\nexport default class Split {\r\n constructor(wrapper) {\r\n this.draw_split_bar(wrapper);\r\n }\r\n\r\n draw_split_bar(elem) {\r\n const $split_bar = document.createElement('div');\r\n $split_bar.classList.add('split-bar');\r\n\r\n let x = 0;\r\n\r\n const mouseDownHandler = function (e) {\r\n x = e.clientX;\r\n\r\n document.addEventListener('mousemove', mouseMoveHandler);\r\n document.addEventListener('mouseup', mouseUpHandler);\r\n };\r\n\r\n const mouseMoveHandler = function (e) {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n const dx = e.clientX - x;\r\n const left =\r\n (Math.max(\r\n 0,\r\n Math.min($split_bar.offsetLeft + dx, elem.clientWidth)\r\n ) /\r\n elem.clientWidth) *\r\n 100;\r\n\r\n $.style($split_bar, { left: `${left}%` });\r\n $.style($table, { 'flex-basis': `${left}%` });\r\n $.style($gantt, { 'flex-basis': `${100 - left}%` });\r\n $.style($table, { 'overflow-x': 'hidden' });\r\n $.style($gantt, { 'overflow-x': 'hidden' });\r\n\r\n x = e.clientX;\r\n };\r\n\r\n const mouseUpHandler = function () {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n document.removeEventListener('mousemove', mouseMoveHandler);\r\n document.removeEventListener('mouseup', mouseUpHandler);\r\n\r\n $.style($table, { 'overflow-x': 'auto' });\r\n $.style($gantt, { 'overflow-x': 'auto' });\r\n };\r\n\r\n $split_bar.addEventListener('mousedown', mouseDownHandler);\r\n elem.prepend($split_bar);\r\n }\r\n}\r\n","import date_utils from './date_utils';\nimport { $, createSVG } from './svg_utils';\nimport Bar from './bar';\nimport Arrow from './arrow';\nimport Popup from './popup';\nimport Table from './table';\nimport Split from './split';\n\nimport './gantt.scss';\n\nconst VIEW_MODE = {\n QUARTER_DAY: 'Quarter Day',\n HALF_DAY: 'Half Day',\n DAY: 'Day',\n WEEK: 'Week',\n MONTH: 'Month',\n YEAR: 'Year',\n};\n\nexport default class Gantt {\n constructor(wrapper, tasks, options, contents) {\n this.originTasks = tasks;\n\n this.setup_options(options);\n this.setup_tasks(tasks);\n\n this.setup_wrapper(wrapper);\n\n // initialize with default view mode\n this.change_view_mode();\n this.setup_split_bar();\n this.setup_table(contents);\n\n this.bind_events();\n }\n\n setup_wrapper(element) {\n let svg_element;\n let wrapper_element;\n\n // CSS Selector is passed\n if (typeof element === 'string') {\n element = document.querySelector(element);\n }\n\n // get the SVGElement\n if (element instanceof HTMLElement) {\n wrapper_element = element;\n svg_element = element.querySelector('svg');\n } else if (element instanceof SVGElement) {\n svg_element = element;\n } else {\n throw new TypeError(\n 'Frappé Gantt only supports usage of a string CSS selector,' +\n \" HTML DOM element or SVG DOM element for the 'element' parameter\"\n );\n }\n\n // svg element\n if (!svg_element) {\n // create it\n this.$svg = createSVG('svg', {\n append_to: wrapper_element,\n class: 'gantt',\n });\n } else {\n this.$svg = svg_element;\n this.$svg.classList.add('gantt');\n }\n\n this.$wrapper = document.createElement('div');\n this.$wrapper.classList.add('wrapper');\n\n // wrapper element\n this.$container = document.createElement('div');\n this.$container.classList.add('gantt-container');\n\n const parent_element = this.$svg.parentElement;\n element.appendChild(this.setup_mode_handler());\n parent_element.appendChild(this.$wrapper);\n this.$wrapper.appendChild(this.$container);\n this.$container.appendChild(this.$svg);\n\n // popup wrapper\n this.popup_wrapper = document.createElement('div');\n this.popup_wrapper.classList.add('popup-wrapper');\n this.$container.appendChild(this.popup_wrapper);\n }\n\n setup_mode_handler() {\n const wrapper = document.createElement('div');\n const excel_export = document.createElement('button');\n const btn_group = document.createElement('div');\n\n wrapper.className = 'mt well well-sm clearfix';\n excel_export.className = 'btn btn-default btn-sm mr-xs';\n\n excel_export.innerText = 'Excel';\n\n $.style(btn_group, { float: 'right' });\n\n Object.keys(VIEW_MODE).forEach((key) => {\n const btn = document.createElement('button');\n btn.className = `btn btn-default btn-sm mr-xs ${\n VIEW_MODE[key] === this.options.view_mode ? 'active' : ''\n }`;\n btn.innerText = VIEW_MODE[key];\n btn.addEventListener('click', (e) => {\n e.target.classList.add('active');\n e.target.parentNode.childNodes.forEach((b) =>\n b.classList.remove('active')\n );\n\n this.change_view_mode(VIEW_MODE[key]);\n });\n\n btn_group.appendChild(btn);\n });\n\n wrapper.append(excel_export);\n wrapper.append(btn_group);\n\n return wrapper;\n }\n\n setup_options(options) {\n const default_options = {\n header_height: 50,\n column_width: 30,\n step: 24,\n view_modes: [...Object.values(VIEW_MODE)],\n bar_height: 20,\n bar_corner_radius: 3,\n arrow_curve: 5,\n padding: 18,\n view_mode: 'Day',\n date_format: 'YYYY-MM-DD',\n popup_trigger: 'click',\n custom_popup_html: null,\n language: 'ko',\n };\n this.options = Object.assign({}, default_options, options);\n }\n\n setup_tasks(tasks) {\n // prepare tasks\n this.tasks = this.sort_tasks(tasks).map((task, i) => {\n // convert to Date objects\n task._start = date_utils.parse(task.start);\n task._end = date_utils.parse(task.end);\n\n // make task invalid if duration too large\n if (date_utils.diff(task._end, task._start, 'year') > 10) {\n task.end = null;\n }\n\n // cache index\n task._index = i;\n\n // invalid dates\n if (!task.start && !task.end) {\n const today = date_utils.today();\n task._start = today;\n task._end = date_utils.add(today, 2, 'day');\n }\n\n if (!task.start && task.end) {\n task._start = date_utils.add(task._end, -2, 'day');\n }\n\n if (task.start && !task.end) {\n task._end = date_utils.add(task._start, 2, 'day');\n }\n\n // if hours is not set, assume the last day is full day\n // e.g: 2018-09-09 becomes 2018-09-09 23:59:59\n const task_end_values = date_utils.get_date_values(task._end);\n if (task_end_values.slice(3).every((d) => d === 0)) {\n task._end = date_utils.add(task._end, 24, 'hour');\n }\n\n // invalid flag\n if (!task.start || !task.end) {\n task.invalid = true;\n }\n\n // dependencies\n if (typeof task.dependencies === 'string' || !task.dependencies) {\n let deps = [];\n if (task.dependencies) {\n deps = task.dependencies\n .split(',')\n .map((d) => d.trim())\n .filter((d) => d);\n }\n task.dependencies = deps;\n }\n\n // uids\n if (!task.id) {\n task.id = generate_id(task);\n }\n\n return task;\n });\n\n this.setup_dependencies();\n }\n\n setup_dependencies() {\n this.dependency_map = {};\n for (let t of this.tasks) {\n for (let d of t.dependencies) {\n this.dependency_map[d] = this.dependency_map[d] || [];\n this.dependency_map[d].push(t.id);\n }\n }\n }\n\n refresh(tasks) {\n this.setup_tasks(tasks);\n this.change_view_mode();\n this.rerender_table();\n this.originTasks = tasks;\n }\n\n change_view_mode(mode = this.options.view_mode) {\n this.update_view_scale(mode);\n this.setup_dates();\n this.render();\n // fire viewmode_change event\n this.trigger_event('view_change', [mode]);\n }\n\n update_view_scale(view_mode) {\n this.options.view_mode = view_mode;\n\n if (view_mode === VIEW_MODE.DAY) {\n this.options.step = 24;\n this.options.column_width = 38;\n } else if (view_mode === VIEW_MODE.HALF_DAY) {\n this.options.step = 24 / 2;\n this.options.column_width = 38;\n } else if (view_mode === VIEW_MODE.QUARTER_DAY) {\n this.options.step = 24 / 4;\n this.options.column_width = 38;\n } else if (view_mode === VIEW_MODE.WEEK) {\n this.options.step = 24 * 7;\n this.options.column_width = 140;\n } else if (view_mode === VIEW_MODE.MONTH) {\n this.options.step = 24 * 30;\n this.options.column_width = 120;\n } else if (view_mode === VIEW_MODE.YEAR) {\n this.options.step = 24 * 365;\n this.options.column_width = 120;\n }\n }\n\n setup_dates() {\n this.setup_gantt_dates();\n this.setup_date_values();\n }\n\n setup_gantt_dates() {\n this.gantt_start = this.gantt_end = null;\n\n for (let task of this.tasks) {\n // set global start and end date\n if (!this.gantt_start || task._start < this.gantt_start) {\n this.gantt_start = task._start;\n }\n if (!this.gantt_end || task._end > this.gantt_end) {\n this.gantt_end = task._end;\n }\n }\n\n this.gantt_start = date_utils.start_of(this.gantt_start, 'day');\n this.gantt_end = date_utils.start_of(this.gantt_end, 'day');\n\n // add date padding on both sides\n if (this.view_is([VIEW_MODE.QUARTER_DAY, VIEW_MODE.HALF_DAY])) {\n this.gantt_start = date_utils.add(this.gantt_start, -7, 'day');\n this.gantt_end = date_utils.add(this.gantt_end, 7, 'day');\n } else if (this.view_is(VIEW_MODE.MONTH)) {\n this.gantt_start = date_utils.start_of(this.gantt_start, 'year');\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'year');\n } else if (this.view_is(VIEW_MODE.YEAR)) {\n this.gantt_start = date_utils.add(this.gantt_start, -2, 'year');\n this.gantt_end = date_utils.add(this.gantt_end, 2, 'year');\n } else {\n this.gantt_start = date_utils.add(this.gantt_start, -1, 'month');\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'month');\n }\n }\n\n setup_date_values() {\n this.dates = [];\n let cur_date = null;\n\n while (cur_date === null || cur_date < this.gantt_end) {\n if (!cur_date) {\n cur_date = date_utils.clone(this.gantt_start);\n } else {\n if (this.view_is(VIEW_MODE.YEAR)) {\n cur_date = date_utils.add(cur_date, 1, 'year');\n } else if (this.view_is(VIEW_MODE.MONTH)) {\n cur_date = date_utils.add(cur_date, 1, 'month');\n } else {\n cur_date = date_utils.add(\n cur_date,\n this.options.step,\n 'hour'\n );\n }\n }\n this.dates.push(cur_date);\n }\n }\n\n bind_events() {\n this.bind_grid_click();\n this.bind_bar_events();\n this.bind_scroll_event();\n }\n\n render() {\n this.clear();\n this.setup_layers();\n this.make_grid();\n this.make_grid_header();\n this.make_dates();\n this.make_bars();\n this.make_arrows();\n this.map_arrows_on_bars();\n this.set_width();\n this.set_scroll_position();\n }\n\n rerender_table() {\n document.querySelector('.table-body')?.remove();\n\n const $table_body = this.table.draw_table_body(this.tasks, {\n height: this.options.bar_height + this.options.padding + 'px',\n });\n\n document\n .querySelector('.table-container table')\n .appendChild($table_body);\n\n $table_body.addEventListener('click', (event) =>\n this.bind_table_event(event)\n );\n }\n\n draggble_rerender(item) {\n this.update_origin_tasks(item);\n this.render();\n this.rerender_table();\n }\n\n sort_tasks(tasks) {\n const sorted_tasks = [...tasks];\n const children_idx_info = {};\n\n sorted_tasks\n .sort((a, b) => a.level - b.level || a.position - b.position)\n .forEach((task, taskIdx) => {\n if (task.parentId !== 2) {\n if (children_idx_info.hasOwnProperty(task.parentId)) {\n children_idx_info[task.parentId].push(taskIdx);\n } else {\n children_idx_info[task.parentId] = [taskIdx];\n }\n\n const parentIdx = sorted_tasks.findIndex(\n (item) => +item.id === task.parentId\n );\n\n sorted_tasks.splice(taskIdx, 1);\n sorted_tasks.splice(\n parentIdx + children_idx_info[task.parentId].length,\n 0,\n task\n );\n }\n }, []);\n\n return sorted_tasks;\n }\n\n setGroupPosition(data) {\n return data.reduce((acc, cur) => {\n const group = data.filter((t) => t.parentId === cur.parentId);\n\n cur.groupPosition = [];\n\n if (group[0].id === cur.id) {\n cur.groupPosition.push('first');\n }\n if (group[group.length - 1].id === cur.id) {\n cur.groupPosition.push('last');\n }\n if (!cur.groupPosition.length) {\n cur.groupPosition.push('middle');\n }\n\n acc.push(cur);\n return acc;\n }, []);\n }\n\n update_dependecies(id) {\n if (id === 2) return [];\n\n const dependencies = this.tasks.find(\n (task) => task.id === id\n ).dependencies;\n\n if (!dependencies.length) return [id];\n return [...dependencies, id];\n }\n\n update_origin_tasks(item) {\n let tasks = this.tasks.reduce((acc, cur) => {\n if (cur.id === item.c_id) {\n const dependencies = this.update_dependecies(item.ref);\n\n cur = {\n ...cur,\n parentId: Number(item.ref),\n dependencies,\n position: item.c_position,\n level: item.level,\n wbs: dependencies.length\n ? `${dependencies.join('-')}-${item.c_id}`\n : `${item.c_id}`,\n };\n } else {\n if (\n cur.parentId === Number(item.ref) &&\n item.c_position === item.p_position\n ) {\n acc.push(cur);\n return acc;\n }\n\n if (cur.parentId === Number(item.ref)) {\n cur.position =\n item.c_position > item.p_position\n ? cur.position < item.p_position\n ? cur.position\n : cur.position <= item.c_position\n ? cur.position - 1\n : cur.position\n : cur.position > item.p_position\n ? cur.position\n : cur.position >= item.c_position\n ? cur.position + 1\n : cur.position;\n } else {\n if (cur.parentId === item.p_parentId) {\n cur.position =\n cur.position < item.p_position\n ? cur.position\n : cur.position - 1;\n }\n }\n }\n\n acc.push(cur);\n return acc;\n }, []);\n\n tasks = this.setGroupPosition(tasks);\n\n this.setup_tasks(tasks);\n this.originTasks = tasks;\n }\n\n setup_layers() {\n this.layers = {};\n const layers = [\n 'grid',\n 'arrow',\n 'progress',\n 'bar',\n 'details',\n 'header',\n 'date',\n ];\n // make group layers\n for (let layer of layers) {\n this.layers[layer] = createSVG('g', {\n class: layer,\n append_to: this.$svg,\n });\n }\n }\n\n setup_split_bar() {\n this.split = new Split(this.$wrapper);\n }\n\n setup_table(contents, handler) {\n this.table = new Table(this, contents, handler);\n this.make_table();\n }\n\n bind_table_event(event) {\n const $tr = event.target.closest('tr');\n const id = $tr.dataset.id;\n\n if (\n event.target.tagName !== 'INS' &&\n !event.target.classList.contains('marker')\n ) {\n const task = this.get_task(id);\n\n this.handle_selected(task);\n\n return;\n }\n\n const $target = event.target.closest('td');\n\n if (\n $target.getAttribute('rel') === 'folder' ||\n $target.getAttribute('rel') === 'drive'\n ) {\n let tasks = [...this.tasks];\n\n if ($target.classList.contains('closed')) {\n this.originTasks.forEach((task) => {\n if (task.id === id) {\n delete task.closed;\n return tasks.splice(task._index, 1, task);\n }\n\n if (task.dependencies.includes(id))\n tasks.splice(task._index, 0, task);\n });\n } else {\n tasks = this.tasks.reduce((acc, task) => {\n if (task.id === id) {\n return [...acc, { ...task, closed: true }];\n }\n\n if (!task.dependencies.includes(id)) {\n return [...acc, task];\n }\n\n return acc;\n }, []);\n }\n\n this.setup_tasks(tasks);\n this.render();\n this.rerender_table();\n }\n }\n\n make_table() {\n const $table_container = document.createElement('div');\n const $table = document.createElement('table');\n\n $table_container.className = 'table-container';\n\n const $table_header = this.table.draw_table_header();\n const $table_body = this.table.draw_table_body(this.tasks);\n\n $table.append($table_header);\n $table.append($table_body);\n\n $table_body.addEventListener('click', (event) =>\n this.bind_table_event(event)\n );\n\n $table_container.append($table);\n\n this.$wrapper.prepend($table_container);\n }\n\n make_grid() {\n this.make_grid_background();\n this.make_grid_rows();\n this.make_grid_ticks();\n this.make_grid_highlights();\n }\n\n handle_selected(task) {\n const $tr = this.$wrapper.querySelectorAll('tr')[task._index + 1];\n const $grid_row =\n this.$wrapper.querySelectorAll('.grid-row')[task._index];\n\n if (!$tr.classList.contains('selected')) {\n Array.prototype.forEach.call(\n this.$wrapper.querySelectorAll('.selected'),\n (elem) => elem.classList.remove('selected')\n );\n }\n\n $tr?.classList.toggle('selected');\n $grid_row?.classList.toggle('selected');\n }\n\n make_grid_background() {\n const grid_width = this.dates.length * this.options.column_width;\n const grid_height =\n this.options.header_height +\n this.options.padding +\n (this.options.bar_height + this.options.padding) *\n this.tasks.length;\n\n createSVG('rect', {\n x: 0,\n y: 0,\n width: grid_width,\n height: grid_height,\n class: 'grid-background',\n append_to: this.layers.grid,\n });\n\n $.attr(this.$svg, {\n height: grid_height,\n width: '100%',\n });\n }\n\n make_grid_rows() {\n const rows_layer = createSVG('g', { append_to: this.layers.grid });\n // const lines_layer = createSVG('g', { append_to: this.layers.grid });\n\n const row_width = this.dates.length * this.options.column_width;\n const row_height = this.options.bar_height + this.options.padding;\n\n let row_y = this.options.header_height + this.options.padding / 2;\n\n for (let task of this.tasks) {\n createSVG('rect', {\n x: 0,\n y: row_y,\n width: row_width,\n height: row_height,\n class: 'grid-row',\n append_to: rows_layer,\n });\n\n // createSVG('line', {\n // x1: 0,\n // y1: row_y + row_height,\n // x2: row_width,\n // y2: row_y + row_height,\n // class: 'row-line',\n // append_to: lines_layer,\n // });\n\n row_y += this.options.bar_height + this.options.padding;\n }\n }\n\n make_grid_header() {\n const header_width = this.dates.length * this.options.column_width;\n const header_height = this.options.header_height + 10;\n\n const pageScroll = window.scrollY;\n const originOffset =\n pageScroll + this.$wrapper.getBoundingClientRect().top;\n\n if (originOffset <= pageScroll) {\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\n window.scrollY - originOffset\n )}px)`;\n }\n\n createSVG('rect', {\n x: 0,\n y: 0,\n width: header_width,\n height: header_height,\n class: 'grid-header',\n append_to: this.layers.header,\n });\n }\n\n make_grid_ticks() {\n let tick_x = 0;\n let tick_y = this.options.header_height + this.options.padding / 2;\n let tick_height =\n (this.options.bar_height + this.options.padding) *\n this.tasks.length;\n\n for (let date of this.dates) {\n let tick_class = 'tick';\n // thick tick for monday\n if (this.view_is(VIEW_MODE.DAY) && date.getDate() === 1) {\n tick_class += ' thick';\n }\n // thick tick for first week\n if (\n this.view_is(VIEW_MODE.WEEK) &&\n date.getDate() >= 1 &&\n date.getDate() < 8\n ) {\n tick_class += ' thick';\n }\n // thick ticks for quarters\n if (this.view_is(VIEW_MODE.MONTH) && date.getMonth() % 3 === 0) {\n tick_class += ' thick';\n }\n\n createSVG('path', {\n d: `M ${tick_x} ${tick_y} v ${tick_height}`,\n class: tick_class,\n append_to: this.layers.grid,\n });\n\n if (this.view_is(VIEW_MODE.MONTH)) {\n tick_x +=\n (date_utils.get_days_in_month(date) *\n this.options.column_width) /\n 30;\n } else {\n tick_x += this.options.column_width;\n }\n }\n }\n\n make_grid_highlights() {\n // highlight today's date\n if (this.view_is(VIEW_MODE.DAY)) {\n const x =\n (date_utils.diff(date_utils.today(), this.gantt_start, 'hour') /\n this.options.step) *\n this.options.column_width;\n const y = 0;\n\n const width = this.options.column_width;\n const height =\n (this.options.bar_height + this.options.padding) *\n this.tasks.length +\n this.options.header_height +\n this.options.padding / 2;\n\n createSVG('rect', {\n x,\n y,\n width,\n height,\n class: 'today-highlight',\n append_to: this.layers.grid,\n });\n }\n }\n\n make_dates() {\n const pageScroll = window.scrollY;\n const originOffset =\n pageScroll + this.$wrapper.getBoundingClientRect().top;\n\n if (originOffset <= pageScroll) {\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\n window.scrollY - originOffset\n )}px)`;\n }\n\n for (let date of this.get_dates_to_draw()) {\n createSVG('text', {\n x: date.lower_x,\n y: date.lower_y,\n innerHTML: date.lower_text,\n class: 'lower-text',\n append_to: this.layers.date,\n });\n\n if (date.upper_text) {\n const $upper_text = createSVG('text', {\n x: date.upper_x,\n y: date.upper_y,\n innerHTML: date.upper_text,\n class: 'upper-text',\n append_to: this.layers.date,\n });\n\n // remove out-of-bound dates\n if (\n $upper_text.getBBox().x2 > this.layers.grid.getBBox().width\n ) {\n $upper_text.remove();\n }\n }\n }\n }\n\n get_dates_to_draw() {\n let last_date = null;\n const dates = this.dates.map((date, i) => {\n const d = this.get_date_info(date, last_date, i);\n last_date = date;\n return d;\n });\n return dates;\n }\n\n get_date_info(date, last_date, i) {\n if (!last_date) {\n last_date = date_utils.add(date, 1, 'year');\n }\n const date_text = {\n 'Quarter Day_lower': date_utils.format(\n date,\n 'HH',\n this.options.language\n ),\n 'Half Day_lower': date_utils.format(\n date,\n 'HH',\n this.options.language\n ),\n Day_lower:\n date.getDate() !== last_date.getDate()\n ? date_utils.format(date, 'D', this.options.language)\n : '',\n Week_lower:\n date.getMonth() !== last_date.getMonth()\n ? date_utils.format(date, 'D MMM', this.options.language)\n : date_utils.format(date, 'D', this.options.language),\n Month_lower: date_utils.format(date, 'MMMM', this.options.language),\n Year_lower: date_utils.format(date, 'YYYY', this.options.language),\n 'Quarter Day_upper':\n date.getDate() !== last_date.getDate()\n ? date_utils.format(date, 'D MMM', this.options.language)\n : '',\n 'Half Day_upper':\n date.getDate() !== last_date.getDate()\n ? date.getMonth() !== last_date.getMonth()\n ? date_utils.format(\n date,\n 'D MMM',\n this.options.language\n )\n : date_utils.format(date, 'D', this.options.language)\n : '',\n Day_upper:\n date.getMonth() !== last_date.getMonth()\n ? date_utils.format(date, 'MMMM', this.options.language)\n : '',\n Week_upper:\n date.getMonth() !== last_date.getMonth()\n ? date_utils.format(date, 'MMMM', this.options.language)\n : '',\n Month_upper:\n date.getFullYear() !== last_date.getFullYear()\n ? date_utils.format(date, 'YYYY', this.options.language)\n : '',\n Year_upper:\n date.getFullYear() !== last_date.getFullYear()\n ? date_utils.format(date, 'YYYY', this.options.language)\n : '',\n };\n\n const base_pos = {\n x: i * this.options.column_width,\n lower_y: this.options.header_height,\n upper_y: this.options.header_height - 25,\n };\n\n const x_pos = {\n 'Quarter Day_lower': (this.options.column_width * 4) / 2,\n 'Quarter Day_upper': 0,\n 'Half Day_lower': (this.options.column_width * 2) / 2,\n 'Half Day_upper': 0,\n Day_lower: this.options.column_width / 2,\n Day_upper: (this.options.column_width * 30) / 2,\n Week_lower: 0,\n Week_upper: (this.options.column_width * 4) / 2,\n Month_lower: this.options.column_width / 2,\n Month_upper: (this.options.column_width * 12) / 2,\n Year_lower: this.options.column_width / 2,\n Year_upper: (this.options.column_width * 30) / 2,\n };\n\n return {\n upper_text: date_text[`${this.options.view_mode}_upper`],\n lower_text: date_text[`${this.options.view_mode}_lower`],\n upper_x: base_pos.x + x_pos[`${this.options.view_mode}_upper`],\n upper_y: base_pos.upper_y,\n lower_x: base_pos.x + x_pos[`${this.options.view_mode}_lower`],\n lower_y: base_pos.lower_y,\n };\n }\n\n make_bars() {\n this.bars = this.tasks.map((task) => {\n const bar = new Bar(this, task);\n this.layers.bar.appendChild(bar.group);\n return bar;\n });\n }\n\n make_arrows() {\n this.arrows = [];\n for (let task of this.tasks) {\n let arrows = [];\n arrows = task.dependencies\n .map((task_id) => {\n const dependency = this.get_task(task_id);\n if (!dependency) return;\n const arrow = new Arrow(\n this,\n this.bars[dependency._index], // from_task\n this.bars[task._index] // to_task\n );\n this.layers.arrow.appendChild(arrow.element);\n return arrow;\n })\n .filter(Boolean); // filter falsy values\n this.arrows = this.arrows.concat(arrows);\n }\n }\n\n map_arrows_on_bars() {\n for (let bar of this.bars) {\n bar.arrows = this.arrows.filter((arrow) => {\n return (\n arrow.from_task.task.id === bar.task.id ||\n arrow.to_task.task.id === bar.task.id\n );\n });\n }\n }\n\n set_width() {\n const cur_width = this.$svg.getBoundingClientRect().width;\n const actual_width = this.$svg\n .querySelector('.grid .grid-row')\n .getAttribute('width');\n if (cur_width < actual_width) {\n this.$svg.setAttribute('width', actual_width);\n }\n }\n\n set_scroll_position() {\n const parent_element = this.$svg.parentElement;\n if (!parent_element) return;\n\n const hours_before_first_task = date_utils.diff(\n this.get_oldest_starting_date(),\n this.gantt_start,\n 'hour'\n );\n\n const scroll_pos =\n (hours_before_first_task / this.options.step) *\n this.options.column_width -\n this.options.column_width;\n\n parent_element.scrollLeft = scroll_pos;\n }\n\n bind_scroll_event() {\n const originOffset =\n window.scrollY + this.$wrapper.getBoundingClientRect().top;\n const $table_header = $('.table-header');\n let ticking = false;\n\n $.bind(\n window,\n 'scroll',\n () => {\n const pageScroll = window.scrollY;\n\n if (ticking) return;\n\n ticking = true;\n window.requestAnimationFrame(() => {\n if (originOffset <= pageScroll) {\n $table_header.style.top = `${Math.floor(\n pageScroll - originOffset\n )}px`;\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\n pageScroll - originOffset\n )}px)`;\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\n pageScroll - originOffset\n )}px)`;\n } else {\n $table_header.style.top = '0px';\n this.layers.header.style.transform =\n 'translate(0px, 0px)';\n this.layers.date.style.transform =\n 'translate(0px, 0px)';\n }\n\n ticking = false;\n });\n },\n { passive: true }\n );\n }\n\n bind_grid_click() {\n $.on(\n this.$svg,\n this.options.popup_trigger,\n '.grid-row, .grid-header',\n () => {\n this.unselect_all();\n this.hide_popup();\n }\n );\n }\n\n bind_bar_events() {\n let is_dragging = false;\n let x_on_start = 0;\n let y_on_start = 0;\n let is_resizing_left = false;\n let is_resizing_right = false;\n let parent_bar_id = null;\n let bars = []; // instanceof Bar\n this.bar_being_dragged = null;\n\n function action_in_progress() {\n return is_dragging || is_resizing_left || is_resizing_right;\n }\n\n $.on(this.$svg, 'mousedown', '.bar-wrapper, .handle', (e, element) => {\n const bar_wrapper = $.closest('.bar-wrapper', element);\n\n if (element.classList.contains('left')) {\n is_resizing_left = true;\n } else if (element.classList.contains('right')) {\n is_resizing_right = true;\n } else if (element.classList.contains('bar-wrapper')) {\n is_dragging = true;\n }\n\n bar_wrapper.classList.add('active');\n\n x_on_start = e.offsetX;\n y_on_start = e.offsetY;\n\n parent_bar_id = bar_wrapper.getAttribute('data-id');\n const ids = [\n parent_bar_id,\n ...this.get_all_dependent_tasks(parent_bar_id),\n ];\n bars = ids.map((id) => this.get_bar(id));\n\n this.bar_being_dragged = parent_bar_id;\n\n bars.forEach((bar) => {\n const $bar = bar.$bar;\n $bar.ox = $bar.getX();\n $bar.oy = $bar.getY();\n $bar.owidth = $bar.getWidth();\n $bar.finaldx = 0;\n });\n });\n\n $.on(this.$svg, 'mousemove', (e) => {\n if (!action_in_progress()) return;\n const dx = e.offsetX - x_on_start;\n const dy = e.offsetY - y_on_start;\n\n bars.forEach((bar) => {\n const $bar = bar.$bar;\n $bar.finaldx = this.get_snap_position(dx);\n this.hide_popup();\n if (is_resizing_left) {\n if (parent_bar_id === bar.task.id) {\n bar.update_bar_position({\n x: $bar.ox + $bar.finaldx,\n width: $bar.owidth - $bar.finaldx,\n });\n } else {\n bar.update_bar_position({\n x: $bar.ox + $bar.finaldx,\n });\n }\n } else if (is_resizing_right) {\n if (parent_bar_id === bar.task.id) {\n bar.update_bar_position({\n width: $bar.owidth + $bar.finaldx,\n });\n }\n } else if (is_dragging) {\n bar.update_bar_position({ x: $bar.ox + $bar.finaldx });\n }\n });\n });\n\n document.addEventListener('mouseup', (e) => {\n if (is_dragging || is_resizing_left || is_resizing_right) {\n bars.forEach((bar) => bar.group.classList.remove('active'));\n }\n\n is_dragging = false;\n is_resizing_left = false;\n is_resizing_right = false;\n });\n\n $.on(this.$svg, 'mouseup', (e) => {\n this.bar_being_dragged = null;\n bars.forEach((bar) => {\n const $bar = bar.$bar;\n if (!$bar.finaldx) return;\n bar.date_changed();\n bar.set_action_completed();\n });\n });\n\n this.bind_bar_progress();\n }\n\n bind_bar_progress() {\n let x_on_start = 0;\n let y_on_start = 0;\n let is_resizing = null;\n let bar = null;\n let $bar_progress = null;\n let $bar = null;\n\n $.on(this.$svg, 'mousedown', '.handle.progress', (e, handle) => {\n is_resizing = true;\n x_on_start = e.offsetX;\n y_on_start = e.offsetY;\n\n const $bar_wrapper = $.closest('.bar-wrapper', handle);\n const id = $bar_wrapper.getAttribute('data-id');\n bar = this.get_bar(id);\n\n $bar_progress = bar.$bar_progress;\n $bar = bar.$bar;\n\n $bar_progress.finaldx = 0;\n $bar_progress.owidth = $bar_progress.getWidth();\n $bar_progress.min_dx = -$bar_progress.getWidth();\n $bar_progress.max_dx = $bar.getWidth() - $bar_progress.getWidth();\n });\n\n $.on(this.$svg, 'mousemove', (e) => {\n if (!is_resizing) return;\n let dx = e.offsetX - x_on_start;\n let dy = e.offsetY - y_on_start;\n\n if (dx > $bar_progress.max_dx) {\n dx = $bar_progress.max_dx;\n }\n if (dx < $bar_progress.min_dx) {\n dx = $bar_progress.min_dx;\n }\n\n const $handle = bar.$handle_progress;\n $.attr($bar_progress, 'width', $bar_progress.owidth + dx);\n $.attr($handle, 'points', bar.get_progress_polygon_points());\n $bar_progress.finaldx = dx;\n });\n\n $.on(this.$svg, 'mouseup', () => {\n is_resizing = false;\n if (!($bar_progress && $bar_progress.finaldx)) return;\n bar.progress_changed();\n bar.set_action_completed();\n });\n }\n\n get_all_dependent_tasks(task_id) {\n let out = [];\n let to_process = [task_id];\n while (to_process.length) {\n const deps = to_process.reduce((acc, curr) => {\n acc = acc.concat(this.dependency_map[curr]);\n return acc;\n }, []);\n\n out = out.concat(deps);\n to_process = deps.filter((d) => !to_process.includes(d));\n }\n\n return out.filter(Boolean);\n }\n\n get_snap_position(dx) {\n let odx = dx,\n rem,\n position;\n\n if (this.view_is(VIEW_MODE.WEEK)) {\n rem = dx % (this.options.column_width / 7);\n position =\n odx -\n rem +\n (rem < this.options.column_width / 14\n ? 0\n : this.options.column_width / 7);\n } else if (this.view_is(VIEW_MODE.MONTH)) {\n rem = dx % (this.options.column_width / 30);\n position =\n odx -\n rem +\n (rem < this.options.column_width / 60\n ? 0\n : this.options.column_width / 30);\n } else {\n rem = dx % this.options.column_width;\n position =\n odx -\n rem +\n (rem < this.options.column_width / 2\n ? 0\n : this.options.column_width);\n }\n return position;\n }\n\n unselect_all() {\n [...this.$svg.querySelectorAll('.bar-wrapper')].forEach((el) => {\n el.classList.remove('active');\n });\n }\n\n view_is(modes) {\n if (typeof modes === 'string') {\n return this.options.view_mode === modes;\n }\n\n if (Array.isArray(modes)) {\n return modes.some((mode) => this.options.view_mode === mode);\n }\n\n return false;\n }\n\n get_task(id) {\n return this.tasks.find((task) => {\n return task.id === id;\n });\n }\n\n get_bar(id) {\n return this.bars.find((bar) => {\n return bar.task.id === id;\n });\n }\n\n show_popup(options) {\n if (!this.popup) {\n this.popup = new Popup(\n this.popup_wrapper,\n this.options.custom_popup_html\n );\n }\n this.popup.show(options);\n }\n\n hide_popup() {\n this.popup && this.popup.hide();\n }\n\n trigger_event(event, args) {\n if (this.options['on_' + event]) {\n this.options['on_' + event].apply(null, args);\n }\n }\n\n /**\n * Gets the oldest starting date from the list of tasks\n *\n * @returns Date\n * @memberof Gantt\n */\n get_oldest_starting_date() {\n return this.tasks\n .map((task) => task._start)\n .reduce((prev_date, cur_date) =>\n cur_date <= prev_date ? cur_date : prev_date\n );\n }\n\n /**\n * Clear all elements from the parent svg element\n *\n * @memberof Gantt\n */\n clear() {\n this.$svg.innerHTML = '';\n }\n}\n\nGantt.VIEW_MODE = VIEW_MODE;\n\nfunction generate_id(task) {\n return task.name + '_' + Math.random().toString(36).slice(2, 12);\n}\n"],"names":["YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","MILLISECOND","date_utils","parse","date","date_separator","time_separator","Date","date_parts","time_parts","parts","split","map","val","parseInt","vals","length","parseFloat","concat","to_string","with_time","TypeError","this","get_date_values","i","padStart","date_string","time_string","format","format_string","lang","month_name","Intl","DateTimeFormat","month","month_name_capitalized","charAt","toUpperCase","slice","values","d","format_map","YYYY","MM","DD","HH","mm","ss","SSS","D","MMMM","MMM","str","formatted_values","Object","keys","sort","a","b","forEach","key","includes","replace","push","value","diff","date_a","date_b","scale","milliseconds","seconds","hours","minutes","days","months","years","endsWith","Math","floor","today","now","add","qty","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","start_of","scores","should_reset","_scale","clone","get_days_in_month","no_of_days","year","targetLength","padString","String","repeat","$","expr","con","document","querySelector","createSVG","tag","attrs","elem","createElementNS","attr","append_to","appendChild","innerHTML","setAttribute","animateSVG","svgElement","from","to","animatedSvgElement","dur","begin","animEl","attributeName","animateElement","calcMode","keyTimes","keySplines","cubic_bezier","getAnimationElement","event","createEvent","initEvent","eventName","dispatchEvent","name","ease","linear","on","element","selector","callback","delegate","bind","off","handler","removeEventListener","addEventListener","e","delegatedTarget","target","closest","call","matches","parentNode","getAttribute","style","Bar","constructor","gantt","task","set_defaults","prepare","draw","action_completed","prepare_values","prepare_helpers","invalid","height","options","bar_height","x","compute_x","y","compute_y","corner_radius","bar_corner_radius","duration","_end","_start","step","width","column_width","progress_width","progress","group","class","custom_class","id","bar_group","handle_group","SVGElement","prototype","getX","getY","getWidth","getHeight","getEndX","draw_bar","draw_progress_bar","draw_label","draw_resize_handles","$bar","rx","ry","classList","$bar_progress","requestAnimationFrame","update_label_position","bar","$handle_progress","points","get_progress_polygon_points","join","bar_progress","setup_click_event","popup_trigger","show_popup","unselect_all","trigger_event","bar_being_dragged","subtitle","language","target_element","title","handle_selected","update_bar_position","dependencies","dep","get_bar","reduce","prev","curr","update_attr","update_handle_position","update_progressbar_position","update_arrow_position","date_changed","changed","new_start_date","new_end_date","compute_start_end_date","Number","progress_changed","new_progress","compute_progress","set_action_completed","setTimeout","x_in_units","gantt_start","width_in_units","task_start","view_is","header_height","padding","_index","get_snap_position","dx","rem","position","odx","isNaN","label","getBBox","remove","handle","arrows","arrow","update","Arrow","from_task","to_task","calculate_path","start_x","condition","start_y","end_x","end_y","from_is_below_to","curve","arrow_curve","clockwise","curve_y","offset","path","down_1","down_2","left","Popup","parent","custom_html","make","hide","pointer","show","Error","html","clientWidth","position_meta","HTMLElement","getBoundingClientRect","top","transform","opacity","Table","dragStartY","columns","draw_table_header","$thead","createElement","$tr","column","$th","textContent","get_parentNode","tagName","draw_table_body","tasks","setGroupPosition","$tbody","make_table_row","row","append","contains","bind_draggable_event","isRowLine","find","t","groupPosition","index","deps","level","$td","data","render","className","type","closed","$ins","parentId","child_node","text","createTextNode","get_drag_after_element","container","querySelectorAll","child","box","NEGATIVE_INFINITY","find_task_item","preventDefault","clientY","draggableEl","afterElement","insertBefore","async","targetItem","dragItem","afterItem","params","c_id","ref","c_position","p_position","p_parentId","arr","filter","draggble_rerender","Split","wrapper","draw_split_bar","$split_bar","mouseMoveHandler","$table","previousElementSibling","$gantt","nextSibling","clientX","max","min","offsetLeft","mouseUpHandler","prepend","VIEW_MODE","QUARTER_DAY","HALF_DAY","WEEK","Gantt","contents","originTasks","setup_options","setup_tasks","setup_wrapper","change_view_mode","setup_split_bar","setup_table","bind_events","svg_element","wrapper_element","$svg","$wrapper","$container","parent_element","parentElement","setup_mode_handler","popup_wrapper","excel_export","btn_group","innerText","float","btn","view_mode","childNodes","default_options","view_modes","date_format","custom_popup_html","assign","sort_tasks","start","end","every","trim","random","toString","generate_id","setup_dependencies","dependency_map","refresh","rerender_table","mode","update_view_scale","setup_dates","setup_gantt_dates","setup_date_values","gantt_end","dates","cur_date","bind_grid_click","bind_bar_events","bind_scroll_event","clear","setup_layers","make_grid","make_grid_header","make_dates","make_bars","make_arrows","map_arrows_on_bars","set_width","set_scroll_position","$table_body","table","bind_table_event","item","update_origin_tasks","sorted_tasks","children_idx_info","taskIdx","hasOwnProperty","parentIdx","findIndex","splice","acc","cur","update_dependecies","wbs","layers","layer","make_table","dataset","get_task","$target","$table_container","$table_header","make_grid_background","make_grid_rows","make_grid_ticks","make_grid_highlights","$grid_row","Array","toggle","grid_width","grid_height","grid","rows_layer","row_width","row_height","row_y","header_width","pageScroll","window","scrollY","originOffset","header","tick_x","tick_y","tick_height","tick_class","get_dates_to_draw","lower_x","lower_y","lower_text","upper_text","$upper_text","upper_x","upper_y","x2","last_date","get_date_info","date_text","Day_lower","Week_lower","Month_lower","Year_lower","Day_upper","Week_upper","Month_upper","Year_upper","base_pos","x_pos","bars","task_id","dependency","Boolean","cur_width","actual_width","scroll_pos","get_oldest_starting_date","scrollLeft","ticking","passive","hide_popup","is_dragging","x_on_start","y_on_start","is_resizing_left","is_resizing_right","parent_bar_id","bar_wrapper","offsetX","offsetY","ids","get_all_dependent_tasks","ox","oy","owidth","finaldx","bind_bar_progress","is_resizing","min_dx","max_dx","$handle","out","to_process","el","modes","isArray","some","popup","args","apply","prev_date"],"mappings":"kCAAA,MAAMA,EAAO,OACPC,EAAQ,QACRC,EAAM,MACNC,EAAO,OACPC,EAAS,SACTC,EAAS,SACTC,EAAc,cAEL,IAAAC,EAAA,CACX,KAAAC,CAAMC,EAAMC,EAAiB,IAAKC,EAA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U,EAAW7H,IAChBA,GAAY6H,EAAY7H,EAAW6H,GAE9C,CAOD,KAAAzH,GACIra,KAAK2X,KAAK9R,UAAY,EACzB,SAGLkR,EAAMJ,UAAYA"} \ No newline at end of file +{"version":3,"file":"frappe-gantt.min.js","sources":["../src/date_utils.js","../src/svg_utils.js","../src/bar.js","../src/arrow.js","../src/popup.js","../src/table.js","../src/split.js","../src/index.js"],"sourcesContent":["const YEAR = 'year';\r\nconst MONTH = 'month';\r\nconst DAY = 'day';\r\nconst HOUR = 'hour';\r\nconst MINUTE = 'minute';\r\nconst SECOND = 'second';\r\nconst MILLISECOND = 'millisecond';\r\n\r\nexport default {\r\n parse(date, date_separator = '-', time_separator = /[.:]/) {\r\n if (date instanceof Date) {\r\n return date;\r\n }\r\n if (typeof date === 'string') {\r\n let date_parts, time_parts;\r\n const parts = date.split(' ');\r\n\r\n date_parts = parts[0]\r\n .split(date_separator)\r\n .map((val) => parseInt(val, 10));\r\n time_parts = parts[1] && parts[1].split(time_separator);\r\n\r\n // month is 0 indexed\r\n date_parts[1] = date_parts[1] - 1;\r\n\r\n let vals = date_parts;\r\n\r\n if (time_parts && time_parts.length) {\r\n if (time_parts.length == 4) {\r\n time_parts[3] = '0.' + time_parts[3];\r\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\r\n }\r\n vals = vals.concat(time_parts);\r\n }\r\n\r\n return new Date(...vals);\r\n }\r\n },\r\n\r\n to_string(date, with_time = false) {\r\n if (!(date instanceof Date)) {\r\n throw new TypeError('Invalid argument type');\r\n }\r\n const vals = this.get_date_values(date).map((val, i) => {\r\n if (i === 1) {\r\n // add 1 for month\r\n val = val + 1;\r\n }\r\n\r\n if (i === 6) {\r\n return padStart(val + '', 3, '0');\r\n }\r\n\r\n return padStart(val + '', 2, '0');\r\n });\r\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\r\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\r\n\r\n return date_string + (with_time ? ' ' + time_string : '');\r\n },\r\n\r\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'ko') {\r\n const dateTimeFormat = new Intl.DateTimeFormat(lang, {\r\n month: 'long'\r\n });\r\n const month_name = dateTimeFormat.format(date);\r\n const month_name_capitalized =\r\n month_name.charAt(0).toUpperCase() + month_name.slice(1);\r\n\r\n const values = this.get_date_values(date).map(d => padStart(d, 2, 0));\r\n const format_map = {\r\n YYYY: values[0],\r\n MM: padStart(+values[1] + 1, 2, 0),\r\n DD: values[2],\r\n HH: values[3],\r\n mm: values[4],\r\n ss: values[5],\r\n SSS: values[6],\r\n D: values[2],\r\n MMMM: month_name_capitalized,\r\n MMM: month_name_capitalized,\r\n };\r\n\r\n let str = format_string;\r\n const formatted_values = [];\r\n\r\n Object.keys(format_map)\r\n .sort((a, b) => b.length - a.length) // big string first\r\n .forEach((key) => {\r\n if (str.includes(key)) {\r\n str = str.replace(key, `$${formatted_values.length}`);\r\n formatted_values.push(format_map[key]);\r\n }\r\n });\r\n\r\n formatted_values.forEach((value, i) => {\r\n str = str.replace(`$${i}`, value);\r\n });\r\n\r\n return str;\r\n },\r\n\r\n diff(date_a, date_b, scale = DAY) {\r\n let milliseconds, seconds, hours, minutes, days, months, years;\r\n\r\n milliseconds = date_a - date_b;\r\n seconds = milliseconds / 1000;\r\n minutes = seconds / 60;\r\n hours = minutes / 60;\r\n days = hours / 24;\r\n months = days / 30;\r\n years = months / 12;\r\n\r\n if (!scale.endsWith('s')) {\r\n scale += 's';\r\n }\r\n\r\n return Math.floor(\r\n {\r\n milliseconds,\r\n seconds,\r\n minutes,\r\n hours,\r\n days,\r\n months,\r\n years,\r\n }[scale]\r\n );\r\n },\r\n\r\n today() {\r\n const vals = this.get_date_values(new Date()).slice(0, 3);\r\n return new Date(...vals);\r\n },\r\n\r\n now() {\r\n return new Date();\r\n },\r\n\r\n add(date, qty, scale) {\r\n qty = parseInt(qty, 10);\r\n const vals = [\r\n date.getFullYear() + (scale === YEAR ? qty : 0),\r\n date.getMonth() + (scale === MONTH ? qty : 0),\r\n date.getDate() + (scale === DAY ? qty : 0),\r\n date.getHours() + (scale === HOUR ? qty : 0),\r\n date.getMinutes() + (scale === MINUTE ? qty : 0),\r\n date.getSeconds() + (scale === SECOND ? qty : 0),\r\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\r\n ];\r\n return new Date(...vals);\r\n },\r\n\r\n start_of(date, scale) {\r\n const scores = {\r\n [YEAR]: 6,\r\n [MONTH]: 5,\r\n [DAY]: 4,\r\n [HOUR]: 3,\r\n [MINUTE]: 2,\r\n [SECOND]: 1,\r\n [MILLISECOND]: 0,\r\n };\r\n\r\n function should_reset(_scale) {\r\n const max_score = scores[scale];\r\n return scores[_scale] <= max_score;\r\n }\r\n\r\n const vals = [\r\n date.getFullYear(),\r\n should_reset(YEAR) ? 0 : date.getMonth(),\r\n should_reset(MONTH) ? 1 : date.getDate(),\r\n should_reset(DAY) ? 0 : date.getHours(),\r\n should_reset(HOUR) ? 0 : date.getMinutes(),\r\n should_reset(MINUTE) ? 0 : date.getSeconds(),\r\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\r\n ];\r\n\r\n return new Date(...vals);\r\n },\r\n\r\n clone(date) {\r\n return new Date(...this.get_date_values(date));\r\n },\r\n\r\n get_date_values(date) {\r\n return [\r\n date.getFullYear(),\r\n date.getMonth(),\r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds(),\r\n ];\r\n },\r\n\r\n get_days_in_month(date) {\r\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n const month = date.getMonth();\r\n\r\n if (month !== 1) {\r\n return no_of_days[month];\r\n }\r\n\r\n // Feb\r\n const year = date.getFullYear();\r\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\r\n return 29;\r\n }\r\n return 28;\r\n },\r\n};\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\r\nfunction padStart(str, targetLength, padString) {\r\n str = str + '';\r\n targetLength = targetLength >> 0;\r\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\r\n if (str.length > targetLength) {\r\n return String(str);\r\n } else {\r\n targetLength = targetLength - str.length;\r\n if (targetLength > padString.length) {\r\n padString += padString.repeat(targetLength / padString.length);\r\n }\r\n return padString.slice(0, targetLength) + String(str);\r\n }\r\n}\r\n","export function $(expr, con) {\r\n return typeof expr === 'string'\r\n ? (con || document).querySelector(expr)\r\n : expr || null;\r\n}\r\n\r\nexport function createSVG(tag, attrs) {\r\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\r\n for (let attr in attrs) {\r\n if (attr === 'append_to') {\r\n const parent = attrs.append_to;\r\n parent.appendChild(elem);\r\n } else if (attr === 'innerHTML') {\r\n elem.innerHTML = attrs.innerHTML;\r\n } else {\r\n elem.setAttribute(attr, attrs[attr]);\r\n }\r\n }\r\n return elem;\r\n}\r\n\r\nexport function animateSVG(svgElement, attr, from, to) {\r\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\r\n\r\n if (animatedSvgElement === svgElement) {\r\n // triggered 2nd time programmatically\r\n // trigger artificial click event\r\n const event = document.createEvent('HTMLEvents');\r\n event.initEvent('click', true, true);\r\n event.eventName = 'click';\r\n animatedSvgElement.dispatchEvent(event);\r\n }\r\n}\r\n\r\nfunction getAnimationElement(\r\n svgElement,\r\n attr,\r\n from,\r\n to,\r\n dur = '0.4s',\r\n begin = '0.1s'\r\n) {\r\n const animEl = svgElement.querySelector('animate');\r\n if (animEl) {\r\n $.attr(animEl, {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin: 'click + ' + begin, // artificial click\r\n });\r\n return svgElement;\r\n }\r\n\r\n const animateElement = createSVG('animate', {\r\n attributeName: attr,\r\n from,\r\n to,\r\n dur,\r\n begin,\r\n calcMode: 'spline',\r\n values: from + ';' + to,\r\n keyTimes: '0; 1',\r\n keySplines: cubic_bezier('ease-out'),\r\n });\r\n svgElement.appendChild(animateElement);\r\n\r\n return svgElement;\r\n}\r\n\r\nfunction cubic_bezier(name) {\r\n return {\r\n ease: '.25 .1 .25 1',\r\n linear: '0 0 1 1',\r\n 'ease-in': '.42 0 1 1',\r\n 'ease-out': '0 0 .58 1',\r\n 'ease-in-out': '.42 0 .58 1',\r\n }[name];\r\n}\r\n\r\n$.on = (element, event, selector, callback) => {\r\n if (!callback) {\r\n callback = selector;\r\n $.bind(element, event, callback);\r\n } else {\r\n $.delegate(element, event, selector, callback);\r\n }\r\n};\r\n\r\n$.off = (element, event, handler) => {\r\n element.removeEventListener(event, handler);\r\n};\r\n\r\n$.bind = (element, event, callback) => {\r\n event.split(/\\s+/).forEach(function (event) {\r\n element.addEventListener(event, callback);\r\n });\r\n};\r\n\r\n$.delegate = (element, event, selector, callback) => {\r\n element.addEventListener(event, function (e) {\r\n const delegatedTarget = e.target.closest(selector);\r\n if (delegatedTarget) {\r\n e.delegatedTarget = delegatedTarget;\r\n callback.call(this, e, delegatedTarget);\r\n }\r\n });\r\n};\r\n\r\n$.closest = (selector, element) => {\r\n if (!element) return null;\r\n\r\n if (element.matches(selector)) {\r\n return element;\r\n }\r\n\r\n return $.closest(selector, element.parentNode);\r\n};\r\n\r\n$.attr = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.attr(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.setAttribute(attr, value);\r\n};\r\n\r\n$.style = (element, attr, value) => {\r\n if (!value && typeof attr === 'string') {\r\n return element.getAttribute(attr);\r\n }\r\n\r\n if (typeof attr === 'object') {\r\n for (let key in attr) {\r\n $.style(element, key, attr[key]);\r\n }\r\n return;\r\n }\r\n\r\n element.style[attr] = value;\r\n};\r\n","import date_utils from './date_utils';\r\nimport { $, createSVG, animateSVG } from './svg_utils';\r\n\r\nexport default class Bar {\r\n constructor(gantt, task) {\r\n this.set_defaults(gantt, task);\r\n this.prepare();\r\n this.draw();\r\n this.bind();\r\n }\r\n\r\n set_defaults(gantt, task) {\r\n this.action_completed = false;\r\n this.gantt = gantt;\r\n this.task = task;\r\n }\r\n\r\n prepare() {\r\n this.prepare_values();\r\n this.prepare_helpers();\r\n }\r\n\r\n prepare_values() {\r\n this.invalid = this.task.invalid;\r\n this.height = this.gantt.options.bar_height;\r\n this.x = this.compute_x();\r\n this.y = this.compute_y();\r\n this.corner_radius = this.gantt.options.bar_corner_radius;\r\n this.duration =\r\n date_utils.diff(this.task._end, this.task._start, 'hour') /\r\n this.gantt.options.step;\r\n this.width = this.gantt.options.column_width * this.duration;\r\n this.progress_width =\r\n this.gantt.options.column_width *\r\n this.duration *\r\n (this.task.progress / 100) || 0;\r\n this.group = createSVG('g', {\r\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\r\n 'data-id': this.task.id,\r\n });\r\n this.bar_group = createSVG('g', {\r\n class: 'bar-group',\r\n append_to: this.group,\r\n });\r\n this.handle_group = createSVG('g', {\r\n class: 'handle-group',\r\n append_to: this.group,\r\n });\r\n }\r\n\r\n prepare_helpers() {\r\n SVGElement.prototype.getX = function () {\r\n return +this.getAttribute('x');\r\n };\r\n SVGElement.prototype.getY = function () {\r\n return +this.getAttribute('y');\r\n };\r\n SVGElement.prototype.getWidth = function () {\r\n return +this.getAttribute('width');\r\n };\r\n SVGElement.prototype.getHeight = function () {\r\n return +this.getAttribute('height');\r\n };\r\n SVGElement.prototype.getEndX = function () {\r\n return this.getX() + this.getWidth();\r\n };\r\n }\r\n\r\n draw() {\r\n this.draw_bar();\r\n this.draw_progress_bar();\r\n this.draw_label();\r\n this.draw_resize_handles();\r\n }\r\n\r\n draw_bar() {\r\n this.$bar = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar, 'width', 0, this.width);\r\n\r\n if (this.invalid) {\r\n this.$bar.classList.add('bar-invalid');\r\n }\r\n }\r\n\r\n draw_progress_bar() {\r\n if (this.invalid) return;\r\n this.$bar_progress = createSVG('rect', {\r\n x: this.x,\r\n y: this.y,\r\n width: this.progress_width,\r\n height: this.height,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'bar-progress',\r\n append_to: this.bar_group,\r\n });\r\n\r\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\r\n }\r\n\r\n draw_label() {\r\n createSVG('text', {\r\n x: this.x + this.width / 2,\r\n y: this.y + this.height / 2,\r\n innerHTML: this.task.name,\r\n class: 'bar-label',\r\n append_to: this.bar_group,\r\n });\r\n // labels get BBox in the next tick\r\n requestAnimationFrame(() => this.update_label_position());\r\n }\r\n\r\n draw_resize_handles() {\r\n if (this.invalid) return;\r\n\r\n const bar = this.$bar;\r\n const handle_width = 8;\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + bar.getWidth() - 9,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle right',\r\n append_to: this.handle_group,\r\n });\r\n\r\n createSVG('rect', {\r\n x: bar.getX() + 1,\r\n y: bar.getY() + 1,\r\n width: handle_width,\r\n height: this.height - 2,\r\n rx: this.corner_radius,\r\n ry: this.corner_radius,\r\n class: 'handle left',\r\n append_to: this.handle_group,\r\n });\r\n\r\n if (this.task.progress && this.task.progress < 100) {\r\n this.$handle_progress = createSVG('polygon', {\r\n points: this.get_progress_polygon_points().join(','),\r\n class: 'handle progress',\r\n append_to: this.handle_group,\r\n });\r\n }\r\n }\r\n\r\n get_progress_polygon_points() {\r\n const bar_progress = this.$bar_progress;\r\n return [\r\n bar_progress.getEndX() - 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX() + 5,\r\n bar_progress.getY() + bar_progress.getHeight(),\r\n bar_progress.getEndX(),\r\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\r\n ];\r\n }\r\n\r\n bind() {\r\n if (this.invalid) return;\r\n this.setup_click_event();\r\n }\r\n\r\n setup_click_event() {\r\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.show_popup();\r\n this.gantt.unselect_all();\r\n this.group.classList.add('active');\r\n });\r\n\r\n $.on(this.group, 'dblclick', (e) => {\r\n if (this.action_completed) {\r\n // just finished a move action, wait for a few seconds\r\n return;\r\n }\r\n\r\n this.gantt.trigger_event('click', [this.task]);\r\n });\r\n }\r\n\r\n show_popup() {\r\n if (this.gantt.bar_being_dragged) return;\r\n\r\n const start_date = date_utils.format(\r\n this.task._start,\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const end_date = date_utils.format(\r\n date_utils.add(this.task._end, -1, 'second'),\r\n 'MMM D',\r\n this.gantt.options.language\r\n );\r\n const subtitle = start_date + ' - ' + end_date;\r\n\r\n this.gantt.show_popup({\r\n target_element: this.$bar,\r\n title: this.task.name,\r\n subtitle: subtitle,\r\n task: this.task,\r\n });\r\n this.gantt.handle_selected(this.task);\r\n }\r\n\r\n update_bar_position({ x = null, width = null }) {\r\n const bar = this.$bar;\r\n if (x) {\r\n // // get all x values of parent task\r\n // const xs = this.task.dependencies.map((dep) => {\r\n // return this.gantt.get_bar(dep).$bar.getX();\r\n // });\r\n // // child task must not go before parent\r\n // const valid_x = xs.reduce((prev, curr) => {\r\n // return x >= curr;\r\n // }, x);\r\n // if (!valid_x) {\r\n // width = null;\r\n // return;\r\n // }\r\n this.update_attr(bar, 'x', x);\r\n }\r\n if (width && width >= this.gantt.options.column_width) {\r\n this.update_attr(bar, 'width', width);\r\n }\r\n this.update_label_position();\r\n this.update_handle_position();\r\n this.update_progressbar_position();\r\n this.update_arrow_position();\r\n }\r\n\r\n date_changed() {\r\n let changed = false;\r\n const { new_start_date, new_end_date } = this.compute_start_end_date();\r\n\r\n if (Number(this.task._start) !== Number(new_start_date)) {\r\n changed = true;\r\n this.task._start = new_start_date;\r\n }\r\n\r\n if (Number(this.task._end) !== Number(new_end_date)) {\r\n changed = true;\r\n this.task._end = new_end_date;\r\n }\r\n\r\n if (!changed) return;\r\n\r\n this.gantt.trigger_event('date_change', [\r\n this.task,\r\n new_start_date,\r\n date_utils.add(new_end_date, -1, 'second'),\r\n ]);\r\n }\r\n\r\n progress_changed() {\r\n const new_progress = this.compute_progress();\r\n this.task.progress = new_progress;\r\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\r\n }\r\n\r\n set_action_completed() {\r\n this.action_completed = true;\r\n setTimeout(() => (this.action_completed = false), 1000);\r\n }\r\n\r\n compute_start_end_date() {\r\n const bar = this.$bar;\r\n const x_in_units = bar.getX() / this.gantt.options.column_width;\r\n const new_start_date = date_utils.add(\r\n this.gantt.gantt_start,\r\n x_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\r\n const new_end_date = date_utils.add(\r\n new_start_date,\r\n width_in_units * this.gantt.options.step,\r\n 'hour'\r\n );\r\n\r\n return { new_start_date, new_end_date };\r\n }\r\n\r\n compute_progress() {\r\n const progress =\r\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\r\n return parseInt(progress, 10);\r\n }\r\n\r\n compute_x() {\r\n const { step, column_width } = this.gantt.options;\r\n const task_start = this.task._start;\r\n const gantt_start = this.gantt.gantt_start;\r\n\r\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\r\n let x = (diff / step) * column_width;\r\n\r\n if (this.gantt.view_is('Month')) {\r\n const diff = date_utils.diff(task_start, gantt_start, 'day');\r\n x = (diff * column_width) / 30;\r\n }\r\n return x;\r\n }\r\n\r\n compute_y() {\r\n return (\r\n this.gantt.options.header_height +\r\n this.gantt.options.padding +\r\n this.task._index * (this.height + this.gantt.options.padding)\r\n );\r\n }\r\n\r\n get_snap_position(dx) {\r\n let odx = dx,\r\n rem,\r\n position;\r\n\r\n if (this.gantt.view_is('Week')) {\r\n rem = dx % (this.gantt.options.column_width / 7);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 14\r\n ? 0\r\n : this.gantt.options.column_width / 7);\r\n } else if (this.gantt.view_is('Month')) {\r\n rem = dx % (this.gantt.options.column_width / 30);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 60\r\n ? 0\r\n : this.gantt.options.column_width / 30);\r\n } else {\r\n rem = dx % this.gantt.options.column_width;\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.gantt.options.column_width / 2\r\n ? 0\r\n : this.gantt.options.column_width);\r\n }\r\n return position;\r\n }\r\n\r\n update_attr(element, attr, value) {\r\n value = +value;\r\n if (!isNaN(value)) {\r\n element.setAttribute(attr, value);\r\n }\r\n return element;\r\n }\r\n\r\n update_progressbar_position() {\r\n if (this.invalid) return;\r\n this.$bar_progress.setAttribute('x', this.$bar.getX());\r\n this.$bar_progress.setAttribute(\r\n 'width',\r\n this.$bar.getWidth() * (this.task.progress / 100)\r\n );\r\n }\r\n\r\n update_label_position() {\r\n const bar = this.$bar,\r\n label = this.group.querySelector('.bar-label');\r\n\r\n if (label.getBBox().width > bar.getWidth()) {\r\n label.classList.add('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\r\n } else {\r\n label.classList.remove('big');\r\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\r\n }\r\n }\r\n\r\n update_handle_position() {\r\n if (this.invalid) return;\r\n const bar = this.$bar;\r\n this.handle_group\r\n .querySelector('.handle.left')\r\n .setAttribute('x', bar.getX() + 1);\r\n this.handle_group\r\n .querySelector('.handle.right')\r\n .setAttribute('x', bar.getEndX() - 9);\r\n const handle = this.group.querySelector('.handle.progress');\r\n handle &&\r\n handle.setAttribute('points', this.get_progress_polygon_points());\r\n }\r\n\r\n update_arrow_position() {\r\n this.arrows = this.arrows || [];\r\n for (let arrow of this.arrows) {\r\n arrow.update();\r\n }\r\n }\r\n}\r\n\r\nfunction isFunction(functionToCheck) {\r\n var getType = {};\r\n return (\r\n functionToCheck &&\r\n getType.toString.call(functionToCheck) === '[object Function]'\r\n );\r\n}\r\n","import { createSVG } from './svg_utils';\r\n\r\nexport default class Arrow {\r\n constructor(gantt, from_task, to_task) {\r\n this.gantt = gantt;\r\n this.from_task = from_task;\r\n this.to_task = to_task;\r\n\r\n this.calculate_path();\r\n this.draw();\r\n }\r\n\r\n calculate_path() {\r\n let start_x =\r\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\r\n\r\n const condition = () =>\r\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\r\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\r\n\r\n while (condition()) {\r\n start_x -= 10;\r\n }\r\n\r\n const start_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.from_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\r\n const end_y =\r\n this.gantt.options.header_height +\r\n this.gantt.options.bar_height / 2 +\r\n (this.gantt.options.padding + this.gantt.options.bar_height) *\r\n this.to_task.task._index +\r\n this.gantt.options.padding;\r\n\r\n const from_is_below_to =\r\n this.from_task.task._index > this.to_task.task._index;\r\n const curve = this.gantt.options.arrow_curve;\r\n const clockwise = from_is_below_to ? 1 : 0;\r\n const curve_y = from_is_below_to ? -curve : curve;\r\n const offset = from_is_below_to\r\n ? end_y + this.gantt.options.arrow_curve\r\n : end_y - this.gantt.options.arrow_curve;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n V ${offset}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n\r\n if (\r\n this.to_task.$bar.getX() <\r\n this.from_task.$bar.getX() + this.gantt.options.padding\r\n ) {\r\n const down_1 = this.gantt.options.padding / 2 - curve;\r\n const down_2 =\r\n this.to_task.$bar.getY() +\r\n this.to_task.$bar.getHeight() / 2 -\r\n curve_y;\r\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\r\n\r\n this.path = `\r\n M ${start_x} ${start_y}\r\n v ${down_1}\r\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\r\n H ${left}\r\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\r\n V ${down_2}\r\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\r\n L ${end_x} ${end_y}\r\n m -5 -5\r\n l 5 5\r\n l -5 5`;\r\n }\r\n }\r\n\r\n draw() {\r\n this.element = createSVG('path', {\r\n d: this.path,\r\n 'data-from': this.from_task.task.id,\r\n 'data-to': this.to_task.task.id,\r\n });\r\n }\r\n\r\n update() {\r\n this.calculate_path();\r\n this.element.setAttribute('d', this.path);\r\n }\r\n}\r\n","export default class Popup {\r\n constructor(parent, custom_html) {\r\n this.parent = parent;\r\n this.custom_html = custom_html;\r\n this.make();\r\n }\r\n\r\n make() {\r\n this.parent.innerHTML = `\r\n
\r\n
\r\n
\r\n `;\r\n\r\n this.hide();\r\n\r\n this.title = this.parent.querySelector('.title');\r\n this.subtitle = this.parent.querySelector('.subtitle');\r\n this.pointer = this.parent.querySelector('.pointer');\r\n }\r\n\r\n show(options) {\r\n if (!options.target_element) {\r\n throw new Error('target_element is required to show popup');\r\n }\r\n if (!options.position) {\r\n options.position = 'left';\r\n }\r\n const target_element = options.target_element;\r\n\r\n if (this.custom_html) {\r\n let html = this.custom_html(options.task);\r\n html += '
';\r\n this.parent.innerHTML = html;\r\n this.pointer = this.parent.querySelector('.pointer');\r\n } else {\r\n // set data\r\n this.title.innerHTML = options.title;\r\n this.subtitle.innerHTML = options.subtitle;\r\n this.parent.style.width = this.parent.clientWidth + 'px';\r\n }\r\n\r\n // set position\r\n let position_meta;\r\n if (target_element instanceof HTMLElement) {\r\n position_meta = target_element.getBoundingClientRect();\r\n } else if (target_element instanceof SVGElement) {\r\n position_meta = options.target_element.getBBox();\r\n }\r\n\r\n if (options.position === 'left') {\r\n this.parent.style.left =\r\n position_meta.x + (position_meta.width + 10) + 'px';\r\n this.parent.style.top = position_meta.y + 'px';\r\n\r\n this.pointer.style.transform = 'rotateZ(90deg)';\r\n this.pointer.style.left = '-7px';\r\n this.pointer.style.top = '2px';\r\n }\r\n\r\n // show\r\n this.parent.style.opacity = 1;\r\n }\r\n\r\n hide() {\r\n this.parent.style.opacity = 0;\r\n this.parent.style.left = 0;\r\n }\r\n}\r\n","import { $ } from './svg_utils';\r\n\r\nexport default class Table {\r\n dragStartY = 0;\r\n constructor(gantt, columns) {\r\n this.set_defaults(gantt, columns);\r\n }\r\n\r\n set_defaults(gantt, columns) {\r\n this.gantt = gantt;\r\n this.columns = columns;\r\n }\r\n\r\n draw_table_header() {\r\n const $thead = document.createElement('thead');\r\n const $tr = document.createElement('tr');\r\n\r\n this.columns.forEach((column) => {\r\n const $th = document.createElement('th');\r\n $th.textContent = column.title;\r\n\r\n $tr.appendChild($th);\r\n });\r\n\r\n $thead.appendChild($tr);\r\n $thead.classList.add('table-header');\r\n\r\n $.style($tr, 'height', this.gantt.options.header_height + 9 + 'px');\r\n\r\n return $thead;\r\n }\r\n\r\n get_parentNode(tag, target) {\r\n if (target.tagName === tag.toUpperCase()) return target;\r\n return this.get_parentNode(tag, target.parentNode);\r\n }\r\n\r\n draw_table_body(tasks) {\r\n this.tasks = this.gantt.setGroupPosition(tasks);\r\n\r\n const $tbody = document.createElement('tbody');\r\n $tbody.classList.add('table-body');\r\n\r\n this.make_table_row().forEach((row) => $tbody.append(row));\r\n\r\n $tbody.addEventListener('mousedown', (e) => {\r\n const $td = this.get_parentNode('td', e.target);\r\n\r\n $td.classList.contains('draggable-item') &&\r\n this.bind_draggable_event($tbody);\r\n });\r\n\r\n return $tbody;\r\n }\r\n\r\n isRowLine(id) {\r\n if (id <= 2) return false;\r\n const target = this.tasks.find((t) => t.id === `${id}`);\r\n\r\n return !target.groupPosition.includes('last');\r\n }\r\n\r\n make_table_row() {\r\n return this.tasks.map((task, index) => {\r\n const deps = task.level - 1;\r\n const $tr = document.createElement('tr');\r\n $tr.setAttribute('draggable', 'true');\r\n $tr.setAttribute('data-id', task.id);\r\n $.style($tr, {\r\n height:\r\n this.gantt.options.bar_height +\r\n this.gantt.options.padding +\r\n 'px',\r\n });\r\n\r\n if (deps === 1 && task.groupPosition.includes('last')) {\r\n $tr.classList.add('root-last');\r\n }\r\n\r\n this.columns.forEach((column) => {\r\n const $td = document.createElement('td');\r\n const { data, render } = column;\r\n\r\n if (data === 'drag') {\r\n $td.innerHTML = ``;\r\n $td.className = 'draggable-item';\r\n $tr.append($td);\r\n return;\r\n }\r\n\r\n if (data === 'wbs') {\r\n $td.className = data;\r\n }\r\n\r\n if (data === 'name' && task.level > 1) {\r\n $td.setAttribute('rel', task.type);\r\n $td.className = `work-name indent-${deps} indent-${deps}-${task.groupPosition[0]}`;\r\n\r\n if (task.groupPosition[1]) {\r\n $td.classList.add(\r\n `indent-${deps}-${task.groupPosition[1]}`\r\n );\r\n }\r\n\r\n if (task.type !== 'default') {\r\n $td.classList.add(task.closed ? 'closed' : 'opened');\r\n }\r\n\r\n for (let i = 0; i < deps; i++) {\r\n const $ins = document.createElement('ins');\r\n $ins.textContent = '';\r\n\r\n this.isRowLine(task.parentId) &&\r\n $ins.classList.add('row-line');\r\n\r\n if (deps === 1 || i === deps - 2) {\r\n $ins.classList.add('marker');\r\n\r\n deps > 1 && $ins.classList.add('row-line');\r\n\r\n $td.append($ins);\r\n break;\r\n }\r\n\r\n $td.append($ins);\r\n }\r\n }\r\n\r\n if (render) {\r\n const child_node = render(task[data], task);\r\n $td.append(child_node);\r\n } else {\r\n const text = document.createTextNode(task[data] ?? '');\r\n $td.append(text);\r\n }\r\n\r\n $tr.append($td);\r\n });\r\n\r\n $tr.addEventListener('mousedown', (e) => {\r\n const $td = this.get_parentNode('td', e.target);\r\n\r\n if ($td.classList.contains('draggable-item')) {\r\n $tr.addEventListener('dragstart', (e) => {\r\n e.target.classList.add('dragging');\r\n });\r\n\r\n $tr.addEventListener('dragend', (e) => {\r\n e.target.classList.remove('dragging');\r\n });\r\n }\r\n });\r\n\r\n return $tr;\r\n });\r\n }\r\n\r\n get_drag_after_element(container, y) {\r\n const draggableElements = [\r\n ...container.querySelectorAll('tr:not(.dragging)'),\r\n ];\r\n\r\n return draggableElements.reduce(\r\n (closest, child) => {\r\n const box = child.getBoundingClientRect();\r\n const offset = y - box.top - box.height / 2;\r\n if (offset < 0 && offset > closest.offset) {\r\n return { offset: offset, element: child };\r\n } else {\r\n return closest;\r\n }\r\n },\r\n { offset: Number.NEGATIVE_INFINITY }\r\n ).element;\r\n }\r\n\r\n find_task_item(id) {\r\n return this.tasks.find((t) => t.id === id);\r\n }\r\n\r\n bind_draggable_event($tbody) {\r\n $tbody.addEventListener('dragover', (e) => {\r\n e.preventDefault();\r\n if (!this.dragStartY) this.dragStartY = e.clientY;\r\n\r\n this.draggableEl = document.querySelector('.dragging');\r\n this.afterElement = this.get_drag_after_element($tbody, e.clientY);\r\n\r\n $tbody.insertBefore(this.draggableEl, this.afterElement);\r\n });\r\n\r\n $tbody.addEventListener('drop', async (e) => {\r\n e.preventDefault();\r\n const targetItem = this.find_task_item(\r\n this.get_parentNode('tr', e.target).getAttribute('data-id')\r\n );\r\n const dragItem = this.find_task_item(\r\n this.draggableEl.getAttribute('data-id')\r\n );\r\n const afterItem = this.find_task_item(\r\n this.afterElement.getAttribute('data-id')\r\n );\r\n\r\n const params = {\r\n c_id: dragItem.id,\r\n ref: afterItem.parentId,\r\n c_position:\r\n e.clientY > this.dragStartY\r\n ? afterItem.position - 1\r\n : afterItem.position,\r\n level: afterItem.level,\r\n p_position: dragItem.position,\r\n p_parentId: dragItem.parentId,\r\n };\r\n\r\n if (targetItem.type !== 'default') {\r\n const arr = this.tasks.filter(\r\n (t) => t.parentId === Number(targetItem.id)\r\n ).length;\r\n params.ref = targetItem.id;\r\n params.level = targetItem.level + 1;\r\n params.c_position = arr ? arr : 0;\r\n }\r\n\r\n this.dragStartY = 0;\r\n this.gantt.draggble_rerender(params);\r\n this.gantt.trigger_event('drag_row', [params]);\r\n });\r\n }\r\n}\r\n","import { $ } from './svg_utils';\r\n\r\nexport default class Split {\r\n constructor(wrapper) {\r\n this.draw_split_bar(wrapper);\r\n }\r\n\r\n draw_split_bar(elem) {\r\n const $split_bar = document.createElement('div');\r\n $split_bar.classList.add('split-bar');\r\n\r\n let x = 0;\r\n\r\n const mouseDownHandler = function (e) {\r\n x = e.clientX;\r\n\r\n document.addEventListener('mousemove', mouseMoveHandler);\r\n document.addEventListener('mouseup', mouseUpHandler);\r\n };\r\n\r\n const mouseMoveHandler = function (e) {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n const dx = e.clientX - x;\r\n const left =\r\n (Math.max(\r\n 0,\r\n Math.min($split_bar.offsetLeft + dx, elem.clientWidth)\r\n ) /\r\n elem.clientWidth) *\r\n 100;\r\n\r\n $.style($split_bar, { left: `${left}%` });\r\n $.style($table, { 'flex-basis': `${left}%` });\r\n $.style($gantt, { 'flex-basis': `${100 - left}%` });\r\n $.style($table, { 'overflow-x': 'hidden' });\r\n $.style($gantt, { 'overflow-x': 'hidden' });\r\n\r\n x = e.clientX;\r\n };\r\n\r\n const mouseUpHandler = function () {\r\n const $table = $split_bar.previousElementSibling;\r\n const $gantt = $split_bar.nextSibling;\r\n\r\n document.removeEventListener('mousemove', mouseMoveHandler);\r\n document.removeEventListener('mouseup', mouseUpHandler);\r\n\r\n $.style($table, { 'overflow-x': 'auto' });\r\n $.style($gantt, { 'overflow-x': 'auto' });\r\n };\r\n\r\n $split_bar.addEventListener('mousedown', mouseDownHandler);\r\n elem.prepend($split_bar);\r\n }\r\n}\r\n","import date_utils from './date_utils';\r\nimport { $, createSVG } from './svg_utils';\r\nimport Bar from './bar';\r\nimport Arrow from './arrow';\r\nimport Popup from './popup';\r\nimport Table from './table';\r\nimport Split from './split';\r\n\r\nimport './gantt.scss';\r\n\r\nconst VIEW_MODE = {\r\n QUARTER_DAY: 'Quarter Day',\r\n HALF_DAY: 'Half Day',\r\n DAY: 'Day',\r\n WEEK: 'Week',\r\n MONTH: 'Month',\r\n YEAR: 'Year',\r\n};\r\n\r\nexport default class Gantt {\r\n constructor(wrapper, tasks, options, contents) {\r\n this.originTasks = tasks;\r\n\r\n this.setup_options(options);\r\n this.setup_tasks(tasks);\r\n\r\n this.setup_wrapper(wrapper);\r\n\r\n // initialize with default view mode\r\n this.change_view_mode();\r\n this.setup_split_bar();\r\n this.setup_table(contents);\r\n\r\n this.bind_events();\r\n }\r\n\r\n setup_wrapper(element) {\r\n let svg_element;\r\n let wrapper_element;\r\n\r\n // CSS Selector is passed\r\n if (typeof element === 'string') {\r\n element = document.querySelector(element);\r\n }\r\n\r\n // get the SVGElement\r\n if (element instanceof HTMLElement) {\r\n wrapper_element = element;\r\n svg_element = element.querySelector('svg');\r\n } else if (element instanceof SVGElement) {\r\n svg_element = element;\r\n } else {\r\n throw new TypeError(\r\n 'Frappé Gantt only supports usage of a string CSS selector,' +\r\n \" HTML DOM element or SVG DOM element for the 'element' parameter\"\r\n );\r\n }\r\n\r\n // svg element\r\n if (!svg_element) {\r\n // create it\r\n this.$svg = createSVG('svg', {\r\n append_to: wrapper_element,\r\n class: 'gantt',\r\n });\r\n } else {\r\n this.$svg = svg_element;\r\n this.$svg.classList.add('gantt');\r\n }\r\n\r\n this.$wrapper = document.createElement('div');\r\n this.$wrapper.classList.add('wrapper');\r\n\r\n // wrapper element\r\n this.$container = document.createElement('div');\r\n this.$container.classList.add('gantt-container');\r\n\r\n const parent_element = this.$svg.parentElement;\r\n element.appendChild(this.setup_mode_handler());\r\n parent_element.appendChild(this.$wrapper);\r\n this.$wrapper.appendChild(this.$container);\r\n this.$container.appendChild(this.$svg);\r\n\r\n // popup wrapper\r\n this.popup_wrapper = document.createElement('div');\r\n this.popup_wrapper.classList.add('popup-wrapper');\r\n this.$container.appendChild(this.popup_wrapper);\r\n }\r\n\r\n setup_mode_handler() {\r\n const wrapper = document.createElement('div');\r\n const excel_export = document.createElement('button');\r\n const btn_group = document.createElement('div');\r\n\r\n wrapper.className = 'mt well well-sm clearfix';\r\n excel_export.className = 'btn btn-default btn-sm mr-xs';\r\n\r\n excel_export.innerText = 'Excel';\r\n\r\n $.style(btn_group, { float: 'right' });\r\n\r\n Object.keys(VIEW_MODE).forEach((key) => {\r\n const btn = document.createElement('button');\r\n btn.className = `btn btn-default btn-sm mr-xs ${\r\n VIEW_MODE[key] === this.options.view_mode ? 'active' : ''\r\n }`;\r\n btn.innerText = VIEW_MODE[key];\r\n btn.addEventListener('click', (e) => {\r\n e.target.classList.add('active');\r\n e.target.parentNode.childNodes.forEach((b) =>\r\n b.classList.remove('active')\r\n );\r\n\r\n this.change_view_mode(VIEW_MODE[key]);\r\n });\r\n\r\n btn_group.appendChild(btn);\r\n });\r\n\r\n wrapper.append(excel_export);\r\n wrapper.append(btn_group);\r\n\r\n return wrapper;\r\n }\r\n\r\n setup_options(options) {\r\n const default_options = {\r\n header_height: 50,\r\n column_width: 30,\r\n step: 24,\r\n view_modes: [...Object.values(VIEW_MODE)],\r\n bar_height: 20,\r\n bar_corner_radius: 3,\r\n arrow_curve: 5,\r\n padding: 18,\r\n view_mode: 'Day',\r\n date_format: 'YYYY-MM-DD',\r\n popup_trigger: 'click',\r\n custom_popup_html: null,\r\n language: 'ko',\r\n };\r\n this.options = Object.assign({}, default_options, options);\r\n }\r\n\r\n setup_tasks(tasks) {\r\n // prepare tasks\r\n this.tasks = this.sort_tasks(tasks).map((task, i) => {\r\n // convert to Date objects\r\n task._start = date_utils.parse(task.start);\r\n task._end = date_utils.parse(task.end);\r\n\r\n // make task invalid if duration too large\r\n if (date_utils.diff(task._end, task._start, 'year') > 10) {\r\n task.end = null;\r\n }\r\n\r\n // cache index\r\n task._index = i;\r\n\r\n // invalid dates\r\n if (!task.start && !task.end) {\r\n const today = date_utils.today();\r\n task._start = today;\r\n task._end = date_utils.add(today, 2, 'day');\r\n }\r\n\r\n if (!task.start && task.end) {\r\n task._start = date_utils.add(task._end, -2, 'day');\r\n }\r\n\r\n if (task.start && !task.end) {\r\n task._end = date_utils.add(task._start, 2, 'day');\r\n }\r\n\r\n // if hours is not set, assume the last day is full day\r\n // e.g: 2018-09-09 becomes 2018-09-09 23:59:59\r\n const task_end_values = date_utils.get_date_values(task._end);\r\n if (task_end_values.slice(3).every((d) => d === 0)) {\r\n task._end = date_utils.add(task._end, 24, 'hour');\r\n }\r\n\r\n // invalid flag\r\n if (!task.start || !task.end) {\r\n task.invalid = true;\r\n }\r\n\r\n // dependencies\r\n if (typeof task.dependencies === 'string' || !task.dependencies) {\r\n let deps = [];\r\n if (task.dependencies) {\r\n deps = task.dependencies\r\n .split(',')\r\n .map((d) => d.trim())\r\n .filter((d) => d);\r\n }\r\n task.dependencies = deps;\r\n }\r\n\r\n // uids\r\n if (!task.id) {\r\n task.id = generate_id(task);\r\n }\r\n\r\n return task;\r\n });\r\n\r\n this.setup_dependencies();\r\n }\r\n\r\n setup_dependencies() {\r\n this.dependency_map = {};\r\n for (let t of this.tasks) {\r\n for (let d of t.dependencies) {\r\n this.dependency_map[d] = this.dependency_map[d] || [];\r\n this.dependency_map[d].push(t.id);\r\n }\r\n }\r\n }\r\n\r\n refresh(tasks) {\r\n this.setup_tasks(tasks);\r\n this.change_view_mode();\r\n this.rerender_table();\r\n this.originTasks = tasks;\r\n }\r\n\r\n change_view_mode(mode = this.options.view_mode) {\r\n this.update_view_scale(mode);\r\n this.setup_dates();\r\n this.render();\r\n // fire viewmode_change event\r\n this.trigger_event('view_change', [mode]);\r\n }\r\n\r\n update_view_scale(view_mode) {\r\n this.options.view_mode = view_mode;\r\n\r\n if (view_mode === VIEW_MODE.DAY) {\r\n this.options.step = 24;\r\n this.options.column_width = 38;\r\n } else if (view_mode === VIEW_MODE.HALF_DAY) {\r\n this.options.step = 24 / 2;\r\n this.options.column_width = 38;\r\n } else if (view_mode === VIEW_MODE.QUARTER_DAY) {\r\n this.options.step = 24 / 4;\r\n this.options.column_width = 38;\r\n } else if (view_mode === VIEW_MODE.WEEK) {\r\n this.options.step = 24 * 7;\r\n this.options.column_width = 140;\r\n } else if (view_mode === VIEW_MODE.MONTH) {\r\n this.options.step = 24 * 30;\r\n this.options.column_width = 120;\r\n } else if (view_mode === VIEW_MODE.YEAR) {\r\n this.options.step = 24 * 365;\r\n this.options.column_width = 120;\r\n }\r\n }\r\n\r\n setup_dates() {\r\n this.setup_gantt_dates();\r\n this.setup_date_values();\r\n }\r\n\r\n setup_gantt_dates() {\r\n this.gantt_start = this.gantt_end = null;\r\n\r\n for (let task of this.tasks) {\r\n // set global start and end date\r\n if (!this.gantt_start || task._start < this.gantt_start) {\r\n this.gantt_start = task._start;\r\n }\r\n if (!this.gantt_end || task._end > this.gantt_end) {\r\n this.gantt_end = task._end;\r\n }\r\n }\r\n\r\n this.gantt_start = date_utils.start_of(this.gantt_start, 'day');\r\n this.gantt_end = date_utils.start_of(this.gantt_end, 'day');\r\n\r\n // add date padding on both sides\r\n if (this.view_is([VIEW_MODE.QUARTER_DAY, VIEW_MODE.HALF_DAY])) {\r\n this.gantt_start = date_utils.add(this.gantt_start, -7, 'day');\r\n this.gantt_end = date_utils.add(this.gantt_end, 7, 'day');\r\n } else if (this.view_is(VIEW_MODE.MONTH)) {\r\n this.gantt_start = date_utils.start_of(this.gantt_start, 'year');\r\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'year');\r\n } else if (this.view_is(VIEW_MODE.YEAR)) {\r\n this.gantt_start = date_utils.add(this.gantt_start, -2, 'year');\r\n this.gantt_end = date_utils.add(this.gantt_end, 2, 'year');\r\n } else {\r\n this.gantt_start = date_utils.add(this.gantt_start, -1, 'month');\r\n this.gantt_end = date_utils.add(this.gantt_end, 1, 'month');\r\n }\r\n }\r\n\r\n setup_date_values() {\r\n this.dates = [];\r\n let cur_date = null;\r\n\r\n while (cur_date === null || cur_date < this.gantt_end) {\r\n if (!cur_date) {\r\n cur_date = date_utils.clone(this.gantt_start);\r\n } else {\r\n if (this.view_is(VIEW_MODE.YEAR)) {\r\n cur_date = date_utils.add(cur_date, 1, 'year');\r\n } else if (this.view_is(VIEW_MODE.MONTH)) {\r\n cur_date = date_utils.add(cur_date, 1, 'month');\r\n } else {\r\n cur_date = date_utils.add(\r\n cur_date,\r\n this.options.step,\r\n 'hour'\r\n );\r\n }\r\n }\r\n this.dates.push(cur_date);\r\n }\r\n }\r\n\r\n bind_events() {\r\n this.bind_grid_click();\r\n this.bind_bar_events();\r\n this.bind_scroll_event();\r\n }\r\n\r\n render() {\r\n this.clear();\r\n this.setup_layers();\r\n this.make_grid();\r\n this.make_grid_header();\r\n this.make_dates();\r\n this.make_bars();\r\n this.make_arrows();\r\n this.map_arrows_on_bars();\r\n this.set_width();\r\n this.set_scroll_position();\r\n }\r\n\r\n rerender_table() {\r\n document.querySelector('.table-body')?.remove();\r\n\r\n const $table_body = this.table.draw_table_body(this.tasks, {\r\n height: this.options.bar_height + this.options.padding + 'px',\r\n });\r\n\r\n document\r\n .querySelector('.table-container table')\r\n .appendChild($table_body);\r\n\r\n $table_body.addEventListener('click', (event) =>\r\n this.bind_table_event(event)\r\n );\r\n }\r\n\r\n draggble_rerender(item) {\r\n this.update_origin_tasks(item);\r\n this.render();\r\n this.rerender_table();\r\n }\r\n\r\n sort_tasks(tasks) {\r\n const sorted_tasks = [...tasks];\r\n const children_idx_info = {};\r\n\r\n sorted_tasks\r\n .sort((a, b) => a.level - b.level || a.position - b.position)\r\n .forEach((task, taskIdx) => {\r\n if (task.parentId !== 2) {\r\n if (children_idx_info.hasOwnProperty(task.parentId)) {\r\n children_idx_info[task.parentId].push(taskIdx);\r\n } else {\r\n children_idx_info[task.parentId] = [taskIdx];\r\n }\r\n\r\n const parentIdx = sorted_tasks.findIndex(\r\n (item) => +item.id === task.parentId\r\n );\r\n\r\n sorted_tasks.splice(taskIdx, 1);\r\n sorted_tasks.splice(\r\n parentIdx + children_idx_info[task.parentId].length,\r\n 0,\r\n task\r\n );\r\n }\r\n }, []);\r\n\r\n return sorted_tasks;\r\n }\r\n\r\n setGroupPosition(data) {\r\n return data.reduce((acc, cur) => {\r\n const group = data.filter((t) => t.parentId === cur.parentId);\r\n\r\n cur.groupPosition = [];\r\n\r\n if (group[0].id === cur.id) {\r\n cur.groupPosition.push('first');\r\n }\r\n if (group[group.length - 1].id === cur.id) {\r\n cur.groupPosition.push('last');\r\n }\r\n if (!cur.groupPosition.length) {\r\n cur.groupPosition.push('middle');\r\n }\r\n\r\n acc.push(cur);\r\n return acc;\r\n }, []);\r\n }\r\n\r\n update_dependecies(id) {\r\n if (id === 2) return [];\r\n\r\n const dependencies = this.tasks.find(\r\n (task) => task.id === id\r\n ).dependencies;\r\n\r\n if (!dependencies.length) return [id];\r\n return [...dependencies, id];\r\n }\r\n\r\n update_origin_tasks(item) {\r\n let tasks = this.tasks.reduce((acc, cur) => {\r\n if (cur.id === item.c_id) {\r\n const dependencies = this.update_dependecies(item.ref);\r\n\r\n cur = {\r\n ...cur,\r\n parentId: Number(item.ref),\r\n dependencies,\r\n position: item.c_position,\r\n level: item.level,\r\n wbs: dependencies.length\r\n ? `${dependencies.join('-')}-${item.c_id}`\r\n : `${item.c_id}`,\r\n };\r\n } else {\r\n if (\r\n cur.parentId === Number(item.ref) &&\r\n item.c_position === item.p_position\r\n ) {\r\n acc.push(cur);\r\n return acc;\r\n }\r\n\r\n if (cur.parentId === Number(item.ref)) {\r\n cur.position =\r\n item.c_position > item.p_position\r\n ? cur.position < item.p_position\r\n ? cur.position\r\n : cur.position <= item.c_position\r\n ? cur.position - 1\r\n : cur.position\r\n : cur.position > item.p_position\r\n ? cur.position\r\n : cur.position >= item.c_position\r\n ? cur.position + 1\r\n : cur.position;\r\n } else {\r\n if (cur.parentId === item.p_parentId) {\r\n cur.position =\r\n cur.position < item.p_position\r\n ? cur.position\r\n : cur.position - 1;\r\n }\r\n }\r\n }\r\n\r\n acc.push(cur);\r\n return acc;\r\n }, []);\r\n\r\n tasks = this.setGroupPosition(tasks);\r\n\r\n this.setup_tasks(tasks);\r\n this.originTasks = tasks;\r\n }\r\n\r\n setup_layers() {\r\n this.layers = {};\r\n const layers = [\r\n 'grid',\r\n 'arrow',\r\n 'progress',\r\n 'bar',\r\n 'details',\r\n 'header',\r\n 'date',\r\n ];\r\n // make group layers\r\n for (let layer of layers) {\r\n this.layers[layer] = createSVG('g', {\r\n class: layer,\r\n append_to: this.$svg,\r\n });\r\n }\r\n }\r\n\r\n setup_split_bar() {\r\n this.split = new Split(this.$wrapper);\r\n }\r\n\r\n setup_table(contents, handler) {\r\n this.table = new Table(this, contents, handler);\r\n this.make_table();\r\n }\r\n\r\n bind_table_event(event) {\r\n const $tr = event.target.closest('tr');\r\n const id = $tr.dataset.id;\r\n\r\n if (\r\n event.target.tagName !== 'INS' &&\r\n !event.target.classList.contains('marker')\r\n ) {\r\n const task = this.get_task(id);\r\n\r\n this.handle_selected(task);\r\n\r\n return;\r\n }\r\n\r\n const $target = event.target.closest('td');\r\n\r\n if (\r\n $target.getAttribute('rel') === 'folder' ||\r\n $target.getAttribute('rel') === 'drive'\r\n ) {\r\n let tasks = [...this.tasks];\r\n\r\n if ($target.classList.contains('closed')) {\r\n this.originTasks.forEach((task) => {\r\n if (task.id === id) {\r\n delete task.closed;\r\n return tasks.splice(task._index, 1, task);\r\n }\r\n\r\n if (task.dependencies.includes(id))\r\n tasks.splice(task._index, 0, task);\r\n });\r\n } else {\r\n tasks = this.tasks.reduce((acc, task) => {\r\n if (task.id === id) {\r\n return [...acc, { ...task, closed: true }];\r\n }\r\n\r\n if (!task.dependencies.includes(id)) {\r\n return [...acc, task];\r\n }\r\n\r\n return acc;\r\n }, []);\r\n }\r\n\r\n this.setup_tasks(tasks);\r\n this.render();\r\n this.rerender_table();\r\n }\r\n }\r\n\r\n make_table() {\r\n const $table_container = document.createElement('div');\r\n const $table = document.createElement('table');\r\n\r\n $table_container.className = 'table-container';\r\n\r\n const $table_header = this.table.draw_table_header();\r\n const $table_body = this.table.draw_table_body(this.tasks);\r\n\r\n $table.append($table_header);\r\n $table.append($table_body);\r\n\r\n $table_body.addEventListener('click', (event) =>\r\n this.bind_table_event(event)\r\n );\r\n\r\n $table_container.append($table);\r\n\r\n this.$wrapper.prepend($table_container);\r\n }\r\n\r\n make_grid() {\r\n this.make_grid_background();\r\n this.make_grid_rows();\r\n this.make_grid_ticks();\r\n this.make_grid_highlights();\r\n }\r\n\r\n handle_selected(task) {\r\n const $tr = this.$wrapper.querySelectorAll('tr')[task._index + 1];\r\n const $grid_row =\r\n this.$wrapper.querySelectorAll('.grid-row')[task._index];\r\n\r\n if (!$tr.classList.contains('selected')) {\r\n Array.prototype.forEach.call(\r\n this.$wrapper.querySelectorAll('.selected'),\r\n (elem) => elem.classList.remove('selected')\r\n );\r\n }\r\n\r\n $tr?.classList.toggle('selected');\r\n $grid_row?.classList.toggle('selected');\r\n }\r\n\r\n make_grid_background() {\r\n const grid_width = this.dates.length * this.options.column_width;\r\n const grid_height =\r\n this.options.header_height +\r\n this.options.padding +\r\n (this.options.bar_height + this.options.padding) *\r\n this.tasks.length;\r\n\r\n createSVG('rect', {\r\n x: 0,\r\n y: 0,\r\n width: grid_width,\r\n height: grid_height,\r\n class: 'grid-background',\r\n append_to: this.layers.grid,\r\n });\r\n\r\n $.attr(this.$svg, {\r\n height: grid_height,\r\n width: '100%',\r\n });\r\n }\r\n\r\n make_grid_rows() {\r\n const rows_layer = createSVG('g', { append_to: this.layers.grid });\r\n // const lines_layer = createSVG('g', { append_to: this.layers.grid });\r\n\r\n const row_width = this.dates.length * this.options.column_width;\r\n const row_height = this.options.bar_height + this.options.padding;\r\n\r\n let row_y = this.options.header_height + this.options.padding / 2;\r\n\r\n for (let task of this.tasks) {\r\n createSVG('rect', {\r\n x: 0,\r\n y: row_y,\r\n width: row_width,\r\n height: row_height,\r\n class: 'grid-row',\r\n append_to: rows_layer,\r\n });\r\n\r\n // createSVG('line', {\r\n // x1: 0,\r\n // y1: row_y + row_height,\r\n // x2: row_width,\r\n // y2: row_y + row_height,\r\n // class: 'row-line',\r\n // append_to: lines_layer,\r\n // });\r\n\r\n row_y += this.options.bar_height + this.options.padding;\r\n }\r\n }\r\n\r\n make_grid_header() {\r\n const header_width = this.dates.length * this.options.column_width;\r\n const header_height = this.options.header_height + 10;\r\n\r\n const pageScroll = window.scrollY;\r\n const originOffset =\r\n pageScroll + this.$wrapper.getBoundingClientRect().top;\r\n\r\n if (originOffset <= pageScroll) {\r\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\r\n window.scrollY - originOffset\r\n )}px)`;\r\n }\r\n\r\n createSVG('rect', {\r\n x: 0,\r\n y: 0,\r\n width: header_width,\r\n height: header_height,\r\n class: 'grid-header',\r\n append_to: this.layers.header,\r\n });\r\n }\r\n\r\n make_grid_ticks() {\r\n let tick_x = 0;\r\n let tick_y = this.options.header_height + this.options.padding / 2;\r\n let tick_height =\r\n (this.options.bar_height + this.options.padding) *\r\n this.tasks.length;\r\n\r\n for (let date of this.dates) {\r\n let tick_class = 'tick';\r\n // thick tick for monday\r\n if (this.view_is(VIEW_MODE.DAY) && date.getDate() === 1) {\r\n tick_class += ' thick';\r\n }\r\n // thick tick for first week\r\n if (\r\n this.view_is(VIEW_MODE.WEEK) &&\r\n date.getDate() >= 1 &&\r\n date.getDate() < 8\r\n ) {\r\n tick_class += ' thick';\r\n }\r\n // thick ticks for quarters\r\n if (this.view_is(VIEW_MODE.MONTH) && date.getMonth() % 3 === 0) {\r\n tick_class += ' thick';\r\n }\r\n\r\n createSVG('path', {\r\n d: `M ${tick_x} ${tick_y} v ${tick_height}`,\r\n class: tick_class,\r\n append_to: this.layers.grid,\r\n });\r\n\r\n if (this.view_is(VIEW_MODE.MONTH)) {\r\n tick_x +=\r\n (date_utils.get_days_in_month(date) *\r\n this.options.column_width) /\r\n 30;\r\n } else {\r\n tick_x += this.options.column_width;\r\n }\r\n }\r\n }\r\n\r\n make_grid_highlights() {\r\n // highlight today's date\r\n if (this.view_is(VIEW_MODE.DAY)) {\r\n const x =\r\n (date_utils.diff(date_utils.today(), this.gantt_start, 'hour') /\r\n this.options.step) *\r\n this.options.column_width;\r\n const y = 0;\r\n\r\n const width = this.options.column_width;\r\n const height =\r\n (this.options.bar_height + this.options.padding) *\r\n this.tasks.length +\r\n this.options.header_height +\r\n this.options.padding / 2;\r\n\r\n createSVG('rect', {\r\n x,\r\n y,\r\n width,\r\n height,\r\n class: 'today-highlight',\r\n append_to: this.layers.grid,\r\n });\r\n }\r\n }\r\n\r\n make_dates() {\r\n const pageScroll = window.scrollY;\r\n const originOffset =\r\n pageScroll + this.$wrapper.getBoundingClientRect().top;\r\n\r\n if (originOffset <= pageScroll) {\r\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\r\n window.scrollY - originOffset\r\n )}px)`;\r\n }\r\n\r\n for (let date of this.get_dates_to_draw()) {\r\n createSVG('text', {\r\n x: date.lower_x,\r\n y: date.lower_y,\r\n innerHTML: date.lower_text,\r\n class: 'lower-text',\r\n append_to: this.layers.date,\r\n });\r\n\r\n if (date.upper_text) {\r\n const $upper_text = createSVG('text', {\r\n x: date.upper_x,\r\n y: date.upper_y,\r\n innerHTML: date.upper_text,\r\n class: 'upper-text',\r\n append_to: this.layers.date,\r\n });\r\n\r\n // remove out-of-bound dates\r\n if (\r\n $upper_text.getBBox().x2 > this.layers.grid.getBBox().width\r\n ) {\r\n $upper_text.remove();\r\n }\r\n }\r\n }\r\n }\r\n\r\n get_dates_to_draw() {\r\n let last_date = null;\r\n const dates = this.dates.map((date, i) => {\r\n const d = this.get_date_info(date, last_date, i);\r\n last_date = date;\r\n return d;\r\n });\r\n return dates;\r\n }\r\n\r\n get_date_info(date, last_date, i) {\r\n if (!last_date) {\r\n last_date = date_utils.add(date, 1, 'year');\r\n }\r\n const date_text = {\r\n 'Quarter Day_lower': date_utils.format(\r\n date,\r\n 'HH',\r\n this.options.language\r\n ),\r\n 'Half Day_lower': date_utils.format(\r\n date,\r\n 'HH',\r\n this.options.language\r\n ),\r\n Day_lower:\r\n date.getDate() !== last_date.getDate()\r\n ? date_utils.format(date, 'D', this.options.language)\r\n : '',\r\n Week_lower:\r\n date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(date, 'D MMM', this.options.language)\r\n : date_utils.format(date, 'D', this.options.language),\r\n Month_lower: date_utils.format(date, 'MMMM', this.options.language),\r\n Year_lower: date_utils.format(date, 'YYYY', this.options.language),\r\n 'Quarter Day_upper':\r\n date.getDate() !== last_date.getDate()\r\n ? date_utils.format(date, 'D MMM', this.options.language)\r\n : '',\r\n 'Half Day_upper':\r\n date.getDate() !== last_date.getDate()\r\n ? date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(\r\n date,\r\n 'D MMM',\r\n this.options.language\r\n )\r\n : date_utils.format(date, 'D', this.options.language)\r\n : '',\r\n Day_upper:\r\n date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(date, 'MMMM', this.options.language)\r\n : '',\r\n Week_upper:\r\n date.getMonth() !== last_date.getMonth()\r\n ? date_utils.format(date, 'MMMM', this.options.language)\r\n : '',\r\n Month_upper:\r\n date.getFullYear() !== last_date.getFullYear()\r\n ? date_utils.format(date, 'YYYY', this.options.language)\r\n : '',\r\n Year_upper:\r\n date.getFullYear() !== last_date.getFullYear()\r\n ? date_utils.format(date, 'YYYY', this.options.language)\r\n : '',\r\n };\r\n\r\n const base_pos = {\r\n x: i * this.options.column_width,\r\n lower_y: this.options.header_height,\r\n upper_y: this.options.header_height - 25,\r\n };\r\n\r\n const x_pos = {\r\n 'Quarter Day_lower': (this.options.column_width * 4) / 2,\r\n 'Quarter Day_upper': 0,\r\n 'Half Day_lower': (this.options.column_width * 2) / 2,\r\n 'Half Day_upper': 0,\r\n Day_lower: this.options.column_width / 2,\r\n Day_upper: (this.options.column_width * 30) / 2,\r\n Week_lower: 0,\r\n Week_upper: (this.options.column_width * 4) / 2,\r\n Month_lower: this.options.column_width / 2,\r\n Month_upper: (this.options.column_width * 12) / 2,\r\n Year_lower: this.options.column_width / 2,\r\n Year_upper: (this.options.column_width * 30) / 2,\r\n };\r\n\r\n return {\r\n upper_text: date_text[`${this.options.view_mode}_upper`],\r\n lower_text: date_text[`${this.options.view_mode}_lower`],\r\n upper_x: base_pos.x + x_pos[`${this.options.view_mode}_upper`],\r\n upper_y: base_pos.upper_y,\r\n lower_x: base_pos.x + x_pos[`${this.options.view_mode}_lower`],\r\n lower_y: base_pos.lower_y,\r\n };\r\n }\r\n\r\n make_bars() {\r\n this.bars = this.tasks.map((task) => {\r\n const bar = new Bar(this, task);\r\n this.layers.bar.appendChild(bar.group);\r\n return bar;\r\n });\r\n }\r\n\r\n make_arrows() {\r\n this.arrows = [];\r\n for (let task of this.tasks) {\r\n let arrows = [];\r\n arrows = task.dependencies\r\n .map((task_id) => {\r\n const dependency = this.get_task(task_id);\r\n if (!dependency) return;\r\n const arrow = new Arrow(\r\n this,\r\n this.bars[dependency._index], // from_task\r\n this.bars[task._index] // to_task\r\n );\r\n this.layers.arrow.appendChild(arrow.element);\r\n return arrow;\r\n })\r\n .filter(Boolean); // filter falsy values\r\n this.arrows = this.arrows.concat(arrows);\r\n }\r\n }\r\n\r\n map_arrows_on_bars() {\r\n for (let bar of this.bars) {\r\n bar.arrows = this.arrows.filter((arrow) => {\r\n return (\r\n arrow.from_task.task.id === bar.task.id ||\r\n arrow.to_task.task.id === bar.task.id\r\n );\r\n });\r\n }\r\n }\r\n\r\n set_width() {\r\n const cur_width = this.$svg.getBoundingClientRect().width;\r\n const actual_width = this.$svg\r\n .querySelector('.grid .grid-row')\r\n .getAttribute('width');\r\n if (cur_width < actual_width) {\r\n this.$svg.setAttribute('width', actual_width);\r\n }\r\n }\r\n\r\n set_scroll_position() {\r\n const parent_element = this.$svg.parentElement;\r\n if (!parent_element) return;\r\n\r\n const hours_before_first_task = date_utils.diff(\r\n this.get_oldest_starting_date(),\r\n this.gantt_start,\r\n 'hour'\r\n );\r\n\r\n const scroll_pos =\r\n (hours_before_first_task / this.options.step) *\r\n this.options.column_width -\r\n this.options.column_width;\r\n\r\n parent_element.scrollLeft = scroll_pos;\r\n }\r\n\r\n bind_scroll_event() {\r\n const originOffset =\r\n window.scrollY + this.$wrapper.getBoundingClientRect().top;\r\n const $table_header = $('.table-header');\r\n let ticking = false;\r\n\r\n $.bind(\r\n window,\r\n 'scroll',\r\n () => {\r\n const pageScroll = window.scrollY;\r\n\r\n if (ticking) return;\r\n\r\n ticking = true;\r\n window.requestAnimationFrame(() => {\r\n if (originOffset <= pageScroll) {\r\n $table_header.style.top = `${Math.floor(\r\n pageScroll - originOffset\r\n )}px`;\r\n this.layers.header.style.transform = `translate(0px, ${Math.floor(\r\n pageScroll - originOffset\r\n )}px)`;\r\n this.layers.date.style.transform = `translate(0px, ${Math.floor(\r\n pageScroll - originOffset\r\n )}px)`;\r\n } else {\r\n $table_header.style.top = '0px';\r\n this.layers.header.style.transform =\r\n 'translate(0px, 0px)';\r\n this.layers.date.style.transform =\r\n 'translate(0px, 0px)';\r\n }\r\n\r\n ticking = false;\r\n });\r\n },\r\n { passive: true }\r\n );\r\n }\r\n\r\n bind_grid_click() {\r\n $.on(\r\n this.$svg,\r\n this.options.popup_trigger,\r\n '.grid-row, .grid-header',\r\n () => {\r\n this.unselect_all();\r\n this.hide_popup();\r\n }\r\n );\r\n }\r\n\r\n bind_bar_events() {\r\n let is_dragging = false;\r\n let x_on_start = 0;\r\n let y_on_start = 0;\r\n let is_resizing_left = false;\r\n let is_resizing_right = false;\r\n let parent_bar_id = null;\r\n let bars = []; // instanceof Bar\r\n this.bar_being_dragged = null;\r\n\r\n function action_in_progress() {\r\n return is_dragging || is_resizing_left || is_resizing_right;\r\n }\r\n\r\n $.on(this.$svg, 'mousedown', '.bar-wrapper, .handle', (e, element) => {\r\n const bar_wrapper = $.closest('.bar-wrapper', element);\r\n\r\n if (element.classList.contains('left')) {\r\n is_resizing_left = true;\r\n } else if (element.classList.contains('right')) {\r\n is_resizing_right = true;\r\n } else if (element.classList.contains('bar-wrapper')) {\r\n is_dragging = true;\r\n }\r\n\r\n bar_wrapper.classList.add('active');\r\n\r\n x_on_start = e.offsetX;\r\n y_on_start = e.offsetY;\r\n\r\n parent_bar_id = bar_wrapper.getAttribute('data-id');\r\n const ids = [\r\n parent_bar_id,\r\n ...this.get_all_dependent_tasks(parent_bar_id),\r\n ];\r\n bars = ids.map((id) => this.get_bar(id));\r\n\r\n this.bar_being_dragged = parent_bar_id;\r\n\r\n bars.forEach((bar) => {\r\n const $bar = bar.$bar;\r\n $bar.ox = $bar.getX();\r\n $bar.oy = $bar.getY();\r\n $bar.owidth = $bar.getWidth();\r\n $bar.finaldx = 0;\r\n });\r\n });\r\n\r\n $.on(this.$svg, 'mousemove', (e) => {\r\n if (!action_in_progress()) return;\r\n const dx = e.offsetX - x_on_start;\r\n const dy = e.offsetY - y_on_start;\r\n\r\n bars.forEach((bar) => {\r\n const $bar = bar.$bar;\r\n $bar.finaldx = this.get_snap_position(dx);\r\n this.hide_popup();\r\n if (is_resizing_left) {\r\n if (parent_bar_id === bar.task.id) {\r\n bar.update_bar_position({\r\n x: $bar.ox + $bar.finaldx,\r\n width: $bar.owidth - $bar.finaldx,\r\n });\r\n } else {\r\n bar.update_bar_position({\r\n x: $bar.ox + $bar.finaldx,\r\n });\r\n }\r\n } else if (is_resizing_right) {\r\n if (parent_bar_id === bar.task.id) {\r\n bar.update_bar_position({\r\n width: $bar.owidth + $bar.finaldx,\r\n });\r\n }\r\n } else if (is_dragging) {\r\n bar.update_bar_position({ x: $bar.ox + $bar.finaldx });\r\n }\r\n });\r\n });\r\n\r\n document.addEventListener('mouseup', (e) => {\r\n if (is_dragging || is_resizing_left || is_resizing_right) {\r\n bars.forEach((bar) => bar.group.classList.remove('active'));\r\n }\r\n\r\n is_dragging = false;\r\n is_resizing_left = false;\r\n is_resizing_right = false;\r\n });\r\n\r\n $.on(this.$svg, 'mouseup', (e) => {\r\n this.bar_being_dragged = null;\r\n bars.forEach((bar) => {\r\n const $bar = bar.$bar;\r\n if (!$bar.finaldx) return;\r\n bar.date_changed();\r\n bar.set_action_completed();\r\n });\r\n });\r\n\r\n this.bind_bar_progress();\r\n }\r\n\r\n bind_bar_progress() {\r\n let x_on_start = 0;\r\n let y_on_start = 0;\r\n let is_resizing = null;\r\n let bar = null;\r\n let $bar_progress = null;\r\n let $bar = null;\r\n\r\n $.on(this.$svg, 'mousedown', '.handle.progress', (e, handle) => {\r\n is_resizing = true;\r\n x_on_start = e.offsetX;\r\n y_on_start = e.offsetY;\r\n\r\n const $bar_wrapper = $.closest('.bar-wrapper', handle);\r\n const id = $bar_wrapper.getAttribute('data-id');\r\n bar = this.get_bar(id);\r\n\r\n $bar_progress = bar.$bar_progress;\r\n $bar = bar.$bar;\r\n\r\n $bar_progress.finaldx = 0;\r\n $bar_progress.owidth = $bar_progress.getWidth();\r\n $bar_progress.min_dx = -$bar_progress.getWidth();\r\n $bar_progress.max_dx = $bar.getWidth() - $bar_progress.getWidth();\r\n });\r\n\r\n $.on(this.$svg, 'mousemove', (e) => {\r\n if (!is_resizing) return;\r\n let dx = e.offsetX - x_on_start;\r\n let dy = e.offsetY - y_on_start;\r\n\r\n if (dx > $bar_progress.max_dx) {\r\n dx = $bar_progress.max_dx;\r\n }\r\n if (dx < $bar_progress.min_dx) {\r\n dx = $bar_progress.min_dx;\r\n }\r\n\r\n const $handle = bar.$handle_progress;\r\n $.attr($bar_progress, 'width', $bar_progress.owidth + dx);\r\n $.attr($handle, 'points', bar.get_progress_polygon_points());\r\n $bar_progress.finaldx = dx;\r\n });\r\n\r\n $.on(this.$svg, 'mouseup', () => {\r\n is_resizing = false;\r\n if (!($bar_progress && $bar_progress.finaldx)) return;\r\n bar.progress_changed();\r\n bar.set_action_completed();\r\n });\r\n }\r\n\r\n get_all_dependent_tasks(task_id) {\r\n let out = [];\r\n let to_process = [task_id];\r\n while (to_process.length) {\r\n const deps = to_process.reduce((acc, curr) => {\r\n acc = acc.concat(this.dependency_map[curr]);\r\n return acc;\r\n }, []);\r\n\r\n out = out.concat(deps);\r\n to_process = deps.filter((d) => !to_process.includes(d));\r\n }\r\n\r\n return out.filter(Boolean);\r\n }\r\n\r\n get_snap_position(dx) {\r\n let odx = dx,\r\n rem,\r\n position;\r\n\r\n if (this.view_is(VIEW_MODE.WEEK)) {\r\n rem = dx % (this.options.column_width / 7);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.options.column_width / 14\r\n ? 0\r\n : this.options.column_width / 7);\r\n } else if (this.view_is(VIEW_MODE.MONTH)) {\r\n rem = dx % (this.options.column_width / 30);\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.options.column_width / 60\r\n ? 0\r\n : this.options.column_width / 30);\r\n } else {\r\n rem = dx % this.options.column_width;\r\n position =\r\n odx -\r\n rem +\r\n (rem < this.options.column_width / 2\r\n ? 0\r\n : this.options.column_width);\r\n }\r\n return position;\r\n }\r\n\r\n unselect_all() {\r\n [...this.$svg.querySelectorAll('.bar-wrapper')].forEach((el) => {\r\n el.classList.remove('active');\r\n });\r\n }\r\n\r\n view_is(modes) {\r\n if (typeof modes === 'string') {\r\n return this.options.view_mode === modes;\r\n }\r\n\r\n if (Array.isArray(modes)) {\r\n return modes.some((mode) => this.options.view_mode === mode);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n get_task(id) {\r\n return this.tasks.find((task) => {\r\n return task.id === id;\r\n });\r\n }\r\n\r\n get_bar(id) {\r\n return this.bars.find((bar) => {\r\n return bar.task.id === id;\r\n });\r\n }\r\n\r\n show_popup(options) {\r\n if (!this.popup) {\r\n this.popup = new Popup(\r\n this.popup_wrapper,\r\n this.options.custom_popup_html\r\n );\r\n }\r\n this.popup.show(options);\r\n }\r\n\r\n hide_popup() {\r\n this.popup && this.popup.hide();\r\n }\r\n\r\n trigger_event(event, args) {\r\n if (this.options['on_' + event]) {\r\n this.options['on_' + event].apply(null, args);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the oldest starting date from the list of tasks\r\n *\r\n * @returns Date\r\n * @memberof Gantt\r\n */\r\n get_oldest_starting_date() {\r\n return this.tasks\r\n .map((task) => task._start)\r\n .reduce((prev_date, cur_date) =>\r\n cur_date <= prev_date ? cur_date : prev_date\r\n );\r\n }\r\n\r\n /**\r\n * Clear all elements from the parent svg element\r\n *\r\n * @memberof Gantt\r\n */\r\n clear() {\r\n this.$svg.innerHTML = '';\r\n }\r\n}\r\n\r\nGantt.VIEW_MODE = VIEW_MODE;\r\n\r\nfunction generate_id(task) {\r\n return task.name + '_' + Math.random().toString(36).slice(2, 12);\r\n}\r\n"],"names":["YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","MILLISECOND","date_utils","parse","date","date_separator","time_separator","Date","date_parts","time_parts","parts","split","map","val","parseInt","vals","length","parseFloat","concat","to_string","with_time","TypeError","this","get_date_values","i","padStart","date_string","time_string","format","format_string","lang","month_name","Intl","DateTimeFormat","month","month_name_capitalized","charAt","toUpperCase","slice","values","d","format_map","YYYY","MM","DD","HH","mm","ss","SSS","D","MMMM","MMM","str","formatted_values","Object","keys","sort","a","b","forEach","key","includes","replace","push","value","diff","date_a","date_b","scale","milliseconds","seconds","hours","minutes","days","months","years","endsWith","Math","floor","today","now","add","qty","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","start_of","scores","should_reset","_scale","clone","get_days_in_month","no_of_days","year","targetLength","padString","String","repeat","$","expr","con","document","querySelector","createSVG","tag","attrs","elem","createElementNS","attr","append_to","appendChild","innerHTML","setAttribute","animateSVG","svgElement","from","to","animatedSvgElement","dur","begin","animEl","attributeName","animateElement","calcMode","keyTimes","keySplines","cubic_bezier","getAnimationElement","event","createEvent","initEvent","eventName","dispatchEvent","name","ease","linear","on","element","selector","callback","delegate","bind","off","handler","removeEventListener","addEventListener","e","delegatedTarget","target","closest","call","matches","parentNode","getAttribute","style","Bar","constructor","gantt","task","set_defaults","prepare","draw","action_completed","prepare_values","prepare_helpers","invalid","height","options","bar_height","x","compute_x","y","compute_y","corner_radius","bar_corner_radius","duration","_end","_start","step","width","column_width","progress_width","progress","group","class","custom_class","id","bar_group","handle_group","SVGElement","prototype","getX","getY","getWidth","getHeight","getEndX","draw_bar","draw_progress_bar","draw_label","draw_resize_handles","$bar","rx","ry","classList","$bar_progress","requestAnimationFrame","update_label_position","bar","$handle_progress","points","get_progress_polygon_points","join","bar_progress","setup_click_event","popup_trigger","show_popup","unselect_all","trigger_event","bar_being_dragged","subtitle","language","target_element","title","handle_selected","update_bar_position","update_attr","update_handle_position","update_progressbar_position","update_arrow_position","date_changed","changed","new_start_date","new_end_date","compute_start_end_date","Number","progress_changed","new_progress","compute_progress","set_action_completed","setTimeout","x_in_units","gantt_start","width_in_units","task_start","view_is","header_height","padding","_index","get_snap_position","dx","rem","position","odx","isNaN","label","getBBox","remove","handle","arrows","arrow","update","Arrow","from_task","to_task","calculate_path","start_x","condition","start_y","end_x","end_y","from_is_below_to","curve","arrow_curve","clockwise","curve_y","offset","path","down_1","down_2","left","Popup","parent","custom_html","make","hide","pointer","show","Error","html","clientWidth","position_meta","HTMLElement","getBoundingClientRect","top","transform","opacity","Table","dragStartY","columns","draw_table_header","$thead","createElement","$tr","column","$th","textContent","get_parentNode","tagName","draw_table_body","tasks","setGroupPosition","$tbody","make_table_row","row","append","contains","bind_draggable_event","isRowLine","find","t","groupPosition","index","deps","level","$td","data","render","className","type","closed","$ins","parentId","child_node","text","createTextNode","get_drag_after_element","container","querySelectorAll","reduce","child","box","NEGATIVE_INFINITY","find_task_item","preventDefault","clientY","draggableEl","afterElement","insertBefore","async","targetItem","dragItem","afterItem","params","c_id","ref","c_position","p_position","p_parentId","arr","filter","draggble_rerender","Split","wrapper","draw_split_bar","$split_bar","mouseMoveHandler","$table","previousElementSibling","$gantt","nextSibling","clientX","max","min","offsetLeft","mouseUpHandler","prepend","VIEW_MODE","QUARTER_DAY","HALF_DAY","WEEK","Gantt","contents","originTasks","setup_options","setup_tasks","setup_wrapper","change_view_mode","setup_split_bar","setup_table","bind_events","svg_element","wrapper_element","$svg","$wrapper","$container","parent_element","parentElement","setup_mode_handler","popup_wrapper","excel_export","btn_group","innerText","float","btn","view_mode","childNodes","default_options","view_modes","date_format","custom_popup_html","assign","sort_tasks","start","end","every","dependencies","trim","random","toString","generate_id","setup_dependencies","dependency_map","refresh","rerender_table","mode","update_view_scale","setup_dates","setup_gantt_dates","setup_date_values","gantt_end","dates","cur_date","bind_grid_click","bind_bar_events","bind_scroll_event","clear","setup_layers","make_grid","make_grid_header","make_dates","make_bars","make_arrows","map_arrows_on_bars","set_width","set_scroll_position","$table_body","table","bind_table_event","item","update_origin_tasks","sorted_tasks","children_idx_info","taskIdx","hasOwnProperty","parentIdx","findIndex","splice","acc","cur","update_dependecies","wbs","layers","layer","make_table","dataset","get_task","$target","$table_container","$table_header","make_grid_background","make_grid_rows","make_grid_ticks","make_grid_highlights","$grid_row","Array","toggle","grid_width","grid_height","grid","rows_layer","row_width","row_height","row_y","header_width","pageScroll","window","scrollY","originOffset","header","tick_x","tick_y","tick_height","tick_class","get_dates_to_draw","lower_x","lower_y","lower_text","upper_text","$upper_text","upper_x","upper_y","x2","last_date","get_date_info","date_text","Day_lower","Week_lower","Month_lower","Year_lower","Day_upper","Week_upper","Month_upper","Year_upper","base_pos","x_pos","bars","task_id","dependency","Boolean","cur_width","actual_width","scroll_pos","get_oldest_starting_date","scrollLeft","ticking","passive","hide_popup","is_dragging","x_on_start","y_on_start","is_resizing_left","is_resizing_right","parent_bar_id","bar_wrapper","offsetX","offsetY","ids","get_all_dependent_tasks","get_bar","ox","oy","owidth","finaldx","bind_bar_progress","is_resizing","min_dx","max_dx","$handle","out","to_process","curr","el","modes","isArray","some","popup","args","apply","prev_date"],"mappings":"kCA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H,EAAW+H,GAE9C,CAOD,KAAA3H,GACIja,KAAKsX,KAAKzR,UAAY,EACzB,SAGL6Q,EAAMJ,UAAYA"} \ No newline at end of file Index: reference/jquery-plugins/gantt-0.6.1/src/bar.js =================================================================== diff -u -r011f94779948d74e04873dfbbfafbd5a85ae3485 -r0fc9cdf566a919f98a017a6d6dc654e27ee576e2 --- reference/jquery-plugins/gantt-0.6.1/src/bar.js (.../bar.js) (revision 011f94779948d74e04873dfbbfafbd5a85ae3485) +++ reference/jquery-plugins/gantt-0.6.1/src/bar.js (.../bar.js) (revision 0fc9cdf566a919f98a017a6d6dc654e27ee576e2) @@ -223,18 +223,18 @@ update_bar_position({ x = null, width = null }) { const bar = this.$bar; if (x) { - // get all x values of parent task - const xs = this.task.dependencies.map((dep) => { - return this.gantt.get_bar(dep).$bar.getX(); - }); - // child task must not go before parent - const valid_x = xs.reduce((prev, curr) => { - return x >= curr; - }, x); - if (!valid_x) { - width = null; - return; - } + // // get all x values of parent task + // const xs = this.task.dependencies.map((dep) => { + // return this.gantt.get_bar(dep).$bar.getX(); + // }); + // // child task must not go before parent + // const valid_x = xs.reduce((prev, curr) => { + // return x >= curr; + // }, x); + // if (!valid_x) { + // width = null; + // return; + // } this.update_attr(bar, 'x', x); } if (width && width >= this.gantt.options.column_width) {