slice-machine-ui 2.18.1-alpha.jp-unauthorized-error-improvement.3 → 2.18.1-alpha.lg-remove-changes-tooltip.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/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js +1 -0
- package/out/_next/static/chunks/157-fa8b348c960c8283.js +3 -0
- package/out/_next/static/chunks/248-43faecb386a16518.js +1 -0
- package/out/_next/static/chunks/256-07f768a2b19b0a0e.js +4 -0
- package/out/_next/static/chunks/34-8d9d9b2944824750.js +1 -0
- package/out/_next/static/chunks/344-fdb3008f4bb3b0c1.js +1 -0
- package/out/_next/static/chunks/484-3e011e79c41f0342.js +1 -0
- package/out/_next/static/chunks/489-234ed5471aa694b3.js +1 -0
- package/out/_next/static/chunks/500-d3989390f5e8da53.js +1 -0
- package/out/_next/static/chunks/52d4c156-89c6ec6efca0a0bb.js +1 -0
- package/out/_next/static/chunks/630-bb6e3db525588f16.js +1 -0
- package/out/_next/static/chunks/pages/{_app-c7d9a846c0b3691d.js → _app-f618a7f60ab6c871.js} +105 -105
- package/out/_next/static/chunks/pages/{changelog-3901f2fc937d9648.js → changelog-ba55ed247c20dc21.js} +1 -1
- package/out/_next/static/chunks/pages/changes-4c23263cdc8e59c6.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-816acb31b652239b.js → [customTypeId]-af9376721beb489e.js} +1 -1
- package/out/_next/static/chunks/pages/labs-78ac01d97ab02cd7.js +1 -0
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-669d5479e81b638b.js → [pageTypeId]-a24665e91b882169.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-b127d948a17968d3.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-da423aa0da7bc11e.js +1 -0
- package/out/_next/static/chunks/pages/slices-59b857edc9f72d5f.js +1 -0
- package/out/_next/static/css/{303dad78be1eb854.css → bc89f2cd4e4781f5.css} +1 -1
- package/out/_next/static/css/e8e03c0d4003d1eb.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/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 +3 -3
- package/src/ErrorBoundary.tsx +47 -0
- package/src/features/auth/LogoutButton.tsx +36 -42
- package/src/features/builder/fields/contentRelationship/ContentRelationshipFieldPicker.tsx +3 -3
- package/src/features/changes/StatusBadge.tsx +9 -1
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +3 -3
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +3 -3
- package/src/features/environments/actions/setEnvironment.ts +18 -0
- package/src/features/environments/useActiveEnvironment.ts +9 -17
- package/src/features/environments/useEnvironments.ts +8 -11
- package/src/features/labs/labsList/LabsPage.tsx +3 -3
- package/src/features/navigation/Navigation.tsx +8 -7
- package/src/features/navigation/RepositoryInfo.tsx +24 -18
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +3 -3
- package/src/features/sync/getUnSyncChanges.ts +3 -1
- package/src/legacy/components/AppLayout/index.tsx +85 -10
- package/src/legacy/components/ChangesEmptyState/AuthErrorPage.tsx +44 -0
- package/src/legacy/components/ChangesEmptyState/index.ts +1 -1
- package/src/legacy/components/ChangesItems/ChangesItems.tsx +3 -3
- package/src/legacy/components/LoginModal/index.tsx +5 -13
- package/src/legacy/components/Navigation/ChangesItem.tsx +48 -96
- package/src/legacy/components/Navigation/Environment.tsx +7 -2
- package/src/legacy/components/Navigation/SideNavEnvironmentSelector/SideNavEnvironmentSelector.tsx +8 -3
- package/src/legacy/components/Simulator/index.tsx +3 -3
- package/src/legacy/lib/builders/CustomTypeBuilder/TabZone/index.tsx +3 -3
- package/src/modules/userContext/index.ts +3 -6
- package/src/modules/userContext/types.ts +1 -1
- package/src/pages/_app.tsx +95 -88
- package/src/pages/changes.tsx +5 -4
- package/test/__testutils__/index.tsx +10 -13
- package/out/_next/static/3Td9X45NaJ_8YB9QfJ1ne/_buildManifest.js +0 -1
- package/out/_next/static/chunks/248-bcf03aa3c62e7dfb.js +0 -1
- package/out/_next/static/chunks/34-50c64778da33cff6.js +0 -1
- package/out/_next/static/chunks/349-7118116b93278f73.js +0 -4
- package/out/_next/static/chunks/429-1137c819c2bf6b66.js +0 -3
- package/out/_next/static/chunks/489-77d1fe67b6d0f0f8.js +0 -1
- package/out/_next/static/chunks/50-586dc7ab5e584e76.js +0 -1
- package/out/_next/static/chunks/630-c34de0401b8a0375.js +0 -1
- package/out/_next/static/chunks/pages/changes-62d4e18795217cba.js +0 -1
- package/out/_next/static/chunks/pages/labs-5f5c63fb1f7d4b92.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-eca10940c9083d4c.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-b4700a6332ea828c.js +0 -1
- package/out/_next/static/chunks/pages/slices-bf63f937b184b470.js +0 -1
- package/out/_next/static/css/cdee5b195444f185.css +0 -1
- package/src/errorBoundaries.tsx +0 -150
- package/src/features/environments/actions/useSetEnvironment.ts +0 -22
- package/src/legacy/components/ChangesEmptyState/UnauthenticatedView.tsx +0 -31
- package/src/queryClient.tsx +0 -24
- /package/out/_next/static/{3Td9X45NaJ_8YB9QfJ1ne → VmMYRhIVl72a4_hcPUaVI}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.BaseHoverCard_reset__HckHR{all:"unset";box-sizing:"border-box";display:revert;font-family:var(--font-family-body)}.BaseHoverCard_container__IZMCG{background-color:var(--grey1);border-radius:6px;box-shadow:var(--box-shadow-3)}.BaseHoverCard_arrow__gvcjD{fill:var(--grey1)}.HoverCard_block__Fubs4{all:unset;box-sizing:border-box;font-family:var(--font-family-body)}.HoverCard_blockWithDisplayRevert__H6Rbw{display:revert}.HoverCard_root__OaRBr{width:288px}.HoverCard_title__dO_Y9{align-items:center;border-bottom-style:solid;border-color:var(--grey6);border-width:1px;color:var(--grey12);display:flex;justify-content:space-between;margin-bottom:16px;padding:4px 6px 4px 16px;font-size:12px;font-weight:500;line-height:16px}.HoverCard_titleCloseIcon__DlZJS{color:var(--grey11);display:flex;padding:4px}.HoverCard_titleCloseIcon__DlZJS:hover{cursor:pointer}.HoverCard_mediaContainer__4Lt3z{display:flex;margin-bottom:8px;padding-inline:16px}.HoverCard_media__U7jSc{border-color:var(--grey6);border-radius:6px;border-style:solid;border-width:1px;overflow:hidden;width:100%;height:146px}.HoverCard_description__HZ9_z{color:var(--grey11);margin-bottom:16px;padding-inline:16px;font-size:12px;font-weight:400;line-height:20px}.HoverCard_closeButtonContainer__7JiLA{padding-bottom:16px;padding-inline:16px}.List_flex__b6acG{all:unset;display:flex}.List_row__zKnOI{flex-direction:row}.List_root__m_SiQ{border-color:var(--grey6);flex-direction:column;overflow-x:hidden}.List_root-border__UW3vp{border-radius:6px;border-style:solid;border-width:1px}.List_child__MJ49i{align-items:center;border-bottom-color:var(--grey6);border-bottom-width:1px;box-sizing:border-box;height:48px;padding-right:8px}.List_child__MJ49i:last-child{border-bottom-color:transparent}.List_header__T0WM5{background-color:var(--grey2);border-bottom-style:solid;gap:8px;padding-left:16px}.List_headerActions__mNgLY{align-items:center;flex-grow:1;gap:8px;justify-content:end;min-width:0}.List_item__LMBx4{background-color:var(--grey1);border-bottom-style:dashed;padding-left:12px}.ZoneEmptyState_root__DAfG2{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background-color:var(--grey3);text-align:center;padding-top:32px;padding-bottom:32px;min-height:288px}.Divider_base__4eT6E{width:100%;border-style:none;margin:0}.Divider_variant-dashed__4Lvrj{border-color:currentColor;border-top:dashed;border-width:1px}.Divider_variant-edgeFaded__049V2{height:1px;background-image:linear-gradient(90deg,color-mix(in srgb,currentColor,transparent 100%),currentColor,color-mix(in srgb,currentColor,transparent 100%))}.Card_flex__opby1{all:unset;display:flex}.Card_grid__VAvIS{all:unset;display:grid}.Card_column__W4ACG{flex-direction:column}.Card_root__YVuvU{position:relative;box-sizing:border-box;border-color:var(--grey6);border-radius:6px;border-style:solid;border-width:1px;overflow-x:hidden}.Card_root__YVuvU[data-disabled]{opacity:.5}.Card_size-small__aIlxd{height:240px}.Card_size-medium__xegz0{height:320px}.Card_solid__GNGar{background-color:var(--grey3)}.Card_solid__GNGar[data-state=checked]{border-color:var(--purple10)}.Card_outlined__W_dxI{background-color:var(--grey2)}.Card_outlined__W_dxI[data-state=checked]{border-color:var(--purple8)}.Card_interactive__rXw5L:focus-visible{box-shadow:var(--box-shadow-purple-focus)}.Card_interactive__rXw5L[data-disabled]{opacity:.5}.Card_interactive__rXw5L:not([data-disabled]){cursor:pointer}.Card_interactive__rXw5L.Card_solid__GNGar:focus-visible{background-color:var(--grey5);border-color:var(--purple10)}.Card_interactive__rXw5L.Card_outlined__W_dxI:active{background-color:var(--grey4);border-color:var(--purple9)}.Card_interactive__rXw5L.Card_outlined__W_dxI:focus-visible{background-color:var(--grey1);border-color:var(--purple8)}.Card_interactive__rXw5L.Card_outlined__W_dxI:hover{background-color:var(--grey4)}.Card_media__l0kHL{flex-basis:0;flex-grow:1;min-height:0;position:relative;order:0}.Card_solid__GNGar>.Card_media__l0kHL{padding:32px}.Card_outlined__W_dxI>.Card_media__l0kHL{background-color:var(--light-grey3);margin-inline:16px;margin-top:16px;padding:16px}.Card_mediaComponent-div__Y2_PZ{flex-grow:1}.Card_mediaComponent-img__ezOTu{height:100%;-o-object-fit:contain;object-fit:contain}.Card_mediaComponent-img__ezOTu:not([src]){visibility:hidden}.Card_mediaOverlay__Aa__Q{inset:0;position:absolute;visibility:hidden}.Card_mediaOverlay__Aa__Q:before{background-color:var(--light-grey12);content:"";inset:0;opacity:.1;position:absolute}.Card_interactive__rXw5L:focus-visible .Card_mediaOverlay__Aa__Q,.Card_interactive__rXw5L:not([data-disabled]) .Card_mediaOverlay__Aa__Q:has(:focus-visible),.Card_interactive__rXw5L:not([data-disabled]) .Card_media__l0kHL:hover>.Card_mediaOverlay__Aa__Q{visibility:visible}.Card_nonMedia__Fv3Mz{align-items:center;box-sizing:border-box;flex-direction:row}.Card_solid__GNGar>.Card_nonMedia__Fv3Mz{background-color:var(--light-grey1)}.Card_solid__GNGar>.Card_nonMedia__Fv3Mz:not(:first-child){border-top-color:var(--light-grey6);border-top-style:solid;border-top-width:inherit}.Card_actions__XdhOt{height:48px;justify-content:space-between;order:1}.Card_solid__GNGar>.Card_actions__XdhOt{padding-left:12px;padding-right:8px}.Card_outlined__W_dxI>.Card_actions__XdhOt{padding-inline:16px}.Card_footer__U0HS1{gap:8px;height:60px;order:2}.Card_solid__GNGar>.Card_footer__U0HS1{padding-inline:12px}.Card_outlined__W_dxI>.Card_footer__U0HS1{padding-inline:16px}.Card_footerTexts__rTXup{flex-basis:0;flex-grow:1;min-width:0;margin-bottom:4px}.Card_status__PNN2a{height:24px;inset-inline:0;justify-content:center;padding-inline:8px;position:absolute;background-color:var(--purple4);color:var(--purple11)}.Card_startIconBox__1_L4u{display:flex;align-items:center;justify-content:center;padding:8px;border:1px solid var(--grey6);border-radius:6px}.Kbd_root__LRA1F{background-color:var(--grey2);border-color:var(--grey6);border-radius:3px;border-style:solid;border-width:1px;color:var(--grey11);padding-inline:4px}.VariationsList_hideScrollbar__cHCIS::-webkit-scrollbar{display:none}.VariationsList_hideScrollbar__cHCIS{-ms-overflow-style:none;scrollbar-width:none}
|
package/out/changelog.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/870-a72b74312773efea.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-ba55ed247c20dc21.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/changes.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d98ebc475f8423a3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d98ebc475f8423a3.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/8eec4907-b712959d9f984b68.js" defer=""></script><script src="/_next/static/chunks/918-fa4f2563cb5fd014.js" defer=""></script><script src="/_next/static/chunks/34-8d9d9b2944824750.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/pages/changes-4c23263cdc8e59c6.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-fdb3008f4bb3b0c1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/422-c9192a1dbdd2ae0e.js" defer=""></script><script src="/_next/static/chunks/34-8d9d9b2944824750.js" defer=""></script><script src="/_next/static/chunks/647-4379a741c8d85d9e.js" defer=""></script><script src="/_next/static/chunks/630-bb6e3db525588f16.js" defer=""></script><script src="/_next/static/chunks/907-445266211c48b1a5.js" defer=""></script><script src="/_next/static/chunks/489-234ed5471aa694b3.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-af9376721beb489e.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types/[customTypeId]","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/custom-types.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-4379a741c8d85d9e.js" defer=""></script><script src="/_next/static/chunks/248-43faecb386a16518.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-5acd56959b60346f.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/4e475d945cf8a890.css" as="style"/><link rel="stylesheet" href="/_next/static/css/4e475d945cf8a890.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-4379a741c8d85d9e.js" defer=""></script><script src="/_next/static/chunks/248-43faecb386a16518.js" defer=""></script><script src="/_next/static/chunks/pages/index-0d8cb369de720a35.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/labs.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/pages/labs-78ac01d97ab02cd7.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/56f2a6684a524374.css" as="style"/><link rel="stylesheet" href="/_next/static/css/56f2a6684a524374.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-fdb3008f4bb3b0c1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/422-c9192a1dbdd2ae0e.js" defer=""></script><script src="/_next/static/chunks/34-8d9d9b2944824750.js" defer=""></script><script src="/_next/static/chunks/647-4379a741c8d85d9e.js" defer=""></script><script src="/_next/static/chunks/630-bb6e3db525588f16.js" defer=""></script><script src="/_next/static/chunks/907-445266211c48b1a5.js" defer=""></script><script src="/_next/static/chunks/489-234ed5471aa694b3.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-a24665e91b882169.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/page-types/[pageTypeId]","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/72585f70-28b4d7d5384b3703.js" defer=""></script><script src="/_next/static/chunks/157-fa8b348c960c8283.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-b127d948a17968d3.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]/simulator","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/e8e03c0d4003d1eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e8e03c0d4003d1eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/f36c6662-1f3a854183168b10.js" defer=""></script><script src="/_next/static/chunks/4c744e84-480e426e4b1cfef3.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-09fb3b997ad1eb70.js" defer=""></script><script src="/_next/static/chunks/52d4c156-89c6ec6efca0a0bb.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-fdb3008f4bb3b0c1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/500-d3989390f5e8da53.js" defer=""></script><script src="/_next/static/chunks/484-3e011e79c41f0342.js" defer=""></script><script src="/_next/static/chunks/34-8d9d9b2944824750.js" defer=""></script><script src="/_next/static/chunks/630-bb6e3db525588f16.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-da423aa0da7bc11e.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices/[lib]/[sliceName]/[variation]","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/slices.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/bc89f2cd4e4781f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/bc89f2cd4e4781f5.css" data-n-g=""/><link rel="preload" href="/_next/static/css/efa5152b7c0f35c0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/efa5152b7c0f35c0.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-e0c07a2fe4908d81.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-c46f4dcf6e3174bd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-f618a7f60ab6c871.js" defer=""></script><script src="/_next/static/chunks/59b4e022-ef680789f7cc9b11.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/52d4c156-89c6ec6efca0a0bb.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/344-fdb3008f4bb3b0c1.js" defer=""></script><script src="/_next/static/chunks/500-d3989390f5e8da53.js" defer=""></script><script src="/_next/static/chunks/34-8d9d9b2944824750.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/907-445266211c48b1a5.js" defer=""></script><script src="/_next/static/chunks/pages/slices-59b857edc9f72d5f.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_buildManifest.js" defer=""></script><script src="/_next/static/VmMYRhIVl72a4_hcPUaVI/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"VmMYRhIVl72a4_hcPUaVI","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slice-machine-ui",
|
|
3
|
-
"version": "2.18.1-alpha.
|
|
3
|
+
"version": "2.18.1-alpha.lg-remove-changes-tooltip.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A visual builder for your Slice Models with all the tools you need to generate data models and mock CMS content locally.",
|
|
6
6
|
"repository": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"start-slicemachine": "./bin/start-slicemachine.cjs"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@slicemachine/manager": "0.25.3-alpha.
|
|
39
|
-
"start-slicemachine": "0.12.61-alpha.
|
|
38
|
+
"@slicemachine/manager": "0.25.3-alpha.lg-remove-changes-tooltip.1",
|
|
39
|
+
"start-slicemachine": "0.12.61-alpha.lg-remove-changes-tooltip.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ErrorBoundary as EditorUiErrorBoundary } from "@prismicio/editor-ui";
|
|
2
|
+
import {
|
|
3
|
+
isUnauthenticatedError,
|
|
4
|
+
isUnauthorizedError,
|
|
5
|
+
} from "@slicemachine/manager/client";
|
|
6
|
+
import {
|
|
7
|
+
type ComponentPropsWithoutRef,
|
|
8
|
+
type FC,
|
|
9
|
+
useCallback,
|
|
10
|
+
useRef,
|
|
11
|
+
} from "react";
|
|
12
|
+
|
|
13
|
+
import { useAuthStatus } from "@/hooks/useAuthStatus";
|
|
14
|
+
|
|
15
|
+
type ErrorBoundaryProps = Pick<
|
|
16
|
+
// TODO(DT-1979): Export the `ErrorBoundaryProps` type from `@prismicio/editor-ui`.
|
|
17
|
+
ComponentPropsWithoutRef<typeof EditorUiErrorBoundary>,
|
|
18
|
+
"children" | "renderError"
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export const ErrorBoundary: FC<ErrorBoundaryProps> = (props) => {
|
|
22
|
+
const errorRef = useRef<unknown>();
|
|
23
|
+
const authStatus = useAuthStatus();
|
|
24
|
+
return (
|
|
25
|
+
<EditorUiErrorBoundary
|
|
26
|
+
{...props}
|
|
27
|
+
onError={(error) => {
|
|
28
|
+
errorRef.current = error;
|
|
29
|
+
}}
|
|
30
|
+
ref={useCallback(
|
|
31
|
+
(errorBoundary: EditorUiErrorBoundary | null) => {
|
|
32
|
+
if (errorBoundary === null) return;
|
|
33
|
+
const error = errorRef.current;
|
|
34
|
+
if (isUnauthenticatedError(error) || isUnauthorizedError(error)) {
|
|
35
|
+
errorRef.current = undefined;
|
|
36
|
+
errorBoundary.reset();
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
/* eslint-disable-next-line react-hooks/exhaustive-deps --
|
|
40
|
+
* Whenever `authStatus` changes, we want to `reset` the `errorBoundary`
|
|
41
|
+
* if an authentication or authorization error has been caught.
|
|
42
|
+
**/
|
|
43
|
+
[authStatus],
|
|
44
|
+
)}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -1,34 +1,52 @@
|
|
|
1
1
|
import { Button, Icon, IconButton, Tooltip } from "@prismicio/editor-ui";
|
|
2
2
|
import { SX } from "@prismicio/editor-ui/dist/theme";
|
|
3
3
|
import * as Sentry from "@sentry/nextjs";
|
|
4
|
-
import {
|
|
5
|
-
import { useRouter } from "next/router";
|
|
6
|
-
import { toast } from "react-toastify";
|
|
4
|
+
import { ReactNode } from "react";
|
|
7
5
|
|
|
8
|
-
import { clearAuth, getState } from "@/apiClient";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { clearAuth as managerLogout, getState } from "@/apiClient";
|
|
7
|
+
import { invalidateActiveEnvironmentData } from "@/features/environments/useActiveEnvironment";
|
|
8
|
+
import { invalidateEnvironmentsData } from "@/features/environments/useEnvironments";
|
|
11
9
|
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
interface LogoutButtonProps {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
onLogoutSuccess?: () => void;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
sx?: SX;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function LogoutButton(props: LogoutButtonProps) {
|
|
19
|
+
const { children, onLogoutSuccess, isLoading, sx } = props;
|
|
20
|
+
|
|
14
21
|
const { refreshState } = useSliceMachineActions();
|
|
15
|
-
const queryClient = useQueryClient();
|
|
16
22
|
|
|
17
23
|
async function onClick() {
|
|
18
|
-
await
|
|
24
|
+
await managerLogout();
|
|
19
25
|
|
|
20
26
|
const serverState = await getState();
|
|
21
27
|
refreshState(serverState);
|
|
28
|
+
|
|
22
29
|
Sentry.setUser({ id: serverState.env.shortId });
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
queryKey: GetActiveEnvironmentQueryKey,
|
|
28
|
-
}),
|
|
29
|
-
]);
|
|
31
|
+
// refresh queries to update the UI
|
|
32
|
+
invalidateEnvironmentsData();
|
|
33
|
+
invalidateActiveEnvironmentData();
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
onLogoutSuccess?.();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (children !== undefined) {
|
|
39
|
+
return (
|
|
40
|
+
<Button
|
|
41
|
+
onClick={() => void onClick()}
|
|
42
|
+
renderEndIcon={() => <Icon name="logout" size="extraSmall" />}
|
|
43
|
+
color="grey"
|
|
44
|
+
loading={isLoading}
|
|
45
|
+
sx={sx}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</Button>
|
|
49
|
+
);
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
return (
|
|
@@ -37,33 +55,9 @@ export function EnvironmentLogoutButton() {
|
|
|
37
55
|
icon="logout"
|
|
38
56
|
onClick={() => void onClick()}
|
|
39
57
|
hiddenLabel="Log out"
|
|
58
|
+
loading={isLoading}
|
|
59
|
+
sx={sx}
|
|
40
60
|
/>
|
|
41
61
|
</Tooltip>
|
|
42
62
|
);
|
|
43
63
|
}
|
|
44
|
-
|
|
45
|
-
interface ReloadLogoutButtonProps {
|
|
46
|
-
sx?: SX;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function ReloadLogoutButton(props: ReloadLogoutButtonProps) {
|
|
50
|
-
const { sx } = props;
|
|
51
|
-
const router = useRouter();
|
|
52
|
-
|
|
53
|
-
async function onClick() {
|
|
54
|
-
await clearAuth();
|
|
55
|
-
Sentry.setUser({ id: undefined });
|
|
56
|
-
router.reload();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<Button
|
|
61
|
-
onClick={() => void onClick()}
|
|
62
|
-
renderEndIcon={() => <Icon name="logout" size="extraSmall" />}
|
|
63
|
-
color="grey"
|
|
64
|
-
sx={sx}
|
|
65
|
-
>
|
|
66
|
-
Log out
|
|
67
|
-
</Button>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "@prismicio/types-internal/lib/customtypes";
|
|
31
31
|
import { useEffect } from "react";
|
|
32
32
|
|
|
33
|
-
import {
|
|
33
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
34
34
|
import {
|
|
35
35
|
revalidateGetCustomTypes,
|
|
36
36
|
useCustomTypes as useCustomTypesRequest,
|
|
@@ -226,7 +226,7 @@ export function ContentRelationshipFieldPicker(
|
|
|
226
226
|
props: ContentRelationshipFieldPickerProps,
|
|
227
227
|
) {
|
|
228
228
|
return (
|
|
229
|
-
<
|
|
229
|
+
<ErrorBoundary
|
|
230
230
|
renderError={() => (
|
|
231
231
|
<Box alignItems="center" gap={8}>
|
|
232
232
|
<Icon name="alert" size="small" color="tomato10" />
|
|
@@ -254,7 +254,7 @@ export function ContentRelationshipFieldPicker(
|
|
|
254
254
|
>
|
|
255
255
|
<ContentRelationshipFieldPickerContent {...props} />
|
|
256
256
|
</AnimatedSuspense>
|
|
257
|
-
</
|
|
257
|
+
</ErrorBoundary>
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -73,7 +73,7 @@ function getStatusBadgeContent(
|
|
|
73
73
|
"Data from the remote repository could not be fetched (no internet connection).",
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
if (args.authStatus === AuthStatus.
|
|
76
|
+
if (args.authStatus === AuthStatus.UNAUTHORIZED) {
|
|
77
77
|
return {
|
|
78
78
|
badgeColor: "grey",
|
|
79
79
|
badgeTitle: "Unknown",
|
|
@@ -81,6 +81,14 @@ function getStatusBadgeContent(
|
|
|
81
81
|
"Data from the remote repository could not be fetched (not connected to Prismic).",
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
+
if (args.authStatus === AuthStatus.FORBIDDEN) {
|
|
85
|
+
return {
|
|
86
|
+
badgeColor: "grey",
|
|
87
|
+
badgeTitle: "Unknown",
|
|
88
|
+
tooltipContent:
|
|
89
|
+
"Data from the remote repository could not be fetched (you don't have access to the repository).",
|
|
90
|
+
};
|
|
91
|
+
}
|
|
84
92
|
}
|
|
85
93
|
default: {
|
|
86
94
|
return {
|
|
@@ -4,7 +4,7 @@ import { FC, Suspense } from "react";
|
|
|
4
4
|
|
|
5
5
|
import { telemetry } from "@/apiClient";
|
|
6
6
|
import { ContentTabs } from "@/components/ContentTabs";
|
|
7
|
-
import {
|
|
7
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
8
8
|
import { MarkdownRenderer } from "@/features/documentation/MarkdownRenderer";
|
|
9
9
|
import { useDocumentation } from "@/features/documentation/useDocumentation";
|
|
10
10
|
import { useOnboarding } from "@/features/onboarding/useOnboarding";
|
|
@@ -68,7 +68,7 @@ type PageSnippetDialogProps = { model: CustomType };
|
|
|
68
68
|
export const PageSnippetDialog: FC<PageSnippetDialogProps> = ({ model }) => {
|
|
69
69
|
return (
|
|
70
70
|
<div>
|
|
71
|
-
<
|
|
71
|
+
<ErrorBoundary>
|
|
72
72
|
<Suspense
|
|
73
73
|
fallback={
|
|
74
74
|
<Button color="grey" startIcon="code">
|
|
@@ -78,7 +78,7 @@ export const PageSnippetDialog: FC<PageSnippetDialogProps> = ({ model }) => {
|
|
|
78
78
|
>
|
|
79
79
|
<PageSnippetContent model={model} />
|
|
80
80
|
</Suspense>
|
|
81
|
-
</
|
|
81
|
+
</ErrorBoundary>
|
|
82
82
|
</div>
|
|
83
83
|
);
|
|
84
84
|
};
|
|
@@ -9,7 +9,7 @@ import Head from "next/head";
|
|
|
9
9
|
import { type FC, Suspense, useState } from "react";
|
|
10
10
|
|
|
11
11
|
import { BreadcrumbItem } from "@/components/Breadcrumb";
|
|
12
|
-
import {
|
|
12
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
13
13
|
import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
|
|
14
14
|
import {
|
|
15
15
|
AppLayout,
|
|
@@ -42,7 +42,7 @@ export const CustomTypesTablePage: FC<CustomTypesTablePageProps> = ({
|
|
|
42
42
|
Machine
|
|
43
43
|
</title>
|
|
44
44
|
</Head>
|
|
45
|
-
<
|
|
45
|
+
<ErrorBoundary
|
|
46
46
|
renderError={() => (
|
|
47
47
|
<AppLayout>
|
|
48
48
|
<AppLayoutContent>
|
|
@@ -119,7 +119,7 @@ export const CustomTypesTablePage: FC<CustomTypesTablePageProps> = ({
|
|
|
119
119
|
</AppLayoutContent>
|
|
120
120
|
</AppLayout>
|
|
121
121
|
</Suspense>
|
|
122
|
-
</
|
|
122
|
+
</ErrorBoundary>
|
|
123
123
|
</>
|
|
124
124
|
);
|
|
125
125
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { revalidateData } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
import { Environment } from "@slicemachine/manager/client";
|
|
3
|
+
|
|
4
|
+
import { getState } from "@/apiClient";
|
|
5
|
+
import { managerClient } from "@/managerClient";
|
|
6
|
+
|
|
7
|
+
import { getActiveEnvironment } from "./getActiveEnvironment";
|
|
8
|
+
|
|
9
|
+
export async function setEnvironment(
|
|
10
|
+
environment: Pick<Environment, "domain">,
|
|
11
|
+
): Promise<void> {
|
|
12
|
+
await managerClient.project.updateEnvironment({
|
|
13
|
+
environment: environment.domain,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
void revalidateData(getActiveEnvironment, []);
|
|
17
|
+
void revalidateData(getState, []);
|
|
18
|
+
}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
invalidateFetcherData,
|
|
3
|
+
useRequest,
|
|
4
|
+
} from "@prismicio/editor-support/Suspense";
|
|
2
5
|
|
|
3
6
|
import { getActiveEnvironment } from "./actions/getActiveEnvironment";
|
|
4
7
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const { suspense } = options ?? {};
|
|
9
|
-
|
|
10
|
-
const hook = suspense === true ? useSuspenseQuery : useQuery;
|
|
11
|
-
|
|
12
|
-
const { data, error, ...rest } = hook({
|
|
13
|
-
queryKey: GetActiveEnvironmentQueryKey,
|
|
14
|
-
queryFn: () => getActiveEnvironment(),
|
|
15
|
-
});
|
|
8
|
+
export function invalidateActiveEnvironmentData() {
|
|
9
|
+
invalidateFetcherData(getActiveEnvironment);
|
|
10
|
+
}
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
error: data?.error ?? error ?? undefined,
|
|
20
|
-
...rest,
|
|
21
|
-
};
|
|
12
|
+
export function useActiveEnvironment() {
|
|
13
|
+
return useRequest(getActiveEnvironment, []);
|
|
22
14
|
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
invalidateFetcherData,
|
|
3
|
+
useRequest,
|
|
4
|
+
} from "@prismicio/editor-support/Suspense";
|
|
2
5
|
|
|
3
6
|
import { getEnvironments } from "./actions/getEnvironments";
|
|
4
7
|
|
|
5
|
-
export
|
|
8
|
+
export function invalidateEnvironmentsData() {
|
|
9
|
+
invalidateFetcherData(getEnvironments);
|
|
10
|
+
}
|
|
6
11
|
|
|
7
12
|
export function useEnvironments() {
|
|
8
|
-
|
|
9
|
-
queryKey: GetEnvironmentsQueryKey,
|
|
10
|
-
queryFn: () => getEnvironments(),
|
|
11
|
-
});
|
|
12
|
-
return {
|
|
13
|
-
environments: data?.environments,
|
|
14
|
-
error: data?.error ?? error ?? undefined,
|
|
15
|
-
...rest,
|
|
16
|
-
};
|
|
13
|
+
return useRequest(getEnvironments, []);
|
|
17
14
|
}
|
|
@@ -3,7 +3,7 @@ import Head from "next/head";
|
|
|
3
3
|
import { type FC, ReactNode, Suspense } from "react";
|
|
4
4
|
|
|
5
5
|
import { BreadcrumbItem } from "@/components/Breadcrumb";
|
|
6
|
-
import {
|
|
6
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
7
7
|
import {
|
|
8
8
|
AppLayout,
|
|
9
9
|
AppLayoutBreadcrumb,
|
|
@@ -19,7 +19,7 @@ export const LabsPage: FC = () => {
|
|
|
19
19
|
<Head>
|
|
20
20
|
<title>Labs - Slice Machine</title>
|
|
21
21
|
</Head>
|
|
22
|
-
<
|
|
22
|
+
<ErrorBoundary
|
|
23
23
|
renderError={() => (
|
|
24
24
|
<LabsPageLayout>
|
|
25
25
|
<Box alignItems="center" justifyContent="center">
|
|
@@ -42,7 +42,7 @@ export const LabsPage: FC = () => {
|
|
|
42
42
|
<LabsList />
|
|
43
43
|
</LabsPageLayout>
|
|
44
44
|
</Suspense>
|
|
45
|
-
</
|
|
45
|
+
</ErrorBoundary>
|
|
46
46
|
</>
|
|
47
47
|
);
|
|
48
48
|
};
|