@strapi/admin 4.6.0-beta.1 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +3 -0
- package/admin/src/components/ConfigurationsProvider/index.js +21 -18
- package/admin/src/components/ConfigurationsProvider/reducer.js +1 -0
- package/admin/src/components/GlobalStyle/index.js +0 -6
- package/admin/src/components/GuidedTour/Modal/components/Content.js +7 -2
- package/admin/src/components/LeftMenu/index.js +60 -53
- package/admin/src/components/Notifications/Notification/index.js +25 -3
- package/admin/src/components/Notifications/reducer.js +1 -0
- package/admin/src/components/UnauthenticatedLogo/index.js +1 -1
- package/admin/src/content-manager/components/DragLayer/RelationDragPreview.js +8 -6
- package/admin/src/content-manager/components/DynamicTable/CellContent/RelationMultiple/index.js +4 -0
- package/admin/src/content-manager/components/DynamicZone/components/DynamicComponent.js +1 -1
- package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +5 -6
- package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +30 -6
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +18 -6
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/findLeafByPathAndReplace.js +2 -1
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +2 -1
- package/admin/src/content-manager/components/FieldComponent/index.js +6 -4
- package/admin/src/content-manager/components/Hint/index.js +4 -17
- package/admin/src/content-manager/components/InputUID/index.js +3 -14
- package/admin/src/content-manager/components/PreviewWysiwyg/Wrapper.js +22 -27
- package/admin/src/content-manager/components/RelationInput/RelationInput.js +6 -8
- package/admin/src/content-manager/components/RelationInput/components/RelationItem.js +6 -1
- package/admin/src/content-manager/components/RelationInput/components/RelationList.js +10 -6
- package/admin/src/content-manager/components/RelationInputDataManager/RelationInputDataManager.js +17 -6
- package/admin/src/content-manager/components/RelationInputDataManager/utils/select.js +5 -5
- package/admin/src/content-manager/components/RepeatableComponent/index.js +18 -23
- package/admin/src/content-manager/components/Wysiwyg/EditorLayout.js +19 -28
- package/admin/src/content-manager/components/Wysiwyg/index.js +4 -8
- package/admin/src/content-manager/hooks/useCallbackRef.js +23 -0
- package/admin/src/content-manager/hooks/useDragAndDrop.js +1 -1
- package/admin/src/content-manager/hooks/useKeyboardDragAndDrop.js +10 -2
- package/admin/src/content-manager/hooks/useRelation/useRelation.js +9 -6
- package/admin/src/content-manager/pages/App/LeftMenu/index.js +5 -12
- package/admin/src/content-manager/pages/App/LeftMenu/utils/index.js +1 -0
- package/admin/src/content-manager/pages/App/LeftMenu/utils/matchByTitle.js +24 -0
- package/admin/src/content-manager/pages/EditView/Header/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/{Informations → Information}/index.js +55 -39
- package/admin/src/content-manager/pages/EditView/{Informations → Information}/utils/getUnits.js +0 -0
- package/admin/src/content-manager/pages/EditView/index.js +3 -3
- package/admin/src/content-manager/pages/ListSettingsView/index.js +3 -5
- package/admin/src/content-manager/utils/getMaxTempKey.js +4 -2
- package/admin/src/content-manager/utils/paths.js +37 -0
- package/admin/src/core/store/configureStore.js +22 -4
- package/admin/src/core/utils/axiosInstance.js +4 -2
- package/admin/src/hooks/index.js +0 -1
- package/admin/src/hooks/useSettingsMenu/init.js +2 -18
- package/admin/src/hooks/useSettingsMenu/utils/adminLinks.js +4 -0
- package/admin/src/hooks/useSettingsMenu/utils/customAdminLinks.js +1 -0
- package/admin/src/hooks/useSettingsMenu/utils/defaultAdminLinks.js +21 -0
- package/admin/src/index.js +3 -3
- package/admin/src/pages/App/index.js +8 -3
- package/admin/src/pages/ProfilePage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/CustomizationInfos/index.js +142 -0
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/{Form → CustomizationInfos}/init.js +3 -0
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/{Form → CustomizationInfos}/reducer.js +20 -0
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/index.js +21 -17
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +68 -42
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/api.js +5 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -1
- package/admin/src/permissions/defaultPermissions.js +8 -0
- package/admin/src/translations/ca.json +2 -3
- package/admin/src/translations/dk.json +2 -2
- package/admin/src/translations/en.json +63 -16
- package/admin/src/translations/es.json +2 -2
- package/admin/src/translations/fr.json +2 -2
- package/admin/src/translations/hu.json +197 -2
- package/admin/src/translations/ja.json +2 -2
- package/admin/src/translations/nl.json +2 -2
- package/admin/src/translations/zh-Hans.json +1 -1
- package/admin/src/translations/zh.json +11 -3
- package/build/2607.ce06608e.chunk.js +66 -0
- package/build/2743.dea372fb.chunk.js +42 -0
- package/build/3075.03ebe93d.chunk.js +115 -0
- package/build/3632.963ac97d.chunk.js +138 -0
- package/build/4318.8cb388a5.chunk.js +30 -0
- package/build/4656.a0d43cca.chunk.js +159 -0
- package/build/5015.8e3fe50b.chunk.js +6 -0
- package/build/5910.a5374848.chunk.js +209 -0
- package/build/8633.4af74a50.chunk.js +1 -0
- package/build/9641.a311b612.chunk.js +276 -0
- package/build/9707.62831b4d.chunk.js +101 -0
- package/build/Admin-authenticatedApp.50dc27f9.chunk.js +75 -0
- package/build/Admin_InternalErrorPage.157152a8.chunk.js +1 -0
- package/build/Admin_homePage.79ab880c.chunk.js +77 -0
- package/build/Admin_marketplace.eabf21b2.chunk.js +26 -0
- package/build/Admin_pluginsPage.953e796b.chunk.js +6 -0
- package/build/Admin_profilePage.5c2efda5.chunk.js +15 -0
- package/build/Admin_settingsPage.19cfb9ca.chunk.js +178 -0
- package/build/Upload_ConfigureTheView.3f2b6e6a.chunk.js +1 -0
- package/build/admin-app.34295b50.chunk.js +112 -0
- package/build/admin-edit-roles-page.d50d9654.chunk.js +1 -0
- package/build/admin-edit-users.912b856d.chunk.js +10 -0
- package/build/admin-users.e36e7111.chunk.js +11 -0
- package/build/api-tokens-create-page.0e686c30.chunk.js +1 -0
- package/build/api-tokens-edit-page.d6c7487b.chunk.js +1 -0
- package/build/api-tokens-list-page.1cd86136.chunk.js +16 -0
- package/build/ar-json.932794f7.chunk.js +1 -0
- package/build/audit-logs-settings-page.308a6250.chunk.js +1 -0
- package/build/ca-json.f6a0f472.chunk.js +1 -0
- package/build/codemirror-addon-closebrackets.71aa4bbd.chunk.js +2 -0
- package/build/codemirror-addon-lint-js.405f70fb.chunk.js +1 -0
- package/build/codemirror-addon-lint.8487ad3d.chunk.js +1 -0
- package/build/codemirror-addon-mark-selection.1928c849.chunk.js +1 -0
- package/build/{codemirror-css.4e2bbed3.chunk.js → codemirror-css.359a2a4b.chunk.js} +2 -3
- package/build/codemirror-javacript.af237b68.chunk.js +1 -0
- package/build/codemirror-theme.2fe63a16.chunk.js +33 -0
- package/build/content-manager.851f40ce.chunk.js +1170 -0
- package/build/content-type-builder-list-view.4243b2b1.chunk.js +198 -0
- package/build/content-type-builder-translation-ar-json.56d8fcf4.chunk.js +1 -0
- package/build/content-type-builder-translation-cs-json.a5b299ca.chunk.js +1 -0
- package/build/content-type-builder-translation-de-json.0979cccb.chunk.js +1 -0
- package/build/content-type-builder-translation-dk-json.e05583e9.chunk.js +1 -0
- package/build/content-type-builder-translation-en-json.e577d595.chunk.js +1 -0
- package/build/content-type-builder-translation-es-json.fe4daad8.chunk.js +1 -0
- package/build/content-type-builder-translation-fr-json.b1eb52f6.chunk.js +1 -0
- package/build/content-type-builder-translation-id-json.ee3b36bb.chunk.js +1 -0
- package/build/content-type-builder-translation-it-json.13b3c26a.chunk.js +1 -0
- package/build/content-type-builder-translation-ja-json.9be0d5b2.chunk.js +1 -0
- package/build/content-type-builder-translation-ko-json.8a274be5.chunk.js +1 -0
- package/build/content-type-builder-translation-ms-json.2d29c1e0.chunk.js +1 -0
- package/build/content-type-builder-translation-nl-json.40bbc562.chunk.js +1 -0
- package/build/content-type-builder-translation-pl-json.24a34349.chunk.js +1 -0
- package/build/content-type-builder-translation-pt-BR-json.97f71a9d.chunk.js +1 -0
- package/build/content-type-builder-translation-pt-json.ddb44f8c.chunk.js +1 -0
- package/build/content-type-builder-translation-ru-json.54d11230.chunk.js +1 -0
- package/build/content-type-builder-translation-sk-json.626c9493.chunk.js +1 -0
- package/build/content-type-builder-translation-sv-json.59f5e1e5.chunk.js +1 -0
- package/build/content-type-builder-translation-th-json.6fe3ed55.chunk.js +1 -0
- package/build/content-type-builder-translation-tr-json.cea4d226.chunk.js +1 -0
- package/build/content-type-builder-translation-uk-json.c4524247.chunk.js +1 -0
- package/build/content-type-builder-translation-zh-Hans-json.52a30266.chunk.js +1 -0
- package/build/content-type-builder-translation-zh-json.faedd610.chunk.js +1 -0
- package/build/content-type-builder.365b6bf4.chunk.js +125 -0
- package/build/cs-json.79879fb6.chunk.js +1 -0
- package/build/de-json.30e1f35b.chunk.js +1 -0
- package/build/dk-json.e6d9ffa4.chunk.js +1 -0
- package/build/email-settings-page.379552b1.chunk.js +15 -0
- package/build/email-translation-ar-json.88304564.chunk.js +1 -0
- package/build/email-translation-cs-json.6eaeec6a.chunk.js +1 -0
- package/build/email-translation-de-json.1b334230.chunk.js +1 -0
- package/build/email-translation-dk-json.85402492.chunk.js +1 -0
- package/build/email-translation-en-json.4211d4d0.chunk.js +1 -0
- package/build/email-translation-es-json.0b6b1006.chunk.js +1 -0
- package/build/email-translation-fr-json.78be2787.chunk.js +1 -0
- package/build/email-translation-id-json.c97239fe.chunk.js +1 -0
- package/build/email-translation-it-json.a2ed8c78.chunk.js +1 -0
- package/build/email-translation-ja-json.63eebd02.chunk.js +1 -0
- package/build/email-translation-ko-json.4de49b23.chunk.js +1 -0
- package/build/email-translation-ms-json.7390477e.chunk.js +1 -0
- package/build/email-translation-nl-json.377bdd9f.chunk.js +1 -0
- package/build/email-translation-pl-json.97d0db97.chunk.js +1 -0
- package/build/email-translation-pt-BR-json.81cca553.chunk.js +1 -0
- package/build/email-translation-pt-json.2a2a0643.chunk.js +1 -0
- package/build/email-translation-ru-json.6bce37dd.chunk.js +1 -0
- package/build/email-translation-sk-json.53da2fcd.chunk.js +1 -0
- package/build/email-translation-th-json.660fa9a8.chunk.js +1 -0
- package/build/email-translation-tr-json.e6c0f8fc.chunk.js +1 -0
- package/build/email-translation-uk-json.bd1fb6bf.chunk.js +1 -0
- package/build/email-translation-vi-json.9fb7e6d7.chunk.js +1 -0
- package/build/email-translation-zh-Hans-json.c6841563.chunk.js +1 -0
- package/build/email-translation-zh-json.7a2232ea.chunk.js +1 -0
- package/build/en-json.38d182e5.chunk.js +1 -0
- package/build/es-json.e275481d.chunk.js +1 -0
- package/build/fr-json.78545ef8.chunk.js +1 -0
- package/build/gu-json.676518f2.chunk.js +1 -0
- package/build/he-json.ad22e8cc.chunk.js +1 -0
- package/build/hi-json.19b51c09.chunk.js +1 -0
- package/build/highlight.js.26ef649f.chunk.js +85 -0
- package/build/hu-json.f947088f.chunk.js +1 -0
- package/build/i18n-settings-page.3ab28b1a.chunk.js +65 -0
- package/build/i18n-translation-de-json.362384a6.chunk.js +1 -0
- package/build/i18n-translation-dk-json.89401417.chunk.js +1 -0
- package/build/i18n-translation-en-json.60af6722.chunk.js +1 -0
- package/build/i18n-translation-es-json.87b494d1.chunk.js +1 -0
- package/build/i18n-translation-fr-json.57ddc77e.chunk.js +1 -0
- package/build/i18n-translation-ko-json.ef4f9471.chunk.js +1 -0
- package/build/i18n-translation-pl-json.dfac513d.chunk.js +1 -0
- package/build/i18n-translation-tr-json.10f0600d.chunk.js +1 -0
- package/build/i18n-translation-zh-Hans-json.757ce62d.chunk.js +1 -0
- package/build/i18n-translation-zh-json.bef2dc07.chunk.js +1 -0
- package/build/id-json.504daa84.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/it-json.2fd90f4d.chunk.js +1 -0
- package/build/ja-json.c9f12d0b.chunk.js +1 -0
- package/build/ko-json.ef463065.chunk.js +1 -0
- package/build/main.9f31732e.js +4454 -0
- package/build/ml-json.490f666c.chunk.js +1 -0
- package/build/ms-json.db87d8d3.chunk.js +1 -0
- package/build/nl-json.c416295a.chunk.js +1 -0
- package/build/no-json.1a2258ba.chunk.js +1 -0
- package/build/pl-json.8cf0c871.chunk.js +1 -0
- package/build/pt-BR-json.51fab8d0.chunk.js +1 -0
- package/build/pt-json.62927d1e.chunk.js +1 -0
- package/build/ru-json.3b411a39.chunk.js +1 -0
- package/build/runtime~main.2b8e2318.js +2 -0
- package/build/sa-json.f3fa5407.chunk.js +1 -0
- package/build/sk-json.9ec60d9f.chunk.js +1 -0
- package/build/sso-settings-page.b64a44e8.chunk.js +41 -0
- package/build/sv-json.c6b0c237.chunk.js +1 -0
- package/build/th-json.6e68155c.chunk.js +1 -0
- package/build/tr-json.9f41dc08.chunk.js +1 -0
- package/build/uk-json.b2fcd567.chunk.js +1 -0
- package/build/upload-settings.6c26ff37.chunk.js +89 -0
- package/build/upload-translation-ca-json.57954414.chunk.js +1 -0
- package/build/upload-translation-de-json.420c943b.chunk.js +1 -0
- package/build/upload-translation-dk-json.bbb2fa05.chunk.js +1 -0
- package/build/upload-translation-en-json.8b7573ce.chunk.js +1 -0
- package/build/upload-translation-es-json.ba2eb03a.chunk.js +1 -0
- package/build/upload-translation-fr-json.84429734.chunk.js +1 -0
- package/build/upload-translation-he-json.0a830937.chunk.js +1 -0
- package/build/upload-translation-it-json.e87d7966.chunk.js +1 -0
- package/build/upload-translation-ja-json.44b88e7a.chunk.js +1 -0
- package/build/upload-translation-ko-json.a52eab64.chunk.js +1 -0
- package/build/upload-translation-ms-json.74f6d746.chunk.js +1 -0
- package/build/upload-translation-pl-json.426f31c9.chunk.js +1 -0
- package/build/upload-translation-pt-BR-json.d1704f0b.chunk.js +1 -0
- package/build/upload-translation-pt-json.6b937fdf.chunk.js +1 -0
- package/build/upload-translation-ru-json.675f6b93.chunk.js +1 -0
- package/build/upload-translation-sk-json.483a18f6.chunk.js +1 -0
- package/build/upload-translation-th-json.3847dae0.chunk.js +1 -0
- package/build/upload-translation-tr-json.74117e5c.chunk.js +1 -0
- package/build/upload-translation-uk-json.9950466a.chunk.js +1 -0
- package/build/upload-translation-zh-Hans-json.3da5cf56.chunk.js +1 -0
- package/build/upload-translation-zh-json.e1dd6eb2.chunk.js +1 -0
- package/build/upload.2c69d238.chunk.js +38 -0
- package/build/users-advanced-settings-page.c4270682.chunk.js +13 -0
- package/build/users-email-settings-page.60422a2f.chunk.js +28 -0
- package/build/users-permissions-translation-ar-json.7d87d54d.chunk.js +1 -0
- package/build/users-permissions-translation-cs-json.7e23424a.chunk.js +1 -0
- package/build/users-permissions-translation-de-json.a6fb670f.chunk.js +1 -0
- package/build/users-permissions-translation-dk-json.60e50f48.chunk.js +1 -0
- package/build/users-permissions-translation-en-json.4b302272.chunk.js +1 -0
- package/build/users-permissions-translation-es-json.35007573.chunk.js +1 -0
- package/build/users-permissions-translation-fr-json.7e55bbbb.chunk.js +1 -0
- package/build/users-permissions-translation-id-json.a5a0fb59.chunk.js +1 -0
- package/build/users-permissions-translation-it-json.0705465d.chunk.js +1 -0
- package/build/users-permissions-translation-ja-json.891fe76e.chunk.js +1 -0
- package/build/users-permissions-translation-ko-json.357d7a33.chunk.js +1 -0
- package/build/users-permissions-translation-ms-json.c83f87c4.chunk.js +1 -0
- package/build/users-permissions-translation-nl-json.c9f92a3c.chunk.js +1 -0
- package/build/users-permissions-translation-pl-json.0a7287d1.chunk.js +1 -0
- package/build/users-permissions-translation-pt-BR-json.1b6d2920.chunk.js +1 -0
- package/build/users-permissions-translation-pt-json.a7eda429.chunk.js +1 -0
- package/build/users-permissions-translation-ru-json.20e177db.chunk.js +1 -0
- package/build/users-permissions-translation-sk-json.7f37180f.chunk.js +1 -0
- package/build/users-permissions-translation-sv-json.17187818.chunk.js +1 -0
- package/build/users-permissions-translation-th-json.1e9c0247.chunk.js +1 -0
- package/build/users-permissions-translation-tr-json.2bd7ff98.chunk.js +1 -0
- package/build/users-permissions-translation-uk-json.6a0a1572.chunk.js +1 -0
- package/build/users-permissions-translation-vi-json.6722a8a2.chunk.js +1 -0
- package/build/users-permissions-translation-zh-Hans-json.0b31c705.chunk.js +1 -0
- package/build/users-permissions-translation-zh-json.7978eaa6.chunk.js +1 -0
- package/build/users-providers-settings-page.e1834060.chunk.js +104 -0
- package/build/users-roles-settings-page.3ef35132.chunk.js +30 -0
- package/build/vi-json.f08d7d03.chunk.js +1 -0
- package/build/webhook-edit-page.c0080dc1.chunk.js +75 -0
- package/build/webhook-list-page.f75ba3f2.chunk.js +42 -0
- package/build/zh-Hans-json.9c0eac99.chunk.js +1 -0
- package/build/zh-json.f88f563d.chunk.js +1 -0
- package/ee/admin/hooks/useSettingsMenu/utils/customAdminLinks.js +17 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionBody.js +111 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionItem.js +22 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/index.js +56 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/PaginationFooter/index.js +35 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/TableRows/index.js +88 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useFormatTimeStamp.js +24 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/index.js +98 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/getActionTypesDefaultMessages.js +36 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/tableHeaders.js +38 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ProtectedListPage/index.js +12 -0
- package/ee/admin/pages/SettingsPage/{SingleSignOn → pages/SingleSignOn}/index.js +3 -3
- package/ee/admin/pages/SettingsPage/{SingleSignOn → pages/SingleSignOn}/utils/schema.js +0 -0
- package/ee/admin/pages/SettingsPage/utils/customRoutes.js +28 -16
- package/ee/server/bootstrap.js +8 -20
- package/ee/server/config/admin-actions.js +32 -0
- package/ee/server/controllers/audit-logs.js +24 -0
- package/ee/server/controllers/authentication/middlewares.js +2 -1
- package/ee/server/controllers/index.js +1 -0
- package/ee/server/destroy.js +12 -0
- package/ee/server/index.js +2 -0
- package/ee/server/register.js +15 -0
- package/ee/server/routes/index.js +94 -10
- package/ee/server/services/audit-logs.js +153 -0
- package/ee/server/services/passport/sso.js +13 -1
- package/ee/server/services/passport.js +1 -4
- package/ee/server/validation/audit-logs.js +18 -0
- package/package.json +20 -15
- package/server/controllers/admin.js +3 -2
- package/server/controllers/authentication.js +8 -1
- package/server/index.js +2 -0
- package/server/middlewares/index.js +7 -0
- package/server/middlewares/rateLimit.js +43 -0
- package/server/register.js +9 -0
- package/server/routes/authentication.js +12 -1
- package/server/routes/roles.js +0 -8
- package/server/services/permission/queries.js +12 -3
- package/server/services/project-settings.js +10 -6
- package/server/services/role.js +11 -2
- package/server/services/user.js +25 -3
- package/server/validation/project-settings.js +19 -10
- package/strapi-server.js +1 -1
- package/webpack.config.js +7 -4
- package/admin/src/core/store/createReducer.js +0 -5
- package/admin/src/hooks/useFetchClient/index.js +0 -23
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/Form/index.js +0 -85
- package/admin/src/utils/fetchClient.js +0 -45
- package/admin/src/utils/getFetchClient.js +0 -10
- package/build/2235.06c13219.chunk.js +0 -106
- package/build/2598.962797b2.chunk.js +0 -159
- package/build/4318.0bbd3f4b.chunk.js +0 -30
- package/build/4958.7c118f5e.chunk.js +0 -276
- package/build/5015.f080b64e.chunk.js +0 -6
- package/build/5052.712419ea.chunk.js +0 -65
- package/build/7295.04ac49dc.chunk.js +0 -114
- package/build/805.ddcead70.chunk.js +0 -138
- package/build/8633.59223842.chunk.js +0 -1
- package/build/874.bde3ea04.chunk.js +0 -104
- package/build/9159.ac968e72.chunk.js +0 -169
- package/build/9707.77e475ee.chunk.js +0 -101
- package/build/Admin-authenticatedApp.9dd415b8.chunk.js +0 -72
- package/build/Admin_InternalErrorPage.e0317a5e.chunk.js +0 -1
- package/build/Admin_homePage.8945f71a.chunk.js +0 -77
- package/build/Admin_marketplace.ed754a4a.chunk.js +0 -26
- package/build/Admin_pluginsPage.67728975.chunk.js +0 -6
- package/build/Admin_profilePage.60ab80bb.chunk.js +0 -15
- package/build/Admin_settingsPage.9ce40fed.chunk.js +0 -178
- package/build/Upload_ConfigureTheView.7cb2a3fd.chunk.js +0 -1
- package/build/admin-app.d8fc7c4d.chunk.js +0 -112
- package/build/admin-edit-roles-page.f407538c.chunk.js +0 -1
- package/build/admin-edit-users.5547b126.chunk.js +0 -10
- package/build/admin-users.4b6b47f8.chunk.js +0 -11
- package/build/api-tokens-create-page.dd4ddfcb.chunk.js +0 -1
- package/build/api-tokens-edit-page.821c5a6c.chunk.js +0 -1
- package/build/api-tokens-list-page.50519ed7.chunk.js +0 -16
- package/build/ar-json.3489463d.chunk.js +0 -1
- package/build/ca-json.07ae0f2c.chunk.js +0 -1
- package/build/codemirror-addon-closebrackets.c0f97916.chunk.js +0 -2
- package/build/codemirror-addon-lint-js.7c35dcb0.chunk.js +0 -1
- package/build/codemirror-addon-lint.505ff1d4.chunk.js +0 -1
- package/build/codemirror-addon-mark-selection.653e904d.chunk.js +0 -1
- package/build/codemirror-javacript.41bdefda.chunk.js +0 -1
- package/build/codemirror-theme.a82cae4e.chunk.js +0 -34
- package/build/content-manager.f2214e32.chunk.js +0 -1166
- package/build/content-type-builder-list-view.4aea46fa.chunk.js +0 -198
- package/build/content-type-builder-translation-ar-json.142327af.chunk.js +0 -1
- package/build/content-type-builder-translation-cs-json.4aafb972.chunk.js +0 -1
- package/build/content-type-builder-translation-de-json.a52482c7.chunk.js +0 -1
- package/build/content-type-builder-translation-dk-json.a8616510.chunk.js +0 -1
- package/build/content-type-builder-translation-en-json.1d9a3c14.chunk.js +0 -1
- package/build/content-type-builder-translation-es-json.c3ea46fb.chunk.js +0 -1
- package/build/content-type-builder-translation-fr-json.aa6eeea8.chunk.js +0 -1
- package/build/content-type-builder-translation-id-json.7c00a32a.chunk.js +0 -1
- package/build/content-type-builder-translation-it-json.a906b389.chunk.js +0 -1
- package/build/content-type-builder-translation-ja-json.87f71930.chunk.js +0 -1
- package/build/content-type-builder-translation-ko-json.3fb7ddc8.chunk.js +0 -1
- package/build/content-type-builder-translation-ms-json.963a1a01.chunk.js +0 -1
- package/build/content-type-builder-translation-nl-json.c46c8f30.chunk.js +0 -1
- package/build/content-type-builder-translation-pl-json.9b2993b2.chunk.js +0 -1
- package/build/content-type-builder-translation-pt-BR-json.6d255441.chunk.js +0 -1
- package/build/content-type-builder-translation-pt-json.96a31576.chunk.js +0 -1
- package/build/content-type-builder-translation-ru-json.cf8d7c5c.chunk.js +0 -1
- package/build/content-type-builder-translation-sk-json.3a6defe0.chunk.js +0 -1
- package/build/content-type-builder-translation-sv-json.c608b9ca.chunk.js +0 -1
- package/build/content-type-builder-translation-th-json.c96a2d3f.chunk.js +0 -1
- package/build/content-type-builder-translation-tr-json.949e22eb.chunk.js +0 -1
- package/build/content-type-builder-translation-uk-json.d8c0b6dd.chunk.js +0 -1
- package/build/content-type-builder-translation-zh-Hans-json.92a27f59.chunk.js +0 -1
- package/build/content-type-builder-translation-zh-json.b79513e4.chunk.js +0 -1
- package/build/content-type-builder.8a9a77f9.chunk.js +0 -127
- package/build/cropper-css.12fe038c.chunk.js +0 -306
- package/build/cs-json.ce49da5c.chunk.js +0 -1
- package/build/de-json.6b3e1894.chunk.js +0 -1
- package/build/dk-json.144c6a8e.chunk.js +0 -1
- package/build/email-settings-page.c6e62f6b.chunk.js +0 -15
- package/build/email-translation-ar-json.c624512d.chunk.js +0 -1
- package/build/email-translation-cs-json.cb18caab.chunk.js +0 -1
- package/build/email-translation-de-json.54743260.chunk.js +0 -1
- package/build/email-translation-dk-json.f323fe4e.chunk.js +0 -1
- package/build/email-translation-en-json.ebad8943.chunk.js +0 -1
- package/build/email-translation-es-json.9021417d.chunk.js +0 -1
- package/build/email-translation-fr-json.9f125db0.chunk.js +0 -1
- package/build/email-translation-id-json.3bcae5f5.chunk.js +0 -1
- package/build/email-translation-it-json.6ffd1774.chunk.js +0 -1
- package/build/email-translation-ja-json.72b3f73c.chunk.js +0 -1
- package/build/email-translation-ko-json.e61d4e7a.chunk.js +0 -1
- package/build/email-translation-ms-json.b2b11e05.chunk.js +0 -1
- package/build/email-translation-nl-json.5349635f.chunk.js +0 -1
- package/build/email-translation-pl-json.a03bcf98.chunk.js +0 -1
- package/build/email-translation-pt-BR-json.2c98ab20.chunk.js +0 -1
- package/build/email-translation-pt-json.159505ab.chunk.js +0 -1
- package/build/email-translation-ru-json.d508cf3e.chunk.js +0 -1
- package/build/email-translation-sk-json.fa1fd4b3.chunk.js +0 -1
- package/build/email-translation-th-json.989cfecc.chunk.js +0 -1
- package/build/email-translation-tr-json.8aa034bb.chunk.js +0 -1
- package/build/email-translation-uk-json.0396a803.chunk.js +0 -1
- package/build/email-translation-vi-json.c0d8c414.chunk.js +0 -1
- package/build/email-translation-zh-Hans-json.8172da08.chunk.js +0 -1
- package/build/email-translation-zh-json.62b1c6fe.chunk.js +0 -1
- package/build/en-json.1abdade9.chunk.js +0 -1
- package/build/es-json.6d123a82.chunk.js +0 -1
- package/build/fr-json.28ab54cb.chunk.js +0 -1
- package/build/gu-json.9a50ea64.chunk.js +0 -1
- package/build/he-json.72f18790.chunk.js +0 -1
- package/build/hi-json.0301b7ba.chunk.js +0 -1
- package/build/highlight.js.af2de364.chunk.js +0 -86
- package/build/hu-json.c4b641bb.chunk.js +0 -1
- package/build/i18n-settings-page.ee572037.chunk.js +0 -1
- package/build/i18n-translation-de-json.92534555.chunk.js +0 -1
- package/build/i18n-translation-dk-json.54f410ca.chunk.js +0 -1
- package/build/i18n-translation-en-json.760250ae.chunk.js +0 -1
- package/build/i18n-translation-es-json.488206ae.chunk.js +0 -1
- package/build/i18n-translation-fr-json.b401aa34.chunk.js +0 -1
- package/build/i18n-translation-ko-json.b2d90a83.chunk.js +0 -1
- package/build/i18n-translation-pl-json.cea5bf23.chunk.js +0 -1
- package/build/i18n-translation-tr-json.34ca9d61.chunk.js +0 -1
- package/build/i18n-translation-zh-Hans-json.560a98e3.chunk.js +0 -1
- package/build/i18n-translation-zh-json.eeebb849.chunk.js +0 -1
- package/build/id-json.86035797.chunk.js +0 -1
- package/build/it-json.bbdc8993.chunk.js +0 -1
- package/build/ja-json.1c9eeeec.chunk.js +0 -1
- package/build/ko-json.e1f66398.chunk.js +0 -1
- package/build/main.91f6e21e.js +0 -4099
- package/build/ml-json.963c889f.chunk.js +0 -1
- package/build/ms-json.ed51e902.chunk.js +0 -1
- package/build/nl-json.26f39180.chunk.js +0 -1
- package/build/no-json.a58c28bd.chunk.js +0 -1
- package/build/pl-json.249626b3.chunk.js +0 -1
- package/build/pt-BR-json.2b72b1d6.chunk.js +0 -1
- package/build/pt-json.cd67ba86.chunk.js +0 -1
- package/build/ru-json.8830286f.chunk.js +0 -1
- package/build/runtime~main.447b0382.js +0 -2
- package/build/sa-json.44e95991.chunk.js +0 -1
- package/build/sk-json.2af48064.chunk.js +0 -1
- package/build/sso-settings-page.91924df1.chunk.js +0 -41
- package/build/sv-json.fb1081ff.chunk.js +0 -1
- package/build/th-json.a67309b1.chunk.js +0 -1
- package/build/tr-json.eac8bd79.chunk.js +0 -1
- package/build/uk-json.c4cd2e24.chunk.js +0 -1
- package/build/upload-settings.326cd9fd.chunk.js +0 -89
- package/build/upload-translation-ca-json.db8ed7ba.chunk.js +0 -1
- package/build/upload-translation-de-json.00cbbc08.chunk.js +0 -1
- package/build/upload-translation-dk-json.c787a6be.chunk.js +0 -1
- package/build/upload-translation-en-json.32cf9aff.chunk.js +0 -1
- package/build/upload-translation-es-json.0f90db48.chunk.js +0 -1
- package/build/upload-translation-fr-json.e21c0c7a.chunk.js +0 -1
- package/build/upload-translation-he-json.4ce77b7b.chunk.js +0 -1
- package/build/upload-translation-it-json.5ce11e0b.chunk.js +0 -1
- package/build/upload-translation-ja-json.22afae44.chunk.js +0 -1
- package/build/upload-translation-ko-json.392002fb.chunk.js +0 -1
- package/build/upload-translation-ms-json.0605d6da.chunk.js +0 -1
- package/build/upload-translation-pl-json.136eedb6.chunk.js +0 -1
- package/build/upload-translation-pt-BR-json.95686cfb.chunk.js +0 -1
- package/build/upload-translation-pt-json.5c452b48.chunk.js +0 -1
- package/build/upload-translation-ru-json.37bd1546.chunk.js +0 -1
- package/build/upload-translation-sk-json.fe86c53b.chunk.js +0 -1
- package/build/upload-translation-th-json.9e1fda51.chunk.js +0 -1
- package/build/upload-translation-tr-json.b173223a.chunk.js +0 -1
- package/build/upload-translation-uk-json.1328cb3e.chunk.js +0 -1
- package/build/upload-translation-zh-Hans-json.37a2981e.chunk.js +0 -1
- package/build/upload-translation-zh-json.ac5711de.chunk.js +0 -1
- package/build/upload.2977cb13.chunk.js +0 -38
- package/build/users-advanced-settings-page.0c0b8230.chunk.js +0 -13
- package/build/users-email-settings-page.18d4a475.chunk.js +0 -28
- package/build/users-permissions-translation-ar-json.e8123ed2.chunk.js +0 -1
- package/build/users-permissions-translation-cs-json.e6649c5f.chunk.js +0 -1
- package/build/users-permissions-translation-de-json.c3628843.chunk.js +0 -1
- package/build/users-permissions-translation-dk-json.bad0b786.chunk.js +0 -1
- package/build/users-permissions-translation-en-json.aeab388a.chunk.js +0 -1
- package/build/users-permissions-translation-es-json.152a923f.chunk.js +0 -1
- package/build/users-permissions-translation-fr-json.172aa69f.chunk.js +0 -1
- package/build/users-permissions-translation-id-json.5aadd143.chunk.js +0 -1
- package/build/users-permissions-translation-it-json.7d377480.chunk.js +0 -1
- package/build/users-permissions-translation-ja-json.4967badf.chunk.js +0 -1
- package/build/users-permissions-translation-ko-json.6bd0ae22.chunk.js +0 -1
- package/build/users-permissions-translation-ms-json.ea8a2baf.chunk.js +0 -1
- package/build/users-permissions-translation-nl-json.d638c4ce.chunk.js +0 -1
- package/build/users-permissions-translation-pl-json.c6a02992.chunk.js +0 -1
- package/build/users-permissions-translation-pt-BR-json.f6791a86.chunk.js +0 -1
- package/build/users-permissions-translation-pt-json.38afed04.chunk.js +0 -1
- package/build/users-permissions-translation-ru-json.319d51ef.chunk.js +0 -1
- package/build/users-permissions-translation-sk-json.ba1cd385.chunk.js +0 -1
- package/build/users-permissions-translation-sv-json.370d6eee.chunk.js +0 -1
- package/build/users-permissions-translation-th-json.68873214.chunk.js +0 -1
- package/build/users-permissions-translation-tr-json.9bebc250.chunk.js +0 -1
- package/build/users-permissions-translation-uk-json.63eaa01c.chunk.js +0 -1
- package/build/users-permissions-translation-vi-json.dccc02fc.chunk.js +0 -1
- package/build/users-permissions-translation-zh-Hans-json.c3fd301b.chunk.js +0 -1
- package/build/users-permissions-translation-zh-json.1fea833f.chunk.js +0 -1
- package/build/users-providers-settings-page.25dd858e.chunk.js +0 -1
- package/build/users-roles-settings-page.8482a999.chunk.js +0 -30
- package/build/vi-json.f7890025.chunk.js +0 -1
- package/build/webhook-edit-page.dcc3d145.chunk.js +0 -75
- package/build/webhook-list-page.894e6959.chunk.js +0 -42
- package/build/zh-Hans-json.21617c24.chunk.js +0 -1
- package/build/zh-json.2ecc6b99.chunk.js +0 -1
- package/ee/server/routes/features-routes.js +0 -46
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { useIntl } from 'react-intl';
|
|
4
3
|
import { Typography } from '@strapi/design-system/Typography';
|
|
5
4
|
|
|
6
|
-
export const Hint = ({ id, error, name,
|
|
7
|
-
|
|
8
|
-
const hint = description
|
|
9
|
-
? formatMessage(
|
|
10
|
-
{ id: description.id, defaultMessage: description.defaultMessage },
|
|
11
|
-
{ ...description.values }
|
|
12
|
-
)
|
|
13
|
-
: '';
|
|
14
|
-
|
|
15
|
-
if (!hint || error) {
|
|
5
|
+
export const Hint = ({ id, error, name, hint }) => {
|
|
6
|
+
if (hint.length === 0 || error) {
|
|
16
7
|
return null;
|
|
17
8
|
}
|
|
18
9
|
|
|
@@ -25,16 +16,12 @@ export const Hint = ({ id, error, name, description }) => {
|
|
|
25
16
|
|
|
26
17
|
Hint.defaultProps = {
|
|
27
18
|
id: undefined,
|
|
28
|
-
description: undefined,
|
|
29
19
|
error: undefined,
|
|
20
|
+
hint: '',
|
|
30
21
|
};
|
|
31
22
|
|
|
32
23
|
Hint.propTypes = {
|
|
33
|
-
|
|
34
|
-
id: PropTypes.string.isRequired,
|
|
35
|
-
defaultMessage: PropTypes.string.isRequired,
|
|
36
|
-
values: PropTypes.object,
|
|
37
|
-
}),
|
|
24
|
+
hint: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
38
25
|
error: PropTypes.string,
|
|
39
26
|
id: PropTypes.string,
|
|
40
27
|
name: PropTypes.string.isRequired,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
const InputUID = ({
|
|
24
24
|
attribute,
|
|
25
25
|
contentTypeUID,
|
|
26
|
-
|
|
26
|
+
hint,
|
|
27
27
|
disabled,
|
|
28
28
|
error,
|
|
29
29
|
intlLabel,
|
|
@@ -54,13 +54,6 @@ const InputUID = ({
|
|
|
54
54
|
)
|
|
55
55
|
: name;
|
|
56
56
|
|
|
57
|
-
const hint = description
|
|
58
|
-
? formatMessage(
|
|
59
|
-
{ id: description.id, defaultMessage: description.defaultMessage },
|
|
60
|
-
{ ...description.values }
|
|
61
|
-
)
|
|
62
|
-
: '';
|
|
63
|
-
|
|
64
57
|
const formattedPlaceholder = placeholder
|
|
65
58
|
? formatMessage(
|
|
66
59
|
{ id: placeholder.id, defaultMessage: placeholder.defaultMessage },
|
|
@@ -251,11 +244,6 @@ InputUID.propTypes = {
|
|
|
251
244
|
required: PropTypes.bool,
|
|
252
245
|
}).isRequired,
|
|
253
246
|
contentTypeUID: PropTypes.string.isRequired,
|
|
254
|
-
description: PropTypes.shape({
|
|
255
|
-
id: PropTypes.string.isRequired,
|
|
256
|
-
defaultMessage: PropTypes.string.isRequired,
|
|
257
|
-
values: PropTypes.object,
|
|
258
|
-
}),
|
|
259
247
|
disabled: PropTypes.bool,
|
|
260
248
|
error: PropTypes.string,
|
|
261
249
|
intlLabel: PropTypes.shape({
|
|
@@ -273,16 +261,17 @@ InputUID.propTypes = {
|
|
|
273
261
|
values: PropTypes.object,
|
|
274
262
|
}),
|
|
275
263
|
required: PropTypes.bool,
|
|
264
|
+
hint: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
276
265
|
};
|
|
277
266
|
|
|
278
267
|
InputUID.defaultProps = {
|
|
279
|
-
description: undefined,
|
|
280
268
|
disabled: false,
|
|
281
269
|
error: undefined,
|
|
282
270
|
labelAction: undefined,
|
|
283
271
|
placeholder: undefined,
|
|
284
272
|
value: '',
|
|
285
273
|
required: false,
|
|
274
|
+
hint: '',
|
|
286
275
|
};
|
|
287
276
|
|
|
288
277
|
export default InputUID;
|
|
@@ -9,9 +9,8 @@ const Wrapper = styled.div`
|
|
|
9
9
|
padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
|
|
10
10
|
font-size: ${14 / 16}rem;
|
|
11
11
|
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
12
|
-
z-index: 2;
|
|
13
|
-
cursor: not-allowed;
|
|
14
12
|
color: ${({ theme }) => theme.colors.neutral800};
|
|
13
|
+
line-height: ${({ theme }) => theme.lineHeights[6]};
|
|
15
14
|
|
|
16
15
|
h1,
|
|
17
16
|
h2,
|
|
@@ -19,12 +18,12 @@ const Wrapper = styled.div`
|
|
|
19
18
|
h4,
|
|
20
19
|
h5,
|
|
21
20
|
h6 {
|
|
22
|
-
margin-block-start:
|
|
23
|
-
margin-block-end:
|
|
21
|
+
margin-block-start: ${({ theme }) => theme.spaces[2]};
|
|
22
|
+
margin-block-end: ${({ theme }) => theme.spaces[2]};
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
p {
|
|
27
|
-
margin-bottom:
|
|
26
|
+
margin-bottom: ${({ theme }) => theme.spaces[2]};
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
h1 {
|
|
@@ -56,13 +55,13 @@ const Wrapper = styled.div`
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
blockquote {
|
|
59
|
-
margin-top:
|
|
60
|
-
margin-bottom:
|
|
58
|
+
margin-top: ${({ theme }) => theme.spaces[8]};
|
|
59
|
+
margin-bottom: ${({ theme }) => theme.spaces[7]};
|
|
61
60
|
font-size: ${14 / 16}rem;
|
|
62
61
|
font-weight: 400;
|
|
63
|
-
border-left:
|
|
62
|
+
border-left: 4px solid ${({ theme }) => theme.colors.neutral150};
|
|
64
63
|
font-style: italic;
|
|
65
|
-
padding:
|
|
64
|
+
padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[5]};
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
img {
|
|
@@ -91,9 +90,18 @@ const Wrapper = styled.div`
|
|
|
91
90
|
|
|
92
91
|
pre,
|
|
93
92
|
code {
|
|
94
|
-
font-size:
|
|
95
|
-
border-radius:
|
|
96
|
-
|
|
93
|
+
font-size: ${14 / 16}rem;
|
|
94
|
+
border-radius: 4px;
|
|
95
|
+
/*
|
|
96
|
+
Hard coded since the color is the same between themes,
|
|
97
|
+
theme.colors.neutral800 changes between themes.
|
|
98
|
+
|
|
99
|
+
Matches the color of the JSON Input component.
|
|
100
|
+
*/
|
|
101
|
+
background-color: #32324d;
|
|
102
|
+
max-width: 100%;
|
|
103
|
+
overflow: auto;
|
|
104
|
+
padding: ${({ theme }) => theme.spaces[2]};
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
/* Inline code */
|
|
@@ -105,21 +113,6 @@ const Wrapper = styled.div`
|
|
|
105
113
|
}
|
|
106
114
|
}
|
|
107
115
|
|
|
108
|
-
.warning {
|
|
109
|
-
background-color: #faa684;
|
|
110
|
-
padding: 30px;
|
|
111
|
-
border-radius: 3px;
|
|
112
|
-
}
|
|
113
|
-
.tip {
|
|
114
|
-
padding: 30px;
|
|
115
|
-
border-radius: 3px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.footnote-ref,
|
|
119
|
-
.footnote-backref {
|
|
120
|
-
color: #007bff;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
116
|
ol {
|
|
124
117
|
list-style-type: decimal;
|
|
125
118
|
margin-block-start: ${({ theme }) => theme.spaces[4]};
|
|
@@ -127,6 +120,7 @@ const Wrapper = styled.div`
|
|
|
127
120
|
margin-inline-start: 0px;
|
|
128
121
|
margin-inline-end: 0px;
|
|
129
122
|
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
123
|
+
|
|
130
124
|
ol,
|
|
131
125
|
ul {
|
|
132
126
|
margin-block-start: 0px;
|
|
@@ -141,6 +135,7 @@ const Wrapper = styled.div`
|
|
|
141
135
|
margin-inline-start: 0px;
|
|
142
136
|
margin-inline-end: 0px;
|
|
143
137
|
padding-inline-start: ${({ theme }) => theme.spaces[4]};
|
|
138
|
+
|
|
144
139
|
ul,
|
|
145
140
|
ol {
|
|
146
141
|
margin-block-start: 0px;
|
|
@@ -38,12 +38,13 @@ export const LinkEllipsis = styled(Link)`
|
|
|
38
38
|
|
|
39
39
|
export const DisconnectButton = styled.button`
|
|
40
40
|
svg path {
|
|
41
|
-
fill: ${({ theme }) =>
|
|
41
|
+
fill: ${({ theme, disabled }) =>
|
|
42
|
+
disabled ? theme.colors.neutral600 : theme.colors.neutral500};
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
&:hover svg path,
|
|
45
46
|
&:focus svg path {
|
|
46
|
-
fill: ${({ theme }) => theme.colors.neutral600};
|
|
47
|
+
fill: ${({ theme, disabled }) => !disabled && theme.colors.neutral600};
|
|
47
48
|
}
|
|
48
49
|
`;
|
|
49
50
|
|
|
@@ -103,8 +104,7 @@ const RelationInput = ({
|
|
|
103
104
|
);
|
|
104
105
|
|
|
105
106
|
const shouldDisplayLoadMoreButton =
|
|
106
|
-
(!!labelLoadMore &&
|
|
107
|
-
paginatedRelations.isLoading;
|
|
107
|
+
(!!labelLoadMore && paginatedRelations.hasNextPage) || paginatedRelations.isLoading;
|
|
108
108
|
|
|
109
109
|
const options = useMemo(
|
|
110
110
|
() =>
|
|
@@ -473,7 +473,7 @@ const ListItem = ({ data, index, style }) => {
|
|
|
473
473
|
ariaDescribedBy={ariaDescribedBy}
|
|
474
474
|
canDrag={canDrag}
|
|
475
475
|
disabled={disabled}
|
|
476
|
-
displayValue={mainField ?? id}
|
|
476
|
+
displayValue={String(mainField ?? id)}
|
|
477
477
|
iconButtonAriaLabel={iconButtonAriaLabel}
|
|
478
478
|
id={id}
|
|
479
479
|
index={index}
|
|
@@ -503,9 +503,7 @@ const ListItem = ({ data, index, style }) => {
|
|
|
503
503
|
<Box minWidth={0} paddingTop={1} paddingBottom={1} paddingRight={4}>
|
|
504
504
|
<Tooltip description={mainField ?? `${id}`}>
|
|
505
505
|
{href ? (
|
|
506
|
-
<LinkEllipsis to={href}
|
|
507
|
-
{mainField ?? id}
|
|
508
|
-
</LinkEllipsis>
|
|
506
|
+
<LinkEllipsis to={href}>{mainField ?? id}</LinkEllipsis>
|
|
509
507
|
) : (
|
|
510
508
|
<Typography textColor={disabled ? 'neutral600' : 'primary600'} ellipsis>
|
|
511
509
|
{mainField ?? id}
|
|
@@ -16,6 +16,10 @@ export const StackWrapper = styled(Stack)`
|
|
|
16
16
|
width: 100%;
|
|
17
17
|
/* Used to prevent endAction to be pushed out of container */
|
|
18
18
|
min-width: 0;
|
|
19
|
+
|
|
20
|
+
& > div[role='button'] {
|
|
21
|
+
cursor: all-scroll;
|
|
22
|
+
}
|
|
19
23
|
`;
|
|
20
24
|
|
|
21
25
|
export const ChildrenWrapper = styled(Flex)`
|
|
@@ -83,8 +87,8 @@ export const RelationItem = ({
|
|
|
83
87
|
paddingRight={4}
|
|
84
88
|
hasRadius
|
|
85
89
|
borderSize={1}
|
|
86
|
-
background={disabled ? 'neutral150' : 'neutral0'}
|
|
87
90
|
borderColor="neutral200"
|
|
91
|
+
background={disabled ? 'neutral150' : 'neutral0'}
|
|
88
92
|
justifyContent="space-between"
|
|
89
93
|
ref={canDrag ? composedRefs : undefined}
|
|
90
94
|
data-handler-id={handlerId}
|
|
@@ -99,6 +103,7 @@ export const RelationItem = ({
|
|
|
99
103
|
aria-label={iconButtonAriaLabel}
|
|
100
104
|
noBorder
|
|
101
105
|
onKeyDown={handleKeyDown}
|
|
106
|
+
disabled={disabled}
|
|
102
107
|
>
|
|
103
108
|
<Drag />
|
|
104
109
|
</IconButton>
|
|
@@ -18,18 +18,22 @@ const ShadowBox = styled(Box)`
|
|
|
18
18
|
|
|
19
19
|
&:before {
|
|
20
20
|
/* TODO: as for DS Table component we would need this to be handled by the DS theme */
|
|
21
|
-
content:
|
|
22
|
-
|
|
23
|
-
background: linear-gradient(rgba(33, 33, 52, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
|
|
21
|
+
content: '';
|
|
22
|
+
background: linear-gradient(rgba(3, 3, 5, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
|
|
24
23
|
top: 0;
|
|
24
|
+
opacity: ${({ overflowDirection }) =>
|
|
25
|
+
overflowDirection === 'top-bottom' || overflowDirection === 'top' ? 1 : 0};
|
|
26
|
+
transition: opacity 0.2s ease-in-out;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
&:after {
|
|
28
30
|
/* TODO: as for DS Table component we would need this to be handled by the DS theme */
|
|
29
|
-
content:
|
|
30
|
-
|
|
31
|
-
background: linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(33, 33, 52, 0.1) 100%);
|
|
31
|
+
content: '';
|
|
32
|
+
background: linear-gradient(0deg, rgba(3, 3, 5, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
|
|
32
33
|
bottom: 0;
|
|
34
|
+
opacity: ${({ overflowDirection }) =>
|
|
35
|
+
overflowDirection === 'top-bottom' || overflowDirection === 'bottom' ? 1 : 0};
|
|
36
|
+
transition: opacity 0.2s ease-in-out;
|
|
33
37
|
}
|
|
34
38
|
`;
|
|
35
39
|
|
package/admin/src/content-manager/components/RelationInputDataManager/RelationInputDataManager.js
CHANGED
|
@@ -15,6 +15,7 @@ import { getTrad } from '../../utils';
|
|
|
15
15
|
|
|
16
16
|
import { PUBLICATION_STATES, RELATIONS_TO_DISPLAY, SEARCH_RESULTS_TO_DISPLAY } from './constants';
|
|
17
17
|
import { connect, select, normalizeSearchResults, diffRelations, normalizeRelation } from './utils';
|
|
18
|
+
import { getInitialDataPathUsingTempKeys } from '../../utils/paths';
|
|
18
19
|
|
|
19
20
|
export const RelationInputDataManager = ({
|
|
20
21
|
error,
|
|
@@ -37,7 +38,6 @@ export const RelationInputDataManager = ({
|
|
|
37
38
|
targetModel,
|
|
38
39
|
}) => {
|
|
39
40
|
const [liveText, setLiveText] = useState('');
|
|
40
|
-
|
|
41
41
|
const { formatMessage } = useIntl();
|
|
42
42
|
const {
|
|
43
43
|
slug,
|
|
@@ -49,12 +49,16 @@ export const RelationInputDataManager = ({
|
|
|
49
49
|
relationReorder,
|
|
50
50
|
} = useCMEditViewDataManager();
|
|
51
51
|
|
|
52
|
+
const nameSplit = name.split('.');
|
|
53
|
+
|
|
54
|
+
const initialDataPath = getInitialDataPathUsingTempKeys(initialData, modifiedData)(name);
|
|
55
|
+
|
|
52
56
|
const relationsFromModifiedData = get(modifiedData, name, []);
|
|
53
57
|
|
|
54
58
|
const currentLastPage = Math.ceil(get(initialData, name, []).length / RELATIONS_TO_DISPLAY);
|
|
55
59
|
|
|
56
|
-
const
|
|
57
|
-
|
|
60
|
+
const cacheKey = `${slug}-${initialDataPath.join('.')}`;
|
|
61
|
+
const { relations, search, searchFor } = useRelation(cacheKey, {
|
|
58
62
|
relation: {
|
|
59
63
|
enabled: !!endpoints.relation,
|
|
60
64
|
endpoint: endpoints.relation,
|
|
@@ -63,14 +67,21 @@ export const RelationInputDataManager = ({
|
|
|
63
67
|
...defaultParams,
|
|
64
68
|
pageSize: RELATIONS_TO_DISPLAY,
|
|
65
69
|
},
|
|
66
|
-
onLoad
|
|
70
|
+
onLoad(value) {
|
|
71
|
+
relationLoad({
|
|
72
|
+
target: {
|
|
73
|
+
initialDataPath: ['initialData', ...initialDataPath],
|
|
74
|
+
modifiedDataPath: ['modifiedData', ...nameSplit],
|
|
75
|
+
value,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
},
|
|
67
79
|
normalizeArguments: {
|
|
68
80
|
mainFieldName: mainField.name,
|
|
69
81
|
shouldAddLink: shouldDisplayRelationLink,
|
|
70
82
|
targetModel,
|
|
71
83
|
},
|
|
72
84
|
},
|
|
73
|
-
|
|
74
85
|
search: {
|
|
75
86
|
endpoint: endpoints.search,
|
|
76
87
|
pageParams: {
|
|
@@ -257,7 +268,7 @@ export const RelationInputDataManager = ({
|
|
|
257
268
|
* actually subtract from the total number on the server (regardless of how many you fetched).
|
|
258
269
|
*/
|
|
259
270
|
const browserRelationsCount = relationsFromModifiedData.length;
|
|
260
|
-
const serverRelationsCount = (get(initialData,
|
|
271
|
+
const serverRelationsCount = (get(initialData, initialDataPath) ?? []).length;
|
|
261
272
|
const realServerRelationsCount = relations.data?.pages[0]?.pagination?.total ?? 0;
|
|
262
273
|
/**
|
|
263
274
|
* _IF_ theres no relations data and the browserCount is the same as serverCount you can therefore assume
|
|
@@ -17,7 +17,7 @@ function useSelect({
|
|
|
17
17
|
readActionAllowedFields,
|
|
18
18
|
updateActionAllowedFields,
|
|
19
19
|
slug,
|
|
20
|
-
|
|
20
|
+
modifiedData,
|
|
21
21
|
} = useCMEditViewDataManager();
|
|
22
22
|
|
|
23
23
|
const isFieldAllowed = useMemo(() => {
|
|
@@ -50,7 +50,7 @@ function useSelect({
|
|
|
50
50
|
let componentId;
|
|
51
51
|
|
|
52
52
|
if (componentUid) {
|
|
53
|
-
componentId = get(
|
|
53
|
+
componentId = get(modifiedData, fieldNameKeys.slice(0, -1))?.id;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// /content-manager/relations/[model]/[id]/[field-name]
|
|
@@ -61,15 +61,15 @@ function useSelect({
|
|
|
61
61
|
|
|
62
62
|
if (componentUid) {
|
|
63
63
|
// repeatable components and dz are dynamically created
|
|
64
|
-
// if no componentId exists in
|
|
64
|
+
// if no componentId exists in modifiedData it means that the user just created it
|
|
65
65
|
// there then are no relations to request
|
|
66
66
|
return componentId
|
|
67
67
|
? getRequestUrl(`relations/${componentUid}/${componentId}/${fieldNameKeys.at(-1)}`)
|
|
68
68
|
: null;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
return getRequestUrl(`relations/${slug}/${
|
|
72
|
-
}, [isCreatingEntry, componentUid, slug,
|
|
71
|
+
return getRequestUrl(`relations/${slug}/${modifiedData.id}/${name.split('.').at(-1)}`);
|
|
72
|
+
}, [isCreatingEntry, componentUid, slug, modifiedData.id, name, componentId, fieldNameKeys]);
|
|
73
73
|
|
|
74
74
|
// /content-manager/relations/[model]/[field-name]
|
|
75
75
|
const relationSearchEndpoint = useMemo(() => {
|
|
@@ -197,29 +197,24 @@ const RepeatableComponent = ({
|
|
|
197
197
|
<VisuallyHidden aria-live="assertive">{liveText}</VisuallyHidden>
|
|
198
198
|
<Accordion.Group error={errorMessage} ariaDescribedBy={ariaDescriptionId}>
|
|
199
199
|
<Accordion.Content aria-describedby={ariaDescriptionId}>
|
|
200
|
-
{componentValue.map((
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
onDropItem={handleDropItem}
|
|
219
|
-
onGrabItem={handleGrabItem}
|
|
220
|
-
/>
|
|
221
|
-
);
|
|
222
|
-
})}
|
|
200
|
+
{componentValue.map(({ __temp_key__: key }, index) => (
|
|
201
|
+
<Component
|
|
202
|
+
componentFieldName={`${name}.${index}`}
|
|
203
|
+
componentUid={componentUid}
|
|
204
|
+
fields={componentLayoutData.layouts.edit}
|
|
205
|
+
key={key}
|
|
206
|
+
index={index}
|
|
207
|
+
isOpen={collapseToOpen === key}
|
|
208
|
+
isReadOnly={isReadOnly}
|
|
209
|
+
mainField={mainField}
|
|
210
|
+
moveComponentField={handleMoveComponentField}
|
|
211
|
+
onClickToggle={handleToggle(key)}
|
|
212
|
+
toggleCollapses={toggleCollapses}
|
|
213
|
+
onCancel={handleCancel}
|
|
214
|
+
onDropItem={handleDropItem}
|
|
215
|
+
onGrabItem={handleGrabItem}
|
|
216
|
+
/>
|
|
217
|
+
))}
|
|
223
218
|
</Accordion.Content>
|
|
224
219
|
<Accordion.Footer>
|
|
225
220
|
<Flex justifyContent="center" height="48px" background="neutral0">
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
|
-
import { Flex } from '@strapi/design-system
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import { BaseButton } from '@strapi/design-system/BaseButton';
|
|
9
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
10
|
-
import { pxToRem } from '@strapi/helper-plugin';
|
|
11
|
-
import Collapse from '@strapi/icons/Collapse';
|
|
12
|
-
import { useIntl } from 'react-intl';
|
|
5
|
+
import { BaseButton, Box, Flex, FocusTrap, Portal, Typography } from '@strapi/design-system';
|
|
6
|
+
import { Collapse } from '@strapi/icons';
|
|
7
|
+
import { pxToRem, useLockScroll } from '@strapi/helper-plugin';
|
|
8
|
+
|
|
13
9
|
import PreviewWysiwyg from '../PreviewWysiwyg';
|
|
14
10
|
|
|
15
11
|
const setOpacity = (hex, alpha) =>
|
|
@@ -32,6 +28,7 @@ export const ExpandButton = styled(BaseButton)`
|
|
|
32
28
|
|
|
33
29
|
svg {
|
|
34
30
|
margin-left: ${({ theme }) => `${theme.spaces[2]}`};
|
|
31
|
+
|
|
35
32
|
path {
|
|
36
33
|
fill: ${({ theme }) => theme.colors.neutral700};
|
|
37
34
|
width: ${12 / 16}rem;
|
|
@@ -42,19 +39,8 @@ export const ExpandButton = styled(BaseButton)`
|
|
|
42
39
|
|
|
43
40
|
export const EditorLayout = ({ children, isExpandMode, error, previewContent, onCollapse }) => {
|
|
44
41
|
const { formatMessage } = useIntl();
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
const body = document.body;
|
|
47
|
-
|
|
48
|
-
if (isExpandMode) {
|
|
49
|
-
body.classList.add('lock-body-scroll');
|
|
50
|
-
}
|
|
51
42
|
|
|
52
|
-
|
|
53
|
-
if (isExpandMode) {
|
|
54
|
-
body.classList.remove('lock-body-scroll');
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}, [isExpandMode]);
|
|
43
|
+
useLockScroll(isExpandMode);
|
|
58
44
|
|
|
59
45
|
if (isExpandMode) {
|
|
60
46
|
return (
|
|
@@ -71,7 +57,6 @@ export const EditorLayout = ({ children, isExpandMode, error, previewContent, on
|
|
|
71
57
|
onClick={onCollapse}
|
|
72
58
|
>
|
|
73
59
|
<Box
|
|
74
|
-
id="wysiwyg-expand"
|
|
75
60
|
background="neutral0"
|
|
76
61
|
hasRadius
|
|
77
62
|
shadow="popupShadow"
|
|
@@ -84,9 +69,15 @@ export const EditorLayout = ({ children, isExpandMode, error, previewContent, on
|
|
|
84
69
|
<BoxWithBorder flex="1" height="100%">
|
|
85
70
|
{children}
|
|
86
71
|
</BoxWithBorder>
|
|
87
|
-
<
|
|
88
|
-
<Flex
|
|
89
|
-
|
|
72
|
+
<Flex alignItems="start" direction="column" flex={1} height="100%" width="100%">
|
|
73
|
+
<Flex
|
|
74
|
+
height={pxToRem(48)}
|
|
75
|
+
background="neutral100"
|
|
76
|
+
justifyContent="flex-end"
|
|
77
|
+
shrink={0}
|
|
78
|
+
width="100%"
|
|
79
|
+
>
|
|
80
|
+
<ExpandButton onClick={onCollapse}>
|
|
90
81
|
<Typography>
|
|
91
82
|
{formatMessage({
|
|
92
83
|
id: 'components.Wysiwyg.collapse',
|
|
@@ -97,10 +88,10 @@ export const EditorLayout = ({ children, isExpandMode, error, previewContent, on
|
|
|
97
88
|
</ExpandButton>
|
|
98
89
|
</Flex>
|
|
99
90
|
|
|
100
|
-
<Box position="relative" height="100%">
|
|
91
|
+
<Box position="relative" height="100%" width="100%">
|
|
101
92
|
<PreviewWysiwyg data={previewContent} />
|
|
102
93
|
</Box>
|
|
103
|
-
</
|
|
94
|
+
</Flex>
|
|
104
95
|
</Flex>
|
|
105
96
|
</Box>
|
|
106
97
|
</ExpandWrapper>
|
|
@@ -31,7 +31,7 @@ const TypographyAsterisk = styled(Typography)`
|
|
|
31
31
|
`;
|
|
32
32
|
|
|
33
33
|
const Wysiwyg = ({
|
|
34
|
-
|
|
34
|
+
hint,
|
|
35
35
|
disabled,
|
|
36
36
|
error,
|
|
37
37
|
intlLabel,
|
|
@@ -167,7 +167,7 @@ const Wysiwyg = ({
|
|
|
167
167
|
|
|
168
168
|
{!isExpandMode && <WysiwygFooter onToggleExpand={handleToggleExpand} />}
|
|
169
169
|
</EditorLayout>
|
|
170
|
-
<Hint
|
|
170
|
+
<Hint hint={hint} name={name} error={error} />
|
|
171
171
|
</Stack>
|
|
172
172
|
|
|
173
173
|
{error && (
|
|
@@ -186,21 +186,17 @@ const Wysiwyg = ({
|
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
Wysiwyg.defaultProps = {
|
|
189
|
-
description: null,
|
|
190
189
|
disabled: false,
|
|
191
190
|
error: '',
|
|
192
191
|
labelAction: undefined,
|
|
193
192
|
placeholder: null,
|
|
194
193
|
required: false,
|
|
195
194
|
value: '',
|
|
195
|
+
hint: '',
|
|
196
196
|
};
|
|
197
197
|
|
|
198
198
|
Wysiwyg.propTypes = {
|
|
199
|
-
|
|
200
|
-
id: PropTypes.string.isRequired,
|
|
201
|
-
defaultMessage: PropTypes.string.isRequired,
|
|
202
|
-
values: PropTypes.object,
|
|
203
|
-
}),
|
|
199
|
+
hint: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
204
200
|
disabled: PropTypes.bool,
|
|
205
201
|
error: PropTypes.string,
|
|
206
202
|
intlLabel: PropTypes.shape({
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
5
|
+
* prop or avoid re-executing effects when passed as a dependency
|
|
6
|
+
*
|
|
7
|
+
* @type {<T extends (...args: any[]) => any>(callback: T | undefined) => T}
|
|
8
|
+
*/
|
|
9
|
+
export const useCallbackRef = (callback) => {
|
|
10
|
+
const callbackRef = React.useRef(callback);
|
|
11
|
+
|
|
12
|
+
React.useEffect(() => {
|
|
13
|
+
callbackRef.current = callback;
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// https://github.com/facebook/react/issues/19240
|
|
17
|
+
return React.useMemo(
|
|
18
|
+
() =>
|
|
19
|
+
(...args) =>
|
|
20
|
+
callbackRef.current?.(...args),
|
|
21
|
+
[]
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -17,9 +17,13 @@ import { useState } from 'react';
|
|
|
17
17
|
*
|
|
18
18
|
* @internal - You should use `useDragAndDrop` instead.
|
|
19
19
|
*
|
|
20
|
-
* @type {(index: number, callbacks: UseKeyboardDragAndDropCallbacks) => (event: React.KeyboardEvent<HTMLButtonElement>) => void}
|
|
20
|
+
* @type {(active: boolean, index: number, callbacks: UseKeyboardDragAndDropCallbacks) => (event: React.KeyboardEvent<HTMLButtonElement>) => void}
|
|
21
21
|
*/
|
|
22
|
-
export const useKeyboardDragAndDrop = (
|
|
22
|
+
export const useKeyboardDragAndDrop = (
|
|
23
|
+
active,
|
|
24
|
+
index,
|
|
25
|
+
{ onCancel, onDropItem, onGrabItem, onMoveItem }
|
|
26
|
+
) => {
|
|
23
27
|
const [isSelected, setIsSelected] = useState(false);
|
|
24
28
|
/**
|
|
25
29
|
* @type {(movement: 'UP' | 'DOWN') => void})}
|
|
@@ -64,6 +68,10 @@ export const useKeyboardDragAndDrop = (index, { onCancel, onDropItem, onGrabItem
|
|
|
64
68
|
* @type {React.KeyboardEventHandler<HTMLButtonElement>}
|
|
65
69
|
*/
|
|
66
70
|
const handleKeyDown = (e) => {
|
|
71
|
+
if (!active) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
67
75
|
if (e.key === 'Tab' && !isSelected) {
|
|
68
76
|
return;
|
|
69
77
|
}
|