mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Merge branch 'develop' into features/webhooks
This commit is contained in:
commit
dcc29b361b
11
.eslintrc.js
11
.eslintrc.js
@ -7,7 +7,7 @@ module.exports = {
|
||||
|
||||
'prettier',
|
||||
],
|
||||
plugins: ['react', 'redux-saga', 'react-hooks'],
|
||||
plugins: ['react', 'redux-saga', 'react-hooks', 'import'],
|
||||
env: {
|
||||
browser: true,
|
||||
commonjs: true,
|
||||
@ -51,4 +51,13 @@ module.exports = {
|
||||
version: '16.5.2',
|
||||
},
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['packages/**/admin/src/**/**/*.js'],
|
||||
rules: {
|
||||
'no-nested-ternary': ['error'],
|
||||
'import/order': 2,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -12,6 +12,7 @@
|
||||
"enzyme-adapter-react-16": "^1.12.1",
|
||||
"eslint": "^6.3.0",
|
||||
"eslint-config-prettier": "^6.2.0",
|
||||
"eslint-plugin-import": "^2.19.1",
|
||||
"eslint-plugin-react": "^7.14.0",
|
||||
"eslint-plugin-react-hooks": "^2.0.0",
|
||||
"eslint-plugin-redux-saga": "^1.1.0",
|
||||
|
@ -6,9 +6,8 @@
|
||||
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import { Content, Wrapper } from './components';
|
||||
import Icon from '../../assets/icons/icon_success.svg';
|
||||
import { Content, Wrapper } from './components';
|
||||
|
||||
function DownloadInfo() {
|
||||
return (
|
||||
|
@ -1,14 +1,13 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import { OverlayBlocker } from 'strapi-helper-plugin';
|
||||
import {
|
||||
disableGlobalOverlayBlocker,
|
||||
enableGlobalOverlayBlocker,
|
||||
updatePlugin,
|
||||
} from '../../App/actions';
|
||||
|
||||
import { OverlayBlocker } from 'strapi-helper-plugin';
|
||||
|
||||
import { Admin, mapDispatchToProps } from '../index';
|
||||
import { setAppError } from '../actions';
|
||||
|
||||
|
@ -19,6 +19,7 @@ import { connect } from 'react-redux';
|
||||
import { bindActionCreators, compose } from 'redux';
|
||||
import { LoadingIndicatorPage, request } from 'strapi-helper-plugin';
|
||||
|
||||
import GlobalStyle from '../../components/GlobalStyle';
|
||||
import Admin from '../Admin';
|
||||
import AuthPage from '../AuthPage';
|
||||
import NotFoundPage from '../NotFoundPage';
|
||||
@ -28,8 +29,6 @@ import Theme from '../Theme';
|
||||
|
||||
import { Content, Wrapper } from './components';
|
||||
|
||||
import GlobalStyle from '../../components/GlobalStyle';
|
||||
|
||||
import { getDataSucceeded } from './actions';
|
||||
|
||||
function App(props) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import React, { forwardRef, useState } from 'react';
|
||||
import { get } from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
import Carret from './Carret';
|
||||
import DraggedField from '../DraggedField';
|
||||
import DynamicZoneWrapper from './DynamicZoneWrapper';
|
||||
import PreviewCarret from '../PreviewCarret';
|
||||
import Carret from './Carret';
|
||||
import DynamicZoneWrapper from './DynamicZoneWrapper';
|
||||
import Wrapper from './Wrapper';
|
||||
import DynamicComponent from './DynamicComponent';
|
||||
|
||||
|
@ -11,8 +11,8 @@ import useListView from '../../hooks/useListView';
|
||||
import Container from '../Container';
|
||||
|
||||
import getFilterType from '../FilterPickerOption/utils';
|
||||
import { Flex, Span, Wrapper } from './components';
|
||||
import FilterPickerOption from '../FilterPickerOption';
|
||||
import { Flex, Span, Wrapper } from './components';
|
||||
|
||||
import init from './init';
|
||||
import reducer, { initialState } from './reducer';
|
||||
|
@ -5,15 +5,13 @@
|
||||
|
||||
import React, { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { InputWrapperDate } from './components';
|
||||
|
||||
import {
|
||||
InputDate,
|
||||
InputNumber,
|
||||
InputSelect,
|
||||
InputText,
|
||||
} from 'strapi-helper-plugin';
|
||||
import { InputWrapperDate } from './components';
|
||||
|
||||
const getInputType = attrType => {
|
||||
switch (attrType) {
|
||||
|
@ -4,8 +4,8 @@ import PropTypes from 'prop-types';
|
||||
import { Grab } from '@buffetjs/icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import pluginId from '../../pluginId';
|
||||
import BannerWrapper from './BannerWrapper';
|
||||
import PreviewCarret from '../PreviewCarret';
|
||||
import BannerWrapper from './BannerWrapper';
|
||||
import CarretTop from './CarretTop';
|
||||
|
||||
const Banner = forwardRef(
|
||||
|
@ -27,9 +27,9 @@ import PopupForm from '../../components/PopupForm';
|
||||
import SettingsViewWrapper from '../../components/SettingsViewWrapper';
|
||||
import SortableList from '../../components/SortableList';
|
||||
import { unformatLayout } from '../../utils/layout';
|
||||
import getInjectedComponents from '../../utils/getComponents';
|
||||
import LayoutDndProvider from '../LayoutDndProvider';
|
||||
import getInputProps from './utils/getInputProps';
|
||||
import getInjectedComponents from '../../utils/getComponents';
|
||||
|
||||
import reducer, { initialState } from './reducer';
|
||||
|
||||
|
@ -17,12 +17,12 @@ import FormWrapper from '../../components/FormWrapper';
|
||||
import FieldComponent from '../../components/FieldComponent';
|
||||
import Inputs from '../../components/Inputs';
|
||||
import SelectWrapper from '../../components/SelectWrapper';
|
||||
import getInjectedComponents from '../../utils/getComponents';
|
||||
import EditViewDataManagerProvider from '../EditViewDataManagerProvider';
|
||||
import EditViewProvider from '../EditViewProvider';
|
||||
import Header from './Header';
|
||||
import createAttributesLayout from './utils/createAttributesLayout';
|
||||
import { LinkWrapper, SubWrapper } from './components';
|
||||
import getInjectedComponents from '../../utils/getComponents';
|
||||
import init from './init';
|
||||
import reducer, { initialState } from './reducer';
|
||||
|
||||
|
@ -12,9 +12,9 @@ import { Plus } from '@buffetjs/icons';
|
||||
import useDataManager from '../../hooks/useDataManager';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
import ComponentList from '../ComponentList';
|
||||
import ComponentButton from './ComponentButton';
|
||||
import ComponentCard from '../ComponentCard';
|
||||
import Td from '../Td';
|
||||
import ComponentButton from './ComponentButton';
|
||||
|
||||
function DynamicZoneList({
|
||||
customRowComponent,
|
||||
|
@ -4,11 +4,11 @@ import { HeaderModalTitle } from 'strapi-helper-plugin';
|
||||
import { get } from 'lodash';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import UpperFirst from '../UpperFirst';
|
||||
import ComponentIcon from './ComponentIcon';
|
||||
import ComponentInfos from './ComponentInfos';
|
||||
import Icon from './Icon';
|
||||
import IconWrapper from './IconWrapper';
|
||||
import UpperFirst from '../UpperFirst';
|
||||
import DropdownInfos from './DropdownInfos';
|
||||
|
||||
const ModalHeader = ({ headerId, headers }) => {
|
||||
|
@ -4,6 +4,7 @@ import { SelectWrapper, SelectNav } from 'strapi-helper-plugin';
|
||||
import { ErrorMessage } from '@buffetjs/styles';
|
||||
import CreatableSelect from '../CreatableSelect';
|
||||
import ComponentSelect from '../ComponentSelect';
|
||||
/* eslint-disable no-nested-ternary */
|
||||
|
||||
const WrapperSelect = ({ error, label, name, type, ...rest }) => {
|
||||
const styles = {
|
||||
|
@ -9,13 +9,12 @@ import { Switch, Route } from 'react-router-dom';
|
||||
import { LoadingIndicatorPage } from 'strapi-helper-plugin';
|
||||
import pluginId from '../../pluginId';
|
||||
import DataManagerProvider from '../DataManagerProvider';
|
||||
import RecursivePath from '../RecursivePath';
|
||||
import icons from './utils/icons.json';
|
||||
import Wrapper from './Wrapper';
|
||||
|
||||
const ListView = lazy(() => import('../ListView'));
|
||||
|
||||
import RecursivePath from '../RecursivePath';
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<Wrapper>
|
||||
|
@ -14,6 +14,8 @@ import {
|
||||
Redirect,
|
||||
} from 'react-router-dom';
|
||||
import DataManagerContext from '../../contexts/DataManagerContext';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
import makeUnique from '../../utils/makeUnique';
|
||||
import pluginId from '../../pluginId';
|
||||
import FormModal from '../FormModal';
|
||||
import init from './init';
|
||||
@ -26,13 +28,11 @@ import retrieveSpecificInfoFromComponents from './utils/retrieveSpecificInfoFrom
|
||||
import retrieveComponentsFromSchema from './utils/retrieveComponentsFromSchema';
|
||||
import retrieveNestedComponents from './utils/retrieveNestedComponents';
|
||||
import { retrieveComponentsThatHaveComponents } from './utils/retrieveComponentsThatHaveComponents';
|
||||
import makeUnique from '../../utils/makeUnique';
|
||||
import {
|
||||
getComponentsToPost,
|
||||
formatMainDataType,
|
||||
getCreatedAndModifiedComponents,
|
||||
} from './utils/cleanData';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
|
||||
const DataManagerProvider = ({ allIcons, children }) => {
|
||||
const [reducerState, dispatch] = useReducer(reducer, initialState, init);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { fromJS, OrderedMap } from 'immutable';
|
||||
import { get, has } from 'lodash';
|
||||
import retrieveComponentsFromSchema from './utils/retrieveComponentsFromSchema';
|
||||
import makeUnique from '../../utils/makeUnique';
|
||||
import retrieveComponentsFromSchema from './utils/retrieveComponentsFromSchema';
|
||||
|
||||
const initialState = fromJS({
|
||||
components: {},
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Switch, Route } from 'react-router-dom';
|
||||
import { NotFound } from 'strapi-helper-plugin';
|
||||
// Utils
|
||||
import pluginId from '../../pluginId';
|
||||
// Containers
|
||||
import HomePage from '../HomePage';
|
||||
import { NotFound } from 'strapi-helper-plugin';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
|
@ -7,13 +7,11 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Switch, Route } from 'react-router-dom';
|
||||
|
||||
import { NotFound } from 'strapi-helper-plugin';
|
||||
import pluginId from '../../pluginId';
|
||||
|
||||
// Containers
|
||||
import ConfigPage from '../ConfigPage';
|
||||
import HomePage from '../HomePage';
|
||||
import { NotFound } from 'strapi-helper-plugin';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
|
@ -8,11 +8,9 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { map, omitBy, size } from 'lodash';
|
||||
|
||||
import { Button, LoadingBar, LoadingIndicator } from 'strapi-helper-plugin';
|
||||
import { Flex, ListWrapper, Title, Wrapper } from './Components';
|
||||
|
||||
import ListRow from '../ListRow';
|
||||
import { Flex, ListWrapper, Title, Wrapper } from './Components';
|
||||
|
||||
const generateListTitle = (data, settingType) => {
|
||||
switch (settingType) {
|
||||
|
@ -10,11 +10,10 @@ import { FormattedMessage } from 'react-intl';
|
||||
import { capitalize, get, includes } from 'lodash';
|
||||
|
||||
import { IcoContainer, PopUpWarning } from 'strapi-helper-plugin';
|
||||
import en from '../../translations/en.json';
|
||||
import { HomePageContext } from '../../contexts/HomePage';
|
||||
import { Container, Flex, Row, Wrapper } from './Components';
|
||||
|
||||
import en from '../../translations/en.json';
|
||||
|
||||
class ListRow extends React.Component {
|
||||
// eslint-disable-line react/prefer-stateless-function
|
||||
state = { showModalDelete: false };
|
||||
|
@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import pluginPkg from '../../package.json';
|
||||
import layout from '../../config/layout';
|
||||
import pluginId from './pluginId';
|
||||
import App from './containers/App';
|
||||
import Initializer from './containers/Initializer';
|
||||
import lifecycles from './lifecycles';
|
||||
import layout from '../../config/layout';
|
||||
import trads from './translations';
|
||||
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
|
88
yarn.lock
88
yarn.lock
@ -5094,6 +5094,11 @@ constants-browserify@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
|
||||
integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=
|
||||
|
||||
contains-path@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"
|
||||
integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=
|
||||
|
||||
content-disposition@0.5.3, content-disposition@~0.5.2:
|
||||
version "0.5.3"
|
||||
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
|
||||
@ -6169,6 +6174,14 @@ dockerfile-ast@0.0.16:
|
||||
dependencies:
|
||||
vscode-languageserver-types "^3.5.0"
|
||||
|
||||
doctrine@1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
|
||||
integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=
|
||||
dependencies:
|
||||
esutils "^2.0.2"
|
||||
isarray "^1.0.0"
|
||||
|
||||
doctrine@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
|
||||
@ -6679,6 +6692,40 @@ eslint-config-prettier@^6.2.0:
|
||||
dependencies:
|
||||
get-stdin "^6.0.0"
|
||||
|
||||
eslint-import-resolver-node@^0.3.2:
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"
|
||||
integrity sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==
|
||||
dependencies:
|
||||
debug "^2.6.9"
|
||||
resolve "^1.5.0"
|
||||
|
||||
eslint-module-utils@^2.4.1:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz#cdf0b40d623032274ccd2abd7e64c4e524d6e19c"
|
||||
integrity sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==
|
||||
dependencies:
|
||||
debug "^2.6.9"
|
||||
pkg-dir "^2.0.0"
|
||||
|
||||
eslint-plugin-import@^2.19.1:
|
||||
version "2.19.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.19.1.tgz#5654e10b7839d064dd0d46cd1b88ec2133a11448"
|
||||
integrity sha512-x68131aKoCZlCae7rDXKSAQmbT5DQuManyXo2sK6fJJ0aK5CWAkv6A6HJZGgqC8IhjQxYPgo6/IY4Oz8AFsbBw==
|
||||
dependencies:
|
||||
array-includes "^3.0.3"
|
||||
array.prototype.flat "^1.2.1"
|
||||
contains-path "^0.1.0"
|
||||
debug "^2.6.9"
|
||||
doctrine "1.5.0"
|
||||
eslint-import-resolver-node "^0.3.2"
|
||||
eslint-module-utils "^2.4.1"
|
||||
has "^1.0.3"
|
||||
minimatch "^3.0.4"
|
||||
object.values "^1.1.0"
|
||||
read-pkg-up "^2.0.0"
|
||||
resolve "^1.12.0"
|
||||
|
||||
eslint-plugin-react-hooks@^2.0.0:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.1.2.tgz#1358d2acb2c5e02b7e90c37e611ac258a488e3a7"
|
||||
@ -10742,6 +10789,16 @@ load-json-file@^1.0.0:
|
||||
pinkie-promise "^2.0.0"
|
||||
strip-bom "^2.0.0"
|
||||
|
||||
load-json-file@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
|
||||
integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
parse-json "^2.2.0"
|
||||
pify "^2.0.0"
|
||||
strip-bom "^3.0.0"
|
||||
|
||||
load-json-file@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
|
||||
@ -12921,6 +12978,13 @@ path-type@^1.0.0:
|
||||
pify "^2.0.0"
|
||||
pinkie-promise "^2.0.0"
|
||||
|
||||
path-type@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
|
||||
integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=
|
||||
dependencies:
|
||||
pify "^2.0.0"
|
||||
|
||||
path-type@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
|
||||
@ -13068,6 +13132,13 @@ pirates@^4.0.1:
|
||||
dependencies:
|
||||
node-modules-regexp "^1.0.0"
|
||||
|
||||
pkg-dir@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
|
||||
integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=
|
||||
dependencies:
|
||||
find-up "^2.1.0"
|
||||
|
||||
pkg-dir@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3"
|
||||
@ -14382,6 +14453,14 @@ read-pkg-up@^1.0.1:
|
||||
find-up "^1.0.0"
|
||||
read-pkg "^1.0.0"
|
||||
|
||||
read-pkg-up@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
|
||||
integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=
|
||||
dependencies:
|
||||
find-up "^2.0.0"
|
||||
read-pkg "^2.0.0"
|
||||
|
||||
read-pkg-up@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
|
||||
@ -14407,6 +14486,15 @@ read-pkg@^1.0.0:
|
||||
normalize-package-data "^2.3.2"
|
||||
path-type "^1.0.0"
|
||||
|
||||
read-pkg@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
|
||||
integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=
|
||||
dependencies:
|
||||
load-json-file "^2.0.0"
|
||||
normalize-package-data "^2.3.2"
|
||||
path-type "^2.0.0"
|
||||
|
||||
read-pkg@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
|
||||
|
Loading…
x
Reference in New Issue
Block a user