@strapi/admin 4.6.0 → 4.6.2
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 +2 -1
- package/admin/src/StrapiApp.js +1 -1
- package/admin/src/assets/images/onboarding-preview.png +0 -0
- package/admin/src/components/AuthenticatedApp/utils/api.js +5 -4
- package/admin/src/components/AutoReloadOverlayBlockerProvider/Blocker.js +3 -7
- package/admin/src/components/AutoReloadOverlayBlockerProvider/Overlay.js +1 -2
- package/admin/src/components/GuidedTour/Homepage/components/Step.js +1 -3
- package/admin/src/components/GuidedTour/Homepage/components/Stepper.js +1 -1
- package/admin/src/components/GuidedTour/Homepage/index.js +2 -6
- package/admin/src/components/GuidedTour/Modal/components/Content.js +1 -3
- package/admin/src/components/GuidedTour/Modal/components/Modal.js +2 -8
- package/admin/src/components/GuidedTour/Modal/components/StepNumberWithPadding.js +1 -1
- package/admin/src/components/GuidedTour/Modal/components/Stepper.js +2 -5
- package/admin/src/components/GuidedTour/Stepper/StepLine.js +1 -1
- package/admin/src/components/GuidedTour/Stepper/StepNumber.js +2 -4
- package/admin/src/components/LeftMenu/index.js +12 -11
- package/admin/src/components/Notifications/Notification/index.js +2 -2
- package/admin/src/components/Notifications/index.js +1 -1
- package/admin/src/components/Theme/index.js +1 -1
- package/admin/src/components/UpgradePlanModal/index.js +3 -10
- package/admin/src/content-manager/components/AttributeFilter/Filters.js +2 -3
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +24 -30
- package/admin/src/content-manager/components/ComponentInitializer/index.js +2 -5
- package/admin/src/content-manager/components/DynamicTable/CellContent/Media/FileWrapper.js +1 -2
- package/admin/src/content-manager/components/DynamicTable/CellContent/Media/index.js +3 -3
- package/admin/src/content-manager/components/DynamicTable/CellContent/MultipleMedias.js +1 -1
- package/admin/src/content-manager/components/DynamicTable/CellContent/RelationMultiple/index.js +19 -16
- package/admin/src/content-manager/components/DynamicTable/CellContent/RelationSingle/index.js +1 -1
- package/admin/src/content-manager/components/DynamicTable/CellContent/RepeatableComponent/index.js +1 -4
- package/admin/src/content-manager/components/DynamicTable/CellContent/SingleComponent/index.js +1 -2
- package/admin/src/content-manager/components/DynamicTable/CellContent/index.js +1 -2
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDelete/index.js +10 -7
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDeleteAll/index.js +10 -7
- package/admin/src/content-manager/components/DynamicTable/TableRows/index.js +3 -9
- package/admin/src/content-manager/components/DynamicTable/index.js +1 -2
- package/admin/src/content-manager/components/DynamicZone/components/AddComponentButton.js +2 -5
- package/admin/src/content-manager/components/DynamicZone/components/ComponentCard.js +1 -3
- package/admin/src/content-manager/components/DynamicZone/components/ComponentCategory.js +1 -2
- package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker.js +1 -4
- package/admin/src/content-manager/components/DynamicZone/components/DynamicZoneLabel.js +1 -3
- package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +39 -9
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +9 -15
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/findLeafByPathAndReplace.js +1 -3
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +6 -5
- package/admin/src/content-manager/components/FieldComponent/Label.js +1 -3
- package/admin/src/content-manager/components/FieldComponent/index.js +2 -5
- package/admin/src/content-manager/components/FieldTypeIcon/index.js +15 -13
- package/admin/src/content-manager/components/Hint/index.js +1 -1
- package/admin/src/content-manager/components/InjectionZoneList/index.js +1 -1
- package/admin/src/content-manager/components/InputUID/endActionStyle.js +1 -3
- package/admin/src/content-manager/components/InputUID/index.js +6 -10
- package/admin/src/content-manager/components/Inputs/index.js +0 -2
- package/admin/src/content-manager/components/NonRepeatableComponent/index.js +1 -3
- package/admin/src/content-manager/components/RelationInput/RelationInput.js +16 -12
- package/admin/src/content-manager/components/RelationInput/components/Option.js +1 -2
- package/admin/src/content-manager/components/RelationInput/components/Relation.js +1 -2
- package/admin/src/content-manager/components/RelationInput/components/RelationList.js +1 -1
- package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +39 -26
- package/admin/src/content-manager/components/Wysiwyg/WysiwygFooter.js +2 -4
- package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +24 -18
- package/admin/src/content-manager/components/Wysiwyg/WysiwygStyles.js +1 -2
- package/admin/src/content-manager/components/Wysiwyg/index.js +1 -3
- package/admin/src/content-manager/hooks/useFetchContentTypeLayout/index.js +4 -3
- package/admin/src/content-manager/hooks/useLazyComponents/index.js +9 -13
- package/admin/src/content-manager/hooks/useRelation/useRelation.js +4 -4
- package/admin/src/content-manager/pages/App/LeftMenu/index.js +1 -1
- package/admin/src/content-manager/pages/App/index.js +1 -2
- package/admin/src/content-manager/pages/App/useModels.js +9 -4
- package/admin/src/content-manager/pages/App/utils/generateModelsLinks.js +9 -8
- package/admin/src/content-manager/pages/App/utils/getContentTypeLinks.js +3 -2
- package/admin/src/content-manager/pages/CollectionTypeRecursivePath/components/ErrorFallback.js +1 -1
- package/admin/src/content-manager/pages/ComponentSetttingsView/index.js +4 -4
- package/admin/src/content-manager/pages/EditSettingsView/components/ComponentFieldList.js +2 -5
- package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFieldButton.js +2 -4
- package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFields.js +2 -7
- package/admin/src/content-manager/pages/EditSettingsView/components/FieldButtonContent.js +2 -6
- package/admin/src/content-manager/pages/EditSettingsView/components/FormModal.js +5 -5
- package/admin/src/content-manager/pages/EditSettingsView/components/GenericInput.js +1 -3
- package/admin/src/content-manager/pages/EditSettingsView/components/LinkToCTB.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/components/ModalForm.js +1 -2
- package/admin/src/content-manager/pages/EditSettingsView/components/RowsLayout.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/index.js +15 -11
- package/admin/src/content-manager/pages/EditSettingsView/utils/api.js +4 -2
- package/admin/src/content-manager/pages/EditView/DeleteLink/index.js +8 -10
- package/admin/src/content-manager/pages/EditView/DraftAndPublishBadge/index.js +3 -5
- package/admin/src/content-manager/pages/EditView/GridRow/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/Header/index.js +12 -10
- package/admin/src/content-manager/pages/EditView/index.js +2 -7
- package/admin/src/content-manager/pages/ListSettingsView/components/CardPreview.js +2 -6
- package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +2 -7
- package/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js +8 -7
- package/admin/src/content-manager/pages/ListSettingsView/components/Settings.js +10 -6
- package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +10 -7
- package/admin/src/content-manager/pages/ListSettingsView/index.js +10 -7
- package/admin/src/content-manager/pages/ListSettingsView/utils/api.js +4 -2
- package/admin/src/content-manager/pages/ListView/FieldPicker/index.js +1 -2
- package/admin/src/content-manager/pages/ListView/PaginationFooter/index.js +1 -2
- package/admin/src/content-manager/pages/ListView/index.js +25 -28
- package/admin/src/content-manager/pages/NoContentType/index.js +2 -5
- package/admin/src/content-manager/pages/NoPermissions/index.js +1 -2
- package/admin/src/core/utils/index.js +0 -1
- package/admin/src/hooks/useFetchEnabledPlugins/utils/api.js +3 -2
- package/admin/src/hooks/useInjectReducer/index.js +1 -0
- package/admin/src/hooks/useInjectReducer/useInjectReducer.js +19 -0
- package/admin/src/hooks/useMenu/reducer.js +1 -3
- package/admin/src/hooks/useRegenerate/index.js +3 -3
- package/admin/src/hooks/useRolesList/index.js +5 -3
- package/admin/src/index.js +4 -3
- package/admin/src/layouts/AppLayout/index.js +1 -3
- package/admin/src/layouts/UnauthenticatedLayout/LocaleToggle/index.js +1 -1
- package/admin/src/layouts/UnauthenticatedLayout/index.js +1 -2
- package/admin/src/pages/Admin/Onboarding/constants.js +46 -0
- package/admin/src/pages/Admin/Onboarding/index.js +172 -87
- package/admin/src/pages/Admin/index.js +5 -2
- package/admin/src/pages/App/index.js +1 -1
- package/admin/src/pages/AuthPage/components/FieldActionWrapper/index.js +1 -1
- package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +1 -7
- package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +1 -4
- package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +11 -10
- package/admin/src/pages/AuthPage/components/Oops/index.js +1 -4
- package/admin/src/pages/AuthPage/components/Register/index.js +13 -11
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +2 -9
- package/admin/src/pages/HomePage/ContentBlocks.js +2 -5
- package/admin/src/pages/HomePage/HomeHeader.js +3 -6
- package/admin/src/pages/HomePage/SocialLinks.js +33 -30
- package/admin/src/pages/HomePage/index.js +1 -4
- package/admin/src/pages/InstalledPluginsPage/Plugins.js +14 -5
- package/admin/src/pages/InternalErrorPage/index.js +2 -5
- package/admin/src/pages/MarketplacePage/components/EmptyNpmPackageSearch/EmptyNpmPackageGrid.js +1 -2
- package/admin/src/pages/MarketplacePage/components/EmptyNpmPackageSearch/index.js +2 -5
- package/admin/src/pages/MarketplacePage/components/MissingPluginBanner/index.js +2 -3
- package/admin/src/pages/MarketplacePage/components/NpmPackageCard/CardButton.js +2 -4
- package/admin/src/pages/MarketplacePage/components/NpmPackageCard/InstallPluginButton.js +2 -4
- package/admin/src/pages/MarketplacePage/components/NpmPackageCard/PackageStats.js +2 -7
- package/admin/src/pages/MarketplacePage/components/NpmPackageCard/index.js +3 -9
- package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/FilterSelect.js +1 -1
- package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/FiltersPopover.js +1 -4
- package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/index.js +2 -5
- package/admin/src/pages/MarketplacePage/components/NpmPackagesGrid/index.js +1 -1
- package/admin/src/pages/MarketplacePage/components/PageHeader/index.js +3 -3
- package/admin/src/pages/MarketplacePage/components/SortSelect/index.js +1 -2
- package/admin/src/pages/MarketplacePage/index.js +15 -8
- package/admin/src/pages/NotFoundPage/index.js +2 -5
- package/admin/src/pages/ProfilePage/index.js +17 -14
- package/admin/src/pages/ProfilePage/utils/api.js +5 -3
- package/admin/src/pages/SettingsPage/{pages/Users/ListPage → components}/Filters/index.js +2 -3
- package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +16 -3
- package/admin/src/pages/SettingsPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ActionBoundRoutes/index.js +1 -3
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/BoundRoute/index.js +1 -3
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/CollapsableContentType/CheckBoxWrapper.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/CollapsableContentType/index.js +13 -8
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ContenTypesSection/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ContentBox/index.js +2 -3
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/FormApiTokenContainer/index.js +11 -7
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/FormBody/index.js +1 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/FormHead/index.js +2 -5
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/LoadingView/index.js +2 -4
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Permissions/index.js +1 -3
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Regenerate/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +7 -6
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/DeleteButton/index.js +2 -3
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/ReadButton/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/UpdateButton/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/DynamicTable/index.js +1 -3
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/index.js +6 -7
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/CustomizationInfos/index.js +1 -3
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/index.js +8 -5
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/AddLogoDialog.js +1 -3
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/FromComputerForm.js +13 -9
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/FromUrlForm.js +1 -4
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/ImageCardAsset.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/PendingLogoDialog.js +1 -5
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoModalStepper/index.js +1 -2
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +56 -70
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/api.js +5 -3
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/CollapseLabel/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsButton/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/ActionRow/index.js +1 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js +5 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/Collapse/index.js +2 -5
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/index.js +1 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/CarretIcon/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/Header/index.js +1 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +1 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/utils/activeStyle.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypes/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Curve/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +1 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/Permissions/utils/formatLayoutForSettingsAndPlugins.js +12 -16
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/Row/index.js +1 -2
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/index.js +1 -5
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +11 -8
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RowLabelWithCheckbox/index.js +1 -4
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +2 -6
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/components/RoleRow/index.js +1 -5
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/index.js +16 -10
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +12 -9
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/api.js +6 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/DynamicTable/TableRows/index.js +11 -8
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +18 -10
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/PaginationFooter/index.js +1 -2
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/index.js +10 -6
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/api.js +6 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/tableHeaders.js +1 -2
- package/admin/src/pages/SettingsPage/pages/Users/components/MagicLink/MagicLinkWrapper.js +3 -20
- package/admin/src/pages/SettingsPage/pages/Users/components/SelectRoles/index.js +5 -4
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/EventRow.js +1 -2
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -3
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/Combobox.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/index.js +11 -8
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js +2 -8
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +11 -9
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/index.js +4 -3
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +26 -18
- package/admin/src/pages/UseCasePage/index.js +12 -9
- package/admin/src/permissions/defaultPermissions.js +2 -15
- package/admin/src/translations/ar.json +4 -4
- package/admin/src/translations/ca.json +4 -4
- package/admin/src/translations/cs.json +4 -4
- package/admin/src/translations/de.json +4 -4
- package/admin/src/translations/dk.json +4 -4
- package/admin/src/translations/en.json +17 -10
- package/admin/src/translations/es.json +4 -4
- package/admin/src/translations/eu.json +796 -0
- package/admin/src/translations/fr.json +4 -4
- package/admin/src/translations/gu.json +4 -4
- package/admin/src/translations/he.json +4 -4
- package/admin/src/translations/hi.json +4 -4
- package/admin/src/translations/hu.json +4 -4
- package/admin/src/translations/id.json +4 -4
- package/admin/src/translations/it.json +4 -4
- package/admin/src/translations/ja.json +4 -4
- package/admin/src/translations/ko.json +4 -4
- package/admin/src/translations/languageNativeNames.js +1 -0
- package/admin/src/translations/ml.json +4 -4
- package/admin/src/translations/ms.json +4 -4
- package/admin/src/translations/nl.json +4 -4
- package/admin/src/translations/no.json +4 -4
- package/admin/src/translations/pl.json +4 -4
- package/admin/src/translations/pt-BR.json +4 -4
- package/admin/src/translations/pt.json +4 -4
- package/admin/src/translations/ru.json +785 -789
- package/admin/src/translations/sa.json +4 -4
- package/admin/src/translations/sk.json +4 -4
- package/admin/src/translations/sv.json +4 -4
- package/admin/src/translations/th.json +4 -4
- package/admin/src/translations/tr.json +4 -4
- package/admin/src/translations/uk.json +4 -4
- package/admin/src/translations/vi.json +4 -4
- package/admin/src/translations/zh-Hans.json +4 -4
- package/admin/src/translations/zh.json +4 -4
- package/build/1341.5d48c79b.chunk.js +1 -0
- package/build/19eb2dfcf2603eb55733.png +0 -0
- package/build/2637.679b590b.chunk.js +1 -0
- package/build/4318.9b1ac9bc.chunk.js +30 -0
- package/build/4849.7abafe52.chunk.js +98 -0
- package/build/6487.83e219bf.chunk.js +14 -0
- package/build/{5015.8e3fe50b.chunk.js → 8469.853c822b.chunk.js} +1 -6
- package/build/9816.01ee964f.chunk.js +2 -0
- package/build/Admin-authenticatedApp.dd16edad.chunk.js +79 -0
- package/build/Admin_InternalErrorPage.4ad8b0df.chunk.js +1 -0
- package/build/Admin_homePage.4b878f04.chunk.js +72 -0
- package/build/Admin_marketplace.a8ea585f.chunk.js +22 -0
- package/build/Admin_pluginsPage.15e3b0fd.chunk.js +1 -0
- package/build/Admin_profilePage.b27e40f6.chunk.js +15 -0
- package/build/Admin_settingsPage.3cd54156.chunk.js +178 -0
- package/build/Upload_ConfigureTheView.34dde278.chunk.js +1 -0
- package/build/admin-app.3a084127.chunk.js +112 -0
- package/build/admin-edit-roles-page.fd041d89.chunk.js +1 -0
- package/build/admin-edit-users.08a60ea2.chunk.js +10 -0
- package/build/admin-users.74f5629d.chunk.js +11 -0
- package/build/{api-tokens-create-page.0e686c30.chunk.js → api-tokens-create-page.a31c7fba.chunk.js} +1 -1
- package/build/{api-tokens-edit-page.d6c7487b.chunk.js → api-tokens-edit-page.64fef287.chunk.js} +1 -1
- package/build/api-tokens-list-page.370459ba.chunk.js +16 -0
- package/build/ar-json.39e54aba.chunk.js +1 -0
- package/build/audit-logs-settings-page.bc1784fe.chunk.js +1 -0
- package/build/{ca-json.f6a0f472.chunk.js → ca-json.4d999055.chunk.js} +1 -1
- package/build/content-manager.d04b738f.chunk.js +1139 -0
- package/build/content-type-builder-list-view.c2f917b6.chunk.js +191 -0
- package/build/content-type-builder.b7fb1e65.chunk.js +126 -0
- package/build/cs-json.4b44411c.chunk.js +1 -0
- package/build/{de-json.30e1f35b.chunk.js → de-json.866f8a28.chunk.js} +1 -1
- package/build/{dk-json.e6d9ffa4.chunk.js → dk-json.10f7b1d1.chunk.js} +1 -1
- package/build/email-settings-page.884cfb8b.chunk.js +3 -0
- package/build/en-json.9cada7f3.chunk.js +1 -0
- package/build/es-json.ea15c957.chunk.js +1 -0
- package/build/eu-json.3bc24d60.chunk.js +1 -0
- package/build/{fr-json.78545ef8.chunk.js → fr-json.e88fbdfd.chunk.js} +1 -1
- package/build/{gu-json.676518f2.chunk.js → gu-json.94f0d242.chunk.js} +1 -1
- package/build/{he-json.ad22e8cc.chunk.js → he-json.f0de8cdb.chunk.js} +1 -1
- package/build/{hi-json.19b51c09.chunk.js → hi-json.df3a7be2.chunk.js} +1 -1
- package/build/{hu-json.f947088f.chunk.js → hu-json.680e6eef.chunk.js} +1 -1
- package/build/i18n-settings-page.c7bc29fc.chunk.js +1 -0
- package/build/{id-json.504daa84.chunk.js → id-json.e0d83d41.chunk.js} +1 -1
- package/build/index.html +1 -1
- package/build/{it-json.2fd90f4d.chunk.js → it-json.8be59205.chunk.js} +1 -1
- package/build/{ja-json.c9f12d0b.chunk.js → ja-json.97ee41ba.chunk.js} +1 -1
- package/build/{ko-json.ef463065.chunk.js → ko-json.4cbbf4f2.chunk.js} +1 -1
- package/build/main.9c01de7f.js +3929 -0
- package/build/{ml-json.490f666c.chunk.js → ml-json.e3747091.chunk.js} +1 -1
- package/build/ms-json.0eddffd9.chunk.js +1 -0
- package/build/{nl-json.c416295a.chunk.js → nl-json.371a15ee.chunk.js} +1 -1
- package/build/{no-json.1a2258ba.chunk.js → no-json.9b3cd181.chunk.js} +1 -1
- package/build/{pl-json.8cf0c871.chunk.js → pl-json.e535cbce.chunk.js} +1 -1
- package/build/{pt-BR-json.51fab8d0.chunk.js → pt-BR-json.e5fafa46.chunk.js} +1 -1
- package/build/pt-json.ee554a41.chunk.js +1 -0
- package/build/ru-json.866f0ff1.chunk.js +1 -0
- package/build/runtime~main.bb1389c9.js +2 -0
- package/build/{sa-json.f3fa5407.chunk.js → sa-json.7efeb257.chunk.js} +1 -1
- package/build/{sk-json.9ec60d9f.chunk.js → sk-json.7bbeb0af.chunk.js} +1 -1
- package/build/sso-settings-page.82d84043.chunk.js +1 -0
- package/build/{sv-json.c6b0c237.chunk.js → sv-json.dc40951f.chunk.js} +1 -1
- package/build/{th-json.6e68155c.chunk.js → th-json.f664b96d.chunk.js} +1 -1
- package/build/{tr-json.9f41dc08.chunk.js → tr-json.b79eae31.chunk.js} +1 -1
- package/build/uk-json.b7e38370.chunk.js +1 -0
- package/build/upload-settings.c18b010f.chunk.js +1 -0
- package/build/upload.0876ab69.chunk.js +13 -0
- package/build/users-advanced-settings-page.677e1973.chunk.js +1 -0
- package/build/users-email-settings-page.a3c80419.chunk.js +1 -0
- package/build/users-providers-settings-page.87a9c77d.chunk.js +1 -0
- package/build/users-roles-settings-page.79c19845.chunk.js +30 -0
- package/build/vi-json.ee4c5537.chunk.js +1 -0
- package/build/webhook-edit-page.cfbdd3fd.chunk.js +23 -0
- package/build/webhook-list-page.3daa4fe2.chunk.js +1 -0
- package/build/{zh-Hans-json.9c0eac99.chunk.js → zh-Hans-json.30a18940.chunk.js} +1 -1
- package/build/{zh-json.f88f563d.chunk.js → zh-json.49d84433.chunk.js} +1 -1
- package/ee/admin/pages/AuthPage/components/Login/index.js +1 -5
- package/ee/admin/pages/AuthPage/components/Providers/SSOProviders.js +1 -4
- package/ee/admin/pages/AuthPage/components/Providers/index.js +1 -8
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/ComboboxFilter/index.js +41 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionBody.js +2 -9
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionItem.js +1 -2
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/Modal/index.js +1 -2
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/PaginationFooter/index.js +1 -2
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/TableRows/index.js +3 -6
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useAuditLogsData.js +47 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/index.js +30 -31
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/getActionTypesDefaultMessages.js +7 -9
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/getDisplayedFilters.js +88 -0
- package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +15 -11
- package/ee/admin/pages/SettingsPage/pages/Roles/ListPage/index.js +20 -12
- package/ee/admin/pages/SettingsPage/pages/SingleSignOn/index.js +15 -9
- package/ee/admin/permissions/customPermissions.js +4 -0
- package/ee/server/migrations/audit-logs-table.js +45 -0
- package/ee/server/register.js +2 -0
- package/ee/server/services/audit-logs.js +11 -1
- package/package.json +31 -31
- package/server/config/admin-actions.js +0 -16
- package/server/controllers/admin.js +16 -55
- package/server/routes/admin.js +0 -28
- package/webpack.alias.js +0 -1
- package/webpack.config.js +0 -3
- package/admin/src/content-manager/components/InputJSON/FieldWrapper.js +0 -40
- package/admin/src/content-manager/components/InputJSON/Label.js +0 -35
- package/admin/src/content-manager/components/InputJSON/components.js +0 -36
- package/admin/src/content-manager/components/InputJSON/index.js +0 -223
- package/admin/src/content-manager/components/InputJSON/jsonlint.js +0 -680
- package/admin/src/core/utils/axiosInstance.js +0 -40
- package/build/2607.ce06608e.chunk.js +0 -66
- package/build/2743.dea372fb.chunk.js +0 -42
- package/build/3075.03ebe93d.chunk.js +0 -115
- package/build/3632.963ac97d.chunk.js +0 -138
- package/build/4318.8cb388a5.chunk.js +0 -30
- package/build/4656.a0d43cca.chunk.js +0 -159
- package/build/5910.a5374848.chunk.js +0 -209
- package/build/8633.4af74a50.chunk.js +0 -1
- package/build/9641.a311b612.chunk.js +0 -276
- package/build/9707.62831b4d.chunk.js +0 -101
- package/build/Admin-authenticatedApp.50dc27f9.chunk.js +0 -75
- package/build/Admin_InternalErrorPage.157152a8.chunk.js +0 -1
- package/build/Admin_homePage.79ab880c.chunk.js +0 -77
- package/build/Admin_marketplace.eabf21b2.chunk.js +0 -26
- package/build/Admin_pluginsPage.953e796b.chunk.js +0 -6
- package/build/Admin_profilePage.5c2efda5.chunk.js +0 -15
- package/build/Admin_settingsPage.19cfb9ca.chunk.js +0 -178
- package/build/Upload_ConfigureTheView.3f2b6e6a.chunk.js +0 -1
- package/build/admin-app.34295b50.chunk.js +0 -112
- package/build/admin-edit-roles-page.d50d9654.chunk.js +0 -1
- package/build/admin-edit-users.912b856d.chunk.js +0 -10
- package/build/admin-users.e36e7111.chunk.js +0 -11
- package/build/api-tokens-list-page.1cd86136.chunk.js +0 -16
- package/build/ar-json.932794f7.chunk.js +0 -1
- package/build/audit-logs-settings-page.308a6250.chunk.js +0 -1
- package/build/codemirror-addon-closebrackets.71aa4bbd.chunk.js +0 -2
- package/build/codemirror-addon-lint-js.405f70fb.chunk.js +0 -1
- package/build/codemirror-addon-lint.8487ad3d.chunk.js +0 -1
- package/build/codemirror-addon-mark-selection.1928c849.chunk.js +0 -1
- package/build/codemirror-css.359a2a4b.chunk.js +0 -345
- package/build/codemirror-javacript.af237b68.chunk.js +0 -1
- package/build/codemirror-theme.2fe63a16.chunk.js +0 -33
- package/build/content-manager.851f40ce.chunk.js +0 -1170
- package/build/content-type-builder-list-view.4243b2b1.chunk.js +0 -198
- package/build/content-type-builder.365b6bf4.chunk.js +0 -125
- package/build/cs-json.79879fb6.chunk.js +0 -1
- package/build/email-settings-page.379552b1.chunk.js +0 -15
- package/build/en-json.38d182e5.chunk.js +0 -1
- package/build/es-json.e275481d.chunk.js +0 -1
- package/build/i18n-settings-page.3ab28b1a.chunk.js +0 -65
- package/build/main.9f31732e.js +0 -4454
- package/build/ms-json.db87d8d3.chunk.js +0 -1
- package/build/pt-json.62927d1e.chunk.js +0 -1
- package/build/ru-json.3b411a39.chunk.js +0 -1
- package/build/runtime~main.2b8e2318.js +0 -2
- package/build/sso-settings-page.b64a44e8.chunk.js +0 -41
- package/build/uk-json.b2fcd567.chunk.js +0 -1
- package/build/upload-settings.6c26ff37.chunk.js +0 -89
- package/build/upload.2c69d238.chunk.js +0 -38
- package/build/users-advanced-settings-page.c4270682.chunk.js +0 -13
- package/build/users-email-settings-page.60422a2f.chunk.js +0 -28
- package/build/users-providers-settings-page.e1834060.chunk.js +0 -104
- package/build/users-roles-settings-page.3ef35132.chunk.js +0 -30
- package/build/vi-json.f08d7d03.chunk.js +0 -1
- package/build/webhook-edit-page.c0080dc1.chunk.js +0 -75
- package/build/webhook-list-page.f75ba3f2.chunk.js +0 -42
package/.browserslistrc
CHANGED
package/admin/src/StrapiApp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BrowserRouter } from 'react-router-dom';
|
|
3
|
-
import { lightTheme, darkTheme } from '@strapi/design-system
|
|
3
|
+
import { lightTheme, darkTheme } from '@strapi/design-system';
|
|
4
4
|
import merge from 'lodash/merge';
|
|
5
5
|
import pick from 'lodash/pick';
|
|
6
6
|
import isFunction from 'lodash/isFunction';
|
|
Binary file
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
+
import { getFetchClient } from '@strapi/helper-plugin';
|
|
2
3
|
import checkLatestStrapiVersion from './checkLatestStrapiVersion';
|
|
3
|
-
import { axiosInstance } from '../../../core/utils';
|
|
4
4
|
import packageJSON from '../../../../../package.json';
|
|
5
5
|
|
|
6
6
|
const strapiVersion = packageJSON.version;
|
|
7
7
|
const showUpdateNotif = !JSON.parse(localStorage.getItem('STRAPI_UPDATE_NOTIF'));
|
|
8
|
+
const { get } = getFetchClient();
|
|
8
9
|
|
|
9
10
|
const fetchStrapiLatestRelease = async (toggleNotification) => {
|
|
10
11
|
try {
|
|
@@ -38,7 +39,7 @@ const fetchStrapiLatestRelease = async (toggleNotification) => {
|
|
|
38
39
|
|
|
39
40
|
const fetchAppInfo = async () => {
|
|
40
41
|
try {
|
|
41
|
-
const { data, headers } = await
|
|
42
|
+
const { data, headers } = await get('/admin/information');
|
|
42
43
|
|
|
43
44
|
if (!headers['content-type'].includes('application/json')) {
|
|
44
45
|
throw new Error('Not found');
|
|
@@ -52,7 +53,7 @@ const fetchAppInfo = async () => {
|
|
|
52
53
|
|
|
53
54
|
const fetchCurrentUserPermissions = async () => {
|
|
54
55
|
try {
|
|
55
|
-
const { data, headers } = await
|
|
56
|
+
const { data, headers } = await get('/admin/users/me/permissions');
|
|
56
57
|
|
|
57
58
|
if (!headers['content-type'].includes('application/json')) {
|
|
58
59
|
throw new Error('Not found');
|
|
@@ -70,7 +71,7 @@ const fetchUserRoles = async () => {
|
|
|
70
71
|
data: {
|
|
71
72
|
data: { roles },
|
|
72
73
|
},
|
|
73
|
-
} = await
|
|
74
|
+
} = await get('/admin/users/me');
|
|
74
75
|
|
|
75
76
|
return roles;
|
|
76
77
|
} catch (err) {
|
|
@@ -4,13 +4,9 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
import styled, { keyframes } from 'styled-components';
|
|
6
6
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
7
|
-
import Clock from '@strapi/icons
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import { Box } from '@strapi/design-system/Box';
|
|
11
|
-
import { Stack } from '@strapi/design-system/Stack';
|
|
12
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
13
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
7
|
+
import { Clock, Refresh } from '@strapi/icons';
|
|
8
|
+
import { Link } from '@strapi/design-system/v2';
|
|
9
|
+
import { Box, Stack, Flex, Typography } from '@strapi/design-system';
|
|
14
10
|
import { Content, IconBox, Overlay } from './Overlay';
|
|
15
11
|
|
|
16
12
|
const overlayContainer = document.createElement('div');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { Box } from '@strapi/design-system
|
|
3
|
-
import { Stack } from '@strapi/design-system/Stack';
|
|
2
|
+
import { Box, Stack } from '@strapi/design-system';
|
|
4
3
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
5
4
|
|
|
6
5
|
const Overlay = styled(Box)`
|
|
@@ -2,9 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
5
|
-
import { Typography } from '@strapi/design-system
|
|
6
|
-
import { Box } from '@strapi/design-system/Box';
|
|
7
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
5
|
+
import { Typography, Box, Flex } from '@strapi/design-system';
|
|
8
6
|
import StepNumber from '../../Stepper/StepNumber';
|
|
9
7
|
import StepLine from '../../Stepper/StepLine';
|
|
10
8
|
import { IS_DONE, IS_ACTIVE, IS_NOT_DONE } from '../../constants';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Box } from '@strapi/design-system
|
|
3
|
+
import { Box } from '@strapi/design-system';
|
|
4
4
|
import StepHomepage from './Step';
|
|
5
5
|
import { IS_DONE, IS_ACTIVE, IS_NOT_DONE } from '../../constants';
|
|
6
6
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useGuidedTour, useTracking, LinkButton } from '@strapi/helper-plugin';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { Stack } from '@strapi/design-system
|
|
5
|
-
import {
|
|
6
|
-
import { Box } from '@strapi/design-system/Box';
|
|
7
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
8
|
-
import { Button } from '@strapi/design-system/Button';
|
|
9
|
-
import ArrowRight from '@strapi/icons/ArrowRight';
|
|
4
|
+
import { Stack, Flex, Box, Typography, Button } from '@strapi/design-system';
|
|
5
|
+
import { ArrowRight } from '@strapi/icons';
|
|
10
6
|
import StepperHomepage from './components/Stepper';
|
|
11
7
|
import layout from '../layout';
|
|
12
8
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { Stack } from '@strapi/design-system
|
|
5
|
-
import { Box } from '@strapi/design-system/Box';
|
|
6
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
4
|
+
import { Stack, Box, Typography } from '@strapi/design-system';
|
|
7
5
|
import { useIntl } from 'react-intl';
|
|
8
6
|
|
|
9
7
|
const LiStyled = styled.li`
|
|
@@ -3,14 +3,8 @@ import styled from 'styled-components';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
6
|
-
import { Portal } from '@strapi/design-system
|
|
7
|
-
import {
|
|
8
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
9
|
-
import { Box } from '@strapi/design-system/Box';
|
|
10
|
-
import { Stack } from '@strapi/design-system/Stack';
|
|
11
|
-
import { IconButton } from '@strapi/design-system/IconButton';
|
|
12
|
-
import { Button } from '@strapi/design-system/Button';
|
|
13
|
-
import Cross from '@strapi/icons/Cross';
|
|
6
|
+
import { Portal, FocusTrap, Flex, Box, Stack, IconButton, Button } from '@strapi/design-system';
|
|
7
|
+
import { Cross } from '@strapi/icons';
|
|
14
8
|
|
|
15
9
|
const ModalWrapper = styled(Flex)`
|
|
16
10
|
position: fixed;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Box } from '@strapi/design-system
|
|
3
|
+
import { Box } from '@strapi/design-system';
|
|
4
4
|
import StepNumber from '../../Stepper/StepNumber';
|
|
5
5
|
|
|
6
6
|
const StepNumberWithPadding = ({ number, last, type }) => (
|
|
@@ -2,11 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
import { pxToRem, LinkButton } from '@strapi/helper-plugin';
|
|
5
|
-
import { Typography } from '@strapi/design-system
|
|
6
|
-
import {
|
|
7
|
-
import { Box } from '@strapi/design-system/Box';
|
|
8
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
9
|
-
import ArrowRight from '@strapi/icons/ArrowRight';
|
|
5
|
+
import { Typography, Button, Box, Flex } from '@strapi/design-system';
|
|
6
|
+
import { ArrowRight } from '@strapi/icons';
|
|
10
7
|
import Content from './Content';
|
|
11
8
|
import StepLine from '../../Stepper/StepLine';
|
|
12
9
|
import StepNumberWithPadding from './StepNumberWithPadding';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
4
|
-
import { Box } from '@strapi/design-system
|
|
4
|
+
import { Box } from '@strapi/design-system';
|
|
5
5
|
import { IS_DONE, IS_ACTIVE, IS_NOT_DONE } from '../constants';
|
|
6
6
|
|
|
7
7
|
const StepLine = ({ type, ...props }) => {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
4
|
-
import { Flex } from '@strapi/design-system
|
|
5
|
-
import {
|
|
6
|
-
import { Icon } from '@strapi/design-system/Icon';
|
|
7
|
-
import Check from '@strapi/icons/Check';
|
|
4
|
+
import { Flex, Icon, Typography } from '@strapi/design-system';
|
|
5
|
+
import { Check } from '@strapi/icons';
|
|
8
6
|
import { IS_DONE, IS_ACTIVE, IS_NOT_DONE } from '../constants';
|
|
9
7
|
|
|
10
8
|
const StepNumber = ({ type, number }) => {
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
import { NavLink as RouterNavLink, useLocation, useHistory } from 'react-router-dom';
|
|
6
|
-
import { Divider } from '@strapi/design-system
|
|
6
|
+
import { Divider, FocusTrap, Box, Typography, Stack } from '@strapi/design-system';
|
|
7
7
|
import {
|
|
8
8
|
MainNav,
|
|
9
9
|
NavBrand,
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
NavUser,
|
|
14
14
|
NavCondense,
|
|
15
15
|
NavFooter,
|
|
16
|
-
} from '@strapi/design-system/v2
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
} from '@strapi/design-system/v2';
|
|
17
|
+
import { Write, Exit } from '@strapi/icons';
|
|
18
|
+
import {
|
|
19
|
+
auth,
|
|
20
|
+
usePersistentState,
|
|
21
|
+
useAppInfos,
|
|
22
|
+
useTracking,
|
|
23
|
+
getFetchClient,
|
|
24
|
+
} from '@strapi/helper-plugin';
|
|
24
25
|
import { useConfigurations } from '../../hooks';
|
|
25
|
-
import { axiosInstance } from '../../core/utils';
|
|
26
26
|
|
|
27
27
|
const LinkUserWrapper = styled(Box)`
|
|
28
28
|
width: ${150 / 16}rem;
|
|
@@ -64,6 +64,7 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
|
|
|
64
64
|
const { trackUsage } = useTracking();
|
|
65
65
|
const { pathname } = useLocation();
|
|
66
66
|
const history = useHistory();
|
|
67
|
+
const { post } = getFetchClient();
|
|
67
68
|
|
|
68
69
|
const initials = userDisplayName
|
|
69
70
|
.split(' ')
|
|
@@ -74,7 +75,7 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
|
|
|
74
75
|
const handleToggleUserLinks = () => setUserLinksVisible((prev) => !prev);
|
|
75
76
|
|
|
76
77
|
const handleLogout = async () => {
|
|
77
|
-
await
|
|
78
|
+
await post('/admin/logout');
|
|
78
79
|
auth.clearAppStorage();
|
|
79
80
|
handleToggleUserLinks();
|
|
80
81
|
history.push('/auth/login');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useCallback } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { Alert } from '@strapi/design-system
|
|
5
|
-
import { Link } from '@strapi/design-system/v2
|
|
4
|
+
import { Alert } from '@strapi/design-system';
|
|
5
|
+
import { Link } from '@strapi/design-system/v2';
|
|
6
6
|
|
|
7
7
|
const Notification = ({ dispatch, notification }) => {
|
|
8
8
|
const { formatMessage } = useIntl();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NotificationsProvider } from '@strapi/helper-plugin';
|
|
2
2
|
import React, { useReducer } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { Stack } from '@strapi/design-system
|
|
4
|
+
import { Stack } from '@strapi/design-system';
|
|
5
5
|
import Notification from './Notification';
|
|
6
6
|
import reducer, { initialState } from './reducer';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ThemeProvider } from '@strapi/design-system
|
|
2
|
+
import { ThemeProvider } from '@strapi/design-system';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useThemeToggle } from '../../hooks';
|
|
5
5
|
import GlobalStyle from '../GlobalStyle';
|
|
@@ -2,16 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
|
-
import { Portal } from '@strapi/design-system
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { LinkButton } from '@strapi/design-system/v2/LinkButton';
|
|
9
|
-
import { Box } from '@strapi/design-system/Box';
|
|
10
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
11
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
12
|
-
import { Stack } from '@strapi/design-system/Stack';
|
|
13
|
-
import ExternalLink from '@strapi/icons/ExternalLink';
|
|
14
|
-
import Cross from '@strapi/icons/Cross';
|
|
5
|
+
import { Portal, FocusTrap, IconButton, Box, Flex, Typography, Stack } from '@strapi/design-system';
|
|
6
|
+
import { LinkButton } from '@strapi/design-system/v2';
|
|
7
|
+
import { ExternalLink, Cross } from '@strapi/icons';
|
|
15
8
|
import { setHexOpacity, useLockScroll } from '@strapi/helper-plugin';
|
|
16
9
|
import AirBalloon from '../../assets/images/hot-air-balloon.png';
|
|
17
10
|
import BigArrow from '../../assets/images/upgrade-details.png';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { Box } from '@strapi/design-system
|
|
5
|
-
import {
|
|
6
|
-
import Filter from '@strapi/icons/Filter';
|
|
4
|
+
import { Box, Button } from '@strapi/design-system';
|
|
5
|
+
import { Filter } from '@strapi/icons';
|
|
7
6
|
import { FilterListURLQuery, FilterPopoverURLQuery, useTracking } from '@strapi/helper-plugin';
|
|
8
7
|
|
|
9
8
|
const Filters = ({ displayedFilters }) => {
|
|
@@ -10,11 +10,12 @@ import {
|
|
|
10
10
|
formatContentTypeData,
|
|
11
11
|
contentManagementUtilRemoveFieldsFromData,
|
|
12
12
|
useGuidedTour,
|
|
13
|
+
useAPIErrorHandler,
|
|
14
|
+
useFetchClient,
|
|
13
15
|
} from '@strapi/helper-plugin';
|
|
14
16
|
import { useSelector, useDispatch } from 'react-redux';
|
|
15
17
|
import PropTypes from 'prop-types';
|
|
16
18
|
import isEqual from 'react-fast-compare';
|
|
17
|
-
import { axiosInstance } from '../../../core/utils';
|
|
18
19
|
import {
|
|
19
20
|
createDefaultForm,
|
|
20
21
|
getTrad,
|
|
@@ -45,12 +46,16 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
45
46
|
const { componentsDataStructure, contentTypeDataStructure, data, isLoading, status } =
|
|
46
47
|
useSelector(selectCrudReducer);
|
|
47
48
|
const redirectionLink = useFindRedirectionLink(slug);
|
|
49
|
+
const { formatAPIError } = useAPIErrorHandler(getTrad);
|
|
48
50
|
|
|
49
51
|
const isMounted = useRef(true);
|
|
50
52
|
const trackUsageRef = useRef(trackUsage);
|
|
51
53
|
|
|
52
54
|
const allLayoutDataRef = useRef(allLayoutData);
|
|
53
55
|
|
|
56
|
+
const fetchClient = useFetchClient();
|
|
57
|
+
const { put, post, del } = fetchClient;
|
|
58
|
+
|
|
54
59
|
const isCreatingEntry = id === null;
|
|
55
60
|
|
|
56
61
|
const requestURL = useMemo(() => {
|
|
@@ -137,7 +142,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
137
142
|
dispatch(getData());
|
|
138
143
|
|
|
139
144
|
try {
|
|
140
|
-
const { data } = await
|
|
145
|
+
const { data } = await fetchClient.get(requestURL, { cancelToken: source.token });
|
|
141
146
|
|
|
142
147
|
dispatch(getDataSucceeded(cleanReceivedData(cleanClonedData(data))));
|
|
143
148
|
} catch (err) {
|
|
@@ -145,8 +150,6 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
145
150
|
return;
|
|
146
151
|
}
|
|
147
152
|
|
|
148
|
-
console.error(err);
|
|
149
|
-
|
|
150
153
|
const resStatus = get(err, 'response.status', null);
|
|
151
154
|
|
|
152
155
|
if (resStatus === 404) {
|
|
@@ -187,6 +190,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
187
190
|
source.cancel('Operation canceled by the user.');
|
|
188
191
|
};
|
|
189
192
|
}, [
|
|
193
|
+
fetchClient,
|
|
190
194
|
cleanClonedData,
|
|
191
195
|
cleanReceivedData,
|
|
192
196
|
push,
|
|
@@ -199,29 +203,19 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
199
203
|
|
|
200
204
|
const displayErrors = useCallback(
|
|
201
205
|
(err) => {
|
|
202
|
-
|
|
203
|
-
let errorMessage = get(errorPayload, ['error', 'message'], 'Bad Request');
|
|
204
|
-
|
|
205
|
-
// TODO handle errors correctly when back-end ready
|
|
206
|
-
if (Array.isArray(errorMessage)) {
|
|
207
|
-
errorMessage = get(errorMessage, ['0', 'messages', '0', 'id']);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (typeof errorMessage === 'string') {
|
|
211
|
-
toggleNotification({ type: 'warning', message: errorMessage });
|
|
212
|
-
}
|
|
206
|
+
toggleNotification({ type: 'warning', message: formatAPIError(err) });
|
|
213
207
|
},
|
|
214
|
-
[toggleNotification]
|
|
208
|
+
[toggleNotification, formatAPIError]
|
|
215
209
|
);
|
|
216
210
|
|
|
217
211
|
const onDelete = useCallback(
|
|
218
212
|
async (trackerProperty) => {
|
|
213
|
+
console.log('onDelete');
|
|
214
|
+
|
|
219
215
|
try {
|
|
220
216
|
trackUsageRef.current('willDeleteEntry', trackerProperty);
|
|
221
217
|
|
|
222
|
-
const { data } = await
|
|
223
|
-
getRequestUrl(`collection-types/${slug}/${id}`)
|
|
224
|
-
);
|
|
218
|
+
const { data } = await del(getRequestUrl(`collection-types/${slug}/${id}`));
|
|
225
219
|
|
|
226
220
|
toggleNotification({
|
|
227
221
|
type: 'success',
|
|
@@ -237,7 +231,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
237
231
|
return Promise.reject(err);
|
|
238
232
|
}
|
|
239
233
|
},
|
|
240
|
-
[id, slug, toggleNotification]
|
|
234
|
+
[id, slug, toggleNotification, del]
|
|
241
235
|
);
|
|
242
236
|
|
|
243
237
|
const onDeleteSucceeded = useCallback(() => {
|
|
@@ -247,12 +241,11 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
247
241
|
const onPost = useCallback(
|
|
248
242
|
async (body, trackerProperty) => {
|
|
249
243
|
const endPoint = `${getRequestUrl(`collection-types/${slug}`)}${rawQuery}`;
|
|
250
|
-
|
|
251
244
|
try {
|
|
252
245
|
// Show a loading button in the EditView/Header.js && lock the app => no navigation
|
|
253
246
|
dispatch(setStatus('submit-pending'));
|
|
254
247
|
|
|
255
|
-
const { data } = await
|
|
248
|
+
const { data } = await post(endPoint, body);
|
|
256
249
|
|
|
257
250
|
trackUsageRef.current('didCreateEntry', trackerProperty);
|
|
258
251
|
toggleNotification({
|
|
@@ -291,6 +284,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
291
284
|
toggleNotification,
|
|
292
285
|
setCurrentStep,
|
|
293
286
|
queryClient,
|
|
287
|
+
post,
|
|
294
288
|
]
|
|
295
289
|
);
|
|
296
290
|
|
|
@@ -303,7 +297,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
303
297
|
);
|
|
304
298
|
dispatch(setStatus('draft-relation-check-pending'));
|
|
305
299
|
|
|
306
|
-
const numberOfDraftRelations = await
|
|
300
|
+
const numberOfDraftRelations = await fetchClient.get(endPoint);
|
|
307
301
|
trackUsageRef.current('didCheckDraftRelations');
|
|
308
302
|
|
|
309
303
|
dispatch(setStatus('resolved'));
|
|
@@ -315,7 +309,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
315
309
|
|
|
316
310
|
return Promise.reject(err);
|
|
317
311
|
}
|
|
318
|
-
}, [displayErrors, id, slug, dispatch]);
|
|
312
|
+
}, [displayErrors, id, slug, dispatch, fetchClient]);
|
|
319
313
|
|
|
320
314
|
const onPublish = useCallback(async () => {
|
|
321
315
|
try {
|
|
@@ -324,7 +318,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
324
318
|
|
|
325
319
|
dispatch(setStatus('publish-pending'));
|
|
326
320
|
|
|
327
|
-
const { data } = await
|
|
321
|
+
const { data } = await post(endPoint);
|
|
328
322
|
|
|
329
323
|
trackUsageRef.current('didPublishEntry');
|
|
330
324
|
|
|
@@ -343,7 +337,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
343
337
|
|
|
344
338
|
return Promise.reject(err);
|
|
345
339
|
}
|
|
346
|
-
}, [cleanReceivedData, displayErrors, id, slug, dispatch, toggleNotification]);
|
|
340
|
+
}, [cleanReceivedData, displayErrors, id, slug, dispatch, toggleNotification, post]);
|
|
347
341
|
|
|
348
342
|
const onPut = useCallback(
|
|
349
343
|
async (body, trackerProperty) => {
|
|
@@ -354,7 +348,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
354
348
|
|
|
355
349
|
dispatch(setStatus('submit-pending'));
|
|
356
350
|
|
|
357
|
-
const { data } = await
|
|
351
|
+
const { data } = await put(endPoint, body);
|
|
358
352
|
|
|
359
353
|
trackUsageRef.current('didEditEntry', { trackerProperty });
|
|
360
354
|
toggleNotification({
|
|
@@ -379,7 +373,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
379
373
|
return Promise.reject(err);
|
|
380
374
|
}
|
|
381
375
|
},
|
|
382
|
-
[cleanReceivedData, displayErrors, slug, id, dispatch, toggleNotification, queryClient]
|
|
376
|
+
[cleanReceivedData, displayErrors, slug, id, dispatch, toggleNotification, queryClient, put]
|
|
383
377
|
);
|
|
384
378
|
|
|
385
379
|
const onUnpublish = useCallback(async () => {
|
|
@@ -390,7 +384,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
390
384
|
try {
|
|
391
385
|
trackUsageRef.current('willUnpublishEntry');
|
|
392
386
|
|
|
393
|
-
const { data } = await
|
|
387
|
+
const { data } = await post(endPoint);
|
|
394
388
|
|
|
395
389
|
trackUsageRef.current('didUnpublishEntry');
|
|
396
390
|
toggleNotification({
|
|
@@ -408,7 +402,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
408
402
|
|
|
409
403
|
return Promise.reject(err);
|
|
410
404
|
}
|
|
411
|
-
}, [cleanReceivedData, displayErrors, id, slug, dispatch, toggleNotification]);
|
|
405
|
+
}, [cleanReceivedData, displayErrors, id, slug, dispatch, toggleNotification, post]);
|
|
412
406
|
|
|
413
407
|
return children({
|
|
414
408
|
componentsDataStructure,
|
|
@@ -2,11 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
|
-
import PlusCircle from '@strapi/icons
|
|
6
|
-
import { Box } from '@strapi/design-system
|
|
7
|
-
import { Stack } from '@strapi/design-system/Stack';
|
|
8
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
9
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
5
|
+
import { PlusCircle } from '@strapi/icons';
|
|
6
|
+
import { Box, Stack, Flex, Typography } from '@strapi/design-system';
|
|
10
7
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
11
8
|
import { getTrad } from '../../utils';
|
|
12
9
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { Flex } from '@strapi/design-system
|
|
5
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
4
|
+
import { Flex, Typography } from '@strapi/design-system';
|
|
6
5
|
|
|
7
6
|
const Wrapper = styled(Flex)`
|
|
8
7
|
position: relative;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import { Tooltip } from '@strapi/design-system
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Avatar, Tooltip } from '@strapi/design-system';
|
|
5
4
|
import { getFileExtension, prefixFileUrlWithBackendUrl } from '@strapi/helper-plugin';
|
|
5
|
+
|
|
6
6
|
import FileWrapper from './FileWrapper';
|
|
7
7
|
|
|
8
8
|
const Media = ({ url, mime, alternativeText, name, ext, formats }) => {
|
package/admin/src/content-manager/components/DynamicTable/CellContent/RelationMultiple/index.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
Badge,
|
|
3
|
+
Box,
|
|
4
|
+
Flex,
|
|
5
|
+
Loader,
|
|
6
|
+
MenuItem,
|
|
7
|
+
SimpleMenu,
|
|
8
|
+
Typography,
|
|
9
|
+
useNotifyAT,
|
|
10
|
+
} from '@strapi/design-system';
|
|
11
|
+
import { stopPropagation, useFetchClient } from '@strapi/helper-plugin';
|
|
2
12
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
13
|
+
import React, { useMemo, useState } from 'react';
|
|
4
14
|
import { useIntl } from 'react-intl';
|
|
5
|
-
import {
|
|
6
|
-
import { Box } from '@strapi/design-system/Box';
|
|
7
|
-
import { Badge } from '@strapi/design-system/Badge';
|
|
8
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
9
|
-
import { SimpleMenu, MenuItem } from '@strapi/design-system/SimpleMenu';
|
|
10
|
-
import { Loader } from '@strapi/design-system/Loader';
|
|
15
|
+
import { useQuery } from 'react-query';
|
|
11
16
|
import styled from 'styled-components';
|
|
12
|
-
import { useNotifyAT } from '@strapi/design-system/LiveRegions';
|
|
13
|
-
import { stopPropagation } from '@strapi/helper-plugin';
|
|
14
|
-
import CellValue from '../CellValue';
|
|
15
|
-
import { axiosInstance } from '../../../../../core/utils';
|
|
16
17
|
import { getRequestUrl, getTrad } from '../../../../utils';
|
|
18
|
+
import CellValue from '../CellValue';
|
|
17
19
|
|
|
18
20
|
const TypographyMaxWidth = styled(Typography)`
|
|
19
21
|
max-width: 500px;
|
|
20
22
|
`;
|
|
21
23
|
|
|
22
|
-
const fetchRelation = async (endPoint, notifyStatus) => {
|
|
24
|
+
const fetchRelation = async (endPoint, notifyStatus, get) => {
|
|
23
25
|
const {
|
|
24
26
|
data: { results, pagination },
|
|
25
|
-
} = await
|
|
27
|
+
} = await get(endPoint);
|
|
26
28
|
|
|
27
29
|
notifyStatus();
|
|
28
30
|
|
|
@@ -37,6 +39,7 @@ const RelationMultiple = ({ fieldSchema, metadatas, name, entityId, value, conte
|
|
|
37
39
|
[entityId, name, contentType]
|
|
38
40
|
);
|
|
39
41
|
const [isOpen, setIsOpen] = useState(false);
|
|
42
|
+
const { get } = useFetchClient();
|
|
40
43
|
|
|
41
44
|
const Label = (
|
|
42
45
|
<Flex gap={1} wrap="nowrap">
|
|
@@ -61,13 +64,13 @@ const RelationMultiple = ({ fieldSchema, metadatas, name, entityId, value, conte
|
|
|
61
64
|
|
|
62
65
|
const { data, status } = useQuery(
|
|
63
66
|
[fieldSchema.targetModel, entityId],
|
|
64
|
-
() => fetchRelation(relationFetchEndpoint, notify),
|
|
67
|
+
() => fetchRelation(relationFetchEndpoint, notify, get),
|
|
65
68
|
{
|
|
66
69
|
enabled: isOpen,
|
|
67
70
|
staleTime: 0,
|
|
68
71
|
select: (data) => ({
|
|
69
72
|
...data,
|
|
70
|
-
results: data.results.reverse(),
|
|
73
|
+
results: [...data.results].reverse(),
|
|
71
74
|
}),
|
|
72
75
|
}
|
|
73
76
|
);
|
package/admin/src/content-manager/components/DynamicTable/CellContent/RepeatableComponent/index.js
CHANGED
|
@@ -2,10 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
|
-
import { Badge } from '@strapi/design-system
|
|
6
|
-
import { Box } from '@strapi/design-system/Box';
|
|
7
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
8
|
-
import { SimpleMenu, MenuItem } from '@strapi/design-system/SimpleMenu';
|
|
5
|
+
import { Badge, Box, Typography, SimpleMenu, MenuItem } from '@strapi/design-system';
|
|
9
6
|
import { stopPropagation } from '@strapi/helper-plugin';
|
|
10
7
|
|
|
11
8
|
import CellValue from '../CellValue';
|