@strapi/admin 4.11.4 → 4.11.6
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/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/DisplayedFields.js +23 -21
- package/admin/src/content-manager/pages/EditSettingsView/components/ModalForm.js +21 -50
- 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/ListSettingsView/components/SortDisplayedFields.js +24 -22
- package/admin/src/content-manager/pages/ListView/components/CellContent/RelationMultiple/index.js +61 -67
- package/admin/src/content-manager/pages/ListView/components/CellContent/RepeatableComponent/index.js +28 -21
- package/admin/src/content-manager/pages/ListView/components/TableRows/index.js +97 -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/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/layouts/UnauthenticatedLayout/LocaleToggle/index.js +7 -7
- package/admin/src/pages/App/index.js +0 -3
- 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/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/{5563.86f9aa9c.chunk.js → 2225.15d1df72.chunk.js} +3 -3
- package/build/2379.3ba39b61.chunk.js +1 -0
- package/build/2395.c27eb585.chunk.js +26 -0
- package/build/2801.93343c11.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.642d2321.chunk.js +1 -0
- package/build/{970.89601f27.chunk.js → 3739.63e352f1.chunk.js} +52 -20
- package/build/3984.298bdb66.chunk.js +1 -0
- package/build/4546.5aac90fe.chunk.js +1 -0
- package/build/502.f6b78f85.chunk.js +1 -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.fe31804b.chunk.js +1 -0
- package/build/8276.d03dc679.chunk.js +26 -0
- package/build/918.54414509.chunk.js +1 -0
- package/build/978.bab58f0a.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.b3060bbe.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.8c600d1a.chunk.js +111 -0
- package/build/Upload_ConfigureTheView.345ac1e0.chunk.js +1 -0
- package/build/admin-app.1c3f7fd6.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.9f7f0cb8.chunk.js +1101 -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-ar-json.56d8fcf4.chunk.js → content-type-builder-translation-ar-json.3e808e2f.chunk.js} +1 -1
- package/build/{content-type-builder-translation-cs-json.a5b299ca.chunk.js → content-type-builder-translation-cs-json.1ef9e106.chunk.js} +1 -1
- package/build/{content-type-builder-translation-de-json.393a76c0.chunk.js → content-type-builder-translation-de-json.63fcff7b.chunk.js} +1 -1
- package/build/{content-type-builder-translation-dk-json.fbd39bb7.chunk.js → content-type-builder-translation-dk-json.fd626b67.chunk.js} +1 -1
- package/build/{content-type-builder-translation-en-json.f592325b.chunk.js → content-type-builder-translation-en-json.9f2b9c49.chunk.js} +1 -1
- package/build/{content-type-builder-translation-es-json.9288474b.chunk.js → content-type-builder-translation-es-json.a4a361a9.chunk.js} +1 -1
- package/build/{content-type-builder-translation-fr-json.d35e269c.chunk.js → content-type-builder-translation-fr-json.499c3a46.chunk.js} +1 -1
- package/build/{content-type-builder-translation-id-json.f0513929.chunk.js → content-type-builder-translation-id-json.65255f93.chunk.js} +1 -1
- package/build/{content-type-builder-translation-it-json.aaf16753.chunk.js → content-type-builder-translation-it-json.e268ab74.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ko-json.8fe21a7f.chunk.js → content-type-builder-translation-ko-json.04cb309d.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ms-json.3b5d2d3e.chunk.js → content-type-builder-translation-ms-json.f6b743b9.chunk.js} +1 -1
- package/build/{content-type-builder-translation-nl-json.225ef5d3.chunk.js → content-type-builder-translation-nl-json.997fe8cc.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pl-json.92f36be2.chunk.js → content-type-builder-translation-pl-json.634f638b.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-BR-json.3bd10f89.chunk.js → content-type-builder-translation-pt-BR-json.6a95dc71.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ru-json.9bfe47ce.chunk.js → content-type-builder-translation-ru-json.3af65503.chunk.js} +1 -1
- package/build/{content-type-builder-translation-sk-json.d03cc18a.chunk.js → content-type-builder-translation-sk-json.c6078082.chunk.js} +1 -1
- package/build/{content-type-builder-translation-sv-json.d23dcd32.chunk.js → content-type-builder-translation-sv-json.a6df2462.chunk.js} +1 -1
- package/build/{content-type-builder-translation-th-json.7ad256e2.chunk.js → content-type-builder-translation-th-json.122277cc.chunk.js} +1 -1
- package/build/{content-type-builder-translation-tr-json.926f6191.chunk.js → content-type-builder-translation-tr-json.41f44f77.chunk.js} +1 -1
- package/build/{content-type-builder-translation-uk-json.7bf19546.chunk.js → content-type-builder-translation-uk-json.e1315acd.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-Hans-json.415577fb.chunk.js → content-type-builder-translation-zh-Hans-json.6ff57db6.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-json.ad24dbeb.chunk.js → content-type-builder-translation-zh-json.3532b962.chunk.js} +1 -1
- package/build/content-type-builder.7a90cece.chunk.js +170 -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.22e2d4ec.js +2856 -0
- package/build/review-workflows-settings.f1104fb9.chunk.js +110 -0
- package/build/{runtime~main.efd966f6.js → runtime~main.437fdcbb.js} +2 -2
- 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.cbfeefa5.chunk.js +58 -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/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +1 -1
- 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/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/hooks/useReviewWorkflows.js +3 -5
- 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/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/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.bd1bbff1.chunk.js +0 -166
- package/build/main.ee36abd9.js +0 -2927
- package/build/review-workflows-settings.93808ae0.chunk.js +0 -110
- 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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useFetchClient, useRBAC } from '@strapi/helper-plugin';
|
|
4
|
+
import { useQuery } from 'react-query';
|
|
5
|
+
import { useSelector } from 'react-redux';
|
|
6
|
+
|
|
7
|
+
import { selectAdminPermissions } from '../../../../admin/src/pages/App/selectors';
|
|
8
|
+
|
|
9
|
+
export function useLicenseLimits() {
|
|
10
|
+
const permissions = useSelector(selectAdminPermissions);
|
|
11
|
+
const { get } = useFetchClient();
|
|
12
|
+
const {
|
|
13
|
+
isLoading: isRBACLoading,
|
|
14
|
+
allowedActions: { canRead, canCreate, canUpdate, canDelete },
|
|
15
|
+
} = useRBAC(permissions.settings.users);
|
|
16
|
+
const hasPermissions = canRead && canCreate && canUpdate && canDelete;
|
|
17
|
+
|
|
18
|
+
const { data, isError, isLoading } = useQuery(
|
|
19
|
+
['ee', 'license-limit-info'],
|
|
20
|
+
async () => {
|
|
21
|
+
const {
|
|
22
|
+
data: { data },
|
|
23
|
+
} = await get('/admin/license-limit-information');
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
enabled: !isRBACLoading && hasPermissions,
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const license = data ?? {};
|
|
33
|
+
|
|
34
|
+
const getFeature = React.useCallback(
|
|
35
|
+
(name) => {
|
|
36
|
+
const feature = (license?.features ?? []).find((feature) => feature.name === name);
|
|
37
|
+
|
|
38
|
+
return feature?.options ?? {};
|
|
39
|
+
},
|
|
40
|
+
[license?.features]
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return { license, getFeature, isError, isLoading };
|
|
44
|
+
}
|
|
@@ -14,7 +14,7 @@ const DividerFull = styled(Divider)`
|
|
|
14
14
|
flex: 1;
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
export const LoginEE = (loginProps) => {
|
|
18
18
|
const ssoEnabled = window.strapi.features.isEnabled(window.strapi.features.SSO);
|
|
19
19
|
const { isLoading, data: providers } = useAuthProviders({ ssoEnabled });
|
|
20
20
|
const { formatMessage } = useIntl();
|
|
@@ -49,17 +49,15 @@ const Login = (loginProps) => {
|
|
|
49
49
|
);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
LoginEE.defaultProps = {
|
|
53
53
|
onSubmit: (e) => e.preventDefault(),
|
|
54
54
|
requestError: null,
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
LoginEE.propTypes = {
|
|
58
58
|
formErrors: PropTypes.object.isRequired,
|
|
59
59
|
modifiedData: PropTypes.object.isRequired,
|
|
60
60
|
onChange: PropTypes.func.isRequired,
|
|
61
61
|
onSubmit: PropTypes.func,
|
|
62
62
|
requestError: PropTypes.object,
|
|
63
63
|
};
|
|
64
|
-
|
|
65
|
-
export default Login;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line import/no-cycle
|
|
4
|
+
import { HomePageCE } from '../../../../admin/src/pages/HomePage';
|
|
5
|
+
import { useLicenseLimitNotification } from '../../hooks';
|
|
6
|
+
|
|
7
|
+
export function HomePageEE() {
|
|
8
|
+
useLicenseLimitNotification();
|
|
9
|
+
|
|
10
|
+
return <HomePageCE />;
|
|
11
|
+
}
|
package/ee/admin/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo/index.js
CHANGED
|
@@ -11,13 +11,15 @@ import { useLicenseLimits } from '../../../../../../hooks';
|
|
|
11
11
|
const BILLING_STRAPI_CLOUD_URL = 'https://cloud.strapi.io/profile/billing';
|
|
12
12
|
const BILLING_SELF_HOSTED_URL = 'https://strapi.io/billing/request-seats';
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
export const AdminSeatInfoEE = () => {
|
|
15
15
|
const { formatMessage } = useIntl();
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const {
|
|
17
|
+
license: { licenseLimitStatus, enforcementUserCount, permittedSeats, isHostedOnStrapiCloud },
|
|
18
|
+
isError,
|
|
19
|
+
isLoading,
|
|
20
|
+
} = useLicenseLimits();
|
|
19
21
|
|
|
20
|
-
if (!permittedSeats) {
|
|
22
|
+
if (isError || isLoading || !permittedSeats) {
|
|
21
23
|
return null;
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -86,5 +88,3 @@ const AdminSeatInfo = () => {
|
|
|
86
88
|
</GridItem>
|
|
87
89
|
);
|
|
88
90
|
};
|
|
89
|
-
|
|
90
|
-
export default AdminSeatInfo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useFetchClient, useNotification } from '@strapi/helper-plugin';
|
|
1
|
+
import { useFetchClient, useNotification, useQueryParams } from '@strapi/helper-plugin';
|
|
2
2
|
import { useQuery } from 'react-query';
|
|
3
3
|
import { useLocation } from 'react-router-dom';
|
|
4
4
|
|
|
@@ -8,6 +8,7 @@ const useAuditLogsData = ({ canReadAuditLogs, canReadUsers }) => {
|
|
|
8
8
|
const { get } = useFetchClient();
|
|
9
9
|
const { search } = useLocation();
|
|
10
10
|
const toggleNotification = useNotification();
|
|
11
|
+
const [{ query }] = useQueryParams();
|
|
11
12
|
|
|
12
13
|
const queryOptions = {
|
|
13
14
|
keepPreviousData: true,
|
|
@@ -35,9 +36,10 @@ const useAuditLogsData = ({ canReadAuditLogs, canReadUsers }) => {
|
|
|
35
36
|
isError: isAuditLogsError,
|
|
36
37
|
} = useQuery(
|
|
37
38
|
['auditLogs', search],
|
|
38
|
-
async (
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
async () => {
|
|
40
|
+
const { data } = await get(`/admin/audit-logs`, {
|
|
41
|
+
params: query,
|
|
42
|
+
});
|
|
41
43
|
|
|
42
44
|
return data;
|
|
43
45
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useFetchClient } from '@strapi/helper-plugin';
|
|
2
|
-
import { stringify } from 'qs';
|
|
3
2
|
import { useQuery } from 'react-query';
|
|
4
3
|
|
|
5
4
|
export function useReviewWorkflows(params = {}) {
|
|
@@ -9,7 +8,6 @@ export function useReviewWorkflows(params = {}) {
|
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
const { get } = useFetchClient();
|
|
12
|
-
const queryString = stringify({ ...defaultQueryParams, ...queryParams }, { encode: false });
|
|
13
11
|
|
|
14
12
|
const { data, isLoading, status, refetch } = useQuery(
|
|
15
13
|
['review-workflows', 'workflows', id],
|
|
@@ -17,9 +15,9 @@ export function useReviewWorkflows(params = {}) {
|
|
|
17
15
|
try {
|
|
18
16
|
const {
|
|
19
17
|
data: { data },
|
|
20
|
-
} = await get(
|
|
21
|
-
|
|
22
|
-
);
|
|
18
|
+
} = await get(`/admin/review-workflows/workflows/${id}`, {
|
|
19
|
+
params: { ...defaultQueryParams, ...queryParams },
|
|
20
|
+
});
|
|
23
21
|
|
|
24
22
|
return data;
|
|
25
23
|
} catch (err) {
|
|
@@ -8,10 +8,17 @@ import { useIntl } from 'react-intl';
|
|
|
8
8
|
|
|
9
9
|
import { useLicenseLimits } from '../../../../../../hooks';
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
export const CreateActionEE = ({ onClick }) => {
|
|
12
12
|
const { formatMessage } = useIntl();
|
|
13
|
-
const {
|
|
14
|
-
|
|
13
|
+
const {
|
|
14
|
+
license: { permittedSeats, shouldStopCreate },
|
|
15
|
+
isError,
|
|
16
|
+
isLoading,
|
|
17
|
+
} = useLicenseLimits();
|
|
18
|
+
|
|
19
|
+
if (isError || isLoading) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
15
22
|
|
|
16
23
|
return (
|
|
17
24
|
<Flex gap={2}>
|
|
@@ -47,8 +54,6 @@ const CreateAction = ({ onClick }) => {
|
|
|
47
54
|
);
|
|
48
55
|
};
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
CreateActionEE.propTypes = {
|
|
51
58
|
onClick: PropTypes.func.isRequired,
|
|
52
59
|
};
|
|
53
|
-
|
|
54
|
-
export default CreateAction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line import/no-cycle
|
|
4
|
+
import { UserListPageCE } from '../../../../../../../admin/src/pages/SettingsPage/pages/Users/ListPage';
|
|
5
|
+
import { useLicenseLimitNotification } from '../../../../../hooks';
|
|
6
|
+
|
|
7
|
+
function UserListPageEE() {
|
|
8
|
+
useLicenseLimitNotification();
|
|
9
|
+
|
|
10
|
+
return <UserListPageCE />;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { UserListPageEE };
|
|
@@ -7,7 +7,7 @@ import basename from '../../../../../../../../admin/src/core/utils/basename';
|
|
|
7
7
|
import MagicLinkWrapper from '../../../../../../../../admin/src/pages/SettingsPage/pages/Users/components/MagicLink/MagicLinkWrapper';
|
|
8
8
|
|
|
9
9
|
// FIXME replace with parts compo when ready
|
|
10
|
-
const
|
|
10
|
+
export const MagicLinkEE = ({ registrationToken }) => {
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
12
|
|
|
13
13
|
if (registrationToken) {
|
|
@@ -34,12 +34,10 @@ const MagicLink = ({ registrationToken }) => {
|
|
|
34
34
|
);
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
MagicLinkEE.defaultProps = {
|
|
38
38
|
registrationToken: '',
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
MagicLinkEE.propTypes = {
|
|
42
42
|
registrationToken: PropTypes.string,
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
export default MagicLink;
|
package/index.js
CHANGED
|
@@ -30,12 +30,6 @@ async function build({ appDir, buildDestDir, env, forceBuild, optimize, options,
|
|
|
30
30
|
const entry = path.resolve(cacheDir, 'admin', 'src');
|
|
31
31
|
const dest = path.resolve(buildDestDir, 'build');
|
|
32
32
|
|
|
33
|
-
// Roots for the @strapi/babel-plugin-switch-ee-ce
|
|
34
|
-
const roots = {
|
|
35
|
-
eeRoot: path.resolve(cacheDir, 'ee', 'admin'),
|
|
36
|
-
ceRoot: path.resolve(cacheDir, 'admin', 'src'),
|
|
37
|
-
};
|
|
38
|
-
|
|
39
33
|
const pluginsPath = Object.keys(plugins).map((pluginName) => plugins[pluginName].pathToPlugin);
|
|
40
34
|
|
|
41
35
|
// Either use the tsconfig file from the generated app or the one inside the .cache folder
|
|
@@ -53,7 +47,6 @@ async function build({ appDir, buildDestDir, env, forceBuild, optimize, options,
|
|
|
53
47
|
optimize,
|
|
54
48
|
options,
|
|
55
49
|
pluginsPath,
|
|
56
|
-
roots,
|
|
57
50
|
tsConfigFilePath,
|
|
58
51
|
});
|
|
59
52
|
|
|
@@ -105,12 +98,6 @@ async function watchAdmin({ appDir, browser, buildDestDir, host, options, plugin
|
|
|
105
98
|
const dest = path.join(buildDestDir, 'build');
|
|
106
99
|
const env = 'development';
|
|
107
100
|
|
|
108
|
-
// Roots for the @strapi/babel-plugin-switch-ee-ce
|
|
109
|
-
const roots = {
|
|
110
|
-
eeRoot: path.resolve(cacheDir, 'ee', 'admin'),
|
|
111
|
-
ceRoot: path.resolve(cacheDir, 'admin', 'src'),
|
|
112
|
-
};
|
|
113
|
-
|
|
114
101
|
const pluginsPath = Object.keys(plugins).map((pluginName) => plugins[pluginName].pathToPlugin);
|
|
115
102
|
|
|
116
103
|
// Either use the tsconfig file from the generated app or the one inside the .cache folder
|
|
@@ -127,7 +114,6 @@ async function watchAdmin({ appDir, browser, buildDestDir, host, options, plugin
|
|
|
127
114
|
env,
|
|
128
115
|
options,
|
|
129
116
|
pluginsPath,
|
|
130
|
-
roots,
|
|
131
117
|
devServer: {
|
|
132
118
|
port,
|
|
133
119
|
client: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/admin",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.6",
|
|
4
4
|
"description": "Strapi Admin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,26 +40,17 @@
|
|
|
40
40
|
"lint": "run -T eslint ."
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@babel/core": "^7.20.12",
|
|
44
|
-
"@babel/plugin-transform-runtime": "^7.19.6",
|
|
45
|
-
"@babel/preset-env": "^7.20.2",
|
|
46
|
-
"@babel/preset-react": "^7.18.6",
|
|
47
|
-
"@babel/runtime": "^7.20.13",
|
|
48
43
|
"@casl/ability": "^5.4.3",
|
|
49
|
-
"@fingerprintjs/fingerprintjs": "3.4.1",
|
|
50
44
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
|
51
|
-
"@strapi/
|
|
52
|
-
"@strapi/
|
|
53
|
-
"@strapi/
|
|
54
|
-
"@strapi/
|
|
55
|
-
"@strapi/
|
|
56
|
-
"@strapi/
|
|
57
|
-
"@strapi/
|
|
58
|
-
"@strapi/
|
|
59
|
-
"@strapi/utils": "4.11.4",
|
|
45
|
+
"@strapi/data-transfer": "4.11.6",
|
|
46
|
+
"@strapi/design-system": "1.8.2",
|
|
47
|
+
"@strapi/helper-plugin": "4.11.6",
|
|
48
|
+
"@strapi/icons": "1.8.2",
|
|
49
|
+
"@strapi/permissions": "4.11.6",
|
|
50
|
+
"@strapi/provider-audit-logs-local": "4.11.6",
|
|
51
|
+
"@strapi/typescript-utils": "4.11.6",
|
|
52
|
+
"@strapi/utils": "4.11.6",
|
|
60
53
|
"axios": "1.4.0",
|
|
61
|
-
"babel-loader": "^9.1.2",
|
|
62
|
-
"babel-plugin-styled-components": "2.1.1",
|
|
63
54
|
"bcryptjs": "2.4.3",
|
|
64
55
|
"browserslist": "^4.17.3",
|
|
65
56
|
"browserslist-to-esbuild": "1.2.0",
|
|
@@ -117,7 +108,7 @@
|
|
|
117
108
|
"react-intl": "6.4.1",
|
|
118
109
|
"react-is": "^18.2.0",
|
|
119
110
|
"react-query": "3.39.3",
|
|
120
|
-
"react-redux": "8.
|
|
111
|
+
"react-redux": "8.1.1",
|
|
121
112
|
"react-refresh": "0.14.0",
|
|
122
113
|
"react-router-dom": "5.3.4",
|
|
123
114
|
"react-select": "5.7.0",
|
|
@@ -131,7 +122,7 @@
|
|
|
131
122
|
"style-loader": "3.3.1",
|
|
132
123
|
"styled-components": "5.3.3",
|
|
133
124
|
"typescript": "5.1.3",
|
|
134
|
-
"webpack": "^5.
|
|
125
|
+
"webpack": "^5.88.1",
|
|
135
126
|
"webpack-cli": "^5.1.0",
|
|
136
127
|
"webpack-dev-server": "^4.15.0",
|
|
137
128
|
"webpackbar": "^5.0.2",
|
|
@@ -163,5 +154,5 @@
|
|
|
163
154
|
}
|
|
164
155
|
}
|
|
165
156
|
},
|
|
166
|
-
"gitHead": "
|
|
157
|
+
"gitHead": "9d78b84e38df437a7247fc5a66b872b55d59ed88"
|
|
167
158
|
}
|
package/webpack.alias.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const path = require('path');
|
|
4
3
|
const findRoot = require('find-root');
|
|
5
4
|
|
|
6
5
|
const aliasExactMatch = [
|
|
@@ -38,6 +37,4 @@ module.exports = {
|
|
|
38
37
|
acc[`${moduleName}$`] = findRoot(require.resolve(moduleName));
|
|
39
38
|
return acc;
|
|
40
39
|
}, {}),
|
|
41
|
-
|
|
42
|
-
ee_else_ce: path.resolve(__dirname),
|
|
43
40
|
};
|
package/webpack.config.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const fse = require('fs-extra');
|
|
5
4
|
const webpack = require('webpack');
|
|
6
5
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
7
6
|
const ForkTsCheckerPlugin = require('fork-ts-checker-webpack-plugin');
|
|
@@ -16,8 +15,6 @@ const alias = require('./webpack.alias');
|
|
|
16
15
|
const getClientEnvironment = require('./env');
|
|
17
16
|
const createPluginsExcludePath = require('./utils/create-plugins-exclude-path');
|
|
18
17
|
|
|
19
|
-
const EE_REGEX = /from.* ['"]ee_else_ce\//;
|
|
20
|
-
|
|
21
18
|
module.exports = ({
|
|
22
19
|
cacheDir,
|
|
23
20
|
dest,
|
|
@@ -30,10 +27,6 @@ module.exports = ({
|
|
|
30
27
|
adminPath: '/admin/',
|
|
31
28
|
features: [],
|
|
32
29
|
},
|
|
33
|
-
roots = {
|
|
34
|
-
eeRoot: './ee/admin',
|
|
35
|
-
ceRoot: './admin/src',
|
|
36
|
-
},
|
|
37
30
|
tsConfigFilePath,
|
|
38
31
|
}) => {
|
|
39
32
|
const isProduction = env === 'production';
|
|
@@ -99,74 +92,7 @@ module.exports = ({
|
|
|
99
92
|
},
|
|
100
93
|
{
|
|
101
94
|
test: /\.m?jsx?$/,
|
|
102
|
-
include: cacheDir,
|
|
103
|
-
oneOf: [
|
|
104
|
-
// Use babel-loader for files that distinct the ee and ce code
|
|
105
|
-
// These files have an import Something from 'ee_else_ce/
|
|
106
|
-
{
|
|
107
|
-
test(filePath) {
|
|
108
|
-
if (!filePath) {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
try {
|
|
113
|
-
const fileContent = fse.readFileSync(filePath).toString();
|
|
114
|
-
|
|
115
|
-
if (fileContent.match(/from.* ['"]ee_else_ce\//)) {
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return EE_REGEX.test(fileContent);
|
|
120
|
-
} catch (e) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
use: {
|
|
125
|
-
loader: require.resolve('babel-loader'),
|
|
126
|
-
options: {
|
|
127
|
-
cacheDirectory: true,
|
|
128
|
-
cacheCompression: isProduction,
|
|
129
|
-
compact: isProduction,
|
|
130
|
-
presets: [
|
|
131
|
-
require.resolve('@babel/preset-env'),
|
|
132
|
-
require.resolve('@babel/preset-react'),
|
|
133
|
-
],
|
|
134
|
-
plugins: [
|
|
135
|
-
[
|
|
136
|
-
require.resolve('@strapi/babel-plugin-switch-ee-ce'),
|
|
137
|
-
{
|
|
138
|
-
// Imported this tells the custom plugin where to look for the ee folder
|
|
139
|
-
roots,
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
|
|
143
|
-
[
|
|
144
|
-
require.resolve('@babel/plugin-transform-runtime'),
|
|
145
|
-
{
|
|
146
|
-
helpers: true,
|
|
147
|
-
regenerator: true,
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
[require.resolve('babel-plugin-styled-components'), { pure: true }],
|
|
151
|
-
],
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
// Use esbuild-loader for the other files
|
|
156
|
-
{
|
|
157
|
-
use: {
|
|
158
|
-
loader: require.resolve('esbuild-loader'),
|
|
159
|
-
options: {
|
|
160
|
-
loader: 'jsx',
|
|
161
|
-
target: buildTarget,
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
test: /\.m?jsx?$/,
|
|
169
|
-
include: pluginsPath,
|
|
95
|
+
include: [cacheDir, ...pluginsPath],
|
|
170
96
|
use: {
|
|
171
97
|
loader: require.resolve('esbuild-loader'),
|
|
172
98
|
options: {
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import set from 'lodash/set';
|
|
2
|
-
import { stringify } from 'qs';
|
|
3
|
-
|
|
4
|
-
import createPluginsFilter from './createPluginsFilter';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Creates a valid query string from an object of queryParams
|
|
8
|
-
* This includes:
|
|
9
|
-
* - a filters clause
|
|
10
|
-
* - plugin options
|
|
11
|
-
*/
|
|
12
|
-
const buildQueryString = (queryParams = {}) => {
|
|
13
|
-
/**
|
|
14
|
-
* Extracting pluginOptions from the query since we don't want them to be part
|
|
15
|
-
* of the url
|
|
16
|
-
*/
|
|
17
|
-
const {
|
|
18
|
-
plugins: _,
|
|
19
|
-
_q: query,
|
|
20
|
-
...otherQueryParams
|
|
21
|
-
} = {
|
|
22
|
-
...queryParams,
|
|
23
|
-
...createPluginsFilter(queryParams.plugins),
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
if (query) {
|
|
27
|
-
set(otherQueryParams, `_q`, encodeURIComponent(query));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return `${stringify(otherQueryParams, {
|
|
31
|
-
encode: false,
|
|
32
|
-
addQueryPrefix: true,
|
|
33
|
-
})}`;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default buildQueryString;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import FingerprintJS from '@fingerprintjs/fingerprintjs';
|
|
2
|
-
|
|
3
|
-
const getUniqueIdentifier = async () => {
|
|
4
|
-
const fp = await FingerprintJS.load();
|
|
5
|
-
const result = await fp.get();
|
|
6
|
-
|
|
7
|
-
const deviceId = `web-fingerprint-${result.visitorId}`;
|
|
8
|
-
|
|
9
|
-
return deviceId;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default getUniqueIdentifier;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1386],{91386:function(O,s,e){e.r(s),e.d(s,{FORMS:function(){return L}});var t=e(32735),v=e(9026),E=e(27649),l=e(72850),a=e(49372),o=e(87933),g=e(23866),h=e(41415),f=e(19565),p=e(67879),i=e(53038),x=e(8471),C=e(10190),r=e(954),Z=e(58414),P=e(33205);const d=(0,x.ZP)(v.i)`
|
|
2
|
-
flex: 1;
|
|
3
|
-
`;var y=()=>{const m=window.strapi.features.isEnabled(window.strapi.features.SSO),{push:S}=(0,i.k6)(),{formatMessage:n}=(0,p.Z)(),{isLoading:c,data:u}=(0,Z.pl)({ssoEnabled:m}),A=()=>{S("/auth/login")};return!m||!c&&u.length===0?t.createElement(i.l_,{to:"/auth/login"}):t.createElement(r.ZP,null,t.createElement(E.o,null,t.createElement(r.bU,null,t.createElement(r.sg,null,t.createElement(C.Z,null),t.createElement(l.x,{paddingTop:6,paddingBottom:1},t.createElement(a.Z,{as:"h1",variant:"alpha"},n({id:"Auth.form.welcome.title"}))),t.createElement(l.x,{paddingBottom:7},t.createElement(a.Z,{variant:"epsilon",textColor:"neutral600"},n({id:"Auth.login.sso.subtitle"})))),t.createElement(o.k,{direction:"column",alignItems:"stretch",gap:7},c?t.createElement(o.k,{justifyContent:"center"},t.createElement(g.a,null,n({id:"Auth.login.sso.loading"}))):t.createElement(P.Z,{providers:u}),t.createElement(o.k,null,t.createElement(d,null),t.createElement(l.x,{paddingLeft:3,paddingRight:3},t.createElement(a.Z,{variant:"sigma",textColor:"neutral600"},n({id:"or"}))),t.createElement(d,null)),t.createElement(h.z,{fullWidth:!0,size:"L",onClick:A},n({id:"Auth.form.button.login.strapi"})))),t.createElement(o.k,{justifyContent:"center"},t.createElement(l.x,{paddingTop:4},t.createElement(f.rU,{to:"/auth/forgot-password"},t.createElement(a.Z,{variant:"pi"},n({id:"Auth.link.forgot-password"})))))))};const L={providers:{Component:y,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""}}}}]);
|