slice-machine-ui 2.19.0 → 2.19.1-alpha.lg-page-routes.1
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/.eslintignore +0 -1
- package/out/404.html +1 -1
- package/out/_next/static/{4kCA9l9tPwPykyD2JrIdu → 3cOO4HEvSau6Y1yz7EUS5}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/248-9279b5f2476db636.js +1 -0
- package/out/_next/static/chunks/429-75740c7d201da3a4.js +3 -0
- package/out/_next/static/chunks/{489-ce3053e1d81ade83.js → 489-54c4b419d1c29727.js} +1 -1
- package/out/_next/static/chunks/603-a9b88d45a34ae9e9.js +1 -0
- package/out/_next/static/chunks/630-29fe0800ff72bf48.js +1 -0
- package/out/_next/static/chunks/pages/{_app-47c364b06ad99a80.js → _app-e3718a2c5ee36f46.js} +2 -2
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-af9376721beb489e.js → [customTypeId]-7a7d9d920c64b34b.js} +1 -1
- package/out/_next/static/chunks/pages/{custom-types-5acd56959b60346f.js → custom-types-7a68a3b96227a3e7.js} +1 -1
- package/out/_next/static/chunks/pages/{index-0d8cb369de720a35.js → index-40fafc651e4e3685.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-a24665e91b882169.js → [pageTypeId]-50bbb6b2d4870d26.js} +1 -1
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +5 -4
- package/src/features/customTypes/EditDropdown.tsx +22 -0
- package/src/features/customTypes/actions/updateCustomTypeRoute.ts +55 -0
- package/src/features/environments/actions/getActiveEnvironment.ts +2 -1
- package/src/features/environments/actions/getEnvironments.ts +2 -1
- package/src/legacy/components/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +43 -2
- package/src/legacy/components/Forms/CustomTypeRouteModal/CustomTypeRouteModal.tsx +101 -0
- package/src/legacy/components/Forms/CustomTypeRouteModal/index.ts +1 -0
- package/src/legacy/lib/builders/common/EditModal/index.jsx +2 -2
- package/src/legacy/lib/models/common/CustomType/index.ts +1 -0
- package/test/__setup__.ts +12 -5
- package/test/__testutils__/createTestPlugin.ts +1 -0
- package/out/_next/static/chunks/248-84a5987f0499b074.js +0 -1
- package/out/_next/static/chunks/429-aab52070cad2884b.js +0 -3
- package/out/_next/static/chunks/630-2bf927bca082a191.js +0 -1
- package/out/_next/static/chunks/647-aa094286bc248d52.js +0 -1
- /package/out/_next/static/{4kCA9l9tPwPykyD2JrIdu → 3cOO4HEvSau6Y1yz7EUS5}/_ssgManifest.js +0 -0
package/.eslintignore
CHANGED
package/out/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-24ddb02bea621501.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-e3718a2c5ee36f46.js" defer=""></script><script src="/_next/static/chunks/pages/_error-fedd2c6ebd3d27b9.js" defer=""></script><script src="/_next/static/3cOO4HEvSau6Y1yz7EUS5/_buildManifest.js" defer=""></script><script src="/_next/static/3cOO4HEvSau6Y1yz7EUS5/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"3cOO4HEvSau6Y1yz7EUS5","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,u,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,d,n,u,h,f,k,j,l,p,g,o,r,m,_,y){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,e,p,g,"static/chunks/pages/index-40fafc651e4e3685.js"],"/_error":["static/chunks/pages/_error-fedd2c6ebd3d27b9.js"],"/changelog":[c,t,"static/chunks/870-a72b74312773efea.js","static/chunks/pages/changelog-8514e0696e90a1b2.js"],"/changes":[c,i,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-fa4f2563cb5fd014.js",a,d,"static/css/d98ebc475f8423a3.css","static/chunks/pages/changes-8af4acbb8f974cb2.js"],"/custom-types":[s,e,p,g,"static/chunks/pages/custom-types-7a68a3b96227a3e7.js"],"/custom-types/[customTypeId]":[c,n,u,h,f,s,t,b,k,o,a,e,j,l,r,m,"static/chunks/pages/custom-types/[customTypeId]-7a7d9d920c64b34b.js"],"/labs":["static/chunks/pages/labs-56fd818a63553497.js"],"/page-types/[pageTypeId]":[c,n,u,h,f,s,t,b,k,o,a,e,j,l,r,m,"static/chunks/pages/page-types/[pageTypeId]-50bbb6b2d4870d26.js"],"/slices":[c,i,_,s,b,y,a,d,l,"static/css/efa5152b7c0f35c0.css","static/chunks/pages/slices-81c1c3f1bcad60f4.js"],"/slices/[lib]/[sliceName]/[variation]":[c,i,n,u,h,f,_,s,t,b,k,y,"static/chunks/484-3e011e79c41f0342.js",a,j,d,"static/css/e8e03c0d4003d1eb.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-e973a443d8b8a75d.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[i,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/429-75740c7d201da3a4.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-faeb6d2f77d97096.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/397-e6c340070a3bcb41.js","static/chunks/59b4e022-ef680789f7cc9b11.js","static/chunks/34-28725deef8b874b1.js","static/chunks/603-a9b88d45a34ae9e9.js","static/chunks/183-4ea255b867ff171b.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/344-fdb3008f4bb3b0c1.js","static/chunks/658-8231c0b729e0124a.js","static/chunks/f36c6662-1f3a854183168b10.js","static/chunks/4c744e84-480e426e4b1cfef3.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-09fb3b997ad1eb70.js","static/chunks/256-07f768a2b19b0a0e.js","static/chunks/630-29fe0800ff72bf48.js","static/chunks/907-180eb33eefccc237.js","static/chunks/248-9279b5f2476db636.js","static/css/4e475d945cf8a890.css","static/chunks/422-c9192a1dbdd2ae0e.js","static/chunks/489-54c4b419d1c29727.js","static/css/56f2a6684a524374.css","static/chunks/52d4c156-89c6ec6efca0a0bb.js","static/chunks/500-d3989390f5e8da53.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[248],{72641:function(e,t,n){"use strict";n.d(t,{R$:function(){return i},Qj:function(){return x},T9:function(){return d},nf:function(){return h},u2:function(){return o},_T:function(){return u}});var l=n(52322),r=n(11699),a=n(6277),s=n(83478),c=n.n(s);let i=e=>{let{backgroundImage:t,style:n,...r}=e,s=void 0!==t;return(0,l.jsx)("article",{...r,className:(0,a.W)(c().root,{[c().withBackground]:s}),style:{backgroundImage:s?"url(".concat(t,")"):void 0,...n}})},o=e=>(0,l.jsx)("div",{...e,className:c().image}),d=e=>(0,l.jsx)("div",{...e,className:c().content}),u=e=>(0,l.jsx)(r.bL,{...e,variant:"h3"}),h=e=>(0,l.jsx)(r.bL,{...e,color:"grey11"}),x=e=>(0,l.jsx)("div",{...e,className:c().actions,color:"grey"})},38241:function(e,t,n){"use strict";n.d(t,{F:function(){return M}});var l=n(52322),r=n(11699),a=n(97729),s=n.n(a),c=n(2784),i=n(43388),o=n(98564),d=n(87446),u=n(58446),h=n(5632),x=n(56580),p=n(75289),m=n(77630),j=n(88932),g=n(94160),b=n(39204);async function f(e){let{id:t,label:n,repeatable:l,format:r,onSuccess:a}=e,s=o.$[r],c=(0,m.Ue)({id:t,label:n,repeatable:l,format:r});try{let{errors:e}=await (0,g.KA)({customType:c});if(e.length>0)throw e;g.Xe.track({event:"custom-type:created",id:c.id,name:n,format:r,type:l?"repeatable":"single",origin:"table"}),await a(c),j.Am.success((0,b.GX)({message:"".concat(s.name({start:!0,plural:!1})," saved successfully at "),path:"./customtypes/".concat(c.id,"/index.json")}))}catch(t){let e="Internal Error: ".concat(s.name({start:!0,plural:!1})," not saved");console.error(e,t),j.Am.error(e)}}var v=n(37427),_=n(59294),y=n(98250),S=n(68968),C=n(59532),k=n(7974),w=n(358),L=n(78254),I=n(54597),R=n(46999),B=n(63397);let N=e=>{let{selected:t,...n}=e;return(0,l.jsx)(p.kC,{sx:{p:"24px",mb:3,alignItems:"top",cursor:"pointer",borderRadius:"6px",backgroundColor:"grayLight",boxShadow:t?e=>{var t;return"0 0 0 2px ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.primary))}:"none","&:hover":{boxShadow:e=>{var t;return"0 0 0 2px ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.primary))}}},...n})},z=e=>{let{format:t}=e,[n,,r]=(0,B.U$)("repeatable"),a=o.$[t];return(0,l.jsxs)(p.xu,{mb:2,children:[(0,l.jsxs)(N,{selected:n.value,onClick:()=>r.setValue(!0),children:[(0,l.jsx)(p.Y8,{checked:n.value,onChange:()=>{},"data-testid":"repeatable-type-radio-btn"}),(0,l.jsxs)(p.xu,{sx:{marginLeft:2},children:["Reusable type",(0,l.jsx)(p.xu,{as:"p",sx:{fontSize:"12px",color:"textClear",mt:1},children:a.hintRepeatable})]})]}),(0,l.jsxs)(N,{selected:!n.value,onClick:()=>r.setValue(!1),children:[(0,l.jsx)(p.Y8,{checked:!n.value,onChange:()=>{},"data-testid":"single-type-radio-btn"}),(0,l.jsxs)(p.xu,{sx:{marginLeft:2},children:["Single type",(0,l.jsx)(p.xu,{as:"p",sx:{fontSize:"12px",color:"textClear",mt:1},children:a.hintSingle})]})]})]})},E=e=>{let{format:t,isCreating:n,isOpen:r,origin:a="table",onCreateChange:s,onOpenChange:i}=e,{createCustomTypeSuccess:d,saveCustomTypeSuccess:u}=(0,I.Z)(),{completeStep:j}=(0,y.k)(),{customTypeIds:g,customTypeLabels:b}=(0,x.v9)(e=>({customTypeIds:(0,L.W6)(e),customTypeLabels:(0,L.YS)(e)})),B=o.$[t],[N,E]=(0,c.useState)(!0),{syncChanges:T}=(0,S.g)(),G=(0,h.useRouter)(),D=async e=>{let{id:n,label:l,repeatable:r,route:c}=e;s(!0),await f({format:t,id:n,label:l,origin:a,repeatable:r,onSuccess:async e=>{d(e);let t=(0,m.y6)(e),l=_.cd[t];E(!0),await G.push({pathname:l.getBuilderPagePathname(n)}),T(),"page"===t&&j("createPageType"),"page"===t&&await (0,v.b)({model:e,newRoute:c,onSuccess:e=>{u(e),T()}})}}),s(!1),i(!1)},W=(e,t,n)=>{n(N?{...t,label:e.target.value,id:(0,w.lV)(e.target.value)}:{...t,label:e.target.value})},P=(e,t)=>{t("id",e.target.value),E(!1)},A=(e,t)=>{t("route",e.target.value)};return(0,l.jsx)(C.Z,{testId:"create-ct-modal",isOpen:r,widthInPx:"530px",formId:"create-custom-type",buttonLabel:"Create",close:()=>{i(!1),E(!0)},onSubmit:e=>{D(e)},isLoading:n,initialValues:{repeatable:!0,id:"",label:"",route:""},validate:e=>{let{id:t,label:n}=e,l={};return n&&n.length||(l.label="Cannot be empty."),!l.label&&b.includes(n)&&(l.label="".concat(B.name({start:!0,plural:!1})," name is already taken.")),["update","insert"].includes(n.toLowerCase())&&(l.label='Name "'.concat(n,'" is reserved for Slice Machine use.')),t&&t.length||(l.id="ID cannot be empty."),["update","insert"].includes(t.toLowerCase())&&(l.id='Id "'.concat(t,'" is reserved for Slice Machine use.')),l.id||!t||k.xo.exec(t)||(l.id="Invalid id: No special characters allowed."),!l.id&&t&&g.map(e=>e.toLowerCase()).includes(t)&&(l.id='ID "'.concat(t,'" exists already.')),Object.keys(l).length>0?l:void 0},content:{title:"Create a new ".concat(B.name({start:!1,plural:!1}))},children:e=>{let{errors:n,setValues:r,setFieldValue:a,values:s,touched:c}=e;return(0,l.jsxs)(p.xu,{children:[(0,l.jsx)(z,{format:t}),(0,l.jsx)(R.W,{name:"label",label:"".concat(B.name({start:!0,plural:!1})," Name"),testId:"ct-name-input",placeholder:"A display name for the ".concat(B.name({start:!1,plural:!1})),error:c.label?n.label:void 0,onChange:e=>W(e,s,r)}),(0,l.jsx)(R.W,{name:"id",testId:"ct-id-input",label:"".concat(B.name({start:!0,plural:!1})," ID"),placeholder:B.inputPlaceholder,error:c.id?n.id:void 0,onChange:e=>P(e,a)}),"page"===t&&(0,l.jsx)(R.W,{name:"route",testId:"ct-route-input",label:"".concat(B.name({start:!0,plural:!1})," Route"),placeholder:"/your-route",error:c.route?n.route:void 0,onChange:e=>A(e,a)})]})}})};var T=n(72641);let G=e=>(0,l.jsxs)("svg",{viewBox:"0 0 20 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"m2 24h16c1.1046 0 2-.8954 2-2v-17l-5-5h-13c-1.10457 0-2 .89543-2 2v20c0 1.1046.89543 2 2 2z",fill:"#6e56cf"}),(0,l.jsx)("path",{d:"m17 5h3l-5-5v3c0 1.10457.8954 2 2 2z",fill:"#9e8cfc"}),(0,l.jsx)("path",{d:"m10.0912 8c-2.8118 0-5.0912 2.2794-5.0912 5.0912s2.2794 5.0912 5.0912 5.0912c1.8851 0 3.5303-1.0247 4.4098-2.5452.1553-.2684.2868-.5523.3916-.8489.092-.2604-.0444-.5461-.3048-.6381-.2603-.092-.546.0445-.638.3048-.0841.238-.1897.4659-.3144.6815-.7081 1.2241-2.0305 2.0459-3.5442 2.0459-2.2595 0-4.0912-1.8317-4.0912-4.0912s1.8317-4.0912 4.0912-4.0912c1.3566 0 2.5595.66 3.3043 1.6782h-1.7739c-.2761 0-.5.2239-.5.5 0 .2762.2239.5.5.5h2.6782c.2762 0 .5-.2238.5-.5v-2.6782c0-.2761-.2238-.5-.5-.5-.2761 0-.5.2239-.5.5v1.1032c-.9281-.9865-2.2462-1.6032-3.7086-1.6032z",fill:"#fff"})]}),D=e=>(0,l.jsxs)("svg",{viewBox:"0 0 20 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"m2 24h16c1.1046 0 2-.8954 2-2v-17l-5-5h-13c-1.10457 0-2 .89543-2 2v20c0 1.1046.89543 2 2 2z",fill:"#6e56cf",fillRule:"nonzero"}),(0,l.jsx)("path",{d:"m17 5h3l-5-5v3c0 1.10457.8954 2 2 2z",fill:"#9e8cfc",fillRule:"nonzero"}),(0,l.jsx)("path",{d:"m8.0869 10.6818.5758-2.3031c.0556-.2226.2556-.3787.485-.3787.3253 0 .564.3057.4851.6213l-.5151 2.0605h2.6055l.5758-2.3031c.0557-.2226.2557-.3787.4851-.3787.3253 0 .564.3057.4851.6213l-.5152 2.0605h2.246c.2761 0 .5.2239.5.5 0 .2762-.2239.5-.5.5h-2.496l-.6591 2.6364h2.1551c.2761 0 .5.2238.5.5 0 .2761-.2239.5-.5.5h-2.4051l-.5757 2.3031c-.0557.2226-.2557.3787-.4851.3787-.3253 0-.564-.3057-.4851-.6213l.5152-2.0605h-2.6056l-.5758 2.3031c-.0556.2226-.2556.3787-.4851.3787-.3253 0-.5639-.3057-.485-.6213l.5151-2.0605h-1.9278c-.2761 0-.5-.2239-.5-.5 0-.2762.2239-.5.5-.5h2.1778l.6591-2.6364h-1.8369c-.2761 0-.5-.2238-.5-.5 0-.2761.2239-.5.5-.5zm2.7273 3.6364.659-2.6364h-2.6055l-.6591 2.6364z",fill:"#fff"})]});var W=n(74147),P=n(50477),A=n(94840),$=n(16442);let O=e=>{let{format:t,isCreatingCustomType:n,openCreateCustomTypeModal:a}=e,s=(0,h.useRouter)(),{customTypes:i,updateCustomTypes:d}=(0,P.xU)(t),u=i.sort((e,t)=>e.id.localeCompare(t.id)),p=_.cd[t],m=o.$[t];return(!function(e,t,n){let{storeCustomTypes:l}=(0,x.v9)(e=>({storeCustomTypes:(0,L.Ch)(e).filter($.TG)}));(0,c.useEffect)(()=>{let r=l.filter(e=>{let{local:n}=e;return n.format===t});(r.length!==e.length||r.some(t=>{let n=e.find(e=>e.id===t.local.id);return!n||JSON.stringify(A.Dc.fromSM(t.local))!==JSON.stringify(n)}))&&n(r.map(e=>{let{local:t}=e;return A.Dc.fromSM(t)}))},[t,n,e,l])}(i,t,d),0===u.length)?(0,l.jsxs)(T.R$,{"data-testid":"blank-slate",style:{alignSelf:"center",marginTop:r.t.space[72]},children:[(0,l.jsx)(T.u2,{children:(0,l.jsx)(r.a_,{src:p.blankSlateImage,sizing:"cover"})}),(0,l.jsxs)(T.T9,{children:[(0,l.jsx)(T._T,{children:m.name({start:!0,plural:!0})}),(0,l.jsx)(T.nf,{children:m.blankSlateDescription}),(0,l.jsx)(T.Qj,{children:(0,l.jsx)(r.E,{onClick:a,loading:n,children:"Create"})})]})]}):(0,l.jsx)("div",{children:(0,l.jsxs)(r.bE,{columnLayout:"28px 1fr 1fr 1fr 42px",children:[(0,l.jsx)(r.bH,{children:(0,l.jsxs)(r.bI,{children:[(0,l.jsx)(r.bG,{children:(0,l.jsx)(r.aX,{name:"notes",size:"medium"})}),(0,l.jsx)(r.bG,{children:(0,l.jsx)(r.bL,{color:"grey11",variant:"small",children:"Label"})}),(0,l.jsx)(r.bG,{children:(0,l.jsx)(r.bL,{color:"grey11",variant:"small",children:"API ID"})}),(0,l.jsx)(r.bG,{children:(0,l.jsx)(r.bL,{color:"grey11",variant:"small",children:"Limit"})}),(0,l.jsx)(r.bG,{})]})}),(0,l.jsx)(r.bF,{children:u.map(e=>{let{repeatable:n,label:a,id:c}=e;return(0,l.jsxs)(r.bI,{onClick:()=>{s.push(_.cd[t].getBuilderPagePathname(c))},children:[(0,l.jsx)(r.bG,{children:n?(0,l.jsx)(G,{width:r.t.space[20]}):(0,l.jsx)(D,{width:r.t.space[20]})}),(0,l.jsx)(r.bG,{children:(0,l.jsx)(r.bL,{variant:"bold",noWrap:!0,children:a})}),(0,l.jsx)(r.bG,{children:(0,l.jsx)(r.bL,{color:"grey11",noWrap:!0,children:c})}),(0,l.jsx)(r.bG,{children:(0,l.jsx)(r.bL,{color:"grey11",noWrap:!0,children:n?"Reusable":"Single"})}),(0,l.jsx)(r.bG,{children:(0,l.jsx)(W._,{isChangesLocal:!1,format:t,customType:e})})]},c)})})]})})},M=e=>{let{format:t}=e,n=o.$[t],[a,h]=(0,c.useState)(!1),[x,p]=(0,c.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s(),{children:(0,l.jsxs)("title",{children:[n.name({start:!0,plural:!0})," - Slice Machine"]})}),(0,l.jsx)(d.h,{renderError:()=>(0,l.jsx)(u.LN,{children:(0,l.jsx)(u.RN,{children:(0,l.jsx)(r.D,{alignItems:"center",justifyContent:"center",children:(0,l.jsx)(r.ax,{title:"Request failed",description:"An error occurred while fetching your ".concat(n.name({start:!1,plural:!0}),".")})})})}),children:(0,l.jsx)(c.Suspense,{fallback:(0,l.jsxs)(u.LN,{children:[(0,l.jsxs)(u.wd,{children:[(0,l.jsx)(u.Cx,{children:(0,l.jsx)(i.g,{children:n.name({start:!0,plural:!0})})}),(0,l.jsx)(u.K2,{children:(0,l.jsx)(r.E,{disabled:!0,startIcon:"add",children:"Create"})})]}),(0,l.jsx)(u.RN,{children:(0,l.jsx)(r.bg,{})})]}),children:(0,l.jsxs)(u.LN,{children:[(0,l.jsxs)(u.wd,{children:[(0,l.jsx)(u.Cx,{children:(0,l.jsx)(i.g,{children:n.name({start:!0,plural:!0})})}),(0,l.jsx)(u.K2,{children:(0,l.jsx)(r.E,{"data-testid":"create-ct",loading:a,onClick:()=>{p(!0)},startIcon:"add",children:"Create"})})]}),(0,l.jsx)(u.RN,{children:(0,l.jsxs)(r.D,{flexDirection:"column",children:[(0,l.jsx)(O,{format:t,isCreatingCustomType:a,openCreateCustomTypeModal:()=>{p(!0)}}),(0,l.jsx)(E,{format:t,isCreating:a,isOpen:x,onCreateChange:h,onOpenChange:p})]})})]})})})]})}},30527:function(e,t,n){"use strict";n.d(t,{Z:function(){return o},W:function(){return i}});var l=n(52322),r=n(2784),a=n(75289);let s=e=>{let{bg:t,background:n,sx:r,withRadius:s,radius:c,children:i}=e;return(0,l.jsx)(a.xu,{sx:{p:4,bg:t||n,...s?{borderBottomLeftRadius:c,borderBottomRightRadius:c}:null,...r},children:i})},c=(0,r.createContext)("6px"),i=()=>(0,r.useContext)(c),o=e=>{let{Header:t=null,SubHeader:n=null,Body:r=null,Footer:i=null,borderFooter:o=!1,radius:d="6px",bodySx:u={},footerSx:h={},sx:x=null,bg:p,background:m,children:j,...g}=e;return(0,l.jsx)(c.Provider,{value:d,children:(0,l.jsxs)(a.Zb,{sx:{border:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))},borderRadius:d,...x},...g,children:[t||null,n||null,(0,l.jsxs)(s,{bg:p,background:m,sx:u,withRadius:!i,children:[r?(0,l.jsx)(r,{}):null,j||null]}),i?(0,l.jsx)(s,{bg:p,background:m,sx:{...o?{borderTop:e=>{let{colors:t}=e;return"1px solid ".concat(String(null==t?void 0:t.borders))}}:null,...h},radius:d,withRadius:!0,children:"object"==typeof i?i:(0,l.jsx)(i,{})}):null]})})}},7974:function(e,t,n){"use strict";n.d(t,{Sn:function(){return c},lS:function(){return l},nG:function(){return r},pq:function(){return i},rd:function(){return s},xo:function(){return a}});let l=["components","update","insert"],r=["png","jpg","jpeg"],a=/^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)*$/,s="placeholders/What_are_Slices_mrvome",c="SM_HELP_VIDEOS/mock_data",i="slice-machine-simulator"},83478:function(e){e.exports={column:"BlankSlate_column__genEe",root:"BlankSlate_root__CmSqW BlankSlate_column__genEe",fadeIn:"BlankSlate_fadeIn__mAfi5",withBackground:"BlankSlate_withBackground__mLYij",image:"BlankSlate_image__Jn90S BlankSlate_column__genEe",content:"BlankSlate_content__0Yt2d BlankSlate_column__genEe",desc:"BlankSlate_desc___Dl7e",actions:"BlankSlate_actions__OYRj4"}}}]);
|