Merge branch 'releases/v4' of https://github.com/strapi/strapi into fix-wysiwyg

This commit is contained in:
ronronscelestes 2021-11-09 14:16:21 +01:00
commit fd0c60cc9f
8 changed files with 89 additions and 105 deletions

View File

@ -12,23 +12,6 @@ const Filters = ({ displayedFilters }) => {
const buttonRef = useRef();
const { trackUsage } = useTracking();
const handleBlur = e => {
// TO FIX - select's modals prevent blur to work correctly
const notNull = e.currentTarget !== null && e.relatedTarget !== null;
const ulListBox = document.querySelector('[role="listbox"]');
const selectDate = document.querySelector('[role="dialog"]');
if (
!e.currentTarget.contains(e.relatedTarget) &&
e.relatedTarget !== buttonRef.current &&
e.relatedTarget !== ulListBox &&
!selectDate.contains(e.relatedTarget) &&
notNull
) {
setIsVisible(false);
}
};
const handleToggle = () => {
if (!isVisible) {
trackUsage('willFilterEntries');
@ -52,7 +35,6 @@ const Filters = ({ displayedFilters }) => {
<FilterPopoverURLQuery
displayedFilters={displayedFilters}
isVisible={isVisible}
onBlur={handleBlur}
onToggle={handleToggle}
source={buttonRef}
/>

View File

@ -11,21 +11,6 @@ const Filters = ({ displayedFilters }) => {
const { formatMessage } = useIntl();
const buttonRef = useRef();
const handleBlur = e => {
// TO FIX - select's modals prevent blur to work correctly
const notNull = e.currentTarget !== null && e.relatedTarget !== null;
const ulListBox = document.querySelector('[role="listbox"]');
if (
!e.currentTarget.contains(e.relatedTarget) &&
e.relatedTarget !== buttonRef.current &&
e.relatedTarget !== ulListBox &&
notNull
) {
setIsVisible(false);
}
};
const handleToggle = () => {
setIsVisible(prev => !prev);
};
@ -46,7 +31,6 @@ const Filters = ({ displayedFilters }) => {
<FilterPopoverURLQuery
displayedFilters={displayedFilters}
isVisible={isVisible}
onBlur={handleBlur}
onToggle={handleToggle}
source={buttonRef}
/>

View File

@ -40,8 +40,8 @@
"@fortawesome/react-fontawesome": "^0.1.14",
"@strapi/babel-plugin-switch-ee-ce": "1.0.0",
"@strapi/helper-plugin": "3.6.8",
"@strapi/icons": "0.0.1-alpha.63",
"@strapi/design-system": "0.0.1-alpha.63",
"@strapi/icons": "0.0.1-alpha.64",
"@strapi/design-system": "0.0.1-alpha.64",
"@strapi/utils": "3.6.8",
"axios": "0.24.0",
"babel-loader": "8.2.2",

View File

@ -57,8 +57,8 @@
"@storybook/builder-webpack5": "^6.3.7",
"@storybook/manager-webpack5": "^6.3.7",
"@storybook/react": "^6.3.7",
"@strapi/icons": "0.0.1-alpha.63",
"@strapi/design-system": "0.0.1-alpha.63",
"@strapi/icons": "0.0.1-alpha.64",
"@strapi/design-system": "0.0.1-alpha.64",
"babel-loader": "^8.2.2",
"cross-env": "^7.0.3",
"date-fns": "2.22.1",

View File

@ -45,23 +45,6 @@ export const Filters = () => {
const toggleFilter = () => setVisible(prev => !prev);
const handleBlur = e => {
// TO FIX - select's modals prevent blur to work correctly
const notNull = e.currentTarget !== null && e.relatedTarget !== null;
const ulListBox = document.querySelector('[role="listbox"]');
const selectDate = document.querySelector('[role="dialog"]');
if (
!e.currentTarget.contains(e.relatedTarget) &&
e.relatedTarget !== buttonRef.current &&
e.relatedTarget !== ulListBox &&
!selectDate.contains(e.relatedTarget) &&
notNull
) {
setVisible(false);
}
};
const handleRemoveFilter = nextFilters => {
setQuery({ filters: { $and: nextFilters }, page: 1 });
};
@ -85,7 +68,6 @@ export const Filters = () => {
<FilterPopover
displayedFilters={displayedFilters}
filters={filters}
onBlur={handleBlur}
onSubmit={handleSubmit}
onToggle={toggleFilter}
source={buttonRef}

View File

@ -739,7 +739,6 @@ describe('Admin | containers | RoleCreatePage', () => {
.c39 {
border: 1px solid #ffffff;
overflow: hidden;
}
.c39:hover:not([aria-disabled='true']) {
@ -847,6 +846,7 @@ describe('Admin | containers | RoleCreatePage', () => {
.c43 {
height: 5.5rem;
border-radius: 4px;
}
.c43:hover svg path {

View File

@ -811,7 +811,6 @@ describe('Admin | containers | RoleEditPage', () => {
.c44 {
border: 1px solid #ffffff;
overflow: hidden;
}
.c44:hover:not([aria-disabled='true']) {
@ -919,6 +918,7 @@ describe('Admin | containers | RoleEditPage', () => {
.c48 {
height: 5.5rem;
border-radius: 4px;
}
.c48:hover svg path {

130
yarn.lock
View File

@ -4590,19 +4590,19 @@
resolve-from "^5.0.0"
store2 "^2.12.0"
"@strapi/design-system@0.0.1-alpha.63":
version "0.0.1-alpha.63"
resolved "https://registry.yarnpkg.com/@strapi/design-system/-/design-system-0.0.1-alpha.63.tgz#85292811829f1fa1a8f17ed2ad6b87e67b5a4ae7"
integrity sha512-WLeNQkKvgtCedv26iCiWjnlvk7KwVP25h3KbR3Ve4M/W2CNjSF5oD+RWMOVWFxqD7Utnyl7YF5SVmx+ftkULgA==
"@strapi/design-system@0.0.1-alpha.64":
version "0.0.1-alpha.64"
resolved "https://registry.yarnpkg.com/@strapi/design-system/-/design-system-0.0.1-alpha.64.tgz#07ff58d2b2b713424cc8b9624e9a88e58e91cdd3"
integrity sha512-myCOoOUFrJPATcWtG268BBQmR23+7lay2gVN01HZh2wiTAqhOUOVNQo9yvjvsC4lUOH/brSbBEPwmW4kQ5S5iw==
dependencies:
"@internationalized/number" "^3.0.2"
compute-scroll-into-view "^1.0.17"
prop-types "^15.7.2"
"@strapi/icons@0.0.1-alpha.63":
version "0.0.1-alpha.63"
resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.63.tgz#c5696f36f748e1013de1ddf0af4f7ff8d2a3f199"
integrity sha512-77N/MxyLdwX+gMyUzDpnAGr5PaCBQ5uKJHh3Gwqp7HySIw2QbfJ0/9haqSYObDkalMIxGKTQSmWODcX02ynJSg==
"@strapi/icons@0.0.1-alpha.64":
version "0.0.1-alpha.64"
resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.64.tgz#4fc04e62fb37f5f02411281b4932460893498092"
integrity sha512-wMkdbx1115nC2pGuIM/xGc4HqkrZPDje/pqnI3Zv9RHtfl5mOVpvmC4rBAKy3EOg2dbmeVy6JPLOvah8GYaEkw==
"@stylelint/postcss-css-in-js@^0.37.2":
version "0.37.2"
@ -5165,7 +5165,7 @@
dependencies:
"@types/koa" "*"
"@types/liftoff@^2.5.0":
"@types/liftoff@^2.5.0", "@types/liftoff@^2.5.1":
version "2.5.1"
resolved "https://registry.yarnpkg.com/@types/liftoff/-/liftoff-2.5.1.tgz#2eb4c1f86e9d5ee85571e56db0084b26af129ced"
integrity sha512-nB3R6Q9CZcM07JgiTK6ibxqrG1reiHE+UX7em/W1DKwVBxDlfKWOefQjk4jubY5xX+GDxVsWR2KD1SenPby8ow==
@ -6905,12 +6905,12 @@ axios-mock-adapter@1.19.0:
fast-deep-equal "^3.1.3"
is-buffer "^2.0.3"
axios@0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
axios@0.24.0:
version "0.24.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
dependencies:
follow-redirects "^1.10.0"
follow-redirects "^1.14.4"
axios@^0.21.1, axios@^0.21.4:
version "0.21.4"
@ -11353,11 +11353,16 @@ fn.name@1.x.x:
resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc"
integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==
follow-redirects@^1.0.0, follow-redirects@^1.10.0, follow-redirects@^1.14.0:
follow-redirects@^1.0.0, follow-redirects@^1.14.0:
version "1.14.4"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379"
integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==
follow-redirects@^1.14.4:
version "1.14.5"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381"
integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==
font-awesome@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
@ -13094,10 +13099,10 @@ immer@8.0.1:
resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656"
integrity sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA==
immer@9.0.5:
version "9.0.5"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.5.tgz#a7154f34fe7064f15f00554cc94c66cc0bf453ec"
integrity sha512-2WuIehr2y4lmYz9gaQzetPR2ECniCifk4ORaQbU3g5EalLt+0IVTosEPJ5BoYl/75ky2mivzdRzV8wWgQGOSYQ==
immer@9.0.6:
version "9.0.6"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.6.tgz#7a96bf2674d06c8143e327cbf73539388ddf1a73"
integrity sha512-G95ivKpy+EvVAnAab4fVa4YGYn24J1SpEktnJX7JJ45Bd7xqME/SCplFzYFmTbrkwZbQ4xJK1xMTUYBkN6pWsQ==
immutable@^3.8.2:
version "3.8.2"
@ -13253,30 +13258,10 @@ inline-style-parser@0.1.1:
resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1"
integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==
inquirer@8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.0.tgz#68ce5ce5376cf0e89765c993d8b7c1e62e184d69"
integrity sha512-1nKYPoalt1vMBfCMtpomsUc32wmOoWXAoq3kM/5iTfxyQ2f/BxjixQpC+mbZ7BI0JUXHED4/XPXekDVtJNpXYw==
dependencies:
ansi-escapes "^4.2.1"
chalk "^4.1.1"
cli-cursor "^3.1.0"
cli-width "^3.0.0"
external-editor "^3.0.3"
figures "^3.0.0"
lodash "^4.17.21"
mute-stream "0.0.8"
ora "^5.3.0"
run-async "^2.4.0"
rxjs "^6.6.6"
string-width "^4.1.0"
strip-ansi "^6.0.0"
through "^2.3.6"
inquirer@8.1.5, inquirer@^8.1.1:
version "8.1.5"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.5.tgz#2dc5159203c826d654915b5fe6990fd17f54a150"
integrity sha512-G6/9xUqmt/r+UvufSyrPpt84NYwhKZ9jLsgMbQzlx804XErNupor8WQdBnBRrXmBfTPpuwf1sV+ss2ovjgdXIg==
inquirer@8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.0.tgz#f44f008dd344bbfc4b30031f45d984e034a3ac3a"
integrity sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==
dependencies:
ansi-escapes "^4.2.1"
chalk "^4.1.1"
@ -13293,7 +13278,7 @@ inquirer@8.1.5, inquirer@^8.1.1:
strip-ansi "^6.0.0"
through "^2.3.6"
inquirer@^6.2.0, inquirer@^6.3.1:
inquirer@^6.2.0:
version "6.5.2"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca"
integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==
@ -13331,6 +13316,26 @@ inquirer@^7.1.0:
strip-ansi "^6.0.0"
through "^2.3.6"
inquirer@^8.1.1:
version "8.1.5"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.1.5.tgz#2dc5159203c826d654915b5fe6990fd17f54a150"
integrity sha512-G6/9xUqmt/r+UvufSyrPpt84NYwhKZ9jLsgMbQzlx804XErNupor8WQdBnBRrXmBfTPpuwf1sV+ss2ovjgdXIg==
dependencies:
ansi-escapes "^4.2.1"
chalk "^4.1.1"
cli-cursor "^3.1.0"
cli-width "^3.0.0"
external-editor "^3.0.3"
figures "^3.0.0"
lodash "^4.17.21"
mute-stream "0.0.8"
ora "^5.4.1"
run-async "^2.4.0"
rxjs "^7.2.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"
through "^2.3.6"
internal-ip@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907"
@ -17182,7 +17187,24 @@ node-notifier@^8.0.0:
uuid "^8.3.0"
which "^2.0.2"
node-plop@0.26.2, node-plop@~0.26.2:
node-plop@0.26.3, node-plop@^0.26.3:
version "0.26.3"
resolved "https://registry.yarnpkg.com/node-plop/-/node-plop-0.26.3.tgz#d6fa7e71393c8b940513ba8c4868f8aaa6dea9df"
integrity sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==
dependencies:
"@babel/runtime-corejs3" "^7.9.2"
"@types/inquirer" "^6.5.0"
change-case "^3.1.0"
del "^5.1.0"
globby "^10.0.1"
handlebars "^4.4.3"
inquirer "^7.1.0"
isbinaryfile "^4.0.2"
lodash.get "^4.4.2"
mkdirp "^0.5.1"
resolve "^1.12.0"
node-plop@~0.26.2:
version "0.26.2"
resolved "https://registry.yarnpkg.com/node-plop/-/node-plop-0.26.2.tgz#c2523596dab4e28360e615b768b11b4d60d5b1b9"
integrity sha512-q444beWkMvZwAiYC3BRGJUHgRlpOItQHy+xdy6egXg8KjxDY/Ro309spQTNvH01qK9A8XF6pc0xLKbrHDpxW7w==
@ -17808,7 +17830,7 @@ ora@5.4.0:
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
ora@5.4.1, ora@^5.3.0, ora@^5.4.0, ora@^5.4.1:
ora@5.4.1, ora@^5.4.0, ora@^5.4.1:
version "5.4.1"
resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18"
integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==
@ -18707,6 +18729,20 @@ plop@2.7.4:
ora "^3.4.0"
v8flags "^2.0.10"
plop@2.7.6:
version "2.7.6"
resolved "https://registry.yarnpkg.com/plop/-/plop-2.7.6.tgz#1fa5360cd5b04e9932ce677bb6bd44750d97ae67"
integrity sha512-IgnYAsC3Ni7t1cDU7wH2151CD22YhMxH8PFh+iPzCf+WuGEWXslJ5t1Tpr0N/gjL23CAV/HbLAWug2IPM2YrHg==
dependencies:
"@types/liftoff" "^2.5.1"
chalk "^1.1.3"
interpret "^1.2.0"
liftoff "^2.5.0"
minimist "^1.2.5"
node-plop "^0.26.3"
ora "^3.4.0"
v8flags "^2.0.10"
pluralize@8.0.0, pluralize@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
@ -20901,7 +20937,7 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"
rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.6, rxjs@^6.6.7:
rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.7:
version "6.6.7"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==