@strapi/admin 4.11.0-beta.1 → 4.11.0-exp.9xg4-3qfm-9w8f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/components/Providers/index.js +32 -32
- package/admin/src/components/Theme/index.js +3 -5
- package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDeleteAll/index.js +73 -0
- package/admin/src/content-manager/components/DynamicTable/index.js +4 -20
- package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +2 -3
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/index.js +1 -0
- package/admin/src/content-manager/{utils → components/EditViewDataManagerProvider/utils}/schema.js +1 -1
- package/admin/src/content-manager/components/Inputs/index.js +11 -18
- package/admin/src/content-manager/components/Inputs/utils/getStep.js +13 -0
- package/admin/src/content-manager/components/Inputs/utils/index.js +1 -0
- package/admin/src/content-manager/pages/ListView/index.js +2 -118
- package/admin/src/content-manager/utils/index.js +0 -2
- package/admin/src/hooks/useContentTypes/useContentTypes.js +0 -2
- package/admin/src/injectionZones.js +1 -6
- package/admin/src/translations/en.json +1 -5
- package/build/{1657.ca8562dd.chunk.js → 1657.3f2b2c11.chunk.js} +1 -9
- package/build/3081.7e9329cb.chunk.js +105 -0
- package/build/462.6f8cbd19.chunk.js +71 -0
- package/build/5542.64b623c9.chunk.js +63 -0
- package/build/617.1591eeb0.chunk.js +155 -0
- package/build/6858.85d76858.chunk.js +50 -0
- package/build/6970.6a329e15.chunk.js +1 -0
- package/build/9036.f7ce35cc.chunk.js +211 -0
- package/build/{Admin-authenticatedApp.990df65d.chunk.js → Admin-authenticatedApp.0f366684.chunk.js} +2 -2
- package/build/{Admin_homePage.107a9fe0.chunk.js → Admin_homePage.94dc81b1.chunk.js} +16 -16
- package/build/Admin_marketplace.1b0c3d3b.chunk.js +55 -0
- package/build/Admin_pluginsPage.a28b96d5.chunk.js +6 -0
- package/build/{Admin_profilePage.75bc083a.chunk.js → Admin_profilePage.a8fa3a56.chunk.js} +1 -1
- package/build/Admin_settingsPage.ee76d19e.chunk.js +79 -0
- package/build/admin-app.bd209f08.chunk.js +63 -0
- package/build/admin-roles-list.af53b372.chunk.js +23 -0
- package/build/admin-users.004d5c68.chunk.js +26 -0
- package/build/audit-logs-settings-page.dc07596e.chunk.js +121 -0
- package/build/content-manager.70548048.chunk.js +1123 -0
- package/build/content-type-builder-list-view.26aab6f3.chunk.js +215 -0
- package/build/email-settings-page.63f269ff.chunk.js +11 -0
- package/build/{en-json.0f5cc115.chunk.js → en-json.ba3290b8.chunk.js} +1 -1
- package/build/i18n-settings-page.f84c4782.chunk.js +114 -0
- package/build/i18n-translation-en-json.60af6722.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/main.4016f4ad.js +2630 -0
- package/build/{review-workflows-settings.4b39b837.chunk.js → review-workflows-settings.56cab253.chunk.js} +1 -1
- package/build/{runtime~main.55d43bd7.js → runtime~main.b22be595.js} +2 -2
- package/build/upload-settings.1d187578.chunk.js +14 -0
- package/build/upload.bc340679.chunk.js +26 -0
- package/build/users-advanced-settings-page.7b4bf63a.chunk.js +9 -0
- package/build/users-email-settings-page.035a026c.chunk.js +24 -0
- package/build/users-providers-settings-page.6873dce9.chunk.js +29 -0
- package/build/{users-roles-settings-page.c773086b.chunk.js → users-roles-settings-page.2549794b.chunk.js} +1 -1
- package/build/webhook-list-page.0861d3e9.chunk.js +63 -0
- package/package.json +11 -11
- package/admin/src/content-manager/components/DynamicTable/BulkActionsBar/index.js +0 -307
- package/build/3081.c2cdfac8.chunk.js +0 -108
- package/build/3562.e0b1a0b3.chunk.js +0 -50
- package/build/456.9b85d4c6.chunk.js +0 -39
- package/build/462.a073ff1f.chunk.js +0 -71
- package/build/5542.002522eb.chunk.js +0 -71
- package/build/617.87b2fe96.chunk.js +0 -155
- package/build/6970.7ea35fbd.chunk.js +0 -1
- package/build/Admin_marketplace.1436fc2b.chunk.js +0 -55
- package/build/Admin_pluginsPage.e1afd5ed.chunk.js +0 -6
- package/build/Admin_settingsPage.bd715ed3.chunk.js +0 -79
- package/build/admin-app.8b102fe2.chunk.js +0 -63
- package/build/admin-roles-list.e8bf9685.chunk.js +0 -31
- package/build/admin-users.751b28b2.chunk.js +0 -34
- package/build/audit-logs-settings-page.3c6cea81.chunk.js +0 -129
- package/build/content-manager.89099707.chunk.js +0 -1123
- package/build/content-type-builder-list-view.1e821eb9.chunk.js +0 -215
- package/build/email-settings-page.4368689f.chunk.js +0 -11
- package/build/i18n-settings-page.7988d872.chunk.js +0 -114
- package/build/i18n-translation-en-json.1ec7becf.chunk.js +0 -1
- package/build/main.5a232c3d.js +0 -2630
- package/build/upload-settings.63d99bf5.chunk.js +0 -14
- package/build/upload.c50d8c7a.chunk.js +0 -34
- package/build/users-advanced-settings-page.2cfb5d24.chunk.js +0 -9
- package/build/users-email-settings-page.bd6c774a.chunk.js +0 -24
- package/build/users-providers-settings-page.528f0036.chunk.js +0 -29
- package/build/webhook-list-page.b0f5a02c.chunk.js +0 -71
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[5905],{69073:function(X,D,n){n.r(D),n.d(D,{default:function(){return it}});var e=n(32735),r=n(24989),f=n(19406),R=n(66456),Q=n(68625),G=n(29439),L=n(82055),p=n(87933),w=n(41415),j=n(17e3),u=n(72850),K=n(33795),l=n.n(K),h=n(23973),Z=n.n(h),x=n(89793),b=n.n(x),B=n(23940),N=n.n(B),F=n(67879),J=n(53038),_=n(60216),o=n.n(_),ge=n(56755),fe=n(33827),he=n(94547),ee=n(19786),M=n(49372),Pe=n(73269),ye=n(32237),H=n(198),T=n(8471),C=n(92318),Re=n(35331);const Be=(0,T.ZP)(p.k)`
|
|
2
|
+
border-radius: 50%;
|
|
3
|
+
color: ${({theme:t,isActive:a})=>a?t.colors.primary600:t.colors.neutral600};
|
|
4
|
+
height: ${({theme:t})=>t.spaces[8]};
|
|
5
|
+
width: ${({theme:t})=>t.spaces[8]};
|
|
6
|
+
|
|
7
|
+
svg {
|
|
8
|
+
height: ${({theme:t})=>t.spaces[5]};
|
|
9
|
+
width: ${({theme:t})=>t.spaces[5]};
|
|
10
|
+
}
|
|
11
|
+
`;function ae({isActive:t}){return e.createElement(Be,{alignItems:"center",background:t?"primary200":"neutral200",justifyContent:"center",isActive:t},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},e.createElement("path",{d:"M216.3 2c4.8-2.6 10.5-2.6 15.3 0L422.3 106c5.1 2.8 8.3 8.2 8.3 14s-3.2 11.2-8.3 14L231.7 238c-4.8 2.6-10.5 2.6-15.3 0L25.7 134c-5.1-2.8-8.3-8.2-8.3-14s3.2-11.2 8.3-14L216.3 2zM23.7 170l176 96c5.1 2.8 8.3 8.2 8.3 14V496c0 5.6-3 10.9-7.8 13.8s-10.9 3-15.8 .3L8.3 414C3.2 411.2 0 405.9 0 400V184c0-5.6 3-10.9 7.8-13.8s10.9-3 15.8-.3zm400.7 0c5-2.7 11-2.6 15.8 .3s7.8 8.1 7.8 13.8V400c0 5.9-3.2 11.2-8.3 14l-176 96c-5 2.7-11 2.6-15.8-.3s-7.8-8.1-7.8-13.8V280c0-5.9 3.2-11.2 8.3-14l176-96z",fill:"currentColor"})))}ae.defaultProps={isActive:!1},ae.propTypes={isActive:o().bool};const ve=(0,T.ZP)(u.x)`
|
|
12
|
+
position: absolute;
|
|
13
|
+
display: none;
|
|
14
|
+
top: 5px;
|
|
15
|
+
right: ${(0,r.Q1)(8)};
|
|
16
|
+
|
|
17
|
+
svg {
|
|
18
|
+
width: ${(0,r.Q1)(10)};
|
|
19
|
+
height: ${(0,r.Q1)(10)};
|
|
20
|
+
|
|
21
|
+
path {
|
|
22
|
+
fill: ${({theme:t})=>t.colors.primary600};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`,ke=(0,T.ZP)(p.k)`
|
|
26
|
+
width: ${(0,r.Q1)(140)};
|
|
27
|
+
height: ${(0,r.Q1)(80)};
|
|
28
|
+
position: relative;
|
|
29
|
+
border: 1px solid ${({theme:t})=>t.colors.neutral200};
|
|
30
|
+
background: ${({theme:t})=>t.colors.neutral100};
|
|
31
|
+
border-radius: ${({theme:t})=>t.borderRadius};
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
|
|
34
|
+
&.active,
|
|
35
|
+
&:focus,
|
|
36
|
+
&:hover {
|
|
37
|
+
border: 1px solid ${({theme:t})=>t.colors.primary200};
|
|
38
|
+
background: ${({theme:t})=>t.colors.primary100};
|
|
39
|
+
|
|
40
|
+
${ve} {
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
${M.Z} {
|
|
45
|
+
color: ${({theme:t})=>t.colors.primary600};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* > ComponentIcon */
|
|
49
|
+
> div:first-child {
|
|
50
|
+
background: ${({theme:t})=>t.colors.primary200};
|
|
51
|
+
color: ${({theme:t})=>t.colors.primary600};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;function re({component:t,dzName:a,index:i,isActive:c,isInDevelopmentMode:m,onClick:s}){const{modifiedData:y,removeComponentFromDynamicZone:k}=(0,H.Z)(),{schema:{displayName:P}}=l()(y,["components",t],{schema:{}}),$=v=>{v.stopPropagation(),k(a,i)};return e.createElement(ke,{as:"button",alignItems:"center",direction:"column",className:c?"active":"",borderRadius:"borderRadius",justifyContent:"center",paddingLeft:4,paddingRight:4,shrink:0,type:"button",onClick:s},e.createElement(ae,{isActive:c}),e.createElement(u.x,{marginTop:1,maxWidth:"100%"},e.createElement(M.Z,{variant:"pi",fontWeight:"bold",ellipsis:!0},P)),m&&e.createElement(ve,{as:"button",onClick:$,type:"button"},e.createElement(Re.Z,null)))}re.defaultProps={component:null,isActive:!1,isInDevelopmentMode:!1,onClick(){}},re.propTypes={component:o().string,dzName:o().string.isRequired,index:o().number.isRequired,isActive:o().bool,isInDevelopmentMode:o().bool,onClick:o().func};var Ae=re,Ee=T.ZP.tr`
|
|
55
|
+
&.component-row,
|
|
56
|
+
&.dynamiczone-row {
|
|
57
|
+
position: relative;
|
|
58
|
+
border-top: none !important;
|
|
59
|
+
|
|
60
|
+
table tr:first-child {
|
|
61
|
+
border-top: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
> td:first-of-type {
|
|
65
|
+
padding: 0 0 0 ${(0,r.Q1)(20)};
|
|
66
|
+
position: relative;
|
|
67
|
+
|
|
68
|
+
&::before {
|
|
69
|
+
content: '';
|
|
70
|
+
width: ${(0,r.Q1)(4)};
|
|
71
|
+
height: calc(100% - 40px);
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: -7px;
|
|
74
|
+
left: 1.625rem;
|
|
75
|
+
border-radius: 4px;
|
|
76
|
+
|
|
77
|
+
${({isFromDynamicZone:t,isChildOfDynamicZone:a,theme:i})=>a?`background-color: ${i.colors.primary200};`:t?`background-color: ${i.colors.primary200};`:`background: ${i.colors.neutral150};`}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.dynamiczone-row > td:first-of-type {
|
|
83
|
+
padding: 0;
|
|
84
|
+
}
|
|
85
|
+
`;function le({customRowComponent:t,component:a,isFromDynamicZone:i,isNestedInDZComponent:c,firstLoopComponentUid:m}){const{modifiedData:s}=(0,H.Z)(),{schema:{attributes:y}}=l()(s,["components",a],{schema:{attributes:[]}});return e.createElement(Ee,{isChildOfDynamicZone:i,className:"component-row"},e.createElement("td",{colSpan:12},e.createElement(be,{customRowComponent:t,items:y,targetUid:a,firstLoopComponentUid:m||a,editTarget:"components",isFromDynamicZone:i,isNestedInDZComponent:c,isSub:!0,secondLoopComponentUid:m?a:null})))}le.defaultProps={component:null,customRowComponent:null,firstLoopComponentUid:null,isFromDynamicZone:!1,isNestedInDZComponent:!1},le.propTypes={component:o().string,customRowComponent:o().func,firstLoopComponentUid:o().string,isFromDynamicZone:o().bool,isNestedInDZComponent:o().bool};var xe=le;const Ie=(0,T.ZP)(f.Z)`
|
|
86
|
+
width: ${(0,r.Q1)(32)};
|
|
87
|
+
height: ${(0,r.Q1)(32)};
|
|
88
|
+
padding: ${(0,r.Q1)(9)};
|
|
89
|
+
border-radius: ${(0,r.Q1)(64)};
|
|
90
|
+
background: ${({theme:t})=>t.colors.primary100};
|
|
91
|
+
path {
|
|
92
|
+
fill: ${({theme:t})=>t.colors.primary600};
|
|
93
|
+
}
|
|
94
|
+
`,Fe=(0,T.ZP)(u.x)`
|
|
95
|
+
height: ${(0,r.Q1)(90)};
|
|
96
|
+
position: absolute;
|
|
97
|
+
width: 100%;
|
|
98
|
+
top: 0;
|
|
99
|
+
left: 0;
|
|
100
|
+
`,Oe=(0,T.ZP)(p.k)`
|
|
101
|
+
width: 100%;
|
|
102
|
+
overflow-x: auto;
|
|
103
|
+
`,We=(0,T.ZP)(u.x)`
|
|
104
|
+
padding-top: ${(0,r.Q1)(90)};
|
|
105
|
+
`,Ue=(0,T.ZP)(p.k)`
|
|
106
|
+
flex-shrink: 0;
|
|
107
|
+
width: ${(0,r.Q1)(140)};
|
|
108
|
+
height: ${(0,r.Q1)(80)};
|
|
109
|
+
justify-content: center;
|
|
110
|
+
align-items: center;
|
|
111
|
+
`;function ie({customRowComponent:t,components:a,addComponent:i,name:c,targetUid:m}){const{isInDevelopmentMode:s}=(0,H.Z)(),[y,k]=(0,e.useState)(0),{formatMessage:P}=(0,F.Z)(),$=d=>{y!==d&&k(d)},v=()=>{i(c)};return e.createElement(Ee,{className:"dynamiczone-row",isFromDynamicZone:!0},e.createElement("td",{colSpan:12},e.createElement(Fe,{paddingLeft:8},e.createElement(Oe,{gap:2},s&&e.createElement("button",{type:"button",onClick:v},e.createElement(Ue,{direction:"column",alignItems:"stretch",gap:1},e.createElement(Ie,null),e.createElement(M.Z,{variant:"pi",fontWeight:"bold",textColor:"primary600"},P({id:(0,C.Z)("button.component.add"),formatMessage:"Add a component"})))),a.map((d,g)=>e.createElement(Ae,{key:d,dzName:c,index:g,component:d,isActive:y===g,isInDevelopmentMode:s,onClick:()=>$(g)})))),e.createElement(We,null,a.map((d,g)=>{const E={customRowComponent:t,component:d};return e.createElement(u.x,{tabId:`${g}`,key:d,style:{display:y===g?"block":"none"}},e.createElement("table",null,e.createElement("tbody",null,e.createElement(xe,{...E,isFromDynamicZone:!0,targetUid:m,key:d}))))}))))}ie.defaultProps={addComponent(){},components:[],customRowComponent:null,name:null},ie.propTypes={addComponent:o().func,components:o().instanceOf(Array),customRowComponent:o().func,name:o().string,targetUid:o().string.isRequired};var Se=ie,Ne=(0,T.ZP)(u.x)`
|
|
112
|
+
table {
|
|
113
|
+
width: 100%;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
thead {
|
|
118
|
+
border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
119
|
+
|
|
120
|
+
tr {
|
|
121
|
+
border-top: 0;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
tr {
|
|
126
|
+
border-top: 1px solid ${({theme:t})=>t.colors.neutral150};
|
|
127
|
+
|
|
128
|
+
& td,
|
|
129
|
+
& th {
|
|
130
|
+
padding: ${({theme:t})=>t.spaces[4]};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
& td:first-of-type,
|
|
134
|
+
& th:first-of-type {
|
|
135
|
+
padding: 0 ${({theme:t})=>t.spaces[1]};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
th,
|
|
140
|
+
td {
|
|
141
|
+
vertical-align: middle;
|
|
142
|
+
text-align: left;
|
|
143
|
+
color: ${({theme:t})=>t.colors.neutral600};
|
|
144
|
+
outline-offset: -4px;
|
|
145
|
+
}
|
|
146
|
+
`;const Ve=(0,T.ZP)(u.x)`
|
|
147
|
+
height: ${24/16}rem;
|
|
148
|
+
width: ${24/16}rem;
|
|
149
|
+
border-radius: 50%;
|
|
150
|
+
display: flex;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
align-items: center;
|
|
153
|
+
|
|
154
|
+
svg {
|
|
155
|
+
height: ${10/16}rem;
|
|
156
|
+
width: ${10/16}rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
svg path {
|
|
160
|
+
fill: ${({theme:t,color:a})=>t.colors[`${a}600`]};
|
|
161
|
+
}
|
|
162
|
+
`,ze=(0,T.ZP)(u.x)`
|
|
163
|
+
border-radius: 0 0 ${({theme:t})=>t.borderRadius} ${({theme:t})=>t.borderRadius};
|
|
164
|
+
display: block;
|
|
165
|
+
width: 100%;
|
|
166
|
+
border: none;
|
|
167
|
+
position: relative;
|
|
168
|
+
left: -0.25rem;
|
|
169
|
+
`,Ce=({children:t,icon:a,color:i,...c})=>e.createElement(ze,{paddingBottom:4,paddingTop:4,as:"button",type:"button",...c},e.createElement(p.k,null,e.createElement(Ve,{color:i,"aria-hidden":!0,background:`${i}200`},a),e.createElement(u.x,{paddingLeft:3},e.createElement(M.Z,{variant:"pi",fontWeight:"bold",textColor:`${i}600`},t))));Ce.propTypes={color:o().string.isRequired,children:o().string.isRequired,icon:o().node.isRequired};var Qe=Ce;function se({addComponentToDZ:t,customRowComponent:a,editTarget:i,firstLoopComponentUid:c,isFromDynamicZone:m,isMain:s,isNestedInDZComponent:y,isSub:k,items:P,secondLoopComponentUid:$,targetUid:v}){const{formatMessage:d}=(0,F.Z)(),{trackUsage:g}=(0,r.rS)(),{isInDevelopmentMode:E,modifiedData:V,isInContentTypeView:O}=(0,H.Z)(),{onOpenModalAddField:U}=(0,ye.Z)(),A=()=>{g("hasClickedCTBAddFieldBanner"),U({forTarget:i,targetUid:v})};return v?P.length===0&&s?e.createElement(ge.i,{colCount:2,rowCount:2},e.createElement(fe.h,null,e.createElement(he.Tr,null,e.createElement(ee.Th,null,e.createElement(M.Z,{variant:"sigma",textColor:"neutral600"},d({id:"global.name",defaultMessage:"Name"}))),e.createElement(ee.Th,null,e.createElement(M.Z,{variant:"sigma",textColor:"neutral600"},d({id:"global.type",defaultMessage:"Type"}))))),e.createElement(r.c4,{action:e.createElement(w.z,{onClick:A,size:"L",startIcon:e.createElement(f.Z,null),variant:"secondary"},d({id:(0,C.Z)("table.button.no-fields"),defaultMessage:"Add new field"})),colSpan:2,content:O?{id:(0,C.Z)("table.content.no-fields.collection-type"),defaultMessage:"Add your first field to this Collection-Type"}:{id:(0,C.Z)("table.content.no-fields.component"),defaultMessage:"Add your first field to this component"}})):e.createElement(Ne,null,e.createElement(u.x,{paddingLeft:6,paddingRight:s?6:0,...s&&{style:{overflowX:"auto"}}},e.createElement("table",null,s&&e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",null,e.createElement(M.Z,{variant:"sigma",textColor:"neutral600"},d({id:"global.name",defaultMessage:"Name"}))),e.createElement("th",{colSpan:"2"},e.createElement(M.Z,{variant:"sigma",textColor:"neutral600"},d({id:"global.type",defaultMessage:"Type"}))))),e.createElement("tbody",null,P.map(W=>{const{type:z}=W,Y=a;return e.createElement(e.Fragment,{key:W.name},e.createElement(Y,{...W,isNestedInDZComponent:y,targetUid:v,editTarget:i,firstLoopComponentUid:c,isFromDynamicZone:m,secondLoopComponentUid:$}),z==="component"&&e.createElement(xe,{...W,customRowComponent:a,targetUid:v,isNestedInDZComponent:m,editTarget:i,firstLoopComponentUid:c}),z==="dynamiczone"&&e.createElement(Se,{...W,customRowComponent:a,addComponent:t,targetUid:v}))})))),s&&E&&e.createElement(Pe.c,{icon:e.createElement(f.Z,null),onClick:A},d({id:(0,C.Z)(`form.button.add.field.to.${V.contentType?V.contentType.schema.kind:i||"collectionType"}`),defaultMessage:"Add another field"})),k&&E&&e.createElement(Qe,{icon:e.createElement(f.Z,null),onClick:A,color:m?"primary":"neutral"},d({id:(0,C.Z)("form.button.add.field.to.component"),defaultMessage:"Add another field"}))):e.createElement(ge.i,{colCount:2,rowCount:2},e.createElement(fe.h,null,e.createElement(he.Tr,null,e.createElement(ee.Th,null,e.createElement(M.Z,{variant:"sigma",textColor:"neutral600"},d({id:"global.name",defaultMessage:"Name"}))),e.createElement(ee.Th,null,e.createElement(M.Z,{variant:"sigma",textColor:"neutral600"},d({id:"global.type",defaultMessage:"Type"}))))),e.createElement(r.c4,{colSpan:2,content:{id:(0,C.Z)("table.content.create-first-content-type"),defaultMessage:"Create your first Collection-Type"}}))}se.defaultProps={addComponentToDZ(){},customRowComponent:null,firstLoopComponentUid:null,isFromDynamicZone:!1,isNestedInDZComponent:!1,isMain:!1,isSub:!1,items:[],secondLoopComponentUid:null,targetUid:null},se.propTypes={addComponentToDZ:o().func,customRowComponent:o().func,editTarget:o().string.isRequired,firstLoopComponentUid:o().string,isFromDynamicZone:o().bool,isNestedInDZComponent:o().bool,isMain:o().bool,items:o().instanceOf(Array),secondLoopComponentUid:o().string,targetUid:o().string,isSub:o().bool};var be=se,Te=n(50563),Ke=n(4038),Ze=n(74512);const He=t=>(0,Ze.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...t,children:(0,Ze.jsx)("path",{fill:"#8E8EA9",d:"M19 10h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1V9a7 7 0 0 1 14 0v1Zm-2 0V9A5 5 0 0 0 7 9v1h10Zm-6 4v4h2v-4h-2Z"})}),Xe=He,Ge=(0,T.ZP)(u.x)`
|
|
170
|
+
position: absolute;
|
|
171
|
+
left: -1.125rem;
|
|
172
|
+
top: 0px;
|
|
173
|
+
|
|
174
|
+
&:before {
|
|
175
|
+
content: '';
|
|
176
|
+
width: ${4/16}rem;
|
|
177
|
+
height: ${12/16}rem;
|
|
178
|
+
background: ${({theme:t,color:a})=>t.colors[a]};
|
|
179
|
+
display: block;
|
|
180
|
+
}
|
|
181
|
+
`,Je=T.ZP.svg`
|
|
182
|
+
position: relative;
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
transform: translate(-0.5px, -1px);
|
|
185
|
+
|
|
186
|
+
* {
|
|
187
|
+
fill: ${({theme:t,color:a})=>t.colors[a]};
|
|
188
|
+
}
|
|
189
|
+
`,Me=t=>e.createElement(Ge,null,e.createElement(Je,{width:"20",height:"23",viewBox:"0 0 20 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.02477 14.7513C8.65865 17.0594 11.6046 18.6059 17.5596 18.8856C18.6836 18.9384 19.5976 19.8435 19.5976 20.9688V20.9688C19.5976 22.0941 18.6841 23.0125 17.5599 22.9643C10.9409 22.6805 6.454 20.9387 3.75496 17.1258C0.937988 13.1464 0.486328 7.39309 0.486328 0.593262H4.50974C4.50974 7.54693 5.06394 11.9813 7.02477 14.7513Z"})));Me.propTypes={color:o().string.isRequired};var Ye=Me;const ce=({content:t})=>N()(t);ce.defaultProps={content:null},ce.propTypes={content:o().string};var qe=ce,_e=(0,T.ZP)(u.x)`
|
|
190
|
+
position: relative;
|
|
191
|
+
`,et=n(25747);const de=({type:t,customField:a,repeatable:i})=>{const{formatMessage:c}=(0,F.Z)();let m=t;return["integer","biginteger","float","decimal"].includes(t)?m="number":["string"].includes(t)&&(m="text"),a?e.createElement(M.Z,null,c({id:(0,C.Z)("attribute.customField"),defaultMessage:"Custom field"})):e.createElement(M.Z,null,c({id:(0,C.Z)(`attribute.${m}`),defaultMessage:t}),"\xA0",i&&c({id:(0,C.Z)("component.repeatable"),defaultMessage:"(repeatable)"}))};de.defaultProps={customField:null,repeatable:!1},de.propTypes={type:o().string.isRequired,customField:o().string,repeatable:o().bool};var tt=de;function me({configurable:t,customField:a,editTarget:i,firstLoopComponentUid:c,isFromDynamicZone:m,name:s,onClick:y,relation:k,repeatable:P,secondLoopComponentUid:$,target:v,targetUid:d,type:g}){const{contentTypes:E,isInDevelopmentMode:V,removeAttribute:O}=(0,H.Z)(),{formatMessage:U}=(0,F.Z)(),A=g==="relation"&&k.includes("morph"),W=["integer","biginteger","float","decimal"].includes(g)?"number":g,z=l()(E,[v],{}),Y=l()(z,["schema","displayName"],""),q=l()(z,"plugin"),ue=v?"relation":W,te=()=>{A||t!==!1&&y(i,$||c||d,s,g,a)};let S;return $&&c?S=2:c?S=1:S=0,e.createElement(_e,{as:"tr",...(0,r.X7)({fn:te,condition:V&&t&&!A})},e.createElement("td",{style:{position:"relative"}},S!==0&&e.createElement(Ye,{color:m?"primary200":"neutral150"}),e.createElement(p.k,{paddingLeft:2,gap:4},e.createElement(et.Z,{type:ue,customField:a}),e.createElement(M.Z,{fontWeight:"bold"},s))),e.createElement("td",null,v?e.createElement(M.Z,null,U({id:(0,C.Z)(`modelPage.attribute.${A?"relation-polymorphic":"relationWith"}`),defaultMessage:"Relation with"}),"\xA0",e.createElement("span",{style:{fontStyle:"italic"}},e.createElement(qe,{content:Y}),"\xA0",q&&`(${U({id:(0,C.Z)("from"),defaultMessage:"from"})}: ${q})`)):e.createElement(tt,{type:g,customField:a,repeatable:P})),e.createElement("td",null,V?e.createElement(p.k,{justifyContent:"flex-end",...r.UW},t?e.createElement(p.k,{gap:1},!A&&e.createElement(Te.h,{onClick:te,label:`${U({id:"app.utils.edit",defaultMessage:"Edit"})} ${s}`,noBorder:!0,icon:e.createElement(Q.Z,null)}),e.createElement(Te.h,{onClick:ne=>{ne.stopPropagation(),O(i,s,$||c||"")},label:`${U({id:"global.delete",defaultMessage:"Delete"})} ${s}`,noBorder:!0,icon:e.createElement(Ke.Z,null)})):e.createElement(Xe,null)):e.createElement(u.x,{height:(0,r.Q1)(32)})))}me.defaultProps={configurable:!0,customField:null,firstLoopComponentUid:null,isFromDynamicZone:!1,onClick(){},relation:"",repeatable:!1,secondLoopComponentUid:null,target:null,targetUid:null,type:null},me.propTypes={configurable:o().bool,customField:o().string,editTarget:o().string.isRequired,firstLoopComponentUid:o().string,isFromDynamicZone:o().bool,name:o().string.isRequired,onClick:o().func,relation:o().string,repeatable:o().bool,secondLoopComponentUid:o().string,target:o().string,targetUid:o().string,type:o().string};var nt=(0,e.memo)(me),ot=t=>{let a;switch(t){case"date":case"datetime":case"time":case"timestamp":a="date";break;case"integer":case"biginteger":case"decimal":case"float":a="number";break;case"string":case"text":a="text";break;case"":a="relation";break;default:a=t}return a},at=n(2669);const rt={collectionTypesConfigurations:[{action:"plugin::content-manager.collection-types.configure-view",subject:null}],componentsConfigurations:[{action:"plugin::content-manager.components.configure-layout",subject:null}],singleTypesConfigurations:[{action:"plugin::content-manager.single-types.configure-view",subject:null}]},pe=({disabled:t,isTemporary:a,isInContentTypeView:i,contentTypeKind:c,targetUid:m})=>{const{formatMessage:s}=(0,F.Z)(),{push:y}=(0,J.k6)(),{collectionTypesConfigurations:k,componentsConfigurations:P,singleTypesConfigurations:$}=rt,v=s({id:"content-type-builder.form.button.configure-view"});let d=k;const g=()=>(a||y(i?`/content-manager/collectionType/${m}/configurations/edit`:`/content-manager/components/${m}/configurations/edit`),!1);return i&&c==="singleType"&&(d=$),i||(d=P),e.createElement(r.jW,{permissions:d},e.createElement(w.z,{startIcon:e.createElement(at.Z,null),variant:"tertiary",onClick:g,disabled:a||t},v))};pe.defaultProps={contentTypeKind:"collectionType",isInContentTypeView:!0,isTemporary:!1,targetUid:""},pe.propTypes={disabled:o().bool.isRequired,contentTypeKind:o().string,isInContentTypeView:o().bool,isTemporary:o().bool,targetUid:o().string};var lt=(0,e.memo)(pe),it=()=>{const{initialData:t,modifiedData:a,isInDevelopmentMode:i,isInContentTypeView:c,submitData:m}=(0,H.Z)(),{formatMessage:s}=(0,F.Z)(),{trackUsage:y}=(0,r.rS)(),k=(0,J.$B)("/plugins/content-type-builder/:kind/:currentUID"),{onOpenModalAddComponentsToDZ:P,onOpenModalAddField:$,onOpenModalEditField:v,onOpenModalEditSchema:d,onOpenModalEditCustomField:g}=(0,ye.Z)(),E=c?"contentType":"component",V=[E,"schema","attributes"],O=l()(a,[E,"uid"]),U=l()(a,[E,"isTemporary"],!1),A=l()(a,[E,"schema","kind"],null),W=l()(a,V,[]),z=Z()(t,[E,"plugin"]),Y=!b()(a,t),q=c?"contentType":"component",ue=I=>{P({dynamicZoneTarget:I,targetUid:O})},te=async(I,$e,De,Le,we)=>{const je=ot(Le);we?g({forTarget:I,targetUid:$e,attributeName:De,attributeType:je,customFieldUid:we}):v({forTarget:I,targetUid:$e,attributeName:De,attributeType:je,step:Le==="component"?"2":null})};let S=l()(a,[E,"schema","displayName"],"");const ne=l()(a,[E,"schema","kind"],""),oe=k?.params.currentUID==="create-content-type";!S&&oe&&(S=s({id:(0,C.Z)("button.model.create"),defaultMessage:"Create new collection type"}));const st=()=>{const I=ne||E;I==="collectionType"&&y("willEditNameOfContentType"),I==="singleType"&&y("willEditNameOfSingleType"),d({modalType:E,forTarget:E,targetUid:O,kind:I})};return e.createElement(e.Fragment,null,e.createElement(J.NL,{message:s({id:(0,C.Z)("prompt.unsaved")}),when:Y}),e.createElement(L.T,{id:"title",primaryAction:i&&e.createElement(p.k,{gap:2},!oe&&e.createElement(w.z,{startIcon:e.createElement(f.Z,null),variant:"secondary",onClick:()=>{$({forTarget:q,targetUid:O})}},s({id:(0,C.Z)("button.attributes.add.another")})),e.createElement(w.z,{startIcon:e.createElement(R.Z,null),onClick:()=>m(),type:"submit",disabled:b()(a,t)},s({id:"global.save",defaultMessage:"Save"}))),secondaryAction:i&&!z&&!oe&&e.createElement(w.z,{startIcon:e.createElement(Q.Z,null),variant:"tertiary",onClick:st},s({id:"app.utils.edit",defaultMessage:"Edit"})),title:N()(S),subtitle:s({id:(0,C.Z)("listView.headerLayout.description"),defaultMessage:"Build the data architecture of your content"}),navigationAction:e.createElement(r.rU,{startIcon:e.createElement(G.Z,null),to:"/plugins/content-type-builder/"},s({id:"global.back",defaultMessage:"Back"}))}),e.createElement(j.D,null,e.createElement(p.k,{direction:"column",alignItems:"stretch",gap:4},e.createElement(p.k,{justifyContent:"flex-end"},e.createElement(p.k,{gap:2},e.createElement(lt,{key:"link-to-cm-settings-view",targetUid:O,isTemporary:U,isInContentTypeView:c,contentTypeKind:A,disabled:oe}))),e.createElement(u.x,{background:"neutral0",shadow:"filterShadow",hasRadius:!0},e.createElement(be,{items:W,customRowComponent:I=>e.createElement(nt,{...I,onClick:te}),addComponentToDZ:ue,targetUid:O,editTarget:q,isMain:!0})))))}},17e3:function(X,D,n){n.d(D,{D:function(){return f}});var e=n(74512),r=n(72850);const f=({children:R})=>(0,e.jsx)(r.x,{paddingLeft:10,paddingRight:10,children:R})},82055:function(X,D,n){n.d(D,{T:function(){return j}});var e=n(74512),r=n(32735),f=n(8471);const R=l=>{const h=(0,r.useRef)(null),[Z,x]=(0,r.useState)(!0),b=([B])=>{x(B.isIntersecting)};return(0,r.useEffect)(()=>{const B=h.current,N=new IntersectionObserver(b,l);return B&&N.observe(h.current),()=>{B&&N.disconnect()}},[h,l]),[h,Z]};var Q=n(63060);const G=(l,h)=>{const Z=(0,Q.W)(h);(0,r.useLayoutEffect)(()=>{const x=new ResizeObserver(Z);return Array.isArray(l)?l.forEach(b=>{b.current&&x.observe(b.current)}):l.current&&x.observe(l.current),()=>{x.disconnect()}},[l,Z])};var L=n(72850),p=n(87933),w=n(49372);const j=l=>{const h=(0,r.useRef)(null),[Z,x]=(0,r.useState)(null),[b,B]=R({root:null,rootMargin:"0px",threshold:0});return G(b,()=>{b.current&&x(b.current.getBoundingClientRect())}),(0,r.useEffect)(()=>{h.current&&x(h.current.getBoundingClientRect())},[h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:Z?.height},ref:b,children:B&&(0,e.jsx)(K,{ref:h,...l})}),!B&&(0,e.jsx)(K,{...l,sticky:!0,width:Z?.width})]})};j.displayName="HeaderLayout";const u=(0,f.ZP)(L.x)`
|
|
192
|
+
width: ${({width:l})=>l?`${l/16}rem`:void 0};
|
|
193
|
+
z-index: ${({theme:l})=>l.zIndices[1]};
|
|
194
|
+
`,K=r.forwardRef(({navigationAction:l,primaryAction:h,secondaryAction:Z,subtitle:x,title:b,sticky:B,width:N,...F},J)=>{const _=typeof x=="string";return B?(0,e.jsx)(u,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:N,"data-strapi-header-sticky":!0,children:(0,e.jsxs)(p.k,{justifyContent:"space-between",children:[(0,e.jsxs)(p.k,{children:[l&&(0,e.jsx)(L.x,{paddingRight:3,children:l}),(0,e.jsxs)(L.x,{children:[(0,e.jsx)(w.Z,{variant:"beta",as:"h1",...F,children:b}),_?(0,e.jsx)(w.Z,{variant:"pi",textColor:"neutral600",children:x}):x]}),Z?(0,e.jsx)(L.x,{paddingLeft:4,children:Z}):null]}),(0,e.jsx)(p.k,{children:h?(0,e.jsx)(L.x,{paddingLeft:2,children:h}):void 0})]})}):(0,e.jsxs)(L.x,{ref:J,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:l?6:8,background:"neutral100","data-strapi-header":!0,children:[l?(0,e.jsx)(L.x,{paddingBottom:2,children:l}):null,(0,e.jsxs)(p.k,{justifyContent:"space-between",children:[(0,e.jsxs)(p.k,{minWidth:0,children:[(0,e.jsx)(w.Z,{as:"h1",variant:"alpha",...F,children:b}),Z?(0,e.jsx)(L.x,{paddingLeft:4,children:Z}):null]}),h]}),_?(0,e.jsx)(w.Z,{variant:"epsilon",textColor:"neutral600",as:"p",children:x}):x]})})},73269:function(X,D,n){n.d(D,{c:function(){return w}});var e=n(74512),r=n(8471),f=n(72850),R=n(9026),Q=n(87933),G=n(49372);const L=(0,r.ZP)(f.x)`
|
|
195
|
+
height: ${24/16}rem;
|
|
196
|
+
width: ${24/16}rem;
|
|
197
|
+
border-radius: 50%;
|
|
198
|
+
display: flex;
|
|
199
|
+
justify-content: center;
|
|
200
|
+
align-items: center;
|
|
201
|
+
|
|
202
|
+
svg {
|
|
203
|
+
height: ${10/16}rem;
|
|
204
|
+
width: ${10/16}rem;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
svg path {
|
|
208
|
+
fill: ${({theme:j})=>j.colors.primary600};
|
|
209
|
+
}
|
|
210
|
+
`,p=(0,r.ZP)(f.x)`
|
|
211
|
+
border-radius: 0 0 ${({theme:j})=>j.borderRadius} ${({theme:j})=>j.borderRadius};
|
|
212
|
+
display: block;
|
|
213
|
+
width: 100%;
|
|
214
|
+
border: none;
|
|
215
|
+
`,w=({children:j,icon:u,...K})=>(0,e.jsxs)("div",{children:[(0,e.jsx)(R.i,{}),(0,e.jsx)(p,{as:"button",background:"primary100",padding:5,...K,children:(0,e.jsxs)(Q.k,{children:[(0,e.jsx)(L,{"aria-hidden":!0,background:"primary200",children:u}),(0,e.jsx)(f.x,{paddingLeft:3,children:(0,e.jsx)(G.Z,{variant:"pi",fontWeight:"bold",textColor:"primary600",children:j})})]})})]})},29439:function(X,D,n){n.d(D,{Z:function(){return f}});var e=n(74512);const r=R=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...R,children:(0,e.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"})}),f=r},2669:function(X,D,n){n.d(D,{Z:function(){return f}});var e=n(74512);const r=R=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...R,children:(0,e.jsx)("path",{fill:"#212134",d:"M4.8.2c0-.11.09-.2.2-.2h18.8c.11 0 .2.09.2.2v4.4a.2.2 0 0 1-.2.2H5a.2.2 0 0 1-.2-.2V.2ZM0 9.8c0-.11.09-.2.2-.2H19c.11 0 .2.09.2.2v4.4a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V9.8ZM5 19.2a.2.2 0 0 0-.2.2v4.4c0 .11.09.2.2.2h18.8a.2.2 0 0 0 .2-.2v-4.4a.2.2 0 0 0-.2-.2H5Z"})}),f=r}}]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1495],{97744:function(R,f,t){t.r(f),t.d(f,{default:function(){return k}});var e=t(32735),r=t(67879),o=t(24989),p=t(94638),S=t(27649),M=t(17e3),c=t(87933),h=t(72850),v=t(49372),T=t(15335),E=t(5803),Z=t(10369),n=t(41415),d=t(7961),u=t(60216),i=t.n(u),g=t(8471),m=t(68465),j=t(84967),a=t(85684);const A=g.ZP.a`
|
|
2
|
+
color: ${({theme:l})=>l.colors.primary600};
|
|
3
|
+
`,C=({config:l})=>{const{formatMessage:s}=(0,r.Z)();return e.createElement(c.k,{direction:"column",alignItems:"stretch",gap:4},e.createElement(c.k,{direction:"column",alignItems:"stretch",gap:1},e.createElement(v.Z,{variant:"delta",as:"h2"},s({id:(0,a.Z)("Settings.email.plugin.title.config"),defaultMessage:"Configuration"})),e.createElement(v.Z,null,s({id:(0,a.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,a.Z)("link"),defaultMessage:"Link"}))}))),e.createElement(T.r,{gap:5},e.createElement(E.P,{col:6,s:12},e.createElement(Z.o,{name:"shipper-email",label:s({id:(0,a.Z)("Settings.email.plugin.label.defaultFrom"),defaultMessage:"Default sender email"}),placeholder:s({id:(0,a.Z)("Settings.email.plugin.placeholder.defaultFrom"),defaultMessage:"ex: Strapi No-Reply '<'no-reply@strapi.io'>'"}),disabled:!0,onChange:()=>{},value:l.settings.defaultFrom})),e.createElement(E.P,{col:6,s:12},e.createElement(Z.o,{name:"response-email",label:s({id:(0,a.Z)("Settings.email.plugin.label.defaultReplyTo"),defaultMessage:"Default response email"}),placeholder:s({id:(0,a.Z)("Settings.email.plugin.placeholder.defaultReplyTo"),defaultMessage:"ex: Strapi '<'example@strapi.io'>'"}),disabled:!0,onChange:()=>{},value:l.settings.defaultReplyTo})),e.createElement(E.P,{col:6,s:12},e.createElement(m.P,{name:"email-provider",label:s({id:(0,a.Z)("Settings.email.plugin.label.provider"),defaultMessage:"Email provider"}),disabled:!0,onChange:()=>{},value:l.provider},e.createElement(j.W,{value:l.provider},l.provider)))))};C.propTypes={config:i().shape({provider:i().string,settings:i().shape({defaultFrom:i().string,defaultReplyTo:i().string})}).isRequired};var U=C,B=t(24346),I=B.Ry().shape({email:B.Z_().email(o.I0.email).required(o.I0.required)}),$=t(59990);const w=async()=>{const{get:l}=(0,o.tg)(),{data:s}=await l("/email/settings");return s.config},z=async l=>{const{post:s}=(0,o.tg)();await s("/email/test",l)};var N=t(82055),P=()=>{const{formatMessage:l}=(0,r.Z)();return e.createElement(e.Fragment,null,e.createElement(o.SL,{name:l({id:(0,a.Z)("Settings.email.plugin.title"),defaultMessage:"Configuration"})}),e.createElement(N.T,{id:"title",title:l({id:(0,a.Z)("Settings.email.plugin.title"),defaultMessage:"Configuration"}),subtitle:l({id:(0,a.Z)("Settings.email.plugin.subTitle"),defaultMessage:"Test the settings for the Email plugin"})}))};const V=()=>e.createElement(o.O4,{permissions:$.Z.settings},e.createElement(G,null)),G=()=>{const l=(0,o.lm)(),{formatMessage:s}=(0,r.Z)(),{lockApp:J,unlockApp:Q}=(0,o.o1)(),{notifyStatus:D}=(0,p.G)();(0,o.go)();const[b,X]=(0,e.useState)({}),[Y,O]=(0,e.useState)(!1),[F,W]=(0,e.useState)(!1),[x,H]=(0,e.useState)(""),[q,K]=(0,e.useState)(!1),[_,ee]=(0,e.useState)({provider:"",settings:{defaultFrom:"",defaultReplyTo:"",testAddress:""}});(0,e.useEffect)(()=>{O(!0),w().then(y=>{D(s({id:(0,a.Z)("Settings.email.plugin.notification.data.loaded"),defaultMessage:"Email settings data has been loaded"})),ee(y);const L=y?.settings?.testAddress;L&&H(L)}).catch(()=>l({type:"warning",message:s({id:(0,a.Z)("Settings.email.plugin.notification.config.error"),defaultMessage:"Failed to retrieve the email config"})})).finally(()=>O(!1))},[s,l,D]),(0,e.useEffect)(()=>{b.email&&document.querySelector("#test-address-input").focus()},[b]),(0,e.useEffect)(()=>{I.validate({email:x},{abortEarly:!1}).then(()=>K(!0)).catch(()=>K(!1))},[x]);const te=y=>{H(()=>y.target.value)},ne=async y=>{y.preventDefault();try{await I.validate({email:x},{abortEarly:!1}),W(!0),J(),z({to:x}).then(()=>{l({type:"success",message:s({id:(0,a.Z)("Settings.email.plugin.notification.test.success"),defaultMessage:"Email test succeeded, check the {to} mailbox"},{to:x})})}).catch(()=>{l({type:"warning",message:s({id:(0,a.Z)("Settings.email.plugin.notification.test.error"),defaultMessage:"Failed to send a test mail to {to}"},{to:x})})}).finally(()=>{W(!1),Q()})}catch(L){X((0,o.CJ)(L))}};return Y?e.createElement(S.o,{labelledBy:"title","aria-busy":"true"},e.createElement(P,null),e.createElement(M.D,null,e.createElement(o.dO,null))):e.createElement(S.o,{labelledBy:"title","aria-busy":F},e.createElement(P,null),e.createElement(M.D,null,e.createElement("form",{onSubmit:ne},e.createElement(c.k,{direction:"column",alignItems:"stretch",gap:7},e.createElement(h.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},e.createElement(U,{config:_})),e.createElement(h.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},e.createElement(c.k,{direction:"column",alignItems:"stretch",gap:4},e.createElement(v.Z,{variant:"delta",as:"h2"},s({id:(0,a.Z)("Settings.email.plugin.title.test"),defaultMessage:"Test email delivery"})),e.createElement(T.r,{gap:5,alignItems:"end"},e.createElement(E.P,{col:6,s:12},e.createElement(Z.o,{id:"test-address-input",name:"test-address",onChange:te,label:s({id:(0,a.Z)("Settings.email.plugin.label.testAddress"),defaultMessage:"Recipient email"}),value:x,error:b.email?.id&&s({id:(0,a.Z)(`${b.email?.id}`),defaultMessage:"This is an invalid email"}),placeholder:s({id:(0,a.Z)("Settings.email.plugin.placeholder.testAddress"),defaultMessage:"ex: developer@example.com"})})),e.createElement(E.P,{col:7,s:12},e.createElement(n.z,{loading:F,disabled:!q,type:"submit",startIcon:e.createElement(d.Z,null)},s({id:(0,a.Z)("Settings.email.plugin.button.test-email"),defaultMessage:"Send test email"}))))))))))};var k=V},17e3:function(R,f,t){t.d(f,{D:function(){return o}});var e=t(74512),r=t(72850);const o=({children:p})=>(0,e.jsx)(r.x,{paddingLeft:10,paddingRight:10,children:p})},82055:function(R,f,t){t.d(f,{T:function(){return T}});var e=t(74512),r=t(32735),o=t(8471);const p=n=>{const d=(0,r.useRef)(null),[u,i]=(0,r.useState)(!0),g=([m])=>{i(m.isIntersecting)};return(0,r.useEffect)(()=>{const m=d.current,j=new IntersectionObserver(g,n);return m&&j.observe(d.current),()=>{m&&j.disconnect()}},[d,n]),[d,u]};var S=t(63060);const M=(n,d)=>{const u=(0,S.W)(d);(0,r.useLayoutEffect)(()=>{const i=new ResizeObserver(u);return Array.isArray(n)?n.forEach(g=>{g.current&&i.observe(g.current)}):n.current&&i.observe(n.current),()=>{i.disconnect()}},[n,u])};var c=t(72850),h=t(87933),v=t(49372);const T=n=>{const d=(0,r.useRef)(null),[u,i]=(0,r.useState)(null),[g,m]=p({root:null,rootMargin:"0px",threshold:0});return M(g,()=>{g.current&&i(g.current.getBoundingClientRect())}),(0,r.useEffect)(()=>{d.current&&i(d.current.getBoundingClientRect())},[d]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:u?.height},ref:g,children:m&&(0,e.jsx)(Z,{ref:d,...n})}),!m&&(0,e.jsx)(Z,{...n,sticky:!0,width:u?.width})]})};T.displayName="HeaderLayout";const E=(0,o.ZP)(c.x)`
|
|
4
|
+
width: ${({width:n})=>n?`${n/16}rem`:void 0};
|
|
5
|
+
z-index: ${({theme:n})=>n.zIndices[1]};
|
|
6
|
+
`,Z=r.forwardRef(({navigationAction:n,primaryAction:d,secondaryAction:u,subtitle:i,title:g,sticky:m,width:j,...a},A)=>{const C=typeof i=="string";return m?(0,e.jsx)(E,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:j,"data-strapi-header-sticky":!0,children:(0,e.jsxs)(h.k,{justifyContent:"space-between",children:[(0,e.jsxs)(h.k,{children:[n&&(0,e.jsx)(c.x,{paddingRight:3,children:n}),(0,e.jsxs)(c.x,{children:[(0,e.jsx)(v.Z,{variant:"beta",as:"h1",...a,children:g}),C?(0,e.jsx)(v.Z,{variant:"pi",textColor:"neutral600",children:i}):i]}),u?(0,e.jsx)(c.x,{paddingLeft:4,children:u}):null]}),(0,e.jsx)(h.k,{children:d?(0,e.jsx)(c.x,{paddingLeft:2,children:d}):void 0})]})}):(0,e.jsxs)(c.x,{ref:A,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:n?6:8,background:"neutral100","data-strapi-header":!0,children:[n?(0,e.jsx)(c.x,{paddingBottom:2,children:n}):null,(0,e.jsxs)(h.k,{justifyContent:"space-between",children:[(0,e.jsxs)(h.k,{minWidth:0,children:[(0,e.jsx)(v.Z,{as:"h1",variant:"alpha",...a,children:g}),u?(0,e.jsx)(c.x,{paddingLeft:4,children:u}):null]}),d]}),C?(0,e.jsx)(v.Z,{variant:"epsilon",textColor:"neutral600",as:"p",children:i}):i]})})},27649:function(R,f,t){t.d(f,{o:function(){return S}});var e=t(74512),r=t(8471),o=t(72850);const p=(0,r.ZP)(o.x)`
|
|
7
|
+
// To prevent global outline on focus visible to force an outline when Main is focused
|
|
8
|
+
&:focus-visible {
|
|
9
|
+
outline: none;
|
|
10
|
+
}
|
|
11
|
+
`,S=({labelledBy:M="main-content-title",...c})=>(0,e.jsx)(p,{"aria-labelledby":M,as:"main",id:"main-content",tabIndex:-1,...c})},7961:function(R,f,t){t.d(f,{Z:function(){return o}});var e=t(74512);const r=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"})]}),o=r}}]);
|