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

Render Tile as div when there is no onClick #221

Open
wants to merge 137 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
be543ba
Render Tile as div when there is no onClick
felixmosh Jul 30, 2019
495e6a0
Update get-user-locale package
wojtekmaj Aug 12, 2019
1289a20
Update ESLint to 6.x and eslint-config-aribnb to latest
wojtekmaj Aug 12, 2019
3bdb6e7
v2.19.1
wojtekmaj Aug 12, 2019
42eb2e1
Enable & enforce react/sort-comp ESLint rule
wojtekmaj Aug 12, 2019
a001d8b
Remove prefer-destructuring and prefer-spread ESLint rule overwrites
wojtekmaj Aug 12, 2019
aeee44d
Bump eslint-utils from 1.3.1 to 1.4.2 (#231)
dependabot[bot] Aug 27, 2019
5ba27d6
Update Babel to version 7.5.5
wojtekmaj Sep 6, 2019
59d7f5b
v2.19.2
wojtekmaj Sep 6, 2019
9b37634
Add "Before you continue" section in documentation
wojtekmaj Sep 26, 2019
8f8eaba
[breaking] Remove react-lifecycles-compat polyfill (#219)
wojtekmaj Sep 26, 2019
e4f9efe
[breaking] Implement controlled component support (#217)
wojtekmaj Sep 26, 2019
a3c83e8
Fix year not being properly localized in th-TH locale, add formatYear…
wojtekmaj Sep 26, 2019
ea8e45b
Update documentation with new props
wojtekmaj Sep 26, 2019
3c813ed
Fix crash when setting an invalid date
wojtekmaj Sep 26, 2019
5d8aaf2
Add default color for today's tile
wojtekmaj Sep 26, 2019
6dc259d
Implement showDoubleView prop (#248)
wojtekmaj Sep 26, 2019
646f91b
Upgrade Parcel to ^1.12.4
wojtekmaj Oct 6, 2019
f99ccd3
Add .DS_Store to .gitignore
wojtekmaj Oct 15, 2019
79610b6
Update rimraf
wojtekmaj Oct 16, 2019
e5b7ae6
Optimize dates utils (#259)
wojtekmaj Oct 17, 2019
195d3c6
Add consts, optimize dates utils for size
wojtekmaj Oct 17, 2019
d509e64
Move tests to *.spec.js (#261)
wojtekmaj Oct 19, 2019
d596603
Change defaultProps values to default params on React functional comp…
AlbertCarreras Nov 3, 2019
a78a4b6
Add Alberto Carreras to contributors
wojtekmaj Nov 3, 2019
fdb460a
Fix makeGetEnd noot used in getEndOfDecade
wojtekmaj Nov 3, 2019
34a6bec
Update FUNDING.yml
wojtekmaj Nov 5, 2019
ca8f636
Use @wojtekmaj/date-utils package (#270)
wojtekmaj Nov 10, 2019
0fa483c
Remove TypeScript typings (#272)
wojtekmaj Nov 11, 2019
389cc71
Create ESM builds (#249)
wojtekmaj Nov 11, 2019
91cb106
v3.0.0-beta
wojtekmaj Nov 11, 2019
9f8d204
Add activeStartDate to tileClassName, tileContent
wojtekmaj Nov 11, 2019
5126dcc
Fix unit tests for tileContent
wojtekmaj Nov 12, 2019
875e311
[breaking] Add formatMonthYear to Month abbr
wojtekmaj Nov 12, 2019
b4dd1cb
Add formatLongDate overwrite
wojtekmaj Nov 12, 2019
ce4ad29
Add unit tests for other formatters
wojtekmaj Nov 12, 2019
f8f399b
Add views getter to reduce code duplication
wojtekmaj Nov 12, 2019
c64f758
Simplify extracting props to avoid code duplication
wojtekmaj Nov 12, 2019
a4ed621
Bump minimum React version to 16.3
wojtekmaj Nov 12, 2019
9e0350e
Remove code duplication (#277)
wojtekmaj Nov 16, 2019
d920d51
v3.0.0-beta.2
wojtekmaj Nov 16, 2019
7e8b38a
Fix link to 2.x docs
wojtekmaj Nov 26, 2019
1fce7dc
Refactor unit tests
wojtekmaj Dec 8, 2019
a3e1134
Add unit tests
wojtekmaj Dec 8, 2019
bbcc3d9
Fix defaultValue, defaultActiveStartDate and defaultView ignored when…
wojtekmaj Dec 8, 2019
e63443d
Add unit tests for derived calendarType value
wojtekmaj Dec 8, 2019
882b195
Add cross-env for multi-platform builds
wojtekmaj Dec 8, 2019
edd371b
v3.0.0-beta.3
wojtekmaj Dec 8, 2019
a0e674b
Simplify logic of drillUp/drillDown (#285)
wojtekmaj Dec 11, 2019
a4db8ec
Extract variable instead of calling this.valueType twice (#286)
wojtekmaj Dec 11, 2019
da9f9c5
Don't repeat the same arguments list twice (#287)
wojtekmaj Dec 11, 2019
3e22902
Remove mergeFunctions util (#284)
wojtekmaj Dec 11, 2019
c3f806c
[breaking] Remove backwards compatibility with renderChildren (#283)
wojtekmaj Dec 11, 2019
a830140
Simplify get value logic (#288)
wojtekmaj Dec 11, 2019
8aadd6a
Don't call getLimitedViews when we already have the result (#289)
wojtekmaj Dec 11, 2019
54382dc
Add getValue helper (#290)
wojtekmaj Dec 11, 2019
85483ff
v3.0.0-beta.4
wojtekmaj Dec 11, 2019
d6a5bd6
Expose events in onChange, onClick* functions (#291)
wojtekmaj Dec 14, 2019
52badc4
Add unit tests
wojtekmaj Dec 14, 2019
890bf9f
Refactor getCalendarTypeFromLocale
wojtekmaj Dec 14, 2019
b355a85
Extract variable for clarity
wojtekmaj Dec 14, 2019
fc3797e
Fix PropType disallowing strings in WeekNumber
wojtekmaj Dec 14, 2019
417355f
[breaking] Don't import styles by default
wojtekmaj Dec 15, 2019
9bb4864
v3.0.0-beta.5
wojtekmaj Dec 21, 2019
44647e3
Fix falsy prop value overwritten by state value
wojtekmaj Dec 21, 2019
c7a1fb9
Fix test suite after entry file change
wojtekmaj Dec 22, 2019
38baf46
Bump handlebars from 4.1.2 to 4.5.3 (#301)
dependabot[bot] Dec 28, 2019
bb7ff74
Group tests in describe()
wojtekmaj Jan 16, 2020
befa19f
Add new tests for activeStartDate change
wojtekmaj Jan 16, 2020
a8e6dd4
Change mount() to shallow() in tests
wojtekmaj Jan 16, 2020
845a822
Fix activeStartDate not being called on value change (#322)
wojtekmaj Feb 27, 2020
5e3c375
Remove unrelated propTypes from MonthView
wojtekmaj Feb 27, 2020
66b90cc
Fix dateTransform handling dates in year < 100
wojtekmaj Feb 27, 2020
e2ea942
Update @wojtekmaj/date-utils to ^1.0.2
wojtekmaj Feb 28, 2020
8fbc4c9
Add locale to navigationLabel (#317)
zorfling Mar 2, 2020
bc1e818
Reorder arguments
wojtekmaj Mar 2, 2020
254fc3d
v3.0.0-beta.6
wojtekmaj Mar 2, 2020
2555986
Specify that an array passed to`value` and `defaultValue` props must …
wojtekmaj Mar 5, 2020
ca188e5
v3.0.0
wojtekmaj Mar 9, 2020
9612ec8
Change arrow functions to normal functions
wojtekmaj Mar 12, 2020
ae3a3a2
Bump acorn from 5.7.3 to 5.7.4 (#336)
dependabot[bot] Mar 15, 2020
7b7dce0
Reduce function complexity
wojtekmaj Mar 16, 2020
4ea23ad
Update dependencies
wojtekmaj Mar 16, 2020
39f77eb
Update Jest to 25
wojtekmaj Mar 16, 2020
d0066cb
Update cross-env
wojtekmaj Mar 16, 2020
07d7ec9
Update ESLint rules
wojtekmaj Mar 16, 2020
184c31e
Update mkdirp & minimist dependencies
wojtekmaj Mar 22, 2020
ca7ecb4
Don't call onActiveStartDateChange, onViewChange, onChange if the val…
wojtekmaj Mar 29, 2020
605a5c4
v3.0.1
wojtekmaj Mar 29, 2020
c2df16c
Remove duplicate test
wojtekmaj Mar 30, 2020
209cbea
Refactor processing values (#349)
wojtekmaj Mar 30, 2020
303705f
Ensure activeStartDate in calendar views is the beginning of the view
wojtekmaj Mar 31, 2020
9acd4ee
Update Babel to 7.9.0
wojtekmaj Apr 15, 2020
48d6bd2
Explain hiding icons (#364)
valtism Apr 23, 2020
80c5589
Add tests that ensure the calendar is correct when setting activeStar…
ksoldau Apr 30, 2020
546ce2d
Get rid of callIfDefined() in favor of a simple if()
wojtekmaj May 1, 2020
2ae62aa
Update badges
wojtekmaj May 4, 2020
dc5f7f2
Update eslint-plugin-react-hooks
wojtekmaj May 11, 2020
f435008
Upgrade Jest to v26
wojtekmaj May 11, 2020
b552067
Update README.md
wojtekmaj May 14, 2020
83157f6
Add support for allowPartialRange (#351)
wojtekmaj May 15, 2020
e939b1f
Add class names to Navigation label items to allow custom styling (#333)
zigotica May 15, 2020
1291049
Add Sergi Meseguer to contributors
wojtekmaj May 15, 2020
09445f0
Add hoverStart/hoverEnd CSS classes to style hovered date range (#373)
bywo May 15, 2020
f1106e6
Fixed re-rendering issue in Calendar component (#300)
UtkarshPramodGupta May 15, 2020
56dc2e6
v3.1.0
wojtekmaj May 15, 2020
13b3bbb
Rewrite basic usage example to hooks
wojtekmaj May 15, 2020
0b78d7e
Simplify unit test
wojtekmaj May 27, 2020
6431263
Add unit test for inherited activeStartDate value
wojtekmaj May 27, 2020
61df682
Fix too complex propTypes for prevLabel, nextLabel
wojtekmaj May 27, 2020
b2be72d
Add value to onActiveStartDateChange and onViewChange callbacks argum…
wojtekmaj May 28, 2020
29c47d9
Add event to onChange callback (#388)
wojtekmaj Jun 11, 2020
d7ebfa4
Update ESLint & eslint-config-airbnb
wojtekmaj Jun 23, 2020
1d4b37e
Bump lodash from 4.17.15 to 4.17.19 (#406)
dependabot[bot] Jul 17, 2020
0b3adad
Improve wording
wojtekmaj Jul 23, 2020
fd70afc
Update `sideEffects` property for webpack 4 (#402)
Noor0 Jul 24, 2020
9cc2a17
Add funding to package.json
wojtekmaj Jul 26, 2020
0da6ef4
Add link to Travis CI
wojtekmaj Aug 4, 2020
03b6741
Turn on jest env in test files only
wojtekmaj Aug 10, 2020
1dc5ad0
Add links to React-Calendar Wiki
wojtekmaj Aug 27, 2020
0af813a
Bump yargs-parser from 18.1.1 to 18.1.3 (#427)
dependabot[bot] Sep 7, 2020
5ef6215
Allow two-letter locales to be used in test
wojtekmaj Sep 10, 2020
0204c8d
Upgrade Yarn to Yarn Berry (v2) (#430)
wojtekmaj Sep 11, 2020
058b518
Replace Parcel with Webpack 5 (#432)
wojtekmaj Sep 11, 2020
9fb0011
Fix build command not working on some operating systems
wojtekmaj Sep 11, 2020
fd70f40
Hide previous/next button when prevLabel/nextLabel is set to null (#436)
wojtekmaj Sep 16, 2020
a2d8f7e
Add unit test for wrapper class name
wojtekmaj Oct 16, 2020
ff963d1
Reorder propTypes in alphabetical order
wojtekmaj Oct 16, 2020
dd4e105
Add support for inputRef prop
wojtekmaj Oct 16, 2020
0f29f20
v3.2.0
wojtekmaj Nov 5, 2020
fdd5db4
Remove unnecessary Babel override
wojtekmaj Nov 5, 2020
bd84b39
Remove arrow-parens rule override
wojtekmaj Nov 6, 2020
132d31f
Replace eslint-config-airbnb with eslint-config-wojtekmaj
wojtekmaj Nov 6, 2020
fac45f7
Replace Travis CI with GitHub Actions
wojtekmaj Nov 6, 2020
b5f7f84
Remove CodeClimate integration
wojtekmaj Nov 6, 2020
eb5024c
Update eslint-config-wojtekmaj
wojtekmaj Nov 6, 2020
5d5827f
Remove unnecessary cross-env dependency
wojtekmaj Nov 6, 2020
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
10 changes: 9 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@
],
"plugins": [
"@babel/proposal-class-properties"
]
],
"env": {
"production-esm": {
"presets": [
["@babel/env", { "modules": false }],
"@babel/react"
]
}
}
}
15 changes: 0 additions & 15 deletions .codeclimate.yml

This file was deleted.

19 changes: 2 additions & 17 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
{
"extends": "airbnb",
"env": {
"browser": true,
"es6": true,
"jest": true
},
"extends": "wojtekmaj/react",
"parser": "babel-eslint",
"rules": {
"jsx-a11y/label-has-associated-control": ["error", { "required": { "some": ["id", "nesting"] }}],
"jsx-a11y/label-has-for": ["error", { "required": { "some": ["id", "nesting"] }}],
"no-restricted-globals": "off",
"prefer-destructuring": "warn",
"prefer-spread": "warn",
"react/jsx-sort-props": ["error", {
"reservedFirst": ["key"]
}],
"react/require-default-props": "off",
"react/sort-comp": "off",
"react/sort-prop-types": "error"
"no-restricted-globals": "off"
},
"overrides": [
{
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: wojtekmaj
open_collective: react-calendar
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies and run tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI

on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: Install dependencies
run: yarn --immutable

- name: Run tests
run: yarn test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.DS_Store
.cache
.idea
.vscode
.DS_STORE
**/.yarn/*
!**/.yarn/releases
!**/.yarn/plugins
dist
coverage
node_modules
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .yarn/releases/yarn-2.2.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-2.2.2.cjs
105 changes: 62 additions & 43 deletions README.md

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions copy-types.js

This file was deleted.

4 changes: 0 additions & 4 deletions entry.nostyle.d.ts

This file was deleted.

86 changes: 0 additions & 86 deletions index.d.ts

This file was deleted.

64 changes: 35 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{
"name": "react-calendar",
"version": "2.19.0",
"version": "3.2.0",
"description": "Ultimate calendar for your React app.",
"main": "dist/entry.js",
"source": "src/entry.js",
"types": "./index.d.ts",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
"source": "src/index.js",
"sideEffects": [
"*.css",
"*.less"
],
"scripts": {
"build": "yarn build-js && yarn copy-styles && yarn build-styles && yarn copy-types",
"build-js": "babel src -d dist --ignore **/__tests__,**/**/__tests__",
"build": "yarn build-js-all && yarn copy-styles && yarn build-styles",
"build-js-all": "yarn build-js-esm && yarn build-js-umd",
"build-js-esm": "BABEL_ENV=production-esm babel src -d dist/esm --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"build-js-umd": "BABEL_ENV=production-umd babel src -d dist/umd --ignore \"**/*.spec.js,**/*.spec.jsx\"",
"build-styles": "lessc ./dist/Calendar.less ./dist/Calendar.css",
"clean": "rimraf dist",
"copy-styles": "node ./copy-styles.js",
"copy-types": "node ./copy-types.js",
"jest": "jest",
"jest-coverage": "jest --coverage",
"lint": "eslint sample/ src/ test/ --ext .jsx,.js",
Expand All @@ -24,8 +29,7 @@
],
"collectCoverageFrom": [
"**/src/**.{js,jsx}",
"!**/src/entry.js",
"!**/src/entry.nostyle.js"
"!**/src/index.js"
]
},
"keywords": [
Expand All @@ -40,6 +44,9 @@
"email": "[email protected]"
},
"contributors": [
{
"name": "Alberto Carreras"
},
{
"name": "Andriy Kuzyk"
},
Expand All @@ -62,50 +69,49 @@
{
"name": "Ritesh Kumar",
"email": "[email protected]"
},
{
"name": "Sergi Meseguer"
}
],
"license": "MIT",
"dependencies": {
"get-user-locale": "^1.1.1",
"@wojtekmaj/date-utils": "^1.0.2",
"get-user-locale": "^1.2.0",
"merge-class-names": "^1.1.1",
"prop-types": "^15.6.0",
"react-lifecycles-compat": "^3.0.4"
"prop-types": "^15.6.0"
},
"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.5.0",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/preset-env": "^7.5.0",
"@babel/preset-react": "^7.0.0",
"@babel/cli": "^7.8.0",
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.0",
"babel-eslint": "^10.0.0",
"babel-jest": "^24.0.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.14.2",
"jest": "^24.8.0",
"eslint": "^7.12.0",
"eslint-config-wojtekmaj": "^0.5.0",
"jest": "^26.0.0",
"less": "^3.8.1",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-test-renderer": "^16.7.0",
"rimraf": "^2.6.2"
"rimraf": "^3.0.0"
},
"peerDependencies": {
"react": ">=15.5",
"react-dom": ">=15.5"
"react": ">=16.3",
"react-dom": ">=16.3"
},
"files": [
"LICENSE",
"README.md",
"index.d.ts",
"dist/",
"src/"
],
"repository": {
"type": "git",
"url": "https://github.com/wojtekmaj/react-calendar.git"
}
},
"funding": "https://github.com/wojtekmaj/react-calendar?sponsor=1"
}
2 changes: 1 addition & 1 deletion sample/parcel-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"@types/react": "^16.8.22",
"@types/react-dom": "^16.8.4",
"parcel-bundler": "1.12.2",
"parcel-bundler": "^1.12.4",
"tslint": "^5.18.0",
"tslint-config-airbnb": "^5.11.1",
"typescript": "^3.5.2"
Expand Down
2 changes: 1 addition & 1 deletion sample/parcel/Sample.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Sample extends Component {
value: new Date(),
}

onChange = value => this.setState({ value })
onChange = (value) => this.setState({ value })

render() {
const { value } = this.state;
Expand Down
8 changes: 4 additions & 4 deletions sample/parcel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"react-dom": "^16.5.0"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/preset-env": "^7.5.0",
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"parcel-bundler": "1.12.2"
"parcel-bundler": "^1.12.4"
}
}
Loading