@strapi/admin 4.12.0-beta.3 → 4.12.0-beta.5

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.
Files changed (68) hide show
  1. package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +13 -35
  2. package/admin/src/content-manager/pages/ListView/components/TableRows/index.js +304 -0
  3. package/admin/src/pages/AuthPage/components/Register/index.js +4 -0
  4. package/build/2379.0ca87a89.chunk.js +1 -0
  5. package/build/2395.df7a044a.chunk.js +26 -0
  6. package/build/2801.b1140c9b.chunk.js +1 -0
  7. package/build/{3100.21c343fa.chunk.js → 3100.2ba4df95.chunk.js} +1 -1
  8. package/build/{3483.ddd2d6df.chunk.js → 3483.e2ee2547.chunk.js} +1 -1
  9. package/build/3984.dda474f7.chunk.js +1 -0
  10. package/build/502.8ae8ef60.chunk.js +1 -0
  11. package/build/5483.6dd2e776.chunk.js +6 -0
  12. package/build/7065.ec811562.chunk.js +114 -0
  13. package/build/7464.8a6c1e6c.chunk.js +1 -0
  14. package/build/8276.6c7b8e6e.chunk.js +26 -0
  15. package/build/{9806.91360bb6.chunk.js → 9806.aa25371d.chunk.js} +10 -10
  16. package/build/{Admin-authenticatedApp.36b3826c.chunk.js → Admin-authenticatedApp.6b8dfa45.chunk.js} +1 -1
  17. package/build/{admin-app.1c3f7fd6.chunk.js → admin-app.c2e4e128.chunk.js} +8 -8
  18. package/build/content-manager.8772445b.chunk.js +1103 -0
  19. package/build/index.html +1 -1
  20. package/build/{main.a12c4c0f.js → main.af84ad9c.js} +281 -281
  21. package/build/review-workflows-settings-create-view.05758184.chunk.js +1 -0
  22. package/build/review-workflows-settings-edit-view.c33f7c58.chunk.js +1 -0
  23. package/build/review-workflows-settings-list-view.3ee9190d.chunk.js +56 -0
  24. package/build/{runtime~main.d197f488.js → runtime~main.a65ca6fb.js} +2 -2
  25. package/build/sso-settings-page.7c9b2fd9.chunk.js +1 -0
  26. package/ee/admin/constants.js +3 -0
  27. package/ee/admin/content-manager/pages/EditView/InformationBox/InformationBoxEE.js +12 -4
  28. package/ee/admin/hooks/index.js +1 -1
  29. package/ee/admin/hooks/useLicenseLimitNotification/index.js +1 -1
  30. package/ee/admin/hooks/useLicenseLimits/__mocks__/index.js +8 -0
  31. package/ee/admin/hooks/useLicenseLimits/index.js +1 -3
  32. package/ee/admin/hooks/useLicenseLimits/useLicenseLimits.js +3 -13
  33. package/ee/admin/pages/SettingsPage/pages/ApplicationInfosPage/components/AdminSeatInfo/index.js +19 -4
  34. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stage/Stage.js +7 -0
  35. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/Stages/Stages.js +20 -16
  36. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/WorkflowAttributes/WorkflowAttributes.js +120 -29
  37. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/constants.js +3 -0
  38. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/CreateView.js +108 -31
  39. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/CreateView/index.js +8 -3
  40. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/EditView.js +138 -61
  41. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/EditView/index.js +8 -3
  42. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/ListView.js +72 -55
  43. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/pages/ListView/index.js +8 -3
  44. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/reducer/index.js +2 -8
  45. package/ee/admin/pages/SettingsPage/pages/SingleSignOn/index.js +2 -8
  46. package/ee/admin/pages/SettingsPage/pages/SingleSignOn/utils/schema.js +8 -5
  47. package/ee/server/services/review-workflows/review-workflows.js +1 -1
  48. package/ee/server/services/review-workflows/validation.js +6 -4
  49. package/ee/server/services/review-workflows/workflows/content-types.js +28 -19
  50. package/ee/server/services/review-workflows/workflows/index.js +14 -2
  51. package/ee/server/validation/authentication.js +20 -9
  52. package/package.json +9 -9
  53. package/build/2379.d33a2e16.chunk.js +0 -1
  54. package/build/2395.b0419a54.chunk.js +0 -26
  55. package/build/2801.18f38baf.chunk.js +0 -1
  56. package/build/3984.ea7b8036.chunk.js +0 -1
  57. package/build/502.ccb38223.chunk.js +0 -1
  58. package/build/5483.ed2c7efa.chunk.js +0 -6
  59. package/build/7464.c6d0565c.chunk.js +0 -1
  60. package/build/8276.23e0763b.chunk.js +0 -26
  61. package/build/8298.fd253c9f.chunk.js +0 -117
  62. package/build/content-manager.b8d593d4.chunk.js +0 -1103
  63. package/build/review-workflows-settings-create-view.dfd87e1f.chunk.js +0 -1
  64. package/build/review-workflows-settings-edit-view.53c00afe.chunk.js +0 -1
  65. package/build/review-workflows-settings-list-view.a34be805.chunk.js +0 -56
  66. package/build/sso-settings-page.ed6f3f15.chunk.js +0 -1
  67. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/ProtectedPage/ProtectedPage.js +0 -21
  68. package/ee/admin/pages/SettingsPage/pages/ReviewWorkflows/components/ProtectedPage/index.js +0 -1
@@ -0,0 +1,114 @@
1
+ (self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[7065],{61234:function(w,m,e){"use strict";e.d(m,{v:function(){return a}});var t=e(32735),r=e(15062);function a(d,c){const o=(0,r.oR)();(0,t.useEffect)(()=>{o.injectReducer(d,c)},[o,d,c])}},50337:function(w,m,e){"use strict";e.d(m,{pl:function(){return s},aY:function(){return L},q5:function(){return l.q}});var t=e(32735),r=e(19565),a=e(86209),d=e(97889);const c={data:[],isLoading:!0};var y=(M,A)=>(0,d.ZP)(M,g=>{switch(A.type){case"GET_DATA_SUCCEEDED":{g.data=A.data,g.isLoading=!1;break}case"GET_DATA_ERROR":{g.isLoading=!1;break}default:return g}}),s=({ssoEnabled:M})=>{const[A,g]=(0,t.useReducer)(y,c),T=(0,r.lm)(),{get:f}=(0,r.kY)();return(0,t.useEffect)(()=>{(async()=>{try{if(!M){g({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:R}=await f((0,a.IF)("providers"));g({type:"GET_DATA_SUCCEEDED",data:R})}catch(R){console.error(R),g({type:"GET_DATA_ERROR"}),T({type:"warning",message:{id:"notification.error"}})}})()},[f,M,T]),A},n=e(36866),p=e.n(n),h=e(67879),i=e(53038),l=e(53104);const v="strapi-notification-seat-limit",x="https://cloud.strapi.io/profile/billing",O="https://strapi.io/billing/request-seats";var L=()=>{const{formatMessage:M}=(0,h.Z)();let{license:A,isError:g,isLoading:T}=(0,l.q)();const f=(0,r.lm)(),{pathname:D}=(0,i.TH)(),{enforcementUserCount:R,permittedSeats:W,licenseLimitStatus:I,isHostedOnStrapiCloud:U}=A;(0,t.useEffect)(()=>{if(g||T)return;const $=!p()(W)&&!window.sessionStorage.getItem(`${v}-${D}`)&&(I==="AT_LIMIT"||I==="OVER_LIMIT");let B;I==="OVER_LIMIT"?B="warning":I==="AT_LIMIT"&&(B="softWarning"),$&&f({type:B,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:R,permittedSeats:W}),link:{url:U?x:O,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(`${v}-${D}`,!0)}})},[f,A,D,M,T,W,I,R,U,g])}},53104:function(w,m,e){"use strict";e.d(m,{q:function(){return d}});var t=e(32735),r=e(19565),a=e(20108);function d({enabled:c}={enabled:!0}){const{get:o}=(0,r.kY)(),{data:y,isError:u,isLoading:s}=(0,a.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:h}}=await o("/admin/license-limit-information");return h},{enabled:c}),n=y??{},p=t.useCallback(h=>(n?.features??[]).find(l=>l.name===h)?.options??{},[n?.features]);return{license:n,getFeature:p,isError:u,isLoading:s}}},77061:function(w,m,e){"use strict";e.d(m,{CI:function(){return d},FP:function(){return o},Js:function(){return u},_V:function(){return a},fC:function(){return r},rI:function(){return y},xn:function(){return c}});var t=e(2121);function r({status:s,data:n}){return{type:t.qZ,payload:{status:s,workflow:n}}}function a(s){return{type:t.x4,payload:{stageId:s}}}function d(s={}){return{type:t.Ot,payload:s}}function c(s,n){return{type:t.Nj,payload:{stageId:s,...n}}}function o(s,n){return{type:t.$k,payload:{newIndex:n,oldIndex:s}}}function y(s){return{type:t.VS,payload:s}}function u(){return{type:t.gu}}},27187:function(w,m,e){"use strict";e.d(m,{eJ:function(){return g},lx:function(){return M},h4:function(){return T},fC:function(){return A}});var t=e(32735),r=e(96709),a=e(27649),d=e(17e3),c=e(82055),o=e(19565),y=e(29439),u=e(67879),s=e(17379),n=e(2121),p=e(87933),h=e(49372),i=e(16899),l=e(60216),v=e.n(l),x=e(8471);const O=(0,x.ZP)(p.k)`
2
+ svg path {
3
+ fill: ${({theme:f})=>f.colors.neutral600};
4
+ }
5
+ `;function P({name:f}){return t.createElement(p.k,{background:"primary100",borderStyle:"dashed",borderColor:"primary600",borderWidth:"1px",gap:3,hasRadius:!0,padding:3,shadow:"tableShadow",width:(0,o.Q1)(300)},t.createElement(O,{alignItems:"center",background:"neutral200",borderRadius:"50%",height:6,justifyContent:"center",width:6},t.createElement(i.Z,{width:`${8/16}rem`})),t.createElement(h.Z,{fontWeight:"bold"},f))}P.propTypes={name:v().string.isRequired};function L({type:f,item:D}){switch(f){case n.uL.STAGE:return t.createElement(P,{...D});default:return null}}function M(){return t.createElement(s.r,{renderItem:L})}function A({children:f}){return t.createElement(r.A,null,t.createElement(a.o,{tabIndex:-1},t.createElement(d.D,null,f)))}function g({href:f}){const{formatMessage:D}=(0,u.Z)();return t.createElement(o.rU,{startIcon:t.createElement(y.Z,null),to:f},D({id:"global.back",defaultMessage:"Back"}))}function T({title:f,subtitle:D,navigationAction:R,primaryAction:W}){return t.createElement(t.Fragment,null,t.createElement(o.SL,{name:f}),t.createElement(c.T,{navigationAction:R,primaryAction:W,title:f,subtitle:D}))}},90562:function(w,m,e){"use strict";e.d(m,{uT:function(){return L},fC:function(){return g},Dx:function(){return P}});var t=e(32735),r=e(49372),a=e(87933),d=e(85025),c=e(31600),o=e(72850),y=e(50563),u=e(95489),s=e(35331),n=e(60216),p=e.n(n),h=e(67879),i=e(8471),l=e.p+"0cd5f8915b265d5b1856.png";const v="limits-title",x="https://strapi.io/pricing-cloud",O="https://strapi.io/contact-sales";function P({children:T}){return t.createElement(r.Z,{variant:"alpha",id:v},T)}P.propTypes={children:p().node.isRequired};function L({children:T}){return t.createElement(r.Z,{variant:"omega"},T)}L.propTypes={children:p().node.isRequired};function M(){const{formatMessage:T}=(0,h.Z)();return t.createElement(a.k,{gap:2,paddingTop:4},t.createElement(u.Q,{variant:"default",isExternal:!0,href:x},T({id:"Settings.review-workflows.limit.cta.learn",defaultMessage:"Learn more"})),t.createElement(u.Q,{variant:"tertiary",isExternal:!0,href:O},T({id:"Settings.review-workflows.limit.cta.sales",defaultMessage:"Contact Sales"})))}const A=i.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 g({children:T,isOpen:f,onClose:D}){const{formatMessage:R}=(0,h.Z)();return f?t.createElement(d.P,{labelledBy:v},t.createElement(c.f,null,t.createElement(a.k,{gap:2,paddingLeft:7,position:"relative"},t.createElement(a.k,{alignItems:"start",direction:"column",gap:2,width:"60%"},T,t.createElement(M,null)),t.createElement(a.k,{justifyContent:"end",height:"100%",width:"40%"},t.createElement(A,{src:l,"aria-hidden":!0,alt:"",loading:"lazy"}),t.createElement(o.x,{display:"flex",position:"absolute",right:0,top:0},t.createElement(y.h,{icon:t.createElement(s.Z,null),"aria-label":R({id:"global.close",defaultMessage:"Close"}),onClick:D})))))):null}g.defaultProps={isOpen:!1},g.propTypes={children:p().node.isRequired,isOpen:p().bool,onClose:p().func.isRequired}},45594:function(w,m,e){"use strict";e.d(m,{U:function(){return b}});var t=e(32735),r=e(72850),a=e(87933),d=e(19565),c=e(60216),o=e.n(c),y=e(67879),u=e(15062),s=e(8471),n=e(77061),p=e(49372),h=e(86308);const i=(0,s.ZP)(h.Z)`
11
+ > circle {
12
+ fill: ${({theme:E})=>E.colors.neutral150};
13
+ }
14
+ > path {
15
+ fill: ${({theme:E})=>E.colors.neutral600};
16
+ }
17
+ `,l=(0,s.ZP)(r.x)`
18
+ border-radius: 26px;
19
+
20
+ svg {
21
+ height: ${({theme:E})=>E.spaces[6]};
22
+ width: ${({theme:E})=>E.spaces[6]};
23
+
24
+ > path {
25
+ fill: ${({theme:E})=>E.colors.neutral600};
26
+ }
27
+ }
28
+
29
+ &:hover {
30
+ color: ${({theme:E})=>E.colors.primary600} !important;
31
+ ${p.Z} {
32
+ color: ${({theme:E})=>E.colors.primary600} !important;
33
+ }
34
+
35
+ ${i} {
36
+ > circle {
37
+ fill: ${({theme:E})=>E.colors.primary600};
38
+ }
39
+ > path {
40
+ fill: ${({theme:E})=>E.colors.neutral100};
41
+ }
42
+ }
43
+ }
44
+
45
+ &:active {
46
+ ${p.Z} {
47
+ color: ${({theme:E})=>E.colors.primary600};
48
+ }
49
+
50
+ ${i} {
51
+ > circle {
52
+ fill: ${({theme:E})=>E.colors.primary600};
53
+ }
54
+ > path {
55
+ fill: ${({theme:E})=>E.colors.neutral100};
56
+ }
57
+ }
58
+ }
59
+ `;function v({children:E,...Z}){return t.createElement(l,{as:"button",background:"neutral0",border:"neutral150",paddingBottom:3,paddingLeft:4,paddingRight:4,paddingTop:3,shadow:"filterShadow",...Z},t.createElement(a.k,{gap:2},t.createElement(i,{"aria-hidden":!0}),t.createElement(p.Z,{variant:"pi",fontWeight:"bold",textColor:"neutral500"},E)))}v.propTypes={children:o().node.isRequired};var x=e(3685),O=e(83828),P=e(61762),L=e(50563),M=e(89966),A=e(15335),g=e(5803),T=e(10369),f=e(77035),D=e(4038),R=e(47081),W=e(92802),I=e(51968),U=e(69242),$=e(97724),B=e(2121),K=e(68886);const V=(0,K.s)();function S(){return t.createElement(r.x,{background:"primary100",borderStyle:"dashed",borderColor:"primary600",borderWidth:"1px",display:"block",hasRadius:!0,padding:6,shadow:"tableShadow"})}function k({id:E,index:Z,canDelete:G,canReorder:ee,canUpdate:H,isOpen:te=!1,stagesCount:z}){const Y=C=>`${C+1} of ${z}`,Q=C=>{J(j({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:N.value,position:Y(C)}))},le=C=>{J(j({id:"dnd.drop-item",defaultMessage:"{item}, dropped. Final position in list: {position}."},{item:N.value,position:Y(C)}))},de=()=>{J(j({id:"dnd.cancel-item",defaultMessage:"{item}, dropped. Re-order cancelled."},{item:N.value}))},ce=(C,X)=>{J(j({id:"dnd.reorder",defaultMessage:"{item}, moved. New position in list: {position}."},{item:N.value,position:Y(C)})),q((0,n.FP)(X,C))},[ae,J]=t.useState(null),{formatMessage:j}=(0,y.Z)(),{trackUsage:ue}=(0,d.rS)(),q=(0,u.I0)(),[ne,me]=t.useState(te),[N,re,fe]=(0,W.U$)(`stages.${Z}.name`),[_,oe,ge]=(0,W.U$)(`stages.${Z}.color`),[{handlerId:pe,isDragging:ve,handleKeyDown:he},Ee,ye,Te,se]=(0,U.Y9)(ee,{index:Z,item:{name:N.value},onGrabItem:Q,onDropItem:le,onMoveItem:ce,onCancel:de,type:B.uL.STAGE}),Se=(0,$.FE)(Ee,ye),we=V.map(({hex:C,name:X})=>({value:C,label:j({id:"Settings.review-workflows.stage.color.name",defaultMessage:"{name}"},{name:X}),color:C}));t.useEffect(()=>{se((0,I.rX)(),{captureDraggingState:!1})},[se,Z]);const{themeColorName:Me}=(0,K.k)(_.value)??{};return t.createElement(r.x,{ref:Se},ae&&t.createElement(x.T,{"aria-live":"assertive"},ae),ve?t.createElement(S,null):t.createElement(O.U,{size:"S",variant:"primary",onToggle:()=>{me(!ne),ne||ue("willEditStage")},expanded:ne,shadow:"tableShadow",error:re.error??oe?.error??!1,hasErrorMessage:!1},t.createElement(P.B,{title:N.value,togglePosition:"left",action:t.createElement(a.k,null,G&&t.createElement(L.h,{background:"transparent",icon:t.createElement(D.Z,null),label:j({id:"Settings.review-workflows.stage.delete",defaultMessage:"Delete stage"}),noBorder:!0,onClick:()=>q((0,n._V)(E))}),t.createElement(L.h,{background:"transparent",disabled:!H,forwardedAs:"div",role:"button",noBorder:!0,tabIndex:0,"data-handler-id":pe,ref:Te,label:j({id:"Settings.review-workflows.stage.drag",defaultMessage:"Drag"}),onClick:C=>C.stopPropagation(),onKeyDown:he},t.createElement(R.Z,null)))}),t.createElement(M.v,{padding:6,background:"neutral0",hasRadius:!0},t.createElement(A.r,{gap:4},t.createElement(g.P,{col:6},t.createElement(T.o,{...N,id:N.name,disabled:!H,label:j({id:"Settings.review-workflows.stage.name.label",defaultMessage:"Stage name"}),error:re.error??!1,onChange:C=>{fe.setValue(C.target.value),q((0,n.xn)(E,{name:C.target.value}))},required:!0})),t.createElement(g.P,{col:6},t.createElement(f.q4,{disabled:!H,error:oe?.error??!1,id:_.name,required:!0,label:j({id:"content-manager.reviewWorkflows.stage.color",defaultMessage:"Color"}),onChange:C=>{ge.setValue(C),q((0,n.xn)(E,{color:C}))},value:_.value.toUpperCase(),startIcon:t.createElement(a.k,{as:"span",height:2,background:_.value,borderColor:Me==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2})},we.map(({value:C,label:X,color:ie})=>{const{themeColorName:xe}=(0,K.k)(ie);return t.createElement(f.ag,{value:C,key:C,startIcon:t.createElement(a.k,{as:"span",height:2,background:ie,borderColor:xe==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2})},X)})))))))}k.propTypes=o().shape({id:o().number.isRequired,color:o().string.isRequired,canDelete:o().bool.isRequired,canReorder:o().bool.isRequired,canUpdate:o().bool.isRequired,stagesCount:o().number.isRequired}).isRequired;const F=(0,s.ZP)(r.x)`
60
+ transform: translateX(-50%);
61
+ `;function b({canDelete:E,canUpdate:Z,stages:G}){const{formatMessage:ee}=(0,y.Z)(),H=(0,u.I0)(),{trackUsage:te}=(0,d.rS)();return t.createElement(a.k,{direction:"column",gap:6,width:"100%"},t.createElement(r.x,{position:"relative",spacing:4,width:"100%"},t.createElement(F,{background:"neutral200",height:"100%",left:"50%",position:"absolute",top:"0",width:2,zIndex:1}),t.createElement(a.k,{direction:"column",alignItems:"stretch",gap:6,zIndex:2,position:"relative",as:"ol"},G.map((z,Y)=>{const Q=z?.id??z.__temp_key__;return t.createElement(r.x,{key:`stage-${Q}`,as:"li"},t.createElement(k,{id:Q,index:Y,isOpen:!z.id,canDelete:G.length>1&&E,canReorder:G.length>1,canUpdate:Z,stagesCount:G.length}))}))),Z&&t.createElement(v,{type:"button",onClick:()=>{H((0,n.CI)({name:""})),te("willCreateStage")}},ee({id:"Settings.review-workflows.stage.add",defaultMessage:"Add new stage"})))}b.defaultProps={canDelete:!0,canUpdate:!0,stages:[]},b.propTypes={canDelete:o().bool,canUpdate:o().bool,stages:o().arrayOf(o().shape({id:o().number,__temp_key__:o().number,name:o().string.isRequired}))}},165:function(w,m,e){"use strict";e.d(m,{Y:function(){return O}});var t=e(32735),r=e(6407),a=e(49372),d=e(15335),c=e(5803),o=e(10369),y=e(19565),u=e(92802),s=e(60216),n=e.n(s),p=e(67879),h=e(15062),i=e(8471),l=e(77061);const v=(0,i.ZP)(r.ML)`
62
+ padding-left: ${({theme:L})=>L.spaces[7]};
63
+ `,x=(0,i.ZP)(a.Z)`
64
+ font-style: italic;
65
+ `;function O({canUpdate:L,contentTypes:{collectionTypes:M,singleTypes:A},currentWorkflow:g,workflows:T}){const{formatMessage:f,locale:D}=(0,p.Z)(),R=(0,h.I0)(),[W,I,U]=(0,u.U$)("name"),[$,B,K]=(0,u.U$)("contentTypes"),V=(0,y.Xe)(D,{sensitivity:"base"});return t.createElement(d.r,{background:"neutral0",hasRadius:!0,gap:4,padding:6,shadow:"tableShadow"},t.createElement(c.P,{col:6},t.createElement(o.o,{...W,id:W.name,disabled:!L,label:f({id:"Settings.review-workflows.workflow.name.label",defaultMessage:"Workflow Name"}),error:I.error??!1,onChange:S=>{R((0,l.rI)({name:S.target.value})),U.setValue(S.target.value)},required:!0})),t.createElement(c.P,{col:6},t.createElement(r.NU,{...$,customizeContent:S=>f({id:"Settings.review-workflows.workflow.contentTypes.displayValue",defaultMessage:"{count} {count, plural, one {content type} other {content types}} selected"},{count:S.length}),disabled:!L,error:B.error??!1,id:$.name,label:f({id:"Settings.review-workflows.workflow.contentTypes.label",defaultMessage:"Associated to"}),onChange:S=>{R((0,l.rI)({contentTypes:S})),K.setValue(S)},placeholder:f({id:"Settings.review-workflows.workflow.contentTypes.placeholder",defaultMessage:"Select"})},[...M.length>0?[{label:f({id:"Settings.review-workflows.workflow.contentTypes.collectionTypes.label",defaultMessage:"Collection Types"}),children:M.sort((S,k)=>V.compare(S.info.displayName,k.info.displayName)).map(S=>({label:S.info.displayName,value:S.uid}))}]:[],...A.length>0?[{label:f({id:"Settings.review-workflows.workflow.contentTypes.singleTypes.label",defaultMessage:"Single Types"}),children:A.map(S=>({label:S.info.displayName,value:S.uid}))}]:[]].map(S=>"children"in S?t.createElement(r.Ab,{key:S.label,label:S.label,values:S.children.map(k=>k.value.toString())},S.children.map(k=>{const{name:F}=T.find(b=>(g&&b.id!==g.id||!g)&&b.contentTypes.includes(k.value))??{};return t.createElement(v,{key:k.value,value:k.value},f({id:"Settings.review-workflows.workflow.contentTypes.assigned.notice",defaultMessage:"{label} {name, select, undefined {} other {<i>(assigned to <em>{name}</em> workflow)</i>}}"},{label:k.label,name:F,em:(...b)=>t.createElement(a.Z,{as:"em",fontWeight:"bold"},b),i:(...b)=>t.createElement(x,null,b)}))})):t.createElement(r.ML,{key:S.value,value:S.value},S.label)))))}const P=n().shape({uid:n().string.isRequired,info:n().shape({displayName:n().string.isRequired}).isRequired});O.defaultProps={canUpdate:!0,currentWorkflow:void 0},O.propTypes={canUpdate:n().bool,contentTypes:n().shape({collectionTypes:n().arrayOf(P).isRequired,singleTypes:n().arrayOf(P).isRequired}).isRequired,currentWorkflow:n().object,workflows:n().array.isRequired}},2121:function(w,m,e){"use strict";e.d(m,{$k:function(){return u},Ef:function(){return i},FT:function(){return p},Nj:function(){return y},Ot:function(){return o},VS:function(){return s},_X:function(){return l},gu:function(){return a},lv:function(){return n},qZ:function(){return d},sN:function(){return r},uL:function(){return h},x4:function(){return c}});var t=e(12301);const r="settings_review-workflows",a="Settings/Review_Workflows/RESET_WORKFLOW",d="Settings/Review_Workflows/SET_WORKFLOW",c="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",o="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",y="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",u="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",s="Settings/Review_Workflows/WORKFLOW_UPDATE",n={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"},p=t.W.colors.primary600,h={STAGE:"stage"},i="numberOfWorkflows",l="stagesPerWorkflow"},32329:function(w,m,e){"use strict";e.d(m,{n:function(){return a}});var t=e(19565),r=e(20108);function a(d={}){const{get:c}=(0,t.kY)(),{id:o="",...y}=d,u={populate:"stages"},{data:s,isLoading:n,status:p,refetch:h}=(0,r.useQuery)(["review-workflows","workflows",o],async()=>(await c(`/admin/review-workflows/workflows/${o}`,{params:{...u,...y}})).data);let i=[];return o&&s?.data?i=[s.data]:Array.isArray(s?.data)&&(i=s.data),{meta:s?.meta??{},workflows:i,isLoading:n,status:p,refetch:h}}},79989:function(w,m,e){"use strict";e.d(m,{E:function(){return c},I:function(){return o}});var t=e(97889),r=e(89793),a=e.n(r),d=e(2121);const c={status:"loading",serverState:{workflow:null},clientState:{currentWorkflow:{data:{name:"",contentTypes:[],stages:[]},isDirty:!1,hasDeletedServerStages:!1}}};function o(u=c,s){return(0,t.Uy)(u,n=>{const{payload:p}=s;switch(s.type){case d.qZ:{const{status:h,workflow:i}=p;n.status=h,i&&(n.serverState.workflow=i,n.clientState.currentWorkflow.data={...i,stages:i.stages.map(l=>({...l,color:l?.color??d.FT}))}),n.clientState.currentWorkflow.hasDeletedServerStages=!1;break}case d.gu:{n.clientState.currentWorkflow.data=c.clientState.currentWorkflow.data,n.serverState=c.serverState;break}case d.x4:{const{stageId:h}=p,{currentWorkflow:i}=u.clientState;n.clientState.currentWorkflow.data.stages=i.data.stages.filter(l=>(l?.id??l.__temp_key__)!==h),i.hasDeletedServerStages||(n.clientState.currentWorkflow.hasDeletedServerStages=!!(u.serverState.workflow?.stages??[]).find(l=>l.id===h));break}case d.Ot:{const{currentWorkflow:h}=u.clientState;h.data||(n.clientState.currentWorkflow.data={stages:[]});const i=y(n.clientState.currentWorkflow.data.stages);n.clientState.currentWorkflow.data.stages.push({...p,color:p?.color??d.FT,__temp_key__:i});break}case d.Nj:{const{currentWorkflow:h}=u.clientState,{stageId:i,...l}=p;n.clientState.currentWorkflow.data.stages=h.data.stages.map(v=>(v.id??v.__temp_key__)===i?{...v,...l}:v);break}case d.$k:{const{currentWorkflow:{data:{stages:h}}}=u.clientState,{newIndex:i,oldIndex:l}=p;if(i>=0&&i<h.length){const v=h[l];let x=[...h];x.splice(l,1),x.splice(i,0,v),n.clientState.currentWorkflow.data.stages=x}break}case d.VS:{n.clientState.currentWorkflow.data={...n.clientState.currentWorkflow.data,...p};break}default:break}u.clientState.currentWorkflow.data&&n.serverState.workflow?n.clientState.currentWorkflow.isDirty=!a()((0,t.Vk)(n.clientState.currentWorkflow).data,n.serverState.workflow):n.clientState.currentWorkflow.isDirty=!0})}const y=(u=[])=>{const s=u.map(n=>n.id??n.__temp_key__);return Math.max(...s,-1)+1}},68886:function(w,m,e){"use strict";e.d(m,{k:function(){return a},s:function(){return d}});var t=e(12301),r=e(2121);function a(c){if(!c)return null;const y=Object.entries(t.W.colors).filter(([,u])=>u.toUpperCase()===c.toUpperCase()).reduce((u,[s])=>(r.lv?.[s]&&(u=s),u),null);return y?{themeColorName:y,name:r.lv[y]}:null}function d(){return Object.entries(r.lv).map(([c,o])=>({hex:t.W.colors[c].toUpperCase(),name:o}))}},82920:function(w,m,e){"use strict";e.d(m,{V:function(){return d}});var t=e(3040),r=e.n(t),a=e(24346);async function d({values:c,formatMessage:o}){const y=a.Ry({contentTypes:a.IX().of(a.Z_()),name:a.Z_().max(255,o({id:"Settings.review-workflows.validation.name.max-length",defaultMessage:"Name can not be longer than 255 characters"})).required(),stages:a.IX().of(a.Ry().shape({name:a.Z_().required(o({id:"Settings.review-workflows.validation.stage.name",defaultMessage:"Name is required"})).max(255,o({id:"Settings.review-workflows.validation.stage.max-length",defaultMessage:"Name can not be longer than 255 characters"})).test("unique-name",o({id:"Settings.review-workflows.validation.stage.duplicate",defaultMessage:"Stage name must be unique"}),function(u){const{options:{context:s}}=this;return s.stages.filter(n=>n.name===u).length===1}),color:a.Z_().required(o({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 y.validate(c,{abortEarly:!1,context:c}),!0}catch(u){let s={};return u instanceof a.p8&&u.inner.forEach(n=>{r()(s,n.path,n.message)}),s}}},51355:function(w,m,e){var t=e(94318),r=e(3387),a="[object Boolean]";function d(c){return c===!0||c===!1||r(c)&&t(c)==a}w.exports=d},95919:function(w,m,e){var t=e(80022);function r(a){return t(a)&&a!=+a}w.exports=r},80022:function(w,m,e){var t=e(94318),r=e(3387),a="[object Number]";function d(c){return typeof c=="number"||r(c)&&t(c)==a}w.exports=d},59578:function(w,m,e){var t=e(41119);function r(a){return t(a).toLowerCase()}w.exports=r},83828:function(w,m,e){"use strict";e.d(m,{U:function(){return h},y:function(){return n}});var t=e(74512),r=e(32735),a=e(8471),d=e(91045),c=e(74971),o=e(49372),y=e(87933),u=e(72850);const s=({theme:i,expanded:l,variant:v,disabled:x,error:O})=>O?`1px solid ${i.colors.danger600} !important`:x?`1px solid ${i.colors.neutral150}`:l?`1px solid ${i.colors.primary600}`:v==="primary"?`1px solid ${i.colors.neutral0}`:`1px solid ${i.colors.neutral100}`,n=(0,a.ZP)(o.Z)``,p=(0,a.ZP)(u.x)`
66
+ border: ${s};
67
+
68
+ &:hover:not([aria-disabled='true']) {
69
+ border: 1px solid ${({theme:i})=>i.colors.primary600};
70
+
71
+ ${n} {
72
+ color: ${({theme:i,expanded:l})=>l?void 0:i.colors.primary700};
73
+ }
74
+
75
+ ${o.Z} {
76
+ color: ${({theme:i,expanded:l})=>l?void 0:i.colors.primary600};
77
+ }
78
+
79
+ & > ${y.k} {
80
+ background: ${({theme:i})=>i.colors.primary100};
81
+ }
82
+
83
+ [data-strapi-dropdown='true'] {
84
+ background: ${({theme:i})=>i.colors.primary200};
85
+ }
86
+ }
87
+ `,h=({children:i,disabled:l=!1,error:v,expanded:x=!1,hasErrorMessage:O=!0,id:P,onToggle:L,toggle:M,size:A="M",variant:g="primary",shadow:T})=>{const f=(0,c.M)(P),D=r.useMemo(()=>({expanded:x,onToggle:L,toggle:M,id:f,size:A,variant:g,disabled:l}),[l,x,f,L,A,M,g]);return(0,t.jsxs)(d.S.Provider,{value:D,children:[(0,t.jsx)(p,{"data-strapi-expanded":x,disabled:l,"aria-disabled":l,expanded:x,hasRadius:!0,variant:g,error:v,shadow:T,children:i}),v&&O&&(0,t.jsx)(u.x,{paddingTop:1,children:(0,t.jsx)(o.Z,{variant:"pi",textColor:"danger600",children:v})})]})}},89966:function(w,m,e){"use strict";e.d(m,{v:function(){return d}});var t=e(74512),r=e(91045),a=e(72850);const d=({children:c,...o})=>{const{expanded:y,id:u}=(0,r.A)();if(!y)return null;const s=`accordion-content-${u}`,n=`accordion-label-${u}`,p=`accordion-desc-${u}`;return(0,t.jsx)(a.x,{role:"region",id:s,"aria-labelledby":n,"aria-describedby":p,...o,children:c})}},91045:function(w,m,e){"use strict";e.d(m,{A:function(){return a},S:function(){return r}});var t=e(32735);const r=(0,t.createContext)({disabled:!1,expanded:!1,id:"",size:"M",variant:"primary"}),a=()=>(0,t.useContext)(r)},61762:function(w,m,e){"use strict";e.d(m,{B:function(){return i}});var t=e(74512),r=e(16899),a=e(8471),d=e(83828),c=e(91045);const o=({expanded:l,disabled:v,variant:x})=>{let O="neutral100";return l?O="primary100":v?O="neutral150":x==="primary"&&(O="neutral0"),O};var y=e(7563),u=e(99140),s=e(87933),n=e(49372);const p=(0,a.ZP)(y.A)`
88
+ text-align: left;
89
+
90
+ // necessary to make the ellipsis prop work on the title
91
+ > span {
92
+ max-width: 100%;
93
+ }
94
+
95
+ svg {
96
+ width: ${14/16}rem;
97
+ height: ${14/16}rem;
98
+
99
+ path {
100
+ fill: ${({theme:l,expanded:v})=>v?l.colors.primary600:l.colors.neutral500};
101
+ }
102
+ }
103
+ `,h=(0,a.ZP)(s.k)`
104
+ min-height: ${({theme:l,size:v})=>l.sizes.accordions[v]};
105
+ border-radius: ${({theme:l,expanded:v})=>v?`${l.borderRadius} ${l.borderRadius} 0 0`:l.borderRadius};
106
+
107
+ &:hover {
108
+ svg {
109
+ path {
110
+ fill: ${({theme:l})=>l.colors.primary600};
111
+ }
112
+ }
113
+ }
114
+ `,i=({title:l,description:v,as:x="span",togglePosition:O="right",action:P,...L})=>{const{onToggle:M,toggle:A,expanded:g,id:T,size:f,variant:D,disabled:R}=(0,c.A)(),W=`accordion-content-${T}`,I=`accordion-label-${T}`,U=`accordion-desc-${T}`,$=f==="M"?6:4,B=f==="M"?$:$-2,K=o({expanded:g,disabled:R,variant:D}),V={as:x,fontWeight:f==="S"?"bold":void 0,id:I,textColor:g?"primary600":"neutral700",ellipsis:!0,variant:f==="M"?"delta":void 0},S=g?"primary600":"neutral600",k=g?"primary200":"neutral200",F=f==="M"?`${32/16}rem`:`${24/16}rem`,b=()=>{R||(A&&!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'),A()):M&&M())},E=(0,t.jsx)(s.k,{justifyContent:"center",borderRadius:"50%",height:F,width:F,transform:g?"rotate(180deg)":void 0,"data-strapi-dropdown":!0,"aria-hidden":!0,as:"span",background:k,cursor:R?"not-allowed":"pointer",onClick:b,shrink:0,children:(0,t.jsx)(u.J,{as:r.Z,width:f==="M"?`${11/16}rem`:`${8/16}rem`,color:g?"primary600":"neutral600"})});return(0,t.jsx)(h,{paddingBottom:B,paddingLeft:$,paddingRight:$,paddingTop:B,background:K,expanded:g,size:f,justifyContent:"space-between",cursor:R?"not-allowed":"",children:(0,t.jsxs)(s.k,{gap:3,flex:1,maxWidth:"100%",children:[O==="left"&&E,(0,t.jsx)(p,{onClick:b,"aria-disabled":R,"aria-expanded":g,"aria-controls":W,"aria-labelledby":I,"data-strapi-accordion-toggle":!0,expanded:g,type:"button",flex:1,minWidth:0,...L,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.y,{...V,children:l}),v&&(0,t.jsx)(n.Z,{as:"p",id:U,textColor:S,children:v})]})}),O==="right"&&(0,t.jsxs)(s.k,{gap:3,children:[E,P]}),O==="left"&&P]})})}},29439:function(w,m,e){"use strict";e.d(m,{Z:function(){return a}});var t=e(74512);const r=d=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...d,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"})}),a=r},47081:function(w,m,e){"use strict";e.d(m,{Z:function(){return a}});var t=e(74512);const r=d=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...d,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"})]}),a=r},86308:function(w,m,e){"use strict";e.d(m,{Z:function(){return a}});var t=e(74512);const r=d=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...d,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"})]}),a=r}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[7464],{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),m=(0,n.lm)(),{get:E}=(0,n.kY)();return(0,s.useEffect)(()=>{(async()=>{try{if(!i){e({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:u}=await E((0,c.IF)("providers"));e({type:"GET_DATA_SUCCEEDED",data:u})}catch(u){console.error(u),e({type:"GET_DATA_ERROR"}),m({type:"warning",message:{id:"notification.error"}})}})()},[E,i,m]),a},d=t(36866),h=t.n(d),f=t(67879),R=t(53038),g=t(53104);const S="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:m}=(0,g.q)();const E=(0,n.lm)(),{pathname:L}=(0,R.TH)(),{enforcementUserCount:u,permittedSeats:I,licenseLimitStatus:o,isHostedOnStrapiCloud:D}=a;(0,s.useEffect)(()=>{if(e||m)return;const N=!h()(I)&&!window.sessionStorage.getItem(`${S}-${L}`)&&(o==="AT_LIMIT"||o==="OVER_LIMIT");let p;o==="OVER_LIMIT"?p="warning":o==="AT_LIMIT"&&(p="softWarning"),N&&E({type:p,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:D?y:M,label:i({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:D})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${S}-${L}`,!0)}})},[E,a,L,i,m,I,o,u,D,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:O}=(0,n.kY)(),{data:A,isError:P,isLoading:v}=(0,c.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:f}}=await O("/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:P,isLoading:v}}},37363:function(C,r,t){t.r(r),t.d(r,{HomePageEE:function(){return l}});var s=t(32735),n=t(83555),c=t(50337);function l(){return(0,c.aY)(),s.createElement(n.HomePageCE,null)}}}]);
@@ -0,0 +1,26 @@
1
+ "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[8276],{50337:function(I,v,e){e.d(v,{pl:function(){return y},aY:function(){return r},q5:function(){return s.q}});var t=e(32735),f=e(19565),p=e(86209),u=e(97889);const l={data:[],isLoading:!0};var T=(d,E)=>(0,u.ZP)(d,a=>{switch(E.type){case"GET_DATA_SUCCEEDED":{a.data=E.data,a.isLoading=!1;break}case"GET_DATA_ERROR":{a.isLoading=!1;break}default:return a}}),y=({ssoEnabled:d})=>{const[E,a]=(0,t.useReducer)(T,l),o=(0,f.lm)(),{get:P}=(0,f.kY)();return(0,t.useEffect)(()=>{(async()=>{try{if(!d){a({type:"GET_DATA_SUCCEEDED",data:[]});return}const{data:O}=await P((0,p.IF)("providers"));a({type:"GET_DATA_SUCCEEDED",data:O})}catch(O){console.error(O),a({type:"GET_DATA_ERROR"}),o({type:"warning",message:{id:"notification.error"}})}})()},[P,d,o]),E},g=e(36866),h=e.n(g),m=e(67879),C=e(53038),s=e(53104);const L="strapi-notification-seat-limit",n="https://cloud.strapi.io/profile/billing",A="https://strapi.io/billing/request-seats";var r=()=>{const{formatMessage:d}=(0,m.Z)();let{license:E,isError:a,isLoading:o}=(0,s.q)();const P=(0,f.lm)(),{pathname:D}=(0,C.TH)(),{enforcementUserCount:O,permittedSeats:S,licenseLimitStatus:M,isHostedOnStrapiCloud:U}=E;(0,t.useEffect)(()=>{if(a||o)return;const Z=!h()(S)&&!window.sessionStorage.getItem(`${L}-${D}`)&&(M==="AT_LIMIT"||M==="OVER_LIMIT");let B;M==="OVER_LIMIT"?B="warning":M==="AT_LIMIT"&&(B="softWarning"),Z&&P({type:B,message:d({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:d({id:"notification.ee.warning.at-seat-limit.title",defaultMessage:"{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})"},{licenseLimitStatus:M,enforcementUserCount:O,permittedSeats:S}),link:{url:U?n:A,label:d({id:"notification.ee.warning.seat-limit.link",defaultMessage:"{isHostedOnStrapiCloud, select, true {ADD SEATS} other {CONTACT SALES}}"},{isHostedOnStrapiCloud:U})},blockTransition:!0,onClose(){window.sessionStorage.setItem(`${L}-${D}`,!0)}})},[P,E,D,d,o,S,M,O,U,a])}},53104:function(I,v,e){e.d(v,{q:function(){return u}});var t=e(32735),f=e(19565),p=e(20108);function u({enabled:l}={enabled:!0}){const{get:c}=(0,f.kY)(),{data:T,isError:i,isLoading:y}=(0,p.useQuery)(["ee","license-limit-info"],async()=>{const{data:{data:m}}=await c("/admin/license-limit-information");return m},{enabled:l}),g=T??{},h=t.useCallback(m=>(g?.features??[]).find(s=>s.name===m)?.options??{},[g?.features]);return{license:g,getFeature:h,isError:i,isLoading:y}}},68726:function(I,v,e){var t=e(32735),f=e(87933),p=e(63919),u=e(49372),l=e(15335),c=e(5803),T=e(60216),i=e.n(T),y=e(67879),g=e(14911),h=e(8471);const m=h.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
+ `,C=(0,h.ZP)(f.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
+ `,s=({provider:n})=>t.createElement(p.u,{label:n.displayName},t.createElement(m,{href:`${window.strapi.backendURL}/admin/connect/${n.uid}`},n.icon?t.createElement("img",{src:n.icon,"aria-hidden":!0,alt:"",height:"32px"}):t.createElement(u.Z,null,n.displayName)));s.propTypes={provider:i().shape({icon:i().string,displayName:i().string.isRequired,uid:i().string.isRequired}).isRequired};const L=({providers:n,displayAllProviders:A})=>{const{formatMessage:R}=(0,y.Z)();return A?t.createElement(l.r,{gap:4},n.map(r=>t.createElement(c.P,{key:r.uid,col:4},t.createElement(s,{provider:r})))):n.length>2&&!A?t.createElement(l.r,{gap:4},n.slice(0,2).map(r=>t.createElement(c.P,{key:r.uid,col:4},t.createElement(s,{provider:r}))),t.createElement(c.P,{col:4},t.createElement(p.u,{label:R({id:"global.see-more"})},t.createElement(m,{as:g.rU,to:"/auth/providers"},t.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):t.createElement(C,{justifyContent:"center"},n.map(r=>t.createElement(s,{key:r.uid,provider:r})))};L.defaultProps={displayAllProviders:!0},L.propTypes={providers:i().arrayOf(i().object).isRequired,displayAllProviders:i().bool},v.Z=L},18276:function(I,v,e){e.r(v),e.d(v,{FORMS:function(){return d}});var t=e(32735),f=e(9026),p=e(27649),u=e(72850),l=e(49372),c=e(87933),T=e(23866),i=e(41415),y=e(19565),g=e(67879),h=e(53038),m=e(8471),C=e(73678),s=e(11060),L=e(50337),n=e(68726);const A=(0,m.ZP)(f.i)`
25
+ flex: 1;
26
+ `;var r=()=>{const E=window.strapi.features.isEnabled(window.strapi.features.SSO),{push:a}=(0,h.k6)(),{formatMessage:o}=(0,g.Z)(),{isLoading:P,data:D}=(0,L.pl)({ssoEnabled:E}),O=()=>{a("/auth/login")};return!E||!P&&D.length===0?t.createElement(h.l_,{to:"/auth/login"}):t.createElement(s.ZP,null,t.createElement(p.o,null,t.createElement(s.bU,null,t.createElement(s.sg,null,t.createElement(C.Z,null),t.createElement(u.x,{paddingTop:6,paddingBottom:1},t.createElement(l.Z,{as:"h1",variant:"alpha"},o({id:"Auth.form.welcome.title"}))),t.createElement(u.x,{paddingBottom:7},t.createElement(l.Z,{variant:"epsilon",textColor:"neutral600"},o({id:"Auth.login.sso.subtitle"})))),t.createElement(c.k,{direction:"column",alignItems:"stretch",gap:7},P?t.createElement(c.k,{justifyContent:"center"},t.createElement(T.a,null,o({id:"Auth.login.sso.loading"}))):t.createElement(n.Z,{providers:D}),t.createElement(c.k,null,t.createElement(A,null),t.createElement(u.x,{paddingLeft:3,paddingRight:3},t.createElement(l.Z,{variant:"sigma",textColor:"neutral600"},o({id:"or"}))),t.createElement(A,null)),t.createElement(i.z,{fullWidth:!0,size:"L",onClick:O},o({id:"Auth.form.button.login.strapi"})))),t.createElement(c.k,{justifyContent:"center"},t.createElement(u.x,{paddingTop:4},t.createElement(y.rU,{to:"/auth/forgot-password"},t.createElement(l.Z,{variant:"pi"},o({id:"Auth.link.forgot-password"})))))))};const d={providers:{Component:r,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""}}}}]);