slice-machine-ui 1.20.1-dev-environments.2 → 1.20.1-dev-next-release.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/components/AppLayout/index.tsx +10 -34
  2. package/components/Navigation/index.tsx +15 -32
  3. package/components/ReviewModal/ReviewForm.tsx +2 -2
  4. package/components/ReviewModal/ReviewModal.tsx +7 -0
  5. package/out/404.html +1 -1
  6. package/out/_next/static/BIxidu02_xbgjO9EV7tg4/_buildManifest.js +1 -0
  7. package/out/_next/static/chunks/{18539003-371d86ea83e7293b.js → 18539003-5d8b6a04053638af.js} +2 -2
  8. package/out/_next/static/chunks/{482-39cef3a713901788.js → 482-30c0f114c7213fa3.js} +1 -1
  9. package/out/_next/static/chunks/{125-f0e2eb84ee39757a.js → 505-fa47e200ac3a012d.js} +1 -1
  10. package/out/_next/static/chunks/{550-e72c08c598051224.js → 550-abf97d3008006056.js} +1 -1
  11. package/out/_next/static/chunks/{80-821a0b5d4ad61185.js → 80-72d903b2a0bd5dc3.js} +1 -1
  12. package/out/_next/static/chunks/840-8cec2bbd104111f2.js +1 -0
  13. package/out/_next/static/chunks/904-cb627b6d7b8068f9.js +1 -0
  14. package/out/_next/static/chunks/958-8f814daf5896ff97.js +1 -0
  15. package/out/_next/static/chunks/pages/{_app-61dfd5e4a504dad6.js → _app-2d01c2c528624eaf.js} +44 -44
  16. package/out/_next/static/chunks/pages/{changelog-4b8369d91d82b28b.js → changelog-fa36b9995c26e1d7.js} +1 -1
  17. package/out/_next/static/chunks/pages/changes-494c71511b2e8989.js +1 -0
  18. package/out/_next/static/chunks/pages/index-d8e3a2c0d712904f.js +1 -0
  19. package/out/_next/static/chunks/pages/labs-ebce03a4e7a95a4e.js +1 -0
  20. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-79a62d775e64898c.js → simulator-7b17cb59d0db03b5.js} +1 -1
  21. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-724893d27ffa426c.js → [variation]-763cc8c12e977b4a.js} +1 -1
  22. package/out/_next/static/chunks/pages/slices-22db04643850c1d8.js +1 -0
  23. package/out/_next/static/css/31841735992dea23.css +1 -0
  24. package/out/_next/static/css/58a89606d9ca9093.css +1 -0
  25. package/out/_next/static/css/5d18ccf403d4649a.css +1 -0
  26. package/out/_next/static/css/{51597cd1f01c4889.css → 78250665d395ea50.css} +1 -1
  27. package/out/_next/static/css/{16b41648cd1de03b.css → b0be58d878c0fac3.css} +1 -1
  28. package/out/_next/static/css/e48f99beffa085f5.css +1 -0
  29. package/out/changelog.html +1 -1
  30. package/out/changes.html +1 -1
  31. package/out/custom-types/[customTypeId].html +1 -1
  32. package/out/custom-types.html +1 -1
  33. package/out/index.html +1 -1
  34. package/out/labs.html +1 -1
  35. package/out/page-types/[pageTypeId].html +1 -1
  36. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  37. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  38. package/out/slices.html +1 -1
  39. package/package.json +7 -7
  40. package/pages/_app.tsx +39 -35
  41. package/pages/slices.tsx +0 -1
  42. package/src/components/Counter/Counter.css.ts +26 -0
  43. package/src/components/Counter/Counter.stories.tsx +17 -0
  44. package/src/components/Counter/Counter.tsx +16 -0
  45. package/src/components/Counter/index.ts +1 -0
  46. package/src/components/PageLayout/PageLayout.css.ts +3 -8
  47. package/src/components/PageLayout/PageLayout.stories.tsx +1 -10
  48. package/src/components/PageLayout/PageLayout.tsx +2 -7
  49. package/src/components/SideNav/SideNav.css.ts +10 -3
  50. package/src/components/SideNav/SideNav.stories.tsx +2 -29
  51. package/src/components/SideNav/SideNav.tsx +1 -5
  52. package/src/components/SideNav/index.ts +0 -1
  53. package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +3 -4
  54. package/src/features/inAppGuide/InAppGuideContext.tsx +47 -0
  55. package/src/features/inAppGuide/InAppGuideDialog.tsx +97 -0
  56. package/src/features/inAppGuide/inAppGuideContent.tsx +65 -0
  57. package/src/hooks/usePersistedState.ts +34 -0
  58. package/src/hooks/useRepositoryInformation.ts +24 -0
  59. package/src/icons/FlowerBackgroundIcon.tsx +17 -0
  60. package/src/icons/HelpIcon.tsx +19 -0
  61. package/test/pages/slices.test.tsx +8 -4
  62. package/test/src/modules/__fixtures__/serverState.ts +0 -2
  63. package/components/Navigation/Environment.tsx +0 -47
  64. package/components/Navigation/index.css.ts +0 -6
  65. package/out/_next/static/chunks/840-5b485c737b24324b.js +0 -1
  66. package/out/_next/static/chunks/904-6204ab2ad8798857.js +0 -1
  67. package/out/_next/static/chunks/958-c90d60818f1c468a.js +0 -1
  68. package/out/_next/static/chunks/pages/changes-db6e8c6be5ae076e.js +0 -1
  69. package/out/_next/static/chunks/pages/index-941b44c74dd339e4.js +0 -1
  70. package/out/_next/static/chunks/pages/labs-2922105ab714d32a.js +0 -1
  71. package/out/_next/static/chunks/pages/slices-93b7af2624c85b8e.js +0 -1
  72. package/out/_next/static/css/009bd7f5ac85fc6a.css +0 -1
  73. package/out/_next/static/css/3e88bd24e38f18d0.css +0 -1
  74. package/out/_next/static/css/6e4843007ff41825.css +0 -1
  75. package/out/_next/static/css/867d8d7ab4a75762.css +0 -1
  76. package/out/_next/static/eEMbH0pyO9pWG3REga3T2/_buildManifest.js +0 -1
  77. package/src/components/Divider/Divider.css.ts +0 -31
  78. package/src/components/Divider/Divider.stories.tsx +0 -27
  79. package/src/components/Divider/Divider.tsx +0 -25
  80. package/src/components/Divider/index.ts +0 -1
  81. package/src/components/SideNav/SideNavEnvironmentSelector.css.ts +0 -69
  82. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +0 -163
  83. package/src/features/environments/actions/getActiveEnvironmentDomain.ts +0 -11
  84. package/src/features/environments/actions/getEnvironments.ts +0 -12
  85. package/src/features/environments/actions/setEnvironment.ts +0 -18
  86. package/src/features/environments/useActiveEnvironment.ts +0 -38
  87. package/src/features/environments/useEnvironments.ts +0 -7
  88. package/src/features/legacyState/actions/getLegacySliceMachineState.ts +0 -53
  89. package/src/features/legacyState/useLegacySliceMachineState.ts +0 -7
  90. /package/out/_next/static/{eEMbH0pyO9pWG3REga3T2 → BIxidu02_xbgjO9EV7tg4}/_ssgManifest.js +0 -0
@@ -1 +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 Z}});var s=t(62230),i=t(85244),d=t(17064),r=t(81541),a=t(52322),c=t(22715),o=t(13980),l=t(2784),u=t(65077),p=t(28173),f=t(75012),x=t(9620),h=t(2967),y=t(75289),_=t(71168),g=t(21078),v=t(13394),j=t(99968),m=t(92809),b=function(e){var n=e.fields,t=e.title,d=e.tabId,r=e.enterEditMode,c=e.enterSelectMode,o=e.onDragEnd,l=e.renderFieldAccessor,u=e.onDeleteItem,p=e.showHints,f=e.newField,x=e.renderHintBase,b=e.isRepeatable,R=e.dataCy,S=e.isRepeatableCustomType;return(0,a.jsx)(h.Z5,{onDragEnd:o,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 o=e.value,f=o.config,h=o.type,R=(0,j.t)(v,f,h);if(!R)return(0,a.jsx)(_.Z,{children:(0,a.jsxs)(y.xv,{children:['Field type "',h,'" not supported']})});var Z={item:e,index:n,tabId:d,widget:R,showHints:p,key:e.key,enterSelectMode:c,renderFieldAccessor:l,enterEditMode:r,parentSnapshot:t,deleteItem:u,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:S};if(R.CustomListItem){var C=R.CustomListItem;return(0,a.jsx)(C,(0,s.Z)({},Z))}var w=(0,a.jsx)(m.Z,{item:e,show:p,isRepeatable:b,renderHintBase:x,Widgets:v,typeName:R.CUSTOM_NAME||R.TYPE_NAME});return(0,a.jsx)(g.Z,(0,i.Z)((0,s.Z)({},Z),{HintElement:w}))}),e.placeholder,f]}))}})})},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,{variant:"secondary",onClick:function(){return n()},"data-cy":"add-".concat(t,"-field"),startIcon:"add",children:"Add a new field"})})]})},S=function(e){var n=e.zoneType,t=e.tabId,o=e.title,h=e.fields,y=e.poolOfFieldsToCheck,_=e.widgetsArray,g=e.isRepeatable,v=e.onDeleteItem,j=e.onSaveNewField,m=e.onDragEnd,S=e.EditModal,Z=e.onSave,C=e.dataTip,w=e.renderHintBase,k=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,l.useState)(!1),F=T[0],N=T[1],q=(0,l.useState)({isOpen:!1}),M=q[0],O=q[1],D=(0,l.useState)({isOpen:!1}),H=D[0],z=D[1],B=(0,l.useState)(null),P=B[0],U=B[1],W=function(e){O({isOpen:!0,field:e})},L=function(){z({isOpen:!0})},Y=function(){O({isOpen:!1})},K=function(){return z({isOpen:!1})},V=function(e){U({widgetTypeName:e,fields:h}),z({isOpen:!1})},X=function(){return U(null)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.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:F,onCheckedChange:N,size:"small",style:{flexShrink:0}}),(0,a.jsx)(c.zx,{"data-cy":"add-".concat(g?"Repeatable":"Static","-field"),onClick:L,startIcon:"add",variant:"secondary",children:"Add a new field"})]}):void 0,children:o}),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:F,dataTip:C,title:o,renderFieldAccessor:k,renderHintBase:w,enterEditMode:W,enterSelectMode:L,onDragEnd:m,onDeleteItem:v,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];j.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)(S,{data:M,close:Y,onSave:Z,fields:y,zoneType:n}),(0,a.jsx)(f.Z,{data:H,close:K,onSelect:V,widgetsArray:A})]})};S.propTypes={isRepeatable:o.bool,title:o.string.isRequired,dataTip:o.string.isRequired,onSave:o.func.isRequired,onSaveNewField:o.func.isRequired,onDragEnd:o.func.isRequired,onDeleteItem:o.func.isRequired,poolOfFieldsToCheck:(0,o.arrayOf)((0,o.shape)({key:o.string,value:o.object})),renderHintBase:o.func.isRequired,renderFieldAccessor:o.func.isRequired,widgetsArray:o.array.isRequired,fields:(0,o.arrayOf)((0,o.shape)({key:o.string.isRequired,value:(0,o.shape)({config:o.object,fields:o.array,type:o.string.isRequired})}))};var Z=S},28173:function(e,n,t){"use strict";t.d(n,{aV:function(){return c},Bu:function(){return o}});var s=t(62230),i=t(85244),d=t(98240),r=t(52322),a=t(22715);t(71068),t(36214);var c=function(e){return(0,r.jsx)("div",(0,i.Z)((0,s.Z)({},e),{className:"_2a96i71 _1ecs97de7i _1ecs97de7k _1ecs97d39c _1ecs97d3gp _1ecs97de99 _1ecs97deal _1ecs97deaz _1ecs97de7t _1ecs97de89"}))},o=function(e){var n=e.actions,t=e.children,c=e.toggle,o=(0,d.Z)(e,["actions","children","toggle"]);return(0,r.jsxs)("div",(0,i.Z)((0,s.Z)({},o),{className:"_2a96i73 _2a96i72 _1ecs97de7i _1ecs97de7k _1ecs97de7u _1ecs97de7q _1ecs97d6f0 _1ecs97d6md _1ecs97deb3 _1ecs97de7j _1ecs97deff _1ecs97deq7 _1ecs97d18 _1ecs97d8l _1ecs97dear _1ecs97dehg _1ecs97depv",children:[(0,r.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:t}),c,Boolean(n)?(0,r.jsx)("div",{className:"_1ecs97de7i _1ecs97de7k _1ecs97de7u _1ecs97de7q _1ecs97de7v _1ecs97dehg _1ecs97de81 _1ecs97dedf",children:n}):null]}))}},36214:function(){},71068:function(){}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[482],{8482:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var s=t(62230),i=t(85244),d=t(17064),r=t(81541),a=t(52322),c=t(22715),o=t(13980),l=t(2784),u=t(65077),f=t(28173),p=t(75012),x=t(9620),h=t(2967),y=t(75289),_=t(71168),j=t(21078),g=t(13394),v=t(99968),m=t(92809),b=function(e){var n=e.fields,t=e.title,d=e.tabId,r=e.enterEditMode,c=e.enterSelectMode,o=e.onDragEnd,l=e.renderFieldAccessor,u=e.onDeleteItem,f=e.showHints,p=e.newField,x=e.renderHintBase,b=e.isRepeatable,R=e.dataCy,S=e.isRepeatableCustomType;return(0,a.jsx)(h.Z5,{onDragEnd:o,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 o=e.value,p=o.config,h=o.type,R=(0,v.t)(g,p,h);if(!R)return(0,a.jsx)(_.Z,{children:(0,a.jsxs)(y.xv,{children:['Field type "',h,'" not supported']})});var Z={item:e,index:n,tabId:d,widget:R,showHints:f,key:e.key,enterSelectMode:c,renderFieldAccessor:l,enterEditMode:r,parentSnapshot:t,deleteItem:u,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:S};if(R.CustomListItem){var C=R.CustomListItem;return(0,a.jsx)(C,(0,s.Z)({},Z))}var w=(0,a.jsx)(m.Z,{item:e,show:f,isRepeatable:b,renderHintBase:x,Widgets:g,typeName:R.CUSTOM_NAME||R.TYPE_NAME});return(0,a.jsx)(j.Z,(0,i.Z)((0,s.Z)({},Z),{HintElement:w}))}),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,{variant:"secondary",onClick:function(){return n()},"data-cy":"add-".concat(t,"-field"),startIcon:"add",children:"Add a new field"})})]})},S=function(e){var n=e.zoneType,t=e.tabId,o=e.title,h=e.fields,y=e.poolOfFieldsToCheck,_=e.widgetsArray,j=e.isRepeatable,g=e.onDeleteItem,v=e.onSaveNewField,m=e.onDragEnd,S=e.EditModal,Z=e.onSave,C=e.dataTip,w=e.renderHintBase,k=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,l.useState)(!1),F=T[0],N=T[1],q=(0,l.useState)({isOpen:!1}),M=q[0],O=q[1],D=(0,l.useState)({isOpen:!1}),H=D[0],z=D[1],B=(0,l.useState)(null),P=B[0],U=B[1],W=function(e){O({isOpen:!0,field:e})},L=function(){z({isOpen:!0})},Y=function(){O({isOpen:!1})},K=function(){return z({isOpen:!1})},V=function(e){U({widgetTypeName:e,fields:h}),z({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:F,onCheckedChange:N,size:"small",style:{flexShrink:0}}),(0,a.jsx)(c.zx,{"data-cy":"add-".concat(j?"Repeatable":"Static","-field"),onClick:L,startIcon:"add",variant:"secondary",children:"Add a new field"})]}):void 0,children:o}),0!==h.length||P?h.length>0||P?(0,a.jsx)(u.xR,{children:(0,a.jsx)(b,{tabId:t,isRepeatable:j,fields:h,showHints:F,dataTip:C,title:o,renderFieldAccessor:k,renderHintBase:w,enterEditMode:W,enterSelectMode:L,onDragEnd:m,onDeleteItem:g,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];v.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:j?"Repeatable":"Static"})}),(0,a.jsx)(S,{data:M,close:Y,onSave:Z,fields:y,zoneType:n}),(0,a.jsx)(p.Z,{data:H,close:K,onSelect:V,widgetsArray:A})]})};S.propTypes={isRepeatable:o.bool,title:o.string.isRequired,dataTip:o.string.isRequired,onSave:o.func.isRequired,onSaveNewField:o.func.isRequired,onDragEnd:o.func.isRequired,onDeleteItem:o.func.isRequired,poolOfFieldsToCheck:(0,o.arrayOf)((0,o.shape)({key:o.string,value:o.object})),renderHintBase:o.func.isRequired,renderFieldAccessor:o.func.isRequired,widgetsArray:o.array.isRequired,fields:(0,o.arrayOf)((0,o.shape)({key:o.string.isRequired,value:(0,o.shape)({config:o.object,fields:o.array,type:o.string.isRequired})}))};var Z=S},28173:function(e,n,t){"use strict";t.d(n,{aV:function(){return c},Bu:function(){return o}});var s=t(62230),i=t(85244),d=t(98240),r=t(52322),a=t(22715);t(40101),t(17610);var c=function(e){return(0,r.jsx)("div",(0,i.Z)((0,s.Z)({},e),{className:"_2a96i71 _1ecs97df4i _1ecs97df4k _1ecs97d3go _1ecs97d3o1 _1ecs97df69 _1ecs97df7l _1ecs97df7z _1ecs97df4t _1ecs97df59"}))},o=function(e){var n=e.actions,t=e.children,c=e.toggle,o=(0,d.Z)(e,["actions","children","toggle"]);return(0,r.jsxs)("div",(0,i.Z)((0,s.Z)({},o),{className:"_2a96i73 _2a96i72 _1ecs97df4i _1ecs97df4k _1ecs97df4u _1ecs97df4q _1ecs97d6to _1ecs97d711 _1ecs97df83 _1ecs97df4j _1ecs97dfci _1ecs97dfna _1ecs97d18 _1ecs97d8l _1ecs97df7r _1ecs97dfej _1ecs97dfmy",children:[(0,r.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:t}),c,Boolean(n)?(0,r.jsx)("div",{className:"_1ecs97df4i _1ecs97df4k _1ecs97df4u _1ecs97df4q _1ecs97df4v _1ecs97dfej _1ecs97df51 _1ecs97dfai",children:n}):null]}))}},17610:function(){},40101:function(){}}]);