Skip to content

Commit

Permalink
Update @mui/x-date-pickers & patch to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
louise-davies committed Nov 21, 2023
1 parent e66adbb commit 47e0bcc
Show file tree
Hide file tree
Showing 13 changed files with 157 additions and 120 deletions.
123 changes: 87 additions & 36 deletions .pnp.cjs

Large diffs are not rendered by default.

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.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/internals/hooks/useField/useField.js b/internals/hooks/useField/useField.js
index 683308eb3ef54eec1aa68af907681d61bafb92b5..505be6f20a05301aa6a6479bbc2489317f95d8ce 100644
index 10a6c2874e2acdf072cd05de26711d704332ada1..30499fd39c69812775a48d8aa3d4ba6812eeb9c3 100644
--- a/internals/hooks/useField/useField.js
+++ b/internals/hooks/useField/useField.js
@@ -315,7 +315,7 @@ export const useField = params => {
@@ -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 avoiding the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
// 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
@@ -342,7 +342,7 @@ export const useField = params => {
@@ -360,7 +360,7 @@ export const useField = params => {

React.useEffect(() => {
// Select the right section when focused on mount (`autoFocus = true` on the input)
Expand All @@ -20,12 +20,12 @@ index 683308eb3ef54eec1aa68af907681d61bafb92b5..505be6f20a05301aa6a6479bbc248931
setSelectedSections('all');
}
return () => window.clearTimeout(focusTimeoutRef.current);
@@ -372,7 +372,7 @@ export const useField = params => {
@@ -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 shouldShowPlaceholder = !inputHasFocus && valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue);
const areAllSectionsEmpty = valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue);
const shouldShowPlaceholder = !inputHasFocus && areAllSectionsEmpty;
React.useImperativeHandle(unstableFieldRef, () => ({
getSections: () => state.sections,
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@mui/icons-material": "5.14.16",
"@mui/material": "5.14.16",
"@mui/system": "5.14.16",
"@mui/x-date-pickers": "6.11.1",
"@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",
Expand Down Expand Up @@ -49,7 +49,7 @@
"@typescript-eslint/eslint-plugin": "6.2.1",
"@typescript-eslint/parser": "6.2.1",
"@testing-library/react/@testing-library/dom": "9.3.1",
"@mui/x-date-pickers@6.11.1": "patch:@mui/x-date-pickers@npm%3A6.11.1#./.yarn/patches/@mui-x-date-pickers-npm-6.11.1-1d7715e78a.patch"
"@mui/x-date-pickers@6.18.1": "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",
Expand Down
136 changes: 61 additions & 75 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2":
"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.19.4, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2":
version: 7.22.10
resolution: "@babel/runtime@npm:7.22.10"
dependencies:
Expand Down Expand Up @@ -2061,6 +2061,18 @@ __metadata:
languageName: node
linkType: hard

"@floating-ui/react-dom@npm:^2.0.4":
version: 2.0.4
resolution: "@floating-ui/react-dom@npm:2.0.4"
dependencies:
"@floating-ui/dom": ^1.5.1
peerDependencies:
react: ">=16.8.0"
react-dom: ">=16.8.0"
checksum: 91b2369e25f84888486e48c1656117468248906034ed482d411bb9ed1061b908dd32435b4ca3d0cd0ca6083291510a98ce74d76c671d5cc25b0c41e5fa824bae
languageName: node
linkType: hard

"@floating-ui/utils@npm:^0.1.1":
version: 0.1.1
resolution: "@floating-ui/utils@npm:0.1.1"
Expand Down Expand Up @@ -2587,6 +2599,28 @@ __metadata:
languageName: node
linkType: hard

"@mui/base@npm:^5.0.0-beta.22":
version: 5.0.0-beta.24
resolution: "@mui/base@npm:5.0.0-beta.24"
dependencies:
"@babel/runtime": ^7.23.2
"@floating-ui/react-dom": ^2.0.4
"@mui/types": ^7.2.9
"@mui/utils": ^5.14.18
"@popperjs/core": ^2.11.8
clsx: ^2.0.0
prop-types: ^15.8.1
peerDependencies:
"@types/react": ^17.0.0 || ^18.0.0
react: ^17.0.0 || ^18.0.0
react-dom: ^17.0.0 || ^18.0.0
peerDependenciesMeta:
"@types/react":
optional: true
checksum: dbd6eb0af7cb89389b1dccd6a84d07128c41f60d297d8f1d484919950c9b45a5d8767042b622c74e311bce0368ee3f760afb34d80ad97af61f5b5650ae990c60
languageName: node
linkType: hard

"@mui/core-downloads-tracker@npm:^5.14.16":
version: 5.14.16
resolution: "@mui/core-downloads-tracker@npm:5.14.16"
Expand Down Expand Up @@ -2709,7 +2743,7 @@ __metadata:
languageName: node
linkType: hard

"@mui/types@npm:^7.2.4":
"@mui/types@npm:^7.2.4, @mui/types@npm:^7.2.9":
version: 7.2.9
resolution: "@mui/types@npm:7.2.9"
peerDependencies:
Expand Down Expand Up @@ -2751,19 +2785,21 @@ __metadata:
languageName: node
linkType: hard

"@mui/utils@npm:^5.14.3":
version: 5.14.4
resolution: "@mui/utils@npm:5.14.4"
"@mui/utils@npm:^5.14.18":
version: 5.14.18
resolution: "@mui/utils@npm:5.14.18"
dependencies:
"@babel/runtime": ^7.22.6
"@types/prop-types": ^15.7.5
"@types/react-is": ^18.2.1
"@babel/runtime": ^7.23.2
"@types/prop-types": ^15.7.10
prop-types: ^15.8.1
react-is: ^18.2.0
peerDependencies:
"@types/react": ^17.0.0 || ^18.0.0
react: ^17.0.0 || ^18.0.0
checksum: b0084c55dc15c304e93832a23c567e41f2b152242dee3dc2578ce4b3d5177d604994abe1fd39b38a23d049592126a71ecf5ac9fe9f141155aeb4cce06241df92
peerDependenciesMeta:
"@types/react":
optional: true
checksum: f24badcb6b026b392b94919f65c7f3bea6cfb0f741c1b8ebd74b02bba9ffc61f72e35bdea887e47dfd97d37ff465863aa29c7c5cfd33fb83224f4ff2300432b3
languageName: node
linkType: hard

Expand All @@ -2782,68 +2818,20 @@ __metadata:
languageName: node
linkType: hard

"@mui/x-date-pickers@npm:6.11.1":
version: 6.11.1
resolution: "@mui/x-date-pickers@npm:6.11.1"
"@mui/x-date-pickers@npm:6.18.1":
version: 6.18.1
resolution: "@mui/x-date-pickers@npm:6.18.1"
dependencies:
"@babel/runtime": ^7.22.6
"@mui/utils": ^5.14.3
"@types/react-transition-group": ^4.4.6
clsx: ^2.0.0
prop-types: ^15.8.1
react-transition-group: ^4.4.5
peerDependencies:
"@emotion/react": ^11.9.0
"@emotion/styled": ^11.8.1
"@mui/base": ^5.0.0-alpha.87
"@mui/material": ^5.8.6
"@mui/system": ^5.8.0
date-fns: ^2.25.0
date-fns-jalali: ^2.13.0-0
dayjs: ^1.10.7
luxon: ^3.0.2
moment: ^2.29.4
moment-hijri: ^2.1.2
moment-jalaali: ^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0
react: ^17.0.0 || ^18.0.0
react-dom: ^17.0.0 || ^18.0.0
peerDependenciesMeta:
"@emotion/react":
optional: true
"@emotion/styled":
optional: true
date-fns:
optional: true
date-fns-jalali:
optional: true
dayjs:
optional: true
luxon:
optional: true
moment:
optional: true
moment-hijri:
optional: true
moment-jalaali:
optional: true
checksum: 9e21e07178c58f143f3a3ecad0e7bc7dff2bcc4cbf05a5439afff94f781ab595a9142ab5a82740784f6c84e8797a299e096e5e0f0d2ac655bb293fb62303d12f
languageName: node
linkType: hard

"@mui/x-date-pickers@patch:@mui/x-date-pickers@npm%3A6.11.1#./.yarn/patches/@mui-x-date-pickers-npm-6.11.1-1d7715e78a.patch::locator=operationsgateway%40workspace%3A.":
version: 6.11.1
resolution: "@mui/x-date-pickers@patch:@mui/x-date-pickers@npm%3A6.11.1#./.yarn/patches/@mui-x-date-pickers-npm-6.11.1-1d7715e78a.patch::version=6.11.1&hash=e9463e&locator=operationsgateway%40workspace%3A."
dependencies:
"@babel/runtime": ^7.22.6
"@mui/utils": ^5.14.3
"@types/react-transition-group": ^4.4.6
"@babel/runtime": ^7.23.2
"@mui/base": ^5.0.0-beta.22
"@mui/utils": ^5.14.16
"@types/react-transition-group": ^4.4.8
clsx: ^2.0.0
prop-types: ^15.8.1
react-transition-group: ^4.4.5
peerDependencies:
"@emotion/react": ^11.9.0
"@emotion/styled": ^11.8.1
"@mui/base": ^5.0.0-alpha.87
"@mui/material": ^5.8.6
"@mui/system": ^5.8.0
date-fns: ^2.25.0
Expand Down Expand Up @@ -2874,7 +2862,7 @@ __metadata:
optional: true
moment-jalaali:
optional: true
checksum: 807e3e36cf36b925bf207f496200a3992a55b28a1d994261d73c7f39dcddaf49c2a371478b26a0050a6b1fdc6caff52ba02d314cf73105072f3392cae4f5f914
checksum: b536b3fcb498d5b0c4c3e710e19cfc368e91b74c7815350de6332b17bb0975e128474caf2253586820ab9257fc73943bb9494858d46b0528f18301bf74822fb8
languageName: node
linkType: hard

Expand Down Expand Up @@ -3892,6 +3880,13 @@ __metadata:
languageName: node
linkType: hard

"@types/prop-types@npm:^15.7.10":
version: 15.7.11
resolution: "@types/prop-types@npm:15.7.11"
checksum: 7519ff11d06fbf6b275029fe03fff9ec377b4cb6e864cac34d87d7146c7f5a7560fd164bdc1d2dbe00b60c43713631251af1fd3d34d46c69cd354602bc0c7c54
languageName: node
linkType: hard

"@types/prop-types@npm:^15.7.5":
version: 15.7.10
resolution: "@types/prop-types@npm:15.7.10"
Expand Down Expand Up @@ -3980,15 +3975,6 @@ __metadata:
languageName: node
linkType: hard

"@types/react-transition-group@npm:^4.4.6":
version: 4.4.6
resolution: "@types/react-transition-group@npm:4.4.6"
dependencies:
"@types/react": "*"
checksum: 0872143821d7ee20a1d81e965f8b1e837837f11cd2206973f1f98655751992d9390304d58bac192c9cd923eca95bff107d8c9e3364a180240d5c2a6fd70fd7c3
languageName: node
linkType: hard

"@types/react-transition-group@npm:^4.4.8":
version: 4.4.8
resolution: "@types/react-transition-group@npm:4.4.8"
Expand Down Expand Up @@ -12498,7 +12484,7 @@ __metadata:
"@mui/icons-material": 5.14.16
"@mui/material": 5.14.16
"@mui/system": 5.14.16
"@mui/x-date-pickers": 6.11.1
"@mui/x-date-pickers": 6.18.1
"@playwright/test": 1.36.1
"@reduxjs/toolkit": 1.9.0
"@tanstack/react-query": 4.29.5
Expand Down

0 comments on commit 47e0bcc

Please sign in to comment.