@strapi/admin 4.12.0-beta.3 → 4.12.0-beta.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/content-manager/components/CollectionTypeFormWrapper/index.js +13 -35
- package/admin/src/content-manager/pages/ListView/components/TableRows/index.js +304 -0
- package/admin/src/pages/AuthPage/components/Register/index.js +4 -0
- package/build/2379.0ca87a89.chunk.js +1 -0
- package/build/2395.df7a044a.chunk.js +26 -0
- package/build/2801.b1140c9b.chunk.js +1 -0
- package/build/{3100.21c343fa.chunk.js → 3100.2ba4df95.chunk.js} +1 -1
- package/build/{3483.ddd2d6df.chunk.js → 3483.e2ee2547.chunk.js} +1 -1
- package/build/3984.dda474f7.chunk.js +1 -0
- package/build/502.8ae8ef60.chunk.js +1 -0
- package/build/5483.6dd2e776.chunk.js +6 -0
- package/build/7065.99ca8ab1.chunk.js +112 -0
- package/build/7464.8a6c1e6c.chunk.js +1 -0
- package/build/8276.6c7b8e6e.chunk.js +26 -0
- package/build/{Admin-authenticatedApp.36b3826c.chunk.js → Admin-authenticatedApp.24998de8.chunk.js} +1 -1
- package/build/{admin-app.1c3f7fd6.chunk.js → admin-app.c2e4e128.chunk.js} +8 -8
- package/build/content-manager.8772445b.chunk.js +1103 -0
- package/build/index.html +1 -1
- package/build/{main.a12c4c0f.js → main.ef5fb1a8.js} +45 -45
- package/build/review-workflows-settings-create-view.d4b5dbb8.chunk.js +1 -0
- package/build/review-workflows-settings-edit-view.77299c63.chunk.js +1 -0
- package/build/review-workflows-settings-list-view.3ee9190d.chunk.js +56 -0
- package/build/{runtime~main.d197f488.js → runtime~main.c99f4c36.js} +2 -2
- package/build/sso-settings-page.3a1ed8c9.chunk.js +1 -0
- package/ee/admin/constants.js +3 -0
- package/ee/admin/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +12 -4
- package/ee/admin/hooks/index.js +1 -1
- package/ee/admin/hooks/useLicenseLimitNotification/index.js +1 -1
- package/ee/admin/hooks/useLicenseLimits/__mocks__/index.js +8 -0
- package/ee/admin/hooks/useLicenseLimits/index.js +1 -3
- package/ee/admin/hooks/useLicenseLimits/useLicenseLimits.js +3 -13
- package/ee/admin/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo/index.js +19 -4
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stage/Stage.js +7 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stages.js +20 -16
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/WorkflowAttributes/WorkflowAttributes.js +38 -23
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/constants.js +3 -0
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/CreateView.js +47 -27
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/index.js +8 -3
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/EditView.js +68 -41
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/index.js +8 -3
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/ListView.js +72 -55
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/index.js +8 -3
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/reducer/index.js +1 -7
- package/ee/admin/pages/SettingsPage/pages/SingleSignOn/utils/schema.js +8 -5
- package/ee/server/services/review-workflows/review-workflows.js +1 -1
- package/ee/server/services/review-workflows/validation.js +6 -4
- package/ee/server/services/review-workflows/workflows/content-types.js +28 -19
- package/ee/server/services/review-workflows/workflows/index.js +14 -2
- package/ee/server/validation/authentication.js +14 -8
- package/package.json +8 -8
- package/build/2379.d33a2e16.chunk.js +0 -1
- package/build/2395.b0419a54.chunk.js +0 -26
- package/build/2801.18f38baf.chunk.js +0 -1
- package/build/3984.ea7b8036.chunk.js +0 -1
- package/build/502.ccb38223.chunk.js +0 -1
- package/build/5483.ed2c7efa.chunk.js +0 -6
- package/build/7464.c6d0565c.chunk.js +0 -1
- package/build/8276.23e0763b.chunk.js +0 -26
- package/build/8298.fd253c9f.chunk.js +0 -117
- package/build/content-manager.b8d593d4.chunk.js +0 -1103
- package/build/review-workflows-settings-create-view.dfd87e1f.chunk.js +0 -1
- package/build/review-workflows-settings-edit-view.53c00afe.chunk.js +0 -1
- package/build/review-workflows-settings-list-view.a34be805.chunk.js +0 -56
- package/build/sso-settings-page.ed6f3f15.chunk.js +0 -1
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/ProtectedPage/ProtectedPage.js +0 -21
- package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/ProtectedPage/index.js +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { memo, useCallback, useEffect,
|
|
1
|
+
import { memo, useCallback, useEffect, useRef } from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
contentManagementUtilRemoveFieldsFromData,
|
|
5
4
|
formatContentTypeData,
|
|
6
5
|
useAPIErrorHandler,
|
|
7
6
|
useFetchClient,
|
|
@@ -60,30 +59,8 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
60
59
|
|
|
61
60
|
const isCreatingEntry = id === null;
|
|
62
61
|
|
|
63
|
-
const requestURL =
|
|
64
|
-
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return getRequestUrl(`collection-types/${slug}/${origin || id}`);
|
|
69
|
-
}, [slug, id, isCreatingEntry, origin]);
|
|
70
|
-
|
|
71
|
-
const cleanClonedData = useCallback(
|
|
72
|
-
(data) => {
|
|
73
|
-
if (!origin) {
|
|
74
|
-
return data;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const cleaned = contentManagementUtilRemoveFieldsFromData(
|
|
78
|
-
data,
|
|
79
|
-
allLayoutDataRef.current.contentType,
|
|
80
|
-
allLayoutDataRef.current.components
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
return cleaned;
|
|
84
|
-
},
|
|
85
|
-
[origin]
|
|
86
|
-
);
|
|
62
|
+
const requestURL =
|
|
63
|
+
isCreatingEntry && !origin ? null : getRequestUrl(`collection-types/${slug}/${origin || id}`);
|
|
87
64
|
|
|
88
65
|
const cleanReceivedData = useCallback((data) => {
|
|
89
66
|
const cleaned = removePasswordFieldsFromData(
|
|
@@ -146,7 +123,7 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
146
123
|
try {
|
|
147
124
|
const { data } = await fetchClient.get(requestURL, { cancelToken: source.token });
|
|
148
125
|
|
|
149
|
-
dispatch(getDataSucceeded(cleanReceivedData(
|
|
126
|
+
dispatch(getDataSucceeded(cleanReceivedData(data)));
|
|
150
127
|
} catch (err) {
|
|
151
128
|
if (axios.isCancel(err)) {
|
|
152
129
|
return;
|
|
@@ -173,8 +150,8 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
173
150
|
|
|
174
151
|
// This is needed in order to reset the form when the query changes
|
|
175
152
|
const init = async () => {
|
|
176
|
-
|
|
177
|
-
|
|
153
|
+
dispatch(getData());
|
|
154
|
+
dispatch(initForm(rawQuery));
|
|
178
155
|
};
|
|
179
156
|
|
|
180
157
|
if (!isMounted.current) {
|
|
@@ -192,7 +169,6 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
192
169
|
};
|
|
193
170
|
}, [
|
|
194
171
|
fetchClient,
|
|
195
|
-
cleanClonedData,
|
|
196
172
|
cleanReceivedData,
|
|
197
173
|
push,
|
|
198
174
|
requestURL,
|
|
@@ -237,20 +213,22 @@ const CollectionTypeFormWrapper = ({ allLayoutData, children, slug, id, origin }
|
|
|
237
213
|
|
|
238
214
|
const onPost = useCallback(
|
|
239
215
|
async (body, trackerProperty) => {
|
|
216
|
+
const isCloning = typeof origin === 'string';
|
|
240
217
|
/**
|
|
241
218
|
* If we're cloning we want to post directly to this endpoint
|
|
242
219
|
* so that the relations even if they're not listed in the EditView
|
|
243
220
|
* are correctly attached to the entry.
|
|
244
221
|
*/
|
|
245
|
-
const endPoint =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
: getRequestUrl(`collection-types/${slug}`);
|
|
222
|
+
const endPoint = isCloning
|
|
223
|
+
? getRequestUrl(`collection-types/${slug}/clone/${origin}`)
|
|
224
|
+
: getRequestUrl(`collection-types/${slug}`);
|
|
249
225
|
try {
|
|
250
226
|
// Show a loading button in the EditView/Header.js && lock the app => no navigation
|
|
251
227
|
dispatch(setStatus('submit-pending'));
|
|
252
228
|
|
|
253
|
-
const {
|
|
229
|
+
const { id, ...restBody } = body;
|
|
230
|
+
|
|
231
|
+
const { data } = await post(endPoint, isCloning ? restBody : body, {
|
|
254
232
|
params: query,
|
|
255
233
|
});
|
|
256
234
|
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
BaseCheckbox,
|
|
5
|
+
IconButton,
|
|
6
|
+
Tbody,
|
|
7
|
+
Td,
|
|
8
|
+
Tr,
|
|
9
|
+
Flex,
|
|
10
|
+
Status,
|
|
11
|
+
Typography,
|
|
12
|
+
} from '@strapi/design-system';
|
|
13
|
+
import {
|
|
14
|
+
useTracking,
|
|
15
|
+
useFetchClient,
|
|
16
|
+
useAPIErrorHandler,
|
|
17
|
+
useQueryParams,
|
|
18
|
+
} from '@strapi/helper-plugin';
|
|
19
|
+
import { Trash, Duplicate, Pencil } from '@strapi/icons';
|
|
20
|
+
import { AxiosError } from 'axios';
|
|
21
|
+
import PropTypes from 'prop-types';
|
|
22
|
+
import { useIntl } from 'react-intl';
|
|
23
|
+
import { Link, useHistory } from 'react-router-dom';
|
|
24
|
+
|
|
25
|
+
import { useEnterprise } from '../../../../../hooks/useEnterprise';
|
|
26
|
+
import { getFullName } from '../../../../../utils';
|
|
27
|
+
import { usePluginsQueryParams } from '../../../../hooks';
|
|
28
|
+
import { getTrad } from '../../../../utils';
|
|
29
|
+
import CellContent from '../CellContent';
|
|
30
|
+
|
|
31
|
+
const REVIEW_WORKFLOW_COLUMNS_CE = () => null;
|
|
32
|
+
|
|
33
|
+
export const TableRows = ({
|
|
34
|
+
canCreate,
|
|
35
|
+
canDelete,
|
|
36
|
+
contentType,
|
|
37
|
+
features: { hasDraftAndPublish, hasReviewWorkflows },
|
|
38
|
+
headers,
|
|
39
|
+
entriesToDelete,
|
|
40
|
+
onClickDelete,
|
|
41
|
+
onSelectRow,
|
|
42
|
+
withMainAction,
|
|
43
|
+
withBulkActions,
|
|
44
|
+
rows,
|
|
45
|
+
}) => {
|
|
46
|
+
const { push, location } = useHistory();
|
|
47
|
+
const { pathname } = location;
|
|
48
|
+
const { formatMessage } = useIntl();
|
|
49
|
+
const { post } = useFetchClient();
|
|
50
|
+
|
|
51
|
+
const { trackUsage } = useTracking();
|
|
52
|
+
const pluginsQueryParams = usePluginsQueryParams();
|
|
53
|
+
const [{ query }] = useQueryParams();
|
|
54
|
+
const { formatAPIError } = useAPIErrorHandler(getTrad);
|
|
55
|
+
const ReviewWorkflowsStage = useEnterprise(
|
|
56
|
+
REVIEW_WORKFLOW_COLUMNS_CE,
|
|
57
|
+
async () =>
|
|
58
|
+
(
|
|
59
|
+
await import(
|
|
60
|
+
'../../../../../../../ee/admin/content-manager/pages/ListView/ReviewWorkflowsColumn'
|
|
61
|
+
)
|
|
62
|
+
).ReviewWorkflowsStageEE,
|
|
63
|
+
{
|
|
64
|
+
enabled: hasReviewWorkflows,
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @param {string} id
|
|
71
|
+
* @returns void
|
|
72
|
+
*/
|
|
73
|
+
const handleRowClick = (id) => () => {
|
|
74
|
+
if (!withBulkActions) return;
|
|
75
|
+
|
|
76
|
+
trackUsage('willEditEntryFromList');
|
|
77
|
+
push({
|
|
78
|
+
pathname: `${pathname}/${id}`,
|
|
79
|
+
state: { from: pathname },
|
|
80
|
+
search: pluginsQueryParams,
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const handleCloneClick = (id) => async () => {
|
|
85
|
+
try {
|
|
86
|
+
const { data } = await post(
|
|
87
|
+
`/content-manager/collection-types/${contentType.uid}/auto-clone/${id}`,
|
|
88
|
+
{},
|
|
89
|
+
{ params: { plugins: query?.plugins } }
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
if ('id' in data) {
|
|
93
|
+
push({
|
|
94
|
+
pathname: `${pathname}/${data.id}`,
|
|
95
|
+
state: { from: pathname },
|
|
96
|
+
search: pluginsQueryParams,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
} catch (err) {
|
|
100
|
+
if (err instanceof AxiosError) {
|
|
101
|
+
push({
|
|
102
|
+
pathname: `${pathname}/create/clone/${id}`,
|
|
103
|
+
state: { from: pathname, error: formatAPIError(err) },
|
|
104
|
+
search: pluginsQueryParams,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// block rendering until the review stage component is fully loaded in EE
|
|
111
|
+
if (!ReviewWorkflowsStage) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Table Cells with actions e.g edit, delete, duplicate have `stopPropagation`
|
|
117
|
+
* to prevent the row from being selected.
|
|
118
|
+
*/
|
|
119
|
+
return (
|
|
120
|
+
<Tbody>
|
|
121
|
+
{rows.map((data, index) => {
|
|
122
|
+
const isChecked = entriesToDelete.includes(data.id);
|
|
123
|
+
const itemLineText = formatMessage(
|
|
124
|
+
{
|
|
125
|
+
id: 'content-manager.components.DynamicTable.row-line',
|
|
126
|
+
defaultMessage: 'item line {number}',
|
|
127
|
+
},
|
|
128
|
+
{ number: index }
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<Tr
|
|
133
|
+
cursor={withBulkActions ? 'pointer' : 'default'}
|
|
134
|
+
key={data.id}
|
|
135
|
+
onClick={handleRowClick(data.id)}
|
|
136
|
+
>
|
|
137
|
+
{withMainAction && (
|
|
138
|
+
<Td onClick={(e) => e.stopPropagation()}>
|
|
139
|
+
<BaseCheckbox
|
|
140
|
+
aria-label={formatMessage(
|
|
141
|
+
{
|
|
142
|
+
id: 'app.component.table.select.one-entry',
|
|
143
|
+
defaultMessage: `Select {target}`,
|
|
144
|
+
},
|
|
145
|
+
{ target: getFullName(data.firstname, data.lastname) }
|
|
146
|
+
)}
|
|
147
|
+
checked={isChecked}
|
|
148
|
+
onChange={() => {
|
|
149
|
+
onSelectRow({ name: data.id, value: !isChecked });
|
|
150
|
+
}}
|
|
151
|
+
/>
|
|
152
|
+
</Td>
|
|
153
|
+
)}
|
|
154
|
+
|
|
155
|
+
{headers.map(({ key, cellFormatter, name, ...rest }) => {
|
|
156
|
+
if (hasDraftAndPublish && name === 'publishedAt') {
|
|
157
|
+
return (
|
|
158
|
+
<Td key={key}>
|
|
159
|
+
<Status
|
|
160
|
+
width="min-content"
|
|
161
|
+
showBullet={false}
|
|
162
|
+
variant={data.publishedAt ? 'success' : 'secondary'}
|
|
163
|
+
size="S"
|
|
164
|
+
>
|
|
165
|
+
<Typography
|
|
166
|
+
fontWeight="bold"
|
|
167
|
+
textColor={`${data.publishedAt ? 'success' : 'secondary'}700`}
|
|
168
|
+
>
|
|
169
|
+
{formatMessage({
|
|
170
|
+
id: getTrad(
|
|
171
|
+
`containers.List.${data.publishedAt ? 'published' : 'draft'}`
|
|
172
|
+
),
|
|
173
|
+
defaultMessage: data.publishedAt ? 'Published' : 'Draft',
|
|
174
|
+
})}
|
|
175
|
+
</Typography>
|
|
176
|
+
</Status>
|
|
177
|
+
</Td>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (hasReviewWorkflows && name === 'strapi_reviewWorkflows_stage') {
|
|
182
|
+
return (
|
|
183
|
+
<Td key={key}>
|
|
184
|
+
{data.strapi_reviewWorkflows_stage ? (
|
|
185
|
+
<ReviewWorkflowsStage
|
|
186
|
+
color={data.strapi_reviewWorkflows_stage.color}
|
|
187
|
+
name={data.strapi_reviewWorkflows_stage.name}
|
|
188
|
+
/>
|
|
189
|
+
) : (
|
|
190
|
+
<Typography textColor="neutral800">-</Typography>
|
|
191
|
+
)}
|
|
192
|
+
</Td>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (typeof cellFormatter === 'function') {
|
|
197
|
+
return <Td key={key}>{cellFormatter(data, { key, name, ...rest })}</Td>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return (
|
|
201
|
+
<Td key={key}>
|
|
202
|
+
<CellContent
|
|
203
|
+
content={data[name.split('.')[0]]}
|
|
204
|
+
name={name}
|
|
205
|
+
contentType={contentType}
|
|
206
|
+
{...rest}
|
|
207
|
+
rowId={data.id}
|
|
208
|
+
/>
|
|
209
|
+
</Td>
|
|
210
|
+
);
|
|
211
|
+
})}
|
|
212
|
+
|
|
213
|
+
{withBulkActions && (
|
|
214
|
+
<Td>
|
|
215
|
+
<Flex as="span" justifyContent="end" gap={1} onClick={(e) => e.stopPropagation()}>
|
|
216
|
+
<IconButton
|
|
217
|
+
forwardedAs={Link}
|
|
218
|
+
onClick={() => {
|
|
219
|
+
trackUsage('willEditEntryFromButton');
|
|
220
|
+
}}
|
|
221
|
+
to={{
|
|
222
|
+
pathname: `${pathname}/${data.id}`,
|
|
223
|
+
state: { from: pathname },
|
|
224
|
+
search: pluginsQueryParams,
|
|
225
|
+
}}
|
|
226
|
+
label={formatMessage(
|
|
227
|
+
{ id: 'app.component.table.edit', defaultMessage: 'Edit {target}' },
|
|
228
|
+
{ target: itemLineText }
|
|
229
|
+
)}
|
|
230
|
+
noBorder
|
|
231
|
+
>
|
|
232
|
+
<Pencil />
|
|
233
|
+
</IconButton>
|
|
234
|
+
|
|
235
|
+
{canCreate && (
|
|
236
|
+
<IconButton
|
|
237
|
+
onClick={handleCloneClick(data.id)}
|
|
238
|
+
label={formatMessage(
|
|
239
|
+
{
|
|
240
|
+
id: 'app.component.table.duplicate',
|
|
241
|
+
defaultMessage: 'Duplicate {target}',
|
|
242
|
+
},
|
|
243
|
+
{ target: itemLineText }
|
|
244
|
+
)}
|
|
245
|
+
noBorder
|
|
246
|
+
>
|
|
247
|
+
<Duplicate />
|
|
248
|
+
</IconButton>
|
|
249
|
+
)}
|
|
250
|
+
|
|
251
|
+
{canDelete && (
|
|
252
|
+
<IconButton
|
|
253
|
+
onClick={() => {
|
|
254
|
+
trackUsage('willDeleteEntryFromList');
|
|
255
|
+
onClickDelete(data.id);
|
|
256
|
+
}}
|
|
257
|
+
label={formatMessage(
|
|
258
|
+
{ id: 'global.delete-target', defaultMessage: 'Delete {target}' },
|
|
259
|
+
{ target: itemLineText }
|
|
260
|
+
)}
|
|
261
|
+
noBorder
|
|
262
|
+
>
|
|
263
|
+
<Trash />
|
|
264
|
+
</IconButton>
|
|
265
|
+
)}
|
|
266
|
+
</Flex>
|
|
267
|
+
</Td>
|
|
268
|
+
)}
|
|
269
|
+
</Tr>
|
|
270
|
+
);
|
|
271
|
+
})}
|
|
272
|
+
</Tbody>
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
TableRows.defaultProps = {
|
|
277
|
+
canCreate: false,
|
|
278
|
+
canDelete: false,
|
|
279
|
+
entriesToDelete: [],
|
|
280
|
+
onClickDelete() {},
|
|
281
|
+
onSelectRow() {},
|
|
282
|
+
rows: [],
|
|
283
|
+
withBulkActions: false,
|
|
284
|
+
withMainAction: false,
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
TableRows.propTypes = {
|
|
288
|
+
canCreate: PropTypes.bool,
|
|
289
|
+
canDelete: PropTypes.bool,
|
|
290
|
+
contentType: PropTypes.shape({
|
|
291
|
+
uid: PropTypes.string.isRequired,
|
|
292
|
+
}).isRequired,
|
|
293
|
+
entriesToDelete: PropTypes.array,
|
|
294
|
+
features: PropTypes.shape({
|
|
295
|
+
hasDraftAndPublish: PropTypes.bool.isRequired,
|
|
296
|
+
hasReviewWorkflows: PropTypes.bool.isRequired,
|
|
297
|
+
}).isRequired,
|
|
298
|
+
headers: PropTypes.array.isRequired,
|
|
299
|
+
onClickDelete: PropTypes.func,
|
|
300
|
+
onSelectRow: PropTypes.func,
|
|
301
|
+
rows: PropTypes.array,
|
|
302
|
+
withBulkActions: PropTypes.bool,
|
|
303
|
+
withMainAction: PropTypes.bool,
|
|
304
|
+
};
|
|
@@ -98,6 +98,10 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
98
98
|
|
|
99
99
|
if (!['password', 'confirmPassword'].includes(key) && typeof value === 'string') {
|
|
100
100
|
normalizedvalue = normalizedvalue.trim();
|
|
101
|
+
|
|
102
|
+
if (key === 'lastname') {
|
|
103
|
+
normalizedvalue = normalizedvalue || null;
|
|
104
|
+
}
|
|
101
105
|
}
|
|
102
106
|
|
|
103
107
|
acc[key] = normalizedvalue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[2379],{50337:function(U,c,t){t.d(c,{pl:function(){return g},aY:function(){return R},q5:function(){return r.q}});var e=t(32735),n=t(19565),E=t(86209),f=t(97889);const m={data:[],isLoading:!0};var L=(s,l)=>(0,f.ZP)(s,i=>{switch(l.type){case"GET_DATA_SUCCEEDED":{i.data=l.data,i.isLoading=!1;break}case"GET_DATA_ERROR":{i.isLoading=!1;break}default:return i}}),g=({ssoEnabled:s})=>{const[l,i]=(0,e.useReducer)(L,m),D=(0,n.lm)(),{get:T}=(0,n.kY)();return(0,e.useEffect)(()=>{(async()=>{try{if(!s){i({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:u}=await T((0,E.IF)("providers"));i({type:"GET_DATA_SUCCEEDED",data:u})}catch(u){console.error(u),i({type:"GET_DATA_ERROR"}),D({type:"warning",message:{id:"notification.error"}})}})()},[T,s,D]),l},a=t(36866),A=t.n(a),o=t(67879),O=t(53038),r=t(53104);const I="strapi-notification-seat-limit",P="https://cloud.strapi.io/profile/billing",C="https://strapi.io/billing/request-seats";var R=()=>{const{formatMessage:s}=(0,o.Z)();let{license:l,isError:i,isLoading:D}=(0,r.q)();const T=(0,n.lm)(),{pathname:p}=(0,O.TH)(),{enforcementUserCount:u,permittedSeats:_,licenseLimitStatus:d,isHostedOnStrapiCloud:S}=l;(0,e.useEffect)(()=>{if(i||D)return;const B=!A()(_)&&!window.sessionStorage.getItem(`${I}-${p}`)&&(d==="AT_LIMIT"||d==="OVER_LIMIT");let y;d==="OVER_LIMIT"?y="warning":d==="AT_LIMIT"&&(y="softWarning"),B&&T({type:y,message:s({id:"notification.ee.warning.over-.message",defaultMessage:"Add seats to {licenseLimitStatus, select, OVER_LIMIT {invite} other {re-enable}} Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app."},{licenseLimitStatus:d}),title:s({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:d,enforcementUserCount:u,permittedSeats:_}),link:{url:S?P:C,label:s({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:S})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${I}-${p}`,!0)}})},[T,l,p,s,D,_,d,u,S,i])}},53104:function(U,c,t){t.d(c,{q:function(){return f}});var e=t(32735),n=t(19565),E=t(20108);function f({enabled:m}={enabled:!0}){const{get:v}=(0,n.kY)(),{data:L,isError:M,isLoading:g}=(0,E.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:o}}=await v("/admin/license-limit-information");return o},{enabled:m}),a=L??{},A=e.useCallback(o=>(a?.features??[]).find(r=>r.name===o)?.options??{},[a?.features]);return{license:a,getFeature:A,isError:M,isLoading:g}}},42379:function(U,c,t){t.r(c),t.d(c,{CreateActionEE:function(){return r}});var e=t(32735),n=t(87933),E=t(63919),f=t(99140),m=t(41415),v=t(69932),L=t(7961),M=t(36866),g=t.n(M),a=t(60216),A=t.n(a),o=t(67879),O=t(50337);const r=({onClick:I})=>{const{formatMessage:P}=(0,o.Z)(),{license:{permittedSeats:C,shouldStopCreate:h},isError:R,isLoading:s}=(0,O.q5)();return R||s?null:e.createElement(n.k,{gap:2},!g()(C)&&h&&e.createElement(E.u,{description:P({id:"Settings.application.admin-seats.at-limit-tooltip",defaultMessage:"At limit: add seats to invite more users"}),position:"left"},e.createElement(f.J,{width:`${14/16}rem`,height:`${14/16}rem`,color:"danger500",as:v.Z})),e.createElement(m.z,{"data-testid":"create-user-button",onClick:I,startIcon:e.createElement(L.Z,null),size:"S",disabled:h},P({id:"Settings.permissions.users.create",defaultMessage:"Invite new user"})))};r.propTypes={onClick:A().func.isRequired}}}]);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[2395],{50337:function(I,f,t){t.d(f,{pl:function(){return D},aY:function(){return n},q5:function(){return a.q}});var e=t(32735),u=t(19565),m=t(86209),g=t(97889);const P={data:[],isLoading:!0};var r=(o,p)=>(0,g.ZP)(o,l=>{switch(p.type){case"GET_DATA_SUCCEEDED":{l.data=p.data,l.isLoading=!1;break}case"GET_DATA_ERROR":{l.isLoading=!1;break}default:return l}}),D=({ssoEnabled:o})=>{const[p,l]=(0,e.useReducer)(r,P),A=(0,u.lm)(),{get:h}=(0,u.kY)();return(0,e.useEffect)(()=>{(async()=>{try{if(!o){l({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:v}=await h((0,m.IF)("providers"));l({type:"GET_DATA_SUCCEEDED",data:v})}catch(v){console.error(v),l({type:"GET_DATA_ERROR"}),A({type:"warning",message:{id:"notification.error"}})}})()},[h,o,A]),p},d=t(36866),_=t.n(d),c=t(67879),T=t(53038),a=t(53104);const E="strapi-notification-seat-limit",s="https://cloud.strapi.io/profile/billing",L="https://strapi.io/billing/request-seats";var n=()=>{const{formatMessage:o}=(0,c.Z)();let{license:p,isError:l,isLoading:A}=(0,a.q)();const h=(0,u.lm)(),{pathname:y}=(0,T.TH)(),{enforcementUserCount:v,permittedSeats:C,licenseLimitStatus:M,isHostedOnStrapiCloud:U}=p;(0,e.useEffect)(()=>{if(l||A)return;const B=!_()(C)&&!window.sessionStorage.getItem(`${E}-${y}`)&&(M==="AT_LIMIT"||M==="OVER_LIMIT");let S;M==="OVER_LIMIT"?S="warning":M==="AT_LIMIT"&&(S="softWarning"),B&&h({type:S,message:o({id:"notification.ee.warning.over-.message",defaultMessage:"Add seats to {licenseLimitStatus, select, OVER_LIMIT {invite} other {re-enable}} Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app."},{licenseLimitStatus:M}),title:o({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:M,enforcementUserCount:v,permittedSeats:C}),link:{url:U?s:L,label:o({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:U})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${E}-${y}`,!0)}})},[h,p,y,o,A,C,M,v,U,l])}},53104:function(I,f,t){t.d(f,{q:function(){return g}});var e=t(32735),u=t(19565),m=t(20108);function g({enabled:P}={enabled:!0}){const{get:O}=(0,u.kY)(),{data:r,isError:i,isLoading:D}=(0,m.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:c}}=await O("/admin/license-limit-information");return c},{enabled:P}),d=r??{},_=e.useCallback(c=>(d?.features??[]).find(a=>a.name===c)?.options??{},[d?.features]);return{license:d,getFeature:_,isError:i,isLoading:D}}},82395:function(I,f,t){t.r(f),t.d(f,{LoginEE:function(){return E}});var e=t(32735),u=t(9026),m=t(72850),g=t(87933),P=t(49372),O=t(60216),r=t.n(O),i=t(67879),D=t(8471),d=t(11060),_=t(24436),c=t(50337),T=t(68726);const a=(0,D.ZP)(u.i)`
|
|
2
|
+
flex: 1;
|
|
3
|
+
`,E=s=>{const L=window.strapi.features.isEnabled(window.strapi.features.SSO),{isLoading:R,data:n}=(0,c.pl)({ssoEnabled:L}),{formatMessage:o}=(0,i.Z)();return!L||!R&&n.length===0?e.createElement(d.ZP,null,e.createElement(_.Z,{...s})):e.createElement(d.ZP,null,e.createElement(_.Z,{...s},e.createElement(m.x,{paddingTop:7},e.createElement(g.k,{direction:"column",alignItems:"stretch",gap:7},e.createElement(g.k,null,e.createElement(a,null),e.createElement(m.x,{paddingLeft:3,paddingRight:3},e.createElement(P.Z,{variant:"sigma",textColor:"neutral600"},o({id:"Auth.login.sso.divider"}))),e.createElement(a,null)),e.createElement(T.Z,{providers:n,displayAllProviders:!1})))))};E.defaultProps={onSubmit:s=>s.preventDefault(),requestError:null},E.propTypes={formErrors:r().object.isRequired,modifiedData:r().object.isRequired,onChange:r().func.isRequired,onSubmit:r().func,requestError:r().object}},68726:function(I,f,t){var e=t(32735),u=t(87933),m=t(63919),g=t(49372),P=t(15335),O=t(5803),r=t(60216),i=t.n(r),D=t(67879),d=t(14911),_=t(8471);const c=_.ZP.a`
|
|
4
|
+
width: ${136/16}rem;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
height: ${48/16}rem;
|
|
9
|
+
border: 1px solid ${({theme:s})=>s.colors.neutral150};
|
|
10
|
+
border-radius: ${({theme:s})=>s.borderRadius};
|
|
11
|
+
text-decoration: inherit;
|
|
12
|
+
&:link {
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
}
|
|
15
|
+
color: ${({theme:s})=>s.colors.neutral600};
|
|
16
|
+
`,T=(0,_.ZP)(u.k)`
|
|
17
|
+
& a:not(:first-child):not(:last-child) {
|
|
18
|
+
margin: 0 ${({theme:s})=>s.spaces[2]};
|
|
19
|
+
}
|
|
20
|
+
& a:first-child {
|
|
21
|
+
margin-right: ${({theme:s})=>s.spaces[2]};
|
|
22
|
+
}
|
|
23
|
+
& a:last-child {
|
|
24
|
+
margin-left: ${({theme:s})=>s.spaces[2]};
|
|
25
|
+
}
|
|
26
|
+
`,a=({provider:s})=>e.createElement(m.u,{label:s.displayName},e.createElement(c,{href:`${window.strapi.backendURL}/admin/connect/${s.uid}`},s.icon?e.createElement("img",{src:s.icon,"aria-hidden":!0,alt:"",height:"32px"}):e.createElement(g.Z,null,s.displayName)));a.propTypes={provider:i().shape({icon:i().string,displayName:i().string.isRequired,uid:i().string.isRequired}).isRequired};const E=({providers:s,displayAllProviders:L})=>{const{formatMessage:R}=(0,D.Z)();return L?e.createElement(P.r,{gap:4},s.map(n=>e.createElement(O.P,{key:n.uid,col:4},e.createElement(a,{provider:n})))):s.length>2&&!L?e.createElement(P.r,{gap:4},s.slice(0,2).map(n=>e.createElement(O.P,{key:n.uid,col:4},e.createElement(a,{provider:n}))),e.createElement(O.P,{col:4},e.createElement(m.u,{label:R({id:"global.see-more"})},e.createElement(c,{as:d.rU,to:"/auth/providers"},e.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):e.createElement(T,{justifyContent:"center"},s.map(n=>e.createElement(a,{key:n.uid,provider:n})))};E.defaultProps={displayAllProviders:!0},E.propTypes={providers:i().arrayOf(i().object).isRequired,displayAllProviders:i().bool},f.Z=E}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[2801],{50337:function(C,r,t){t.d(r,{pl:function(){return v},aY:function(){return U},q5:function(){return g.q}});var s=t(32735),n=t(19565),c=t(86209),l=t(97889);const T={data:[],isLoading:!0};var A=(i,a)=>(0,l.ZP)(i,e=>{switch(a.type){case"GET_DATA_SUCCEEDED":{e.data=a.data,e.isLoading=!1;break}case"GET_DATA_ERROR":{e.isLoading=!1;break}default:return e}}),v=({ssoEnabled:i})=>{const[a,e]=(0,s.useReducer)(A,T),E=(0,n.lm)(),{get:m}=(0,n.kY)();return(0,s.useEffect)(()=>{(async()=>{try{if(!i){e({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:u}=await m((0,c.IF)("providers"));e({type:"GET_DATA_SUCCEEDED",data:u})}catch(u){console.error(u),e({type:"GET_DATA_ERROR"}),E({type:"warning",message:{id:"notification.error"}})}})()},[m,i,E]),a},d=t(36866),h=t.n(d),f=t(67879),P=t(53038),g=t(53104);const R="strapi-notification-seat-limit",y="https://cloud.strapi.io/profile/billing",M="https://strapi.io/billing/request-seats";var U=()=>{const{formatMessage:i}=(0,f.Z)();let{license:a,isError:e,isLoading:E}=(0,g.q)();const m=(0,n.lm)(),{pathname:L}=(0,P.TH)(),{enforcementUserCount:u,permittedSeats:I,licenseLimitStatus:o,isHostedOnStrapiCloud:p}=a;(0,s.useEffect)(()=>{if(e||E)return;const N=!h()(I)&&!window.sessionStorage.getItem(`${R}-${L}`)&&(o==="AT_LIMIT"||o==="OVER_LIMIT");let D;o==="OVER_LIMIT"?D="warning":o==="AT_LIMIT"&&(D="softWarning"),N&&m({type:D,message:i({id:"notification.ee.warning.over-.message",defaultMessage:"Add seats to {licenseLimitStatus, select, OVER_LIMIT {invite} other {re-enable}} Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app."},{licenseLimitStatus:o}),title:i({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:o,enforcementUserCount:u,permittedSeats:I}),link:{url:p?y:M,label:i({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:p})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${R}-${L}`,!0)}})},[m,a,L,i,E,I,o,u,p,e])}},53104:function(C,r,t){t.d(r,{q:function(){return l}});var s=t(32735),n=t(19565),c=t(20108);function l({enabled:T}={enabled:!0}){const{get:S}=(0,n.kY)(),{data:A,isError:O,isLoading:v}=(0,c.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:f}}=await S("/admin/license-limit-information");return f},{enabled:T}),d=A??{},h=s.useCallback(f=>(d?.features??[]).find(g=>g.name===f)?.options??{},[d?.features]);return{license:d,getFeature:h,isError:O,isLoading:v}}},12801:function(C,r,t){t.r(r),t.d(r,{UserListPageEE:function(){return l}});var s=t(32735),n=t(99528),c=t(50337);function l(){return(0,c.aY)(),s.createElement(n.W,null)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3100],{73100:function(e,n
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3100],{73100:function(i,e,n){n.r(e),n.d(e,{ADMIN_PERMISSIONS_EE:function(){return a}});const a={settings:{auditLogs:{main:[{action:"admin::audit-logs.read",subject:null}],read:[{action:"admin::audit-logs.read",subject:null}]},"review-workflows":{main:[{action:"admin::review-workflows.read",subject:null}],create:[{action:"admin::review-workflows.create",subject:null}],delete:[{action:"admin::review-workflows.delete",subject:null}],update:[{action:"admin::review-workflows.update",subject:null}]},sso:{main:[{action:"admin::provider-login.read",subject:null}],read:[{action:"admin::provider-login.read",subject:null}],update:[{action:"admin::provider-login.update",subject:null}]}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3483],{11009:function(a,o,n){n.r(o),n.d(o,{ROUTES_EE:function(){return s}});const s=[...window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS)?[{async Component(){return await n.e(2812).then(n.bind(n,1487))},to:"/settings/audit-logs",exact:!0}]:[],...window.strapi.features.isEnabled(window.strapi.features.REVIEW_WORKFLOWS)?[{async Component(){return await n.e(349).then(n.bind(n,32033))},to:"/settings/review-workflows",exact:!0},{async Component(){return await Promise.all([n.e(4546),n.e(
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3483],{11009:function(a,o,n){n.r(o),n.d(o,{ROUTES_EE:function(){return s}});const s=[...window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS)?[{async Component(){return await n.e(2812).then(n.bind(n,1487))},to:"/settings/audit-logs",exact:!0}]:[],...window.strapi.features.isEnabled(window.strapi.features.REVIEW_WORKFLOWS)?[{async Component(){return await n.e(349).then(n.bind(n,32033))},to:"/settings/review-workflows",exact:!0},{async Component(){return await Promise.all([n.e(4546),n.e(7065),n.e(8936)]).then(n.bind(n,80252))},to:"/settings/review-workflows/create",exact:!0},{async Component(){return await Promise.all([n.e(4546),n.e(7065),n.e(4409)]).then(n.bind(n,45696))},to:"/settings/review-workflows/:workflowId",exact:!0}]:[],...window.strapi.features.isEnabled(window.strapi.features.SSO)?[{async Component(){return await n.e(302).then(n.bind(n,68951))},to:"/settings/single-sign-on",exact:!0}]:[]]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3984],{33984:function(W,l,t){t.r(l),t.d(l,{ReviewWorkflowsStageEE:function(){return c}});var n=t(32735),s=t(87933),E=t(72850),a=t(49372),e=t(19565),u=t(60216),r=t.n(u),o=t(2121),i=t(68886);function c({color:O,name:T}){const{themeColorName:f}=(0,i.k)(O);return n.createElement(s.k,{alignItems:"center",gap:2,maxWidth:(0,e.Q1)(300)},n.createElement(E.x,{height:2,background:O,borderColor:f==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2}),n.createElement(a.Z,{fontWeight:"regular",textColor:"neutral700",ellipsis:!0},T))}c.defaultProps={color:o.FT},c.propTypes={color:r().string,name:r().string.isRequired}},2121:function(W,l,t){t.d(l,{$k:function(){return o},Ef:function(){return f},FT:function(){return O},Nj:function(){return r},Ot:function(){return u},VS:function(){return i},_X:function(){return A},gu:function(){return E},lv:function(){return c},qZ:function(){return a},sN:function(){return s},uL:function(){return T},x4:function(){return e}});var n=t(12301);const s="settings_review-workflows",E="Settings/Review_Workflows/RESET_WORKFLOW",a="Settings/Review_Workflows/SET_WORKFLOW",e="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",u="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",r="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",o="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",i="Settings/Review_Workflows/WORKFLOW_UPDATE",c={primary600:"Blue",primary200:"Lilac",alternative600:"Violet",alternative200:"Lavender",success600:"Green",success200:"Pale Green",danger500:"Cherry",danger200:"Pink",warning600:"Orange",warning200:"Yellow",secondary600:"Teal",secondary200:"Baby Blue",neutral400:"Gray",neutral0:"White"},O=n.W.colors.primary600,T={STAGE:"stage"},f="numberOfWorkflows",A="stagesPerWorkflow"},68886:function(W,l,t){t.d(l,{k:function(){return E},s:function(){return a}});var n=t(12301),s=t(2121);function E(e){if(!e)return null;const r=Object.entries(n.W.colors).filter(([,o])=>o.toUpperCase()===e.toUpperCase()).reduce((o,[i])=>(s.lv?.[i]&&(o=i),o),null);return r?{themeColorName:r,name:s.lv[r]}:null}function a(){return Object.entries(s.lv).map(([e,u])=>({hex:n.W.colors[e].toUpperCase(),name:u}))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[502],{53104:function(f,o,t){t.d(o,{q:function(){return r}});var e=t(32735),d=t(19565),s=t(20108);function r({enabled:E}={enabled:!0}){const{get:_}=(0,d.kY)(),{data:c,isError:n,isLoading:m}=(0,s.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:i}}=await _("/admin/license-limit-information");return i},{enabled:E}),a=c??{},u=e.useCallback(i=>(a?.features??[]).find(g=>g.name===i)?.options??{},[a?.features]);return{license:a,getFeature:u,isError:n,isLoading:m}}},50502:function(f,o,t){t.r(o),t.d(o,{AdminSeatInfoEE:function(){return I}});var e=t(32735),d=t(5803),s=t(49372),r=t(87933),E=t(63919),_=t(99140),c=t(41502),n=t(19565),m=t(69932),a=t(47361),u=t(67879),i=t(15062),M=t(30305),g=t(53104);const p="https://cloud.strapi.io/profile/billing",C="https://strapi.io/billing/request-seats",I=()=>{const{formatMessage:l}=(0,u.Z)(),A=(0,i.v9)(M._),{isLoading:O,allowedActions:{canRead:v,canCreate:R,canUpdate:U,canDelete:B}}=(0,n.ss)(A.settings.users),{license:{licenseLimitStatus:T,enforcementUserCount:D,permittedSeats:L,isHostedOnStrapiCloud:P},isError:W,isLoading:h}=(0,g.q)({enabled:!O&&v&&R&&U&&B});return W||(O||h)||!L?null:e.createElement(d.P,{col:6,s:12},e.createElement(s.Z,{variant:"sigma",textColor:"neutral600"},l({id:"Settings.application.admin-seats",defaultMessage:"Admin seats"})),e.createElement(r.k,{gap:2},e.createElement(r.k,null,e.createElement(s.Z,{as:"p"},l({id:"Settings.application.ee.admin-seats.count",defaultMessage:"<text>{enforcementUserCount}</text>/{permittedSeats}"},{permittedSeats:L,enforcementUserCount:D,text:K=>e.createElement(s.Z,{fontWeight:"semiBold",textColor:D>L?"danger500":null},K)}))),T==="OVER_LIMIT"&&e.createElement(E.u,{description:l({id:"Settings.application.ee.admin-seats.at-limit-tooltip",defaultMessage:"At limit: add seats to invite more users"})},e.createElement(_.J,{width:`${(0,n.Q1)(14)}rem`,height:`${(0,n.Q1)(14)}rem`,color:"danger500",as:m.Z}))),e.createElement(c.r,{href:P?p:C,isExternal:!0,endIcon:e.createElement(a.Z,null)},l({id:"Settings.application.ee.admin-seats.add-seats",defaultMessage:"{isHostedOnStrapiCloud, select, true {Add seats} other {Contact sales}}"},{isHostedOnStrapiCloud:P})))}}}]);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[5483],{90978:function(y,f,e){e.r(f),e.d(f,{InformationBoxEE:function(){return I}});var t=e(32735),r=e(77035),s=e(87933),m=e(49372),u=e(23866),a=e(19565),d=e(67879),l=e(20108),n=e(98865),E=e(53104),o=e(90562),i=e(2121),g=e(32329),v=e(68886);const w="strapi_stage";function I(){const{initialData:A,isCreatingEntry:R,layout:{uid:O,options:k},isSingleType:D,onChange:C}=(0,a.Wq)(),{put:c}=(0,a.kY)(),T=A?.[w]??null,P=k?.reviewWorkflows??!1,{formatMessage:p}=(0,d.Z)(),{formatAPIError:K}=(0,a.So)(),U=(0,a.lm)(),{getFeature:Z}=(0,E.q)(),[F,S]=t.useState(!1),{meta:$,workflows:[N],isLoading:Y}=(0,g.n)({filters:{contentTypes:O}}),{error:x,isLoading:j,mutateAsync:H}=(0,l.useMutation)(async({entityId:h,stageId:W,uid:M})=>{const B=D?"single-types":"collection-types",{data:{data:G}}=await c(`/admin/content-manager/${B}/${M}/${h}/stage`,{data:{id:W}});return C({target:{name:w,value:G[w]}},!0),G},{onSuccess(){U({type:"success",message:{id:"content-manager.reviewWorkflows.stage.notification.saved",defaultMessage:"Review stage updated"}})}}),L=Z("review-workflows"),Q=x&&K(x)||null,X=async({value:h})=>{try{L?.[i.Ef]&&parseInt(L[i.Ef],10)<$.workflowCount?S("workflow"):L?.[i._X]&&parseInt(L[i._X],10)<N.stages.length?S("stage"):await H({entityId:A.id,stageId:h,uid:O})}catch{}},{themeColorName:V}=T?.color?(0,v.k)(T?.color):{};return t.createElement(n.d.Root,null,t.createElement(n.d.Title,null),P&&!R&&t.createElement(r.q4,{error:Q,name:w,id:w,value:T?.id,onChange:h=>X({value:h}),label:p({id:"content-manager.reviewWorkflows.stage.label",defaultMessage:"Review stage"}),startIcon:t.createElement(s.k,{as:"span",height:2,background:T?.color,borderColor:V==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2,marginRight:"-3px"}),customizeContent:()=>t.createElement(s.k,{as:"span",justifyContent:"space-between",alignItems:"center",width:"100%"},t.createElement(m.Z,{textColor:"neutral800",ellipsis:!0},T?.name),Y||j?t.createElement(u.a,{small:!0,style:{display:"flex"}}):null)},N?N.stages.map(({id:h,color:W,name:M})=>{const{themeColorName:B}=(0,v.k)(W);return t.createElement(r.ag,{startIcon:t.createElement(s.k,{height:2,background:W,borderColor:B==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2}),value:h,textValue:M},M)}):[]),t.createElement(n.d.Body,null),t.createElement(o.fC,{isOpen:F==="workflow",onClose:()=>S(!1)},t.createElement(o.Dx,null,p({id:"content-manager.reviewWorkflows.workflows.limit.title",defaultMessage:"You\u2019ve reached the limit of workflows in your plan"})),t.createElement(o.uT,null,p({id:"content-manager.reviewWorkflows.workflows.limit.body",defaultMessage:"Delete a workflow or contact Sales to enable more workflows."}))),t.createElement(o.fC,{isOpen:F==="stage",onClose:()=>S(!1)},t.createElement(o.Dx,null,p({id:"content-manager.reviewWorkflows.stages.limit.title",defaultMessage:"You have reached the limit of stages for this workflow in your plan"})),t.createElement(o.uT,null,p({id:"content-manager.reviewWorkflows.stages.limit.body",defaultMessage:"Try deleting some stages or contact Sales to enable more stages."}))))}},53104:function(y,f,e){e.d(f,{q:function(){return m}});var t=e(32735),r=e(19565),s=e(20108);function m({enabled:u}={enabled:!0}){const{get:a}=(0,r.kY)(),{data:d,isError:l,isLoading:n}=(0,s.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:i}}=await a("/admin/license-limit-information");return i},{enabled:u}),E=d??{},o=t.useCallback(i=>(E?.features??[]).find(v=>v.name===i)?.options??{},[E?.features]);return{license:E,getFeature:o,isError:l,isLoading:n}}},90562:function(y,f,e){e.d(f,{uT:function(){return O},fC:function(){return C},Dx:function(){return R}});var t=e(32735),r=e(49372),s=e(87933),m=e(85025),u=e(31600),a=e(72850),d=e(50563),l=e(95489),n=e(35331),E=e(60216),o=e.n(E),i=e(67879),g=e(8471),v=e.p+"0cd5f8915b265d5b1856.png";const w="limits-title",I="https://strapi.io/pricing-cloud",A="https://strapi.io/contact-sales";function R({children:c}){return t.createElement(r.Z,{variant:"alpha",id:w},c)}R.propTypes={children:o().node.isRequired};function O({children:c}){return t.createElement(r.Z,{variant:"omega"},c)}O.propTypes={children:o().node.isRequired};function k(){const{formatMessage:c}=(0,i.Z)();return t.createElement(s.k,{gap:2,paddingTop:4},t.createElement(l.Q,{variant:"default",isExternal:!0,href:I},c({id:"Settings.review-workflows.limit.cta.learn",defaultMessage:"Learn more"})),t.createElement(l.Q,{variant:"tertiary",isExternal:!0,href:A},c({id:"Settings.review-workflows.limit.cta.sales",defaultMessage:"Contact Sales"})))}const D=g.ZP.img`
|
|
2
|
+
// Margin top|right reverse the padding of ModalBody
|
|
3
|
+
margin-right: ${({theme:c})=>`-${c.spaces[7]}`};
|
|
4
|
+
margin-top: ${({theme:c})=>`-${c.spaces[7]}`};
|
|
5
|
+
width: 360px;
|
|
6
|
+
`;function C({children:c,isOpen:T,onClose:P}){const{formatMessage:p}=(0,i.Z)();return T?t.createElement(m.P,{labelledBy:w},t.createElement(u.f,null,t.createElement(s.k,{gap:2,paddingLeft:7,position:"relative"},t.createElement(s.k,{alignItems:"start",direction:"column",gap:2,width:"60%"},c,t.createElement(k,null)),t.createElement(s.k,{justifyContent:"end",height:"100%",width:"40%"},t.createElement(D,{src:v,"aria-hidden":!0,alt:"",loading:"lazy"}),t.createElement(a.x,{display:"flex",position:"absolute",right:0,top:0},t.createElement(d.h,{icon:t.createElement(n.Z,null),"aria-label":p({id:"global.close",defaultMessage:"Close"}),onClick:P})))))):null}C.defaultProps={isOpen:!1},C.propTypes={children:o().node.isRequired,isOpen:o().bool,onClose:o().func.isRequired}},2121:function(y,f,e){e.d(f,{$k:function(){return l},Ef:function(){return g},FT:function(){return o},Nj:function(){return d},Ot:function(){return a},VS:function(){return n},_X:function(){return v},gu:function(){return s},lv:function(){return E},qZ:function(){return m},sN:function(){return r},uL:function(){return i},x4:function(){return u}});var t=e(12301);const r="settings_review-workflows",s="Settings/Review_Workflows/RESET_WORKFLOW",m="Settings/Review_Workflows/SET_WORKFLOW",u="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",a="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",d="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",l="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",n="Settings/Review_Workflows/WORKFLOW_UPDATE",E={primary600:"Blue",primary200:"Lilac",alternative600:"Violet",alternative200:"Lavender",success600:"Green",success200:"Pale Green",danger500:"Cherry",danger200:"Pink",warning600:"Orange",warning200:"Yellow",secondary600:"Teal",secondary200:"Baby Blue",neutral400:"Gray",neutral0:"White"},o=t.W.colors.primary600,i={STAGE:"stage"},g="numberOfWorkflows",v="stagesPerWorkflow"},32329:function(y,f,e){e.d(f,{n:function(){return s}});var t=e(19565),r=e(20108);function s(m={}){const{get:u}=(0,t.kY)(),{id:a="",...d}=m,l={populate:"stages"},{data:n,isLoading:E,status:o,refetch:i}=(0,r.useQuery)(["review-workflows","workflows",a],async()=>(await u(`/admin/review-workflows/workflows/${a}`,{params:{...l,...d}})).data);let g=[];return a&&n?.data?g=[n.data]:Array.isArray(n?.data)&&(g=n.data),{meta:n?.meta??{},workflows:g,isLoading:E,status:o,refetch:i}}},68886:function(y,f,e){e.d(f,{k:function(){return s},s:function(){return m}});var t=e(12301),r=e(2121);function s(u){if(!u)return null;const d=Object.entries(t.W.colors).filter(([,l])=>l.toUpperCase()===u.toUpperCase()).reduce((l,[n])=>(r.lv?.[n]&&(l=n),l),null);return d?{themeColorName:d,name:r.lv[d]}:null}function m(){return Object.entries(r.lv).map(([u,a])=>({hex:t.W.colors[u].toUpperCase(),name:a}))}}}]);
|