forked from mui/material-ui-pickers
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* newdev: (671 commits) Re-implement based from v3.2.4 - fix issue yyyy case sensitive / unexpected TODO from year selector v3.2.4 Restore support of lib instnace (mui#1281) Fix ts error and formik example (mui#1280) v3.2.3 Update patrons list Add mention of renamed `moment` property (mui#1268) [a11y] Open picker by space click (mui#1266) Do not allow input any chars when value is nul (mui#1265) Dispatch onChange before onClose (mui#1264) Refactor wrapping <Picker /> in state to be 1 component (mui#1263) [InlineWrapper]: Don't force any width on the paper (mui#1248) (mui#1261) Remove direct `@material-ui/core` imports. (mui#1252) [docs] Fix typo in date-fns localization title Fix direct @material-ui/core imports (mui#1236) Update prop-types.json Ovveride keyboard datepicker onChange date type [docs] Show DateIOType instead of anys (mui#1228) Update release script v3.2.2 ... # Conflicts: # README.md # docs/src/Examples/Demo/DatePicker/BasicDatePicker.jsx # docs/src/Examples/Demo/DatePicker/InlineDatePicker.jsx # docs/src/Examples/Demo/DateTimePicker/BasicDateTimePicker.jsx # docs/src/Examples/Demo/DateTimePicker/InlineDateTimePicker.jsx # lib/package.json # lib/src/DatePicker/DatePicker.jsx # lib/src/DatePicker/DatePickerInline.jsx # lib/src/DatePicker/DatePickerModal.jsx # lib/src/DatePicker/components/Calendar.jsx # lib/src/DatePicker/components/CalendarHeader.jsx # lib/src/DatePicker/components/YearSelection.jsx # lib/src/DateTimePicker/DateTimePicker.jsx # lib/src/DateTimePicker/DateTimePickerInline.jsx # lib/src/DateTimePicker/DateTimePickerModal.jsx # lib/src/DateTimePicker/components/DateTimePickerHeader.jsx # lib/src/_shared/DateTextField.jsx
- Loading branch information
Showing
601 changed files
with
36,660 additions
and
41,690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
#################### | ||
# Defaults | ||
#################### | ||
defaults: &js_defaults | ||
docker: | ||
- image: circleci/node:lts | ||
environment: | ||
## this enables colors in the output | ||
TERM: xterm | ||
working_directory: ~/material-ui-pickers | ||
|
||
version: 2.1 | ||
orbs: | ||
cypress: cypress-io/[email protected] | ||
|
||
#################### | ||
# Custom jobs | ||
#################### | ||
jobs: | ||
checkout_code: | ||
<<: *js_defaults | ||
steps: | ||
- checkout | ||
- persist_to_workspace: | ||
root: . | ||
paths: . | ||
|
||
javascript: | ||
<<: *js_defaults | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
name: Restore Cache | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Install Dependencies | ||
command: yarn install --frozen-lockfile | ||
- save_cache: | ||
name: Save Cache | ||
key: yarn-packages-{{ checksum "yarn.lock" }} | ||
paths: | ||
- ~/.cache | ||
|
||
- run: | ||
name: Typescript | ||
command: yarn workspaces run build:typescript | ||
- run: | ||
name: Eslint | ||
command: yarn lint | ||
- run: | ||
name: Ensure prettier was run | ||
command: yarn prettier --check './**/*.ts*' './**/*.js*' | ||
- run: | ||
name: Build and analyze bundlesize | ||
command: yarn workspace @material-ui/pickers build:analyze | ||
|
||
- persist_to_workspace: | ||
root: . | ||
paths: . | ||
|
||
jest_tests: | ||
description: Running jest test with separate library | ||
parameters: | ||
lib: | ||
description: "Library to run tests" | ||
type: string | ||
after-tests: | ||
description: "Steps that will be executed after test run is finished" | ||
type: steps | ||
default: [] | ||
<<: *js_defaults | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
# --runInBand required to not get out of memory @see https://discuss.circleci.com/t/memory-problems-with-jest-and-workers/10297 | ||
- run: cd lib && yarn test:<<parameters.lib>> -- -- --runInBand | ||
- steps: << parameters.after-tests >> | ||
|
||
cypress_tests: | ||
description: Run cypress tests | ||
executor: cypress/browsers-chrome69 | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
name: Restore Cache | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Additional yarn install | ||
command: yarn install --frozen-lockfile | ||
- run: | ||
name: Install, if no cypress binary found | ||
command: yarn cypress install | ||
- run: yarn workspace docs build | ||
- run: | ||
background: true | ||
name: Run docs in background | ||
command: yarn workspace docs start | ||
environment: | ||
VISUAL_TESTING: true | ||
- run: npx wait-on http://localhost:3000 | ||
- run: yarn percy exec -- cypress run --record | ||
|
||
#################### | ||
# Workflow | ||
#################### | ||
workflows: | ||
build_and_test: | ||
jobs: | ||
- checkout_code | ||
- javascript: | ||
name: 'Install deps, lint and build' | ||
requires: | ||
- checkout_code | ||
|
||
- cypress_tests: | ||
name: 'Cypress tests' | ||
requires: | ||
- checkout_code | ||
|
||
- jest_tests: | ||
name: 'Date-fns jest tests' | ||
lib: date-fns | ||
after-tests: | ||
- run: npx codecov | ||
requires: | ||
- 'Install deps, lint and build' | ||
|
||
- jest_tests: | ||
name: 'Moment jest tests' | ||
lib: moment | ||
requires: | ||
- 'Install deps, lint and build' | ||
|
||
- jest_tests: | ||
name: 'Luxon jest tests' | ||
lib: luxon | ||
requires: | ||
- 'Install deps, lint and build' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'prettier/react', | ||
'prettier/@typescript-eslint', | ||
], | ||
plugins: ['react', 'react-hooks', 'pretty-imports', '@typescript-eslint'], | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 0, | ||
'@typescript-eslint/explicit-member-accessibility': 0, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
// in scripts and config files it's required to use dynamic require | ||
'@typescript-eslint/no-var-requires': 0, | ||
'react/no-children-prop': 0, | ||
'react/jsx-uses-vars': 2, | ||
'react/jsx-uses-react': 2, | ||
'pretty-imports/sorted': 'warn', | ||
'@typescript-eslint/no-use-before-define': 'warn', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ vars: 'all', args: 'after-used', argsIgnorePattern: '^_', ignoreRestSiblings: true }, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: dmtrKovalenko | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
custom: # Replace with a single custom sponsorship URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,44 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
<!-- Thanks so much for your time taking to open an issue, your work is appreciated! ❤️ --> | ||
|
||
<!-- If you don't mind add a fun gif or meme, but no pressure --> | ||
|
||
![A GIF or MEME to give some spice of the internet](url) | ||
|
||
## Environment | ||
|
||
| Tech | Version | | ||
|---------------------|---------| | ||
| material-ui-pickers | | | ||
| material-ui | | | ||
| React | | | ||
| Browser | | | ||
| Peer library | | <!-- date-fns, luxon or moment and version --> | ||
| Tech | Version | | ||
| -------------------- | ------- | | ||
| @material-ui/pickers | | | ||
| material-ui | | | ||
| React | | | ||
| Browser | | | ||
| Peer library | | <!-- date-fns, luxon or moment and version --> | | ||
|
||
## Steps to reproduce | ||
1. | ||
2. | ||
3. | ||
|
||
1. 2. 3. | ||
|
||
## Expected behavior | ||
|
||
<!-- What behavior do you expect? --> | ||
|
||
## Actual behavior | ||
|
||
<!-- What behavior do you see? --> | ||
|
||
## Live example | ||
|
||
<!-- | ||
Live examples help us to investigate bugs and save our time. | ||
Please try to make this example as simple as possible. | ||
To create an example you can use this playground: | ||
https://codesandbox.io/s/6wxqo5mxnz | ||
Live examples help us to investigate bugs and save our time. | ||
Please try to make this example as simple as possible. | ||
To create an example you can fork this playground: | ||
https://codesandbox.io/s/o7oojxx1pq | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node-modules/ | ||
build/ | ||
coverage/ | ||
*.mp4 | ||
.next | ||
docs/prop-types.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"printWidth": 100 | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:3000", | ||
"webRoot": "${workspaceFoler}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"cSpell.words": ["Formik", "Notistack", "Sourcable", "patreon"], | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
{ | ||
"language": "typescript", | ||
"autoFix": true | ||
}, | ||
{ | ||
"language": "typescriptreact", | ||
"autoFix": true | ||
} | ||
], | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"javascript.implicitProjectConfig.checkJs": true | ||
} |
Oops, something went wrong.