Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance y sort #27

Open
wants to merge 272 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
bfadf65
Merge pull request #161 from frappe/dependabot/npm_and_yarn/sshpk-1.16.1
s-aga-r Jan 2, 2023
da4b313
Merge pull request #239 from frappe/dependabot/npm_and_yarn/path-pars…
s-aga-r Jan 2, 2023
372b1e8
Merge pull request #238 from frappe/dependabot/npm_and_yarn/tar-2.2.2
s-aga-r Jan 2, 2023
3bca39d
Bump minimatch from 3.0.4 to 3.1.2
dependabot[bot] Jan 2, 2023
a4197ac
Bump terser from 5.13.0 to 5.16.1
dependabot[bot] Jan 2, 2023
781578c
chore: align heading center in `index.html`
s-aga-r Jan 4, 2023
fc08a80
chore: use arrow functions in `index.html`
s-aga-r Jan 4, 2023
33cb615
Merge pull request #302 from DennisAnim/dennisGantt-Repo
s-aga-r Jan 4, 2023
73871b0
chore: add `language` option in `README.md`
s-aga-r Dec 14, 2022
228782a
Merge pull request #292 from ThibaultBarolat/add-language-option-doc
s-aga-r Jan 4, 2023
94fdb10
Merge pull request #279 from hiawui/bugfix-month-mode-thick-tick
s-aga-r Jan 4, 2023
80458f6
Merge pull request #271 from hiawui/bugfix-invalid-bar
s-aga-r Jan 4, 2023
743f84f
Merge pull request #242 from SergAlexAnd/master
s-aga-r Jan 4, 2023
e014234
chore: update `language` options in `README.md`
s-aga-r Jan 4, 2023
bf80b07
Merge pull request #306 from s-aga-r/it-language-in-readme
s-aga-r Jan 4, 2023
342e97b
feat: add support for german and hungarian languages
s-aga-r Jan 6, 2023
7381b84
chore: update language options in README.md
s-aga-r Jan 6, 2023
0381503
Merge pull request #307 from s-aga-r/feat/languages
s-aga-r Jan 7, 2023
ddb3572
chore: use `Intl.DateTimeFormat` to translate month names
stephanvierkant Jan 25, 2022
1d024dc
Merge pull request #252 from stephanvierkant/patch-1
s-aga-r Jun 8, 2023
916fd15
feat: option to enable expected progress bars
GursheenK Nov 19, 2023
c4e1553
chore: define colour for expected progress bar
GursheenK Nov 19, 2023
be1c875
feat: add dark mode support
BHznJNs Feb 4, 2024
6cb5c12
Feat:Add Grid highlight for current week, month, year
Mar 26, 2024
02aaf6a
changes
Mar 26, 2024
74bda8b
Merge pull request #381 from Deephacks619/grid-highlight
rmehta Mar 26, 2024
4ba1566
Merge pull request #365 from GursheenK/expected-progress-bars
rmehta Mar 27, 2024
ce43bb9
Merge branch 'master' into master
rmehta Mar 27, 2024
05b243f
Merge pull request #377 from BHznJNs/master
rmehta Mar 27, 2024
c880b72
fix: bar not resizable if <1 unit
safwansamsudeen Apr 4, 2024
d886100
fix: all text not selectable, add safari support
safwansamsudeen Apr 4, 2024
6e2f91d
fix: first date disappearing
safwansamsudeen Apr 4, 2024
2188186
fix: progress polygon when progress = 0
safwansamsudeen Apr 4, 2024
0cc5a3c
fix: inconsistent time display
safwansamsudeen Apr 4, 2024
7670d13
fix: cut off starts
safwansamsudeen Apr 4, 2024
c34c09e
Merge pull request #382 from safwansamsudeen/master
netchampfaris Apr 4, 2024
0f15ab1
feat: allow duration instead of end_time
safwansamsudeen Apr 5, 2024
01082de
Merge pull request #305 from frappe/dependabot/npm_and_yarn/terser-5.…
safwansamsudeen Apr 5, 2024
a60d93c
Merge pull request #303 from frappe/dependabot/npm_and_yarn/minimatch…
safwansamsudeen Apr 5, 2024
51c717c
chore(deps): bump semver from 5.5.0 to 5.7.2
dependabot[bot] Apr 5, 2024
e5717fa
chore(deps): bump handlebars from 4.0.11 to 4.7.8
dependabot[bot] Apr 5, 2024
ddf2712
Merge pull request #386 from frappe/dependabot/npm_and_yarn/handlebar…
safwansamsudeen Apr 5, 2024
cac6a4f
chore(deps): bump fsevents from 1.1.3 to 1.2.13
dependabot[bot] Apr 5, 2024
a4f7b72
feat: allow hour mode
safwansamsudeen Apr 5, 2024
a0c7cd3
feat: allow customizable padding
safwansamsudeen Apr 5, 2024
f9da6ad
chore: format (add prettier), fix minor bug, build
safwansamsudeen Apr 5, 2024
bd6784a
Merge pull request #384 from frappe/dependabot/npm_and_yarn/fsevents-…
safwansamsudeen Apr 5, 2024
8dad341
Merge pull request #385 from frappe/dependabot/npm_and_yarn/semver-5.7.2
safwansamsudeen Apr 5, 2024
bcd52bf
chore(deps): bump async from 2.6.0 to 2.6.4
dependabot[bot] Apr 5, 2024
b0d3fdb
chore(deps): bump qs from 6.5.1 to 6.5.3
dependabot[bot] Apr 5, 2024
533b9ea
Merge pull request #390 from frappe/dependabot/npm_and_yarn/qs-6.5.3
safwansamsudeen Apr 5, 2024
93bf95d
Merge pull request #388 from frappe/dependabot/npm_and_yarn/async-2.6.4
safwansamsudeen Apr 5, 2024
14f1770
fix: bug in start date
safwansamsudeen Apr 5, 2024
bd7ce02
fix: timezone bug
safwansamsudeen Apr 5, 2024
0b235d3
feat: support empty task list
safwansamsudeen Apr 5, 2024
ea6259a
Merge pull request #387 from safwansamsudeen/master
safwansamsudeen Apr 6, 2024
bbbf288
feat: allow readonly
safwansamsudeen Apr 7, 2024
b8bad72
feat: highlight weekends, build dist
safwansamsudeen Apr 7, 2024
9401b35
feat: fixed header, thumbnail, movable label;
safwansamsudeen Apr 10, 2024
889a03a
chore: consistently use strict equality operator
safwansamsudeen Apr 10, 2024
e0bcc33
fix: bars disappearing bug
safwansamsudeen Apr 10, 2024
b42a63c
fix: replace with replace all
safwansamsudeen Apr 14, 2024
4c09ecc
fix: bug in half day view
safwansamsudeen Apr 14, 2024
4c54ea8
fix: year mode proper
safwansamsudeen Apr 14, 2024
0afbf76
fix: bug in month view label alignment
safwansamsudeen Apr 14, 2024
c815dcd
fix: progress bug, deselect bar by double click
safwansamsudeen Apr 14, 2024
c13c9c0
feat: add extra events
safwansamsudeen Apr 14, 2024
94d2cf5
chore: replace var with let, improve demo, build
safwansamsudeen Apr 14, 2024
0ebea3d
feat: scroll to today
safwansamsudeen Apr 14, 2024
85c943b
chore: build, make thick strokes more prominent
safwansamsudeen Apr 14, 2024
769233a
feat: date highlight, handles out, improved font
safwansamsudeen Apr 20, 2024
4f66e83
feat: improved coloring scheme
safwansamsudeen Apr 20, 2024
0e6e015
feat: enhanced popup
safwansamsudeen Apr 20, 2024
ab9ecf7
chore: build
safwansamsudeen Apr 20, 2024
ecbec30
feat: configurable lines
safwansamsudeen Apr 22, 2024
591b599
fix: date highlight resizes
safwansamsudeen Apr 22, 2024
efb632f
replace outline with box shadow
safwansamsudeen Apr 22, 2024
47fe68e
feat: improved popup, switch handle and popup
safwansamsudeen Apr 22, 2024
25d55e1
fix: double click issue
safwansamsudeen Apr 22, 2024
35966f0
fix: improve box shadow
safwansamsudeen Apr 23, 2024
dd28b8e
feat: fixed header in html
safwansamsudeen Apr 23, 2024
2fd3aef
feat: today button, improved scroll
safwansamsudeen Apr 23, 2024
0ee9b6a
feat: auto change view mode, fix multiple bugs
safwansamsudeen Apr 25, 2024
e7c735d
fix: date highlight, aligning
safwansamsudeen Apr 25, 2024
86db222
Merge branch 'new-ui'
safwansamsudeen Apr 26, 2024
a72b75a
chore: build
safwansamsudeen Apr 26, 2024
0cefc57
fix: date higlight
safwansamsudeen Apr 27, 2024
901f78e
feat: align design with figma
safwansamsudeen Apr 28, 2024
8bdd488
fix: improve view mode change, side header
safwansamsudeen Apr 28, 2024
e9931bd
feat: improved progress handle
safwansamsudeen Apr 28, 2024
99261df
feat: popup after delay
safwansamsudeen Apr 28, 2024
55be33c
feat: modify lower text option
safwansamsudeen Apr 28, 2024
1403f2e
feat: popup, build
safwansamsudeen Apr 28, 2024
3194f88
chore: format
safwansamsudeen Apr 29, 2024
a65bcff
feat: first round of tooling upgrades
safwansamsudeen Apr 30, 2024
e151483
fix: correct safari bug
safwansamsudeen Apr 30, 2024
b7deffd
Merge pull request #393 from safwansamsudeen/master
netchampfaris Apr 30, 2024
6ce4da5
fix: multiple bug fixes, more config
safwansamsudeen Apr 30, 2024
b29076a
fix: firefox bugs
safwansamsudeen Apr 30, 2024
af0276c
fix: timezone issues
safwansamsudeen Apr 30, 2024
5e18b53
fix: change progress icon
safwansamsudeen Apr 30, 2024
9cd3633
chore: format
safwansamsudeen Apr 30, 2024
30a8d5a
fix: a bug
safwansamsudeen May 2, 2024
e648769
fix: more bugs
safwansamsudeen May 2, 2024
73aa284
fix: couple bugs
safwansamsudeen Jun 17, 2024
35d810b
Merge branch 'master' of https://github.com/safwansamsudeen/gantt
safwansamsudeen Jun 17, 2024
5c21272
fix: button background
safwansamsudeen Jun 17, 2024
28932ee
fix: make sure Gantt works as before
safwansamsudeen Sep 11, 2024
daaf0d3
fix: resize bugs
safwansamsudeen Sep 11, 2024
9e64337
chore: format, license, bump version
safwansamsudeen Sep 11, 2024
22ff6e2
Merge pull request #394 from safwansamsudeen/master
safwansamsudeen Sep 11, 2024
aa33ac9
fix: use css to align lower text dates
safwansamsudeen Sep 11, 2024
f4bfa43
Merge pull request #422 from safwansamsudeen/master
safwansamsudeen Sep 11, 2024
0074a09
fix: bump node version
safwansamsudeen Sep 11, 2024
f8d77b2
fix: today highlight bug
safwansamsudeen Sep 11, 2024
faf41b7
fix: use css ids that don't start with number
safwansamsudeen Sep 11, 2024
af206eb
fix: changes from #397
safwansamsudeen Sep 11, 2024
66e2b1d
fix: change yarn version
safwansamsudeen Sep 11, 2024
fd44499
fix: bump node version
safwansamsudeen Sep 11, 2024
4e09e02
fix: bump even higher
safwansamsudeen Sep 11, 2024
350ff7f
chore: format
safwansamsudeen Sep 11, 2024
3155146
fix: remove test for now
safwansamsudeen Sep 11, 2024
d6e8700
fix: package version
safwansamsudeen Sep 11, 2024
1cd9456
Update README.md
safwansamsudeen Sep 18, 2024
fc97f31
fix: make changes to tooling
safwansamsudeen Sep 18, 2024
78e7b25
chore: bump version for tooling
safwansamsudeen Sep 18, 2024
1d58c54
chore(deps-dev): bump vite from 5.2.10 to 5.2.14
dependabot[bot] Sep 18, 2024
3e197c2
feat: allow accessing this
safwansamsudeen Sep 18, 2024
6f97f81
fix: bug in higher view modes
safwansamsudeen Sep 18, 2024
e5a3a3b
fix: check if today_button is defined before use it
thomasync Sep 19, 2024
b834da1
Merge pull request #437 from thomasync/fix-today-button
safwansamsudeen Sep 19, 2024
5bead3a
Merge pull request #434 from frappe/dependabot/npm_and_yarn/vite-5.2.14
safwansamsudeen Sep 19, 2024
dfe4907
Fix custom popup html documentation for v0.8
tagliala Sep 22, 2024
0ea8d48
chore(deps): bump rollup from 4.17.1 to 4.22.4
dependabot[bot] Sep 24, 2024
c88e8fc
Fix regression with webpack
tagliala Sep 24, 2024
026bc31
Merge pull request #440 from tagliala/chore/fix-docs
safwansamsudeen Oct 15, 2024
bc79149
Merge pull request #443 from frappe/dependabot/npm_and_yarn/rollup-4.…
safwansamsudeen Oct 15, 2024
de53f78
chore: format
Nov 28, 2024
ced1080
chore: correct tooling
Nov 28, 2024
3461888
chore(deps): bump cross-spawn, eslint and jest
dependabot[bot] Nov 28, 2024
629d55e
Merge branch 'master' into chore/import-directive-webpack
safwansamsudeen Nov 28, 2024
ff57ae2
Merge pull request #462 from frappe/dependabot/npm_and_yarn/multi-166…
safwansamsudeen Nov 28, 2024
75bf77e
tooling part 2
safwansamsudeen Nov 28, 2024
45f02df
support popup on click
safwansamsudeen Nov 28, 2024
53c27c9
chore: add pnpm install
safwansamsudeen Nov 28, 2024
bdcf9f9
chore: update lock
safwansamsudeen Nov 28, 2024
242df78
chore(deps-dev): bump rollup from 4.17.1 to 4.27.4
dependabot[bot] Nov 28, 2024
d7b2051
feat: freeze dependency option and scroll bar bug
safwansamsudeen Nov 28, 2024
e4df4fe
feat: add support for custom views with units(hour,day,month)
moradlarbi Nov 28, 2024
a08de40
Merge branch 'master' into customViews
safwansamsudeen Nov 28, 2024
788a96f
Merge pull request #454 from moradlarbi/customViews
safwansamsudeen Nov 28, 2024
dd01835
chore: run build files
safwansamsudeen Nov 28, 2024
d3b4a2f
chore: format
safwansamsudeen Nov 28, 2024
24e66dc
Merge pull request #464 from frappe/dependabot/npm_and_yarn/rollup-4.…
safwansamsudeen Nov 29, 2024
0d357b0
chore: remove locks
safwansamsudeen Nov 29, 2024
da04ea7
fix: dragging left bug
safwansamsudeen Nov 29, 2024
a22c9dc
chore: publish new version, build online
safwansamsudeen Nov 29, 2024
189c750
chore: update workflow
safwansamsudeen Nov 29, 2024
5d81ffd
update node version
safwansamsudeen Nov 29, 2024
59f5146
Merge pull request #441 from tagliala/chore/import-directive-webpack
safwansamsudeen Nov 29, 2024
3e28b63
Merge branch 'master' into master
safwansamsudeen Nov 29, 2024
8f03ba0
Merge pull request #423 from safwansamsudeen/master
safwansamsudeen Nov 29, 2024
6e0e0a9
make daily mode work after rewrite of date system
safwansamsudeen Nov 29, 2024
2eaa127
fix date calculation bugs
safwansamsudeen Dec 2, 2024
8c526b5
fix highlighting bugs
safwansamsudeen Dec 2, 2024
c13c0cd
feat: snap_by_day option
safwansamsudeen Dec 2, 2024
fc71da6
remove VIEW_MODE usages, fix bugs
safwansamsudeen Dec 2, 2024
7ac5422
more simplification
safwansamsudeen Dec 2, 2024
3519755
improve date handling and fix empty tasks error
safwansamsudeen Dec 2, 2024
d7fb480
chore: format
safwansamsudeen Dec 2, 2024
8152f5a
fix: all format uses lang
safwansamsudeen Dec 2, 2024
6d89ee0
fix: issues with highlight system and todayDate.
cristiano-matchday Dec 2, 2024
d87022e
modify gitignore
safwansamsudeen Dec 2, 2024
440d717
format
safwansamsudeen Dec 2, 2024
79b0e0d
Merge pull request #475 from MercurialUroboros/fix/highlight-issues
safwansamsudeen Dec 2, 2024
50f9c2c
configurable snapping
safwansamsudeen Dec 2, 2024
f4f97cd
Merge branch 'master' into view-modes
safwansamsudeen Dec 2, 2024
e20c7e0
fix disappearing text bug
safwansamsudeen Dec 2, 2024
268d82a
upper text issues
safwansamsudeen Dec 2, 2024
02ea61d
Merge pull request #474 from frappe/view-modes
safwansamsudeen Dec 3, 2024
b776376
make release branch
safwansamsudeen Dec 3, 2024
6984d3e
feat: configurable highlights
safwansamsudeen Dec 3, 2024
9caf232
feat: ignore regions
safwansamsudeen Dec 5, 2024
6c8cc99
fix: couple ignoring bugs
safwansamsudeen Dec 5, 2024
0c9e4ae
fix scrolling issue, make smoother scrolling
safwansamsudeen Dec 5, 2024
af1c94b
perfect progress in ignore
safwansamsudeen Dec 5, 2024
d740d40
infinite extensions
safwansamsudeen Dec 5, 2024
f37fe4e
fix button issues, positioned properly now
safwansamsudeen Dec 5, 2024
0c6266e
fix many bugs as demo is built
safwansamsudeen Dec 6, 2024
341e51b
feat: labels
safwansamsudeen Dec 10, 2024
a449ac9
snap bars in ignored areas
safwansamsudeen Dec 10, 2024
653a5d0
fix progress calculation
safwansamsudeen Dec 10, 2024
f5f61af
changes for demo
safwansamsudeen Dec 10, 2024
abe2e89
basic interactive demo
safwansamsudeen Dec 10, 2024
8b2e544
update readme to match standard
safwansamsudeen Dec 10, 2024
426c8a8
update README.md
safwansamsudeen Dec 10, 2024
f0a8bf7
upload image
safwansamsudeen Dec 10, 2024
0b1c6c9
feat: smoother infinite padding, improved config
safwansamsudeen Dec 11, 2024
610da9d
chore: update demo file
safwansamsudeen Dec 11, 2024
3bdc682
fix: input type error
safwansamsudeen Dec 11, 2024
4a1e343
chore: update readme based on feedback
safwansamsudeen Dec 12, 2024
1dfcc7b
fix: add images, badge
safwansamsudeen Dec 12, 2024
bb448c7
add license badge
safwansamsudeen Dec 12, 2024
e489603
Update README.md
safwansamsudeen Dec 12, 2024
3433246
fix: better screenshot
safwansamsudeen Dec 12, 2024
ffb53b9
update image
safwansamsudeen Dec 12, 2024
dae014d
feat: implement header with css
safwansamsudeen Dec 12, 2024
c15cc31
chore: update demo, defaults
safwansamsudeen Dec 12, 2024
1782620
fix: image
safwansamsudeen Dec 13, 2024
ba660d5
fix: remove badges
safwansamsudeen Dec 13, 2024
539482e
feat: cleaner styling, enable theming
safwansamsudeen Dec 13, 2024
a7d3884
fix: bugs in view mode renderings
safwansamsudeen Dec 13, 2024
d1cc6cc
fix: bug in upper header, remove direct dom manipulation
safwansamsudeen Dec 13, 2024
e6a1c30
fix: issues discovered while porting to builder
safwansamsudeen Dec 13, 2024
196299d
fix: arrow bugs
safwansamsudeen Dec 13, 2024
019e550
fix: small improvements
safwansamsudeen Dec 16, 2024
a3c9f15
feat: go back to main timeframe
safwansamsudeen Dec 16, 2024
350dc88
feat: replace tooltip with popup
safwansamsudeen Dec 17, 2024
fcd0492
fix: few bugs in popup
safwansamsudeen Dec 17, 2024
097d69c
fix: bug with current marking
safwansamsudeen Dec 17, 2024
d5ee5a4
fix: dates broken in dst
safwansamsudeen Dec 17, 2024
8be3b02
feat: api to update task; fix: couple bugs
safwansamsudeen Dec 19, 2024
5c9f46a
feat: stop scroll on view_mode change
safwansamsudeen Dec 19, 2024
393a91e
update README.md
safwansamsudeen Dec 23, 2024
85399e7
feat: get demo on builder
safwansamsudeen Dec 20, 2024
0b33e88
fix: scrolling bug in infinite padding
safwansamsudeen Dec 23, 2024
f9c5b1f
feat: demo in builder
safwansamsudeen Dec 23, 2024
218202c
add auto container height
safwansamsudeen Jan 2, 2025
abeec1c
feat: more like notion
safwansamsudeen Jan 2, 2025
8b523c7
feat: make like notion; fix: bar rendering bugs
safwansamsudeen Jan 6, 2025
3dd58fc
fix: small bugs and style changes
safwansamsudeen Jan 7, 2025
2f6b578
fix: bar dragging tracker bug
safwansamsudeen Jan 7, 2025
84a677d
chore: cleanup, revert demo testing
safwansamsudeen Jan 7, 2025
bab2afe
feat: circle marker for current time
safwansamsudeen Jan 7, 2025
3217f7d
feat: v1 of demo
safwansamsudeen Jan 7, 2025
3973293
chore: lint
safwansamsudeen Jan 7, 2025
03d8866
feat: add docs
safwansamsudeen Jan 8, 2025
2c15115
fix: bugs in popup
safwansamsudeen Jan 8, 2025
7dcc132
fix: handle bar disappearing
safwansamsudeen Jan 8, 2025
1f1a5f0
fix: many small bugs
safwansamsudeen Jan 8, 2025
34422d1
fix: make buttons standard, fix bugs
safwansamsudeen Jan 8, 2025
65ea237
feat: add color to bars
safwansamsudeen Jan 8, 2025
5211074
fix: readonly bug
safwansamsudeen Jan 8, 2025
a8d7814
chore: update screenshot
safwansamsudeen Jan 8, 2025
188ab1d
feat: reset after view mode change
safwansamsudeen Jan 8, 2025
45a17c7
chore: prepare for v1
safwansamsudeen Jan 8, 2025
ae7bc8d
remove index
safwansamsudeen Jan 8, 2025
c8ca787
enable dragging to change the task order
hiawui Jun 28, 2022
c4c528a
fix: mousemove & mouseup
hiawui Jan 9, 2025
60354d9
fix: mouseup
hiawui Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc

This file was deleted.

Binary file added .github/gantt-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/hero-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 19 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Publish on NPM
on:
push:
branches: [ master ]
push:
branches: [release]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 14
- run: yarn install
- run: yarn prettier-check
- run: yarn test
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- run: pnpm install
- run: pnpm prettier-check
- run: pnpm build
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ coverage

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
dist/*

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
.yarn

.DS_Store

gh-pages
gh-pages
feedback*.md
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
6 changes: 3 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"tabWidth": 4,
"singleQuote": true
}
"tabWidth": 4,
"singleQuote": true
}
210 changes: 134 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,100 +1,158 @@
<div align="center">
<img src="https://github.com/frappe/design/blob/master/logos/logo-2019/frappe-gantt-logo.png" height="128">
<h2>Frappe Gantt</h2>
<p align="center">
<p>A simple, interactive, modern gantt chart library for the web</p>
<a href="https://frappe.github.io/gantt">
<b>View the demo »</b>
</a>
</p>
<div align="center" markdown="1">
<img src=".github/gantt-logo.jpg" width="80">
<h1>Frappe Gantt</h1>

**A modern, configurable, Gantt library for the web.**
</div>

<p align="center">
<a href="https://frappe.github.io/gantt">
<img src="https://cloud.githubusercontent.com/assets/9355208/21537921/4a38b194-cdbd-11e6-8110-e0da19678a6d.png">
</a>
</p>
![Hero Image](.github/hero-image.png)

### Install
```
## Frappe Gantt
Gantt charts are bar charts that visually illustrate a project's tasks, schedule, and dependencies. With Frappe Gantt, you can build beautiful, customizable, Gantt charts with ease.

You can use it anywhere from hobby projects to tracking the goals of your team at the worksplace.

[ERPNext](https://erpnext.com/) uses Frappe Gantt.


### Motivation
We needed a Gantt View for ERPNext. Surprisingly, we couldn't find a visually appealing Gantt library that was open source - so we decided to build it. Initially, the design was heavily inspired by Google Gantt and DHTMLX.


### Key Features
- **Customizable Views**: customize the timeline based on various time periods - day, hour, or year, you have it. You can also create your own views.
- **Ignore Periods**: exclude weekends and other holidays from your tasks' progress calculation.
- **Configure Anything**: spacing, edit access, labels, you can control it all. Change both the style and functionality to meet your needs.
- **Multi-lingual Support**: suitable for companies with an international base.

## Usage

Install with:
```bash
npm install frappe-gantt
```

### Usage
Include it in your HTML:
```
<script src="frappe-gantt.min.js"></script>

```html
<script src="frappe-gantt.umd.js"></script>
<link rel="stylesheet" href="frappe-gantt.css">
```

And start hacking:
Or from the CDN:
```html
<script src="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.umd.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.css">
```

Start using Gantt:
```js
var tasks = [
let tasks = [
{
id: 'Task 1',
id: '1',
name: 'Redesign website',
start: '2016-12-28',
end: '2016-12-31',
progress: 20,
dependencies: 'Task 2, Task 3',
custom_class: 'bar-milestone' // optional
progress: 20
},
...
]
var gantt = new Gantt("#gantt", tasks);
let gantt = new Gantt("#gantt", tasks);
```

You can also pass various options to the Gantt constructor:
```js
var gantt = new Gantt("#gantt", tasks, {
header_height: 50,
column_width: 30,
step: 24,
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
bar_height: 20,
bar_corner_radius: 3,
arrow_curve: 5,
padding: 18,
view_mode: 'Day',
date_format: 'YYYY-MM-DD',
custom_popup_html: null
});
```
### Configuration
Frappe Gantt offers a wide range of options to customize your chart.


| **Option** | **Description** | **Possible Values** | **Default** |
|---------------------------|---------------------------------------------------------------------------------|----------------------------------------------------|------------------------------------|
| `arrow_curve` | Curve radius of arrows connecting dependencies. | Any positive integer. | `5` |
| `auto_move_label` | Move task labels when user scrolls horizontally. | `true`, `false` | `false` |
| `bar_corner_radius` | Radius of the task bar corners (in pixels). | Any positive integer. | `3` |
| `bar_height` | Height of task bars (in pixels). | Any positive integer. | `30` |
| `container_height` | Height of the container. | `auto` - dynamic container height to fit all tasks - _or_ any positive integer (for pixels). | `auto` |
| `column_width` | Width of each column in the timeline. | Any positive integer. | 45 |
| `date_format` | Format for displaying dates. | Any valid JS date format string. | `YYYY-MM-DD` |
| `upper_header_height` | Height of the upper header in the timeline (in pixels). | Any positive integer. | `45` |
| `lower_header_height` | Height of the lower header in the timeline (in pixels). | Any positive integer. | `30` |
| `snap_at` | Snap tasks at particular intervel while resizing or dragging. | Any _interval_ (see below) | `1d` |
| `infinite_padding` | Whether to extend timeline infinitely when user scrolls. | `true`, `false` | `true` |
| `holidays` | Highlighted holidays on the timeline. | Object mapping CSS colors to holiday types. Types can either be a) 'weekend', or b) array of _strings_ or _date objects_ or _objects_ in the format `{date: ..., label: ...}` | `{ 'var(--g-weekend-highlight-color)': 'weekend' }` |
| `ignore` | Ignored areas in the rendering | `weekend` _or_ Array of strings or date objects (`weekend` can be present to the array also). | `[]` |
| `language` | Language for localization. | ISO 639-1 codes like `en`, `fr`, `es`. | `en` |
| `lines` | Determines which grid lines to display. | `none` for no lines, `vertical` for only vertical lines, `horizontal` for only horizontal lines, `both` for complete grid. | `both` |
| `move_dependencies` | Whether moving a task automatically moves its dependencies. | `true`, `false` | `true` |
| `padding` | Padding around task bars (in pixels). | Any positive integer. | `18` |
| `popup_on` | Event to trigger the popup display. | `click` _or_ `hover` | `click` |
| `readonly_progress` | Disables editing task progress. | `true`, `false` | `false` |
| `readonly_dates` | Disables editing task dates. | `true`, `false` | `false` |
| `readonly` | Disables all editing features. | `true`, `false` | `false` |
| `scroll_to` | Determines the starting point when chart is rendered. | `today`, `start`, `end`, or a date string. | `today` |
| `show_expected_progress` | Shows expected progress for tasks. | `true`, `false` | `false` |
| `today_button` | Adds a button to navigate to today’s date. | `true`, `false` | `true` |
| `view_mode` | The initial view mode of the Gantt chart. | `Day`, `Week`, `Month`, `Year`. | `Day` |
| `view_mode_select` | Allows selecting the view mode from a dropdown. | `true`, `false` | `false` |

Apart from these ones, two options - `popup` and `view_modes` (plural, not singular) - are available. They have "sub"-APIs, and thus are listed separately.

#### View Mode Configuration
The `view_modes` option determines all the available view modes for the chart. It should be an array of objects.

Each object can have the following properties:
- `name` (string) - the name of view mode.
- `padding` (interval) - the time above.
- `step` - the interval of each column
- `lower_text` (date format string _or_ function) - the format for text in lower header. Blank string for none. The function takes in `currentDate`, `previousDate`, and `lang`, and should return a string.
- `upper_text` (date format string _or_ function) - the format for text in upper header. Blank string for none. The function takes in `currentDate`, `previousDate`, and `lang`, and should return a string.
- `upper_text_frequency` (number) - how often the upper text has a value. Utilized in internal calculation to improve performance.
- `thick_line` (function) - takes in `currentDate`, returns Boolean determining whether the line for that date should be thicker than the others.

### Contributing
Three other options allow you to override general configuration for this view mode alone:
- `date_format`
- `column_width`
- `snap_at`
For details, see the above table.

#### Popup Configuration
`popup` is a function. If it returns
- `false`, there will be no popup.
- `undefined`, the popup will be rendered based on manipulation within the function
- a HTML string, the popup will be that string.

The function receives one object as an argument, containing:
- `task` - the task as an object
- `chart` - the entire Gantt chart
- `get_title`, `get_subtitle`, `get_details` (functions) - get the relevant section as a HTML node.
- `set_title`, `set_subtitle`, `set_details` (functions) - take in the HTML of the relevant section
- `add_action` (function) - accepts two parameters, `html` and `func` - respectively determining the HTML of the action and the callback when the action is pressed.

### API
Frappe Gantt exposes a few helpful methods for you to interact with the chart:

| **Name** | **Description** | **Parameters** |
|---------------------------|---------------------------------------------------------------------------------|------------------------------------------|
| `.update_options` | Re-renders the chart after updating specific options. | `new_options` - object containing new options. |
| `.change_view_mode` | Updates the view mode. | `view_mode` - Name of view mode _or_ view mode object (see above) and `maintain_pos` - whether to go back to current scroll position after rerendering, defaults to `false`. |
| `.scroll_current` | Scrolls to the current date | No parameters. |
| `.update_task` | Re-renders a specific task bar alone | `task_id` - id of task and `new_details` - object containing the task properties to be updated. |

## Development Setup
If you want to contribute enhancements or fixes:

1. Clone this repo.
2. `cd` into project directory
3. `yarn`
4. `yarn run dev`
5. Open `index.html` in your browser, make your code changes and test them.

### Publishing
If you have publishing rights (Frappe Team), follow these steps to publish a new version.

Assuming the last commit (or a couple of commits) were enhancements or fixes,

1. Run `yarn build`

This will generate files in the `dist/` folder. These files need to be committed.
1. Run `yarn publish`
1. Type the new version at the prompt

Depending on the type of change, you can either bump the patch version or the minor version.
For e.g.,
```
0.5.0 -> 0.6.0 (minor version bump)
0.5.0 -> 0.5.1 (patch version bump)
```
1. Now, there will be a commit named after the version you just entered. Include the generated files in `dist/` folder as part of this commit by running the command:
```
git add dist
git commit --amend
git push origin master
```

License: MIT

------------------
Project maintained by [frappe](https://github.com/frappe)
2. `cd` into project directory.
3. Run `pnpm i` to install dependencies.
4. `pnpm run build` to build files - or `pnpm run build-dev` to build and watch for changes.
5. Open `index.html` in your browser.
6. Make your code changes and test them.

<br />
<br />
<div align="center" style="padding-top: 0.75rem;">
<a href="https://frappe.io" target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://frappe.io/files/Frappe-white.png">
<img src="https://frappe.io/files/Frappe-black.png" alt="Frappe Technologies" height="28"/>
</picture>
</a>
</div>
Loading