@strapi/admin 4.10.4 → 4.10.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 (28) hide show
  1. package/build/{3816.2b58bc1a.chunk.js → 3816.1a828046.chunk.js} +19 -22
  2. package/build/{5542.5328b662.chunk.js → 5542.002522eb.chunk.js} +13 -13
  3. package/build/617.2c8c7183.chunk.js +155 -0
  4. package/build/{Admin-authenticatedApp.dbb99d34.chunk.js → Admin-authenticatedApp.6b74c5fd.chunk.js} +1 -1
  5. package/build/audit-logs-settings-page.7ec976e1.chunk.js +129 -0
  6. package/build/{content-manager.a837bfcd.chunk.js → content-manager.a97db8a1.chunk.js} +1 -1
  7. package/build/{email-settings-page.5bc22e5a.chunk.js → email-settings-page.dba83275.chunk.js} +4 -4
  8. package/build/i18n-settings-page.e34ec940.chunk.js +114 -0
  9. package/build/index.html +1 -1
  10. package/build/main.57970a57.js +2674 -0
  11. package/build/{runtime~main.a096f3d0.js → runtime~main.df78e1c7.js} +2 -2
  12. package/build/upload-settings.63d99bf5.chunk.js +14 -0
  13. package/build/upload.bf183c0c.chunk.js +34 -0
  14. package/build/{users-advanced-settings-page.dd2a4954.chunk.js → users-advanced-settings-page.4f49ca57.chunk.js} +3 -3
  15. package/build/users-email-settings-page.756aa7ab.chunk.js +24 -0
  16. package/build/users-providers-settings-page.ff9e4c0a.chunk.js +29 -0
  17. package/build/webhook-edit-page.550be445.chunk.js +128 -0
  18. package/ee/admin/content-manager/components/DynamicTable/CellContent/ReviewWorkflowsStage/getTableColumn.js +6 -1
  19. package/package.json +11 -11
  20. package/build/617.ce23dea8.chunk.js +0 -155
  21. package/build/audit-logs-settings-page.48b921f9.chunk.js +0 -129
  22. package/build/i18n-settings-page.1581894e.chunk.js +0 -114
  23. package/build/main.31bdf27e.js +0 -2679
  24. package/build/upload-settings.4d962053.chunk.js +0 -14
  25. package/build/upload.4dcd513f.chunk.js +0 -34
  26. package/build/users-email-settings-page.510648ab.chunk.js +0 -24
  27. package/build/users-providers-settings-page.0ee7d54f.chunk.js +0 -29
  28. package/build/webhook-edit-page.36c9f20d.chunk.js +0 -128
@@ -1,11 +1,11 @@
1
- "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1495],{97744:function(b,m,t){t.r(m),t.d(m,{default:function(){return J}});var e=t(32735),c=t(67879),n=t(24989),f=t(94638),h=t(27649),p=t(17e3),E=t(87933),g=t(72850),v=t(49372),x=t(15335),M=t(5803),y=t(10369),L=t(41415),S=t(7961),a=t(60216),l=t.n(a),d=t(8471),o=t(68465),u=t(84967),i=t(85684);const A=d.ZP.a`
1
+ "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1495],{97744:function(b,m,t){t.r(m),t.d(m,{default:function(){return J}});var e=t(32735),d=t(67879),n=t(24989),p=t(94638),f=t(27649),v=t(17e3),E=t(87933),g=t(72850),h=t(49372),x=t(15335),M=t(5803),y=t(10369),P=t(41415),S=t(7961),a=t(60216),l=t.n(a),c=t(8471),o=t(68465),u=t(84967),i=t(85684);const A=c.ZP.a`
2
2
  color: ${({theme:r})=>r.colors.primary600};
3
- `,R=({config:r})=>{const{formatMessage:s}=(0,c.Z)();return e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:4},e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:1},e.createElement(v.Z,{variant:"delta",as:"h2"},s({id:(0,i.Z)("Settings.email.plugin.title.config"),defaultMessage:"Configuration"})),e.createElement(v.Z,null,s({id:(0,i.Z)("Settings.email.plugin.text.configuration"),defaultMessage:"The plugin is configured through the {file} file, checkout this {link} for the documentation."},{file:"./config/plugins.js",link:e.createElement(A,{href:"https://docs.strapi.io/developer-docs/latest/plugins/email.html",target:"_blank",rel:"noopener noreferrer"},s({id:(0,i.Z)("link"),defaultMessage:"Link"}))}))),e.createElement(x.r,{gap:5},e.createElement(M.P,{col:6,s:12},e.createElement(y.o,{name:"shipper-email",label:s({id:(0,i.Z)("Settings.email.plugin.label.defaultFrom"),defaultMessage:"Default sender email"}),placeholder:s({id:(0,i.Z)("Settings.email.plugin.placeholder.defaultFrom"),defaultMessage:"ex: Strapi No-Reply '<'no-reply@strapi.io'>'"}),disabled:!0,onChange:()=>{},value:r.settings.defaultFrom})),e.createElement(M.P,{col:6,s:12},e.createElement(y.o,{name:"response-email",label:s({id:(0,i.Z)("Settings.email.plugin.label.defaultReplyTo"),defaultMessage:"Default response email"}),placeholder:s({id:(0,i.Z)("Settings.email.plugin.placeholder.defaultReplyTo"),defaultMessage:"ex: Strapi '<'example@strapi.io'>'"}),disabled:!0,onChange:()=>{},value:r.settings.defaultReplyTo})),e.createElement(M.P,{col:6,s:12},e.createElement(o.P,{name:"email-provider",label:s({id:(0,i.Z)("Settings.email.plugin.label.provider"),defaultMessage:"Email provider"}),disabled:!0,onChange:()=>{},value:r.provider},e.createElement(u.W,{value:r.provider},r.provider)))))};R.propTypes={config:l().shape({provider:l().string,settings:l().shape({defaultFrom:l().string,defaultReplyTo:l().string})}).isRequired};var B=R,j=t(24346),D=j.Ry().shape({email:j.Z_().email(n.I0.email).required(n.I0.required)}),z=t(59990);const V=async()=>{const{get:r}=(0,n.tg)(),{data:s}=await r("/email/settings");return s.config},N=async r=>{const{post:s}=(0,n.tg)();await s("/email/test",r)};var $=t(82055),I=()=>{const{formatMessage:r}=(0,c.Z)();return e.createElement(e.Fragment,null,e.createElement(n.SL,{name:r({id:(0,i.Z)("Settings.email.plugin.title"),defaultMessage:"Configuration"})}),e.createElement($.T,{id:"title",title:r({id:(0,i.Z)("Settings.email.plugin.title"),defaultMessage:"Configuration"}),subtitle:r({id:(0,i.Z)("Settings.email.plugin.subTitle"),defaultMessage:"Test the settings for the Email plugin"})}))};const G=()=>e.createElement(n.O4,{permissions:z.Z.settings},e.createElement(w,null)),w=()=>{const r=(0,n.lm)(),{formatMessage:s}=(0,c.Z)(),{lockApp:Q,unlockApp:X}=(0,n.o1)(),{notifyStatus:O}=(0,f.G)();(0,n.go)();const[P,Y]=(0,e.useState)({}),[k,F]=(0,e.useState)(!1),[H,W]=(0,e.useState)(!1),[T,K]=(0,e.useState)(""),[q,U]=(0,e.useState)(!1),[_,ee]=(0,e.useState)({provider:"",settings:{defaultFrom:"",defaultReplyTo:"",testAddress:""}});(0,e.useEffect)(()=>{F(!0),V().then(Z=>{O(s({id:(0,i.Z)("Settings.email.plugin.notification.data.loaded"),defaultMessage:"Email settings data has been loaded"})),ee(Z);const C=Z?.settings?.testAddress;C&&K(C)}).catch(()=>r({type:"warning",message:s({id:(0,i.Z)("Settings.email.plugin.notification.config.error"),defaultMessage:"Failed to retrieve the email config"})})).finally(()=>F(!1))},[s,r,O]),(0,e.useEffect)(()=>{P.email&&document.querySelector("#test-address-input").focus()},[P]),(0,e.useEffect)(()=>{D.validate({email:T},{abortEarly:!1}).then(()=>U(!0)).catch(()=>U(!1))},[T]);const te=Z=>{K(()=>Z.target.value)},ne=async Z=>{Z.preventDefault();try{await D.validate({email:T},{abortEarly:!1}),W(!0),Q(),N({to:T}).then(()=>{r({type:"success",message:s({id:(0,i.Z)("Settings.email.plugin.notification.test.success"),defaultMessage:"Email test succeeded, check the {to} mailbox"},{to:T})})}).catch(()=>{r({type:"warning",message:s({id:(0,i.Z)("Settings.email.plugin.notification.test.error"),defaultMessage:"Failed to send a test mail to {to}"},{to:T})})}).finally(()=>{W(!1),X()})}catch(C){Y((0,n.CJ)(C))}};return k?e.createElement(h.o,{labelledBy:"title","aria-busy":"true"},e.createElement(I,null),e.createElement(p.D,null,e.createElement(n.dO,null))):e.createElement(h.o,{labelledBy:"title","aria-busy":H},e.createElement(I,null),e.createElement(p.D,null,e.createElement("form",{onSubmit:ne},e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:7},e.createElement(g.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},e.createElement(B,{config:_})),e.createElement(g.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:4},e.createElement(v.Z,{variant:"delta",as:"h2"},s({id:(0,i.Z)("Settings.email.plugin.title.test"),defaultMessage:"Test email delivery"})),e.createElement(x.r,{gap:5,alignItems:"end"},e.createElement(M.P,{col:6,s:12},e.createElement(y.o,{id:"test-address-input",name:"test-address",onChange:te,label:s({id:(0,i.Z)("Settings.email.plugin.label.testAddress"),defaultMessage:"Recipient email"}),value:T,error:P.email?.id&&s({id:(0,i.Z)(`${P.email?.id}`),defaultMessage:"This is an invalid email"}),placeholder:s({id:(0,i.Z)("Settings.email.plugin.placeholder.testAddress"),defaultMessage:"ex: developer@example.com"})})),e.createElement(M.P,{col:7,s:12},e.createElement(L.z,{loading:H,disabled:!q,type:"submit",startIcon:e.createElement(S.Z,null)},s({id:(0,i.Z)("Settings.email.plugin.button.test-email"),defaultMessage:"Send test email"}))))))))))};var J=G},17e3:function(b,m,t){t.d(m,{D:function(){return h}});var e=t(74512),c=t(32735),n=t(60216),f=t(72850);const h=({children:p})=>(0,e.jsx)(f.x,{paddingLeft:10,paddingRight:10,children:p});h.propTypes={children:n.node.isRequired}},82055:function(b,m,t){t.d(m,{T:function(){return y}});var e=t(74512),c=t(32735),n=t(60216),f=t(8471);const h=a=>{const l=(0,c.useRef)(null),[d,o]=(0,c.useState)(!0),u=([i])=>{o(i.isIntersecting)};return(0,c.useEffect)(()=>{const i=l.current,A=new IntersectionObserver(u,a);return i&&A.observe(l.current),()=>{i&&A.disconnect()}},[l,a]),[l,d]};var p=t(63060);const E=(a,l)=>{const d=(0,p.W)(l);(0,c.useLayoutEffect)(()=>{const o=new ResizeObserver(d);return Array.isArray(a)?a.forEach(u=>{u.current&&o.observe(u.current)}):a.current&&o.observe(a.current),()=>{o.disconnect()}},[a,d])};var g=t(72850),v=t(87933),x=t(49372);const M=()=>{const a=(0,c.useRef)(null),[l,d]=(0,c.useState)(null),[o,u]=h({root:null,rootMargin:"0px",threshold:0});return E(o,()=>{o.current&&d(o.current.getBoundingClientRect())}),(0,c.useEffect)(()=>{a.current&&d(a.current.getBoundingClientRect())},[a]),{containerRef:o,isVisible:u,baseHeaderLayoutRef:a,headerSize:l}},y=a=>{const{containerRef:l,isVisible:d,baseHeaderLayoutRef:o,headerSize:u}=M();return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:u?.height},ref:l,children:d&&(0,e.jsx)(S,{ref:o,...a})}),!d&&(0,e.jsx)(S,{...a,sticky:!0,width:u?.width})]})};y.displayName="HeaderLayout";const L=(0,f.ZP)(g.x)`
3
+ `,R=({config:r})=>{const{formatMessage:s}=(0,d.Z)();return e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:4},e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:1},e.createElement(h.Z,{variant:"delta",as:"h2"},s({id:(0,i.Z)("Settings.email.plugin.title.config"),defaultMessage:"Configuration"})),e.createElement(h.Z,null,s({id:(0,i.Z)("Settings.email.plugin.text.configuration"),defaultMessage:"The plugin is configured through the {file} file, checkout this {link} for the documentation."},{file:"./config/plugins.js",link:e.createElement(A,{href:"https://docs.strapi.io/developer-docs/latest/plugins/email.html",target:"_blank",rel:"noopener noreferrer"},s({id:(0,i.Z)("link"),defaultMessage:"Link"}))}))),e.createElement(x.r,{gap:5},e.createElement(M.P,{col:6,s:12},e.createElement(y.o,{name:"shipper-email",label:s({id:(0,i.Z)("Settings.email.plugin.label.defaultFrom"),defaultMessage:"Default sender email"}),placeholder:s({id:(0,i.Z)("Settings.email.plugin.placeholder.defaultFrom"),defaultMessage:"ex: Strapi No-Reply '<'no-reply@strapi.io'>'"}),disabled:!0,onChange:()=>{},value:r.settings.defaultFrom})),e.createElement(M.P,{col:6,s:12},e.createElement(y.o,{name:"response-email",label:s({id:(0,i.Z)("Settings.email.plugin.label.defaultReplyTo"),defaultMessage:"Default response email"}),placeholder:s({id:(0,i.Z)("Settings.email.plugin.placeholder.defaultReplyTo"),defaultMessage:"ex: Strapi '<'example@strapi.io'>'"}),disabled:!0,onChange:()=>{},value:r.settings.defaultReplyTo})),e.createElement(M.P,{col:6,s:12},e.createElement(o.P,{name:"email-provider",label:s({id:(0,i.Z)("Settings.email.plugin.label.provider"),defaultMessage:"Email provider"}),disabled:!0,onChange:()=>{},value:r.provider},e.createElement(u.W,{value:r.provider},r.provider)))))};R.propTypes={config:l().shape({provider:l().string,settings:l().shape({defaultFrom:l().string,defaultReplyTo:l().string})}).isRequired};var B=R,j=t(24346),D=j.Ry().shape({email:j.Z_().email(n.I0.email).required(n.I0.required)}),z=t(59990);const V=async()=>{const{get:r}=(0,n.tg)(),{data:s}=await r("/email/settings");return s.config},N=async r=>{const{post:s}=(0,n.tg)();await s("/email/test",r)};var $=t(82055),I=()=>{const{formatMessage:r}=(0,d.Z)();return e.createElement(e.Fragment,null,e.createElement(n.SL,{name:r({id:(0,i.Z)("Settings.email.plugin.title"),defaultMessage:"Configuration"})}),e.createElement($.T,{id:"title",title:r({id:(0,i.Z)("Settings.email.plugin.title"),defaultMessage:"Configuration"}),subtitle:r({id:(0,i.Z)("Settings.email.plugin.subTitle"),defaultMessage:"Test the settings for the Email plugin"})}))};const w=()=>e.createElement(n.O4,{permissions:z.Z.settings},e.createElement(G,null)),G=()=>{const r=(0,n.lm)(),{formatMessage:s}=(0,d.Z)(),{lockApp:k,unlockApp:Q}=(0,n.o1)(),{notifyStatus:O}=(0,p.G)();(0,n.go)();const[C,X]=(0,e.useState)({}),[Y,F]=(0,e.useState)(!1),[H,W]=(0,e.useState)(!1),[T,K]=(0,e.useState)(""),[q,U]=(0,e.useState)(!1),[_,ee]=(0,e.useState)({provider:"",settings:{defaultFrom:"",defaultReplyTo:"",testAddress:""}});(0,e.useEffect)(()=>{F(!0),V().then(Z=>{O(s({id:(0,i.Z)("Settings.email.plugin.notification.data.loaded"),defaultMessage:"Email settings data has been loaded"})),ee(Z);const L=Z?.settings?.testAddress;L&&K(L)}).catch(()=>r({type:"warning",message:s({id:(0,i.Z)("Settings.email.plugin.notification.config.error"),defaultMessage:"Failed to retrieve the email config"})})).finally(()=>F(!1))},[s,r,O]),(0,e.useEffect)(()=>{C.email&&document.querySelector("#test-address-input").focus()},[C]),(0,e.useEffect)(()=>{D.validate({email:T},{abortEarly:!1}).then(()=>U(!0)).catch(()=>U(!1))},[T]);const te=Z=>{K(()=>Z.target.value)},ne=async Z=>{Z.preventDefault();try{await D.validate({email:T},{abortEarly:!1}),W(!0),k(),N({to:T}).then(()=>{r({type:"success",message:s({id:(0,i.Z)("Settings.email.plugin.notification.test.success"),defaultMessage:"Email test succeeded, check the {to} mailbox"},{to:T})})}).catch(()=>{r({type:"warning",message:s({id:(0,i.Z)("Settings.email.plugin.notification.test.error"),defaultMessage:"Failed to send a test mail to {to}"},{to:T})})}).finally(()=>{W(!1),Q()})}catch(L){X((0,n.CJ)(L))}};return Y?e.createElement(f.o,{labelledBy:"title","aria-busy":"true"},e.createElement(I,null),e.createElement(v.D,null,e.createElement(n.dO,null))):e.createElement(f.o,{labelledBy:"title","aria-busy":H},e.createElement(I,null),e.createElement(v.D,null,e.createElement("form",{onSubmit:ne},e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:7},e.createElement(g.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},e.createElement(B,{config:_})),e.createElement(g.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},e.createElement(E.k,{direction:"column",alignItems:"stretch",gap:4},e.createElement(h.Z,{variant:"delta",as:"h2"},s({id:(0,i.Z)("Settings.email.plugin.title.test"),defaultMessage:"Test email delivery"})),e.createElement(x.r,{gap:5,alignItems:"end"},e.createElement(M.P,{col:6,s:12},e.createElement(y.o,{id:"test-address-input",name:"test-address",onChange:te,label:s({id:(0,i.Z)("Settings.email.plugin.label.testAddress"),defaultMessage:"Recipient email"}),value:T,error:C.email?.id&&s({id:(0,i.Z)(`${C.email?.id}`),defaultMessage:"This is an invalid email"}),placeholder:s({id:(0,i.Z)("Settings.email.plugin.placeholder.testAddress"),defaultMessage:"ex: developer@example.com"})})),e.createElement(M.P,{col:7,s:12},e.createElement(P.z,{loading:H,disabled:!q,type:"submit",startIcon:e.createElement(S.Z,null)},s({id:(0,i.Z)("Settings.email.plugin.button.test-email"),defaultMessage:"Send test email"}))))))))))};var J=w},17e3:function(b,m,t){t.d(m,{D:function(){return f}});var e=t(74512),d=t(32735),n=t(60216),p=t(72850);const f=({children:v})=>(0,e.jsx)(p.x,{paddingLeft:10,paddingRight:10,children:v});f.propTypes={children:n.node.isRequired}},82055:function(b,m,t){t.d(m,{T:function(){return y}});var e=t(74512),d=t(32735),n=t(60216),p=t(8471);const f=a=>{const l=(0,d.useRef)(null),[c,o]=(0,d.useState)(!0),u=([i])=>{o(i.isIntersecting)};return(0,d.useEffect)(()=>{const i=l.current,A=new IntersectionObserver(u,a);return i&&A.observe(l.current),()=>{i&&A.disconnect()}},[l,a]),[l,c]};var v=t(63060);const E=(a,l)=>{const c=(0,v.W)(l);(0,d.useLayoutEffect)(()=>{const o=new ResizeObserver(c);return Array.isArray(a)?a.forEach(u=>{u.current&&o.observe(u.current)}):a.current&&o.observe(a.current),()=>{o.disconnect()}},[a,c])};var g=t(72850),h=t(87933),x=t(49372);const M=()=>{const a=(0,d.useRef)(null),[l,c]=(0,d.useState)(null),[o,u]=f({root:null,rootMargin:"0px",threshold:0});return E(o,()=>{o.current&&c(o.current.getBoundingClientRect())}),(0,d.useEffect)(()=>{a.current&&c(a.current.getBoundingClientRect())},[a]),{containerRef:o,isVisible:u,baseHeaderLayoutRef:a,headerSize:l}},y=a=>{const{containerRef:l,isVisible:c,baseHeaderLayoutRef:o,headerSize:u}=M();return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:u?.height},ref:l,children:c&&(0,e.jsx)(S,{ref:o,...a})}),!c&&(0,e.jsx)(S,{...a,sticky:!0,width:u?.width})]})};y.displayName="HeaderLayout";const P=(0,p.ZP)(g.x)`
4
4
  width: ${a=>a.width}px;
5
5
  z-index: ${({theme:a})=>a.zIndices[1]};
6
- `,S=c.forwardRef(({navigationAction:a,primaryAction:l,secondaryAction:d,subtitle:o,title:u,sticky:i,width:A,...R},B)=>{const j=typeof o=="string";return i?(0,e.jsx)(L,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:A,"data-strapi-header-sticky":!0,children:(0,e.jsxs)(v.k,{justifyContent:"space-between",children:[(0,e.jsxs)(v.k,{children:[a&&(0,e.jsx)(g.x,{paddingRight:3,children:a}),(0,e.jsxs)(g.x,{children:[(0,e.jsx)(x.Z,{variant:"beta",as:"h1",...R,children:u}),j?(0,e.jsx)(x.Z,{variant:"pi",textColor:"neutral600",children:o}):o]}),d?(0,e.jsx)(g.x,{paddingLeft:4,children:d}):null]}),(0,e.jsx)(v.k,{children:l?(0,e.jsx)(g.x,{paddingLeft:2,children:l}):void 0})]})}):(0,e.jsxs)(g.x,{ref:B,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:a?6:8,background:"neutral100","data-strapi-header":!0,children:[a?(0,e.jsx)(g.x,{paddingBottom:2,children:a}):null,(0,e.jsxs)(v.k,{justifyContent:"space-between",children:[(0,e.jsxs)(v.k,{minWidth:0,children:[(0,e.jsx)(x.Z,{as:"h1",variant:"alpha",...R,children:u}),d?(0,e.jsx)(g.x,{paddingLeft:4,children:d}):null]}),l]}),j?(0,e.jsx)(x.Z,{variant:"epsilon",textColor:"neutral600",as:"p",children:o}):o]})});S.displayName="BaseHeaderLayout",S.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0,sticky:!1,width:void 0},S.propTypes={navigationAction:n.node,primaryAction:n.node,secondaryAction:n.node,sticky:n.bool,subtitle:n.oneOfType([n.string,n.node]),title:n.string.isRequired,width:n.number},y.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0},y.propTypes={navigationAction:n.node,primaryAction:n.node,secondaryAction:n.node,subtitle:n.oneOfType([n.string,n.node]),title:n.string.isRequired}},27649:function(b,m,t){t.d(m,{o:function(){return p}});var e=t(74512),c=t(32735),n=t(60216),f=t(8471);const h=f.ZP.main`
6
+ `,S=d.forwardRef(({navigationAction:a,primaryAction:l,secondaryAction:c,subtitle:o,title:u,sticky:i,width:A,...R},B)=>{const j=typeof o=="string";return i?(0,e.jsx)(P,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:A,"data-strapi-header-sticky":!0,children:(0,e.jsxs)(h.k,{justifyContent:"space-between",children:[(0,e.jsxs)(h.k,{children:[a&&(0,e.jsx)(g.x,{paddingRight:3,children:a}),(0,e.jsxs)(g.x,{children:[(0,e.jsx)(x.Z,{variant:"beta",as:"h1",...R,children:u}),j?(0,e.jsx)(x.Z,{variant:"pi",textColor:"neutral600",children:o}):o]}),c?(0,e.jsx)(g.x,{paddingLeft:4,children:c}):null]}),(0,e.jsx)(h.k,{children:l?(0,e.jsx)(g.x,{paddingLeft:2,children:l}):void 0})]})}):(0,e.jsxs)(g.x,{ref:B,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:a?6:8,background:"neutral100","data-strapi-header":!0,children:[a?(0,e.jsx)(g.x,{paddingBottom:2,children:a}):null,(0,e.jsxs)(h.k,{justifyContent:"space-between",children:[(0,e.jsxs)(h.k,{minWidth:0,children:[(0,e.jsx)(x.Z,{as:"h1",variant:"alpha",...R,children:u}),c?(0,e.jsx)(g.x,{paddingLeft:4,children:c}):null]}),l]}),j?(0,e.jsx)(x.Z,{variant:"epsilon",textColor:"neutral600",as:"p",children:o}):o]})});S.displayName="BaseHeaderLayout",S.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0,sticky:!1,width:void 0},S.propTypes={navigationAction:n.node,primaryAction:n.node,secondaryAction:n.node,sticky:n.bool,subtitle:n.oneOfType([n.string,n.node]),title:n.string.isRequired,width:n.number},y.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0},y.propTypes={navigationAction:n.node,primaryAction:n.node,secondaryAction:n.node,subtitle:n.oneOfType([n.string,n.node]),title:n.string.isRequired}},27649:function(b,m,t){t.d(m,{o:function(){return f}});var e=t(74512),d=t(8471),n=t(72850);const p=(0,d.ZP)(n.x)`
7
7
  // To prevent global outline on focus visible to force an outline when Main is focused
8
8
  &:focus-visible {
9
9
  outline: none;
10
10
  }
11
- `,p=({labelledBy:E,...g})=>(0,e.jsx)(h,{"aria-labelledby":E||"main-content-title",id:"main-content",tabIndex:-1,...g});p.defaultProps={labelledBy:void 0},p.propTypes={labelledBy:n.string}},7961:function(b,m,t){t.d(m,{Z:function(){return n}});var e=t(74512);const c=f=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...f,children:[(0,e.jsx)("path",{fill:"#32324D",d:"M0 2.8A.8.8 0 0 1 .8 2h22.4a.8.8 0 0 1 .8.8v2.71a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2.8Z"}),(0,e.jsx)("path",{fill:"#32324D",d:"M1.922 7.991C.197 6.675 0 6.252 0 5.289h23.953c.305 1.363-1.594 2.506-2.297 3.125-1.953 1.363-6.253 4.36-7.828 5.45-1.575 1.09-3.031.455-3.562 0-2.063-1.41-6.62-4.557-8.344-5.873ZM22.8 18H1.2c-.663 0-1.2.471-1.2 1.053v1.894C0 21.529.537 22 1.2 22h21.6c.663 0 1.2-.471 1.2-1.053v-1.894c0-.582-.537-1.053-1.2-1.053Z"}),(0,e.jsx)("path",{fill:"#32324D",d:"M0 9.555v10.972h24V9.554c-2.633 1.95-8.367 6.113-9.96 7.166-1.595 1.052-3.352.438-4.032 0L0 9.555Z"})]}),n=c}}]);
11
+ `,f=({labelledBy:v="main-content-title",...E})=>(0,e.jsx)(p,{"aria-labelledby":v,as:"main",id:"main-content",tabIndex:-1,...E})},7961:function(b,m,t){t.d(m,{Z:function(){return n}});var e=t(74512);const d=p=>(0,e.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...p,children:[(0,e.jsx)("path",{fill:"#32324D",d:"M0 2.8A.8.8 0 0 1 .8 2h22.4a.8.8 0 0 1 .8.8v2.71a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2.8Z"}),(0,e.jsx)("path",{fill:"#32324D",d:"M1.922 7.991C.197 6.675 0 6.252 0 5.289h23.953c.305 1.363-1.594 2.506-2.297 3.125-1.953 1.363-6.253 4.36-7.828 5.45-1.575 1.09-3.031.455-3.562 0-2.063-1.41-6.62-4.557-8.344-5.873ZM22.8 18H1.2c-.663 0-1.2.471-1.2 1.053v1.894C0 21.529.537 22 1.2 22h21.6c.663 0 1.2-.471 1.2-1.053v-1.894c0-.582-.537-1.053-1.2-1.053Z"}),(0,e.jsx)("path",{fill:"#32324D",d:"M0 9.555v10.972h24V9.554c-2.633 1.95-8.367 6.113-9.96 7.166-1.595 1.052-3.352.438-4.032 0L0 9.555Z"})]}),n=d}}]);
@@ -0,0 +1,114 @@
1
+ "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[3552],{98225:function(ee,T,t){t.r(T),t.d(T,{default:function(){return Je}});var e=t(32735),r=t(24989),v=t(60216),i=t.n(v),m=t(67879),C=t(27649),K=t(82055),L=t(41415),R=t(17e3),I=t(9695),Q=t(19406),Z=t(54725),$=t(74552),l=t(60255),u=t(92802),E=t(66456),x=t(85025),p=t(55225),f=t(49372),P=t(31600),A=t(91215),F=t(87933),b=t(39291),V=t(9026),de=t(72850),W=t(3653),re=t(11406),te=t(24346),a=(0,te.Ry)().shape({code:(0,te.Z_)().required(),displayName:(0,te.Z_)().max(50,"Settings.locales.modal.locales.displayName.error").required(r.I0.required)}),O=t(15062),B=t(9494),ae=()=>{const[o,s]=(0,e.useState)(!1),d=(0,O.I0)(),n=(0,r.lm)(),{put:c}=(0,r.kY)();return{isEditing:o,editLocale:async(g,y)=>{try{s(!0);const{data:D}=await c(`/i18n/locales/${g}`,y);n({type:"success",message:{id:(0,l.O)("Settings.locales.modal.edit.success")}}),d({type:B.OT,editedLocale:D})}catch{n({type:"warning",message:{id:"notification.error"}})}finally{s(!1)}}}},H=t(15335),G=t(5803),Pe=t(68465),je=t(84967),J=t(10369),le=t(20108),Re=t(94638),me=()=>{const{formatMessage:o}=(0,m.Z)(),{notifyStatus:s}=(0,Re.G)(),d=(0,r.lm)(),{get:n}=(0,r.kY)(),{isLoading:c,data:h}=(0,le.useQuery)(["plugin-i18n","locales"],async()=>{try{const{data:g}=await n("/i18n/iso-locales");return s(o({id:(0,l.O)("Settings.locales.modal.locales.loaded"),defaultMessage:"The locales have been successfully loaded."})),g}catch{return d({type:"warning",message:{id:"notification.error"}}),[]}});return{defaultLocales:h,isLoading:c}};const he=({locale:o})=>{const{formatMessage:s}=(0,m.Z)(),{values:d,handleChange:n,errors:c}=(0,u.u6)(),{defaultLocales:h,isLoading:g}=me(),y=!g&&h.find(D=>D.code===o.code);return e.createElement(H.r,{gap:4},e.createElement(G.P,{col:6},e.createElement(Pe.P,{label:s({id:(0,l.O)("Settings.locales.modal.locales.label"),defaultMessage:"Locales"}),value:y?.code||o.code,disabled:!0},e.createElement(je.W,{value:y?.code||o.code},y?.name||o.code))),e.createElement(G.P,{col:6},e.createElement(J.o,{name:"displayName",label:s({id:(0,l.O)("Settings.locales.modal.locales.displayName"),defaultMessage:"Locale display name"}),hint:s({id:(0,l.O)("Settings.locales.modal.locales.displayName.description"),defaultMessage:"Locale will be displayed under that name in the administration panel"}),error:c.displayName?s({id:(0,l.O)("Settings.locales.modal.locales.displayName.error"),defaultMessage:"The locale display name can only be less than 50 characters."}):void 0,value:d.displayName,onChange:n})))};var be=he;he.propTypes={locale:i().shape({id:i().number.isRequired,name:i().string.isRequired,code:i().string.isRequired,isDefault:i().bool.isRequired}).isRequired};var ge=t(8284);const X=({isDefaultLocale:o})=>{const{values:s,setFieldValue:d}=(0,u.u6)(),{formatMessage:n}=(0,m.Z)();return e.createElement(ge.X,{name:"isDefault",hint:n({id:(0,l.O)("Settings.locales.modal.advanced.setAsDefault.hint"),defaultMessage:"One default locale is required, change it by selecting another one"}),onChange:()=>d("isDefault",!s.isDefault),value:s.isDefault,disabled:o},n({id:(0,l.O)("Settings.locales.modal.advanced.setAsDefault"),defaultMessage:"Set as default locale"}))};X.propTypes={isDefaultLocale:i().bool.isRequired};var Se=X;const ne=({locale:o,onClose:s})=>{const{refetchPermissions:d}=(0,r.vn)(),{isEditing:n,editLocale:c}=ae(),{formatMessage:h}=(0,m.Z)(),g=async({displayName:y,isDefault:D})=>{await c(o.id,{name:y,isDefault:D}),await d()};return e.createElement(x.P,{onClose:s,labelledBy:"edit-locale-title"},e.createElement(u.J9,{initialValues:{code:o?.code,displayName:o?.name||"",isDefault:Boolean(o?.isDefault)},onSubmit:g,validationSchema:a},e.createElement(r.l0,null,e.createElement(p.x,null,e.createElement(f.Z,{fontWeight:"bold",textColor:"neutral800",as:"h2",id:"edit-locale-title"},h({id:(0,l.O)("Settings.list.actions.edit"),defaultMessage:"Edit a locale"}))),e.createElement(P.f,null,e.createElement(A.v,{label:h({id:(0,l.O)("Settings.locales.modal.title"),defaultMessage:"Configurations"}),id:"tabs",variant:"simple"},e.createElement(F.k,{justifyContent:"space-between"},e.createElement(f.Z,{as:"h2"},h({id:(0,l.O)("Settings.locales.modal.title"),defaultMessage:"Configurations"})),e.createElement(b.m,null,e.createElement(b.O,null,h({id:(0,l.O)("Settings.locales.modal.base"),defaultMessage:"Basic settings"})),e.createElement(b.O,null,h({id:(0,l.O)("Settings.locales.modal.advanced"),defaultMessage:"Advanced settings"})))),e.createElement(V.i,null),e.createElement(de.x,{paddingTop:7,paddingBottom:7},e.createElement(W.n,null,e.createElement(W.x,null,e.createElement(be,{locale:o})),e.createElement(W.x,null,e.createElement(Se,{isDefaultLocale:Boolean(o&&o.isDefault)})))))),e.createElement(re.m,{startActions:e.createElement(L.z,{variant:"tertiary",onClick:s},h({id:"app.components.Button.cancel"})),endActions:e.createElement(L.z,{type:"submit",startIcon:e.createElement(E.Z,null),disabled:n},h({id:"global.save"}))}))))};ne.defaultProps={locale:void 0},ne.propTypes={locale:i().shape({id:i().number.isRequired,name:i().string.isRequired,code:i().string.isRequired,isDefault:i().bool.isRequired}),onClose:i().func.isRequired};var fe=ne,pe=()=>{const[o,s]=(0,e.useState)(!1),d=(0,O.I0)(),n=(0,r.lm)(),{del:c}=(0,r.kY)();return{isDeleting:o,deleteLocale:async g=>{try{s(!0),await c(`/i18n/locales/${g}`),n({type:"success",message:{id:(0,l.O)("Settings.locales.modal.delete.success")}}),d({type:B.HC,id:g})}catch{n({type:"warning",message:{id:"notification.error"}})}finally{s(!1)}}}};const oe=({localeToDelete:o,onClose:s})=>{const{isDeleting:d,deleteLocale:n}=pe(),c=Boolean(o),h=()=>n(o.id).then(s);return e.createElement(r.QH,{isConfirmButtonLoading:d,onConfirm:h,onToggleDialog:s,isOpen:c})};oe.defaultProps={localeToDelete:void 0},oe.propTypes={localeToDelete:i().shape({id:i().number.isRequired}),onClose:i().func.isRequired};var Ee=oe,Ae=t(33795),ye=t.n(Ae),xe=()=>{const[o,s]=(0,e.useState)(!1),d=(0,O.I0)(),n=(0,r.lm)(),{post:c}=(0,r.kY)();return{isAdding:o,addLocale:async g=>{s(!0);try{const{data:y}=await c("/i18n/locales",g);n({type:"success",message:{id:(0,l.O)("Settings.locales.modal.create.success")}}),d({type:B.xz,newLocale:y})}catch(y){const D=ye()(y,"response.payload.message",null);throw D&&D.includes("already exists")?n({type:"warning",message:{id:(0,l.O)("Settings.locales.modal.create.alreadyExist")}}):n({type:"warning",message:{id:"notification.error"}}),y}finally{s(!1)}}}},Le=t(21428),Be=t(90333);const Y=e.memo(({value:o,onClear:s,onLocaleChange:d,error:n})=>{const{formatMessage:c}=(0,m.Z)(),{defaultLocales:h,isLoading:g}=me(),{locales:y}=(0,$.Z)(),D=(h||[]).map(j=>({label:j.name,value:j.code})).filter(({value:j})=>{const N=y.find(({code:ie})=>ie===j);return!N||N.code===o}),z=o||"";return e.createElement(Le.hQ,{"aria-busy":g,error:n,label:c({id:(0,l.O)("Settings.locales.modal.locales.label"),defaultMessage:"Locales"}),value:z,onClear:o?s:void 0,onChange:j=>{const N=D.find(ie=>ie.value===j);N&&d({code:N.value,displayName:N.label})},placeholder:c({id:"components.placeholder.select",defaultMessage:"Select"})},D.map(j=>e.createElement(Be.O,{value:j.value,key:j.value},j.label)))});Y.defaultProps={error:void 0,value:void 0,onClear(){},onLocaleChange:()=>{}},Y.propTypes={error:i().string,onClear:i().func,onLocaleChange:i().func,value:i().string};var w=Y,U=()=>{const{formatMessage:o}=(0,m.Z)(),{values:s,handleChange:d,setFieldValue:n,errors:c}=(0,u.u6)(),h=(0,e.useCallback)(y=>{n("displayName",y.displayName),n("code",y.code)},[n]),g=(0,e.useCallback)(()=>{n("displayName",""),n("code","")},[n]);return e.createElement(H.r,{gap:4},e.createElement(G.P,{col:6},e.createElement(w,{error:c.code,value:s.code,onLocaleChange:h,onClear:g})),e.createElement(G.P,{col:6},e.createElement(J.o,{name:"displayName",label:o({id:(0,l.O)("Settings.locales.modal.locales.displayName"),defaultMessage:"Locale display name"}),hint:o({id:(0,l.O)("Settings.locales.modal.locales.displayName.description"),defaultMessage:"Locale will be displayed under that name in the administration panel"}),error:c.displayName?o({id:(0,l.O)("Settings.locales.modal.locales.displayName.error"),defaultMessage:"The locale display name can only be less than 50 characters."}):void 0,value:s.displayName,onChange:d})))},Ze=()=>{const{values:o,setFieldValue:s}=(0,u.u6)(),{formatMessage:d}=(0,m.Z)();return e.createElement(ge.X,{hint:d({id:(0,l.O)("Settings.locales.modal.advanced.setAsDefault.hint"),defaultMessage:"One default locale is required, change it by selecting another one"}),onChange:()=>s("isDefault",!o.isDefault),value:o.isDefault},d({id:(0,l.O)("Settings.locales.modal.advanced.setAsDefault"),defaultMessage:"Set as default locale"}))};const Ce={code:"",displayName:"",isDefault:!1},se=({onClose:o})=>{const{isAdding:s,addLocale:d}=xe(),{formatMessage:n}=(0,m.Z)(),{refetchPermissions:c}=(0,r.vn)(),h=async g=>{await d({code:g.code,name:g.displayName,isDefault:g.isDefault}),await c()};return e.createElement(x.P,{onClose:o,labelledBy:"add-locale-title"},e.createElement(u.J9,{initialValues:Ce,onSubmit:h,validationSchema:a,validateOnChange:!1},e.createElement(r.l0,null,e.createElement(p.x,null,e.createElement(f.Z,{fontWeight:"bold",textColor:"neutral800",as:"h2",id:"add-locale-title"},n({id:(0,l.O)("Settings.list.actions.add"),defaultMessage:"Add new locale"}))),e.createElement(P.f,null,e.createElement(A.v,{label:n({id:(0,l.O)("Settings.locales.modal.title"),defaultMessage:"Configurations"}),id:"tabs",variant:"simple"},e.createElement(F.k,{justifyContent:"space-between"},e.createElement(f.Z,{as:"h2",variant:"beta"},n({id:(0,l.O)("Settings.locales.modal.title"),defaultMessage:"Configurations"})),e.createElement(b.m,null,e.createElement(b.O,null,n({id:(0,l.O)("Settings.locales.modal.base"),defaultMessage:"Basic settings"})),e.createElement(b.O,null,n({id:(0,l.O)("Settings.locales.modal.advanced"),defaultMessage:"Advanced settings"})))),e.createElement(V.i,null),e.createElement(de.x,{paddingTop:7,paddingBottom:7},e.createElement(W.n,null,e.createElement(W.x,null,e.createElement(U,null)),e.createElement(W.x,null,e.createElement(Ze,null)))))),e.createElement(re.m,{startActions:e.createElement(L.z,{variant:"tertiary",onClick:o},n({id:"app.components.Button.cancel",defaultMessage:"Cancel"})),endActions:e.createElement(L.z,{type:"submit",startIcon:e.createElement(E.Z,null),disabled:s},n({id:"global.save",defaultMessage:"Save"}))}))))};se.propTypes={onClose:i().func.isRequired};var Me=se,$e=t(56755),k=t(33827),Oe=t(94547),S=t(19786),Fe=t(3685),We=t(35658),De=t(50563),Ue=t(68625),Ne=t(4038);const q=({locales:o,onDeleteLocale:s,onEditLocale:d})=>{const{formatMessage:n}=(0,m.Z)();return e.createElement($e.i,{colCount:4,rowCount:o.length+1},e.createElement(k.h,null,e.createElement(Oe.Tr,null,e.createElement(S.Th,null,e.createElement(f.Z,{variant:"sigma",textColor:"neutral600"},n({id:(0,l.O)("Settings.locales.row.id")}))),e.createElement(S.Th,null,e.createElement(f.Z,{variant:"sigma",textColor:"neutral600"},n({id:(0,l.O)("Settings.locales.row.displayName")}))),e.createElement(S.Th,null,e.createElement(f.Z,{variant:"sigma",textColor:"neutral600"},n({id:(0,l.O)("Settings.locales.row.default-locale")}))),e.createElement(S.Th,null,e.createElement(Fe.T,null,"Actions")))),e.createElement(We.p,null,o.map(c=>e.createElement(Oe.Tr,{key:c.id,...(0,r.X7)({fn:()=>d(c),condition:d})},e.createElement(S.Td,null,e.createElement(f.Z,{textColor:"neutral800"},c.id)),e.createElement(S.Td,null,e.createElement(f.Z,{textColor:"neutral800"},c.name)),e.createElement(S.Td,null,e.createElement(f.Z,{textColor:"neutral800"},c.isDefault?n({id:(0,l.O)("Settings.locales.default")}):null)),e.createElement(S.Td,null,e.createElement(F.k,{gap:1,justifyContent:"flex-end",...r.UW},d&&e.createElement(De.h,{onClick:()=>d(c),label:n({id:(0,l.O)("Settings.list.actions.edit")}),icon:e.createElement(Ue.Z,null),noBorder:!0}),s&&!c.isDefault&&e.createElement(De.h,{onClick:()=>s(c),label:n({id:(0,l.O)("Settings.list.actions.delete")}),icon:e.createElement(Ne.Z,null),noBorder:!0})))))))};q.defaultProps={locales:[],onDeleteLocale:void 0,onEditLocale:void 0},q.propTypes={locales:i().array,onDeleteLocale:i().func,onEditLocale:i().func};var Ke=q;const _=({canUpdateLocale:o,canDeleteLocale:s,onToggleCreateModal:d,isCreating:n})=>{const[c,h]=(0,e.useState)(),[g,y]=(0,e.useState)(),{locales:D}=(0,$.Z)(),{formatMessage:z}=(0,m.Z)();(0,r.go)();const j=()=>h(void 0),N=s?h:void 0,ie=()=>y(void 0),Xe=o?y:void 0;return e.createElement(C.o,{tabIndex:-1},e.createElement(K.T,{primaryAction:e.createElement(L.z,{startIcon:e.createElement(Q.Z,null),onClick:d,size:"S"},z({id:(0,l.O)("Settings.list.actions.add")})),title:z({id:(0,l.O)("plugin.name")}),subtitle:z({id:(0,l.O)("Settings.list.description")})}),e.createElement(R.D,null,D?.length>0?e.createElement(Ke,{locales:D,onDeleteLocale:N,onEditLocale:Xe}):e.createElement(I.x,{icon:e.createElement(Z.Z,{width:void 0,height:void 0}),content:z({id:(0,l.O)("Settings.list.empty.title")}),action:d?e.createElement(L.z,{variant:"secondary",startIcon:e.createElement(Q.Z,null),onClick:d},z({id:(0,l.O)("Settings.list.actions.add")})):null})),n&&e.createElement(Me,{onClose:d}),g&&e.createElement(fe,{onClose:ie,locale:g}),e.createElement(Ee,{localeToDelete:c,onClose:j}))};_.defaultProps={onToggleCreateModal:void 0},_.propTypes={canUpdateLocale:i().bool.isRequired,canDeleteLocale:i().bool.isRequired,onToggleCreateModal:i().func,isCreating:i().bool.isRequired};var Ve=_;const Te=({canReadLocale:o,canCreateLocale:s,canDeleteLocale:d,canUpdateLocale:n})=>{const[c,h]=(0,e.useState)(!1),g=s?()=>h(y=>!y):void 0;return o?e.createElement(Ve,{canUpdateLocale:n,canDeleteLocale:d,onToggleCreateModal:g,isCreating:c}):null};Te.propTypes={canReadLocale:i().bool.isRequired,canCreateLocale:i().bool.isRequired,canUpdateLocale:i().bool.isRequired,canDeleteLocale:i().bool.isRequired};var M=Te,Ge=t(58347),Je=()=>{const{isLoading:o,allowedActions:{canRead:s,canUpdate:d,canCreate:n,canDelete:c}}=(0,r.ss)(Ge.Z);return o?null:e.createElement(M,{canReadLocale:s,canCreateLocale:n,canUpdateLocale:d,canDeleteLocale:c})}},21428:function(ee,T,t){t.d(T,{Wx:function(){return te},XU:function(){return A},hQ:function(){return P}});var e=t(74512),r=t(32735),v=t(35331),i=t(16899),m=t(79405),C=t(8471),K=t(14268),L=t(95976),R=t(74971),I=t(36971),Q=t(30350),Z=t(23866),$=t(72850),l=t(49372),u=t(87107),E=t(87933),x=t(28847),p=t(67014),f=t(47851);const P=({children:a,clearLabel:O="clear",creatable:B=!1,createMessage:ue=w=>`Create "${w}"`,defaultFilterValue:ae,defaultTextValue:H,defaultOpen:G=!1,open:Pe,onOpenChange:je,disabled:J=!1,error:le,filterValue:Re,hasMoreItems:ze=!1,hint:me,id:he,label:be,labelAction:ge,loading:X=!1,loadingMessage:Se="Loading content...",noOptionsMessage:ne=()=>"No results found",onChange:fe,onClear:ve,onCreateOption:pe,onFilterValueChange:oe,onInputChange:Ee,onTextValueChange:Ae,onLoadMore:ye,placeholder:Qe="Select or enter a value",required:xe=!1,startIcon:Le,textValue:Be,value:Y})=>{const[w,He]=(0,L.T)({prop:Pe,defaultProp:G,onChange:je}),[U,Ie]=(0,L.T)({prop:Be,defaultProp:H,onChange:Ae}),[Ze,Ce]=(0,L.T)({prop:Re,defaultProp:ae,onChange:oe}),se=r.useRef(null),Me=r.useRef(null),$e=r.useRef(null),k=(0,R.M)(he),Oe=M=>{ve&&!J&&(Ie(""),Ce(""),ve(M),Me.current.focus())},S=M=>{He(M)},Fe=M=>{Ie(M)},We=M=>{Ce(M)},De=M=>{Ee&&Ee(M)},Ue=M=>{fe&&fe(M)},Ne=(0,R.M)(),q=`intersection-${(0,K.B)(Ne)}`,Ke=M=>{ye&&ze&&!X&&ye(M)},_=()=>{pe&&U&&pe(U)};(0,I.s)(se,Ke,{selectorToWatch:`#${q}`,skipWhen:!w});const Ve=`${k}-hint`,Te=`${k}-error`;return(0,e.jsx)(u.g,{hint:me,error:le,id:k,required:xe,children:(0,e.jsxs)(E.k,{direction:"column",alignItems:"stretch",gap:1,children:[(0,e.jsx)(x.Q,{action:ge,children:be}),(0,e.jsxs)(m.hQ.Root,{autocomplete:B?"list":"both",open:w,onOpenChange:S,onTextValueChange:Fe,textValue:U,allowCustomValue:!0,disabled:J,required:xe,value:Y===null?void 0:Y,onValueChange:Ue,filterValue:Ze,onFilterValueChange:We,children:[(0,e.jsxs)(b,{$hasError:!!le,children:[(0,e.jsxs)(E.k,{flex:"1",as:"span",gap:3,children:[Le?(0,e.jsx)($.x,{as:"span","aria-hidden":!0,children:Le}):null,(0,e.jsx)(V,{placeholder:Qe,id:k,"aria-invalid":!!le,"aria-labelledby":`${Ve} ${Te}`,onChange:De,ref:Me})]}),(0,e.jsxs)(E.k,{as:"span",gap:3,children:[U&&ve?(0,e.jsx)(F,{as:"button",hasRadius:!0,background:"transparent",type:"button",onClick:Oe,"aria-disabled":J,"aria-label":O,title:O,ref:$e,children:(0,e.jsx)(v.Z,{})}):null,(0,e.jsx)(de,{children:(0,e.jsx)(i.Z,{})})]})]}),(0,e.jsx)(m.hQ.Portal,{children:(0,e.jsx)(W,{sideOffset:4,children:(0,e.jsxs)(re,{ref:se,children:[a,B?(0,e.jsx)(m.hQ.CreateItem,{onPointerUp:_,onClick:_,asChild:!0,children:(0,e.jsx)(ce,{children:(0,e.jsx)(l.Z,{children:ue(U??"")})})}):null,!B&&!X?(0,e.jsx)(m.hQ.NoValueFound,{asChild:!0,children:(0,e.jsx)(ce,{$hasHover:!1,children:(0,e.jsx)(l.Z,{children:ne(U??"")})})}):null,X?(0,e.jsx)(E.k,{justifyContent:"center",alignItems:"center",paddingTop:2,paddingBottom:2,children:(0,e.jsx)(Z.a,{small:!0,children:Se})}):null,(0,e.jsx)($.x,{id:q,width:"100%",height:"1px"})]})})})]}),(0,e.jsx)(p.J,{}),(0,e.jsx)(f.c,{})]})})},A=a=>(0,e.jsx)(P,{...a,creatable:!0}),F=(0,C.ZP)($.x)`
2
+ border: none;
3
+
4
+ svg {
5
+ height: ${11/16}rem;
6
+ width: ${11/16}rem;
7
+ }
8
+
9
+ svg path {
10
+ fill: ${({theme:a})=>a.colors.neutral600};
11
+ }
12
+ `,b=(0,C.ZP)(m.hQ.Trigger)`
13
+ position: relative;
14
+ border: 1px solid ${({theme:a,$hasError:O})=>O?a.colors.danger600:a.colors.neutral200};
15
+ padding-right: ${({theme:a})=>a.spaces[3]};
16
+ padding-left: ${({theme:a})=>a.spaces[3]};
17
+ border-radius: ${({theme:a})=>a.borderRadius};
18
+ background: ${({theme:a})=>a.colors.neutral0};
19
+ overflow: hidden;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: space-between;
23
+ gap: ${({theme:a})=>a.spaces[4]};
24
+
25
+ &[data-disabled] {
26
+ color: ${({theme:a})=>a.colors.neutral600};
27
+ background: ${({theme:a})=>a.colors.neutral150};
28
+ cursor: not-allowed;
29
+ }
30
+
31
+ /* Required to ensure the below inputFocusStyles are adhered too */
32
+ &:focus-visible {
33
+ outline: none;
34
+ }
35
+
36
+ ${({theme:a,$hasError:O})=>(0,Q.k3)()({theme:a,hasError:O})};
37
+ `,V=(0,C.ZP)(m.hQ.TextInput)`
38
+ width: 100%;
39
+ font-size: ${14/16}rem;
40
+ color: ${({theme:a})=>a.colors.neutral800};
41
+ min-height: ${40/16}rem;
42
+ border: none;
43
+ background-color: transparent;
44
+
45
+ &:focus-visible {
46
+ outline: none;
47
+ }
48
+
49
+ &[aria-disabled='true'] {
50
+ cursor: inherit;
51
+ }
52
+ `,de=(0,C.ZP)(m.hQ.Icon)`
53
+ & > svg {
54
+ width: ${6/16}rem;
55
+
56
+ & > path {
57
+ fill: ${({theme:a})=>a.colors.neutral600};
58
+ }
59
+ }
60
+
61
+ &[aria-disabled='true'] {
62
+ cursor: inherit;
63
+ }
64
+ `,W=(0,C.ZP)(m.hQ.Content)`
65
+ background: ${({theme:a})=>a.colors.neutral0};
66
+ box-shadow: ${({theme:a})=>a.shadows.filterShadow};
67
+ border: 1px solid ${({theme:a})=>a.colors.neutral150};
68
+ border-radius: ${({theme:a})=>a.borderRadius};
69
+ width: var(--radix-combobox-trigger-width);
70
+ /* This is from the design-system figma file. */
71
+ max-height: 15rem;
72
+ z-index: ${({theme:a})=>a.zIndices[1]};
73
+ `,re=(0,C.ZP)(m.hQ.Viewport)`
74
+ padding: ${({theme:a})=>a.spaces[1]};
75
+ `,te=r.forwardRef(({children:a,value:O,disabled:B,textValue:ue,...ae},H)=>(0,e.jsx)(m.hQ.ComboboxItem,{asChild:!0,value:O,disabled:B,textValue:ue,children:(0,e.jsx)(ce,{ref:H,...ae,children:(0,e.jsx)(m.hQ.ItemText,{asChild:!0,children:(0,e.jsx)(l.Z,{children:a})})})})),ce=C.ZP.div`
76
+ width: 100%;
77
+ border: none;
78
+ text-align: left;
79
+ outline-offset: -3px;
80
+ padding: ${({theme:a})=>a.spaces[2]} ${({theme:a})=>a.spaces[4]};
81
+ background-color: ${({theme:a})=>a.colors.neutral0};
82
+ border-radius: ${({theme:a})=>a.borderRadius};
83
+ user-select: none;
84
+
85
+ &[data-selected] {
86
+ background-color: ${({theme:a})=>a.colors.primary100};
87
+
88
+ ${l.Z} {
89
+ color: ${({theme:a})=>a.colors.primary600};
90
+ font-weight: bold;
91
+ }
92
+ }
93
+
94
+ &:hover,
95
+ &[data-highlighted] {
96
+ outline: none;
97
+ background-color: ${({theme:a,$hasHover:O=!0})=>O?a.colors.primary100:a.colors.neutral0};
98
+ }
99
+
100
+ &[data-highlighted] {
101
+ ${l.Z} {
102
+ color: ${({theme:a})=>a.colors.primary600};
103
+ font-weight: bold;
104
+ }
105
+ }
106
+ `},90333:function(ee,T,t){t.d(T,{O:function(){return r}});var e=t(21428);const r=e.Wx},17e3:function(ee,T,t){t.d(T,{D:function(){return m}});var e=t(74512),r=t(32735),v=t(60216),i=t(72850);const m=({children:C})=>(0,e.jsx)(i.x,{paddingLeft:10,paddingRight:10,children:C});m.propTypes={children:v.node.isRequired}},82055:function(ee,T,t){t.d(T,{T:function(){return Z}});var e=t(74512),r=t(32735),v=t(60216),i=t(8471);const m=u=>{const E=(0,r.useRef)(null),[x,p]=(0,r.useState)(!0),f=([P])=>{p(P.isIntersecting)};return(0,r.useEffect)(()=>{const P=E.current,A=new IntersectionObserver(f,u);return P&&A.observe(E.current),()=>{P&&A.disconnect()}},[E,u]),[E,x]};var C=t(63060);const K=(u,E)=>{const x=(0,C.W)(E);(0,r.useLayoutEffect)(()=>{const p=new ResizeObserver(x);return Array.isArray(u)?u.forEach(f=>{f.current&&p.observe(f.current)}):u.current&&p.observe(u.current),()=>{p.disconnect()}},[u,x])};var L=t(72850),R=t(87933),I=t(49372);const Q=()=>{const u=(0,r.useRef)(null),[E,x]=(0,r.useState)(null),[p,f]=m({root:null,rootMargin:"0px",threshold:0});return K(p,()=>{p.current&&x(p.current.getBoundingClientRect())}),(0,r.useEffect)(()=>{u.current&&x(u.current.getBoundingClientRect())},[u]),{containerRef:p,isVisible:f,baseHeaderLayoutRef:u,headerSize:E}},Z=u=>{const{containerRef:E,isVisible:x,baseHeaderLayoutRef:p,headerSize:f}=Q();return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:f?.height},ref:E,children:x&&(0,e.jsx)(l,{ref:p,...u})}),!x&&(0,e.jsx)(l,{...u,sticky:!0,width:f?.width})]})};Z.displayName="HeaderLayout";const $=(0,i.ZP)(L.x)`
107
+ width: ${u=>u.width}px;
108
+ z-index: ${({theme:u})=>u.zIndices[1]};
109
+ `,l=r.forwardRef(({navigationAction:u,primaryAction:E,secondaryAction:x,subtitle:p,title:f,sticky:P,width:A,...F},b)=>{const V=typeof p=="string";return P?(0,e.jsx)($,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:A,"data-strapi-header-sticky":!0,children:(0,e.jsxs)(R.k,{justifyContent:"space-between",children:[(0,e.jsxs)(R.k,{children:[u&&(0,e.jsx)(L.x,{paddingRight:3,children:u}),(0,e.jsxs)(L.x,{children:[(0,e.jsx)(I.Z,{variant:"beta",as:"h1",...F,children:f}),V?(0,e.jsx)(I.Z,{variant:"pi",textColor:"neutral600",children:p}):p]}),x?(0,e.jsx)(L.x,{paddingLeft:4,children:x}):null]}),(0,e.jsx)(R.k,{children:E?(0,e.jsx)(L.x,{paddingLeft:2,children:E}):void 0})]})}):(0,e.jsxs)(L.x,{ref:b,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:u?6:8,background:"neutral100","data-strapi-header":!0,children:[u?(0,e.jsx)(L.x,{paddingBottom:2,children:u}):null,(0,e.jsxs)(R.k,{justifyContent:"space-between",children:[(0,e.jsxs)(R.k,{minWidth:0,children:[(0,e.jsx)(I.Z,{as:"h1",variant:"alpha",...F,children:f}),x?(0,e.jsx)(L.x,{paddingLeft:4,children:x}):null]}),E]}),V?(0,e.jsx)(I.Z,{variant:"epsilon",textColor:"neutral600",as:"p",children:p}):p]})});l.displayName="BaseHeaderLayout",l.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0,sticky:!1,width:void 0},l.propTypes={navigationAction:v.node,primaryAction:v.node,secondaryAction:v.node,sticky:v.bool,subtitle:v.oneOfType([v.string,v.node]),title:v.string.isRequired,width:v.number},Z.defaultProps={navigationAction:void 0,primaryAction:void 0,secondaryAction:void 0,subtitle:void 0},Z.propTypes={navigationAction:v.node,primaryAction:v.node,secondaryAction:v.node,subtitle:v.oneOfType([v.string,v.node]),title:v.string.isRequired}},27649:function(ee,T,t){t.d(T,{o:function(){return m}});var e=t(74512),r=t(8471),v=t(72850);const i=(0,r.ZP)(v.x)`
110
+ // To prevent global outline on focus visible to force an outline when Main is focused
111
+ &:focus-visible {
112
+ outline: none;
113
+ }
114
+ `,m=({labelledBy:C="main-content-title",...K})=>(0,e.jsx)(i,{"aria-labelledby":C,as:"main",id:"main-content",tabIndex:-1,...K})}}]);
package/build/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="mobile-web-app-capable" content="yes"/><title>Strapi Admin</title><script defer="defer" src="/admin/runtime~main.a096f3d0.js"></script><script defer="defer" src="/admin/main.31bdf27e.js"></script></head><body><div style="min-height:100%" id="app"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="mobile-web-app-capable" content="yes"/><title>Strapi Admin</title><script defer="defer" src="/admin/runtime~main.df78e1c7.js"></script><script defer="defer" src="/admin/main.57970a57.js"></script></head><body><div style="min-height:100%" id="app"></div></body></html>