slice-machine-ui 1.22.2-beta.1 → 1.22.2-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AppLayout/index.tsx +8 -4
- package/components/Navigation/ChangesListItem.tsx +1 -1
- package/components/Navigation/Environment.tsx +8 -7
- package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +1 -1
- package/lib/builders/SliceBuilder/Sidebar/index.tsx +1 -1
- package/lib/builders/SliceBuilder/SimulatorButton/index.tsx +2 -2
- package/lib/builders/common/Zone/components/EmptyState/index.tsx +1 -1
- package/lib/builders/common/Zone/index.jsx +1 -1
- package/out/404.html +1 -1
- package/out/_next/static/AT1eVZTlmZAgTtIdj6oNo/_buildManifest.js +1 -0
- package/out/_next/static/chunks/18539003-4460ccbfe3109578.js +97 -0
- package/out/_next/static/chunks/482-34cee2a2071c235f.js +1 -0
- package/out/_next/static/chunks/{505-fa47e200ac3a012d.js → 505-3f1cf09a086dcba8.js} +1 -1
- package/out/_next/static/chunks/550-c80fd46fb64d1eef.js +1 -0
- package/out/_next/static/chunks/{840-45aefe7b4d84745c.js → 840-163f8a1040e6820d.js} +1 -1
- package/out/_next/static/chunks/904-519dbf0f7e8c6243.js +1 -0
- package/out/_next/static/chunks/{958-0a6a103fac00582b.js → 958-8aca174b80cb0c35.js} +1 -1
- package/out/_next/static/chunks/pages/_app-26ba044deeac3828.js +458 -0
- package/out/_next/static/chunks/pages/{changelog-cfda9d30715b6e2a.js → changelog-4d0f2f1222e403fe.js} +1 -1
- package/out/_next/static/chunks/pages/{changes-a3cdb6251b224e4b.js → changes-52c9d917808d1461.js} +1 -1
- package/out/_next/static/chunks/pages/{labs-dfad3c3553469739.js → labs-526bb7d60a1b90f4.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ef11594ce026b650.js +1 -0
- package/out/_next/static/chunks/pages/{slices-dc4f17b54c9a3eb5.js → slices-884a936a9a062a65.js} +1 -1
- package/out/_next/static/css/{7ef90ba762e84cee.css → 1bbf650dfd37ce69.css} +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 +7 -6
- package/src/components/BlankSlate/BlankSlate.css.ts +4 -1
- package/src/components/BlankSlate/BlankSlate.tsx +2 -7
- package/src/components/Card/Card.stories.tsx +3 -3
- package/src/components/HoverCard/HoverCard.css.ts +0 -9
- package/src/components/HoverCard/HoverCard.stories.tsx +3 -3
- package/src/components/HoverCard/HoverCard.tsx +1 -1
- package/src/components/List/List.stories.tsx +2 -2
- package/src/components/PageLayout/PageLayout.css.ts +6 -12
- package/src/components/PageLayout/PageLayout.tsx +6 -6
- package/src/components/SideNav/SideNavEnvironmentSelector.tsx +69 -30
- package/src/components/Window/Window.tsx +1 -1
- package/src/features/customTypes/EditDropdown.tsx +7 -5
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +2 -2
- package/src/features/environments/actions/getActiveEnvironment.ts +34 -0
- package/src/features/environments/actions/getEnvironments.ts +5 -2
- package/src/features/environments/actions/setEnvironment.ts +2 -2
- package/src/features/environments/useActiveEnvironment.ts +2 -33
- package/src/features/inAppGuide/InAppGuideDialog.tsx +1 -7
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +1 -1
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +1 -1
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +1 -1
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +1 -1
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +1 -1
- package/src/features/slices/sliceCards/SharedSliceCard.tsx +2 -2
- package/out/_next/static/ALrNHXPZGeRwEXHdmh5-C/_buildManifest.js +0 -1
- package/out/_next/static/chunks/18539003-9f66499125869c64.js +0 -97
- package/out/_next/static/chunks/482-7e97f91961588a90.js +0 -1
- package/out/_next/static/chunks/550-8557ad3750e1e581.js +0 -1
- package/out/_next/static/chunks/904-e7c8c1ba265177fb.js +0 -1
- package/out/_next/static/chunks/pages/_app-cae1327f33c96711.js +0 -447
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c228a7c42e87eb27.js +0 -1
- package/src/features/environments/actions/getActiveEnvironmentDomain.ts +0 -11
- /package/out/_next/static/{ALrNHXPZGeRwEXHdmh5-C → AT1eVZTlmZAgTtIdj6oNo}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[482],{8482:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var s=t(62230),i=t(85244),d=t(17064),r=t(81541),a=t(52322),c=t(22715),l=t(13980),o=t(2784),u=t(65077),f=t(28173),p=t(75012),x=t(9620),h=t(2967),y=t(75289),_=t(71168),g=t(21078),j=t(13394),m=t(99968),v=t(92809),b=function(e){var n=e.fields,t=e.title,d=e.tabId,r=e.enterEditMode,c=e.enterSelectMode,l=e.onDragEnd,o=e.renderFieldAccessor,u=e.onDeleteItem,f=e.showHints,p=e.newField,x=e.renderHintBase,b=e.isRepeatable,R=e.dataCy,z=e.isRepeatableCustomType;return(0,a.jsx)(h.Z5,{onDragEnd:l,children:(0,a.jsx)(h.bK,{droppableId:t,children:function(e,t){return(0,a.jsxs)(y.xu,(0,i.Z)((0,s.Z)({as:"ul",ref:e.innerRef},e.droppableProps),{"data-cy":R,sx:{paddingInline:"16px !important"},children:[n.map(function(e,n){var l=e.value,p=l.config,h=l.type,R=(0,m.t)(j,p,h);if(!R)return(0,a.jsx)(_.Z,{children:(0,a.jsxs)(y.xv,{children:['Field type "',h,'" not supported']})});var S={item:e,index:n,tabId:d,widget:R,showHints:f,key:e.key,enterSelectMode:c,renderFieldAccessor:o,enterEditMode:r,parentSnapshot:t,deleteItem:u,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:z};if(R.CustomListItem){var Z=R.CustomListItem;return(0,a.jsx)(Z,(0,s.Z)({},S))}var C=(0,a.jsx)(v.Z,{item:e,show:f,isRepeatable:b,renderHintBase:x,Widgets:j,typeName:R.CUSTOM_NAME||R.TYPE_NAME});return(0,a.jsx)(g.Z,(0,i.Z)((0,s.Z)({},S),{HintElement:C}))}),e.placeholder,p]}))}})})},R=function(e){var n=e.onEnterSelectMode,t=e.zoneName;return(0,a.jsxs)(y.xu,{sx:{textAlign:"center",my:4},children:[(0,a.jsx)(y.X6,{as:"h5",children:"Add a new field here"}),(0,a.jsx)(y.xu,{sx:{my:2},children:(0,a.jsxs)(y.xv,{sx:{color:"textClear"},children:["Add a field to your ",t," Zone"]})}),(0,a.jsx)(y.xu,{sx:{display:"flex",justifyContent:"center",marginTop:16},children:(0,a.jsx)(c.zx,{color:"grey",onClick:function(){return n()},"data-cy":"add-".concat(t,"-field"),startIcon:"add",children:"Add a new field"})})]})},z=function(e){var n=e.zoneType,t=e.tabId,l=e.title,h=e.fields,y=e.poolOfFieldsToCheck,_=e.widgetsArray,g=e.isRepeatable,j=e.onDeleteItem,m=e.onSaveNewField,v=e.onDragEnd,z=e.EditModal,S=e.onSave,Z=e.dataTip,C=e.renderHintBase,w=e.renderFieldAccessor,E=e.dataCy,I=e.isRepeatableCustomType,A=Object.entries(y).find(function(e){return"UID"===(0,d.Z)(e,2)[1].value.type})?_.filter(function(e){return"UID"!==e.TYPE_NAME}):_,T=(0,o.useState)(!1),k=T[0],F=T[1],N=(0,o.useState)({isOpen:!1}),M=N[0],O=N[1],q=(0,o.useState)({isOpen:!1}),D=q[0],H=q[1],B=(0,o.useState)(null),P=B[0],U=B[1],W=function(e){O({isOpen:!0,field:e})},L=function(){H({isOpen:!0})},Y=function(){O({isOpen:!1})},K=function(){return H({isOpen:!1})},V=function(e){U({widgetTypeName:e,fields:h}),H({isOpen:!1})},X=function(){return U(null)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Bu,{actions:h.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.xv,{color:"grey11",component:"span",noWrap:!0,children:"Show code snippets?"}),(0,a.jsx)(c.rs,{checked:k,onCheckedChange:F,size:"small",style:{flexShrink:0}}),(0,a.jsx)(c.zx,{"data-cy":"add-".concat(g?"Repeatable":"Static","-field"),onClick:L,startIcon:"add",grey:"grey",children:"Add a new field"})]}):void 0,children:l}),0!==h.length||P?h.length>0||P?(0,a.jsx)(u.xR,{children:(0,a.jsx)(b,{tabId:t,isRepeatable:g,fields:h,showHints:k,dataTip:Z,title:l,renderFieldAccessor:w,renderHintBase:C,enterEditMode:W,enterSelectMode:L,onDragEnd:v,onDeleteItem:j,dataCy:E,isRepeatableCustomType:I,newField:P&&(0,a.jsx)(x.Z,(0,i.Z)((0,s.Z)({},P),{fields:y||h,onSave:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];m.apply(void 0,(0,r.Z)(n)),U(null)},onCancelNewField:X}))})}):void 0:(0,a.jsx)(u.xR,{children:(0,a.jsx)(R,{onEnterSelectMode:function(){return L()},zoneName:g?"Repeatable":"Static"})}),(0,a.jsx)(z,{data:M,close:Y,onSave:S,fields:y,zoneType:n}),(0,a.jsx)(p.Z,{data:D,close:K,onSelect:V,widgetsArray:A})]})};z.propTypes={isRepeatable:l.bool,title:l.string.isRequired,dataTip:l.string.isRequired,onSave:l.func.isRequired,onSaveNewField:l.func.isRequired,onDragEnd:l.func.isRequired,onDeleteItem:l.func.isRequired,poolOfFieldsToCheck:(0,l.arrayOf)((0,l.shape)({key:l.string,value:l.object})),renderHintBase:l.func.isRequired,renderFieldAccessor:l.func.isRequired,widgetsArray:l.array.isRequired,fields:(0,l.arrayOf)((0,l.shape)({key:l.string.isRequired,value:(0,l.shape)({config:l.object,fields:l.array,type:l.string.isRequired})}))};var S=z},28173:function(e,n,t){"use strict";t.d(n,{aV:function(){return c},Bu:function(){return l}});var s=t(62230),i=t(85244),d=t(98240),r=t(52322),a=t(22715);t(82432),t(84779);var c=function(e){return(0,r.jsx)("div",(0,i.Z)((0,s.Z)({},e),{className:"_2a96i71 _1ecs97dez0 _1ecs97dez2 _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dezb _1ecs97dezr"}))},l=function(e){var n=e.actions,t=e.children,c=e.toggle,l=(0,d.Z)(e,["actions","children","toggle"]);return(0,r.jsxs)("div",(0,i.Z)((0,s.Z)({},l),{className:"_2a96i73 _2a96i72 _1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97d6r8 _1ecs97d6yl _1ecs97df2l _1ecs97dez1 _1ecs97df71 _1ecs97dfie _1ecs97d18 _1ecs97d8l _1ecs97df29 _1ecs97df92 _1ecs97dfi1",children:[(0,r.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:t}),c,Boolean(n)?(0,r.jsx)("div",{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97dezd _1ecs97df92 _1ecs97dezj _1ecs97df51",children:n}):null]}))}},84779:function(){},82432:function(){}}]);
|