slice-machine-ui 1.23.2-beta.3 → 1.23.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +61 -38
- package/components/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +2 -2
- package/components/Navigation/ChangesListItem.tsx +14 -32
- package/out/404.html +1 -1
- package/out/_next/static/{RRBm5bm2F__Ws0vsvXhN6 → GqPZYfMQrQUPwvgI_rvdq}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/{183-aab7066c73ebde44.js → 183-4feb6bb3eddbc768.js} +1 -1
- package/out/_next/static/chunks/{318-2112803ca34b2f49.js → 318-34a2dea7cfd4661d.js} +1 -1
- package/out/_next/static/chunks/727-c5028806448c4387.js +1 -0
- package/out/_next/static/chunks/731-341869976a48a09a.js +1 -0
- package/out/_next/static/chunks/{904-9a4c1264727ae89a.js → 904-833eed675f19ab60.js} +1 -1
- package/out/_next/static/chunks/pages/{_app-9f3513533bb2dfb8.js → _app-4a63c0e108026c4d.js} +2 -2
- package/out/_next/static/chunks/pages/{changes-2a976f9efeb719aa.js → changes-92c84f6cac0285fd.js} +1 -1
- package/out/_next/static/chunks/pages/index-ca194b18d0e3930d.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-2d3d84de925b289e.js +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +3 -3
- package/src/domain/__tests__/customType.test.ts +179 -0
- package/src/domain/customType.ts +110 -2
- package/src/features/customTypes/PageTypeOnboarding.tsx +21 -26
- package/src/features/customTypes/actions/convertCustomToPageType.ts +14 -10
- package/src/features/customTypes/actions/createCustomType.ts +69 -0
- package/src/features/customTypes/actions/deleteCustomType.ts +13 -3
- package/src/features/customTypes/actions/renameCustomType.ts +10 -4
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +3 -1
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +8 -8
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +18 -17
- package/src/modules/availableCustomTypes/index.ts +26 -132
- package/src/modules/loading/types.ts +0 -3
- package/src/modules/modal/types.ts +0 -1
- package/src/modules/useSliceMachineActions.ts +72 -78
- package/src/modules/userContext/index.ts +3 -3
- package/src/redux/saga.ts +0 -2
- package/test/src/modules/availableCustomTypes/index.test.ts +4 -156
- package/out/_next/static/chunks/727-3a3bc32518778317.js +0 -1
- package/out/_next/static/chunks/731-501990ebe6a71b32.js +0 -1
- package/out/_next/static/chunks/pages/index-64cfb8b0948ba8ef.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-b2a9d773ce5d7739.js +0 -1
- package/src/features/customTypes/__tests__/createCustomType.test.ts +0 -159
- package/src/features/customTypes/customTypesTable/createCustomType.ts +0 -107
- package/test/components/CreateCustomTypeModal.test.tsx +0 -73
- /package/out/_next/static/{RRBm5bm2F__Ws0vsvXhN6 → GqPZYfMQrQUPwvgI_rvdq}/_ssgManifest.js +0 -0
package/out/_next/static/chunks/pages/{changes-2a976f9efeb719aa.js → changes-92c84f6cac0285fd.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[849],{21985:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changes",function(){return t(86217)}])},56577:function(e,n,t){"use strict";t.d(n,{z:function(){return u}});var s=t(62230),i=t(85244),r=t(98240),o=t(52322),c=t(2784),a=t(75289),l=function(e,n){return e?"".concat(e,"-").concat(n):""},d=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},u=(0,c.forwardRef)(function(e,n){var t=e.label,c=e.Icon,u=e.type,h=e.form,x=e.isLoading,m=void 0!==x&&x,f=e.disabled,p=e.onClick,g=e.sx,v=e.iconSize,y=void 0===v?16:v,j=e.iconFill,b=e.variant,C=void 0===b?"primary":b,_=(0,r.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,o.jsx)(a.zx,(0,i.Z)((0,s.Z)({ref:n,sx:(0,s.Z)((0,i.Z)((0,s.Z)({},void 0===g?{}:g),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),m?{cursor:"wait !important"}:{}),type:u,form:h,disabled:void 0!==f&&f||m,onClick:m?void 0:p,variant:C},_),{children:m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.$j,{size:y,color:d(C),"data-cy":l(_["data-cy"],"spinner")}),c&&t]}):(0,o.jsxs)(o.Fragment,{children:[c&&(0,o.jsx)(c,{size:y,fill:j,"data-cy":l(_["data-cy"],"icon")}),t]})}))})},59469:function(e,n,t){"use strict";var s=t(62230),i=t(52322),r=t(75289);n.Z=function(e){var n=e.elems,t=e.renderElem,o=e.defineElementKey,c=e.gridTemplateMinPx,a=e.gridGap,l=e.sx;return(0,i.jsx)(r.xu,{as:"section",sx:(0,s.Z)({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(void 0===c?"320px":c,", 1fr))"),gridGap:void 0===a?"16px":a,pt:2},l),children:n.map(function(e,n){return e?(0,i.jsx)("span",{children:t(e,n)},"".concat(o(e),"-").concat(n+1)):null})})}},86217:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ex}});var s=t(22710),i=t(99267),r=t(52322),o=t(22715),c=t(2784),a=t(88932),l=t(97729),d=t.n(l),u=t(65077),h=t(29930),x=t(951),m=t(75289),f=function(e){var n=e.children;return(0,r.jsx)(m.kC,{sx:{alignItems:"center",justifyContent:"space-between",mt:"8px",bg:"grey02",borderRadius:4,padding:"12px 16px",width:"100%"},children:n})},p=t(39097),g=t.n(p),v=t(7819),y=t(34728),j=t(67445),b=function(e){var n=e.ct,t=e.status,s=e.authStatus,i=e.isOnline;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.xu,{as:"td",style:{width:"40%"},children:(0,r.jsx)(m.xv,{sx:{fontWeight:500},children:n.label})}),(0,r.jsx)(m.xu,{as:"td",style:{width:"40%"},children:n.id}),(0,r.jsx)(m.xu,{as:"td",style:{width:"20%"},children:(0,r.jsx)(y.O,{authStatus:s,isOnline:i,modelStatus:t,modelType:"CustomType"})})]})},C=function(e){var n=e.customTypes,t=e.modelsStatuses,s=e.authStatus,i=e.isOnline;return(0,r.jsxs)(m.xu,{as:"table","data-legacy-component":!0,children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"transparent small",children:[(0,r.jsx)(m.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"Name"}),(0,r.jsx)(m.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"API ID"}),(0,r.jsx)(m.xu,{as:"th",sx:{width:"20%",fontWeight:600},children:"Status"})]})}),(0,r.jsx)("tbody",{children:n.map(function(e){return(0,v.TG)(e)?(0,r.jsx)(g(),{passHref:!0,href:j.cd[e.local.format].getBuilderPagePathname(e.local.id),legacyBehavior:!0,children:(0,r.jsx)("tr",{tabIndex:0,"data-cy":"custom-type-".concat(e.local.id),children:(0,r.jsx)(b,{ct:e.local,status:t.customTypes[e.local.id],authStatus:s,isOnline:i,modelsStatuses:t},e.local.id)})},e.local.id):(0,r.jsx)("tr",{tabIndex:0,className:"disabled","data-cy":"custom-type-".concat(e.remote.id),children:(0,r.jsx)(b,{ct:e.remote,status:t.customTypes[e.remote.id],authStatus:s,isOnline:i,modelsStatuses:t},e.remote.id)},e.remote.id)})})]})},_=t(59469),S=t(15836),T=t(5479),D=t(47731),w=t(32681),k=t(71749),Z=t(17329),z=t(81038);function O(e){return I.apply(this,arguments)}function I(){return(I=(0,s.Z)(function(e){var n;return(0,i.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,z.j.telemetry.getExperimentVariant(e)];case 1:return[2,t.sent()];case 2:return n=t.sent(),console.error("Error while trying to get experiment value",n),[2,void 0];case 3:return[2]}})})).apply(this,arguments)}var N=t(82770);function F(){var e,n=(0,Z.QT)(O,["slicemachine-dev-collaboration"]),t=(0,c.useState)(!1),s=t[0],i=t[1],a=null==n?void 0:n.payload;return((0,c.useEffect)(function(){(null==n?void 0:n.value)==="on"&&void 0!==a&&N.Xe.track({event:"dev-collab:workflow-stub-displayed"})},[n,a]),(null==n?void 0:n.value)!=="on"||void 0===a)?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.xu,{alignItems:"flex-start",border:{bottom:!0,left:!0,right:!0,top:!0},borderRadius:6,borderStyle:"dashed",flexDirection:"column",flexShrink:0,gap:8,padding:16,width:320,children:[(0,r.jsxs)(o.xu,{flexDirection:"column",gap:2,children:[(0,r.jsx)(o.xv,{variant:"smallBold",children:a.cardTitle}),(0,r.jsx)(o.xv,{color:"grey11",variant:"small",children:a.cardDescription})]}),(0,r.jsx)(o.zx,{color:"grey",onClick:function(){N.Xe.track({event:"dev-collab:set-up-workflow-opened"}),i(!0)},children:a.cardButtonLabel})]}),(0,r.jsxs)(o.Vq,{onOpenChange:function(e){e||i(!1)},open:s,size:{height:"auto",width:448},children:[(0,r.jsx)(o.fK,{title:a.dialogTitle}),(0,r.jsx)(o.cZ,{children:(0,r.jsxs)(o.xu,{flexDirection:"column",children:[(0,r.jsx)(o.xu,{flexDirection:"column",padding:16,children:(0,r.jsx)(o.xv,{children:a.dialogDescription})}),(0,r.jsx)(o.kX,{cancel:{text:"Cancel"},ok:{text:a.dialogButtonLabel,onClick:function(){N.Xe.track({event:"dev-collab:join-beta-clicked"}),window.open(a.dialogButtonLink,"_blank"),i(!1)}},size:"medium"})]})})]})]})}var E=function(e){var n=e.unSyncedCustomTypes,t=e.unSyncedSlices,s=e.modelsStatuses,i=e.authStatus,a=e.isOnline,l=(0,D.H)(),d=l.modalPayload,u=l.onOpenModal,h=d.sliceFilterFn,m=d.defaultVariationSelector,p=t.filter(function(e){return s.slices[e.model.id]!==w.G.Deleted});return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(o.xu,{gap:16,alignItems:"flex-start",children:[(0,r.jsxs)(o.xu,{flexDirection:"column",flexGrow:1,children:[n.length>0&&(0,r.jsxs)(o.xu,{flexDirection:"column",children:[(0,r.jsx)(f,{children:(0,r.jsxs)(o.xu,{children:[(0,r.jsx)(o.xv,{variant:"h5",children:"Types"}),(0,r.jsx)(o.xv,{variant:"h5",sx:{marginLeft:8},children:n.length})]})}),(0,r.jsx)(C,{customTypes:n,modelsStatuses:s,authStatus:i,isOnline:a})]}),t.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xu,{padding:{bottom:8},children:(0,r.jsxs)(f,{children:[(0,r.jsxs)(o.xu,{children:[(0,r.jsx)(o.xv,{variant:"h5",children:"Slices"}),(0,r.jsx)(o.xv,{variant:"h5",sx:{marginLeft:8},children:t.length})]}),(0,r.jsxs)(o.xu,{children:[t.some(function(e){return(0,T.cx)(e)>0&&s.slices[e.model.id]!==w.G.Deleted})&&(0,r.jsxs)(o.xv,{color:"amber11",sx:{marginRight:8,alignSelf:"center"},children:[(0,r.jsx)(x.sQg,{size:16,style:{marginRight:"4px",position:"relative",top:"3px"}}),"Missing Screenshots"]}),(0,r.jsxs)(o.zx,{color:"dark",onClick:function(){return u({sliceFilterFn:function(e){return e}})},children:[(0,r.jsx)(x.hOO,{style:{color:"#FFF",fontSize:"15px",position:"relative",top:"3px",marginRight:"4px"}})," ","Update all screenshots"]})]})]})}),(0,r.jsx)(_.Z,{gridGap:"32px 16px",elems:t,gridTemplateMinPx:"305px",defineElementKey:function(e){return e.model.name},renderElem:function(e){var n=s.slices[e.model.id];return(0,r.jsx)(k.b,{action:{type:"status",authStatus:i,isOnline:a,modelStatus:n},isDeleted:n===w.G.Deleted,mode:"navigation",onUpdateScreenshot:function(){u({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},slice:e,variant:"solid"})}}),(0,r.jsx)(S.Z,{slices:h(p),defaultVariationSelector:m})]})]}),(0,r.jsx)(o.SV,{children:(0,r.jsx)(c.Suspense,{children:(0,r.jsx)(F,{})})})]})})},R=t(91914),M=function(){return(0,r.jsx)(m.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,r.jsxs)(m.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,r.jsx)(R.wQ1,{size:48}),(0,r.jsx)(m.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px",textAlign:"center"},children:"No internet connection"}),(0,r.jsx)(m.xv,{sx:{fontSize:"13px",lineHeight:"24px",textAlign:"center"},children:"You need a stable internet connection to review and push changes"})]})})},A=t(90374),B=t(79096),G=function(e){var n=e.authStatus,t=(0,A.Z)().openLoginModal;return(0,r.jsxs)(o.xu,{flexDirection:"column",height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[n===B.t.FORBIDDEN?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xv,{variant:"h3",align:"center",children:"It seems like you are logged out"}),(0,r.jsx)(o.xv,{align:"center",children:"Log in to connect to your repository."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xv,{variant:"h3",align:"center",children:"It seems like you don't have access to this repository"}),(0,r.jsx)(o.xv,{align:"center",children:"Check that the repository name is correct, then contact your repository administrator."})]}),(0,r.jsxs)(o.xv,{align:"center",children:["If that doesn't work, it's possible that Slice Machine is having trouble accessing Prismic's servers."," ",(0,r.jsx)(o.hh,{href:"https://community.prismic.io/",children:"Contact our support team"}),"."]}),n===B.t.FORBIDDEN&&(0,r.jsx)(o.zx,{onClick:function(){return t()},children:"Log in to Prismic"})]})},L=t(5632),P=t.n(L),H=t(2754),V=t(34543),W=t(62230),X=t(85244),U=t(98240),Y=t(6277);t(25977);var K={primary:"_1ecs97dbc8 _1ecs97dbjl _1ecs97dbc2 _1ecs97dbjf _1ecs97dbca _1ecs97dbjn",secondary:"_1ecs97daji _1ecs97dah3 _1ecs97dajc _1ecs97dagx _1ecs97dajk _1ecs97dah5"},Q={normal:"ovkapw1",smallBold:"ovkapw2",inherit:"ovkapw3 _1ecs97df47"},$=function(e){var n=e.children,t=e.color,s=e.endIcon,i=e.href,a=e.textVariant,l=void 0===a?"smallBold":a,d=(0,U.Z)(e,["children","color","endIcon","href","textVariant"]);return(0,r.jsxs)("a",(0,X.Z)((0,W.Z)({href:i,target:"_blank",rel:"noreferrer"},d),{className:(0,Y.Z)("ovkapw0 _1ecs97dez0 _1ecs97df41 _1ecs97dez2 _1ecs97dez8",K[void 0===t?"primary":t]),children:[(0,r.jsx)(o.xv,{component:"span",color:"inherit",variant:l,children:n}),(0,c.isValidElement)(s)?(0,c.cloneElement)(s,{className:(0,Y.Z)(s.props.className,"_1ecs97dfhw",Q[l])}):null]}))},q=t(56580),J=t(39092),ee=function(){var e,n=(e=(0,q.v9)(function(e){return{repoName:(0,J.MY)(e)}}).repoName,"https://".concat(e,".prismic.io/documents/working"));return(0,r.jsxs)(H.R$,{style:{alignSelf:"center",marginTop:o.TV.size[72]},children:[(0,r.jsx)(H.u2,{children:(0,r.jsx)(o.Ee,{src:"/blank-slate-changes-uptodate.png",sizing:"cover"})}),(0,r.jsxs)(H.T9,{children:[(0,r.jsx)(H._T,{children:"Everything up-to-date"}),(0,r.jsx)(H.nf,{children:"You have no changes staged. Your changes appear here after you have saved them, while they're waiting to be pushed to the Page Builder. Ready to get going?"}),(0,r.jsxs)(H.Qj,{children:[(0,r.jsx)(o.zx,{onClick:function(){P().push("/")},children:"Create a page type"}),(0,r.jsx)($,{endIcon:(0,r.jsx)(V.AlO,{}),textVariant:"normal",href:n,children:"Create content"})]})]})]})},en=t(67764),et=t(56577),es=t(49471);t(78656);var ei=function(e){var n=e.ctName,t=e.numberOfDocuments,s=e.link,i=e.isOverLimit;return(0,r.jsxs)(m.Zb,{sx:{mb:12},variant:"drawerCard","data-cy":"AssociatedDocumentsCard-".concat(n),children:[(0,r.jsxs)(m.kC,{sx:{flexDirection:"column"},children:[(0,r.jsx)(m.xv,{children:n}),(0,r.jsxs)(m.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:[t," documents"]})]}),(0,r.jsx)(m.rU,{href:s,target:"_blank",variant:"cardSmall",sx:{color:void 0!==i&&i?"danger":"purple08"},children:"View documents"})]})},er=t(79797),eo=t(54132),ec=function(e){var n=e.isOpen,t=e.title,s=e.footer,i=e.explanations,o=e.onClose;return(0,r.jsx)(er.Z,{placement:"right",open:n,level:null,onClose:o,width:496,children:(0,r.jsx)(eo.Z,{radius:"0px",bodySx:{bg:"white",padding:24,flex:1,display:"flex",flexDirection:"column",overflow:"scroll"},footerSx:{p:0},sx:{flexDirection:"column",display:"flex",height:"100%",border:"none"},borderFooter:!0,Header:function(){return(0,r.jsxs)(m.kC,{sx:{p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:[(0,r.jsx)(m.kC,{sx:{alignItems:"center"},children:(0,r.jsx)(m.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:t})}),(0,r.jsx)(m.x8,{type:"button",onClick:function(){return o()}})]})},Footer:function(){return(0,r.jsx)(m.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center",paddingRight:16,borderTop:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorders))},backgroundColor:"white",padding:20},children:s})},children:i})})},ea=function(e){var n=e.onToggle,t=e.isConfirmed,s=e.sx;return(0,r.jsxs)(m.kC,{sx:(0,W.Z)({borderRadius:6,flexDirection:"column",backgroundColor:"grey03",padding:12,width:"100%"},s),children:[(0,r.jsx)(m.xv,{sx:{fontWeight:"bold",mb:2},children:"Are you sure to proceed?"}),(0,r.jsxs)(m.__,{sx:{mt:"4px",py:1},variant:"large",children:[(0,r.jsx)(m.XZ,{defaultChecked:t,onChange:n,variant:"forms.checkbox.dark"}),"Delete these Documents"]})]})},el=function(e){var n=e.pushChanges,t=e.modalData,s=e.onClose,i=(0,c.useState)(!1),o=i[0],a=i[1],l=(0,q.v9)(function(e){return{remoteOnlyCustomTypes:(0,es.Ch)(e).filter(v.yp)}}).remoteOnlyCustomTypes;if((null==t?void 0:t.type)!=="SOFT")return null;var d=t.details.customTypes.map(function(e){var n,t=l.find(function(n){return(0,v.n5)(n)===e.id});return void 0===t?null:(0,r.jsx)(ei,{isOverLimit:!0,ctName:null!==(n=t.remote.label)&&void 0!==n?n:t.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,r.jsx)(ec,{isOpen:"SOFT"===t.type,title:"Confirm deletion",onClose:s,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ea,{onToggle:function(){a(!o)},isConfirmed:o,sx:{mb:10}}),(0,r.jsx)(et.z,{label:"Push changes",variant:"primary",onClick:function(){n(o)},disabled:!o,sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})]}),explanations:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:"This action will also delete Documents."}),(0,r.jsxs)(m.xv,{sx:{mb:24},children:[t.details.customTypes.length>1?"These types have":"This type has"," ","associated Documents, which will also be deleted. This might create broken links in your repository."]}),d]})})},ed=function(e){var n=e.pushChanges,t=e.modalData,s=e.onClose,i=(0,q.v9)(function(e){return{remoteOnlyCustomTypes:(0,es.Ch)(e).filter(v.yp)}}).remoteOnlyCustomTypes;if((null==t?void 0:t.type)!=="HARD")return null;var o=t.details.customTypes.map(function(e){var n,t=i.find(function(n){return(0,v.n5)(n)===e.id});return void 0===t?null:(0,r.jsx)(ei,{isOverLimit:!0,ctName:null!==(n=t.remote.label)&&void 0!==n?n:t.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,r.jsx)(ec,{isOpen:"HARD"===t.type,title:"Manual action required",onClose:s,footer:(0,r.jsx)(et.z,{label:"Try again",variant:"primary",onClick:function(){n(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}}),explanations:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(m.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["Your type",t.details.customTypes.length>1&&"s"," cannot be deleted."]}),(0,r.jsxs)(m.xv,{sx:{mb:24},children:[t.details.customTypes.length>1?"These types have":"This type has"," ","too many associated Documents. Archive and delete these Documents manually and then try deleting the types again."]}),o]})})},eu=t(81541);function eh(){return(eh=(0,s.Z)(function(e){var n,t,s,r,o,c,a,l,d;return(0,i.__generator)(this,function(i){switch(i.label){case 0:return n=e.changedSlices,t=e.changedCustomTypes,r=void 0!==(s=e.confirmDeleteDocuments)&&s,o=Date.now(),c=n.map(function(e){return{id:e.slice.model.id,type:"Slice",libraryID:e.slice.from,status:e.status}}),a=t.map(function(e){return{id:e.customType.id,type:"CustomType",status:e.status}}),l={confirmDeleteDocuments:r,changes:(0,eu.Z)(c).concat((0,eu.Z)(a))},[4,(0,N.tI)(l)];case 1:var u,h,x,m,f,p,g,v,y,j;if(d=i.sent())return N.Xe.track({event:"changes:limit-reach",limitType:d.type}),[2,d];return h=(u={changedCustomTypes:t,changedSlices:n,hasDeletedDocuments:r,startTime:o}).startTime,x=u.hasDeletedDocuments,m=u.changedCustomTypes,f=u.changedSlices,p=m.reduce(function(e,n){return n.status===w.G.New?(0,X.Z)((0,W.Z)({},e),{customTypesCreated:e.customTypesCreated+1}):n.status===w.G.Modified?(0,X.Z)((0,W.Z)({},e),{customTypesModified:e.customTypesModified+1}):n.status===w.G.Deleted?(0,X.Z)((0,W.Z)({},e),{customTypesDeleted:e.customTypesDeleted+1}):e},{customTypesCreated:0,customTypesModified:0,customTypesDeleted:0}),g=f.reduce(function(e,n){return n.status===w.G.New?(0,X.Z)((0,W.Z)({},e),{slicesCreated:e.slicesCreated+1}):n.status===w.G.Modified?(0,X.Z)((0,W.Z)({},e),{slicesModified:e.slicesModified+1}):n.status===w.G.Deleted?(0,X.Z)((0,W.Z)({},e),{slicesDeleted:e.slicesDeleted+1}):e},{slicesCreated:0,slicesModified:0,slicesDeleted:0}),v=f.length+m.length,y=f.reduce(function(e,n){return e+(0,T.cx)(n.slice)},0),j=Date.now()-h,N.Xe.track((0,X.Z)((0,W.Z)({event:"changes:pushed"},p,g),{total:v,missingScreenshots:y,duration:j,hasDeletedDocuments:x,_includeEnvironmentKind:!0})),[2,void 0]}})})).apply(this,arguments)}var ex=function(){var e,n=(0,en.X)(),t=n.unSyncedSlices,l=n.unSyncedCustomTypes,x=n.modelsStatuses,m=n.authStatus,f=n.isOnline,p=(0,c.useMemo)(function(){var e;return{changedSlices:t.map(function(e){return{slice:e,status:x.slices[e.model.id]}}).filter(function(e){return en.O.includes(e.status)}),changedCustomTypes:l.map(function(e){return(0,v.TG)(e)?e.local:e.remote}).map(function(e){return{customType:e,status:x.customTypes[e.id]}}).filter(function(e){return en.O.includes(e.status)})}},[t,l,x]),g=p.changedSlices,y=p.changedCustomTypes,j=(0,A.Z)(),b=j.pushChangesSuccess,C=j.refreshState,_=(0,c.useState)(!1),S=_[0],T=_[1],D=(0,c.useState)(void 0),w=D[0],k=D[1],Z=t.length+l.length,z=(e=(0,s.Z)(function(e){var n,t,s;return(0,i.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),T(!0),k(void 0),[4,function(e){return eh.apply(this,arguments)}({confirmDeleteDocuments:e,changedSlices:g,changedCustomTypes:y})];case 1:if(!(void 0!==(n=i.sent())))return[3,2];return k(n),[3,4];case 2:return[4,(0,N.y0)()];case 3:C({env:(t=i.sent()).env,remoteCustomTypes:t.remoteCustomTypes,customTypes:t.customTypes,libraries:t.libraries,remoteSlices:t.remoteSlices,clientError:t.clientError}),b(),a.Am.success("All slices and types have been pushed"),i.label=4;case 4:return[3,6];case 5:return s=i.sent(),console.error("Something went wrong when manually pushing your changes",s),a.Am.error("Something went wrong when pushing your changes. Check your terminal logs."),[3,6];case 6:return T(!1),[2]}})}),function(n){return e.apply(this,arguments)}),O=(0,c.useMemo)(function(){return f?m===B.t.UNAUTHORIZED||m===B.t.FORBIDDEN?(0,r.jsx)(G,{authStatus:m}):0===Z?(0,r.jsx)(ee,{}):(0,r.jsx)(E,{unSyncedSlices:t,unSyncedCustomTypes:l,modelsStatuses:x,authStatus:m,isOnline:f}):(0,r.jsx)(M,{})},[f,m,Z,t,l,x,]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d(),{children:(0,r.jsx)("title",{children:"Changes - Slice Machine"})}),(0,r.jsxs)(h.LN,{children:[(0,r.jsxs)(h.wd,{children:[(0,r.jsx)(h.Cx,{folder:"Changes"}),(0,r.jsx)(h.K2,{children:(0,r.jsx)(o.zx,{onClick:function(){z(!1)},loading:S,disabled:0===Z||!f||m===B.t.UNAUTHORIZED||m===B.t.FORBIDDEN||S,"data-cy":"push-changes",children:"Push Changes"})})]}),(0,r.jsx)(h.RN,{children:(0,r.jsxs)(u.xR,{sx:{display:"flex",flexDirection:"column"},children:[O,(0,r.jsx)(el,{pushChanges:function(e){z(e)},modalData:w,onClose:function(){return k(void 0)}}),(0,r.jsx)(ed,{pushChanges:function(e){z(e)},modalData:w,onClose:function(){return k(void 0)}})]})})]})]})}},2754:function(e,n,t){"use strict";t.d(n,{R$:function(){return d},Qj:function(){return f},T9:function(){return h},nf:function(){return m},u2:function(){return u},_T:function(){return x}});var s=t(67557),i=t(62230),r=t(85244),o=t(98240),c=t(52322),a=t(6277),l=t(22715);t(69143);var d=function(e){var n=e.backgroundImage,t=e.style,l=(0,o.Z)(e,["backgroundImage","style"]),d=void 0!==n;return(0,c.jsx)("article",(0,r.Z)((0,i.Z)({},l),{className:(0,a.Z)("_18bjhbz0 _1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97dfiv _1ecs97dfix _1ecs97dfiz _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dezp",(0,s.Z)({},"_18bjhbz1 _1ecs97dezx _1ecs97df4v",d)),style:(0,i.Z)({backgroundImage:d?"url(".concat(n,")"):void 0},t)}))},u=function(e){return(0,c.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97d6r8 _1ecs97d6yl _1ecs97df29 _1ecs97df2l _1ecs97dezp"}))},h=function(e){return(0,c.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz3 _1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97dffv"}))},x=function(e){return(0,c.jsx)(l.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz4"}))},m=function(e){return(0,c.jsx)(l.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz5",color:"grey11"}))},f=function(e){return(0,c.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz6 _1ecs97dez0 _1ecs97dez8 _1ecs97dez1 _1ecs97dez2 _1ecs97df95 _1ecs97dfdl",color:"grey"}))}},69143:function(){},25977:function(){}},function(e){e.O(0,[898,789,123,543,918,25,286,774,888,179],function(){return e(e.s=21985)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[849],{21985:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changes",function(){return t(86217)}])},56577:function(e,n,t){"use strict";t.d(n,{z:function(){return u}});var s=t(62230),i=t(85244),r=t(98240),o=t(52322),c=t(2784),a=t(75289),l=function(e,n){return e?"".concat(e,"-").concat(n):""},d=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},u=(0,c.forwardRef)(function(e,n){var t=e.label,c=e.Icon,u=e.type,h=e.form,x=e.isLoading,m=void 0!==x&&x,f=e.disabled,p=e.onClick,g=e.sx,v=e.iconSize,y=void 0===v?16:v,j=e.iconFill,b=e.variant,C=void 0===b?"primary":b,_=(0,r.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,o.jsx)(a.zx,(0,i.Z)((0,s.Z)({ref:n,sx:(0,s.Z)((0,i.Z)((0,s.Z)({},void 0===g?{}:g),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),m?{cursor:"wait !important"}:{}),type:u,form:h,disabled:void 0!==f&&f||m,onClick:m?void 0:p,variant:C},_),{children:m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.$j,{size:y,color:d(C),"data-cy":l(_["data-cy"],"spinner")}),c&&t]}):(0,o.jsxs)(o.Fragment,{children:[c&&(0,o.jsx)(c,{size:y,fill:j,"data-cy":l(_["data-cy"],"icon")}),t]})}))})},59469:function(e,n,t){"use strict";var s=t(62230),i=t(52322),r=t(75289);n.Z=function(e){var n=e.elems,t=e.renderElem,o=e.defineElementKey,c=e.gridTemplateMinPx,a=e.gridGap,l=e.sx;return(0,i.jsx)(r.xu,{as:"section",sx:(0,s.Z)({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(void 0===c?"320px":c,", 1fr))"),gridGap:void 0===a?"16px":a,pt:2},l),children:n.map(function(e,n){return e?(0,i.jsx)("span",{children:t(e,n)},"".concat(o(e),"-").concat(n+1)):null})})}},86217:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ex}});var s=t(22710),i=t(99267),r=t(52322),o=t(22715),c=t(2784),a=t(88932),l=t(97729),d=t.n(l),u=t(65077),h=t(29930),x=t(951),m=t(75289),f=function(e){var n=e.children;return(0,r.jsx)(m.kC,{sx:{alignItems:"center",justifyContent:"space-between",mt:"8px",bg:"grey02",borderRadius:4,padding:"12px 16px",width:"100%"},children:n})},p=t(39097),g=t.n(p),v=t(7819),y=t(34728),j=t(67445),b=function(e){var n=e.ct,t=e.status,s=e.authStatus,i=e.isOnline;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.xu,{as:"td",style:{width:"40%"},children:(0,r.jsx)(m.xv,{sx:{fontWeight:500},children:n.label})}),(0,r.jsx)(m.xu,{as:"td",style:{width:"40%"},children:n.id}),(0,r.jsx)(m.xu,{as:"td",style:{width:"20%"},children:(0,r.jsx)(y.O,{authStatus:s,isOnline:i,modelStatus:t,modelType:"CustomType"})})]})},C=function(e){var n=e.customTypes,t=e.modelsStatuses,s=e.authStatus,i=e.isOnline;return(0,r.jsxs)(m.xu,{as:"table","data-legacy-component":!0,children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"transparent small",children:[(0,r.jsx)(m.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"Name"}),(0,r.jsx)(m.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"API ID"}),(0,r.jsx)(m.xu,{as:"th",sx:{width:"20%",fontWeight:600},children:"Status"})]})}),(0,r.jsx)("tbody",{children:n.map(function(e){return(0,v.TG)(e)?(0,r.jsx)(g(),{passHref:!0,href:j.cd[e.local.format].getBuilderPagePathname(e.local.id),legacyBehavior:!0,children:(0,r.jsx)("tr",{tabIndex:0,"data-cy":"custom-type-".concat(e.local.id),children:(0,r.jsx)(b,{ct:e.local,status:t.customTypes[e.local.id],authStatus:s,isOnline:i,modelsStatuses:t},e.local.id)})},e.local.id):(0,r.jsx)("tr",{tabIndex:0,className:"disabled","data-cy":"custom-type-".concat(e.remote.id),children:(0,r.jsx)(b,{ct:e.remote,status:t.customTypes[e.remote.id],authStatus:s,isOnline:i,modelsStatuses:t},e.remote.id)},e.remote.id)})})]})},_=t(59469),S=t(15836),T=t(5479),D=t(47731),w=t(32681),k=t(71749),Z=t(17329),z=t(81038);function O(e){return I.apply(this,arguments)}function I(){return(I=(0,s.Z)(function(e){var n;return(0,i.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,z.j.telemetry.getExperimentVariant(e)];case 1:return[2,t.sent()];case 2:return n=t.sent(),console.error("Error while trying to get experiment value",n),[2,void 0];case 3:return[2]}})})).apply(this,arguments)}var N=t(82770);function F(){var e,n=(0,Z.QT)(O,["slicemachine-dev-collaboration"]),t=(0,c.useState)(!1),s=t[0],i=t[1],a=null==n?void 0:n.payload;return((0,c.useEffect)(function(){(null==n?void 0:n.value)==="on"&&void 0!==a&&N.Xe.track({event:"dev-collab:workflow-stub-displayed"})},[n,a]),(null==n?void 0:n.value)!=="on"||void 0===a)?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.xu,{alignItems:"flex-start",border:{bottom:!0,left:!0,right:!0,top:!0},borderRadius:6,borderStyle:"dashed",flexDirection:"column",flexShrink:0,gap:8,padding:16,width:320,children:[(0,r.jsxs)(o.xu,{flexDirection:"column",gap:2,children:[(0,r.jsx)(o.xv,{variant:"smallBold",children:a.cardTitle}),(0,r.jsx)(o.xv,{color:"grey11",variant:"small",children:a.cardDescription})]}),(0,r.jsx)(o.zx,{color:"grey",onClick:function(){N.Xe.track({event:"dev-collab:set-up-workflow-opened"}),i(!0)},children:a.cardButtonLabel})]}),(0,r.jsxs)(o.Vq,{onOpenChange:function(e){e||i(!1)},open:s,size:{height:"auto",width:448},children:[(0,r.jsx)(o.fK,{title:a.dialogTitle}),(0,r.jsx)(o.cZ,{children:(0,r.jsxs)(o.xu,{flexDirection:"column",children:[(0,r.jsx)(o.xu,{flexDirection:"column",padding:16,children:(0,r.jsx)(o.xv,{children:a.dialogDescription})}),(0,r.jsx)(o.kX,{cancel:{text:"Cancel"},ok:{text:a.dialogButtonLabel,onClick:function(){N.Xe.track({event:"dev-collab:join-beta-clicked"}),window.open(a.dialogButtonLink,"_blank"),i(!1)}},size:"medium"})]})})]})]})}var E=function(e){var n=e.unSyncedCustomTypes,t=e.unSyncedSlices,s=e.modelsStatuses,i=e.authStatus,a=e.isOnline,l=(0,D.H)(),d=l.modalPayload,u=l.onOpenModal,h=d.sliceFilterFn,m=d.defaultVariationSelector,p=t.filter(function(e){return s.slices[e.model.id]!==w.G.Deleted});return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(o.xu,{gap:16,alignItems:"flex-start",children:[(0,r.jsxs)(o.xu,{flexDirection:"column",flexGrow:1,children:[n.length>0&&(0,r.jsxs)(o.xu,{flexDirection:"column",children:[(0,r.jsx)(f,{children:(0,r.jsxs)(o.xu,{children:[(0,r.jsx)(o.xv,{variant:"h5",children:"Types"}),(0,r.jsx)(o.xv,{variant:"h5",sx:{marginLeft:8},children:n.length})]})}),(0,r.jsx)(C,{customTypes:n,modelsStatuses:s,authStatus:i,isOnline:a})]}),t.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xu,{padding:{bottom:8},children:(0,r.jsxs)(f,{children:[(0,r.jsxs)(o.xu,{children:[(0,r.jsx)(o.xv,{variant:"h5",children:"Slices"}),(0,r.jsx)(o.xv,{variant:"h5",sx:{marginLeft:8},children:t.length})]}),(0,r.jsxs)(o.xu,{children:[t.some(function(e){return(0,T.cx)(e)>0&&s.slices[e.model.id]!==w.G.Deleted})&&(0,r.jsxs)(o.xv,{color:"amber11",sx:{marginRight:8,alignSelf:"center"},children:[(0,r.jsx)(x.sQg,{size:16,style:{marginRight:"4px",position:"relative",top:"3px"}}),"Missing Screenshots"]}),(0,r.jsxs)(o.zx,{color:"dark",onClick:function(){return u({sliceFilterFn:function(e){return e}})},children:[(0,r.jsx)(x.hOO,{style:{color:"#FFF",fontSize:"15px",position:"relative",top:"3px",marginRight:"4px"}})," ","Update all screenshots"]})]})]})}),(0,r.jsx)(_.Z,{gridGap:"32px 16px",elems:t,gridTemplateMinPx:"305px",defineElementKey:function(e){return e.model.name},renderElem:function(e){var n=s.slices[e.model.id];return(0,r.jsx)(k.b,{action:{type:"status",authStatus:i,isOnline:a,modelStatus:n},isDeleted:n===w.G.Deleted,mode:"navigation",onUpdateScreenshot:function(){u({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},slice:e,variant:"solid"})}}),(0,r.jsx)(S.Z,{slices:h(p),defaultVariationSelector:m})]})]}),(0,r.jsx)(o.SV,{children:(0,r.jsx)(c.Suspense,{children:(0,r.jsx)(F,{})})})]})})},R=t(91914),M=function(){return(0,r.jsx)(m.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,r.jsxs)(m.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,r.jsx)(R.wQ1,{size:48}),(0,r.jsx)(m.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px",textAlign:"center"},children:"No internet connection"}),(0,r.jsx)(m.xv,{sx:{fontSize:"13px",lineHeight:"24px",textAlign:"center"},children:"You need a stable internet connection to review and push changes"})]})})},A=t(90374),B=t(79096),G=function(e){var n=e.authStatus,t=(0,A.Z)().openLoginModal;return(0,r.jsxs)(o.xu,{flexDirection:"column",height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[n===B.t.FORBIDDEN?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xv,{variant:"h3",align:"center",children:"It seems like you are logged out"}),(0,r.jsx)(o.xv,{align:"center",children:"Log in to connect to your repository."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xv,{variant:"h3",align:"center",children:"It seems like you don't have access to this repository"}),(0,r.jsx)(o.xv,{align:"center",children:"Check that the repository name is correct, then contact your repository administrator."})]}),(0,r.jsxs)(o.xv,{align:"center",children:["If that doesn't work, it's possible that Slice Machine is having trouble accessing Prismic's servers."," ",(0,r.jsx)(o.hh,{href:"https://community.prismic.io/",children:"Contact our support team"}),"."]}),n===B.t.FORBIDDEN&&(0,r.jsx)(o.zx,{onClick:function(){return t()},children:"Log in to Prismic"})]})},L=t(5632),P=t.n(L),H=t(2754),V=t(34543),W=t(62230),X=t(85244),U=t(98240),Y=t(6277);t(25977);var K={primary:"_1ecs97dbc8 _1ecs97dbjl _1ecs97dbc2 _1ecs97dbjf _1ecs97dbca _1ecs97dbjn",secondary:"_1ecs97daji _1ecs97dah3 _1ecs97dajc _1ecs97dagx _1ecs97dajk _1ecs97dah5"},Q={normal:"ovkapw1",smallBold:"ovkapw2",inherit:"ovkapw3 _1ecs97df47"},$=function(e){var n=e.children,t=e.color,s=e.endIcon,i=e.href,a=e.textVariant,l=void 0===a?"smallBold":a,d=(0,U.Z)(e,["children","color","endIcon","href","textVariant"]);return(0,r.jsxs)("a",(0,X.Z)((0,W.Z)({href:i,target:"_blank",rel:"noreferrer"},d),{className:(0,Y.Z)("ovkapw0 _1ecs97dez0 _1ecs97df41 _1ecs97dez2 _1ecs97dez8",K[void 0===t?"primary":t]),children:[(0,r.jsx)(o.xv,{component:"span",color:"inherit",variant:l,children:n}),(0,c.isValidElement)(s)?(0,c.cloneElement)(s,{className:(0,Y.Z)(s.props.className,"_1ecs97dfhw",Q[l])}):null]}))},q=t(56580),J=t(39092),ee=function(){var e,n=(e=(0,q.v9)(function(e){return{repoName:(0,J.MY)(e)}}).repoName,"https://".concat(e,".prismic.io/documents/working"));return(0,r.jsxs)(H.R$,{style:{alignSelf:"center",marginTop:o.TV.size[72]},children:[(0,r.jsx)(H.u2,{children:(0,r.jsx)(o.Ee,{src:"/blank-slate-changes-uptodate.png",sizing:"cover"})}),(0,r.jsxs)(H.T9,{children:[(0,r.jsx)(H._T,{children:"Everything up-to-date"}),(0,r.jsx)(H.nf,{children:"You have no changes staged. Your changes appear here after you have saved them, while they're waiting to be pushed to the Page Builder. Ready to get going?"}),(0,r.jsxs)(H.Qj,{children:[(0,r.jsx)(o.zx,{onClick:function(){P().push("/")},children:"Create a page type"}),(0,r.jsx)($,{endIcon:(0,r.jsx)(V.AlO,{}),textVariant:"normal",href:n,children:"Create content"})]})]})]})},en=t(67764),et=t(56577),es=t(31667);t(78656);var ei=function(e){var n=e.ctName,t=e.numberOfDocuments,s=e.link,i=e.isOverLimit;return(0,r.jsxs)(m.Zb,{sx:{mb:12},variant:"drawerCard","data-cy":"AssociatedDocumentsCard-".concat(n),children:[(0,r.jsxs)(m.kC,{sx:{flexDirection:"column"},children:[(0,r.jsx)(m.xv,{children:n}),(0,r.jsxs)(m.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:[t," documents"]})]}),(0,r.jsx)(m.rU,{href:s,target:"_blank",variant:"cardSmall",sx:{color:void 0!==i&&i?"danger":"purple08"},children:"View documents"})]})},er=t(79797),eo=t(54132),ec=function(e){var n=e.isOpen,t=e.title,s=e.footer,i=e.explanations,o=e.onClose;return(0,r.jsx)(er.Z,{placement:"right",open:n,level:null,onClose:o,width:496,children:(0,r.jsx)(eo.Z,{radius:"0px",bodySx:{bg:"white",padding:24,flex:1,display:"flex",flexDirection:"column",overflow:"scroll"},footerSx:{p:0},sx:{flexDirection:"column",display:"flex",height:"100%",border:"none"},borderFooter:!0,Header:function(){return(0,r.jsxs)(m.kC,{sx:{p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:[(0,r.jsx)(m.kC,{sx:{alignItems:"center"},children:(0,r.jsx)(m.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:t})}),(0,r.jsx)(m.x8,{type:"button",onClick:function(){return o()}})]})},Footer:function(){return(0,r.jsx)(m.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center",paddingRight:16,borderTop:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorders))},backgroundColor:"white",padding:20},children:s})},children:i})})},ea=function(e){var n=e.onToggle,t=e.isConfirmed,s=e.sx;return(0,r.jsxs)(m.kC,{sx:(0,W.Z)({borderRadius:6,flexDirection:"column",backgroundColor:"grey03",padding:12,width:"100%"},s),children:[(0,r.jsx)(m.xv,{sx:{fontWeight:"bold",mb:2},children:"Are you sure to proceed?"}),(0,r.jsxs)(m.__,{sx:{mt:"4px",py:1},variant:"large",children:[(0,r.jsx)(m.XZ,{defaultChecked:t,onChange:n,variant:"forms.checkbox.dark"}),"Delete these Documents"]})]})},el=function(e){var n=e.pushChanges,t=e.modalData,s=e.onClose,i=(0,c.useState)(!1),o=i[0],a=i[1],l=(0,q.v9)(function(e){return{remoteOnlyCustomTypes:(0,es.Ch)(e).filter(v.yp)}}).remoteOnlyCustomTypes;if((null==t?void 0:t.type)!=="SOFT")return null;var d=t.details.customTypes.map(function(e){var n,t=l.find(function(n){return(0,v.n5)(n)===e.id});return void 0===t?null:(0,r.jsx)(ei,{isOverLimit:!0,ctName:null!==(n=t.remote.label)&&void 0!==n?n:t.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,r.jsx)(ec,{isOpen:"SOFT"===t.type,title:"Confirm deletion",onClose:s,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ea,{onToggle:function(){a(!o)},isConfirmed:o,sx:{mb:10}}),(0,r.jsx)(et.z,{label:"Push changes",variant:"primary",onClick:function(){n(o)},disabled:!o,sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})]}),explanations:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:"This action will also delete Documents."}),(0,r.jsxs)(m.xv,{sx:{mb:24},children:[t.details.customTypes.length>1?"These types have":"This type has"," ","associated Documents, which will also be deleted. This might create broken links in your repository."]}),d]})})},ed=function(e){var n=e.pushChanges,t=e.modalData,s=e.onClose,i=(0,q.v9)(function(e){return{remoteOnlyCustomTypes:(0,es.Ch)(e).filter(v.yp)}}).remoteOnlyCustomTypes;if((null==t?void 0:t.type)!=="HARD")return null;var o=t.details.customTypes.map(function(e){var n,t=i.find(function(n){return(0,v.n5)(n)===e.id});return void 0===t?null:(0,r.jsx)(ei,{isOverLimit:!0,ctName:null!==(n=t.remote.label)&&void 0!==n?n:t.remote.id,link:e.url,numberOfDocuments:e.numberOfDocuments},e.id)});return(0,r.jsx)(ec,{isOpen:"HARD"===t.type,title:"Manual action required",onClose:s,footer:(0,r.jsx)(et.z,{label:"Try again",variant:"primary",onClick:function(){n(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}}),explanations:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(m.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["Your type",t.details.customTypes.length>1&&"s"," cannot be deleted."]}),(0,r.jsxs)(m.xv,{sx:{mb:24},children:[t.details.customTypes.length>1?"These types have":"This type has"," ","too many associated Documents. Archive and delete these Documents manually and then try deleting the types again."]}),o]})})},eu=t(81541);function eh(){return(eh=(0,s.Z)(function(e){var n,t,s,r,o,c,a,l,d;return(0,i.__generator)(this,function(i){switch(i.label){case 0:return n=e.changedSlices,t=e.changedCustomTypes,r=void 0!==(s=e.confirmDeleteDocuments)&&s,o=Date.now(),c=n.map(function(e){return{id:e.slice.model.id,type:"Slice",libraryID:e.slice.from,status:e.status}}),a=t.map(function(e){return{id:e.customType.id,type:"CustomType",status:e.status}}),l={confirmDeleteDocuments:r,changes:(0,eu.Z)(c).concat((0,eu.Z)(a))},[4,(0,N.tI)(l)];case 1:var u,h,x,m,f,p,g,v,y,j;if(d=i.sent())return N.Xe.track({event:"changes:limit-reach",limitType:d.type}),[2,d];return h=(u={changedCustomTypes:t,changedSlices:n,hasDeletedDocuments:r,startTime:o}).startTime,x=u.hasDeletedDocuments,m=u.changedCustomTypes,f=u.changedSlices,p=m.reduce(function(e,n){return n.status===w.G.New?(0,X.Z)((0,W.Z)({},e),{customTypesCreated:e.customTypesCreated+1}):n.status===w.G.Modified?(0,X.Z)((0,W.Z)({},e),{customTypesModified:e.customTypesModified+1}):n.status===w.G.Deleted?(0,X.Z)((0,W.Z)({},e),{customTypesDeleted:e.customTypesDeleted+1}):e},{customTypesCreated:0,customTypesModified:0,customTypesDeleted:0}),g=f.reduce(function(e,n){return n.status===w.G.New?(0,X.Z)((0,W.Z)({},e),{slicesCreated:e.slicesCreated+1}):n.status===w.G.Modified?(0,X.Z)((0,W.Z)({},e),{slicesModified:e.slicesModified+1}):n.status===w.G.Deleted?(0,X.Z)((0,W.Z)({},e),{slicesDeleted:e.slicesDeleted+1}):e},{slicesCreated:0,slicesModified:0,slicesDeleted:0}),v=f.length+m.length,y=f.reduce(function(e,n){return e+(0,T.cx)(n.slice)},0),j=Date.now()-h,N.Xe.track((0,X.Z)((0,W.Z)({event:"changes:pushed"},p,g),{total:v,missingScreenshots:y,duration:j,hasDeletedDocuments:x,_includeEnvironmentKind:!0})),[2,void 0]}})})).apply(this,arguments)}var ex=function(){var e,n=(0,en.X)(),t=n.unSyncedSlices,l=n.unSyncedCustomTypes,x=n.modelsStatuses,m=n.authStatus,f=n.isOnline,p=(0,c.useMemo)(function(){var e;return{changedSlices:t.map(function(e){return{slice:e,status:x.slices[e.model.id]}}).filter(function(e){return en.O.includes(e.status)}),changedCustomTypes:l.map(function(e){return(0,v.TG)(e)?e.local:e.remote}).map(function(e){return{customType:e,status:x.customTypes[e.id]}}).filter(function(e){return en.O.includes(e.status)})}},[t,l,x]),g=p.changedSlices,y=p.changedCustomTypes,j=(0,A.Z)(),b=j.pushChangesSuccess,C=j.refreshState,_=(0,c.useState)(!1),S=_[0],T=_[1],D=(0,c.useState)(void 0),w=D[0],k=D[1],Z=t.length+l.length,z=(e=(0,s.Z)(function(e){var n,t,s;return(0,i.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),T(!0),k(void 0),[4,function(e){return eh.apply(this,arguments)}({confirmDeleteDocuments:e,changedSlices:g,changedCustomTypes:y})];case 1:if(!(void 0!==(n=i.sent())))return[3,2];return k(n),[3,4];case 2:return[4,(0,N.y0)()];case 3:C({env:(t=i.sent()).env,remoteCustomTypes:t.remoteCustomTypes,customTypes:t.customTypes,libraries:t.libraries,remoteSlices:t.remoteSlices,clientError:t.clientError}),b(),a.Am.success("All slices and types have been pushed"),i.label=4;case 4:return[3,6];case 5:return s=i.sent(),console.error("Something went wrong when manually pushing your changes",s),a.Am.error("Something went wrong when pushing your changes. Check your terminal logs."),[3,6];case 6:return T(!1),[2]}})}),function(n){return e.apply(this,arguments)}),O=(0,c.useMemo)(function(){return f?m===B.t.UNAUTHORIZED||m===B.t.FORBIDDEN?(0,r.jsx)(G,{authStatus:m}):0===Z?(0,r.jsx)(ee,{}):(0,r.jsx)(E,{unSyncedSlices:t,unSyncedCustomTypes:l,modelsStatuses:x,authStatus:m,isOnline:f}):(0,r.jsx)(M,{})},[f,m,Z,t,l,x,]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d(),{children:(0,r.jsx)("title",{children:"Changes - Slice Machine"})}),(0,r.jsxs)(h.LN,{children:[(0,r.jsxs)(h.wd,{children:[(0,r.jsx)(h.Cx,{folder:"Changes"}),(0,r.jsx)(h.K2,{children:(0,r.jsx)(o.zx,{onClick:function(){z(!1)},loading:S,disabled:0===Z||!f||m===B.t.UNAUTHORIZED||m===B.t.FORBIDDEN||S,"data-cy":"push-changes",children:"Push Changes"})})]}),(0,r.jsx)(h.RN,{children:(0,r.jsxs)(u.xR,{sx:{display:"flex",flexDirection:"column"},children:[O,(0,r.jsx)(el,{pushChanges:function(e){z(e)},modalData:w,onClose:function(){return k(void 0)}}),(0,r.jsx)(ed,{pushChanges:function(e){z(e)},modalData:w,onClose:function(){return k(void 0)}})]})})]})]})}},2754:function(e,n,t){"use strict";t.d(n,{R$:function(){return d},Qj:function(){return f},T9:function(){return h},nf:function(){return m},u2:function(){return u},_T:function(){return x}});var s=t(67557),i=t(62230),r=t(85244),o=t(98240),c=t(52322),a=t(6277),l=t(22715);t(69143);var d=function(e){var n=e.backgroundImage,t=e.style,l=(0,o.Z)(e,["backgroundImage","style"]),d=void 0!==n;return(0,c.jsx)("article",(0,r.Z)((0,i.Z)({},l),{className:(0,a.Z)("_18bjhbz0 _1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97dfiv _1ecs97dfix _1ecs97dfiz _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dezp",(0,s.Z)({},"_18bjhbz1 _1ecs97dezx _1ecs97df4v",d)),style:(0,i.Z)({backgroundImage:d?"url(".concat(n,")"):void 0},t)}))},u=function(e){return(0,c.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97d6r8 _1ecs97d6yl _1ecs97df29 _1ecs97df2l _1ecs97dezp"}))},h=function(e){return(0,c.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz3 _1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97dffv"}))},x=function(e){return(0,c.jsx)(l.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz4"}))},m=function(e){return(0,c.jsx)(l.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz5",color:"grey11"}))},f=function(e){return(0,c.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz6 _1ecs97dez0 _1ecs97dez8 _1ecs97dez1 _1ecs97dez2 _1ecs97df95 _1ecs97dfdl",color:"grey"}))}},69143:function(){},25977:function(){}},function(e){e.O(0,[898,789,123,543,918,25,286,774,888,179],function(){return e(e.s=21985)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{87314:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(26971)}])},26971:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return f}});var r=t(52322),s=t(840),i=t(2784),o=t(22715),c=t(17329),a=t(58882),x=t(62230),l=t(85244),C=function(e){return(0,r.jsxs)("svg",(0,l.Z)((0,x.Z)({width:"127",height:"101",viewBox:"0 0 127 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,r.jsx)("line",{x1:"0.353553",y1:"35.9863",x2:"15.5467",y2:"51.1794",stroke:"#C8C7CB"}),(0,r.jsx)("line",{x1:"42.1959",y1:"0.87059",x2:"47.7569",y2:"21.6248",stroke:"#C8C7CB"}),(0,r.jsx)("line",{x1:"99.5522",y1:"8.40984",x2:"87.2281",y2:"26.0104",stroke:"#C8C7CB"}),(0,r.jsx)("line",{x1:"126.408",y1:"41.0854",x2:"108.807",y2:"53.4094",stroke:"#C8C7CB"}),(0,r.jsx)("path",{d:"M93.5 93L76 81.9883L93.5 87V93Z",fill:"#6F6E77"}),(0,r.jsx)("path",{d:"M92 100.488H36C34.8954 100.488 34 99.5929 34 98.4883V37.9883C34 36.8837 34.8954 35.9883 36 35.9883H92C93.1046 35.9883 94 36.8837 94 37.9883V98.4883C94 99.5929 93.1046 100.488 92 100.488Z",stroke:"#1A1523"}),(0,r.jsx)("path",{d:"M74.4297 58.7688C71.569 63.3138 63.3588 74.9883 54.5 74.9883L93.8417 86.9402C93.9471 86.9722 94.0473 87.0119 94.1481 87.0563C95.014 87.4377 99.5549 89.2156 104.5 86.9883C106.535 86.0718 109.03 82.7182 110.424 80.6551C111.04 79.7445 110.743 78.5257 109.805 77.9526L77.2788 58.0753C76.3086 57.4824 75.0354 57.8065 74.4297 58.7688Z",fill:"#5842C3"}),(0,r.jsx)("path",{d:"M34 47.9883C34 47.9883 42.3922 74.9883 54.5 74.9883M54.5 74.9883C63.3588 74.9883 71.569 63.3138 74.4297 58.7688C75.0354 57.8065 76.3086 57.4824 77.2788 58.0753L109.805 77.9526C110.743 78.5257 111.04 79.7445 110.424 80.6551C109.03 82.7182 106.535 86.0718 104.5 86.9883C99.5549 89.2156 95.014 87.4377 94.1481 87.0563C94.0473 87.0119 93.9471 86.9722 93.8417 86.9402L54.5 74.9883Z",stroke:"#1A1523"}),(0,r.jsx)("path",{d:"M34 48.4883H94",stroke:"#1A1523"}),(0,r.jsx)("circle",{cx:"40",cy:"41.9883",r:"1.5",stroke:"#1A1523"}),(0,r.jsx)("circle",{cx:"46",cy:"41.9883",r:"1.5",stroke:"#1A1523"}),(0,r.jsx)("circle",{cx:"52",cy:"41.9883",r:"1.5",stroke:"#1A1523"})]}))},u=t(93858);function h(){var e=(0,i.useState)(!1),n=e[0],t=e[1],s=(0,i.useState)(!1),x=s[0],l=s[1];return(0,r.jsx)(o.xu,{display:"flex",justifyContent:"center",height:"100vh",alignItems:"center",backgroundColor:"grey2",children:(0,r.jsxs)(o.xu,{display:"flex",flexDirection:"column",alignItems:"center",width:384,children:[(0,r.jsx)(C,{}),(0,r.jsx)(o.xv,{variant:"h3",align:"center",sx:{marginTop:16},children:"Blank page"}),(0,r.jsx)(o.xv,{color:"grey11",align:"center",sx:{marginBottom:16},children:"Welcome to Slice Machine. Your journey starts with your first page type — the model that you will use to create pages for your website."}),(0,r.jsx)(o.zx,{loading:n,onClick:function(){l(!0)},children:"Create a page type"}),(0,r.jsx)(a.M,{format:"page",isCreating:n,isOpen:x,origin:"onboarding",onCreateChange:function(e){t(e),c.Fs.clear(u.f,[])},onOpenChange:l})]})})}var f=function(){return(0,u.N)()?(0,r.jsx)(h,{}):(0,r.jsx)(s.F,{format:"page"})}}},function(e){e.O(0,[731,727,774,888,179],function(){return e(e.s=87314)}),_N_E=e.O()}]);
|
package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-2d3d84de925b289e.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[136],{31314:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]",function(){return t(79336)}])},38876:function(e,n,t){"use strict";t.d(n,{MP:function(){return o},T3:function(){return c},Ti:function(){return r},lV:function(){return s}});var i=/-(\w)/g;function r(e){return e.includes("-")?"['".concat(e,"']"):".".concat(e)}function o(e){return e?(e=e.replace(/_/g,"-").replace(i,function(e,n){return n?n.toUpperCase():""}))[0].toUpperCase()+e.slice(1):""}var a=/\B([A-Z])/g;function c(e){var n;return e.replace(a,"-$1").toLowerCase().replace(/-/g,"_")}var s=function(e){return e.trim().replace(/ /g,"_").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}},79336:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eZ}});var i=t(52322),r=t(97729),o=t.n(r),a=t(5632),c=t(22715),s=t(28316),u=t(83462),l=t(38876),d=t(2353),f=t(44384),p=t(28173),v=t(53559),m=t(22710),h=t(62230),y=t(85244),x=t(99267),g=t(2784),j=t(74217),b=t(41072),Z=t(82770),w=t(90374),I=(0,g.createContext)(void 0);function S(e){var n=e.children,t=e.initialSlice,r=(0,a.useRouter)(),o=(0,g.useState)(t),c=o[0],s=o[1],u=(0,b.Q)({errorMessage:"Failed to save slice. Check your browser's console for more information."}),l=u.autoSaveStatus,d=u.setNextSave,f=(0,w.Z)().saveSliceSuccess,p=(0,j.R9)(f),v=(0,g.useMemo)(function(){var e=r.query.variation,n=c.model.variations.find(function(n){return n.id===e});if(n)return n;throw Error("Variation not found")},[c,r]),S=(0,g.useCallback)(function(e){s(e),d((0,m.Z)(function(){var n,t,i,r,o;return(0,x.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,Z.Ve)(e)];case 1:if((t=n.sent().errors).length>0)throw t;return[4,(0,Z.pL)({libraryID:e.from,sliceID:e.model.id})];case 2:if(r=(i=n.sent()).errors,o=i.mocks,r.length>0)throw r;return p((0,y.Z)((0,h.Z)({},e),{mocks:o})),[2]}})}))},[d,p]),C=(0,g.useMemo)(function(){return{autoSaveStatus:l,slice:c,setSlice:S,variation:v}},[l,c,S,v]);return(0,i.jsx)(I.Provider,{value:C,children:"function"==typeof n?n(C):n})}function C(){var e=(0,g.useContext)(I);if(!e)throw Error("SliceBuilderProvider not found");return e}var k=t(5479),T=t(8482),F=t(4092),E=function(){var e=C(),n=e.slice,t=e.setSlice,r=e.variation,o=function(e){return function(i){var o=(0,k.AK)({slice:n,variationId:r.id,widgetArea:e,fieldId:i});t(o)}},a=function(e){return function(i){var o=i.apiId,a=i.newKey,c=i.value,s=(0,k.L4)({slice:n,variationId:r.id,widgetArea:e,previousFieldId:o,newFieldId:a,newField:c});t(s)}},c=function(e){return function(i){var o=i.id,a=i.label,c=i.widgetTypeName,s=d[c];s||console.log('Could not find widget with type name "'.concat(c,'". Please contact us!'));var u=s.create(a);if("Range"===u.type||"IntegrationFields"===u.type||"Separator"===u.type)throw Error("Unsupported Field Type: ".concat(u.type));try{d[u.type].schema.validateSync(u,{stripUnknown:!1})}catch(l){throw Error('Model is invalid for widget "'.concat(u.type,'".'))}var f=(0,k.xS)({slice:n,variationId:r.id,widgetArea:e,newFieldId:o,newField:u});t(f)}},m=function(e){return function(i){if(!(0,u.uS)(i)){var o=i.source,a=i.destination;if(a){var c=(0,k.gR)({slice:n,variationId:r.id,widgetArea:e,sourceIndex:o.index,destinationIndex:a.index});(0,s.flushSync)(function(){return t(c)})}}}};return(0,i.jsxs)(p.aV,{children:[(0,i.jsx)(T.Z,{zoneType:"slice",tabId:void 0,title:"Non-Repeatable Zone",dataTip:" The non-repeatable zone\n is for fields<br/> that should appear once, like a<br/>\n section title.\n",fields:r.primary,EditModal:F.Z,widgetsArray:f.Z,onDeleteItem:o(v.Rt.Primary),onSave:a(v.Rt.Primary),onSaveNewField:c(v.Rt.Primary),onDragEnd:m(v.Rt.Primary),poolOfFieldsToCheck:r.primary||[],renderHintBase:function(e){var n=e.item;return"slice.primary".concat((0,l.Ti)(n.key))},renderFieldAccessor:function(e){return"slice.primary".concat((0,l.Ti)(e))},dataCy:"static-zone-content",isRepeatableCustomType:void 0}),(0,i.jsx)(T.Z,{zoneType:"slice",tabId:void 0,isRepeatable:!0,title:"Repeatable Zone",dataTip:"The repeatable zone is for a group<br/>\n of fields that you want to be able to repeat an<br/>\n indeterminate number of times, like FAQs",widgetsArray:f.Z,fields:r.items,EditModal:F.Z,onDeleteItem:o(v.Rt.Items),onSave:a(v.Rt.Items),onSaveNewField:c(v.Rt.Items),onDragEnd:m(v.Rt.Items),poolOfFieldsToCheck:r.items||[],renderHintBase:function(e){var n=e.item;return"item".concat((0,l.Ti)(n.key))},renderFieldAccessor:function(e){return"slice.items[i]".concat((0,l.Ti)(e))},dataCy:"slice-repeatable-zone",isRepeatableCustomType:void 0})]})},A=t(88932),R=t(36131),O=t(63397),_=t(75289),N=t(76635),L=t(25812),D=t(54132),V=function(e){var n=e.children,t=e.FooterContent,r=e.HeaderContent,o=e.close,a=e.sx,c=e.headerSx,s=void 0===c?{}:c;return(0,i.jsx)(D.Z,{borderFooter:!0,footerSx:{p:0},bodySx:{pt:2,pb:4,px:4},sx:(0,h.Z)({border:"none"},void 0===a?{}:a),Header:function(e){var n=e.radius;return(0,i.jsxs)(_.kC,{sx:(0,h.Z)({p:3,pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)}},s),children:[r,o?(0,i.jsx)(_.x8,{onClick:o,type:"button"}):null]})},Footer:t?(0,i.jsxs)(_.kC,{sx:{alignItems:"space-between",bg:"headSection",p:3},children:[(0,i.jsx)(_.xu,{sx:{ml:"auto"}}),t]}):null,children:n})},M=function(e){var n=e.msg;return(0,i.jsx)(_.xv,{as:"span",sx:{fontSize:12,color:"error",mt:"5px",ml:2},children:n||"Error!"})},P=function(e){var n=e.isOpen,t=e.onClose,r=e.onSubmit,o=e.initialVariation,a=e.variations,s=function(e){var n=e.id,t=e.name,i=e.origin,r=n&&n.length?null:{id:"Required!"},o=a.find(function(e){return e.id===n})?{id:"This id already exists!"}:null,c=t&&t.length?null:{name:"Required!"},s=i.value.length&&a.find(function(e){return e.id===i.value})?null:{id:"You must select an existing variation!"},u=n&&n.length&&!/^[A-Za-z0-9]+([A-Za-z0-9]+)*$/.exec(n)&&{id:"No special characters allowed"};return(0,h.Z)({},r,o,c,s,u)},u=function(e){I((0,N.camelCase)(e))},l=function(e){E(e),C&&u(e)},d=function(e){k(!1),u(e)},f=function(){p(),t()},p=function(){I(""),E(""),b({}),k(!0),P({value:o.id,label:o.name})},v=(0,g.useState)({}),j=v[0],b=v[1],Z=(0,g.useState)(""),w=Z[0],I=Z[1],S=(0,g.useState)(!0),C=S[0],k=S[1],T=(0,g.useState)(""),F=T[0],E=T[1],A=(0,g.useState)({value:o.id,label:o.name}),D=A[0],P=A[1],z=(0,g.useState)(!1),K=z[0],B=z[1];function q(){return H.apply(this,arguments)}function H(){return(H=(0,m.Z)(function(){var e,n;return(0,x.__generator)(this,function(t){switch(t.label){case 0:if(!Object.keys(e=s({id:w,name:F,origin:D})).length)return[3,1];return b(e),[3,3];case 1:if(!(n=a.find(function(e){return e.id===D.value})))return[3,3];return B(!0),[4,r(w,F,n)];case 2:t.sent(),B(!1),f(),t.label=3;case 3:return[2]}})})).apply(this,arguments)}return(0,g.useEffect)(function(){p()},[o,n]),(0,i.jsx)(L.Z,{isOpen:n,shouldCloseOnOverlayClick:!0,onRequestClose:function(){return f()},contentLabel:"Widget Form Modal",style:{content:{maxWidth:"700px"}},children:(0,i.jsx)(O.J9,{initialValues:{id:w,name:F,origin:D},onSubmit:q,children:(0,i.jsx)(O.l0,{id:"variation-add",onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),q())},children:(0,i.jsx)(c.xu,{children:(0,i.jsxs)(V,{sx:{textAlign:"left"},HeaderContent:(0,i.jsx)(_.xv,{as:"h2",children:"Add new Variation"}),FooterContent:(0,i.jsxs)(c.xu,{gap:16,alignItems:"center",children:[(0,i.jsx)(c.zx,{onClick:f,color:"grey",children:"Cancel"}),(0,i.jsx)(c.zx,{loading:K,children:"Submit"})]}),close:f,children:[(0,i.jsxs)(c.xu,{flexDirection:"column",padding:{block:16},children:[(0,i.jsxs)(_.__,{htmlFor:"name",sx:{mb:1},children:["Variation name*",j.name?(0,i.jsx)(M,{msg:j.name}):""]}),(0,i.jsx)(O.gN,{autoComplete:"off",id:"name",name:"name",placeholder:"e.g. Grid - With Icon",as:_.II,maxLength:30,value:F,onChange:function(e){return l(e.currentTarget.value)}}),(0,i.jsx)(_.xv,{children:"It will appear here in Slice Machine, and in the page editor in Prismic"})]}),(0,i.jsxs)(c.xu,{flexDirection:"column",padding:{bottom:16},children:[(0,i.jsxs)(_.__,{htmlFor:"id",sx:{mb:1},children:["Variation ID*",j.id?(0,i.jsx)(M,{msg:j.id}):""]}),(0,i.jsx)(O.gN,{autoComplete:"off",id:"id",name:"id",placeholder:"e.g. GridWithIcon",as:_.II,maxLength:30,value:w,onChange:function(e){return d(e.currentTarget.value)}}),(0,i.jsx)(_.xv,{children:"It's generated automatically based on the variation name and will appear in the API responses."})]}),(0,i.jsxs)(c.xu,{flexDirection:"column",padding:{bottom:8},children:[(0,i.jsx)(_.__,{htmlFor:"origin",sx:{mb:1},children:"Duplicate from"}),(0,i.jsx)(R.ZP,{name:"origin",options:a.map(function(e){return{value:e.id,label:e.name}}),onChange:function(e){e&&P(e)},defaultValue:D,maxMenuHeight:150,theme:function(e){return(0,y.Z)((0,h.Z)({},e),{colors:(0,y.Z)((0,h.Z)({},e.colors),{text:"text",primary:"background"})})}})]})]})})})})})},z=t(49451);function K(){return(K=(0,m.Z)(function(e){var n,t,i,r,o,a,c,s,u,l,d,f;return(0,x.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),[4,(0,Z.Ve)(e.component)];case 1:if((t=n.sent().errors).length>0)throw t;return[4,(0,Z.Xi)({libraryID:e.component.from,sliceID:e.component.model.id,variationID:e.variation.id})];case 2:if((r=n.sent().errors).length>0)throw r;return[4,(0,Z.X$)(e.component.from,e.component.model.id)];case 3:if(a=(o=n.sent()).slice,(c=o.errors).length>0)throw c;if(!a)throw Error("Could not read variation `".concat(e.variation.name,"`"));return[4,(0,Z.pL)({libraryID:e.component.from,sliceID:e.component.model.id})];case 4:return s=n.sent().mocks,u=z.Y.getBuilderPagePathname({libraryName:e.component.href,sliceName:a.name,variationId:a.variations[0].id}),[4,e.router.replace(u)];case 5:return n.sent(),l=(0,y.Z)((0,h.Z)({},e.component),{model:a,mocks:s}),e.saveSliceSuccess(l),[2,l];case 6:throw d=n.sent(),f="Could not delete variation `".concat(e.variation.name,"`"),console.error(f,d),A.Am.error(f),d;case 7:return[2]}})})).apply(this,arguments)}var B=function(e){var n=e.isOpen,t=e.onClose,r=e.slice,o=e.variation,s=(0,a.useRouter)(),u=(0,g.useState)(!1),l=u[0],d=u[1],f=(0,w.Z)().saveSliceSuccess,p=C().setSlice;return(0,i.jsxs)(c.Vq,{open:n,onOpenChange:function(e){return!e&&t()},size:{width:448,height:"auto"},children:[(0,i.jsx)(c.fK,{icon:"delete",title:"Delete variation"}),(0,i.jsx)(c.cZ,{children:(0,i.jsxs)(c.xu,{flexDirection:"column",children:[(0,i.jsxs)(c.xv,{color:"grey11",sx:{marginBlock:16,marginInline:16},children:["This action will remove the variation from the slice model and delete associated files. When you push your changes, the variation will disappear from your repository. This update will"," ",(0,i.jsx)(q,{children:"not"})," affect your documents until you ",(0,i.jsx)(q,{children:"edit"})," ","them manually."]}),(0,i.jsx)(c.kX,{ok:{text:"Delete",onClick:function(){o&&(0,m.Z)(function(){var e;return(0,x.__generator)(this,function(e){switch(e.label){case 0:d(!0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,function(e){return K.apply(this,arguments)}({component:r,router:s,saveSliceSuccess:f,variation:o})];case 2:return p(e.sent()),[3,4];case 3:return e.sent(),[3,4];case 4:return d(!1),t(),[2]}})})()},loading:l},cancel:{text:"Cancel"},size:"medium"})]})})]})},q=function(e){return(0,i.jsx)(c.xv,(0,y.Z)((0,h.Z)({},e),{color:"inherit",component:"span",variant:"bold"}))};function H(){return(H=(0,m.Z)(function(e){var n,t,i,r,o,a,c,s,u,l,d;return(0,x.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,(0,Z.Ve)(e.component)];case 1:if((t=n.sent().errors).length>0)throw t;return[4,(0,Z.eH)(e.component,(0,y.Z)((0,h.Z)({},e.variation),{name:e.variationName}))];case 2:if((r=n.sent().errors).length>0)throw r;return[4,(0,Z.X$)(e.component.from,e.component.model.id)];case 3:if(a=(o=n.sent()).slice,(c=o.errors).length>0)throw c;if(!a)throw Error("Could not read variation `".concat(e.variation.name,"`"));return[4,(0,Z.pL)({libraryID:e.component.from,sliceID:e.component.model.id})];case 4:return s=n.sent().mocks,u=(0,y.Z)((0,h.Z)({},e.component),{model:a,mocks:s}),e.saveSliceSuccess(u),[2,u];case 5:throw l=n.sent(),d="Could not rename variation `".concat(e.variation.name,"`"),console.error(d,l),A.Am.error(d),l;case 6:return[2]}})})).apply(this,arguments)}var U=function(e){var n,t,r=e.isOpen,o=e.onClose,a=e.slice,s=e.variation,u=(0,g.useState)(!1),l=u[0],d=u[1],f=C().setSlice,p=(0,w.Z)().saveSliceSuccess;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(c.Vq,{open:r,onOpenChange:function(e){return!e&&o()},size:{width:448,height:"auto"},children:[(0,i.jsx)(c.fK,{icon:"edit",title:"Rename variation"}),(0,i.jsx)(c.cZ,{children:(0,i.jsx)(O.J9,{validateOnChange:!0,validateOnMount:!0,initialValues:{variationName:null!==(n=null==s?void 0:s.name)&&void 0!==n?n:""},validate:function(e){if(0===e.variationName.length)return{variationName:"Cannot be empty"}},onSubmit:(t=(0,m.Z)(function(e){var n;return(0,x.__generator)(this,function(n){switch(n.label){case 0:if(!s)return[2];d(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,function(e){return H.apply(this,arguments)}({component:a,saveSliceSuccess:p,variation:s,variationName:e.variationName.trim()})];case 2:return f(n.sent()),[3,4];case 3:return n.sent(),[3,4];case 4:return d(!1),o(),[2]}})}),function(e){return t.apply(this,arguments)}),children:function(e){return(0,i.jsxs)("form",{children:[(0,i.jsxs)(c.xu,{flexDirection:"column",gap:8,padding:16,children:[(0,i.jsx)(c.xv,{variant:"normal",color:"grey11",children:"This action will rename the variation in the slice model. When you push your changes, the variation will be renamed in your repository."}),(0,i.jsxs)(c.xu,{flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:"_1ecs97dez4 _1ecs97dez8 _1ecs97df90",children:[(0,i.jsx)(c.xv,{variant:"bold",children:"Variation name*"}),"string"==typeof e.errors.variationName?(0,i.jsx)(c.xv,{variant:"small",color:"tomato10",children:e.errors.variationName}):null]}),(0,i.jsx)(c.yt,{placeholder:"Variation name",error:"string"==typeof e.errors.variationName,value:e.values.variationName,onValueChange:function(n){e.setFieldValue("variationName",n.slice(0,30))}})]})]}),(0,i.jsx)(c.kX,{ok:{text:"Rename",onClick:function(){e.submitForm()},loading:l,disabled:!e.isValid},cancel:{text:"Cancel"},size:"medium"})]})}})})]})})},X=t(15836),W=t(71749),G=t(47731),Q=function(){var e,n=C(),t=n.slice,r=n.variation,o=n.setSlice,s=(0,g.useState)(),u=s[0],l=s[1],d=(0,G.H)(),f=d.modalPayload,p=f.sliceFilterFn,v=f.defaultVariationSelector,h=f.onUploadSuccess,y=(0,a.useRouter)(),j=(0,w.Z)().saveSliceSuccess;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(c.xu,{flexDirection:"column",gap:16,children:[t.model.variations.map(function(e){return(0,i.jsx)(W.b,{action:{type:"menu",onRename:function(){l({type:"RENAME_VARIATION",variation:e})},onRemove:function(){l({type:"DELETE_VARIATION",variation:e})},removeDisabled:t.model.variations.length<=1},mode:"navigation",onUpdateScreenshot:function(){d.onOpenModal({sliceFilterFn:function(e){return e},defaultVariationSelector:{sliceID:t.model.id,variationID:e.id},onUploadSuccess:function(e){o(e)}})},replace:!0,selected:e.id===r.id,slice:t,variant:"outlined",variationId:e.id},e.id)}),(0,i.jsxs)(c.xu,{backgroundColor:"grey2",bottom:0,flexDirection:"column",padding:{bottom:40,inline:24},position:"sticky",style:{marginBottom:"-16px"},children:[(0,i.jsx)(c.ph,{sx:{left:0,position:"absolute",right:0}}),(0,i.jsx)(c.zx,{onClick:function(){l({type:"ADD_VARIATION"})},startIcon:"add",sx:{position:"relative"},color:"grey",children:"Add a new variation"})]})]}),(0,i.jsx)(X.Z,{slices:p([t]),defaultVariationSelector:v,onUploadSuccess:h}),(0,i.jsx)(U,{isOpen:(null==u?void 0:u.type)==="RENAME_VARIATION",onClose:function(){l(void 0)},slice:t,variation:null==u?void 0:u.variation}),(0,i.jsx)(B,{isOpen:(null==u?void 0:u.type)==="DELETE_VARIATION",onClose:function(){l(void 0)},slice:t,variation:null==u?void 0:u.variation}),(0,i.jsx)(P,{initialVariation:r,isOpen:(null==u?void 0:u.type)==="ADD_VARIATION",onClose:function(){l(void 0)},onSubmit:(e=(0,m.Z)(function(e,n,i){var r,a,c,s,u,l;return(0,x.__generator)(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),a=(r=(0,k.Kp)({slice:t,id:e,name:n,copiedVariation:i})).slice,c=r.variation,[4,(0,Z.Ve)(a)];case 1:return d.sent(),j(a),o(a),s=z.Y.getBuilderPagePathname({libraryName:a.href,sliceName:a.model.name,variationId:c.id}),y.replace(s),[3,3];case 2:return u=d.sent(),l="Could not add variation `".concat(n,"`"),console.error(l,u),A.Am.error(l),[3,3];case 3:return[2]}})}),function(n,t,i){return e.apply(this,arguments)}),variations:t.model.variations})]})},$=t(56580),J=t(75329),Y=t(33710),ee=t(42189),en=t(17036),et=t(39295),ei=t(22342),er=function(){return(0,i.jsx)(et.X,{children:(0,i.jsxs)(Y.Z,{clickable:!0,place:"bottom",effect:"solid",delayHide:500,id:"simulator-button-tooltip",children:[(0,i.jsx)(_.xv,{as:"b",children:"Framework not supported"}),(0,i.jsx)(_.xv,{as:"p",children:"Slice Simulator does not support your framework yet."})]})})},eo=function(e){var n=e.children,t=e.open,r=e.onClose;return(0,i.jsxs)(ei.zs,{open:t,trigger:n,onClose:r,children:[(0,i.jsx)(ei.Ev,{children:"Simulate your slices"}),(0,i.jsx)(ei.LB,{component:"video",cloudName:"dmtf1daqp",loop:!1,autoPlay:!1,publicId:J.Sn,poster:"/simulator-video-thumbnail.png",controls:!0,onPlay:function(){Z.Xe.track({event:"open-video-tutorials",video:J.Sn})}}),(0,i.jsx)(ei.OJ,{children:"Minimize context-switching by previewing your Slice components in the simulator."}),(0,i.jsx)(ei.Rp,{children:"Got it"})]})},ea=function(e){var n=e.isSimulatorAvailableForFramework,t=e.disabled,r=(0,a.useRouter)(),o=(0,g.useRef)(null),s=(0,w.Z)().setSeenSimulatorToolTip,u=(0,$.v9)(function(e){return{hasSeenSimulatorTooltip:(0,en.bv)(e)}}).hasSeenSimulatorTooltip;(0,g.useEffect)(function(){var e=o.current;e&&n&&!u&&setTimeout(function(){return Y.Z.show(e)},5e3)},[n,u]);var l=function(){if(s(),o.current){var e=o.current;Y.Z.hide(e)}};return(0,i.jsxs)("span",{"data-tip":!0,"data-tip-disable":!1,"data-for":"simulator-button-tooltip",ref:o,children:[(0,i.jsx)(eo,{open:n&&!u,onClose:l,children:(0,i.jsx)(c.zx,{"data-tip":!0,"data-testid":"simulator-open-button",onClick:function(){l(),window.open("".concat(r.asPath,"/simulator"),J.pq)},disabled:t,renderStartIcon:function(){return(0,i.jsx)(ee.z,{color:c.TV.color.greyLight1,height:c.TV.size[24],style:{transform:"scale(calc(4 / 3))"},width:c.TV.size[24]})},children:"Simulate"})}),!1===n?(0,i.jsx)(er,{}):void 0]})},ec=t(29930),es=t(17329),eu=t(81038);function el(e){return ed.apply(this,arguments)}function ed(){return(ed=(0,m.Z)(function(e){var n,t,i;return(0,x.__generator)(this,function(r){switch(r.label){case 0:return[4,eu.j.customTypes.readCustomType({id:e})];case 1:if(t=(n=r.sent()).errors,i=n.model,t.length>0)throw t;return[2,i]}})})).apply(this,arguments)}var ef=t(67445),ep=t(64722),ev=t(20812),em=function(e){return(0,i.jsxs)("svg",(0,y.Z)((0,h.Z)({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,i.jsx)("path",{d:"M9.5 12L6 9.5L9.5 7V9.5V12Z",fill:"currentColor"}),(0,i.jsx)("path",{d:"M6 9.5H11C14.3 9.5 17 12.2 17 15.5V17.5M6 9.5L9.5 12V9.5V7L6 9.5Z",stroke:"currentColor",strokeLinecap:"round"})]}))},eh=function(){var e,n,t=(e=(0,ep.l)().source,n=(0,ef.Ag)(e.query),void 0!==n&&(0,ef.ne)(e.asPath,n)?n:void 0);return void 0!==t?(0,i.jsx)(c.SV,{children:(0,i.jsx)(g.Suspense,{children:(0,i.jsx)(c.xu,{bottom:32,justifyContent:"center",position:"fixed",right:0,width:"100vw",children:(0,i.jsx)(ey,{sourceCustomTypeId:t})})})}):null},ey=function(e){var n,t=(n=e.sourceCustomTypeId,(0,es.QT)(el,[n])),r=(0,g.useState)(!0),o=r[0],s=r[1],u=(0,a.useRouter)();if(void 0===t||!o)return null;var l=t.format,d=t.id,f=ef.cd[l].getBuilderPagePathname(d);return(0,i.jsxs)(c.hE,{density:"compact",color:"dark",children:[(0,i.jsxs)(c.zx,{onClick:function(){u.push(f)},renderStartIcon:function(){return(0,i.jsx)(em,{})},children:["Return to ",t.label]}),(0,i.jsx)(c.zx,{onClick:function(){s(!1)},renderStartIcon:function(){return(0,i.jsx)(ev.T,{})}})]})},ex=t(39092),eg=t(47976),ej=function(){var e=C(),n=e.slice,t=e.autoSaveStatus,r=(0,$.v9)(ex.Ql);return(0,i.jsxs)(ec.LN,{children:[(0,i.jsxs)(ec.wd,{children:[(0,i.jsx)(ec.Xq,{url:"/slices"}),(0,i.jsx)(ec.Cx,{folder:"Slices",page:n.model.name}),(0,i.jsxs)(ec.K2,{children:[(0,i.jsx)(eg.X,{status:t}),(0,i.jsx)(ea,{isSimulatorAvailableForFramework:r,disabled:"saved"!==t})]})]}),(0,i.jsxs)(ec.RN,{children:[(0,i.jsxs)(c.xu,{alignItems:"flex-start",display:"grid",gap:16,gridTemplateColumns:"320px 1fr",children:[(0,i.jsx)(Q,{}),(0,i.jsx)(E,{})]}),(0,i.jsx)(eh,{})]})]})},eb=t(28684);function eZ(){var e=(0,a.useRouter)(),n=(0,eb.Z)(),t=n.slice,r=n.variation;return void 0===t||void 0===r?(e.replace("/"),null):(0,i.jsx)(S,{initialSlice:t,children:function(e){var n=e.slice;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o(),{children:(0,i.jsxs)("title",{children:[n.model.name," - Slice Machine"]})}),(0,i.jsx)(ej,{})]})}})}},91061:function(e,n,t){"use strict";t.d(n,{AK:function(){return b},E3:function(){return v},EN:function(){return m},F$:function(){return x},GA:function(){return k},HO:function(){return g},L4:function(){return Z},Tr:function(){return p},Ue:function(){return O},gR:function(){return w},j6:function(){return S},kQ:function(){return I},l9:function(){return C},mf:function(){return h},vB:function(){return y},xS:function(){return j},y6:function(){return u}});var i=t(67557),r=t(62230),o=t(85244),a=t(17064),c=t(88866),s=t(98863);function u(e){var n;return null!==(n=e.format)&&void 0!==n?n:"custom"}function l(e){return Object.entries(e.json)}function d(e,n){return e.json[n]}function f(e,n){var t=d(e,n);if(void 0!==t)return Object.entries(t).find(function(e){var n=(0,a.Z)(e,2);return(n[0],n[1]).type===c.SlicesFieldType})}function p(e,n){if(t=e,d=f(t,s=n),(p=(0,a.Z)(null!=d?d:[],2))[0],null!==(u=null==(v=p[1])?void 0:v.config)&&void 0!==u?u:void 0)return e;var t,s,u,d,p,v,m=function(e,n){var t,i=l(e),r=i.findIndex(function(e){return(0,a.Z)(e,1)[0]===n}),o=i.flatMap(function(e){var n=(0,a.Z)(e,2),t=(n[0],n[1]);return Object.keys(t).filter(function(e){return t[e].type===c.SlicesFieldType})}),s=r;do t="slices".concat(0!==s?s.toString():""),s++;while(o.includes(t));return t}(e,n);return(0,o.Z)((0,r.Z)({},e),{json:(0,o.Z)((0,r.Z)({},e.json),(0,i.Z)({},n,(0,o.Z)((0,r.Z)({},e.json[n]),(0,i.Z)({},m,{type:c.SlicesFieldType,fieldset:"Slice Zone"}))))})}function v(e,n){var t=d(e,n);if(void 0===t)return e;var a=Object.keys(t).find(function(e){return t[e].type===c.SlicesFieldType});if(void 0===a)return e;var u=(0,s.ud)(t,a);return(0,o.Z)((0,r.Z)({},e),{json:(0,o.Z)((0,r.Z)({},e.json),(0,i.Z)({},n,u))})}function m(e){var n,t,a=e.customType,u=e.sectionId,l=e.sliceId,f=d(a,u);if(void 0===f)return a;var p=Object.keys(f).find(function(e){return f[e].type===c.SlicesFieldType});if(void 0===p)return a;var v=f[p];if(v.type!==c.SlicesFieldType)return a;var m=(0,s.ud)(null!==(t=null===(n=v.config)||void 0===n?void 0:n.choices)&&void 0!==t?t:{},l);return(0,o.Z)((0,r.Z)({},a),{json:(0,o.Z)((0,r.Z)({},a.json),(0,i.Z)({},u,(0,o.Z)((0,r.Z)({},f),(0,i.Z)({},p,(0,o.Z)((0,r.Z)({},v),{config:(0,o.Z)((0,r.Z)({},v.config),{choices:m})})))))})}function h(e){var n,t=(0,o.Z)((0,r.Z)({},e),{format:"page"}),i=l(e)[0];if(i){var c=(0,a.Z)(i,1)[0];t=p(t,c)}return t}function y(e,n){return(0,o.Z)((0,r.Z)({},e),{json:(0,o.Z)((0,r.Z)({},e.json),(0,i.Z)({},n,{}))})}function x(e,n){var t=(0,s.ud)(e.json,n);return(0,o.Z)((0,r.Z)({},e),{json:t})}function g(e,n,t){if(n===t)return e;var i=Object.keys(e.json).reduce(function(i,r){return r===n?i[t]=e.json[r]:i[r]=e.json[r],i},{});return(0,o.Z)((0,r.Z)({},e),{json:i})}function j(e){var n=e.customType,t=e.sectionId,a=e.newField,c=e.newFieldId;return T({customType:n,sectionId:t,updatedSection:(0,o.Z)((0,r.Z)({},n.json[t]),(0,i.Z)({},c,a))})}function b(e){var n=e.customType,t=e.sectionId,i=e.fieldId,r=(0,s.ud)(n.json[t],i);return T({customType:n,sectionId:t,updatedSection:r})}function Z(e){var n=e.customType,t=e.sectionId,i=e.previousFieldId,r=e.newFieldId,o=e.newField,a=F({fields:n.json[t],previousFieldId:i,newFieldId:r,newField:o});return T({customType:n,sectionId:t,updatedSection:a})}function w(e){var n=e.customType,t=e.sectionId,i=e.sourceIndex,r=e.destinationIndex,o=n.json[t],s=f(n,t),u=Object.fromEntries(Object.entries(o).filter(function(e){var n=(0,a.Z)(e,2);return(n[0],n[1]).type!==c.SlicesFieldType})),l=E({fields:u,sourceIndex:i,destinationIndex:r});if(void 0!==s){var d=(0,a.Z)(s,2),p=d[0],v=d[1];l[p]=v}return T({customType:n,sectionId:t,updatedSection:l})}function I(e){var n,t=e.customType,a=e.sectionId,c=e.groupFieldId,s=e.newField,u=e.newFieldId,l=A({customType:t,sectionId:a,groupFieldId:c}),d=null==l?void 0:null===(n=l.config)||void 0===n?void 0:n.fields;if(!l)return t;var f=R(l,(0,o.Z)((0,r.Z)({},d),(0,i.Z)({},u,s)));return T({customType:t,sectionId:a,updatedSection:(0,o.Z)((0,r.Z)({},t.json[a]),(0,i.Z)({},c,f))})}function S(e){var n,t=e.customType,a=e.sectionId,c=e.groupFieldId,u=e.fieldId,l=A({customType:t,sectionId:a,groupFieldId:c}),d=null==l?void 0:null===(n=l.config)||void 0===n?void 0:n.fields;if(!l||!d)return t;var f=(0,s.ud)(d,u),p=R(l,f);return T({customType:t,sectionId:a,updatedSection:(0,o.Z)((0,r.Z)({},t.json[a]),(0,i.Z)({},c,p))})}function C(e){var n,t=e.customType,a=e.sectionId,c=e.groupFieldId,s=e.previousFieldId,u=e.newFieldId,l=e.newField,d=A({customType:t,sectionId:a,groupFieldId:c}),f=null==d?void 0:null===(n=d.config)||void 0===n?void 0:n.fields;if(!d||!f)return t;var p=F({fields:f,previousFieldId:s,newFieldId:u,newField:l}),v=R(d,p);return T({customType:t,sectionId:a,updatedSection:(0,o.Z)((0,r.Z)({},t.json[a]),(0,i.Z)({},c,v))})}function k(e){var n,t=e.customType,a=e.sectionId,c=e.groupFieldId,s=e.sourceIndex,u=e.destinationIndex,l=A({customType:t,sectionId:a,groupFieldId:c}),d=null==l?void 0:null===(n=l.config)||void 0===n?void 0:n.fields;if(!l||!d)return t;var f=E({fields:d,sourceIndex:s,destinationIndex:u}),p=R(l,f);return T({customType:t,sectionId:a,updatedSection:(0,o.Z)((0,r.Z)({},t.json[a]),(0,i.Z)({},c,p))})}function T(e){var n=e.customType,t=e.sectionId,a=e.updatedSection;return(0,o.Z)((0,r.Z)({},n),{json:(0,o.Z)((0,r.Z)({},n.json),(0,i.Z)({},t,a))})}function F(e){var n=e.fields,t=e.previousFieldId,i=e.newFieldId,r=e.newField;return Object.entries(n).reduce(function(e,n){var o=(0,a.Z)(n,2),c=o[0],s=o[1];return c===t?e[i]=r:c!==i&&(e[c]=s),e},{})}function E(e){var n=e.fields,t=e.sourceIndex,i=e.destinationIndex,r=Object.entries(n),o=(0,a.Z)(r.splice(t,1),1)[0];return r.splice(i,0,o),Object.fromEntries(r)}function A(e){var n=e.customType,t=e.sectionId,i=e.groupFieldId,r=n.json[t][i];if(r.type===c.GroupFieldType)return r}function R(e,n){return(0,o.Z)((0,r.Z)({},e),{config:(0,o.Z)((0,r.Z)({},e.config),{fields:n})})}function O(e){var n,t,i=e.id,o=e.label,a=e.repeatable,c=e.format,s=(n=a,t=c,!1===n&&"page"===t?(0,r.Z)({},N,V):!1===n?_:"page"===t?(0,r.Z)({},D,V):L);return{format:c,id:i,json:s,label:o,repeatable:a,status:!0}}var _={Main:{}},N={Main:{slices:{config:{choices:{}},fieldset:"Slice Zone",type:"Slices"}}},L={Main:{uid:{config:{label:"UID"},type:"UID"}}},D={Main:(0,r.Z)({},L.Main,N.Main)},V={"SEO & Metadata":{meta_description:{config:{label:"Meta Description",placeholder:"A brief summary of the page"},type:"Text"},meta_image:{config:{constraint:{height:1260,width:2400},label:"Meta Image",thumbnails:[]},type:"Image"},meta_title:{config:{label:"Meta Title",placeholder:"A title of the page used for social media and search engines"},type:"Text"}}}},28684:function(e,n,t){"use strict";var i=t(5632),r=t(56580),o=t(49222),a=function(){var e=(0,i.useRouter)(),n=(0,r.v9)(function(n){return{slice:(0,o.t)(n,e.query.lib,e.query.sliceName)}}).slice;if(!n)return{};var t=n.model.variations.find(function(n){return n.id===e.query.variation});return t?{slice:n,variation:t}:{}};n.Z=a},76473:function(e,n,t){"use strict";t.d(n,{y1:function(){return j}});var i=t(2784);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)}t(52322);var o=["shift","alt","meta","mod","ctrl"],a={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function c(e){return(a[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function s(e,n){return void 0===n&&(n=","),e.split(n)}function u(e,n,t){void 0===n&&(n="+");var i,a=e.toLocaleLowerCase().split(n).map(function(e){return c(e)});return r({},{alt:a.includes("alt"),ctrl:a.includes("ctrl")||a.includes("control"),shift:a.includes("shift"),meta:a.includes("meta"),mod:a.includes("mod")},{keys:a.filter(function(e){return!o.includes(e)}),description:t})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&f([c(e.key),c(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&p([c(e.key),c(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){l.clear()});var l=new Set;function d(e){return Array.isArray(e)}function f(e){var n=Array.isArray(e)?e:[e];l.has("meta")&&l.forEach(function(e){var n;return!o.includes(e)&&l.delete(e.toLowerCase())}),n.forEach(function(e){return l.add(e.toLowerCase())})}function p(e){var n=Array.isArray(e)?e:[e];"meta"===e?l.clear():n.forEach(function(e){return l.delete(e.toLowerCase())})}function v(e,n){var t=e.target;void 0===n&&(n=!1);var i=t&&t.tagName;return d(n)?Boolean(i&&n&&n.some(function(e){return e.toLowerCase()===i.toLowerCase()})):Boolean(i&&n&&!0===n)}var m=function(e,n,t){void 0===t&&(t=!1);var i,r,o=n.alt,a=n.meta,s=n.mod,u=n.shift,f=n.ctrl,p=n.keys,v=e.key,m=e.code,h=e.ctrlKey,y=e.metaKey,x=e.shiftKey,g=e.altKey,j=c(m),b=v.toLowerCase();if(!t){if(!g===o&&"alt"!==b||!x===u&&"shift"!==b)return!1;if(s){if(!y&&!h)return!1}else if(!y===a&&"meta"!==b&&"os"!==b||!h===f&&"ctrl"!==b&&"control"!==b)return!1}return!!(p&&1===p.length&&(p.includes(b)||p.includes(j)))||(p?(void 0===r&&(r=","),(d(i=p)?i:i.split(r)).every(function(e){return l.has(e.trim().toLowerCase())})):!p)},h=(0,i.createContext)(void 0),y=(0,i.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),x=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},g="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function j(e,n,t,r){var o,a,l=(0,i.useRef)(null),j=(0,i.useRef)(!1),b=t instanceof Array?r instanceof Array?void 0:r:t,Z=d(e)?e.join(null==b?void 0:b.splitKey):e,w=t instanceof Array?t:r instanceof Array?r:void 0,I=(0,i.useCallback)(n,null!=w?w:[]),S=(0,i.useRef)(I);w?S.current=I:S.current=n;var C=(!function e(n,t){return n&&t&&"object"==typeof n&&"object"==typeof t?Object.keys(n).length===Object.keys(t).length&&Object.keys(n).reduce(function(i,r){return i&&e(n[r],t[r])},!0):n===t}((a=(0,i.useRef)(void 0)).current,b)&&(a.current=b),a.current),k=(0,i.useContext)(y).enabledScopes,T=(0,i.useContext)(h);return g(function(){if((null==C?void 0:C.enabled)!==!1&&(e=k,n=null==C?void 0:C.scopes,0===e.length&&n?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):!!(!n||e.some(function(e){return n.includes(e)})||e.includes("*")))){var e,n,t=function(e,n){var t,i;if(void 0===n&&(n=!1),!(v(e,["input","textarea","select"])&&!v(e,null==C?void 0:C.enableOnFormTags)||null!=C&&null!=C.ignoreEventWhen&&C.ignoreEventWhen(e))){if(null!==l.current&&document.activeElement!==l.current&&!l.current.contains(document.activeElement)){x(e);return}(null==(t=e.target)||!t.isContentEditable||null!=C&&C.enableOnContentEditable)&&s(Z,null==C?void 0:C.splitKey).forEach(function(t){var i,r,o,a,c,s,l,d=u(t,null==C?void 0:C.combinationKey);if(m(e,d,null==C?void 0:C.ignoreModifiers)||null!=(l=d.keys)&&l.includes("*")){if(n&&j.current)return;if(i=e,r=d,("function"==typeof(o=null==C?void 0:C.preventDefault)&&o(i,r)||!0===o)&&i.preventDefault(),a=e,c=d,"function"==typeof(s=null==C?void 0:C.enabled)?!s(a,c):!0!==s&&void 0!==s){x(e);return}S.current(e,d),n||(j.current=!0)}})}},i=function(e){void 0!==e.key&&(f(c(e.code)),((null==C?void 0:C.keydown)===void 0&&(null==C?void 0:C.keyup)!==!0||null!=C&&C.keydown)&&t(e))},r=function(e){void 0!==e.key&&(p(c(e.code)),j.current=!1,null!=C&&C.keyup&&t(e,!0))},o=l.current||(null==b?void 0:b.document)||document;return o.addEventListener("keyup",r),o.addEventListener("keydown",i),T&&s(Z,null==C?void 0:C.splitKey).forEach(function(e){return T.addHotkey(u(e,null==C?void 0:C.combinationKey,null==C?void 0:C.description))}),function(){o.removeEventListener("keyup",r),o.removeEventListener("keydown",i),T&&s(Z,null==C?void 0:C.splitKey).forEach(function(e){return T.removeHotkey(u(e,null==C?void 0:C.combinationKey,null==C?void 0:C.description))})}}},[Z,C,k]),l}}},function(e){e.O(0,[898,789,917,525,461,139,183,50,543,696,25,318,286,774,888,179],function(){return e(e.s=31314)}),_N_E=e.O()}]);
|
package/out/changelog.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/183-4feb6bb3eddbc768.js" defer=""></script><script src="/_next/static/chunks/870-0c7a8a9622de78b7.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-afd18276fe018b24.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/changes.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/37153180c3b0dd66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/37153180c3b0dd66.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/37153180c3b0dd66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/37153180c3b0dd66.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/8eec4907-b712959d9f984b68.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/918-5bb55fb464e34768.js" defer=""></script><script src="/_next/static/chunks/25-37d6fa7f064be04b.js" defer=""></script><script src="/_next/static/chunks/286-ed90373e9a469944.js" defer=""></script><script src="/_next/static/chunks/pages/changes-92c84f6cac0285fd.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/72465cc1225f28a2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/72465cc1225f28a2.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/72465cc1225f28a2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/72465cc1225f28a2.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-4feb6bb3eddbc768.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b12edad30a3617e5.js" defer=""></script><script src="/_next/static/chunks/474-5a072e6fac61f703.js" defer=""></script><script src="/_next/static/chunks/25-37d6fa7f064be04b.js" defer=""></script><script src="/_next/static/chunks/731-341869976a48a09a.js" defer=""></script><script src="/_next/static/chunks/318-34a2dea7cfd4661d.js" defer=""></script><script src="/_next/static/chunks/904-833eed675f19ab60.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-3f862ad6111a1fc0.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types/[customTypeId]","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/custom-types.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/731-341869976a48a09a.js" defer=""></script><script src="/_next/static/chunks/727-c5028806448c4387.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-94b8f8dbf7727412.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/731-341869976a48a09a.js" defer=""></script><script src="/_next/static/chunks/727-c5028806448c4387.js" defer=""></script><script src="/_next/static/chunks/pages/index-ca194b18d0e3930d.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/labs.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/pages/labs-ee206005948f8e87.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/72465cc1225f28a2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/72465cc1225f28a2.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/72465cc1225f28a2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/72465cc1225f28a2.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-4feb6bb3eddbc768.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b12edad30a3617e5.js" defer=""></script><script src="/_next/static/chunks/474-5a072e6fac61f703.js" defer=""></script><script src="/_next/static/chunks/25-37d6fa7f064be04b.js" defer=""></script><script src="/_next/static/chunks/731-341869976a48a09a.js" defer=""></script><script src="/_next/static/chunks/318-34a2dea7cfd4661d.js" defer=""></script><script src="/_next/static/chunks/904-833eed675f19ab60.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-d1ffca11c42f2603.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/page-types/[pageTypeId]","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/72585f70-28b4d7d5384b3703.js" defer=""></script><script src="/_next/static/chunks/18539003-5cc559566b738915.js" defer=""></script><script src="/_next/static/chunks/376-7e784d6069e01654.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-897ca93c114a1435.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]/simulator","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/b22c0750c14cc089.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b22c0750c14cc089.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/b22c0750c14cc089.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b22c0750c14cc089.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-4feb6bb3eddbc768.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b12edad30a3617e5.js" defer=""></script><script src="/_next/static/chunks/25-37d6fa7f064be04b.js" defer=""></script><script src="/_next/static/chunks/318-34a2dea7cfd4661d.js" defer=""></script><script src="/_next/static/chunks/286-ed90373e9a469944.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-2d3d84de925b289e.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/slices.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f8eb526e10bc2441.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f8eb526e10bc2441.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/200244e3e0463c39.css" as="style"/><link rel="stylesheet" href="/_next/static/css/200244e3e0463c39.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f8eb526e10bc2441.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f8eb526e10bc2441.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4a63c0e108026c4d.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/25-37d6fa7f064be04b.js" defer=""></script><script src="/_next/static/chunks/286-ed90373e9a469944.js" defer=""></script><script src="/_next/static/chunks/pages/slices-e9c70c082ca3e3f9.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_buildManifest.js" defer=""></script><script src="/_next/static/GqPZYfMQrQUPwvgI_rvdq/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"GqPZYfMQrQUPwvgI_rvdq","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slice-machine-ui",
|
|
3
|
-
"version": "1.23.2-beta.
|
|
3
|
+
"version": "1.23.2-beta.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A visual builder for your Slice Models with all the tools you need to generate data models and mock CMS content locally.",
|
|
6
6
|
"repository": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@radix-ui/react-visually-hidden": "1.0.3",
|
|
39
|
-
"@slicemachine/manager": "0.17.9-beta.
|
|
40
|
-
"start-slicemachine": "0.12.15-beta.
|
|
39
|
+
"@slicemachine/manager": "0.17.9-beta.5",
|
|
40
|
+
"start-slicemachine": "0.12.15-beta.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@emotion/react": "11.11.1",
|
|
@@ -782,4 +782,183 @@ describe("CustomTypeModel test suite", () => {
|
|
|
782
782
|
},
|
|
783
783
|
});
|
|
784
784
|
});
|
|
785
|
+
|
|
786
|
+
it("should create a custom type with repeatable true", () => {
|
|
787
|
+
expect(
|
|
788
|
+
CustomTypeModel.create({
|
|
789
|
+
id: "id",
|
|
790
|
+
label: "lama",
|
|
791
|
+
repeatable: true,
|
|
792
|
+
format: "custom",
|
|
793
|
+
}),
|
|
794
|
+
).toMatchInlineSnapshot(`
|
|
795
|
+
{
|
|
796
|
+
"format": "custom",
|
|
797
|
+
"id": "id",
|
|
798
|
+
"json": {
|
|
799
|
+
"Main": {
|
|
800
|
+
"uid": {
|
|
801
|
+
"config": {
|
|
802
|
+
"label": "UID",
|
|
803
|
+
},
|
|
804
|
+
"type": "UID",
|
|
805
|
+
},
|
|
806
|
+
},
|
|
807
|
+
},
|
|
808
|
+
"label": "lama",
|
|
809
|
+
"repeatable": true,
|
|
810
|
+
"status": true,
|
|
811
|
+
}
|
|
812
|
+
`);
|
|
813
|
+
});
|
|
814
|
+
|
|
815
|
+
it("should create a custom type with repeatable false", () => {
|
|
816
|
+
const result = CustomTypeModel.create({
|
|
817
|
+
id: "id",
|
|
818
|
+
label: "lama",
|
|
819
|
+
repeatable: false,
|
|
820
|
+
format: "custom",
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
expect(result.id).toBe("id");
|
|
824
|
+
expect(result.label).toBe("lama");
|
|
825
|
+
expect(result.format).toBe("custom");
|
|
826
|
+
expect(result.json).toHaveProperty("Main");
|
|
827
|
+
expect(result).toMatchInlineSnapshot(`
|
|
828
|
+
{
|
|
829
|
+
"format": "custom",
|
|
830
|
+
"id": "id",
|
|
831
|
+
"json": {
|
|
832
|
+
"Main": {},
|
|
833
|
+
},
|
|
834
|
+
"label": "lama",
|
|
835
|
+
"repeatable": false,
|
|
836
|
+
"status": true,
|
|
837
|
+
}
|
|
838
|
+
`);
|
|
839
|
+
});
|
|
840
|
+
|
|
841
|
+
it("should create a page type with a slice zone", () => {
|
|
842
|
+
const result = CustomTypeModel.create({
|
|
843
|
+
id: "🥪",
|
|
844
|
+
label: "label",
|
|
845
|
+
repeatable: true,
|
|
846
|
+
format: "page",
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
expect(result.format).toBe("page");
|
|
850
|
+
expect(result.json).toHaveProperty("Main");
|
|
851
|
+
expect(result.json.Main).toHaveProperty("slices");
|
|
852
|
+
expect(result.json).toHaveProperty("SEO & Metadata");
|
|
853
|
+
expect(result).toMatchInlineSnapshot(`
|
|
854
|
+
{
|
|
855
|
+
"format": "page",
|
|
856
|
+
"id": "🥪",
|
|
857
|
+
"json": {
|
|
858
|
+
"Main": {
|
|
859
|
+
"slices": {
|
|
860
|
+
"config": {
|
|
861
|
+
"choices": {},
|
|
862
|
+
},
|
|
863
|
+
"fieldset": "Slice Zone",
|
|
864
|
+
"type": "Slices",
|
|
865
|
+
},
|
|
866
|
+
"uid": {
|
|
867
|
+
"config": {
|
|
868
|
+
"label": "UID",
|
|
869
|
+
},
|
|
870
|
+
"type": "UID",
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
"SEO & Metadata": {
|
|
874
|
+
"meta_description": {
|
|
875
|
+
"config": {
|
|
876
|
+
"label": "Meta Description",
|
|
877
|
+
"placeholder": "A brief summary of the page",
|
|
878
|
+
},
|
|
879
|
+
"type": "Text",
|
|
880
|
+
},
|
|
881
|
+
"meta_image": {
|
|
882
|
+
"config": {
|
|
883
|
+
"constraint": {
|
|
884
|
+
"height": 1260,
|
|
885
|
+
"width": 2400,
|
|
886
|
+
},
|
|
887
|
+
"label": "Meta Image",
|
|
888
|
+
"thumbnails": [],
|
|
889
|
+
},
|
|
890
|
+
"type": "Image",
|
|
891
|
+
},
|
|
892
|
+
"meta_title": {
|
|
893
|
+
"config": {
|
|
894
|
+
"label": "Meta Title",
|
|
895
|
+
"placeholder": "A title of the page used for social media and search engines",
|
|
896
|
+
},
|
|
897
|
+
"type": "Text",
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
},
|
|
901
|
+
"label": "label",
|
|
902
|
+
"repeatable": true,
|
|
903
|
+
"status": true,
|
|
904
|
+
}
|
|
905
|
+
`);
|
|
906
|
+
});
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
it("when non repeatable page type is should contain Main with a slice-zone, no uid, and a SEO tab", () => {
|
|
910
|
+
const result = CustomTypeModel.create({
|
|
911
|
+
id: "foo",
|
|
912
|
+
label: "bar",
|
|
913
|
+
repeatable: false,
|
|
914
|
+
format: "page",
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
expect(result).toMatchInlineSnapshot(`
|
|
918
|
+
{
|
|
919
|
+
"format": "page",
|
|
920
|
+
"id": "foo",
|
|
921
|
+
"json": {
|
|
922
|
+
"Main": {
|
|
923
|
+
"slices": {
|
|
924
|
+
"config": {
|
|
925
|
+
"choices": {},
|
|
926
|
+
},
|
|
927
|
+
"fieldset": "Slice Zone",
|
|
928
|
+
"type": "Slices",
|
|
929
|
+
},
|
|
930
|
+
},
|
|
931
|
+
"SEO & Metadata": {
|
|
932
|
+
"meta_description": {
|
|
933
|
+
"config": {
|
|
934
|
+
"label": "Meta Description",
|
|
935
|
+
"placeholder": "A brief summary of the page",
|
|
936
|
+
},
|
|
937
|
+
"type": "Text",
|
|
938
|
+
},
|
|
939
|
+
"meta_image": {
|
|
940
|
+
"config": {
|
|
941
|
+
"constraint": {
|
|
942
|
+
"height": 1260,
|
|
943
|
+
"width": 2400,
|
|
944
|
+
},
|
|
945
|
+
"label": "Meta Image",
|
|
946
|
+
"thumbnails": [],
|
|
947
|
+
},
|
|
948
|
+
"type": "Image",
|
|
949
|
+
},
|
|
950
|
+
"meta_title": {
|
|
951
|
+
"config": {
|
|
952
|
+
"label": "Meta Title",
|
|
953
|
+
"placeholder": "A title of the page used for social media and search engines",
|
|
954
|
+
},
|
|
955
|
+
"type": "Text",
|
|
956
|
+
},
|
|
957
|
+
},
|
|
958
|
+
},
|
|
959
|
+
"label": "bar",
|
|
960
|
+
"repeatable": false,
|
|
961
|
+
"status": true,
|
|
962
|
+
}
|
|
963
|
+
`);
|
|
785
964
|
});
|