slice-machine-ui 2.18.1-beta.6 → 2.18.1-beta.8
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/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js +1 -0
- package/out/_next/static/chunks/{248-43faecb386a16518.js → 248-a9c33f7fbe2da2f1.js} +1 -1
- package/out/_next/static/chunks/256-07f768a2b19b0a0e.js +4 -0
- package/out/_next/static/chunks/34-50c64778da33cff6.js +1 -0
- package/out/_next/static/chunks/344-fdb3008f4bb3b0c1.js +1 -0
- package/out/_next/static/chunks/429-aab52070cad2884b.js +3 -0
- package/out/_next/static/chunks/484-3e011e79c41f0342.js +1 -0
- package/out/_next/static/chunks/{489-234ed5471aa694b3.js → 489-a046ae0fa4f74435.js} +1 -1
- 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 → 630-eae75e90b30f201a.js} +1 -1
- package/out/_next/static/chunks/pages/{_app-174a369b49b73427.js → _app-1b4541325b4a29ab.js} +105 -105
- package/out/_next/static/chunks/pages/{changelog-ba55ed247c20dc21.js → changelog-3901f2fc937d9648.js} +1 -1
- package/out/_next/static/chunks/pages/changes-c58a60af39167147.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 → labs-dd04033db23a58f3.js} +1 -1
- 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 → simulator-f237aaa755dc9a99.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c8c3e7ffb898261c.js +1 -0
- package/out/_next/static/chunks/pages/slices-0aaae79dcc7b8c55.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/features/auth/LogoutButton.tsx +42 -36
- package/src/features/builder/fields/contentRelationship/ContentRelationshipFieldPicker.tsx +3 -3
- package/src/features/changes/StatusBadge.tsx +1 -9
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +3 -3
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +3 -3
- package/src/features/environments/actions/useSetEnvironment.ts +22 -0
- package/src/features/environments/useActiveEnvironment.ts +17 -9
- package/src/features/environments/useEnvironments.ts +11 -8
- package/src/features/errorBoundaries/AppStateErrorBoundary.tsx +108 -0
- package/src/{ErrorBoundary.tsx → features/errorBoundaries/DefaultErrorBoundary.tsx} +2 -2
- package/src/features/errorBoundaries/index.ts +2 -0
- package/src/features/labs/labsList/LabsPage.tsx +3 -3
- package/src/features/navigation/Navigation.tsx +7 -8
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +3 -3
- package/src/features/sync/AutoSyncProvider.tsx +2 -2
- package/src/features/sync/getUnSyncChanges.ts +1 -3
- package/src/legacy/components/AppLayout/index.tsx +10 -85
- package/src/legacy/components/ChangesEmptyState/UnauthenticatedView.tsx +31 -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 +14 -6
- package/src/legacy/components/Navigation/ChangesItem.tsx +44 -100
- package/src/legacy/components/Navigation/Environment.tsx +2 -7
- package/src/legacy/components/Navigation/SideNavEnvironmentSelector/SideNavEnvironmentSelector.tsx +3 -8
- 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 +5 -5
- package/src/modules/userContext/types.ts +2 -3
- package/src/pages/_app.tsx +93 -95
- package/src/pages/changes.tsx +4 -5
- package/src/queryClient.tsx +24 -0
- package/test/__testutils__/index.tsx +13 -10
- package/out/_next/static/AMILL72qfLjZDeK2IRMSB/_buildManifest.js +0 -1
- package/out/_next/static/chunks/157-54b8336d20b41933.js +0 -3
- package/out/_next/static/chunks/34-8d9d9b2944824750.js +0 -1
- package/out/_next/static/chunks/349-7118116b93278f73.js +0 -4
- package/out/_next/static/chunks/50-586dc7ab5e584e76.js +0 -1
- package/out/_next/static/chunks/pages/changes-4c23263cdc8e59c6.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-11802744e89707f7.js +0 -1
- package/out/_next/static/chunks/pages/slices-f6552e2fbc491c4d.js +0 -1
- package/out/_next/static/css/cdee5b195444f185.css +0 -1
- package/src/features/environments/actions/setEnvironment.ts +0 -18
- package/src/legacy/components/ChangesEmptyState/AuthErrorPage.tsx +0 -44
- /package/out/_next/static/{AMILL72qfLjZDeK2IRMSB → U9WVTg1pSTJVt94SbRE5Y}/_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-1b4541325b4a29ab.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-3901f2fc937d9648.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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-50c64778da33cff6.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/pages/changes-c58a60af39167147.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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-50c64778da33cff6.js" defer=""></script><script src="/_next/static/chunks/647-4379a741c8d85d9e.js" defer=""></script><script src="/_next/static/chunks/630-eae75e90b30f201a.js" defer=""></script><script src="/_next/static/chunks/907-445266211c48b1a5.js" defer=""></script><script src="/_next/static/chunks/489-a046ae0fa4f74435.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-af9376721beb489e.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_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":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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-a9c33f7fbe2da2f1.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-5acd56959b60346f.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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-a9c33f7fbe2da2f1.js" defer=""></script><script src="/_next/static/chunks/pages/index-0d8cb369de720a35.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.js" defer=""></script><script src="/_next/static/chunks/pages/labs-dd04033db23a58f3.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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-50c64778da33cff6.js" defer=""></script><script src="/_next/static/chunks/647-4379a741c8d85d9e.js" defer=""></script><script src="/_next/static/chunks/630-eae75e90b30f201a.js" defer=""></script><script src="/_next/static/chunks/907-445266211c48b1a5.js" defer=""></script><script src="/_next/static/chunks/489-a046ae0fa4f74435.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-a24665e91b882169.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_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":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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/429-aab52070cad2884b.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-f237aaa755dc9a99.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_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":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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-50c64778da33cff6.js" defer=""></script><script src="/_next/static/chunks/630-eae75e90b30f201a.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-c8c3e7ffb898261c.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_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":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-1b4541325b4a29ab.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-50c64778da33cff6.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-0aaae79dcc7b8c55.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_buildManifest.js" defer=""></script><script src="/_next/static/U9WVTg1pSTJVt94SbRE5Y/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"U9WVTg1pSTJVt94SbRE5Y","runtimeConfig":{"sentryEnvironment":"beta"},"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-beta.
|
|
3
|
+
"version": "2.18.1-beta.8",
|
|
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-beta.
|
|
39
|
-
"start-slicemachine": "0.12.61-beta.
|
|
38
|
+
"@slicemachine/manager": "0.25.3-beta.8",
|
|
39
|
+
"start-slicemachine": "0.12.61-beta.8"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
|
@@ -1,52 +1,34 @@
|
|
|
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 {
|
|
4
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
5
|
+
import { useRouter } from "next/router";
|
|
6
|
+
import { toast } from "react-toastify";
|
|
5
7
|
|
|
6
|
-
import { clearAuth
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { clearAuth, getState } from "@/apiClient";
|
|
9
|
+
import { GetActiveEnvironmentQueryKey } from "@/features/environments/useActiveEnvironment";
|
|
10
|
+
import { GetEnvironmentsQueryKey } from "@/features/environments/useEnvironments";
|
|
9
11
|
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
10
12
|
|
|
11
|
-
|
|
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
|
-
|
|
13
|
+
export function EnvironmentLogoutButton() {
|
|
21
14
|
const { refreshState } = useSliceMachineActions();
|
|
15
|
+
const queryClient = useQueryClient();
|
|
22
16
|
|
|
23
17
|
async function onClick() {
|
|
24
|
-
await
|
|
18
|
+
await clearAuth();
|
|
25
19
|
|
|
26
20
|
const serverState = await getState();
|
|
27
21
|
refreshState(serverState);
|
|
28
|
-
|
|
29
22
|
Sentry.setUser({ id: serverState.env.shortId });
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
await Promise.all([
|
|
25
|
+
queryClient.invalidateQueries({ queryKey: GetEnvironmentsQueryKey }),
|
|
26
|
+
queryClient.invalidateQueries({
|
|
27
|
+
queryKey: GetActiveEnvironmentQueryKey,
|
|
28
|
+
}),
|
|
29
|
+
]);
|
|
34
30
|
|
|
35
|
-
|
|
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
|
-
);
|
|
31
|
+
toast.success("Logged out");
|
|
50
32
|
}
|
|
51
33
|
|
|
52
34
|
return (
|
|
@@ -55,9 +37,33 @@ export function LogoutButton(props: LogoutButtonProps) {
|
|
|
55
37
|
icon="logout"
|
|
56
38
|
onClick={() => void onClick()}
|
|
57
39
|
hiddenLabel="Log out"
|
|
58
|
-
loading={isLoading}
|
|
59
|
-
sx={sx}
|
|
60
40
|
/>
|
|
61
41
|
</Tooltip>
|
|
62
42
|
);
|
|
63
43
|
}
|
|
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,11 +30,11 @@ import {
|
|
|
30
30
|
} from "@prismicio/types-internal/lib/customtypes";
|
|
31
31
|
import { useEffect } from "react";
|
|
32
32
|
|
|
33
|
-
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
34
33
|
import {
|
|
35
34
|
revalidateGetCustomTypes,
|
|
36
35
|
useCustomTypes as useCustomTypesRequest,
|
|
37
36
|
} from "@/features/customTypes/useCustomTypes";
|
|
37
|
+
import { DefaultErrorBoundary } from "@/features/errorBoundaries";
|
|
38
38
|
import { isValidObject } from "@/utils/isValidObject";
|
|
39
39
|
|
|
40
40
|
type NonReadonly<T> = { -readonly [P in keyof T]: T[P] };
|
|
@@ -226,7 +226,7 @@ export function ContentRelationshipFieldPicker(
|
|
|
226
226
|
props: ContentRelationshipFieldPickerProps,
|
|
227
227
|
) {
|
|
228
228
|
return (
|
|
229
|
-
<
|
|
229
|
+
<DefaultErrorBoundary
|
|
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
|
+
</DefaultErrorBoundary>
|
|
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.UNAUTHENTICATED) {
|
|
77
77
|
return {
|
|
78
78
|
badgeColor: "grey",
|
|
79
79
|
badgeTitle: "Unknown",
|
|
@@ -81,14 +81,6 @@ 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
|
-
}
|
|
92
84
|
}
|
|
93
85
|
default: {
|
|
94
86
|
return {
|
|
@@ -4,9 +4,9 @@ import { FC, Suspense } from "react";
|
|
|
4
4
|
|
|
5
5
|
import { telemetry } from "@/apiClient";
|
|
6
6
|
import { ContentTabs } from "@/components/ContentTabs";
|
|
7
|
-
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
8
7
|
import { MarkdownRenderer } from "@/features/documentation/MarkdownRenderer";
|
|
9
8
|
import { useDocumentation } from "@/features/documentation/useDocumentation";
|
|
9
|
+
import { DefaultErrorBoundary } from "@/features/errorBoundaries";
|
|
10
10
|
import { useOnboarding } from "@/features/onboarding/useOnboarding";
|
|
11
11
|
import { useAdapterName } from "@/hooks/useAdapterName";
|
|
12
12
|
|
|
@@ -68,7 +68,7 @@ type PageSnippetDialogProps = { model: CustomType };
|
|
|
68
68
|
export const PageSnippetDialog: FC<PageSnippetDialogProps> = ({ model }) => {
|
|
69
69
|
return (
|
|
70
70
|
<div>
|
|
71
|
-
<
|
|
71
|
+
<DefaultErrorBoundary>
|
|
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
|
+
</DefaultErrorBoundary>
|
|
82
82
|
</div>
|
|
83
83
|
);
|
|
84
84
|
};
|
|
@@ -9,8 +9,8 @@ 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 { ErrorBoundary } from "@/ErrorBoundary";
|
|
13
12
|
import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
|
|
13
|
+
import { DefaultErrorBoundary } from "@/features/errorBoundaries";
|
|
14
14
|
import {
|
|
15
15
|
AppLayout,
|
|
16
16
|
AppLayoutActions,
|
|
@@ -42,7 +42,7 @@ export const CustomTypesTablePage: FC<CustomTypesTablePageProps> = ({
|
|
|
42
42
|
Machine
|
|
43
43
|
</title>
|
|
44
44
|
</Head>
|
|
45
|
-
<
|
|
45
|
+
<DefaultErrorBoundary
|
|
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
|
+
</DefaultErrorBoundary>
|
|
123
123
|
</>
|
|
124
124
|
);
|
|
125
125
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { revalidateData } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
import { Environment } from "@slicemachine/manager/client";
|
|
3
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
4
|
+
|
|
5
|
+
import { getState } from "@/apiClient";
|
|
6
|
+
import { GetActiveEnvironmentQueryKey } from "@/features/environments/useActiveEnvironment";
|
|
7
|
+
import { managerClient } from "@/managerClient";
|
|
8
|
+
|
|
9
|
+
export function useSetEnvironment() {
|
|
10
|
+
const queryClient = useQueryClient();
|
|
11
|
+
|
|
12
|
+
return async (environment: Pick<Environment, "domain">) => {
|
|
13
|
+
await managerClient.project.updateEnvironment({
|
|
14
|
+
environment: environment.domain,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
void Promise.all([
|
|
18
|
+
queryClient.invalidateQueries({ queryKey: GetActiveEnvironmentQueryKey }),
|
|
19
|
+
revalidateData(getState, []),
|
|
20
|
+
]);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
invalidateFetcherData,
|
|
3
|
-
useRequest,
|
|
4
|
-
} from "@prismicio/editor-support/Suspense";
|
|
1
|
+
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
5
2
|
|
|
6
3
|
import { getActiveEnvironment } from "./actions/getActiveEnvironment";
|
|
7
4
|
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
}
|
|
5
|
+
export const GetActiveEnvironmentQueryKey = ["getActiveEnvironment"];
|
|
6
|
+
|
|
7
|
+
export function useActiveEnvironment(options?: { suspense?: boolean }) {
|
|
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
|
+
});
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
return {
|
|
18
|
+
activeEnvironment: data?.activeEnvironment,
|
|
19
|
+
error: data?.error ?? error ?? undefined,
|
|
20
|
+
...rest,
|
|
21
|
+
};
|
|
14
22
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
invalidateFetcherData,
|
|
3
|
-
useRequest,
|
|
4
|
-
} from "@prismicio/editor-support/Suspense";
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
5
2
|
|
|
6
3
|
import { getEnvironments } from "./actions/getEnvironments";
|
|
7
4
|
|
|
8
|
-
export
|
|
9
|
-
invalidateFetcherData(getEnvironments);
|
|
10
|
-
}
|
|
5
|
+
export const GetEnvironmentsQueryKey = ["getEnvironments"];
|
|
11
6
|
|
|
12
7
|
export function useEnvironments() {
|
|
13
|
-
|
|
8
|
+
const { data, error, ...rest } = useQuery({
|
|
9
|
+
queryKey: GetEnvironmentsQueryKey,
|
|
10
|
+
queryFn: () => getEnvironments(),
|
|
11
|
+
});
|
|
12
|
+
return {
|
|
13
|
+
environments: data?.environments,
|
|
14
|
+
error: data?.error ?? error ?? undefined,
|
|
15
|
+
...rest,
|
|
16
|
+
};
|
|
14
17
|
}
|