@strapi/admin 4.11.4 → 4.12.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/constants.js +83 -83
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +8 -5
- package/admin/src/content-manager/components/Inputs/index.js +3 -47
- package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +34 -37
- package/admin/src/content-manager/pages/EditSettingsView/components/ModalForm.js +0 -27
- package/admin/src/content-manager/pages/EditView/Information/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/InformationBox/InformationBoxCE.js +1 -2
- package/admin/src/content-manager/pages/EditView/InformationBox/index.js +1 -3
- package/admin/src/content-manager/pages/EditView/index.js +14 -2
- package/admin/src/content-manager/pages/ListView/components/TableRows/index.js +93 -14
- package/admin/src/content-manager/pages/ListView/index.js +65 -59
- package/admin/src/content-manager/pages/ListView/utils/buildValidGetParams.js +30 -0
- package/admin/src/content-manager/pages/ListView/utils/index.js +1 -1
- package/admin/src/content-manager/utils/mergeMetasWithSchema.js +5 -1
- package/admin/src/hooks/index.js +0 -1
- package/admin/src/hooks/useAdminUsers/useAdminUsers.js +3 -3
- package/admin/src/hooks/useEnterprise/useEnterprise.js +4 -4
- package/admin/src/hooks/useSettingsMenu/index.js +35 -21
- package/admin/src/pages/App/index.js +28 -23
- package/admin/src/pages/AuthPage/components/Login/index.js +3 -5
- package/admin/src/pages/AuthPage/components/Register/index.js +5 -1
- package/admin/src/pages/AuthPage/constants.js +3 -2
- package/admin/src/pages/AuthPage/index.js +18 -1
- package/admin/src/pages/HomePage/index.js +19 -7
- package/admin/src/pages/ProfilePage/index.js +12 -12
- package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +13 -11
- package/admin/src/pages/SettingsPage/components/Tokens/TokenBox/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +17 -1
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +16 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/CreateAction/index.js +2 -4
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +15 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/index.js +36 -5
- package/admin/src/pages/SettingsPage/pages/Users/components/MagicLink/index.js +3 -5
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/index.js +1 -3
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +16 -1
- package/admin/src/translations/zh-Hans.json +1 -1
- package/build/0cd5f8915b265d5b1856.png +0 -0
- package/build/1049.758a01f5.chunk.js +1 -0
- package/build/{3528.4845cf92.chunk.js → 1386.762d6eb8.chunk.js} +1 -1
- package/build/1727.b49f0713.chunk.js +1 -0
- package/build/190.66d89241.chunk.js +117 -0
- package/build/{5563.86f9aa9c.chunk.js → 2225.15d1df72.chunk.js} +3 -3
- package/build/2379.d33a2e16.chunk.js +1 -0
- package/build/2395.b0419a54.chunk.js +26 -0
- package/build/2801.18ac397d.chunk.js +1 -0
- package/build/{7394.423886bd.chunk.js → 3100.21c343fa.chunk.js} +1 -1
- package/build/311.cb0884bb.chunk.js +1 -0
- package/build/3483.e182b190.chunk.js +1 -0
- package/build/3984.ea7b8036.chunk.js +1 -0
- package/build/4546.ff9fdf30.chunk.js +1 -0
- package/build/502.ccb38223.chunk.js +1 -0
- package/build/5483.ed2c7efa.chunk.js +6 -0
- package/build/{5542.c62d0daf.chunk.js → 5542.2415a393.chunk.js} +6 -6
- package/build/6158.f9d82db9.chunk.js +1 -0
- package/build/7030.b98dcedf.chunk.js +1 -0
- package/build/7464.c6d0565c.chunk.js +1 -0
- package/build/8276.23e0763b.chunk.js +26 -0
- package/build/918.54414509.chunk.js +1 -0
- package/build/{9932.7e2b71de.chunk.js → 9932.b5a3bb3a.chunk.js} +81 -81
- package/build/9944.7af075a5.chunk.js +26 -0
- package/build/{Admin-authenticatedApp.cb649fc1.chunk.js → Admin-authenticatedApp.2ffa318a.chunk.js} +5 -5
- package/build/Admin_InternalErrorPage.f45f2462.chunk.js +1 -0
- package/build/{Admin_homePage.be30ef4e.chunk.js → Admin_homePage.ac9dfb86.chunk.js} +23 -15
- package/build/{Admin_marketplace.74a58e20.chunk.js → Admin_marketplace.f0b87fce.chunk.js} +1 -1
- package/build/{Admin_pluginsPage.ce464189.chunk.js → Admin_pluginsPage.8728ff6e.chunk.js} +1 -1
- package/build/{Admin_profilePage.2131eb68.chunk.js → Admin_profilePage.a968035f.chunk.js} +2 -2
- package/build/Admin_settingsPage.3ad19487.chunk.js +79 -0
- package/build/Upload_ConfigureTheView.345ac1e0.chunk.js +1 -0
- package/build/admin-app.088bcd33.chunk.js +36 -0
- package/build/{admin-edit-roles-page.3fdd6b9d.chunk.js → admin-edit-roles-page.a49b9f4f.chunk.js} +4 -4
- package/build/admin-edit-users.67704088.chunk.js +10 -0
- package/build/{admin-roles-list.e17b00d7.chunk.js → admin-roles-list.0c129e98.chunk.js} +1 -1
- package/build/admin-users.3279ffb0.chunk.js +11 -0
- package/build/api-tokens-create-page.46c2ea84.chunk.js +1 -0
- package/build/{api-tokens-edit-page.9a1dd2fa.chunk.js → api-tokens-edit-page.58139df9.chunk.js} +1 -1
- package/build/{api-tokens-list-page.a103f526.chunk.js → api-tokens-list-page.505bf7e0.chunk.js} +2 -2
- package/build/audit-logs-settings-page.4b422831.chunk.js +1 -0
- package/build/content-manager.9b569036.chunk.js +1094 -0
- package/build/{content-type-builder-list-view.a200a358.chunk.js → content-type-builder-list-view.bf9be456.chunk.js} +9 -9
- package/build/content-type-builder-translation-en-json.38e20391.chunk.js +1 -0
- package/build/{content-type-builder-translation-zh-json.ad24dbeb.chunk.js → content-type-builder-translation-zh-json.958d90e1.chunk.js} +1 -1
- package/build/content-type-builder.3963fb2d.chunk.js +166 -0
- package/build/{email-settings-page.45695daa.chunk.js → email-settings-page.d494d1eb.chunk.js} +2 -2
- package/build/{i18n-settings-page.29308d0b.chunk.js → i18n-settings-page.47f78016.chunk.js} +1 -1
- package/build/index.html +1 -1
- package/build/main.98c989b0.js +2908 -0
- package/build/review-workflows-settings-create-view.60bc516c.chunk.js +1 -0
- package/build/review-workflows-settings-edit-view.898ea409.chunk.js +1 -0
- package/build/review-workflows-settings-list-view.240cacdf.chunk.js +56 -0
- package/build/runtime~main.44bf2a37.js +2 -0
- package/build/sso-settings-page.ed6f3f15.chunk.js +1 -0
- package/build/transfer-tokens-create-page.1597e6ab.chunk.js +1 -0
- package/build/transfer-tokens-edit-page.8741529f.chunk.js +1 -0
- package/build/{transfer-tokens-list-page.7237443d.chunk.js → transfer-tokens-list-page.22147d2c.chunk.js} +2 -2
- package/build/upload-settings.cac210a0.chunk.js +14 -0
- package/build/upload.8d01c525.chunk.js +26 -0
- package/build/{users-advanced-settings-page.750b1f76.chunk.js → users-advanced-settings-page.18379a56.chunk.js} +1 -1
- package/build/users-email-settings-page.a87978e5.chunk.js +9 -0
- package/build/users-providers-settings-page.8876c1ee.chunk.js +14 -0
- package/build/{users-roles-settings-page.1f505119.chunk.js → users-roles-settings-page.0431f48c.chunk.js} +2 -2
- package/build/webhook-edit-page.a91f27a1.chunk.js +33 -0
- package/build/{webhook-list-page.940a40f1.chunk.js → webhook-list-page.65e1b5bb.chunk.js} +1 -1
- package/build/{zh-Hans-json.4cfef87d.chunk.js → zh-Hans-json.fada6f40.chunk.js} +1 -1
- package/ee/admin/constants.js +14 -14
- package/ee/admin/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +88 -31
- package/ee/admin/content-manager/pages/EditView/InformationBox/index.js +1 -3
- package/ee/admin/content-manager/{components/DynamicTable/CellContent/ReviewWorkflowsStage → pages/ListView/ReviewWorkflowsColumn}/ReviewWorkflowsStageEE.js +7 -2
- package/ee/admin/content-manager/pages/ListView/ReviewWorkflowsColumn/constants.js +24 -0
- package/ee/admin/content-manager/pages/ListView/ReviewWorkflowsColumn/index.js +1 -0
- package/ee/admin/hooks/useLicenseLimitNotification/index.js +17 -6
- package/ee/admin/hooks/useLicenseLimits/index.js +1 -32
- package/ee/admin/hooks/useLicenseLimits/useLicenseLimits.js +44 -0
- package/ee/admin/pages/AuthPage/components/Login/index.js +3 -5
- package/ee/admin/pages/HomePage/index.js +11 -0
- package/ee/admin/pages/SettingsPage/constants.js +25 -1
- package/ee/admin/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo/index.js +7 -7
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useAuditLogsData.js +6 -4
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/actions/index.js +19 -4
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Layout/Layout.js +65 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Layout/index.js +1 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal/LimitsModal.js +111 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal/assets/balloon.png +0 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/LimitsModal/index.js +3 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/ProtectedPage/ProtectedPage.js +21 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/ProtectedPage/index.js +1 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stage/Stage.js +5 -5
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/WorkflowAttributes/WorkflowAttributes.js +110 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/WorkflowAttributes/index.js +1 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/constants.js +3 -1
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/hooks/useReviewWorkflows.js +13 -19
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/CreateView.js +246 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/index.js +13 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/EditView.js +287 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/index.js +13 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/ListView.js +382 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/index.js +13 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/reducer/index.js +53 -23
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/utils/getWorkflowValidationSchema.js +43 -28
- package/ee/admin/pages/SettingsPage/pages/Users/ListPage/CreateAction/index.js +11 -6
- package/ee/admin/pages/SettingsPage/pages/Users/ListPage/index.js +13 -0
- package/ee/admin/pages/SettingsPage/pages/Users/components/MagicLink/index.js +3 -5
- package/ee/admin/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/index.js +1 -3
- package/ee/server/config/admin-actions.js +24 -0
- package/ee/server/constants/default-stages.json +8 -4
- package/ee/server/constants/default-workflow.json +3 -1
- package/ee/server/constants/workflows.js +10 -1
- package/ee/server/content-types/workflow/index.js +10 -0
- package/ee/server/content-types/workflow-stage/index.js +3 -1
- package/ee/server/controllers/admin.js +1 -0
- package/ee/server/controllers/workflows/index.js +135 -8
- package/ee/server/controllers/workflows/stages/index.js +38 -38
- package/ee/server/migrations/review-workflows-content-types.js +29 -0
- package/ee/server/migrations/review-workflows-deleted-ct-in-workflows.js +39 -0
- package/ee/server/migrations/review-workflows-stage-attribute.js +49 -0
- package/ee/server/migrations/review-workflows-stages-color.js +2 -2
- package/ee/server/migrations/review-workflows-workflow-name.js +21 -0
- package/ee/server/register.js +12 -2
- package/ee/server/routes/review-workflows.js +44 -10
- package/ee/server/services/index.js +1 -0
- package/ee/server/services/review-workflows/entity-service-decorator.js +8 -13
- package/ee/server/services/review-workflows/review-workflows.js +45 -53
- package/ee/server/services/review-workflows/stages.js +84 -46
- package/ee/server/services/review-workflows/validation.js +60 -0
- package/ee/server/services/review-workflows/workflows/content-types.js +80 -0
- package/ee/server/services/review-workflows/workflows/index.js +207 -0
- package/ee/server/utils/review-workflows.js +30 -25
- package/ee/server/validation/review-workflows.js +49 -10
- package/index.js +0 -14
- package/package.json +12 -21
- package/webpack.alias.js +0 -3
- package/webpack.config.js +1 -75
- package/admin/src/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/getTableColumn.js +0 -2
- package/admin/src/content-manager/pages/ListView/utils/buildQueryString.js +0 -36
- package/admin/src/content-manager/pages/ListView/utils/createPluginsFilter.js +0 -4
- package/admin/src/hooks/useLicenseLimits/index.js +0 -3
- package/admin/src/pages/App/utils/index.js +0 -3
- package/admin/src/pages/App/utils/unique-identifier.js +0 -12
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo/index.js +0 -5
- package/build/1386.3b2aa6a7.chunk.js +0 -3
- package/build/1799.44d2e264.chunk.js +0 -33
- package/build/1970.39a2d75e.chunk.js +0 -1
- package/build/3269.1ea0f5a6.chunk.js +0 -1
- package/build/5932.6a23b88c.chunk.js +0 -1
- package/build/7018.98feed67.chunk.js +0 -1
- package/build/7259.fb69d4bf.chunk.js +0 -1
- package/build/Admin_InternalErrorPage.8911cb49.chunk.js +0 -1
- package/build/Admin_settingsPage.4069bb8a.chunk.js +0 -79
- package/build/Upload_ConfigureTheView.7a1cb9c9.chunk.js +0 -1
- package/build/admin-app.fea867af.chunk.js +0 -61
- package/build/admin-edit-users.200551e3.chunk.js +0 -10
- package/build/admin-users.3b12dca2.chunk.js +0 -11
- package/build/api-tokens-create-page.3dd4e921.chunk.js +0 -1
- package/build/audit-logs-settings-page.f538490f.chunk.js +0 -1
- package/build/content-manager.c40f5ff9.chunk.js +0 -1088
- package/build/content-type-builder-translation-en-json.f592325b.chunk.js +0 -1
- package/build/content-type-builder.bd1bbff1.chunk.js +0 -166
- package/build/main.ee36abd9.js +0 -2927
- package/build/review-workflows-settings.93808ae0.chunk.js +0 -110
- package/build/runtime~main.efd966f6.js +0 -2
- package/build/sso-settings-page.0cdb96a6.chunk.js +0 -1
- package/build/transfer-tokens-create-page.de14cad4.chunk.js +0 -1
- package/build/transfer-tokens-edit-page.4f5e39af.chunk.js +0 -1
- package/build/upload-settings.cb6c14c3.chunk.js +0 -14
- package/build/upload.7e629643.chunk.js +0 -26
- package/build/users-email-settings-page.e9bcd865.chunk.js +0 -9
- package/build/users-providers-settings-page.a94253e9.chunk.js +0 -14
- package/build/webhook-edit-page.77ef4f1a.chunk.js +0 -33
- package/ee/admin/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/getTableColumn.js +0 -58
- package/ee/admin/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/index.js +0 -3
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/ProtectedPage.js +0 -20
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/ReviewWorkflows.js +0 -204
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/index.js +0 -3
- package/ee/server/services/review-workflows/workflows.js +0 -25
|
@@ -31,21 +31,24 @@ import NotFoundPage from '../NotFoundPage';
|
|
|
31
31
|
import UseCasePage from '../UseCasePage';
|
|
32
32
|
|
|
33
33
|
import { ROUTES_CE, SET_ADMIN_PERMISSIONS } from './constants';
|
|
34
|
-
import { getUID } from './utils';
|
|
35
34
|
|
|
36
35
|
const AuthenticatedApp = lazy(() =>
|
|
37
36
|
import(/* webpackChunkName: "Admin-authenticatedApp" */ '../../components/AuthenticatedApp')
|
|
38
37
|
);
|
|
39
38
|
|
|
40
39
|
function App() {
|
|
41
|
-
const adminPermissions = useEnterprise(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
const adminPermissions = useEnterprise(
|
|
41
|
+
ADMIN_PERMISSIONS_CE,
|
|
42
|
+
async () => (await import('../../../../ee/admin/constants')).ADMIN_PERMISSIONS_EE,
|
|
43
|
+
{
|
|
44
|
+
combine(cePermissions, eePermissions) {
|
|
45
|
+
// the `settings` NS e.g. are deep nested objects, that need a deep merge
|
|
46
|
+
return merge({}, cePermissions, eePermissions);
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
defaultValue: ADMIN_PERMISSIONS_CE,
|
|
50
|
+
}
|
|
51
|
+
);
|
|
49
52
|
const routes = useEnterprise(
|
|
50
53
|
ROUTES_CE,
|
|
51
54
|
async () => (await import('../../../../ee/admin/pages/App/constants')).ROUTES_EE,
|
|
@@ -113,8 +116,6 @@ function App() {
|
|
|
113
116
|
authLogo: prefixFileUrlWithBackendUrl(authLogo),
|
|
114
117
|
});
|
|
115
118
|
|
|
116
|
-
const deviceId = await getUID();
|
|
117
|
-
|
|
118
119
|
if (uuid) {
|
|
119
120
|
const {
|
|
120
121
|
data: { data: properties },
|
|
@@ -127,19 +128,23 @@ function App() {
|
|
|
127
128
|
|
|
128
129
|
try {
|
|
129
130
|
const event = 'didInitializeAdministration';
|
|
130
|
-
await post(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
131
|
+
await post(
|
|
132
|
+
'https://analytics.strapi.io/api/v2/track',
|
|
133
|
+
{
|
|
134
|
+
// This event is anonymous
|
|
135
|
+
event,
|
|
136
|
+
userId: '',
|
|
137
|
+
deviceId,
|
|
138
|
+
eventPropeties: {},
|
|
139
|
+
userProperties: { environment: appInfo.currentEnvironment },
|
|
140
|
+
groupProperties: { ...properties, projectId: uuid },
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
headers: {
|
|
144
|
+
'X-Strapi-Event': event,
|
|
145
|
+
},
|
|
141
146
|
}
|
|
142
|
-
|
|
147
|
+
);
|
|
143
148
|
} catch (e) {
|
|
144
149
|
// Silent.
|
|
145
150
|
}
|
|
@@ -6,7 +6,7 @@ import UnauthenticatedLayout from '../../../../layouts/UnauthenticatedLayout';
|
|
|
6
6
|
|
|
7
7
|
import BaseLogin from './BaseLogin';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
export const LoginCE = (loginProps) => {
|
|
10
10
|
return (
|
|
11
11
|
<UnauthenticatedLayout>
|
|
12
12
|
<BaseLogin {...loginProps} />
|
|
@@ -14,12 +14,10 @@ const Login = (loginProps) => {
|
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
LoginCE.defaultProps = {
|
|
18
18
|
onSubmit: (e) => e.preventDefault(),
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
LoginCE.propTypes = {
|
|
22
22
|
onSubmit: PropTypes.func,
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
export default Login;
|
|
@@ -64,7 +64,11 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
64
64
|
try {
|
|
65
65
|
const {
|
|
66
66
|
data: { data },
|
|
67
|
-
} = await get(`/admin/registration-info
|
|
67
|
+
} = await get(`/admin/registration-info`, {
|
|
68
|
+
params: {
|
|
69
|
+
registrationToken,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
68
72
|
|
|
69
73
|
if (data) {
|
|
70
74
|
setUserInfo(data);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { translatedErrors } from '@strapi/helper-plugin';
|
|
2
|
-
import Login from 'ee_else_ce/pages/AuthPage/components/Login';
|
|
3
2
|
import * as yup from 'yup';
|
|
4
3
|
|
|
5
4
|
import ForgotPassword from './components/ForgotPassword';
|
|
@@ -27,8 +26,10 @@ export const FORMS = {
|
|
|
27
26
|
schema: null,
|
|
28
27
|
inputsPrefix: '',
|
|
29
28
|
},
|
|
29
|
+
|
|
30
|
+
// the `Component` attribute is set after all forms and CE/EE components are loaded, but since we
|
|
31
|
+
// are here outside of a React component we can not use the hook directly
|
|
30
32
|
login: {
|
|
31
|
-
Component: Login,
|
|
32
33
|
endPoint: 'login',
|
|
33
34
|
fieldsToDisable: [],
|
|
34
35
|
fieldsToOmit: ['rememberMe'],
|
|
@@ -13,6 +13,7 @@ import useLocalesProvider from '../../components/LocalesProvider/useLocalesProvi
|
|
|
13
13
|
import { useEnterprise } from '../../hooks/useEnterprise';
|
|
14
14
|
import formatAPIErrors from '../../utils/formatAPIErrors';
|
|
15
15
|
|
|
16
|
+
import { LoginCE } from './components/Login';
|
|
16
17
|
import { FORMS } from './constants';
|
|
17
18
|
import init from './init';
|
|
18
19
|
import { initialState, reducer } from './reducer';
|
|
@@ -29,6 +30,10 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
29
30
|
params: { authType },
|
|
30
31
|
} = useRouteMatch('/auth/:authType');
|
|
31
32
|
const query = useQuery();
|
|
33
|
+
const Login = useEnterprise(
|
|
34
|
+
LoginCE,
|
|
35
|
+
async () => (await import('../../../../ee/admin/pages/AuthPage/components/Login')).LoginEE
|
|
36
|
+
);
|
|
32
37
|
const forms = useEnterprise(
|
|
33
38
|
FORMS,
|
|
34
39
|
async () => (await import('../../../../ee/admin/pages/AuthPage/constants')).FORMS,
|
|
@@ -50,7 +55,7 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
50
55
|
);
|
|
51
56
|
const CancelToken = axios.CancelToken;
|
|
52
57
|
const source = CancelToken.source();
|
|
53
|
-
const {
|
|
58
|
+
const { endPoint, fieldsToDisable, fieldsToOmit, inputsPrefix, schema, ...rest } =
|
|
54
59
|
forms?.[authType] ?? {};
|
|
55
60
|
|
|
56
61
|
useEffect(() => {
|
|
@@ -274,6 +279,18 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
274
279
|
);
|
|
275
280
|
}
|
|
276
281
|
|
|
282
|
+
if (Login) {
|
|
283
|
+
// Assign the component to render for the login form
|
|
284
|
+
forms.login.Component = Login;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// block rendering until the Login EE component is fully loaded
|
|
288
|
+
if (!Login) {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const { Component } = forms?.[authType] ?? {};
|
|
293
|
+
|
|
277
294
|
return (
|
|
278
295
|
<Component
|
|
279
296
|
{...rest}
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Box, Grid, GridItem, Layout, Main } from '@strapi/design-system';
|
|
9
9
|
import { LoadingIndicatorPage, useGuidedTour } from '@strapi/helper-plugin';
|
|
10
|
-
import useLicenseLimitNotification from 'ee_else_ce/hooks/useLicenseLimitNotification';
|
|
11
10
|
import { Helmet } from 'react-helmet';
|
|
12
11
|
import { FormattedMessage } from 'react-intl';
|
|
13
12
|
import { useHistory } from 'react-router-dom';
|
|
@@ -16,6 +15,7 @@ import styled from 'styled-components';
|
|
|
16
15
|
import GuidedTourHomepage from '../../components/GuidedTour/Homepage';
|
|
17
16
|
import isGuidedTourCompleted from '../../components/GuidedTour/utils/isGuidedTourCompleted';
|
|
18
17
|
import { useContentTypes } from '../../hooks/useContentTypes';
|
|
18
|
+
import { useEnterprise } from '../../hooks/useEnterprise';
|
|
19
19
|
|
|
20
20
|
import cornerOrnamentPath from './assets/corner-ornament.svg';
|
|
21
21
|
import ContentBlocks from './ContentBlocks';
|
|
@@ -32,15 +32,12 @@ const LogoContainer = styled(Box)`
|
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
export const HomePageCE = () => {
|
|
36
36
|
// Temporary until we develop the menu API
|
|
37
37
|
const { collectionTypes, singleTypes, isLoading: isLoadingForModels } = useContentTypes();
|
|
38
38
|
const { guidedTourState, isGuidedTourVisible, isSkipped } = useGuidedTour();
|
|
39
|
-
useLicenseLimitNotification();
|
|
40
|
-
|
|
41
39
|
const showGuidedTour =
|
|
42
40
|
!isGuidedTourCompleted(guidedTourState) && isGuidedTourVisible && !isSkipped;
|
|
43
|
-
|
|
44
41
|
const { push } = useHistory();
|
|
45
42
|
const handleClick = (e) => {
|
|
46
43
|
e.preventDefault();
|
|
@@ -92,4 +89,19 @@ const HomePage = () => {
|
|
|
92
89
|
);
|
|
93
90
|
};
|
|
94
91
|
|
|
95
|
-
|
|
92
|
+
function HomePageSwitch() {
|
|
93
|
+
const HomePage = useEnterprise(
|
|
94
|
+
HomePageCE,
|
|
95
|
+
// eslint-disable-next-line import/no-cycle
|
|
96
|
+
async () => (await import('../../../../ee/admin/pages/HomePage')).HomePageEE
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
// block rendering until the EE component is fully loaded
|
|
100
|
+
if (!HomePage) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return <HomePage />;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export default HomePageSwitch;
|
|
@@ -77,19 +77,14 @@ const ProfilePage = () => {
|
|
|
77
77
|
const { isLoading: isLoadingSSO, data: dataSSO } = useQuery(
|
|
78
78
|
['providers', 'isSSOLocked'],
|
|
79
79
|
async () => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
} = await get('/admin/providers/isSSOLocked');
|
|
80
|
+
const {
|
|
81
|
+
data: { data },
|
|
82
|
+
} = await get('/admin/providers/isSSOLocked');
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
isSSOLocked: false,
|
|
90
|
-
};
|
|
84
|
+
return data;
|
|
91
85
|
},
|
|
92
86
|
{
|
|
87
|
+
enabled: window.strapi.isEE && window.strapi.features.isEnabled('sso'),
|
|
93
88
|
onError() {
|
|
94
89
|
toggleNotification({
|
|
95
90
|
type: 'warning',
|
|
@@ -178,7 +173,7 @@ const ProfilePage = () => {
|
|
|
178
173
|
);
|
|
179
174
|
}
|
|
180
175
|
|
|
181
|
-
const hasLockedRole = dataSSO?.isSSOLocked;
|
|
176
|
+
const hasLockedRole = dataSSO?.isSSOLocked ?? false;
|
|
182
177
|
const { email, firstname, lastname, username, preferedLanguage } = data;
|
|
183
178
|
const initialData = { email, firstname, lastname, username, preferedLanguage, currentTheme };
|
|
184
179
|
|
|
@@ -203,7 +198,12 @@ const ProfilePage = () => {
|
|
|
203
198
|
<HeaderLayout
|
|
204
199
|
title={data.username || getFullName(data.firstname, data.lastname)}
|
|
205
200
|
primaryAction={
|
|
206
|
-
<Button
|
|
201
|
+
<Button
|
|
202
|
+
startIcon={<Check />}
|
|
203
|
+
loading={isSubmitting}
|
|
204
|
+
type="submit"
|
|
205
|
+
disabled={!dirty}
|
|
206
|
+
>
|
|
207
207
|
{formatMessage({ id: 'global.save', defaultMessage: 'Save' })}
|
|
208
208
|
</Button>
|
|
209
209
|
}
|
|
@@ -50,17 +50,19 @@ const SettingsNav = ({ menu }) => {
|
|
|
50
50
|
<SubNavSections>
|
|
51
51
|
{sections.map((section) => (
|
|
52
52
|
<SubNavSection key={section.id} label={formatMessage(section.intlLabel)}>
|
|
53
|
-
{section.links.map((link) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
{section.links.map((link) => {
|
|
54
|
+
return (
|
|
55
|
+
<SubNavLink
|
|
56
|
+
as={NavLink}
|
|
57
|
+
withBullet={link.hasNotification}
|
|
58
|
+
to={link.to}
|
|
59
|
+
onClick={() => handleClickOnLink(link.to)}
|
|
60
|
+
key={link.id}
|
|
61
|
+
>
|
|
62
|
+
{formatMessage(link.intlLabel)}
|
|
63
|
+
</SubNavLink>
|
|
64
|
+
);
|
|
65
|
+
})}
|
|
64
66
|
</SubNavSection>
|
|
65
67
|
))}
|
|
66
68
|
</SubNavSections>
|
|
@@ -22,18 +22,20 @@ import {
|
|
|
22
22
|
useTracking,
|
|
23
23
|
} from '@strapi/helper-plugin';
|
|
24
24
|
import { Check, ExternalLink } from '@strapi/icons';
|
|
25
|
-
import AdminSeatInfo from 'ee_else_ce/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo';
|
|
26
25
|
import { useIntl } from 'react-intl';
|
|
27
26
|
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
|
28
27
|
import { useSelector } from 'react-redux';
|
|
29
28
|
|
|
30
29
|
import { useConfigurations } from '../../../../hooks';
|
|
30
|
+
import { useEnterprise } from '../../../../hooks/useEnterprise';
|
|
31
31
|
import { selectAdminPermissions } from '../../../App/selectors';
|
|
32
32
|
|
|
33
33
|
import CustomizationInfos from './components/CustomizationInfos';
|
|
34
34
|
import { fetchProjectSettings, postProjectSettings } from './utils/api';
|
|
35
35
|
import getFormData from './utils/getFormData';
|
|
36
36
|
|
|
37
|
+
const AdminSeatInfoCE = () => null;
|
|
38
|
+
|
|
37
39
|
const ApplicationInfosPage = () => {
|
|
38
40
|
const inputsRef = useRef();
|
|
39
41
|
const toggleNotification = useNotification();
|
|
@@ -50,6 +52,15 @@ const ApplicationInfosPage = () => {
|
|
|
50
52
|
} = useAppInfo();
|
|
51
53
|
const { updateProjectSettings } = useConfigurations();
|
|
52
54
|
const permissions = useSelector(selectAdminPermissions);
|
|
55
|
+
const AdminSeatInfo = useEnterprise(
|
|
56
|
+
AdminSeatInfoCE,
|
|
57
|
+
async () =>
|
|
58
|
+
(
|
|
59
|
+
await import(
|
|
60
|
+
'../../../../../../ee/admin/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo'
|
|
61
|
+
)
|
|
62
|
+
).AdminSeatInfoEE
|
|
63
|
+
);
|
|
53
64
|
|
|
54
65
|
const {
|
|
55
66
|
allowedActions: { canRead, canUpdate },
|
|
@@ -105,6 +116,11 @@ const ApplicationInfosPage = () => {
|
|
|
105
116
|
});
|
|
106
117
|
};
|
|
107
118
|
|
|
119
|
+
// block rendering until the EE component is fully loaded
|
|
120
|
+
if (!AdminSeatInfo) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
|
|
108
124
|
return (
|
|
109
125
|
<Layout>
|
|
110
126
|
{/* TODO: Add missing translation */}
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
useOverlayBlocker,
|
|
25
25
|
} from '@strapi/helper-plugin';
|
|
26
26
|
import { ArrowLeft, Check } from '@strapi/icons';
|
|
27
|
-
import MagicLink from 'ee_else_ce/pages/SettingsPage/pages/Users/components/MagicLink';
|
|
28
27
|
import { Formik } from 'formik';
|
|
29
28
|
import get from 'lodash/get';
|
|
30
29
|
import omit from 'lodash/omit';
|
|
@@ -34,7 +33,9 @@ import { useIntl } from 'react-intl';
|
|
|
34
33
|
import { useHistory, useRouteMatch } from 'react-router-dom';
|
|
35
34
|
|
|
36
35
|
import { useAdminUsers } from '../../../../../hooks/useAdminUsers';
|
|
36
|
+
import { useEnterprise } from '../../../../../hooks/useEnterprise';
|
|
37
37
|
import { formatAPIErrors, getFullName } from '../../../../../utils';
|
|
38
|
+
import { MagicLinkCE } from '../components/MagicLink';
|
|
38
39
|
import SelectRoles from '../components/SelectRoles';
|
|
39
40
|
import { editValidation } from '../utils/validations/users';
|
|
40
41
|
|
|
@@ -52,11 +53,21 @@ const EditPage = ({ canUpdate }) => {
|
|
|
52
53
|
const { setUserDisplayName } = useAppInfo();
|
|
53
54
|
const toggleNotification = useNotification();
|
|
54
55
|
const { lockApp, unlockApp } = useOverlayBlocker();
|
|
56
|
+
const MagicLink = useEnterprise(
|
|
57
|
+
MagicLinkCE,
|
|
58
|
+
async () =>
|
|
59
|
+
(
|
|
60
|
+
await import(
|
|
61
|
+
'../../../../../../../ee/admin/pages/SettingsPage/pages/Users/components/MagicLink'
|
|
62
|
+
)
|
|
63
|
+
).MagicLinkEE
|
|
64
|
+
);
|
|
65
|
+
|
|
55
66
|
useFocusWhenNavigate();
|
|
56
67
|
|
|
57
68
|
const {
|
|
58
69
|
users: [user],
|
|
59
|
-
isLoading,
|
|
70
|
+
isLoading: isLoadingAdminUsers,
|
|
60
71
|
} = useAdminUsers(
|
|
61
72
|
{ id },
|
|
62
73
|
{
|
|
@@ -125,6 +136,8 @@ const EditPage = ({ canUpdate }) => {
|
|
|
125
136
|
unlockApp();
|
|
126
137
|
};
|
|
127
138
|
|
|
139
|
+
const isLoading = isLoadingAdminUsers || !MagicLink;
|
|
140
|
+
|
|
128
141
|
const headerLabel = isLoading
|
|
129
142
|
? { id: 'app.containers.Users.EditPage.header.label-loading', defaultMessage: 'Edit user' }
|
|
130
143
|
: { id: 'app.containers.Users.EditPage.header.label', defaultMessage: 'Edit {name}' };
|
|
@@ -189,7 +202,7 @@ const EditPage = ({ canUpdate }) => {
|
|
|
189
202
|
<HeaderLayout
|
|
190
203
|
primaryAction={
|
|
191
204
|
<Button
|
|
192
|
-
disabled={
|
|
205
|
+
disabled={isSubmitting || !canUpdate ? true : !dirty}
|
|
193
206
|
startIcon={<Check />}
|
|
194
207
|
loading={isSubmitting}
|
|
195
208
|
type="submit"
|
|
@@ -5,7 +5,7 @@ import { Envelop } from '@strapi/icons';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
export const CreateActionCE = ({ onClick }) => {
|
|
9
9
|
const { formatMessage } = useIntl();
|
|
10
10
|
|
|
11
11
|
return (
|
|
@@ -18,8 +18,6 @@ const CreateAction = ({ onClick }) => {
|
|
|
18
18
|
);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
CreateActionCE.propTypes = {
|
|
22
22
|
onClick: PropTypes.func.isRequired,
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
export default CreateAction;
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
useNotification,
|
|
21
21
|
useOverlayBlocker,
|
|
22
22
|
} from '@strapi/helper-plugin';
|
|
23
|
-
import MagicLink from 'ee_else_ce/pages/SettingsPage/pages/Users/components/MagicLink';
|
|
24
23
|
import { Formik } from 'formik';
|
|
25
24
|
import PropTypes from 'prop-types';
|
|
26
25
|
import { useIntl } from 'react-intl';
|
|
27
26
|
import { useMutation } from 'react-query';
|
|
28
27
|
|
|
29
28
|
import { useEnterprise } from '../../../../../../hooks/useEnterprise';
|
|
29
|
+
import { MagicLinkCE } from '../../components/MagicLink';
|
|
30
30
|
import SelectRoles from '../../components/SelectRoles';
|
|
31
31
|
|
|
32
32
|
import { FORM_LAYOUT, FORM_SCHEMA, FORM_INITIAL_VALUES, ROLE_LAYOUT, STEPPER } from './constants';
|
|
@@ -74,6 +74,15 @@ const ModalForm = ({ onSuccess, onToggle }) => {
|
|
|
74
74
|
defaultValue: FORM_INITIAL_VALUES,
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
+
const MagicLink = useEnterprise(
|
|
78
|
+
MagicLinkCE,
|
|
79
|
+
async () =>
|
|
80
|
+
(
|
|
81
|
+
await import(
|
|
82
|
+
'../../../../../../../../ee/admin/pages/SettingsPage/pages/Users/components/MagicLink'
|
|
83
|
+
)
|
|
84
|
+
).MagicLinkEE
|
|
85
|
+
);
|
|
77
86
|
const postMutation = useMutation(
|
|
78
87
|
(body) => {
|
|
79
88
|
return post('/admin/users', body);
|
|
@@ -142,6 +151,11 @@ const ModalForm = ({ onSuccess, onToggle }) => {
|
|
|
142
151
|
</Button>
|
|
143
152
|
);
|
|
144
153
|
|
|
154
|
+
// block rendering until the EE component is fully loaded
|
|
155
|
+
if (!MagicLink) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
|
|
145
159
|
return (
|
|
146
160
|
<ModalLayout onClose={onToggle} labelledBy="title">
|
|
147
161
|
<ModalHeader>
|
|
@@ -12,8 +12,6 @@ import {
|
|
|
12
12
|
useNotification,
|
|
13
13
|
useRBAC,
|
|
14
14
|
} from '@strapi/helper-plugin';
|
|
15
|
-
import useLicenseLimitNotification from 'ee_else_ce/hooks/useLicenseLimitNotification';
|
|
16
|
-
import CreateAction from 'ee_else_ce/pages/SettingsPage/pages/Users/ListPage/CreateAction';
|
|
17
15
|
import qs from 'qs';
|
|
18
16
|
import { useIntl } from 'react-intl';
|
|
19
17
|
import { useMutation, useQueryClient } from 'react-query';
|
|
@@ -21,9 +19,11 @@ import { useSelector } from 'react-redux';
|
|
|
21
19
|
import { useLocation } from 'react-router-dom';
|
|
22
20
|
|
|
23
21
|
import { useAdminUsers } from '../../../../../hooks/useAdminUsers';
|
|
22
|
+
import { useEnterprise } from '../../../../../hooks/useEnterprise';
|
|
24
23
|
import { selectAdminPermissions } from '../../../../App/selectors';
|
|
25
24
|
import Filters from '../../../components/Filters';
|
|
26
25
|
|
|
26
|
+
import { CreateActionCE } from './CreateAction';
|
|
27
27
|
import TableRows from './DynamicTable/TableRows';
|
|
28
28
|
import ModalForm from './ModalForm';
|
|
29
29
|
import PaginationFooter from './PaginationFooter';
|
|
@@ -32,7 +32,7 @@ import tableHeaders from './utils/tableHeaders';
|
|
|
32
32
|
|
|
33
33
|
const EE_LICENSE_LIMIT_QUERY_KEY = ['ee', 'license-limit-info'];
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
export const UserListPageCE = () => {
|
|
36
36
|
const { post } = useFetchClient();
|
|
37
37
|
const { formatAPIError } = useAPIErrorHandler();
|
|
38
38
|
const [isModalOpened, setIsModalOpen] = useState(false);
|
|
@@ -45,7 +45,6 @@ const ListPage = () => {
|
|
|
45
45
|
const { formatMessage } = useIntl();
|
|
46
46
|
const { search } = useLocation();
|
|
47
47
|
useFocusWhenNavigate();
|
|
48
|
-
useLicenseLimitNotification();
|
|
49
48
|
const {
|
|
50
49
|
users,
|
|
51
50
|
pagination,
|
|
@@ -55,6 +54,15 @@ const ListPage = () => {
|
|
|
55
54
|
} = useAdminUsers(qs.parse(search, { ignoreQueryPrefix: true }), {
|
|
56
55
|
enabled: canRead,
|
|
57
56
|
});
|
|
57
|
+
const CreateAction = useEnterprise(
|
|
58
|
+
CreateActionCE,
|
|
59
|
+
async () =>
|
|
60
|
+
(
|
|
61
|
+
await import(
|
|
62
|
+
'../../../../../../../ee/admin/pages/SettingsPage/pages/Users/ListPage/CreateAction'
|
|
63
|
+
)
|
|
64
|
+
).CreateActionEE
|
|
65
|
+
);
|
|
58
66
|
|
|
59
67
|
const headers = tableHeaders.map((header) => ({
|
|
60
68
|
...header,
|
|
@@ -97,6 +105,11 @@ const ListPage = () => {
|
|
|
97
105
|
}
|
|
98
106
|
);
|
|
99
107
|
|
|
108
|
+
// block rendering until the EE component is fully loaded
|
|
109
|
+
if (!CreateAction) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
100
113
|
return (
|
|
101
114
|
<Main aria-busy={isLoading}>
|
|
102
115
|
<SettingsPageTitle name="Users" />
|
|
@@ -166,4 +179,22 @@ const ListPage = () => {
|
|
|
166
179
|
);
|
|
167
180
|
};
|
|
168
181
|
|
|
169
|
-
|
|
182
|
+
// component which determines whether this page should render the CE or EE page
|
|
183
|
+
const UsersListPageSwitch = () => {
|
|
184
|
+
const UsersListPage = useEnterprise(
|
|
185
|
+
UserListPageCE,
|
|
186
|
+
async () =>
|
|
187
|
+
// eslint-disable-next-line import/no-cycle
|
|
188
|
+
(await import('../../../../../../../ee/admin/pages/SettingsPage/pages/Users/ListPage'))
|
|
189
|
+
.UserListPageEE
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
// block rendering until the EE component is fully loaded
|
|
193
|
+
if (!UsersListPage) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return <UsersListPage />;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export default UsersListPageSwitch;
|
|
@@ -7,7 +7,7 @@ import basename from '../../../../../../core/utils/basename';
|
|
|
7
7
|
|
|
8
8
|
import MagicLinkWrapper from './MagicLinkWrapper';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
export const MagicLinkCE = ({ registrationToken }) => {
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
12
|
const target = `${window.location.origin}${basename}auth/register?registrationToken=${registrationToken}`;
|
|
13
13
|
|
|
@@ -21,12 +21,10 @@ const MagicLink = ({ registrationToken }) => {
|
|
|
21
21
|
);
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
MagicLinkCE.defaultProps = {
|
|
25
25
|
registrationToken: '',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
MagicLinkCE.propTypes = {
|
|
29
29
|
registrationToken: PropTypes.string,
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
export default MagicLink;
|
package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js
CHANGED
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
} from '@strapi/design-system';
|
|
13
13
|
import { Form, Link } from '@strapi/helper-plugin';
|
|
14
14
|
import { ArrowLeft, Check, Play as Publish } from '@strapi/icons';
|
|
15
|
-
import EventTable from 'ee_else_ce/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable';
|
|
16
15
|
import { Field, FormikProvider, useFormik } from 'formik';
|
|
17
16
|
import PropTypes from 'prop-types';
|
|
18
17
|
import { useIntl } from 'react-intl';
|
|
19
18
|
|
|
19
|
+
import { useEnterprise } from '../../../../../../../hooks/useEnterprise';
|
|
20
|
+
import { EventTableCE } from '../EventTable';
|
|
20
21
|
import HeadersInput from '../HeadersInput';
|
|
21
22
|
import TriggerContainer from '../TriggerContainer';
|
|
22
23
|
|
|
@@ -32,6 +33,15 @@ const WebhookForm = ({
|
|
|
32
33
|
}) => {
|
|
33
34
|
const { formatMessage } = useIntl();
|
|
34
35
|
const [showTriggerResponse, setShowTriggerResponse] = useState(false);
|
|
36
|
+
const EventTable = useEnterprise(
|
|
37
|
+
EventTableCE,
|
|
38
|
+
async () =>
|
|
39
|
+
(
|
|
40
|
+
await import(
|
|
41
|
+
'../../../../../../../../../ee/admin/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable'
|
|
42
|
+
)
|
|
43
|
+
).EventTableEE
|
|
44
|
+
);
|
|
35
45
|
|
|
36
46
|
/**
|
|
37
47
|
* Map the headers into a form that can be used within the formik form
|
|
@@ -64,6 +74,11 @@ const WebhookForm = ({
|
|
|
64
74
|
validateOnBlur: false,
|
|
65
75
|
});
|
|
66
76
|
|
|
77
|
+
// block rendering until the EE component is fully loaded
|
|
78
|
+
if (!EventTable) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
return (
|
|
68
83
|
<FormikProvider value={formik}>
|
|
69
84
|
<Form onSubmit={formik.handleSubmit}>
|
|
@@ -799,7 +799,7 @@
|
|
|
799
799
|
"content-manager.popUpWarning.warning.unpublish-question": "您确定不要发布它吗?",
|
|
800
800
|
"content-manager.popUpWarning.warning.updateAllSettings": "这将修改所有设置",
|
|
801
801
|
"content-manager.popUpwarning.warning.has-draft-relations.button-confirm": "是, 发布",
|
|
802
|
-
"content-manager.popUpwarning.warning.has-draft-relations.message": "<b>{count, plural,
|
|
802
|
+
"content-manager.popUpwarning.warning.has-draft-relations.message": "<b>{count, plural, one { 个关联的内容} other { 个关联的内容}}</b> 尚未发布,这可能会导致不可预期的行为。",
|
|
803
803
|
"content-manager.popover.display-relations.label": "显示关联",
|
|
804
804
|
"content-manager.relation.add": "添加关联",
|
|
805
805
|
"content-manager.relation.disconnect": "删除",
|