slice-machine-ui 2.16.2-alpha.xru-bug-report.1 → 2.16.2-alpha.xru-move-folder-cr-fields.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/out/404.html +1 -1
- package/out/_next/static/Y0n_ehf5jwj1lOSKhxFsr/_buildManifest.js +1 -0
- package/out/_next/static/chunks/248-03446cd9e9f13730.js +1 -0
- package/out/_next/static/chunks/268-6a9214b97195af9c.js +1 -0
- package/out/_next/static/chunks/33641354.3864aefb6106ae71.js +28 -0
- package/out/_next/static/chunks/34-e684c5fd75cc9dd0.js +1 -0
- package/out/_next/static/chunks/630-c8d4ab30710194ba.js +1 -0
- package/out/_next/static/chunks/647-7b9b5aa9468f9e4b.js +1 -0
- package/out/_next/static/chunks/882-53d88aa0b7e3ffeb.js +1 -0
- package/out/_next/static/chunks/pages/_app-faa8182bad56d262.js +708 -0
- package/out/_next/static/chunks/pages/changelog-063c5e11dfc8fd55.js +1 -0
- package/out/_next/static/chunks/pages/changes-564336edb0ed18b0.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-389d1b7a492fb3e7.js → [customTypeId]-a408f5a660e096a6.js} +1 -1
- package/out/_next/static/chunks/pages/{custom-types-2a5fd94ee42ba593.js → custom-types-5acd56959b60346f.js} +1 -1
- package/out/_next/static/chunks/pages/{index-02dd147957c8b40f.js → index-0d8cb369de720a35.js} +1 -1
- package/out/_next/static/chunks/pages/labs-9630bfb1005be02b.js +1 -0
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-3589bd1f9138a97b.js → [pageTypeId]-f5e851ebe35049a8.js} +1 -1
- package/out/_next/static/chunks/pages/settings-01f4aeb9112a1f87.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-5008e29008aa04f4.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-94c9cad9da2c3089.js +1 -0
- package/out/_next/static/chunks/pages/slices-4a60cd5f2c71327e.js +1 -0
- package/out/_next/static/chunks/webpack-b3522fdebabf510a.js +1 -0
- package/out/_next/static/css/cc9b10286400c2b9.css +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/settings.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 +6 -6
- package/src/features/builder/fields/ContentRelationshipFieldPicker.tsx +1224 -0
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +2 -4
- package/src/features/customTypes/customTypesTable/{useCustomTypes.ts → useCustomTypesAutoRevalidation.tsx} +1 -34
- package/src/features/customTypes/useCustomTypes.ts +48 -0
- package/src/legacy/lib/models/common/widgets/ContentRelationship/Form.tsx +35 -77
- package/src/legacy/lib/models/common/widgets/ContentRelationship/index.ts +44 -14
- package/src/legacy/lib/models/common/widgets/Link/index.ts +1 -1
- package/src/utils/isValidObject.ts +32 -0
- package/out/_next/static/8q2yFutD52CGaXBjZX6C_/_buildManifest.js +0 -1
- package/out/_next/static/chunks/268-6d5fc7642a1b87c8.js +0 -1
- package/out/_next/static/chunks/34-2911c905c8a6e9d9.js +0 -1
- package/out/_next/static/chunks/630-93339694ef30b82d.js +0 -1
- package/out/_next/static/chunks/867-8164160c810122c6.js +0 -1
- package/out/_next/static/chunks/882-28837678beff7e51.js +0 -1
- package/out/_next/static/chunks/895-8c214ba470a4e23c.js +0 -1
- package/out/_next/static/chunks/pages/_app-ca94201d2943fc7b.js +0 -657
- package/out/_next/static/chunks/pages/changelog-80a618708f44f25f.js +0 -1
- package/out/_next/static/chunks/pages/changes-d40c17939854b984.js +0 -1
- package/out/_next/static/chunks/pages/labs-c6df252ea5d8fb6f.js +0 -1
- package/out/_next/static/chunks/pages/settings-170379902605f38a.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-063fa88ba75f483e.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-6de02b8ed13b680d.js +0 -1
- package/out/_next/static/chunks/pages/slices-071bb494907adf0f.js +0 -1
- package/out/_next/static/chunks/webpack-2f903acb0cccbf9e.js +0 -1
- package/out/_next/static/css/9c9a7de81f9ac811.css +0 -1
- /package/out/_next/static/{8q2yFutD52CGaXBjZX6C_ → Y0n_ehf5jwj1lOSKhxFsr}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[867],{77630:function(e,t,n){n.d(t,{AK:function(){return v},E3:function(){return p},EN:function(){return m},F$:function(){return x},H8:function(){return S},HO:function(){return h},L4:function(){return g},N3:function(){return c},Tr:function(){return d},Ue:function(){return w},eK:function(){return C},gR:function(){return b},j5:function(){return a},mf:function(){return f},vB:function(){return y},xS:function(){return j},y6:function(){return i}});var r=n(98863),o=n(88866);function i(e){var t;return null!==(t=e.format)&&void 0!==t?t:"custom"}function l(e){return Object.entries(e.json)}function s(e){return l(e).find(e=>{let[t,n]=e;return Object.values(n).some(e=>"UID"===e.type)})}function a(e){var t;let[n,r]=null!==(t=s(e))&&void 0!==t?t:[];return Object.entries(null!=r?r:{}).find(e=>{let[t,n]=e;return"UID"===n.type})}function c(e){var t,n;return null!==(n=null==e?void 0:null===(t=e.config)||void 0===t?void 0:t.label)&&void 0!==n?n:void 0}function u(e,t){let n=e.json[t];if(void 0!==n)return Object.entries(n).find(e=>{let[t,n]=e;return n.type===o.SlicesFieldType})}function d(e,t){if(function(e,t){var n;let r=u(e,t),[o,i]=null!=r?r:[];return null!==(n=null==i?void 0:i.config)&&void 0!==n?n:void 0}(e,t))return e;let n=function(e,t){let n;let r=l(e),i=r.findIndex(e=>{let[n]=e;return n===t}),s=r.flatMap(e=>{let[t,n]=e;return Object.keys(n).filter(e=>n[e].type===o.SlicesFieldType)}),a=i;do n="slices".concat(0!==a?a.toString():""),a++;while(s.includes(n));return n}(e,t);return{...e,json:{...e.json,[t]:{...e.json[t],[n]:{type:o.SlicesFieldType,fieldset:"Slice Zone"}}}}}function p(e,t){let n=e.json[t];if(void 0===n)return e;let i=Object.keys(n).find(e=>n[e].type===o.SlicesFieldType);if(void 0===i)return e;let l=(0,r.ud)(n,i);return{...e,json:{...e.json,[t]:l}}}function m(e){var t,n;let{customType:i,sectionId:l,sliceId:s}=e,a=i.json[l];if(void 0===a)return i;let c=Object.keys(a).find(e=>a[e].type===o.SlicesFieldType);if(void 0===c)return i;let u=a[c];if(u.type!==o.SlicesFieldType)return i;let d=(0,r.ud)(null!==(n=null===(t=u.config)||void 0===t?void 0:t.choices)&&void 0!==n?n:{},s);return{...i,json:{...i.json,[l]:{...a,[c]:{...u,config:{...u.config,choices:d}}}}}}function f(e){let t={...e,format:"page"},n=l(e)[0];if(n){let[e]=n;t=d(t,e)}return t}function y(e,t){return{...e,json:{...e.json,[t]:{}}}}function x(e,t){let n=(0,r.ud)(e.json,t);return{...e,json:n}}function h(e,t,n){if(t===n)return e;let r=Object.keys(e.json).reduce((r,o)=>(o===t?r[n]=e.json[o]:r[o]=e.json[o],r),{});return{...e,json:r}}function j(e){let{customType:t,sectionId:n,newField:r,newFieldId:i}=e,l=t.json[n],s=u(t,n),a={...Object.fromEntries(Object.entries(l).filter(e=>{let[t,n]=e;return n.type!==o.SlicesFieldType})),[i]:r};if(void 0!==s){let[e,t]=s;a[e]=t}return T({customType:t,sectionId:n,updatedSection:a})}function v(e){let{customType:t,sectionId:n,fieldId:o}=e,i=(0,r.ud)(t.json[n],o);return T({customType:t,sectionId:n,updatedSection:i})}function g(e){let{customType:t,sectionId:n,previousFieldId:r,newFieldId:o,newField:i}=e,l=I({fields:t.json[n],previousFieldId:r,newFieldId:o,newField:i});return T({customType:t,sectionId:n,updatedSection:l})}function b(e){let{customType:t,sectionId:n,sourceIndex:r,destinationIndex:i}=e,l=t.json[n],s=u(t,n),a=Object.fromEntries(Object.entries(l).filter(e=>{let[t,n]=e;return n.type!==o.SlicesFieldType})),c="page"===t.format&&t.repeatable,d=Object.fromEntries(Object.entries(a).filter(e=>{let[t,n]=e;return"UID"!==n.type})),p=function(e){let{fields:t,sourceIndex:n,destinationIndex:r}=e,o=Object.entries(t),[i]=o.splice(n,1);return o.splice(r,0,i),Object.fromEntries(o)}({fields:c?d:a,sourceIndex:r,destinationIndex:i});if(void 0!==s){let[e,t]=s;p[e]=t}let m=Object.entries(p),f=Object.entries(a).find(e=>{let[t,n]=e;return"UID"===n.type});f&&m.unshift(f);let y=Object.fromEntries(m);return T({customType:t,sectionId:n,updatedSection:c?y:p})}function S(e,t){let n=l(t)[0],[r]=null!=n?n:[];return void 0===r?t:j({customType:t,sectionId:r,newField:{type:"UID",config:{label:e}},newFieldId:"uid"})}function C(e,t){var n,r;let[o]=null!==(n=s(t))&&void 0!==n?n:[],[i,l]=null!==(r=a(t))&&void 0!==r?r:[];if(!l||void 0===i||void 0===o)return t;let c=I({fields:t.json[o],previousFieldId:i,newFieldId:i,newField:{...l,config:{...l.config,label:e}}});return T({customType:t,sectionId:o,updatedSection:c})}function T(e){let{customType:t,sectionId:n,updatedSection:r}=e;return{...t,json:{...t.json,[n]:r}}}function I(e){let{fields:t,previousFieldId:n,newFieldId:r,newField:o}=e;return Object.entries(t).reduce((e,t)=>{let[i,l]=t;return i===n?e[r]=o:i!==r&&(e[i]=l),e},{})}function w(e){let{id:t,label:n,repeatable:r,format:o}=e,i=!1===r&&"page"===o?{...O,...R}:!1===r?k:"page"===o?{...N,...R}:F;return{format:o,id:t,json:i,label:n,repeatable:r,status:!0}}let k={Main:{}},O={Main:{slices:{config:{choices:{}},fieldset:"Slice Zone",type:"Slices"}}},F={Main:{uid:{type:"UID",config:{label:"UID"}}}},N={Main:{...F.Main,...O.Main}},R={"SEO & Metadata":{meta_title:{config:{label:"Meta Title",placeholder:"A title of the page used for social media and search engines"},type:"Text"},meta_description:{config:{label:"Meta Description",placeholder:"A brief summary of the page"},type:"Text"},meta_image:{config:{constraint:{height:1260,width:2400},label:"Meta Image",thumbnails:[]},type:"Image"}}}},60867:function(e,t,n){n.d(t,{_:function(){return N}});var r=n(52322),o=n(7729),i=n(5632),l=n(2784),s=n(65186),a=n(59326),c=n(75289),u=n(88932),d=n(80148),p=n(98564);async function m(e){let{customType:t,onSuccess:n}=e,r=p.$[t.format];try{let{errors:e}=await d.managerClient.customTypes.deleteCustomType({id:t.id});if(e.length>0)throw e;n(),u.Am.success("".concat(r.name({start:!0,plural:!1})," deleted"))}catch(t){let e="Internal Error: ".concat(r.name({start:!0,plural:!1})," could not be deleted");console.error(e,t),u.Am.error(e)}}var f=n(33986),y=n(30527),x=n(55862),h=n(54597);let j=e=>{var t;let{customType:n,format:o,onClose:i,onDeleteCustomTypeSuccess:u}=e,d=p.$[o],[j,v]=(0,l.useState)(!1),{deleteCustomTypeSuccess:g}=(0,h.Z)(),b=async()=>{v(!0),await m({customType:n,onSuccess:()=>g(n.id)}),u()},{theme:S}=(0,a.B7)();return(0,r.jsx)(x.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:()=>i(),children:(0,r.jsx)(y.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:(0,r.jsxs)(c.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,r.jsxs)(c.kC,{sx:{alignItems:"center"},children:[(0,r.jsx)(s.$vK,{size:20,color:null===(t=S.colors)||void 0===t?void 0:t.greyIcon}),(0,r.jsxs)(c.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:["Delete"," ",d.name({start:!1,plural:!1})]})]}),(0,r.jsx)(c.x8,{type:"button",onClick:()=>i()})]}),Footer:()=>(0,r.jsxs)(c.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"gray"},children:[(0,r.jsx)(f.z,{label:"Cancel",variant:"secondary",onClick:()=>i(),sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),void 0!==n&&(0,r.jsx)(f.z,{label:"Delete",variant:"danger",isLoading:j,onClick:()=>void b(),sx:{minHeight:39,minWidth:78}})]}),children:(0,r.jsxs)("div",{children:["This action will immediately make the following change:",(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:["Delete the"," ",(0,r.jsxs)(c.xv,{sx:{fontWeight:"bold"},children:["customtypes/",null==n?void 0:n.id,"/"]})," ","directory."]})}),"The next time you push your changes to Prismic, the following change will happen:",(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:["Remove the"," ",d.name({start:!1,plural:!1})," and any associated Documents from your repository."]})})]})})})};var v=n(56580);async function g(e){let{model:t,newLabel:n,onSuccess:r}=e,o=p.$[t.format];try{let e={...t,label:n},{errors:i}=await d.managerClient.customTypes.renameCustomType({model:e});if(i.length>0)throw i;r(e),u.Am.success("".concat(o.name({start:!0,plural:!1})," renamed"))}catch(t){let e="Internal Error: ".concat(o.name({start:!0,plural:!1})," could not be renamed");console.error(e,t),u.Am.error(e)}}var b=n(68968),S=n(78254),C=n(59532),T=n(46999);let I=e=>{var t,n;let{isChangesLocal:o,customType:i,format:s,onClose:a,setLocalCustomType:u}=e,d=null!==(t=null==i?void 0:i.label)&&void 0!==t?t:"",m=null!==(n=null==i?void 0:i.id)&&void 0!==n?n:"",{renameCustomTypeSuccess:f}=(0,h.Z)(),{syncChanges:y}=(0,b.g)(),[x,j]=(0,l.useState)(!1),I=async e=>{j(!0),o&&u?u({customType:{...i,label:e.customTypeName}}):await g({model:i,newLabel:e.customTypeName,onSuccess:e=>{f(e),y()}}),j(!1),a()},{customTypeLabels:w}=(0,v.v9)(e=>({customTypeLabels:(0,S.YS)(e)})),k=p.$[s];return(0,r.jsx)(C.Z,{isOpen:!0,testId:"rename-custom-type-modal",widthInPx:"530px",formId:"rename-custom-type-modal-".concat(m),buttonLabel:"Rename",close:a,onSubmit:e=>void I(e),initialValues:{customTypeName:d},isLoading:x,content:{title:"Rename a ".concat(k.name({start:!1,plural:!1}))},validate:e=>{let{customTypeName:t}=e,n={};return t&&t.length||(n.customTypeName="Cannot be empty."),void 0!=n.customTypeName&&w.includes(t)&&d!==t&&(n.customTypeName="".concat(k.name({start:!0,plural:!1})," name is already taken.")),["update","insert"].includes(t.toLowerCase())&&(n.customTypeName='Name "'.concat(t,'" is reserved for Slice Machine use.')),Object.keys(n).length>0?n:void 0},children:e=>{let{errors:t}=e;return(0,r.jsx)(c.xu,{children:(0,r.jsx)(T.W,{name:"customTypeName",label:"".concat(k.name({start:!0,plural:!1})," Name"),placeholder:"A display name for the ".concat(k.name({start:!1,plural:!1})),error:t.customTypeName,testId:"custom-type-name-input"})})}})};var w=n(94160),k=n(77630);async function O(e,t){let n=p.$[e.format];try{let r=(0,k.mf)(e),{errors:o}=await (0,w.KA)({customType:r});if(o.length>0)throw o;t(r),u.Am.success("".concat(n.name({start:!0,plural:!1})," converted to page type"))}catch(t){let e="Internal Error: ".concat(n.name({start:!0,plural:!1})," not converted to page type");console.error(e,t),u.Am.error(e)}}var F=n(59294);let N=e=>{let{format:t,customType:n,isChangesLocal:s,setLocalCustomType:a}=e,c=(0,i.useRouter)(),{saveCustomTypeSuccess:u}=(0,h.Z)(),[d,p]=(0,l.useState)(!1),[m,f]=(0,l.useState)(!1),[y,x]=(0,l.useState)(!1),v=async()=>{x(!0),await O(n,u);let e=F.cd.custom.getBuilderPagePathname(n.id);if(c.asPath===e){let e=F.cd.page.getBuilderPagePathname(n.id);c.replace(e),x(!1)}else x(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.h_2,{children:[(0,r.jsx)(o.$FS,{disabled:y,children:(0,r.jsx)(o.hU,{color:"grey","data-testid":"editDropdown",hiddenLabel:"Custom type actions",icon:"moreVert",loading:y,variant:"solid"})}),(0,r.jsxs)(o.AWV,{align:"end",children:[(0,r.jsx)(o.Xiv,{startIcon:(0,r.jsx)(o.JO$,{name:"edit"}),onSelect:()=>{f(!0)},children:"Rename"}),"custom"===t&&!s&&(0,r.jsx)(o.Xiv,{startIcon:(0,r.jsx)(o.JO$,{name:"driveFileMove"}),onSelect:()=>void v(),children:"Convert to page type"}),(0,r.jsx)(o.Xiv,{color:"tomato",startIcon:(0,r.jsx)(o.JO$,{name:"delete"}),onSelect:()=>{p(!0)},children:"Remove"})]})]}),d?(0,r.jsx)(j,{format:t,customType:n,onClose:()=>p(!1),onDeleteCustomTypeSuccess:()=>{var e;let{tablePagePathname:t}=F.cd[null!==(e=n.format)&&void 0!==e?e:"custom"];c.asPath!==t?c.replace(t):p(!1)}}):null,m?(0,r.jsx)(I,{format:t,customType:n,isChangesLocal:s,onClose:()=>f(!1),setLocalCustomType:a}):null]})}},33986:function(e,t,n){n.d(t,{z:function(){return a}});var r=n(52322),o=n(2784),i=n(75289);let l=(e,t)=>e?"".concat(e,"-").concat(t):"",s=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},a=(0,o.forwardRef)((e,t)=>{let{label:n,Icon:o,type:a,form:c,isLoading:u=!1,disabled:d=!1,onClick:p,sx:m={},iconSize:f=16,iconFill:y,variant:x="primary",...h}=e;return(0,r.jsx)(i.zx,{ref:t,sx:{...m,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...u?{cursor:"wait !important"}:{}},type:a,form:c,disabled:d||u,onClick:u?void 0:p,variant:x,...h,children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$j,{size:f,color:s(x),"data-testid":l(h["data-testid"],"spinner")}),o&&n]}):(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)(o,{size:f,fill:y,"data-testid":l(h["data-testid"],"icon")}),n]})})})},46999:function(e,t,n){n.d(t,{W:function(){return l}});var r=n(52322),o=n(63397);n(2784);var i=n(75289);let l=e=>{let{name:t,label:n,placeholder:l,error:s,testId:a,onChange:c}=e;return(0,r.jsxs)(i.xu,{mb:3,children:[(0,r.jsx)(i.__,{htmlFor:t,mb:2,children:n}),(0,r.jsx)(o.gN,{name:t,type:"text",placeholder:l,as:i.II,autoComplete:"off",...c?{onChange:c}:null,...a?{"data-testid":a}:null}),s?(0,r.jsx)(i.xv,{"data-testid":a?"".concat(a,"-error"):"input-error",sx:{color:"error",mt:1},children:s}):null]})}},59532:function(e,t,n){var r=n(52322),o=n(63397),i=n(37149),l=n.n(i),s=n(75289),a=n(33986),c=n(55862),u=n(30527);function d(e){let{children:t}=e,n=(0,u.W)();return(0,r.jsx)(s.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}t.Z=function(e){let{children:t,close:n,isOpen:i,formId:p,validate:m,onSubmit:f,widthInPx:y,initialValues:x,content:{title:h},cardProps:j,omitFooter:v=!1,isLoading:g=!1,buttonLabel:b="Save",testId:S,actionMessage:C}=e;return l().setAppElement("#__next"),(0,r.jsx)(c.Z,{isOpen:i,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:h,style:{content:{width:null!=y?y:"900px"}},children:(0,r.jsx)(o.J9,{initialValues:x,validate:e=>m?m(e):void 0,onSubmit:e=>{f(e)},children:e=>{let{isValid:i,isSubmitting:l,values:c,errors:m,touched:f,setFieldValue:y,setValues:x}=e;return(0,r.jsx)(o.l0,{id:p,...null!=S?{"data-testid":S}:null,children:(0,r.jsx)(u.Z,{borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"},...j,Header:(0,r.jsxs)(d,{children:[(0,r.jsx)(s.X6,{sx:{fontSize:"20px"},children:h}),(0,r.jsx)(s.x8,{type:"button",onClick:n})]}),Footer:v?null:(0,r.jsxs)(s.kC,{sx:{alignItems:"space-between"},children:[(0,r.jsx)(s.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof C?C(e):C}),(0,r.jsxs)(s.kC,{sx:{ml:"auto"},children:[(0,r.jsx)(s.zx,{mr:2,type:"button",onClick:n,variant:"secondary",disabled:l||g,children:"Cancel"}),(0,r.jsx)(a.z,{label:b,form:p,type:"submit",disabled:!i||l||g,isLoading:l||g,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:t({isValid:i,isSubmitting:l,values:c,errors:m,touched:f,setFieldValue:y,setValues:x})})})}})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[882],{60882:function(e,t,l){"use strict";l.d(t,{H:function(){return e8}});var n=l(52322),i=l(7729),a=l(97729),o=l.n(a),r=l(5632),s=l(2784),c=l(56580),d=l(43388),u=l(77630),m=l(23094),h=l(59294),x=l(51384),p=l(74217),v=l(94160),y=l(68968),f=l(23710),g=l(54597),b=l(98564);let j=(0,s.createContext)(void 0);function S(e){let{children:t,initialCustomType:l}=e,[i,a]=(0,s.useState)(l),o=(0,u.y6)(i),r=b.$[o],{actionQueueStatus:c,setNextAction:d}=(0,f.c)({errorMessage:r.autoSaveFailed}),{refreshState:m}=(0,g.Z)(),h=(0,p.R9)(m),{syncChanges:x}=(0,y.g)(),S=(0,s.useCallback)(e=>{let{customType:t,onSaveCallback:l,updateMeta:n}=e;a(t),d(async()=>{let{errors:e}=await (0,v.KA)({customType:t,updateMeta:n});if(e.length>0)throw e;h(await (0,v.y0)()),x(),null==l||l()})},[d,h,x]),T=(0,s.useMemo)(()=>({actionQueueStatus:c,customType:i,setCustomType:S}),[c,i,S]);return(0,n.jsx)(j.Provider,{value:T,children:"function"==typeof t?t(T):t})}function T(){let e=(0,s.useContext)(j);if(!e)throw Error("CustomTypeProvider not found");return e}var I=l(30195);function C(){var e;let[t,l]=(0,s.useState)(!1),{customType:a,setCustomType:o}=T(),[r,c]=null!==(e=(0,u.j5)(a))&&void 0!==e?e:[],d=c?(0,u.N3)(c):"",[m,h]=(0,s.useState)(null!=d?d:""),[x,v]=(0,s.useState)();(0,p.pQ)(t,()=>{t||(h(null!=d?d:""),v(void 0))});let y=(0,s.useCallback)(()=>(0,n.jsx)(i.JO$,{name:c?"language":"add",size:"small",color:"grey11"}),[c]);return(0,n.jsxs)(i.VqE,{open:t,onOpenChange:l,size:"small",trigger:(0,n.jsx)(i.zxk,{color:"grey",textColor:"placeholder",textWeight:"normal",renderStartIcon:y,sx:{marginInline:"auto"},children:c?d:"Add an UID"}),children:[(0,n.jsx)(i.fKu,{title:"Edit the UID label"}),(0,n.jsx)(i.cZJ,{children:(0,n.jsxs)(i.l09,{onSubmit:function(){x||(o({customType:c?(0,u.eK)(m,a):(0,u.H8)(m,a)}),l(!1))},children:[(0,n.jsx)(i.xuv,{flexDirection:"column",padding:16,gap:4,children:(0,n.jsx)(i.ytj,{type:"text",label:"Label *",placeholder:"UID",value:m,onValueChange:function(e){h(e),v(function(e){let t=k.safeParse(e,{errorMap:_});if(t.error)return t.error.errors[0].message}(e))},error:x,description:"A label for the UID"})}),(0,n.jsxs)(i.kXR,{children:[(0,n.jsx)(i.POh,{size:"medium"}),(0,n.jsx)(i._dX,{type:"submit",size:"medium",disabled:!!x,children:"Save"})]})]})})]})}let k=I.z.string().max(35).min(1),_=e=>{switch(e.code){case I.z.ZodIssueCode.too_big:return{message:"The label can't be longer than ".concat(e.maximum," characters")};case I.z.ZodIssueCode.too_small:return{message:"This field is required"};default:return{message:"Invalid value"}}};var w=l(94840),D=l(59532),A=l(63397),E=l(75289);let N=e=>{let{name:t,label:l,placeholder:i,error:a,...o}=e;return(0,n.jsxs)(E.xu,{mb:3,children:[(0,n.jsx)(E.__,{htmlFor:t,mb:2,children:l}),(0,n.jsx)(A.gN,{name:t,type:"text",placeholder:i,as:E.II,autoComplete:"off",...o}),a?(0,n.jsx)(E.xv,{sx:{color:"error",mt:1},children:a}):null]})};var M=e=>{let{isOpen:t,onSubmit:l,close:i,tabIds:a}=e;return(0,n.jsx)(D.Z,{isOpen:t,widthInPx:"530px",formId:"create-tab",close:i,onSubmit:e=>{l(e),i()},initialValues:{id:""},validate:e=>{let{id:t}=e;return t?a.includes(t.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Add Tab"},children:e=>{let{errors:t}=e;return(0,n.jsx)(N,{name:"id",label:"New Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:t.id})}})},O=e=>{let{isOpen:t,onSubmit:l,close:i}=e;return(0,n.jsx)(D.Z,{omitFooter:!0,isOpen:t,widthInPx:"530px",formId:"create-tab",close:i,cardProps:{bodySx:{p:0}},onSubmit:e=>{l(e),i()},initialValues:{},content:{title:"Remove Tab"},children:()=>(0,n.jsxs)(E.xu,{sx:{px:4,py:4},children:[(0,n.jsx)(E.X6,{as:"h4",children:"Remove this tab?"}),(0,n.jsx)(E.xv,{as:"p",color:"textClear",sx:{mt:2},children:"This action cannot be undone."}),(0,n.jsx)(E.zx,{type:"button",variant:"buttons.actionDelete",sx:{mt:3},onClick:()=>{l({}),i()},children:"Yes, remove tab"})]})})},z=e=>{let{isOpen:t,onSubmit:l,close:i,tabIds:a,initialTabKey:o}=e;return(0,n.jsx)(D.Z,{omitFooter:!0,isOpen:t,widthInPx:"530px",formId:"create-tab",close:i,cardProps:{bodySx:{p:0}},onSubmit:e=>{l(e),i()},initialValues:{id:o},validate:e=>{let{id:t}=e;return t?a.includes(t.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Rename Tab"},children:e=>{let{errors:t,values:a,setFieldValue:o,isValid:r}=e;return(0,n.jsxs)(E.xu,{sx:{px:4,py:4},children:[(0,n.jsx)(N,{name:"id",label:"Rename Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:t.id,onBlur:e=>{a.id!==e.target.value&&o("id",e.target.value.trim())},onChange:e=>{o("id",e.target.value)}}),(0,n.jsx)(E.zx,{type:"button",sx:{mt:3,width:"100%"},disabled:!r,onClick:()=>{a.id&&a.id.length&&l({id:a.id.trim()}),i()},children:"Save"})]})}})},Z=l(28316),F=l(88932),P=l(35289),L=l(17378),K=l(45440),R=l(16086),X=l(358),B=l(5495),V=l(39302),U=l(3285),$=l(40141),G=l(65077),J=l(22654),q=l(63470),Q=l(91589),Y=l(27213),H=l(31860);let W=e=>{let{openCreateSliceModal:t,openCreateSliceFromImageModal:l,openUpdateSliceZoneModal:a,openSlicesTemplatesModal:o,projectHasAvailableSlices:r,isSlicesTemplatesSupported:s}=e,c=(0,J.l)(),d=(0,q.k)(),u=(0,Y.F)({menuType:"ActionList",sectionsNamingExperiment:d});return(0,n.jsxs)(i.R$c,{"data-testid":"slice-zone-blank-slate",sx:{width:648},children:[(0,n.jsx)(i.avq,{lineColor:"purple9",backgroundColor:"purple5",name:"add",size:"large"}),(0,n.jsxs)(i._T6,{size:"big",children:["Add ",(0,H._)(d.value)]}),(0,n.jsxs)(i.nfr,{children:[(0,H._)((0,H.f)(d.value))," are website sections that you can reuse on different pages with different content. Each on different pages with different content. Each"," ",d.value," has its own component in your code."]}),(0,n.jsx)(i.QjJ,{children:(0,n.jsxs)(i.S0S,{children:[c.eligible&&(0,n.jsx)(i.F8s,{renderStartIcon:()=>u.fromImage.BackgroundIcon,onClick:l,description:u.fromImage.description,children:u.fromImage.title}),(0,n.jsx)(i.F8s,{renderStartIcon:()=>u.fromScratch.BackgroundIcon,onClick:t,description:u.fromScratch.description,children:u.fromScratch.title}),s&&(0,n.jsx)(i.F8s,{renderStartIcon:()=>u.fromTemplate.BackgroundIcon,onClick:o,description:u.fromTemplate.description,children:u.fromTemplate.title}),r&&(0,n.jsx)(i.F8s,{renderStartIcon:()=>u.fromExisting.BackgroundIcon,onClick:a,description:u.fromExisting.description,children:u.fromExisting.title})]})})]})};var ee=l(98250);function et(e){let{customType:t,tabId:l,slices:n}=e,i={...t};return n.forEach(e=>{i={...i,tabs:i.tabs.map(t=>t.key===l&&t.sliceZone?{...t,sliceZone:{key:t.sliceZone.key,value:[{key:e.id,value:e},...t.sliceZone.value]}}:t)}}),v.Xe.track({event:"custom-type:slice-zone-updated",customTypeId:t.id}),i}var el=l(18566),en=l(80148);async function ei(){try{let{templates:e,errors:t}=await en.managerClient.sliceTemplateLibrary.readLibrary({});if(t.length>0)throw t;return e.map(e=>({model:e.model,screenshots:Object.fromEntries(Object.entries(e.screenshots).map(e=>{let[t,l]=e;return[t,URL.createObjectURL(l)]}))}))}catch(e){return[]}}var ea=l(6256),eo=l(39204),er=l(7723),es=l(33986),ec=l(30527),ed=l(55862);let eu=e=>{let{deleteSliceZone:t,closeDeleteSliceZoneModal:l}=e;return(0,n.jsx)(ed.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:l,children:(0,n.jsx)(ec.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:(0,n.jsxs)(E.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,n.jsx)(E.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Do you really want to delete Slice Zone?"}),(0,n.jsx)(E.x8,{type:"button",onClick:l})]}),Footer:()=>(0,n.jsxs)(E.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"gray"},children:[(0,n.jsx)(es.z,{label:"Cancel",variant:"secondary",onClick:l,sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,n.jsx)(es.z,{label:"Delete",variant:"danger",onClick:t,sx:{minHeight:39,minWidth:78}})]}),children:(0,n.jsx)(E.nv,{children:"You're about to delete Slice Zone."})})})};var em=l(43776),eh=l(62434),ex=l(63908),ep=l(63019),ev=l(65375),ey=l.n(ev);let ef=e=>{var t;let{isOpen:l,close:a,onSubmit:o,isLoading:r,slice:d,libraries:u}=e,{remoteSlices:m}=(0,c.v9)(e=>({remoteSlices:(0,er.sT)(e)})),h={from:null===(t=u[0])||void 0===t?void 0:t.name,sliceName:(0,X.MP)(d.key)},[x,v]=(0,s.useState)(h),[y,f]=(0,s.useState)();function g(e){v(e),f((0,ep.h)(e,u,m))}return(0,p.pQ)(l,()=>{l||(v(h),f(void 0))}),(0,n.jsxs)(i.VqE,{open:l,onOpenChange:e=>!e&&a(),size:{width:448,height:"auto"},children:[(0,n.jsx)(i.fKu,{title:"Upgrade slice"}),(0,n.jsx)(i.cZJ,{children:(0,n.jsx)(i.l09,{onSubmit:function(){y&&Object.keys(y).length>0||o({libraryID:x.from,sliceID:x.sliceName})},children:(0,n.jsxs)(i.xuv,{flexDirection:"column",children:[(0,n.jsxs)(i.xrM,{className:ey().scrollArea,children:[(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"This will create a new slice with the same fields. The new slice will replace the legacy slice in all of your types, and the existing slice content will be re-mapped to the new slice."}),(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"This will not migrate your component. You will need to do that manually."}),(0,n.jsxs)(i.xuv,{flexDirection:"column",gap:4,children:[(0,n.jsx)(i.ytj,{label:"Slice name *",placeholder:"Pascalised Slice API ID (e.g. ".concat((0,X.MP)(d.key),")"),error:null==y?void 0:y.sliceName,value:x.sliceName,onValueChange:e=>g({...x,sliceName:e.slice(0,30)}),"data-testid":"slice-name-input"}),(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"A display name for the slice"})]}),(0,n.jsxs)(i.xuv,{flexDirection:"column",gap:4,children:[(0,n.jsx)("label",{className:ey().label,children:(0,n.jsx)(i.xvT,{variant:"bold",children:"Slice library *"})}),(0,n.jsx)(i.PhF,{size:"medium",color:"grey",startIcon:"folder",flexContent:!0,value:x.from,onValueChange:e=>{e&&g({...x,from:e})},children:u.map(e=>(0,n.jsx)(i.QlF,{value:e.name,children:e.name},e.name))}),(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"The library where we'll store your slice"})]})]}),(0,n.jsxs)(i.kXR,{children:[(0,n.jsx)(i.POh,{size:"medium"}),(0,n.jsx)(i._dX,{type:"submit",size:"medium",loading:r,disabled:y&&Object.keys(y).length>0,children:"Upgrade"})]})]})})})]})};var eg=l(96009),eb=l.n(eg);let ej=e=>{var t,l;let{isOpen:a,close:o,onSubmit:r,isLoading:c,slice:d,sliceName:u,libraries:m,localSharedSlices:h}=e,x={libraryID:null===(t=h[0])||void 0===t?void 0:t.from,sliceID:null===(l=h[0])||void 0===l?void 0:l.model.id,variationID:eb()(d.key),variationName:u},[v,y]=(0,s.useState)(!0),[f,g]=(0,s.useState)(x),[b,j]=(0,s.useState)({});function S(e){g(e),j(eS(e,m))}return(0,p.pQ)(a,()=>{a||(g(x),j({}))}),(0,n.jsxs)(i.VqE,{open:a,onOpenChange:e=>!e&&o(),size:{width:448,height:"auto"},children:[(0,n.jsx)(i.fKu,{title:"Convert to slice variation"}),(0,n.jsx)(i.cZJ,{children:(0,n.jsx)(i.l09,{onSubmit:function(){Object.keys(b).length>0||r(f)},children:(0,n.jsxs)(i.xuv,{display:"flex",flexDirection:"column",children:[(0,n.jsxs)(i.xrM,{className:ey().scrollArea,children:[(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"If you have multiple slices that are similar, you can combine them as variations of the same slice."}),(0,n.jsxs)(i.xuv,{display:"flex",flexDirection:"column",gap:4,children:[(0,n.jsxs)("label",{className:ey().label,children:[(0,n.jsx)(i.xvT,{variant:"bold",children:"Target slice *"}),"string"==typeof b.libraryID?(0,n.jsx)(i.xvT,{variant:"small",color:"tomato10",children:b.libraryID}):null,"string"==typeof b.sliceID?(0,n.jsx)(i.xvT,{variant:"small",color:"tomato10",children:b.sliceID}):null]}),(0,n.jsx)(i.PhF,{size:"medium",color:"grey",startIcon:"viewDay",flexContent:!0,value:"".concat(f.libraryID,"::").concat(f.sliceID),onValueChange:e=>{if(e){let[t,l]=e.split("::");S({...f,libraryID:t,sliceID:l})}},children:h.map(e=>(0,n.jsxs)(i.QlF,{value:"".concat(e.from,"::").concat(e.model.id),children:[e.from," ",">"," ",e.model.name," (",e.model.id,")"]},"".concat(e.from,"::").concat(e.model.id)))}),(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"Choose the slice to which you would like to add this variation."})]}),(0,n.jsx)(i.xuv,{display:"flex",flexDirection:"column",gap:4,children:(0,n.jsx)(i.ytj,{label:"Variation name *",placeholder:u,error:b.variationName,value:f.variationName,onValueChange:e=>{let t={...f,variationName:e.slice(0,30)};v&&(t.variationID=eb()(t.variationName)),S(t)},"data-testid":"variation-name-input"})}),(0,n.jsx)(i.xuv,{display:"flex",flexDirection:"column",gap:4,children:(0,n.jsx)(i.ytj,{label:"ID *",placeholder:eb()(d.key),error:b.variationID,value:f.variationID,onValueChange:e=>{y(!1),S({...f,variationID:e.slice(0,30)})},"data-testid":"variation-id-input"})})]}),(0,n.jsxs)(i.kXR,{children:[(0,n.jsx)(i.POh,{size:"medium"}),(0,n.jsx)(i._dX,{type:"submit",size:"medium",loading:c,disabled:Object.keys(b).length>0,children:"Convert"})]})]})})})]})},eS=(e,t)=>{let l={};e.libraryID||(l.libraryID="Cannot be empty.");let n=t.find(t=>t.path===e.libraryID);l.libraryID||n||(l.libraryID="Does not exist."),e.sliceID||(l.sliceID="Cannot be empty.");let i=null==n?void 0:n.components.find(t=>t.model.id===e.sliceID);if(l.sliceID||i||(l.sliceID="Does not exist."),e.variationName||(l.variationName="Cannot be empty."),e.variationID){var a;(null!==(a=null==i?void 0:i.model.variations.map(e=>e.id))&&void 0!==a?a:[]).includes(e.variationID)&&(l.variationID="Slice variation ID is already taken.")}else l.variationID="Cannot be empty.";return l},eT=e=>{var t,l;let{isOpen:a,close:o,onSubmit:r,isLoading:c,identicalSlices:d}=e,u=null!==(l=null===(t=d[0])||void 0===t?void 0:t.path)&&void 0!==l?l:"",[m,h]=(0,s.useState)(u),[x,v]=(0,s.useState)();return(0,p.pQ)(a,()=>{a||(h(u),v(void 0))}),(0,n.jsxs)(i.VqE,{open:a,onOpenChange:e=>!e&&o(),size:{width:448,height:"auto"},children:[(0,n.jsx)(i.fKu,{title:"Merge with an existing slice"}),(0,n.jsx)(i.cZJ,{children:(0,n.jsx)(i.l09,{onSubmit:function(){if(x)return;let[e,t,l]=m.split("::");r({libraryID:e,sliceID:t,variationID:l})},children:(0,n.jsxs)(i.xuv,{display:"flex",flexDirection:"column",children:[(0,n.jsxs)(i.xrM,{className:ey().scrollArea,children:[(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"If you have multiple identical slices, you can merge them. All of your content will be remapped to the target slice."}),(0,n.jsxs)(i.xuv,{display:"flex",flexDirection:"column",gap:4,children:[(0,n.jsxs)("label",{className:ey().label,children:[(0,n.jsx)(i.xvT,{variant:"bold",children:"Target slice*"}),"string"==typeof x?(0,n.jsx)(i.xvT,{variant:"small",color:"tomato10",children:x}):null]}),(0,n.jsx)(i.PhF,{size:"medium",color:"grey",startIcon:"viewDay",flexContent:!0,value:m,onValueChange:function(e){h(e),e||v("Cannot be empty.")},children:d.map(e=>(0,n.jsx)(i.QlF,{value:e.path,children:e.path.split("::").join(" > ")},e.path))}),(0,n.jsx)(i.xvT,{variant:"normal",color:"grey11",children:"Choose a slice that you would like to merge this into."})]})]}),(0,n.jsxs)(i.kXR,{children:[(0,n.jsx)(i.POh,{size:"medium"}),(0,n.jsx)(i._dX,{type:"submit",size:"medium",loading:c,disabled:!!x,children:"Merge"})]})]})})})]})},eI=e=>{var t;let{slice:l,path:a}=e,{refreshState:o}=(0,g.Z)(),[r,d]=(0,s.useState)(!1),[u,m]=(0,s.useState)(),{setCustomType:h}=T(),{libraries:x}=(0,c.v9)(e=>({libraries:(0,er.Sd)(e)})),p="Slice"===l.value.type&&null!==(t=l.value.fieldset)&&void 0!==t?t:l.key,y=x.filter(e=>e.isLocal),f=y.map(e=>e.components).flat(),b=eC(l,p,f),j=async e=>{var t,n,i;if(!u)return;d(!0),v.Xe.track({event:"legacy-slice:converted",id:e.sliceID,variation:null!==(t=e.variationID)&&void 0!==t?t:"default",library:e.libraryID,conversionType:u});let{errors:r}=await en.managerClient.slices.convertLegacySliceToSharedSlice({model:l.value,src:{...a,sliceID:l.key},dest:{libraryID:e.libraryID,sliceID:e.sliceID,variationName:null!==(n=e.variationName)&&void 0!==n?n:"Default",variationID:null!==(i=e.variationID)&&void 0!==i?i:"default"}});if(r.length)throw console.error("Could not convert slice `".concat(p,"`"),r),F.Am.error("Could not convert slice `".concat(p,"`")),r;let{model:s,errors:c}=await en.managerClient.customTypes.readCustomType({id:a.customTypeID});if(c.length||!s){console.error("Could not refresh custom type view `".concat(a.customTypeID,"`"),c),F.Am.error("Could not refresh custom type view `".concat(a.customTypeID,"`"));return}switch(o(await (0,v.y0)()),d(!1),m(void 0),u){case"as_new_slice":F.Am.success("".concat(p," has been upgraded to a new slice ").concat(e.libraryID," > ").concat(e.sliceID));break;case"as_new_variation":F.Am.success("".concat(p," has been converted as a variation of ").concat(e.libraryID," > ").concat(e.sliceID));break;default:F.Am.success("".concat(p," has been merged with ").concat(e.libraryID," > ").concat(e.sliceID))}h({customType:s})},S={path:a,slice:l,sliceName:p,libraries:y,localSharedSlices:f,identicalSlices:b,close:()=>m(void 0),onSubmit:j,isLoading:r};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.h_2,{children:[(0,n.jsx)(i.$FS,{children:(0,n.jsx)(i.zxk,{"data-testid":"convert-legacy-slice",startIcon:"refresh",endIcon:"arrowDropDown",size:"medium",color:"grey",children:"Migrate legacy slice"})}),(0,n.jsxs)(i.AWV,{align:"start",children:[(0,n.jsx)(i.Xiv,{startIcon:(0,n.jsx)(i.JO$,{name:"folder",size:"large"}),description:"Use it with new types",onSelect:()=>m("as_new_slice"),children:"Upgrade slice"}),(0,n.jsx)(i.Xiv,{startIcon:(0,n.jsx)(i.JO$,{name:"viewDay",size:"large"}),description:"Add it to another slice",onSelect:()=>m("as_new_variation"),disabled:!f.length,children:"Convert to slice variation"}),(0,n.jsx)(i.Xiv,{startIcon:(0,n.jsx)(i.JO$,{name:"driveFileMove",size:"large"}),description:"Combine identical slices",onSelect:()=>m("merge_with_identical"),disabled:!b.length,children:"Merge with another slice"})]})]}),(0,n.jsx)(ef,{...S,isOpen:"as_new_slice"===u}),(0,n.jsx)(ej,{...S,isOpen:"as_new_variation"===u}),(0,n.jsx)(eT,{...S,isOpen:"merge_with_identical"===u})]})},eC=(e,t,l)=>(0,s.useMemo)(()=>{let n=[],i=(0,ex.ux)(e.value,t);for(let e of l)for(let t of e.model.variations){let l=(0,ex.ux)(t,e.model.name);i.primary===l.primary&&i.items===l.items&&n.push({libraryID:e.from,sliceID:e.model.id,variationID:t.id,path:"".concat(e.from,"::").concat(e.model.id,"::").concat(t.id)})}return n},[e,t,l]),ek=e=>{let{slice:t,path:l}=e,[a]=(0,em.E)("legacySliceUpgrader"),o=a.enabled?"This Slice was created with the Legacy Builder. It needs to be converted first to be used within Slice Machine.":"This Slice was created with the Legacy Builder, and is incompatible with Slice Machine. You cannot edit, push, or delete it in Slice Machine. In order to proceed, manually remove the Slice from your type model. Then create a new Slice with the same fields using Slice Machine.";return(0,n.jsxs)(eh.Zb,{children:[(0,n.jsx)(eh.ZB,{component:"div",children:(0,n.jsx)(i.xuv,{alignItems:"center",justifyContent:"center",children:(0,n.jsx)(i.xvT,{color:"grey11",component:"span",children:"No screenshot available"})})}),(0,n.jsxs)(eh.T$,{children:[(0,n.jsx)(i.ua7,{content:o,side:"bottom",children:(0,n.jsx)(i.Cts,{color:"purple",title:"Legacy Slice"})}),a.enabled?(0,n.jsx)(eI,{slice:t,path:l}):null]}),(0,n.jsx)(eh.eW,{subtitle:"1 variation",title:(0,ex.Dj)(t.value)})]})};var e_=l(51507),ew=l(21151);let eD=e=>{let{slices:t,format:l,path:i,onRemoveSharedSlice:a}=e,o=t.some(e=>"SharedSlice"!==e.type),r=b.$[l],[c]=(0,em.E)("legacySliceUpgrader");return(0,s.useEffect)(()=>{o&&(c.enabled?F.Am.info("This ".concat(r.name({start:!1,plural:!1})," contains legacy slices that can be upgraded.")):F.Am.warning("This ".concat(r.name({start:!1,plural:!1})," contains slices that are incompatible.")))},[o]),(0,n.jsx)(ew.Z,{elems:t,defineElementKey:e=>"SharedSlice"!==e.type?e.payload.key:e.payload.model.name,renderElem:e=>{if("SharedSlice"!==e.type){let t=e.payload;return(0,n.jsx)(ek,{slice:t,path:i})}{let t=e.payload;return(0,n.jsx)(e_.b,{action:{type:"remove",onRemove:()=>{a(t.model.id)}},mode:"navigation",slice:t,variant:"solid"})}},sx:{padding:"16px"}})};async function eA(e){try{let{templateIDs:t,localLibrariesNames:l,location:n,onSuccess:i}=e,{data:a,errors:o}=await en.managerClient.sliceTemplateLibrary.createSlices({templateIDs:t});if(o.length>0||void 0===a)throw o;a.sliceIDs.forEach((e,i)=>{v.Xe.track({event:"slice:created",id:e,name:e,library:l[0],location:n,mode:"template",sliceTemplate:t[i]})}),await i(a.sliceIDs)}catch(t){let e="Internal Error: Slice(s) not created";console.error(e,t),F.Am.error(e)}}var eE=l(26109);let eN=[{extension:"",fileName:"",from:"",href:"",pathToSlice:"",model:{id:"video_highlights",name:"VideoHighlights",type:"SharedSlice",variations:[{description:"",docURL:"",id:"default",name:"Default",version:"sktwi1xtmkfgx8626"}]},screenshots:{default:{url:"/videoHighlights.png"}}}];var eM=e=>{let{availableSlices:t,values:l,placeholderSlices:i}=e;return(0,n.jsx)(A.F2,{name:"sliceKeys",render:e=>(0,n.jsx)(ew.Z,{gridTemplateMinPx:"200px",elems:t,defineElementKey:e=>"".concat(e.from,"-").concat(e.model.name),renderElem:t=>{var a;let o=null!==(a=null==i?void 0:i.some(e=>e.model.id===t.model.id))&&void 0!==a&&a,r=l.sliceKeys.includes(t.model.id);return(0,n.jsx)(e_.b,{action:{type:"checkbox"},isComingSoon:o,mode:"selection",onSelectedChange:n=>{n?e.push(t.model.id):e.remove(l.sliceKeys.indexOf(t.model.id))},selected:r,slice:t,variant:"outlined"})}})})};let eO=e=>{let{formId:t,close:l,onSuccess:i,availableSlicesTemplates:a,localLibraries:o,location:r}=e,{createSliceSuccess:s}=(0,g.Z)(),c=(0,q.k)();return(0,n.jsx)(D.Z,{isOpen:!0,buttonLabel:"Add",formId:t,close:l,onSubmit:e=>{let{sliceKeys:t}=e;eA({templateIDs:t,localLibrariesNames:o.map(e=>e.name),location:r,onSuccess:async e=>{s((await (0,v.y0)()).libraries),i(await Promise.all(e.map(async e=>(await en.managerClient.slices.readSlice({libraryID:o[0].name,sliceID:e})).model).filter(e=>void 0!==e)))}})},initialValues:{sliceKeys:[]},content:{title:"Use template ".concat((0,H._)(c.value))},validate:e=>{if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one template to add"}},actionMessage:e=>{let{errors:t}=e;return void 0!==t.sliceKeys?(0,n.jsx)(E.xv,{sx:{color:"error"},children:t.sliceKeys}):void 0},children:e=>{let{values:t}=e;return(0,n.jsx)(eM,{values:t,placeholderSlices:eN,availableSlices:[...a.map(e=>({extension:"",fileName:"",from:"",href:"",pathToSlice:"",model:eE.id.toSM(e.model),screenshots:Object.entries(e.screenshots).reduce((e,t)=>({...e,[t[0]]:{url:t[1]}}),{})})),...eN]})}})};var ez=e=>{let{formId:t,close:l,onSubmit:i,availableSlices:a}=e,o=(0,q.k)();return(0,n.jsx)(D.Z,{isOpen:!0,buttonLabel:"Add",formId:t,close:l,onSubmit:e=>{let{sliceKeys:t}=e;i(t.map(e=>{var t;return null===(t=a.find(t=>t.model.id===e))||void 0===t?void 0:t.model}).filter(e=>void 0!==e))},initialValues:{sliceKeys:[]},content:{title:"Select existing ".concat((0,H._)(o.value))},testId:"update-slices-modal",validate:e=>{if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one slice to add"}},actionMessage:e=>{let{errors:t}=e;return void 0!==t.sliceKeys?(0,n.jsx)(E.xv,{sx:{color:"error"},children:t.sliceKeys}):void 0},children:e=>{let{values:t}=e;return(0,n.jsx)(eM,{values:t,availableSlices:a})}})};let eZ=(e,t)=>{let l=(t||[]).reduce((e,t)=>[...e,...t.components],[]),{slicesInSliceZone:n,notFound:i}=e.value.reduce((e,t)=>{let{key:n,value:i}=t;if("SharedSlice"===i.type){let t=l.find(e=>e.model.id===n);return t?{...e,slicesInSliceZone:[...e.slicesInSliceZone,{type:"SharedSlice",payload:t}]}:{...e,notFound:[...e.notFound,{key:n}]}}return{...e,slicesInSliceZone:[...e.slicesInSliceZone,{type:"Slice",payload:{key:n,value:i}}]}},{slicesInSliceZone:[],notFound:[]});return{availableSlices:l,slicesInSliceZone:n,notFound:i}};var eF=e=>{var t;let{customType:l,onCreateSliceZone:a,onDeleteSliceZone:o,onRemoveSharedSlice:r,sliceZone:d,tabId:u}=e,m=(0,J.l)(),h=(0,el.QT)(ei,[]),[x,p]=(0,s.useState)(!1),[y,f]=(0,s.useState)(!1),[b,j]=(0,s.useState)(!1),[S,I]=(0,s.useState)(!1),{remoteSlices:C,libraries:k}=(0,c.v9)(e=>({remoteSlices:(0,er.sT)(e),libraries:(0,er.Sd)(e),slices:(0,er.xC)(e)})),{setCustomType:_}=T(),{completeStep:D}=(0,ee.k)(),{openLoginModal:A}=(0,g.Z)(),E=(0,q.k)(),N=(0,Y.F)({menuType:"Dropdown",sectionsNamingExperiment:E}),M=k.filter(e=>e.isLocal),{availableSlices:O,slicesInSliceZone:z,notFound:Z}=(0,s.useMemo)(()=>d?eZ(d,k):{availableSlices:[],slicesInSliceZone:[],notFound:[]},[d,k]),[L,K]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(null==Z?void 0:Z.length)&&Z.forEach(e=>{let{key:t}=e;r(t)})},[Z]);let R=z.filter(e=>"SharedSlice"===e.type).map(e=>e.payload),X=O.filter(e=>!R.some(t=>t.model.id===e.model.id)),B=()=>{f(!0)},V=()=>{j(!0)},U=async()=>{await en.managerClient.user.checkIsLoggedIn()?I(!0):A()},$=()=>{p(!0),v.Xe.track({event:"custom-type:open-add-from-templates",customTypeId:l.id,customTypeFormat:l.format})},es=()=>{f(!1)},ec=()=>{j(!1)},ed=()=>{I(!1)},em=()=>{p(!1)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P.Bu,{actions:d?(0,n.jsxs)(i.h_2,{children:[(0,n.jsx)(i.$FS,{children:(0,n.jsx)(i.zxk,{color:"purple",startIcon:"add","data-testid":"add-new-slice-dropdown",children:"Add"})}),(0,n.jsxs)(i.AWV,{align:"end",children:[m.eligible&&(0,n.jsx)(i.Xiv,{renderStartIcon:()=>N.fromImage.BackgroundIcon,onSelect:()=>void U(),description:N.fromImage.description,children:N.fromImage.title}),(0,n.jsx)(i.Xiv,{renderStartIcon:()=>N.fromScratch.BackgroundIcon,onSelect:V,description:N.fromScratch.description,children:N.fromScratch.title}),h.length>0?(0,n.jsx)(i.Xiv,{onSelect:$,renderStartIcon:()=>N.fromTemplate.BackgroundIcon,description:N.fromTemplate.description,children:N.fromTemplate.title}):void 0,X.length>0?(0,n.jsx)(i.Xiv,{onSelect:B,renderStartIcon:()=>N.fromExisting.BackgroundIcon,description:N.fromExisting.description,children:N.fromExisting.title}):void 0]})]}):void 0,toggle:"page"!==l.format||"Main"!==u?(0,n.jsx)(i.rsf,{checked:!!d,onCheckedChange:e=>{e?a():K(!0)},size:"small","data-testid":"slice-zone-switch"}):void 0,children:(0,H._)((0,H.f)(E.value))}),d?z.length>0?(0,n.jsx)(G.xR,{children:(0,n.jsx)(eD,{slices:z,format:l.format,path:{customTypeID:l.id,tabID:u,sliceZoneID:null!==(t=null==d?void 0:d.key)&&void 0!==t?t:""},onRemoveSharedSlice:r})}):(0,n.jsx)(i.xuv,{flexDirection:"column",flexGrow:1,justifyContent:"center",alignItems:"center",padding:{block:32},children:(0,n.jsx)(W,{openUpdateSliceZoneModal:B,openCreateSliceModal:V,openCreateSliceFromImageModal:()=>void U(),openSlicesTemplatesModal:$,projectHasAvailableSlices:X.length>0,isSlicesTemplatesSupported:h.length>0})}):void 0,y&&(0,n.jsx)(ez,{formId:"tab-slicezone-form-".concat(u),availableSlices:X,onSubmit:e=>{let t=et({customType:l,tabId:u,slices:e});_({customType:w.Dc.fromSM(t),onSaveCallback:()=>{F.Am.success("Slice(s) added to slice zone")}}),D("createSlice"),es()},close:es}),x&&(0,n.jsx)(eO,{formId:"tab-slicezone-form-".concat(u),availableSlicesTemplates:h,localLibraries:M,location:"".concat(l.format,"_type"),onSuccess:e=>{let t=et({customType:l,tabId:u,slices:e});_({customType:w.Dc.fromSM(t),onSaveCallback:()=>{F.Am.success((0,n.jsx)(eo.GX,{message:"".concat((0,H.f)(E.value)," template(s) added to ").concat(E.value," zone and created at: "),path:"".concat(M[0].name,"/")}))}}),D("createSlice"),em()},close:em}),L&&(0,n.jsx)(eu,{closeDeleteSliceZoneModal:()=>{K(!1)},deleteSliceZone:()=>{o(),K(!1)}}),(null==M?void 0:M.length)!==0&&b&&(0,n.jsx)(ea.c,{onSuccess:e=>{let t=et({customType:l,tabId:u,slices:[e]});_({customType:w.Dc.fromSM(t),onSaveCallback:()=>{F.Am.success((0,n.jsx)(eo.GX,{message:"New ".concat(E.value," added to ").concat(E.value," zone and created at: "),path:"".concat(M[0].name,"/")}))}}),ec()},localLibraries:M,location:"".concat(l.format,"_type"),remoteSlices:C,onClose:ec}),(0,n.jsx)(Q.S,{open:S,location:"".concat(l.format,"_type"),onSuccess:e=>{let{slices:t,library:i}=e,a=et({customType:l,tabId:u,slices:t.map(e=>e.model)});_({customType:w.Dc.fromSM(a),onSaveCallback:()=>{F.Am.success((0,n.jsx)(eo.GX,{message:"".concat((0,H.f)(E.value),"(s) added to ").concat(E.value," zone and created at: "),path:i}))}}),ed()},onClose:ed})]})};let eP=[K.C.UID,K.C.Image,K.C.Text,K.C.StructuredText,K.C.Link,K.C.Select,K.C.Boolean,K.C.Number,K.C.Color,K.C.Date,K.C.Table,K.C.Embed,K.C.Timestamp,K.C.GeoPoint,K.C.ContentRelationship,K.C.LinkToMedia,K.C.Group,K.C.NestedGroup];var eL=e=>{var t,l,a,o;let{tabId:r}=e,{customType:c,setCustomType:d}=T(),m=w.Dc.toSM(c),h=null===(t=m.tabs.find(e=>e.key===r))||void 0===t?void 0:t.sliceZone,x=null!==(a=null===(l=m.tabs.find(e=>e.key===r))||void 0===l?void 0:l.value)&&void 0!==a?a:[],p="page"===m.format&&m.repeatable?x.filter(e=>"uid"!==e.key):x,v=m.tabs.reduce((e,t)=>[...e,...t.value],[]),y=e=>{var t;let{apiId:l,value:n}=e,i=null===(t=n.config)||void 0===t?void 0:t.label;if((0,R.Ss)(K.C,n.type)||null==i)return;if("Range"===n.type||"IntegrationFields"===n.type||"Separator"===n.type)throw Error("Unsupported Field Type: ".concat(n.type));let a=K.C[n.type];try{a.schema.validateSync(n,{stripUnknown:!1})}catch(e){throw Error('Add field: Model is invalid for field "'.concat(n.type,'".'))}let o=w.L$.fromSM(n);d({customType:(0,u.xS)({customType:c,newField:o,newFieldId:l,sectionId:r}),onSaveCallback:()=>{F.Am.success("".concat("Group"===n.type?"Group":"Field"," added"))}}),(0,B.V)({id:l,field:o})},f=e=>{let{apiId:t,newKey:l,value:n,inGroupFieldAction:i,updateMeta:a}=e;if((0,R.Ss)(K.C,n.type))return;let o=w.L$.fromSM(n);d({customType:(0,u.L4)({customType:c,previousFieldId:t,newFieldId:l,newField:o,sectionId:r}),onSaveCallback:()=>{"add"===i&&F.Am.success("Field added")},updateMeta:a}),i||(0,V.Z)({previousId:t,id:l,field:o})};return(0,n.jsx)(L.S,{children:(0,n.jsx)(s.Suspense,{fallback:(0,n.jsx)(i.xuv,{padding:32,children:(0,n.jsx)(i._3P,{})}),children:(0,n.jsxs)(P.aV,{border:!1,style:{flexGrow:1},children:[(0,n.jsx)($.Z,{zoneType:"customType",zoneTypeFormat:null!==(o=c.format)&&void 0!==o?o:"custom",tabId:r,title:"Static zone",dataTip:"",fields:p,poolOfFieldsToCheck:v,showHints:!0,EditModal:U.Z,widgetsArray:eP,onDeleteItem:e=>{d({customType:(0,u.AK)({customType:c,fieldId:e,sectionId:r})})},onSave:e=>""===e.apiId?y({...e,apiId:e.newKey}):f(e),onDragEnd:e=>{if((0,R.uS)(e))return;let{source:t,destination:l}=e;if(!l)return;let n=(0,u.gR)({customType:c,sourceIndex:t.index,destinationIndex:l.index,sectionId:r});(0,Z.flushSync)(()=>d({customType:n}))},renderHintBase:e=>{let{item:t}=e;return"data".concat((0,X.Ti)(t.key))},renderFieldAccessor:e=>"data".concat((0,X.Ti)(e)),testId:"static-zone-content",isRepeatableCustomType:c.repeatable}),(0,n.jsx)(eF,{customType:m,tabId:r,sliceZone:h,onRemoveSharedSlice:e=>{d({customType:(0,u.EN)({customType:c,sectionId:r,sliceId:e})})},onCreateSliceZone:()=>{d({customType:(0,u.Tr)(c,r)})},onDeleteSliceZone:()=>{d({customType:(0,u.E3)(c,r)})}})]})})})};let eK=()=>{var e,t,l;let{customType:a,setCustomType:o}=T(),r=w.Dc.toSM(a),[c,d]=(0,s.useState)(null===(e=r.tabs[0])||void 0===e?void 0:e.key),[m,h]=(0,s.useState)(),x=(null===(l=r.tabs.find(e=>e.key===c))||void 0===l?void 0:null===(t=l.sliceZone)||void 0===t?void 0:t.value.length)===0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i.Rz2,{sx:x?{flexGrow:1}:void 0,children:["page"===a.format?(0,n.jsx)(i.pyJ,{title:a.repeatable?(0,n.jsx)(C,{}):void 0}):void 0,(0,n.jsxs)(i.KCD,{onValueChange:d,value:c,children:[(0,n.jsx)(i.mYC,{onAddNewTab:()=>{h({type:"CREATE_CUSTOM_TYPE_TAB"})},children:r.tabs.map(e=>(0,n.jsx)(i.wfd,{menu:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Xiv,{onSelect:()=>{h({type:"UPDATE_CUSTOM_TYPE_TAB",tabKey:e.key})},startIcon:(0,n.jsx)(i.JO$,{name:"edit"}),children:"Rename"}),(0,n.jsx)(i.Xiv,{color:"tomato",disabled:function(e){if(r.tabs.length<=1)return!0;let t=r.tabs.find(e=>e.value.find(e=>"uid"===e.key));return"page"===a.format&&a.repeatable&&(null==t?void 0:t.key)===e}(e.key),onSelect:()=>{h({type:"DELETE_CUSTOM_TYPE_TAB",tabKey:e.key})},startIcon:(0,n.jsx)(i.JO$,{name:"delete"}),children:"Remove"})]}),value:e.key,children:e.key},e.key))}),r.tabs.map(e=>(0,n.jsx)(i.e$b,{value:e.key,children:(0,n.jsx)(eL,{tabId:e.key})},e.key))]})]}),(null==m?void 0:m.type)==="CREATE_CUSTOM_TYPE_TAB"?(0,n.jsx)(M,{close:()=>{h(void 0)},isOpen:!0,onSubmit:e=>{let{id:t}=e;o({customType:(0,u.vB)(a,t)}),d(t)},tabIds:r.tabs.map(e=>e.key.toLowerCase())}):void 0,(null==m?void 0:m.type)==="UPDATE_CUSTOM_TYPE_TAB"?(0,n.jsx)(z,{close:()=>{h(void 0)},initialTabKey:m.tabKey,isOpen:!0,onSubmit:e=>{let{id:t}=e;o({customType:(0,u.HO)(a,m.tabKey,t)}),c===m.tabKey&&d(t)},tabIds:r.tabs.filter(e=>e.key!==m.tabKey).map(e=>e.key.toLowerCase())}):void 0,(null==m?void 0:m.type)==="DELETE_CUSTOM_TYPE_TAB"?(0,n.jsx)(O,{close:()=>{h(void 0)},isOpen:!0,onSubmit:()=>{if(o({customType:(0,u.F$)(a,m.tabKey)}),c===m.tabKey){var e;let t=null===(e=r.tabs.find(e=>e.key!==m.tabKey))||void 0===e?void 0:e.key;void 0!==t&&d(t)}}}):void 0]})};var eR=l(16442),eX=l(78254),eB=l(60867),eV=l(9975),eU=l(34919),e$=l.n(eU);let eG=e=>{let{tabs:t,...l}=e;return(0,n.jsxs)(eV.fC,{...l,className:e$().root,defaultValue:t[0].label,orientation:"vertical",children:[(0,n.jsx)(eV.aV,{className:e$().list,"aria-label":"content tabs",children:t.map((e,t)=>{let{label:l}=e;return(0,n.jsx)(eV.xz,{className:e$().trigger,value:l,children:(0,n.jsx)(i.xvT,{className:e$().triggerText,component:"span",color:"inherit",children:l})},"".concat(l,"-trig").concat(t+1))})}),t.map((e,t)=>{let{label:l,content:a}=e;return(0,n.jsx)(eV.VY,{className:e$().content,value:l,children:(0,n.jsx)(i.xrM,{className:e$().scrollArea,children:a})},"".concat(l,"-content").concat(t+1))})]})};var eJ=l(25661),eq=l(88241),eQ=l(32554),eY=l(44621),eH=l.n(eY);let eW=e=>{var t,l;let{inline:a,...o}=e,r=(0,eQ.p)();if(!0===a)return(0,n.jsx)("code",{...o,className:eH().inlineCode});let s=(()=>{var e,t,l,n,i;if((null===(t=o.node)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.meta)!==void 0){let e=null===(n=o.node)||void 0===n?void 0:null===(l=n.data)||void 0===l?void 0:l.meta;return{fileName:e.substring(1,e.length-1),language:null===(i=o.className)||void 0===i?void 0:i.split("-")[1]}}return null})(),c=null===(t=/language-(\w+)/.exec(null!==(l=o.className)&&void 0!==l?l:""))||void 0===t?void 0:t[1];return(0,n.jsx)(i.dnZ,{...o,onCopy:()=>{v.Xe.track({event:"page-type:copy-snippet",framework:r})},language:c,code:String(o.children).replace(/\n$/,""),title:null==s?void 0:s.fileName})},e0=e=>{let{markdown:t}=e;return(0,n.jsx)(eJ.D,{children:t,linkTarget:"_blank",remarkPlugins:[eq.Z],components:{code:e=>(0,n.jsx)(eW,{...e}),h1:e=>(0,n.jsx)(i.xvT,{children:e.children,component:"h1",variant:"h1"}),h2:e=>(0,n.jsx)(i.xvT,{children:e.children,component:"h2",variant:"h2"}),h3:e=>(0,n.jsx)(i.xvT,{children:e.children,component:"h3",variant:"h3"}),h4:e=>(0,n.jsx)(i.xvT,{children:e.children,component:"h4",variant:"h4"}),h5:e=>(0,n.jsx)(i.xvT,{children:e.children,component:"h4",variant:"h4"}),p:e=>(0,n.jsx)(i.xvT,{className:eH().section,children:e.children,component:"p",variant:"normal"}),pre:e=>(0,n.jsx)(i.xvT,{className:eH().section,children:e.children,component:"pre",variant:"normal"})}})};async function e1(e){let t=JSON.parse(e),{errors:l,documentation:n}=await en.managerClient.documentation.read({kind:t.kind,data:t.data});if(l.length>0)throw l;return n}var e4=l(65480),e2=l.n(e4);let e3=e=>{var t;let{model:l}=e,a=(0,eQ.p)(),o=(t={kind:"PageSnippet",data:{model:l}},(0,el.QT)(e1,[JSON.stringify(t)])),{completeStep:r}=(0,ee.k)();return 0===o.length?null:(0,n.jsxs)(i.VqE,{size:"small",trigger:(0,n.jsx)(i.zxk,{color:"grey",onClick:()=>{r("codePage"),v.Xe.track({event:"page-type:open-snippet",framework:a})},startIcon:"code",children:"Page snippet"}),children:[(0,n.jsx)(i.fKu,{icon:"code",title:"Page snippet"}),(0,n.jsx)("section",{className:e2().content,children:o.length>1?(0,n.jsx)(eG,{style:{flex:1},tabs:o.map((e,t)=>{let{label:l,content:i}=e;return{label:null!=l?l:"Tab ".concat(t+1),content:(0,n.jsx)(e0,{markdown:i})}})}):(0,n.jsx)(i.xrM,{style:{flex:1,padding:16},children:(0,n.jsx)(e0,{markdown:o[0].content})})})]})},e6=e=>{let{model:t}=e;return(0,n.jsx)("div",{children:(0,n.jsx)(L.S,{children:(0,n.jsx)(s.Suspense,{fallback:(0,n.jsx)(i.zxk,{color:"grey",startIcon:"code",children:"Page snippet"}),children:(0,n.jsx)(e3,{model:t})})})})},e8=()=>{let e=(0,r.useRouter)(),{selectedCustomType:t}=(0,c.v9)(t=>({selectedCustomType:(0,eX.Jk)(t,(0,h.Ag)(e.query))}));return((0,s.useEffect)(()=>{t&&(0,eR.TG)(t)||e.replace("/")},[t,e]),t&&(0,eR.TG)(t))?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{children:(0,n.jsxs)("title",{children:[t.local.label," - Slice Machine"]})}),(0,n.jsx)(e5,{customType:t.local})]}):(0,n.jsx)(x.LN,{})},e5=e=>{let{customType:t}=e;return null===t?(0,n.jsx)(x.LN,{}):(0,n.jsx)(x.LN,{children:(0,n.jsx)(S,{initialCustomType:w.Dc.fromSM(t),children:e=>{var l;let{actionQueueStatus:a,customType:o,setCustomType:r}=e,s=(0,u.y6)(o),c=h.cd[t.format],p=b.$[t.format];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(x.wd,{children:[(0,n.jsx)(x.Xq,{url:c.tablePagePathname}),(0,n.jsxs)(x.Cx,{children:[(0,n.jsx)(d.g,{children:p.name({start:!0,plural:!0})}),(0,n.jsx)(d.g,{active:!0,children:null!==(l=o.label)&&void 0!==l?l:o.id})]}),(0,n.jsxs)(x.K2,{children:[(0,n.jsx)(m.X,{status:a}),"page"===o.format?(0,n.jsx)(e6,{model:o}):void 0,(0,n.jsx)(eB._,{isChangesLocal:!0,format:s,customType:o,setLocalCustomType:r})]})]}),(0,n.jsx)(x.RN,{children:(0,n.jsx)(i.xuv,{flexDirection:"column",minWidth:0,children:(0,n.jsx)(eK,{})})})]})}})})}},43776:function(e,t,l){"use strict";l.d(t,{E:function(){return i}});var n=l(31470);function i(e){var t,l;let[i,a]=(0,n.f)(),o=async t=>{let l={...i,labs:{...i.labs}};t?l.labs[e]=t:e in l.labs&&delete l.labs[e],0===Object.keys(l.labs).length&&delete l.labs,await a(l)};return[{enabled:null!==(l=null==i?void 0:null===(t=i.labs)||void 0===t?void 0:t[e])&&void 0!==l&&l},o]}},31470:function(e,t,l){"use strict";l.d(t,{f:function(){return a}});var n=l(18566),i=l(80148);function a(){return[(0,n.QT)(o,[]),async e=>{await i.managerClient.project.writeSliceMachineConfig({config:e}),(0,n.VA)(o,[],e)}]}async function o(){return i.managerClient.project.getSliceMachineConfig()}},34919:function(e){e.exports={flex:"ContentTabs_flex__T21Oc",column:"ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",root:"ContentTabs_root__Gn3Zg ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",list:"ContentTabs_list__rAZtl ContentTabs_flex__T21Oc",trigger:"ContentTabs_trigger__cTyPN ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",triggerText:"ContentTabs_triggerText__p_ZBl",content:"ContentTabs_content__H1Stj ContentTabs_column__1f8b8 ContentTabs_flex__T21Oc",scrollArea:"ContentTabs_scrollArea__DuDcQ"}},65480:function(e){e.exports={content:"PageSnippetDialog_content__jIN6d"}},44621:function(e){e.exports={section:"MarkdownRenderer_section__uNS1M",inlineCode:"MarkdownRenderer_inlineCode__lmGTi"}},65375:function(e){e.exports={scrollArea:"ConvertLegacySliceButton_scrollArea__xf3vM",label:"ConvertLegacySliceButton_label__BK0Gd"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[895],{72641:function(e,t,n){"use strict";n.d(t,{R$:function(){return i},Qj:function(){return h},T9:function(){return d},nf:function(){return x},u2:function(){return o},_T:function(){return u}});var l=n(52322),r=n(7729),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.xvT,{...e,variant:"h3"}),x=e=>(0,l.jsx)(r.xvT,{...e,color:"grey11"}),h=e=>(0,l.jsx)("div",{...e,className:c().actions,color:"grey"})},78075:function(e,t,n){"use strict";n.d(t,{F:function(){return Y}});var l=n(52322),r=n(7729),a=n(97729),s=n.n(a),c=n(2784),i=n(43388),o=n(17378),d=n(98564),u=n(51384),x=n(5632),h=n(56580),p=n(75289),j=n(77630),m=n(88932),g=n(94160),f=n(39204);async function v(e){let{id:t,label:n,repeatable:l,format:r,onSuccess:a}=e,s=d.$[r],c=(0,j.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),m.Am.success((0,f.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),m.Am.error(e)}}var b=n(59294),S=n(98250),y=n(68968),_=n(59532),C=n(7974),k=n(358),w=n(78254),T=n(54597),I=n(46999),R=n(63397);let B=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})},L=e=>{let{format:t}=e,[n,,r]=(0,R.U$)("repeatable"),a=d.$[t];return(0,l.jsxs)(p.xu,{mb:2,children:[(0,l.jsxs)(B,{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)(B,{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})]})]})]})},z=e=>{let{format:t,isCreating:n,isOpen:r,origin:a="table",onCreateChange:s,onOpenChange:i}=e,{createCustomTypeSuccess:o}=(0,T.Z)(),{completeStep:u}=(0,S.k)(),{customTypeIds:m,customTypeLabels:g}=(0,h.v9)(e=>({customTypeIds:(0,w.W6)(e),customTypeLabels:(0,w.YS)(e)})),f=d.$[t],[R,B]=(0,c.useState)(!0),{syncChanges:z}=(0,y.g)(),N=(0,x.useRouter)(),A=async e=>{let{id:n,label:l,repeatable:r}=e;s(!0),await v({format:t,id:n,label:l,origin:a,repeatable:r,onSuccess:async e=>{o(e);let t=(0,j.y6)(e),l=b.cd[t];B(!0),await N.push({pathname:l.getBuilderPagePathname(n)}),z(),"page"===t&&u("createPageType")}}),s(!1),i(!1)},E=(e,t,n)=>{n(R?{...t,label:e.target.value,id:(0,k.lV)(e.target.value)}:{...t,label:e.target.value})},P=(e,t)=>{t("id",e.target.value),B(!1)};return(0,l.jsx)(_.Z,{testId:"create-ct-modal",isOpen:r,widthInPx:"530px",formId:"create-custom-type",buttonLabel:"Create",close:()=>{i(!1),B(!0)},onSubmit:e=>{A(e)},isLoading:n,initialValues:{repeatable:!0,id:"",label:""},validate:e=>{let{id:t,label:n}=e,l={};return n&&n.length||(l.label="Cannot be empty."),!l.label&&g.includes(n)&&(l.label="".concat(f.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||C.xo.exec(t)||(l.id="Invalid id: No special characters allowed."),!l.id&&t&&m.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(f.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)(L,{format:t}),(0,l.jsx)(I.W,{name:"label",label:"".concat(f.name({start:!0,plural:!1})," Name"),testId:"ct-name-input",placeholder:"A display name for the ".concat(f.name({start:!1,plural:!1})),error:c.label?n.label:void 0,onChange:e=>E(e,s,r)}),(0,l.jsx)(I.W,{name:"id",testId:"ct-id-input",label:"".concat(f.name({start:!0,plural:!1})," ID"),placeholder:f.inputPlaceholder,error:c.id?n.id:void 0,onChange:e=>P(e,a)})]})}})};var N=n(72641);let A=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"})]}),E=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 P=n(60867),D=n(18566),W=n(94840),$=n(16442),O=n(80148);async function M(e){let{errors:t,models:n}=await O.managerClient.customTypes.readAllCustomTypes({format:e});if(t.length>0)throw t;return n.map(e=>{let{model:t}=e;return t})}let V=e=>{let{format:t,isCreatingCustomType:n,openCreateCustomTypeModal:a}=e,s=(0,x.useRouter)(),{customTypes:i,updateCustomTypes:o}=function(e){let t=(0,c.useCallback)(t=>(0,D.VA)(M,[e],t),[e]);return{customTypes:(0,D.QT)(M,[e]),updateCustomTypes:t}}(t),u=i.sort((e,t)=>e.id.localeCompare(t.id)),p=b.cd[t],j=d.$[t];return(!function(e,t,n){let{storeCustomTypes:l}=(0,h.v9)(e=>({storeCustomTypes:(0,w.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(W.Dc.fromSM(t.local))!==JSON.stringify(n)}))&&n(r.map(e=>{let{local:t}=e;return W.Dc.fromSM(t)}))},[t,n,e,l])}(i,t,o),0===u.length)?(0,l.jsxs)(N.R$,{"data-testid":"blank-slate",style:{alignSelf:"center",marginTop:r.rSc.space[72]},children:[(0,l.jsx)(N.u2,{children:(0,l.jsx)(r.Eep,{src:p.blankSlateImage,sizing:"cover"})}),(0,l.jsxs)(N.T9,{children:[(0,l.jsx)(N._T,{children:j.name({start:!0,plural:!0})}),(0,l.jsx)(N.nf,{children:j.blankSlateDescription}),(0,l.jsx)(N.Qj,{children:(0,l.jsx)(r.zxk,{onClick:a,loading:n,children:"Create"})})]})]}):(0,l.jsx)("div",{children:(0,l.jsxs)(r.iA_,{columnLayout:"28px 1fr 1fr 1fr 42px",children:[(0,l.jsx)(r.ssF,{children:(0,l.jsxs)(r.SCH,{children:[(0,l.jsx)(r.pj1,{children:(0,l.jsx)(r.JO$,{name:"notes",size:"medium"})}),(0,l.jsx)(r.pj1,{children:(0,l.jsx)(r.xvT,{color:"grey11",variant:"small",children:"Label"})}),(0,l.jsx)(r.pj1,{children:(0,l.jsx)(r.xvT,{color:"grey11",variant:"small",children:"API ID"})}),(0,l.jsx)(r.pj1,{children:(0,l.jsx)(r.xvT,{color:"grey11",variant:"small",children:"Limit"})}),(0,l.jsx)(r.pj1,{})]})}),(0,l.jsx)(r.RMI,{children:u.map(e=>{let{repeatable:n,label:a,id:c}=e;return(0,l.jsxs)(r.SCH,{onClick:()=>{s.push(b.cd[t].getBuilderPagePathname(c))},children:[(0,l.jsx)(r.pj1,{children:n?(0,l.jsx)(A,{width:r.rSc.space[20]}):(0,l.jsx)(E,{width:r.rSc.space[20]})}),(0,l.jsx)(r.pj1,{children:(0,l.jsx)(r.xvT,{variant:"bold",noWrap:!0,children:a})}),(0,l.jsx)(r.pj1,{children:(0,l.jsx)(r.xvT,{color:"grey11",noWrap:!0,children:c})}),(0,l.jsx)(r.pj1,{children:(0,l.jsx)(r.xvT,{color:"grey11",noWrap:!0,children:n?"Reusable":"Single"})}),(0,l.jsx)(r.pj1,{children:(0,l.jsx)(P._,{isChangesLocal:!1,format:t,customType:e})})]},c)})})]})})},Y=e=>{let{format:t}=e,n=d.$[t],[a,x]=(0,c.useState)(!1),[h,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)(o.S,{renderError:()=>(0,l.jsx)(u.LN,{children:(0,l.jsx)(u.RN,{children:(0,l.jsx)(r.xuv,{alignItems:"center",justifyContent:"center",children:(0,l.jsx)(r.Iq8,{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.zxk,{disabled:!0,startIcon:"add",children:"Create"})})]}),(0,l.jsx)(u.RN,{children:(0,l.jsx)(r._3P,{})})]}),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.zxk,{"data-testid":"create-ct",loading:a,onClick:()=>{p(!0)},startIcon:"add",children:"Create"})})]}),(0,l.jsx)(u.RN,{children:(0,l.jsxs)(r.xuv,{flexDirection:"column",children:[(0,l.jsx)(V,{format:t,isCreatingCustomType:a,openCreateCustomTypeModal:()=>{p(!0)}}),(0,l.jsx)(z,{format:t,isCreating:a,isOpen:h,onCreateChange:x,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:x={},sx:h=null,bg:p,background:j,children:m,...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,...h},...g,children:[t||null,n||null,(0,l.jsxs)(s,{bg:p,background:j,sx:u,withRadius:!i,children:[r?(0,l.jsx)(r,{}):null,m||null]}),i?(0,l.jsx)(s,{bg:p,background:j,sx:{...o?{borderTop:e=>{let{colors:t}=e;return"1px solid ".concat(String(null==t?void 0:t.borders))}}:null,...x},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"}}}]);
|