From 7dfcf52e080e450a65df02c44a627b1c74934189 Mon Sep 17 00:00:00 2001 From: mfrachet Date: Mon, 22 Mar 2021 15:14:49 +0100 Subject: [PATCH] Add utils to CM folder in helper plugin --- .../utils/contentManagementUtilRemoveFieldsFromData.js | 0 .../src/{ => content-manager}/utils/formatComponentData.js | 0 .../src/{ => content-manager}/utils/getAttributeInfos.js | 0 .../tests/contentManagementUtilRemoveFieldsFromData.test.js | 2 +- .../utils/tests/formatComponentData.test.js | 2 +- packages/strapi-helper-plugin/lib/src/index.js | 6 +++--- .../admin/src/containers/ListView/utils/buildQueryString.js | 1 - 7 files changed, 5 insertions(+), 6 deletions(-) rename packages/strapi-helper-plugin/lib/src/{ => content-manager}/utils/contentManagementUtilRemoveFieldsFromData.js (100%) rename packages/strapi-helper-plugin/lib/src/{ => content-manager}/utils/formatComponentData.js (100%) rename packages/strapi-helper-plugin/lib/src/{ => content-manager}/utils/getAttributeInfos.js (100%) rename packages/strapi-helper-plugin/lib/src/{ => content-manager}/utils/tests/contentManagementUtilRemoveFieldsFromData.test.js (97%) rename packages/strapi-helper-plugin/lib/src/{ => content-manager}/utils/tests/formatComponentData.test.js (97%) diff --git a/packages/strapi-helper-plugin/lib/src/utils/contentManagementUtilRemoveFieldsFromData.js b/packages/strapi-helper-plugin/lib/src/content-manager/utils/contentManagementUtilRemoveFieldsFromData.js similarity index 100% rename from packages/strapi-helper-plugin/lib/src/utils/contentManagementUtilRemoveFieldsFromData.js rename to packages/strapi-helper-plugin/lib/src/content-manager/utils/contentManagementUtilRemoveFieldsFromData.js diff --git a/packages/strapi-helper-plugin/lib/src/utils/formatComponentData.js b/packages/strapi-helper-plugin/lib/src/content-manager/utils/formatComponentData.js similarity index 100% rename from packages/strapi-helper-plugin/lib/src/utils/formatComponentData.js rename to packages/strapi-helper-plugin/lib/src/content-manager/utils/formatComponentData.js diff --git a/packages/strapi-helper-plugin/lib/src/utils/getAttributeInfos.js b/packages/strapi-helper-plugin/lib/src/content-manager/utils/getAttributeInfos.js similarity index 100% rename from packages/strapi-helper-plugin/lib/src/utils/getAttributeInfos.js rename to packages/strapi-helper-plugin/lib/src/content-manager/utils/getAttributeInfos.js diff --git a/packages/strapi-helper-plugin/lib/src/utils/tests/contentManagementUtilRemoveFieldsFromData.test.js b/packages/strapi-helper-plugin/lib/src/content-manager/utils/tests/contentManagementUtilRemoveFieldsFromData.test.js similarity index 97% rename from packages/strapi-helper-plugin/lib/src/utils/tests/contentManagementUtilRemoveFieldsFromData.test.js rename to packages/strapi-helper-plugin/lib/src/content-manager/utils/tests/contentManagementUtilRemoveFieldsFromData.test.js index 324a495b24..3e4ddc1be0 100644 --- a/packages/strapi-helper-plugin/lib/src/utils/tests/contentManagementUtilRemoveFieldsFromData.test.js +++ b/packages/strapi-helper-plugin/lib/src/content-manager/utils/tests/contentManagementUtilRemoveFieldsFromData.test.js @@ -1,4 +1,4 @@ -import testData from '../../testUtils/testData'; +import testData from '../../../testUtils/testData'; import contentManagementUtilRemoveFieldsFromData from '../contentManagementUtilRemoveFieldsFromData'; describe('STRAPI_HELPER_PLUGIN | utils', () => { diff --git a/packages/strapi-helper-plugin/lib/src/utils/tests/formatComponentData.test.js b/packages/strapi-helper-plugin/lib/src/content-manager/utils/tests/formatComponentData.test.js similarity index 97% rename from packages/strapi-helper-plugin/lib/src/utils/tests/formatComponentData.test.js rename to packages/strapi-helper-plugin/lib/src/content-manager/utils/tests/formatComponentData.test.js index 24a52e8791..55c4f3fdab 100644 --- a/packages/strapi-helper-plugin/lib/src/utils/tests/formatComponentData.test.js +++ b/packages/strapi-helper-plugin/lib/src/content-manager/utils/tests/formatComponentData.test.js @@ -1,4 +1,4 @@ -import testData from '../../testUtils/testData'; +import testData from '../../../testUtils/testData'; import formatComponentData from '../formatComponentData'; const { contentType, components, modifiedData } = testData; diff --git a/packages/strapi-helper-plugin/lib/src/index.js b/packages/strapi-helper-plugin/lib/src/index.js index a3f53a0405..dd44516667 100644 --- a/packages/strapi-helper-plugin/lib/src/index.js +++ b/packages/strapi-helper-plugin/lib/src/index.js @@ -1,4 +1,4 @@ -import { getType, getOtherInfos } from './utils/getAttributeInfos'; +import { getType, getOtherInfos } from './content-manager/utils/getAttributeInfos'; // Assets export { default as colors } from './assets/styles/colors'; export { default as sizes } from './assets/styles/sizes'; @@ -125,10 +125,10 @@ export { default as StrapiProvider } from './providers/StrapiProvider'; export { default as auth } from './utils/auth'; export { default as cleanData } from './utils/cleanData'; export { default as difference } from './utils/difference'; -export { default as contentManagementUtilRemoveFieldsFromData } from './utils/contentManagementUtilRemoveFieldsFromData'; +export { default as contentManagementUtilRemoveFieldsFromData } from './content-manager/utils/contentManagementUtilRemoveFieldsFromData'; export { default as dateFormats } from './utils/dateFormats'; export { default as dateToUtcTime } from './utils/dateToUtcTime'; -export { default as formatComponentData } from './utils/formatComponentData'; +export { default as formatComponentData } from './content-manager/utils/formatComponentData'; export { default as hasPermissions } from './utils/hasPermissions'; export { findMatchingPermissions } from './utils/hasPermissions'; export { default as translatedErrors } from './utils/translatedErrors'; diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/ListView/utils/buildQueryString.js b/packages/strapi-plugin-content-manager/admin/src/containers/ListView/utils/buildQueryString.js index 04a8eb4869..632fe1bd03 100644 --- a/packages/strapi-plugin-content-manager/admin/src/containers/ListView/utils/buildQueryString.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/ListView/utils/buildQueryString.js @@ -8,7 +8,6 @@ import createPluginsFilter from './createPluginsFilter'; * - plugin options */ const buildQueryString = (queryParams = {}) => { - // const pluginOptionArray = arrayOfPluginOptions(queryParams.pluginOptions); const _where = queryParams._where || []; /**