@strapi/admin 4.1.1 → 4.1.4-alpha.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/admin/src/assets/images/icon_made-by-strapi.svg +5 -0
- package/admin/src/components/AuthenticatedApp/index.js +9 -2
- package/admin/src/components/AuthenticatedApp/utils/api.js +20 -1
- package/admin/src/components/AutoReloadOverlayBlockerProvider/Blocker.js +2 -2
- package/admin/src/components/GuidedTour/Homepage/index.js +1 -1
- package/admin/src/components/GuidedTour/Modal/components/Content.js +1 -1
- package/admin/src/components/GuidedTour/Modal/components/Modal.js +1 -1
- package/admin/src/components/LeftMenu/index.js +1 -1
- package/admin/src/components/Notifications/index.js +1 -1
- package/admin/src/{pages/AuthPage/components/Logo → components/UnauthenticatedLogo}/index.js +1 -1
- package/admin/src/components/UpgradePlanModal/index.js +2 -2
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +4 -4
- package/admin/src/content-manager/components/ComponentInitializer/index.js +1 -1
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDelete/index.js +1 -1
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDeleteAll/index.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/components/Component/index.js +2 -2
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/ComponentCard/index.js +1 -1
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js +5 -2
- package/admin/src/content-manager/components/DynamicZone/index.js +2 -5
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +1 -6
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +0 -9
- package/admin/src/content-manager/components/FieldComponent/index.js +2 -5
- package/admin/src/content-manager/components/InputJSON/index.js +2 -5
- package/admin/src/content-manager/components/InputUID/index.js +1 -2
- package/admin/src/content-manager/components/NonRepeatableComponent/index.js +1 -1
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js +2 -2
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +4 -7
- package/admin/src/content-manager/components/SelectMany/index.js +2 -2
- package/admin/src/content-manager/components/SelectOne/index.js +1 -1
- package/admin/src/content-manager/components/SelectWrapper/index.js +2 -5
- package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +4 -4
- package/admin/src/content-manager/components/Wysiwyg/EditorStylesContainer.js +1 -1
- package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +2 -2
- package/admin/src/content-manager/components/Wysiwyg/index.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFields.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/components/RelationalFields.js +2 -2
- package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/Header/index.js +4 -7
- package/admin/src/content-manager/pages/EditView/Informations/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/index.js +5 -193
- package/admin/src/content-manager/pages/ListSettingsView/components/CardPreview.js +1 -1
- package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +1 -1
- package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +1 -1
- package/admin/src/hooks/index.js +0 -1
- package/admin/src/hooks/useFetchInstalledPlugins/index.js +23 -0
- package/admin/src/{pages/InstalledPluginsPage → hooks/useFetchInstalledPlugins}/utils/api.js +2 -4
- package/admin/src/hooks/useFetchMarketplacePlugins/index.js +23 -0
- package/admin/src/hooks/useFetchMarketplacePlugins/utils/api.js +17 -0
- package/admin/src/hooks/useSettingsMenu/init.js +2 -2
- package/admin/src/pages/Admin/index.js +1 -3
- package/admin/src/pages/App/index.js +2 -0
- package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +2 -2
- package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +1 -1
- package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +2 -2
- package/admin/src/pages/AuthPage/components/Oops/index.js +1 -1
- package/admin/src/pages/AuthPage/components/Register/index.js +224 -223
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +2 -2
- package/admin/src/pages/AuthPage/index.js +20 -17
- package/admin/src/pages/HomePage/ContentBlocks.js +1 -1
- package/admin/src/pages/HomePage/HomeHeader.js +1 -1
- package/admin/src/pages/HomePage/SocialLinks.js +2 -2
- package/admin/src/pages/InstalledPluginsPage/Plugins.js +6 -15
- package/admin/src/pages/MarketplacePage/components/EmptyPluginSearch/EmptyPluginGrid.js +27 -0
- package/admin/src/pages/MarketplacePage/components/EmptyPluginSearch/index.js +30 -0
- package/admin/src/pages/MarketplacePage/components/PluginCard/index.js +186 -0
- package/admin/src/pages/MarketplacePage/index.js +198 -100
- package/admin/src/pages/MarketplacePage/utils/api.js +9 -0
- package/admin/src/pages/ProfilePage/index.js +5 -5
- package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +4 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/Row/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js +4 -4
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +1 -1
- package/admin/src/pages/UseCasePage/index.js +173 -0
- package/admin/src/translations/en.json +26 -13
- package/build/1094.e1db3a1a.chunk.js +1 -0
- package/build/1454.f065d92a.chunk.js +2 -0
- package/build/{5032.ed02a466.chunk.js.LICENSE.txt → 1454.f065d92a.chunk.js.LICENSE.txt} +0 -0
- package/build/1856.a30bd09b.chunk.js +1 -0
- package/build/2481.4eae9408.chunk.js +1 -0
- package/build/{2912.38fb9bd1.chunk.js → 2912.c5f76e65.chunk.js} +1 -1
- package/build/4362.5c92d240.chunk.js +1 -0
- package/build/4715.8a2db02a.chunk.js +1 -0
- package/build/{4800.18e59c83.chunk.js → 4800.f4a1384a.chunk.js} +1 -1
- package/build/497.3fcf6196.chunk.js +1 -0
- package/build/4982.601f6196.chunk.js +1 -0
- package/build/6250.836851ca.chunk.js +1 -0
- package/build/{7841.ef9bcee9.chunk.js → 7841.490dbbf1.chunk.js} +1 -1
- package/build/{8042.9b85175a.chunk.js → 8042.1d66811a.chunk.js} +2 -2
- package/build/{8042.9b85175a.chunk.js.LICENSE.txt → 8042.1d66811a.chunk.js.LICENSE.txt} +0 -0
- package/build/849.17f011e8.chunk.js +1 -0
- package/build/90f49a385afb000fb1d4.svg +5 -0
- package/build/{2736.ee6e45c9.chunk.js → 9260.fa40c7bd.chunk.js} +2 -2
- package/build/{2736.ee6e45c9.chunk.js.LICENSE.txt → 9260.fa40c7bd.chunk.js.LICENSE.txt} +0 -0
- package/build/9853.6ff595fa.chunk.js +1 -0
- package/build/{9988.b4229043.chunk.js → 9988.fe838ba6.chunk.js} +2 -2
- package/build/{9988.b4229043.chunk.js.LICENSE.txt → 9988.fe838ba6.chunk.js.LICENSE.txt} +0 -0
- package/build/Admin-authenticatedApp.27fba46d.chunk.js +1 -0
- package/build/Admin_homePage.964ff5d7.chunk.js +1 -0
- package/build/Admin_marketplace.e83567ff.chunk.js +1 -0
- package/build/Admin_pluginsPage.97a514db.chunk.js +1 -0
- package/build/Admin_profilePage.c497b39d.chunk.js +1 -0
- package/build/Admin_settingsPage.55ec1f30.chunk.js +1 -0
- package/build/admin-edit-roles-page.49b6f01d.chunk.js +1 -0
- package/build/admin-edit-users.381e4a0d.chunk.js +1 -0
- package/build/admin-users.2740c223.chunk.js +1 -0
- package/build/{api-tokens-create-page.0981141a.chunk.js → api-tokens-create-page.db17bb39.chunk.js} +1 -1
- package/build/{api-tokens-edit-page.3faf1af1.chunk.js → api-tokens-edit-page.c7299a77.chunk.js} +1 -1
- package/build/content-manager.e1189026.chunk.js +1 -0
- package/build/content-type-builder-translation-en-json.8034dab6.chunk.js +1 -0
- package/build/content-type-builder.de5d18ad.chunk.js +1 -0
- package/build/{email-settings-page.4338588d.chunk.js → email-settings-page.27ee4a98.chunk.js} +1 -1
- package/build/en-json.086acf41.chunk.js +1 -0
- package/build/i18n-settings-page.c4018651.chunk.js +1 -0
- package/build/i18n-translation-de-json.c5c9054f.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/main.22e9a5c5.js +2 -0
- package/build/{main.fc123ed7.js.LICENSE.txt → main.22e9a5c5.js.LICENSE.txt} +0 -0
- package/build/runtime~main.e6326927.js +1 -0
- package/build/{sso-settings-page.c073b6d7.chunk.js → sso-settings-page.121dd0a6.chunk.js} +1 -1
- package/build/{upload-settings.8e7cbc3b.chunk.js → upload-settings.4401f36d.chunk.js} +1 -1
- package/build/{upload.803ab265.chunk.js → upload.5a2dded7.chunk.js} +1 -1
- package/build/{users-advanced-settings-page.7694d3c9.chunk.js → users-advanced-settings-page.8905d8d8.chunk.js} +1 -1
- package/build/users-permissions-translation-en-json.21b0fd2f.chunk.js +1 -0
- package/build/users-providers-settings-page.368893ed.chunk.js +1 -0
- package/build/users-roles-settings-page.a2f6277a.chunk.js +1 -0
- package/build/webhook-edit-page.d170eda1.chunk.js +1 -0
- package/build/{webhook-list-page.5c8f2a91.chunk.js → webhook-list-page.c21b5a9a.chunk.js} +1 -1
- package/ee/admin/pages/AuthPage/components/Login/index.js +1 -1
- package/ee/admin/pages/AuthPage/components/Providers/index.js +2 -2
- package/ee/admin/pages/SettingsPage/SingleSignOn/index.js +1 -1
- package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +3 -3
- package/index.js +6 -1
- package/package.json +7 -7
- package/server/controllers/admin.js +12 -1
- package/server/routes/serve-admin-panel.js +18 -6
- package/.env +0 -0
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/isValidJSONString.js +0 -15
- package/admin/src/hooks/useFetchPluginsFromMarketPlace/index.js +0 -49
- package/admin/src/pages/MarketplacePage/MarketplaceBanner/Wrapper.js +0 -28
- package/admin/src/pages/MarketplacePage/MarketplaceBanner/index.js +0 -37
- package/admin/src/pages/MarketplacePage/PluginCard/Wrapper.js +0 -148
- package/admin/src/pages/MarketplacePage/PluginCard/index.js +0 -185
- package/admin/src/pages/MarketplacePage/Wrapper.js +0 -5
- package/admin/src/pages/MarketplacePage/assets/marketplace-coming-soon.png +0 -0
- package/build/01a600d9e6e0dea21e33.png +0 -0
- package/build/1856.a06395b4.chunk.js +0 -1
- package/build/2481.7d15bd79.chunk.js +0 -1
- package/build/4261.a4e1e93c.chunk.js +0 -1
- package/build/4362.d0c1a04a.chunk.js +0 -1
- package/build/4715.31ca1967.chunk.js +0 -1
- package/build/497.8f30da61.chunk.js +0 -1
- package/build/4982.da4adb38.chunk.js +0 -1
- package/build/5032.ed02a466.chunk.js +0 -2
- package/build/6250.dc6d7a58.chunk.js +0 -1
- package/build/849.9075d399.chunk.js +0 -1
- package/build/9238.bdd93dae.chunk.js +0 -1
- package/build/Admin-authenticatedApp.013e2774.chunk.js +0 -1
- package/build/Admin_homePage.e4779166.chunk.js +0 -1
- package/build/Admin_marketplace.e8654056.chunk.js +0 -1
- package/build/Admin_pluginsPage.7d1bd7ce.chunk.js +0 -1
- package/build/Admin_profilePage.67dd744c.chunk.js +0 -1
- package/build/Admin_settingsPage.2d0d2cca.chunk.js +0 -1
- package/build/admin-edit-roles-page.2d1b6461.chunk.js +0 -1
- package/build/admin-edit-users.e736db15.chunk.js +0 -1
- package/build/admin-users.5f79c031.chunk.js +0 -1
- package/build/content-manager.141d110d.chunk.js +0 -1
- package/build/content-type-builder-translation-en-json.b3d8e9d4.chunk.js +0 -1
- package/build/content-type-builder.f1cef05c.chunk.js +0 -1
- package/build/en-json.bb614bb0.chunk.js +0 -1
- package/build/i18n-settings-page.51e37957.chunk.js +0 -1
- package/build/main.fc123ed7.js +0 -2
- package/build/runtime~main.0866074a.js +0 -1
- package/build/users-permissions-translation-en-json.1993655e.chunk.js +0 -1
- package/build/users-providers-settings-page.47f97b06.chunk.js +0 -1
- package/build/users-roles-settings-page.b67e2b4d.chunk.js +0 -1
- package/build/webhook-edit-page.adad0a42.chunk.js +0 -1
|
@@ -275,7 +275,7 @@ const EditSettingsView = ({ mainLayout, components, isContentTypeView, slug, upd
|
|
|
275
275
|
paddingLeft={7}
|
|
276
276
|
paddingRight={7}
|
|
277
277
|
>
|
|
278
|
-
<Stack
|
|
278
|
+
<Stack spacing={4}>
|
|
279
279
|
<Typography variant="delta" as="h2">
|
|
280
280
|
{formatMessage({
|
|
281
281
|
id: getTrad('containers.SettingPage.settings'),
|
|
@@ -71,7 +71,7 @@ const Header = ({
|
|
|
71
71
|
|
|
72
72
|
if (isCreatingEntry && canCreate) {
|
|
73
73
|
primaryAction = (
|
|
74
|
-
<Stack horizontal
|
|
74
|
+
<Stack horizontal spacing={2}>
|
|
75
75
|
{hasDraftAndPublish && (
|
|
76
76
|
<Button disabled startIcon={<Check />} variant="secondary">
|
|
77
77
|
{formatMessage({ id: 'app.utils.publish', defaultMessage: 'Publish' })}
|
|
@@ -187,7 +187,7 @@ const Header = ({
|
|
|
187
187
|
isOpen={showWarningUnpublish}
|
|
188
188
|
>
|
|
189
189
|
<DialogBody icon={<ExclamationMarkCircle />}>
|
|
190
|
-
<Stack
|
|
190
|
+
<Stack spacing={2}>
|
|
191
191
|
<Flex justifyContent="center" style={{ textAlign: 'center' }}>
|
|
192
192
|
<Typography id="confirm-description">
|
|
193
193
|
{formatMessage(
|
|
@@ -242,7 +242,7 @@ const Header = ({
|
|
|
242
242
|
isOpen={showWarningDraftRelation}
|
|
243
243
|
>
|
|
244
244
|
<DialogBody icon={<ExclamationMarkCircle />}>
|
|
245
|
-
<Stack
|
|
245
|
+
<Stack spacing={2}>
|
|
246
246
|
<Flex justifyContent="center" style={{ textAlign: 'center' }}>
|
|
247
247
|
<Typography id="confirm-description">
|
|
248
248
|
{draftRelationsCountRef.current}
|
|
@@ -314,8 +314,5 @@ Header.propTypes = {
|
|
|
314
314
|
|
|
315
315
|
const Memoized = memo(Header, isEqualFastCompare);
|
|
316
316
|
|
|
317
|
-
export default connect(
|
|
318
|
-
Memoized,
|
|
319
|
-
select
|
|
320
|
-
);
|
|
317
|
+
export default connect(Memoized, select);
|
|
321
318
|
export { Header };
|
|
@@ -137,7 +137,7 @@ const EditView = ({
|
|
|
137
137
|
<ContentLayout>
|
|
138
138
|
<Grid gap={4}>
|
|
139
139
|
<GridItem col={9} s={12}>
|
|
140
|
-
<Stack
|
|
140
|
+
<Stack spacing={6}>
|
|
141
141
|
{formattedContentTypeLayout.map((row, index) => {
|
|
142
142
|
if (isDynamicZone(row)) {
|
|
143
143
|
const {
|
|
@@ -174,7 +174,7 @@ const EditView = ({
|
|
|
174
174
|
paddingBottom={6}
|
|
175
175
|
borderColor="neutral150"
|
|
176
176
|
>
|
|
177
|
-
<Stack
|
|
177
|
+
<Stack spacing={6}>
|
|
178
178
|
{row.map((grid, gridIndex) => {
|
|
179
179
|
return (
|
|
180
180
|
<Grid gap={4} key={gridIndex}>
|
|
@@ -232,7 +232,7 @@ const EditView = ({
|
|
|
232
232
|
</Stack>
|
|
233
233
|
</GridItem>
|
|
234
234
|
<GridItem col={3} s={12}>
|
|
235
|
-
<Stack
|
|
235
|
+
<Stack spacing={2}>
|
|
236
236
|
<DraftAndPublishBadge />
|
|
237
237
|
<Box
|
|
238
238
|
as="aside"
|
|
@@ -275,7 +275,7 @@ const EditView = ({
|
|
|
275
275
|
<Box paddingTop={2} paddingBottom={6}>
|
|
276
276
|
<Divider />
|
|
277
277
|
</Box>
|
|
278
|
-
<Stack
|
|
278
|
+
<Stack spacing={4}>
|
|
279
279
|
{relationsLayout.map(
|
|
280
280
|
({ name, fieldSchema, labelAction, metadatas, queryInfos }) => {
|
|
281
281
|
return (
|
|
@@ -308,7 +308,7 @@ const EditView = ({
|
|
|
308
308
|
</Box>
|
|
309
309
|
)}
|
|
310
310
|
<Box as="aside" aria-labelledby="links">
|
|
311
|
-
<Stack
|
|
311
|
+
<Stack spacing={2}>
|
|
312
312
|
<InjectionZone area="contentManager.editView.right-links" slug={slug} />
|
|
313
313
|
{slug !== 'strapi::administrator' && (
|
|
314
314
|
<CheckPermissions permissions={ctbPermissions}>
|
|
@@ -364,194 +364,6 @@ const EditView = ({
|
|
|
364
364
|
}}
|
|
365
365
|
</DataManagementWrapper>
|
|
366
366
|
);
|
|
367
|
-
|
|
368
|
-
// return (
|
|
369
|
-
// <DataManagementWrapper allLayoutData={layout} slug={slug} id={id} origin={origin}>
|
|
370
|
-
// {({
|
|
371
|
-
// componentsDataStructure,
|
|
372
|
-
// contentTypeDataStructure,
|
|
373
|
-
// data,
|
|
374
|
-
// isCreatingEntry,
|
|
375
|
-
// isLoadingForData,
|
|
376
|
-
// onDelete,
|
|
377
|
-
// onDeleteSucceeded,
|
|
378
|
-
// onPost,
|
|
379
|
-
// onPublish,
|
|
380
|
-
// onPut,
|
|
381
|
-
// onUnpublish,
|
|
382
|
-
// redirectionLink,
|
|
383
|
-
// status,
|
|
384
|
-
// }) => {
|
|
385
|
-
// return (
|
|
386
|
-
// <EditViewDataManagerProvider
|
|
387
|
-
// allowedActions={allowedActions}
|
|
388
|
-
// allLayoutData={layout}
|
|
389
|
-
// createActionAllowedFields={createActionAllowedFields}
|
|
390
|
-
// componentsDataStructure={componentsDataStructure}
|
|
391
|
-
// contentTypeDataStructure={contentTypeDataStructure}
|
|
392
|
-
// from={redirectionLink}
|
|
393
|
-
// initialValues={data}
|
|
394
|
-
// isCreatingEntry={isCreatingEntry}
|
|
395
|
-
// isLoadingForData={isLoadingForData}
|
|
396
|
-
// isSingleType={isSingleType}
|
|
397
|
-
// onPost={onPost}
|
|
398
|
-
// onPublish={onPublish}
|
|
399
|
-
// onPut={onPut}
|
|
400
|
-
// onUnpublish={onUnpublish}
|
|
401
|
-
// readActionAllowedFields={readActionAllowedFields}
|
|
402
|
-
// redirectToPreviousPage={goBack}
|
|
403
|
-
// slug={slug}
|
|
404
|
-
// status={status}
|
|
405
|
-
// updateActionAllowedFields={updateActionAllowedFields}
|
|
406
|
-
// >
|
|
407
|
-
// <Container className="container-fluid">
|
|
408
|
-
// <Header allowedActions={allowedActions} />
|
|
409
|
-
// <div className="row" style={{ paddingTop: 3 }}>
|
|
410
|
-
// <div className="col-md-12 col-lg-9" style={{ marginBottom: 13 }}>
|
|
411
|
-
// {formattedContentTypeLayout.map((block, blockIndex) => {
|
|
412
|
-
// if (isDynamicZone(block)) {
|
|
413
|
-
// const {
|
|
414
|
-
// 0: {
|
|
415
|
-
// 0: { name, fieldSchema, metadatas, labelIcon },
|
|
416
|
-
// },
|
|
417
|
-
// } = block;
|
|
418
|
-
// const baselineAlignementSize = blockIndex === 0 ? '3px' : '0';
|
|
419
|
-
|
|
420
|
-
// return (
|
|
421
|
-
// <BaselineAlignment key={blockIndex} top size={baselineAlignementSize}>
|
|
422
|
-
// <DynamicZone
|
|
423
|
-
// name={name}
|
|
424
|
-
// fieldSchema={fieldSchema}
|
|
425
|
-
// labelIcon={labelIcon}
|
|
426
|
-
// metadatas={metadatas}
|
|
427
|
-
// />
|
|
428
|
-
// </BaselineAlignment>
|
|
429
|
-
// );
|
|
430
|
-
// }
|
|
431
|
-
|
|
432
|
-
// return (
|
|
433
|
-
// <FormWrapper key={blockIndex}>
|
|
434
|
-
// {block.map((fieldsBlock, fieldsBlockIndex) => {
|
|
435
|
-
// return (
|
|
436
|
-
// <div className="row" key={fieldsBlockIndex}>
|
|
437
|
-
// {fieldsBlock.map(
|
|
438
|
-
// ({ name, size, fieldSchema, labelIcon, metadatas }, fieldIndex) => {
|
|
439
|
-
// const isComponent = fieldSchema.type === 'component';
|
|
440
|
-
|
|
441
|
-
// if (isComponent) {
|
|
442
|
-
// const { component, max, min, repeatable = false } = fieldSchema;
|
|
443
|
-
// const componentUid = fieldSchema.component;
|
|
444
|
-
|
|
445
|
-
// return (
|
|
446
|
-
// <FieldComponent
|
|
447
|
-
// key={componentUid}
|
|
448
|
-
// componentUid={component}
|
|
449
|
-
// labelIcon={labelIcon}
|
|
450
|
-
// isRepeatable={repeatable}
|
|
451
|
-
// label={metadatas.label}
|
|
452
|
-
// max={max}
|
|
453
|
-
// min={min}
|
|
454
|
-
// name={name}
|
|
455
|
-
// />
|
|
456
|
-
// );
|
|
457
|
-
// }
|
|
458
|
-
|
|
459
|
-
// return (
|
|
460
|
-
// <div className={`col-${size}`} key={name}>
|
|
461
|
-
// <Inputs
|
|
462
|
-
// autoFocus={
|
|
463
|
-
// blockIndex === 0 &&
|
|
464
|
-
// fieldsBlockIndex === 0 &&
|
|
465
|
-
// fieldIndex === 0
|
|
466
|
-
// }
|
|
467
|
-
// fieldSchema={fieldSchema}
|
|
468
|
-
// keys={name}
|
|
469
|
-
// labelIcon={labelIcon}
|
|
470
|
-
// metadatas={metadatas}
|
|
471
|
-
// />
|
|
472
|
-
// </div>
|
|
473
|
-
// );
|
|
474
|
-
// }
|
|
475
|
-
// )}
|
|
476
|
-
// </div>
|
|
477
|
-
// );
|
|
478
|
-
// })}
|
|
479
|
-
// </FormWrapper>
|
|
480
|
-
// );
|
|
481
|
-
// })}
|
|
482
|
-
// </div>
|
|
483
|
-
// <div className="col-md-12 col-lg-3">
|
|
484
|
-
// <InformationCard />
|
|
485
|
-
// <Padded size="smd" top />
|
|
486
|
-
// {currentContentTypeLayoutData.layouts.editRelations.length > 0 && (
|
|
487
|
-
// <SubWrapper style={{ padding: '0 20px 1px', marginBottom: '25px' }}>
|
|
488
|
-
// <div style={{ paddingTop: '22px' }}>
|
|
489
|
-
// {currentContentTypeLayoutData.layouts.editRelations.map(
|
|
490
|
-
// ({ name, fieldSchema, labelIcon, metadatas, queryInfos }) => {
|
|
491
|
-
// return (
|
|
492
|
-
// <SelectWrapper
|
|
493
|
-
// {...fieldSchema}
|
|
494
|
-
// {...metadatas}
|
|
495
|
-
// key={name}
|
|
496
|
-
// labelIcon={labelIcon}
|
|
497
|
-
// name={name}
|
|
498
|
-
// relationsType={fieldSchema.relationType}
|
|
499
|
-
// queryInfos={queryInfos}
|
|
500
|
-
// />
|
|
501
|
-
// );
|
|
502
|
-
// }
|
|
503
|
-
// )}
|
|
504
|
-
// </div>
|
|
505
|
-
// </SubWrapper>
|
|
506
|
-
// )}
|
|
507
|
-
// <LinkWrapper>
|
|
508
|
-
// <ul>
|
|
509
|
-
// <CheckPermissions permissions={configurationPermissions}>
|
|
510
|
-
// <LiLink
|
|
511
|
-
// message={{
|
|
512
|
-
// id: 'app.links.configure-view',
|
|
513
|
-
// }}
|
|
514
|
-
// icon="layout"
|
|
515
|
-
// url={configurationsURL}
|
|
516
|
-
// onClick={() => {
|
|
517
|
-
// // trackUsage('willEditContentTypeLayoutFromEditView');
|
|
518
|
-
// }}
|
|
519
|
-
// />
|
|
520
|
-
// </CheckPermissions>
|
|
521
|
-
// {slug !== 'strapi::administrator' && (
|
|
522
|
-
// <CheckPermissions permissions={ctbPermissions}>
|
|
523
|
-
// <LiLink
|
|
524
|
-
// message={{
|
|
525
|
-
// id: getTrad('containers.Edit.Link.Fields'),
|
|
526
|
-
// }}
|
|
527
|
-
// onClick={() => {
|
|
528
|
-
// trackUsage('willEditEditLayout');
|
|
529
|
-
// }}
|
|
530
|
-
// icon="fa-cog"
|
|
531
|
-
// url={`/plugins/content-type-builder/content-types/${slug}`}
|
|
532
|
-
// />
|
|
533
|
-
// </CheckPermissions>
|
|
534
|
-
// )}
|
|
535
|
-
// {/* TODO add DOCUMENTATION */}
|
|
536
|
-
// <InjectionZone area="contentManager.editView.right-links" slug={slug} />
|
|
537
|
-
|
|
538
|
-
// {allowedActions.canDelete && (
|
|
539
|
-
// <DeleteLink
|
|
540
|
-
// isCreatingEntry={isCreatingEntry}
|
|
541
|
-
// onDelete={onDelete}
|
|
542
|
-
// onDeleteSucceeded={onDeleteSucceeded}
|
|
543
|
-
// />
|
|
544
|
-
// )}
|
|
545
|
-
// </ul>
|
|
546
|
-
// </LinkWrapper>
|
|
547
|
-
// </div>
|
|
548
|
-
// </div>
|
|
549
|
-
// </Container>
|
|
550
|
-
// </EditViewDataManagerProvider>
|
|
551
|
-
// );
|
|
552
|
-
// }}
|
|
553
|
-
// </DataManagementWrapper>
|
|
554
|
-
// );
|
|
555
367
|
};
|
|
556
368
|
|
|
557
369
|
EditView.defaultProps = {
|
|
@@ -75,7 +75,7 @@ const SortDisplayedFields = ({
|
|
|
75
75
|
hasRadius
|
|
76
76
|
>
|
|
77
77
|
<ScrollableContainer size="1" paddingBottom={4} ref={scrollableContainerRef}>
|
|
78
|
-
<Stack horizontal
|
|
78
|
+
<Stack horizontal spacing={3}>
|
|
79
79
|
{displayedFields.map((field, index) => (
|
|
80
80
|
<DraggableCard
|
|
81
81
|
key={field}
|
package/admin/src/hooks/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as useConfigurations } from './useConfigurations';
|
|
2
2
|
export { default as useModels } from './useModels';
|
|
3
3
|
export { default as useFetchPermissionsLayout } from './useFetchPermissionsLayout';
|
|
4
|
-
export { default as useFetchPluginsFromMarketPlace } from './useFetchPluginsFromMarketPlace';
|
|
5
4
|
export { default as useFetchRole } from './useFetchRole';
|
|
6
5
|
export { default as useMenu } from './useMenu';
|
|
7
6
|
export { default as useRolesList } from './useRolesList';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useQuery } from 'react-query';
|
|
2
|
+
import { useNotification } from '@strapi/helper-plugin';
|
|
3
|
+
import { fetchInstalledPlugins } from './utils/api';
|
|
4
|
+
|
|
5
|
+
const useFetchInstalledPlugins = notifyLoad => {
|
|
6
|
+
const toggleNotification = useNotification();
|
|
7
|
+
|
|
8
|
+
return useQuery('list-installed-plugins', () => fetchInstalledPlugins(), {
|
|
9
|
+
onSuccess: () => {
|
|
10
|
+
if (notifyLoad) {
|
|
11
|
+
notifyLoad();
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
onError: () => {
|
|
15
|
+
toggleNotification({
|
|
16
|
+
type: 'warning',
|
|
17
|
+
message: { id: 'notification.error', defaultMessage: 'An error occured' },
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default useFetchInstalledPlugins;
|
package/admin/src/{pages/InstalledPluginsPage → hooks/useFetchInstalledPlugins}/utils/api.js
RENAMED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { axiosInstance } from '../../../core/utils';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const fetchInstalledPlugins = async () => {
|
|
4
4
|
const { data } = await axiosInstance.get('/admin/plugins');
|
|
5
5
|
|
|
6
|
-
notify();
|
|
7
|
-
|
|
8
6
|
return data;
|
|
9
7
|
};
|
|
10
8
|
|
|
11
|
-
export {
|
|
9
|
+
export { fetchInstalledPlugins };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useQuery } from 'react-query';
|
|
2
|
+
import { useNotification } from '@strapi/helper-plugin';
|
|
3
|
+
import { fetchMarketplacePlugins } from './utils/api';
|
|
4
|
+
|
|
5
|
+
const useFetchMarketplacePlugins = notifyLoad => {
|
|
6
|
+
const toggleNotification = useNotification();
|
|
7
|
+
|
|
8
|
+
return useQuery('list-marketplace-plugins', () => fetchMarketplacePlugins(), {
|
|
9
|
+
onSuccess: () => {
|
|
10
|
+
if (notifyLoad) {
|
|
11
|
+
notifyLoad();
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
onError: () => {
|
|
15
|
+
toggleNotification({
|
|
16
|
+
type: 'warning',
|
|
17
|
+
message: { id: 'notification.error', defaultMessage: 'An error occured' },
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default useFetchMarketplacePlugins;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
|
|
3
|
+
const MARKETPLACE_API_URL = 'https://market-api.strapi.io';
|
|
4
|
+
|
|
5
|
+
const fetchMarketplacePlugins = async () => {
|
|
6
|
+
const { data: response } = await axios.get(`${MARKETPLACE_API_URL}/plugins`);
|
|
7
|
+
|
|
8
|
+
// Only keep v4 plugins
|
|
9
|
+
const filteredResponse = {
|
|
10
|
+
...response,
|
|
11
|
+
data: response.data.filter(plugin => plugin.attributes.strapiCompatibility === 'v4'),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return filteredResponse;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { fetchMarketplacePlugins };
|
|
@@ -10,7 +10,7 @@ const init = (initialState, { settings, shouldUpdateStrapi }) => {
|
|
|
10
10
|
// Sort the links by name
|
|
11
11
|
const sortedGlobalLinks = sortLinks([...pluginsGlobalLinks, ...globalLinks]).map(link => ({
|
|
12
12
|
...link,
|
|
13
|
-
hasNotification: link.id === 'application-infos' && shouldUpdateStrapi,
|
|
13
|
+
hasNotification: link.id === '000-application-infos' && shouldUpdateStrapi,
|
|
14
14
|
}));
|
|
15
15
|
|
|
16
16
|
const otherSections = Object.values(omit(settings, 'global'));
|
|
@@ -25,7 +25,7 @@ const init = (initialState, { settings, shouldUpdateStrapi }) => {
|
|
|
25
25
|
intlLabel: { id: 'Settings.permissions', defaultMessage: 'Administration Panel' },
|
|
26
26
|
links: [
|
|
27
27
|
{
|
|
28
|
-
intlLabel: { id: 'Settings.permissions.menu.link.roles.label' },
|
|
28
|
+
intlLabel: { id: 'Settings.permissions.menu.link.roles.label', defaultMessage: 'Roles' },
|
|
29
29
|
to: '/settings/roles',
|
|
30
30
|
id: 'roles',
|
|
31
31
|
isDisplayed: false,
|
|
@@ -12,7 +12,7 @@ import { DndProvider } from 'react-dnd';
|
|
|
12
12
|
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
13
13
|
import LeftMenu from '../../components/LeftMenu';
|
|
14
14
|
import AppLayout from '../../layouts/AppLayout';
|
|
15
|
-
import { useMenu
|
|
15
|
+
import { useMenu } from '../../hooks';
|
|
16
16
|
import Onboarding from './Onboarding';
|
|
17
17
|
import { createRoute } from '../../utils';
|
|
18
18
|
import GuidedTourModal from '../../components/GuidedTour/Modal';
|
|
@@ -48,8 +48,6 @@ const useTrackUsage = () => {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
const Admin = () => {
|
|
51
|
-
// Show a notification when the current version of Strapi is not the latest one
|
|
52
|
-
useReleaseNotification();
|
|
53
51
|
useTrackUsage();
|
|
54
52
|
const { isLoading, generalSectionLinks, pluginsSectionLinks } = useMenu();
|
|
55
53
|
const { menu } = useStrapiApp();
|
|
@@ -19,6 +19,7 @@ import PrivateRoute from '../../components/PrivateRoute';
|
|
|
19
19
|
import { createRoute, makeUniqueRoutes } from '../../utils';
|
|
20
20
|
import AuthPage from '../AuthPage';
|
|
21
21
|
import NotFoundPage from '../NotFoundPage';
|
|
22
|
+
import UseCasePage from '../UseCasePage';
|
|
22
23
|
import { getUID } from './utils';
|
|
23
24
|
import routes from './utils/routes';
|
|
24
25
|
|
|
@@ -119,6 +120,7 @@ function App() {
|
|
|
119
120
|
)}
|
|
120
121
|
exact
|
|
121
122
|
/>
|
|
123
|
+
<PrivateRoute path="/usecase" component={UseCasePage} />
|
|
122
124
|
<PrivateRoute path="/" component={AuthenticatedApp} />
|
|
123
125
|
<Route path="" component={NotFoundPage} />
|
|
124
126
|
</Switch>
|
|
@@ -15,7 +15,7 @@ import UnauthenticatedLayout, {
|
|
|
15
15
|
Column,
|
|
16
16
|
LayoutContent,
|
|
17
17
|
} from '../../../../layouts/UnauthenticatedLayout';
|
|
18
|
-
import Logo from '
|
|
18
|
+
import Logo from '../../../../components/UnauthenticatedLogo';
|
|
19
19
|
|
|
20
20
|
const ForgotPassword = ({ onSubmit, schema }) => {
|
|
21
21
|
const { formatMessage } = useIntl();
|
|
@@ -60,7 +60,7 @@ const ForgotPassword = ({ onSubmit, schema }) => {
|
|
|
60
60
|
)}
|
|
61
61
|
</Column>
|
|
62
62
|
|
|
63
|
-
<Stack
|
|
63
|
+
<Stack spacing={6}>
|
|
64
64
|
<TextInput
|
|
65
65
|
error={
|
|
66
66
|
errors.email
|
|
@@ -9,7 +9,7 @@ import UnauthenticatedLayout, {
|
|
|
9
9
|
Column,
|
|
10
10
|
LayoutContent,
|
|
11
11
|
} from '../../../../layouts/UnauthenticatedLayout';
|
|
12
|
-
import Logo from '
|
|
12
|
+
import Logo from '../../../../components/UnauthenticatedLogo';
|
|
13
13
|
|
|
14
14
|
const ForgotPasswordSuccess = () => {
|
|
15
15
|
const { formatMessage } = useIntl();
|
|
@@ -16,7 +16,7 @@ import { useIntl } from 'react-intl';
|
|
|
16
16
|
import styled from 'styled-components';
|
|
17
17
|
import { Formik } from 'formik';
|
|
18
18
|
import { Column, LayoutContent } from '../../../../layouts/UnauthenticatedLayout';
|
|
19
|
-
import Logo from '
|
|
19
|
+
import Logo from '../../../../components/UnauthenticatedLogo';
|
|
20
20
|
import FieldActionWrapper from '../FieldActionWrapper';
|
|
21
21
|
|
|
22
22
|
const PasswordInput = styled(TextInput)`
|
|
@@ -75,7 +75,7 @@ const Login = ({ onSubmit, schema, children }) => {
|
|
|
75
75
|
)}
|
|
76
76
|
</Column>
|
|
77
77
|
|
|
78
|
-
<Stack
|
|
78
|
+
<Stack spacing={6}>
|
|
79
79
|
<TextInput
|
|
80
80
|
error={
|
|
81
81
|
errors.email
|
|
@@ -10,7 +10,7 @@ import UnauthenticatedLayout, {
|
|
|
10
10
|
Column,
|
|
11
11
|
LayoutContent,
|
|
12
12
|
} from '../../../../layouts/UnauthenticatedLayout';
|
|
13
|
-
import Logo from '
|
|
13
|
+
import Logo from '../../../../components/UnauthenticatedLogo';
|
|
14
14
|
|
|
15
15
|
const Oops = () => {
|
|
16
16
|
const { formatMessage } = useIntl();
|