@strapi/admin 4.11.2 → 4.11.4
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/components/AuthenticatedApp/index.js +2 -2
- package/admin/src/constants.js +90 -0
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +10 -1
- package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +12 -8
- package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +5 -6
- package/admin/src/content-manager/components/RelationInput/RelationInput.js +99 -178
- package/admin/src/content-manager/components/RelationInput/components/Option.js +17 -15
- package/admin/src/content-manager/components/RelationInput/components/RelationList.js +2 -2
- package/admin/src/content-manager/components/RelationInputDataManager/RelationInputDataManager.js +12 -6
- package/admin/src/content-manager/components/RelationInputDataManager/utils/select.js +18 -3
- package/admin/src/content-manager/pages/App/index.js +4 -4
- package/admin/src/content-manager/pages/CollectionTypeRecursivePath/index.js +9 -5
- package/admin/src/content-manager/pages/ComponentSetttingsView/index.js +3 -4
- package/admin/src/content-manager/pages/EditView/hooks/useOnce.js +14 -0
- package/admin/src/content-manager/pages/EditView/index.js +31 -10
- package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/RelationMultiple/index.js +1 -1
- package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/utils/hasContent.js +1 -1
- package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/ConfirmDialogDelete/index.js +7 -4
- package/admin/src/content-manager/pages/ListView/components/ConfirmDialogDeleteAll/index.js +78 -0
- package/admin/src/content-manager/pages/ListView/{FieldPicker → components/FieldPicker}/index.js +20 -9
- package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/TableRows/index.js +90 -61
- package/admin/src/content-manager/pages/ListView/index.js +173 -34
- package/admin/src/content-manager/pages/ListView/utils/index.js +0 -2
- package/admin/src/content-manager/pages/ListViewLayoutManager/Permissions.js +1 -1
- package/admin/src/content-manager/pages/SingleTypeRecursivePath/index.js +4 -4
- package/admin/src/hooks/useMenu/index.js +70 -37
- package/admin/src/hooks/useMenu/utils/getGeneralLinks.js +5 -2
- package/admin/src/hooks/useSettingsMenu/constants.js +0 -7
- package/admin/src/hooks/useSettingsMenu/index.js +19 -5
- package/admin/src/pages/App/constants.js +1 -0
- package/admin/src/pages/App/index.js +23 -2
- package/admin/src/pages/App/reducer.js +8 -1
- package/admin/src/pages/App/selectors.js +12 -0
- package/admin/src/pages/AuthPage/{utils/forms.js → constants.js} +6 -8
- package/admin/src/pages/AuthPage/index.js +17 -5
- package/admin/src/pages/InstalledPluginsPage/index.js +10 -7
- package/admin/src/pages/MarketplacePage/index.js +11 -6
- package/admin/src/pages/ProfilePage/index.js +2 -2
- package/admin/src/pages/SettingsPage/components/Tokens/Table/index.js +15 -1
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedCreateView/index.js +5 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedEditView/index.js +5 -2
- package/admin/src/pages/SettingsPage/pages/ApiTokens/ProtectedListView/index.js +11 -6
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +130 -107
- package/admin/src/pages/SettingsPage/pages/Roles/CreatePage/index.js +5 -3
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/Roles/ProtectedEditPage/index.js +8 -9
- package/admin/src/pages/SettingsPage/pages/Roles/ProtectedListPage/index.js +11 -6
- package/admin/src/pages/SettingsPage/pages/TransferTokens/EditView/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/TransferTokens/ListView/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/TransferTokens/ProtectedCreateView/index.js +5 -2
- package/admin/src/pages/SettingsPage/pages/TransferTokens/ProtectedEditView/index.js +5 -2
- package/admin/src/pages/SettingsPage/pages/TransferTokens/ProtectedListView/index.js +11 -6
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/{utils/layout.js → constants.js} +35 -2
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +43 -10
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/Users/ProtectedEditPage/index.js +13 -9
- package/admin/src/pages/SettingsPage/pages/Users/ProtectedListPage/index.js +11 -6
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/Events/index.js +4 -2
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/utils/makeWebhookValidationSchema.js +11 -5
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +4 -3
- package/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedCreateView/index.js +11 -6
- package/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedEditView/index.js +11 -6
- package/admin/src/pages/SettingsPage/pages/Webhooks/ProtectedListView/index.js +11 -6
- package/admin/src/translations/ca.json +1 -0
- package/admin/src/translations/en.json +4 -1
- package/admin/src/translations/es.json +5 -0
- package/admin/src/translations/fr.json +1 -0
- package/build/1386.3b2aa6a7.chunk.js +3 -0
- package/build/1799.44d2e264.chunk.js +33 -0
- package/build/1970.39a2d75e.chunk.js +1 -0
- package/build/3269.1ea0f5a6.chunk.js +1 -0
- package/build/{3528.969338e2.chunk.js → 3528.4845cf92.chunk.js} +1 -1
- package/build/448.829e1344.chunk.js +1 -0
- package/build/{5542.64b623c9.chunk.js → 5542.c62d0daf.chunk.js} +1 -1
- package/build/5563.86f9aa9c.chunk.js +79 -0
- package/build/{5932.9e1f8f92.chunk.js → 5932.6a23b88c.chunk.js} +1 -1
- package/build/{7018.0e8a6297.chunk.js → 7018.98feed67.chunk.js} +1 -1
- package/build/7259.fb69d4bf.chunk.js +1 -0
- package/build/7394.423886bd.chunk.js +1 -0
- package/build/{371.6e4e2c1f.chunk.js → 970.89601f27.chunk.js} +24 -24
- package/build/Admin-authenticatedApp.cb649fc1.chunk.js +79 -0
- package/build/{Admin_InternalErrorPage.4a6f7b20.chunk.js → Admin_InternalErrorPage.8911cb49.chunk.js} +1 -1
- package/build/{Admin_homePage.6cd6c25c.chunk.js → Admin_homePage.be30ef4e.chunk.js} +1 -1
- package/build/{Admin_marketplace.c82c1d3c.chunk.js → Admin_marketplace.74a58e20.chunk.js} +8 -8
- package/build/Admin_pluginsPage.ce464189.chunk.js +6 -0
- package/build/{Admin_profilePage.9d70d609.chunk.js → Admin_profilePage.2131eb68.chunk.js} +2 -2
- package/build/Admin_settingsPage.4069bb8a.chunk.js +79 -0
- package/build/{Upload_ConfigureTheView.34f449d7.chunk.js → Upload_ConfigureTheView.7a1cb9c9.chunk.js} +1 -1
- package/build/admin-app.fea867af.chunk.js +61 -0
- package/build/admin-edit-roles-page.3fdd6b9d.chunk.js +267 -0
- package/build/admin-edit-users.200551e3.chunk.js +10 -0
- package/build/admin-roles-list.e17b00d7.chunk.js +23 -0
- package/build/admin-users.3b12dca2.chunk.js +11 -0
- package/build/api-tokens-create-page.3dd4e921.chunk.js +1 -0
- package/build/api-tokens-edit-page.9a1dd2fa.chunk.js +1 -0
- package/build/api-tokens-list-page.a103f526.chunk.js +16 -0
- package/build/audit-logs-settings-page.f538490f.chunk.js +1 -0
- package/build/ca-json.1fed5d8b.chunk.js +1 -0
- package/build/content-manager.c40f5ff9.chunk.js +1088 -0
- package/build/{content-type-builder-list-view.c28d33a6.chunk.js → content-type-builder-list-view.a200a358.chunk.js} +3 -3
- package/build/content-type-builder.bd1bbff1.chunk.js +166 -0
- package/build/{email-settings-page.aee46eaa.chunk.js → email-settings-page.45695daa.chunk.js} +2 -2
- package/build/en-json.fb9f6ddd.chunk.js +1 -0
- package/build/es-json.42096084.chunk.js +1 -0
- package/build/fr-json.69789980.chunk.js +1 -0
- package/build/{i18n-settings-page.4bc37a3f.chunk.js → i18n-settings-page.29308d0b.chunk.js} +1 -1
- package/build/index.html +1 -1
- package/build/main.ee36abd9.js +2927 -0
- package/build/review-workflows-settings.93808ae0.chunk.js +110 -0
- package/build/{runtime~main.2d0ed226.js → runtime~main.efd966f6.js} +2 -2
- package/build/sso-settings-page.0cdb96a6.chunk.js +1 -0
- package/build/transfer-tokens-create-page.de14cad4.chunk.js +1 -0
- package/build/transfer-tokens-edit-page.4f5e39af.chunk.js +1 -0
- package/build/transfer-tokens-list-page.7237443d.chunk.js +16 -0
- package/build/{upload-settings.a05aa26c.chunk.js → upload-settings.cb6c14c3.chunk.js} +2 -2
- package/build/upload.7e629643.chunk.js +26 -0
- package/build/users-advanced-settings-page.750b1f76.chunk.js +9 -0
- package/build/{users-email-settings-page.0bc87315.chunk.js → users-email-settings-page.e9bcd865.chunk.js} +1 -1
- package/build/{users-providers-settings-page.e88f1ac5.chunk.js → users-providers-settings-page.a94253e9.chunk.js} +1 -1
- package/build/{users-roles-settings-page.573a5c3e.chunk.js → users-roles-settings-page.1f505119.chunk.js} +5 -5
- package/build/webhook-edit-page.77ef4f1a.chunk.js +33 -0
- package/build/webhook-list-page.940a40f1.chunk.js +63 -0
- package/ee/admin/constants.js +16 -0
- package/ee/admin/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +1 -1
- package/ee/admin/hooks/useLicenseLimits/index.js +4 -2
- package/ee/admin/hooks/useSettingsMenu/constants.js +0 -5
- package/ee/admin/pages/AuthPage/constants.js +12 -0
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/index.js +7 -7
- package/ee/admin/pages/SettingsPage/pages/AuditLogs/ProtectedListPage/index.js +11 -6
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/ProtectedPage.js +20 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/ReviewWorkflows.js +68 -73
- package/ee/admin/pages/SettingsPage/pages/SingleSignOn/index.js +16 -12
- package/ee/admin/pages/SettingsPage/pages/Users/ListPage/ModalForm/{utils/roleSettingsForm.js → constants.js} +14 -8
- package/ee/admin/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/EventTableEE.js +8 -9
- package/ee/server/constants/webhookEvents.js +5 -0
- package/ee/server/controllers/workflows/stages/index.js +1 -1
- package/ee/server/services/passport.js +1 -1
- package/ee/server/services/review-workflows/entity-service-decorator.js +52 -1
- package/ee/server/services/review-workflows/review-workflows.js +4 -1
- package/package.json +12 -12
- package/server/content-types/User.js +10 -0
- package/server/services/permission/permissions-manager/sanitize.js +1 -1
- package/server/strategies/api-token.js +9 -5
- package/server/strategies/data-transfer.js +9 -5
- package/admin/src/content-manager/components/DynamicTable/index.js +0 -163
- package/admin/src/content-manager/components/RelationInput/components/Relation.js +0 -53
- package/admin/src/content-manager/pages/ListView/FieldPicker/utils/getAllAllowedHeader.js +0 -17
- package/admin/src/content-manager/pages/ListView/PaginationFooter/index.js +0 -35
- package/admin/src/hooks/useMenu/reducer.js +0 -63
- package/admin/src/pages/AuthPage/utils/index.js +0 -2
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/formDataModel.js +0 -8
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/roleSettingsForm.js +0 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/schema.js +0 -11
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/stepper.js +0 -17
- package/admin/src/permissions/customPermissions.js +0 -1
- package/admin/src/permissions/defaultPermissions.js +0 -92
- package/admin/src/permissions/index.js +0 -8
- package/build/1970.d246745e.chunk.js +0 -1
- package/build/3562.e0b1a0b3.chunk.js +0 -50
- package/build/5563.8a76bb1d.chunk.js +0 -79
- package/build/7259.eac09d4b.chunk.js +0 -1
- package/build/7447.3dabc92f.chunk.js +0 -35
- package/build/9363.6a7a78fc.chunk.js +0 -33
- package/build/Admin-authenticatedApp.4e158a8c.chunk.js +0 -79
- package/build/Admin_pluginsPage.5d9d4060.chunk.js +0 -6
- package/build/Admin_settingsPage.fefeafa0.chunk.js +0 -79
- package/build/admin-app.42c7a752.chunk.js +0 -63
- package/build/admin-edit-roles-page.6d62ca0b.chunk.js +0 -267
- package/build/admin-edit-users.bce64103.chunk.js +0 -10
- package/build/admin-roles-list.81ae57e3.chunk.js +0 -23
- package/build/admin-users.1ec50325.chunk.js +0 -11
- package/build/api-tokens-create-page.65411a36.chunk.js +0 -1
- package/build/api-tokens-edit-page.60312cb6.chunk.js +0 -1
- package/build/api-tokens-list-page.36a241c1.chunk.js +0 -16
- package/build/audit-logs-settings-page.fca8e2a0.chunk.js +0 -1
- package/build/ca-json.43e14418.chunk.js +0 -1
- package/build/content-manager.d6e60c78.chunk.js +0 -1094
- package/build/content-type-builder.dc0c8745.chunk.js +0 -132
- package/build/en-json.f5fa476a.chunk.js +0 -1
- package/build/es-json.715b6fd8.chunk.js +0 -1
- package/build/fr-json.73494bf5.chunk.js +0 -1
- package/build/main.9b423e8b.js +0 -2926
- package/build/review-workflows-settings.fc0b59ca.chunk.js +0 -61
- package/build/sso-settings-page.52f8d7de.chunk.js +0 -1
- package/build/transfer-tokens-create-page.9ec277d7.chunk.js +0 -1
- package/build/transfer-tokens-edit-page.fa5ade14.chunk.js +0 -1
- package/build/transfer-tokens-list-page.ae9900e4.chunk.js +0 -16
- package/build/upload.b0efd607.chunk.js +0 -26
- package/build/users-advanced-settings-page.d9e11bab.chunk.js +0 -9
- package/build/webhook-edit-page.1e8c9382.chunk.js +0 -31
- package/build/webhook-list-page.b2bcb3b6.chunk.js +0 -63
- package/ee/admin/pages/AuthPage/utils/forms.js +0 -16
- package/ee/admin/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/formDataModel.js +0 -14
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/CellValue.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/Media/FileWrapper.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/Media/index.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/MultipleMedias.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/RelationSingle/index.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/RepeatableComponent/index.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/SingleComponent/index.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/index.js +0 -0
- /package/admin/src/content-manager/{components/DynamicTable → pages/ListView/components}/CellContent/utils/isSingleRelation.js +0 -0
|
@@ -26,25 +26,25 @@ import {
|
|
|
26
26
|
import { Check } from '@strapi/icons';
|
|
27
27
|
import isEqual from 'lodash/isEqual';
|
|
28
28
|
import { useIntl } from 'react-intl';
|
|
29
|
+
import { useSelector } from 'react-redux';
|
|
29
30
|
|
|
30
31
|
import { useRolesList, useSettingsForm } from '../../../../../../admin/src/hooks';
|
|
31
|
-
import
|
|
32
|
+
import { selectAdminPermissions } from '../../../../../../admin/src/pages/App/selectors';
|
|
32
33
|
import { getRequestUrl } from '../../../../../../admin/src/utils';
|
|
33
34
|
|
|
34
35
|
import schema from './utils/schema';
|
|
35
36
|
|
|
36
|
-
const ssoPermissions = {
|
|
37
|
-
...adminPermissions.settings.sso,
|
|
38
|
-
readRoles: adminPermissions.settings.roles.read,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
37
|
export const SingleSignOn = () => {
|
|
42
38
|
const { formatMessage } = useIntl();
|
|
39
|
+
const permissions = useSelector(selectAdminPermissions);
|
|
43
40
|
|
|
44
41
|
const {
|
|
45
42
|
isLoading: isLoadingForPermissions,
|
|
46
43
|
allowedActions: { canUpdate, canReadRoles },
|
|
47
|
-
} = useRBAC(
|
|
44
|
+
} = useRBAC({
|
|
45
|
+
...permissions.settings.sso,
|
|
46
|
+
readRoles: permissions.settings.roles.read,
|
|
47
|
+
});
|
|
48
48
|
|
|
49
49
|
const [
|
|
50
50
|
{ formErrors, initialData, isLoading, modifiedData, showHeaderButtonLoader },
|
|
@@ -247,10 +247,14 @@ export const SingleSignOn = () => {
|
|
|
247
247
|
);
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
-
const ProtectedSSO = () =>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
const ProtectedSSO = () => {
|
|
251
|
+
const permissions = useSelector(selectAdminPermissions);
|
|
252
|
+
|
|
253
|
+
return (
|
|
254
|
+
<CheckPagePermissions permissions={permissions.settings.sso.main}>
|
|
255
|
+
<SingleSignOn />
|
|
256
|
+
</CheckPagePermissions>
|
|
257
|
+
);
|
|
258
|
+
};
|
|
255
259
|
|
|
256
260
|
export default ProtectedSSO;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export const FORM_INITIAL_VALUES = {
|
|
2
|
+
...(window.strapi.features.isEnabled(window.strapi.features.SSO)
|
|
3
|
+
? {
|
|
4
|
+
useSSORegistration: true,
|
|
5
|
+
}
|
|
6
|
+
: {}),
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const ROLE_LAYOUT = [
|
|
10
|
+
...(window.strapi.features.isEnabled(window.strapi.features.SSO)
|
|
11
|
+
? [
|
|
4
12
|
{
|
|
5
13
|
intlLabel: {
|
|
6
14
|
id: 'Settings.permissions.users.form.sso',
|
|
@@ -17,8 +25,6 @@ const form = window.strapi.features.isEnabled(window.strapi.features.SSO)
|
|
|
17
25
|
xs: 12,
|
|
18
26
|
},
|
|
19
27
|
},
|
|
20
|
-
]
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export default form;
|
|
28
|
+
]
|
|
29
|
+
: []),
|
|
30
|
+
];
|
package/ee/admin/pages/SettingsPage/pages/Webhooks/EditView/components/EventTable/EventTableEE.js
CHANGED
|
@@ -2,22 +2,21 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import EventTable from '../../../../../../../../../admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/Events';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const events = {
|
|
6
|
+
'review-workflows': ['review-workflows.updateEntryStage'],
|
|
7
|
+
};
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// };
|
|
9
|
+
const getHeaders = () => {
|
|
10
|
+
return [{ id: 'review-workflows.updateEntryStage', defaultMessage: 'Stage Change' }];
|
|
11
|
+
};
|
|
13
12
|
|
|
14
13
|
export function EventTableEE() {
|
|
15
14
|
return (
|
|
16
15
|
<EventTable.Root>
|
|
17
16
|
<EventTable.Headers />
|
|
18
17
|
<EventTable.Body />
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
<EventTable.Headers getHeaders={getHeaders} />
|
|
19
|
+
<EventTable.Body providedEvents={events} />
|
|
21
20
|
</EventTable.Root>
|
|
22
21
|
);
|
|
23
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { ApplicationError } = require('@strapi/utils
|
|
3
|
+
const { ApplicationError } = require('@strapi/utils').errors;
|
|
4
4
|
const { getService } = require('../../../utils');
|
|
5
5
|
const { hasReviewWorkflow } = require('../../../utils/review-workflows');
|
|
6
6
|
const {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// eslint-disable-next-line node/no-extraneous-require
|
|
4
4
|
const { features } = require('@strapi/strapi/lib/utils/ee');
|
|
5
5
|
|
|
6
|
-
const { UnauthorizedError } = require('@strapi/utils
|
|
6
|
+
const { UnauthorizedError } = require('@strapi/utils').errors;
|
|
7
7
|
const createLocalStrategy = require('../../../server/services/passport/local-strategy');
|
|
8
8
|
const sso = require('./passport/sso');
|
|
9
9
|
const { isSsoLocked } = require('../utils/sso-lock');
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { isNil, isNull } = require('lodash/fp');
|
|
4
4
|
const { ENTITY_STAGE_ATTRIBUTE } = require('../../constants/workflows');
|
|
5
|
+
const { WORKFLOW_UPDATE_STAGE } = require('../../constants/webhookEvents');
|
|
5
6
|
const { hasReviewWorkflow, getDefaultWorkflow } = require('../../utils/review-workflows');
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -17,6 +18,25 @@ const getDataWithStage = async (data) => {
|
|
|
17
18
|
return data;
|
|
18
19
|
};
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Get the stage information of an entity
|
|
23
|
+
* @param {String} uid
|
|
24
|
+
* @param {Number} id
|
|
25
|
+
* @returns {Object}
|
|
26
|
+
*/
|
|
27
|
+
const getEntityStage = async (uid, id) => {
|
|
28
|
+
const entity = await strapi.entityService.findOne(uid, id, {
|
|
29
|
+
populate: {
|
|
30
|
+
[ENTITY_STAGE_ATTRIBUTE]: {
|
|
31
|
+
populate: {
|
|
32
|
+
workflow: true,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
return entity?.[ENTITY_STAGE_ATTRIBUTE] ?? {};
|
|
38
|
+
};
|
|
39
|
+
|
|
20
40
|
/**
|
|
21
41
|
* Decorates the entity service with RW business logic
|
|
22
42
|
* @param {object} service - entity service
|
|
@@ -43,9 +63,40 @@ const decorator = (service) => ({
|
|
|
43
63
|
const data = { ...opts.data };
|
|
44
64
|
if (isNull(data[ENTITY_STAGE_ATTRIBUTE])) {
|
|
45
65
|
delete data[ENTITY_STAGE_ATTRIBUTE];
|
|
66
|
+
return service.update.call(this, uid, entityId, { ...opts, data });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const previousStage = await getEntityStage(uid, entityId);
|
|
70
|
+
|
|
71
|
+
const updatedEntity = await service.update.call(this, uid, entityId, { ...opts, data });
|
|
72
|
+
const updatedStage = updatedEntity[ENTITY_STAGE_ATTRIBUTE];
|
|
73
|
+
|
|
74
|
+
if (previousStage?.id && previousStage.id !== updatedStage.id) {
|
|
75
|
+
const model = strapi.getModel(uid);
|
|
76
|
+
|
|
77
|
+
strapi.eventHub.emit(WORKFLOW_UPDATE_STAGE, {
|
|
78
|
+
model: model.modelName,
|
|
79
|
+
uid: model.uid,
|
|
80
|
+
entity: {
|
|
81
|
+
id: entityId,
|
|
82
|
+
},
|
|
83
|
+
workflow: {
|
|
84
|
+
id: previousStage.workflow.id,
|
|
85
|
+
stages: {
|
|
86
|
+
from: {
|
|
87
|
+
id: previousStage.id,
|
|
88
|
+
name: previousStage.name,
|
|
89
|
+
},
|
|
90
|
+
to: {
|
|
91
|
+
id: updatedStage.id,
|
|
92
|
+
name: updatedStage.name,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
});
|
|
46
97
|
}
|
|
47
98
|
|
|
48
|
-
return
|
|
99
|
+
return updatedEntity;
|
|
49
100
|
},
|
|
50
101
|
});
|
|
51
102
|
|
|
@@ -11,6 +11,7 @@ const { ENTITY_STAGE_ATTRIBUTE } = require('../../constants/workflows');
|
|
|
11
11
|
|
|
12
12
|
const { getDefaultWorkflow } = require('../../utils/review-workflows');
|
|
13
13
|
const { persistTables, removePersistedTablesWithSuffix } = require('../../utils/persisted-tables');
|
|
14
|
+
const webhookEvents = require('../../constants/webhookEvents');
|
|
14
15
|
|
|
15
16
|
async function initDefaultWorkflow({ workflowsService, stagesService, strapi }) {
|
|
16
17
|
const wfCount = await workflowsService.count();
|
|
@@ -109,7 +110,9 @@ function persistStagesJoinTables({ strapi }) {
|
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
const registerWebhookEvents = async ({ strapi }) =>
|
|
112
|
-
|
|
113
|
+
Object.entries(webhookEvents).forEach(([eventKey, event]) =>
|
|
114
|
+
strapi.webhookStore.addAllowedEvent(eventKey, event)
|
|
115
|
+
);
|
|
113
116
|
|
|
114
117
|
module.exports = ({ strapi }) => {
|
|
115
118
|
const workflowsService = getService('workflows', { strapi });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/admin",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.4",
|
|
4
4
|
"description": "Strapi Admin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
"@casl/ability": "^5.4.3",
|
|
49
49
|
"@fingerprintjs/fingerprintjs": "3.4.1",
|
|
50
50
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
|
51
|
-
"@strapi/babel-plugin-switch-ee-ce": "4.11.
|
|
52
|
-
"@strapi/data-transfer": "4.11.
|
|
53
|
-
"@strapi/design-system": "1.8.
|
|
54
|
-
"@strapi/helper-plugin": "4.11.
|
|
55
|
-
"@strapi/icons": "1.8.
|
|
56
|
-
"@strapi/permissions": "4.11.
|
|
57
|
-
"@strapi/provider-audit-logs-local": "4.11.
|
|
58
|
-
"@strapi/typescript-utils": "4.11.
|
|
59
|
-
"@strapi/utils": "4.11.
|
|
51
|
+
"@strapi/babel-plugin-switch-ee-ce": "4.11.4",
|
|
52
|
+
"@strapi/data-transfer": "4.11.4",
|
|
53
|
+
"@strapi/design-system": "1.8.1",
|
|
54
|
+
"@strapi/helper-plugin": "4.11.4",
|
|
55
|
+
"@strapi/icons": "1.8.1",
|
|
56
|
+
"@strapi/permissions": "4.11.4",
|
|
57
|
+
"@strapi/provider-audit-logs-local": "4.11.4",
|
|
58
|
+
"@strapi/typescript-utils": "4.11.4",
|
|
59
|
+
"@strapi/utils": "4.11.4",
|
|
60
60
|
"axios": "1.4.0",
|
|
61
61
|
"babel-loader": "^9.1.2",
|
|
62
62
|
"babel-plugin-styled-components": "2.1.1",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"glob": "8.0.3",
|
|
146
146
|
"msw": "1.2.1",
|
|
147
147
|
"speed-measure-webpack-plugin": "1.5.0",
|
|
148
|
-
"webpack-bundle-analyzer": "^4.
|
|
148
|
+
"webpack-bundle-analyzer": "^4.9.0"
|
|
149
149
|
},
|
|
150
150
|
"peerDependencies": {
|
|
151
151
|
"@strapi/strapi": "^4.3.4"
|
|
@@ -163,5 +163,5 @@
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
|
-
"gitHead": "
|
|
166
|
+
"gitHead": "8d325a695386ab9b578b360bf768cfa25173050f"
|
|
167
167
|
}
|
|
@@ -20,7 +20,7 @@ const {
|
|
|
20
20
|
} = require('lodash/fp');
|
|
21
21
|
|
|
22
22
|
const { contentTypes, traverseEntity, sanitize, pipeAsync, traverse } = require('@strapi/utils');
|
|
23
|
-
const { removePassword } = require('@strapi/utils
|
|
23
|
+
const { removePassword } = require('@strapi/utils').sanitize.visitors;
|
|
24
24
|
const { ADMIN_USER_ALLOWED_FIELDS } = require('../../../domain/user');
|
|
25
25
|
|
|
26
26
|
const {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { castArray, isNil } = require('lodash/fp');
|
|
4
|
+
const { differenceInHours, parseISO } = require('date-fns');
|
|
4
5
|
const { UnauthorizedError, ForbiddenError } = require('@strapi/utils').errors;
|
|
5
6
|
const constants = require('../services/constants');
|
|
6
7
|
const { getService } = require('../utils');
|
|
@@ -53,11 +54,14 @@ const authenticate = async (ctx) => {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
// update lastUsedAt
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
// update lastUsedAt if the token has not been used in the last hour
|
|
58
|
+
const hoursSinceLastUsed = differenceInHours(currentDate, parseISO(apiToken.lastUsedAt));
|
|
59
|
+
if (hoursSinceLastUsed >= 1) {
|
|
60
|
+
await strapi.query('admin::api-token').update({
|
|
61
|
+
where: { id: apiToken.id },
|
|
62
|
+
data: { lastUsedAt: currentDate },
|
|
63
|
+
});
|
|
64
|
+
}
|
|
61
65
|
|
|
62
66
|
if (apiToken.type === constants.API_TOKEN_TYPE.CUSTOM) {
|
|
63
67
|
const ability = await strapi.contentAPI.permissions.engine.generateAbility(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const { differenceInHours, parseISO } = require('date-fns');
|
|
3
4
|
const {
|
|
4
5
|
errors: { UnauthorizedError, ForbiddenError },
|
|
5
6
|
} = require('@strapi/utils');
|
|
@@ -52,11 +53,14 @@ const authenticate = async (ctx) => {
|
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
// Update token metadata
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
// Update token metadata if the token has not been used in the last hour
|
|
57
|
+
const hoursSinceLastUsed = differenceInHours(currentDate, parseISO(transferToken.lastUsedAt));
|
|
58
|
+
if (hoursSinceLastUsed >= 1) {
|
|
59
|
+
await strapi.query('admin::api-token').update({
|
|
60
|
+
where: { id: transferToken.id },
|
|
61
|
+
data: { lastUsedAt: currentDate },
|
|
62
|
+
});
|
|
63
|
+
}
|
|
60
64
|
|
|
61
65
|
// Generate an ability based on the token permissions
|
|
62
66
|
const ability = await getService('transfer').permission.engine.generateAbility(
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
|
|
3
|
-
import { DynamicTable as Table, useStrapiApp } from '@strapi/helper-plugin';
|
|
4
|
-
import getReviewWorkflowsColumn from 'ee_else_ce/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/getTableColumn';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import { useIntl } from 'react-intl';
|
|
7
|
-
import { useSelector } from 'react-redux';
|
|
8
|
-
|
|
9
|
-
import { INJECT_COLUMN_IN_TABLE } from '../../../exposedHooks';
|
|
10
|
-
import { selectDisplayedHeaders } from '../../pages/ListView/selectors';
|
|
11
|
-
import { getTrad } from '../../utils';
|
|
12
|
-
|
|
13
|
-
import BulkActionsBar from './BulkActionsBar';
|
|
14
|
-
import { PublicationState } from './CellContent/PublicationState/PublicationState';
|
|
15
|
-
import ConfirmDialogDelete from './ConfirmDialogDelete';
|
|
16
|
-
import TableRows from './TableRows';
|
|
17
|
-
|
|
18
|
-
const DynamicTable = ({
|
|
19
|
-
canCreate,
|
|
20
|
-
canDelete,
|
|
21
|
-
canPublish,
|
|
22
|
-
contentTypeName,
|
|
23
|
-
action,
|
|
24
|
-
isBulkable,
|
|
25
|
-
isLoading,
|
|
26
|
-
onConfirmDelete,
|
|
27
|
-
onConfirmDeleteAll,
|
|
28
|
-
onConfirmPublishAll,
|
|
29
|
-
onConfirmUnpublishAll,
|
|
30
|
-
layout,
|
|
31
|
-
rows,
|
|
32
|
-
}) => {
|
|
33
|
-
const { runHookWaterfall } = useStrapiApp();
|
|
34
|
-
const hasDraftAndPublish = layout.contentType.options?.draftAndPublish ?? false;
|
|
35
|
-
const { formatMessage } = useIntl();
|
|
36
|
-
const displayedHeaders = useSelector(selectDisplayedHeaders);
|
|
37
|
-
|
|
38
|
-
const tableHeaders = useMemo(() => {
|
|
39
|
-
const headers = runHookWaterfall(INJECT_COLUMN_IN_TABLE, {
|
|
40
|
-
displayedHeaders,
|
|
41
|
-
layout,
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const formattedHeaders = headers.displayedHeaders.map((header) => {
|
|
45
|
-
const { fieldSchema, metadatas, name } = header;
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
...header,
|
|
49
|
-
metadatas: {
|
|
50
|
-
...metadatas,
|
|
51
|
-
label: formatMessage({
|
|
52
|
-
id: getTrad(`containers.ListPage.table-headers.${name}`),
|
|
53
|
-
defaultMessage: metadatas.label,
|
|
54
|
-
}),
|
|
55
|
-
},
|
|
56
|
-
name: fieldSchema.type === 'relation' ? `${name}.${metadatas.mainField.name}` : name,
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
if (hasDraftAndPublish) {
|
|
61
|
-
formattedHeaders.push({
|
|
62
|
-
key: '__published_at_temp_key__',
|
|
63
|
-
name: 'publishedAt',
|
|
64
|
-
fieldSchema: {
|
|
65
|
-
type: 'custom',
|
|
66
|
-
},
|
|
67
|
-
metadatas: {
|
|
68
|
-
label: formatMessage({
|
|
69
|
-
id: getTrad(`containers.ListPage.table-headers.publishedAt`),
|
|
70
|
-
defaultMessage: 'publishedAt',
|
|
71
|
-
}),
|
|
72
|
-
searchable: false,
|
|
73
|
-
sortable: true,
|
|
74
|
-
},
|
|
75
|
-
cellFormatter({ publishedAt }) {
|
|
76
|
-
return <PublicationState isPublished={!!publishedAt} />;
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// this should not exist. Ideally we would use registerHook() similar to what has been done
|
|
82
|
-
// in the i18n plugin. In order to do that review-workflows should have been a plugin. In
|
|
83
|
-
// a future iteration we need to find a better pattern.
|
|
84
|
-
|
|
85
|
-
// In CE this will return null - in EE a column definition including the custom formatting component.
|
|
86
|
-
const reviewWorkflowColumn = getReviewWorkflowsColumn(layout);
|
|
87
|
-
|
|
88
|
-
if (reviewWorkflowColumn) {
|
|
89
|
-
formattedHeaders.push(reviewWorkflowColumn);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return formattedHeaders;
|
|
93
|
-
}, [runHookWaterfall, displayedHeaders, layout, hasDraftAndPublish, formatMessage]);
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
<Table
|
|
97
|
-
components={{ ConfirmDialogDelete }}
|
|
98
|
-
contentType={contentTypeName}
|
|
99
|
-
action={action}
|
|
100
|
-
isLoading={isLoading}
|
|
101
|
-
headers={tableHeaders}
|
|
102
|
-
onConfirmDelete={onConfirmDelete}
|
|
103
|
-
onOpenDeleteAllModalTrackedEvent="willBulkDeleteEntries"
|
|
104
|
-
rows={rows}
|
|
105
|
-
withBulkActions
|
|
106
|
-
withMainAction={(canDelete || canPublish) && isBulkable}
|
|
107
|
-
renderBulkActionsBar={({ selectedEntries, clearSelectedEntries }) => (
|
|
108
|
-
<BulkActionsBar
|
|
109
|
-
showPublish={canPublish && hasDraftAndPublish}
|
|
110
|
-
showDelete={canDelete}
|
|
111
|
-
onConfirmDeleteAll={onConfirmDeleteAll}
|
|
112
|
-
onConfirmPublishAll={onConfirmPublishAll}
|
|
113
|
-
onConfirmUnpublishAll={onConfirmUnpublishAll}
|
|
114
|
-
selectedEntries={selectedEntries}
|
|
115
|
-
clearSelectedEntries={clearSelectedEntries}
|
|
116
|
-
/>
|
|
117
|
-
)}
|
|
118
|
-
>
|
|
119
|
-
<TableRows
|
|
120
|
-
canCreate={canCreate}
|
|
121
|
-
canDelete={canDelete}
|
|
122
|
-
contentType={layout.contentType}
|
|
123
|
-
headers={tableHeaders}
|
|
124
|
-
rows={rows}
|
|
125
|
-
withBulkActions
|
|
126
|
-
withMainAction={canDelete && isBulkable}
|
|
127
|
-
/>
|
|
128
|
-
</Table>
|
|
129
|
-
);
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
DynamicTable.defaultProps = {
|
|
133
|
-
action: undefined,
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
DynamicTable.propTypes = {
|
|
137
|
-
canCreate: PropTypes.bool.isRequired,
|
|
138
|
-
canDelete: PropTypes.bool.isRequired,
|
|
139
|
-
canPublish: PropTypes.bool.isRequired,
|
|
140
|
-
contentTypeName: PropTypes.string.isRequired,
|
|
141
|
-
action: PropTypes.node,
|
|
142
|
-
isBulkable: PropTypes.bool.isRequired,
|
|
143
|
-
isLoading: PropTypes.bool.isRequired,
|
|
144
|
-
layout: PropTypes.exact({
|
|
145
|
-
components: PropTypes.object.isRequired,
|
|
146
|
-
contentType: PropTypes.shape({
|
|
147
|
-
attributes: PropTypes.object.isRequired,
|
|
148
|
-
metadatas: PropTypes.object.isRequired,
|
|
149
|
-
layouts: PropTypes.shape({
|
|
150
|
-
list: PropTypes.array.isRequired,
|
|
151
|
-
}).isRequired,
|
|
152
|
-
options: PropTypes.object.isRequired,
|
|
153
|
-
settings: PropTypes.object.isRequired,
|
|
154
|
-
}).isRequired,
|
|
155
|
-
}).isRequired,
|
|
156
|
-
onConfirmDelete: PropTypes.func.isRequired,
|
|
157
|
-
onConfirmDeleteAll: PropTypes.func.isRequired,
|
|
158
|
-
onConfirmPublishAll: PropTypes.func.isRequired,
|
|
159
|
-
onConfirmUnpublishAll: PropTypes.func.isRequired,
|
|
160
|
-
rows: PropTypes.array.isRequired,
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
export default DynamicTable;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Flex } from '@strapi/design-system';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
|
-
export const Relation = ({
|
|
7
|
-
children,
|
|
8
|
-
loadMore,
|
|
9
|
-
search,
|
|
10
|
-
totalNumberOfRelations,
|
|
11
|
-
size,
|
|
12
|
-
...props
|
|
13
|
-
}) => {
|
|
14
|
-
return (
|
|
15
|
-
<>
|
|
16
|
-
<Flex
|
|
17
|
-
paddingBottom={totalNumberOfRelations > 0 ? 3 : 0}
|
|
18
|
-
gap={2}
|
|
19
|
-
justifyContent="space-between"
|
|
20
|
-
alignItems="end"
|
|
21
|
-
wrap="wrap"
|
|
22
|
-
>
|
|
23
|
-
<Flex
|
|
24
|
-
direction="column"
|
|
25
|
-
alignItems="stretch"
|
|
26
|
-
basis={size <= 6 ? '100%' : '70%'}
|
|
27
|
-
gap={1}
|
|
28
|
-
{...props}
|
|
29
|
-
>
|
|
30
|
-
{search}
|
|
31
|
-
</Flex>
|
|
32
|
-
|
|
33
|
-
{loadMore}
|
|
34
|
-
</Flex>
|
|
35
|
-
|
|
36
|
-
{children}
|
|
37
|
-
</>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
Relation.defaultProps = {
|
|
42
|
-
search: undefined,
|
|
43
|
-
loadMore: undefined,
|
|
44
|
-
totalNumberOfRelations: 0,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
Relation.propTypes = {
|
|
48
|
-
children: PropTypes.node.isRequired,
|
|
49
|
-
search: PropTypes.node,
|
|
50
|
-
loadMore: PropTypes.node,
|
|
51
|
-
size: PropTypes.number.isRequired,
|
|
52
|
-
totalNumberOfRelations: PropTypes.number,
|
|
53
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { checkIfAttributeIsDisplayable } from '../../../../utils';
|
|
2
|
-
|
|
3
|
-
const getAllAllowedHeaders = (attributes) => {
|
|
4
|
-
const allowedAttributes = Object.keys(attributes).reduce((acc, current) => {
|
|
5
|
-
const attribute = attributes[current];
|
|
6
|
-
|
|
7
|
-
if (checkIfAttributeIsDisplayable(attribute)) {
|
|
8
|
-
acc.push(current);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return acc;
|
|
12
|
-
}, []);
|
|
13
|
-
|
|
14
|
-
return allowedAttributes.sort();
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default getAllAllowedHeaders;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Box, Flex } from '@strapi/design-system';
|
|
4
|
-
import { PageSizeURLQuery, PaginationURLQuery } from '@strapi/helper-plugin';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
|
|
7
|
-
const PaginationFooter = ({ pagination }) => {
|
|
8
|
-
return (
|
|
9
|
-
<Box paddingTop={4}>
|
|
10
|
-
<Flex alignItems="flex-end" justifyContent="space-between">
|
|
11
|
-
<PageSizeURLQuery trackedEvent="willChangeNumberOfEntriesPerPage" />
|
|
12
|
-
<PaginationURLQuery pagination={pagination} />
|
|
13
|
-
</Flex>
|
|
14
|
-
</Box>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
PaginationFooter.defaultProps = {
|
|
19
|
-
pagination: {
|
|
20
|
-
pageCount: 0,
|
|
21
|
-
pageSize: 10,
|
|
22
|
-
total: 0,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
PaginationFooter.propTypes = {
|
|
27
|
-
pagination: PropTypes.shape({
|
|
28
|
-
page: PropTypes.number,
|
|
29
|
-
pageCount: PropTypes.number,
|
|
30
|
-
pageSize: PropTypes.number,
|
|
31
|
-
total: PropTypes.number,
|
|
32
|
-
}),
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default PaginationFooter;
|