@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
|
@@ -6,11 +6,14 @@ const schema = yup.object().shape({
|
|
|
6
6
|
defaultRole: yup.mixed().when('autoRegister', (value, initSchema) => {
|
|
7
7
|
return value ? initSchema.required(translatedErrors.required) : initSchema.nullable();
|
|
8
8
|
}),
|
|
9
|
-
ssoLockedRoles: yup
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
ssoLockedRoles: yup
|
|
10
|
+
.array()
|
|
11
|
+
.nullable()
|
|
12
|
+
.of(
|
|
13
|
+
yup.mixed().when('ssoLockedRoles', (value, initSchema) => {
|
|
14
|
+
return value ? initSchema.required(translatedErrors.required) : initSchema.nullable();
|
|
15
|
+
})
|
|
16
|
+
),
|
|
14
17
|
});
|
|
15
18
|
|
|
16
19
|
export default schema;
|
|
@@ -22,7 +22,7 @@ const MAX_JOIN_TABLE_NAME_SUFFIX =
|
|
|
22
22
|
const MAX_CONTENT_TYPE_NAME_LEN = MAX_DB_TABLE_NAME_LEN - MAX_JOIN_TABLE_NAME_SUFFIX;
|
|
23
23
|
|
|
24
24
|
const DEFAULT_OPTIONS = {
|
|
25
|
-
|
|
25
|
+
numberOfWorkflows: MAX_WORKFLOWS,
|
|
26
26
|
stagesPerWorkflow: MAX_STAGES_PER_WORKFLOW,
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -9,12 +9,14 @@ const { clampMaxWorkflows, clampMaxStagesPerWorkflow } = require('../../utils/re
|
|
|
9
9
|
module.exports = ({ strapi }) => {
|
|
10
10
|
return {
|
|
11
11
|
limits: {
|
|
12
|
-
|
|
12
|
+
numberOfWorkflows: MAX_WORKFLOWS,
|
|
13
13
|
stagesPerWorkflow: MAX_STAGES_PER_WORKFLOW,
|
|
14
14
|
},
|
|
15
|
-
register({
|
|
15
|
+
register({ numberOfWorkflows, stagesPerWorkflow }) {
|
|
16
16
|
if (!Object.isFrozen(this.limits)) {
|
|
17
|
-
this.limits.
|
|
17
|
+
this.limits.numberOfWorkflows = clampMaxWorkflows(
|
|
18
|
+
numberOfWorkflows || this.limits.numberOfWorkflows
|
|
19
|
+
);
|
|
18
20
|
this.limits.stagesPerWorkflow = clampMaxStagesPerWorkflow(
|
|
19
21
|
stagesPerWorkflow || this.limits.stagesPerWorkflow
|
|
20
22
|
);
|
|
@@ -58,7 +60,7 @@ module.exports = ({ strapi }) => {
|
|
|
58
60
|
async validateWorkflowCount(countAddedWorkflows = 0) {
|
|
59
61
|
const workflowsService = getService('workflows', { strapi });
|
|
60
62
|
const countWorkflows = await workflowsService.count();
|
|
61
|
-
if (countWorkflows + countAddedWorkflows > this.limits.
|
|
63
|
+
if (countWorkflows + countAddedWorkflows > this.limits.numberOfWorkflows) {
|
|
62
64
|
throw new ValidationError(ERRORS.WORKFLOWS_LIMIT);
|
|
63
65
|
}
|
|
64
66
|
},
|
|
@@ -30,26 +30,35 @@ module.exports = ({ strapi }) => {
|
|
|
30
30
|
* @param {Workflow.Stage} options.stageId - The new stage to assign the entities to
|
|
31
31
|
*/
|
|
32
32
|
async migrate({ srcContentTypes = [], destContentTypes, stageId }) {
|
|
33
|
-
// Workflows service is using this content-types service, to avoid an infinite loop, we need to get the service in the method
|
|
34
33
|
const workflowsService = getService('workflows', { strapi });
|
|
35
34
|
const { created, deleted } = diffContentTypes(srcContentTypes, destContentTypes);
|
|
36
35
|
|
|
37
|
-
await mapAsync(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//
|
|
42
|
-
await
|
|
43
|
-
return this.transferContentType(srcWorkflow, uid);
|
|
44
|
-
}
|
|
45
|
-
await updateContentTypeConfig(uid, true);
|
|
36
|
+
await mapAsync(
|
|
37
|
+
created,
|
|
38
|
+
async (uid) => {
|
|
39
|
+
// Content Types should only be assigned to one workflow
|
|
40
|
+
// However, edge cases can happen, and this handles them
|
|
41
|
+
const srcWorkflows = await workflowsService._getAssignedWorkflows(uid, {});
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
if (srcWorkflows.length) {
|
|
44
|
+
// Updates all existing entities stages links to the new stage
|
|
45
|
+
await stagesService.updateEntitiesStage(uid, { toStageId: stageId });
|
|
46
|
+
// Transfer content types from the previous workflow(s)
|
|
47
|
+
await mapAsync(srcWorkflows, (srcWorkflow) =>
|
|
48
|
+
this.transferContentTypes(srcWorkflow, uid)
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
await updateContentTypeConfig(uid, true);
|
|
52
|
+
|
|
53
|
+
// Create new stages links to the new stage
|
|
54
|
+
return stagesService.updateEntitiesStage(uid, {
|
|
55
|
+
fromStageId: null,
|
|
56
|
+
toStageId: stageId,
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
// transferContentTypes can cause race conditions if called in parallel when updating the same workflow
|
|
60
|
+
{ concurrency: 1 }
|
|
61
|
+
);
|
|
53
62
|
|
|
54
63
|
await mapAsync(deleted, async (uid) => {
|
|
55
64
|
await updateContentTypeConfig(uid, false);
|
|
@@ -58,15 +67,15 @@ module.exports = ({ strapi }) => {
|
|
|
58
67
|
},
|
|
59
68
|
|
|
60
69
|
/**
|
|
61
|
-
* Filters the content types assigned to
|
|
70
|
+
* Filters the content types assigned to a workflow
|
|
62
71
|
* @param {Workflow} srcWorkflow - The workflow to transfer from
|
|
63
72
|
* @param {string} uid - The content type uid
|
|
64
73
|
*/
|
|
65
|
-
async
|
|
74
|
+
async transferContentTypes(srcWorkflow, uid) {
|
|
66
75
|
// Update assignedContentTypes of the previous workflow
|
|
67
76
|
await strapi.entityService.update(WORKFLOW_MODEL_UID, srcWorkflow.id, {
|
|
68
77
|
data: {
|
|
69
|
-
contentTypes: srcWorkflow.contentTypes.filter((
|
|
78
|
+
contentTypes: srcWorkflow.contentTypes.filter((contentType) => contentType !== uid),
|
|
70
79
|
},
|
|
71
80
|
});
|
|
72
81
|
},
|
|
@@ -163,11 +163,23 @@ module.exports = ({ strapi }) => {
|
|
|
163
163
|
* @returns {Promise<object|null>} - Assigned workflow object if found, or null.
|
|
164
164
|
*/
|
|
165
165
|
async getAssignedWorkflow(uid, opts = {}) {
|
|
166
|
-
const workflows = await this.
|
|
166
|
+
const workflows = await this._getAssignedWorkflows(uid, opts);
|
|
167
|
+
return workflows.length > 0 ? workflows[0] : null;
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Finds all the assigned workflows for a given content type ID.
|
|
172
|
+
* Normally, there should only be one workflow assigned to a content type.
|
|
173
|
+
* However, edge cases can occur where a content type is assigned to multiple workflows.
|
|
174
|
+
* @param {string} uid - Content type ID to find the assigned workflows for.
|
|
175
|
+
* @param {object} opts - Options for the query.
|
|
176
|
+
* @returns {Promise<object[]>} - List of assigned workflow objects.
|
|
177
|
+
*/
|
|
178
|
+
async _getAssignedWorkflows(uid, opts = {}) {
|
|
179
|
+
return this.find({
|
|
167
180
|
...opts,
|
|
168
181
|
filters: { contentTypes: getWorkflowContentTypeFilter({ strapi }, uid) },
|
|
169
182
|
});
|
|
170
|
-
return workflows.length > 0 ? workflows[0] : null;
|
|
171
183
|
},
|
|
172
184
|
|
|
173
185
|
/**
|
|
@@ -10,14 +10,20 @@ const providerOptionsUpdateSchema = yup.object().shape({
|
|
|
10
10
|
.test('is-valid-role', 'You must submit a valid default role', (roleId) => {
|
|
11
11
|
return strapi.admin.services.role.exists({ id: roleId });
|
|
12
12
|
}),
|
|
13
|
-
ssoLockedRoles: yup
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
ssoLockedRoles: yup
|
|
14
|
+
.array()
|
|
15
|
+
.nullable()
|
|
16
|
+
.of(
|
|
17
|
+
yup
|
|
18
|
+
.strapiID()
|
|
19
|
+
.test(
|
|
20
|
+
'is-valid-role',
|
|
21
|
+
'You must submit a valid role for the SSO Locked roles',
|
|
22
|
+
(roleId) => {
|
|
23
|
+
return strapi.admin.services.role.exists({ id: roleId });
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
),
|
|
21
27
|
});
|
|
22
28
|
|
|
23
29
|
module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/admin",
|
|
3
|
-
"version": "4.12.0-beta.
|
|
3
|
+
"version": "4.12.0-beta.4",
|
|
4
4
|
"description": "Strapi Admin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@casl/ability": "^5.4.3",
|
|
44
44
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
|
45
|
-
"@strapi/data-transfer": "4.12.0-beta.
|
|
45
|
+
"@strapi/data-transfer": "4.12.0-beta.4",
|
|
46
46
|
"@strapi/design-system": "1.8.2",
|
|
47
|
-
"@strapi/helper-plugin": "4.12.0-beta.
|
|
47
|
+
"@strapi/helper-plugin": "4.12.0-beta.4",
|
|
48
48
|
"@strapi/icons": "1.8.2",
|
|
49
|
-
"@strapi/permissions": "4.12.0-beta.
|
|
50
|
-
"@strapi/provider-audit-logs-local": "4.12.0-beta.
|
|
51
|
-
"@strapi/typescript-utils": "4.12.0-beta.
|
|
52
|
-
"@strapi/utils": "4.12.0-beta.
|
|
49
|
+
"@strapi/permissions": "4.12.0-beta.4",
|
|
50
|
+
"@strapi/provider-audit-logs-local": "4.12.0-beta.4",
|
|
51
|
+
"@strapi/typescript-utils": "4.12.0-beta.4",
|
|
52
|
+
"@strapi/utils": "4.12.0-beta.4",
|
|
53
53
|
"axios": "1.4.0",
|
|
54
54
|
"bcryptjs": "2.4.3",
|
|
55
55
|
"browserslist": "^4.17.3",
|
|
@@ -154,5 +154,5 @@
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
|
-
"gitHead": "
|
|
157
|
+
"gitHead": "edcf86b496a7bee5189cdbfeb16f5a5c0abccc81"
|
|
158
158
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[2379],{50337:function(U,d,t){t.d(d,{pl:function(){return A},aY:function(){return r},q5:function(){return o.Z}});var i=t(32735),a=t(19565),f=t(86209),L=t(97889);const g={data:[],isLoading:!0};var v=(e,n)=>(0,L.ZP)(e,s=>{switch(n.type){case"GET_DATA_SUCCEEDED":{s.data=n.data,s.isLoading=!1;break}case"GET_DATA_ERROR":{s.isLoading=!1;break}default:return s}}),A=({ssoEnabled:e})=>{const[n,s]=(0,i.useReducer)(v,g),l=(0,a.lm)(),{get:P}=(0,a.kY)();return(0,i.useEffect)(()=>{(async()=>{try{if(!e){s({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:m}=await P((0,f.IF)("providers"));s({type:"GET_DATA_SUCCEEDED",data:m})}catch(m){console.error(m),s({type:"GET_DATA_ERROR"}),l({type:"warning",message:{id:"notification.error"}})}})()},[P,e,l]),n},D=t(36866),T=t.n(D),M=t(67879),O=t(53038),o=t(53104);const u="strapi-notification-seat-limit",E="https://cloud.strapi.io/profile/billing",I="https://strapi.io/billing/request-seats";var r=()=>{const{formatMessage:e}=(0,M.Z)();let{license:n,isError:s,isLoading:l}=(0,o.Z)();const P=(0,a.lm)(),{pathname:R}=(0,O.TH)(),{enforcementUserCount:m,permittedSeats:S,licenseLimitStatus:c,isHostedOnStrapiCloud:_}=n;(0,i.useEffect)(()=>{if(s||l)return;const B=!T()(S)&&!window.sessionStorage.getItem(`${u}-${R}`)&&(c==="AT_LIMIT"||c==="OVER_LIMIT");let y;c==="OVER_LIMIT"?y="warning":c==="AT_LIMIT"&&(y="softWarning"),B&&P({type:y,message:e({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:c}),title:e({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:c,enforcementUserCount:m,permittedSeats:S}),link:{url:_?E:I,label:e({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:_})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${u}-${R}`,!0)}})},[P,n,R,e,l,S,c,m,_,s])}},53104:function(U,d,t){t.d(d,{Z:function(){return v}});var i=t(32735),a=t(19565),f=t(20108),L=t(15062),g=t(30305);function h(){const p=(0,L.v9)(g._),{get:A}=(0,a.kY)(),{isLoading:D,allowedActions:{canRead:T,canCreate:M,canUpdate:O,canDelete:o}}=(0,a.ss)(p.settings.users),u=T&&M&&O&&o,{data:E,isError:I,isLoading:C}=(0,f.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:n}}=await A("/admin/license-limit-information");return n},{enabled:!D&&u}),r=E??{},e=i.useCallback(n=>(r?.features??[]).find(l=>l.name===n)?.options??{},[r?.features]);return{license:r,getFeature:e,isError:I,isLoading:C}}var v=h},42379:function(U,d,t){t.r(d),t.d(d,{CreateActionEE:function(){return o}});var i=t(32735),a=t(87933),f=t(63919),L=t(99140),g=t(41415),h=t(69932),v=t(7961),p=t(36866),A=t.n(p),D=t(60216),T=t.n(D),M=t(67879),O=t(50337);const o=({onClick:u})=>{const{formatMessage:E}=(0,M.Z)(),{license:{permittedSeats:I,shouldStopCreate:C},isError:r,isLoading:e}=(0,O.q5)();return r||e?null:i.createElement(a.k,{gap:2},!A()(I)&&C&&i.createElement(f.u,{description:E({id:"Settings.application.admin-seats.at-limit-tooltip",defaultMessage:"At limit: add seats to invite more users"}),position:"left"},i.createElement(L.J,{width:`${14/16}rem`,height:`${14/16}rem`,color:"danger500",as:h.Z})),i.createElement(g.z,{"data-testid":"create-user-button",onClick:u,startIcon:i.createElement(v.Z,null),size:"S",disabled:C},E({id:"Settings.permissions.users.create",defaultMessage:"Invite new user"})))};o.propTypes={onClick:T().func.isRequired}}}]);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[2395],{50337:function(I,f,t){t.d(f,{pl:function(){return p},aY:function(){return n},q5:function(){return r.Z}});var e=t(32735),E=t(19565),u=t(86209),g=t(97889);const P={data:[],isLoading:!0};var c=(i,d)=>(0,g.ZP)(i,l=>{switch(d.type){case"GET_DATA_SUCCEEDED":{l.data=d.data,l.isLoading=!1;break}case"GET_DATA_ERROR":{l.isLoading=!1;break}default:return l}}),p=({ssoEnabled:i})=>{const[d,l]=(0,e.useReducer)(c,P),v=(0,E.lm)(),{get:R}=(0,E.kY)();return(0,e.useEffect)(()=>{(async()=>{try{if(!i){l({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:h}=await R((0,u.IF)("providers"));l({type:"GET_DATA_SUCCEEDED",data:h})}catch(h){console.error(h),l({type:"GET_DATA_ERROR"}),v({type:"warning",message:{id:"notification.error"}})}})()},[R,i,v]),d},D=t(36866),m=t.n(D),O=t(67879),M=t(53038),r=t(53104);const o="strapi-notification-seat-limit",s="https://cloud.strapi.io/profile/billing",_="https://strapi.io/billing/request-seats";var n=()=>{const{formatMessage:i}=(0,O.Z)();let{license:d,isError:l,isLoading:v}=(0,r.Z)();const R=(0,E.lm)(),{pathname:y}=(0,M.TH)(),{enforcementUserCount:h,permittedSeats:C,licenseLimitStatus:A,isHostedOnStrapiCloud:U}=d;(0,e.useEffect)(()=>{if(l||v)return;const B=!m()(C)&&!window.sessionStorage.getItem(`${o}-${y}`)&&(A==="AT_LIMIT"||A==="OVER_LIMIT");let S;A==="OVER_LIMIT"?S="warning":A==="AT_LIMIT"&&(S="softWarning"),B&&R({type:S,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:A}),title:i({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:A,enforcementUserCount:h,permittedSeats:C}),link:{url:U?s:_,label:i({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:U})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${o}-${y}`,!0)}})},[R,d,y,i,v,C,A,h,U,l])}},53104:function(I,f,t){t.d(f,{Z:function(){return c}});var e=t(32735),E=t(19565),u=t(20108),g=t(15062),P=t(30305);function L(){const a=(0,g.v9)(P._),{get:p}=(0,E.kY)(),{isLoading:D,allowedActions:{canRead:m,canCreate:O,canUpdate:M,canDelete:r}}=(0,E.ss)(a.settings.users),o=m&&O&&M&&r,{data:s,isError:_,isLoading:T}=(0,u.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:d}}=await p("/admin/license-limit-information");return d},{enabled:!D&&o}),n=s??{},i=e.useCallback(d=>(n?.features??[]).find(v=>v.name===d)?.options??{},[n?.features]);return{license:n,getFeature:i,isError:_,isLoading:T}}var c=L},82395:function(I,f,t){t.r(f),t.d(f,{LoginEE:function(){return o}});var e=t(32735),E=t(9026),u=t(72850),g=t(87933),P=t(49372),L=t(60216),c=t.n(L),a=t(67879),p=t(8471),D=t(11060),m=t(24436),O=t(50337),M=t(68726);const r=(0,p.ZP)(E.i)`
|
|
2
|
-
flex: 1;
|
|
3
|
-
`,o=s=>{const _=window.strapi.features.isEnabled(window.strapi.features.SSO),{isLoading:T,data:n}=(0,O.pl)({ssoEnabled:_}),{formatMessage:i}=(0,a.Z)();return!_||!T&&n.length===0?e.createElement(D.ZP,null,e.createElement(m.Z,{...s})):e.createElement(D.ZP,null,e.createElement(m.Z,{...s},e.createElement(u.x,{paddingTop:7},e.createElement(g.k,{direction:"column",alignItems:"stretch",gap:7},e.createElement(g.k,null,e.createElement(r,null),e.createElement(u.x,{paddingLeft:3,paddingRight:3},e.createElement(P.Z,{variant:"sigma",textColor:"neutral600"},i({id:"Auth.login.sso.divider"}))),e.createElement(r,null)),e.createElement(M.Z,{providers:n,displayAllProviders:!1})))))};o.defaultProps={onSubmit:s=>s.preventDefault(),requestError:null},o.propTypes={formErrors:c().object.isRequired,modifiedData:c().object.isRequired,onChange:c().func.isRequired,onSubmit:c().func,requestError:c().object}},68726:function(I,f,t){var e=t(32735),E=t(87933),u=t(63919),g=t(49372),P=t(15335),L=t(5803),c=t(60216),a=t.n(c),p=t(67879),D=t(14911),m=t(8471);const O=m.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
|
-
`,M=(0,m.ZP)(E.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
|
-
`,r=({provider:s})=>e.createElement(u.u,{label:s.displayName},e.createElement(O,{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)));r.propTypes={provider:a().shape({icon:a().string,displayName:a().string.isRequired,uid:a().string.isRequired}).isRequired};const o=({providers:s,displayAllProviders:_})=>{const{formatMessage:T}=(0,p.Z)();return _?e.createElement(P.r,{gap:4},s.map(n=>e.createElement(L.P,{key:n.uid,col:4},e.createElement(r,{provider:n})))):s.length>2&&!_?e.createElement(P.r,{gap:4},s.slice(0,2).map(n=>e.createElement(L.P,{key:n.uid,col:4},e.createElement(r,{provider:n}))),e.createElement(L.P,{col:4},e.createElement(u.u,{label:T({id:"global.see-more"})},e.createElement(O,{as:D.rU,to:"/auth/providers"},e.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):e.createElement(M,{justifyContent:"center"},s.map(n=>e.createElement(r,{key:n.uid,provider:n})))};o.defaultProps={displayAllProviders:!0},o.propTypes={providers:a().arrayOf(a().object).isRequired,displayAllProviders:a().bool},f.Z=o}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[2801],{50337:function(y,c,t){t.d(c,{pl:function(){return T},aY:function(){return f},q5:function(){return E.Z}});var a=t(32735),n=t(19565),l=t(86209),d=t(97889);const v={data:[],isLoading:!0};var A=(s,i)=>(0,d.ZP)(s,e=>{switch(i.type){case"GET_DATA_SUCCEEDED":{e.data=i.data,e.isLoading=!1;break}case"GET_DATA_ERROR":{e.isLoading=!1;break}default:return e}}),T=({ssoEnabled:s})=>{const[i,e]=(0,a.useReducer)(A,v),o=(0,n.lm)(),{get:m}=(0,n.kY)();return(0,a.useEffect)(()=>{(async()=>{try{if(!s){e({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:u}=await m((0,l.IF)("providers"));e({type:"GET_DATA_SUCCEEDED",data:u})}catch(u){console.error(u),e({type:"GET_DATA_ERROR"}),o({type:"warning",message:{id:"notification.error"}})}})()},[m,s,o]),i},h=t(36866),I=t.n(h),D=t(67879),p=t(53038),E=t(53104);const L="strapi-notification-seat-limit",C="https://cloud.strapi.io/profile/billing",R="https://strapi.io/billing/request-seats";var f=()=>{const{formatMessage:s}=(0,D.Z)();let{license:i,isError:e,isLoading:o}=(0,E.Z)();const m=(0,n.lm)(),{pathname:g}=(0,p.TH)(),{enforcementUserCount:u,permittedSeats:P,licenseLimitStatus:r,isHostedOnStrapiCloud:S}=i;(0,a.useEffect)(()=>{if(e||o)return;const G=!I()(P)&&!window.sessionStorage.getItem(`${L}-${g}`)&&(r==="AT_LIMIT"||r==="OVER_LIMIT");let O;r==="OVER_LIMIT"?O="warning":r==="AT_LIMIT"&&(O="softWarning"),G&&m({type:O,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:r}),title:s({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:r,enforcementUserCount:u,permittedSeats:P}),link:{url:S?C:R,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(`${L}-${g}`,!0)}})},[m,i,g,s,o,P,r,u,S,e])}},53104:function(y,c,t){t.d(c,{Z:function(){return A}});var a=t(32735),n=t(19565),l=t(20108),d=t(15062),v=t(30305);function M(){const U=(0,d.v9)(v._),{get:T}=(0,n.kY)(),{isLoading:h,allowedActions:{canRead:I,canCreate:D,canUpdate:p,canDelete:E}}=(0,n.ss)(U.settings.users),L=I&&D&&p&&E,{data:C,isError:R,isLoading:N}=(0,l.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:i}}=await T("/admin/license-limit-information");return i},{enabled:!h&&L}),f=C??{},s=a.useCallback(i=>(f?.features??[]).find(o=>o.name===i)?.options??{},[f?.features]);return{license:f,getFeature:s,isError:R,isLoading:N}}var A=M},12801:function(y,c,t){t.r(c),t.d(c,{UserListPageEE:function(){return d}});var a=t(32735),n=t(99528),l=t(50337);function d(){return(0,l.aY)(),a.createElement(n.W,null)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3984],{33984:function(f,l,t){t.r(l),t.d(l,{ReviewWorkflowsStageEE:function(){return c}});var n=t(32735),s=t(87933),u=t(72850),E=t(49372),e=t(19565),i=t(60216),r=t.n(i),o=t(2121),a=t(68886);function c({color:O,name:T}){const{themeColorName:W}=(0,a.k)(O);return n.createElement(s.k,{alignItems:"center",gap:2,maxWidth:(0,e.Q1)(300)},n.createElement(u.x,{height:2,background:O,borderColor:W==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2}),n.createElement(E.Z,{fontWeight:"regular",textColor:"neutral700",ellipsis:!0},T))}c.defaultProps={color:o.FT},c.propTypes={color:r().string,name:r().string.isRequired}},2121:function(f,l,t){t.d(l,{$k:function(){return o},FT:function(){return O},Nj:function(){return r},Ot:function(){return i},VS:function(){return a},gu:function(){return u},lv:function(){return c},qZ:function(){return E},sN:function(){return s},uL:function(){return T},x4:function(){return e}});var n=t(12301);const s="settings_review-workflows",u="Settings/Review_Workflows/RESET_WORKFLOW",E="Settings/Review_Workflows/SET_WORKFLOW",e="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",i="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",r="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",o="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",a="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"}},68886:function(f,l,t){t.d(l,{k:function(){return u},s:function(){return E}});var n=t(12301),s=t(2121);function u(e){if(!e)return null;const r=Object.entries(n.W.colors).filter(([,o])=>o.toUpperCase()===e.toUpperCase()).reduce((o,[a])=>(s.lv?.[a]&&(o=a),o),null);return r?{themeColorName:r,name:s.lv[r]}:null}function E(){return Object.entries(s.lv).map(([e,i])=>({hex:n.W.colors[e].toUpperCase(),name:i}))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[502],{50337:function(y,u,t){t.d(u,{pl:function(){return v},aY:function(){return a},q5:function(){return m.Z}});var e=t(32735),r=t(19565),c=t(86209),E=t(97889);const L={data:[],isLoading:!0};var A=(s,n)=>(0,E.ZP)(s,i=>{switch(n.type){case"GET_DATA_SUCCEEDED":{i.data=n.data,i.isLoading=!1;break}case"GET_DATA_ERROR":{i.isLoading=!1;break}default:return i}}),v=({ssoEnabled:s})=>{const[n,i]=(0,e.useReducer)(A,L),o=(0,r.lm)(),{get:h}=(0,r.kY)();return(0,e.useEffect)(()=>{(async()=>{try{if(!s){i({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:g}=await h((0,c.IF)("providers"));i({type:"GET_DATA_SUCCEEDED",data:g})}catch(g){console.error(g),i({type:"GET_DATA_ERROR"}),o({type:"warning",message:{id:"notification.error"}})}})()},[h,s,o]),n},p=t(36866),D=t.n(p),O=t(67879),T=t(53038),m=t(53104);const f="strapi-notification-seat-limit",l="https://cloud.strapi.io/profile/billing",M="https://strapi.io/billing/request-seats";var a=()=>{const{formatMessage:s}=(0,O.Z)();let{license:n,isError:i,isLoading:o}=(0,m.Z)();const h=(0,r.lm)(),{pathname:R}=(0,T.TH)(),{enforcementUserCount:g,permittedSeats:S,licenseLimitStatus:d,isHostedOnStrapiCloud:_}=n;(0,e.useEffect)(()=>{if(i||o)return;const B=!D()(S)&&!window.sessionStorage.getItem(`${f}-${R}`)&&(d==="AT_LIMIT"||d==="OVER_LIMIT");let U;d==="OVER_LIMIT"?U="warning":d==="AT_LIMIT"&&(U="softWarning"),B&&h({type:U,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:g,permittedSeats:S}),link:{url:_?l:M,label:s({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:_})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${f}-${R}`,!0)}})},[h,n,R,s,o,S,d,g,_,i])}},53104:function(y,u,t){t.d(u,{Z:function(){return A}});var e=t(32735),r=t(19565),c=t(20108),E=t(15062),L=t(30305);function P(){const I=(0,E.v9)(L._),{get:v}=(0,r.kY)(),{isLoading:p,allowedActions:{canRead:D,canCreate:O,canUpdate:T,canDelete:m}}=(0,r.ss)(I.settings.users),f=D&&O&&T&&m,{data:l,isError:M,isLoading:C}=(0,c.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:n}}=await v("/admin/license-limit-information");return n},{enabled:!p&&f}),a=l??{},s=e.useCallback(n=>(a?.features??[]).find(o=>o.name===n)?.options??{},[a?.features]);return{license:a,getFeature:s,isError:M,isLoading:C}}var A=P},50502:function(y,u,t){t.r(u),t.d(u,{AdminSeatInfoEE:function(){return f}});var e=t(32735),r=t(5803),c=t(49372),E=t(87933),L=t(63919),P=t(99140),A=t(41502),I=t(19565),v=t(69932),p=t(47361),D=t(67879),O=t(50337);const T="https://cloud.strapi.io/profile/billing",m="https://strapi.io/billing/request-seats",f=()=>{const{formatMessage:l}=(0,D.Z)(),{license:{licenseLimitStatus:M,enforcementUserCount:C,permittedSeats:a,isHostedOnStrapiCloud:s},isError:n,isLoading:i}=(0,O.q5)();return n||i||!a?null:e.createElement(r.P,{col:6,s:12},e.createElement(c.Z,{variant:"sigma",textColor:"neutral600"},l({id:"Settings.application.admin-seats",defaultMessage:"Admin seats"})),e.createElement(E.k,{gap:2},e.createElement(E.k,null,e.createElement(c.Z,{as:"p"},l({id:"Settings.application.ee.admin-seats.count",defaultMessage:"<text>{enforcementUserCount}</text>/{permittedSeats}"},{permittedSeats:a,enforcementUserCount:C,text:o=>e.createElement(c.Z,{fontWeight:"semiBold",textColor:C>a?"danger500":null},o)}))),M==="OVER_LIMIT"&&e.createElement(L.u,{description:l({id:"Settings.application.ee.admin-seats.at-limit-tooltip",defaultMessage:"At limit: add seats to invite more users"})},e.createElement(P.J,{width:`${(0,I.Q1)(14)}rem`,height:`${(0,I.Q1)(14)}rem`,color:"danger500",as:v.Z}))),e.createElement(A.r,{href:s?T:m,isExternal:!0,endIcon:e.createElement(p.Z,null)},l({id:"Settings.application.ee.admin-seats.add-seats",defaultMessage:"{isHostedOnStrapiCloud, select, true {Add seats} other {Contact sales}}"},{isHostedOnStrapiCloud:s})))}}}]);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[5483],{90978:function(A,d,e){e.r(d),e.d(d,{InformationBoxEE:function(){return C}});var t=e(32735),r=e(77035),l=e(87933),f=e(49372),c=e(23866),s=e(19565),u=e(67879),i=e(20108),o=e(98865),v=e(53104),a=e(90562),m=e(32329),g=e(68886);const E="strapi_stage";function C(){const{initialData:O,isCreatingEntry:R,layout:{uid:p,options:w},isSingleType:L,onChange:h}=(0,s.Wq)(),{put:W}=(0,s.kY)(),n=O?.[E]??null,D=w?.reviewWorkflows??!1,{formatMessage:T}=(0,u.Z)(),{formatAPIError:P}=(0,s.So)(),G=(0,s.lm)(),{getFeature:K}=(0,v.Z)(),[N,k]=t.useState(!1),{meta:Z,workflows:[B],isLoading:$}=(0,m.n)({filters:{contentTypes:p}}),{error:F,isLoading:Y,mutateAsync:j}=(0,i.useMutation)(async({entityId:y,stageId:S,uid:M})=>{const x=L?"single-types":"collection-types",{data:{data:U}}=await W(`/admin/content-manager/${x}/${M}/${y}/stage`,{data:{id:S}});return h({target:{name:E,value:U[E]}},!0),U},{onSuccess(){G({type:"success",message:{id:"content-manager.reviewWorkflows.stage.notification.saved",defaultMessage:"Review stage updated"}})}}),I=K("review-workflows"),Q=F&&P(F)||null,H=async({value:y})=>{try{I?.workflows&&parseInt(I.workflows,10)>Z.workflowCount?k("workflow"):I?.stagesPerWorkflow&&parseInt(I.stagesPerWorkflow,10)>B.stages.length?k("stage"):await j({entityId:O.id,stageId:y,uid:p})}catch{}},{themeColorName:V}=n?.color?(0,g.k)(n?.color):{};return t.createElement(o.d.Root,null,t.createElement(o.d.Title,null),D&&!R&&t.createElement(r.q4,{error:Q,name:E,id:E,value:n?.id,onChange:y=>H({value:y}),label:T({id:"content-manager.reviewWorkflows.stage.label",defaultMessage:"Review stage"}),startIcon:t.createElement(l.k,{as:"span",height:2,background:n?.color,borderColor:V==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2,marginRight:"-3px"}),customizeContent:()=>t.createElement(l.k,{as:"span",justifyContent:"space-between",alignItems:"center",width:"100%"},t.createElement(f.Z,{textColor:"neutral800",ellipsis:!0},n?.name),$||Y?t.createElement(c.a,{small:!0,style:{display:"flex"}}):null)},B?B.stages.map(({id:y,color:S,name:M})=>{const{themeColorName:x}=(0,g.k)(S);return t.createElement(r.ag,{startIcon:t.createElement(l.k,{height:2,background:S,borderColor:x==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2}),value:y,textValue:M},M)}):[]),t.createElement(o.d.Body,null),t.createElement(a.fC,{isOpen:N==="workflow",onClose:()=>k(!1)},t.createElement(a.Dx,null,T({id:"content-manager.reviewWorkflows.workflows.limit.title",defaultMessage:"You\u2019ve reached the limit of workflows in your plan"})),t.createElement(a.uT,null,T({id:"content-manager.reviewWorkflows.workflows.limit.body",defaultMessage:"Delete a workflow or contact Sales to enable more workflows."}))),t.createElement(a.fC,{isOpen:N==="stage",onClose:()=>k(!1)},t.createElement(a.Dx,null,T({id:"content-manager.reviewWorkflows.stages.limit.title",defaultMessage:"You have reached the limit of stages for this workflow in your plan"})),t.createElement(a.uT,null,T({id:"content-manager.reviewWorkflows.stages.limit.body",defaultMessage:"Try deleting some stages or contact Sales to enable more stages."}))))}},53104:function(A,d,e){e.d(d,{Z:function(){return u}});var t=e(32735),r=e(19565),l=e(20108),f=e(15062),c=e(30305);function s(){const i=(0,f.v9)(c._),{get:o}=(0,r.kY)(),{isLoading:v,allowedActions:{canRead:a,canCreate:m,canUpdate:g,canDelete:E}}=(0,r.ss)(i.settings.users),C=a&&m&&g&&E,{data:O,isError:R,isLoading:p}=(0,l.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:h}}=await o("/admin/license-limit-information");return h},{enabled:!v&&C}),w=O??{},L=t.useCallback(h=>(w?.features??[]).find(n=>n.name===h)?.options??{},[w?.features]);return{license:w,getFeature:L,isError:R,isLoading:p}}var u=s},90562:function(A,d,e){e.d(d,{uT:function(){return w},fC:function(){return W},Dx:function(){return p}});var t=e(32735),r=e(49372),l=e(87933),f=e(85025),c=e(31600),s=e(72850),u=e(50563),i=e(95489),o=e(35331),v=e(60216),a=e.n(v),m=e(67879),g=e(8471),E=e.p+"0cd5f8915b265d5b1856.png";const C="limits-title",O="https://strapi.io/pricing-cloud",R="https://strapi.io/contact-sales";function p({children:n}){return t.createElement(r.Z,{variant:"alpha",id:C},n)}p.propTypes={children:a().node.isRequired};function w({children:n}){return t.createElement(r.Z,{variant:"omega"},n)}w.propTypes={children:a().node.isRequired};function L(){const{formatMessage:n}=(0,m.Z)();return t.createElement(l.k,{gap:2,paddingTop:4},t.createElement(i.Q,{variant:"default",isExternal:!0,href:O},n({id:"Settings.review-workflows.limit.cta.learn",defaultMessage:"Learn more"})),t.createElement(i.Q,{variant:"tertiary",isExternal:!0,href:R},n({id:"Settings.review-workflows.limit.cta.sales",defaultMessage:"Contact Sales"})))}const h=g.ZP.img`
|
|
2
|
-
// Margin top|right reverse the padding of ModalBody
|
|
3
|
-
margin-right: ${({theme:n})=>`-${n.spaces[7]}`};
|
|
4
|
-
margin-top: ${({theme:n})=>`-${n.spaces[7]}`};
|
|
5
|
-
width: 360px;
|
|
6
|
-
`;function W({children:n,isOpen:D,onClose:T}){const{formatMessage:P}=(0,m.Z)();return D?t.createElement(f.P,{labelledBy:C},t.createElement(c.f,null,t.createElement(l.k,{gap:2,paddingLeft:7,position:"relative"},t.createElement(l.k,{alignItems:"start",direction:"column",gap:2,width:"60%"},n,t.createElement(L,null)),t.createElement(l.k,{justifyContent:"end",height:"100%",width:"40%"},t.createElement(h,{src:E,"aria-hidden":!0,alt:"",loading:"lazy"}),t.createElement(s.x,{display:"flex",position:"absolute",right:0,top:0},t.createElement(u.h,{icon:t.createElement(o.Z,null),"aria-label":P({id:"global.close",defaultMessage:"Close"}),onClick:T})))))):null}W.defaultProps={isOpen:!1},W.propTypes={children:a().node.isRequired,isOpen:a().bool,onClose:a().func.isRequired}},2121:function(A,d,e){e.d(d,{$k:function(){return i},FT:function(){return a},Nj:function(){return u},Ot:function(){return s},VS:function(){return o},gu:function(){return l},lv:function(){return v},qZ:function(){return f},sN:function(){return r},uL:function(){return m},x4:function(){return c}});var t=e(12301);const r="settings_review-workflows",l="Settings/Review_Workflows/RESET_WORKFLOW",f="Settings/Review_Workflows/SET_WORKFLOW",c="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",s="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",u="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",i="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",o="Settings/Review_Workflows/WORKFLOW_UPDATE",v={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"},a=t.W.colors.primary600,m={STAGE:"stage"}},32329:function(A,d,e){e.d(d,{n:function(){return l}});var t=e(19565),r=e(20108);function l(f={}){const{get:c}=(0,t.kY)(),{id:s="",...u}=f,i={populate:"stages"},{data:o,isLoading:v,status:a,refetch:m}=(0,r.useQuery)(["review-workflows","workflows",s],async()=>(await c(`/admin/review-workflows/workflows/${s}`,{params:{...i,...u}})).data);let g=[];return s&&o?.data?g=[o.data]:Array.isArray(o?.data)&&(g=o.data),{meta:o?.meta??{},workflows:g,isLoading:v,status:a,refetch:m}}},68886:function(A,d,e){e.d(d,{k:function(){return l},s:function(){return f}});var t=e(12301),r=e(2121);function l(c){if(!c)return null;const u=Object.entries(t.W.colors).filter(([,i])=>i.toUpperCase()===c.toUpperCase()).reduce((i,[o])=>(r.lv?.[o]&&(i=o),i),null);return u?{themeColorName:u,name:r.lv[u]}:null}function f(){return Object.entries(r.lv).map(([c,s])=>({hex:t.W.colors[c].toUpperCase(),name:s}))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[7464],{50337:function(y,c,t){t.d(c,{pl:function(){return T},aY:function(){return f},q5:function(){return E.Z}});var a=t(32735),n=t(19565),l=t(86209),d=t(97889);const v={data:[],isLoading:!0};var A=(s,i)=>(0,d.ZP)(s,e=>{switch(i.type){case"GET_DATA_SUCCEEDED":{e.data=i.data,e.isLoading=!1;break}case"GET_DATA_ERROR":{e.isLoading=!1;break}default:return e}}),T=({ssoEnabled:s})=>{const[i,e]=(0,a.useReducer)(A,v),o=(0,n.lm)(),{get:m}=(0,n.kY)();return(0,a.useEffect)(()=>{(async()=>{try{if(!s){e({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:u}=await m((0,l.IF)("providers"));e({type:"GET_DATA_SUCCEEDED",data:u})}catch(u){console.error(u),e({type:"GET_DATA_ERROR"}),o({type:"warning",message:{id:"notification.error"}})}})()},[m,s,o]),i},h=t(36866),I=t.n(h),C=t(67879),D=t(53038),E=t(53104);const g="strapi-notification-seat-limit",p="https://cloud.strapi.io/profile/billing",R="https://strapi.io/billing/request-seats";var f=()=>{const{formatMessage:s}=(0,C.Z)();let{license:i,isError:e,isLoading:o}=(0,E.Z)();const m=(0,n.lm)(),{pathname:L}=(0,D.TH)(),{enforcementUserCount:u,permittedSeats:P,licenseLimitStatus:r,isHostedOnStrapiCloud:O}=i;(0,a.useEffect)(()=>{if(e||o)return;const G=!I()(P)&&!window.sessionStorage.getItem(`${g}-${L}`)&&(r==="AT_LIMIT"||r==="OVER_LIMIT");let S;r==="OVER_LIMIT"?S="warning":r==="AT_LIMIT"&&(S="softWarning"),G&&m({type:S,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:r}),title:s({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:r,enforcementUserCount:u,permittedSeats:P}),link:{url:O?p:R,label:s({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:O})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${g}-${L}`,!0)}})},[m,i,L,s,o,P,r,u,O,e])}},53104:function(y,c,t){t.d(c,{Z:function(){return A}});var a=t(32735),n=t(19565),l=t(20108),d=t(15062),v=t(30305);function M(){const U=(0,d.v9)(v._),{get:T}=(0,n.kY)(),{isLoading:h,allowedActions:{canRead:I,canCreate:C,canUpdate:D,canDelete:E}}=(0,n.ss)(U.settings.users),g=I&&C&&D&&E,{data:p,isError:R,isLoading:N}=(0,l.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:i}}=await T("/admin/license-limit-information");return i},{enabled:!h&&g}),f=p??{},s=a.useCallback(i=>(f?.features??[]).find(o=>o.name===i)?.options??{},[f?.features]);return{license:f,getFeature:s,isError:R,isLoading:N}}var A=M},37363:function(y,c,t){t.r(c),t.d(c,{HomePageEE:function(){return d}});var a=t(32735),n=t(83555),l=t(50337);function d(){return(0,l.aY)(),a.createElement(n.HomePageCE,null)}}}]);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[8276],{50337:function(I,v,t){t.d(v,{pl:function(){return T},aY:function(){return s},q5:function(){return r.Z}});var e=t(32735),m=t(19565),p=t(86209),E=t(97889);const d={data:[],isLoading:!0};var O=(l,a)=>(0,E.ZP)(l,i=>{switch(a.type){case"GET_DATA_SUCCEEDED":{i.data=a.data,i.isLoading=!1;break}case"GET_DATA_ERROR":{i.isLoading=!1;break}default:return i}}),T=({ssoEnabled:l})=>{const[a,i]=(0,e.useReducer)(O,d),o=(0,m.lm)(),{get:P}=(0,m.kY)();return(0,e.useEffect)(()=>{(async()=>{try{if(!l){i({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:A}=await P((0,p.IF)("providers"));i({type:"GET_DATA_SUCCEEDED",data:A})}catch(A){console.error(A),i({type:"GET_DATA_ERROR"}),o({type:"warning",message:{id:"notification.error"}})}})()},[P,l,o]),a},y=t(36866),g=t.n(y),L=t(67879),D=t(53038),r=t(53104);const f="strapi-notification-seat-limit",n="https://cloud.strapi.io/profile/billing",h="https://strapi.io/billing/request-seats";var s=()=>{const{formatMessage:l}=(0,L.Z)();let{license:a,isError:i,isLoading:o}=(0,r.Z)();const P=(0,m.lm)(),{pathname:C}=(0,D.TH)(),{enforcementUserCount:A,permittedSeats:S,licenseLimitStatus:R,isHostedOnStrapiCloud:U}=a;(0,e.useEffect)(()=>{if(i||o)return;const Z=!g()(S)&&!window.sessionStorage.getItem(`${f}-${C}`)&&(R==="AT_LIMIT"||R==="OVER_LIMIT");let B;R==="OVER_LIMIT"?B="warning":R==="AT_LIMIT"&&(B="softWarning"),Z&&P({type:B,message:l({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:R}),title:l({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:R,enforcementUserCount:A,permittedSeats:S}),link:{url:U?n:h,label:l({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:U})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${f}-${C}`,!0)}})},[P,a,C,l,o,S,R,A,U,i])}},53104:function(I,v,t){t.d(v,{Z:function(){return O}});var e=t(32735),m=t(19565),p=t(20108),E=t(15062),d=t(30305);function u(){const c=(0,E.v9)(d._),{get:T}=(0,m.kY)(),{isLoading:y,allowedActions:{canRead:g,canCreate:L,canUpdate:D,canDelete:r}}=(0,m.ss)(c.settings.users),f=g&&L&&D&&r,{data:n,isError:h,isLoading:M}=(0,p.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:a}}=await T("/admin/license-limit-information");return a},{enabled:!y&&f}),s=n??{},l=e.useCallback(a=>(s?.features??[]).find(o=>o.name===a)?.options??{},[s?.features]);return{license:s,getFeature:l,isError:h,isLoading:M}}var O=u},68726:function(I,v,t){var e=t(32735),m=t(87933),p=t(63919),E=t(49372),d=t(15335),u=t(5803),O=t(60216),c=t.n(O),T=t(67879),y=t(14911),g=t(8471);const L=g.ZP.a`
|
|
2
|
-
width: ${136/16}rem;
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
align-items: center;
|
|
6
|
-
height: ${48/16}rem;
|
|
7
|
-
border: 1px solid ${({theme:n})=>n.colors.neutral150};
|
|
8
|
-
border-radius: ${({theme:n})=>n.borderRadius};
|
|
9
|
-
text-decoration: inherit;
|
|
10
|
-
&:link {
|
|
11
|
-
text-decoration: none;
|
|
12
|
-
}
|
|
13
|
-
color: ${({theme:n})=>n.colors.neutral600};
|
|
14
|
-
`,D=(0,g.ZP)(m.k)`
|
|
15
|
-
& a:not(:first-child):not(:last-child) {
|
|
16
|
-
margin: 0 ${({theme:n})=>n.spaces[2]};
|
|
17
|
-
}
|
|
18
|
-
& a:first-child {
|
|
19
|
-
margin-right: ${({theme:n})=>n.spaces[2]};
|
|
20
|
-
}
|
|
21
|
-
& a:last-child {
|
|
22
|
-
margin-left: ${({theme:n})=>n.spaces[2]};
|
|
23
|
-
}
|
|
24
|
-
`,r=({provider:n})=>e.createElement(p.u,{label:n.displayName},e.createElement(L,{href:`${window.strapi.backendURL}/admin/connect/${n.uid}`},n.icon?e.createElement("img",{src:n.icon,"aria-hidden":!0,alt:"",height:"32px"}):e.createElement(E.Z,null,n.displayName)));r.propTypes={provider:c().shape({icon:c().string,displayName:c().string.isRequired,uid:c().string.isRequired}).isRequired};const f=({providers:n,displayAllProviders:h})=>{const{formatMessage:M}=(0,T.Z)();return h?e.createElement(d.r,{gap:4},n.map(s=>e.createElement(u.P,{key:s.uid,col:4},e.createElement(r,{provider:s})))):n.length>2&&!h?e.createElement(d.r,{gap:4},n.slice(0,2).map(s=>e.createElement(u.P,{key:s.uid,col:4},e.createElement(r,{provider:s}))),e.createElement(u.P,{col:4},e.createElement(p.u,{label:M({id:"global.see-more"})},e.createElement(L,{as:y.rU,to:"/auth/providers"},e.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):e.createElement(D,{justifyContent:"center"},n.map(s=>e.createElement(r,{key:s.uid,provider:s})))};f.defaultProps={displayAllProviders:!0},f.propTypes={providers:c().arrayOf(c().object).isRequired,displayAllProviders:c().bool},v.Z=f},18276:function(I,v,t){t.r(v),t.d(v,{FORMS:function(){return l}});var e=t(32735),m=t(9026),p=t(27649),E=t(72850),d=t(49372),u=t(87933),O=t(23866),c=t(41415),T=t(19565),y=t(67879),g=t(53038),L=t(8471),D=t(73678),r=t(11060),f=t(50337),n=t(68726);const h=(0,L.ZP)(m.i)`
|
|
25
|
-
flex: 1;
|
|
26
|
-
`;var s=()=>{const a=window.strapi.features.isEnabled(window.strapi.features.SSO),{push:i}=(0,g.k6)(),{formatMessage:o}=(0,y.Z)(),{isLoading:P,data:C}=(0,f.pl)({ssoEnabled:a}),A=()=>{i("/auth/login")};return!a||!P&&C.length===0?e.createElement(g.l_,{to:"/auth/login"}):e.createElement(r.ZP,null,e.createElement(p.o,null,e.createElement(r.bU,null,e.createElement(r.sg,null,e.createElement(D.Z,null),e.createElement(E.x,{paddingTop:6,paddingBottom:1},e.createElement(d.Z,{as:"h1",variant:"alpha"},o({id:"Auth.form.welcome.title"}))),e.createElement(E.x,{paddingBottom:7},e.createElement(d.Z,{variant:"epsilon",textColor:"neutral600"},o({id:"Auth.login.sso.subtitle"})))),e.createElement(u.k,{direction:"column",alignItems:"stretch",gap:7},P?e.createElement(u.k,{justifyContent:"center"},e.createElement(O.a,null,o({id:"Auth.login.sso.loading"}))):e.createElement(n.Z,{providers:C}),e.createElement(u.k,null,e.createElement(h,null),e.createElement(E.x,{paddingLeft:3,paddingRight:3},e.createElement(d.Z,{variant:"sigma",textColor:"neutral600"},o({id:"or"}))),e.createElement(h,null)),e.createElement(c.z,{fullWidth:!0,size:"L",onClick:A},o({id:"Auth.form.button.login.strapi"})))),e.createElement(u.k,{justifyContent:"center"},e.createElement(E.x,{paddingTop:4},e.createElement(T.rU,{to:"/auth/forgot-password"},e.createElement(d.Z,{variant:"pi"},o({id:"Auth.link.forgot-password"})))))))};const l={providers:{Component:s,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""}}}}]);
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[8298],{61234:function(S,m,e){"use strict";e.d(m,{v:function(){return n}});var t=e(32735),r=e(15062);function n(l,u){const s=(0,r.oR)();(0,t.useEffect)(()=>{s.injectReducer(l,u)},[s,l,u])}},50337:function(S,m,e){"use strict";e.d(m,{pl:function(){return a},aY:function(){return R},q5:function(){return c.Z}});var t=e(32735),r=e(19565),n=e(86209),l=e(97889);const u={data:[],isLoading:!0};var f=(M,C)=>(0,l.ZP)(M,p=>{switch(C.type){case"GET_DATA_SUCCEEDED":{p.data=C.data,p.isLoading=!1;break}case"GET_DATA_ERROR":{p.isLoading=!1;break}default:return p}}),a=({ssoEnabled:M})=>{const[C,p]=(0,t.useReducer)(f,u),T=(0,r.lm)(),{get:h}=(0,r.kY)();return(0,t.useEffect)(()=>{(async()=>{try{if(!M){p({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:L}=await h((0,n.IF)("providers"));p({type:"GET_DATA_SUCCEEDED",data:L})}catch(L){console.error(L),p({type:"GET_DATA_ERROR"}),T({type:"warning",message:{id:"notification.error"}})}})()},[h,M,T]),C},o=e(36866),v=e.n(o),E=e(67879),d=e(53038),c=e(53104);const g="strapi-notification-seat-limit",w="https://cloud.strapi.io/profile/billing",x="https://strapi.io/billing/request-seats";var R=()=>{const{formatMessage:M}=(0,E.Z)();let{license:C,isError:p,isLoading:T}=(0,c.Z)();const h=(0,r.lm)(),{pathname:D}=(0,d.TH)(),{enforcementUserCount:L,permittedSeats:O,licenseLimitStatus:I,isHostedOnStrapiCloud:U}=C;(0,t.useEffect)(()=>{if(p||T)return;const k=!v()(O)&&!window.sessionStorage.getItem(`${g}-${D}`)&&(I==="AT_LIMIT"||I==="OVER_LIMIT");let $;I==="OVER_LIMIT"?$="warning":I==="AT_LIMIT"&&($="softWarning"),k&&h({type:$,message:M({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:I}),title:M({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:I,enforcementUserCount:L,permittedSeats:O}),link:{url:U?w:x,label:M({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:U})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${g}-${D}`,!0)}})},[h,C,D,M,T,O,I,L,U,p])}},53104:function(S,m,e){"use strict";e.d(m,{Z:function(){return f}});var t=e(32735),r=e(19565),n=e(20108),l=e(15062),u=e(30305);function s(){const i=(0,l.v9)(u._),{get:a}=(0,r.kY)(),{isLoading:o,allowedActions:{canRead:v,canCreate:E,canUpdate:d,canDelete:c}}=(0,r.ss)(i.settings.users),g=v&&E&&d&&c,{data:w,isError:x,isLoading:P}=(0,n.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:C}}=await a("/admin/license-limit-information");return C},{enabled:!o&&g}),R=w??{},M=t.useCallback(C=>(R?.features??[]).find(T=>T.name===C)?.options??{},[R?.features]);return{license:R,getFeature:M,isError:x,isLoading:P}}var f=s},77061:function(S,m,e){"use strict";e.d(m,{CI:function(){return l},FP:function(){return s},Js:function(){return i},_V:function(){return n},fC:function(){return r},rI:function(){return f},xn:function(){return u}});var t=e(2121);function r({status:a,data:o}){return{type:t.qZ,payload:{status:a,workflow:o}}}function n(a){return{type:t.x4,payload:{stageId:a}}}function l(a={}){return{type:t.Ot,payload:a}}function u(a,o){return{type:t.Nj,payload:{stageId:a,...o}}}function s(a,o){return{type:t.$k,payload:{newIndex:o,oldIndex:a}}}function f(a){return{type:t.VS,payload:a}}function i(){return{type:t.gu}}},27187:function(S,m,e){"use strict";e.d(m,{eJ:function(){return p},lx:function(){return M},h4:function(){return T},fC:function(){return C}});var t=e(32735),r=e(96709),n=e(27649),l=e(17e3),u=e(82055),s=e(19565),f=e(29439),i=e(67879),a=e(17379),o=e(2121),v=e(87933),E=e(49372),d=e(16899),c=e(60216),g=e.n(c),w=e(8471);const x=(0,w.ZP)(v.k)`
|
|
2
|
-
svg path {
|
|
3
|
-
fill: ${({theme:h})=>h.colors.neutral600};
|
|
4
|
-
}
|
|
5
|
-
`;function P({name:h}){return t.createElement(v.k,{background:"primary100",borderStyle:"dashed",borderColor:"primary600",borderWidth:"1px",gap:3,hasRadius:!0,padding:3,shadow:"tableShadow",width:(0,s.Q1)(300)},t.createElement(x,{alignItems:"center",background:"neutral200",borderRadius:"50%",height:6,justifyContent:"center",width:6},t.createElement(d.Z,{width:`${8/16}rem`})),t.createElement(E.Z,{fontWeight:"bold"},h))}P.propTypes={name:g().string.isRequired};function R({type:h,item:D}){switch(h){case o.uL.STAGE:return t.createElement(P,{...D});default:return null}}function M(){return t.createElement(a.r,{renderItem:R})}function C({children:h}){return t.createElement(r.A,null,t.createElement(n.o,{tabIndex:-1},t.createElement(l.D,null,h)))}function p({href:h}){const{formatMessage:D}=(0,i.Z)();return t.createElement(s.rU,{startIcon:t.createElement(f.Z,null),to:h},D({id:"global.back",defaultMessage:"Back"}))}function T({title:h,subtitle:D,navigationAction:L,primaryAction:O}){return t.createElement(t.Fragment,null,t.createElement(s.SL,{name:h}),t.createElement(u.T,{navigationAction:L,primaryAction:O,title:h,subtitle:D}))}},90562:function(S,m,e){"use strict";e.d(m,{uT:function(){return R},fC:function(){return p},Dx:function(){return P}});var t=e(32735),r=e(49372),n=e(87933),l=e(85025),u=e(31600),s=e(72850),f=e(50563),i=e(95489),a=e(35331),o=e(60216),v=e.n(o),E=e(67879),d=e(8471),c=e.p+"0cd5f8915b265d5b1856.png";const g="limits-title",w="https://strapi.io/pricing-cloud",x="https://strapi.io/contact-sales";function P({children:T}){return t.createElement(r.Z,{variant:"alpha",id:g},T)}P.propTypes={children:v().node.isRequired};function R({children:T}){return t.createElement(r.Z,{variant:"omega"},T)}R.propTypes={children:v().node.isRequired};function M(){const{formatMessage:T}=(0,E.Z)();return t.createElement(n.k,{gap:2,paddingTop:4},t.createElement(i.Q,{variant:"default",isExternal:!0,href:w},T({id:"Settings.review-workflows.limit.cta.learn",defaultMessage:"Learn more"})),t.createElement(i.Q,{variant:"tertiary",isExternal:!0,href:x},T({id:"Settings.review-workflows.limit.cta.sales",defaultMessage:"Contact Sales"})))}const C=d.ZP.img`
|
|
6
|
-
// Margin top|right reverse the padding of ModalBody
|
|
7
|
-
margin-right: ${({theme:T})=>`-${T.spaces[7]}`};
|
|
8
|
-
margin-top: ${({theme:T})=>`-${T.spaces[7]}`};
|
|
9
|
-
width: 360px;
|
|
10
|
-
`;function p({children:T,isOpen:h,onClose:D}){const{formatMessage:L}=(0,E.Z)();return h?t.createElement(l.P,{labelledBy:g},t.createElement(u.f,null,t.createElement(n.k,{gap:2,paddingLeft:7,position:"relative"},t.createElement(n.k,{alignItems:"start",direction:"column",gap:2,width:"60%"},T,t.createElement(M,null)),t.createElement(n.k,{justifyContent:"end",height:"100%",width:"40%"},t.createElement(C,{src:c,"aria-hidden":!0,alt:"",loading:"lazy"}),t.createElement(s.x,{display:"flex",position:"absolute",right:0,top:0},t.createElement(f.h,{icon:t.createElement(a.Z,null),"aria-label":L({id:"global.close",defaultMessage:"Close"}),onClick:D})))))):null}p.defaultProps={isOpen:!1},p.propTypes={children:v().node.isRequired,isOpen:v().bool,onClose:v().func.isRequired}},4238:function(S,m,e){"use strict";e.d(m,{Z:function(){return f}});var t=e(32735),r=e(19565),n=e(60216),l=e.n(n),u=e(15062),s=e(30305);function f({children:i}){const a=(0,u.v9)(s._);return t.createElement(r.O4,{permissions:a.settings["review-workflows"].main},i)}f.propTypes={children:l().node.isRequired}},45594:function(S,m,e){"use strict";e.d(m,{U:function(){return Z}});var t=e(32735),r=e(72850),n=e(87933),l=e(19565),u=e(60216),s=e.n(u),f=e(67879),i=e(15062),a=e(8471),o=e(77061),v=e(49372),E=e(86308);const d=(0,a.ZP)(E.Z)`
|
|
11
|
-
> circle {
|
|
12
|
-
fill: ${({theme:y})=>y.colors.neutral150};
|
|
13
|
-
}
|
|
14
|
-
> path {
|
|
15
|
-
fill: ${({theme:y})=>y.colors.neutral600};
|
|
16
|
-
}
|
|
17
|
-
`,c=(0,a.ZP)(r.x)`
|
|
18
|
-
border-radius: 26px;
|
|
19
|
-
|
|
20
|
-
svg {
|
|
21
|
-
height: ${({theme:y})=>y.spaces[6]};
|
|
22
|
-
width: ${({theme:y})=>y.spaces[6]};
|
|
23
|
-
|
|
24
|
-
> path {
|
|
25
|
-
fill: ${({theme:y})=>y.colors.neutral600};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&:hover {
|
|
30
|
-
color: ${({theme:y})=>y.colors.primary600} !important;
|
|
31
|
-
${v.Z} {
|
|
32
|
-
color: ${({theme:y})=>y.colors.primary600} !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
${d} {
|
|
36
|
-
> circle {
|
|
37
|
-
fill: ${({theme:y})=>y.colors.primary600};
|
|
38
|
-
}
|
|
39
|
-
> path {
|
|
40
|
-
fill: ${({theme:y})=>y.colors.neutral100};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:active {
|
|
46
|
-
${v.Z} {
|
|
47
|
-
color: ${({theme:y})=>y.colors.primary600};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
${d} {
|
|
51
|
-
> circle {
|
|
52
|
-
fill: ${({theme:y})=>y.colors.primary600};
|
|
53
|
-
}
|
|
54
|
-
> path {
|
|
55
|
-
fill: ${({theme:y})=>y.colors.neutral100};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;function g({children:y,...B}){return t.createElement(c,{as:"button",background:"neutral0",border:"neutral150",paddingBottom:3,paddingLeft:4,paddingRight:4,paddingTop:3,shadow:"filterShadow",...B},t.createElement(n.k,{gap:2},t.createElement(d,{"aria-hidden":!0}),t.createElement(v.Z,{variant:"pi",fontWeight:"bold",textColor:"neutral500"},y)))}g.propTypes={children:s().node.isRequired};var w=e(3685),x=e(83828),P=e(61762),R=e(50563),M=e(89966),C=e(15335),p=e(5803),T=e(10369),h=e(77035),D=e(4038),L=e(47081),O=e(92802),I=e(51968),U=e(69242),k=e(97724),$=e(2121),N=e(68886);const X=(0,N.s)();function J(){return t.createElement(r.x,{background:"primary100",borderStyle:"dashed",borderColor:"primary600",borderWidth:"1px",display:"block",hasRadius:!0,padding:6,shadow:"tableShadow"})}function G({id:y,index:B,canDelete:_,canReorder:q,isOpen:K=!1,stagesCount:ee}){const b=A=>`${A+1} of ${ee}`,oe=A=>{z(W({id:"dnd.grab-item",defaultMessage:"{item}, grabbed. Current position in list: {position}. Press up and down arrow to change position, Spacebar to drop, Escape to cancel."},{item:j.value,position:b(A)}))},se=A=>{z(W({id:"dnd.drop-item",defaultMessage:"{item}, dropped. Final position in list: {position}."},{item:j.value,position:b(A)}))},ie=()=>{z(W({id:"dnd.cancel-item",defaultMessage:"{item}, dropped. Re-order cancelled."},{item:j.value}))},le=(A,F)=>{z(W({id:"dnd.reorder",defaultMessage:"{item}, moved. New position in list: {position}."},{item:j.value,position:b(A)})),Q((0,o.FP)(F,A))},[ne,z]=t.useState(null),{formatMessage:W}=(0,f.Z)(),{trackUsage:de}=(0,l.rS)(),Q=(0,i.I0)(),[te,ce]=t.useState(K),[j,ue,me]=(0,O.U$)(`stages.${B}.name`),[Y,fe,ge]=(0,O.U$)(`stages.${B}.color`),[{handlerId:pe,isDragging:ve,handleKeyDown:he},Ee,ye,Te,ae]=(0,U.Y9)(q,{index:B,item:{name:j.value},onGrabItem:oe,onDropItem:se,onMoveItem:le,onCancel:ie,type:$.uL.STAGE}),Se=(0,k.FE)(Ee,ye),xe=X.map(({hex:A,name:F})=>({value:A,label:W({id:"Settings.review-workflows.stage.color.name",defaultMessage:"{name}"},{name:F}),color:A}));t.useEffect(()=>{ae((0,I.rX)(),{captureDraggingState:!1})},[ae,B]);const{themeColorName:Me}=(0,N.k)(Y.value)??{};return t.createElement(r.x,{ref:Se},ne&&t.createElement(w.T,{"aria-live":"assertive"},ne),ve?t.createElement(J,null):t.createElement(x.U,{size:"S",variant:"primary",onToggle:()=>{ce(!te),te||de("willEditStage")},expanded:te,shadow:"tableShadow"},t.createElement(P.B,{title:j.value,togglePosition:"left",action:t.createElement(n.k,null,_&&t.createElement(R.h,{background:"transparent",icon:t.createElement(D.Z,null),label:W({id:"Settings.review-workflows.stage.delete",defaultMessage:"Delete stage"}),noBorder:!0,onClick:()=>Q((0,o._V)(y))}),t.createElement(R.h,{background:"transparent",forwardedAs:"div",role:"button",noBorder:!0,tabIndex:0,"data-handler-id":pe,ref:Te,label:W({id:"Settings.review-workflows.stage.drag",defaultMessage:"Drag"}),onClick:A=>A.stopPropagation(),onKeyDown:he},t.createElement(L.Z,null)))}),t.createElement(M.v,{padding:6,background:"neutral0",hasRadius:!0},t.createElement(C.r,{gap:4},t.createElement(p.P,{col:6},t.createElement(T.o,{...j,id:j.name,label:W({id:"Settings.review-workflows.stage.name.label",defaultMessage:"Stage name"}),error:ue.error??!1,onChange:A=>{me.setValue(A.target.value),Q((0,o.xn)(y,{name:A.target.value}))},required:!0})),t.createElement(p.P,{col:6},t.createElement(h.q4,{error:fe?.error??!1,id:Y.name,required:!0,label:W({id:"content-manager.reviewWorkflows.stage.color",defaultMessage:"Color"}),onChange:A=>{ge.setValue(A),Q((0,o.xn)(y,{color:A}))},value:Y.value.toUpperCase(),startIcon:t.createElement(n.k,{as:"span",height:2,background:Y.value,borderColor:Me==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2})},xe.map(({value:A,label:F,color:re})=>{const{themeColorName:we}=(0,N.k)(re);return t.createElement(h.ag,{value:A,key:A,startIcon:t.createElement(n.k,{as:"span",height:2,background:re,borderColor:we==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2})},F)})))))))}G.propTypes=s().shape({id:s().number.isRequired,color:s().string.isRequired,canDelete:s().bool.isRequired,canReorder:s().bool.isRequired,stagesCount:s().number.isRequired}).isRequired;const V=(0,a.ZP)(r.x)`
|
|
60
|
-
position: relative;
|
|
61
|
-
`,H=(0,a.ZP)(r.x)`
|
|
62
|
-
left: 50%;
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: 0;
|
|
65
|
-
transform: translateX(-50%);
|
|
66
|
-
`;function Z({stages:y}){const{formatMessage:B}=(0,f.Z)(),_=(0,i.I0)(),{trackUsage:q}=(0,l.rS)();return t.createElement(n.k,{direction:"column",gap:6,width:"100%"},t.createElement(V,{spacing:4,width:"100%"},t.createElement(H,{background:"neutral200",height:"100%",width:2,zIndex:1}),t.createElement(n.k,{direction:"column",alignItems:"stretch",gap:6,zIndex:2,position:"relative",as:"ol"},y.map((K,ee)=>{const b=K?.id??K.__temp_key__;return t.createElement(r.x,{key:`stage-${b}`,as:"li"},t.createElement(G,{id:b,index:ee,canDelete:y.length>1,isOpen:!K.id,canReorder:y.length>1,stagesCount:y.length}))}))),t.createElement(n.k,{direction:"column",gap:6},t.createElement(g,{type:"button",onClick:()=>{_((0,o.CI)({name:""})),q("willCreateStage")}},B({id:"Settings.review-workflows.stage.add",defaultMessage:"Add new stage"}))))}Z.defaultProps={stages:[]},Z.propTypes={stages:s().arrayOf(s().shape({id:s().number,__temp_key__:s().number,name:s().string.isRequired}))}},165:function(S,m,e){"use strict";e.d(m,{Y:function(){return d}});var t=e(32735),r=e(15335),n=e(5803),l=e(10369),u=e(27799),s=e(19565),f=e(92802),i=e(60216),a=e.n(i),o=e(67879),v=e(15062),E=e(77061);function d({contentTypes:{collectionTypes:g,singleTypes:w}}){const{formatMessage:x,locale:P}=(0,o.Z)(),R=(0,v.I0)(),[M,C,p]=(0,f.U$)("name"),[T,h,D]=(0,f.U$)("contentTypes"),L=(0,s.Xe)(P,{sensitivity:"base"});return t.createElement(r.r,{background:"neutral0",hasRadius:!0,gap:4,padding:6,shadow:"tableShadow"},t.createElement(n.P,{col:6},t.createElement(l.o,{...M,id:M.name,label:x({id:"Settings.review-workflows.workflow.name.label",defaultMessage:"Workflow Name"}),error:C.error??!1,onChange:O=>{R((0,E.rI)({name:O.target.value})),p.setValue(O.target.value)},required:!0})),t.createElement(n.P,{col:6},t.createElement(u.Q,{...T,customizeContent:O=>x({id:"Settings.review-workflows.workflow.contentTypes.displayValue",defaultMessage:"{count} {count, plural, one {content type} other {content types}} selected"},{count:O.length}),error:h.error??!1,id:T.name,label:x({id:"Settings.review-workflows.workflow.contentTypes.label",defaultMessage:"Associated to"}),onChange:O=>{R((0,E.rI)({contentTypes:O})),D.setValue(O)},options:[{label:x({id:"Settings.review-workflows.workflow.contentTypes.collectionTypes.label",defaultMessage:"Collection Types"}),children:g.sort((O,I)=>L.compare(O.info.displayName,I.info.displayName)).map(O=>({label:O.info.displayName,value:O.uid}))},{label:x({id:"Settings.review-workflows.workflow.contentTypes.singleTypes.label",defaultMessage:"Single Types"}),children:w.map(O=>({label:O.info.displayName,value:O.uid}))}],placeholder:x({id:"Settings.review-workflows.workflow.contentTypes.placeholder",defaultMessage:"Select"})})))}const c=a().shape({uid:a().string.isRequired,info:a().shape({displayName:a().string.isRequired}).isRequired});d.propTypes={contentTypes:a().shape({collectionTypes:a().arrayOf(c).isRequired,singleTypes:a().arrayOf(c).isRequired}).isRequired}},2121:function(S,m,e){"use strict";e.d(m,{$k:function(){return i},FT:function(){return v},Nj:function(){return f},Ot:function(){return s},VS:function(){return a},gu:function(){return n},lv:function(){return o},qZ:function(){return l},sN:function(){return r},uL:function(){return E},x4:function(){return u}});var t=e(12301);const r="settings_review-workflows",n="Settings/Review_Workflows/RESET_WORKFLOW",l="Settings/Review_Workflows/SET_WORKFLOW",u="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",s="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",f="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",i="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",a="Settings/Review_Workflows/WORKFLOW_UPDATE",o={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"},v=t.W.colors.primary600,E={STAGE:"stage"}},32329:function(S,m,e){"use strict";e.d(m,{n:function(){return n}});var t=e(19565),r=e(20108);function n(l={}){const{get:u}=(0,t.kY)(),{id:s="",...f}=l,i={populate:"stages"},{data:a,isLoading:o,status:v,refetch:E}=(0,r.useQuery)(["review-workflows","workflows",s],async()=>(await u(`/admin/review-workflows/workflows/${s}`,{params:{...i,...f}})).data);let d=[];return s&&a?.data?d=[a.data]:Array.isArray(a?.data)&&(d=a.data),{meta:a?.meta??{},workflows:d,isLoading:o,status:v,refetch:E}}},79989:function(S,m,e){"use strict";e.d(m,{E:function(){return u},I:function(){return s}});var t=e(97889),r=e(89793),n=e.n(r),l=e(2121);const u={status:"loading",serverState:{workflow:null},clientState:{currentWorkflow:{data:{name:"",contentTypes:[],stages:[{color:l.FT,name:"",__temp_key__:1}]},isDirty:!1,hasDeletedServerStages:!1}}};function s(i=u,a){return(0,t.Uy)(i,o=>{const{payload:v}=a;switch(a.type){case l.qZ:{const{status:E,workflow:d}=v;o.status=E,d&&(o.serverState.workflow=d,o.clientState.currentWorkflow.data={...d,stages:d.stages.map(c=>({...c,color:c?.color??l.FT}))}),o.clientState.currentWorkflow.hasDeletedServerStages=!1;break}case l.gu:{o.clientState.currentWorkflow.data=u.clientState.currentWorkflow.data,o.serverState=u.serverState;break}case l.x4:{const{stageId:E}=v,{currentWorkflow:d}=i.clientState;o.clientState.currentWorkflow.data.stages=d.data.stages.filter(c=>(c?.id??c.__temp_key__)!==E),d.hasDeletedServerStages||(o.clientState.currentWorkflow.hasDeletedServerStages=!!(i.serverState.currentWorkflow?.stages??[]).find(c=>c.id===E));break}case l.Ot:{const{currentWorkflow:E}=i.clientState;E.data||(o.clientState.currentWorkflow.data={stages:[]});const d=f(o.clientState.currentWorkflow.data.stages);o.clientState.currentWorkflow.data.stages.push({...v,color:v?.color??l.FT,__temp_key__:d});break}case l.Nj:{const{currentWorkflow:E}=i.clientState,{stageId:d,...c}=v;o.clientState.currentWorkflow.data.stages=E.data.stages.map(g=>(g.id??g.__temp_key__)===d?{...g,...c}:g);break}case l.$k:{const{currentWorkflow:{data:{stages:E}}}=i.clientState,{newIndex:d,oldIndex:c}=v;if(d>=0&&d<E.length){const g=E[c];let w=[...E];w.splice(c,1),w.splice(d,0,g),o.clientState.currentWorkflow.data.stages=w}break}case l.VS:{o.clientState.currentWorkflow.data={...o.clientState.currentWorkflow.data,...v};break}default:break}i.clientState.currentWorkflow.data&&o.serverState.workflow?o.clientState.currentWorkflow.isDirty=!n()((0,t.Vk)(o.clientState.currentWorkflow).data,o.serverState.workflow):o.clientState.currentWorkflow.isDirty=!0})}const f=(i=[])=>{const a=i.map(o=>o.id??o.__temp_key__);return Math.max(...a,-1)+1}},68886:function(S,m,e){"use strict";e.d(m,{k:function(){return n},s:function(){return l}});var t=e(12301),r=e(2121);function n(u){if(!u)return null;const f=Object.entries(t.W.colors).filter(([,i])=>i.toUpperCase()===u.toUpperCase()).reduce((i,[a])=>(r.lv?.[a]&&(i=a),i),null);return f?{themeColorName:f,name:r.lv[f]}:null}function l(){return Object.entries(r.lv).map(([u,s])=>({hex:t.W.colors[u].toUpperCase(),name:s}))}},82920:function(S,m,e){"use strict";e.d(m,{V:function(){return l}});var t=e(3040),r=e.n(t),n=e(24346);async function l({values:u,formatMessage:s}){const f=n.Ry({contentTypes:n.IX().of(n.Z_()),name:n.Z_().max(255,s({id:"Settings.review-workflows.validation.name.max-length",defaultMessage:"Name can not be longer than 255 characters"})).required(),stages:n.IX().of(n.Ry().shape({name:n.Z_().required(s({id:"Settings.review-workflows.validation.stage.name",defaultMessage:"Name is required"})).max(255,s({id:"Settings.review-workflows.validation.stage.max-length",defaultMessage:"Name can not be longer than 255 characters"})).test("unique-name",s({id:"Settings.review-workflows.validation.stage.duplicate",defaultMessage:"Stage name must be unique"}),function(i){const{options:{context:a}}=this;return a.stages.filter(o=>o.name===i).length===1}),color:n.Z_().required(s({id:"Settings.review-workflows.validation.stage.color",defaultMessage:"Color is required"})).matches(/^#(?:[0-9a-fA-F]{3}){1,2}$/i)})).min(1)});try{return await f.validate(u,{abortEarly:!1,context:u}),!0}catch(i){let a={};return i instanceof n.p8&&i.inner.forEach(o=>{r()(a,o.path,o.message)}),a}}},51355:function(S,m,e){var t=e(94318),r=e(3387),n="[object Boolean]";function l(u){return u===!0||u===!1||r(u)&&t(u)==n}S.exports=l},95919:function(S,m,e){var t=e(80022);function r(n){return t(n)&&n!=+n}S.exports=r},80022:function(S,m,e){var t=e(94318),r=e(3387),n="[object Number]";function l(u){return typeof u=="number"||r(u)&&t(u)==n}S.exports=l},59578:function(S,m,e){var t=e(41119);function r(n){return t(n).toLowerCase()}S.exports=r},83828:function(S,m,e){"use strict";e.d(m,{U:function(){return E},y:function(){return o}});var t=e(74512),r=e(32735),n=e(8471),l=e(91045),u=e(74971),s=e(49372),f=e(87933),i=e(72850);const a=({theme:d,expanded:c,variant:g,disabled:w,error:x})=>x?`1px solid ${d.colors.danger600} !important`:w?`1px solid ${d.colors.neutral150}`:c?`1px solid ${d.colors.primary600}`:g==="primary"?`1px solid ${d.colors.neutral0}`:`1px solid ${d.colors.neutral100}`,o=(0,n.ZP)(s.Z)``,v=(0,n.ZP)(i.x)`
|
|
67
|
-
border: ${a};
|
|
68
|
-
|
|
69
|
-
&:hover:not([aria-disabled='true']) {
|
|
70
|
-
border: 1px solid ${({theme:d})=>d.colors.primary600};
|
|
71
|
-
|
|
72
|
-
${o} {
|
|
73
|
-
color: ${({theme:d,expanded:c})=>c?void 0:d.colors.primary700};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
${s.Z} {
|
|
77
|
-
color: ${({theme:d,expanded:c})=>c?void 0:d.colors.primary600};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
& > ${f.k} {
|
|
81
|
-
background: ${({theme:d})=>d.colors.primary100};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
[data-strapi-dropdown='true'] {
|
|
85
|
-
background: ${({theme:d})=>d.colors.primary200};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
`,E=({children:d,disabled:c=!1,error:g,expanded:w=!1,hasErrorMessage:x=!0,id:P,onToggle:R,toggle:M,size:C="M",variant:p="primary",shadow:T})=>{const h=(0,u.M)(P),D=r.useMemo(()=>({expanded:w,onToggle:R,toggle:M,id:h,size:C,variant:p,disabled:c}),[c,w,h,R,C,M,p]);return(0,t.jsxs)(l.S.Provider,{value:D,children:[(0,t.jsx)(v,{"data-strapi-expanded":w,disabled:c,"aria-disabled":c,expanded:w,hasRadius:!0,variant:p,error:g,shadow:T,children:d}),g&&x&&(0,t.jsx)(i.x,{paddingTop:1,children:(0,t.jsx)(s.Z,{variant:"pi",textColor:"danger600",children:g})})]})}},89966:function(S,m,e){"use strict";e.d(m,{v:function(){return l}});var t=e(74512),r=e(91045),n=e(72850);const l=({children:u,...s})=>{const{expanded:f,id:i}=(0,r.A)();if(!f)return null;const a=`accordion-content-${i}`,o=`accordion-label-${i}`,v=`accordion-desc-${i}`;return(0,t.jsx)(n.x,{role:"region",id:a,"aria-labelledby":o,"aria-describedby":v,...s,children:u})}},91045:function(S,m,e){"use strict";e.d(m,{A:function(){return n},S:function(){return r}});var t=e(32735);const r=(0,t.createContext)({disabled:!1,expanded:!1,id:"",size:"M",variant:"primary"}),n=()=>(0,t.useContext)(r)},61762:function(S,m,e){"use strict";e.d(m,{B:function(){return d}});var t=e(74512),r=e(16899),n=e(8471),l=e(83828),u=e(91045);const s=({expanded:c,disabled:g,variant:w})=>{let x="neutral100";return c?x="primary100":g?x="neutral150":w==="primary"&&(x="neutral0"),x};var f=e(7563),i=e(99140),a=e(87933),o=e(49372);const v=(0,n.ZP)(f.A)`
|
|
89
|
-
text-align: left;
|
|
90
|
-
|
|
91
|
-
// necessary to make the ellipsis prop work on the title
|
|
92
|
-
> span {
|
|
93
|
-
max-width: 100%;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
svg {
|
|
97
|
-
width: ${14/16}rem;
|
|
98
|
-
height: ${14/16}rem;
|
|
99
|
-
|
|
100
|
-
path {
|
|
101
|
-
fill: ${({theme:c,expanded:g})=>g?c.colors.primary600:c.colors.neutral500};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`,E=(0,n.ZP)(a.k)`
|
|
105
|
-
min-height: ${({theme:c,size:g})=>c.sizes.accordions[g]};
|
|
106
|
-
border-radius: ${({theme:c,expanded:g})=>g?`${c.borderRadius} ${c.borderRadius} 0 0`:c.borderRadius};
|
|
107
|
-
|
|
108
|
-
&:hover {
|
|
109
|
-
svg {
|
|
110
|
-
path {
|
|
111
|
-
fill: ${({theme:c})=>c.colors.primary600};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
`,d=({title:c,description:g,as:w="span",togglePosition:x="right",action:P,...R})=>{const{onToggle:M,toggle:C,expanded:p,id:T,size:h,variant:D,disabled:L}=(0,u.A)(),O=`accordion-content-${T}`,I=`accordion-label-${T}`,U=`accordion-desc-${T}`,k=h==="M"?6:4,$=h==="M"?k:k-2,N=s({expanded:p,disabled:L,variant:D}),X={as:w,fontWeight:h==="S"?"bold":void 0,id:I,textColor:p?"primary600":"neutral700",ellipsis:!0,variant:h==="M"?"delta":void 0},J=p?"primary600":"neutral600",G=p?"primary200":"neutral200",V=h==="M"?`${32/16}rem`:`${24/16}rem`,H=()=>{L||(C&&!M?(console.warn('Deprecation warning: Usage of "toggle" prop in Accordion component is deprecated. This is discouraged and will be removed in the next major release. Please use "onToggle" instead'),C()):M&&M())},Z=(0,t.jsx)(a.k,{justifyContent:"center",borderRadius:"50%",height:V,width:V,transform:p?"rotate(180deg)":void 0,"data-strapi-dropdown":!0,"aria-hidden":!0,as:"span",background:G,cursor:L?"not-allowed":"pointer",onClick:H,shrink:0,children:(0,t.jsx)(i.J,{as:r.Z,width:h==="M"?`${11/16}rem`:`${8/16}rem`,color:p?"primary600":"neutral600"})});return(0,t.jsx)(E,{paddingBottom:$,paddingLeft:k,paddingRight:k,paddingTop:$,background:N,expanded:p,size:h,justifyContent:"space-between",cursor:L?"not-allowed":"",children:(0,t.jsxs)(a.k,{gap:3,flex:1,maxWidth:"100%",children:[x==="left"&&Z,(0,t.jsx)(v,{onClick:H,"aria-disabled":L,"aria-expanded":p,"aria-controls":O,"aria-labelledby":I,"data-strapi-accordion-toggle":!0,expanded:p,type:"button",flex:1,minWidth:0,...R,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.y,{...X,children:c}),g&&(0,t.jsx)(o.Z,{as:"p",id:U,textColor:J,children:g})]})}),x==="right"&&(0,t.jsxs)(a.k,{gap:3,children:[Z,P]}),x==="left"&&P]})})}},27799:function(S,m,e){"use strict";e.d(m,{Q:function(){return l}});var t=e(74512),r=e(8471),n=e(6407);const l=({options:s,...f})=>(0,t.jsx)(n.NU,{...f,children:s.map(i=>"children"in i?(0,t.jsx)(n.Ab,{label:i.label,values:i.children.map(a=>a.value.toString()),children:i.children.map(a=>(0,t.jsx)(u,{value:a.value,children:a.label},a.value))},i.label):(0,t.jsx)(n.ML,{value:i.value,children:i.label},i.value))}),u=(0,r.ZP)(n.ML)`
|
|
116
|
-
padding-left: ${({theme:s})=>s.spaces[7]};
|
|
117
|
-
`},29439:function(S,m,e){"use strict";e.d(m,{Z:function(){return n}});var t=e(74512);const r=l=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...l,children:(0,t.jsx)("path",{fill:"#212134",d:"M24 13.3a.2.2 0 0 1-.2.2H5.74l8.239 8.239a.2.2 0 0 1 0 .282L12.14 23.86a.2.2 0 0 1-.282 0L.14 12.14a.2.2 0 0 1 0-.282L11.86.14a.2.2 0 0 1 .282 0L13.98 1.98a.2.2 0 0 1 0 .282L5.74 10.5H23.8c.11 0 .2.09.2.2v2.6Z"})}),n=r},47081:function(S,m,e){"use strict";e.d(m,{Z:function(){return n}});var t=e(74512);const r=l=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...l,children:[(0,t.jsx)("path",{fill:"#212134",d:"M16.563 5.587a2.503 2.503 0 1 0 0-5.007 2.503 2.503 0 0 0 0 5.007Z"}),(0,t.jsx)("path",{fill:"#212134",d:"M18.487 3.083c-.012.788-.487 1.513-1.229 1.797a1.954 1.954 0 0 1-2.184-.574A1.943 1.943 0 0 1 14.9 2.11c.4-.684 1.2-1.066 1.981-.927a1.954 1.954 0 0 1 1.606 1.9c.011.748 1.17.748 1.158 0A3.138 3.138 0 0 0 17.565.17c-1.176-.423-2.567-.03-3.36.933-.83 1.002-.968 2.45-.284 3.575.678 1.124 1.993 1.674 3.273 1.431 1.432-.272 2.428-1.593 2.451-3.019.012-.753-1.147-.753-1.158-.006ZM16.563 14.372a2.503 2.503 0 1 0 0-5.007 2.503 2.503 0 0 0 0 5.007Z"}),(0,t.jsx)("path",{fill:"#212134",d:"M18.487 11.867c-.012.789-.487 1.513-1.229 1.797a1.954 1.954 0 0 1-2.184-.574 1.943 1.943 0 0 1-.174-2.196c.4-.684 1.2-1.066 1.981-.927.928.156 1.588.968 1.606 1.9.011.748 1.17.748 1.158 0a3.138 3.138 0 0 0-2.08-2.914c-1.176-.423-2.567-.029-3.36.933-.83 1.002-.968 2.45-.284 3.575.678 1.124 1.993 1.675 3.273 1.431 1.432-.272 2.428-1.593 2.451-3.019.012-.753-1.147-.753-1.158-.005ZM16.563 23.392a2.503 2.503 0 1 0 0-5.006 2.503 2.503 0 0 0 0 5.006Z"}),(0,t.jsx)("path",{fill:"#212134",d:"M18.487 20.89c-.012.787-.487 1.512-1.229 1.796a1.954 1.954 0 0 1-2.184-.574 1.943 1.943 0 0 1-.174-2.196c.4-.684 1.2-1.066 1.981-.927.928.156 1.588.967 1.606 1.9.011.748 1.17.748 1.158 0a3.138 3.138 0 0 0-2.08-2.914c-1.176-.423-2.567-.03-3.36.933-.83 1.002-.968 2.45-.284 3.575.678 1.124 1.993 1.674 3.273 1.431 1.432-.272 2.428-1.593 2.451-3.019.012-.753-1.147-.753-1.158-.006ZM7.378 5.622a2.503 2.503 0 1 0 0-5.007 2.503 2.503 0 0 0 0 5.007Z"}),(0,t.jsx)("path",{fill:"#212134",d:"M9.302 3.119c-.011.788-.486 1.512-1.228 1.796a1.954 1.954 0 0 1-2.185-.574 1.943 1.943 0 0 1-.173-2.196c.4-.684 1.199-1.066 1.981-.927a1.943 1.943 0 0 1 1.605 1.9c.012.748 1.17.748 1.16 0A3.138 3.138 0 0 0 8.38.205c-1.176-.423-2.567-.029-3.36.933-.83 1.002-.968 2.45-.285 3.575.678 1.124 1.994 1.675 3.274 1.431 1.431-.272 2.428-1.593 2.451-3.019.012-.753-1.147-.753-1.159-.005ZM7.378 14.406a2.503 2.503 0 1 0 0-5.006 2.503 2.503 0 0 0 0 5.006Z"}),(0,t.jsx)("path",{fill:"#212134",d:"M9.302 11.902c-.011.788-.486 1.513-1.228 1.797a1.954 1.954 0 0 1-2.185-.574 1.943 1.943 0 0 1-.173-2.196c.4-.684 1.199-1.066 1.981-.927a1.943 1.943 0 0 1 1.605 1.9c.012.748 1.17.748 1.16 0A3.138 3.138 0 0 0 8.38 8.988c-1.176-.423-2.567-.03-3.36.933-.83 1.002-.968 2.45-.285 3.575.678 1.124 1.994 1.674 3.274 1.431 1.431-.272 2.428-1.593 2.451-3.019.012-.753-1.147-.753-1.159-.006ZM7.378 23.427a2.503 2.503 0 1 0 0-5.007 2.503 2.503 0 0 0 0 5.007Z"}),(0,t.jsx)("path",{fill:"#212134",d:"M9.302 20.924c-.011.788-.486 1.513-1.228 1.797a1.954 1.954 0 0 1-2.185-.574 1.943 1.943 0 0 1-.173-2.196c.4-.684 1.199-1.066 1.981-.927.933.156 1.594.967 1.605 1.9.012.748 1.17.748 1.16 0A3.139 3.139 0 0 0 8.38 18.01c-1.176-.423-2.567-.03-3.36.933-.83 1.002-.968 2.45-.285 3.569.678 1.124 1.994 1.675 3.274 1.431 1.431-.272 2.428-1.593 2.451-3.019.012-.747-1.147-.747-1.159 0Z"})]}),n=r},86308:function(S,m,e){"use strict";e.d(m,{Z:function(){return n}});var t=e(74512);const r=l=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...l,children:[(0,t.jsx)("circle",{cx:12,cy:12,r:12,fill:"#212134"}),(0,t.jsx)("path",{fill:"#F6F6F9",d:"M17 12.569c0 .124-.1.224-.225.224h-3.981v3.982c0 .124-.101.225-.226.225h-1.136a.225.225 0 0 1-.226-.225v-3.981H7.226A.225.225 0 0 1 7 12.567v-1.136c0-.125.1-.226.225-.226h3.982V7.226c0-.124.1-.225.224-.225h1.138c.124 0 .224.1.224.225v3.982h3.982c.124 0 .225.1.225.224v1.138Z"})]}),n=r}}]);
|