slice-machine-ui 1.16.1-dev-next-release.1 → 1.16.1-dev-next-release.3
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/Navigation/ChangesListItem.tsx +40 -46
- package/components/Navigation/VideoItem.tsx +0 -1
- package/components/Navigation/index.test.tsx +1 -1
- package/components/Navigation/index.tsx +24 -33
- package/lib/builders/SliceBuilder/links.ts +2 -2
- package/out/404.html +1 -1
- package/out/_next/static/chunks/{377-467ca51a57342a23.js → 377-96290662f5b987a1.js} +1 -1
- package/out/_next/static/chunks/{590-fa9970ac3f1d9c1e.js → 590-ab38d53732035bf0.js} +1 -1
- package/out/_next/static/chunks/933-0fa0258a770c787d.js +1 -0
- package/out/_next/static/chunks/pages/{_app-661015bd74d41ec7.js → _app-87d3995db23544c1.js} +2 -2
- package/out/_next/static/chunks/pages/{changes-c62c4ac5de9a1a09.js → changes-e58a6f4217ec2d9e.js} +1 -1
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-375f234af61fdf94.js → [customTypeId]-57edaacb81e17a44.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-7bf582e0368b1713.js → [pageTypeId]-c62f5c1608ce3af3.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/screenshot-76d40513025fd76d.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-37ba73cd3c821e04.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-5b6c6912b66de61f.js +1 -0
- package/out/_next/static/chunks/pages/{slices-15b69ac3611efbfe.js → slices-b686960d7d228e36.js} +1 -1
- package/out/_next/static/css/{9ddd0cb7fff63603.css → 7aca5b80aec5d9fd.css} +1 -1
- package/out/_next/static/ffkR0-mMg1TzZjSy6bDqL/_buildManifest.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/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/screenshot.html +1 -0
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -0
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -0
- package/out/slices.html +1 -1
- package/package.json +4 -4
- package/src/components/List/List.css.ts +2 -2
- package/src/components/List/List.stories.tsx +5 -1
- package/src/components/SideNav/SideNav.stories.tsx +1 -2
- package/src/components/SideNav/SideNav.tsx +29 -30
- package/src/components/Window/Window.css.ts +5 -5
- package/src/features/slices/sliceCards/NonSharedSliceViewCard.tsx +7 -2
- package/src/features/slices/slicesConfig.ts +4 -6
- package/test/__setup__.ts +5 -0
- package/test/pages/simulator.test.tsx +2 -2
- package/out/[lib]/[sliceName]/[variation]/screenshot.html +0 -1
- package/out/[lib]/[sliceName]/[variation]/simulator.html +0 -1
- package/out/[lib]/[sliceName]/[variation].html +0 -1
- package/out/_next/static/E4K6KdIR2Dj6QhKo68tHE/_buildManifest.js +0 -1
- package/out/_next/static/chunks/933-446b840f98e98471.js +0 -1
- package/out/_next/static/chunks/97-ee2fa6c3e6bf7b71.js +0 -1
- package/out/_next/static/chunks/pages/[lib]/[sliceName]/[variation]/screenshot-2750adc7cdad5005.js +0 -1
- package/out/_next/static/chunks/pages/[lib]/[sliceName]/[variation]/simulator-47ba090193469e3f.js +0 -1
- package/out/_next/static/chunks/pages/[lib]/[sliceName]/[variation]-89838e684fcaaf5d.js +0 -1
- /package/out/_next/static/{E4K6KdIR2Dj6QhKo68tHE → ffkR0-mMg1TzZjSy6bDqL}/_ssgManifest.js +0 -0
- /package/pages/{[lib] → slices/[lib]}/[sliceName]/[variation]/index.tsx +0 -0
- /package/pages/{[lib] → slices/[lib]}/[sliceName]/[variation]/screenshot.tsx +0 -0
- /package/pages/{[lib] → slices/[lib]}/[sliceName]/[variation]/simulator.tsx +0 -0
package/out/_next/static/chunks/pages/{changes-c62c4ac5de9a1a09.js → changes-e58a6f4217ec2d9e.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(4920)}])},4920:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ed}});var s=t(52322),i=t(71651),r=t(2784),l=t(97729),o=t.n(l),a=t(65077),c=t(56580),d=t(25251),u=t(75289),x=t(951),h=function(e){var n=e.children;return(0,s.jsx)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between",mt:"8px",bg:"grey02",borderRadius:4,padding:"12px 16px"},children:n})},m=t(39097),p=t.n(m),f=t(7819),g=t(34728),j=t(67445),v=function(e){var n=e.ct,t=e.status,i=e.authStatus,r=e.isOnline;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.xu,{as:"td",style:{width:"40%"},children:(0,s.jsx)(u.xv,{sx:{fontWeight:500},children:n.label})}),(0,s.jsx)(u.xu,{as:"td",style:{width:"40%"},children:n.id}),(0,s.jsx)(u.xu,{as:"td",style:{width:"20%"},children:(0,s.jsx)(g.O,{authStatus:i,isOnline:r,modelStatus:t,modelType:"CustomType"})})]})},y=function(e){var n=e.customTypes,t=e.modelsStatuses,i=e.authStatus,r=e.isOnline;return(0,s.jsxs)(u.xu,{as:"table","data-legacy-component":!0,children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"transparent small",children:[(0,s.jsx)(u.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"Name"}),(0,s.jsx)(u.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"API ID"}),(0,s.jsx)(u.xu,{as:"th",sx:{width:"20%",fontWeight:600},children:"Status"})]})}),(0,s.jsx)("tbody",{children:n.map(function(e){return(0,f.TG)(e)?(0,s.jsx)(p(),{passHref:!0,href:j.cd[e.local.format].getBuilderPagePathname(e.local.id),legacyBehavior:!0,children:(0,s.jsx)("tr",{tabIndex:0,children:(0,s.jsx)(v,{ct:e.local,status:t.customTypes[e.local.id],authStatus:i,isOnline:r,modelsStatuses:t},e.local.id)})},e.local.id):(0,s.jsx)("tr",{tabIndex:0,className:"disabled",children:(0,s.jsx)(v,{ct:e.remote,status:t.customTypes[e.remote.id],authStatus:i,isOnline:r,modelsStatuses:t},e.remote.id)})})})]})},b=t(59469),_=t(84449),C=t(5479),S=t(47731),T=t(32681),D=t(82131),k=function(e){var n=e.unSyncedCustomTypes,t=e.unSyncedSlices,i=e.modelsStatuses,r=e.authStatus,l=e.isOnline,o=(0,S.H)(),a=o.modalPayload,c=o.onOpenModal,d=a.sliceFilterFn,m=a.defaultVariationSelector,p=t.filter(function(e){return i.slices[e.model.id]!==T.G.Deleted});return(0,s.jsxs)(s.Fragment,{children:[n.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h,{children:(0,s.jsxs)(u.xu,{children:[(0,s.jsx)(u.xv,{variant:"heading",children:"Types"}),(0,s.jsx)(u.xv,{variant:"grey",sx:{ml:"8px"},children:n.length})]})}),(0,s.jsx)(y,{customTypes:n,modelsStatuses:i,authStatus:r,isOnline:l})]}),t.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.xu,{sx:{mb:"8px"},children:(0,s.jsxs)(h,{children:[(0,s.jsxs)(u.xu,{children:[(0,s.jsx)(u.xv,{variant:"heading",children:"Slices"}),(0,s.jsx)(u.xv,{variant:"grey",sx:{ml:"8px"},children:t.length})]}),(0,s.jsxs)(u.xu,{children:[t.some(function(e){return(0,C.cx)(e)>0&&i.slices[e.model.id]!==T.G.Deleted})&&(0,s.jsxs)(u.xv,{sx:{mr:3,color:"warning02",fontSize:"12px",lineHeight:"16px",fontWeight:600},children:[(0,s.jsx)(x.sQg,{size:16,style:{marginRight:"4px",position:"relative",top:"3px"}}),"Missing Screenshots"]}),(0,s.jsxs)(u.zx,{variant:"darkSmall",onClick:function(){return c({sliceFilterFn:function(e){return e}})},children:[(0,s.jsx)(x.hOO,{style:{color:"#FFF",fontSize:"15px",position:"relative",top:"3px",marginRight:"4px"}})," ","Update all screenshots"]})]})]})}),(0,s.jsx)(b.Z,{gridGap:"32px 16px",elems:t,gridTemplateMinPx:"305px",defineElementKey:function(e){return e.model.name},renderElem:function(e){var n=i.slices[e.model.id];return(0,s.jsx)(D.B,{action:{type:"status",authStatus:r,isOnline:l,modelStatus:n},isDeletedSlice:n===T.G.Deleted,onUpdateScreenshot:function(){c({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},slice:e})}}),(0,s.jsx)(_.Z,{slices:d(p),defaultVariationSelector:m})]})]})},O=t(91914),w=function(){return(0,s.jsx)(u.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,s.jsxs)(u.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,s.jsx)(O.wQ1,{size:48}),(0,s.jsx)(u.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px"},children:"No internet connection"}),(0,s.jsx)(u.xv,{sx:{fontSize:"13px",lineHeight:"24px"},children:"You need a stable internet connection to review and push changes"})]})})},N=t(90374),R=function(){var e=(0,N.Z)().openLoginModal;return(0,s.jsx)(u.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,s.jsxs)(u.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,s.jsx)(u.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px"},children:"Could not access your repository"}),(0,s.jsx)(u.xv,{sx:{fontSize:"13px",lineHeight:"24px"},children:"You need to log in to Prismic in order to push your changes."}),(0,s.jsx)(u.zx,{sx:{mt:"24px"},onClick:function(){return e()},children:"Log in to Prismic"})]})})},Z=t(5632),E=t.n(Z),z=t(2754),F=t(34543),I=t(62230),H=t(85244),M=t(98240),P=t(6277);t(25977);var W={primary:"_1ecs97d74o _1ecs97d74p _1ecs97d74i _1ecs97d74j _1ecs97d74q _1ecs97d74r",secondary:"_1ecs97d6pe _1ecs97d6pf _1ecs97d6p8 _1ecs97d6p9 _1ecs97d6pg _1ecs97d6ph"},A={normal:"ovkapw1",smallBold:"ovkapw2",inherit:"ovkapw3 _1ecs97d9gj"},B=function(e){var n=e.children,t=e.color,l=e.endIcon,o=e.href,a=e.textVariant,c=void 0===a?"smallBold":a,d=(0,M.Z)(e,["children","color","endIcon","href","textVariant"]);return(0,s.jsxs)("a",(0,H.Z)((0,I.Z)({href:o,target:"_blank",rel:"noreferrer"},d),{className:(0,P.Z)("ovkapw0 _1ecs97d9bi _1ecs97d9gd _1ecs97d9bk _1ecs97d9bq",W[void 0===t?"primary":t]),children:[(0,s.jsx)(i.xv,{component:"span",color:"inherit",variant:c,children:n}),(0,r.isValidElement)(l)?(0,r.cloneElement)(l,{className:(0,P.Z)(l.props.className,"_1ecs97d9tn",A[c])}):null]}))},U=t(39092),G=function(){var e,n=(e=(0,c.v9)(function(e){return{repoName:(0,U.MY)(e)}}).repoName,"https://".concat(e,".prismic.io/documents/working"));return(0,s.jsxs)(z.R$,{style:{alignSelf:"center",marginTop:i.TV.size[72]},children:[(0,s.jsx)(z.u2,{children:(0,s.jsx)(i.Ee,{src:"/blank-slate-changes-uptodate.png",sizing:"cover"})}),(0,s.jsxs)(z.T9,{children:[(0,s.jsx)(z._T,{children:"Everything up-to-date"}),(0,s.jsx)(z.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,s.jsxs)(z.Qj,{children:[(0,s.jsx)(i.zx,{onClick:function(){E().push("/")},children:"Create a page type"}),(0,s.jsx)(B,{endIcon:(0,s.jsx)(F.AlO,{}),textVariant:"normal",href:n,children:"Create content"})]})]})]})},V=t(79096),Y=t(85412),L=t(32665),q=t(3098),X=t(56577),Q=t(24340),J=t(77174),$=t(49471),K=t(57282),ee=t(78656),en=function(e){var n=e.ctName,t=e.numberOfDocuments,i=e.link,r=e.isOverLimit;return(0,s.jsxs)(u.Zb,{sx:{mb:12},variant:"drawerCard","data-cy":"AssociatedDocumentsCard-".concat(n),children:[(0,s.jsxs)(u.kC,{sx:{flexDirection:"column"},children:[(0,s.jsx)(u.xv,{children:n}),(0,s.jsxs)(u.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:[t," documents"]})]}),(0,s.jsx)(u.rU,{href:i,target:"_blank",variant:"cardSmall",sx:{color:void 0!==r&&r?"danger":"purple08"},children:"View documents"})]})},et=function(e){var n=e.format,t=e.id,i=e.name;return(0,s.jsxs)(u.Zb,{sx:{mb:12},variant:"drawerCard","data-cy":"CustomTypesReferencesCard-".concat(i),children:[(0,s.jsxs)(u.kC,{sx:{flexDirection:"column"},children:[(0,s.jsx)(u.xv,{children:i}),(0,s.jsx)(u.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:"Missing Slices"})]}),(0,s.jsxs)(u.rU,{href:j.cd[n].getBuilderPagePathname(t),target:"_blank",variant:"cardSmall",children:["View ",ee.$[n].name({start:!1,plural:!1})]},t)]})},es=t(79797),ei=t(54132),er=function(e){var n=e.isOpen,t=e.title,i=e.footer,r=e.explanations,l=(0,N.Z)().closeModals;return(0,s.jsx)(es.Z,{placement:"right",open:n,level:null,onClose:l,width:496,children:(0,s.jsx)(ei.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,s.jsxs)(u.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,s.jsx)(u.kC,{sx:{alignItems:"center"},children:(0,s.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:t})}),(0,s.jsx)(u.x8,{type:"button",onClick:function(){return l()}})]})},Footer:function(){return(0,s.jsx)(u.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:i})},children:r})})},el=function(e){var n=e.onToggle,t=e.isConfirmed,i=e.sx;return(0,s.jsxs)(u.kC,{sx:(0,I.Z)({borderRadius:6,flexDirection:"column",backgroundColor:"grey03",padding:12,width:"100%"},i),children:[(0,s.jsx)(u.xv,{sx:{fontWeight:"bold",mb:2},children:"Are you sure to proceed?"}),(0,s.jsxs)(u.__,{sx:{mt:"4px",py:1},variant:"large",children:[(0,s.jsx)(u.XZ,{defaultChecked:t,onChange:n,variant:"forms.checkbox.dark"}),"Delete these Documents"]})]})},eo=function(e){var n=e.pushChanges,t=(0,r.useState)(!1),i=t[0],l=t[1],o=(0,c.v9)(function(e){return{isDeleteDocumentsDrawerOpen:(0,J.gP)(e,Q.q.SOFT_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,$.Ch)(e).filter(f.yp),modalData:e.pushChanges}}),a=o.isDeleteDocumentsDrawerOpen,d=o.remoteOnlyCustomTypes,x=o.modalData,h=(0,N.Z)(),m=h.closeModals,p=h.openToaster;if(!a)return null;if((null==x?void 0:x.type)!=="SOFT")return p("No change data",K.Jf.ERROR),null;var g=x.details.customTypes.map(function(e){var n,t=d.find(function(n){return(0,f.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(en,{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,s.jsx)(er,{isOpen:a,title:"Confirm deletion",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(el,{onToggle:function(){l(!i)},isConfirmed:i,sx:{mb:10}}),(0,s.jsx)(X.z,{label:"Push changes",variant:"primary",onClick:function(){m(),n(i)},disabled:!i,sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})]}),explanations:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:"This action will also delete Documents."}),(0,s.jsxs)(u.xv,{sx:{mb:24},children:[x.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."]}),g]})})},ea=function(e){var n=e.pushChanges,t=(0,c.v9)(function(e){return{isDeleteDocumentsDrawerOpen:(0,J.gP)(e,Q.q.HARD_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,$.Ch)(e).filter(f.yp),modalData:e.pushChanges}}),i=t.isDeleteDocumentsDrawerOpen,r=t.remoteOnlyCustomTypes,l=t.modalData,o=(0,N.Z)(),a=o.closeModals,d=o.openToaster;if(!i)return null;if((null==l?void 0:l.type)!=="HARD")return d("No change data",K.Jf.ERROR),null;var x=l.details.customTypes.map(function(e){var n,t=r.find(function(n){return(0,f.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(en,{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,s.jsx)(er,{isOpen:i,title:"Manual action required",footer:(0,s.jsx)(X.z,{label:"Try again",variant:"primary",onClick:function(){a(),n(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}}),explanations:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["Your type",l.details.customTypes.length>1&&"s"," cannot be deleted."]}),(0,s.jsxs)(u.xv,{sx:{mb:24},children:[l.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."]}),x]})})},ec=function(e){var n=e.pushChanges,t=(0,c.v9)(function(e){return{isOpen:(0,J.gP)(e,Q.q.REFERENCES_MISSING_DRAWER),localCustomTypes:(0,$.Ch)(e).filter(f.TG),modalData:e.pushChanges}}),i=t.isOpen,r=t.modalData,l=t.localCustomTypes,o=(0,N.Z)(),a=o.closeModals,d=o.openToaster;if(!i)return null;if((null==r?void 0:r.details)===void 0)return d("No change data",K.Jf.ERROR),null;var x=(null==r?void 0:r.details.customTypes.length)>1,h=r.details.customTypes.map(function(e){var n,t=l.find(function(n){return(0,f.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(et,{format:t.local.format,id:t.local.id,name:null!==(n=t.local.label)&&void 0!==n?n:t.local.id})});return(0,s.jsx)(er,{isOpen:i,title:"Missing Slices",footer:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(X.z,{label:"Try again",variant:"primary",onClick:function(){a(),n(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})}),explanations:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["You have",x?"":" a"," type",x?"s":""," that reference"," ",x?"":"s"," one or more missing Slices"]}),(0,s.jsxs)(u.xv,{sx:{mb:24},children:["Before pushing, remove references to any missing Slices by opening"," ","the affected type",x?"s":""," and clicking the"," ",(0,s.jsx)("b",{children:"Save"})," button."]}),h]})})},ed=function(){var e=(0,Y.X)(),n=e.unSyncedSlices,t=e.unSyncedCustomTypes,l=e.modelsStatuses,u=e.authStatus,x=e.isOnline,h=(0,r.useMemo)(function(){var e;return{changedSlices:n.map(function(e){return{slice:e,status:l.slices[e.model.id]}}).filter(function(e){return Y.O.includes(e.status)}),changedCustomTypes:t.map(function(e){return(0,f.TG)(e)?e.local:e.remote}).map(function(e){return{customType:e,status:l.customTypes[e.id]}}).filter(function(e){return Y.O.includes(e.status)})}},[n,t,l]),m=h.changedSlices,p=h.changedCustomTypes,g=(0,N.Z)(),j=g.pushChanges,v=g.closeModals,y=(0,c.v9)(function(e){return{isSyncing:(0,L.hg)(e,q.z.CHANGES_PUSH)}}).isSyncing;(0,r.useEffect)(function(){return function(){v()}},[]);var b=n.length+t.length,_=function(e){return j({confirmDeleteDocuments:e,changedSlices:m,changedCustomTypes:p})},C=(0,r.useMemo)(function(){return x?u===V.t.UNAUTHORIZED||u===V.t.FORBIDDEN?(0,s.jsx)(R,{}):0===b?(0,s.jsx)(G,{}):(0,s.jsx)(k,{unSyncedSlices:n,unSyncedCustomTypes:t,modelsStatuses:l,authStatus:u,isOnline:x}):(0,s.jsx)(w,{})},[x,u,b,n,t,l,]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o(),{children:(0,s.jsx)("title",{children:"Changes - Slice Machine"})}),(0,s.jsxs)(d.LN,{children:[(0,s.jsxs)(d.wd,{children:[(0,s.jsx)(d.Cx,{folder:"Changes"}),(0,s.jsx)(d.K2,{children:(0,s.jsx)(i.zx,{onClick:function(){return _(!1)},loading:y,disabled:0===b||!x||u===V.t.UNAUTHORIZED||u===V.t.FORBIDDEN||y,"data-cy":"push-changes",children:"Push Changes"})})]}),(0,s.jsx)(d.RN,{children:(0,s.jsxs)(a.xR,{sx:{display:"flex",flexDirection:"column"},children:[C,(0,s.jsx)(eo,{pushChanges:_}),(0,s.jsx)(ea,{pushChanges:_}),(0,s.jsx)(ec,{pushChanges:_})]})})]})]})}},2754:function(e,n,t){"use strict";t.d(n,{R$:function(){return d},Qj:function(){return p},T9:function(){return x},nf:function(){return m},u2:function(){return u},_T:function(){return h}});var s=t(67557),i=t(62230),r=t(85244),l=t(98240),o=t(52322),a=t(6277),c=t(71651);t(41236);var d=function(e){var n=e.backgroundImage,t=e.style,c=(0,l.Z)(e,["backgroundImage","style"]),d=void 0!==n;return(0,o.jsx)("article",(0,r.Z)((0,i.Z)({},c),{className:(0,a.Z)("_18bjhbz0 _1ecs97d9bi _1ecs97d9bj _1ecs97d9bk _1ecs97d9bt _1ecs97d9uk _1ecs97d9um _1ecs97d9uo _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9c7",(0,s.Z)({},"_18bjhbz1 _1ecs97d9cf _1ecs97d9h6",d)),style:(0,i.Z)({backgroundImage:d?"url(".concat(n,")"):void 0},t)}))},u=function(e){return(0,o.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_1ecs97d9bi _1ecs97d9bj _1ecs97d9bk _1ecs97d9bt _1ecs97d48s _1ecs97d4g5 _1ecs97d9ep _1ecs97d9f1 _1ecs97d9c7"}))},x=function(e){return(0,o.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz3 _1ecs97d9bi _1ecs97d9bj _1ecs97d9bk _1ecs97d9bt _1ecs97d9rr"}))},h=function(e){return(0,o.jsx)(c.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz4"}))},m=function(e){return(0,o.jsx)(c.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz5",color:"grey11"}))},p=function(e){return(0,o.jsx)(c.hE,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz6 _1ecs97d9lg _1ecs97d9bq _1ecs97d9pm",size:"medium",variant:"secondary"}))}},41236:function(){},25977:function(){}},function(e){e.O(0,[789,123,97,918,590,573,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(4920)}])},4920:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ed}});var s=t(52322),i=t(71651),r=t(2784),l=t(97729),o=t.n(l),a=t(65077),c=t(56580),d=t(25251),u=t(75289),x=t(951),h=function(e){var n=e.children;return(0,s.jsx)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between",mt:"8px",bg:"grey02",borderRadius:4,padding:"12px 16px"},children:n})},m=t(39097),p=t.n(m),f=t(7819),g=t(34728),j=t(67445),v=function(e){var n=e.ct,t=e.status,i=e.authStatus,r=e.isOnline;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.xu,{as:"td",style:{width:"40%"},children:(0,s.jsx)(u.xv,{sx:{fontWeight:500},children:n.label})}),(0,s.jsx)(u.xu,{as:"td",style:{width:"40%"},children:n.id}),(0,s.jsx)(u.xu,{as:"td",style:{width:"20%"},children:(0,s.jsx)(g.O,{authStatus:i,isOnline:r,modelStatus:t,modelType:"CustomType"})})]})},y=function(e){var n=e.customTypes,t=e.modelsStatuses,i=e.authStatus,r=e.isOnline;return(0,s.jsxs)(u.xu,{as:"table","data-legacy-component":!0,children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"transparent small",children:[(0,s.jsx)(u.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"Name"}),(0,s.jsx)(u.xu,{as:"th",sx:{width:"40%",fontWeight:600},children:"API ID"}),(0,s.jsx)(u.xu,{as:"th",sx:{width:"20%",fontWeight:600},children:"Status"})]})}),(0,s.jsx)("tbody",{children:n.map(function(e){return(0,f.TG)(e)?(0,s.jsx)(p(),{passHref:!0,href:j.cd[e.local.format].getBuilderPagePathname(e.local.id),legacyBehavior:!0,children:(0,s.jsx)("tr",{tabIndex:0,children:(0,s.jsx)(v,{ct:e.local,status:t.customTypes[e.local.id],authStatus:i,isOnline:r,modelsStatuses:t},e.local.id)})},e.local.id):(0,s.jsx)("tr",{tabIndex:0,className:"disabled",children:(0,s.jsx)(v,{ct:e.remote,status:t.customTypes[e.remote.id],authStatus:i,isOnline:r,modelsStatuses:t},e.remote.id)})})})]})},b=t(59469),_=t(84449),C=t(5479),S=t(47731),T=t(32681),D=t(82131),k=function(e){var n=e.unSyncedCustomTypes,t=e.unSyncedSlices,i=e.modelsStatuses,r=e.authStatus,l=e.isOnline,o=(0,S.H)(),a=o.modalPayload,c=o.onOpenModal,d=a.sliceFilterFn,m=a.defaultVariationSelector,p=t.filter(function(e){return i.slices[e.model.id]!==T.G.Deleted});return(0,s.jsxs)(s.Fragment,{children:[n.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(h,{children:(0,s.jsxs)(u.xu,{children:[(0,s.jsx)(u.xv,{variant:"heading",children:"Types"}),(0,s.jsx)(u.xv,{variant:"grey",sx:{ml:"8px"},children:n.length})]})}),(0,s.jsx)(y,{customTypes:n,modelsStatuses:i,authStatus:r,isOnline:l})]}),t.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.xu,{sx:{mb:"8px"},children:(0,s.jsxs)(h,{children:[(0,s.jsxs)(u.xu,{children:[(0,s.jsx)(u.xv,{variant:"heading",children:"Slices"}),(0,s.jsx)(u.xv,{variant:"grey",sx:{ml:"8px"},children:t.length})]}),(0,s.jsxs)(u.xu,{children:[t.some(function(e){return(0,C.cx)(e)>0&&i.slices[e.model.id]!==T.G.Deleted})&&(0,s.jsxs)(u.xv,{sx:{mr:3,color:"warning02",fontSize:"12px",lineHeight:"16px",fontWeight:600},children:[(0,s.jsx)(x.sQg,{size:16,style:{marginRight:"4px",position:"relative",top:"3px"}}),"Missing Screenshots"]}),(0,s.jsxs)(u.zx,{variant:"darkSmall",onClick:function(){return c({sliceFilterFn:function(e){return e}})},children:[(0,s.jsx)(x.hOO,{style:{color:"#FFF",fontSize:"15px",position:"relative",top:"3px",marginRight:"4px"}})," ","Update all screenshots"]})]})]})}),(0,s.jsx)(b.Z,{gridGap:"32px 16px",elems:t,gridTemplateMinPx:"305px",defineElementKey:function(e){return e.model.name},renderElem:function(e){var n=i.slices[e.model.id];return(0,s.jsx)(D.B,{action:{type:"status",authStatus:r,isOnline:l,modelStatus:n},isDeletedSlice:n===T.G.Deleted,onUpdateScreenshot:function(){c({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},slice:e})}}),(0,s.jsx)(_.Z,{slices:d(p),defaultVariationSelector:m})]})]})},O=t(91914),w=function(){return(0,s.jsx)(u.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,s.jsxs)(u.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,s.jsx)(O.wQ1,{size:48}),(0,s.jsx)(u.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px"},children:"No internet connection"}),(0,s.jsx)(u.xv,{sx:{fontSize:"13px",lineHeight:"24px"},children:"You need a stable internet connection to review and push changes"})]})})},N=t(90374),R=function(){var e=(0,N.Z)().openLoginModal;return(0,s.jsx)(u.kC,{sx:{justifyContent:"center",alignItems:"center",flex:1},children:(0,s.jsxs)(u.kC,{sx:{flexDirection:"column",alignItems:"center",transform:"translateY(-50%)"},children:[(0,s.jsx)(u.xv,{sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",mb:"8px",mt:"2px"},children:"Could not access your repository"}),(0,s.jsx)(u.xv,{sx:{fontSize:"13px",lineHeight:"24px"},children:"You need to log in to Prismic in order to push your changes."}),(0,s.jsx)(u.zx,{sx:{mt:"24px"},onClick:function(){return e()},children:"Log in to Prismic"})]})})},Z=t(5632),E=t.n(Z),z=t(2754),F=t(34543),I=t(62230),H=t(85244),M=t(98240),P=t(6277);t(25977);var W={primary:"_1ecs97d74o _1ecs97d74p _1ecs97d74i _1ecs97d74j _1ecs97d74q _1ecs97d74r",secondary:"_1ecs97d6pe _1ecs97d6pf _1ecs97d6p8 _1ecs97d6p9 _1ecs97d6pg _1ecs97d6ph"},A={normal:"ovkapw1",smallBold:"ovkapw2",inherit:"ovkapw3 _1ecs97d9gj"},B=function(e){var n=e.children,t=e.color,l=e.endIcon,o=e.href,a=e.textVariant,c=void 0===a?"smallBold":a,d=(0,M.Z)(e,["children","color","endIcon","href","textVariant"]);return(0,s.jsxs)("a",(0,H.Z)((0,I.Z)({href:o,target:"_blank",rel:"noreferrer"},d),{className:(0,P.Z)("ovkapw0 _1ecs97d9bi _1ecs97d9gd _1ecs97d9bk _1ecs97d9bq",W[void 0===t?"primary":t]),children:[(0,s.jsx)(i.xv,{component:"span",color:"inherit",variant:c,children:n}),(0,r.isValidElement)(l)?(0,r.cloneElement)(l,{className:(0,P.Z)(l.props.className,"_1ecs97d9tn",A[c])}):null]}))},U=t(39092),G=function(){var e,n=(e=(0,c.v9)(function(e){return{repoName:(0,U.MY)(e)}}).repoName,"https://".concat(e,".prismic.io/documents/working"));return(0,s.jsxs)(z.R$,{style:{alignSelf:"center",marginTop:i.TV.size[72]},children:[(0,s.jsx)(z.u2,{children:(0,s.jsx)(i.Ee,{src:"/blank-slate-changes-uptodate.png",sizing:"cover"})}),(0,s.jsxs)(z.T9,{children:[(0,s.jsx)(z._T,{children:"Everything up-to-date"}),(0,s.jsx)(z.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,s.jsxs)(z.Qj,{children:[(0,s.jsx)(i.zx,{onClick:function(){E().push("/")},children:"Create a page type"}),(0,s.jsx)(B,{endIcon:(0,s.jsx)(F.AlO,{}),textVariant:"normal",href:n,children:"Create content"})]})]})]})},V=t(79096),Y=t(85412),L=t(32665),q=t(3098),X=t(56577),Q=t(24340),J=t(77174),$=t(49471),K=t(57282),ee=t(78656),en=function(e){var n=e.ctName,t=e.numberOfDocuments,i=e.link,r=e.isOverLimit;return(0,s.jsxs)(u.Zb,{sx:{mb:12},variant:"drawerCard","data-cy":"AssociatedDocumentsCard-".concat(n),children:[(0,s.jsxs)(u.kC,{sx:{flexDirection:"column"},children:[(0,s.jsx)(u.xv,{children:n}),(0,s.jsxs)(u.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:[t," documents"]})]}),(0,s.jsx)(u.rU,{href:i,target:"_blank",variant:"cardSmall",sx:{color:void 0!==r&&r?"danger":"purple08"},children:"View documents"})]})},et=function(e){var n=e.format,t=e.id,i=e.name;return(0,s.jsxs)(u.Zb,{sx:{mb:12},variant:"drawerCard","data-cy":"CustomTypesReferencesCard-".concat(i),children:[(0,s.jsxs)(u.kC,{sx:{flexDirection:"column"},children:[(0,s.jsx)(u.xv,{children:i}),(0,s.jsx)(u.xv,{sx:{color:"textClear",fontSize:"12px",lineHeight:"16px"},children:"Missing Slices"})]}),(0,s.jsxs)(u.rU,{href:j.cd[n].getBuilderPagePathname(t),target:"_blank",variant:"cardSmall",children:["View ",ee.$[n].name({start:!1,plural:!1})]},t)]})},es=t(79797),ei=t(54132),er=function(e){var n=e.isOpen,t=e.title,i=e.footer,r=e.explanations,l=(0,N.Z)().closeModals;return(0,s.jsx)(es.Z,{placement:"right",open:n,level:null,onClose:l,width:496,children:(0,s.jsx)(ei.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,s.jsxs)(u.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,s.jsx)(u.kC,{sx:{alignItems:"center"},children:(0,s.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:t})}),(0,s.jsx)(u.x8,{type:"button",onClick:function(){return l()}})]})},Footer:function(){return(0,s.jsx)(u.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:i})},children:r})})},el=function(e){var n=e.onToggle,t=e.isConfirmed,i=e.sx;return(0,s.jsxs)(u.kC,{sx:(0,I.Z)({borderRadius:6,flexDirection:"column",backgroundColor:"grey03",padding:12,width:"100%"},i),children:[(0,s.jsx)(u.xv,{sx:{fontWeight:"bold",mb:2},children:"Are you sure to proceed?"}),(0,s.jsxs)(u.__,{sx:{mt:"4px",py:1},variant:"large",children:[(0,s.jsx)(u.XZ,{defaultChecked:t,onChange:n,variant:"forms.checkbox.dark"}),"Delete these Documents"]})]})},eo=function(e){var n=e.pushChanges,t=(0,r.useState)(!1),i=t[0],l=t[1],o=(0,c.v9)(function(e){return{isDeleteDocumentsDrawerOpen:(0,J.gP)(e,Q.q.SOFT_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,$.Ch)(e).filter(f.yp),modalData:e.pushChanges}}),a=o.isDeleteDocumentsDrawerOpen,d=o.remoteOnlyCustomTypes,x=o.modalData,h=(0,N.Z)(),m=h.closeModals,p=h.openToaster;if(!a)return null;if((null==x?void 0:x.type)!=="SOFT")return p("No change data",K.Jf.ERROR),null;var g=x.details.customTypes.map(function(e){var n,t=d.find(function(n){return(0,f.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(en,{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,s.jsx)(er,{isOpen:a,title:"Confirm deletion",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(el,{onToggle:function(){l(!i)},isConfirmed:i,sx:{mb:10}}),(0,s.jsx)(X.z,{label:"Push changes",variant:"primary",onClick:function(){m(),n(i)},disabled:!i,sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})]}),explanations:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:"This action will also delete Documents."}),(0,s.jsxs)(u.xv,{sx:{mb:24},children:[x.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."]}),g]})})},ea=function(e){var n=e.pushChanges,t=(0,c.v9)(function(e){return{isDeleteDocumentsDrawerOpen:(0,J.gP)(e,Q.q.HARD_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,$.Ch)(e).filter(f.yp),modalData:e.pushChanges}}),i=t.isDeleteDocumentsDrawerOpen,r=t.remoteOnlyCustomTypes,l=t.modalData,o=(0,N.Z)(),a=o.closeModals,d=o.openToaster;if(!i)return null;if((null==l?void 0:l.type)!=="HARD")return d("No change data",K.Jf.ERROR),null;var x=l.details.customTypes.map(function(e){var n,t=r.find(function(n){return(0,f.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(en,{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,s.jsx)(er,{isOpen:i,title:"Manual action required",footer:(0,s.jsx)(X.z,{label:"Try again",variant:"primary",onClick:function(){a(),n(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}}),explanations:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["Your type",l.details.customTypes.length>1&&"s"," cannot be deleted."]}),(0,s.jsxs)(u.xv,{sx:{mb:24},children:[l.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."]}),x]})})},ec=function(e){var n=e.pushChanges,t=(0,c.v9)(function(e){return{isOpen:(0,J.gP)(e,Q.q.REFERENCES_MISSING_DRAWER),localCustomTypes:(0,$.Ch)(e).filter(f.TG),modalData:e.pushChanges}}),i=t.isOpen,r=t.modalData,l=t.localCustomTypes,o=(0,N.Z)(),a=o.closeModals,d=o.openToaster;if(!i)return null;if((null==r?void 0:r.details)===void 0)return d("No change data",K.Jf.ERROR),null;var x=(null==r?void 0:r.details.customTypes.length)>1,h=r.details.customTypes.map(function(e){var n,t=l.find(function(n){return(0,f.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(et,{format:t.local.format,id:t.local.id,name:null!==(n=t.local.label)&&void 0!==n?n:t.local.id})});return(0,s.jsx)(er,{isOpen:i,title:"Missing Slices",footer:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(X.z,{label:"Try again",variant:"primary",onClick:function(){a(),n(!1)},sx:{fontWeight:"bold",color:"white",borderRadius:6,width:"100%"}})}),explanations:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(u.xv,{sx:{fontWeight:"bold",mb:1,lineHeight:"24px"},children:["You have",x?"":" a"," type",x?"s":""," that reference"," ",x?"":"s"," one or more missing Slices"]}),(0,s.jsxs)(u.xv,{sx:{mb:24},children:["Before pushing, remove references to any missing Slices by opening"," ","the affected type",x?"s":""," and clicking the"," ",(0,s.jsx)("b",{children:"Save"})," button."]}),h]})})},ed=function(){var e=(0,Y.X)(),n=e.unSyncedSlices,t=e.unSyncedCustomTypes,l=e.modelsStatuses,u=e.authStatus,x=e.isOnline,h=(0,r.useMemo)(function(){var e;return{changedSlices:n.map(function(e){return{slice:e,status:l.slices[e.model.id]}}).filter(function(e){return Y.O.includes(e.status)}),changedCustomTypes:t.map(function(e){return(0,f.TG)(e)?e.local:e.remote}).map(function(e){return{customType:e,status:l.customTypes[e.id]}}).filter(function(e){return Y.O.includes(e.status)})}},[n,t,l]),m=h.changedSlices,p=h.changedCustomTypes,g=(0,N.Z)(),j=g.pushChanges,v=g.closeModals,y=(0,c.v9)(function(e){return{isSyncing:(0,L.hg)(e,q.z.CHANGES_PUSH)}}).isSyncing;(0,r.useEffect)(function(){return function(){v()}},[]);var b=n.length+t.length,_=function(e){return j({confirmDeleteDocuments:e,changedSlices:m,changedCustomTypes:p})},C=(0,r.useMemo)(function(){return x?u===V.t.UNAUTHORIZED||u===V.t.FORBIDDEN?(0,s.jsx)(R,{}):0===b?(0,s.jsx)(G,{}):(0,s.jsx)(k,{unSyncedSlices:n,unSyncedCustomTypes:t,modelsStatuses:l,authStatus:u,isOnline:x}):(0,s.jsx)(w,{})},[x,u,b,n,t,l,]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o(),{children:(0,s.jsx)("title",{children:"Changes - Slice Machine"})}),(0,s.jsxs)(d.LN,{children:[(0,s.jsxs)(d.wd,{children:[(0,s.jsx)(d.Cx,{folder:"Changes"}),(0,s.jsx)(d.K2,{children:(0,s.jsx)(i.zx,{onClick:function(){return _(!1)},loading:y,disabled:0===b||!x||u===V.t.UNAUTHORIZED||u===V.t.FORBIDDEN||y,"data-cy":"push-changes",children:"Push Changes"})})]}),(0,s.jsx)(d.RN,{children:(0,s.jsxs)(a.xR,{sx:{display:"flex",flexDirection:"column"},children:[C,(0,s.jsx)(eo,{pushChanges:_}),(0,s.jsx)(ea,{pushChanges:_}),(0,s.jsx)(ec,{pushChanges:_})]})})]})]})}},2754:function(e,n,t){"use strict";t.d(n,{R$:function(){return d},Qj:function(){return p},T9:function(){return x},nf:function(){return m},u2:function(){return u},_T:function(){return h}});var s=t(67557),i=t(62230),r=t(85244),l=t(98240),o=t(52322),a=t(6277),c=t(71651);t(41236);var d=function(e){var n=e.backgroundImage,t=e.style,c=(0,l.Z)(e,["backgroundImage","style"]),d=void 0!==n;return(0,o.jsx)("article",(0,r.Z)((0,i.Z)({},c),{className:(0,a.Z)("_18bjhbz0 _1ecs97d9bi _1ecs97d9bj _1ecs97d9bk _1ecs97d9bt _1ecs97d9uk _1ecs97d9um _1ecs97d9uo _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9c7",(0,s.Z)({},"_18bjhbz1 _1ecs97d9cf _1ecs97d9h6",d)),style:(0,i.Z)({backgroundImage:d?"url(".concat(n,")"):void 0},t)}))},u=function(e){return(0,o.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_1ecs97d9bi _1ecs97d9bj _1ecs97d9bk _1ecs97d9bt _1ecs97d48s _1ecs97d4g5 _1ecs97d9ep _1ecs97d9f1 _1ecs97d9c7"}))},x=function(e){return(0,o.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz3 _1ecs97d9bi _1ecs97d9bj _1ecs97d9bk _1ecs97d9bt _1ecs97d9rr"}))},h=function(e){return(0,o.jsx)(c.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz4"}))},m=function(e){return(0,o.jsx)(c.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz5",color:"grey11"}))},p=function(e){return(0,o.jsx)(c.hE,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz6 _1ecs97d9lg _1ecs97d9bq _1ecs97d9pm",size:"medium",variant:"secondary"}))}},41236:function(){},25977:function(){}},function(e){e.O(0,[789,123,918,590,573,774,888,179],function(){return e(e.s=21985)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(27266)}])},27266:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(17933)}},function(n){n.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(27266)}])},27266:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(17933)}},function(n){n.O(0,[125,799,590,377,933,774,888,179],function(){return n(n.s=95759)}),_N_E=n.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(95586)}])},95586:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(17933)}},function(n){n.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(95586)}])},95586:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(17933)}},function(n){n.O(0,[125,799,590,377,933,774,888,179],function(){return n(n.s=61367)}),_N_E=n.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29],{12408:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]/screenshot",function(){return r(35717)}])},4597:function(n,e,r){"use strict";r.d(e,{Z:function(){return v}});var t,i=r(22710),o=r(62230),c=r(17064),u=r(99267),a=r(52322),s=r(2784),l=r(75289),d=r(16),f=r(90374),v=function(n){var e,r,t,v,h,m,p=n.apiContent,b=n.screenDimensions,g=n.simulatorUrl,_=n.dryRun,w=n.isScreenshot,S=void 0!==w&&w,x=(0,c.Z)((r=(e=(0,s.useState)())[0],t=e[1],v=(0,s.useRef)(),h=(0,s.useRef)(),[r,(0,s.useCallback)((m=(0,i.Z)(function(n){var e,r,o,c;return(0,u.__generator)(this,function(a){switch(a.label){case 0:if(null===(e=v.current)||void 0===e||e.disconnect(),null===(r=h.current)||void 0===r||r.disconnect(),t(void 0),!(null!=n))return[3,4];v.current=new d.SH(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,v.current.connect()];case 2:var s;return a.sent(),t(v.current),s=(0,i.Z)(function(){var n;return(0,u.__generator)(this,function(e){switch(e.label){case 0:return t(void 0),[4,null===(n=v.current)||void 0===n?void 0:n.connect({},!0)];case 1:return e.sent(),t(v.current),[2]}})}),o=function(){return s.apply(this,arguments)},h.current=new MutationObserver(function(n){n.forEach(function(n){"src"===n.attributeName&&o().catch(function(n){throw n})})}),h.current.observe(n,{attributeFilter:["src"]}),[3,4];case 3:return c=a.sent(),console.error(c),[3,4];case 4:return[2]}})}),function(n){return m.apply(this,arguments)}),[])]),2),y=x[0],k=x[1],Z=(0,f.Z)(),C=Z.connectToSimulatorSuccess,N=Z.connectToSimulatorFailure;(0,s.useEffect)(function(){var n;if(!g){N();return}if(void 0!==y){if(!y.connected){N(),console.warn("Trying to use a disconnected simulator client.");return}(n=(0,i.Z)(function(){return(0,u.__generator)(this,function(n){switch(n.label){case 0:return[4,y.setSliceZone([p])];case 1:return n.sent(),[2]}})}),function(){return n.apply(this,arguments)})().then(function(){C()}).catch(function(){N()})}},[y,p,g]);var R,E,j,z,T,q,W,D,H,I=(0,s.useState)(),M=I[0],O=I[1],P=(R=function(n){var e;O({height:n.blockSize,width:n.inlineSize})},j=(0,s.useRef)(),(0,s.useCallback)(function(n){var e;null===(e=j.current)||void 0===e||e.disconnect(),null!==n&&(j.current=new ResizeObserver(function(e){var r,t=(0,c.Z)(e,1)[0].contentRect;R({blockSize:t.height,inlineSize:t.width},n)}),j.current.observe(n))},[]));return(0,a.jsxs)(l.kC,{ref:P,sx:(0,o.Z)({alignItems:"center",backgroundColor:"headSection",backgroundImage:"url(/pattern.png)",backgroundRepeat:"repeat",backgroundSize:"10px",border:S?void 0:function(n){var e;return"1px solid ".concat(String(null===(e=n.colors)||void 0===e?void 0:e.darkBorder))},borderRadius:S?void 0:8,display:"flex",height:"100%",justifyContent:"center",overflow:"hidden"},void 0!==_&&_?{display:"none"}:{}),children:[g?(0,a.jsx)("iframe",{id:"__iframe-renderer",ref:k,src:g,style:(0,o.Z)({border:"none",maxHeight:"".concat(b.height,"px"),maxWidth:"".concat(b.width,"px"),minHeight:"".concat(b.height,"px"),minWidth:"".concat(b.width,"px"),overflowY:"auto"},M?{transform:"scale(".concat((z=b,T=M,q=z.height,W=z.width,D=T.height,H=T.width,W>H||q>D?W-H>q-D?H/W:D/q:1),")")}:{display:"none"})}):null,(null==y?void 0:y.connected)?(0,a.jsx)("div",{id:"__iframe-ready"}):null]})}},35717:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return w}});var t=r(52322),i=r(4597),o=r(62230),c=r(85244),u=r(2784),a=r(87608),s=r(25242),l=r(53559),d=function(n){var e=n.variationID,r=n.slice;return(0,u.useMemo)(function(){var n,t=(null===(n=r.mocks)||void 0===n?void 0:n.find(function(n){return n.variation===e}))||(0,a.W)(e),i=(0,c.Z)((0,o.Z)({},(0,s.renderSliceMock)(l.id.fromSM(r.model),t)),{id:r.model.id});return{editorContent:t,apiContent:i}},[r.mocks,r.model,e])},f=r(57880),v=r(39092),h=r(5632),m=r(56580),p=r(75289),b=function(n){var e=n.children;return(0,t.jsx)(t.Fragment,{children:e})},g=function(n){var e=n.slice,r=n.variation,o=(0,m.v9)(function(n){return{simulatorUrl:(0,v.x0)(n)}}).simulatorUrl,c=(0,h.useRouter)(),u=Number(c.query.screenWidth),a=Number(c.query.screenHeight),s=d({slice:e,variationID:r.id}).apiContent;return void 0===o?null:(0,t.jsx)(p.xu,{as:"main",sx:{height:"100vh",width:"100vw",border:"none"},children:(0,t.jsx)(i.Z,{simulatorUrl:o,apiContent:s,screenDimensions:{width:u,height:a},isScreenshot:!0})})},_=(0,f.y)(g);_.CustomLayout=b;var w=_},28684:function(n,e,r){"use strict";var t=r(92521),i=r(90374),o=r(5632),c=r(2784),u=r(56580),a=function(){var n=(0,o.useRouter)(),e=(0,i.Z)().initSliceStore,r=(0,u.v9)(function(e){return{slice:(0,t.tL)(e,n.query.lib,n.query.sliceName)}}).slice;if((0,c.useEffect)(function(){r?e(r):n.replace("/")},[e,r,n]),!r)return{};var a=r.model.variations.find(function(e){return e.id===n.query.variation});return a?{slice:r,variation:a}:(n.replace("/"),{})};e.Z=a},57880:function(n,e,r){"use strict";r.d(e,{y:function(){return u}});var t=r(62230),i=r(52322);r(2784);var o=r(28684),c=r(95583),u=function(n){return function(e){var r=e.pageProps,u=(0,o.Z)(),a=u.slice,s=u.variation;return a&&s?(0,i.jsx)(n,(0,t.Z)({slice:a,variation:s},r)):((0,c.gx)("/"),null)}}},87608:function(n,e,r){"use strict";r.d(e,{W:function(){return t}});var t=function(n){return{__TYPE__:"SharedSliceContent",variation:n,primary:{},items:[]}}}},function(n){n.O(0,[746,774,888,179],function(){return n(n.s=12408)}),_N_E=n.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[33],{30755:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices/[lib]/[sliceName]/[variation]/simulator",function(){return t(45333)}])},56577:function(e,n,t){"use strict";t.d(n,{z:function(){return d}});var r=t(62230),i=t(85244),o=t(98240),s=t(52322),c=t(2784),a=t(75289),l=function(e,n){return e?"".concat(e,"-").concat(n):""},u=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},d=(0,c.forwardRef)(function(e,n){var t=e.label,c=e.Icon,d=e.type,x=e.form,f=e.isLoading,h=void 0!==f&&f,p=e.disabled,v=e.onClick,m=e.sx,g=e.iconSize,b=void 0===g?16:g,C=e.iconFill,j=e.variant,S=void 0===j?"primary":j,k=(0,o.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,s.jsx)(a.zx,(0,i.Z)((0,r.Z)({ref:n,sx:(0,r.Z)((0,i.Z)((0,r.Z)({},void 0===m?{}:m),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),h?{cursor:"wait !important"}:{}),type:d,form:x,disabled:void 0!==p&&p||h,onClick:h?void 0:v,variant:S},k),{children:h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.$j,{size:b,color:u(S),"data-cy":l(k["data-cy"],"spinner")}),c&&t]}):(0,s.jsxs)(s.Fragment,{children:[c&&(0,s.jsx)(c,{size:b,fill:C,"data-cy":l(k["data-cy"],"icon")}),t]})}))})},61931:function(e,n,t){"use strict";t.d(n,{q:function(){return l}});var r=t(62230),i=t(52322),o=t(2784),s=t(75289),c=t(65186),a=(0,o.memo)(function(e){var n=e.src;return(0,i.jsx)(s.Ee,{src:n,alt:"Preview image",sx:{maxHeight:"100%"}})}),l=function(e){var n=e.hideMissingWarning,t=e.src,o=e.sx;return(0,i.jsx)(s.kC,{sx:(0,r.Z)({position:"relative",alignItems:"center",justifyContent:"center",overflow:"hidden",backgroundImage:"url(/pattern.png)",backgroundColor:"headSection",backgroundRepeat:"repeat",backgroundSize:"20px",borderRadius:"4px"},o),children:void 0!==n&&n?null:(0,i.jsx)(i.Fragment,{children:void 0!==t?(0,i.jsx)(a,{src:t}):(0,i.jsxs)(s.xv,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,i.jsx)(c.eJU,{}),"You have no screenshot yet."]})})})}},4597:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var r,i=t(22710),o=t(62230),s=t(17064),c=t(99267),a=t(52322),l=t(2784),u=t(75289),d=t(16),x=t(90374),f=function(e){var n,t,r,f,h,p,v,m=e.apiContent,g=e.screenDimensions,b=e.simulatorUrl,C=e.dryRun,j=e.isScreenshot,S=void 0!==j&&j,k=(0,s.Z)((t=(n=(0,l.useState)())[0],r=n[1],f=(0,l.useRef)(),h=(0,l.useRef)(),v=(0,l.useCallback)((p=(0,i.Z)(function(e){var n,t,o,s;return(0,c.__generator)(this,function(a){switch(a.label){case 0:if(null===(n=f.current)||void 0===n||n.disconnect(),null===(t=h.current)||void 0===t||t.disconnect(),r(void 0),!(null!=e))return[3,4];f.current=new d.SH(e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,f.current.connect()];case 2:var l;return a.sent(),r(f.current),l=(0,i.Z)(function(){var e;return(0,c.__generator)(this,function(n){switch(n.label){case 0:return r(void 0),[4,null===(e=f.current)||void 0===e?void 0:e.connect({},!0)];case 1:return n.sent(),r(f.current),[2]}})}),o=function(){return l.apply(this,arguments)},h.current=new MutationObserver(function(e){e.forEach(function(e){"src"===e.attributeName&&o().catch(function(e){throw e})})}),h.current.observe(e,{attributeFilter:["src"]}),[3,4];case 3:return s=a.sent(),console.error(s),[3,4];case 4:return[2]}})}),function(e){return p.apply(this,arguments)}),[]),[t,v]),2),y=k[0],E=k[1],w=(0,x.Z)(),_=w.connectToSimulatorSuccess,I=w.connectToSimulatorFailure;(0,l.useEffect)(function(){var e;if(!b){I();return}if(void 0!==y){if(!y.connected){I(),console.warn("Trying to use a disconnected simulator client.");return}(e=(0,i.Z)(function(){return(0,c.__generator)(this,function(e){switch(e.label){case 0:return[4,y.setSliceZone([m])];case 1:return e.sent(),[2]}})}),function(){return e.apply(this,arguments)})().then(function(){_()}).catch(function(){I()})}},[y,m,b]);var D,Z,F,R,z,N,O,T,A,L=(0,l.useState)(),M=L[0],U=L[1],P=(D=function(e){var n;U({height:e.blockSize,width:e.inlineSize})},F=(0,l.useRef)(),(0,l.useCallback)(function(e){var n;null===(n=F.current)||void 0===n||n.disconnect(),null!==e&&(F.current=new ResizeObserver(function(n){var t,r=(0,s.Z)(n,1)[0].contentRect;D({blockSize:r.height,inlineSize:r.width},e)}),F.current.observe(e))},[]));return(0,a.jsxs)(u.kC,{ref:P,sx:(0,o.Z)({alignItems:"center",backgroundColor:"headSection",backgroundImage:"url(/pattern.png)",backgroundRepeat:"repeat",backgroundSize:"10px",border:S?void 0:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},borderRadius:S?void 0:8,display:"flex",height:"100%",justifyContent:"center",overflow:"hidden"},void 0!==C&&C?{display:"none"}:{}),children:[b?(0,a.jsx)("iframe",{id:"__iframe-renderer",ref:E,src:b,style:(0,o.Z)({border:"none",maxHeight:"".concat(g.height,"px"),maxWidth:"".concat(g.width,"px"),minHeight:"".concat(g.height,"px"),minWidth:"".concat(g.width,"px"),overflowY:"auto"},M?{transform:"scale(".concat((R=g,z=M,N=R.height,O=R.width,T=z.height,A=z.width,O>A||N>T?O-A>N-T?A/O:T/N:1),")")}:{display:"none"})}):null,(null==y?void 0:y.connected)?(0,a.jsx)("div",{id:"__iframe-ready"}):null]})}},38986:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(62230),i=t(52322),o=t(2784),s=t(19909),c=t(75289),a=function(e){var n=e.defaultValue,t=e.variations,r=e.MenuItemAction,o=e.onChange;return(0,i.jsxs)(c.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"4px",border:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:250,maxWidth:350,color:"text"},children:[(0,i.jsxs)(c.xv,{sx:{p:3,fontSize:12,color:"textClear"},children:[t.length," VARIATION",t.length>1?"S":""]}),(0,i.jsxs)(c.kC,{sx:{p:0,flexDirection:"column"},children:[t.map(function(e){return(0,i.jsx)(l,{value:e,isActive:e.id===n.id,onClick:o},e.id)}),r||null]})]})},l=function(e){var n=e.value,t=e.isActive,r=e.onClick;return(0,i.jsx)(c.xu,{sx:{px:3,py:2,color:t?"primary":"",cursor:"pointer",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(t?null==n?void 0:n.primary:null==n?void 0:n.background)},borderRadius:0,bg:"background",":hover":{bg:"hoverBackground",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(null==n?void 0:n.primary)}}},onClick:function(){return r(n)},children:n.name})},u=t(75100),d=function(e){var n=e.buttonSx,t=e.defaultValue,l=e.variations,d=e.onNewVariation,x=e.onChange,f=e.sx,h=e.disabled,p=(0,o.useState)(!1),v=p[0],m=p[1],g=(0,o.useState)(t||l[0]),b=g[0],C=g[1];(0,o.useEffect)(function(){t&&C(t)},[t]);var j=function(e){m(!1),C(e),setTimeout(function(){return x(e)},210)},S=(0,i.jsx)(c.xu,{sx:{p:2},children:(0,i.jsx)(c.zx,{variant:"transparent",sx:{color:"text"},onClick:function(){m(!1),d&&d()},children:"+ Add new variation"})});return(0,i.jsx)(c.xu,{sx:f,children:(0,i.jsx)(s.Popover,{align:"start",isOpen:v,onClickOutside:function(){return m(!1)},positions:["bottom"],padding:10,content:function(){return(0,i.jsx)(a,{defaultValue:b,variations:l,onChange:j,MenuItemAction:d?S:void 0})},containerClassName:"variationSelectorContainer",children:(0,i.jsxs)(c.zx,{sx:(0,r.Z)({},n),variant:"dropDownButton",onClick:function(){return m(!v)},disabled:h,children:[b.name," ",v?(0,i.jsx)(u.bOz,{size:"16px","aria-label":"Collapse variations"}):(0,i.jsx)(u.mEq,{size:"16px","aria-label":"Expand variations"})]})})})}},25474:function(e,n,t){"use strict";function r(e){var n=e.lib,t=e.sliceName,r=e.variationId,i=e.options,o=void 0===i?{}:i,s=e.isSimulator,c="/slices/[lib]/[sliceName]/[variation]".concat(s?"/simulator":""),a="/slices/".concat(n,"/").concat(t,"/").concat(r).concat(s?"/simulator":"");return{href:c,as:a,options:o,all:[c,a,o]}}t.d(n,{P:function(){return r}})},45333:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eg}});var r,i,o,s,c=t(52322),a=t(97729),l=t.n(a),u=t(62230),d=t(85244),x=t(2784),f=t(71463),h=t(71651),p=t(87608),v=t(75289),m=t(65077),g=t(5632),b=t.n(g),C=t(38986),j=t(56577),S=function(e){return(0,c.jsxs)("svg",(0,d.Z)((0,u.Z)({viewBox:"0 0 72 72",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M51.3304 19.693C50.9182 18.9787 50.2527 18.6526 50.2527 18.6526L64.7906 10.2077C65.5266 9.78011 66.4679 10.0339 66.8929 10.7745C67.3179 11.5151 67.0657 12.4622 66.3294 12.8898L52.639 20.8424C52.639 20.8424 51.7428 20.4072 51.3304 19.693Z",fill:"current"}),(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M47.6775 54.7814C58.0794 48.7394 61.6433 35.3572 55.6378 24.8917C54.7801 23.397 53.7736 22.0427 52.6481 20.8367L32.9428 32.2832C32.2068 32.7108 31.2655 32.457 30.8405 31.7165C30.4155 30.9757 30.6677 30.0287 31.4039 29.6011L50.2693 18.6425C43.486 13.2668 33.8645 12.2736 25.9299 16.8827C15.5282 22.9249 11.9642 36.3071 17.9697 46.7727C18.8274 48.2671 19.8339 49.6216 20.9595 50.8276L41.1791 39.0822C41.9151 38.6546 42.8564 38.9086 43.2814 39.6492C43.7064 40.3897 43.4542 41.3368 42.7182 41.7644L23.3384 53.0217C30.1217 58.3975 39.7432 59.3906 47.6775 54.7814Z",fill:"current"}),(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.20645 61.7656C4.78145 61.0248 5.03367 60.078 5.76978 59.6502L20.9371 50.8398C20.9371 50.8398 21.8578 51.2406 22.3053 51.7062C22.7528 52.1717 23.361 53.0078 23.361 53.0078L7.30887 62.3323C6.57274 62.7599 5.63144 62.5061 5.20645 61.7656Z",fill:"current"})]}))},k=t(56580),y=t(52039),E=t(25474),w=function(e,n,t){if(!n){b().push("/".concat(e.href,"/").concat(e.model.name));return}var r=E.P({lib:e.href,sliceName:e.model.name,variationId:null==n?void 0:n.id,isSimulator:t});b().push(r.href,r.as,r.options)},_=function(e){var n=e.slice,t=e.variation,r=e.isDisplayEditor,i=e.toggleIsDisplayEditor,o=e.onSaveMock,s=e.actionsDisabled,a=(0,k.v9)(function(e){return{savingMock:(0,y.S3)(e)}}).savingMock;return(0,c.jsxs)(v.kC,{sx:{p:"16px",display:"flex",bg:"grey07",gridTemplateRows:"1fr",borderBottom:"1px solid #DCDBDD",justifyContent:"space-between"},children:[(0,c.jsxs)(v.kC,{sx:{alignItems:"center"},children:[(0,c.jsx)(S,{height:"20px",width:"20px",fill:"#1A1523"}),(0,c.jsx)(v.xv,{sx:{ml:2,mr:"12px",fontSize:"14px",color:"#1A1523",fontWeight:"600",letterSpacing:"-0.15px"},children:n.model.name}),(0,c.jsx)(C.Z,{defaultValue:t,variations:n.model.variations,onChange:function(e){return w(n,e,!0)},disabled:n.model.variations.length<=1||s})]}),(0,c.jsxs)(v.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,c.jsx)(v.kC,{sx:{alignItems:"center",justifyContent:"space-around"},children:(0,c.jsxs)(v.kC,{sx:{alignItems:"center",mr:4},children:[(0,c.jsx)(v.__,{htmlFor:"show-mock-editor",sx:{color:"#6F6E77",lineHeight:"16px",fontSize:"12px",fontWeight:"600",letterSpacing:"0px"},children:"Editor"}),(0,c.jsx)(v.rs,{id:"show-mock-editor",checked:r,onChange:i,disabled:s})]})}),(0,c.jsx)(j.z,{"data-cy":"save-mock",onClick:o,label:"Save mock content",disabled:a||s,variant:"primary",sx:{borderRadius:"6px",color:"#F1EEFE",fontWeight:"bold",border:"1px solid #5842C3",backgroundColor:"#6E56CF",boxShadow:"0px 1px 0px rgba(0, 0, 0, 0.04)","&:hover":{"&:not([disabled])":{backgroundColor:"#5842C3"}}}})]})]})},I=t(82770),D=t(39092),Z=t(19909),F=function(e){var n=e.defaultValue,t=e.options,r=e.onChange;return(0,c.jsx)(v.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"6px",border:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:180,maxWidth:350,color:"text"},children:(0,c.jsx)(v.kC,{sx:{p:0,flexDirection:"column"},children:t.map(function(e){return(0,c.jsx)(R,{value:e,isActive:e===n,onClick:r})})})})},R=function(e){var n=e.value,t=e.isActive,r=e.onClick;return(0,c.jsx)(v.xu,{sx:{p:2,cursor:"pointer",fontSize:"14px",borderRadius:0,bg:t?"hoverBackground":"background",":hover":{bg:"hoverBackground"}},onClick:function(){return r(n)},children:n})},z=t(75100),N=function(e){var n=e.buttonSx,t=e.currentValue,r=e.options,i=e.onChange,o=e.disabled,s=(0,x.useState)(!1),a=s[0],l=s[1],u=function(e){l(!1),setTimeout(function(){return i(e)},210)};return(0,c.jsx)(v.xu,{children:(0,c.jsx)(Z.Popover,{align:"start",isOpen:a,onClickOutside:function(){return l(!1)},positions:["bottom"],padding:2,content:function(){return(0,c.jsx)(F,{defaultValue:t,options:r,onChange:u})},children:(0,c.jsxs)(v.zx,{sx:n,variant:"dropDownButton",onClick:function(){return l(!a)},disabled:o,children:[t," ",a?(0,c.jsx)(z.bOz,{size:"24px"}):(0,c.jsx)(z.mEq,{size:"24px"})]})})})},O=t(67557);(s=r||(r={})).DESKTOP="Desktop",s.TABLET="Tablet",s.MOBILE="Mobile",s.CUSTOM="Custom";var T=(i={},(0,O.Z)(i,r.DESKTOP,{width:1280,height:800}),(0,O.Z)(i,r.TABLET,{width:1080,height:810}),(0,O.Z)(i,r.MOBILE,{width:390,height:844}),i),A=function(e){var n=e.label,t=e.startValue,r=e.onChange,i=e.sx,o=e.disabled,s=["e","-","+",",","."];return(0,c.jsxs)(v.kC,{sx:(0,u.Z)({alignItems:"center"},i),children:[(0,c.jsx)(v.__,{sx:{backgroundColor:"grey07",border:"transparent",borderRight:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorder))},borderRadius:"6px 0px 0px 6px",width:26,height:30,color:"greyIcon",fontWeight:"bold",fontSize:"14px",alignItems:"center",justifyContent:"center",position:"absolute",ml:"1px"},htmlFor:"".concat(n,"-screensize-input"),children:n}),(0,c.jsx)(v.II,{type:"number",name:"".concat(n,"-screensize-input"),disabled:o,sx:{width:80,height:32,p:0,border:"1px solid #E4E2E4",borderRadius:"6px","&::-webkit-outer-spin-button,&::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},color:"greyIcon",textAlign:"center",paddingLeft:26,"&:disabled":{cursor:"not-allowed","&:hover":{border:"1px solid #E4E2E4"},"&:active":{border:"1px solid #E4E2E4",boxShadow:"none"}}},onChange:r,value:t,min:"0",onKeyDown:function(e){s.includes(e.key)&&e.preventDefault()}})]})},L=function(e){e.slice,e.variation;var n=e.handleScreenSizeChange,t=e.screenDimensions,i=e.actionsDisabled,o=(0,x.useState)(r.DESKTOP),s=o[0],a=o[1],l=function(e){a(e),e!==r.CUSTOM&&n(T[e])},f=function(e){var t=Object.values(T).findIndex(function(n){return JSON.stringify(n)===JSON.stringify(e)}),i=t<0?r.CUSTOM:Object.keys(T)[t];a(i),n(e)};return(0,c.jsx)(v.kC,{sx:{alignItems:"center",pb:"16px",justifyContent:"space-between",variant:"small"},children:(0,c.jsxs)(v.kC,{sx:{alignItems:"center",flex:1},children:[(0,c.jsx)(N,{options:Object.values(r),onChange:l,buttonSx:{alignSelf:"start"},currentValue:s,disabled:i}),(0,c.jsx)(A,{label:"W",startValue:t.width.toString(),onChange:function(e){f((0,d.Z)((0,u.Z)({},t),{width:Number(e.target.value)}))},disabled:i,sx:{mx:2}}),(0,c.jsx)(z.eSQ,{size:16,color:"#6F6E77"}),(0,c.jsx)(A,{label:"H",startValue:t.height.toString(),onChange:function(e){f((0,d.Z)((0,u.Z)({},t),{height:Number(e.target.value)}))},disabled:i,sx:{ml:2}})]})})},M=t(25812),U=t(77174),P=t(24340),W=t(90374),B=t(54132),H=t(61931),V=function(e){var n=e.sliceName,t=e.screenshotUrl,r=(0,k.v9)(function(e){return{isScreenshotModalOpen:(0,U.gP)(e,P.q.SCREENSHOT_PREVIEW)}}).isScreenshotModalOpen,i=(0,W.Z)().closeModals;return(0,c.jsx)(M.Z,{isOpen:r,shouldCloseOnOverlayClick:!0,contentLabel:"Screenshot Preview",portalClassName:"ScreenshotPreviewModal",onRequestClose:i,children:(0,c.jsx)(B.Z,{radius:"0px",bodySx:{p:0,bg:"#FFF",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none"},Header:function(){return(0,c.jsxs)(v.kC,{sx:{position:"sticky",top:0,zIndex:1,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,c.jsxs)(v.X6,{sx:{fontSize:"14px"},children:["Screenshot Preview for ",n]}),(0,c.jsx)(v.x8,{type:"button",onClick:function(){return i()}})]})},Footer:function(){return(0,c.jsx)(v.kC,{style:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:"1px solid #DCDBDD"},children:(0,c.jsx)(v.zx,{variant:"secondary",sx:{fontWeight:600},onClick:function(){return i()},children:"Close"})})},children:(0,c.jsx)(H.q,{src:t,sx:{height:"320px"}})})})},q=t(25242),X=t(81541),G=function(e,n,t){var r=(0,x.useState)(e()),i=r[0],o=r[1],s=(0,x.useRef)(Date.now());return(0,x.useEffect)(function(){var t=setTimeout(function(){Date.now()-s.current>=n&&(o(e()),s.current=Date.now())},n-(Date.now()-s.current));return function(){clearTimeout(t)}},[n].concat((0,X.Z)(t))),i},K=t(4597),Y=function(e){var n=e.children,t=e.sx;return(0,c.jsx)(v.kC,{sx:(0,u.Z)({bg:"grey07",height:"90%",width:"100%",justifyContent:"center",alignItems:"center",zIndex:"1"},t),children:(0,c.jsx)(v.kC,{sx:{marginTop:"-128px",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:n})})},J=t(85819),Q=function(e){var n=e.onRetrigger;return(0,c.jsxs)(Y,{children:[(0,c.jsx)(v.Ee,{src:"/iframe-not-running.png",sx:{width:"320px"}}),(0,c.jsx)(v.xv,{sx:{color:"textClear",mb:2,fontSize:"14px",lineHeight:"24px",fontWeight:"600"},children:"Slice Machine can't render your Slice"}),(0,c.jsxs)(v.xv,{sx:{color:"failedConnectText",maxWidth:"400px",textAlign:"center",fontSize:"12px",lineHeight:"22px"},children:["Ensure your website's development server is running by typing",(0,c.jsx)("br",{}),(0,c.jsx)(v.xv,{as:"code",variant:"styles.inlineCode",sx:{padding:"4px",borderRadius:"6px"},children:"npm run dev"}),"\xa0 in your terminal at the root of your website directory.",(0,c.jsx)("br",{})," If that doesn't work, see the\xa0",(0,c.jsx)(v.rU,{target:"_blank",href:"https://prismic.io/docs/slice-machine",sx:{color:"link"},children:"troubleshooting instructions."})]}),(0,c.jsx)(j.z,{onClick:n,label:"Refresh",Icon:J.Fer,iconSize:20,iconFill:"#6F6E77",variant:"secondaryMedium",sx:{mt:"16px"}})]})},$=t(98240),ee=t(92928),en=t(33402),et=t(59326),er=t(86741),ei=t(65186),eo=function(e){var n=e.children;return(0,c.jsx)(v.xu,{as:"code",sx:{bg:"rgba(0, 0, 0, 0.05)",borderRadius:3,padding:"2px 4px"},children:n})},es=function(e){var n,t=e.children,r=(0,$.Z)(e,["children"]),i=(0,et.B7)().theme,o=(0,x.useState)(!1),s=o[0],a=o[1],l=(0,x.useRef)(null),f=function(){l.current&&navigator.clipboard.writeText(l.current.innerText).then(function(){a(!0),setTimeout(function(){a(!1)},1200)}).catch(function(){})};return(0,c.jsxs)(v.xu,(0,d.Z)((0,u.Z)({},r),{sx:{backgroundColor:"codeBlockBackground",borderRadius:8},children:[(0,c.jsxs)(v.kC,{sx:{px:"26px",py:"22px",color:"#FFF",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid rgba(111, 110, 119, 0.2)"},children:[(0,c.jsx)(v.kC,{sx:{alignItems:"center"}}),(0,c.jsxs)(v.zx,{onClick:f,variant:"transparent",sx:{display:"flex",justifyContent:"center",alignItems:"center",p:0,fontSize:"12px",color:"#FFF"},children:["Copy\xa0",s?(0,c.jsx)(ei.HhX,{size:16,color:String(null==i?void 0:null===(n=i.colors)||void 0===n?void 0:n.success)}):(0,c.jsx)(ei.Fqs,{size:16,style:{marginLeft:"8px"}})]})]}),(0,c.jsx)(v.xu,{ref:l,as:"pre",sx:{color:"#c9d1d9",padding:"16px 20px",overflow:"auto"},children:t})]}))},ec={code:function(e){var n=e.children;return(0,c.jsx)(eo,{children:n})},pre:function(e){var n=e.children,t=(0,$.Z)(e,["children"]);return(0,c.jsx)(es,(0,d.Z)((0,u.Z)({},t),{children:n}))}},ea=function(e){var n=e.html,t=e.components,r=void 0===t?{}:t,i={replace:function(e){if((0,en.Z)(e,er.W_)&&e.attribs){var n=(0,er.du)(e.children,i),t=(0,u.Z)({},r,ec)[e.name];if(t)return(0,c.jsx)(t,(0,d.Z)((0,u.Z)({name:e.name},e.attribs),{children:n}))}}};return(0,c.jsx)(c.Fragment,{children:(0,er.ZP)(n,i)})},el=function(e){var n=e.children.split("`").map(function(e,n){return n%2==1?(0,c.jsx)(eo,{children:e}):e});return(0,c.jsx)(c.Fragment,{children:n})},eu=function(e){var n=e.number,t=e.title,r=e.excerpt,i=(0,$.Z)(e,["number","title","excerpt"]);return(0,c.jsx)(ee.OK,(0,d.Z)((0,u.Z)({className:"react-tabs__vertical__tab",selectedClassName:"react-tabs__vertical__tab--selected"},i),{children:(0,c.jsxs)(v.kC,{sx:{alignItems:"flex-start"},children:[(0,c.jsx)(ex,{number:n}),(0,c.jsxs)(v.xu,{sx:{ml:3,alignSelf:"center"},children:[(0,c.jsx)(v.X6,{as:"h4",sx:{color:"whiteButtonText",fontSize:"14px",fontWeight:"600"},children:(0,c.jsx)(el,{children:t})}),r&&(0,c.jsx)(v.xv,{as:"p",sx:{mt:2,color:"textClear",fontSize:"13px",lineHeight:"24px"},children:(0,c.jsx)(el,{children:r})})]})]})}))};eu.tabsRole="Tab";var ed,ex=function(e){var n=e.number;return(0,c.jsx)(v.kC,{sx:{height:"32px",width:"32px",alignItems:"center",justifyContent:"center",border:"1px solid #E4E2E4",borderRadius:"6px",bg:"grey07",color:"textClear",flexShrink:"0",fontSize:"13px"},children:n})},ef=function(e){var n=e.isOpen,t=(0,k.v9)(function(e){return{isSimulatorAvailableForFramework:(0,D.Ql)(e),setupSteps:(0,y.qe)(e)}}),r=t.isSimulatorAvailableForFramework,i=t.setupSteps||[];return(0,x.useEffect)(function(){n&&I.Xe.track({event:"slice-simulator:setup"})},[n]),(0,c.jsx)(M.Z,{isOpen:n,children:(0,c.jsx)(B.Z,{bodySx:{p:0,bg:"grey07",height:4===i.length?"640px":"480px"},Header:function(e){var n=e.radius;return(0,c.jsx)(v.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"grey07",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:(0,c.jsx)(v.X6,{sx:{fontSize:"14px",fontWeight:"600"},as:"h5",children:"Set up the simulator"})})},children:(0,c.jsxs)(ee.mQ,{defaultFocus:!0,className:"react-tabs__vertical",children:[(0,c.jsx)(ee.td,{className:"react-tabs__vertical__tab-list",children:i.map(function(e,n){return(0,c.jsx)(eu,{number:n+1,title:e.title,excerpt:e.description},e.title)})}),r?(0,c.jsx)(c.Fragment,{children:i.map(function(e){return(0,c.jsx)(ee.x4,{selectedClassName:"react-tabs__vertical__tab-panel--selected",className:"react-tabs__vertical__tab-panel",children:(0,c.jsx)(ea,{html:e.body})},e.title)})}):(0,c.jsx)(ee.x4,{selectedClassName:"react-tabs__vertical__tab-panel--selected",className:"react-tabs__vertical__tab-panel",children:"Framework not supported."})]})})})},eh=t(53559);(ed=o||(o={})).LOADING_SETUP="LOADING_SETUP",ed.LOADING_IFRAME="LOADING_IFRAME",ed.FAILED_SETUP="FAILED_SETUP",ed.FAILED_CONNECT="FAILED_CONNECT",ed.SUCCESS="SUCCESS";var ep=function(e){var n,t,i=e.slice,s=e.variation,a=(0,W.Z)(),l=a.checkSimulatorSetup,g=a.connectToSimulatorIframe,b=a.saveSliceMock,C=(0,k.v9)(function(e){return{simulatorUrl:(0,D.x0)(e),iframeStatus:(0,y.NL)(e),manifestStatus:(0,y.tD)(e).manifest,isWaitingForIFrameCheck:(0,y.oM)(e),endpoints:(0,D.gZ)(e)}}),j=C.simulatorUrl,S=C.iframeStatus,E=C.manifestStatus,w=C.isWaitingForIFrameCheck,Z=C.endpoints,F=(0,x.useMemo)(function(){return{embedsUrl:Z.PrismicOembed,env:"prod",unsplashUrl:Z.PrismicUnsplash}},[Z.PrismicOembed,Z.PrismicUnsplash]),R=(0,x.useRef)(null),z=(0,x.useCallback)(function(){return l()},[]);(0,x.useEffect)(function(){l(),I.Xe.track({event:"slice-simulator:open"})},[]);var N=(0,x.useRef)(!1);(0,x.useEffect)(function(){N.current=!0},[]);var O=function(e){N.current&&(N.current=!1,I.Xe.track({event:"editor:widget-used",sliceId:e}))},A="ko"===E?o.FAILED_SETUP:"ok"===E?w||!S?o.LOADING_IFRAME:"ok"!==S?o.FAILED_CONNECT:o.SUCCESS:(0,o.LOADING_SETUP);(0,x.useEffect)(function(){if(A===o.FAILED_SETUP&&!R.current){var e=setInterval(function(){z()},3e3);R.current=e}},[A]),(0,x.useEffect)(function(){"ok"===E&&(R.current&&clearInterval(R.current),g())},[E]),(0,x.useEffect)(function(){A===o.FAILED_CONNECT&&I.Xe.track({event:"slice-simulator:is-not-running"})},[A]),(0,x.useEffect)(function(){A===o.SUCCESS&&es(!0)},[A]);var M=function(){g()},U=(0,x.useState)(T[r.DESKTOP]),P=U[0],B=U[1],H=(0,x.useMemo)(function(){return eh.id.fromSM(i.model)},[i.model]),X=(0,x.useState)(null),J=X[0],$=X[1],ee=(0,x.useMemo)(function(){var e;return(null==J?void 0:J.variation)===s.id?J:(null===(e=i.mocks)||void 0===e?void 0:e.find(function(e){return e.variation===s.id}))||(0,p.W)(s.id)},[J,s.id]),en=(0,x.useMemo)(function(){return(0,q.renderSliceMock)(H,ee).id},[]),et=(0,x.useCallback)(function(){return function(){return(0,d.Z)((0,u.Z)({},(0,q.renderSliceMock)(H,ee)),{id:en})}},[H,ee]),er=G(et,800,[H,ee,]),ei=(0,x.useState)(!1),eo=ei[0],es=ei[1];return(0,c.jsxs)(v.kC,{sx:{flexDirection:"column",height:"100vh"},children:[(0,c.jsx)(ef,{isOpen:A===o.FAILED_SETUP}),(0,c.jsx)(_,{slice:i,variation:s,isDisplayEditor:eo,actionsDisabled:A!==o.SUCCESS,toggleIsDisplayEditor:function(){return es(!eo)},onSaveMock:function(){return J&&b({libraryID:i.from,sliceID:i.model.id,mocks:(i.mocks||[]).filter(function(e){return e.variation!==J.variation}).concat(J)})}}),(0,c.jsx)(v.xu,{sx:{flex:1,bg:"grey07",p:3,display:"flex",flexDirection:"column",height:"calc(100% - 73px - 16px)"},children:(0,c.jsxs)(v.kC,{sx:{flex:1,flexDirection:"row",position:"relative",width:"100%",height:"100%"},children:[(0,c.jsxs)(m.xR,{sx:{display:"flex",height:"100%",flexDirection:"column",flex:1,minWidth:0},children:[(0,c.jsx)(L,{slice:i,variation:s,handleScreenSizeChange:B,screenDimensions:P,actionsDisabled:A!==o.SUCCESS}),A===o.FAILED_CONNECT?(0,c.jsx)(Q,{onRetrigger:M}):null,A===o.SUCCESS?(0,c.jsx)(K.Z,{apiContent:er,screenDimensions:P,simulatorUrl:j}):(0,c.jsx)(c.Fragment,{children:A===o.LOADING_IFRAME?(0,c.jsxs)(Y,{children:[(0,c.jsx)(v.$j,{variant:"styles.spinner"}),(0,c.jsx)(K.Z,{apiContent:er,screenDimensions:P,simulatorUrl:j,dryRun:!0})]}):null})]}),A===o.SUCCESS?(0,c.jsx)(v.xu,{className:"editor",sx:(0,u.Z)({marginLeft:"16px",maxWidth:"440px",minWidth:"440px",overflowY:"auto"},eo?{display:"flex",flexDirection:"column"}:{display:"none"}),children:(0,c.jsx)(h.SV,{renderError:function(){return(0,c.jsx)(h.Iq,{title:"Editor error",description:"An error occurred while rendering the editor."})},children:(0,c.jsx)(x.Suspense,{children:(0,c.jsx)(f.kS,{config:F,content:ee,onContentChange:function(e){$(e),O(i.model.id)},sharedSlice:H},s.id)})})}):null]})}),!!(null===(n=i.screenshots[s.id])||void 0===n?void 0:n.url)&&(0,c.jsx)(V,{sliceName:i.model.name,screenshotUrl:null===(t=i.screenshots[s.id])||void 0===t?void 0:t.url})]})},ev=t(28684),em=(0,t(57880).y)(ep);function eg(){var e=(0,ev.Z)().slice;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l(),{children:(0,c.jsxs)("title",{children:[e?"Simulator: ".concat(e.model.name):"Simulator"," - Slice Machine"]})}),(0,c.jsx)(em,{})]})}},28684:function(e,n,t){"use strict";var r=t(92521),i=t(90374),o=t(5632),s=t(2784),c=t(56580),a=function(){var e=(0,o.useRouter)(),n=(0,i.Z)().initSliceStore,t=(0,c.v9)(function(n){return{slice:(0,r.tL)(n,e.query.lib,e.query.sliceName)}}).slice;if((0,s.useEffect)(function(){t?n(t):e.replace("/")},[n,t,e]),!t)return{};var a=t.model.variations.find(function(n){return n.id===e.query.variation});return a?{slice:t,variation:a}:(e.replace("/"),{})};n.Z=a},57880:function(e,n,t){"use strict";t.d(n,{y:function(){return c}});var r=t(62230),i=t(52322);t(2784);var o=t(28684),s=t(95583),c=function(e){return function(n){var t=n.pageProps,c=(0,o.Z)(),a=c.slice,l=c.variation;return a&&l?(0,i.jsx)(e,(0,r.Z)({slice:a,variation:l},t)):((0,s.gx)("/"),null)}}},87608:function(e,n,t){"use strict";t.d(n,{W:function(){return r}});var r=function(e){return{__TYPE__:"SharedSliceContent",variation:e,primary:{},items:[]}}}},function(e){e.O(0,[789,872,851,746,909,113,774,888,179],function(){return e(e.s=30755)}),_N_E=e.O()}]);
|
package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-5b6c6912b66de61f.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(12696)}])},38986:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var i=t(62230),o=t(52322),r=t(2784),a=t(19909),l=t(75289),s=function(e){var n=e.defaultValue,t=e.variations,i=e.MenuItemAction,r=e.onChange;return(0,o.jsxs)(l.xu,{sx:{py:0,flexDirection:"column",backgroundColor:"headSection",overflow:"auto",display:"flex",borderRadius:"4px",border:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)},boxShadow:"0 10px 10px rgba(0, 0, 0, 0.05)",maxHeight:340,minWidth:250,maxWidth:350,color:"text"},children:[(0,o.jsxs)(l.xv,{sx:{p:3,fontSize:12,color:"textClear"},children:[t.length," VARIATION",t.length>1?"S":""]}),(0,o.jsxs)(l.kC,{sx:{p:0,flexDirection:"column"},children:[t.map(function(e){return(0,o.jsx)(u,{value:e,isActive:e.id===n.id,onClick:r},e.id)}),i||null]})]})},u=function(e){var n=e.value,t=e.isActive,i=e.onClick;return(0,o.jsx)(l.xu,{sx:{px:3,py:2,color:t?"primary":"",cursor:"pointer",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(t?null==n?void 0:n.primary:null==n?void 0:n.background)},borderRadius:0,bg:"background",":hover":{bg:"hoverBackground",borderLeft:function(e){var n=e.colors;return"2px solid ".concat(null==n?void 0:n.primary)}}},onClick:function(){return i(n)},children:n.name})},c=t(75100),d=function(e){var n=e.buttonSx,t=e.defaultValue,u=e.variations,d=e.onNewVariation,f=e.onChange,p=e.sx,v=e.disabled,h=(0,r.useState)(!1),m=h[0],x=h[1],y=(0,r.useState)(t||u[0]),b=y[0],g=y[1];(0,r.useEffect)(function(){t&&g(t)},[t]);var j=function(e){x(!1),g(e),setTimeout(function(){return f(e)},210)},S=(0,o.jsx)(l.xu,{sx:{p:2},children:(0,o.jsx)(l.zx,{variant:"transparent",sx:{color:"text"},onClick:function(){x(!1),d&&d()},children:"+ Add new variation"})});return(0,o.jsx)(l.xu,{sx:p,children:(0,o.jsx)(a.Popover,{align:"start",isOpen:m,onClickOutside:function(){return x(!1)},positions:["bottom"],padding:10,content:function(){return(0,o.jsx)(s,{defaultValue:b,variations:u,onChange:j,MenuItemAction:d?S:void 0})},containerClassName:"variationSelectorContainer",children:(0,o.jsxs)(l.zx,{sx:(0,i.Z)({},n),variant:"dropDownButton",onClick:function(){return x(!m)},disabled:v,children:[b.name," ",m?(0,o.jsx)(c.bOz,{size:"16px","aria-label":"Collapse variations"}):(0,o.jsx)(c.mEq,{size:"16px","aria-label":"Expand variations"})]})})})}},25474:function(e,n,t){"use strict";function i(e){var n=e.lib,t=e.sliceName,i=e.variationId,o=e.options,r=void 0===o?{}:o,a=e.isSimulator,l="/slices/[lib]/[sliceName]/[variation]".concat(a?"/simulator":""),s="/slices/".concat(n,"/").concat(t,"/").concat(i).concat(a?"/simulator":"");return{href:l,as:s,options:r,all:[l,s,r]}}t.d(n,{P:function(){return i}})},12696:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eS}});var i=t(52322),o=t(97729),r=t.n(o),a=t(62230),l=t(71651),s=t(2784),u=t(57282),c=t(65077),d=t(75289),f=t(47560),p=t(38876),v=t(96377),h=t(4092),m=t(2353),x=t(44384),y=t(90374),b=t(53559),g=function(e){var n=e.variation,t=(0,y.Z)(),o=t.addSliceWidget,r=t.replaceSliceWidget,a=t.reorderSliceWidget,l=t.removeSliceWidget,s=t.updateSliceWidgetMock,u=t.deleteSliceWidgetMock,c=function(e){return function(t){u(n.id,e,t),l(n.id,e,t)}},g=function(e){return function(t){var i=t.apiId,o=t.newKey,a=t.value,l=t.mockValue;l?s(n.id,e,i,o,l):u(n.id,e,o),r(n.id,e,i,o,a)}},j=function(e){return function(t){var i=t.id,r=t.label,a=t.widgetTypeName,l=m[a];l||console.log('Could not find widget with type name "'.concat(a,'". Please contact us!')),o(n.id,e,i,l.create(r))}},S=function(e){return function(t){var i,o;(0,f.uS)(t)||a(n.id,e,t.source.index,null!==(o=null===(i=t.destination)||void 0===i?void 0:i.index)&&void 0!==o?o:void 0)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v.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:n.primary,EditModal:h.Z,widgetsArray:x.Z,onDeleteItem:c(b.Rt.Primary),onSave:g(b.Rt.Primary),onSaveNewField:j(b.Rt.Primary),onDragEnd:S(b.Rt.Primary),poolOfFieldsToCheck:n.primary||[],renderHintBase:function(e){var n=e.item;return"slice.primary".concat((0,p.Ti)(n.key))},renderFieldAccessor:function(e){return"slice.primary".concat((0,p.Ti)(e))},dataCy:"slice-non-repeatable-zone",isRepeatableCustomType:void 0}),(0,i.jsx)(d.xu,{mt:4}),(0,i.jsx)(v.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:x.Z,fields:n.items,EditModal:h.Z,onDeleteItem:c(b.Rt.Items),onSave:g(b.Rt.Items),onSaveNewField:j(b.Rt.Items),onDragEnd:S(b.Rt.Items),poolOfFieldsToCheck:n.items||[],renderHintBase:function(e){var n=e.item;return"item".concat((0,p.Ti)(n.key))},renderFieldAccessor:function(e){return"slice.items[i]".concat((0,p.Ti)(e))},dataCy:"slice-repeatable-zone",isRepeatableCustomType:void 0})]})},j=t(54132),S=t(39295),k=t(61931),C=t(84449),w=t(47731),T=t(56577),Z=t(951),R=t(33710),E=function(){return(0,i.jsx)(S.X,{children:(0,i.jsx)(R.Z,{clickable:!0,place:"bottom",effect:"solid",delayHide:500,id:"update-screenshot-button-tooltip",children:"Save your work in order to update the screenshot"})})},I=function(e){var n,t=e.component,o=e.variation,r=e.isTouched,a=t.screenshots,l=(0,w.H)().openScreenshotsModal;return(0,i.jsxs)(d.xu,{children:[(0,i.jsx)(j.Z,{bg:"headSection",bodySx:{p:0},Footer:function(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.kC,{"data-tip":!0,"data-tip-disable":!1,"data-for":"update-screenshot-button-tooltip",sx:{width:"fit-content"},children:(0,i.jsx)(T.z,{onClick:l,variant:"secondarySmall",sx:{fontWeight:"bold"},Icon:Z.rJU,iconFill:"#1A1523",label:"Update screenshot",disabled:r})}),r&&(0,i.jsx)(E,{})]})},footerSx:{padding:2},sx:{overflow:"hidden"},children:(0,i.jsx)(k.q,{src:null===(n=a[o.id])||void 0===n?void 0:n.url,sx:{height:"198px",borderBottom:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)},borderRadius:"4px 4px 0 0"}})}),(0,i.jsx)(C.Z,{slices:[t],defaultVariationSelector:{sliceID:t.model.id,variationID:o.id}})]})},L=t(81541),A=t(22710),F=t(85244),N=t(99267),O=t(55658),z=t(63397),V=t(25812),P=function(e){var n=e.children,t=e.FooterContent,o=e.HeaderContent,r=e.close,l=e.sx,s=e.headerSx,u=void 0===s?{}:s;return(0,i.jsx)(j.Z,{borderFooter:!0,footerSx:{p:0},bodySx:{pt:2,pb:4,px:4},sx:(0,a.Z)({border:"none"},void 0===l?{}:l),Header:function(e){var n=e.radius;return(0,i.jsxs)(d.kC,{sx:(0,a.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)}},u),children:[o,r?(0,i.jsx)(d.x8,{onClick:r,type:"button"}):null]})},Footer:t?(0,i.jsxs)(d.kC,{sx:{alignItems:"space-between",bg:"headSection",p:3},children:[(0,i.jsx)(d.xu,{sx:{ml:"auto"}}),t]}):null,children:n})},_=t(36131),M=function(e){var n=e.msg;return(0,i.jsx)(d.xv,{as:"span",sx:{fontSize:12,color:"error",mt:"5px",ml:2},children:n||"Error!"})},D=function(e){var n=e.isOpen,t=e.onClose,o=e.onSubmit,r=e.initialVariation,l=e.variations,u=function(e){var n=e.id,t=e.name,i=e.origin,o=n&&n.length?null:{id:"Required!"},r=l.find(function(e){return e.id===n})?{id:"This id already exists!"}:null,s=t&&t.length?null:{name:"Required!"},u=i.value.length&&l.find(function(e){return e.id===i.value})?null:{id:"Yuu must select an existing variation!"},c=n&&n.length&&!/^[A-Za-z0-9]+([A-Za-z0-9]+)*$/.exec(n)&&{id:"No special characters allowed"};return(0,a.Z)({},o,r,s,u,c)},c=function(e){j(O.e.generateId(e))},f=function(e){Z(e),k&&c(e)},p=function(e){C(!1),c(e)},v=function(){h(),t()},h=function(){j(""),Z(""),y({}),C(!0),I({value:r.id,label:r.name})},m=(0,s.useState)({}),x=m[0],y=m[1],b=(0,s.useState)(""),g=b[0],j=b[1],S=(0,s.useState)(!0),k=S[0],C=S[1],w=(0,s.useState)(""),T=w[0],Z=w[1],R=(0,s.useState)({value:r.id,label:r.name}),E=R[0],I=R[1];function L(){return D.apply(this,arguments)}function D(){return(D=(0,A.Z)(function(){var e,n;return(0,N.__generator)(this,function(t){return Object.keys(e=u({id:g,name:T,origin:E})).length?y(e):(n=l.find(function(e){return e.id===E.value}))&&(o(g,T,n),v()),[2]})})).apply(this,arguments)}return(0,s.useEffect)(function(){h()},[r,n]),(0,i.jsx)(V.Z,{isOpen:n,shouldCloseOnOverlayClick:!0,onRequestClose:function(){return v()},contentLabel:"Widget Form Modal",style:{content:{maxWidth:"700px"}},children:(0,i.jsx)(z.J9,{initialValues:{id:g,name:T,origin:E},onSubmit:L,children:(0,i.jsx)(z.l0,{id:"variation-add",onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),L())},children:(0,i.jsx)(d.xu,{children:(0,i.jsxs)(P,{sx:{textAlign:"left"},HeaderContent:(0,i.jsx)(d.xv,{as:"h2",children:"Add new Variation"}),FooterContent:(0,i.jsxs)(d.kC,{sx:{justifyContent:"flex-end"},children:[(0,i.jsx)(d.zx,{onClick:v,mr:2,variant:"secondary",children:"Cancel"}),(0,i.jsx)(d.zx,{type:"submit",children:"Submit"})]}),close:v,children:[(0,i.jsxs)(d.xu,{sx:{pb:4,mt:4},children:[(0,i.jsxs)(d.__,{htmlFor:"name",sx:{mb:1},children:["Variation name*",x.name?(0,i.jsx)(M,{msg:x.name}):""]}),(0,i.jsx)(z.gN,{autoComplete:"off",id:"name",name:"name",placeholder:"e.g. Grid - With Icon",as:d.II,maxLength:30,value:T,onChange:function(e){return f(e.currentTarget.value)}}),(0,i.jsx)(d.xv,{children:"It will appear here in Slice Machine, and in the page editor in Prismic"})]}),(0,i.jsxs)(d.xu,{sx:{pb:4},children:[(0,i.jsxs)(d.__,{htmlFor:"id",sx:{mb:1},children:["Variation ID*",x.id?(0,i.jsx)(M,{msg:x.id}):""]}),(0,i.jsx)(z.gN,{autoComplete:"off",id:"id",name:"id",placeholder:"e.g. GridWithIcon",as:d.II,maxLength:30,value:g,onChange:function(e){return p(e.currentTarget.value)}}),(0,i.jsx)(d.xv,{children:"It's generated automatically based on the variation name and will appear in the API responses."})]}),(0,i.jsxs)(d.xu,{sx:{pb:4},children:[(0,i.jsx)(d.__,{htmlFor:"origin",sx:{mb:1},children:"Duplicate from"}),(0,i.jsx)(_.ZP,{name:"origin",options:l.map(function(e){return{value:e.id,label:e.name}}),onChange:function(e){e&&I(e)},defaultValue:E,maxMenuHeight:150,theme:function(e){return(0,F.Z)((0,a.Z)({},e),{colors:(0,F.Z)((0,a.Z)({},e.colors),{text:"text",primary:"background"})})}})]})]})})})})})},W=t(5632),H=t(25474),K=t(38986),q=function(e){var n,t=e.component,o=e.variation,r=(0,W.useRouter)(),a=(0,s.useState)(!1),l=a[0],u=a[1],c=(0,y.Z)().copyVariationSlice;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.kC,{children:[(0,i.jsx)(K.Z,{defaultValue:o,variations:t.model.variations,onNewVariation:function(){return u(!0)},onChange:function(e){(n=r).push.apply(n,(0,L.Z)(H.P({lib:t.href,sliceName:t.model.name,variationId:e.id}).all))}}),(0,i.jsx)(d.xu,{ml:2,children:(0,i.jsxs)(d.xv,{variant:"xs",children:["Variation id : ",o.id]})})]}),(0,i.jsx)(D,{isOpen:l,onClose:function(){return u(!1)},onSubmit:function(e,n,i){c(e,n,i),r.push.apply(r,(0,L.Z)(H.P({lib:t.href,sliceName:t.model.name,variationId:e}).all))},initialVariation:o,variations:t.model.variations})]})},B=t(56580),J=t(25251),X=t(75329),G=t(42189),Q=t(17036),U=t(82770),Y=t(18125),$=function(){return(0,i.jsx)(S.X,{children:(0,i.jsxs)(R.Z,{clickable:!0,place:"bottom",effect:"solid",delayHide:500,id:"simulator-button-tooltip",children:[(0,i.jsx)(d.xv,{as:"b",children:"Framework not supported"}),(0,i.jsx)(d.xv,{as:"p",children:"Slice Simulator does not support your framework yet."})]})})},ee=function(e){var n=e.children,t=e.open,o=e.onClose;return(0,i.jsxs)(Y.zs,{open:t,trigger:n,onClose:o,children:[(0,i.jsx)(Y.Ev,{children:"Simulate your slices"}),(0,i.jsx)(Y.LB,{component:"video",cloudName:"dmtf1daqp",loop:!1,autoPlay:!1,publicId:X.Sn,poster:"/simulator-video-thumbnail.png",controls:!0,onPlay:function(){U.Xe.track({event:"open-video-tutorials",video:X.Sn})}}),(0,i.jsx)(Y.OJ,{children:"Minimize context-switching by previewing your Slice components in the simulator."}),(0,i.jsx)(Y.Rp,{children:"Got It"})]})},en=function(){return(0,i.jsx)(S.X,{children:(0,i.jsx)(R.Z,{clickable:!0,place:"bottom",effect:"solid",delayHide:500,id:"simulator-button-tooltip",children:"Save your work in order to simulate"})})},et=function(e){var n=e.isSimulatorAvailableForFramework,t=e.isTouched,o=(0,W.useRouter)(),r=(0,s.useRef)(null),a=(0,y.Z)().setSeenSimulatorToolTip,u=(0,B.v9)(function(e){return{hasSeenSimulatorTooltip:(0,Q.bv)(e),hasSeenTutorialsToolTip:(0,Q.ER)(e)}}),c=u.hasSeenSimulatorTooltip,d=u.hasSeenTutorialsToolTip;(0,s.useEffect)(function(){var e=r.current;e&&n&&!c&&d&&setTimeout(function(){return R.Z.show(e)},5e3)},[n,c,d,]);var f=function(){if(a(),r.current){var e=r.current;R.Z.hide(e)}},p=n&&!c&&d;return(0,i.jsxs)("span",{"data-tip":!0,"data-tip-disable":!1,"data-for":"simulator-button-tooltip",ref:r,children:[(0,i.jsx)(ee,{open:p,onClose:f,children:(0,i.jsx)(l.zx,{"data-tip":!0,"data-testid":"simulator-open-button",onClick:function(){f(),window.open("".concat(o.asPath,"/simulator"),X.pq)},disabled:!n||t,renderStartIcon:function(){return(0,i.jsx)(G.z,{color:l.TV.color.greyLight11,height:l.TV.size[24],style:{transform:"scale(calc(4 / 3))"},width:l.TV.size[24]})},variant:"secondary",children:"Simulate"})}),!1===n?(0,i.jsx)($,{}):n&&!1===p&&t?(0,i.jsx)(en,{}):null]})},ei=t(17329),eo=t(40147);function er(e){return ea.apply(this,arguments)}function ea(){return(ea=(0,A.Z)(function(e){var n,t,i;return(0,N.__generator)(this,function(o){switch(o.label){case 0:return[4,eo.j.customTypes.readCustomType({id:e})];case 1:if(t=(n=o.sent()).errors,i=n.model,t.length>0)throw t;return[2,i]}})})).apply(this,arguments)}var el=t(67445),es=t(64722),eu=t(20812),ec=function(e){return(0,i.jsxs)("svg",(0,F.Z)((0,a.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"})]}))},ed=function(){var e,n,t=(e=(0,es.l)().source,n=(0,el.Ag)(e.query),void 0!==n&&(0,el.ne)(e.asPath,n)?n:void 0);return void 0!==t?(0,i.jsx)(l.SV,{children:(0,i.jsx)(s.Suspense,{children:(0,i.jsx)(l.xu,{bottom:32,justifyContent:"center",position:"fixed",right:0,width:"100vw",children:(0,i.jsx)(ef,{sourceCustomTypeId:t})})})}):null},ef=function(e){var n,t=(n=e.sourceCustomTypeId,(0,ei.QT)(er,[n])),o=(0,s.useState)(!0),r=o[0],a=o[1],u=(0,W.useRouter)();if(void 0===t||!r)return null;var c=t.format,d=t.id,f=el.cd[c].getBuilderPagePathname(d);return(0,i.jsxs)(l.hE,{density:"compact",variant:"tertiary",children:[(0,i.jsxs)(l.zx,{onClick:function(){u.push(f)},renderStartIcon:function(){return(0,i.jsx)(ec,{})},children:["Return to ",t.label]}),(0,i.jsx)(l.zx,{onClick:function(){a(!1)},renderStartIcon:function(){return(0,i.jsx)(eu.T,{})}})]})},ep=t(39092),ev=t(92521),eh=t(75992),em=t(71685),ex={imageLoading:!1,loading:!1,done:!1,error:null,status:null},ey=function(e){var n=e.slice,t=e.variation,o=(0,y.Z)(),r=o.openToaster,a=o.updateSlice,l=(0,B.v9)(function(e){return{isTouched:(0,ev.sY)(e,n.from,n.model.id),remoteSlice:(0,eh.O_)(e,n.model.id)}}),c=l.isTouched,d=l.remoteSlice,f=(0,s.useState)(ex),p=f[0],v=f[1];return((0,s.useEffect)(function(){c&&v(ex)},[c]),(0,s.useEffect)(function(){if(p.done){var e,n;n=p,n.done&&r(n.message,n.error?u.Jf.ERROR:n.warning?u.Jf.WARNING:u.Jf.SUCCESS)}},[p]),t)?(0,i.jsx)(eb,{updateSlice:a.bind(null,n,v),slice:n,variation:t,remoteSlice:d,isTouched:c,data:p}):(0,i.jsx)(J.LN,{})},eb=function(e){var n=e.updateSlice,t=e.slice,o=e.variation,r=e.remoteSlice,s=e.isTouched,u=e.data,f=(0,B.v9)(function(e){return{isSimulatorAvailableForFramework:(0,ep.Ql)(e)}}).isSimulatorAvailableForFramework,p=(0,a.Z)({local:t.model,localScreenshots:t.screenshots},r?{remote:r}:{}),v=(0,em.J)({slices:[p]}).modelsStatuses;return(0,i.jsxs)(J.LN,{children:[(0,i.jsxs)(J.wd,{children:[(0,i.jsx)(J.Xq,{url:"/slices"}),(0,i.jsx)(J.Cx,{folder:"Slices",page:t.model.name}),(0,i.jsxs)(J.K2,{children:[(0,i.jsx)(et,{isSimulatorAvailableForFramework:f,isTouched:!!s}),(0,i.jsx)(l.zx,{loading:u.loading,disabled:!s||u.loading,onClick:n,"data-cy":"builder-save-button",children:"Save"})]})]}),(0,i.jsxs)(J.RN,{children:[(0,i.jsxs)(c.xR,{children:[(0,i.jsx)(q,{component:t,status:v.slices[t.model.id],variation:o,imageLoading:u.imageLoading}),(0,i.jsxs)(d.rj,{columns:"1fr 320px",gap:"16px",sx:{pt:4},children:[(0,i.jsx)(d.xu,{children:(0,i.jsx)(g,{variation:o})}),(0,i.jsx)(I,{component:t,variation:o,isTouched:s})]})]}),(0,i.jsx)(ed,{})]})]})},eg=t(28684),ej=(0,t(57880).y)(ey);function eS(){var e=(0,eg.Z)().slice;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r(),{children:e?(0,i.jsxs)("title",{children:[e.model.name," - Slice Machine"]}):null}),(0,i.jsx)(ej,{})]})}},28684:function(e,n,t){"use strict";var i=t(92521),o=t(90374),r=t(5632),a=t(2784),l=t(56580),s=function(){var e=(0,r.useRouter)(),n=(0,o.Z)().initSliceStore,t=(0,l.v9)(function(n){return{slice:(0,i.tL)(n,e.query.lib,e.query.sliceName)}}).slice;if((0,a.useEffect)(function(){t?n(t):e.replace("/")},[n,t,e]),!t)return{};var s=t.model.variations.find(function(n){return n.id===e.query.variation});return s?{slice:t,variation:s}:(e.replace("/"),{})};n.Z=s},57880:function(e,n,t){"use strict";t.d(n,{y:function(){return l}});var i=t(62230),o=t(52322);t(2784);var r=t(28684),a=t(95583),l=function(e){return function(n){var t=n.pageProps,l=(0,r.Z)(),s=l.slice,u=l.variation;return s&&u?(0,o.jsx)(e,(0,i.Z)({slice:s,variation:u},t)):((0,a.gx)("/"),null)}}},76473:function(e,n,t){"use strict";t.d(n,{y1:function(){return g}});var i=t(2784);function o(){return(o=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 r=["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 l(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 l(e)});return o({},{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!r.includes(e)}),description:t})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&f([l(e.key),l(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&p([l(e.key),l(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){c.clear()});var c=new Set;function d(e){return Array.isArray(e)}function f(e){var n=Array.isArray(e)?e:[e];c.has("meta")&&c.forEach(function(e){var n;return!r.includes(e)&&c.delete(e.toLowerCase())}),n.forEach(function(e){return c.add(e.toLowerCase())})}function p(e){var n=Array.isArray(e)?e:[e];"meta"===e?c.clear():n.forEach(function(e){return c.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 h=function(e,n,t){void 0===t&&(t=!1);var i,o,r=n.alt,a=n.meta,s=n.mod,u=n.shift,f=n.ctrl,p=n.keys,v=e.key,h=e.code,m=e.ctrlKey,x=e.metaKey,y=e.shiftKey,b=e.altKey,g=l(h),j=v.toLowerCase();if(!t){if(!b===r&&"alt"!==j||!y===u&&"shift"!==j)return!1;if(s){if(!x&&!m)return!1}else if(!x===a&&"meta"!==j&&"os"!==j||!m===f&&"ctrl"!==j&&"control"!==j)return!1}return!!(p&&1===p.length&&(p.includes(j)||p.includes(g)))||(p?(void 0===o&&(o=","),(d(i=p)?i:i.split(o)).every(function(e){return c.has(e.trim().toLowerCase())})):!p)},m=(0,i.createContext)(void 0),x=(0,i.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),y=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},b="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function g(e,n,t,o){var r,a,c=(0,i.useRef)(null),g=(0,i.useRef)(!1),j=t instanceof Array?o instanceof Array?void 0:o:t,S=d(e)?e.join(null==j?void 0:j.splitKey):e,k=t instanceof Array?t:o instanceof Array?o:void 0,C=(0,i.useCallback)(n,null!=k?k:[]),w=(0,i.useRef)(C);k?w.current=C:w.current=n;var T=(!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,o){return i&&e(n[o],t[o])},!0):n===t}((a=(0,i.useRef)(void 0)).current,j)&&(a.current=j),a.current),Z=(0,i.useContext)(x).enabledScopes,R=(0,i.useContext)(m);return b(function(){if((null==T?void 0:T.enabled)!==!1&&(e=Z,n=null==T?void 0:T.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==T?void 0:T.enableOnFormTags)||null!=T&&null!=T.ignoreEventWhen&&T.ignoreEventWhen(e))){if(null!==c.current&&document.activeElement!==c.current&&!c.current.contains(document.activeElement)){y(e);return}(null==(t=e.target)||!t.isContentEditable||null!=T&&T.enableOnContentEditable)&&s(S,null==T?void 0:T.splitKey).forEach(function(t){var i,o,r,a,l,s,c,d=u(t,null==T?void 0:T.combinationKey);if(h(e,d,null==T?void 0:T.ignoreModifiers)||null!=(c=d.keys)&&c.includes("*")){if(n&&g.current)return;if(i=e,o=d,("function"==typeof(r=null==T?void 0:T.preventDefault)&&r(i,o)||!0===r)&&i.preventDefault(),a=e,l=d,"function"==typeof(s=null==T?void 0:T.enabled)?!s(a,l):!0!==s&&void 0!==s){y(e);return}w.current(e,d),n||(g.current=!0)}})}},i=function(e){void 0!==e.key&&(f(l(e.code)),((null==T?void 0:T.keydown)===void 0&&(null==T?void 0:T.keyup)!==!0||null!=T&&T.keydown)&&t(e))},o=function(e){void 0!==e.key&&(p(l(e.code)),g.current=!1,null!=T&&T.keyup&&t(e,!0))},r=c.current||(null==j?void 0:j.document)||document;return r.addEventListener("keyup",o),r.addEventListener("keydown",i),R&&s(S,null==T?void 0:T.splitKey).forEach(function(e){return R.addHotkey(u(e,null==T?void 0:T.combinationKey,null==T?void 0:T.description))}),function(){r.removeEventListener("keyup",o),r.removeEventListener("keydown",i),R&&s(S,null==T?void 0:T.splitKey).forEach(function(e){return R.removeHotkey(u(e,null==T?void 0:T.combinationKey,null==T?void 0:T.description))})}}},[S,T,Z]),c}}},function(e){e.O(0,[789,909,573,377,774,888,179],function(){return e(e.s=31314)}),_N_E=e.O()}]);
|
package/out/_next/static/chunks/pages/{slices-15b69ac3611efbfe.js → slices-b686960d7d228e36.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{74600:function(e,n,t){var i=t(34311),r=t(23779),o=i(function(e,n,t){return e+(t?" ":"")+r(n)});e.exports=o},26688:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices",function(){return t(12472)}])},45466:function(e,n,t){"use strict";t.d(n,{c:function(){return j}});var i=t(22710),r=t(62230),o=t(85244),l=t(99267),a=t(52322),c=t(75289),s=t(2784),u=t(36131),d=t(68780),f=t(88932),m=t(38876),h=t(40147),p=t(82770);function x(){return(x=(0,i.Z)(function(e){var n,t,i,r,o,a,c;return(0,l.__generator)(this,function(l){switch(l.label){case 0:var s;return l.trys.push([0,3,,4]),n=e.sliceName,t=e.libraryName,i=e.onSuccess,s=n,r={id:(0,m.T3)(s),type:"SharedSlice",name:s,description:s,variations:[{id:v,name:(0,m.MP)(v),docURL:"...",version:"initial",description:(0,m.MP)(v),imageUrl:""},]},[4,h.j.slices.createSlice({libraryID:t,model:r})];case 1:if((o=l.sent().errors).length>0)throw o;return p.Xe.track({event:"slice:created",id:(0,m.MP)(n),name:n,library:t}),[4,i(r)];case 2:return l.sent(),[3,4];case 3:return a=l.sent(),c="Internal Error: Slice not created",console.error(c,a),f.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var v="default",y=t(90374),b=t(66443),g=t(70041),j=function(e){var n,t=e.onClose,f=e.onSuccess,m=e.localLibraries,h=e.remoteSlices,v=(0,y.Z)().createSliceSuccess,j=(0,s.useState)(!1),S=j[0],C=j[1],k=(n=(0,i.Z)(function(e){var n,t;return(0,l.__generator)(this,function(r){switch(r.label){case 0:var o;return n=e.sliceName,t=e.from,C(!0),[4,function(e){return x.apply(this,arguments)}({sliceName:n,libraryName:t,onSuccess:(o=(0,i.Z)(function(e){var n;return(0,l.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,p.y0)()];case 1:return v(n.sent().libraries),[4,f(e,t)];case 2:return n.sent(),[2]}})}),function(e){return o.apply(this,arguments)})})];case 1:return r.sent(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,a.jsx)(d.Z,{dataCy:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:S,formId:"create-new-slice",close:t,buttonLabel:"Create",onSubmit:function(e){k(e)},initialValues:{sliceName:"",from:m[0].name},validate:function(e){return(0,b.h)(e,m,h)},content:{title:"Create a new slice"},children:function(e){var n=e.touched,t=e.values,i=e.setFieldValue,l=e.errors;return(0,a.jsxs)(c.xu,{children:[(0,a.jsx)(g.W,{name:"sliceName",label:"Slice Name",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:n.sliceName?l.sliceName:void 0,dataCy:"slice-name-input"}),(0,a.jsx)(c.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,a.jsx)(u.ZP,{name:"from",options:m.map(function(e){return{value:e.name,label:e.name}}),onChange:function(e){return e?void i("from",e.value):null},defaultValue:{value:t.from,label:t.from},styles:{option:function(e){return(0,o.Z)((0,r.Z)({},e),{color:"#161618"})}},theme:function(e){return(0,o.Z)((0,r.Z)({},e),{colors:(0,o.Z)((0,r.Z)({},e.colors),{primary:"#E9E8EA"})})},menuPortalTarget:document.body})]})}})}},70041:function(e,n,t){"use strict";t.d(n,{W:function(){return a}});var i=t(62230),r=t(52322);t(2784);var o=t(63397),l=t(75289),a=function(e){var n=e.name,t=e.label,a=e.placeholder,c=e.error,s=e.dataCy,u=e.onChange;return(0,r.jsxs)(l.xu,{mb:3,children:[(0,r.jsx)(l.__,{htmlFor:n,mb:2,children:t}),(0,r.jsx)(o.gN,(0,i.Z)({name:n,type:"text",placeholder:a,as:l.II,autoComplete:"off"},u?{onChange:u}:null,s?{"data-cy":s}:null)),c?(0,r.jsx)(l.xv,{"data-cy":s?"".concat(s,"-error"):"input-error",sx:{color:"error",mt:1},children:c}):null]})}},66443:function(e,n,t){"use strict";t.d(n,{h:function(){return s}});var i=t(81541),r=t(75329),o=t(96009),l=t.n(o),a=t(74600),c=t.n(a);function s(e,n,t){var o=e.sliceName;if(!o)return{sliceName:"Cannot be empty"};if(!r.xo.exec(o))return{sliceName:"No special characters allowed"};if(c()(l()(o)).replace(/\s/gm,"")!==o.trim())return{sliceName:"Value has to be PascalCased"};if(o.match(/^\d/))return{sliceName:"Value cannot start with a number"};if(r.lS.includes(o))return{sliceName:"".concat(o," is reserved for Slice Machine use")};var a=n.flatMap(function(e){return e.components.map(function(e){return e.model.name})}),s=t.map(function(e){return e.name});if((0,i.Z)(a).concat((0,i.Z)(s)).includes(o))return{sliceName:"Slice name is already taken."}}},68780:function(e,n,t){"use strict";var i=t(62230),r=t(85244),o=t(52322),l=t(37149),a=t.n(l),c=t(25812),s=t(63397),u=t(75289),d=t(56577),f=t(54132);n.Z=function(e){var n=e.children,t=e.close,l=e.isOpen,m=e.formId,h=e.validate,p=e.onSubmit,x=e.widthInPx,v=e.initialValues,y=e.content.title,b=e.cardProps,g=e.omitFooter,j=void 0!==g&&g,S=e.isLoading,C=void 0!==S&&S,k=e.buttonLabel,w=void 0===k?"Save":k,L=e.dataCy,N=e.actionMessage;return a().setAppElement("#__next"),(0,o.jsx)(c.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:y,style:{content:{width:null!=x?x:"900px"}},children:(0,o.jsx)(s.J9,{validateOnChange:!0,initialValues:v,validate:function(e){return h?h(e):void 0},onSubmit:function(e){p(e)},children:function(e){var l=e.isValid,a=e.isSubmitting,c=e.values,h=e.errors,p=e.touched,x=e.setFieldValue,v=e.setValues;return(0,o.jsx)(s.l0,(0,r.Z)((0,i.Z)({id:m},null!=L?{"data-cy":L}:null),{children:(0,o.jsx)(f.Z,(0,r.Z)((0,i.Z)({borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"}},b),{Header:function(e){var n=e.radius;return(0,o.jsxs)(u.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",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)}},children:[(0,o.jsx)(u.X6,{sx:{fontSize:"20px"},children:y}),(0,o.jsx)(u.x8,{type:"button",onClick:t})]})},Footer:j?null:(0,o.jsxs)(u.kC,{sx:{alignItems:"space-between"},children:[(0,o.jsx)(u.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof N?N(e):N}),(0,o.jsxs)(u.kC,{sx:{ml:"auto"},children:[(0,o.jsx)(u.zx,{mr:2,type:"button",onClick:t,variant:"secondary",disabled:a||C,children:"Cancel"}),(0,o.jsx)(d.z,{label:w,form:m,type:"submit",disabled:!l||a||C,isLoading:a||C,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:n({isValid:l,isSubmitting:a,values:c,errors:h,touched:p,setFieldValue:x,setValues:v})}))}))}})})}},12472:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return V}});var i=t(81541),r=t(52322),o=t(71651),l=t(2784),a=t(97729),c=t.n(a),s=t(65077),u=t(75289),d=t(56580),f=t(5632),m=t(88932),h=t(75329),p=t(25251),x=t(45466),v=t(59469),y=t(36887),b=t(82770),g=function(e){var n=e.title,t=e.onCreateNew,i=e.buttonText,o=e.documentationComponent,l=e.videoPublicIdUrl;return(0,r.jsxs)(u.xu,{sx:{display:"flex",width:"80%",flexWrap:"wrap",justifyContent:"center"},children:[(0,r.jsx)(u.xu,{sx:function(e){var n;return{display:"flex",flex:1,alignItems:"center",minWidth:"400px",maxWidth:"70%",border:"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.grey02)}},children:(0,r.jsx)(y.nk,{cloudName:"dmtf1daqp",controls:!0,loop:!0,style:{maxWidth:"100%",objectFit:"contain"},publicId:l,onPlay:function(){b.Xe.track({event:"open-video-tutorials",video:l})}})}),(0,r.jsxs)(u.xu,{sx:function(e){var n;return{bg:"white",display:"flex",flexDirection:"column",border:"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.grey02),flex:1,minWidth:"400px",maxWidth:"70%"}},children:[(0,r.jsxs)(u.xu,{sx:function(e){var n;return{display:"flex",flexDirection:"column",p:4,borderBottom:"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.grey02)}},children:[(0,r.jsx)(u.X6,{as:"h3",variant:"heading",sx:{fontSize:"16px",lineHeight:"24px",mb:2},children:n}),(0,r.jsx)(u.xv,{variant:"xs",sx:{lineHeight:"24px",fontSize:"13px"},children:o})]}),(0,r.jsxs)(u.xu,{sx:{display:"flex",p:4,alignItems:"center"},children:[(0,r.jsx)(u.zx,{onClick:t,"data-cy":"empty-state-main-button",sx:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0,mr:4},children:i}),(0,r.jsx)(u.xv,{sx:{fontSize:"12px",color:"grey04",maxWidth:"280px"},children:"It will be stored locally and you will be able to push it to your repository"})]})]})]})},j=t(84449),S=t(90374),C=t(68780),k=t(70041),w=t(77174),L=t(24340),N=t(75992),E=t(66443),I=function(e){var n=e.sliceName,t=e.sliceId,i=e.libName,o=(0,S.Z)(),l=o.renameSlice,a=o.closeModals,c=(0,d.v9)(function(e){return{isRenameSliceModalOpen:(0,w.gP)(e,L.q.RENAME_SLICE),localLibs:(0,N.Sd)(e),remoteLibs:(0,N.sT)(e)}}),s=c.isRenameSliceModalOpen,f=c.localLibs,m=c.remoteLibs,h=function(e){l(i,t,e.sliceName)};return(0,r.jsx)(C.Z,{dataCy:"rename-slice-modal",isOpen:s,widthInPx:"530px",formId:"rename-slice-modal-".concat(t),close:a,buttonLabel:"Rename",onSubmit:h,initialValues:{sliceName:n},content:{title:"Rename a slice"},validate:function(e){return(0,E.h)(e,f,m)},children:function(e){var n=e.touched,t=e.errors;return(0,r.jsx)(u.xu,{children:(0,r.jsx)(k.W,{name:"sliceName",label:"Slice Name","data-cy":"slice-name-input",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:n.sliceName?t.sliceName:void 0,dataCy:"slice-name-input"})})}})},Z=t(25812),P=t(59326),R=t(54132),O=t(65186),_=t(56577),A=t(3098),D=t(32665),M=function(e){var n=e.sliceId,t=e.sliceName,i=e.libName,o=(0,d.v9)(function(e){return{isSliceModalOpen:(0,w.gP)(e,L.q.DELETE_SLICE),isDeletingSlice:(0,D.hg)(e,A.z.DELETE_SLICE)}}),l=o.isSliceModalOpen,a=o.isDeletingSlice,c=(0,S.Z)(),s=c.closeModals,f=c.deleteSlice,m=(0,P.B7)().theme;return(0,r.jsx)(Z.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:s,children:(0,r.jsx)(R.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none"},borderFooter:!0,Header:function(){var e;return(0,r.jsxs)(u.kC,{sx:{position:"sticky",background:"gray",top:0,zIndex:1,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.jsxs)(u.kC,{sx:{alignItems:"center"},children:[(0,r.jsx)(O.$vK,{size:20,color:null===(e=m.colors)||void 0===e?void 0:e.greyIcon}),(0,r.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Delete Slice"})]}),(0,r.jsx)(u.x8,{type:"button",onClick:s})]})},Footer:function(){return(0,r.jsxs)(u.kC,{sx:{justifyContent:"flex-end",height:64,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:"gray"},children:[(0,r.jsx)(_.z,{label:"Cancel",variant:"secondary",onClick:function(){return s()},sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,r.jsx)(_.z,{label:"Delete",variant:"danger",isLoading:a,sx:{minHeight:39,minWidth:78},onClick:function(){return f(n,t,i)}})]})},children:(0,r.jsxs)(u.nv,{children:["This action will immediately make the following changes:",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:["Delete the"," ",(0,r.jsxs)(u.xv,{sx:{fontWeight:"bold"},children:[i,"/",t,"/"]})," ","directory."]}),(0,r.jsx)("li",{children:"Remove the Slice from all Slice Zones that use it."})]}),"The next time you push your changes to Prismic, the following change will happen:",(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:"Remove the Slice from the list of available Slices to use in the Page Builder."})}),"You will need to manually remove the Slice from any Pages that currently use it."]})})})},W=t(47731),T=t(82131),z=t(49451),F=t(13858),V=function(){var e,n,t,a,y,b,C=(0,f.useRouter)(),k=(0,S.Z)(),w=k.openRenameSliceModal,L=k.openDeleteSliceModal,E=(0,W.H)(),Z=E.modalPayload,P=E.onOpenModal,R=Z.sliceFilterFn,O=Z.defaultVariationSelector,_=(0,d.v9)(function(e){return{remoteSlices:(0,N.sT)(e),libraries:(0,N.Sd)(e)}}),A=_.remoteSlices,D=_.libraries,V=(0,l.useState)(!1),K=V[0],B=V[1],H=D.filter(function(e){return e.isLocal}),X=D.map(function(e){return e.components=(0,i.Z)(e.components).sort(function(e,n){return e.model.name.localeCompare(n.model.name)}),e}),q=(D||[]).map(function(e){return e.components}).flat(),U=q.length,Y=(0,l.useState)(),G=Y[0],J=Y[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c(),{children:(0,r.jsx)("title",{children:"Slices - Slice Machine"})}),(0,r.jsxs)(p.LN,{children:[(0,r.jsxs)(p.wd,{children:[(0,r.jsx)(p.Cx,{folder:"Slices"}),(null==H?void 0:H.length)!==0&&0!==U?(0,r.jsx)(p.K2,{children:(0,r.jsx)(o.zx,{"data-cy":"create-slice",onClick:function(){B(!0)},startIcon:"add",children:"Create"})}):void 0]}),(0,r.jsxs)(p.RN,{children:[(0,r.jsx)(s.xR,{sx:{display:"flex",flexDirection:"column"},children:X.length>0?(0,r.jsx)(u.kC,{sx:{flex:1,flexDirection:"column"},children:0===U?(0,r.jsx)(u.kC,{sx:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,r.jsx)(g,{title:"What are Slices?",onCreateNew:function(){B(!0)},buttonText:"Create one",videoPublicIdUrl:h.rd,documentationComponent:(0,r.jsxs)(r.Fragment,{children:['Slices are sections of your website. Prismic documents contain a dynamic "Slice Zone" that allows content creators to add, edit, and rearrange Slices to compose dynamic layouts for any page design.'," ",(0,r.jsx)(u.rU,{target:"_blank",href:"https://prismic.io/docs/core-concepts/slices",sx:function(e){var n;return{color:null==e?void 0:null===(n=e.colors)||void 0===n?void 0:n.primary}},children:"Learn more"}),"."]})})}):X.map(function(e){var n=e.name,t=e.isLocal,i=e.components;return(0,r.jsxs)(u.kC,{sx:{flexDirection:"column","&:not(:last-of-type)":{mb:4}},children:[(0,r.jsxs)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,r.jsx)(u.kC,{sx:{alignItems:"center",fontSize:3,lineHeight:"48px",fontWeight:"heading",mb:1},children:(0,r.jsx)(u.xv,{children:n})}),!t&&(0,r.jsx)("p",{children:"⚠️ External libraries are read-only"})]}),(0,r.jsx)(v.Z,{elems:i,defineElementKey:function(e){return e.model.name},renderElem:function(e){return(0,r.jsx)(T.B,{action:{type:"menu",onRemove:function(){J(e),L()},onRename:function(){J(e),w()}},isDeletedSlice:!1,onUpdateScreenshot:function(){P({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},slice:e})},gridGap:"32px 16px"})]},n)})}):void 0}),(null==H?void 0:H.length)>0&&(0,r.jsx)(j.Z,{slices:R(q),defaultVariationSelector:O}),(null==H?void 0:H.length)>0&&K&&(0,r.jsx)(x.c,{localLibraries:H,remoteSlices:A,onSuccess:function(e,n){var t=e.variations[0].id,i=z.Y.getBuilderPagePathname({libraryName:n,sliceName:e.name,variationId:t});C.push(i),m.Am.success((0,F.kQ)({path:"".concat(n,"/").concat(e.name,"/model.json")}))},onClose:function(){B(!1)}}),(0,r.jsx)(I,{sliceId:null!==(e=null==G?void 0:G.model.id)&&void 0!==e?e:"",sliceName:null!==(n=null==G?void 0:G.model.name)&&void 0!==n?n:"",libName:null!==(t=null==G?void 0:G.from)&&void 0!==t?t:"","data-cy":"rename-slice-modal"}),(0,r.jsx)(M,{sliceId:null!==(a=null==G?void 0:G.model.id)&&void 0!==a?a:"",sliceName:null!==(y=null==G?void 0:G.model.name)&&void 0!==y?y:"",libName:null!==(b=null==G?void 0:G.from)&&void 0!==b?b:""})]})]})]})}},76473:function(e,n,t){"use strict";t.d(n,{y1:function(){return g}});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"],l={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 a(e){return(l[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function c(e,n){return void 0===n&&(n=","),e.split(n)}function s(e,n,t){void 0===n&&(n="+");var i,l=e.toLocaleLowerCase().split(n).map(function(e){return a(e)});return r({},{alt:l.includes("alt"),ctrl:l.includes("ctrl")||l.includes("control"),shift:l.includes("shift"),meta:l.includes("meta"),mod:l.includes("mod")},{keys:l.filter(function(e){return!o.includes(e)}),description:t})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&f([a(e.key),a(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&m([a(e.key),a(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){u.clear()});var u=new Set;function d(e){return Array.isArray(e)}function f(e){var n=Array.isArray(e)?e:[e];u.has("meta")&&u.forEach(function(e){var n;return!o.includes(e)&&u.delete(e.toLowerCase())}),n.forEach(function(e){return u.add(e.toLowerCase())})}function m(e){var n=Array.isArray(e)?e:[e];"meta"===e?u.clear():n.forEach(function(e){return u.delete(e.toLowerCase())})}function h(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 p=function(e,n,t){void 0===t&&(t=!1);var i,r,o=n.alt,l=n.meta,c=n.mod,s=n.shift,f=n.ctrl,m=n.keys,h=e.key,p=e.code,x=e.ctrlKey,v=e.metaKey,y=e.shiftKey,b=e.altKey,g=a(p),j=h.toLowerCase();if(!t){if(!b===o&&"alt"!==j||!y===s&&"shift"!==j)return!1;if(c){if(!v&&!x)return!1}else if(!v===l&&"meta"!==j&&"os"!==j||!x===f&&"ctrl"!==j&&"control"!==j)return!1}return!!(m&&1===m.length&&(m.includes(j)||m.includes(g)))||(m?(void 0===r&&(r=","),(d(i=m)?i:i.split(r)).every(function(e){return u.has(e.trim().toLowerCase())})):!m)},x=(0,i.createContext)(void 0),v=(0,i.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),y=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},b="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function g(e,n,t,r){var o,l,u=(0,i.useRef)(null),g=(0,i.useRef)(!1),j=t instanceof Array?r instanceof Array?void 0:r:t,S=d(e)?e.join(null==j?void 0:j.splitKey):e,C=t instanceof Array?t:r instanceof Array?r:void 0,k=(0,i.useCallback)(n,null!=C?C:[]),w=(0,i.useRef)(k);C?w.current=k:w.current=n;var L=(!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}((l=(0,i.useRef)(void 0)).current,j)&&(l.current=j),l.current),N=(0,i.useContext)(v).enabledScopes,E=(0,i.useContext)(x);return b(function(){if((null==L?void 0:L.enabled)!==!1&&(e=N,n=null==L?void 0:L.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),!(h(e,["input","textarea","select"])&&!h(e,null==L?void 0:L.enableOnFormTags)||null!=L&&null!=L.ignoreEventWhen&&L.ignoreEventWhen(e))){if(null!==u.current&&document.activeElement!==u.current&&!u.current.contains(document.activeElement)){y(e);return}(null==(t=e.target)||!t.isContentEditable||null!=L&&L.enableOnContentEditable)&&c(S,null==L?void 0:L.splitKey).forEach(function(t){var i,r,o,l,a,c,u,d=s(t,null==L?void 0:L.combinationKey);if(p(e,d,null==L?void 0:L.ignoreModifiers)||null!=(u=d.keys)&&u.includes("*")){if(n&&g.current)return;if(i=e,r=d,("function"==typeof(o=null==L?void 0:L.preventDefault)&&o(i,r)||!0===o)&&i.preventDefault(),l=e,a=d,"function"==typeof(c=null==L?void 0:L.enabled)?!c(l,a):!0!==c&&void 0!==c){y(e);return}w.current(e,d),n||(g.current=!0)}})}},i=function(e){void 0!==e.key&&(f(a(e.code)),((null==L?void 0:L.keydown)===void 0&&(null==L?void 0:L.keyup)!==!0||null!=L&&L.keydown)&&t(e))},r=function(e){void 0!==e.key&&(m(a(e.code)),g.current=!1,null!=L&&L.keyup&&t(e,!0))},o=u.current||(null==j?void 0:j.document)||document;return o.addEventListener("keyup",r),o.addEventListener("keydown",i),E&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return E.addHotkey(s(e,null==L?void 0:L.combinationKey,null==L?void 0:L.description))}),function(){o.removeEventListener("keyup",r),o.removeEventListener("keydown",i),E&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return E.removeHotkey(s(e,null==L?void 0:L.combinationKey,null==L?void 0:L.description))})}}},[S,L,N]),u}}},function(e){e.O(0,[789,97,590,573,774,888,179],function(){return e(e.s=26688)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{74600:function(e,n,t){var i=t(34311),r=t(23779),o=i(function(e,n,t){return e+(t?" ":"")+r(n)});e.exports=o},26688:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices",function(){return t(12472)}])},45466:function(e,n,t){"use strict";t.d(n,{c:function(){return j}});var i=t(22710),r=t(62230),o=t(85244),l=t(99267),a=t(52322),c=t(75289),s=t(2784),u=t(36131),d=t(68780),f=t(88932),m=t(38876),h=t(40147),p=t(82770);function x(){return(x=(0,i.Z)(function(e){var n,t,i,r,o,a,c;return(0,l.__generator)(this,function(l){switch(l.label){case 0:var s;return l.trys.push([0,3,,4]),n=e.sliceName,t=e.libraryName,i=e.onSuccess,s=n,r={id:(0,m.T3)(s),type:"SharedSlice",name:s,description:s,variations:[{id:v,name:(0,m.MP)(v),docURL:"...",version:"initial",description:(0,m.MP)(v),imageUrl:""},]},[4,h.j.slices.createSlice({libraryID:t,model:r})];case 1:if((o=l.sent().errors).length>0)throw o;return p.Xe.track({event:"slice:created",id:(0,m.MP)(n),name:n,library:t}),[4,i(r)];case 2:return l.sent(),[3,4];case 3:return a=l.sent(),c="Internal Error: Slice not created",console.error(c,a),f.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var v="default",y=t(90374),b=t(66443),g=t(70041),j=function(e){var n,t=e.onClose,f=e.onSuccess,m=e.localLibraries,h=e.remoteSlices,v=(0,y.Z)().createSliceSuccess,j=(0,s.useState)(!1),S=j[0],C=j[1],k=(n=(0,i.Z)(function(e){var n,t;return(0,l.__generator)(this,function(r){switch(r.label){case 0:var o;return n=e.sliceName,t=e.from,C(!0),[4,function(e){return x.apply(this,arguments)}({sliceName:n,libraryName:t,onSuccess:(o=(0,i.Z)(function(e){var n;return(0,l.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,p.y0)()];case 1:return v(n.sent().libraries),[4,f(e,t)];case 2:return n.sent(),[2]}})}),function(e){return o.apply(this,arguments)})})];case 1:return r.sent(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,a.jsx)(d.Z,{dataCy:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:S,formId:"create-new-slice",close:t,buttonLabel:"Create",onSubmit:function(e){k(e)},initialValues:{sliceName:"",from:m[0].name},validate:function(e){return(0,b.h)(e,m,h)},content:{title:"Create a new slice"},children:function(e){var n=e.touched,t=e.values,i=e.setFieldValue,l=e.errors;return(0,a.jsxs)(c.xu,{children:[(0,a.jsx)(g.W,{name:"sliceName",label:"Slice Name",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:n.sliceName?l.sliceName:void 0,dataCy:"slice-name-input"}),(0,a.jsx)(c.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,a.jsx)(u.ZP,{name:"from",options:m.map(function(e){return{value:e.name,label:e.name}}),onChange:function(e){return e?void i("from",e.value):null},defaultValue:{value:t.from,label:t.from},styles:{option:function(e){return(0,o.Z)((0,r.Z)({},e),{color:"#161618"})}},theme:function(e){return(0,o.Z)((0,r.Z)({},e),{colors:(0,o.Z)((0,r.Z)({},e.colors),{primary:"#E9E8EA"})})},menuPortalTarget:document.body})]})}})}},70041:function(e,n,t){"use strict";t.d(n,{W:function(){return a}});var i=t(62230),r=t(52322);t(2784);var o=t(63397),l=t(75289),a=function(e){var n=e.name,t=e.label,a=e.placeholder,c=e.error,s=e.dataCy,u=e.onChange;return(0,r.jsxs)(l.xu,{mb:3,children:[(0,r.jsx)(l.__,{htmlFor:n,mb:2,children:t}),(0,r.jsx)(o.gN,(0,i.Z)({name:n,type:"text",placeholder:a,as:l.II,autoComplete:"off"},u?{onChange:u}:null,s?{"data-cy":s}:null)),c?(0,r.jsx)(l.xv,{"data-cy":s?"".concat(s,"-error"):"input-error",sx:{color:"error",mt:1},children:c}):null]})}},66443:function(e,n,t){"use strict";t.d(n,{h:function(){return s}});var i=t(81541),r=t(75329),o=t(96009),l=t.n(o),a=t(74600),c=t.n(a);function s(e,n,t){var o=e.sliceName;if(!o)return{sliceName:"Cannot be empty"};if(!r.xo.exec(o))return{sliceName:"No special characters allowed"};if(c()(l()(o)).replace(/\s/gm,"")!==o.trim())return{sliceName:"Value has to be PascalCased"};if(o.match(/^\d/))return{sliceName:"Value cannot start with a number"};if(r.lS.includes(o))return{sliceName:"".concat(o," is reserved for Slice Machine use")};var a=n.flatMap(function(e){return e.components.map(function(e){return e.model.name})}),s=t.map(function(e){return e.name});if((0,i.Z)(a).concat((0,i.Z)(s)).includes(o))return{sliceName:"Slice name is already taken."}}},68780:function(e,n,t){"use strict";var i=t(62230),r=t(85244),o=t(52322),l=t(37149),a=t.n(l),c=t(25812),s=t(63397),u=t(75289),d=t(56577),f=t(54132);n.Z=function(e){var n=e.children,t=e.close,l=e.isOpen,m=e.formId,h=e.validate,p=e.onSubmit,x=e.widthInPx,v=e.initialValues,y=e.content.title,b=e.cardProps,g=e.omitFooter,j=void 0!==g&&g,S=e.isLoading,C=void 0!==S&&S,k=e.buttonLabel,w=void 0===k?"Save":k,L=e.dataCy,N=e.actionMessage;return a().setAppElement("#__next"),(0,o.jsx)(c.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:y,style:{content:{width:null!=x?x:"900px"}},children:(0,o.jsx)(s.J9,{validateOnChange:!0,initialValues:v,validate:function(e){return h?h(e):void 0},onSubmit:function(e){p(e)},children:function(e){var l=e.isValid,a=e.isSubmitting,c=e.values,h=e.errors,p=e.touched,x=e.setFieldValue,v=e.setValues;return(0,o.jsx)(s.l0,(0,r.Z)((0,i.Z)({id:m},null!=L?{"data-cy":L}:null),{children:(0,o.jsx)(f.Z,(0,r.Z)((0,i.Z)({borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"}},b),{Header:function(e){var n=e.radius;return(0,o.jsxs)(u.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",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)}},children:[(0,o.jsx)(u.X6,{sx:{fontSize:"20px"},children:y}),(0,o.jsx)(u.x8,{type:"button",onClick:t})]})},Footer:j?null:(0,o.jsxs)(u.kC,{sx:{alignItems:"space-between"},children:[(0,o.jsx)(u.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof N?N(e):N}),(0,o.jsxs)(u.kC,{sx:{ml:"auto"},children:[(0,o.jsx)(u.zx,{mr:2,type:"button",onClick:t,variant:"secondary",disabled:a||C,children:"Cancel"}),(0,o.jsx)(d.z,{label:w,form:m,type:"submit",disabled:!l||a||C,isLoading:a||C,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:n({isValid:l,isSubmitting:a,values:c,errors:h,touched:p,setFieldValue:x,setValues:v})}))}))}})})}},12472:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return V}});var i=t(81541),r=t(52322),o=t(71651),l=t(2784),a=t(97729),c=t.n(a),s=t(65077),u=t(75289),d=t(56580),f=t(5632),m=t(88932),h=t(75329),p=t(25251),x=t(45466),v=t(59469),y=t(36887),b=t(82770),g=function(e){var n=e.title,t=e.onCreateNew,i=e.buttonText,o=e.documentationComponent,l=e.videoPublicIdUrl;return(0,r.jsxs)(u.xu,{sx:{display:"flex",width:"80%",flexWrap:"wrap",justifyContent:"center"},children:[(0,r.jsx)(u.xu,{sx:function(e){var n;return{display:"flex",flex:1,alignItems:"center",minWidth:"400px",maxWidth:"70%",border:"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.grey02)}},children:(0,r.jsx)(y.nk,{cloudName:"dmtf1daqp",controls:!0,loop:!0,style:{maxWidth:"100%",objectFit:"contain"},publicId:l,onPlay:function(){b.Xe.track({event:"open-video-tutorials",video:l})}})}),(0,r.jsxs)(u.xu,{sx:function(e){var n;return{bg:"white",display:"flex",flexDirection:"column",border:"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.grey02),flex:1,minWidth:"400px",maxWidth:"70%"}},children:[(0,r.jsxs)(u.xu,{sx:function(e){var n;return{display:"flex",flexDirection:"column",p:4,borderBottom:"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.grey02)}},children:[(0,r.jsx)(u.X6,{as:"h3",variant:"heading",sx:{fontSize:"16px",lineHeight:"24px",mb:2},children:n}),(0,r.jsx)(u.xv,{variant:"xs",sx:{lineHeight:"24px",fontSize:"13px"},children:o})]}),(0,r.jsxs)(u.xu,{sx:{display:"flex",p:4,alignItems:"center"},children:[(0,r.jsx)(u.zx,{onClick:t,"data-cy":"empty-state-main-button",sx:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0,mr:4},children:i}),(0,r.jsx)(u.xv,{sx:{fontSize:"12px",color:"grey04",maxWidth:"280px"},children:"It will be stored locally and you will be able to push it to your repository"})]})]})]})},j=t(84449),S=t(90374),C=t(68780),k=t(70041),w=t(77174),L=t(24340),N=t(75992),E=t(66443),I=function(e){var n=e.sliceName,t=e.sliceId,i=e.libName,o=(0,S.Z)(),l=o.renameSlice,a=o.closeModals,c=(0,d.v9)(function(e){return{isRenameSliceModalOpen:(0,w.gP)(e,L.q.RENAME_SLICE),localLibs:(0,N.Sd)(e),remoteLibs:(0,N.sT)(e)}}),s=c.isRenameSliceModalOpen,f=c.localLibs,m=c.remoteLibs,h=function(e){l(i,t,e.sliceName)};return(0,r.jsx)(C.Z,{dataCy:"rename-slice-modal",isOpen:s,widthInPx:"530px",formId:"rename-slice-modal-".concat(t),close:a,buttonLabel:"Rename",onSubmit:h,initialValues:{sliceName:n},content:{title:"Rename a slice"},validate:function(e){return(0,E.h)(e,f,m)},children:function(e){var n=e.touched,t=e.errors;return(0,r.jsx)(u.xu,{children:(0,r.jsx)(k.W,{name:"sliceName",label:"Slice Name","data-cy":"slice-name-input",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:n.sliceName?t.sliceName:void 0,dataCy:"slice-name-input"})})}})},Z=t(25812),P=t(59326),R=t(54132),O=t(65186),_=t(56577),A=t(3098),D=t(32665),M=function(e){var n=e.sliceId,t=e.sliceName,i=e.libName,o=(0,d.v9)(function(e){return{isSliceModalOpen:(0,w.gP)(e,L.q.DELETE_SLICE),isDeletingSlice:(0,D.hg)(e,A.z.DELETE_SLICE)}}),l=o.isSliceModalOpen,a=o.isDeletingSlice,c=(0,S.Z)(),s=c.closeModals,f=c.deleteSlice,m=(0,P.B7)().theme;return(0,r.jsx)(Z.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:s,children:(0,r.jsx)(R.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none"},borderFooter:!0,Header:function(){var e;return(0,r.jsxs)(u.kC,{sx:{position:"sticky",background:"gray",top:0,zIndex:1,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.jsxs)(u.kC,{sx:{alignItems:"center"},children:[(0,r.jsx)(O.$vK,{size:20,color:null===(e=m.colors)||void 0===e?void 0:e.greyIcon}),(0,r.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Delete Slice"})]}),(0,r.jsx)(u.x8,{type:"button",onClick:s})]})},Footer:function(){return(0,r.jsxs)(u.kC,{sx:{justifyContent:"flex-end",height:64,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:"gray"},children:[(0,r.jsx)(_.z,{label:"Cancel",variant:"secondary",onClick:function(){return s()},sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,r.jsx)(_.z,{label:"Delete",variant:"danger",isLoading:a,sx:{minHeight:39,minWidth:78},onClick:function(){return f(n,t,i)}})]})},children:(0,r.jsxs)(u.nv,{children:["This action will immediately make the following changes:",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:["Delete the"," ",(0,r.jsxs)(u.xv,{sx:{fontWeight:"bold"},children:[i,"/",t,"/"]})," ","directory."]}),(0,r.jsx)("li",{children:"Remove the Slice from all Slice Zones that use it."})]}),"The next time you push your changes to Prismic, the following change will happen:",(0,r.jsx)("ul",{children:(0,r.jsx)("li",{children:"Remove the Slice from the list of available Slices to use in the Page Builder."})}),"You will need to manually remove the Slice from any Pages that currently use it."]})})})},W=t(47731),T=t(82131),z=t(49451),F=t(13858),V=function(){var e,n,t,a,y,b,C=(0,f.useRouter)(),k=(0,S.Z)(),w=k.openRenameSliceModal,L=k.openDeleteSliceModal,E=(0,W.H)(),Z=E.modalPayload,P=E.onOpenModal,R=Z.sliceFilterFn,O=Z.defaultVariationSelector,_=(0,d.v9)(function(e){return{remoteSlices:(0,N.sT)(e),libraries:(0,N.Sd)(e)}}),A=_.remoteSlices,D=_.libraries,V=(0,l.useState)(!1),K=V[0],B=V[1],H=D.filter(function(e){return e.isLocal}),X=D.map(function(e){return e.components=(0,i.Z)(e.components).sort(function(e,n){return e.model.name.localeCompare(n.model.name)}),e}),q=(D||[]).map(function(e){return e.components}).flat(),U=q.length,Y=(0,l.useState)(),G=Y[0],J=Y[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c(),{children:(0,r.jsx)("title",{children:"Slices - Slice Machine"})}),(0,r.jsxs)(p.LN,{children:[(0,r.jsxs)(p.wd,{children:[(0,r.jsx)(p.Cx,{folder:"Slices"}),(null==H?void 0:H.length)!==0&&0!==U?(0,r.jsx)(p.K2,{children:(0,r.jsx)(o.zx,{"data-cy":"create-slice",onClick:function(){B(!0)},startIcon:"add",children:"Create"})}):void 0]}),(0,r.jsxs)(p.RN,{children:[(0,r.jsx)(s.xR,{sx:{display:"flex",flexDirection:"column"},children:X.length>0?(0,r.jsx)(u.kC,{sx:{flex:1,flexDirection:"column"},children:0===U?(0,r.jsx)(u.kC,{sx:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,r.jsx)(g,{title:"What are Slices?",onCreateNew:function(){B(!0)},buttonText:"Create one",videoPublicIdUrl:h.rd,documentationComponent:(0,r.jsxs)(r.Fragment,{children:['Slices are sections of your website. Prismic documents contain a dynamic "Slice Zone" that allows content creators to add, edit, and rearrange Slices to compose dynamic layouts for any page design.'," ",(0,r.jsx)(u.rU,{target:"_blank",href:"https://prismic.io/docs/core-concepts/slices",sx:function(e){var n;return{color:null==e?void 0:null===(n=e.colors)||void 0===n?void 0:n.primary}},children:"Learn more"}),"."]})})}):X.map(function(e){var n=e.name,t=e.isLocal,i=e.components;return(0,r.jsxs)(u.kC,{sx:{flexDirection:"column","&:not(:last-of-type)":{mb:4}},children:[(0,r.jsxs)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,r.jsx)(u.kC,{sx:{alignItems:"center",fontSize:3,lineHeight:"48px",fontWeight:"heading",mb:1},children:(0,r.jsx)(u.xv,{children:n})}),!t&&(0,r.jsx)("p",{children:"⚠️ External libraries are read-only"})]}),(0,r.jsx)(v.Z,{elems:i,defineElementKey:function(e){return e.model.name},renderElem:function(e){return(0,r.jsx)(T.B,{action:{type:"menu",onRemove:function(){J(e),L()},onRename:function(){J(e),w()}},isDeletedSlice:!1,onUpdateScreenshot:function(){P({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},slice:e})},gridGap:"32px 16px"})]},n)})}):void 0}),(null==H?void 0:H.length)>0&&(0,r.jsx)(j.Z,{slices:R(q),defaultVariationSelector:O}),(null==H?void 0:H.length)>0&&K&&(0,r.jsx)(x.c,{localLibraries:H,remoteSlices:A,onSuccess:function(e,n){var t=e.variations[0].id,i=z.Y.getBuilderPagePathname({libraryName:n,sliceName:e.name,variationId:t});C.push(i),m.Am.success((0,F.kQ)({path:"".concat(n,"/").concat(e.name,"/model.json")}))},onClose:function(){B(!1)}}),(0,r.jsx)(I,{sliceId:null!==(e=null==G?void 0:G.model.id)&&void 0!==e?e:"",sliceName:null!==(n=null==G?void 0:G.model.name)&&void 0!==n?n:"",libName:null!==(t=null==G?void 0:G.from)&&void 0!==t?t:"","data-cy":"rename-slice-modal"}),(0,r.jsx)(M,{sliceId:null!==(a=null==G?void 0:G.model.id)&&void 0!==a?a:"",sliceName:null!==(y=null==G?void 0:G.model.name)&&void 0!==y?y:"",libName:null!==(b=null==G?void 0:G.from)&&void 0!==b?b:""})]})]})]})}},76473:function(e,n,t){"use strict";t.d(n,{y1:function(){return g}});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"],l={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 a(e){return(l[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function c(e,n){return void 0===n&&(n=","),e.split(n)}function s(e,n,t){void 0===n&&(n="+");var i,l=e.toLocaleLowerCase().split(n).map(function(e){return a(e)});return r({},{alt:l.includes("alt"),ctrl:l.includes("ctrl")||l.includes("control"),shift:l.includes("shift"),meta:l.includes("meta"),mod:l.includes("mod")},{keys:l.filter(function(e){return!o.includes(e)}),description:t})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&f([a(e.key),a(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&m([a(e.key),a(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){u.clear()});var u=new Set;function d(e){return Array.isArray(e)}function f(e){var n=Array.isArray(e)?e:[e];u.has("meta")&&u.forEach(function(e){var n;return!o.includes(e)&&u.delete(e.toLowerCase())}),n.forEach(function(e){return u.add(e.toLowerCase())})}function m(e){var n=Array.isArray(e)?e:[e];"meta"===e?u.clear():n.forEach(function(e){return u.delete(e.toLowerCase())})}function h(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 p=function(e,n,t){void 0===t&&(t=!1);var i,r,o=n.alt,l=n.meta,c=n.mod,s=n.shift,f=n.ctrl,m=n.keys,h=e.key,p=e.code,x=e.ctrlKey,v=e.metaKey,y=e.shiftKey,b=e.altKey,g=a(p),j=h.toLowerCase();if(!t){if(!b===o&&"alt"!==j||!y===s&&"shift"!==j)return!1;if(c){if(!v&&!x)return!1}else if(!v===l&&"meta"!==j&&"os"!==j||!x===f&&"ctrl"!==j&&"control"!==j)return!1}return!!(m&&1===m.length&&(m.includes(j)||m.includes(g)))||(m?(void 0===r&&(r=","),(d(i=m)?i:i.split(r)).every(function(e){return u.has(e.trim().toLowerCase())})):!m)},x=(0,i.createContext)(void 0),v=(0,i.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),y=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},b="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function g(e,n,t,r){var o,l,u=(0,i.useRef)(null),g=(0,i.useRef)(!1),j=t instanceof Array?r instanceof Array?void 0:r:t,S=d(e)?e.join(null==j?void 0:j.splitKey):e,C=t instanceof Array?t:r instanceof Array?r:void 0,k=(0,i.useCallback)(n,null!=C?C:[]),w=(0,i.useRef)(k);C?w.current=k:w.current=n;var L=(!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}((l=(0,i.useRef)(void 0)).current,j)&&(l.current=j),l.current),N=(0,i.useContext)(v).enabledScopes,E=(0,i.useContext)(x);return b(function(){if((null==L?void 0:L.enabled)!==!1&&(e=N,n=null==L?void 0:L.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),!(h(e,["input","textarea","select"])&&!h(e,null==L?void 0:L.enableOnFormTags)||null!=L&&null!=L.ignoreEventWhen&&L.ignoreEventWhen(e))){if(null!==u.current&&document.activeElement!==u.current&&!u.current.contains(document.activeElement)){y(e);return}(null==(t=e.target)||!t.isContentEditable||null!=L&&L.enableOnContentEditable)&&c(S,null==L?void 0:L.splitKey).forEach(function(t){var i,r,o,l,a,c,u,d=s(t,null==L?void 0:L.combinationKey);if(p(e,d,null==L?void 0:L.ignoreModifiers)||null!=(u=d.keys)&&u.includes("*")){if(n&&g.current)return;if(i=e,r=d,("function"==typeof(o=null==L?void 0:L.preventDefault)&&o(i,r)||!0===o)&&i.preventDefault(),l=e,a=d,"function"==typeof(c=null==L?void 0:L.enabled)?!c(l,a):!0!==c&&void 0!==c){y(e);return}w.current(e,d),n||(g.current=!0)}})}},i=function(e){void 0!==e.key&&(f(a(e.code)),((null==L?void 0:L.keydown)===void 0&&(null==L?void 0:L.keyup)!==!0||null!=L&&L.keydown)&&t(e))},r=function(e){void 0!==e.key&&(m(a(e.code)),g.current=!1,null!=L&&L.keyup&&t(e,!0))},o=u.current||(null==j?void 0:j.document)||document;return o.addEventListener("keyup",r),o.addEventListener("keydown",i),E&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return E.addHotkey(s(e,null==L?void 0:L.combinationKey,null==L?void 0:L.description))}),function(){o.removeEventListener("keyup",r),o.removeEventListener("keydown",i),E&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return E.removeHotkey(s(e,null==L?void 0:L.combinationKey,null==L?void 0:L.description))})}}},[S,L,N]),u}}},function(e){e.O(0,[789,590,573,774,888,179],function(){return e(e.s=26688)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._1k08lzu3{height:calc(var(--_7j49md3f) - var(--_7j49mdh))}._1k08lzu5{height:calc(var(--_7j49md34) - var(--_7j49md30));width:calc(var(--_7j49md34) - var(--_7j49md30))}._1k08lzu7{box-shadow:inset 0 calc(-1 * var(--_7j49mdh)) 0 0 var(--_7j49md1a);height:calc(var(--_7j49md3f) - var(--_7j49mdh));-ms-overflow-style:none;scrollbar-width:none}._1k08lzu7::-webkit-scrollbar{display:none}._1k08lzu3+._1k08lzu6>._1k08lzu7{padding-top:var(--_7j49mdh)}._1k08lzu8:last-child:before,:not(:is(:focus,:hover,[data-state=active]))+._1k08lzu8:before{content:"";background-color:var(--_7j49md1b);bottom:var(--_7j49md3w);height:var(--_7j49md3b);left:calc(-1 * var(--_7j49md3s));position:absolute;width:var(--_7j49mdh)}._1k08lzu9{max-width:256px}._1k08lzu9[data-state=active]{color:var(--_7j49md1g)}._1k08lzu9:is(:focus,:hover,[data-state=active]):before{content:"";background-color:var(--
|
|
1
|
+
._1k08lzu3{height:calc(var(--_7j49md3f) - var(--_7j49mdh))}._1k08lzu5{height:calc(var(--_7j49md34) - var(--_7j49md30));width:calc(var(--_7j49md34) - var(--_7j49md30))}._1k08lzu7{box-shadow:inset 0 calc(-1 * var(--_7j49mdh)) 0 0 var(--_7j49md1a);height:calc(var(--_7j49md3f) - var(--_7j49mdh));-ms-overflow-style:none;scrollbar-width:none}._1k08lzu7::-webkit-scrollbar{display:none}._1k08lzu3+._1k08lzu6>._1k08lzu7{padding-top:var(--_7j49mdh)}._1k08lzu8:last-child:before,:not(:is(:focus,:hover,[data-state=active]))+._1k08lzu8:before{content:"";background-color:var(--_7j49md1b);bottom:var(--_7j49md3w);height:var(--_7j49md3b);left:calc(-1 * var(--_7j49md3s));position:absolute;width:var(--_7j49mdh)}._1k08lzu9{max-width:256px}._1k08lzu9[data-state=active]{color:var(--_7j49md1g)}._1k08lzu9:is(:focus,:hover,[data-state=active]):before{content:"";background-color:var(--_7j49md16);border-color:var(--_7j49md1a);border-top-left-radius:var(--_7j49md7);border-top-right-radius:var(--_7j49md7);border-style:var(--_7j49mdf) var(--_7j49mdf) var(--_7j49mdd);border-width:var(--_7j49mdh);box-sizing:border-box;height:calc(var(--_7j49md3l) + var(--_7j49mdh));left:calc(-1 * var(--_7j49mdh));position:absolute;top:calc(-1 * var(--_7j49mdh));width:calc(var(--_7j49md3l) + var(--_7j49mdh))}._1k08lzub{margin-right:calc(-1 * var(--_7j49md3w))}:is(:focus,:hover,[data-state=active])>._1k08lzub{visibility:visible}._1k08lzub:has(>[data-state=open]){visibility:visible}._1k08lzuc{box-shadow:inset 0 calc(-1 * var(--_7j49mdh)) 0 0 var(--_7j49md1a),0 calc(-1 * var(--_7j49mdh)) 0 0 var(--_7j49md17)}._2a96i70:last-child>._2a96i71{border-bottom-color:var(--_7j49md2g)}._18bjhbz0{max-width:498px;min-height:400px;background-color:var(--_7j49md15)}._18bjhbz1{background-size:cover;background-color:transparent;border-radius:var(--_7j49md3);border-style:var(--_7j49mdd);height:100%;max-width:100%}._18bjhbz1 ._18bjhbz3{padding:64px}._18bjhbz4{font-size:18px;font-weight:600;line-height:32px}._18bjhbz5{font-weight:400;line-height:24px}._18bjhbz1 ._18bjhbz5{max-width:464px;align-self:center}._18bjhbz1 ._18bjhbz6{justify-content:center}.kedahr2{height:240px}.kedahr3{height:320px}.kedahr6:focus-visible{box-shadow:0 0 0 4px rgba(123,101,220,.1)}.kedahr6[data-disabled]{opacity:var(--_7j49md2v)}.kedahr6:not([data-disabled]){cursor:var(--_7j49md2j)}.kedahr7{order:0}.kedahr4>.kedahr7{padding:calc(var(--_7j49md41) - var(--_7j49mdh))}.kedahr5>.kedahr7{background-color:var(--_7j49md17);margin-inline:calc(var(--_7j49md3z) - var(--_7j49mdh));margin-top:calc(var(--_7j49md3z) - var(--_7j49mdh));padding:var(--_7j49md3z)}.kedahr9:not([src]){visibility:hidden}.kedahra:before{content:"";background-color:var(--_7j49md1g);inset:var(--_7j49md3r);opacity:var(--_7j49md2t);position:absolute}.kedahr6:focus-visible .kedahra,.kedahr6:not([data-disabled]) .kedahr7:hover>.kedahra{visibility:visible}.kedahr6:not([data-disabled]) .kedahra:has(:focus-visible){visibility:visible}.kedahr4>.kedahrb{background-color:var(--_7j49md15)}.kedahr4>.kedahrb:not(:first-child){border-top-color:var(--_7j49md1a);border-top-style:inherit;border-top-width:inherit}.kedahrc{order:1}.kedahr4>.kedahrc{padding-left:calc(var(--_7j49md3y) - var(--_7j49mdh));padding-right:calc(var(--_7j49md3w) - var(--_7j49mdh))}.kedahr5>.kedahrc{padding-inline:calc(var(--_7j49md3z) - var(--_7j49mdh))}.kedahrd{order:2}.kedahr4>.kedahrd{padding-inline:calc(var(--_7j49md3y) - var(--_7j49mdh))}.kedahr5>.kedahrd{padding-inline:calc(var(--_7j49md3z) - var(--_7j49mdh))}.kedahre{margin-bottom:calc((1.5rem - 1rem) / 2)}.kedahrf{background-color:#ebe7fe;color:#5746af}._76k20u4:not(:last-child){margin-right:var(--_7j49md3z)}._76k20u4[data-state=active]{box-shadow:inset 0 -1px 0 0 currentColor,0 1px 0 0 currentColor;color:var(--_7j49md2a)}._76k20u5{line-height:32px}._76k20u6{flex:1 1}._76k20u6[data-state=inactive]{display:none}._8uty130{line-height:32px}._3uvawd0{grid-area:content;overflow:hidden}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,e,a,t,i,b,n,l,u,f,h){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,i,b,"static/chunks/pages/index-9955410413a4598b.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-11c9e241f5a8a4cb.js"],"/changes":[c,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",e,a,"static/css/f585032018f6024b.css","static/chunks/pages/changes-e58a6f4217ec2d9e.js"],"/custom-types":[s,i,b,"static/chunks/pages/custom-types-78e57821222c9603.js"],"/custom-types/[customTypeId]":[n,s,e,t,l,u,"static/chunks/pages/custom-types/[customTypeId]-57edaacb81e17a44.js"],"/page-types/[pageTypeId]":[n,s,e,t,l,u,"static/chunks/pages/page-types/[pageTypeId]-c62f5c1608ce3af3.js"],"/slices":[c,e,a,"static/css/22d69420bda374a7.css","static/chunks/pages/slices-b686960d7d228e36.js"],"/slices/[lib]/[sliceName]/[variation]":[c,f,a,t,"static/css/d4b59834999106a5.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-5b6c6912b66de61f.js"],"/slices/[lib]/[sliceName]/[variation]/screenshot":[h,"static/chunks/pages/slices/[lib]/[sliceName]/[variation]/screenshot-76d40513025fd76d.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[c,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-1bb05c8aa7db2bc2.js",h,f,"static/chunks/113-34b6cf41a62f08ce.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-37ba73cd3c821e04.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/screenshot","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/799-5c13484e9f945e5d.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/590-ab38d53732035bf0.js","static/chunks/573-8678a91b09707f5d.js","static/chunks/377-96290662f5b987a1.js","static/chunks/840-d84a2655185995ce.js","static/css/26b51745402a92af.css","static/chunks/125-84464edfe25651eb.js","static/chunks/933-0fa0258a770c787d.js","static/css/7aca5b80aec5d9fd.css","static/chunks/909-e4eec905c21ad8ad.js","static/chunks/746-2ca4784811bde7c1.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
package/out/changelog.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.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"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.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-87d3995db23544c1.js" defer=""></script><script src="/_next/static/chunks/870-0c7a8a9622de78b7.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-11c9e241f5a8a4cb.js" defer=""></script><script src="/_next/static/ffkR0-mMg1TzZjSy6bDqL/_buildManifest.js" defer=""></script><script src="/_next/static/ffkR0-mMg1TzZjSy6bDqL/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"ffkR0-mMg1TzZjSy6bDqL","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"appGip":true,"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"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f585032018f6024b.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f585032018f6024b.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"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f585032018f6024b.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f585032018f6024b.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-87d3995db23544c1.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/918-38d08f1e885b222d.js" defer=""></script><script src="/_next/static/chunks/590-ab38d53732035bf0.js" defer=""></script><script src="/_next/static/chunks/573-8678a91b09707f5d.js" defer=""></script><script src="/_next/static/chunks/pages/changes-e58a6f4217ec2d9e.js" defer=""></script><script src="/_next/static/ffkR0-mMg1TzZjSy6bDqL/_buildManifest.js" defer=""></script><script src="/_next/static/ffkR0-mMg1TzZjSy6bDqL/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"ffkR0-mMg1TzZjSy6bDqL","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><link rel="preload" href="/_next/static/css/7aca5b80aec5d9fd.css" as="style"/><link rel="stylesheet" href="/_next/static/css/7aca5b80aec5d9fd.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-87d3995db23544c1.js" defer=""></script><script src="/_next/static/chunks/125-84464edfe25651eb.js" defer=""></script><script src="/_next/static/chunks/799-5c13484e9f945e5d.js" defer=""></script><script src="/_next/static/chunks/590-ab38d53732035bf0.js" defer=""></script><script src="/_next/static/chunks/377-96290662f5b987a1.js" defer=""></script><script src="/_next/static/chunks/933-0fa0258a770c787d.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-57edaacb81e17a44.js" defer=""></script><script src="/_next/static/ffkR0-mMg1TzZjSy6bDqL/_buildManifest.js" defer=""></script><script src="/_next/static/ffkR0-mMg1TzZjSy6bDqL/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types/[customTypeId]","query":{},"buildId":"ffkR0-mMg1TzZjSy6bDqL","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
|