-

+
Frappe Gantt
A simple, interactive, modern gantt chart library for the web
diff --git a/node_modules/frappe-gantt/package.json b/node_modules/frappe-gantt/package.json
index 97ba7d8b..3dd34573 100755
--- a/node_modules/frappe-gantt/package.json
+++ b/node_modules/frappe-gantt/package.json
@@ -1,8 +1,8 @@
{
"_from": "frappe-gantt",
- "_id": "frappe-gantt@0.3.0",
+ "_id": "frappe-gantt@0.5.0",
"_inBundle": false,
- "_integrity": "sha512-19rJUJ6UfAN7LPHHhVtYjff0mdyat/mwMW+PAXp5s1211QZ4loi+TkuGgRY9n1r9xAI/VlGoYHUehHdYZge3aQ==",
+ "_integrity": "sha512-RAskVuBmnTcPJXh87oVhYmnNGy/9lvZlLHGui8QFB8yRBuUjzpZoZfZ+hKmDtBDmWNrE2/LRta06W5WmhTzzWQ==",
"_location": "/frappe-gantt",
"_phantomChildren": {},
"_requested": {
@@ -19,10 +19,10 @@
"#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/frappe-gantt/-/frappe-gantt-0.3.0.tgz",
- "_shasum": "0c718be2a5b5602be4ceb35ecc2093f9af59bea2",
+ "_resolved": "https://registry.npmjs.org/frappe-gantt/-/frappe-gantt-0.5.0.tgz",
+ "_shasum": "4dc7aa125f318efea64b4ae0e38f67a720238c1d",
"_spec": "frappe-gantt",
- "_where": "/home/cesar/confidence_chronogram",
+ "_where": "C:\\Users\\Cesar\\Documents\\confidence_chronogram",
"author": {
"name": "Faris Ansari"
},
@@ -41,7 +41,7 @@
"jest": "^22.2.1",
"prettier": "1.10.2",
"rollup": "^0.55.3",
- "rollup-plugin-sass": "^0.5.3",
+ "rollup-plugin-sass": "^1.2.2",
"rollup-plugin-uglify": "^3.0.0"
},
"eslintIgnore": [
@@ -71,5 +71,5 @@
"test": "jest",
"test:watch": "jest --watch"
},
- "version": "0.3.0"
+ "version": "0.5.0"
}
diff --git a/node_modules/frappe-gantt/src/bar.js b/node_modules/frappe-gantt/src/bar.js
index 7e0868e4..c9240df0 100644
--- a/node_modules/frappe-gantt/src/bar.js
+++ b/node_modules/frappe-gantt/src/bar.js
@@ -181,24 +181,29 @@ export default class Bar {
return;
}
- if (e.type === 'click') {
- this.gantt.trigger_event('click', [this.task]);
- }
-
+ this.show_popup();
this.gantt.unselect_all();
- this.group.classList.toggle('active');
+ this.group.classList.add('active');
+ });
- this.show_popup();
+ $.on(this.group, 'dblclick', e => {
+ if (this.action_completed) {
+ // just finished a move action, wait for a few seconds
+ return;
+ }
+
+ this.gantt.trigger_event('click', [this.task]);
});
}
show_popup() {
if (this.gantt.bar_being_dragged) return;
- const start_date = date_utils.format(this.task._start, 'MMM D');
+ const start_date = date_utils.format(this.task._start, 'MMM D', this.gantt.options.language);
const end_date = date_utils.format(
date_utils.add(this.task._end, -1, 'second'),
- 'MMM D'
+ 'MMM D',
+ this.gantt.options.language
);
const subtitle = start_date + ' - ' + end_date;
@@ -206,7 +211,7 @@ export default class Bar {
target_element: this.$bar,
title: this.task.name,
subtitle: subtitle,
- task: this.task
+ task: this.task,
});
}
diff --git a/node_modules/frappe-gantt/src/date_utils.js b/node_modules/frappe-gantt/src/date_utils.js
index 6b164ca4..a51feca2 100644
--- a/node_modules/frappe-gantt/src/date_utils.js
+++ b/node_modules/frappe-gantt/src/date_utils.js
@@ -21,6 +21,20 @@ const month_names = {
'November',
'December'
],
+ es: [
+ 'Enero',
+ 'Febrero',
+ 'Marzo',
+ 'Abril',
+ 'Mayo',
+ 'Junio',
+ 'Julio',
+ 'Agosto',
+ 'Septiembre',
+ 'Octubre',
+ 'Noviembre',
+ 'Diciembre'
+ ],
ru: [
'Январь',
'Февраль',
@@ -34,6 +48,62 @@ const month_names = {
'Октябрь',
'Ноябрь',
'Декабрь'
+ ],
+ 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: [
+ '一月',
+ '二月',
+ '三月',
+ '四月',
+ '五月',
+ '六月',
+ '七月',
+ '八月',
+ '九月',
+ '十月',
+ '十一月',
+ '十二月'
]
};
diff --git a/node_modules/frappe-gantt/src/index.js b/node_modules/frappe-gantt/src/index.js
index 209b3f0e..97770967 100644
--- a/node_modules/frappe-gantt/src/index.js
+++ b/node_modules/frappe-gantt/src/index.js
@@ -6,6 +6,15 @@ import Popup from './popup';
import './gantt.scss';
+const VIEW_MODE = {
+ QUARTER_DAY: 'Quarter Day',
+ HALF_DAY: 'Half Day',
+ DAY: 'Day',
+ WEEK: 'Week',
+ MONTH: 'Month',
+ YEAR: 'Year'
+};
+
export default class Gantt {
constructor(wrapper, tasks, options) {
this.setup_wrapper(wrapper);
@@ -68,14 +77,7 @@ export default class Gantt {
header_height: 50,
column_width: 30,
step: 24,
- view_modes: [
- 'Quarter Day',
- 'Half Day',
- 'Day',
- 'Week',
- 'Month',
- 'Year'
- ],
+ view_modes: [...Object.values(VIEW_MODE)],
bar_height: 20,
bar_corner_radius: 3,
arrow_curve: 5,
@@ -180,22 +182,22 @@ export default class Gantt {
update_view_scale(view_mode) {
this.options.view_mode = view_mode;
- if (view_mode === 'Day') {
+ if (view_mode === VIEW_MODE.DAY) {
this.options.step = 24;
this.options.column_width = 38;
- } else if (view_mode === 'Half Day') {
+ } else if (view_mode === VIEW_MODE.HALF_DAY) {
this.options.step = 24 / 2;
this.options.column_width = 38;
- } else if (view_mode === 'Quarter Day') {
+ } else if (view_mode === VIEW_MODE.QUARTER_DAY) {
this.options.step = 24 / 4;
this.options.column_width = 38;
- } else if (view_mode === 'Week') {
+ } else if (view_mode === VIEW_MODE.WEEK) {
this.options.step = 24 * 7;
this.options.column_width = 140;
- } else if (view_mode === 'Month') {
+ } else if (view_mode === VIEW_MODE.MONTH) {
this.options.step = 24 * 30;
this.options.column_width = 120;
- } else if (view_mode === 'Year') {
+ } else if (view_mode === VIEW_MODE.YEAR) {
this.options.step = 24 * 365;
this.options.column_width = 120;
}
@@ -223,13 +225,13 @@ export default class Gantt {
this.gantt_end = date_utils.start_of(this.gantt_end, 'day');
// add date padding on both sides
- if (this.view_is(['Quarter Day', 'Half Day'])) {
+ if (this.view_is([VIEW_MODE.QUARTER_DAY, VIEW_MODE.HALF_DAY])) {
this.gantt_start = date_utils.add(this.gantt_start, -7, 'day');
this.gantt_end = date_utils.add(this.gantt_end, 7, 'day');
- } else if (this.view_is('Month')) {
+ } else if (this.view_is(VIEW_MODE.MONTH)) {
this.gantt_start = date_utils.start_of(this.gantt_start, 'year');
this.gantt_end = date_utils.add(this.gantt_end, 1, 'year');
- } else if (this.view_is('Year')) {
+ } else if (this.view_is(VIEW_MODE.YEAR)) {
this.gantt_start = date_utils.add(this.gantt_start, -2, 'year');
this.gantt_end = date_utils.add(this.gantt_end, 2, 'year');
} else {
@@ -246,9 +248,9 @@ export default class Gantt {
if (!cur_date) {
cur_date = date_utils.clone(this.gantt_start);
} else {
- if (this.view_is('Year')) {
+ if (this.view_is(VIEW_MODE.YEAR)) {
cur_date = date_utils.add(cur_date, 1, 'year');
- } else if (this.view_is('Month')) {
+ } else if (this.view_is(VIEW_MODE.MONTH)) {
cur_date = date_utils.add(cur_date, 1, 'month');
} else {
cur_date = date_utils.add(
@@ -377,19 +379,19 @@ export default class Gantt {
for (let date of this.dates) {
let tick_class = 'tick';
// thick tick for monday
- if (this.view_is('Day') && date.getDate() === 1) {
+ if (this.view_is(VIEW_MODE.DAY) && date.getDate() === 1) {
tick_class += ' thick';
}
// thick tick for first week
if (
- this.view_is('Week') &&
+ this.view_is(VIEW_MODE.WEEK) &&
date.getDate() >= 1 &&
date.getDate() < 8
) {
tick_class += ' thick';
}
// thick ticks for quarters
- if (this.view_is('Month') && (date.getMonth() + 1) % 3 === 0) {
+ if (this.view_is(VIEW_MODE.MONTH) && (date.getMonth() + 1) % 3 === 0) {
tick_class += ' thick';
}
@@ -399,7 +401,7 @@ export default class Gantt {
append_to: this.layers.grid
});
- if (this.view_is('Month')) {
+ if (this.view_is(VIEW_MODE.MONTH)) {
tick_x +=
date_utils.get_days_in_month(date) *
this.options.column_width /
@@ -412,7 +414,7 @@ export default class Gantt {
make_grid_highlights() {
// highlight today's date
- if (this.view_is('Day')) {
+ if (this.view_is(VIEW_MODE.DAY)) {
const x =
date_utils.diff(date_utils.today(), this.gantt_start, 'hour') /
this.options.step *
@@ -817,7 +819,7 @@ export default class Gantt {
rem,
position;
- if (this.view_is('Week')) {
+ if (this.view_is(VIEW_MODE.WEEK)) {
rem = dx % (this.options.column_width / 7);
position =
odx -
@@ -825,7 +827,7 @@ export default class Gantt {
(rem < this.options.column_width / 14
? 0
: this.options.column_width / 7);
- } else if (this.view_is('Month')) {
+ } else if (this.view_is(VIEW_MODE.MONTH)) {
rem = dx % (this.options.column_width / 30);
position =
odx -
@@ -920,6 +922,8 @@ export default class Gantt {
}
}
+Gantt.VIEW_MODE = VIEW_MODE;
+
function generate_id(task) {
return (
task.name +
diff --git a/package-lock.json b/package-lock.json
index 999bda41..de6e1c72 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3,9 +3,9 @@
"lockfileVersion": 1,
"dependencies": {
"frappe-gantt": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/frappe-gantt/-/frappe-gantt-0.3.0.tgz",
- "integrity": "sha512-19rJUJ6UfAN7LPHHhVtYjff0mdyat/mwMW+PAXp5s1211QZ4loi+TkuGgRY9n1r9xAI/VlGoYHUehHdYZge3aQ=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/frappe-gantt/-/frappe-gantt-0.5.0.tgz",
+ "integrity": "sha512-RAskVuBmnTcPJXh87oVhYmnNGy/9lvZlLHGui8QFB8yRBuUjzpZoZfZ+hKmDtBDmWNrE2/LRta06W5WmhTzzWQ=="
}
}
}
diff --git a/runtime.txt b/runtime.txt
index 724c203e..a01373a3 100644
--- a/runtime.txt
+++ b/runtime.txt
@@ -1 +1 @@
-python-3.8.2
+python-3.7.2