Upgrade parts

Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
soupette 2021-09-23 08:19:53 +02:00
parent ce708cfc9a
commit 3fb4297cae
7 changed files with 296 additions and 256 deletions

View File

@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
import { Select, Option } from '@strapi/parts/Select'; import { Select, Option } from '@strapi/parts/Select';
import { Box } from '@strapi/parts/Box';
import { useTracking } from '@strapi/helper-plugin'; import { useTracking } from '@strapi/helper-plugin';
import { onChangeListHeaders } from '../actions'; import { onChangeListHeaders } from '../actions';
import { selectDisplayedHeaders } from '../selectors'; import { selectDisplayedHeaders } from '../selectors';
@ -43,6 +44,7 @@ const FieldPicker = ({ layout }) => {
}; };
return ( return (
<Box paddingLeft={3}>
<Select <Select
aria-label="change displayed fields" aria-label="change displayed fields"
value={values} value={values}
@ -62,6 +64,7 @@ const FieldPicker = ({ layout }) => {
); );
})} })}
</Select> </Select>
</Box>
); );
}; };

View File

@ -22,6 +22,7 @@ import { Main } from '@strapi/parts/Main';
import { ActionLayout, ContentLayout, HeaderLayout } from '@strapi/parts/Layout'; import { ActionLayout, ContentLayout, HeaderLayout } from '@strapi/parts/Layout';
import { useNotifyAT } from '@strapi/parts/LiveRegions'; import { useNotifyAT } from '@strapi/parts/LiveRegions';
import { Button } from '@strapi/parts/Button'; import { Button } from '@strapi/parts/Button';
import { Row } from '@strapi/parts/Row';
import Add from '@strapi/icons/Add'; import Add from '@strapi/icons/Add';
import axios from 'axios'; import axios from 'axios';
import { axiosInstance } from '../../../core/utils'; import { axiosInstance } from '../../../core/utils';
@ -265,10 +266,10 @@ function ListView({
{canRead && (isSearchable || isFilterable) && ( {canRead && (isSearchable || isFilterable) && (
<ActionLayout <ActionLayout
endActions={ endActions={
<> <Row style={{ flexShrink: 0 }}>
<InjectionZone area="contentManager.listView.actions" /> <InjectionZone area="contentManager.listView.actions" />
<FieldPicker layout={layout} /> <FieldPicker layout={layout} />
</> </Row>
} }
startActions={ startActions={
<> <>

File diff suppressed because one or more lines are too long

View File

@ -40,8 +40,8 @@
"@fortawesome/react-fontawesome": "^0.1.14", "@fortawesome/react-fontawesome": "^0.1.14",
"@strapi/babel-plugin-switch-ee-ce": "1.0.0", "@strapi/babel-plugin-switch-ee-ce": "1.0.0",
"@strapi/helper-plugin": "3.6.8", "@strapi/helper-plugin": "3.6.8",
"@strapi/icons": "0.0.1-alpha.37", "@strapi/icons": "0.0.1-alpha.38",
"@strapi/parts": "0.0.1-alpha.37", "@strapi/parts": "0.0.1-alpha.38",
"@strapi/utils": "3.6.8", "@strapi/utils": "3.6.8",
"axios": "^0.21.1", "axios": "^0.21.1",
"babel-loader": "8.2.2", "babel-loader": "8.2.2",

View File

@ -57,8 +57,8 @@
"@storybook/builder-webpack5": "^6.3.7", "@storybook/builder-webpack5": "^6.3.7",
"@storybook/manager-webpack5": "^6.3.7", "@storybook/manager-webpack5": "^6.3.7",
"@storybook/react": "^6.3.7", "@storybook/react": "^6.3.7",
"@strapi/icons": "0.0.1-alpha.37", "@strapi/icons": "0.0.1-alpha.38",
"@strapi/parts": "0.0.1-alpha.37", "@strapi/parts": "0.0.1-alpha.38",
"babel-loader": "^8.2.2", "babel-loader": "^8.2.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"enzyme": "^3.8.0", "enzyme": "^3.8.0",

File diff suppressed because one or more lines are too long

View File

@ -4921,15 +4921,15 @@
resolve-from "^5.0.0" resolve-from "^5.0.0"
store2 "^2.12.0" store2 "^2.12.0"
"@strapi/icons@0.0.1-alpha.37": "@strapi/icons@0.0.1-alpha.38":
version "0.0.1-alpha.37" version "0.0.1-alpha.38"
resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.37.tgz#65131221835227958d020f7c9910ab471834a515" resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.38.tgz#393b0e757bef37a476ebf755cf3603fa977757a4"
integrity sha512-tUTKqQ+qQrt7V0qwoT/mHmyP/b/O1zk087nb8pjx22sjTXSyXToZW3RkMATn2RNF9MKGrKAQRswphyFY6Os+Yg== integrity sha512-FQpt2KQLNVHHHOX26LvwO23EbOEDH5/jFZHQDLTuNmEjD14gNih9SwYr40MEMURrzlpHEOuEpAiooNHWIxMEoA==
"@strapi/parts@0.0.1-alpha.37": "@strapi/parts@0.0.1-alpha.38":
version "0.0.1-alpha.37" version "0.0.1-alpha.38"
resolved "https://registry.yarnpkg.com/@strapi/parts/-/parts-0.0.1-alpha.37.tgz#1746151b0c86014da089761eec192920f4921ab0" resolved "https://registry.yarnpkg.com/@strapi/parts/-/parts-0.0.1-alpha.38.tgz#8873275e21a6162ffe6d6890bf5587189232a3a8"
integrity sha512-KdTJj/d0N3jfobmFkpy02pqnX4rsI5oUVIQ5EVSl9zV+8aagC76Txdb3tQdHFwVYTWHjpODoXpQqPduX+IvL0A== integrity sha512-rUJoqRAe85bENwr8JCBNyaVJ6sVZ8VEp60ueNGke205mCMoerPGirX4wovLCHu8PtfsAKinUi9eWfm6nbYMyiQ==
dependencies: dependencies:
"@internationalized/number" "^3.0.2" "@internationalized/number" "^3.0.2"
compute-scroll-into-view "^1.0.17" compute-scroll-into-view "^1.0.17"