Merge branch 'main' into fix/discord_link

This commit is contained in:
Daniele Aurilio 2022-10-08 19:44:25 +02:00 committed by GitHub
commit b8cea20fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
59 changed files with 345 additions and 160 deletions

View File

@ -1,6 +1,6 @@
{
"name": "check-pr-status",
"version": "4.4.1",
"version": "4.4.3",
"main": "dist/index.js",
"license": "MIT",
"private": true,

View File

@ -1,7 +1,7 @@
{
"name": "getstarted",
"private": true,
"version": "4.4.1",
"version": "4.4.3",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
@ -12,16 +12,16 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-color-picker": "4.4.1",
"@strapi/plugin-documentation": "4.4.1",
"@strapi/plugin-graphql": "4.4.1",
"@strapi/plugin-i18n": "4.4.1",
"@strapi/plugin-sentry": "4.4.1",
"@strapi/plugin-users-permissions": "4.4.1",
"@strapi/provider-email-mailgun": "4.4.1",
"@strapi/provider-upload-aws-s3": "4.4.1",
"@strapi/provider-upload-cloudinary": "4.4.1",
"@strapi/strapi": "4.4.1",
"@strapi/plugin-color-picker": "4.4.3",
"@strapi/plugin-documentation": "4.4.3",
"@strapi/plugin-graphql": "4.4.3",
"@strapi/plugin-i18n": "4.4.3",
"@strapi/plugin-sentry": "4.4.3",
"@strapi/plugin-users-permissions": "4.4.3",
"@strapi/provider-email-mailgun": "4.4.3",
"@strapi/provider-upload-aws-s3": "4.4.3",
"@strapi/provider-upload-cloudinary": "4.4.3",
"@strapi/strapi": "4.4.3",
"@vscode/sqlite3": "5.0.8",
"better-sqlite3": "7.4.6",
"lodash": "4.17.21",

View File

@ -1,7 +1,7 @@
{
"name": "kitchensink-ts",
"private": true,
"version": "4.4.1",
"version": "4.4.3",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
@ -10,9 +10,9 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-i18n": "4.4.1",
"@strapi/plugin-users-permissions": "4.4.1",
"@strapi/strapi": "4.4.1",
"@strapi/plugin-i18n": "4.4.3",
"@strapi/plugin-users-permissions": "4.4.3",
"@strapi/strapi": "4.4.3",
"better-sqlite3": "7.4.6"
},
"author": {

View File

@ -1,7 +1,7 @@
{
"name": "kitchensink",
"private": true,
"version": "4.4.1",
"version": "4.4.3",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
@ -12,10 +12,10 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/provider-email-mailgun": "4.4.1",
"@strapi/provider-upload-aws-s3": "4.4.1",
"@strapi/provider-upload-cloudinary": "4.4.1",
"@strapi/strapi": "4.4.1",
"@strapi/provider-email-mailgun": "4.4.3",
"@strapi/provider-upload-aws-s3": "4.4.3",
"@strapi/provider-upload-cloudinary": "4.4.3",
"@strapi/strapi": "4.4.3",
"lodash": "4.17.21",
"mysql": "2.18.1",
"passport-google-oauth2": "0.2.0",

View File

@ -1,5 +1,5 @@
{
"version": "4.4.1",
"version": "4.4.3",
"packages": [
"packages/*",
"examples/*"

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/admin-test-utils",
"version": "4.4.1",
"version": "4.4.3",
"private": true,
"description": "Test utilities for the Strapi administration panel",
"license": "MIT",

View File

@ -1,7 +1,12 @@
{
"name": "create-strapi-app",
"version": "4.4.1",
"version": "4.4.3",
"description": "Generate a new Strapi application.",
"dependencies": {
"@strapi/generate-new": "4.4.3",
"commander": "6.1.0",
"inquirer": "8.2.4"
},
"keywords": [
"create-strapi-app",
"create",
@ -37,11 +42,6 @@
"scripts": {
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/generate-new": "4.4.1",
"commander": "6.1.0",
"inquirer": "8.2.4"
},
"engines": {
"node": ">=14.19.1 <=18.x.x",
"npm": ">=6.0.0"

View File

@ -1,6 +1,6 @@
{
"name": "create-strapi-starter",
"version": "4.4.1",
"version": "4.4.3",
"description": "Generate a new Strapi application.",
"keywords": [
"create-strapi-starter",
@ -38,7 +38,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/generate-new": "4.4.1",
"@strapi/generate-new": "4.4.3",
"chalk": "4.1.1",
"ci-info": "3.3.2",
"commander": "7.1.0",

View File

@ -1,20 +1,26 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Link, useHistory } from 'react-router-dom';
import { useIntl } from 'react-intl';
import { BaseCheckbox } from '@strapi/design-system/BaseCheckbox';
import { Box } from '@strapi/design-system/Box';
import { IconButton } from '@strapi/design-system/IconButton';
import { Tbody, Td, Tr } from '@strapi/design-system/Table';
import { Flex } from '@strapi/design-system/Flex';
import Trash from '@strapi/icons/Trash';
import Duplicate from '@strapi/icons/Duplicate';
import Pencil from '@strapi/icons/Pencil';
import { useTracking, stopPropagation, onRowClick } from '@strapi/helper-plugin';
import { useHistory } from 'react-router-dom';
import { useIntl } from 'react-intl';
import { usePluginsQueryParams } from '../../../hooks';
import CellContent from '../CellContent';
import { getFullName } from '../../../../utils';
import CellContent from '../CellContent';
const TableRows = ({
canCreate,
canDelete,
@ -100,13 +106,14 @@ const TableRows = ({
<Td>
<Flex justifyContent="end" {...stopPropagation}>
<IconButton
forwardedAs={Link}
onClick={() => {
trackUsage('willEditEntryFromButton');
push({
pathname: `${pathname}/${data.id}`,
state: { from: pathname },
search: pluginsQueryParams,
});
}}
to={{
pathname: `${pathname}/${data.id}`,
state: { from: pathname },
search: pluginsQueryParams,
}}
label={formatMessage(
{ id: 'app.component.table.edit', defaultMessage: 'Edit {target}' },
@ -119,12 +126,11 @@ const TableRows = ({
{canCreate && (
<Box paddingLeft={1}>
<IconButton
onClick={() => {
push({
pathname: `${pathname}/create/clone/${data.id}`,
state: { from: pathname },
search: pluginsQueryParams,
});
forwardedAs={Link}
to={{
pathname: `${pathname}/create/clone/${data.id}`,
state: { from: pathname },
search: pluginsQueryParams,
}}
label={formatMessage(
{
@ -144,7 +150,6 @@ const TableRows = ({
<IconButton
onClick={() => {
trackUsage('willDeleteEntryFromList');
onClickDelete(data.id);
}}
label={formatMessage(

View File

@ -129,7 +129,7 @@ function SelectWrapper({
const params = { limit: state.limit, ...defaultParams, start: state.start };
if (state.contains) {
params[`filters[${containsKey}][$contains]`] = state.contains;
params[`filters[${containsKey}][$containsi]`] = state.contains;
}
try {

View File

@ -5,9 +5,11 @@ import { connect } from 'react-redux';
import isEqual from 'react-fast-compare';
import { bindActionCreators, compose } from 'redux';
import { useIntl } from 'react-intl';
import { useHistory, useLocation } from 'react-router-dom';
import { useHistory, useLocation, Link as ReactRouterLink } from 'react-router-dom';
import get from 'lodash/get';
import { stringify } from 'qs';
import axios from 'axios';
import {
NoPermissions,
CheckPermissions,
@ -19,31 +21,37 @@ import {
useTracking,
Link,
} from '@strapi/helper-plugin';
import { IconButton } from '@strapi/design-system/IconButton';
import { Main } from '@strapi/design-system/Main';
import { Box } from '@strapi/design-system/Box';
import { ActionLayout, ContentLayout, HeaderLayout } from '@strapi/design-system/Layout';
import { useNotifyAT } from '@strapi/design-system/LiveRegions';
import { Button } from '@strapi/design-system/Button';
import ArrowLeft from '@strapi/icons/ArrowLeft';
import Plus from '@strapi/icons/Plus';
import Cog from '@strapi/icons/Cog';
import axios from 'axios';
import { axiosInstance } from '../../../core/utils';
import { InjectionZone } from '../../../shared/components';
import DynamicTable from '../../components/DynamicTable';
import AttributeFilter from '../../components/AttributeFilter';
import { InjectionZone } from '../../../shared/components';
import permissions from '../../../permissions';
import { getRequestUrl, getTrad } from '../../utils';
import FieldPicker from './FieldPicker';
import PaginationFooter from './PaginationFooter';
import { getData, getDataSucceeded, onChangeListHeaders, onResetListHeaders } from './actions';
import makeSelectListView from './selectors';
import { buildQueryString } from './utils';
import AttributeFilter from '../../components/AttributeFilter';
const cmPermissions = permissions.contentManager;
const IconButtonCustom = styled(IconButton)`
const ConfigureLayoutBox = styled(Box)`
svg {
path {
fill: ${({ theme }) => theme.colors.neutral900};
@ -51,7 +59,6 @@ const IconButtonCustom = styled(IconButton)`
}
`;
/* eslint-disable react/no-array-index-key */
function ListView({
canCreate,
canDelete,
@ -240,16 +247,18 @@ function ListView({
canCreate ? (
<Button
{...props}
forwardedAs={ReactRouterLink}
onClick={() => {
const trackerProperty = hasDraftAndPublish ? { status: 'draft' } : {};
trackUsageRef.current('willCreateEntry', trackerProperty);
push({
pathname: `${pathname}/create`,
search: query.plugins ? pluginsQueryParams : '',
});
}}
to={{
pathname: `${pathname}/create`,
search: query.plugins ? pluginsQueryParams : '',
}}
startIcon={<Plus />}
style={{ textDecoration: 'none' }}
>
{formatMessage({
id: getTrad('HeaderLayout.button.label-add-entry'),
@ -283,20 +292,20 @@ function ListView({
<InjectionZone area="contentManager.listView.actions" />
<FieldPicker layout={layout} />
<CheckPermissions permissions={cmPermissions.collectionTypesConfigurations}>
<Box paddingTop={1} paddingBottom={1}>
<IconButtonCustom
<ConfigureLayoutBox paddingTop={1} paddingBottom={1}>
<IconButton
onClick={() => {
trackUsage('willEditListLayout');
push({ pathname: `${slug}/configurations/list`, search: pluginsQueryParams });
}}
forwardedAs={ReactRouterLink}
to={{ pathname: `${slug}/configurations/list`, search: pluginsQueryParams }}
icon={<Cog />}
label={formatMessage({
id: 'app.links.configure-view',
defaultMessage: 'Configure the view',
})}
/>
</Box>
</ConfigureLayoutBox>
</CheckPermissions>
</>
}

View File

@ -1,4 +1,5 @@
import { stringify } from 'qs';
import set from 'lodash/set';
import createPluginsFilter from './createPluginsFilter';
/**
@ -12,12 +13,23 @@ const buildQueryString = (queryParams = {}) => {
* Extracting pluginOptions from the query since we don't want them to be part
* of the url
*/
const { plugins: _, ...otherQueryParams } = {
const {
plugins: _,
_q: query,
...otherQueryParams
} = {
...queryParams,
...createPluginsFilter(queryParams.plugins),
};
return `?${stringify(otherQueryParams, { encode: false })}`;
if (query) {
set(otherQueryParams, `_q`, encodeURIComponent(query));
}
return `${stringify(otherQueryParams, {
encode: false,
addQueryPrefix: true,
})}`;
};
export default buildQueryString;

View File

@ -58,4 +58,18 @@ describe('buildQueryString', () => {
'?page=1&pageSize=10&sort=name:ASC&filters[0][name]=hello world&locale=en'
);
});
it('creates a valid query string with a search query', () => {
const _q = `test&query`;
const queryParams = {
page: '1',
pageSize: '10',
sort: 'name:ASC',
_q,
};
const queryString = buildQueryString(queryParams);
expect(queryString).toBe(`?page=1&pageSize=10&sort=name:ASC&_q=${encodeURIComponent(_q)}`);
});
});

View File

@ -734,6 +734,7 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
<th
aria-colindex="1"
class="c21"
tabindex="0"
>
<div
class="c22"
@ -743,7 +744,7 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
aria-labelledby="tooltip-1"
class="c23"
label="Name"
tabindex="0"
tabindex="-1"
>
Name
</span>
@ -756,7 +757,7 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
aria-disabled="false"
aria-labelledby="tooltip-1"
class="c25 c26"
tabindex="0"
tabindex="-1"
type="button"
>
<svg
@ -919,6 +920,7 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
<td
aria-colindex="5"
class="c21"
tabindex="-1"
>
<div
class="c34"

View File

@ -1263,6 +1263,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => {
<th
aria-colindex="2"
class="c32"
tabindex="-1"
>
<div
class="c33"

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/admin",
"version": "4.4.1",
"version": "4.4.3",
"description": "Strapi Admin",
"repository": {
"type": "git",
@ -51,13 +51,13 @@
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.2.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.7",
"@strapi/babel-plugin-switch-ee-ce": "4.4.1",
"@strapi/design-system": "1.2.3",
"@strapi/helper-plugin": "4.4.1",
"@strapi/babel-plugin-switch-ee-ce": "4.4.3",
"@strapi/design-system": "1.2.5",
"@strapi/helper-plugin": "4.4.3",
"@strapi/icons": "1.2.3",
"@strapi/permissions": "4.4.1",
"@strapi/typescript-utils": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/permissions": "4.4.3",
"@strapi/typescript-utils": "4.4.3",
"@strapi/utils": "4.4.3",
"axios": "0.27.2",
"babel-loader": "8.2.5",
"babel-plugin-styled-components": "2.0.2",

View File

@ -678,7 +678,6 @@ describe('API Token', () => {
select: expect.arrayContaining([expect.any(String)]),
where: { id },
data: attributes,
populate: ['permissions'],
});
expect(res).toEqual(attributes);
});
@ -799,7 +798,6 @@ describe('API Token', () => {
select: expect.arrayContaining([expect.any(String)]),
where: { id },
data: omit(['permissions'], updatedAttributes),
populate: expect.anything(), // it doesn't matter how this is used
});
expect(res).toEqual(updatedAttributes);
@ -871,7 +869,6 @@ describe('API Token', () => {
select: expect.arrayContaining([expect.any(String)]),
where: { id },
data: omit(['permissions'], updatedAttributes),
populate: expect.anything(), // it doesn't matter how this is used
});
expect(res).toEqual({

View File

@ -381,7 +381,6 @@ const update = async (id, attributes) => {
const updatedToken = await strapi.query('admin::api-token').update({
select: SELECT_FIELDS,
populate: POPULATE_FIELDS,
where: { id },
data: omit('permissions', attributes),
});

View File

@ -32,16 +32,21 @@ describe('API Token Auth Strategy', () => {
'api-token': {
getBy,
hash,
update,
},
},
},
query() {
return { update };
},
};
const response = await apiTokenStrategy.authenticate(ctx);
expect(getBy).toHaveBeenCalledWith({ accessKey: 'api-token_tests-hashed-access-key' });
expect(update).toHaveBeenCalledWith(apiToken.id, { lastUsedAt: expect.any(Date) });
expect(update).toHaveBeenCalledWith({
data: { lastUsedAt: expect.any(Date) },
where: { id: apiToken.id },
});
expect(response).toStrictEqual({ authenticated: true, credentials: apiToken });
});

View File

@ -53,8 +53,9 @@ const authenticate = async (ctx) => {
}
// update lastUsedAt
await apiTokenService.update(apiToken.id, {
lastUsedAt: currentDate,
await strapi.query('admin::api-token').update({
where: { id: apiToken.id },
data: { lastUsedAt: currentDate },
});
if (apiToken.type === constants.API_TOKEN_TYPE.CUSTOM) {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-content-manager",
"version": "4.4.1",
"version": "4.4.3",
"description": "A powerful UI to easily manage your data.",
"repository": {
"type": "git",
@ -24,7 +24,7 @@
},
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"lodash": "4.17.21"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-content-type-builder",
"version": "4.4.1",
"version": "4.4.3",
"description": "Strapi plugin to create content type",
"repository": {
"type": "git",
@ -28,9 +28,9 @@
},
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/generators": "4.4.1",
"@strapi/helper-plugin": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/generators": "4.4.3",
"@strapi/helper-plugin": "4.4.3",
"@strapi/utils": "4.4.3",
"fs-extra": "10.0.0",
"lodash": "4.17.21",
"pluralize": "^8.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/database",
"version": "4.4.1",
"version": "4.4.3",
"description": "Strapi's database layer",
"homepage": "https://strapi.io",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-email",
"version": "4.4.1",
"version": "4.4.3",
"description": "Easily configure your Strapi application to send emails.",
"repository": {
"type": "git",
@ -26,12 +26,12 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
},
"dependencies": {
"@strapi/provider-email-sendmail": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/provider-email-sendmail": "4.4.3",
"@strapi/utils": "4.4.3",
"lodash": "4.17.21"
},
"devDependencies": {
"@strapi/helper-plugin": "4.4.1",
"@strapi/helper-plugin": "4.4.3",
"@testing-library/react": "12.1.4"
},
"engines": {

View File

@ -40,7 +40,7 @@ const SearchURLQuery = ({ label, placeholder, trackedEvent, trackedEventDetails
if (trackedEvent) {
trackUsage(trackedEvent, trackedEventDetails);
}
setQuery({ _q: value, page: 1 });
setQuery({ _q: encodeURIComponent(value), page: 1 });
} else {
handleToggle();
setQuery({ _q: '' }, 'remove');

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/helper-plugin",
"version": "4.4.1",
"version": "4.4.3",
"description": "Helper for Strapi plugins development",
"repository": {
"type": "git",
@ -44,6 +44,7 @@
"@fortawesome/free-brands-svg-icons": "^5.15.2",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.2.0",
"@strapi/design-system": "1.2.5",
"axios": "0.27.2",
"date-fns": "2.29.2",
"formik": "^2.2.6",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/permissions",
"version": "4.4.1",
"version": "4.4.3",
"description": "Strapi's permission layer.",
"repository": {
"type": "git",
@ -25,7 +25,7 @@
},
"dependencies": {
"@casl/ability": "5.4.4",
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"lodash": "4.17.21",
"sift": "16.0.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/strapi",
"version": "4.4.1",
"version": "4.4.3",
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
"keywords": [
"strapi",
@ -78,20 +78,20 @@
"test:unit": "jest --verbose"
},
"dependencies": {
"@koa/cors": "3.4.1",
"@koa/cors": "3.4.2",
"@koa/router": "10.1.1",
"@strapi/admin": "4.4.1",
"@strapi/database": "4.4.1",
"@strapi/generate-new": "4.4.1",
"@strapi/generators": "4.4.1",
"@strapi/logger": "4.4.1",
"@strapi/permissions": "4.4.1",
"@strapi/plugin-content-manager": "4.4.1",
"@strapi/plugin-content-type-builder": "4.4.1",
"@strapi/plugin-email": "4.4.1",
"@strapi/plugin-upload": "4.4.1",
"@strapi/typescript-utils": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/admin": "4.4.3",
"@strapi/database": "4.4.3",
"@strapi/generate-new": "4.4.3",
"@strapi/generators": "4.4.3",
"@strapi/logger": "4.4.3",
"@strapi/permissions": "4.4.3",
"@strapi/plugin-content-manager": "4.4.3",
"@strapi/plugin-content-type-builder": "4.4.3",
"@strapi/plugin-email": "4.4.3",
"@strapi/plugin-upload": "4.4.3",
"@strapi/typescript-utils": "4.4.3",
"@strapi/utils": "4.4.3",
"bcryptjs": "2.4.3",
"boxen": "5.1.2",
"chalk": "4.1.2",

View File

@ -225,6 +225,14 @@ export const EditAssetDialog = ({
}),
value: getFileExtension(asset.ext),
},
{
label: formatMessage({
id: getTrad('modal.file-details.id'),
defaultMessage: 'Asset ID',
}),
value: asset.id,
},
]}
/>

View File

@ -1290,6 +1290,29 @@ exports[`<EditAssetDialog /> renders and matches the snapshot 1`] = `
</div>
</div>
</div>
<div
class="c13"
>
<div
class=""
>
<div
class="c25 c28"
spacing="1"
>
<span
class="c29"
>
Asset ID
</span>
<span
class="c30"
>
8
</span>
</div>
</div>
</div>
</div>
</div>
<div>

View File

@ -1290,6 +1290,29 @@ exports[`<EditAssetDialog /> renders and matches the snapshot 1`] = `
</div>
</div>
</div>
<div
class="c13"
>
<div
class=""
>
<div
class="c25 c28"
spacing="1"
>
<span
class="c29"
>
Asset ID
</span>
<span
class="c30"
>
8
</span>
</div>
</div>
</div>
</div>
</div>
<div>

View File

@ -97,7 +97,7 @@ describe('useAssets', () => {
};
expect(axiosInstance.get).toBeCalledWith(
`/upload/files?${stringify(expected, { encode: false })}`
`/upload/files${stringify(expected, { encode: false, addQueryPrefix: true })}`
);
});
@ -120,7 +120,7 @@ describe('useAssets', () => {
};
expect(axiosInstance.get).toBeCalledWith(
`/upload/files?${stringify(expected, { encode: false })}`
`/upload/files${stringify(expected, { encode: false, addQueryPrefix: true })}`
);
});
@ -148,7 +148,7 @@ describe('useAssets', () => {
};
expect(axiosInstance.get).toBeCalledWith(
`/upload/files?${stringify(expected, { encode: false })}`
`/upload/files${stringify(expected, { encode: false, addQueryPrefix: true })}`
);
});
@ -172,7 +172,32 @@ describe('useAssets', () => {
};
expect(axiosInstance.get).toBeCalledWith(
`/upload/files?${stringify(expected, { encode: false })}`
`/upload/files${stringify(expected, { encode: false, addQueryPrefix: true })}`
);
});
test('correctly encodes the search query _q', async () => {
const _q = 'something&else';
const { result, waitFor, waitForNextUpdate } = await setup({
query: { folder: 5, _q, filters: { $and: [{ something: 'true' }] } },
});
await waitFor(() => result.current.isSuccess);
await waitForNextUpdate();
const expected = {
filters: {
$and: [
{
something: true,
},
],
},
_q: encodeURIComponent(_q),
};
expect(axiosInstance.get).toBeCalledWith(
`/upload/files${stringify(expected, { encode: false, addQueryPrefix: true })}`
);
});

View File

@ -19,7 +19,7 @@ export const useAssets = ({ skipWhen = false, query = {} } = {}) => {
if (_q) {
params = {
...paramsExceptFolderAndQ,
_q,
_q: encodeURIComponent(_q),
};
} else {
params = {
@ -42,7 +42,10 @@ export const useAssets = ({ skipWhen = false, query = {} } = {}) => {
const getAssets = async () => {
try {
const { data } = await axiosInstance.get(
`${dataRequestURL}?${stringify(params, { encode: false })}`
`${dataRequestURL}${stringify(params, {
encode: false,
addQueryPrefix: true,
})}`
);
notifyStatus(

View File

@ -64,6 +64,7 @@
"modal.file-details.dimensions": "Dimensions",
"modal.file-details.extension": "Extension",
"modal.file-details.size": "Size",
"modal.file-details.id": "Asset ID",
"modal.folder.elements.count": "{folderCount} folders, {assetCount} assets",
"modal.header.browse": "Upload assets",
"modal.header.file-detail": "Details",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-upload",
"version": "4.4.1",
"version": "4.4.3",
"description": "Makes it easy to upload images and files to your Strapi Application.",
"license": "SEE LICENSE IN LICENSE",
"author": {
@ -23,9 +23,9 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
},
"dependencies": {
"@strapi/helper-plugin": "4.4.1",
"@strapi/provider-upload-local": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/helper-plugin": "4.4.3",
"@strapi/provider-upload-local": "4.4.3",
"@strapi/utils": "4.4.3",
"byte-size": "7.0.1",
"cropperjs": "1.5.12",
"date-fns": "2.29.2",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/utils",
"version": "4.4.1",
"version": "4.4.3",
"description": "Shared utilities for the Strapi packages",
"keywords": [
"strapi",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/generate-new",
"version": "4.4.1",
"version": "4.4.3",
"description": "Generate a new Strapi application.",
"keywords": [
"generate",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/generators",
"version": "4.4.1",
"version": "4.4.3",
"description": "Interactive API generator.",
"keywords": [
"strapi",
@ -30,8 +30,8 @@
"main": "lib/index.js",
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/typescript-utils": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/typescript-utils": "4.4.3",
"@strapi/utils": "4.4.3",
"chalk": "4.1.2",
"fs-extra": "10.0.0",
"node-plop": "0.26.3",

View File

@ -25,6 +25,21 @@ const App = (
);
describe('<ColorPickerInput />', () => {
/**
* We do this because
* https://github.com/facebook/jest/issues/12670
*/
beforeAll(() => {
jest.setTimeout(30000);
});
/**
* Reset timeout to what is expected
*/
afterAll(() => {
jest.setTimeout(5000);
});
it('renders and matches the snapshot', () => {
const { container } = render(App);

View File

@ -0,0 +1,12 @@
{
"color-picker.label": "Barva",
"color-picker.description": "Vyberte libovolnou barvu",
"color-picker.settings": "Nastavení",
"color-picket.input.format": "HEX",
"color-picker.options.advanced.regex": "RegExp vzor",
"color-picker.options.advanced.regex.description": "Zadejte regulární výraz pro ověření hodnoty HEX",
"color-picker.options.advanced.requiredField": "Povinné pole",
"color-picker.options.advanced.requiredField.description": "Pokud je toto pole prázdné, nebudete moci vytvořit záznam",
"color-picker.toggle.aria-label": "Přepínač výběru barvy",
"color-picker.input.aria-label": "Vstup pro výběr barvy"
}

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-color-picker",
"version": "4.4.1",
"version": "4.4.3",
"description": "Strapi maintained Custom Fields",
"strapi": {
"name": "color-picker",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-documentation",
"version": "4.4.1",
"version": "4.4.3",
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
"repository": {
"type": "git",
@ -24,8 +24,8 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/helper-plugin": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/helper-plugin": "4.4.3",
"@strapi/utils": "4.4.3",
"bcryptjs": "2.4.3",
"cheerio": "^1.0.0-rc.12",
"fs-extra": "10.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-graphql",
"version": "4.4.1",
"version": "4.4.3",
"description": "Adds GraphQL endpoint with default API methods.",
"repository": {
"type": "git",
@ -29,7 +29,7 @@
"dependencies": {
"@graphql-tools/schema": "8.1.2",
"@graphql-tools/utils": "^8.10.0",
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"apollo-server-core": "3.1.2",
"apollo-server-koa": "3.10.0",
"glob": "^7.1.7",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-i18n",
"version": "4.4.1",
"version": "4.4.3",
"description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API",
"repository": {
"type": "git",
@ -24,7 +24,7 @@
"test:unit": "jest --verbose"
},
"dependencies": {
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"lodash": "4.17.21"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-sentry",
"version": "4.4.1",
"version": "4.4.3",
"description": "Send Strapi error events to Sentry",
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-users-permissions",
"version": "4.4.1",
"version": "4.4.3",
"description": "Protect your API with a full-authentication process based on JWT",
"repository": {
"type": "git",
@ -27,8 +27,8 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
},
"dependencies": {
"@strapi/helper-plugin": "4.4.1",
"@strapi/utils": "4.4.1",
"@strapi/helper-plugin": "4.4.3",
"@strapi/utils": "4.4.3",
"bcryptjs": "2.4.3",
"grant-koa": "5.4.8",
"jsonwebtoken": "^8.1.0",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-amazon-ses",
"version": "4.4.1",
"version": "4.4.3",
"description": "Amazon SES provider for strapi email",
"keywords": [
"email",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"node-ses": "^3.0.3"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-mailgun",
"version": "4.4.1",
"version": "4.4.3",
"description": "Mailgun provider for strapi email plugin",
"keywords": [
"email",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"form-data": "^4.0.0",
"mailgun.js": "5.2.2"
},

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-nodemailer",
"version": "4.4.1",
"version": "4.4.3",
"description": "Nodemailer provider for Strapi 3",
"keywords": [
"strapi",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-sendgrid",
"version": "4.4.1",
"version": "4.4.3",
"description": "Sendgrid provider for strapi email",
"keywords": [
"email",
@ -37,7 +37,7 @@
},
"dependencies": {
"@sendgrid/mail": "7.7.0",
"@strapi/utils": "4.4.1"
"@strapi/utils": "4.4.3"
},
"engines": {
"node": ">=14.19.1 <=18.x.x",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-sendmail",
"version": "4.4.1",
"version": "4.4.3",
"description": "Sendmail provider for strapi email",
"keywords": [
"email",
@ -35,7 +35,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"sendmail": "^1.6.1"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-upload-aws-s3",
"version": "4.4.1",
"version": "4.4.3",
"description": "AWS S3 provider for strapi upload",
"keywords": [
"upload",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-upload-cloudinary",
"version": "4.4.1",
"version": "4.4.3",
"description": "Cloudinary provider for strapi upload",
"keywords": [
"upload",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"cloudinary": "^1.30.1",
"into-stream": "^5.1.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-upload-local",
"version": "4.4.1",
"version": "4.4.3",
"description": "Local provider for strapi upload",
"keywords": [
"upload",
@ -35,7 +35,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.4.1",
"@strapi/utils": "4.4.3",
"fs-extra": "10.0.0"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/babel-plugin-switch-ee-ce",
"version": "4.4.1",
"version": "4.4.3",
"private": false,
"description": "Babel plugin to switch from CE to EE at runtime",
"repository": "git://github.com/strapi/strapi.git",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/logger",
"version": "4.4.1",
"version": "4.4.3",
"description": "Strapi's logger",
"homepage": "https://strapi.io",
"bugs": {

View File

@ -17,7 +17,9 @@ const DEFAULT_TS_CONFIG_FILENAME = 'tsconfig.json';
*/
module.exports = (dir, { filename = DEFAULT_TS_CONFIG_FILENAME, ancestorsLookup = false } = {}) => {
const dirAbsolutePath = path.resolve(dir);
const configFilePath = ts.findConfigFile(dirAbsolutePath, ts.sys.fileExists, filename);
let configFilePath = ts.findConfigFile(dirAbsolutePath, ts.sys.fileExists, filename);
if (configFilePath) configFilePath = path.resolve(configFilePath);
if (!configFilePath || ancestorsLookup) {
return configFilePath;

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/typescript-utils",
"version": "4.4.1",
"version": "4.4.3",
"description": "Typescript support for Strapi",
"keywords": [
"strapi",

View File

@ -1892,6 +1892,25 @@
dependencies:
tslib "^2.0.1"
"@floating-ui/core@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.0.1.tgz#00e64d74e911602c8533957af0cce5af6b2e93c8"
integrity sha512-bO37brCPfteXQfFY0DyNDGB3+IMe4j150KFQcgJ5aBP295p9nBGeHEs/p0czrRbtlHq4Px/yoPXO/+dOCcF4uA==
"@floating-ui/dom@^1.0.0":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.0.2.tgz#c5184c52c6f50abd11052d71204f4be2d9245237"
integrity sha512-5X9WSvZ8/fjy3gDu8yx9HAA4KG1lazUN2P4/VnaXLxTO9Dz53HI1oYoh1OlhqFNlHgGDiwFX5WhFCc2ljbW3yA==
dependencies:
"@floating-ui/core" "^1.0.1"
"@floating-ui/react-dom@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-1.0.0.tgz#e0975966694433f1f0abffeee5d8e6bb69b7d16e"
integrity sha512-uiOalFKPG937UCLm42RxjESTWUVpbbatvlphQAU6bsv+ence6IoVG8JOUZcy8eW81NkU+Idiwvx10WFLmR4MIg==
dependencies:
"@floating-ui/dom" "^1.0.0"
"@formatjs/ecma402-abstract@1.11.4":
version "1.11.4"
resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz#b962dfc4ae84361f9f08fbce411b4e4340930eda"
@ -2459,7 +2478,14 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@koa/cors@3.4.1", "@koa/cors@^3.1.0":
"@koa/cors@3.4.2":
version "3.4.2"
resolved "https://registry.yarnpkg.com/@koa/cors/-/cors-3.4.2.tgz#70c13e5843d1762ce78fd8767162cd916132c946"
integrity sha512-NJU7/+h9XAfw/W/dLadDg8JYrQ5EDxstBl9a9G0A++EqvrQpabWcZ4tBxOdW57QjketX66zkOcXE+5V7IjLWYA==
dependencies:
vary "^1.1.2"
"@koa/cors@^3.1.0":
version "3.4.1"
resolved "https://registry.yarnpkg.com/@koa/cors/-/cors-3.4.1.tgz#ddd5c6ff07a1e60831e1281411a3b9fdb95a5b26"
integrity sha512-/sG9NlpGZ/aBpnRamIlGs+wX+C/IJ5DodNK7iPQIVCG4eUQdGeshGhWQ6JCi7tpnD9sCtFXcS04iTimuaJfh4Q==
@ -5395,11 +5421,12 @@
regenerator-runtime "^0.13.7"
resolve-from "^5.0.0"
"@strapi/design-system@1.2.3":
version "1.2.3"
resolved "https://registry.yarnpkg.com/@strapi/design-system/-/design-system-1.2.3.tgz#9e077c00ba93f8330b95ec23bc0c4f0d777dec4d"
integrity sha512-wZu05hTVhcnDfue1q+UnDNY/ATWWcWIXHKd85rbY2I1RzrlCNgALGiMvXK6QKXrM31W3Wc2YyowOAyrIXjZjWw==
"@strapi/design-system@1.2.5":
version "1.2.5"
resolved "https://registry.yarnpkg.com/@strapi/design-system/-/design-system-1.2.5.tgz#af067aa6daa5db20d1a5f799e7b02fdf0e954dc6"
integrity sha512-7vF1UXzDPS0HxPS10OxaUpTapGIyaea+wj3L1bVxjRf4ZGsblGSIayX0kIeBlv9OoP056LW75ViRJzGjRsaTxw==
dependencies:
"@floating-ui/react-dom" "^1.0.0"
"@internationalized/number" "^3.1.1"
compute-scroll-into-view "^1.0.17"
prop-types "^15.7.2"