-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update dependency @mui/x-date-pickers to v6 #213
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
17de85b
Update dependency @mui/x-date-pickers to v6
renovate[bot] 5ea31f8
Install @mui/core & apply v6 migration
kennethnym 4b47864
Forgot to commit modified yarn lock files
kennethnym 3636900
Revert @mui/base install
kennethnym 6114409
Install @mui/base again
kennethnym e1f879d
Migrate usages of DateTimePicker to v6
kennethnym bcdd2e6
extract custom text field component from slots
kaperoo bbd9568
Fix bug in @mui/x-date-pickers via `yarn patch`
louise-davies 931c545
fix some unit tests for date pickers
kaperoo ef6c107
Merge branch 'develop' into renovate/mui-x-date-pickers-6.x
kaperoo c993fe2
Merge branch 'renovate/mui-x-date-pickers-6.x' of https://github.com/…
kaperoo e2e2d51
fix merge error
kaperoo 7586520
fix unit tests for searchBar component
kaperoo c29404c
fixed e2e search tests
kaperoo 28463a5
updated snapshots for plotting playwright tests
kaperoo fda5f36
Revert "updated snapshots for plotting playwright tests"
kaperoo c50a375
playwright fix and code clean-up
kaperoo e24ebbb
Refactor date-picker tests
kaperoo 78157c2
added missing custom day to dayTime component
kaperoo b4411e8
Close picker when clicked away + unify action bar buttons
kaperoo bb45fdb
Merge branch 'develop' into renovate/mui-x-date-pickers-6.x
kaperoo d144ca5
Merge branch 'develop' into renovate/mui-x-date-pickers-6.x
louise-davies e66adbb
Add 'today' button to to-date pickers
kaperoo 0fe7d8f
Update @mui/x-date-pickers & patch to latest version
louise-davies 2d627e8
update unit tests + snapshots
kaperoo 43a4ca6
fix cypress tests
kaperoo d94af0b
remove commented out code
kaperoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.7 KB
.yarn/cache/@floating-ui-react-dom-npm-2.0.4-e347c2e4b4-91b2369e25.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions
31
.yarn/patches/@mui-x-date-pickers-npm-6.18.1-79bdefe4ec.patch
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,31 @@ | ||
diff --git a/internals/hooks/useField/useField.js b/internals/hooks/useField/useField.js | ||
index 10a6c2874e2acdf072cd05de26711d704332ada1..30499fd39c69812775a48d8aa3d4ba6812eeb9c3 100644 | ||
--- a/internals/hooks/useField/useField.js | ||
+++ b/internals/hooks/useField/useField.js | ||
@@ -333,7 +333,7 @@ export const useField = params => { | ||
// On multi input range pickers we want to update selection range only for the active input | ||
// This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003 | ||
// because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425 | ||
- if (inputRef.current === getActiveElement(document)) { | ||
+ if (inputRef.current === getActiveElement(inputRef.current.ownerDocument)) { | ||
inputRef.current.setSelectionRange(selectionStart, selectionEnd); | ||
} | ||
// Even reading this variable seems to do the trick, but also setting it just to make use of it | ||
@@ -360,7 +360,7 @@ export const useField = params => { | ||
|
||
React.useEffect(() => { | ||
// Select the right section when focused on mount (`autoFocus = true` on the input) | ||
- if (inputRef.current && inputRef.current === document.activeElement) { | ||
+ if (inputRef.current && inputRef.current === inputRef.current.ownerDocument.activeElement) { | ||
setSelectedSections('all'); | ||
} | ||
return () => window.clearTimeout(focusTimeoutRef.current); | ||
@@ -390,7 +390,7 @@ export const useField = params => { | ||
} | ||
return 'numeric'; | ||
}, [selectedSectionIndexes, state.sections]); | ||
- const inputHasFocus = inputRef.current && inputRef.current === getActiveElement(document); | ||
+ const inputHasFocus = inputRef.current && inputRef.current === getActiveElement(inputRef.current.ownerDocument); | ||
const areAllSectionsEmpty = valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue); | ||
const shouldShowPlaceholder = !inputHasFocus && areAllSectionsEmpty; | ||
React.useImperativeHandle(unstableFieldRef, () => ({ |
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
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 |
---|---|---|
|
@@ -7,10 +7,11 @@ | |
"@emotion/cache": "11.11.0", | ||
"@emotion/react": "11.11.1", | ||
"@emotion/styled": "11.11.0", | ||
"@mui/base": "5.0.0-beta.12", | ||
"@mui/icons-material": "5.14.16", | ||
"@mui/material": "5.14.16", | ||
"@mui/system": "5.14.16", | ||
"@mui/x-date-pickers": "5.0.7", | ||
"@mui/x-date-pickers": "6.18.1", | ||
"@reduxjs/toolkit": "1.9.0", | ||
"@tanstack/react-query": "4.29.5", | ||
"@tanstack/react-query-devtools": "4.29.6", | ||
|
@@ -47,7 +48,8 @@ | |
"resolutions": { | ||
"@typescript-eslint/eslint-plugin": "6.2.1", | ||
"@typescript-eslint/parser": "6.2.1", | ||
"@testing-library/react/@testing-library/dom": "9.3.1" | ||
"@testing-library/react/@testing-library/dom": "9.3.1", | ||
"@mui/[email protected]": "patch:@mui/x-date-pickers@npm%3A6.18.1#./.yarn/patches/@mui-x-date-pickers-npm-6.18.1-79bdefe4ec.patch" | ||
}, | ||
"scripts": { | ||
"lint:js": "eslint --max-warnings=0 --ext=tsx --ext=ts --ext=js --ext=jsx --fix ./src", | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this added? Maybe we can remove it? Unless it was needed for the patch...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added in this commit: 6114409. It seems to be needed for the patch, as the code won't compile without it.