mirror of
https://github.com/strapi/strapi.git
synced 2025-09-09 08:39:45 +00:00
Upgrade parts
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
ce708cfc9a
commit
3fb4297cae
@ -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,25 +44,27 @@ const FieldPicker = ({ layout }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Select
|
<Box paddingLeft={3}>
|
||||||
aria-label="change displayed fields"
|
<Select
|
||||||
value={values}
|
aria-label="change displayed fields"
|
||||||
onChange={handleChange}
|
value={values}
|
||||||
customizeContent={values => `${values.length} currently selected`}
|
onChange={handleChange}
|
||||||
multi
|
customizeContent={values => `${values.length} currently selected`}
|
||||||
size="S"
|
multi
|
||||||
>
|
size="S"
|
||||||
{allAllowedHeaders.map(header => {
|
>
|
||||||
return (
|
{allAllowedHeaders.map(header => {
|
||||||
<Option key={header.name} value={header.name}>
|
return (
|
||||||
{formatMessage({
|
<Option key={header.name} value={header.name}>
|
||||||
id: header.intlLabel.id || header.name,
|
{formatMessage({
|
||||||
defaultMessage: header.intlLabel.defaultMessage || header.name,
|
id: header.intlLabel.id || header.name,
|
||||||
})}
|
defaultMessage: header.intlLabel.defaultMessage || header.name,
|
||||||
</Option>
|
})}
|
||||||
);
|
</Option>
|
||||||
})}
|
);
|
||||||
</Select>
|
})}
|
||||||
|
</Select>
|
||||||
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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
@ -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",
|
||||||
|
@ -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
16
yarn.lock
16
yarn.lock
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user