@strapi/admin 4.15.0-alpha.0 → 4.15.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/.eslintrc.js +4 -1
- package/admin/.eslintrc.js +28 -0
- package/admin/custom.d.ts +28 -0
- package/admin/src/StrapiApp.js +27 -28
- package/admin/src/components/AuthenticatedApp.tsx +187 -0
- package/admin/src/components/ConfigurationProvider.tsx +68 -0
- package/admin/src/components/{DragLayer/DragLayer.js → DragLayer.tsx} +18 -10
- package/admin/src/components/GuidedTour/Homepage.tsx +111 -0
- package/admin/src/components/GuidedTour/Modal.tsx +303 -0
- package/admin/src/components/GuidedTour/Ornaments.tsx +74 -0
- package/admin/src/components/GuidedTour/Provider.tsx +253 -0
- package/admin/src/components/GuidedTour/{layout.js → constants.ts} +13 -3
- package/admin/src/components/LanguageProvider.tsx +130 -0
- package/admin/src/components/{LeftMenu/index.js → LeftMenu.tsx} +23 -18
- package/admin/src/components/{NpsSurvey/index.js → NpsSurvey.tsx} +68 -21
- package/admin/src/components/PluginsInitializer.tsx +124 -0
- package/admin/src/components/PrivateRoute.tsx +42 -0
- package/admin/src/components/Providers.tsx +125 -0
- package/admin/src/components/RBACProvider.tsx +124 -0
- package/admin/src/components/Theme.tsx +41 -0
- package/admin/src/components/ThemeToggleProvider.tsx +64 -0
- package/admin/src/components/{UnauthenticatedLogo/index.js → UnauthenticatedLogo.tsx} +3 -5
- package/admin/src/components/{LocalesProvider/__mocks__/useLocalesProvider.js → __mocks__/LanguageProvider.ts} +3 -1
- package/admin/src/{constants.js → constants.ts} +48 -0
- package/admin/src/content-manager/components/BlocksEditor/BlocksInput/index.js +68 -9
- package/admin/src/content-manager/components/BlocksEditor/Toolbar/index.js +433 -202
- package/admin/src/content-manager/components/BlocksEditor/hooks/useBlocksStore.js +463 -135
- package/admin/src/content-manager/components/BlocksEditor/hooks/useModifiersStore.js +23 -6
- package/admin/src/content-manager/components/BlocksEditor/index.js +97 -20
- package/admin/src/content-manager/components/BlocksEditor/plugins/index.js +4 -0
- package/admin/src/content-manager/components/BlocksEditor/plugins/withLinks.js +61 -0
- package/admin/src/content-manager/components/BlocksEditor/plugins/withStrapiSchema.js +33 -0
- package/admin/src/content-manager/components/BlocksEditor/utils/links.js +90 -0
- package/admin/src/content-manager/components/InputUID/index.js +1 -1
- package/admin/src/content-manager/hooks/useAllowedAttributes.js +9 -1
- package/admin/src/content-manager/pages/App/selectors.js +1 -1
- package/admin/src/content-manager/pages/App/useContentManagerInitData.js +3 -1
- package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -0
- package/admin/src/content-manager/pages/EditSettingsView/utils/createPossibleMainFieldsForModelsAndComponents.js +1 -0
- package/admin/src/content-manager/pages/EditView/selectors.js +1 -1
- package/admin/src/content-manager/pages/EditViewLayoutManager/index.js +3 -1
- package/admin/src/content-manager/pages/ListSettingsView/constants.js +1 -0
- package/admin/src/content-manager/pages/ListView/components/Body/index.js +53 -56
- package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/SelectedEntriesModal/index.js +5 -3
- package/admin/src/content-manager/pages/ListView/components/TableRows/index.js +1 -1
- package/admin/src/content-manager/pages/ListView/index.js +35 -51
- package/admin/src/content-manager/pages/ListView/selectors.js +1 -1
- package/admin/src/content-manager/utils/checkIfAttributeIsDisplayable.js +1 -1
- package/admin/src/content-manager/utils/schema.js +2 -2
- package/admin/src/contexts/admin.ts +19 -0
- package/admin/src/contexts/apiTokenPermissions.tsx +64 -0
- package/admin/src/contexts/configuration.ts +25 -0
- package/admin/src/contexts/themeToggle.ts +18 -0
- package/admin/src/core/store/configure.ts +91 -0
- package/admin/src/core/store/hooks.ts +15 -0
- package/admin/src/hooks/{useConfigurations/__mocks__/index.js → __mocks__/useConfigurations.ts} +4 -2
- package/admin/src/hooks/index.js +0 -8
- package/admin/src/hooks/{useAdminRoles/index.js → useAdminRoles.ts} +26 -10
- package/admin/src/hooks/useAdminUsers.ts +64 -0
- package/admin/src/hooks/useConfiguration.ts +5 -0
- package/admin/src/hooks/{useContentTypes/useContentTypes.js → useContentTypes.ts} +39 -16
- package/admin/src/hooks/useDebounce.ts +17 -0
- package/admin/src/hooks/{useEnterprise/useEnterprise.js → useEnterprise.ts} +15 -5
- package/admin/src/hooks/useLicenseLimitNotification.ts +3 -0
- package/admin/src/hooks/useMenu.ts +153 -0
- package/admin/src/hooks/useSettingsForm/index.js +14 -2
- package/admin/src/hooks/useSettingsMenu/constants.js +39 -0
- package/admin/src/hooks/useThemeToggle.ts +9 -0
- package/admin/src/index.js +7 -6
- package/admin/src/layouts/{AppLayout/index.js → AppLayout.tsx} +7 -10
- package/admin/src/layouts/UnauthenticatedLayout.tsx +77 -0
- package/admin/src/pages/Admin/index.js +15 -8
- package/admin/src/pages/App/index.js +13 -8
- package/admin/src/pages/App/selectors.js +1 -1
- package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +3 -2
- package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +3 -2
- package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +1 -1
- package/admin/src/pages/AuthPage/components/Login/index.js +1 -1
- package/admin/src/pages/AuthPage/components/Oops/index.js +3 -2
- package/admin/src/pages/AuthPage/components/Register/index.js +30 -35
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +3 -2
- package/admin/src/pages/AuthPage/index.js +4 -5
- package/admin/src/pages/HomePage/index.js +6 -3
- package/admin/src/pages/{InternalErrorPage/index.js → InternalErrorPage.tsx} +10 -6
- package/admin/src/pages/MarketplacePage/components/NpmPackageCard/index.js +0 -2
- package/admin/src/pages/MarketplacePage/hooks/__mocks__/useNavigatorOnline.ts +1 -0
- package/admin/src/{hooks/useNavigatorOnLine/index.js → pages/MarketplacePage/hooks/useNavigatorOnline.ts} +4 -6
- package/admin/src/pages/MarketplacePage/index.js +3 -3
- package/admin/src/pages/{NotFoundPage/index.js → NotFoundPage.tsx} +9 -7
- package/admin/src/pages/ProfilePage/components/Preferences/index.js +23 -9
- package/admin/src/pages/ProfilePage/index.js +4 -4
- package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +20 -0
- package/admin/src/pages/SettingsPage/components/Tokens/Regenerate/index.js +1 -1
- package/admin/src/pages/SettingsPage/components/Tokens/Table/index.js +119 -87
- package/admin/src/pages/SettingsPage/constants.js +33 -0
- package/admin/src/{hooks/useRegenerate/index.js → pages/SettingsPage/hooks/useRegenerate.ts} +13 -7
- package/admin/src/pages/SettingsPage/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/ActionBoundRoutes/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/CollapsableContentType/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Permissions/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/Regenerate/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/CustomizationInfos/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/AuditLogs/SalesPage.js +50 -0
- package/admin/src/pages/SettingsPage/pages/ReviewWorkflows/SalesPage.js +53 -0
- package/admin/src/pages/SettingsPage/pages/Roles/CreatePage/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/ContentTypeCollapse/Collapse/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PermissionsDataManagerProvider/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/SubCategory/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/hooks/usePermissionsDataManager.ts +28 -0
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +1 -1
- package/admin/src/{hooks/useAdminRolePermissions/index.js → pages/SettingsPage/pages/Roles/hooks/useAdminRolePermissions.ts} +13 -6
- package/admin/src/pages/SettingsPage/pages/SingleSignOn/SalesPage.js +53 -0
- package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/TransferTokens/ListView/index.js +3 -5
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +2 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/DynamicTable/TableRows/index.js +1 -1
- package/admin/src/pages/{UseCasePage/index.js → UseCasePage.tsx} +10 -12
- package/admin/src/shared/hooks/index.js +0 -1
- package/admin/src/shared/hooks/useInjectionZone/index.js +2 -2
- package/admin/src/translations/en.json +13 -0
- package/admin/src/types/adminAPI.ts +29 -0
- package/admin/src/utils/createRoute.tsx +54 -0
- package/admin/src/utils/formatAPIErrors.ts +18 -0
- package/admin/src/utils/getFullName.ts +3 -0
- package/admin/src/utils/{uniqueAdminHash.js → hashAdminUserEmail.ts} +6 -3
- package/admin/src/utils/makeUniqueRoutes.ts +11 -0
- package/admin/tsconfig.build.json +4 -0
- package/admin/tsconfig.json +11 -0
- package/build/0cd5f8915b265d5b1856.png +0 -0
- package/build/1049.ecc10c97.chunk.js +1 -0
- package/build/1217.96155682.chunk.js +35 -0
- package/build/1227.947ceaf9.chunk.js +1 -0
- package/build/1306.2699df52.chunk.js +79 -0
- package/build/135.ad267b59.chunk.js +1 -0
- package/build/1386.eabd8a1e.chunk.js +7 -0
- package/build/1727.b49f0713.chunk.js +1 -0
- package/build/1835.eaa696ba.chunk.js +1 -0
- package/build/19eb2dfcf2603eb55733.png +0 -0
- package/build/2325.d705b39a.chunk.js +1 -0
- package/build/2379.7ce8e110.chunk.js +1 -0
- package/build/2395.acb961a8.chunk.js +26 -0
- package/build/2421.79e5b3d0.chunk.js +1 -0
- package/build/267.073a3bcb.chunk.js +1 -0
- package/build/27d16aefee06412db90a.png +0 -0
- package/build/2801.4711ea5a.chunk.js +1 -0
- package/build/2878.145ebf7c.chunk.js +1 -0
- package/build/2950.216f2e89.chunk.js +1 -0
- package/build/2953.284a63c0.chunk.js +1 -0
- package/build/3019.fde2e1be.chunk.js +181 -0
- package/build/3100.2ba4df95.chunk.js +1 -0
- package/build/311.cb0884bb.chunk.js +1 -0
- package/build/3460.8644e608.chunk.js +146 -0
- package/build/3483.db8c1520.chunk.js +1 -0
- package/build/3911.488fbde3.chunk.js +95 -0
- package/build/4174.49cedb6a.chunk.js +1 -0
- package/build/4429.7f044dc7.chunk.js +1 -0
- package/build/4555.c883d697.chunk.js +1 -0
- package/build/4663.b906cc10.chunk.js +1 -0
- package/build/4732.149f5f8f.chunk.js +1 -0
- package/build/4916.480053a6.chunk.js +1 -0
- package/build/4996.d285c30b.chunk.js +1 -0
- package/build/502.f536f78b.chunk.js +1 -0
- package/build/570.2f3b4c56.chunk.js +1 -0
- package/build/5858.493b31ec.chunk.js +1 -0
- package/build/6158.c3c13c20.chunk.js +1 -0
- package/build/6345.334e7678.chunk.js +1 -0
- package/build/6453.4160b5b7.chunk.js +1 -0
- package/build/7030.b98dcedf.chunk.js +1 -0
- package/build/70674f63fc3904c20de0.svg +7 -0
- package/build/7448.6fd14dd3.chunk.js +1 -0
- package/build/7464.579564ac.chunk.js +1 -0
- package/build/7735.9e7c9fdd.chunk.js +10 -0
- package/build/78.dcc6df5c.chunk.js +1 -0
- package/build/7811.fdbe09af.chunk.js +103 -0
- package/build/782.7243b183.chunk.js +1 -0
- package/build/7849.2a500ed8.chunk.js +1 -0
- package/build/7897.63ba0a00.chunk.js +6 -0
- package/build/7e9af4fb7e723fcebf1f.svg +48 -0
- package/build/8162.7d1100a0.chunk.js +1 -0
- package/build/8276.9abe4679.chunk.js +26 -0
- package/build/8773.ee67141c.chunk.js +48 -0
- package/build/8980.f0045cc1.chunk.js +1 -0
- package/build/9077.2cc01ac8.chunk.js +105 -0
- package/build/9153.42c1428a.chunk.js +1 -0
- package/build/918.54414509.chunk.js +1 -0
- package/build/9218.b2d367f8.chunk.js +1 -0
- package/build/9285.5f174057.chunk.js +1 -0
- package/build/9547.62987774.chunk.js +1 -0
- package/build/9754.b4e73779.chunk.js +1 -0
- package/build/9d5d788027e86620c234.svg +5 -0
- package/build/Admin-authenticatedApp.059dc48f.chunk.js +79 -0
- package/build/Admin_InternalErrorPage.06eeef20.chunk.js +1 -0
- package/build/Admin_homePage.56b9eb3f.chunk.js +81 -0
- package/build/Admin_marketplace.d693a435.chunk.js +44 -0
- package/build/Admin_pluginsPage.ae2c872a.chunk.js +6 -0
- package/build/Admin_profilePage.89099d5b.chunk.js +13 -0
- package/build/Admin_settingsPage.88c45586.chunk.js +12 -0
- package/build/Upload_ConfigureTheView.44f28145.chunk.js +1 -0
- package/build/admin-app.990e112f.chunk.js +69 -0
- package/build/admin-edit-roles-page.4e1eb4a9.chunk.js +267 -0
- package/build/admin-edit-users.5b91404e.chunk.js +10 -0
- package/build/admin-roles-list.89dd94fe.chunk.js +22 -0
- package/build/admin-users.7be4fc5f.chunk.js +11 -0
- package/build/api-tokens-create-page.571920e5.chunk.js +1 -0
- package/build/api-tokens-edit-page.cbdc81b1.chunk.js +1 -0
- package/build/api-tokens-list-page.de0c49e8.chunk.js +16 -0
- package/build/ar-json.74e40bc7.chunk.js +1 -0
- package/build/audit-logs-sales-page.2955db88.chunk.js +1 -0
- package/build/audit-logs-settings-page.b0cb5164.chunk.js +1 -0
- package/build/bb3108f7fd1e6179bde1.svg +1 -0
- package/build/bb4d0d527bdfb161bc5a.svg +1 -0
- package/build/ca-json.fc6001d3.chunk.js +1 -0
- package/build/content-manager.de7ae330.chunk.js +1241 -0
- package/build/content-type-builder-list-view.6c8d3213.chunk.js +211 -0
- package/build/content-type-builder-translation-ar-json.3e808e2f.chunk.js +1 -0
- package/build/content-type-builder-translation-cs-json.1ef9e106.chunk.js +1 -0
- package/build/content-type-builder-translation-de-json.63fcff7b.chunk.js +1 -0
- package/build/content-type-builder-translation-dk-json.fd626b67.chunk.js +1 -0
- package/build/content-type-builder-translation-en-json.74d80f18.chunk.js +1 -0
- package/build/content-type-builder-translation-es-json.a4a361a9.chunk.js +1 -0
- package/build/content-type-builder-translation-fr-json.499c3a46.chunk.js +1 -0
- package/build/content-type-builder-translation-id-json.65255f93.chunk.js +1 -0
- package/build/content-type-builder-translation-it-json.e268ab74.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.04cb309d.chunk.js +1 -0
- package/build/content-type-builder-translation-ms-json.f6b743b9.chunk.js +1 -0
- package/build/content-type-builder-translation-nl-json.997fe8cc.chunk.js +1 -0
- package/build/content-type-builder-translation-pl-json.634f638b.chunk.js +1 -0
- package/build/content-type-builder-translation-pt-BR-json.6a95dc71.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.3af65503.chunk.js +1 -0
- package/build/content-type-builder-translation-sk-json.c6078082.chunk.js +1 -0
- package/build/content-type-builder-translation-sv-json.a6df2462.chunk.js +1 -0
- package/build/content-type-builder-translation-th-json.122277cc.chunk.js +1 -0
- package/build/content-type-builder-translation-tr-json.41f44f77.chunk.js +1 -0
- package/build/content-type-builder-translation-uk-json.e1315acd.chunk.js +1 -0
- package/build/content-type-builder-translation-zh-Hans-json.6ff57db6.chunk.js +1 -0
- package/build/content-type-builder-translation-zh-json.3532b962.chunk.js +1 -0
- package/build/content-type-builder.0bc97051.chunk.js +136 -0
- package/build/cs-json.4b44411c.chunk.js +1 -0
- package/build/de-json.e72545cf.chunk.js +1 -0
- package/build/dk-json.e77140ef.chunk.js +1 -0
- package/build/email-settings-page.07712efc.chunk.js +11 -0
- package/build/en-json.5b907f67.chunk.js +1 -0
- package/build/es-json.b1f2284b.chunk.js +1 -0
- package/build/eu-json.63d0a898.chunk.js +1 -0
- package/build/fr-json.33c6428b.chunk.js +1 -0
- package/build/gu-json.7efe8cc2.chunk.js +1 -0
- package/build/he-json.3cf0b48a.chunk.js +1 -0
- package/build/hi-json.0d633692.chunk.js +1 -0
- package/build/highlight.js.28a1547e.chunk.js +85 -0
- package/build/hu-json.c74b6a1e.chunk.js +1 -0
- package/build/i18n-settings-page.5c34f012.chunk.js +9 -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.1ec7becf.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-ru-json.a3dbc125.chunk.js +1 -0
- package/build/i18n-translation-tr-json.3bfc812f.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.41e07c46.chunk.js +1 -0
- package/build/index.html +1 -0
- package/build/it-json.bfe27ed8.chunk.js +1 -0
- package/build/ja-json.e1959a1c.chunk.js +1 -0
- package/build/ko-json.ce5d6d94.chunk.js +1 -0
- package/build/main.f84563f1.js +2665 -0
- package/build/ml-json.940d7ace.chunk.js +1 -0
- package/build/ms-json.0eddffd9.chunk.js +1 -0
- package/build/nl-json.fe38f0fb.chunk.js +1 -0
- package/build/no-json.19a2dbfa.chunk.js +1 -0
- package/build/pl-json.d55e8e78.chunk.js +1 -0
- package/build/pt-BR-json.ae0a0d2e.chunk.js +1 -0
- package/build/pt-json.ee554a41.chunk.js +1 -0
- package/build/review-workflows-sales-page.f46a8f00.chunk.js +1 -0
- package/build/review-workflows-settings-create-view.d0544fb0.chunk.js +1 -0
- package/build/review-workflows-settings-edit-view.aabf49ef.chunk.js +1 -0
- package/build/review-workflows-settings-list-view.8b0525ab.chunk.js +56 -0
- package/build/ru-json.1c976644.chunk.js +1 -0
- package/build/runtime~main.270fd45f.js +2 -0
- package/build/sa-json.2c03ef4e.chunk.js +1 -0
- package/build/sk-json.b41847e8.chunk.js +1 -0
- package/build/sso-sales-page.ef22e469.chunk.js +1 -0
- package/build/sso-settings-page.21e16ae4.chunk.js +1 -0
- package/build/sv-json.568cb7ae.chunk.js +1 -0
- package/build/th-json.5f659396.chunk.js +1 -0
- package/build/tr-json.c9f22432.chunk.js +1 -0
- package/build/transfer-tokens-create-page.3366204d.chunk.js +1 -0
- package/build/transfer-tokens-edit-page.15cf0f73.chunk.js +1 -0
- package/build/transfer-tokens-list-page.0bc0e682.chunk.js +16 -0
- package/build/uk-json.b7e38370.chunk.js +1 -0
- package/build/upload-settings.1319dca0.chunk.js +14 -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.baab9911.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.98d35574.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.db163b6b.chunk.js +1 -0
- package/build/upload-translation-zh-json.e1dd6eb2.chunk.js +1 -0
- package/build/upload.1ced11be.chunk.js +58 -0
- package/build/users-advanced-settings-page.8e657084.chunk.js +9 -0
- package/build/users-email-settings-page.e57745e5.chunk.js +9 -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.8e883c67.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.8d82c809.chunk.js +1 -0
- package/build/users-permissions-translation-zh-json.7978eaa6.chunk.js +1 -0
- package/build/users-providers-settings-page.55796d13.chunk.js +14 -0
- package/build/users-roles-settings-page.57079245.chunk.js +55 -0
- package/build/vi-json.ee4c5537.chunk.js +1 -0
- package/build/webhook-edit-page.3a28b2e7.chunk.js +33 -0
- package/build/webhook-list-page.ee80767b.chunk.js +63 -0
- package/build/zh-Hans-json.97efd015.chunk.js +1 -0
- package/build/zh-json.bfc2e036.chunk.js +1 -0
- package/ee/admin/hooks/{useLicenseLimitNotification.js → useLicenseLimitNotification.ts} +4 -4
- package/ee/admin/pages/AuthPage/components/Login/index.js +1 -1
- package/ee/admin/pages/AuthPage/components/Providers/index.js +3 -2
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/selectors.js +1 -1
- package/ee/admin/pages/SettingsPage/pages/Users/ListPage/index.js +1 -3
- package/ee/server/bootstrap.js +1 -1
- package/ee/server/controllers/admin.js +1 -1
- package/ee/server/controllers/user.js +1 -1
- package/ee/server/destroy.js +1 -1
- package/ee/server/register.js +1 -1
- package/ee/server/routes/utils.js +1 -1
- package/ee/server/services/audit-logs.js +1 -1
- package/ee/server/services/passport/sso.js +1 -1
- package/ee/server/services/passport.js +1 -1
- package/ee/server/services/seat-enforcement.js +1 -1
- package/ee/server/utils/sso-lock.js +1 -1
- package/ee/server/validation/role.js +1 -1
- package/ee/server/validation/user.js +1 -1
- package/jest.config.front.js +4 -0
- package/package.json +28 -22
- package/scripts/build.js +6 -2
- package/server/controllers/admin.js +4 -3
- package/shared/entities.ts +33 -0
- package/shared/permissions.ts +52 -0
- package/shared/schema.ts +9 -0
- package/webpack.config.js +1 -0
- package/admin/src/components/AuthenticatedApp/index.js +0 -120
- package/admin/src/components/AuthenticatedApp/utils/api.js +0 -85
- package/admin/src/components/AuthenticatedApp/utils/checkLatestStrapiVersion.js +0 -11
- package/admin/src/components/ConfigurationsProvider/index.js +0 -66
- package/admin/src/components/ConfigurationsProvider/reducer.js +0 -29
- package/admin/src/components/DragLayer/index.js +0 -1
- package/admin/src/components/GlobalStyle/index.js +0 -9
- package/admin/src/components/GuidedTour/Homepage/components/Step.js +0 -61
- package/admin/src/components/GuidedTour/Homepage/components/Stepper.js +0 -61
- package/admin/src/components/GuidedTour/Homepage/index.js +0 -71
- package/admin/src/components/GuidedTour/Modal/components/Content.js +0 -66
- package/admin/src/components/GuidedTour/Modal/components/Modal.js +0 -72
- package/admin/src/components/GuidedTour/Modal/components/StepNumberWithPadding.js +0 -26
- package/admin/src/components/GuidedTour/Modal/components/Stepper.js +0 -118
- package/admin/src/components/GuidedTour/Modal/index.js +0 -94
- package/admin/src/components/GuidedTour/Modal/reducer.js +0 -29
- package/admin/src/components/GuidedTour/Stepper/StepLine.js +0 -29
- package/admin/src/components/GuidedTour/Stepper/StepNumber.js +0 -71
- package/admin/src/components/GuidedTour/constants.js +0 -3
- package/admin/src/components/GuidedTour/index.js +0 -102
- package/admin/src/components/GuidedTour/init.js +0 -37
- package/admin/src/components/GuidedTour/reducer.js +0 -50
- package/admin/src/components/GuidedTour/utils/arePreviousSectionsDone.js +0 -13
- package/admin/src/components/GuidedTour/utils/arePreviousStepsDone.js +0 -12
- package/admin/src/components/GuidedTour/utils/isGuidedTourCompleted.js +0 -6
- package/admin/src/components/GuidedTour/utils/persistStateToLocaleStorage.js +0 -34
- package/admin/src/components/LanguageProvider/index.js +0 -54
- package/admin/src/components/LanguageProvider/init.js +0 -13
- package/admin/src/components/LanguageProvider/reducer.js +0 -30
- package/admin/src/components/LanguageProvider/utils/localStorageKey.js +0 -3
- package/admin/src/components/LocalesProvider/context.js +0 -5
- package/admin/src/components/LocalesProvider/index.js +0 -21
- package/admin/src/components/LocalesProvider/useLocalesProvider.js +0 -11
- package/admin/src/components/NpsSurvey/hooks/useNpsSurveySettings.js +0 -17
- package/admin/src/components/PluginsInitializer/index.js +0 -68
- package/admin/src/components/PluginsInitializer/init.js +0 -11
- package/admin/src/components/PluginsInitializer/reducer.js +0 -22
- package/admin/src/components/PrivateRoute/index.js +0 -46
- package/admin/src/components/Providers/index.js +0 -156
- package/admin/src/components/RBACProvider/actions.js +0 -10
- package/admin/src/components/RBACProvider/constants.js +0 -2
- package/admin/src/components/RBACProvider/index.js +0 -39
- package/admin/src/components/RBACProvider/reducer.js +0 -51
- package/admin/src/components/Theme/index.js +0 -26
- package/admin/src/components/ThemeToggleProvider/index.js +0 -79
- package/admin/src/contexts/Admin/index.js +0 -5
- package/admin/src/contexts/ApiTokenPermissions/index.js +0 -25
- package/admin/src/contexts/Configurations/index.js +0 -5
- package/admin/src/contexts/MarketPlace/index.js +0 -18
- package/admin/src/contexts/PermisssionsDataManagerContext/index.js +0 -5
- package/admin/src/contexts/ThemeToggle/index.js +0 -5
- package/admin/src/contexts/index.js +0 -4
- package/admin/src/core/store/configureStore.js +0 -47
- package/admin/src/exposedHooks.js +0 -27
- package/admin/src/hooks/useAdminRoles/__mocks__/index.js +0 -5
- package/admin/src/hooks/useAdminUsers/index.js +0 -1
- package/admin/src/hooks/useAdminUsers/useAdminUsers.js +0 -47
- package/admin/src/hooks/useConfigurations/index.js +0 -11
- package/admin/src/hooks/useContentTypes/index.js +0 -1
- package/admin/src/hooks/useDebounce/index.js +0 -19
- package/admin/src/hooks/useEnterprise/index.js +0 -1
- package/admin/src/hooks/useLicenseLimitNotification/index.js +0 -5
- package/admin/src/hooks/useMenu/index.js +0 -86
- package/admin/src/hooks/useMenu/utils/checkPermissions.js +0 -13
- package/admin/src/hooks/useMenu/utils/getGeneralLinks.js +0 -31
- package/admin/src/hooks/useMenu/utils/getPluginSectionLinks.js +0 -17
- package/admin/src/hooks/usePermissionsDataManager/index.js +0 -7
- package/admin/src/hooks/useReleaseNotification/index.js +0 -31
- package/admin/src/hooks/useReleaseNotification/utils/api.js +0 -20
- package/admin/src/hooks/useReleaseNotification/utils/checkLatestStrapiVersion.js +0 -11
- package/admin/src/hooks/useThemeToggle/index.js +0 -11
- package/admin/src/injectionZones.js +0 -25
- package/admin/src/layouts/UnauthenticatedLayout/LocaleToggle/index.js +0 -29
- package/admin/src/layouts/UnauthenticatedLayout/index.js +0 -55
- package/admin/src/reducers.js +0 -23
- package/admin/src/shared/hooks/useAdminProvider/index.js +0 -11
- package/admin/src/tsconfig.json +0 -10
- package/admin/src/utils/checkFormValidity.js +0 -15
- package/admin/src/utils/createRoute.js +0 -47
- package/admin/src/utils/formatAPIErrors.js +0 -17
- package/admin/src/utils/getAttributesToDisplay.js +0 -19
- package/admin/src/utils/getExistingActions.js +0 -32
- package/admin/src/utils/getFullName.js +0 -9
- package/admin/src/utils/index.js +0 -9
- package/admin/src/utils/makeUniqueRoutes.js +0 -6
- package/admin/src/utils/sortLinks.js +0 -5
- /package/admin/src/hooks/{useAdminUsers/__mocks__/index.js → __mocks__/useAdminUsers.ts} +0 -0
- /package/admin/src/hooks/{useContentTypes/__mocks__/index.js → __mocks__/useContentTypes.ts} +0 -0
- /package/admin/src/{hooks/useAdminRolePermissions/__mocks__/index.js → pages/SettingsPage/pages/Roles/hooks/__mocks__/useAdminRolePermissions.ts} +0 -0
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { useFetchClient } from '@strapi/helper-plugin';
|
|
2
|
+
import { Entity } from '@strapi/types';
|
|
2
3
|
import { useQuery } from 'react-query';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
import { RolePermissions } from '../../../../../../../shared/permissions';
|
|
6
|
+
import { APIBaseParams, APIResponse } from '../../../../../types/adminAPI';
|
|
7
|
+
|
|
8
|
+
export interface APIRolePermissionsQueryParams extends APIBaseParams {
|
|
9
|
+
id: null | Entity.ID;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const useAdminRolePermissions = (
|
|
13
|
+
params: APIRolePermissionsQueryParams = { id: null },
|
|
14
|
+
queryOptions = {}
|
|
15
|
+
) => {
|
|
5
16
|
const { id, ...queryParams } = params;
|
|
6
17
|
|
|
7
18
|
const { get } = useFetchClient();
|
|
8
19
|
|
|
9
|
-
if (!id && (queryOptions?.enabled === undefined || !!queryOptions?.enabled === true)) {
|
|
10
|
-
throw new Error('"id" is a required argument');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
20
|
const {
|
|
14
21
|
data: permissions,
|
|
15
22
|
error,
|
|
@@ -21,7 +28,7 @@ export const useAdminRolePermissions = (params = {}, queryOptions = {}) => {
|
|
|
21
28
|
async () => {
|
|
22
29
|
const {
|
|
23
30
|
data: { data },
|
|
24
|
-
} = await get(`/admin/roles/${id}/permissions`, {
|
|
31
|
+
} = await get<APIResponse<RolePermissions>>(`/admin/roles/${id}/permissions`, {
|
|
25
32
|
params: queryParams,
|
|
26
33
|
});
|
|
27
34
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Box, Layout, Main, HeaderLayout, EmptyStateLayout } from '@strapi/design-system';
|
|
4
|
+
import { LinkButton } from '@strapi/design-system/v2';
|
|
5
|
+
import { ExternalLink, EmptyPermissions } from '@strapi/icons';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
const SalesPage = () => {
|
|
9
|
+
const { formatMessage } = useIntl();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Layout>
|
|
13
|
+
<Main>
|
|
14
|
+
<HeaderLayout
|
|
15
|
+
title={formatMessage({
|
|
16
|
+
id: 'Settings.sso.title',
|
|
17
|
+
defaultMessage: 'Single Sign-On',
|
|
18
|
+
})}
|
|
19
|
+
subtitle={formatMessage({
|
|
20
|
+
id: 'Settings.sso.subTitle',
|
|
21
|
+
defaultMessage: 'Configure the settings for the Single Sign-On feature.',
|
|
22
|
+
})}
|
|
23
|
+
/>
|
|
24
|
+
<Box paddingLeft={10} paddingRight={10}>
|
|
25
|
+
<EmptyStateLayout
|
|
26
|
+
icon={<EmptyPermissions width="10rem" />}
|
|
27
|
+
content={formatMessage({
|
|
28
|
+
id: 'Settings.sso.not-available',
|
|
29
|
+
defaultMessage:
|
|
30
|
+
'SSO is only available as part of the Enterprise Edition. Upgrade to configure additional sign-in & sign-up methods for your administration panel.',
|
|
31
|
+
})}
|
|
32
|
+
action={
|
|
33
|
+
<LinkButton
|
|
34
|
+
variant="default"
|
|
35
|
+
endIcon={<ExternalLink />}
|
|
36
|
+
href="https://strp.cc/46Fk1BA"
|
|
37
|
+
isExternal
|
|
38
|
+
target="_blank"
|
|
39
|
+
>
|
|
40
|
+
{formatMessage({
|
|
41
|
+
id: 'global.learn-more',
|
|
42
|
+
defaultMessage: 'Learn more',
|
|
43
|
+
})}
|
|
44
|
+
</LinkButton>
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
</Box>
|
|
48
|
+
</Main>
|
|
49
|
+
</Layout>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default SalesPage;
|
|
@@ -19,7 +19,7 @@ import { useQuery } from 'react-query';
|
|
|
19
19
|
import { useSelector } from 'react-redux';
|
|
20
20
|
import { useHistory, useRouteMatch } from 'react-router-dom';
|
|
21
21
|
|
|
22
|
-
import { formatAPIErrors } from '../../../../../utils';
|
|
22
|
+
import { formatAPIErrors } from '../../../../../utils/formatAPIErrors';
|
|
23
23
|
import { selectAdminPermissions } from '../../../../App/selectors';
|
|
24
24
|
import { TRANSFER_TOKEN_TYPE } from '../../../components/Tokens/constants';
|
|
25
25
|
import FormHead from '../../../components/Tokens/FormHead';
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import { Plus } from '@strapi/icons';
|
|
17
17
|
import qs from 'qs';
|
|
18
18
|
import { useIntl } from 'react-intl';
|
|
19
|
-
import { useMutation, useQuery
|
|
19
|
+
import { useMutation, useQuery } from 'react-query';
|
|
20
20
|
import { useSelector } from 'react-redux';
|
|
21
21
|
import { useHistory } from 'react-router-dom';
|
|
22
22
|
|
|
@@ -28,7 +28,6 @@ import tableHeaders from './utils/tableHeaders';
|
|
|
28
28
|
|
|
29
29
|
const TransferTokenListView = () => {
|
|
30
30
|
useFocusWhenNavigate();
|
|
31
|
-
const queryClient = useQueryClient();
|
|
32
31
|
const { formatMessage } = useIntl();
|
|
33
32
|
const toggleNotification = useNotification();
|
|
34
33
|
const permissions = useSelector(selectAdminPermissions);
|
|
@@ -64,6 +63,7 @@ const TransferTokenListView = () => {
|
|
|
64
63
|
data: transferTokens,
|
|
65
64
|
status,
|
|
66
65
|
isFetching,
|
|
66
|
+
refetch,
|
|
67
67
|
} = useQuery(
|
|
68
68
|
['transfer-tokens'],
|
|
69
69
|
async () => {
|
|
@@ -81,8 +81,6 @@ const TransferTokenListView = () => {
|
|
|
81
81
|
{
|
|
82
82
|
enabled: canRead,
|
|
83
83
|
onError(err) {
|
|
84
|
-
console.log('error', err);
|
|
85
|
-
|
|
86
84
|
if (err?.response?.data?.error?.details?.code === 'INVALID_TOKEN_SALT') {
|
|
87
85
|
toggleNotification({
|
|
88
86
|
type: 'warning',
|
|
@@ -112,7 +110,7 @@ const TransferTokenListView = () => {
|
|
|
112
110
|
},
|
|
113
111
|
{
|
|
114
112
|
async onSuccess() {
|
|
115
|
-
await
|
|
113
|
+
await refetch(['transfer-tokens']);
|
|
116
114
|
},
|
|
117
115
|
onError(err) {
|
|
118
116
|
if (err?.response?.data?.data) {
|
|
@@ -34,7 +34,8 @@ import { useHistory, useRouteMatch } from 'react-router-dom';
|
|
|
34
34
|
|
|
35
35
|
import { useAdminUsers } from '../../../../../hooks/useAdminUsers';
|
|
36
36
|
import { useEnterprise } from '../../../../../hooks/useEnterprise';
|
|
37
|
-
import { formatAPIErrors
|
|
37
|
+
import { formatAPIErrors } from '../../../../../utils/formatAPIErrors';
|
|
38
|
+
import { getFullName } from '../../../../../utils/getFullName';
|
|
38
39
|
import { MagicLinkCE } from '../components/MagicLink';
|
|
39
40
|
import SelectRoles from '../components/SelectRoles';
|
|
40
41
|
import { editValidation } from '../utils/validations/users';
|
|
@@ -16,7 +16,7 @@ import PropTypes from 'prop-types';
|
|
|
16
16
|
import { useIntl } from 'react-intl';
|
|
17
17
|
import { useHistory } from 'react-router-dom';
|
|
18
18
|
|
|
19
|
-
import { getFullName } from '../../../../../../../utils';
|
|
19
|
+
import { getFullName } from '../../../../../../../utils/getFullName';
|
|
20
20
|
|
|
21
21
|
const TableRows = ({
|
|
22
22
|
canDelete,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Box,
|
|
@@ -17,8 +17,8 @@ import { useIntl } from 'react-intl';
|
|
|
17
17
|
import { useHistory } from 'react-router-dom';
|
|
18
18
|
import styled from 'styled-components';
|
|
19
19
|
|
|
20
|
-
import Logo from '
|
|
21
|
-
import
|
|
20
|
+
import { Logo } from '../components/UnauthenticatedLogo';
|
|
21
|
+
import { LayoutContent, UnauthenticatedLayout } from '../layouts/UnauthenticatedLayout';
|
|
22
22
|
|
|
23
23
|
export const options = [
|
|
24
24
|
{
|
|
@@ -69,19 +69,19 @@ const TypographyCenter = styled(Typography)`
|
|
|
69
69
|
text-align: center;
|
|
70
70
|
`;
|
|
71
71
|
|
|
72
|
-
const UseCasePage = () => {
|
|
72
|
+
export const UseCasePage = () => {
|
|
73
73
|
const toggleNotification = useNotification();
|
|
74
74
|
const { push, location } = useHistory();
|
|
75
75
|
const { formatMessage } = useIntl();
|
|
76
|
-
const [role, setRole] = useState();
|
|
77
|
-
const [otherRole, setOtherRole] = useState('');
|
|
76
|
+
const [role, setRole] = React.useState<string | number | null>(null);
|
|
77
|
+
const [otherRole, setOtherRole] = React.useState('');
|
|
78
78
|
const { post } = useFetchClient();
|
|
79
79
|
|
|
80
|
-
const { firstname, email } = auth.
|
|
80
|
+
const { firstname, email } = auth.get('userInfo') ?? {};
|
|
81
81
|
const { hasAdmin } = parse(location?.search, { ignoreQueryPrefix: true });
|
|
82
82
|
const isOther = role === 'other';
|
|
83
83
|
|
|
84
|
-
const handleSubmit = async (event, skipPersona) => {
|
|
84
|
+
const handleSubmit = async (event: React.FormEvent, skipPersona: boolean) => {
|
|
85
85
|
event.preventDefault();
|
|
86
86
|
try {
|
|
87
87
|
await post('https://analytics.strapi.io/register', {
|
|
@@ -133,7 +133,7 @@ const UseCasePage = () => {
|
|
|
133
133
|
})}
|
|
134
134
|
// onClear={() => setRole(null)}
|
|
135
135
|
// clearLabel={formatMessage({ id: 'clearLabel', defaultMessage: 'Clear' })}
|
|
136
|
-
onChange={setRole}
|
|
136
|
+
onChange={(value) => setRole(value)}
|
|
137
137
|
value={role}
|
|
138
138
|
>
|
|
139
139
|
{options.map(({ intlLabel, value }) => (
|
|
@@ -159,7 +159,7 @@ const UseCasePage = () => {
|
|
|
159
159
|
</LayoutContent>
|
|
160
160
|
<Flex justifyContent="center">
|
|
161
161
|
<Box paddingTop={4}>
|
|
162
|
-
<TextButton onClick={() => handleSubmit(true)}>
|
|
162
|
+
<TextButton onClick={(event) => handleSubmit(event, true)}>
|
|
163
163
|
{formatMessage({
|
|
164
164
|
id: 'Usecase.button.skip',
|
|
165
165
|
defaultMessage: 'Skip this question',
|
|
@@ -171,5 +171,3 @@ const UseCasePage = () => {
|
|
|
171
171
|
</UnauthenticatedLayout>
|
|
172
172
|
);
|
|
173
173
|
};
|
|
174
|
-
|
|
175
|
-
export default UseCasePage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useAdmin } from '../../../contexts/admin';
|
|
2
2
|
|
|
3
3
|
const useInjectionZone = (area) => {
|
|
4
|
-
const { getAdminInjectedComponents } =
|
|
4
|
+
const { getAdminInjectedComponents } = useAdmin();
|
|
5
5
|
|
|
6
6
|
const [moduleName, page, position] = area.split('.');
|
|
7
7
|
|
|
@@ -162,6 +162,7 @@
|
|
|
162
162
|
"Settings.permissions.auditLogs.entry.update": "Update entry{model, select, undefined {} other { ({model})}}",
|
|
163
163
|
"Settings.permissions.auditLogs.filters.combobox.aria-label": "Search and select an option to filter",
|
|
164
164
|
"Settings.permissions.auditLogs.listview.header.subtitle": "Logs of all the activities that happened in your environment",
|
|
165
|
+
"Settings.permissions.auditLogs.not-available": "Audit Logs is only available as part of the Enterprise Edition. Upgrade to get a searchable and filterable display of all activities.",
|
|
165
166
|
"Settings.permissions.auditLogs.media.create": "Create media",
|
|
166
167
|
"Settings.permissions.auditLogs.media.delete": "Delete media",
|
|
167
168
|
"Settings.permissions.auditLogs.media.update": "Update media",
|
|
@@ -218,6 +219,7 @@
|
|
|
218
219
|
"Settings.profile.form.section.experience.mode.hint": "Displays your interface in the chosen mode.",
|
|
219
220
|
"Settings.profile.form.section.experience.mode.label": "Interface mode",
|
|
220
221
|
"Settings.profile.form.section.experience.mode.option-label": "{name} mode",
|
|
222
|
+
"Settings.profile.form.section.experience.mode.option-system-label": "Use system settings",
|
|
221
223
|
"Settings.profile.form.section.experience.title": "Experience",
|
|
222
224
|
"Settings.profile.form.section.helmet.title": "User profile",
|
|
223
225
|
"Settings.profile.form.section.profile.page.title": "Profile page",
|
|
@@ -226,6 +228,7 @@
|
|
|
226
228
|
"Settings.review-workflows.page.isLoading": "Workflow is loading",
|
|
227
229
|
"Settings.review-workflows.page.delete.confirm.body": "All entries assigned to deleted stages will be moved to the previous stage. Are you sure you want to save?",
|
|
228
230
|
"Settings.review-workflows.stage.name.label": "Stage name",
|
|
231
|
+
"Settings.review-workflows.not-available": "Review Workflows is only available as part of the Enterprise Edition. Upgrade to create and manage workflows.",
|
|
229
232
|
"Settings.roles.create.description": "Define the rights given to the role",
|
|
230
233
|
"Settings.roles.create.title": "Create a role",
|
|
231
234
|
"Settings.roles.created": "Role created",
|
|
@@ -252,6 +255,7 @@
|
|
|
252
255
|
"Settings.sso.form.registration.description": "Create new user on SSO login if no account exists",
|
|
253
256
|
"Settings.sso.form.registration.label": "Auto-registration",
|
|
254
257
|
"Settings.sso.title": "Single Sign-On",
|
|
258
|
+
"Settings.sso.not-available": "SSO is only available as part of the Enterprise Edition. Upgrade to configure additional sign-in & sign-up methods for your administration panel.",
|
|
255
259
|
"Settings.tokens.Button.cancel": "Cancel",
|
|
256
260
|
"Settings.tokens.Button.regenerate": "Regenerate",
|
|
257
261
|
"Settings.tokens.ListView.headers.createdAt": "Created at",
|
|
@@ -626,6 +630,14 @@
|
|
|
626
630
|
"components.Blocks.modifiers.underline": "Underline",
|
|
627
631
|
"components.Blocks.modifiers.strikethrough": "Strikethrough",
|
|
628
632
|
"components.Blocks.modifiers.code": "Code",
|
|
633
|
+
"components.Blocks.link": "Link",
|
|
634
|
+
"components.Blocks.popover.text": "Text",
|
|
635
|
+
"components.Blocks.popover.text.placeholder": "Enter link text",
|
|
636
|
+
"components.Blocks.popover.link": "Link",
|
|
637
|
+
"components.Blocks.popover.save": "Save",
|
|
638
|
+
"components.Blocks.popover.cancel": "Cancel",
|
|
639
|
+
"components.Blocks.popover.delete": "Delete",
|
|
640
|
+
"components.Blocks.popover.edit": "Edit",
|
|
629
641
|
"components.Blocks.blocks.selectBlock": "Select a block",
|
|
630
642
|
"components.Blocks.blocks.text": "Text",
|
|
631
643
|
"components.Blocks.blocks.heading1": "Heading 1",
|
|
@@ -940,6 +952,7 @@
|
|
|
940
952
|
"global.type": "Type",
|
|
941
953
|
"global.users": "Users",
|
|
942
954
|
"global.fullname": "{firstname} {lastname}",
|
|
955
|
+
"global.learn-more": "Learn more",
|
|
943
956
|
"light": "Light",
|
|
944
957
|
"notification.contentType.relations.conflict": "Content type has conflicting relations",
|
|
945
958
|
"notification.default.title": "Information:",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable check-file/filename-naming-convention */
|
|
2
|
+
|
|
3
|
+
export interface APIBaseParams {
|
|
4
|
+
filters?: unknown;
|
|
5
|
+
locale?: string;
|
|
6
|
+
publicationState?: 'preview' | 'live';
|
|
7
|
+
sort?: unknown;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type APIResponsePagination = {
|
|
11
|
+
page: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
pageCount: number;
|
|
14
|
+
total: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type APIResponseMeta = {
|
|
18
|
+
pagination: APIResponsePagination;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type APIResponse<TRes = any> = {
|
|
22
|
+
data: TRes;
|
|
23
|
+
meta: APIResponseMeta;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// TODO: the users API response shape is outdated and should be updated
|
|
27
|
+
export type APIResponseUsersLegacy<TRes = any> = {
|
|
28
|
+
data: TRes;
|
|
29
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* eslint-disable check-file/filename-naming-convention */
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import { LoadingIndicatorPage } from '@strapi/helper-plugin';
|
|
6
|
+
import { Route } from 'react-router-dom';
|
|
7
|
+
|
|
8
|
+
interface LazyCompoProps {
|
|
9
|
+
loadComponent: () => Promise<{ default?: React.ComponentType } | React.ComponentType>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const LazyCompo = ({ loadComponent }: LazyCompoProps) => {
|
|
13
|
+
const [Compo, setCompo] = React.useState<React.ComponentType | null>(null);
|
|
14
|
+
|
|
15
|
+
React.useEffect(() => {
|
|
16
|
+
const loadCompo = async () => {
|
|
17
|
+
try {
|
|
18
|
+
const loadedCompo = await loadComponent();
|
|
19
|
+
|
|
20
|
+
// TODO the loaded component provided can currently come from a default or named export
|
|
21
|
+
// We will move the entire codebase to use named exports only
|
|
22
|
+
// Until then we support both cases with priority given to the existing default exports
|
|
23
|
+
if (typeof loadedCompo === 'function') {
|
|
24
|
+
setCompo(() => loadedCompo);
|
|
25
|
+
} else if (loadedCompo.default) {
|
|
26
|
+
setCompo(() => loadedCompo.default!);
|
|
27
|
+
}
|
|
28
|
+
} catch (err) {}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
loadCompo();
|
|
32
|
+
}, [loadComponent]);
|
|
33
|
+
|
|
34
|
+
if (Compo) {
|
|
35
|
+
return <Compo />;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return <LoadingIndicatorPage />;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const createRoute = (
|
|
42
|
+
loadComponent: LazyCompoProps['loadComponent'],
|
|
43
|
+
to: string,
|
|
44
|
+
exact: boolean = false
|
|
45
|
+
) => {
|
|
46
|
+
return (
|
|
47
|
+
<Route
|
|
48
|
+
render={() => <LazyCompo loadComponent={loadComponent} />}
|
|
49
|
+
key={to}
|
|
50
|
+
path={to}
|
|
51
|
+
exact={exact || false}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const formatAPIErrors = ({ data }: { data: Record<string, string[]> }) => {
|
|
2
|
+
try {
|
|
3
|
+
return Object.keys(data).reduce(
|
|
4
|
+
(acc: Record<string, { id: string; defaultMessage: string }>, current) => {
|
|
5
|
+
const errorMessage = data[current][0];
|
|
6
|
+
acc[current] = {
|
|
7
|
+
id: errorMessage,
|
|
8
|
+
defaultMessage: errorMessage,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
return acc;
|
|
12
|
+
},
|
|
13
|
+
{}
|
|
14
|
+
);
|
|
15
|
+
} catch (err) {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { UserInfo } from '@strapi/helper-plugin';
|
|
2
|
+
|
|
1
3
|
export const utils = {
|
|
2
|
-
bufferToHex(buffer) {
|
|
4
|
+
bufferToHex(buffer: ArrayBuffer) {
|
|
3
5
|
return [...new Uint8Array(buffer)].map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
4
6
|
},
|
|
5
|
-
async digestMessage(message) {
|
|
7
|
+
async digestMessage(message: string) {
|
|
6
8
|
const msgUint8 = new TextEncoder().encode(message);
|
|
7
9
|
const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8);
|
|
8
10
|
|
|
@@ -10,10 +12,11 @@ export const utils = {
|
|
|
10
12
|
},
|
|
11
13
|
};
|
|
12
14
|
|
|
13
|
-
export
|
|
15
|
+
export async function hashAdminUserEmail(payload?: UserInfo) {
|
|
14
16
|
if (!payload) {
|
|
15
17
|
return null;
|
|
16
18
|
}
|
|
19
|
+
|
|
17
20
|
try {
|
|
18
21
|
return await utils.digestMessage(payload.email);
|
|
19
22
|
} catch (error) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RouteProps } from 'react-router-dom';
|
|
2
|
+
|
|
3
|
+
interface UniqueRouteProps extends RouteProps {
|
|
4
|
+
key: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function makeUniqueRoutes(routes: UniqueRouteProps[]) {
|
|
8
|
+
return routes.filter(
|
|
9
|
+
(route, index, refArray) => refArray.findIndex((obj) => obj.key === route.key) === index
|
|
10
|
+
);
|
|
11
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1049],{91595:function(B,T,e){e.d(T,{Z:function(){return D}});var t=e(32735),y=e(64092),d=e(84642),o=e(91779),n=e(96192),a=e(40501),i=e(70788),p=e(60216),s=e.n(p),m=e(67879),c=e(69321),E=e(59177);const u=(K,P,N,r)=>{const[U,C]=(0,t.useState)(!1),I=(0,n.lm)(),{post:Z}=(0,n.kY)(),{formatAPIError:k}=(0,n.So)();return{regenerateData:async()=>{try{const{data:{data:{accessKey:O}}}=await Z(`${K}${P}/regenerate`);C(!1),N(O)}catch(O){C(!1),r?r(O):O instanceof E.d7&&I({type:"warning",message:k(O)})}},isLoadingConfirmation:U}},g=({onRegenerate:K,idToRegenerate:P,backUrl:N,onError:r})=>{const{formatMessage:U}=(0,m.Z)(),[C,I]=(0,t.useState)(!1),{regenerateData:Z,isLoadingConfirmation:k}=u(N,P,K,r),W=async()=>{Z(),I(!1)};return t.createElement(t.Fragment,null,t.createElement(o.z,{startIcon:t.createElement(c.Z,null),type:"button",size:"S",variant:"tertiary",onClick:()=>I(!0),name:"regenerate"},U({id:"Settings.tokens.regenerate",defaultMessage:"Regenerate"})),t.createElement(n.QH,{bodyText:{id:"Settings.tokens.popUpWarning.message",defaultMessage:"Are you sure you want to regenerate this token?"},iconRightButton:t.createElement(c.Z,null),isConfirmButtonLoading:k,isOpen:C,onToggleDialog:()=>I(!1),onConfirm:W,leftButtonText:{id:"Settings.tokens.Button.cancel",defaultMessage:"Cancel"},rightButtonText:{id:"Settings.tokens.Button.regenerate",defaultMessage:"Regenerate"},title:{id:"Settings.tokens.RegenerateDialog.title",defaultMessage:"Regenerate token"}}))};g.defaultProps={onRegenerate(){},onError:void 0},g.propTypes={onRegenerate:s().func,idToRegenerate:s().oneOfType([s().number,s().string]).isRequired,backUrl:s().string.isRequired,onError:s().func};var l=g;const M=({title:K,token:P,setToken:N,canEditInputs:r,canRegenerate:U,isSubmitting:C,backUrl:I,regenerateUrl:Z,onErrorRegenerate:k})=>{const{formatMessage:W}=(0,m.Z)(),O=G=>{N({...P,accessKey:G})};return t.createElement(y.T,{title:P?.name||W(K),primaryAction:r?t.createElement(d.k,{gap:2},U&&P?.id&&t.createElement(l,{backUrl:Z,onRegenerate:O,idToRegenerate:P?.id,onError:k}),t.createElement(o.z,{disabled:C,loading:C,startIcon:t.createElement(a.Z,null),type:"submit",size:"S"},W({id:"global.save",defaultMessage:"Save"}))):U&&P?.id&&t.createElement(l,{onRegenerate:O,idToRegenerate:P?.id,backUrl:Z}),navigationAction:t.createElement(n.rU,{startIcon:t.createElement(i.Z,null),to:I},W({id:"global.back",defaultMessage:"Back"})),ellipsis:!0})};M.propTypes={token:s().shape({id:s().oneOfType([s().number,s().string]),type:s().string,lifespan:s().oneOfType([s().number,s().string]),name:s().string,accessKey:s().string,permissions:s().array,description:s().string,createdAt:s().string}),canEditInputs:s().bool.isRequired,canRegenerate:s().bool.isRequired,setToken:s().func.isRequired,isSubmitting:s().bool.isRequired,backUrl:s().string.isRequired,title:s().shape({id:s().string,label:s().string}).isRequired,regenerateUrl:s().string.isRequired,onErrorRegenerate:s().func},M.defaultProps={token:void 0,onErrorRegenerate:void 0};var D=M},82505:function(B,T,e){var t=e(32735),y=e(16773),d=e(40260),o=e(8365),n=e(60216),a=e.n(n),i=e(67879),p=e(25652);const s=({token:m,errors:c,values:E,onChange:u,isCreating:g})=>{const{formatMessage:l}=(0,i.Z)();return t.createElement(t.Fragment,null,t.createElement(y.P,{name:"lifespan",label:l({id:"Settings.tokens.form.duration",defaultMessage:"Token duration"}),value:E.lifespan!==null?E.lifespan:"0",error:c.lifespan?l(c.lifespan?.id?c.lifespan:{id:c.lifespan,defaultMessage:c.lifespan}):null,onChange:M=>{u({target:{name:"lifespan",value:M}})},required:!0,disabled:!g,placeholder:"Select"},t.createElement(d.W,{value:"604800000"},l({id:"Settings.tokens.duration.7-days",defaultMessage:"7 days"})),t.createElement(d.W,{value:"2592000000"},l({id:"Settings.tokens.duration.30-days",defaultMessage:"30 days"})),t.createElement(d.W,{value:"7776000000"},l({id:"Settings.tokens.duration.90-days",defaultMessage:"90 days"})),t.createElement(d.W,{value:"0"},l({id:"Settings.tokens.duration.unlimited",defaultMessage:"Unlimited"}))),t.createElement(o.Z,{variant:"pi",textColor:"neutral600"},!g&&`${l({id:"Settings.tokens.duration.expiration-date",defaultMessage:"Expiration date"})}: ${(0,p.IX)(m?.createdAt,parseInt(E.lifespan,10))}`))};s.propTypes={errors:a().shape({lifespan:a().string}),onChange:a().func.isRequired,values:a().shape({lifespan:a().oneOfType([a().number,a().string])}).isRequired,isCreating:a().bool.isRequired,token:a().shape({id:a().oneOfType([a().number,a().string]),type:a().string,lifespan:a().string,name:a().string,accessKey:a().string,permissions:a().array,description:a().string,createdAt:a().string})},s.defaultProps={errors:{},token:{}},T.Z=s},7210:function(B,T,e){var t=e(32735),y=e(14763),d=e(96192),o=e(94958),n=e(42815),a=e(60216),i=e.n(a),p=e(67879);const s=({token:m,tokenType:c})=>{const{formatMessage:E}=(0,p.Z)(),u=(0,d.lm)(),{trackUsage:g}=(0,d.rS)(),{copy:l}=(0,d.VP)(),M=D=>async()=>{await l(D)&&(g("didCopyTokenKey",{tokenType:c}),u({type:"success",message:{id:"Settings.tokens.notification.copied"}}))};return t.createElement(d.Y_,{endAction:m&&t.createElement("span",{style:{alignSelf:"start"}},t.createElement(y.h,{label:E({id:"app.component.CopyToClipboard.label",defaultMessage:"Copy to clipboard"}),onClick:M(m),noBorder:!0,icon:t.createElement(o.Z,null),style:{padding:0,height:"1rem"}})),title:m||E({id:"Settings.tokens.copy.editTitle",defaultMessage:"This token isn\u2019t accessible anymore."}),subtitle:E(m?{id:"Settings.tokens.copy.lastWarning",defaultMessage:"Make sure to copy this token, you won\u2019t be able to see it again!"}:{id:"Settings.tokens.copy.editMessage",defaultMessage:"For security reasons, you can only see your token once."}),icon:t.createElement(n.Z,null),iconBackground:"neutral100"})};s.defaultProps={token:null},s.propTypes={token:i().string,tokenType:i().string.isRequired},T.Z=s},58380:function(B,T,e){var t=e(32735),y=e(15367),d=e(60216),o=e.n(d),n=e(67879);const a=({errors:i,values:p,onChange:s,canEditInputs:m})=>{const{formatMessage:c}=(0,n.Z)();return t.createElement(y.g,{label:c({id:"Settings.tokens.form.description",defaultMessage:"Description"}),id:"description",error:i.description?c(i.description?.id?i.description:{id:i.description,defaultMessage:i.description}):null,onChange:s,disabled:!m},p.description)};a.propTypes={errors:o().shape({description:o().string}),onChange:o().func.isRequired,canEditInputs:o().bool.isRequired,values:o().shape({description:o().string}).isRequired},a.defaultProps={errors:{}},T.Z=a},37823:function(B,T,e){var t=e(32735),y=e(2846),d=e(60216),o=e.n(d),n=e(67879);const a=({errors:i,values:p,onChange:s,canEditInputs:m})=>{const{formatMessage:c}=(0,n.Z)();return t.createElement(y.o,{name:"name",error:i.name?c(i.name?.id?i.name:{id:i.name,defaultMessage:i.name}):null,label:c({id:"Settings.tokens.form.name",defaultMessage:"Name"}),onChange:s,value:p.name,disabled:!m,required:!0})};a.propTypes={errors:o().shape({name:o().string}),onChange:o().func.isRequired,canEditInputs:o().bool.isRequired,values:o().shape({name:o().string}).isRequired},a.defaultProps={errors:{}},T.Z=a},32655:function(B,T,e){var t=e(32735),y=e(16773),d=e(40260),o=e(60216),n=e.n(o),a=e(67879);const i=({name:p,errors:s,values:m,onChange:c,canEditInputs:E,options:u,label:g})=>{const{formatMessage:l}=(0,a.Z)();return t.createElement(y.P,{name:p,label:l({id:g.id,defaultMessage:g.defaultMessage}),value:m&&m[p],error:s[p]?l(s[p]?.id?s[p]:{id:s[p],defaultMessage:s[p]}):null,onChange:c,placeholder:"Select",required:!0,disabled:!E},u&&u.map(({value:M,label:D})=>t.createElement(d.W,{key:M,value:M},l(D))))};i.propTypes={name:n().string,options:n().arrayOf(n().shape({label:n().shape({id:n().string,defaultMessage:n().string}),value:n().string})),errors:n().shape({type:n().string}),onChange:n().func.isRequired,canEditInputs:n().bool.isRequired,values:n().shape({type:n().string}).isRequired,label:n().shape({id:n().string,defaultMessage:n().string}).isRequired},i.defaultProps={name:"type",errors:{},options:[]},T.Z=i},49756:function(B,T,e){e.d(T,{Z:function(){return t},f:function(){return y}});const t="api-token",y="transfer-token"},25652:function(B,T,e){e.d(T,{IX:function(){return n},fK:function(){return s},mk:function(){return c}});var t=e(14723),y=e(85544),d=e(76698),n=(E,u,g="en")=>{if(u&&typeof u=="number"){const l=u/24/60/60/1e3;return(0,t.Z)((0,y.Z)(new Date(E),l),"PPP",{locale:d[g]})}return"Unlimited"},a=e(96192),i=e(24346),s=i.Ry().shape({name:i.Z_(a.I0.string).max(100).required(a.I0.required),type:i.Z_(a.I0.string).oneOf(["read-only","full-access","custom"]).required(a.I0.required),description:i.Z_().nullable(),lifespan:i.Rx().integer().min(0).nullable().defined(a.I0.required)}),c=E=>{const u={allActionsIds:[],permissions:[]};return u.permissions=Object.keys(E).map(g=>({apiId:g,label:g.split("::")[1],controllers:Object.keys(E[g].controllers).map(l=>({controller:l,actions:E[g].controllers[l].map(M=>{const D=`${g}.${l}.${M}`;return g.includes("api::")&&u.allActionsIds.push(D),{action:M,actionId:D}}).flat()})).flat()})),u}},1930:function(B,T,e){e.d(T,{Z:function(){return ne}});var t=e(32735),y=e(95162),d=e(56932),o=e(84642),n=e(96192),a=e(92802),i=e(67879),p=e(20108),s=e(40986),m=e(53038),c=e(83923),E=e(30305),u=e(49756),g=e(91595),l=e(7210),M=e(77981),D=e(8365),K=e(10710),P=e(97037),N=e(60216),r=e.n(N),U=e(82505),C=e(58380),I=e(37823),Z=e(32655);const k=({errors:A,onChange:L,canEditInputs:F,isCreating:h,values:x,transferToken:v})=>{const{formatMessage:$}=(0,i.Z)(),X=[{value:"push",label:{id:"Settings.transferTokens.types.push",defaultMessage:"Push"}},{value:"pull",label:{id:"Settings.transferTokens.types.pull",defaultMessage:"Pull"}},{value:"push-pull",label:{id:"Settings.transferTokens.types.push-pull",defaultMessage:"Full Access"}}];return t.createElement(M.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},t.createElement(o.k,{direction:"column",alignItems:"stretch",gap:4},t.createElement(D.Z,{variant:"delta",as:"h2"},$({id:"global.details",defaultMessage:"Details"})),t.createElement(K.r,{gap:5},t.createElement(P.P,{key:"name",col:6,xs:12},t.createElement(I.Z,{errors:A,values:x,canEditInputs:F,onChange:L})),t.createElement(P.P,{key:"description",col:6,xs:12},t.createElement(C.Z,{errors:A,values:x,canEditInputs:F,onChange:L})),t.createElement(P.P,{key:"lifespan",col:6,xs:12},t.createElement(U.Z,{isCreating:h,errors:A,values:x,onChange:L,token:v})),t.createElement(P.P,{key:"permissions",col:6,xs:12},t.createElement(Z.Z,{name:"permissions",values:x,errors:A,label:{id:"Settings.tokens.form.type",defaultMessage:"Token type"},onChange:Y=>{L({target:{name:"permissions",value:Y}})},options:X,canEditInputs:F})))))};k.propTypes={errors:r().shape({name:r().string,description:r().string,lifespan:r().string,type:r().string}),onChange:r().func.isRequired,canEditInputs:r().bool.isRequired,values:r().shape({name:r().string,description:r().string,lifespan:r().oneOfType([r().number,r().string]),type:r().string}).isRequired,isCreating:r().bool.isRequired,transferToken:r().shape({id:r().oneOfType([r().number,r().string]),type:r().string,lifespan:r().string,name:r().string,accessKey:r().string,permissions:r().array,description:r().string,createdAt:r().string})},k.defaultProps={errors:{},transferToken:{}};var W=k,O=e(64092),G=e(91779),q=e(40501);const Q=({transferTokenName:A})=>{const{formatMessage:L}=(0,i.Z)();return(0,n.go)(),t.createElement(y.o,{"aria-busy":"true"},t.createElement(n.SL,{name:"Transfer Tokens"}),t.createElement(O.T,{primaryAction:t.createElement(G.z,{disabled:!0,startIcon:t.createElement(q.Z,null),type:"button",size:"L"},L({id:"global.save",defaultMessage:"Save"})),title:A||L({id:"Settings.transferTokens.createPage.title",defaultMessage:"Create Transfer Token"})}),t.createElement(d.D,null,t.createElement(n.dO,null)))};Q.defaultProps={transferTokenName:null},Q.propTypes={transferTokenName:r().string};var w=Q,V=e(24346),ee=V.Ry().shape({name:V.Z_(n.I0.string).max(100).required(n.I0.required),description:V.Z_().nullable(),lifespan:V.Rx().integer().min(0).nullable().defined(n.I0.required),permissions:V.Z_(n.I0.string).required(n.I0.required)});const te="Name already taken";var ne=()=>{(0,n.go)();const{formatMessage:A}=(0,i.Z)(),{lockApp:L,unlockApp:F}=(0,n.o1)(),h=(0,n.lm)(),x=(0,m.k6)(),[v,$]=(0,t.useState)(x.location.state?.transferToken.accessKey?{...x.location.state.transferToken}:null),{trackUsage:X}=(0,n.rS)(),Y=(0,t.useRef)(X),{setCurrentStep:se}=(0,n.c1)(),ae=(0,s.v9)(E._),{allowedActions:{canCreate:re,canUpdate:ie,canRegenerate:oe}}=(0,n.ss)(ae.settings["transfer-tokens"]),{params:{id:H}}=(0,m.$B)("/settings/transfer-tokens/:id"),{get:le,post:de,put:ce}=(0,n.kY)(),R=H==="create",{formatAPIError:b}=(0,n.So)();(0,t.useEffect)(()=>{Y.current(R?"didAddTokenFromList":"didEditTokenFromList",{tokenType:u.f})},[R]);const{status:ge}=(0,p.useQuery)(["transfer-token",H],async()=>{const{data:{data:f}}=await le(`/admin/transfer/tokens/${H}`);return $({...f}),f},{enabled:!R&&!v,onError(f){f.response.data.error.details?.code==="INVALID_TOKEN_SALT"?h({type:"warning",message:{id:"notification.error.invalid.configuration",defaultMessage:"You have an invalid configuration, check your server log for more information."}}):h({type:"warning",message:b(f)})}}),ue=async(f,z)=>{Y.current(R?"willCreateToken":"willEditToken",{tokenType:u.f}),L();const J=f.lifespan&&parseInt(f.lifespan,10)&&f.lifespan!=="0"?parseInt(f.lifespan,10):null,j=f.permissions.split("-");try{const{data:{data:S}}=R?await de("/admin/transfer/tokens",{...f,lifespan:J,permissions:j}):await ce(`/admin/transfer/tokens/${H}`,{name:f.name,description:f.description,permissions:j});F(),R&&(x.replace(`/settings/transfer-tokens/${S.id}`,{transferToken:S}),se("transferTokens.success")),$({...S}),h({type:"success",message:A(R?{id:"notification.success.transfertokencreated",defaultMessage:"Transfer Token successfully created"}:{id:"notification.success.transfertokenedited",defaultMessage:"Transfer Token successfully edited"})}),Y.current(R?"didCreateToken":"didEditToken",{type:v?.permissions,tokenType:u.f})}catch(S){const pe=(0,c.I)(S.response.data);z.setErrors(pe),S?.response?.data?.error?.message===te?h({type:"warning",message:S.response.data.message||"notification.error.tokennamenotunique"}):S?.response?.data?.error?.details?.code==="INVALID_TOKEN_SALT"?h({type:"warning",message:{id:"notification.error.invalid.configuration",defaultMessage:"You have an invalid configuration, check your server log for more information."}}):h({type:"warning",message:S?.response?.data?.message||"notification.error"}),F()}},_=ie&&!R||re&&R;if(!R&&!v&&ge!=="success")return t.createElement(w,{transferTokenName:v?.name});const fe=f=>{f?.response?.data?.error?.details?.code==="INVALID_TOKEN_SALT"?h({type:"warning",message:{id:"notification.error.invalid.configuration",defaultMessage:"You have an invalid configuration, check your server log for more information."}}):h({type:"warning",message:b(f)})};return t.createElement(y.o,null,t.createElement(n.SL,{name:"Transfer Tokens"}),t.createElement(a.J9,{validationSchema:ee,validateOnChange:!1,initialValues:{name:v?.name||"",description:v?.description||"",lifespan:v?.lifespan?v.lifespan.toString():v?.lifespan,permissions:v?.permissions.join("-")},enableReinitialize:!0,onSubmit:(f,z)=>ue(f,z)},({errors:f,handleChange:z,isSubmitting:J,values:j})=>t.createElement(n.l0,null,t.createElement(g.Z,{backUrl:"/settings/transfer-tokens",title:{id:"Settings.transferTokens.createPage.title",defaultMessage:"Create Transfer Token"},token:v,setToken:$,canEditInputs:_,canRegenerate:oe,isSubmitting:J,regenerateUrl:"/admin/transfer/tokens/",onErrorRegenerate:fe}),t.createElement(d.D,null,t.createElement(o.k,{direction:"column",alignItems:"stretch",gap:6},Boolean(v?.name)&&t.createElement(l.Z,{token:v?.accessKey,tokenType:u.f}),t.createElement(W,{errors:f,onChange:z,canEditInputs:_,isCreating:R,values:j,transferToken:v}))))))}}}]);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1217],{91131:function(d,i,t){var e=t(94318),a=t(3387),n="[object RegExp]";function r(p){return a(p)&&e(p)==n}d.exports=r},52654:function(d,i,t){var e=t(91131),a=t(76535),n=t(91782),r=n&&n.isRegExp,p=r?a(r):e;d.exports=p},51382:function(d,i,t){var e=t(90454),a=t(24793),n=t(34327),r=t(85973),p=t(52654),j=t(38788),O=t(51119),E=t(25225),w=t(41119),Z=30,x="...",s=/\w*$/;function c(l,f){var o=Z,m=x;if(r(f)){var u="separator"in f?f.separator:u;o="length"in f?E(f.length):o,m="omission"in f?e(f.omission):m}l=w(l);var _=l.length;if(n(l)){var h=O(l);_=h.length}if(o>=_)return l;var v=o-j(m);if(v<1)return m;var g=h?a(h,0,v).join(""):l.slice(0,v);if(u===void 0)return g+m;if(h&&(v+=g.length-v),p(u)){if(l.slice(v).search(u)){var M,P=g;for(u.global||(u=RegExp(u.source,w(s.exec(u))+"g")),u.lastIndex=0;M=u.exec(P);)var D=M.index;g=g.slice(0,D===void 0?v:D)}}else if(l.indexOf(e(u),v)!=v){var C=g.lastIndexOf(u);C>-1&&(g=g.slice(0,C))}return g+m}d.exports=c},98178:function(d,i,t){"use strict";t.d(i,{P1:function(){return w}});var e="NOT_FOUND";function a(x){var s;return{get:function(l){return s&&x(s.key,l)?s.value:e},put:function(l,f){s={key:l,value:f}},getEntries:function(){return s?[s]:[]},clear:function(){s=void 0}}}function n(x,s){var c=[];function l(u){var _=c.findIndex(function(v){return s(u,v.key)});if(_>-1){var h=c[_];return _>0&&(c.splice(_,1),c.unshift(h)),h.value}return e}function f(u,_){l(u)===e&&(c.unshift({key:u,value:_}),c.length>x&&c.pop())}function o(){return c}function m(){c=[]}return{get:l,put:f,getEntries:o,clear:m}}var r=function(s,c){return s===c};function p(x){return function(c,l){if(c===null||l===null||c.length!==l.length)return!1;for(var f=c.length,o=0;o<f;o++)if(!x(c[o],l[o]))return!1;return!0}}function j(x,s){var c=typeof s=="object"?s:{equalityCheck:s},l=c.equalityCheck,f=l===void 0?r:l,o=c.maxSize,m=o===void 0?1:o,u=c.resultEqualityCheck,_=p(f),h=m===1?a(_):n(m,_);function v(){var g=h.get(arguments);if(g===e){if(g=x.apply(null,arguments),u){var M=h.getEntries(),P=M.find(function(D){return u(D.value,g)});P&&(g=P.value)}h.put(arguments,g)}return g}return v.clearCache=function(){return h.clear()},v}function O(x){var s=Array.isArray(x[0])?x[0]:x;if(!s.every(function(l){return typeof l=="function"})){var c=s.map(function(l){return typeof l=="function"?"function "+(l.name||"unnamed")+"()":typeof l}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+c+"]")}return s}function E(x){for(var s=arguments.length,c=new Array(s>1?s-1:0),l=1;l<s;l++)c[l-1]=arguments[l];var f=function(){for(var m=arguments.length,u=new Array(m),_=0;_<m;_++)u[_]=arguments[_];var h=0,v,g={memoizeOptions:void 0},M=u.pop();if(typeof M=="object"&&(g=M,M=u.pop()),typeof M!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof M+"]");var P=g,D=P.memoizeOptions,C=D===void 0?c:D,I=Array.isArray(C)?C:[C],L=O(u),R=x.apply(void 0,[function(){return h++,M.apply(null,arguments)}].concat(I)),T=x(function(){for(var y=[],U=L.length,B=0;B<U;B++)y.push(L[B].apply(null,arguments));return v=R.apply(null,y),v});return Object.assign(T,{resultFunc:M,memoizedResultFunc:R,dependencies:L,lastResult:function(){return v},recomputations:function(){return h},resetRecomputations:function(){return h=0}}),T};return f}var w=E(j),Z=function(s,c){if(c===void 0&&(c=w),typeof s!="object")throw new Error("createStructuredSelector expects first argument to be an object "+("where each property is a selector, instead received a "+typeof s));var l=Object.keys(s),f=c(l.map(function(o){return s[o]}),function(){for(var o=arguments.length,m=new Array(o),u=0;u<o;u++)m[u]=arguments[u];return m.reduce(function(_,h,v){return _[l[v]]=h,_},{})});return f}},18101:function(d,i,t){"use strict";t.d(i,{Q:function(){return Z}});var e=t(74512),a=t(32735),n=t(14911),r=t(8471),p=t(73290),j=t(65351),O=t(84642),E=t(8365);const w=(0,r.ZP)(j.G)`
|
|
2
|
+
&[aria-disabled='true'] {
|
|
3
|
+
${p.sg}
|
|
4
|
+
&:active {
|
|
5
|
+
${p.sg}
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
&:hover {
|
|
9
|
+
${p.yP}
|
|
10
|
+
}
|
|
11
|
+
&:active {
|
|
12
|
+
${p.tB}
|
|
13
|
+
}
|
|
14
|
+
${p.PD}
|
|
15
|
+
`,Z=a.forwardRef(({variant:x="default",startIcon:s,endIcon:c,disabled:l=!1,children:f,size:o="S",href:m,to:u,..._},h)=>{const v=m?"_blank":void 0,g=m?"noreferrer noopener":void 0,M=o==="S"?2:"10px",P=4;return(0,e.jsxs)(w,{ref:h,"aria-disabled":l,size:o,variant:x,target:v,rel:g,to:l?void 0:u,href:l?"#":m,background:"buttonPrimary600",borderColor:"buttonPrimary600",hasRadius:!0,gap:2,inline:!0,paddingBottom:M,paddingLeft:P,paddingRight:P,paddingTop:M,pointerEvents:l?"none":void 0,..._,as:u&&!l?n.OL:"a",children:[s&&(0,e.jsx)(O.k,{"aria-hidden":!0,children:s}),(0,e.jsx)(E.Z,{variant:o==="S"?"pi":void 0,fontWeight:"bold",textColor:"buttonNeutral0",children:f}),c&&(0,e.jsx)(O.k,{"aria-hidden":!0,children:c})]})})},63057:function(d,i,t){"use strict";t.d(i,{Q:function(){return r}});var e=t(74512),a=t(8471),n=t(74323);const r=({options:j,...O})=>(0,e.jsx)(n.NU,{...O,children:j.map(E=>"children"in E?(0,e.jsx)(n.Ab,{label:E.label,values:E.children.map(w=>w.value.toString()),children:E.children.map(w=>(0,e.jsx)(p,{value:w.value,children:w.label},w.value))},E.label):(0,e.jsx)(n.ML,{value:E.value,children:E.label},E.value))}),p=(0,a.ZP)(n.ML)`
|
|
16
|
+
padding-left: ${({theme:j})=>j.spaces[7]};
|
|
17
|
+
`},68080:function(d,i,t){"use strict";t.d(i,{z:function(){return s}});var e=t(74512),a=t(32735),n=t(91917),r=t(8471),p=t(37808),j=t(77981),O=t(84642),E=t(8365);const w=(0,r.ZP)(j.x)`
|
|
18
|
+
svg {
|
|
19
|
+
height: ${4/16}rem;
|
|
20
|
+
path {
|
|
21
|
+
fill: ${({theme:c})=>c.colors.neutral700};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`,Z=r.ZP.button`
|
|
25
|
+
border: none;
|
|
26
|
+
padding: 0;
|
|
27
|
+
background: transparent;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
`,x=r.ZP.div`
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
width: ${12/16}rem;
|
|
34
|
+
transform: rotateX(${({rotated:c})=>c?"0deg":"180deg"});
|
|
35
|
+
`,s=({label:c,children:l,id:f})=>{const[o,m]=(0,a.useState)(!0),u=(0,p.M)(f),_=()=>{m(h=>!h)};return(0,e.jsxs)(j.x,{children:[(0,e.jsx)(w,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:(0,e.jsx)(O.k,{justifyContent:"space-between",children:(0,e.jsxs)(Z,{onClick:_,"aria-expanded":o,"aria-controls":u,children:[(0,e.jsx)(x,{rotated:o,children:(0,e.jsx)(n.Z,{"aria-hidden":!0})}),(0,e.jsx)(j.x,{paddingLeft:2,children:(0,e.jsx)(E.Z,{as:"span",fontWeight:"semiBold",textColor:"neutral800",children:c})})]})})}),o&&(0,e.jsx)("ul",{id:u,children:a.Children.map(l,(h,v)=>(0,e.jsx)("li",{children:h},v))})]})}},25919:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:(0,e.jsx)("path",{fill:"#212134",d:"M0 10.7c0-.11.09-.2.2-.2h18.06l-8.239-8.239a.2.2 0 0 1 0-.282L11.86.14a.2.2 0 0 1 .282 0L23.86 11.86a.2.2 0 0 1 0 .282L12.14 23.86a.2.2 0 0 1-.282 0L10.02 22.02a.2.2 0 0 1 0-.282L18.26 13.5H.2a.2.2 0 0 1-.2-.2v-2.6Z"})}),n=a},90984:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 34 25",...r,children:[(0,e.jsx)("rect",{width:33,height:23,x:.5,y:1,fill:"#EAF5FF",stroke:"#B8E1FF",rx:2.5}),(0,e.jsx)("path",{fill:"#0C75AF",d:"M18.901 9.828a1.043 1.043 0 1 0 0-2.086 1.043 1.043 0 0 0 0 2.086Z"}),(0,e.jsx)("path",{fill:"#0C75AF",d:"M19.703 8.785a.81.81 0 0 1-.512.748.814.814 0 0 1-.91-.239.804.804 0 0 1 .753-1.301.814.814 0 0 1 .669.792c.005.311.487.311.483 0a1.308 1.308 0 0 0-.867-1.215 1.288 1.288 0 0 0-1.4.39 1.296 1.296 0 0 0-.119 1.489c.283.468.83.697 1.364.596.597-.113 1.012-.664 1.021-1.258.005-.314-.477-.314-.482-.002ZM18.901 13.488a1.043 1.043 0 1 0 0-2.086 1.043 1.043 0 0 0 0 2.086Z"}),(0,e.jsx)("path",{fill:"#0C75AF",d:"M19.703 12.445a.81.81 0 0 1-.512.748.814.814 0 0 1-.91-.239.804.804 0 0 1 .753-1.301.812.812 0 0 1 .669.792c.005.311.487.311.483 0a1.307 1.307 0 0 0-.867-1.215 1.288 1.288 0 0 0-1.4.39 1.296 1.296 0 0 0-.119 1.489c.283.468.83.697 1.364.596.597-.113 1.012-.664 1.021-1.258.005-.314-.477-.314-.482-.002ZM18.901 17.247a1.043 1.043 0 1 0 0-2.086 1.043 1.043 0 0 0 0 2.086Z"}),(0,e.jsx)("path",{fill:"#0C75AF",d:"M19.703 16.204a.81.81 0 0 1-.512.748.814.814 0 0 1-.91-.239.804.804 0 0 1 .753-1.301.812.812 0 0 1 .669.792c.005.311.487.311.483 0a1.308 1.308 0 0 0-.867-1.215 1.288 1.288 0 0 0-1.4.39 1.296 1.296 0 0 0-.119 1.489c.283.468.83.698 1.364.596.597-.113 1.012-.664 1.021-1.258.005-.313-.477-.313-.482-.002ZM15.075 9.842a1.043 1.043 0 1 0 0-2.086 1.043 1.043 0 0 0 0 2.086Z"}),(0,e.jsx)("path",{fill:"#0C75AF",d:"M15.876 8.8a.81.81 0 0 1-.512.748.814.814 0 0 1-.91-.24.804.804 0 0 1 .753-1.301.81.81 0 0 1 .669.792c.005.312.488.312.483 0a1.308 1.308 0 0 0-.867-1.214 1.288 1.288 0 0 0-1.4.389 1.296 1.296 0 0 0-.119 1.49c.283.468.831.697 1.365.596.596-.114 1.011-.664 1.02-1.258.006-.314-.477-.314-.482-.003ZM15.075 13.503a1.043 1.043 0 1 0 0-2.086 1.043 1.043 0 0 0 0 2.086Z"}),(0,e.jsx)("path",{fill:"#0C75AF",d:"M15.876 12.46a.81.81 0 0 1-.512.748.814.814 0 0 1-.91-.24.804.804 0 0 1 .753-1.301.81.81 0 0 1 .669.792c.005.312.488.312.483 0a1.308 1.308 0 0 0-.867-1.214 1.288 1.288 0 0 0-1.4.389 1.296 1.296 0 0 0-.119 1.49c.283.468.831.697 1.365.596.596-.114 1.011-.664 1.02-1.258.006-.314-.477-.314-.482-.003ZM15.075 17.261a1.043 1.043 0 1 0 0-2.086 1.043 1.043 0 0 0 0 2.086Z"}),(0,e.jsx)("path",{fill:"#0C75AF",d:"M15.876 16.218a.81.81 0 0 1-.512.749.814.814 0 0 1-.91-.24.804.804 0 0 1 .753-1.301.808.808 0 0 1 .669.792c.005.312.488.312.483 0a1.308 1.308 0 0 0-.867-1.214 1.288 1.288 0 0 0-1.4.389 1.293 1.293 0 0 0-.119 1.487c.283.468.831.698 1.365.596.596-.113 1.011-.664 1.02-1.258.006-.311-.477-.311-.482 0Z"})]}),n=a},19999:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:(0,e.jsx)("path",{fill:"#212134",d:"M13 21v2.5l-3-2-3 2V21h-.5A3.5 3.5 0 0 1 3 17.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v17a1 1 0 0 1-1 1h-7Zm-6-2v-2h6v2h6v-3H6.5a1.5 1.5 0 1 0 0 3H7ZM7 5v2h2V5H7Zm0 3v2h2V8H7Zm0 3v2h2v-2H7Z"})}),n=a},19594:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:(0,e.jsx)("path",{fill:"#212134",fillRule:"evenodd",d:"M2.68 9.192c-.6.276-2.114 1.18-2.306 1.303a.792.792 0 0 0-.374.68v1.65a.797.797 0 0 0 .384.687c.254.16 1.73 1.042 2.306 1.303l.744 1.8c-.24.634-.67 2.333-.72 2.554a.797.797 0 0 0 .216.744l1.167 1.166a.801.801 0 0 0 .744.216l.03-.008c.36-.092 1.946-.498 2.523-.712l1.8.744c.276.6 1.181 2.115 1.304 2.307a.805.805 0 0 0 .679.374h1.649a.797.797 0 0 0 .686-.384c.16-.254 1.042-1.73 1.303-2.306l1.8-.744c.634.24 2.333.67 2.554.72a.797.797 0 0 0 .744-.216l1.166-1.167a.803.803 0 0 0 .216-.744l-.008-.03c-.092-.36-.498-1.946-.712-2.523l.744-1.8c.6-.276 2.115-1.181 2.307-1.304a.804.804 0 0 0 .374-.679v-1.649a.796.796 0 0 0-.382-.679c-.254-.16-1.73-1.041-2.306-1.303l-.744-1.8c.24-.634.67-2.333.72-2.554a.796.796 0 0 0-.216-.744l-1.166-1.173a.802.802 0 0 0-.744-.216l-.03.008c-.361.092-1.947.498-2.524.712l-1.8-.744c-.276-.6-1.18-2.115-1.303-2.307a.803.803 0 0 0-.68-.374h-1.65a.797.797 0 0 0-.68.382c-.16.254-1.041 1.73-1.303 2.306l-1.8.744c-.634-.24-2.333-.67-2.554-.72a.797.797 0 0 0-.744.216L2.921 4.094a.802.802 0 0 0-.216.744l.008.03c.092.361.498 1.947.712 2.524l-.744 1.8ZM12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z",clipRule:"evenodd"})}),n=a},23673:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...r,children:[(0,e.jsx)("rect",{width:31,height:23,x:.5,y:.5,fill:"#4945FF",stroke:"#4945FF",rx:2.5}),(0,e.jsx)("path",{fill:"#fff",d:"M15.328 10.54h1.723c.012-.089.012-.165.012-.253 0-1.676-1.471-2.959-3.41-2.959-2.696 0-4.647 2.22-4.647 5.344 0 2.15 1.383 3.545 3.504 3.545 2.045 0 3.597-1.154 3.967-2.936h-1.752c-.276.826-1.102 1.371-2.063 1.371-1.137 0-1.846-.802-1.846-2.103 0-2.08 1.19-3.65 2.725-3.65 1.037 0 1.746.62 1.787 1.558v.082ZM21.053 16l1.488-6.943h2.531l.31-1.512H18.54l-.31 1.512h2.53L19.272 16h1.782Z"})]}),n=a},32880:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:[(0,e.jsx)("path",{fill:"#212134",d:"M11.987 23.036v-.964H1.876V1.876h10.111V0H0v24h11.987v-.964Z"}),(0,e.jsx)("path",{fill:"#212134",d:"M8 11.2c0-.11.09-.2.2-.2h11.973l-5.445-5.445a.2.2 0 0 1 0-.283l1.13-1.13a.2.2 0 0 1 .283 0l7.718 7.717a.2.2 0 0 1 0 .282L16.14 19.86a.2.2 0 0 1-.282 0l-1.13-1.13a.2.2 0 0 1 0-.284L20.172 13H8.2a.2.2 0 0 1-.2-.2v-1.6Z"})]}),n=a},18981:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:(0,e.jsx)("path",{fill:"#212134",d:"M6.455 19 2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455ZM7 10v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Z"})}),n=a},39544:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:(0,e.jsx)("path",{fill:"#212134",d:"M1.946 9.315c-.522-.174-.527-.455.01-.634l19.087-6.362c.53-.176.832.12.684.638l-5.454 19.086c-.15.529-.455.547-.679.045L12 14l6-8-8 6-8.054-2.685Z"})}),n=a},60389:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...r,children:[(0,e.jsx)("path",{fill:"#FDF4DC",stroke:"#FAE7B9",d:"M.5 3A2.5 2.5 0 0 1 3 .5h26A2.5 2.5 0 0 1 31.5 3v18a2.5 2.5 0 0 1-2.5 2.5H3A2.5 2.5 0 0 1 .5 21V3Z"}),(0,e.jsx)("path",{fill:"#D9822F",d:"M20.158 11.995c0-.591-.463-1.073-1.045-1.11H13.53V9.245a2.05 2.05 0 0 1 2.046-2.049c1.13 0 2.048.784 2.049 1.913 0 .24.194.433.433.433h.33a.433.433 0 0 0 .433-.433C18.82 7.32 17.365 5.999 15.577 6a3.246 3.246 0 0 0-3.241 3.244v1.642h-.223c-.615 0-1.113.499-1.113 1.114v4.887c.001.615.5 1.113 1.115 1.113l6.93-.003c.616 0 1.114-.5 1.114-1.115l-.001-4.887Z"})]}),n=a},58518:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 8 8",...r,children:(0,e.jsx)("path",{fill:"#212134",d:"M2 .93c0-.4.45-.63.78-.41l4.6 3.06c.3.2.3.64 0 .84l-4.6 3.06A.5.5 0 0 1 2 7.07V.93Z"})}),n=a},601:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 25 25",...r,children:(0,e.jsx)("path",{fill:"#212134",fillRule:"evenodd",d:"m13.58.448 3.177 3.176L18.66 1.72a3.267 3.267 0 1 1 4.62 4.62l-1.904 1.904 3.175 3.175a1.528 1.528 0 0 1 0 2.162l-3.175 3.175L20.2 15.58a3.267 3.267 0 1 0-4.62 4.62l1.177 1.177-3.176 3.176a1.528 1.528 0 0 1-2.162 0l-3.175-3.175-1.902 1.902a3.267 3.267 0 1 1-4.62-4.62l1.902-1.902-3.176-3.176a1.528 1.528 0 0 1 0-2.162l3.176-3.176L4.8 9.42a3.267 3.267 0 0 0 4.62-4.62L8.244 3.623 11.419.448a1.528 1.528 0 0 1 2.162 0Z",clipRule:"evenodd"})}),n=a},47372:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 15 14",...r,children:(0,e.jsx)("path",{fill:"#212134",d:"M5.08 4.1c0-1.19 1.18-2.17 2.42-2.17s2.43.98 2.43 2.17c0 1.1-.56 1.61-1.31 2.28l-.03.03c-.75.65-1.66 1.47-1.66 3.09a.57.57 0 1 0 1.15 0c0-1.08.55-1.6 1.3-2.26l.02-.02c.75-.66 1.67-1.48 1.67-3.12C11.07 2.13 9.22.78 7.5.78 5.78.78 3.93 2.13 3.93 4.1a.57.57 0 1 0 1.15 0Zm2.42 9.26a.88.88 0 1 0 0-1.75.88.88 0 0 0 0 1.75Z"})}),n=a},53226:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...r,children:[(0,e.jsx)("rect",{width:31,height:23,x:.5,y:.5,fill:"#EAF5FF",stroke:"#B8E1FF",rx:2.5}),(0,e.jsx)("path",{fill:"#0C75AF",fillRule:"evenodd",d:"M19.286 9.286v-.857a.397.397 0 0 0-.138-.302A.465.465 0 0 0 18.82 8h-8.357a.465.465 0 0 0-.326.127.397.397 0 0 0-.138.302v.857c0 .116.046.216.138.301.092.085.2.127.326.127h8.357a.465.465 0 0 0 .327-.127.397.397 0 0 0 .138-.301Zm2.785 2.713v.857a.397.397 0 0 1-.137.301.465.465 0 0 1-.327.128H10.464a.465.465 0 0 1-.326-.128.397.397 0 0 1-.138-.301v-.857c0-.116.046-.217.138-.302a.465.465 0 0 1 .326-.127h11.143c.126 0 .235.043.327.127a.397.397 0 0 1 .137.302Zm-1.857 3.574v.857a.397.397 0 0 1-.137.302.465.465 0 0 1-.327.127h-9.286a.465.465 0 0 1-.326-.127.397.397 0 0 1-.138-.302v-.857c0-.116.046-.216.138-.301a.465.465 0 0 1 .326-.127h9.286c.126 0 .235.042.326.127a.397.397 0 0 1 .138.301Z",clipRule:"evenodd"})]}),n=a},90230:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:(0,e.jsx)("path",{fill:"#212134",fillRule:"evenodd",d:"M23.12 3.907c-.025 0-.055-.005-.087-.011a.72.72 0 0 0-.13-.016H5.929l-.27-1.805A2.413 2.413 0 0 0 3.26 0H1.078C.485 0 0 .485 0 1.078c0 .593.485 1.078 1.078 1.078H3.26c.135 0 .243.107.27.242L5.2 13.77a2.954 2.954 0 0 0 2.91 2.506h11.21c1.401 0 2.614-.997 2.91-2.371l1.752-8.757a1.065 1.065 0 0 0-.863-1.24Zm-4.932 13.927a2.8 2.8 0 0 0-2.802 2.802 2.8 2.8 0 0 0 2.802 2.802 2.8 2.8 0 0 0 2.803-2.802c-.027-1.536-1.267-2.802-2.803-2.802Zm-9.646 0a2.786 2.786 0 0 1 2.775 2.667c.081 1.536-1.132 2.83-2.667 2.91h-.054a2.762 2.762 0 0 1-2.749-2.667 2.819 2.819 0 0 1 2.695-2.91Z",clipRule:"evenodd"})}),n=a},12171:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...r,children:[(0,e.jsx)("rect",{width:31,height:23,x:.5,y:.5,fill:"#0C75AF",stroke:"#0C75AF",rx:2.5}),(0,e.jsx)("path",{fill:"#fff",d:"M8.523 13.586c.106 1.64 1.418 2.63 3.34 2.63 2.098 0 3.516-1.113 3.516-2.788 0-1.143-.65-1.846-2.086-2.297l-.867-.27c-.797-.252-1.137-.597-1.137-1.066 0-.598.633-1.031 1.459-1.031.873 0 1.512.474 1.617 1.183h1.67c-.053-1.54-1.36-2.619-3.217-2.619-1.91 0-3.328 1.131-3.328 2.678 0 1.09.715 1.922 1.963 2.309l.879.275c.914.287 1.266.592 1.266 1.084 0 .662-.657 1.107-1.606 1.107-.914 0-1.635-.469-1.758-1.195h-1.71ZM20.107 16l1.489-6.943h2.531l.31-1.512h-6.843l-.31 1.512h2.53L18.326 16h1.781Z"})]}),n=a},49551:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:[(0,e.jsx)("path",{fill:"#181826",d:"m10.614 17.796.878-2.01a7.742 7.742 0 0 1 3.94-3.992l2.416-1.072c.768-.341.768-1.458 0-1.8l-2.34-1.038a7.747 7.747 0 0 1-3.997-4.125l-.89-2.142a.946.946 0 0 0-1.758 0l-.889 2.142a7.747 7.747 0 0 1-3.997 4.125l-2.34 1.039c-.768.34-.768 1.458 0 1.799l2.415 1.072a7.742 7.742 0 0 1 3.94 3.991l.878 2.01a.946.946 0 0 0 1.744 0Zm8.787 4.894.247-.566a4.365 4.365 0 0 1 2.221-2.25l.76-.339a.53.53 0 0 0 0-.963l-.717-.319a4.368 4.368 0 0 1-2.253-2.326l-.254-.611a.507.507 0 0 0-.942 0l-.254.61a4.368 4.368 0 0 1-2.253 2.327l-.718.32a.53.53 0 0 0 0 .962l.76.338a4.365 4.365 0 0 1 2.222 2.251l.247.566c.18.414.754.414.934 0Z"}),(0,e.jsx)("path",{fill:"#181826",d:"m10.614 17.796.878-2.01a7.742 7.742 0 0 1 3.94-3.992l2.416-1.072c.768-.341.768-1.458 0-1.8l-2.34-1.038a7.747 7.747 0 0 1-3.997-4.125l-.89-2.142a.946.946 0 0 0-1.758 0l-.889 2.142a7.747 7.747 0 0 1-3.997 4.125l-2.34 1.039c-.768.34-.768 1.458 0 1.799l2.415 1.072a7.742 7.742 0 0 1 3.94 3.991l.878 2.01a.946.946 0 0 0 1.744 0Zm8.787 4.894.247-.566a4.365 4.365 0 0 1 2.221-2.25l.76-.339a.53.53 0 0 0 0-.963l-.717-.319a4.368 4.368 0 0 1-2.253-2.326l-.254-.611a.507.507 0 0 0-.942 0l-.254.61a4.368 4.368 0 0 1-2.253 2.327l-.718.32a.53.53 0 0 0 0 .962l.76.338a4.365 4.365 0 0 1 2.222 2.251l.247.566c.18.414.754.414.934 0Z"})]}),n=a},22356:function(d,i,t){"use strict";t.d(i,{Z:function(){return n}});var e=t(74512);const a=r=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...r,children:(0,e.jsx)("path",{fill:"#212134",fillRule:"evenodd",d:"M23.707.297A1 1 0 0 0 23 .004h-2a13.907 13.907 0 0 0-5.38 1.077 1 1 0 0 0-.615.923V4.92a.035.035 0 0 1-.022.038l-2-1.47a1 1 0 0 0-1.265.052A14 14 0 0 0 7 14.004v1.585l-2.707 2.707a1 1 0 1 0 1.415 1.415l2.707-2.708H10a14.014 14.014 0 0 0 14-14v-2a1 1 0 0 0-.293-.706ZM18 23.999H3a3 3 0 0 1-3-3V6A3 3 0 0 1 3 3h3a1 1 0 1 1 0 2H3a1 1 0 0 0-1 1v15a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-3a1 1 0 1 1 2 0v3a3 3 0 0 1-3 3Z",clipRule:"evenodd"})}),n=a}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1227],{21227:function(A,a,t){t.d(a,{ReviewWorkflowsAssigneeEE:function(){return f},ReviewWorkflowsStageEE:function(){return O}});var e=t(32735),s=t(84642),T=t(77981),i=t(8365),r=t(96192),E=t(60216),n=t.n(E),o=t(2121),u=t(68886);function O({color:l,name:c}){const{themeColorName:_}=(0,u.k)(l);return e.createElement(s.k,{alignItems:"center",gap:2,maxWidth:(0,r.Q1)(300)},e.createElement(T.x,{height:2,background:l,borderColor:_==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2}),e.createElement(i.Z,{fontWeight:"regular",textColor:"neutral700",ellipsis:!0},c))}O.defaultProps={color:o.FT},O.propTypes={color:n().string,name:n().string.isRequired};var S=t(67879),W=t(69997);function f({user:l}){const{formatMessage:c}=(0,S.Z)();return e.createElement(i.Z,{textColor:"neutral800"},(0,W.Gf)(l,c))}f.propTypes={user:n().shape({firstname:n().string,lastname:n().string,username:n().string}).isRequired}},2121:function(A,a,t){t.d(a,{$k:function(){return l},Ef:function(){return v},FT:function(){return R},Nj:function(){return W},Ot:function(){return O},QM:function(){return o},VS:function(){return c},_X:function(){return C},bc:function(){return S},gu:function(){return T},k_:function(){return f},lv:function(){return _},qZ:function(){return n},rg:function(){return r},sN:function(){return s},uL:function(){return g},x4:function(){return u},yq:function(){return i},zn:function(){return E}});var e=t(41865);const s="settings_review-workflows",T="Settings/Review_Workflows/RESET_WORKFLOW",i="Settings/Review_Workflows/SET_CONTENT_TYPES",r="Settings/Review_Workflows/SET_IS_LOADING",E="Settings/Review_Workflows/SET_ROLES",n="Settings/Review_Workflows/SET_WORKFLOW",o="Settings/Review_Workflows/SET_WORKFLOWS",u="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",O="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",S="Settings/Review_Workflows/WORKFLOW_CLONE_STAGE",W="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",f="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGES",l="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",c="Settings/Review_Workflows/WORKFLOW_UPDATE",_={primary600:"Blue",primary200:"Lilac",alternative600:"Violet",alternative200:"Lavender",success600:"Green",success200:"Pale Green",danger500:"Cherry",danger200:"Pink",warning600:"Orange",warning200:"Yellow",secondary600:"Teal",secondary200:"Baby Blue",neutral400:"Gray",neutral0:"White"},R=e.W.colors.primary600,g={STAGE:"stage"},v="numberOfWorkflows",C="stagesPerWorkflow"},68886:function(A,a,t){t.d(a,{k:function(){return T},s:function(){return i}});var e=t(41865),s=t(2121);function T(r){if(!r)return null;const n=Object.entries(e.W.colors).filter(([,o])=>o.toUpperCase()===r.toUpperCase()).reduce((o,[u])=>(s.lv?.[u]&&(o=u),o),null);return n?{themeColorName:n,name:s.lv[n]}:null}function i(){return Object.entries(s.lv).map(([r,E])=>({hex:e.W.colors[r].toUpperCase(),name:E}))}}}]);
|