slice-machine-ui 1.12.1-dev-next-release.11 → 1.13.1-dev-next-release.0
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/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +7 -4
- package/out/404.html +1 -1
- package/out/[lib]/[sliceName]/[variation]/screenshot.html +1 -1
- package/out/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/[lib]/[sliceName]/[variation].html +1 -1
- package/out/_next/static/chunks/{18539003-b0b0df3d19f7d641.js → 18539003-a714ba731c9448b9.js} +22 -22
- package/out/_next/static/chunks/{377-53e916959dab47c4.js → 377-870ca4414847069f.js} +1 -1
- package/out/_next/static/chunks/{482-ad5ef8eecedd8b52.js → 482-a4c1c3721ca38516.js} +1 -1
- package/out/_next/static/chunks/780-643ae720f13fb3dc.js +1 -0
- package/out/_next/static/chunks/799-5ea3393033a9f617.js +1 -0
- package/out/_next/static/chunks/970-435552e338205936.js +1 -0
- package/out/_next/static/chunks/pages/[lib]/[sliceName]/[variation]/{simulator-2c6033d99c3672e0.js → simulator-4dcf33735c45c344.js} +1 -1
- package/out/_next/static/chunks/pages/[lib]/[sliceName]/{[variation]-bd1822e54ac8836c.js → [variation]-9fff494255e34c39.js} +1 -1
- package/out/_next/static/chunks/pages/{_app-33735b93b7516491.js → _app-8fd5890485cbd0e8.js} +93 -93
- package/out/_next/static/chunks/pages/{changelog-dda7774c702c6b47.js → changelog-c08cc37b54d73a60.js} +1 -1
- package/out/_next/static/chunks/pages/{changes-7a3c37a25631d524.js → changes-6a039e823313b41c.js} +1 -1
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-000131f34adb09ab.js → [customTypeId]-f8e48a51edbb5e1c.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-ef69705204e4ca4e.js → [pageTypeId]-ddc8d057c3e251d1.js} +1 -1
- package/out/_next/static/chunks/pages/{slices-0333a80308f2058b.js → slices-24d2714462334469.js} +1 -1
- package/out/_next/static/css/{05ee3752aba1232a.css → 2d1eda18406a9ff4.css} +1 -1
- package/out/_next/static/css/6b6c11ed1fffd3e0.css +1 -0
- package/out/_next/static/css/{8488e84efc1f7f54.css → d6e6d21ff661397d.css} +1 -1
- package/out/_next/static/css/{74653a9f89a68929.css → fe2a2a1cbf3b4092.css} +1 -1
- package/out/_next/static/iV9BjBEUYwiSwOLcxg-Zq/_buildManifest.js +1 -0
- package/out/blank-slate-slice-zone.png +0 -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.html +1 -1
- package/package.json +7 -7
- package/public/blank-slate-slice-zone.png +0 -0
- package/src/components/BlankSlate/BlankSlate.css.ts +2 -2
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +30 -49
- package/src/icons/LightningIcon3D.tsx +49 -0
- package/test/pages/custom-types.test.tsx +1 -2
- package/out/_next/static/-udlv5kaLl1vBp5vJn7KI/_buildManifest.js +0 -1
- package/out/_next/static/chunks/677-d8555c165c261511.js +0 -1
- package/out/_next/static/chunks/777-f3939ad859bb5375.js +0 -1
- package/out/_next/static/chunks/799-2ecedfb7a28f9844.js +0 -1
- package/out/_next/static/css/be974b8a064b90bc.css +0 -1
- /package/out/_next/static/{-udlv5kaLl1vBp5vJn7KI → iV9BjBEUYwiSwOLcxg-Zq}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[477],{37782:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changelog",function(){return r(57825)}])},57825:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return H}});var i,t,s=r(52322),o=r(97729),a=r.n(o),c=r(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[477],{37782:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/changelog",function(){return r(57825)}])},57825:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return H}});var i,t,s=r(52322),o=r(97729),a=r.n(o),c=r(10873),l=r(65077),d=r(75289),p=r(56580),x=r(39092),g=r(2784),h=r(62230),u=r(12170),f=function(e){var n=e.type,r=e.hasUpToDateVersions;return(0,s.jsx)(d.xv,{sx:(0,h.Z)({padding:"0px 4px",borderRadius:"2px",fontSize:"8px",fontWeight:600,lineHeight:"16px",textTransform:"uppercase"},(n===i.Latest||n===i.LatestNonBreaking)&&{bg:"grey02",color:"code.gray"},n===i.Current&&r&&{bg:"lightGreen",color:"code.green"},n===i.Current&&!r&&{bg:"lightOrange",color:"code.orange"}),children:n})},v=function(e){var n=e.isSelected,r=e.onClick,i=e.versionNumber,t=e.tags,o=e.hasUpToDateVersions;return(0,s.jsxs)(d.kC,{sx:(0,h.Z)({p:1,borderRadius:"4px",cursor:"pointer",transition:"200ms all",justifyContent:"space-between",alignItems:"center"},n?{color:"purple",bg:(0,u.DZ)("purple",.95)}:{"&:hover":{bg:"grey01"}}),onClick:r,children:[(0,s.jsx)(d.xv,{children:i}),(0,s.jsx)(d.kC,{sx:{gap:"8px"},children:t.map(function(e){return(0,s.jsx)(f,{type:e,hasUpToDateVersions:o},e)})})]})};(t=i||(i={})).Latest="LATEST",t.LatestNonBreaking="LATEST-NON-BREAKING",t.Current="CURRENT";var m=function(e){var n,r=e.changelog,t=e.selectedVersion,o=e.selectVersion,a=function(e){var n=[];return e===l?n.push(i.Latest):e===r.sliceMachine.latestNonBreakingVersion&&n.push(i.LatestNonBreaking),e===r.sliceMachine.currentVersion&&n.push(i.Current),n},l=null===(n=r.sliceMachine.versions[0])||void 0===n?void 0:n.versionNumber,p=!r.adapter.updateAvailable&&!r.sliceMachine.updateAvailable;return(0,s.jsxs)(d.kC,{sx:{minWidth:"228px",borderRight:"1px dashed",borderColor:c.TV.color.greyLight6,flexDirection:"column",paddingRight:"48px"},children:[(0,s.jsxs)(d.kC,{sx:{flexDirection:"column",borderBottom:"1px dashed",borderColor:c.TV.color.greyLight6,paddingBottom:"28px"},children:[(0,s.jsx)(d.xv,{sx:{fontSize:"20px",fontWeight:500,lineHeight:"32px"},children:"Changelog"}),(0,s.jsx)(d.xv,{sx:{fontSize:"16px",fontWeight:500,lineHeight:"24px",marginTop:"28px"},children:"All versions"})]}),(0,s.jsx)(d.kC,{sx:{mt:"24px",flexDirection:"column",gap:"4px",overflow:"auto"},children:r.sliceMachine.versions.map(function(e,n){return(0,s.jsx)(v,{isSelected:(null==t?void 0:t.versionNumber)===e.versionNumber,onClick:function(){return o(e)},versionNumber:e.versionNumber,tags:a(e.versionNumber),hasUpToDateVersions:p},"versionBadge-".concat(e.versionNumber,"-").concat(n))})})]})},b={MAJOR:"MAJOR",MINOR:"MINOR",PATCH:"PATCH",FIRST:"FIRST"},j=function(e){var n=e.versionKind,r=(0,h.Z)({fontSize:"14px",padding:"2px 4px",borderRadius:"4px",textTransform:"uppercase"},n===b.MAJOR?{color:"purple",bg:(0,u.DZ)("purple",.85)}:{color:"grey05",bg:"grey02"});return(0,s.jsx)(d.xv,{sx:r,children:n})},k=r(19870),C=function(e){var n=e.releaseNote;return(0,s.jsx)(d.xv,{sx:{"h1, h2, h3":{fontSize:"16px",fontWeight:600,lineHeight:"20px"},p:{fontSize:"14px",fontWeight:400,lineHeight:"20px"},b:{fontSize:"14px",fontWeight:600,lineHeight:"20px"},code:{color:"code.orange"},li:{listStyleType:"disc",marginLeft:"25px",paddingLeft:"5px"}},dangerouslySetInnerHTML:{__html:k.TU.parse(n)}})},N=r(951),T=r(8346),y=function(e){var n,r,i,t,o,a=e.changelog,c=e.selectedVersion,l=e.packageManager,p=c.versionNumber===a.sliceMachine.versions[0].versionNumber,x=(n={sliceMachineVersionToInstall:p?"latest":c.versionNumber,isLatestSliceMachineVersion:p,adapterName:a.adapter.name},r=n.sliceMachineVersionToInstall,i=n.isLatestSliceMachineVersion,t=n.adapterName,o=["slice-machine-ui@".concat(r)],i&&o.push("".concat(t,"@latest")),o),g=function(e,n){var r=n.join(" ");switch(e){case"bun":return"bun add --development ".concat(r);case"npm":return"npm install --save-dev ".concat(r);case"pnpm":case"pnpm@6":return"pnpm add --save-dev ".concat(r);case"yarn":case"yarn@berry":return"yarn add --dev ".concat(r)}}(l,x),h=a.adapter.updateAvailable&&!a.sliceMachine.updateAvailable;return(0,s.jsxs)(s.Fragment,{children:[h&&p&&(0,s.jsxs)(d.kC,{sx:{padding:"16px",bg:"lightOrange",color:"darkOrange",fontSize:"13px",lineHeight:"24px",borderRadius:"4px",gap:"16px"},children:[(0,s.jsx)(N.CSE,{size:"24px"}),"It looks like you are using an outdated version of the adapter. Run this command to update your adapter:"]}),(0,s.jsxs)(d.kC,{sx:{flexDirection:"column",gap:"16px",padding:"16px",bg:"grey01"},children:[(0,s.jsx)(d.xv,{sx:{fontSize:"16px",fontWeight:500,lineHeight:"20px"},children:"How to install"}),(0,s.jsxs)(d.kC,{sx:{gap:"8px"},children:[(0,s.jsx)(T.Z,{codeStyle:{color:"white",flex:1,padding:"8px"},sx:{flex:1},children:g}),(0,s.jsx)(d.zx,{variant:"secondary",onClick:function(){navigator.clipboard.writeText(g)},children:"Copy"})]})]})]})},S=function(){return(0,s.jsxs)("div",{children:["Could not fetch release notes."," ",(0,s.jsx)("a",{href:"https://github.com/prismicio/slice-machine/releases",target:"_blank",rel:"noopener noreferrer",children:"Find out more on GitHub"})]})},M=function(e){var n,r=e.changelog,i=e.selectedVersion,t=e.packageManager;return(0,s.jsxs)(d.kC,{sx:{flexDirection:"column"},children:[(0,s.jsxs)(d.kC,{sx:{padding:"0px 0px 32px 32px",borderBottom:"1px dashed",borderColor:c.TV.color.greyLight6,justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(d.xv,{sx:{fontSize:"24px",fontWeight:600,lineHeight:"32px"},children:"Version ".concat(i.versionNumber)}),!!i.kind&&(0,s.jsx)(j,{versionKind:i.kind})]}),(0,s.jsxs)(d.kC,{sx:{flexDirection:"column",padding:"24px 0px 0px 32px",gap:"24px"},children:[(null===(n=i.releaseNote)||void 0===n?void 0:n.includes("# Breaking Change"))&&(0,s.jsxs)(d.kC,{sx:{padding:"16px",bg:"lightOrange",color:"darkOrange",fontSize:"13px",lineHeight:"24px",borderRadius:"4px",gap:"16px"},"data-testid":"breaking-changes-warning",children:[(0,s.jsx)(N.CSE,{size:"24px"}),"This update includes breaking changes. To update correctly, follow the steps below."]}),(0,s.jsx)(y,{changelog:r,selectedVersion:i,packageManager:t}),(null==i?void 0:i.releaseNote)?(0,s.jsx)(C,{releaseNote:i.releaseNote}):(0,s.jsx)(S,{})]})]})},V=r(32665),L=r(3098),R=r(32038);function w(){var e=(0,p.v9)(function(e){return{changelog:(0,x.Sx)(e),packageManager:(0,x.Ak)(e),isChangelogLoading:(0,V.hg)(e,L.z.CHANGELOG)}}),n=e.changelog,r=e.packageManager,i=e.isChangelogLoading,t=n.sliceMachine.versions[0],o=(0,g.useState)(t||void 0),a=o[0],h=o[1];(0,g.useEffect)(function(){h(t)},[t]);var u=0===n.sliceMachine.versions.length||!a;return(0,s.jsx)(R.LN,{children:(0,s.jsx)(R.RN,{children:(0,s.jsx)(l.xR,{sx:{display:"flex",minWidth:0},children:i?(0,s.jsx)(c._3,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m,{changelog:n,selectedVersion:a,selectVersion:function(e){return h(e)}}),u?(0,s.jsx)(d.kC,{sx:{paddingLeft:"32px"},children:(0,s.jsx)(S,{})}):(0,s.jsx)(M,{changelog:n,selectedVersion:a,packageManager:r})]})})})})}function H(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a(),{children:(0,s.jsx)("title",{children:"Changelog - Slice Machine"})}),(0,s.jsx)(w,{})]})}}},function(e){e.O(0,[870,774,888,179],function(){return e(e.s=37782)}),_N_E=e.O()}]);
|
package/out/_next/static/chunks/pages/{changes-7a3c37a25631d524.js → changes-6a039e823313b41c.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 eu}});var s=t(52322),i=t(21658),r=t(2784),l=t(97729),o=t.n(l),c=t(65077),a=t(56580),d=t(32038),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(36882),p=t(39097),f=t.n(p),g=t(7819),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)(m.O,{modelType:"Custom Type",modelId:n.id,status:t,authStatus:i,isOnline:r,"data-for":"".concat(n.id,"-tooltip"),"data-tip":!0})})]})},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,g.TG)(e)?(0,s.jsx)(f(),{passHref:!0,href:j.cd[e.local.format].getBuilderPagePathname(e.local.id),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(31841),C=t(15996),S=t(84449),T=t(82223),D=t(47731),k=t(32681),O=function(e){var n=e.unSyncedCustomTypes,t=e.unSyncedSlices,i=e.modelsStatuses,r=e.authStatus,l=e.isOnline,o=(0,D.H)(),c=o.modalPayload,a=o.onOpenModal,d=c.sliceFilterFn,m=c.defaultVariationSelector,p=t.filter(function(e){return i.slices[e.model.id]!==k.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,T.c)(e)>0&&i.slices[e.model.id]!==k.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 a({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:"290px",defineElementKey:function(e){return e.model.name},renderElem:function(e){return C.M.render({showActions:!0,slice:e,wrapperType:i.slices[e.model.id]!==k.G.Deleted?_.WT.clickable:_.WT.nonClickable,StatusOrCustom:{status:i.slices[e.model.id],authStatus:r,isOnline:l},actions:{onUpdateScreenshot:function(n){n.preventDefault(),a({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})}}})}}),(0,s.jsx)(S.Z,{slices:d(p),defaultVariationSelector:m})]})]})},w=t(91914),N=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)(w.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"})]})})},R=t(90374),Z=function(){var e=(0,R.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"})]})})},E=t(5632),z=t.n(E),F=t(2754),I=t(34543),M=t(62230),W=t(85244),H=t(98240),P=t(6277);t(25977);var A={primary:"_1ecs97d74o _1ecs97d74p _1ecs97d74i _1ecs97d74j _1ecs97d74q _1ecs97d74r",secondary:"_1ecs97d6pe _1ecs97d6pf _1ecs97d6p8 _1ecs97d6p9 _1ecs97d6pg _1ecs97d6ph"},U={normal:"ovkapw1",smallBold:"ovkapw2",inherit:"ovkapw3 _1ecs97d9gi"},B=function(e){var n=e.children,t=e.color,l=e.endIcon,o=e.href,c=e.textVariant,a=void 0===c?"smallBold":c,d=(0,H.Z)(e,["children","color","endIcon","href","textVariant"]);return(0,s.jsxs)("a",(0,W.Z)((0,M.Z)({href:o,target:"_blank",rel:"noreferrer"},d),{className:(0,P.Z)("ovkapw0 _1ecs97d9bi _1ecs97d9gc _1ecs97d9bk _1ecs97d9bq",A[void 0===t?"primary":t]),children:[(0,s.jsx)(i.xv,{component:"span",color:"inherit",variant:a,children:n}),(0,r.isValidElement)(l)?(0,r.cloneElement)(l,{className:(0,P.Z)(l.props.className,"_1ecs97d9r7",U[a])}):null]}))},G=t(39092),V=function(){var e,n=(e=(0,a.v9)(function(e){return{repoName:(0,G.MY)(e)}}).repoName,"https://".concat(e,".prismic.io/documents/working"));return(0,s.jsxs)(F.R$,{style:{alignSelf:"center",marginTop:i.TV.size[72]},children:[(0,s.jsx)(F.u2,{children:(0,s.jsx)(i.Ee,{src:"/blank-slate-changes-uptodate.png",sizing:"cover"})}),(0,s.jsxs)(F.T9,{children:[(0,s.jsx)(F._T,{children:"Everything up-to-date"}),(0,s.jsx)(F.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)(F.Qj,{children:[(0,s.jsx)(i.zx,{onClick:function(){z().push("/")},children:"Create a page type"}),(0,s.jsx)(B,{endIcon:(0,s.jsx)(I.AlO,{}),textVariant:"normal",href:n,children:"Create content"})]})]})]})},Y=t(79096),q=t(85412),L=t(32665),X=t(3098),Q=t(56577),J=t(24340),$=t(77174),K=t(49471),ee=t(57282),en=t(78656),et=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"})]})},es=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 ",en.$[n].name({start:!1,plural:!1})]},t)]})},ei=t(79797),er=t(54132),el=function(e){var n=e.isOpen,t=e.title,i=e.footer,r=e.explanations,l=(0,R.Z)().closeModals;return(0,s.jsx)(ei.Z,{placement:"right",open:n,level:null,onClose:l,width:496,children:(0,s.jsx)(er.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})})},eo=function(e){var n=e.onToggle,t=e.isConfirmed,i=e.sx;return(0,s.jsxs)(u.kC,{sx:(0,M.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"]})]})},ec=function(e){var n=e.pushChanges,t=(0,r.useState)(!1),i=t[0],l=t[1],o=(0,a.v9)(function(e){return{isDeleteDocumentsDrawerOpen:(0,$.gP)(e,J.q.SOFT_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,K.Ch)(e).filter(g.yp),modalData:e.pushChanges}}),c=o.isDeleteDocumentsDrawerOpen,d=o.remoteOnlyCustomTypes,x=o.modalData,h=(0,R.Z)(),m=h.closeModals,p=h.openToaster;if(!c)return null;if((null==x?void 0:x.type)!=="SOFT")return p("No change data",ee.Jf.ERROR),null;var f=x.details.customTypes.map(function(e){var n,t=d.find(function(n){return(0,g.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(et,{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)(el,{isOpen:c,title:"Confirm deletion",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eo,{onToggle:function(){l(!i)},isConfirmed:i,sx:{mb:10}}),(0,s.jsx)(Q.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."]}),f]})})},ea=function(e){var n=e.pushChanges,t=(0,a.v9)(function(e){return{isDeleteDocumentsDrawerOpen:(0,$.gP)(e,J.q.HARD_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,K.Ch)(e).filter(g.yp),modalData:e.pushChanges}}),i=t.isDeleteDocumentsDrawerOpen,r=t.remoteOnlyCustomTypes,l=t.modalData,o=(0,R.Z)(),c=o.closeModals,d=o.openToaster;if(!i)return null;if((null==l?void 0:l.type)!=="HARD")return d("No change data",ee.Jf.ERROR),null;var x=l.details.customTypes.map(function(e){var n,t=r.find(function(n){return(0,g.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(et,{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)(el,{isOpen:i,title:"Manual action required",footer:(0,s.jsx)(Q.z,{label:"Try again",variant:"primary",onClick:function(){c(),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]})})},ed=function(e){var n=e.pushChanges,t=(0,a.v9)(function(e){return{isOpen:(0,$.gP)(e,J.q.REFERENCES_MISSING_DRAWER),localCustomTypes:(0,K.Ch)(e).filter(g.TG),modalData:e.pushChanges}}),i=t.isOpen,r=t.modalData,l=t.localCustomTypes,o=(0,R.Z)(),c=o.closeModals,d=o.openToaster;if(!i)return null;if((null==r?void 0:r.details)===void 0)return d("No change data",ee.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,g.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(es,{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)(el,{isOpen:i,title:"Missing Slices",footer:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Q.z,{label:"Try again",variant:"primary",onClick:function(){c(),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]})})},eu=function(){var e=(0,q.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 q.O.includes(e.status)}),changedCustomTypes:t.map(function(e){return(0,g.TG)(e)?e.local:e.remote}).map(function(e){return{customType:e,status:l.customTypes[e.id]}}).filter(function(e){return q.O.includes(e.status)})}},[n,t,l]),m=h.changedSlices,p=h.changedCustomTypes,f=(0,R.Z)(),j=f.pushChanges,v=f.closeModals,y=(0,a.v9)(function(e){return{isSyncing:(0,L.hg)(e,X.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===Y.t.UNAUTHORIZED||u===Y.t.FORBIDDEN?(0,s.jsx)(Z,{}):0===b?(0,s.jsx)(V,{}):(0,s.jsx)(O,{unSyncedSlices:n,unSyncedCustomTypes:t,modelsStatuses:l,authStatus:u,isOnline:x}):(0,s.jsx)(N,{})},[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===Y.t.UNAUTHORIZED||u===Y.t.FORBIDDEN||y,"data-cy":"push-changes",children:"Push Changes"})})]}),(0,s.jsx)(d.RN,{children:(0,s.jsxs)(c.xR,{sx:{display:"flex",flexDirection:"column"},children:[C,(0,s.jsx)(ec,{pushChanges:_}),(0,s.jsx)(ea,{pushChanges:_}),(0,s.jsx)(ed,{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),c=t(6277),a=t(21658);t(57404);var d=function(e){var n=e.backgroundImage,t=e.style,a=(0,l.Z)(e,["backgroundImage","style"]),d=void 0!==n;return(0,o.jsx)("article",(0,r.Z)((0,i.Z)({},a),{className:(0,c.Z)("_18bjhbz0 _1ecs97d9bi _1ecs97d9bj _1ecs97d9bk _1ecs97d9bt _1ecs97d9sy _1ecs97d9t0 _1ecs97d9t2 _1ecs97dm _1ecs97d7z _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9c7",(0,s.Z)({},"_18bjhbz1 _1ecs97d9cf _1ecs97d9h3",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 _1ecs97d9q5"}))},h=function(e){return(0,o.jsx)(a.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz4"}))},m=function(e){return(0,o.jsx)(a.xv,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz5",color:"grey11"}))},p=function(e){return(0,o.jsx)(a.hE,(0,r.Z)((0,i.Z)({},e),{className:"_18bjhbz6 _1ecs97d9l3 _1ecs97d9bq _1ecs97d9nl",size:"medium",variant:"secondary"}))}},57404:function(){},25977:function(){}},function(e){e.O(0,[789,123,909,97,918,906,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 eu}});var s=t(52322),i=t(10873),r=t(2784),l=t(97729),o=t.n(l),a=t(65077),c=t(56580),d=t(32038),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(36882),p=t(39097),f=t.n(p),g=t(7819),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)(m.O,{modelType:"Custom Type",modelId:n.id,status:t,authStatus:i,isOnline:r,"data-for":"".concat(n.id,"-tooltip"),"data-tip":!0})})]})},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,g.TG)(e)?(0,s.jsx)(f(),{passHref:!0,href:j.cd[e.local.format].getBuilderPagePathname(e.local.id),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(31841),C=t(15996),S=t(84449),T=t(82223),D=t(47731),k=t(32681),O=function(e){var n=e.unSyncedCustomTypes,t=e.unSyncedSlices,i=e.modelsStatuses,r=e.authStatus,l=e.isOnline,o=(0,D.H)(),a=o.modalPayload,c=o.onOpenModal,d=a.sliceFilterFn,m=a.defaultVariationSelector,p=t.filter(function(e){return i.slices[e.model.id]!==k.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,T.c)(e)>0&&i.slices[e.model.id]!==k.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:"290px",defineElementKey:function(e){return e.model.name},renderElem:function(e){return C.M.render({showActions:!0,slice:e,wrapperType:i.slices[e.model.id]!==k.G.Deleted?_.WT.clickable:_.WT.nonClickable,StatusOrCustom:{status:i.slices[e.model.id],authStatus:r,isOnline:l},actions:{onUpdateScreenshot:function(n){n.preventDefault(),c({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})}}})}}),(0,s.jsx)(S.Z,{slices:d(p),defaultVariationSelector:m})]})]})},w=t(91914),N=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)(w.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"})]})})},R=t(90374),Z=function(){var e=(0,R.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"})]})})},E=t(5632),z=t.n(E),F=t(2754),I=t(34543),M=t(62230),W=t(85244),H=t(98240),P=t(6277);t(25977);var A={primary:"_1ecs97d74o _1ecs97d74p _1ecs97d74i _1ecs97d74j _1ecs97d74q _1ecs97d74r",secondary:"_1ecs97d6pe _1ecs97d6pf _1ecs97d6p8 _1ecs97d6p9 _1ecs97d6pg _1ecs97d6ph"},U={normal:"ovkapw1",smallBold:"ovkapw2",inherit:"ovkapw3 _1ecs97d9gi"},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,H.Z)(e,["children","color","endIcon","href","textVariant"]);return(0,s.jsxs)("a",(0,W.Z)((0,M.Z)({href:o,target:"_blank",rel:"noreferrer"},d),{className:(0,P.Z)("ovkapw0 _1ecs97d9bi _1ecs97d9gc _1ecs97d9bk _1ecs97d9bq",A[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,"_1ecs97d9r7",U[c])}):null]}))},G=t(39092),V=function(){var e,n=(e=(0,c.v9)(function(e){return{repoName:(0,G.MY)(e)}}).repoName,"https://".concat(e,".prismic.io/documents/working"));return(0,s.jsxs)(F.R$,{style:{alignSelf:"center",marginTop:i.TV.size[72]},children:[(0,s.jsx)(F.u2,{children:(0,s.jsx)(i.Ee,{src:"/blank-slate-changes-uptodate.png",sizing:"cover"})}),(0,s.jsxs)(F.T9,{children:[(0,s.jsx)(F._T,{children:"Everything up-to-date"}),(0,s.jsx)(F.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)(F.Qj,{children:[(0,s.jsx)(i.zx,{onClick:function(){z().push("/")},children:"Create a page type"}),(0,s.jsx)(B,{endIcon:(0,s.jsx)(I.AlO,{}),textVariant:"normal",href:n,children:"Create content"})]})]})]})},Y=t(79096),q=t(85412),L=t(32665),X=t(3098),Q=t(56577),J=t(24340),$=t(77174),K=t(49471),ee=t(57282),en=t(78656),et=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"})]})},es=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 ",en.$[n].name({start:!1,plural:!1})]},t)]})},ei=t(79797),er=t(54132),el=function(e){var n=e.isOpen,t=e.title,i=e.footer,r=e.explanations,l=(0,R.Z)().closeModals;return(0,s.jsx)(ei.Z,{placement:"right",open:n,level:null,onClose:l,width:496,children:(0,s.jsx)(er.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})})},eo=function(e){var n=e.onToggle,t=e.isConfirmed,i=e.sx;return(0,s.jsxs)(u.kC,{sx:(0,M.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"]})]})},ea=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,$.gP)(e,J.q.SOFT_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,K.Ch)(e).filter(g.yp),modalData:e.pushChanges}}),a=o.isDeleteDocumentsDrawerOpen,d=o.remoteOnlyCustomTypes,x=o.modalData,h=(0,R.Z)(),m=h.closeModals,p=h.openToaster;if(!a)return null;if((null==x?void 0:x.type)!=="SOFT")return p("No change data",ee.Jf.ERROR),null;var f=x.details.customTypes.map(function(e){var n,t=d.find(function(n){return(0,g.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(et,{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)(el,{isOpen:a,title:"Confirm deletion",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eo,{onToggle:function(){l(!i)},isConfirmed:i,sx:{mb:10}}),(0,s.jsx)(Q.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."]}),f]})})},ec=function(e){var n=e.pushChanges,t=(0,c.v9)(function(e){return{isDeleteDocumentsDrawerOpen:(0,$.gP)(e,J.q.HARD_DELETE_DOCUMENTS_DRAWER),remoteOnlyCustomTypes:(0,K.Ch)(e).filter(g.yp),modalData:e.pushChanges}}),i=t.isDeleteDocumentsDrawerOpen,r=t.remoteOnlyCustomTypes,l=t.modalData,o=(0,R.Z)(),a=o.closeModals,d=o.openToaster;if(!i)return null;if((null==l?void 0:l.type)!=="HARD")return d("No change data",ee.Jf.ERROR),null;var x=l.details.customTypes.map(function(e){var n,t=r.find(function(n){return(0,g.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(et,{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)(el,{isOpen:i,title:"Manual action required",footer:(0,s.jsx)(Q.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]})})},ed=function(e){var n=e.pushChanges,t=(0,c.v9)(function(e){return{isOpen:(0,$.gP)(e,J.q.REFERENCES_MISSING_DRAWER),localCustomTypes:(0,K.Ch)(e).filter(g.TG),modalData:e.pushChanges}}),i=t.isOpen,r=t.modalData,l=t.localCustomTypes,o=(0,R.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",ee.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,g.n5)(n)===e.id});return void 0===t?null:(0,s.jsx)(es,{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)(el,{isOpen:i,title:"Missing Slices",footer:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Q.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]})})},eu=function(){var e=(0,q.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 q.O.includes(e.status)}),changedCustomTypes:t.map(function(e){return(0,g.TG)(e)?e.local:e.remote}).map(function(e){return{customType:e,status:l.customTypes[e.id]}}).filter(function(e){return q.O.includes(e.status)})}},[n,t,l]),m=h.changedSlices,p=h.changedCustomTypes,f=(0,R.Z)(),j=f.pushChanges,v=f.closeModals,y=(0,c.v9)(function(e){return{isSyncing:(0,L.hg)(e,X.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===Y.t.UNAUTHORIZED||u===Y.t.FORBIDDEN?(0,s.jsx)(Z,{}):0===b?(0,s.jsx)(V,{}):(0,s.jsx)(O,{unSyncedSlices:n,unSyncedCustomTypes:t,modelsStatuses:l,authStatus:u,isOnline:x}):(0,s.jsx)(N,{})},[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===Y.t.UNAUTHORIZED||u===Y.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)(ea,{pushChanges:_}),(0,s.jsx)(ec,{pushChanges:_}),(0,s.jsx)(ed,{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(10873);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 _1ecs97d9sy _1ecs97d9t0 _1ecs97d9t2 _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9c7",(0,s.Z)({},"_18bjhbz1 _1ecs97d9cf _1ecs97d9h3",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 _1ecs97d9q5"}))},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 _1ecs97d9l3 _1ecs97d9bq _1ecs97d9nl",size:"medium",variant:"secondary"}))}},41236:function(){},25977:function(){}},function(e){e.O(0,[789,123,909,97,918,906,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(
|
|
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(38970)}},function(n){n.O(0,[909,97,740,799,906,377,970,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(
|
|
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(38970)}},function(n){n.O(0,[909,97,740,799,906,377,970,774,888,179],function(){return n(n.s=61367)}),_N_E=n.O()}]);
|
package/out/_next/static/chunks/pages/{slices-0333a80308f2058b.js → slices-24d2714462334469.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{74600:function(e,n,t){var i=t(34311),o=t(23779),r=i(function(e,n,t){return e+(t?" ":"")+o(n)});e.exports=r},26688:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices",function(){return t(12472)}])},44221:function(e,n,t){"use strict";t.d(n,{c:function(){return N}});var i=t(22710),o=t(62230),r=t(85244),l=t(81541),a=t(99267),c=t(52322),s=t(75289),u=t(2784),d=t(36131),f=t(5632),m=t(607),p=t(68780),h=t(88932),x=t(38876),v=t(40147),y=t(82770),b=t(13858);function g(){return(g=(0,i.Z)(function(e){var n,t,i,o,r,l,c;return(0,a.__generator)(this,function(a){switch(a.label){case 0:var s;return a.trys.push([0,3,,4]),n=e.sliceName,t=e.libraryName,i=e.onSuccess,s=n,o={id:(0,x.T3)(s),type:"SharedSlice",name:s,description:s,variations:[{id:j,name:(0,x.MP)(j),docURL:"...",version:"initial",description:(0,x.MP)(j),imageUrl:""},]},[4,v.j.slices.createSlice({libraryID:t,model:o})];case 1:if((r=a.sent().errors).length>0)throw r;return y.Xe.track({event:"slice:created",id:(0,x.MP)(n),name:n,library:t}),[4,i(o)];case 2:return a.sent(),h.Am.success((0,b.kQ)({path:"".concat(t,"/").concat(o.name,"/model.json")})),[3,4];case 3:return l=a.sent(),c="Internal Error: Slice not created",console.error(c,l),h.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var j="default",S=t(90374),C=t(78656),k=t(66443),w=t(70041),L={getBuilderPagePathname:function(e){var n=e.libraryName,t=e.sliceName,i=e.variationId;return"/".concat(n.replace(/\//g,"--"),"/").concat(t,"/").concat(i)}},N=function(e){var n,t=e.onClose,h=e.localLibraries,x=e.remoteSlices,b=e.customType,j=e.tabId,N=(0,f.useRouter)(),I=(0,S.Z)(),E=I.createSliceSuccess,Z=I.saveCustomTypeSuccess,P=(0,u.useState)(!1),O=P[0],R=P[1],_=(n=(0,i.Z)(function(e){var n,t;return(0,a.__generator)(this,function(c){switch(c.label){case 0:var s;return n=e.sliceName,t=e.from,R(!0),[4,function(e){return g.apply(this,arguments)}({sliceName:n,libraryName:t,onSuccess:(s=(0,i.Z)(function(e){var i,c,s,u;return(0,a.__generator)(this,function(i){switch(i.label){case 0:return[4,(0,y.y0)()];case 1:if(E(i.sent().libraries),!b)return[3,3];return c=(0,r.Z)((0,o.Z)({},b),{tabs:b.tabs.map(function(n){return n.key===j&&n.sliceZone?(0,r.Z)((0,o.Z)({},n),{sliceZone:{key:n.sliceZone.key,value:(0,l.Z)(n.sliceZone.value).concat([{key:e.id,value:e},])}}):n})}),[4,v.j.customTypes.updateCustomType({model:m.Dc.fromSM(c)})];case 2:i.sent(),Z(m.Dc.fromSM(c)),i.label=3;case 3:return s=e.variations[0].id,u=L.getBuilderPagePathname({libraryName:t,sliceName:n,variationId:s}),N.push(u),[2]}})}),function(e){return s.apply(this,arguments)})})];case 1:return c.sent(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,c.jsx)(p.Z,{dataCy:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:O,formId:"create-new-slice",close:t,buttonLabel:"Create",onSubmit:function(e){_(e)},initialValues:{sliceName:"",from:h[0].name},validate:function(e){return(0,k.h)(e,h,x)},content:{title:"Create a new slice"},actionMessage:b?C.$[b.format].createSliceFromTypeActionMessage:void 0,children:function(e){var n=e.touched,t=e.values,i=e.setFieldValue,l=e.errors;return(0,c.jsxs)(s.xu,{children:[(0,c.jsx)(w.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,c.jsx)(s.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,c.jsx)(d.ZP,{name:"from",options:h.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,r.Z)((0,o.Z)({},e),{color:"#161618"})}},theme:function(e){return(0,r.Z)((0,o.Z)({},e),{colors:(0,r.Z)((0,o.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),o=t(52322);t(2784);var r=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,o.jsxs)(l.xu,{mb:3,children:[(0,o.jsx)(l.__,{htmlFor:n,mb:2,children:t}),(0,o.jsx)(r.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,o.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),o=t(75329),r=t(96009),l=t.n(r),a=t(74600),c=t.n(a);function s(e,n,t){var r=e.sliceName;if(!r)return{sliceName:"Cannot be empty"};if(!o.xo.exec(r))return{sliceName:"No special characters allowed"};if(c()(l()(r)).replace(/\s/gm,"")!==r.trim())return{sliceName:"Value has to be PascalCased"};if(r.match(/^\d/))return{sliceName:"Value cannot start with a number"};if(o.lS.includes(r))return{sliceName:"".concat(r," 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(r))return{sliceName:"Slice name is already taken."}}},68780:function(e,n,t){"use strict";var i=t(62230),o=t(85244),r=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,p=e.validate,h=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,r.jsx)(c.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:y,style:{content:{width:null!=x?x:"900px"}},children:(0,r.jsx)(s.J9,{validateOnChange:!0,initialValues:v,validate:function(e){return p?p(e):void 0},onSubmit:function(e){h(e)},children:function(e){var l=e.isValid,a=e.isSubmitting,c=e.values,p=e.errors,h=e.touched,x=e.setFieldValue,v=e.setValues;return(0,r.jsx)(s.l0,(0,o.Z)((0,i.Z)({id:m},null!=L?{"data-cy":L}:null),{children:(0,r.jsx)(f.Z,(0,o.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,r.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,r.jsx)(u.X6,{sx:{fontSize:"20px"},children:y}),(0,r.jsx)(u.x8,{type:"button",onClick:t})]})},Footer:j?null:(0,r.jsxs)(u.kC,{sx:{alignItems:"space-between"},children:[(0,r.jsx)(u.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof N?N(e):N}),(0,r.jsxs)(u.kC,{sx:{ml:"auto"},children:[(0,r.jsx)(u.zx,{mr:2,type:"button",onClick:t,variant:"secondary",disabled:a||C,children:"Cancel"}),(0,r.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:p,touched:h,setFieldValue:x,setValues:v})}))}))}})})}},12472:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return W}});var i=t(81541),o=t(52322),r=t(21658),l=t(2784),a=t(97729),c=t.n(a),s=t(65077),u=t(75289),d=t(56580),f=t(15996),m=t(75329),p=t(32038),h=t(44221),x=t(59469),v=t(36887),y=t(82770),b=function(e){var n=e.title,t=e.onCreateNew,i=e.buttonText,r=e.documentationComponent,l=e.videoPublicIdUrl;return(0,o.jsxs)(u.xu,{sx:{display:"flex",width:"80%",flexWrap:"wrap",justifyContent:"center"},children:[(0,o.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,o.jsx)(v.nk,{cloudName:"dmtf1daqp",controls:!0,loop:!0,style:{maxWidth:"100%",objectFit:"contain"},publicId:l,onPlay:function(){y.Xe.track({event:"open-video-tutorials",video:l})}})}),(0,o.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,o.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,o.jsx)(u.X6,{as:"h3",variant:"heading",sx:{fontSize:"16px",lineHeight:"24px",mb:2},children:n}),(0,o.jsx)(u.xv,{variant:"xs",sx:{lineHeight:"24px",fontSize:"13px"},children:r})]}),(0,o.jsxs)(u.xu,{sx:{display:"flex",p:4,alignItems:"center"},children:[(0,o.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,o.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"})]})]})]})},g=t(84449),j=t(90374),S=t(68780),C=t(70041),k=t(77174),w=t(24340),L=t(75992),N=t(66443),I=function(e){var n=e.sliceName,t=e.sliceId,i=e.libName,r=(0,j.Z)(),l=r.renameSlice,a=r.closeModals,c=(0,d.v9)(function(e){return{isRenameSliceModalOpen:(0,k.gP)(e,w.q.RENAME_SLICE),localLibs:(0,L.Sd)(e),remoteLibs:(0,L.sT)(e)}}),s=c.isRenameSliceModalOpen,f=c.localLibs,m=c.remoteLibs,p=function(e){l(i,t,e.sliceName)};return(0,o.jsx)(S.Z,{dataCy:"rename-slice-modal",isOpen:s,widthInPx:"530px",formId:"rename-slice-modal-".concat(t),close:a,buttonLabel:"Rename",onSubmit:p,initialValues:{sliceName:n},content:{title:"Rename a slice"},validate:function(e){return(0,N.h)(e,f,m)},children:function(e){var n=e.touched,t=e.errors;return(0,o.jsx)(u.xu,{children:(0,o.jsx)(C.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"})})}})},E=t(25812),Z=t(59326),P=t(54132),O=t(65186),R=t(56577),_=t(3098),M=t(32665),T=function(e){var n=e.sliceId,t=e.sliceName,i=e.libName,r=(0,d.v9)(function(e){return{isSliceModalOpen:(0,k.gP)(e,w.q.DELETE_SLICE),isDeletingSlice:(0,M.hg)(e,_.z.DELETE_SLICE)}}),l=r.isSliceModalOpen,a=r.isDeletingSlice,c=(0,j.Z)(),s=c.closeModals,f=c.deleteSlice,m=(0,Z.B7)().theme;return(0,o.jsx)(E.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:s,children:(0,o.jsx)(P.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,o.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,o.jsxs)(u.kC,{sx:{alignItems:"center"},children:[(0,o.jsx)(O.$vK,{size:20,color:null===(e=m.colors)||void 0===e?void 0:e.greyIcon}),(0,o.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Delete Slice"})]}),(0,o.jsx)(u.x8,{type:"button",onClick:s})]})},Footer:function(){return(0,o.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,o.jsx)(R.z,{label:"Cancel",variant:"secondary",onClick:function(){return s()},sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,o.jsx)(R.z,{label:"Delete",variant:"danger",isLoading:a,sx:{minHeight:39,minWidth:78},onClick:function(){return f(n,t,i)}})]})},children:(0,o.jsxs)(u.nv,{children:["This action will immediately make the following changes:",(0,o.jsxs)("ul",{children:[(0,o.jsxs)("li",{children:["Delete the"," ",(0,o.jsxs)(u.xv,{sx:{fontWeight:"bold"},children:[i,"/",t,"/"]})," ","directory."]}),(0,o.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,o.jsx)("ul",{children:(0,o.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."]})})})},D=t(71685),A=t(47731),W=function(){var e,n,t,a,v,y,S=(0,j.Z)(),C=S.openRenameSliceModal,k=S.openDeleteSliceModal,w=(0,A.H)(),N=w.modalPayload,E=w.onOpenModal,Z=N.sliceFilterFn,P=N.defaultVariationSelector,O=(0,d.v9)(function(e){return{remoteSlices:(0,L.sT)(e),libraries:(0,L.Sd)(e),frontendSlices:(0,L.xC)(e)}}),R=O.remoteSlices,_=O.libraries,M=O.frontendSlices,W=(0,l.useState)(!1),F=W[0],z=W[1],V=_.filter(function(e){return e.isLocal}),K=_.map(function(e){return e.components=(0,i.Z)(e.components).sort(function(e,n){return e.model.name.localeCompare(n.model.name)}),e}),B=(0,D.J)({slices:M}),H=B.modelsStatuses,X=B.authStatus,q=B.isOnline,U=(_||[]).map(function(e){return e.components}).flat(),J=U.length,$=(0,l.useState)(),G=$[0],Q=$[1];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c(),{children:(0,o.jsx)("title",{children:"Slices - Slice Machine"})}),(0,o.jsxs)(p.LN,{children:[(0,o.jsxs)(p.wd,{children:[(0,o.jsx)(p.Cx,{folder:"Slices"}),(null==V?void 0:V.length)!==0&&0!==J?(0,o.jsx)(p.K2,{children:(0,o.jsx)(r.zx,{"data-cy":"create-slice",onClick:function(){z(!0)},startIcon:"add",children:"Create"})}):void 0]}),(0,o.jsxs)(p.RN,{children:[(0,o.jsx)(s.xR,{sx:{display:"flex",flexDirection:"column"},children:K.length>0?(0,o.jsx)(u.kC,{sx:{flex:1,flexDirection:"column"},children:0===J?(0,o.jsx)(u.kC,{sx:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,o.jsx)(b,{title:"What are Slices?",onCreateNew:function(){z(!0)},buttonText:"Create one",videoPublicIdUrl:m.rd,documentationComponent:(0,o.jsxs)(o.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,o.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"}),"."]})})}):K.map(function(e){var n=e.name,t=e.isLocal,i=e.components;return(0,o.jsxs)(u.kC,{sx:{flexDirection:"column","&:not(:last-of-type)":{mb:4}},children:[(0,o.jsxs)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,o.jsx)(u.kC,{sx:{alignItems:"center",fontSize:3,lineHeight:"48px",fontWeight:"heading",mb:1},children:(0,o.jsx)(u.xv,{children:n})}),!t&&(0,o.jsx)("p",{children:"⚠️ External libraries are read-only"})]}),(0,o.jsx)(x.Z,{elems:i,defineElementKey:function(e){return e.model.name},renderElem:function(e){return f.M.render({slice:e,StatusOrCustom:{status:H.slices[e.model.id],authStatus:X,isOnline:q},actions:{onUpdateScreenshot:function(n){n.preventDefault(),E({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},openRenameModal:function(e){Q(e),C()},openDeleteModal:function(e){Q(e),k()}},showActions:!0})},gridGap:"32px 16px"})]},n)})}):void 0}),(null==V?void 0:V.length)>0&&(0,o.jsx)(g.Z,{slices:Z(U),defaultVariationSelector:P}),(null==V?void 0:V.length)>0&&F&&(0,o.jsx)(h.c,{localLibraries:V,remoteSlices:R,onClose:function(){z(!1)}}),(0,o.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,o.jsx)(T,{sliceId:null!==(a=null==G?void 0:G.model.id)&&void 0!==a?a:"",sliceName:null!==(v=null==G?void 0:G.model.name)&&void 0!==v?v:"",libName:null!==(y=null==G?void 0:G.from)&&void 0!==y?y:""})]})]})]})}},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"],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 o({},{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!r.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!r.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 p(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,l=n.meta,c=n.mod,s=n.shift,f=n.ctrl,m=n.keys,p=e.key,h=e.code,x=e.ctrlKey,v=e.metaKey,y=e.shiftKey,b=e.altKey,g=a(h),j=p.toLowerCase();if(!t){if(!b===r&&"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===o&&(o=","),(d(i=m)?i:i.split(o)).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,o){var r,l,u=(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,C=t instanceof Array?t:o instanceof Array?o: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,o){return i&&e(n[o],t[o])},!0):n===t}((l=(0,i.useRef)(void 0)).current,j)&&(l.current=j),l.current),N=(0,i.useContext)(v).enabledScopes,I=(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),!(p(e,["input","textarea","select"])&&!p(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,o,r,l,a,c,u,d=s(t,null==L?void 0:L.combinationKey);if(h(e,d,null==L?void 0:L.ignoreModifiers)||null!=(u=d.keys)&&u.includes("*")){if(n&&g.current)return;if(i=e,o=d,("function"==typeof(r=null==L?void 0:L.preventDefault)&&r(i,o)||!0===r)&&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))},o=function(e){void 0!==e.key&&(m(a(e.code)),g.current=!1,null!=L&&L.keyup&&t(e,!0))},r=u.current||(null==j?void 0:j.document)||document;return r.addEventListener("keyup",o),r.addEventListener("keydown",i),I&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return I.addHotkey(s(e,null==L?void 0:L.combinationKey,null==L?void 0:L.description))}),function(){r.removeEventListener("keyup",o),r.removeEventListener("keydown",i),I&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return I.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,909,97,906,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),o=t(23779),r=i(function(e,n,t){return e+(t?" ":"")+o(n)});e.exports=r},26688:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/slices",function(){return t(12472)}])},44221:function(e,n,t){"use strict";t.d(n,{c:function(){return N}});var i=t(22710),o=t(62230),r=t(85244),l=t(81541),a=t(99267),c=t(52322),s=t(75289),u=t(2784),d=t(36131),f=t(5632),m=t(607),p=t(68780),h=t(88932),x=t(38876),v=t(40147),y=t(82770),b=t(13858);function g(){return(g=(0,i.Z)(function(e){var n,t,i,o,r,l,c;return(0,a.__generator)(this,function(a){switch(a.label){case 0:var s;return a.trys.push([0,3,,4]),n=e.sliceName,t=e.libraryName,i=e.onSuccess,s=n,o={id:(0,x.T3)(s),type:"SharedSlice",name:s,description:s,variations:[{id:j,name:(0,x.MP)(j),docURL:"...",version:"initial",description:(0,x.MP)(j),imageUrl:""},]},[4,v.j.slices.createSlice({libraryID:t,model:o})];case 1:if((r=a.sent().errors).length>0)throw r;return y.Xe.track({event:"slice:created",id:(0,x.MP)(n),name:n,library:t}),[4,i(o)];case 2:return a.sent(),h.Am.success((0,b.kQ)({path:"".concat(t,"/").concat(o.name,"/model.json")})),[3,4];case 3:return l=a.sent(),c="Internal Error: Slice not created",console.error(c,l),h.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var j="default",S=t(90374),C=t(78656),k=t(66443),w=t(70041),L={getBuilderPagePathname:function(e){var n=e.libraryName,t=e.sliceName,i=e.variationId;return"/".concat(n.replace(/\//g,"--"),"/").concat(t,"/").concat(i)}},N=function(e){var n,t=e.onClose,h=e.localLibraries,x=e.remoteSlices,b=e.customType,j=e.tabId,N=(0,f.useRouter)(),I=(0,S.Z)(),E=I.createSliceSuccess,Z=I.saveCustomTypeSuccess,P=(0,u.useState)(!1),O=P[0],R=P[1],_=(n=(0,i.Z)(function(e){var n,t;return(0,a.__generator)(this,function(c){switch(c.label){case 0:var s;return n=e.sliceName,t=e.from,R(!0),[4,function(e){return g.apply(this,arguments)}({sliceName:n,libraryName:t,onSuccess:(s=(0,i.Z)(function(e){var i,c,s,u;return(0,a.__generator)(this,function(i){switch(i.label){case 0:return[4,(0,y.y0)()];case 1:if(E(i.sent().libraries),!b)return[3,3];return c=(0,r.Z)((0,o.Z)({},b),{tabs:b.tabs.map(function(n){return n.key===j&&n.sliceZone?(0,r.Z)((0,o.Z)({},n),{sliceZone:{key:n.sliceZone.key,value:(0,l.Z)(n.sliceZone.value).concat([{key:e.id,value:e},])}}):n})}),[4,v.j.customTypes.updateCustomType({model:m.Dc.fromSM(c)})];case 2:i.sent(),Z(m.Dc.fromSM(c)),i.label=3;case 3:return s=e.variations[0].id,u=L.getBuilderPagePathname({libraryName:t,sliceName:n,variationId:s}),N.push(u),[2]}})}),function(e){return s.apply(this,arguments)})})];case 1:return c.sent(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,c.jsx)(p.Z,{dataCy:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:O,formId:"create-new-slice",close:t,buttonLabel:"Create",onSubmit:function(e){_(e)},initialValues:{sliceName:"",from:h[0].name},validate:function(e){return(0,k.h)(e,h,x)},content:{title:"Create a new slice"},actionMessage:b?C.$[b.format].createSliceFromTypeActionMessage:void 0,children:function(e){var n=e.touched,t=e.values,i=e.setFieldValue,l=e.errors;return(0,c.jsxs)(s.xu,{children:[(0,c.jsx)(w.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,c.jsx)(s.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,c.jsx)(d.ZP,{name:"from",options:h.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,r.Z)((0,o.Z)({},e),{color:"#161618"})}},theme:function(e){return(0,r.Z)((0,o.Z)({},e),{colors:(0,r.Z)((0,o.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),o=t(52322);t(2784);var r=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,o.jsxs)(l.xu,{mb:3,children:[(0,o.jsx)(l.__,{htmlFor:n,mb:2,children:t}),(0,o.jsx)(r.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,o.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),o=t(75329),r=t(96009),l=t.n(r),a=t(74600),c=t.n(a);function s(e,n,t){var r=e.sliceName;if(!r)return{sliceName:"Cannot be empty"};if(!o.xo.exec(r))return{sliceName:"No special characters allowed"};if(c()(l()(r)).replace(/\s/gm,"")!==r.trim())return{sliceName:"Value has to be PascalCased"};if(r.match(/^\d/))return{sliceName:"Value cannot start with a number"};if(o.lS.includes(r))return{sliceName:"".concat(r," 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(r))return{sliceName:"Slice name is already taken."}}},68780:function(e,n,t){"use strict";var i=t(62230),o=t(85244),r=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,p=e.validate,h=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,r.jsx)(c.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:y,style:{content:{width:null!=x?x:"900px"}},children:(0,r.jsx)(s.J9,{validateOnChange:!0,initialValues:v,validate:function(e){return p?p(e):void 0},onSubmit:function(e){h(e)},children:function(e){var l=e.isValid,a=e.isSubmitting,c=e.values,p=e.errors,h=e.touched,x=e.setFieldValue,v=e.setValues;return(0,r.jsx)(s.l0,(0,o.Z)((0,i.Z)({id:m},null!=L?{"data-cy":L}:null),{children:(0,r.jsx)(f.Z,(0,o.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,r.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,r.jsx)(u.X6,{sx:{fontSize:"20px"},children:y}),(0,r.jsx)(u.x8,{type:"button",onClick:t})]})},Footer:j?null:(0,r.jsxs)(u.kC,{sx:{alignItems:"space-between"},children:[(0,r.jsx)(u.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof N?N(e):N}),(0,r.jsxs)(u.kC,{sx:{ml:"auto"},children:[(0,r.jsx)(u.zx,{mr:2,type:"button",onClick:t,variant:"secondary",disabled:a||C,children:"Cancel"}),(0,r.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:p,touched:h,setFieldValue:x,setValues:v})}))}))}})})}},12472:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return W}});var i=t(81541),o=t(52322),r=t(10873),l=t(2784),a=t(97729),c=t.n(a),s=t(65077),u=t(75289),d=t(56580),f=t(15996),m=t(75329),p=t(32038),h=t(44221),x=t(59469),v=t(36887),y=t(82770),b=function(e){var n=e.title,t=e.onCreateNew,i=e.buttonText,r=e.documentationComponent,l=e.videoPublicIdUrl;return(0,o.jsxs)(u.xu,{sx:{display:"flex",width:"80%",flexWrap:"wrap",justifyContent:"center"},children:[(0,o.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,o.jsx)(v.nk,{cloudName:"dmtf1daqp",controls:!0,loop:!0,style:{maxWidth:"100%",objectFit:"contain"},publicId:l,onPlay:function(){y.Xe.track({event:"open-video-tutorials",video:l})}})}),(0,o.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,o.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,o.jsx)(u.X6,{as:"h3",variant:"heading",sx:{fontSize:"16px",lineHeight:"24px",mb:2},children:n}),(0,o.jsx)(u.xv,{variant:"xs",sx:{lineHeight:"24px",fontSize:"13px"},children:r})]}),(0,o.jsxs)(u.xu,{sx:{display:"flex",p:4,alignItems:"center"},children:[(0,o.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,o.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"})]})]})]})},g=t(84449),j=t(90374),S=t(68780),C=t(70041),k=t(77174),w=t(24340),L=t(75992),N=t(66443),I=function(e){var n=e.sliceName,t=e.sliceId,i=e.libName,r=(0,j.Z)(),l=r.renameSlice,a=r.closeModals,c=(0,d.v9)(function(e){return{isRenameSliceModalOpen:(0,k.gP)(e,w.q.RENAME_SLICE),localLibs:(0,L.Sd)(e),remoteLibs:(0,L.sT)(e)}}),s=c.isRenameSliceModalOpen,f=c.localLibs,m=c.remoteLibs,p=function(e){l(i,t,e.sliceName)};return(0,o.jsx)(S.Z,{dataCy:"rename-slice-modal",isOpen:s,widthInPx:"530px",formId:"rename-slice-modal-".concat(t),close:a,buttonLabel:"Rename",onSubmit:p,initialValues:{sliceName:n},content:{title:"Rename a slice"},validate:function(e){return(0,N.h)(e,f,m)},children:function(e){var n=e.touched,t=e.errors;return(0,o.jsx)(u.xu,{children:(0,o.jsx)(C.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"})})}})},E=t(25812),Z=t(59326),P=t(54132),O=t(65186),R=t(56577),_=t(3098),M=t(32665),T=function(e){var n=e.sliceId,t=e.sliceName,i=e.libName,r=(0,d.v9)(function(e){return{isSliceModalOpen:(0,k.gP)(e,w.q.DELETE_SLICE),isDeletingSlice:(0,M.hg)(e,_.z.DELETE_SLICE)}}),l=r.isSliceModalOpen,a=r.isDeletingSlice,c=(0,j.Z)(),s=c.closeModals,f=c.deleteSlice,m=(0,Z.B7)().theme;return(0,o.jsx)(E.Z,{isOpen:l,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:s,children:(0,o.jsx)(P.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,o.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,o.jsxs)(u.kC,{sx:{alignItems:"center"},children:[(0,o.jsx)(O.$vK,{size:20,color:null===(e=m.colors)||void 0===e?void 0:e.greyIcon}),(0,o.jsx)(u.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Delete Slice"})]}),(0,o.jsx)(u.x8,{type:"button",onClick:s})]})},Footer:function(){return(0,o.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,o.jsx)(R.z,{label:"Cancel",variant:"secondary",onClick:function(){return s()},sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,o.jsx)(R.z,{label:"Delete",variant:"danger",isLoading:a,sx:{minHeight:39,minWidth:78},onClick:function(){return f(n,t,i)}})]})},children:(0,o.jsxs)(u.nv,{children:["This action will immediately make the following changes:",(0,o.jsxs)("ul",{children:[(0,o.jsxs)("li",{children:["Delete the"," ",(0,o.jsxs)(u.xv,{sx:{fontWeight:"bold"},children:[i,"/",t,"/"]})," ","directory."]}),(0,o.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,o.jsx)("ul",{children:(0,o.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."]})})})},D=t(71685),A=t(47731),W=function(){var e,n,t,a,v,y,S=(0,j.Z)(),C=S.openRenameSliceModal,k=S.openDeleteSliceModal,w=(0,A.H)(),N=w.modalPayload,E=w.onOpenModal,Z=N.sliceFilterFn,P=N.defaultVariationSelector,O=(0,d.v9)(function(e){return{remoteSlices:(0,L.sT)(e),libraries:(0,L.Sd)(e),frontendSlices:(0,L.xC)(e)}}),R=O.remoteSlices,_=O.libraries,M=O.frontendSlices,W=(0,l.useState)(!1),F=W[0],z=W[1],V=_.filter(function(e){return e.isLocal}),K=_.map(function(e){return e.components=(0,i.Z)(e.components).sort(function(e,n){return e.model.name.localeCompare(n.model.name)}),e}),B=(0,D.J)({slices:M}),H=B.modelsStatuses,X=B.authStatus,q=B.isOnline,U=(_||[]).map(function(e){return e.components}).flat(),J=U.length,$=(0,l.useState)(),G=$[0],Q=$[1];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c(),{children:(0,o.jsx)("title",{children:"Slices - Slice Machine"})}),(0,o.jsxs)(p.LN,{children:[(0,o.jsxs)(p.wd,{children:[(0,o.jsx)(p.Cx,{folder:"Slices"}),(null==V?void 0:V.length)!==0&&0!==J?(0,o.jsx)(p.K2,{children:(0,o.jsx)(r.zx,{"data-cy":"create-slice",onClick:function(){z(!0)},startIcon:"add",children:"Create"})}):void 0]}),(0,o.jsxs)(p.RN,{children:[(0,o.jsx)(s.xR,{sx:{display:"flex",flexDirection:"column"},children:K.length>0?(0,o.jsx)(u.kC,{sx:{flex:1,flexDirection:"column"},children:0===J?(0,o.jsx)(u.kC,{sx:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,o.jsx)(b,{title:"What are Slices?",onCreateNew:function(){z(!0)},buttonText:"Create one",videoPublicIdUrl:m.rd,documentationComponent:(0,o.jsxs)(o.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,o.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"}),"."]})})}):K.map(function(e){var n=e.name,t=e.isLocal,i=e.components;return(0,o.jsxs)(u.kC,{sx:{flexDirection:"column","&:not(:last-of-type)":{mb:4}},children:[(0,o.jsxs)(u.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,o.jsx)(u.kC,{sx:{alignItems:"center",fontSize:3,lineHeight:"48px",fontWeight:"heading",mb:1},children:(0,o.jsx)(u.xv,{children:n})}),!t&&(0,o.jsx)("p",{children:"⚠️ External libraries are read-only"})]}),(0,o.jsx)(x.Z,{elems:i,defineElementKey:function(e){return e.model.name},renderElem:function(e){return f.M.render({slice:e,StatusOrCustom:{status:H.slices[e.model.id],authStatus:X,isOnline:q},actions:{onUpdateScreenshot:function(n){n.preventDefault(),E({sliceFilterFn:function(n){return n.filter(function(n){return n.model.id===e.model.id})}})},openRenameModal:function(e){Q(e),C()},openDeleteModal:function(e){Q(e),k()}},showActions:!0})},gridGap:"32px 16px"})]},n)})}):void 0}),(null==V?void 0:V.length)>0&&(0,o.jsx)(g.Z,{slices:Z(U),defaultVariationSelector:P}),(null==V?void 0:V.length)>0&&F&&(0,o.jsx)(h.c,{localLibraries:V,remoteSlices:R,onClose:function(){z(!1)}}),(0,o.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,o.jsx)(T,{sliceId:null!==(a=null==G?void 0:G.model.id)&&void 0!==a?a:"",sliceName:null!==(v=null==G?void 0:G.model.name)&&void 0!==v?v:"",libName:null!==(y=null==G?void 0:G.from)&&void 0!==y?y:""})]})]})]})}},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"],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 o({},{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!r.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!r.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 p(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,l=n.meta,c=n.mod,s=n.shift,f=n.ctrl,m=n.keys,p=e.key,h=e.code,x=e.ctrlKey,v=e.metaKey,y=e.shiftKey,b=e.altKey,g=a(h),j=p.toLowerCase();if(!t){if(!b===r&&"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===o&&(o=","),(d(i=m)?i:i.split(o)).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,o){var r,l,u=(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,C=t instanceof Array?t:o instanceof Array?o: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,o){return i&&e(n[o],t[o])},!0):n===t}((l=(0,i.useRef)(void 0)).current,j)&&(l.current=j),l.current),N=(0,i.useContext)(v).enabledScopes,I=(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),!(p(e,["input","textarea","select"])&&!p(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,o,r,l,a,c,u,d=s(t,null==L?void 0:L.combinationKey);if(h(e,d,null==L?void 0:L.ignoreModifiers)||null!=(u=d.keys)&&u.includes("*")){if(n&&g.current)return;if(i=e,o=d,("function"==typeof(r=null==L?void 0:L.preventDefault)&&r(i,o)||!0===r)&&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))},o=function(e){void 0!==e.key&&(m(a(e.code)),g.current=!1,null!=L&&L.keyup&&t(e,!0))},r=u.current||(null==j?void 0:j.document)||document;return r.addEventListener("keyup",o),r.addEventListener("keydown",i),I&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return I.addHotkey(s(e,null==L?void 0:L.combinationKey,null==L?void 0:L.description))}),function(){r.removeEventListener("keyup",o),r.removeEventListener("keydown",i),I&&c(S,null==L?void 0:L.splitKey).forEach(function(e){return I.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,909,97,906,573,774,888,179],function(){return e(e.s=26688)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._1k08lzu3{height:calc(var(--_7j49md3d) - var(--_7j49mdh))}._1k08lzu5{height:calc(var(--_7j49md33) - var(--_7j49md2z));width:calc(var(--_7j49md33) - var(--_7j49md2z))}._1k08lzu7{box-shadow:inset 0 calc(-1 * var(--_7j49mdh)) 0 0 var(--_7j49md1a);height:calc(var(--_7j49md3d) - 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(--_7j49md3t);height:var(--_7j49md39);left:calc(-1 * var(--_7j49md3p));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(--_7j49md15);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(--_7j49md3i) + var(--_7j49mdh));left:calc(-1 * var(--_7j49mdh));position:absolute;top:calc(-1 * var(--_7j49mdh));width:calc(var(--_7j49md3i) + var(--_7j49mdh))}._1k08lzub{margin-right:calc(-1 * var(--_7j49md3t))}: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(--_7j49md16)}._2a96i70:last-child>._2a96i71{border-bottom-color:var(--_7j49md2g)}._18bjhbz0{max-width:498px;min-height:400px}._18bjhbz1{background-size:cover;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}div.LegacySliceTooltip_legacySliceTooltipContainer__QZCRH{border-radius:6px;width:230px;text-align:center;padding:8px}div.LegacySliceTooltip_legacySliceTooltipContainer__QZCRH>a{color:#fff}._76k20u4:not(:last-child){margin-right:var(--_7j49md3w)}._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}
|
|
1
|
+
._1k08lzu3{height:calc(var(--_7j49md3d) - var(--_7j49mdh))}._1k08lzu5{height:calc(var(--_7j49md33) - var(--_7j49md2z));width:calc(var(--_7j49md33) - var(--_7j49md2z))}._1k08lzu7{box-shadow:inset 0 calc(-1 * var(--_7j49mdh)) 0 0 var(--_7j49md1a);height:calc(var(--_7j49md3d) - 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(--_7j49md3t);height:var(--_7j49md39);left:calc(-1 * var(--_7j49md3p));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(--_7j49md15);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(--_7j49md3i) + var(--_7j49mdh));left:calc(-1 * var(--_7j49mdh));position:absolute;top:calc(-1 * var(--_7j49mdh));width:calc(var(--_7j49md3i) + var(--_7j49mdh))}._1k08lzub{margin-right:calc(-1 * var(--_7j49md3t))}: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(--_7j49md16)}._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}div.LegacySliceTooltip_legacySliceTooltipContainer__QZCRH{border-radius:6px;width:230px;text-align:center;padding:8px}div.LegacySliceTooltip_legacySliceTooltipContainer__QZCRH>a{color:#fff}._76k20u4:not(:last-child){margin-right:var(--_7j49md3w)}._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
|
+
div.LegacySliceTooltip_legacySliceTooltipContainer__QZCRH{border-radius:6px;width:230px;text-align:center;padding:8px}div.LegacySliceTooltip_legacySliceTooltipContainer__QZCRH>a{color:#fff}._1nkpwww0{border-radius:3px}._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}.ovkapw0:focus-visible{outline:none;-webkit-text-decoration-line:underline;text-decoration-line:underline}.ovkapw1{font-size:1.2rem;width:18px;height:18px}.ovkapw2{font-size:1rem;width:16px;height:16px}.ovkapw3{font-size:inherit;width:inherit;height:inherit}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.gdfsm51{border-collapse:collapse;table-layout:fixed}.gdfsm55{vertical-align:middle}.gdfsm55:first-child{padding-right:var(--_7j49md3o);width:var(--_7j49md3b)}.gdfsm55:last-child{padding-left:var(--_7j49md3o);padding-right:var(--_7j49md3w);width:var(--_7j49md3d)}.gdfsm52 .gdfsm55{font-size:12px;font-weight:500}.gdfsm53 .gdfsm55{border-top-style:var(--_7j49mdf);font-size:14px}.gdfsm53 .gdfsm55:nth-child(2){color:var(--_7j49md1g);font-weight:600}.gdfsm52 .gdfsm55:first-child>.gdfsm56{padding-left:var(--_7j49md3s)}:is(.gdfsm53,.gdfsm52) .gdfsm55:not(:first-child):not(:last-child)>.gdfsm56{display:revert;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}._18bjhbz0{max-width:498px;min-height:400px}._18bjhbz1{background-size:cover;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}
|
|
1
|
+
.gdfsm51{border-collapse:collapse;table-layout:fixed}.gdfsm55{vertical-align:middle}.gdfsm55:first-child{padding-right:var(--_7j49md3o);width:var(--_7j49md3b)}.gdfsm55:last-child{padding-left:var(--_7j49md3o);padding-right:var(--_7j49md3w);width:var(--_7j49md3d)}.gdfsm52 .gdfsm55{font-size:12px;font-weight:500}.gdfsm53 .gdfsm55{border-top-style:var(--_7j49mdf);font-size:14px}.gdfsm53 .gdfsm55:nth-child(2){color:var(--_7j49md1g);font-weight:600}.gdfsm52 .gdfsm55:first-child>.gdfsm56{padding-left:var(--_7j49md3s)}:is(.gdfsm53,.gdfsm52) .gdfsm55:not(:first-child):not(:last-child)>.gdfsm56{display:revert;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}._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}
|