diff --git a/README.md b/README.md index 705830f9..7dc4d858 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ var gantt = new Gantt("#gantt", tasks, { padding: 18, view_mode: 'Day', date_format: 'YYYY-MM-DD', + language: 'en', // or 'es', 'it', 'ru', 'ptBr', 'fr', 'tr', 'zh', 'de', 'hu' custom_popup_html: null }); ``` diff --git a/dist/frappe-gantt.js b/dist/frappe-gantt.js index a58faac0..dd39ac0e 100644 --- a/dist/frappe-gantt.js +++ b/dist/frappe-gantt.js @@ -9,107 +9,6 @@ var Gantt = (function () { const SECOND = 'second'; const MILLISECOND = 'millisecond'; - const month_names = { - en: [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', - ], - es: [ - 'Enero', - 'Febrero', - 'Marzo', - 'Abril', - 'Mayo', - 'Junio', - 'Julio', - 'Agosto', - 'Septiembre', - 'Octubre', - 'Noviembre', - 'Diciembre', - ], - ru: [ - 'Январь', - 'Февраль', - 'Март', - 'Апрель', - 'Май', - 'Июнь', - 'Июль', - 'Август', - 'Сентябрь', - 'Октябрь', - 'Ноябрь', - 'Декабрь', - ], - ptBr: [ - 'Janeiro', - 'Fevereiro', - 'Março', - 'Abril', - 'Maio', - 'Junho', - 'Julho', - 'Agosto', - 'Setembro', - 'Outubro', - 'Novembro', - 'Dezembro', - ], - fr: [ - 'Janvier', - 'Février', - 'Mars', - 'Avril', - 'Mai', - 'Juin', - 'Juillet', - 'Août', - 'Septembre', - 'Octobre', - 'Novembre', - 'Décembre', - ], - tr: [ - 'Ocak', - 'Şubat', - 'Mart', - 'Nisan', - 'Mayıs', - 'Haziran', - 'Temmuz', - 'Ağustos', - 'Eylül', - 'Ekim', - 'Kasım', - 'Aralık', - ], - zh: [ - '一月', - '二月', - '三月', - '四月', - '五月', - '六月', - '七月', - '八月', - '九月', - '十月', - '十一月', - '十二月', - ], - }; - var date_utils = { parse(date, date_separator = '-', time_separator = /[.:]/) { if (date instanceof Date) { @@ -164,7 +63,14 @@ var Gantt = (function () { }, format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'en') { - const values = this.get_date_values(date).map((d) => padStart(d, 2, 0)); + const dateTimeFormat = new Intl.DateTimeFormat(lang, { + month: 'long' + }); + const month_name = dateTimeFormat.format(date); + const month_name_capitalized = + month_name.charAt(0).toUpperCase() + month_name.slice(1); + + const values = this.get_date_values(date).map(d => padStart(d, 2, 0)); const format_map = { YYYY: values[0], MM: padStart(+values[1] + 1, 2, 0), @@ -174,8 +80,8 @@ var Gantt = (function () { ss: values[5], SSS: values[6], D: values[2], - MMMM: month_names[lang][+values[1]], - MMM: month_names[lang][+values[1]], + MMMM: month_name_capitalized, + MMM: month_name_capitalized, }; let str = format_string; @@ -828,6 +734,7 @@ var Gantt = (function () { } update_progressbar_position() { + if (this.invalid) return; this.$bar_progress.setAttribute('x', this.$bar.getX()); this.$bar_progress.setAttribute( 'width', @@ -849,6 +756,7 @@ var Gantt = (function () { } update_handle_position() { + if (this.invalid) return; const bar = this.$bar; this.handle_group .querySelector('.handle.left') @@ -1419,10 +1327,7 @@ var Gantt = (function () { tick_class += ' thick'; } // thick ticks for quarters - if ( - this.view_is(VIEW_MODE.MONTH) && - (date.getMonth() + 1) % 3 === 0 - ) { + if (this.view_is(VIEW_MODE.MONTH) && date.getMonth() % 3 === 0) { tick_class += ' thick'; } diff --git a/dist/frappe-gantt.js.map b/dist/frappe-gantt.js.map index f3938bd4..1f99bfc0 100644 --- a/dist/frappe-gantt.js.map +++ b/dist/frappe-gantt.js.map @@ -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/index.js"],"sourcesContent":["const YEAR = 'year';\nconst MONTH = 'month';\nconst DAY = 'day';\nconst HOUR = 'hour';\nconst MINUTE = 'minute';\nconst SECOND = 'second';\nconst MILLISECOND = 'millisecond';\n\nconst month_names = {\n en: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n es: [\n 'Enero',\n 'Febrero',\n 'Marzo',\n 'Abril',\n 'Mayo',\n 'Junio',\n 'Julio',\n 'Agosto',\n 'Septiembre',\n 'Octubre',\n 'Noviembre',\n 'Diciembre',\n ],\n ru: [\n 'Январь',\n 'Февраль',\n 'Март',\n 'Апрель',\n 'Май',\n 'Июнь',\n 'Июль',\n 'Август',\n 'Сентябрь',\n 'Октябрь',\n 'Ноябрь',\n 'Декабрь',\n ],\n ptBr: [\n 'Janeiro',\n 'Fevereiro',\n 'Março',\n 'Abril',\n 'Maio',\n 'Junho',\n 'Julho',\n 'Agosto',\n 'Setembro',\n 'Outubro',\n 'Novembro',\n 'Dezembro',\n ],\n fr: [\n 'Janvier',\n 'Février',\n 'Mars',\n 'Avril',\n 'Mai',\n 'Juin',\n 'Juillet',\n 'Août',\n 'Septembre',\n 'Octobre',\n 'Novembre',\n 'Décembre',\n ],\n tr: [\n 'Ocak',\n 'Şubat',\n 'Mart',\n 'Nisan',\n 'Mayıs',\n 'Haziran',\n 'Temmuz',\n 'Ağustos',\n 'Eylül',\n 'Ekim',\n 'Kasım',\n 'Aralık',\n ],\n zh: [\n '一月',\n '二月',\n '三月',\n '四月',\n '五月',\n '六月',\n '七月',\n '八月',\n '九月',\n '十月',\n '十一月',\n '十二月',\n ],\n};\n\nexport default {\n parse(date, date_separator = '-', time_separator = /[.:]/) {\n if (date instanceof Date) {\n return date;\n }\n if (typeof date === 'string') {\n let date_parts, time_parts;\n const parts = date.split(' ');\n\n date_parts = parts[0]\n .split(date_separator)\n .map((val) => parseInt(val, 10));\n time_parts = parts[1] && parts[1].split(time_separator);\n\n // month is 0 indexed\n date_parts[1] = date_parts[1] - 1;\n\n let vals = date_parts;\n\n if (time_parts && time_parts.length) {\n if (time_parts.length == 4) {\n time_parts[3] = '0.' + time_parts[3];\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\n }\n vals = vals.concat(time_parts);\n }\n\n return new Date(...vals);\n }\n },\n\n to_string(date, with_time = false) {\n if (!(date instanceof Date)) {\n throw new TypeError('Invalid argument type');\n }\n const vals = this.get_date_values(date).map((val, i) => {\n if (i === 1) {\n // add 1 for month\n val = val + 1;\n }\n\n if (i === 6) {\n return padStart(val + '', 3, '0');\n }\n\n return padStart(val + '', 2, '0');\n });\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\n\n return date_string + (with_time ? ' ' + time_string : '');\n },\n\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'en') {\n const values = this.get_date_values(date).map((d) => padStart(d, 2, 0));\n const format_map = {\n YYYY: values[0],\n MM: padStart(+values[1] + 1, 2, 0),\n DD: values[2],\n HH: values[3],\n mm: values[4],\n ss: values[5],\n SSS: values[6],\n D: values[2],\n MMMM: month_names[lang][+values[1]],\n MMM: month_names[lang][+values[1]],\n };\n\n let str = format_string;\n const formatted_values = [];\n\n Object.keys(format_map)\n .sort((a, b) => b.length - a.length) // big string first\n .forEach((key) => {\n if (str.includes(key)) {\n str = str.replace(key, `$${formatted_values.length}`);\n formatted_values.push(format_map[key]);\n }\n });\n\n formatted_values.forEach((value, i) => {\n str = str.replace(`$${i}`, value);\n });\n\n return str;\n },\n\n diff(date_a, date_b, scale = DAY) {\n let milliseconds, seconds, hours, minutes, days, months, years;\n\n milliseconds = date_a - date_b;\n seconds = milliseconds / 1000;\n minutes = seconds / 60;\n hours = minutes / 60;\n days = hours / 24;\n months = days / 30;\n years = months / 12;\n\n if (!scale.endsWith('s')) {\n scale += 's';\n }\n\n return Math.floor(\n {\n milliseconds,\n seconds,\n minutes,\n hours,\n days,\n months,\n years,\n }[scale]\n );\n },\n\n today() {\n const vals = this.get_date_values(new Date()).slice(0, 3);\n return new Date(...vals);\n },\n\n now() {\n return new Date();\n },\n\n add(date, qty, scale) {\n qty = parseInt(qty, 10);\n const vals = [\n date.getFullYear() + (scale === YEAR ? qty : 0),\n date.getMonth() + (scale === MONTH ? qty : 0),\n date.getDate() + (scale === DAY ? qty : 0),\n date.getHours() + (scale === HOUR ? qty : 0),\n date.getMinutes() + (scale === MINUTE ? qty : 0),\n date.getSeconds() + (scale === SECOND ? qty : 0),\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\n ];\n return new Date(...vals);\n },\n\n start_of(date, scale) {\n const scores = {\n [YEAR]: 6,\n [MONTH]: 5,\n [DAY]: 4,\n [HOUR]: 3,\n [MINUTE]: 2,\n [SECOND]: 1,\n [MILLISECOND]: 0,\n };\n\n function should_reset(_scale) {\n const max_score = scores[scale];\n return scores[_scale] <= max_score;\n }\n\n const vals = [\n date.getFullYear(),\n should_reset(YEAR) ? 0 : date.getMonth(),\n should_reset(MONTH) ? 1 : date.getDate(),\n should_reset(DAY) ? 0 : date.getHours(),\n should_reset(HOUR) ? 0 : date.getMinutes(),\n should_reset(MINUTE) ? 0 : date.getSeconds(),\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\n ];\n\n return new Date(...vals);\n },\n\n clone(date) {\n return new Date(...this.get_date_values(date));\n },\n\n get_date_values(date) {\n return [\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds(),\n ];\n },\n\n get_days_in_month(date) {\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n const month = date.getMonth();\n\n if (month !== 1) {\n return no_of_days[month];\n }\n\n // Feb\n const year = date.getFullYear();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n return 29;\n }\n return 28;\n },\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\nfunction padStart(str, targetLength, padString) {\n str = str + '';\n targetLength = targetLength >> 0;\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n }\n}\n","export function $(expr, con) {\n return typeof expr === 'string'\n ? (con || document).querySelector(expr)\n : expr || null;\n}\n\nexport function createSVG(tag, attrs) {\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\n for (let attr in attrs) {\n if (attr === 'append_to') {\n const parent = attrs.append_to;\n parent.appendChild(elem);\n } else if (attr === 'innerHTML') {\n elem.innerHTML = attrs.innerHTML;\n } else {\n elem.setAttribute(attr, attrs[attr]);\n }\n }\n return elem;\n}\n\nexport function animateSVG(svgElement, attr, from, to) {\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\n\n if (animatedSvgElement === svgElement) {\n // triggered 2nd time programmatically\n // trigger artificial click event\n const event = document.createEvent('HTMLEvents');\n event.initEvent('click', true, true);\n event.eventName = 'click';\n animatedSvgElement.dispatchEvent(event);\n }\n}\n\nfunction getAnimationElement(\n svgElement,\n attr,\n from,\n to,\n dur = '0.4s',\n begin = '0.1s'\n) {\n const animEl = svgElement.querySelector('animate');\n if (animEl) {\n $.attr(animEl, {\n attributeName: attr,\n from,\n to,\n dur,\n begin: 'click + ' + begin, // artificial click\n });\n return svgElement;\n }\n\n const animateElement = createSVG('animate', {\n attributeName: attr,\n from,\n to,\n dur,\n begin,\n calcMode: 'spline',\n values: from + ';' + to,\n keyTimes: '0; 1',\n keySplines: cubic_bezier('ease-out'),\n });\n svgElement.appendChild(animateElement);\n\n return svgElement;\n}\n\nfunction cubic_bezier(name) {\n return {\n ease: '.25 .1 .25 1',\n linear: '0 0 1 1',\n 'ease-in': '.42 0 1 1',\n 'ease-out': '0 0 .58 1',\n 'ease-in-out': '.42 0 .58 1',\n }[name];\n}\n\n$.on = (element, event, selector, callback) => {\n if (!callback) {\n callback = selector;\n $.bind(element, event, callback);\n } else {\n $.delegate(element, event, selector, callback);\n }\n};\n\n$.off = (element, event, handler) => {\n element.removeEventListener(event, handler);\n};\n\n$.bind = (element, event, callback) => {\n event.split(/\\s+/).forEach(function (event) {\n element.addEventListener(event, callback);\n });\n};\n\n$.delegate = (element, event, selector, callback) => {\n element.addEventListener(event, function (e) {\n const delegatedTarget = e.target.closest(selector);\n if (delegatedTarget) {\n e.delegatedTarget = delegatedTarget;\n callback.call(this, e, delegatedTarget);\n }\n });\n};\n\n$.closest = (selector, element) => {\n if (!element) return null;\n\n if (element.matches(selector)) {\n return element;\n }\n\n return $.closest(selector, element.parentNode);\n};\n\n$.attr = (element, attr, value) => {\n if (!value && typeof attr === 'string') {\n return element.getAttribute(attr);\n }\n\n if (typeof attr === 'object') {\n for (let key in attr) {\n $.attr(element, key, attr[key]);\n }\n return;\n }\n\n element.setAttribute(attr, value);\n};\n","import date_utils from './date_utils';\nimport { $, createSVG, animateSVG } from './svg_utils';\n\nexport default class Bar {\n constructor(gantt, task) {\n this.set_defaults(gantt, task);\n this.prepare();\n this.draw();\n this.bind();\n }\n\n set_defaults(gantt, task) {\n this.action_completed = false;\n this.gantt = gantt;\n this.task = task;\n }\n\n prepare() {\n this.prepare_values();\n this.prepare_helpers();\n }\n\n prepare_values() {\n this.invalid = this.task.invalid;\n this.height = this.gantt.options.bar_height;\n this.x = this.compute_x();\n this.y = this.compute_y();\n this.corner_radius = this.gantt.options.bar_corner_radius;\n this.duration =\n date_utils.diff(this.task._end, this.task._start, 'hour') /\n this.gantt.options.step;\n this.width = this.gantt.options.column_width * this.duration;\n this.progress_width =\n this.gantt.options.column_width *\n this.duration *\n (this.task.progress / 100) || 0;\n this.group = createSVG('g', {\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\n 'data-id': this.task.id,\n });\n this.bar_group = createSVG('g', {\n class: 'bar-group',\n append_to: this.group,\n });\n this.handle_group = createSVG('g', {\n class: 'handle-group',\n append_to: this.group,\n });\n }\n\n prepare_helpers() {\n SVGElement.prototype.getX = function () {\n return +this.getAttribute('x');\n };\n SVGElement.prototype.getY = function () {\n return +this.getAttribute('y');\n };\n SVGElement.prototype.getWidth = function () {\n return +this.getAttribute('width');\n };\n SVGElement.prototype.getHeight = function () {\n return +this.getAttribute('height');\n };\n SVGElement.prototype.getEndX = function () {\n return this.getX() + this.getWidth();\n };\n }\n\n draw() {\n this.draw_bar();\n this.draw_progress_bar();\n this.draw_label();\n this.draw_resize_handles();\n }\n\n draw_bar() {\n this.$bar = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar, 'width', 0, this.width);\n\n if (this.invalid) {\n this.$bar.classList.add('bar-invalid');\n }\n }\n\n draw_progress_bar() {\n if (this.invalid) return;\n this.$bar_progress = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.progress_width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar-progress',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\n }\n\n draw_label() {\n createSVG('text', {\n x: this.x + this.width / 2,\n y: this.y + this.height / 2,\n innerHTML: this.task.name,\n class: 'bar-label',\n append_to: this.bar_group,\n });\n // labels get BBox in the next tick\n requestAnimationFrame(() => this.update_label_position());\n }\n\n draw_resize_handles() {\n if (this.invalid) return;\n\n const bar = this.$bar;\n const handle_width = 8;\n\n createSVG('rect', {\n x: bar.getX() + bar.getWidth() - 9,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle right',\n append_to: this.handle_group,\n });\n\n createSVG('rect', {\n x: bar.getX() + 1,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle left',\n append_to: this.handle_group,\n });\n\n if (this.task.progress && this.task.progress < 100) {\n this.$handle_progress = createSVG('polygon', {\n points: this.get_progress_polygon_points().join(','),\n class: 'handle progress',\n append_to: this.handle_group,\n });\n }\n }\n\n get_progress_polygon_points() {\n const bar_progress = this.$bar_progress;\n return [\n bar_progress.getEndX() - 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX() + 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX(),\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\n ];\n }\n\n bind() {\n if (this.invalid) return;\n this.setup_click_event();\n }\n\n setup_click_event() {\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.show_popup();\n this.gantt.unselect_all();\n this.group.classList.add('active');\n });\n\n $.on(this.group, 'dblclick', (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.gantt.trigger_event('click', [this.task]);\n });\n }\n\n show_popup() {\n if (this.gantt.bar_being_dragged) return;\n\n const start_date = date_utils.format(\n this.task._start,\n 'MMM D',\n this.gantt.options.language\n );\n const end_date = date_utils.format(\n date_utils.add(this.task._end, -1, 'second'),\n 'MMM D',\n this.gantt.options.language\n );\n const subtitle = start_date + ' - ' + end_date;\n\n this.gantt.show_popup({\n target_element: this.$bar,\n title: this.task.name,\n subtitle: subtitle,\n task: this.task,\n });\n }\n\n update_bar_position({ x = null, width = null }) {\n const bar = this.$bar;\n if (x) {\n // get all x values of parent task\n const xs = this.task.dependencies.map((dep) => {\n return this.gantt.get_bar(dep).$bar.getX();\n });\n // child task must not go before parent\n const valid_x = xs.reduce((prev, curr) => {\n return x >= curr;\n }, x);\n if (!valid_x) {\n width = null;\n return;\n }\n this.update_attr(bar, 'x', x);\n }\n if (width && width >= this.gantt.options.column_width) {\n this.update_attr(bar, 'width', width);\n }\n this.update_label_position();\n this.update_handle_position();\n this.update_progressbar_position();\n this.update_arrow_position();\n }\n\n date_changed() {\n let changed = false;\n const { new_start_date, new_end_date } = this.compute_start_end_date();\n\n if (Number(this.task._start) !== Number(new_start_date)) {\n changed = true;\n this.task._start = new_start_date;\n }\n\n if (Number(this.task._end) !== Number(new_end_date)) {\n changed = true;\n this.task._end = new_end_date;\n }\n\n if (!changed) return;\n\n this.gantt.trigger_event('date_change', [\n this.task,\n new_start_date,\n date_utils.add(new_end_date, -1, 'second'),\n ]);\n }\n\n progress_changed() {\n const new_progress = this.compute_progress();\n this.task.progress = new_progress;\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\n }\n\n set_action_completed() {\n this.action_completed = true;\n setTimeout(() => (this.action_completed = false), 1000);\n }\n\n compute_start_end_date() {\n const bar = this.$bar;\n const x_in_units = bar.getX() / this.gantt.options.column_width;\n const new_start_date = date_utils.add(\n this.gantt.gantt_start,\n x_in_units * this.gantt.options.step,\n 'hour'\n );\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\n const new_end_date = date_utils.add(\n new_start_date,\n width_in_units * this.gantt.options.step,\n 'hour'\n );\n\n return { new_start_date, new_end_date };\n }\n\n compute_progress() {\n const progress =\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\n return parseInt(progress, 10);\n }\n\n compute_x() {\n const { step, column_width } = this.gantt.options;\n const task_start = this.task._start;\n const gantt_start = this.gantt.gantt_start;\n\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\n let x = (diff / step) * column_width;\n\n if (this.gantt.view_is('Month')) {\n const diff = date_utils.diff(task_start, gantt_start, 'day');\n x = (diff * column_width) / 30;\n }\n return x;\n }\n\n compute_y() {\n return (\n this.gantt.options.header_height +\n this.gantt.options.padding +\n this.task._index * (this.height + this.gantt.options.padding)\n );\n }\n\n get_snap_position(dx) {\n let odx = dx,\n rem,\n position;\n\n if (this.gantt.view_is('Week')) {\n rem = dx % (this.gantt.options.column_width / 7);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 14\n ? 0\n : this.gantt.options.column_width / 7);\n } else if (this.gantt.view_is('Month')) {\n rem = dx % (this.gantt.options.column_width / 30);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 60\n ? 0\n : this.gantt.options.column_width / 30);\n } else {\n rem = dx % this.gantt.options.column_width;\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 2\n ? 0\n : this.gantt.options.column_width);\n }\n return position;\n }\n\n update_attr(element, attr, value) {\n value = +value;\n if (!isNaN(value)) {\n element.setAttribute(attr, value);\n }\n return element;\n }\n\n update_progressbar_position() {\n this.$bar_progress.setAttribute('x', this.$bar.getX());\n this.$bar_progress.setAttribute(\n 'width',\n this.$bar.getWidth() * (this.task.progress / 100)\n );\n }\n\n update_label_position() {\n const bar = this.$bar,\n label = this.group.querySelector('.bar-label');\n\n if (label.getBBox().width > bar.getWidth()) {\n label.classList.add('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\n } else {\n label.classList.remove('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\n }\n }\n\n update_handle_position() {\n const bar = this.$bar;\n this.handle_group\n .querySelector('.handle.left')\n .setAttribute('x', bar.getX() + 1);\n this.handle_group\n .querySelector('.handle.right')\n .setAttribute('x', bar.getEndX() - 9);\n const handle = this.group.querySelector('.handle.progress');\n handle &&\n handle.setAttribute('points', this.get_progress_polygon_points());\n }\n\n update_arrow_position() {\n this.arrows = this.arrows || [];\n for (let arrow of this.arrows) {\n arrow.update();\n }\n }\n}\n\nfunction isFunction(functionToCheck) {\n var getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import { createSVG } from './svg_utils';\n\nexport default class Arrow {\n constructor(gantt, from_task, to_task) {\n this.gantt = gantt;\n this.from_task = from_task;\n this.to_task = to_task;\n\n this.calculate_path();\n this.draw();\n }\n\n calculate_path() {\n let start_x =\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\n\n const condition = () =>\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\n\n while (condition()) {\n start_x -= 10;\n }\n\n const start_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.from_task.task._index +\n this.gantt.options.padding;\n\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\n const end_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height / 2 +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.to_task.task._index +\n this.gantt.options.padding;\n\n const from_is_below_to =\n this.from_task.task._index > this.to_task.task._index;\n const curve = this.gantt.options.arrow_curve;\n const clockwise = from_is_below_to ? 1 : 0;\n const curve_y = from_is_below_to ? -curve : curve;\n const offset = from_is_below_to\n ? end_y + this.gantt.options.arrow_curve\n : end_y - this.gantt.options.arrow_curve;\n\n this.path = `\n M ${start_x} ${start_y}\n V ${offset}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n\n if (\n this.to_task.$bar.getX() <\n this.from_task.$bar.getX() + this.gantt.options.padding\n ) {\n const down_1 = this.gantt.options.padding / 2 - curve;\n const down_2 =\n this.to_task.$bar.getY() +\n this.to_task.$bar.getHeight() / 2 -\n curve_y;\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\n\n this.path = `\n M ${start_x} ${start_y}\n v ${down_1}\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\n H ${left}\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\n V ${down_2}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n }\n }\n\n draw() {\n this.element = createSVG('path', {\n d: this.path,\n 'data-from': this.from_task.task.id,\n 'data-to': this.to_task.task.id,\n });\n }\n\n update() {\n this.calculate_path();\n this.element.setAttribute('d', this.path);\n }\n}\n","export default class Popup {\n constructor(parent, custom_html) {\n this.parent = parent;\n this.custom_html = custom_html;\n this.make();\n }\n\n make() {\n this.parent.innerHTML = `\n
\n
\n
\n `;\n\n this.hide();\n\n this.title = this.parent.querySelector('.title');\n this.subtitle = this.parent.querySelector('.subtitle');\n this.pointer = this.parent.querySelector('.pointer');\n }\n\n show(options) {\n if (!options.target_element) {\n throw new Error('target_element is required to show popup');\n }\n if (!options.position) {\n options.position = 'left';\n }\n const target_element = options.target_element;\n\n if (this.custom_html) {\n let html = this.custom_html(options.task);\n html += '
';\n this.parent.innerHTML = html;\n this.pointer = this.parent.querySelector('.pointer');\n } else {\n // set data\n this.title.innerHTML = options.title;\n this.subtitle.innerHTML = options.subtitle;\n this.parent.style.width = this.parent.clientWidth + 'px';\n }\n\n // set position\n let position_meta;\n if (target_element instanceof HTMLElement) {\n position_meta = target_element.getBoundingClientRect();\n } else if (target_element instanceof SVGElement) {\n position_meta = options.target_element.getBBox();\n }\n\n if (options.position === 'left') {\n this.parent.style.left =\n position_meta.x + (position_meta.width + 10) + 'px';\n this.parent.style.top = position_meta.y + 'px';\n\n this.pointer.style.transform = 'rotateZ(90deg)';\n this.pointer.style.left = '-7px';\n this.pointer.style.top = '2px';\n }\n\n // show\n this.parent.style.opacity = 1;\n }\n\n hide() {\n this.parent.style.opacity = 0;\n this.parent.style.left = 0;\n }\n}\n","import date_utils from './date_utils';\nimport { $, createSVG } from './svg_utils';\nimport Bar from './bar';\nimport Arrow from './arrow';\nimport Popup from './popup';\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) {\n this.setup_wrapper(wrapper);\n this.setup_options(options);\n this.setup_tasks(tasks);\n // initialize with default view mode\n this.change_view_mode();\n this.bind_events();\n }\n\n setup_wrapper(element) {\n let svg_element, 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 // wrapper element\n this.$container = document.createElement('div');\n this.$container.classList.add('gantt-container');\n\n const parent_element = this.$svg.parentElement;\n parent_element.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_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: 'en',\n };\n this.options = Object.assign({}, default_options, options);\n }\n\n setup_tasks(tasks) {\n // prepare tasks\n this.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 }\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 }\n\n render() {\n this.clear();\n this.setup_layers();\n this.make_grid();\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 setup_layers() {\n this.layers = {};\n const layers = ['grid', 'date', 'arrow', 'progress', 'bar', 'details'];\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 make_grid() {\n this.make_grid_background();\n this.make_grid_rows();\n this.make_grid_header();\n this.make_grid_ticks();\n this.make_grid_highlights();\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 + this.options.padding + 100,\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 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.grid,\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 (\n this.view_is(VIEW_MODE.MONTH) &&\n (date.getMonth() + 1) % 3 === 0\n ) {\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 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_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,GA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AAG;IACjB,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACxC,KAAK;AACL;IACA,IAAI,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE;IAC/B,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE;IACzC,YAAY,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1D,SAAS;IACT,KAAK;AACL;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 +{"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/index.js"],"sourcesContent":["const YEAR = 'year';\nconst MONTH = 'month';\nconst DAY = 'day';\nconst HOUR = 'hour';\nconst MINUTE = 'minute';\nconst SECOND = 'second';\nconst MILLISECOND = 'millisecond';\n\nexport default {\n parse(date, date_separator = '-', time_separator = /[.:]/) {\n if (date instanceof Date) {\n return date;\n }\n if (typeof date === 'string') {\n let date_parts, time_parts;\n const parts = date.split(' ');\n\n date_parts = parts[0]\n .split(date_separator)\n .map((val) => parseInt(val, 10));\n time_parts = parts[1] && parts[1].split(time_separator);\n\n // month is 0 indexed\n date_parts[1] = date_parts[1] - 1;\n\n let vals = date_parts;\n\n if (time_parts && time_parts.length) {\n if (time_parts.length == 4) {\n time_parts[3] = '0.' + time_parts[3];\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\n }\n vals = vals.concat(time_parts);\n }\n\n return new Date(...vals);\n }\n },\n\n to_string(date, with_time = false) {\n if (!(date instanceof Date)) {\n throw new TypeError('Invalid argument type');\n }\n const vals = this.get_date_values(date).map((val, i) => {\n if (i === 1) {\n // add 1 for month\n val = val + 1;\n }\n\n if (i === 6) {\n return padStart(val + '', 3, '0');\n }\n\n return padStart(val + '', 2, '0');\n });\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\n\n return date_string + (with_time ? ' ' + time_string : '');\n },\n\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'en') {\n const dateTimeFormat = new Intl.DateTimeFormat(lang, {\n month: 'long'\n });\n const month_name = dateTimeFormat.format(date);\n const month_name_capitalized =\n month_name.charAt(0).toUpperCase() + month_name.slice(1);\n\n const values = this.get_date_values(date).map(d => padStart(d, 2, 0));\n const format_map = {\n YYYY: values[0],\n MM: padStart(+values[1] + 1, 2, 0),\n DD: values[2],\n HH: values[3],\n mm: values[4],\n ss: values[5],\n SSS: values[6],\n D: values[2],\n MMMM: month_name_capitalized,\n MMM: month_name_capitalized,\n };\n\n let str = format_string;\n const formatted_values = [];\n\n Object.keys(format_map)\n .sort((a, b) => b.length - a.length) // big string first\n .forEach((key) => {\n if (str.includes(key)) {\n str = str.replace(key, `$${formatted_values.length}`);\n formatted_values.push(format_map[key]);\n }\n });\n\n formatted_values.forEach((value, i) => {\n str = str.replace(`$${i}`, value);\n });\n\n return str;\n },\n\n diff(date_a, date_b, scale = DAY) {\n let milliseconds, seconds, hours, minutes, days, months, years;\n\n milliseconds = date_a - date_b;\n seconds = milliseconds / 1000;\n minutes = seconds / 60;\n hours = minutes / 60;\n days = hours / 24;\n months = days / 30;\n years = months / 12;\n\n if (!scale.endsWith('s')) {\n scale += 's';\n }\n\n return Math.floor(\n {\n milliseconds,\n seconds,\n minutes,\n hours,\n days,\n months,\n years,\n }[scale]\n );\n },\n\n today() {\n const vals = this.get_date_values(new Date()).slice(0, 3);\n return new Date(...vals);\n },\n\n now() {\n return new Date();\n },\n\n add(date, qty, scale) {\n qty = parseInt(qty, 10);\n const vals = [\n date.getFullYear() + (scale === YEAR ? qty : 0),\n date.getMonth() + (scale === MONTH ? qty : 0),\n date.getDate() + (scale === DAY ? qty : 0),\n date.getHours() + (scale === HOUR ? qty : 0),\n date.getMinutes() + (scale === MINUTE ? qty : 0),\n date.getSeconds() + (scale === SECOND ? qty : 0),\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\n ];\n return new Date(...vals);\n },\n\n start_of(date, scale) {\n const scores = {\n [YEAR]: 6,\n [MONTH]: 5,\n [DAY]: 4,\n [HOUR]: 3,\n [MINUTE]: 2,\n [SECOND]: 1,\n [MILLISECOND]: 0,\n };\n\n function should_reset(_scale) {\n const max_score = scores[scale];\n return scores[_scale] <= max_score;\n }\n\n const vals = [\n date.getFullYear(),\n should_reset(YEAR) ? 0 : date.getMonth(),\n should_reset(MONTH) ? 1 : date.getDate(),\n should_reset(DAY) ? 0 : date.getHours(),\n should_reset(HOUR) ? 0 : date.getMinutes(),\n should_reset(MINUTE) ? 0 : date.getSeconds(),\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\n ];\n\n return new Date(...vals);\n },\n\n clone(date) {\n return new Date(...this.get_date_values(date));\n },\n\n get_date_values(date) {\n return [\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds(),\n ];\n },\n\n get_days_in_month(date) {\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n const month = date.getMonth();\n\n if (month !== 1) {\n return no_of_days[month];\n }\n\n // Feb\n const year = date.getFullYear();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n return 29;\n }\n return 28;\n },\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\nfunction padStart(str, targetLength, padString) {\n str = str + '';\n targetLength = targetLength >> 0;\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n }\n}\n","export function $(expr, con) {\n return typeof expr === 'string'\n ? (con || document).querySelector(expr)\n : expr || null;\n}\n\nexport function createSVG(tag, attrs) {\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\n for (let attr in attrs) {\n if (attr === 'append_to') {\n const parent = attrs.append_to;\n parent.appendChild(elem);\n } else if (attr === 'innerHTML') {\n elem.innerHTML = attrs.innerHTML;\n } else {\n elem.setAttribute(attr, attrs[attr]);\n }\n }\n return elem;\n}\n\nexport function animateSVG(svgElement, attr, from, to) {\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\n\n if (animatedSvgElement === svgElement) {\n // triggered 2nd time programmatically\n // trigger artificial click event\n const event = document.createEvent('HTMLEvents');\n event.initEvent('click', true, true);\n event.eventName = 'click';\n animatedSvgElement.dispatchEvent(event);\n }\n}\n\nfunction getAnimationElement(\n svgElement,\n attr,\n from,\n to,\n dur = '0.4s',\n begin = '0.1s'\n) {\n const animEl = svgElement.querySelector('animate');\n if (animEl) {\n $.attr(animEl, {\n attributeName: attr,\n from,\n to,\n dur,\n begin: 'click + ' + begin, // artificial click\n });\n return svgElement;\n }\n\n const animateElement = createSVG('animate', {\n attributeName: attr,\n from,\n to,\n dur,\n begin,\n calcMode: 'spline',\n values: from + ';' + to,\n keyTimes: '0; 1',\n keySplines: cubic_bezier('ease-out'),\n });\n svgElement.appendChild(animateElement);\n\n return svgElement;\n}\n\nfunction cubic_bezier(name) {\n return {\n ease: '.25 .1 .25 1',\n linear: '0 0 1 1',\n 'ease-in': '.42 0 1 1',\n 'ease-out': '0 0 .58 1',\n 'ease-in-out': '.42 0 .58 1',\n }[name];\n}\n\n$.on = (element, event, selector, callback) => {\n if (!callback) {\n callback = selector;\n $.bind(element, event, callback);\n } else {\n $.delegate(element, event, selector, callback);\n }\n};\n\n$.off = (element, event, handler) => {\n element.removeEventListener(event, handler);\n};\n\n$.bind = (element, event, callback) => {\n event.split(/\\s+/).forEach(function (event) {\n element.addEventListener(event, callback);\n });\n};\n\n$.delegate = (element, event, selector, callback) => {\n element.addEventListener(event, function (e) {\n const delegatedTarget = e.target.closest(selector);\n if (delegatedTarget) {\n e.delegatedTarget = delegatedTarget;\n callback.call(this, e, delegatedTarget);\n }\n });\n};\n\n$.closest = (selector, element) => {\n if (!element) return null;\n\n if (element.matches(selector)) {\n return element;\n }\n\n return $.closest(selector, element.parentNode);\n};\n\n$.attr = (element, attr, value) => {\n if (!value && typeof attr === 'string') {\n return element.getAttribute(attr);\n }\n\n if (typeof attr === 'object') {\n for (let key in attr) {\n $.attr(element, key, attr[key]);\n }\n return;\n }\n\n element.setAttribute(attr, value);\n};\n","import date_utils from './date_utils';\nimport { $, createSVG, animateSVG } from './svg_utils';\n\nexport default class Bar {\n constructor(gantt, task) {\n this.set_defaults(gantt, task);\n this.prepare();\n this.draw();\n this.bind();\n }\n\n set_defaults(gantt, task) {\n this.action_completed = false;\n this.gantt = gantt;\n this.task = task;\n }\n\n prepare() {\n this.prepare_values();\n this.prepare_helpers();\n }\n\n prepare_values() {\n this.invalid = this.task.invalid;\n this.height = this.gantt.options.bar_height;\n this.x = this.compute_x();\n this.y = this.compute_y();\n this.corner_radius = this.gantt.options.bar_corner_radius;\n this.duration =\n date_utils.diff(this.task._end, this.task._start, 'hour') /\n this.gantt.options.step;\n this.width = this.gantt.options.column_width * this.duration;\n this.progress_width =\n this.gantt.options.column_width *\n this.duration *\n (this.task.progress / 100) || 0;\n this.group = createSVG('g', {\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\n 'data-id': this.task.id,\n });\n this.bar_group = createSVG('g', {\n class: 'bar-group',\n append_to: this.group,\n });\n this.handle_group = createSVG('g', {\n class: 'handle-group',\n append_to: this.group,\n });\n }\n\n prepare_helpers() {\n SVGElement.prototype.getX = function () {\n return +this.getAttribute('x');\n };\n SVGElement.prototype.getY = function () {\n return +this.getAttribute('y');\n };\n SVGElement.prototype.getWidth = function () {\n return +this.getAttribute('width');\n };\n SVGElement.prototype.getHeight = function () {\n return +this.getAttribute('height');\n };\n SVGElement.prototype.getEndX = function () {\n return this.getX() + this.getWidth();\n };\n }\n\n draw() {\n this.draw_bar();\n this.draw_progress_bar();\n this.draw_label();\n this.draw_resize_handles();\n }\n\n draw_bar() {\n this.$bar = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar, 'width', 0, this.width);\n\n if (this.invalid) {\n this.$bar.classList.add('bar-invalid');\n }\n }\n\n draw_progress_bar() {\n if (this.invalid) return;\n this.$bar_progress = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.progress_width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar-progress',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\n }\n\n draw_label() {\n createSVG('text', {\n x: this.x + this.width / 2,\n y: this.y + this.height / 2,\n innerHTML: this.task.name,\n class: 'bar-label',\n append_to: this.bar_group,\n });\n // labels get BBox in the next tick\n requestAnimationFrame(() => this.update_label_position());\n }\n\n draw_resize_handles() {\n if (this.invalid) return;\n\n const bar = this.$bar;\n const handle_width = 8;\n\n createSVG('rect', {\n x: bar.getX() + bar.getWidth() - 9,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle right',\n append_to: this.handle_group,\n });\n\n createSVG('rect', {\n x: bar.getX() + 1,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle left',\n append_to: this.handle_group,\n });\n\n if (this.task.progress && this.task.progress < 100) {\n this.$handle_progress = createSVG('polygon', {\n points: this.get_progress_polygon_points().join(','),\n class: 'handle progress',\n append_to: this.handle_group,\n });\n }\n }\n\n get_progress_polygon_points() {\n const bar_progress = this.$bar_progress;\n return [\n bar_progress.getEndX() - 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX() + 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX(),\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\n ];\n }\n\n bind() {\n if (this.invalid) return;\n this.setup_click_event();\n }\n\n setup_click_event() {\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.show_popup();\n this.gantt.unselect_all();\n this.group.classList.add('active');\n });\n\n $.on(this.group, 'dblclick', (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.gantt.trigger_event('click', [this.task]);\n });\n }\n\n show_popup() {\n if (this.gantt.bar_being_dragged) return;\n\n const start_date = date_utils.format(\n this.task._start,\n 'MMM D',\n this.gantt.options.language\n );\n const end_date = date_utils.format(\n date_utils.add(this.task._end, -1, 'second'),\n 'MMM D',\n this.gantt.options.language\n );\n const subtitle = start_date + ' - ' + end_date;\n\n this.gantt.show_popup({\n target_element: this.$bar,\n title: this.task.name,\n subtitle: subtitle,\n task: this.task,\n });\n }\n\n update_bar_position({ x = null, width = null }) {\n const bar = this.$bar;\n if (x) {\n // get all x values of parent task\n const xs = this.task.dependencies.map((dep) => {\n return this.gantt.get_bar(dep).$bar.getX();\n });\n // child task must not go before parent\n const valid_x = xs.reduce((prev, curr) => {\n return x >= curr;\n }, x);\n if (!valid_x) {\n width = null;\n return;\n }\n this.update_attr(bar, 'x', x);\n }\n if (width && width >= this.gantt.options.column_width) {\n this.update_attr(bar, 'width', width);\n }\n this.update_label_position();\n this.update_handle_position();\n this.update_progressbar_position();\n this.update_arrow_position();\n }\n\n date_changed() {\n let changed = false;\n const { new_start_date, new_end_date } = this.compute_start_end_date();\n\n if (Number(this.task._start) !== Number(new_start_date)) {\n changed = true;\n this.task._start = new_start_date;\n }\n\n if (Number(this.task._end) !== Number(new_end_date)) {\n changed = true;\n this.task._end = new_end_date;\n }\n\n if (!changed) return;\n\n this.gantt.trigger_event('date_change', [\n this.task,\n new_start_date,\n date_utils.add(new_end_date, -1, 'second'),\n ]);\n }\n\n progress_changed() {\n const new_progress = this.compute_progress();\n this.task.progress = new_progress;\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\n }\n\n set_action_completed() {\n this.action_completed = true;\n setTimeout(() => (this.action_completed = false), 1000);\n }\n\n compute_start_end_date() {\n const bar = this.$bar;\n const x_in_units = bar.getX() / this.gantt.options.column_width;\n const new_start_date = date_utils.add(\n this.gantt.gantt_start,\n x_in_units * this.gantt.options.step,\n 'hour'\n );\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\n const new_end_date = date_utils.add(\n new_start_date,\n width_in_units * this.gantt.options.step,\n 'hour'\n );\n\n return { new_start_date, new_end_date };\n }\n\n compute_progress() {\n const progress =\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\n return parseInt(progress, 10);\n }\n\n compute_x() {\n const { step, column_width } = this.gantt.options;\n const task_start = this.task._start;\n const gantt_start = this.gantt.gantt_start;\n\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\n let x = (diff / step) * column_width;\n\n if (this.gantt.view_is('Month')) {\n const diff = date_utils.diff(task_start, gantt_start, 'day');\n x = (diff * column_width) / 30;\n }\n return x;\n }\n\n compute_y() {\n return (\n this.gantt.options.header_height +\n this.gantt.options.padding +\n this.task._index * (this.height + this.gantt.options.padding)\n );\n }\n\n get_snap_position(dx) {\n let odx = dx,\n rem,\n position;\n\n if (this.gantt.view_is('Week')) {\n rem = dx % (this.gantt.options.column_width / 7);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 14\n ? 0\n : this.gantt.options.column_width / 7);\n } else if (this.gantt.view_is('Month')) {\n rem = dx % (this.gantt.options.column_width / 30);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 60\n ? 0\n : this.gantt.options.column_width / 30);\n } else {\n rem = dx % this.gantt.options.column_width;\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 2\n ? 0\n : this.gantt.options.column_width);\n }\n return position;\n }\n\n update_attr(element, attr, value) {\n value = +value;\n if (!isNaN(value)) {\n element.setAttribute(attr, value);\n }\n return element;\n }\n\n update_progressbar_position() {\n if (this.invalid) return;\n this.$bar_progress.setAttribute('x', this.$bar.getX());\n this.$bar_progress.setAttribute(\n 'width',\n this.$bar.getWidth() * (this.task.progress / 100)\n );\n }\n\n update_label_position() {\n const bar = this.$bar,\n label = this.group.querySelector('.bar-label');\n\n if (label.getBBox().width > bar.getWidth()) {\n label.classList.add('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\n } else {\n label.classList.remove('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\n }\n }\n\n update_handle_position() {\n if (this.invalid) return;\n const bar = this.$bar;\n this.handle_group\n .querySelector('.handle.left')\n .setAttribute('x', bar.getX() + 1);\n this.handle_group\n .querySelector('.handle.right')\n .setAttribute('x', bar.getEndX() - 9);\n const handle = this.group.querySelector('.handle.progress');\n handle &&\n handle.setAttribute('points', this.get_progress_polygon_points());\n }\n\n update_arrow_position() {\n this.arrows = this.arrows || [];\n for (let arrow of this.arrows) {\n arrow.update();\n }\n }\n}\n\nfunction isFunction(functionToCheck) {\n var getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import { createSVG } from './svg_utils';\n\nexport default class Arrow {\n constructor(gantt, from_task, to_task) {\n this.gantt = gantt;\n this.from_task = from_task;\n this.to_task = to_task;\n\n this.calculate_path();\n this.draw();\n }\n\n calculate_path() {\n let start_x =\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\n\n const condition = () =>\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\n\n while (condition()) {\n start_x -= 10;\n }\n\n const start_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.from_task.task._index +\n this.gantt.options.padding;\n\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\n const end_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height / 2 +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.to_task.task._index +\n this.gantt.options.padding;\n\n const from_is_below_to =\n this.from_task.task._index > this.to_task.task._index;\n const curve = this.gantt.options.arrow_curve;\n const clockwise = from_is_below_to ? 1 : 0;\n const curve_y = from_is_below_to ? -curve : curve;\n const offset = from_is_below_to\n ? end_y + this.gantt.options.arrow_curve\n : end_y - this.gantt.options.arrow_curve;\n\n this.path = `\n M ${start_x} ${start_y}\n V ${offset}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n\n if (\n this.to_task.$bar.getX() <\n this.from_task.$bar.getX() + this.gantt.options.padding\n ) {\n const down_1 = this.gantt.options.padding / 2 - curve;\n const down_2 =\n this.to_task.$bar.getY() +\n this.to_task.$bar.getHeight() / 2 -\n curve_y;\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\n\n this.path = `\n M ${start_x} ${start_y}\n v ${down_1}\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\n H ${left}\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\n V ${down_2}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n }\n }\n\n draw() {\n this.element = createSVG('path', {\n d: this.path,\n 'data-from': this.from_task.task.id,\n 'data-to': this.to_task.task.id,\n });\n }\n\n update() {\n this.calculate_path();\n this.element.setAttribute('d', this.path);\n }\n}\n","export default class Popup {\n constructor(parent, custom_html) {\n this.parent = parent;\n this.custom_html = custom_html;\n this.make();\n }\n\n make() {\n this.parent.innerHTML = `\n
\n
\n
\n `;\n\n this.hide();\n\n this.title = this.parent.querySelector('.title');\n this.subtitle = this.parent.querySelector('.subtitle');\n this.pointer = this.parent.querySelector('.pointer');\n }\n\n show(options) {\n if (!options.target_element) {\n throw new Error('target_element is required to show popup');\n }\n if (!options.position) {\n options.position = 'left';\n }\n const target_element = options.target_element;\n\n if (this.custom_html) {\n let html = this.custom_html(options.task);\n html += '
';\n this.parent.innerHTML = html;\n this.pointer = this.parent.querySelector('.pointer');\n } else {\n // set data\n this.title.innerHTML = options.title;\n this.subtitle.innerHTML = options.subtitle;\n this.parent.style.width = this.parent.clientWidth + 'px';\n }\n\n // set position\n let position_meta;\n if (target_element instanceof HTMLElement) {\n position_meta = target_element.getBoundingClientRect();\n } else if (target_element instanceof SVGElement) {\n position_meta = options.target_element.getBBox();\n }\n\n if (options.position === 'left') {\n this.parent.style.left =\n position_meta.x + (position_meta.width + 10) + 'px';\n this.parent.style.top = position_meta.y + 'px';\n\n this.pointer.style.transform = 'rotateZ(90deg)';\n this.pointer.style.left = '-7px';\n this.pointer.style.top = '2px';\n }\n\n // show\n this.parent.style.opacity = 1;\n }\n\n hide() {\n this.parent.style.opacity = 0;\n this.parent.style.left = 0;\n }\n}\n","import date_utils from './date_utils';\nimport { $, createSVG } from './svg_utils';\nimport Bar from './bar';\nimport Arrow from './arrow';\nimport Popup from './popup';\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) {\n this.setup_wrapper(wrapper);\n this.setup_options(options);\n this.setup_tasks(tasks);\n // initialize with default view mode\n this.change_view_mode();\n this.bind_events();\n }\n\n setup_wrapper(element) {\n let svg_element, 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 // wrapper element\n this.$container = document.createElement('div');\n this.$container.classList.add('gantt-container');\n\n const parent_element = this.$svg.parentElement;\n parent_element.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_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: 'en',\n };\n this.options = Object.assign({}, default_options, options);\n }\n\n setup_tasks(tasks) {\n // prepare tasks\n this.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 }\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 }\n\n render() {\n this.clear();\n this.setup_layers();\n this.make_grid();\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 setup_layers() {\n this.layers = {};\n const layers = ['grid', 'date', 'arrow', 'progress', 'bar', 'details'];\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 make_grid() {\n this.make_grid_background();\n this.make_grid_rows();\n this.make_grid_header();\n this.make_grid_ticks();\n this.make_grid_highlights();\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 + this.options.padding + 100,\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 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.grid,\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 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_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,cAAc,CAAC;IACtC,iBAAiB,GAAG,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IACj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\ No newline at end of file diff --git a/dist/frappe-gantt.min.js b/dist/frappe-gantt.min.js index caff4798..b69a82a8 100644 --- a/dist/frappe-gantt.min.js +++ b/dist/frappe-gantt.min.js @@ -1,2 +1,2 @@ -var Gantt=function(){"use strict";const t="year",e="month",s="day",i="hour",n="minute",a="second",o="millisecond",r={en:["January","February","March","April","May","June","July","August","September","October","November","December"],es:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],ru:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],ptBr:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],fr:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],tr:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],zh:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]};var h={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),d(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="en"){const i=this.get_date_values(t).map((t=>d(t,2,0))),n={YYYY:i[0],MM:d(+i[1]+1,2,0),DD:i[2],HH:i[3],mm:i[4],ss:i[5],SSS:i[6],D:i[2],MMMM:r[s][+i[1]],MMM:r[s][+i[1]]};let a=e;const o=[];return Object.keys(n).sort(((t,e)=>e.length-t.length)).forEach((t=>{a.includes(t)&&(a=a.replace(t,`$${o.length}`),o.push(n[t]))})),o.forEach(((t,e)=>{a=a.replace(`$${e}`,t)})),a},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 _=[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(..._)},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 d(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 p(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function _(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 g(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 p.attr(o,{attributeName:e,from:s,to:i,dur:n,begin:"click + "+a}),t;const r=_("animate",{attributeName:e,from:s,to:i,dur:n,begin:a,calcMode:"spline",values:s+";"+i,keyTimes:"0; 1",keySplines:l("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 l(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]}p.on=(t,e,s,i)=>{i?p.delegate(t,e,s,i):(i=s,p.bind(t,e,i))},p.off=(t,e,s)=>{t.removeEventListener(e,s)},p.bind=(t,e,s)=>{e.split(/\s+/).forEach((function(e){t.addEventListener(e,s)}))},p.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))}))},p.closest=(t,e)=>e?e.matches(t)?e:p.closest(t,e.parentNode):null,p.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)p.attr(t,s,e[s])};class u{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=h.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=_("g",{class:"bar-wrapper "+(this.task.custom_class||""),"data-id":this.task.id}),this.bar_group=_("g",{class:"bar-group",append_to:this.group}),this.handle_group=_("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=_("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}),g(this.$bar,"width",0,this.width),this.invalid&&this.$bar.classList.add("bar-invalid")}draw_progress_bar(){this.invalid||(this.$bar_progress=_("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}),g(this.$bar_progress,"width",0,this.progress_width))}draw_label(){_("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;_("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}),_("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=_("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(){p.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"))})),p.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=h.format(this.task._start,"MMM D",this.gantt.options.language)+" - "+h.format(h.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})}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,h.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=h.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:h.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=h.diff(s,i,"hour")/t*e;if(this.gantt.view_is("Month")){n=h.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(){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}}const w={QUARTER_DAY:"Quarter Day",HALF_DAY:"Half Day",DAY:"Day",WEEK:"Week",MONTH:"Month",YEAR:"Year"};class f{constructor(t,e,s){this.setup_wrapper(t),this.setup_options(s),this.setup_tasks(e),this.change_view_mode(),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=_("svg",{append_to:s,class:"gantt"}),this.$container=document.createElement("div"),this.$container.classList.add("gantt-container");this.$svg.parentElement.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_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:"en"};this.options=Object.assign({},e,t)}setup_tasks(t){this.tasks=t.map(((t,e)=>{if(t._start=h.parse(t.start),t._end=h.parse(t.end),h.diff(t._end,t._start,"year")>10&&(t.end=null),t._index=e,!t.start&&!t.end){const e=h.today();t._start=e,t._end=h.add(e,2,"day")}!t.start&&t.end&&(t._start=h.add(t._end,-2,"day")),t.start&&!t.end&&(t._end=h.add(t._start,2,"day"));if(h.get_date_values(t._end).slice(3).every((t=>0===t))&&(t._end=h.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()}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=h.start_of(this.gantt_start,"day"),this.gantt_end=h.start_of(this.gantt_end,"day"),this.view_is([w.QUARTER_DAY,w.HALF_DAY])?(this.gantt_start=h.add(this.gantt_start,-7,"day"),this.gantt_end=h.add(this.gantt_end,7,"day")):this.view_is(w.MONTH)?(this.gantt_start=h.start_of(this.gantt_start,"year"),this.gantt_end=h.add(this.gantt_end,1,"year")):this.view_is(w.YEAR)?(this.gantt_start=h.add(this.gantt_start,-2,"year"),this.gantt_end=h.add(this.gantt_end,2,"year")):(this.gantt_start=h.add(this.gantt_start,-1,"month"),this.gantt_end=h.add(this.gantt_end,1,"month"))}setup_date_values(){this.dates=[];let t=null;for(;null===t||t=1&&i.getDate()<8&&(n+=" thick"),this.view_is(w.MONTH)&&(i.getMonth()+1)%3==0&&(n+=" thick"),_("path",{d:`M ${t} ${e} v ${s}`,class:n,append_to:this.layers.grid}),this.view_is(w.MONTH)?t+=h.get_days_in_month(i)*this.options.column_width/30:t+=this.options.column_width}}make_grid_highlights(){if(this.view_is(w.DAY)){_("rect",{x:h.diff(h.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(){for(let t of this.get_dates_to_draw())if(_("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=_("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=h.add(t,1,"year"));const i={"Quarter Day_lower":h.format(t,"HH",this.options.language),"Half Day_lower":h.format(t,"HH",this.options.language),Day_lower:t.getDate()!==e.getDate()?h.format(t,"D",this.options.language):"",Week_lower:t.getMonth()!==e.getMonth()?h.format(t,"D MMM",this.options.language):h.format(t,"D",this.options.language),Month_lower:h.format(t,"MMMM",this.options.language),Year_lower:h.format(t,"YYYY",this.options.language),"Quarter Day_upper":t.getDate()!==e.getDate()?h.format(t,"D MMM",this.options.language):"","Half Day_upper":t.getDate()!==e.getDate()?t.getMonth()!==e.getMonth()?h.format(t,"D MMM",this.options.language):h.format(t,"D",this.options.language):"",Day_upper:t.getMonth()!==e.getMonth()?h.format(t,"MMMM",this.options.language):"",Week_upper:t.getMonth()!==e.getMonth()?h.format(t,"MMMM",this.options.language):"",Month_upper:t.getFullYear()!==e.getFullYear()?h.format(t,"YYYY",this.options.language):"",Year_upper:t.getFullYear()!==e.getFullYear()?h.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 u(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{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,p.on(this.$svg,"mousedown",".bar-wrapper, .handle",((r,h)=>{const d=p.closest(".bar-wrapper",h);h.classList.contains("left")?i=!0:h.classList.contains("right")?n=!0:h.classList.contains("bar-wrapper")&&(t=!0),d.classList.add("active"),e=r.offsetX,s=r.offsetY,a=d.getAttribute("data-id");const _=[a,...this.get_all_dependent_tasks(a)];o=_.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}))})),p.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})),p.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;p.on(this.$svg,"mousedown",".handle.progress",((o,r)=>{s=!0,t=o.offsetX,e=o.offsetY;const h=p.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()})),p.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 m(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 f.VIEW_MODE=w,f}(); +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="en"){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 _=[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(..._)},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 _(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:g("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 g(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])};class l{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}),_(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}),_(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})}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 u{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}}const m={QUARTER_DAY:"Quarter Day",HALF_DAY:"Half Day",DAY:"Day",WEEK:"Week",MONTH:"Month",YEAR:"Year"};class w{constructor(t,e,s){this.setup_wrapper(t),this.setup_options(s),this.setup_tasks(e),this.change_view_mode(),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.$container=document.createElement("div"),this.$container.classList.add("gantt-container");this.$svg.parentElement.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_options(t){const e={header_height:50,column_width:30,step:24,view_modes:[...Object.values(m)],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:"en"};this.options=Object.assign({},e,t)}setup_tasks(t){this.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()}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===m.DAY?(this.options.step=24,this.options.column_width=38):t===m.HALF_DAY?(this.options.step=12,this.options.column_width=38):t===m.QUARTER_DAY?(this.options.step=6,this.options.column_width=38):t===m.WEEK?(this.options.step=168,this.options.column_width=140):t===m.MONTH?(this.options.step=720,this.options.column_width=120):t===m.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([m.QUARTER_DAY,m.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(m.MONTH)?(this.gantt_start=r.start_of(this.gantt_start,"year"),this.gantt_end=r.add(this.gantt_end,1,"year")):this.view_is(m.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||t=1&&i.getDate()<8&&(n+=" thick"),this.view_is(m.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(m.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(m.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(){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 l(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 u(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{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 _=[a,...this.get_all_dependent_tasks(a)];o=_.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(m.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 c(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 w.VIEW_MODE=m,w}(); //# sourceMappingURL=frappe-gantt.min.js.map diff --git a/dist/frappe-gantt.min.js.map b/dist/frappe-gantt.min.js.map index 99a27672..813050d5 100644 --- a/dist/frappe-gantt.min.js.map +++ b/dist/frappe-gantt.min.js.map @@ -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/index.js"],"sourcesContent":["const YEAR = 'year';\nconst MONTH = 'month';\nconst DAY = 'day';\nconst HOUR = 'hour';\nconst MINUTE = 'minute';\nconst SECOND = 'second';\nconst MILLISECOND = 'millisecond';\n\nconst month_names = {\n en: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n es: [\n 'Enero',\n 'Febrero',\n 'Marzo',\n 'Abril',\n 'Mayo',\n 'Junio',\n 'Julio',\n 'Agosto',\n 'Septiembre',\n 'Octubre',\n 'Noviembre',\n 'Diciembre',\n ],\n ru: [\n 'Январь',\n 'Февраль',\n 'Март',\n 'Апрель',\n 'Май',\n 'Июнь',\n 'Июль',\n 'Август',\n 'Сентябрь',\n 'Октябрь',\n 'Ноябрь',\n 'Декабрь',\n ],\n ptBr: [\n 'Janeiro',\n 'Fevereiro',\n 'Março',\n 'Abril',\n 'Maio',\n 'Junho',\n 'Julho',\n 'Agosto',\n 'Setembro',\n 'Outubro',\n 'Novembro',\n 'Dezembro',\n ],\n fr: [\n 'Janvier',\n 'Février',\n 'Mars',\n 'Avril',\n 'Mai',\n 'Juin',\n 'Juillet',\n 'Août',\n 'Septembre',\n 'Octobre',\n 'Novembre',\n 'Décembre',\n ],\n tr: [\n 'Ocak',\n 'Şubat',\n 'Mart',\n 'Nisan',\n 'Mayıs',\n 'Haziran',\n 'Temmuz',\n 'Ağustos',\n 'Eylül',\n 'Ekim',\n 'Kasım',\n 'Aralık',\n ],\n zh: [\n '一月',\n '二月',\n '三月',\n '四月',\n '五月',\n '六月',\n '七月',\n '八月',\n '九月',\n '十月',\n '十一月',\n '十二月',\n ],\n};\n\nexport default {\n parse(date, date_separator = '-', time_separator = /[.:]/) {\n if (date instanceof Date) {\n return date;\n }\n if (typeof date === 'string') {\n let date_parts, time_parts;\n const parts = date.split(' ');\n\n date_parts = parts[0]\n .split(date_separator)\n .map((val) => parseInt(val, 10));\n time_parts = parts[1] && parts[1].split(time_separator);\n\n // month is 0 indexed\n date_parts[1] = date_parts[1] - 1;\n\n let vals = date_parts;\n\n if (time_parts && time_parts.length) {\n if (time_parts.length == 4) {\n time_parts[3] = '0.' + time_parts[3];\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\n }\n vals = vals.concat(time_parts);\n }\n\n return new Date(...vals);\n }\n },\n\n to_string(date, with_time = false) {\n if (!(date instanceof Date)) {\n throw new TypeError('Invalid argument type');\n }\n const vals = this.get_date_values(date).map((val, i) => {\n if (i === 1) {\n // add 1 for month\n val = val + 1;\n }\n\n if (i === 6) {\n return padStart(val + '', 3, '0');\n }\n\n return padStart(val + '', 2, '0');\n });\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\n\n return date_string + (with_time ? ' ' + time_string : '');\n },\n\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'en') {\n const values = this.get_date_values(date).map((d) => padStart(d, 2, 0));\n const format_map = {\n YYYY: values[0],\n MM: padStart(+values[1] + 1, 2, 0),\n DD: values[2],\n HH: values[3],\n mm: values[4],\n ss: values[5],\n SSS: values[6],\n D: values[2],\n MMMM: month_names[lang][+values[1]],\n MMM: month_names[lang][+values[1]],\n };\n\n let str = format_string;\n const formatted_values = [];\n\n Object.keys(format_map)\n .sort((a, b) => b.length - a.length) // big string first\n .forEach((key) => {\n if (str.includes(key)) {\n str = str.replace(key, `$${formatted_values.length}`);\n formatted_values.push(format_map[key]);\n }\n });\n\n formatted_values.forEach((value, i) => {\n str = str.replace(`$${i}`, value);\n });\n\n return str;\n },\n\n diff(date_a, date_b, scale = DAY) {\n let milliseconds, seconds, hours, minutes, days, months, years;\n\n milliseconds = date_a - date_b;\n seconds = milliseconds / 1000;\n minutes = seconds / 60;\n hours = minutes / 60;\n days = hours / 24;\n months = days / 30;\n years = months / 12;\n\n if (!scale.endsWith('s')) {\n scale += 's';\n }\n\n return Math.floor(\n {\n milliseconds,\n seconds,\n minutes,\n hours,\n days,\n months,\n years,\n }[scale]\n );\n },\n\n today() {\n const vals = this.get_date_values(new Date()).slice(0, 3);\n return new Date(...vals);\n },\n\n now() {\n return new Date();\n },\n\n add(date, qty, scale) {\n qty = parseInt(qty, 10);\n const vals = [\n date.getFullYear() + (scale === YEAR ? qty : 0),\n date.getMonth() + (scale === MONTH ? qty : 0),\n date.getDate() + (scale === DAY ? qty : 0),\n date.getHours() + (scale === HOUR ? qty : 0),\n date.getMinutes() + (scale === MINUTE ? qty : 0),\n date.getSeconds() + (scale === SECOND ? qty : 0),\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\n ];\n return new Date(...vals);\n },\n\n start_of(date, scale) {\n const scores = {\n [YEAR]: 6,\n [MONTH]: 5,\n [DAY]: 4,\n [HOUR]: 3,\n [MINUTE]: 2,\n [SECOND]: 1,\n [MILLISECOND]: 0,\n };\n\n function should_reset(_scale) {\n const max_score = scores[scale];\n return scores[_scale] <= max_score;\n }\n\n const vals = [\n date.getFullYear(),\n should_reset(YEAR) ? 0 : date.getMonth(),\n should_reset(MONTH) ? 1 : date.getDate(),\n should_reset(DAY) ? 0 : date.getHours(),\n should_reset(HOUR) ? 0 : date.getMinutes(),\n should_reset(MINUTE) ? 0 : date.getSeconds(),\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\n ];\n\n return new Date(...vals);\n },\n\n clone(date) {\n return new Date(...this.get_date_values(date));\n },\n\n get_date_values(date) {\n return [\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds(),\n ];\n },\n\n get_days_in_month(date) {\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n const month = date.getMonth();\n\n if (month !== 1) {\n return no_of_days[month];\n }\n\n // Feb\n const year = date.getFullYear();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n return 29;\n }\n return 28;\n },\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\nfunction padStart(str, targetLength, padString) {\n str = str + '';\n targetLength = targetLength >> 0;\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n }\n}\n","export function $(expr, con) {\n return typeof expr === 'string'\n ? (con || document).querySelector(expr)\n : expr || null;\n}\n\nexport function createSVG(tag, attrs) {\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\n for (let attr in attrs) {\n if (attr === 'append_to') {\n const parent = attrs.append_to;\n parent.appendChild(elem);\n } else if (attr === 'innerHTML') {\n elem.innerHTML = attrs.innerHTML;\n } else {\n elem.setAttribute(attr, attrs[attr]);\n }\n }\n return elem;\n}\n\nexport function animateSVG(svgElement, attr, from, to) {\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\n\n if (animatedSvgElement === svgElement) {\n // triggered 2nd time programmatically\n // trigger artificial click event\n const event = document.createEvent('HTMLEvents');\n event.initEvent('click', true, true);\n event.eventName = 'click';\n animatedSvgElement.dispatchEvent(event);\n }\n}\n\nfunction getAnimationElement(\n svgElement,\n attr,\n from,\n to,\n dur = '0.4s',\n begin = '0.1s'\n) {\n const animEl = svgElement.querySelector('animate');\n if (animEl) {\n $.attr(animEl, {\n attributeName: attr,\n from,\n to,\n dur,\n begin: 'click + ' + begin, // artificial click\n });\n return svgElement;\n }\n\n const animateElement = createSVG('animate', {\n attributeName: attr,\n from,\n to,\n dur,\n begin,\n calcMode: 'spline',\n values: from + ';' + to,\n keyTimes: '0; 1',\n keySplines: cubic_bezier('ease-out'),\n });\n svgElement.appendChild(animateElement);\n\n return svgElement;\n}\n\nfunction cubic_bezier(name) {\n return {\n ease: '.25 .1 .25 1',\n linear: '0 0 1 1',\n 'ease-in': '.42 0 1 1',\n 'ease-out': '0 0 .58 1',\n 'ease-in-out': '.42 0 .58 1',\n }[name];\n}\n\n$.on = (element, event, selector, callback) => {\n if (!callback) {\n callback = selector;\n $.bind(element, event, callback);\n } else {\n $.delegate(element, event, selector, callback);\n }\n};\n\n$.off = (element, event, handler) => {\n element.removeEventListener(event, handler);\n};\n\n$.bind = (element, event, callback) => {\n event.split(/\\s+/).forEach(function (event) {\n element.addEventListener(event, callback);\n });\n};\n\n$.delegate = (element, event, selector, callback) => {\n element.addEventListener(event, function (e) {\n const delegatedTarget = e.target.closest(selector);\n if (delegatedTarget) {\n e.delegatedTarget = delegatedTarget;\n callback.call(this, e, delegatedTarget);\n }\n });\n};\n\n$.closest = (selector, element) => {\n if (!element) return null;\n\n if (element.matches(selector)) {\n return element;\n }\n\n return $.closest(selector, element.parentNode);\n};\n\n$.attr = (element, attr, value) => {\n if (!value && typeof attr === 'string') {\n return element.getAttribute(attr);\n }\n\n if (typeof attr === 'object') {\n for (let key in attr) {\n $.attr(element, key, attr[key]);\n }\n return;\n }\n\n element.setAttribute(attr, value);\n};\n","import date_utils from './date_utils';\nimport { $, createSVG, animateSVG } from './svg_utils';\n\nexport default class Bar {\n constructor(gantt, task) {\n this.set_defaults(gantt, task);\n this.prepare();\n this.draw();\n this.bind();\n }\n\n set_defaults(gantt, task) {\n this.action_completed = false;\n this.gantt = gantt;\n this.task = task;\n }\n\n prepare() {\n this.prepare_values();\n this.prepare_helpers();\n }\n\n prepare_values() {\n this.invalid = this.task.invalid;\n this.height = this.gantt.options.bar_height;\n this.x = this.compute_x();\n this.y = this.compute_y();\n this.corner_radius = this.gantt.options.bar_corner_radius;\n this.duration =\n date_utils.diff(this.task._end, this.task._start, 'hour') /\n this.gantt.options.step;\n this.width = this.gantt.options.column_width * this.duration;\n this.progress_width =\n this.gantt.options.column_width *\n this.duration *\n (this.task.progress / 100) || 0;\n this.group = createSVG('g', {\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\n 'data-id': this.task.id,\n });\n this.bar_group = createSVG('g', {\n class: 'bar-group',\n append_to: this.group,\n });\n this.handle_group = createSVG('g', {\n class: 'handle-group',\n append_to: this.group,\n });\n }\n\n prepare_helpers() {\n SVGElement.prototype.getX = function () {\n return +this.getAttribute('x');\n };\n SVGElement.prototype.getY = function () {\n return +this.getAttribute('y');\n };\n SVGElement.prototype.getWidth = function () {\n return +this.getAttribute('width');\n };\n SVGElement.prototype.getHeight = function () {\n return +this.getAttribute('height');\n };\n SVGElement.prototype.getEndX = function () {\n return this.getX() + this.getWidth();\n };\n }\n\n draw() {\n this.draw_bar();\n this.draw_progress_bar();\n this.draw_label();\n this.draw_resize_handles();\n }\n\n draw_bar() {\n this.$bar = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar, 'width', 0, this.width);\n\n if (this.invalid) {\n this.$bar.classList.add('bar-invalid');\n }\n }\n\n draw_progress_bar() {\n if (this.invalid) return;\n this.$bar_progress = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.progress_width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar-progress',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\n }\n\n draw_label() {\n createSVG('text', {\n x: this.x + this.width / 2,\n y: this.y + this.height / 2,\n innerHTML: this.task.name,\n class: 'bar-label',\n append_to: this.bar_group,\n });\n // labels get BBox in the next tick\n requestAnimationFrame(() => this.update_label_position());\n }\n\n draw_resize_handles() {\n if (this.invalid) return;\n\n const bar = this.$bar;\n const handle_width = 8;\n\n createSVG('rect', {\n x: bar.getX() + bar.getWidth() - 9,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle right',\n append_to: this.handle_group,\n });\n\n createSVG('rect', {\n x: bar.getX() + 1,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle left',\n append_to: this.handle_group,\n });\n\n if (this.task.progress && this.task.progress < 100) {\n this.$handle_progress = createSVG('polygon', {\n points: this.get_progress_polygon_points().join(','),\n class: 'handle progress',\n append_to: this.handle_group,\n });\n }\n }\n\n get_progress_polygon_points() {\n const bar_progress = this.$bar_progress;\n return [\n bar_progress.getEndX() - 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX() + 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX(),\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\n ];\n }\n\n bind() {\n if (this.invalid) return;\n this.setup_click_event();\n }\n\n setup_click_event() {\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.show_popup();\n this.gantt.unselect_all();\n this.group.classList.add('active');\n });\n\n $.on(this.group, 'dblclick', (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.gantt.trigger_event('click', [this.task]);\n });\n }\n\n show_popup() {\n if (this.gantt.bar_being_dragged) return;\n\n const start_date = date_utils.format(\n this.task._start,\n 'MMM D',\n this.gantt.options.language\n );\n const end_date = date_utils.format(\n date_utils.add(this.task._end, -1, 'second'),\n 'MMM D',\n this.gantt.options.language\n );\n const subtitle = start_date + ' - ' + end_date;\n\n this.gantt.show_popup({\n target_element: this.$bar,\n title: this.task.name,\n subtitle: subtitle,\n task: this.task,\n });\n }\n\n update_bar_position({ x = null, width = null }) {\n const bar = this.$bar;\n if (x) {\n // get all x values of parent task\n const xs = this.task.dependencies.map((dep) => {\n return this.gantt.get_bar(dep).$bar.getX();\n });\n // child task must not go before parent\n const valid_x = xs.reduce((prev, curr) => {\n return x >= curr;\n }, x);\n if (!valid_x) {\n width = null;\n return;\n }\n this.update_attr(bar, 'x', x);\n }\n if (width && width >= this.gantt.options.column_width) {\n this.update_attr(bar, 'width', width);\n }\n this.update_label_position();\n this.update_handle_position();\n this.update_progressbar_position();\n this.update_arrow_position();\n }\n\n date_changed() {\n let changed = false;\n const { new_start_date, new_end_date } = this.compute_start_end_date();\n\n if (Number(this.task._start) !== Number(new_start_date)) {\n changed = true;\n this.task._start = new_start_date;\n }\n\n if (Number(this.task._end) !== Number(new_end_date)) {\n changed = true;\n this.task._end = new_end_date;\n }\n\n if (!changed) return;\n\n this.gantt.trigger_event('date_change', [\n this.task,\n new_start_date,\n date_utils.add(new_end_date, -1, 'second'),\n ]);\n }\n\n progress_changed() {\n const new_progress = this.compute_progress();\n this.task.progress = new_progress;\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\n }\n\n set_action_completed() {\n this.action_completed = true;\n setTimeout(() => (this.action_completed = false), 1000);\n }\n\n compute_start_end_date() {\n const bar = this.$bar;\n const x_in_units = bar.getX() / this.gantt.options.column_width;\n const new_start_date = date_utils.add(\n this.gantt.gantt_start,\n x_in_units * this.gantt.options.step,\n 'hour'\n );\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\n const new_end_date = date_utils.add(\n new_start_date,\n width_in_units * this.gantt.options.step,\n 'hour'\n );\n\n return { new_start_date, new_end_date };\n }\n\n compute_progress() {\n const progress =\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\n return parseInt(progress, 10);\n }\n\n compute_x() {\n const { step, column_width } = this.gantt.options;\n const task_start = this.task._start;\n const gantt_start = this.gantt.gantt_start;\n\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\n let x = (diff / step) * column_width;\n\n if (this.gantt.view_is('Month')) {\n const diff = date_utils.diff(task_start, gantt_start, 'day');\n x = (diff * column_width) / 30;\n }\n return x;\n }\n\n compute_y() {\n return (\n this.gantt.options.header_height +\n this.gantt.options.padding +\n this.task._index * (this.height + this.gantt.options.padding)\n );\n }\n\n get_snap_position(dx) {\n let odx = dx,\n rem,\n position;\n\n if (this.gantt.view_is('Week')) {\n rem = dx % (this.gantt.options.column_width / 7);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 14\n ? 0\n : this.gantt.options.column_width / 7);\n } else if (this.gantt.view_is('Month')) {\n rem = dx % (this.gantt.options.column_width / 30);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 60\n ? 0\n : this.gantt.options.column_width / 30);\n } else {\n rem = dx % this.gantt.options.column_width;\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 2\n ? 0\n : this.gantt.options.column_width);\n }\n return position;\n }\n\n update_attr(element, attr, value) {\n value = +value;\n if (!isNaN(value)) {\n element.setAttribute(attr, value);\n }\n return element;\n }\n\n update_progressbar_position() {\n this.$bar_progress.setAttribute('x', this.$bar.getX());\n this.$bar_progress.setAttribute(\n 'width',\n this.$bar.getWidth() * (this.task.progress / 100)\n );\n }\n\n update_label_position() {\n const bar = this.$bar,\n label = this.group.querySelector('.bar-label');\n\n if (label.getBBox().width > bar.getWidth()) {\n label.classList.add('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\n } else {\n label.classList.remove('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\n }\n }\n\n update_handle_position() {\n const bar = this.$bar;\n this.handle_group\n .querySelector('.handle.left')\n .setAttribute('x', bar.getX() + 1);\n this.handle_group\n .querySelector('.handle.right')\n .setAttribute('x', bar.getEndX() - 9);\n const handle = this.group.querySelector('.handle.progress');\n handle &&\n handle.setAttribute('points', this.get_progress_polygon_points());\n }\n\n update_arrow_position() {\n this.arrows = this.arrows || [];\n for (let arrow of this.arrows) {\n arrow.update();\n }\n }\n}\n\nfunction isFunction(functionToCheck) {\n var getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import { createSVG } from './svg_utils';\n\nexport default class Arrow {\n constructor(gantt, from_task, to_task) {\n this.gantt = gantt;\n this.from_task = from_task;\n this.to_task = to_task;\n\n this.calculate_path();\n this.draw();\n }\n\n calculate_path() {\n let start_x =\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\n\n const condition = () =>\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\n\n while (condition()) {\n start_x -= 10;\n }\n\n const start_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.from_task.task._index +\n this.gantt.options.padding;\n\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\n const end_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height / 2 +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.to_task.task._index +\n this.gantt.options.padding;\n\n const from_is_below_to =\n this.from_task.task._index > this.to_task.task._index;\n const curve = this.gantt.options.arrow_curve;\n const clockwise = from_is_below_to ? 1 : 0;\n const curve_y = from_is_below_to ? -curve : curve;\n const offset = from_is_below_to\n ? end_y + this.gantt.options.arrow_curve\n : end_y - this.gantt.options.arrow_curve;\n\n this.path = `\n M ${start_x} ${start_y}\n V ${offset}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n\n if (\n this.to_task.$bar.getX() <\n this.from_task.$bar.getX() + this.gantt.options.padding\n ) {\n const down_1 = this.gantt.options.padding / 2 - curve;\n const down_2 =\n this.to_task.$bar.getY() +\n this.to_task.$bar.getHeight() / 2 -\n curve_y;\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\n\n this.path = `\n M ${start_x} ${start_y}\n v ${down_1}\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\n H ${left}\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\n V ${down_2}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n }\n }\n\n draw() {\n this.element = createSVG('path', {\n d: this.path,\n 'data-from': this.from_task.task.id,\n 'data-to': this.to_task.task.id,\n });\n }\n\n update() {\n this.calculate_path();\n this.element.setAttribute('d', this.path);\n }\n}\n","export default class Popup {\n constructor(parent, custom_html) {\n this.parent = parent;\n this.custom_html = custom_html;\n this.make();\n }\n\n make() {\n this.parent.innerHTML = `\n
\n
\n
\n `;\n\n this.hide();\n\n this.title = this.parent.querySelector('.title');\n this.subtitle = this.parent.querySelector('.subtitle');\n this.pointer = this.parent.querySelector('.pointer');\n }\n\n show(options) {\n if (!options.target_element) {\n throw new Error('target_element is required to show popup');\n }\n if (!options.position) {\n options.position = 'left';\n }\n const target_element = options.target_element;\n\n if (this.custom_html) {\n let html = this.custom_html(options.task);\n html += '
';\n this.parent.innerHTML = html;\n this.pointer = this.parent.querySelector('.pointer');\n } else {\n // set data\n this.title.innerHTML = options.title;\n this.subtitle.innerHTML = options.subtitle;\n this.parent.style.width = this.parent.clientWidth + 'px';\n }\n\n // set position\n let position_meta;\n if (target_element instanceof HTMLElement) {\n position_meta = target_element.getBoundingClientRect();\n } else if (target_element instanceof SVGElement) {\n position_meta = options.target_element.getBBox();\n }\n\n if (options.position === 'left') {\n this.parent.style.left =\n position_meta.x + (position_meta.width + 10) + 'px';\n this.parent.style.top = position_meta.y + 'px';\n\n this.pointer.style.transform = 'rotateZ(90deg)';\n this.pointer.style.left = '-7px';\n this.pointer.style.top = '2px';\n }\n\n // show\n this.parent.style.opacity = 1;\n }\n\n hide() {\n this.parent.style.opacity = 0;\n this.parent.style.left = 0;\n }\n}\n","import date_utils from './date_utils';\nimport { $, createSVG } from './svg_utils';\nimport Bar from './bar';\nimport Arrow from './arrow';\nimport Popup from './popup';\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) {\n this.setup_wrapper(wrapper);\n this.setup_options(options);\n this.setup_tasks(tasks);\n // initialize with default view mode\n this.change_view_mode();\n this.bind_events();\n }\n\n setup_wrapper(element) {\n let svg_element, 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 // wrapper element\n this.$container = document.createElement('div');\n this.$container.classList.add('gantt-container');\n\n const parent_element = this.$svg.parentElement;\n parent_element.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_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: 'en',\n };\n this.options = Object.assign({}, default_options, options);\n }\n\n setup_tasks(tasks) {\n // prepare tasks\n this.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 }\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 }\n\n render() {\n this.clear();\n this.setup_layers();\n this.make_grid();\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 setup_layers() {\n this.layers = {};\n const layers = ['grid', 'date', 'arrow', 'progress', 'bar', 'details'];\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 make_grid() {\n this.make_grid_background();\n this.make_grid_rows();\n this.make_grid_header();\n this.make_grid_ticks();\n this.make_grid_highlights();\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 + this.options.padding + 100,\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 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.grid,\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 (\n this.view_is(VIEW_MODE.MONTH) &&\n (date.getMonth() + 1) % 3 === 0\n ) {\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 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_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","month_names","en","es","ru","ptBr","fr","tr","zh","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","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","slice","now","add","qty","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","start_of","scores","should_reset","_scale","clone","get_days_in_month","no_of_days","month","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","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","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","style","clientWidth","position_meta","HTMLElement","getBoundingClientRect","top","transform","opacity","VIEW_MODE","QUARTER_DAY","HALF_DAY","WEEK","Gantt","wrapper","tasks","setup_wrapper","setup_options","setup_tasks","change_view_mode","bind_events","svg_element","wrapper_element","$svg","$container","createElement","parentElement","popup_wrapper","default_options","view_modes","view_mode","date_format","custom_popup_html","assign","start","end","every","deps","trim","filter","random","toString","generate_id","setup_dependencies","dependency_map","t","refresh","mode","update_view_scale","setup_dates","render","setup_gantt_dates","setup_date_values","gantt_end","dates","cur_date","bind_grid_click","bind_bar_events","clear","setup_layers","make_grid","make_dates","make_bars","make_arrows","map_arrows_on_bars","set_width","set_scroll_position","layers","layer","make_grid_background","make_grid_rows","make_grid_header","make_grid_ticks","make_grid_highlights","grid_width","grid_height","grid","rows_layer","lines_layer","row_width","row_height","row_y","x1","y1","x2","y2","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","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","get_task","Boolean","cur_width","actual_width","parent_element","scroll_pos","get_oldest_starting_date","scrollLeft","hide_popup","is_dragging","x_on_start","y_on_start","is_resizing_left","is_resizing_right","parent_bar_id","bar_wrapper","contains","offsetX","offsetY","ids","get_all_dependent_tasks","ox","oy","owidth","finaldx","bind_bar_progress","is_resizing","min_dx","max_dx","$handle","out","to_process","acc","querySelectorAll","el","modes","Array","isArray","some","find","popup","args","apply","prev_date"],"mappings":"kCAAA,MAAMA,EAAO,OACPC,EAAQ,QACRC,EAAM,MACNC,EAAO,OACPC,EAAS,SACTC,EAAS,SACTC,EAAc,cAEdC,EAAc,CAChBC,GAAI,CACA,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,YAEJC,GAAI,CACA,QACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,aACA,UACA,YACA,aAEJC,GAAI,CACA,SACA,UACA,OACA,SACA,MACA,OACA,OACA,SACA,WACA,UACA,SACA,WAEJC,KAAM,CACF,UACA,YACA,QACA,QACA,OACA,QACA,QACA,SACA,WACA,UACA,WACA,YAEJC,GAAI,CACA,UACA,UACA,OACA,QACA,MACA,OACA,UACA,OACA,YACA,UACA,WACA,YAEJC,GAAI,CACA,OACA,QACA,OACA,QACA,QACA,UACA,SACA,UACA,QACA,OACA,QACA,UAEJC,GAAI,CACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,QAIO,IAAAC,EAAA,CACXC,MAAMC,EAAMC,EAAiB,IAAKC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["../src/date_utils.js","../src/svg_utils.js","../src/bar.js","../src/arrow.js","../src/popup.js","../src/index.js"],"sourcesContent":["const YEAR = 'year';\nconst MONTH = 'month';\nconst DAY = 'day';\nconst HOUR = 'hour';\nconst MINUTE = 'minute';\nconst SECOND = 'second';\nconst MILLISECOND = 'millisecond';\n\nexport default {\n parse(date, date_separator = '-', time_separator = /[.:]/) {\n if (date instanceof Date) {\n return date;\n }\n if (typeof date === 'string') {\n let date_parts, time_parts;\n const parts = date.split(' ');\n\n date_parts = parts[0]\n .split(date_separator)\n .map((val) => parseInt(val, 10));\n time_parts = parts[1] && parts[1].split(time_separator);\n\n // month is 0 indexed\n date_parts[1] = date_parts[1] - 1;\n\n let vals = date_parts;\n\n if (time_parts && time_parts.length) {\n if (time_parts.length == 4) {\n time_parts[3] = '0.' + time_parts[3];\n time_parts[3] = parseFloat(time_parts[3]) * 1000;\n }\n vals = vals.concat(time_parts);\n }\n\n return new Date(...vals);\n }\n },\n\n to_string(date, with_time = false) {\n if (!(date instanceof Date)) {\n throw new TypeError('Invalid argument type');\n }\n const vals = this.get_date_values(date).map((val, i) => {\n if (i === 1) {\n // add 1 for month\n val = val + 1;\n }\n\n if (i === 6) {\n return padStart(val + '', 3, '0');\n }\n\n return padStart(val + '', 2, '0');\n });\n const date_string = `${vals[0]}-${vals[1]}-${vals[2]}`;\n const time_string = `${vals[3]}:${vals[4]}:${vals[5]}.${vals[6]}`;\n\n return date_string + (with_time ? ' ' + time_string : '');\n },\n\n format(date, format_string = 'YYYY-MM-DD HH:mm:ss.SSS', lang = 'en') {\n const dateTimeFormat = new Intl.DateTimeFormat(lang, {\n month: 'long'\n });\n const month_name = dateTimeFormat.format(date);\n const month_name_capitalized =\n month_name.charAt(0).toUpperCase() + month_name.slice(1);\n\n const values = this.get_date_values(date).map(d => padStart(d, 2, 0));\n const format_map = {\n YYYY: values[0],\n MM: padStart(+values[1] + 1, 2, 0),\n DD: values[2],\n HH: values[3],\n mm: values[4],\n ss: values[5],\n SSS: values[6],\n D: values[2],\n MMMM: month_name_capitalized,\n MMM: month_name_capitalized,\n };\n\n let str = format_string;\n const formatted_values = [];\n\n Object.keys(format_map)\n .sort((a, b) => b.length - a.length) // big string first\n .forEach((key) => {\n if (str.includes(key)) {\n str = str.replace(key, `$${formatted_values.length}`);\n formatted_values.push(format_map[key]);\n }\n });\n\n formatted_values.forEach((value, i) => {\n str = str.replace(`$${i}`, value);\n });\n\n return str;\n },\n\n diff(date_a, date_b, scale = DAY) {\n let milliseconds, seconds, hours, minutes, days, months, years;\n\n milliseconds = date_a - date_b;\n seconds = milliseconds / 1000;\n minutes = seconds / 60;\n hours = minutes / 60;\n days = hours / 24;\n months = days / 30;\n years = months / 12;\n\n if (!scale.endsWith('s')) {\n scale += 's';\n }\n\n return Math.floor(\n {\n milliseconds,\n seconds,\n minutes,\n hours,\n days,\n months,\n years,\n }[scale]\n );\n },\n\n today() {\n const vals = this.get_date_values(new Date()).slice(0, 3);\n return new Date(...vals);\n },\n\n now() {\n return new Date();\n },\n\n add(date, qty, scale) {\n qty = parseInt(qty, 10);\n const vals = [\n date.getFullYear() + (scale === YEAR ? qty : 0),\n date.getMonth() + (scale === MONTH ? qty : 0),\n date.getDate() + (scale === DAY ? qty : 0),\n date.getHours() + (scale === HOUR ? qty : 0),\n date.getMinutes() + (scale === MINUTE ? qty : 0),\n date.getSeconds() + (scale === SECOND ? qty : 0),\n date.getMilliseconds() + (scale === MILLISECOND ? qty : 0),\n ];\n return new Date(...vals);\n },\n\n start_of(date, scale) {\n const scores = {\n [YEAR]: 6,\n [MONTH]: 5,\n [DAY]: 4,\n [HOUR]: 3,\n [MINUTE]: 2,\n [SECOND]: 1,\n [MILLISECOND]: 0,\n };\n\n function should_reset(_scale) {\n const max_score = scores[scale];\n return scores[_scale] <= max_score;\n }\n\n const vals = [\n date.getFullYear(),\n should_reset(YEAR) ? 0 : date.getMonth(),\n should_reset(MONTH) ? 1 : date.getDate(),\n should_reset(DAY) ? 0 : date.getHours(),\n should_reset(HOUR) ? 0 : date.getMinutes(),\n should_reset(MINUTE) ? 0 : date.getSeconds(),\n should_reset(SECOND) ? 0 : date.getMilliseconds(),\n ];\n\n return new Date(...vals);\n },\n\n clone(date) {\n return new Date(...this.get_date_values(date));\n },\n\n get_date_values(date) {\n return [\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds(),\n ];\n },\n\n get_days_in_month(date) {\n const no_of_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n const month = date.getMonth();\n\n if (month !== 1) {\n return no_of_days[month];\n }\n\n // Feb\n const year = date.getFullYear();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n return 29;\n }\n return 28;\n },\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart\nfunction padStart(str, targetLength, padString) {\n str = str + '';\n targetLength = targetLength >> 0;\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + String(str);\n }\n}\n","export function $(expr, con) {\n return typeof expr === 'string'\n ? (con || document).querySelector(expr)\n : expr || null;\n}\n\nexport function createSVG(tag, attrs) {\n const elem = document.createElementNS('http://www.w3.org/2000/svg', tag);\n for (let attr in attrs) {\n if (attr === 'append_to') {\n const parent = attrs.append_to;\n parent.appendChild(elem);\n } else if (attr === 'innerHTML') {\n elem.innerHTML = attrs.innerHTML;\n } else {\n elem.setAttribute(attr, attrs[attr]);\n }\n }\n return elem;\n}\n\nexport function animateSVG(svgElement, attr, from, to) {\n const animatedSvgElement = getAnimationElement(svgElement, attr, from, to);\n\n if (animatedSvgElement === svgElement) {\n // triggered 2nd time programmatically\n // trigger artificial click event\n const event = document.createEvent('HTMLEvents');\n event.initEvent('click', true, true);\n event.eventName = 'click';\n animatedSvgElement.dispatchEvent(event);\n }\n}\n\nfunction getAnimationElement(\n svgElement,\n attr,\n from,\n to,\n dur = '0.4s',\n begin = '0.1s'\n) {\n const animEl = svgElement.querySelector('animate');\n if (animEl) {\n $.attr(animEl, {\n attributeName: attr,\n from,\n to,\n dur,\n begin: 'click + ' + begin, // artificial click\n });\n return svgElement;\n }\n\n const animateElement = createSVG('animate', {\n attributeName: attr,\n from,\n to,\n dur,\n begin,\n calcMode: 'spline',\n values: from + ';' + to,\n keyTimes: '0; 1',\n keySplines: cubic_bezier('ease-out'),\n });\n svgElement.appendChild(animateElement);\n\n return svgElement;\n}\n\nfunction cubic_bezier(name) {\n return {\n ease: '.25 .1 .25 1',\n linear: '0 0 1 1',\n 'ease-in': '.42 0 1 1',\n 'ease-out': '0 0 .58 1',\n 'ease-in-out': '.42 0 .58 1',\n }[name];\n}\n\n$.on = (element, event, selector, callback) => {\n if (!callback) {\n callback = selector;\n $.bind(element, event, callback);\n } else {\n $.delegate(element, event, selector, callback);\n }\n};\n\n$.off = (element, event, handler) => {\n element.removeEventListener(event, handler);\n};\n\n$.bind = (element, event, callback) => {\n event.split(/\\s+/).forEach(function (event) {\n element.addEventListener(event, callback);\n });\n};\n\n$.delegate = (element, event, selector, callback) => {\n element.addEventListener(event, function (e) {\n const delegatedTarget = e.target.closest(selector);\n if (delegatedTarget) {\n e.delegatedTarget = delegatedTarget;\n callback.call(this, e, delegatedTarget);\n }\n });\n};\n\n$.closest = (selector, element) => {\n if (!element) return null;\n\n if (element.matches(selector)) {\n return element;\n }\n\n return $.closest(selector, element.parentNode);\n};\n\n$.attr = (element, attr, value) => {\n if (!value && typeof attr === 'string') {\n return element.getAttribute(attr);\n }\n\n if (typeof attr === 'object') {\n for (let key in attr) {\n $.attr(element, key, attr[key]);\n }\n return;\n }\n\n element.setAttribute(attr, value);\n};\n","import date_utils from './date_utils';\nimport { $, createSVG, animateSVG } from './svg_utils';\n\nexport default class Bar {\n constructor(gantt, task) {\n this.set_defaults(gantt, task);\n this.prepare();\n this.draw();\n this.bind();\n }\n\n set_defaults(gantt, task) {\n this.action_completed = false;\n this.gantt = gantt;\n this.task = task;\n }\n\n prepare() {\n this.prepare_values();\n this.prepare_helpers();\n }\n\n prepare_values() {\n this.invalid = this.task.invalid;\n this.height = this.gantt.options.bar_height;\n this.x = this.compute_x();\n this.y = this.compute_y();\n this.corner_radius = this.gantt.options.bar_corner_radius;\n this.duration =\n date_utils.diff(this.task._end, this.task._start, 'hour') /\n this.gantt.options.step;\n this.width = this.gantt.options.column_width * this.duration;\n this.progress_width =\n this.gantt.options.column_width *\n this.duration *\n (this.task.progress / 100) || 0;\n this.group = createSVG('g', {\n class: 'bar-wrapper ' + (this.task.custom_class || ''),\n 'data-id': this.task.id,\n });\n this.bar_group = createSVG('g', {\n class: 'bar-group',\n append_to: this.group,\n });\n this.handle_group = createSVG('g', {\n class: 'handle-group',\n append_to: this.group,\n });\n }\n\n prepare_helpers() {\n SVGElement.prototype.getX = function () {\n return +this.getAttribute('x');\n };\n SVGElement.prototype.getY = function () {\n return +this.getAttribute('y');\n };\n SVGElement.prototype.getWidth = function () {\n return +this.getAttribute('width');\n };\n SVGElement.prototype.getHeight = function () {\n return +this.getAttribute('height');\n };\n SVGElement.prototype.getEndX = function () {\n return this.getX() + this.getWidth();\n };\n }\n\n draw() {\n this.draw_bar();\n this.draw_progress_bar();\n this.draw_label();\n this.draw_resize_handles();\n }\n\n draw_bar() {\n this.$bar = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar, 'width', 0, this.width);\n\n if (this.invalid) {\n this.$bar.classList.add('bar-invalid');\n }\n }\n\n draw_progress_bar() {\n if (this.invalid) return;\n this.$bar_progress = createSVG('rect', {\n x: this.x,\n y: this.y,\n width: this.progress_width,\n height: this.height,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'bar-progress',\n append_to: this.bar_group,\n });\n\n animateSVG(this.$bar_progress, 'width', 0, this.progress_width);\n }\n\n draw_label() {\n createSVG('text', {\n x: this.x + this.width / 2,\n y: this.y + this.height / 2,\n innerHTML: this.task.name,\n class: 'bar-label',\n append_to: this.bar_group,\n });\n // labels get BBox in the next tick\n requestAnimationFrame(() => this.update_label_position());\n }\n\n draw_resize_handles() {\n if (this.invalid) return;\n\n const bar = this.$bar;\n const handle_width = 8;\n\n createSVG('rect', {\n x: bar.getX() + bar.getWidth() - 9,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle right',\n append_to: this.handle_group,\n });\n\n createSVG('rect', {\n x: bar.getX() + 1,\n y: bar.getY() + 1,\n width: handle_width,\n height: this.height - 2,\n rx: this.corner_radius,\n ry: this.corner_radius,\n class: 'handle left',\n append_to: this.handle_group,\n });\n\n if (this.task.progress && this.task.progress < 100) {\n this.$handle_progress = createSVG('polygon', {\n points: this.get_progress_polygon_points().join(','),\n class: 'handle progress',\n append_to: this.handle_group,\n });\n }\n }\n\n get_progress_polygon_points() {\n const bar_progress = this.$bar_progress;\n return [\n bar_progress.getEndX() - 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX() + 5,\n bar_progress.getY() + bar_progress.getHeight(),\n bar_progress.getEndX(),\n bar_progress.getY() + bar_progress.getHeight() - 8.66,\n ];\n }\n\n bind() {\n if (this.invalid) return;\n this.setup_click_event();\n }\n\n setup_click_event() {\n $.on(this.group, 'focus ' + this.gantt.options.popup_trigger, (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.show_popup();\n this.gantt.unselect_all();\n this.group.classList.add('active');\n });\n\n $.on(this.group, 'dblclick', (e) => {\n if (this.action_completed) {\n // just finished a move action, wait for a few seconds\n return;\n }\n\n this.gantt.trigger_event('click', [this.task]);\n });\n }\n\n show_popup() {\n if (this.gantt.bar_being_dragged) return;\n\n const start_date = date_utils.format(\n this.task._start,\n 'MMM D',\n this.gantt.options.language\n );\n const end_date = date_utils.format(\n date_utils.add(this.task._end, -1, 'second'),\n 'MMM D',\n this.gantt.options.language\n );\n const subtitle = start_date + ' - ' + end_date;\n\n this.gantt.show_popup({\n target_element: this.$bar,\n title: this.task.name,\n subtitle: subtitle,\n task: this.task,\n });\n }\n\n update_bar_position({ x = null, width = null }) {\n const bar = this.$bar;\n if (x) {\n // get all x values of parent task\n const xs = this.task.dependencies.map((dep) => {\n return this.gantt.get_bar(dep).$bar.getX();\n });\n // child task must not go before parent\n const valid_x = xs.reduce((prev, curr) => {\n return x >= curr;\n }, x);\n if (!valid_x) {\n width = null;\n return;\n }\n this.update_attr(bar, 'x', x);\n }\n if (width && width >= this.gantt.options.column_width) {\n this.update_attr(bar, 'width', width);\n }\n this.update_label_position();\n this.update_handle_position();\n this.update_progressbar_position();\n this.update_arrow_position();\n }\n\n date_changed() {\n let changed = false;\n const { new_start_date, new_end_date } = this.compute_start_end_date();\n\n if (Number(this.task._start) !== Number(new_start_date)) {\n changed = true;\n this.task._start = new_start_date;\n }\n\n if (Number(this.task._end) !== Number(new_end_date)) {\n changed = true;\n this.task._end = new_end_date;\n }\n\n if (!changed) return;\n\n this.gantt.trigger_event('date_change', [\n this.task,\n new_start_date,\n date_utils.add(new_end_date, -1, 'second'),\n ]);\n }\n\n progress_changed() {\n const new_progress = this.compute_progress();\n this.task.progress = new_progress;\n this.gantt.trigger_event('progress_change', [this.task, new_progress]);\n }\n\n set_action_completed() {\n this.action_completed = true;\n setTimeout(() => (this.action_completed = false), 1000);\n }\n\n compute_start_end_date() {\n const bar = this.$bar;\n const x_in_units = bar.getX() / this.gantt.options.column_width;\n const new_start_date = date_utils.add(\n this.gantt.gantt_start,\n x_in_units * this.gantt.options.step,\n 'hour'\n );\n const width_in_units = bar.getWidth() / this.gantt.options.column_width;\n const new_end_date = date_utils.add(\n new_start_date,\n width_in_units * this.gantt.options.step,\n 'hour'\n );\n\n return { new_start_date, new_end_date };\n }\n\n compute_progress() {\n const progress =\n (this.$bar_progress.getWidth() / this.$bar.getWidth()) * 100;\n return parseInt(progress, 10);\n }\n\n compute_x() {\n const { step, column_width } = this.gantt.options;\n const task_start = this.task._start;\n const gantt_start = this.gantt.gantt_start;\n\n const diff = date_utils.diff(task_start, gantt_start, 'hour');\n let x = (diff / step) * column_width;\n\n if (this.gantt.view_is('Month')) {\n const diff = date_utils.diff(task_start, gantt_start, 'day');\n x = (diff * column_width) / 30;\n }\n return x;\n }\n\n compute_y() {\n return (\n this.gantt.options.header_height +\n this.gantt.options.padding +\n this.task._index * (this.height + this.gantt.options.padding)\n );\n }\n\n get_snap_position(dx) {\n let odx = dx,\n rem,\n position;\n\n if (this.gantt.view_is('Week')) {\n rem = dx % (this.gantt.options.column_width / 7);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 14\n ? 0\n : this.gantt.options.column_width / 7);\n } else if (this.gantt.view_is('Month')) {\n rem = dx % (this.gantt.options.column_width / 30);\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 60\n ? 0\n : this.gantt.options.column_width / 30);\n } else {\n rem = dx % this.gantt.options.column_width;\n position =\n odx -\n rem +\n (rem < this.gantt.options.column_width / 2\n ? 0\n : this.gantt.options.column_width);\n }\n return position;\n }\n\n update_attr(element, attr, value) {\n value = +value;\n if (!isNaN(value)) {\n element.setAttribute(attr, value);\n }\n return element;\n }\n\n update_progressbar_position() {\n if (this.invalid) return;\n this.$bar_progress.setAttribute('x', this.$bar.getX());\n this.$bar_progress.setAttribute(\n 'width',\n this.$bar.getWidth() * (this.task.progress / 100)\n );\n }\n\n update_label_position() {\n const bar = this.$bar,\n label = this.group.querySelector('.bar-label');\n\n if (label.getBBox().width > bar.getWidth()) {\n label.classList.add('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() + 5);\n } else {\n label.classList.remove('big');\n label.setAttribute('x', bar.getX() + bar.getWidth() / 2);\n }\n }\n\n update_handle_position() {\n if (this.invalid) return;\n const bar = this.$bar;\n this.handle_group\n .querySelector('.handle.left')\n .setAttribute('x', bar.getX() + 1);\n this.handle_group\n .querySelector('.handle.right')\n .setAttribute('x', bar.getEndX() - 9);\n const handle = this.group.querySelector('.handle.progress');\n handle &&\n handle.setAttribute('points', this.get_progress_polygon_points());\n }\n\n update_arrow_position() {\n this.arrows = this.arrows || [];\n for (let arrow of this.arrows) {\n arrow.update();\n }\n }\n}\n\nfunction isFunction(functionToCheck) {\n var getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","import { createSVG } from './svg_utils';\n\nexport default class Arrow {\n constructor(gantt, from_task, to_task) {\n this.gantt = gantt;\n this.from_task = from_task;\n this.to_task = to_task;\n\n this.calculate_path();\n this.draw();\n }\n\n calculate_path() {\n let start_x =\n this.from_task.$bar.getX() + this.from_task.$bar.getWidth() / 2;\n\n const condition = () =>\n this.to_task.$bar.getX() < start_x + this.gantt.options.padding &&\n start_x > this.from_task.$bar.getX() + this.gantt.options.padding;\n\n while (condition()) {\n start_x -= 10;\n }\n\n const start_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.from_task.task._index +\n this.gantt.options.padding;\n\n const end_x = this.to_task.$bar.getX() - this.gantt.options.padding / 2;\n const end_y =\n this.gantt.options.header_height +\n this.gantt.options.bar_height / 2 +\n (this.gantt.options.padding + this.gantt.options.bar_height) *\n this.to_task.task._index +\n this.gantt.options.padding;\n\n const from_is_below_to =\n this.from_task.task._index > this.to_task.task._index;\n const curve = this.gantt.options.arrow_curve;\n const clockwise = from_is_below_to ? 1 : 0;\n const curve_y = from_is_below_to ? -curve : curve;\n const offset = from_is_below_to\n ? end_y + this.gantt.options.arrow_curve\n : end_y - this.gantt.options.arrow_curve;\n\n this.path = `\n M ${start_x} ${start_y}\n V ${offset}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n\n if (\n this.to_task.$bar.getX() <\n this.from_task.$bar.getX() + this.gantt.options.padding\n ) {\n const down_1 = this.gantt.options.padding / 2 - curve;\n const down_2 =\n this.to_task.$bar.getY() +\n this.to_task.$bar.getHeight() / 2 -\n curve_y;\n const left = this.to_task.$bar.getX() - this.gantt.options.padding;\n\n this.path = `\n M ${start_x} ${start_y}\n v ${down_1}\n a ${curve} ${curve} 0 0 1 -${curve} ${curve}\n H ${left}\n a ${curve} ${curve} 0 0 ${clockwise} -${curve} ${curve_y}\n V ${down_2}\n a ${curve} ${curve} 0 0 ${clockwise} ${curve} ${curve_y}\n L ${end_x} ${end_y}\n m -5 -5\n l 5 5\n l -5 5`;\n }\n }\n\n draw() {\n this.element = createSVG('path', {\n d: this.path,\n 'data-from': this.from_task.task.id,\n 'data-to': this.to_task.task.id,\n });\n }\n\n update() {\n this.calculate_path();\n this.element.setAttribute('d', this.path);\n }\n}\n","export default class Popup {\n constructor(parent, custom_html) {\n this.parent = parent;\n this.custom_html = custom_html;\n this.make();\n }\n\n make() {\n this.parent.innerHTML = `\n
\n
\n
\n `;\n\n this.hide();\n\n this.title = this.parent.querySelector('.title');\n this.subtitle = this.parent.querySelector('.subtitle');\n this.pointer = this.parent.querySelector('.pointer');\n }\n\n show(options) {\n if (!options.target_element) {\n throw new Error('target_element is required to show popup');\n }\n if (!options.position) {\n options.position = 'left';\n }\n const target_element = options.target_element;\n\n if (this.custom_html) {\n let html = this.custom_html(options.task);\n html += '
';\n this.parent.innerHTML = html;\n this.pointer = this.parent.querySelector('.pointer');\n } else {\n // set data\n this.title.innerHTML = options.title;\n this.subtitle.innerHTML = options.subtitle;\n this.parent.style.width = this.parent.clientWidth + 'px';\n }\n\n // set position\n let position_meta;\n if (target_element instanceof HTMLElement) {\n position_meta = target_element.getBoundingClientRect();\n } else if (target_element instanceof SVGElement) {\n position_meta = options.target_element.getBBox();\n }\n\n if (options.position === 'left') {\n this.parent.style.left =\n position_meta.x + (position_meta.width + 10) + 'px';\n this.parent.style.top = position_meta.y + 'px';\n\n this.pointer.style.transform = 'rotateZ(90deg)';\n this.pointer.style.left = '-7px';\n this.pointer.style.top = '2px';\n }\n\n // show\n this.parent.style.opacity = 1;\n }\n\n hide() {\n this.parent.style.opacity = 0;\n this.parent.style.left = 0;\n }\n}\n","import date_utils from './date_utils';\nimport { $, createSVG } from './svg_utils';\nimport Bar from './bar';\nimport Arrow from './arrow';\nimport Popup from './popup';\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) {\n this.setup_wrapper(wrapper);\n this.setup_options(options);\n this.setup_tasks(tasks);\n // initialize with default view mode\n this.change_view_mode();\n this.bind_events();\n }\n\n setup_wrapper(element) {\n let svg_element, 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 // wrapper element\n this.$container = document.createElement('div');\n this.$container.classList.add('gantt-container');\n\n const parent_element = this.$svg.parentElement;\n parent_element.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_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: 'en',\n };\n this.options = Object.assign({}, default_options, options);\n }\n\n setup_tasks(tasks) {\n // prepare tasks\n this.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 }\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 }\n\n render() {\n this.clear();\n this.setup_layers();\n this.make_grid();\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 setup_layers() {\n this.layers = {};\n const layers = ['grid', 'date', 'arrow', 'progress', 'bar', 'details'];\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 make_grid() {\n this.make_grid_background();\n this.make_grid_rows();\n this.make_grid_header();\n this.make_grid_ticks();\n this.make_grid_highlights();\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 + this.options.padding + 100,\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 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.grid,\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 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_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","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","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","style","clientWidth","position_meta","HTMLElement","getBoundingClientRect","top","transform","opacity","VIEW_MODE","QUARTER_DAY","HALF_DAY","WEEK","Gantt","wrapper","tasks","setup_wrapper","setup_options","setup_tasks","change_view_mode","bind_events","svg_element","wrapper_element","$svg","$container","createElement","parentElement","popup_wrapper","default_options","view_modes","view_mode","date_format","custom_popup_html","assign","start","end","every","deps","trim","filter","random","toString","generate_id","setup_dependencies","dependency_map","t","refresh","mode","update_view_scale","setup_dates","render","setup_gantt_dates","setup_date_values","gantt_end","dates","cur_date","bind_grid_click","bind_bar_events","clear","setup_layers","make_grid","make_dates","make_bars","make_arrows","map_arrows_on_bars","set_width","set_scroll_position","layers","layer","make_grid_background","make_grid_rows","make_grid_header","make_grid_ticks","make_grid_highlights","grid_width","grid_height","grid","rows_layer","lines_layer","row_width","row_height","row_y","x1","y1","x2","y2","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","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","get_task","Boolean","cur_width","actual_width","parent_element","scroll_pos","get_oldest_starting_date","scrollLeft","hide_popup","is_dragging","x_on_start","y_on_start","is_resizing_left","is_resizing_right","parent_bar_id","bar_wrapper","contains","offsetX","offsetY","ids","get_all_dependent_tasks","ox","oy","owidth","finaldx","bind_bar_progress","is_resizing","min_dx","max_dx","$handle","out","to_process","acc","querySelectorAll","el","modes","Array","isArray","some","find","popup","args","apply","prev_date"],"mappings":"kCAAA,MAAMA,EAAO,OACPC,EAAQ,QACRC,EAAM,MACNC,EAAO,OACPC,EAAS,SACTC,EAAS,SACTC,EAAc,cAEL,IAAAC,EAAA,CACXC,MAAMC,EAAMC,EAAiB,IAAKC,EAAiB,QAC/C,GAAIF,aAAgBG,KAChB,OAAOH,EAEX,GAAoB,iBAATA,EAAmB,CAC1B,IAAII,EAAYC,EAChB,MAAMC,EAAQN,EAAKO,MAAM,KAEzBH,EAAaE,EAAM,GACdC,MAAMN,GACNO,KAAKC,GAAQC,SAASD,EAAK,MAChCJ,EAAaC,EAAM,IAAMA,EAAM,GAAGC,MAAML,GAGxCE,EAAW,GAAKA,EAAW,GAAK,EAEhC,IAAIO,EAAOP,EAUX,OARIC,GAAcA,EAAWO,SACA,GAArBP,EAAWO,SACXP,EAAW,GAAK,KAAOA,EAAW,GAClCA,EAAW,GAAiC,IAA5BQ,WAAWR,EAAW,KAE1CM,EAAOA,EAAKG,OAAOT,IAGhB,IAAIF,QAAQQ,KAI3B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,QAAQa,aAAe,EAC7B,EACAjK,KAAKoJ,QAAQa,eAEpB4E,EAGXxC,eACI,IAAIrM,KAAKyS,KAAK4H,iBAAiB,iBAAiBhY,SAASiY,IACrDA,EAAG9O,UAAU0D,OAAO,aAI5BZ,QAAQiM,GACJ,MAAqB,iBAAVA,EACAva,KAAKoJ,QAAQ4J,YAAcuH,IAGlCC,MAAMC,QAAQF,IACPA,EAAMG,MAAMzG,GAASjU,KAAKoJ,QAAQ4J,YAAciB,IAM/DmE,SAAS7N,GACL,OAAOvK,KAAKiS,MAAM0I,MAAMhS,GACbA,EAAK4B,KAAOA,IAI3BwC,QAAQxC,GACJ,OAAOvK,KAAKiY,KAAK0C,MAAM/O,GACZA,EAAIjD,KAAK4B,KAAOA,IAI/B6B,WAAWhD,GACFpJ,KAAK4a,QACN5a,KAAK4a,MAAQ,IAAIlK,EACb1Q,KAAK6S,cACL7S,KAAKoJ,QAAQ8J,oBAGrBlT,KAAK4a,MAAM5J,KAAK5H,GAGpBwP,aACI5Y,KAAK4a,OAAS5a,KAAK4a,MAAM9J,OAG7BxE,cAAcxF,EAAO+T,GACb7a,KAAKoJ,QAAQ,MAAQtC,IACrB9G,KAAKoJ,QAAQ,MAAQtC,GAAOgU,MAAM,KAAMD,GAUhDnC,2BACI,OAAO1Y,KAAKiS,MACP3S,KAAKqJ,GAASA,EAAKmB,SACnBkD,QAAO,CAAC+N,EAAWtG,IAChBA,GAAYsG,EAAYtG,EAAWsG,IAS/CnG,QACI5U,KAAKyS,KAAK5M,UAAY,WAI9BkM,EAAMJ,UAAYA"} \ No newline at end of file diff --git a/index.html b/index.html index 642f9525..ce97e5ef 100644 --- a/index.html +++ b/index.html @@ -16,13 +16,16 @@ .gantt .bar-milestone .bar { fill: tomato; } + .heading { + text-align: center; + }
-

Interactive Gantt Chart entirely made in SVG!

+

Interactive Gantt Chart entirely made in SVG!