slice-machine-ui 2.17.3-alpha.jp-field-type.2 → 2.17.3-alpha.jp-logout.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/_next/static/{x3WrmvfcfrojFCzvx-d16 → IuHy5xX4O7OS7pw5BhQtD}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/{248-a2a655660e3f09b0.js → 248-ce52121d4f52fee1.js} +1 -1
- package/out/_next/static/chunks/{34-8d9d9b2944824750.js → 34-7d7a907d79f9279b.js} +1 -1
- package/out/_next/static/chunks/{489-feb8133b2c5a7773.js → 489-70cd522d13c732e7.js} +1 -1
- package/out/_next/static/chunks/630-ee074347f93761a9.js +1 -0
- package/out/_next/static/chunks/{647-4379a741c8d85d9e.js → 647-740ad5d8c2da5010.js} +1 -1
- package/out/_next/static/chunks/{04ad993f.d7f986af0f739cc9.js → 7c1bce44.7757952f8fa3a45d.js} +1 -1
- package/out/_next/static/chunks/{907-445266211c48b1a5.js → 907-ec265d505f89358d.js} +1 -1
- package/out/_next/static/chunks/pages/{_app-e96528d5f32fa118.js → _app-655a32ee37d0a72e.js} +7 -7
- package/out/_next/static/chunks/pages/{changelog-3663cafded70979e.js → changelog-64a61af8248660c4.js} +1 -1
- package/out/_next/static/chunks/pages/{changes-dda121066bd037bc.js → changes-1eee1278e11e37fe.js} +1 -1
- package/out/_next/static/chunks/pages/{labs-a7ead234825f32c0.js → labs-044341a257fe1f55.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-b127d948a17968d3.js → simulator-760b1b0acfc25361.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-29476d3554e484bb.js → [variation]-63a0b554bb376d8b.js} +1 -1
- package/out/_next/static/chunks/pages/{slices-742b0e644563ac91.js → slices-7d9503c44b707717.js} +1 -1
- package/out/_next/static/chunks/webpack-9ab76e21d6198b49.js +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 +6 -6
- package/src/apiClient.ts +1 -1
- package/src/domain/fields.ts +17 -49
- package/src/features/auth/LogoutButton.tsx +32 -0
- package/src/features/environments/useActiveEnvironment.ts +9 -1
- package/src/features/environments/useEnvironments.ts +8 -1
- package/src/legacy/components/ItemHeader/index.tsx +3 -6
- package/src/legacy/components/ListItem/Header.tsx +12 -19
- package/src/legacy/components/ListItem/index.tsx +0 -1
- package/src/legacy/components/LoginModal/index.tsx +8 -2
- package/src/legacy/components/Navigation/SideNavEnvironmentSelector/SideNavEnvironmentSelector.tsx +3 -0
- package/src/legacy/lib/builders/common/EditModal/index.jsx +10 -4
- package/src/legacy/lib/models/common/widgets/Group/createGroupWidget.ts +1 -2
- package/src/legacy/lib/models/common/widgets/Widget.ts +1 -2
- package/src/modules/auth.ts +3 -0
- package/src/modules/availableCustomTypes/index.ts +12 -1
- package/src/modules/slices/index.ts +10 -1
- package/src/modules/useSliceMachineActions.ts +4 -1
- package/src/modules/userContext/index.ts +8 -0
- package/out/_next/static/chunks/630-aa87af9c8b0807f7.js +0 -1
- package/out/_next/static/chunks/webpack-e0c07a2fe4908d81.js +0 -1
- /package/out/_next/static/{x3WrmvfcfrojFCzvx-d16 → IuHy5xX4O7OS7pw5BhQtD}/_ssgManifest.js +0 -0
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.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-7d7a907d79f9279b.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/pages/changes-1eee1278e11e37fe.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.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/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/349-7118116b93278f73.js" defer=""></script><script src="/_next/static/chunks/385-b949173dfa03dd3e.js" defer=""></script><script src="/_next/static/chunks/34-7d7a907d79f9279b.js" defer=""></script><script src="/_next/static/chunks/647-740ad5d8c2da5010.js" defer=""></script><script src="/_next/static/chunks/630-ee074347f93761a9.js" defer=""></script><script src="/_next/static/chunks/907-ec265d505f89358d.js" defer=""></script><script src="/_next/static/chunks/489-70cd522d13c732e7.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-7102c23f96cd1768.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_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":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-740ad5d8c2da5010.js" defer=""></script><script src="/_next/static/chunks/248-ce52121d4f52fee1.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-5acd56959b60346f.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-740ad5d8c2da5010.js" defer=""></script><script src="/_next/static/chunks/248-ce52121d4f52fee1.js" defer=""></script><script src="/_next/static/chunks/pages/index-0d8cb369de720a35.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.js" defer=""></script><script src="/_next/static/chunks/pages/labs-044341a257fe1f55.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.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/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/349-7118116b93278f73.js" defer=""></script><script src="/_next/static/chunks/385-b949173dfa03dd3e.js" defer=""></script><script src="/_next/static/chunks/34-7d7a907d79f9279b.js" defer=""></script><script src="/_next/static/chunks/647-740ad5d8c2da5010.js" defer=""></script><script src="/_next/static/chunks/630-ee074347f93761a9.js" defer=""></script><script src="/_next/static/chunks/907-ec265d505f89358d.js" defer=""></script><script src="/_next/static/chunks/489-70cd522d13c732e7.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-d4bc920a5efffa0a.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_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":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.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-54b8336d20b41933.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-760b1b0acfc25361.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_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":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.css" data-n-g=""/><link rel="preload" href="/_next/static/css/cdee5b195444f185.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cdee5b195444f185.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.css" data-n-g=""/><link rel="preload" href="/_next/static/css/cdee5b195444f185.css" as="style"/><link rel="stylesheet" href="/_next/static/css/cdee5b195444f185.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-9ab76e21d6198b49.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-655a32ee37d0a72e.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/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/349-7118116b93278f73.js" defer=""></script><script src="/_next/static/chunks/34-7d7a907d79f9279b.js" defer=""></script><script src="/_next/static/chunks/630-ee074347f93761a9.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-63a0b554bb376d8b.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_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":"IuHy5xX4O7OS7pw5BhQtD","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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-
|
|
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/303dad78be1eb854.css" as="style"/><link rel="stylesheet" href="/_next/static/css/303dad78be1eb854.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-9ab76e21d6198b49.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-655a32ee37d0a72e.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/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/50-586dc7ab5e584e76.js" defer=""></script><script src="/_next/static/chunks/34-7d7a907d79f9279b.js" defer=""></script><script src="/_next/static/chunks/658-8231c0b729e0124a.js" defer=""></script><script src="/_next/static/chunks/907-ec265d505f89358d.js" defer=""></script><script src="/_next/static/chunks/pages/slices-7d9503c44b707717.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_buildManifest.js" defer=""></script><script src="/_next/static/IuHy5xX4O7OS7pw5BhQtD/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"IuHy5xX4O7OS7pw5BhQtD","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.17.3-alpha.jp-
|
|
3
|
+
"version": "2.17.3-alpha.jp-logout.3",
|
|
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,16 +35,16 @@
|
|
|
35
35
|
"start-slicemachine": "./bin/start-slicemachine.cjs"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@slicemachine/manager": "0.25.2-alpha.jp-
|
|
39
|
-
"start-slicemachine": "0.12.60-alpha.jp-
|
|
38
|
+
"@slicemachine/manager": "0.25.2-alpha.jp-logout.5",
|
|
39
|
+
"start-slicemachine": "0.12.60-alpha.jp-logout.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
|
43
43
|
"@extractus/oembed-extractor": "3.1.8",
|
|
44
44
|
"@prismicio/client": "7.17.0",
|
|
45
|
-
"@prismicio/editor-fields": "0.4.
|
|
46
|
-
"@prismicio/editor-support": "0.4.
|
|
47
|
-
"@prismicio/editor-ui": "0.4.
|
|
45
|
+
"@prismicio/editor-fields": "0.4.85",
|
|
46
|
+
"@prismicio/editor-support": "0.4.85",
|
|
47
|
+
"@prismicio/editor-ui": "0.4.85",
|
|
48
48
|
"@prismicio/mock": "0.7.1",
|
|
49
49
|
"@prismicio/mocks": "2.14.0",
|
|
50
50
|
"@prismicio/simulator": "0.1.4",
|
package/src/apiClient.ts
CHANGED
|
@@ -163,7 +163,7 @@ export const pushChanges: SliceMachineManagerClient["prismicRepository"]["pushCh
|
|
|
163
163
|
|
|
164
164
|
/** Auth Routes * */
|
|
165
165
|
|
|
166
|
-
export const
|
|
166
|
+
export const logout = async (): Promise<void> => {
|
|
167
167
|
return await managerClient.user.logout();
|
|
168
168
|
};
|
|
169
169
|
|
package/src/domain/fields.ts
CHANGED
|
@@ -34,44 +34,12 @@ export interface GroupField extends BaseField {
|
|
|
34
34
|
|
|
35
35
|
export type Field = NestableField | UIDField | GroupField;
|
|
36
36
|
|
|
37
|
-
export type CustomFieldType =
|
|
38
|
-
| FieldType
|
|
39
|
-
| "LinkToMedia"
|
|
40
|
-
| "ContentRelationship"
|
|
41
|
-
| "NestedGroup";
|
|
42
|
-
|
|
43
|
-
export const fieldLabels: Record<CustomFieldType, string> = {
|
|
44
|
-
Text: "Text",
|
|
45
|
-
StructuredText: "Rich Text",
|
|
46
|
-
Boolean: "Boolean",
|
|
47
|
-
Number: "Number",
|
|
48
|
-
Select: "Select",
|
|
49
|
-
Link: "Link",
|
|
50
|
-
LinkToMedia: "Link To Media",
|
|
51
|
-
UID: "UID",
|
|
52
|
-
Image: "Image",
|
|
53
|
-
Group: "Repeatable Group",
|
|
54
|
-
NestedGroup: "Nested Group",
|
|
55
|
-
Color: "Color",
|
|
56
|
-
Date: "Date",
|
|
57
|
-
Table: "Table",
|
|
58
|
-
Timestamp: "Timestamp",
|
|
59
|
-
Embed: "Embed",
|
|
60
|
-
GeoPoint: "Geopoint",
|
|
61
|
-
ContentRelationship: "Content Relationship",
|
|
62
|
-
IntegrationFields: "Integration Fields",
|
|
63
|
-
Range: "Range",
|
|
64
|
-
Separator: "Separator",
|
|
65
|
-
Slices: "Slices",
|
|
66
|
-
Choice: "Choice",
|
|
67
|
-
};
|
|
68
|
-
|
|
69
37
|
/**
|
|
70
38
|
* Nestable fields
|
|
71
39
|
*/
|
|
72
40
|
|
|
73
41
|
export const booleanField: NestableField = {
|
|
74
|
-
name:
|
|
42
|
+
name: "Boolean",
|
|
75
43
|
description: "A true or false toggle.",
|
|
76
44
|
icon: "toggleOff",
|
|
77
45
|
thumbnail:
|
|
@@ -80,7 +48,7 @@ export const booleanField: NestableField = {
|
|
|
80
48
|
};
|
|
81
49
|
|
|
82
50
|
export const colorField: NestableField = {
|
|
83
|
-
name:
|
|
51
|
+
name: "Color",
|
|
84
52
|
description: "A color in hex format.",
|
|
85
53
|
icon: "colorLens",
|
|
86
54
|
thumbnail:
|
|
@@ -89,7 +57,7 @@ export const colorField: NestableField = {
|
|
|
89
57
|
};
|
|
90
58
|
|
|
91
59
|
export const dateField: NestableField = {
|
|
92
|
-
name:
|
|
60
|
+
name: "Date",
|
|
93
61
|
description: "A date without time.",
|
|
94
62
|
icon: "dateRange",
|
|
95
63
|
thumbnail:
|
|
@@ -98,7 +66,7 @@ export const dateField: NestableField = {
|
|
|
98
66
|
};
|
|
99
67
|
|
|
100
68
|
export const embedField: NestableField = {
|
|
101
|
-
name:
|
|
69
|
+
name: "Embed",
|
|
102
70
|
description: "A video, song, or oEmbed link.",
|
|
103
71
|
icon: "code",
|
|
104
72
|
thumbnail:
|
|
@@ -107,7 +75,7 @@ export const embedField: NestableField = {
|
|
|
107
75
|
};
|
|
108
76
|
|
|
109
77
|
export const geoPointField: NestableField = {
|
|
110
|
-
name:
|
|
78
|
+
name: "Geopoint",
|
|
111
79
|
description: "A geographical coordinate.",
|
|
112
80
|
icon: "place",
|
|
113
81
|
thumbnail:
|
|
@@ -116,7 +84,7 @@ export const geoPointField: NestableField = {
|
|
|
116
84
|
};
|
|
117
85
|
|
|
118
86
|
export const imageField: NestableField = {
|
|
119
|
-
name:
|
|
87
|
+
name: "Image",
|
|
120
88
|
description: "A responsive image.",
|
|
121
89
|
icon: "image",
|
|
122
90
|
thumbnail:
|
|
@@ -125,7 +93,7 @@ export const imageField: NestableField = {
|
|
|
125
93
|
};
|
|
126
94
|
|
|
127
95
|
export const LinkField: NestableField = {
|
|
128
|
-
name:
|
|
96
|
+
name: "Link",
|
|
129
97
|
description: "A link to a website, asset, or document.",
|
|
130
98
|
icon: "link",
|
|
131
99
|
thumbnail:
|
|
@@ -134,7 +102,7 @@ export const LinkField: NestableField = {
|
|
|
134
102
|
};
|
|
135
103
|
|
|
136
104
|
export const contentRelationshipField: NestableField = {
|
|
137
|
-
name:
|
|
105
|
+
name: "Content Relationship",
|
|
138
106
|
description: "A reference to a Prismic document.",
|
|
139
107
|
icon: "settingsEthernet",
|
|
140
108
|
thumbnail:
|
|
@@ -144,7 +112,7 @@ export const contentRelationshipField: NestableField = {
|
|
|
144
112
|
};
|
|
145
113
|
|
|
146
114
|
export const LinkToMediaField: NestableField = {
|
|
147
|
-
name:
|
|
115
|
+
name: "Link To Media",
|
|
148
116
|
description: "A link to a media asset.",
|
|
149
117
|
icon: "attachFile",
|
|
150
118
|
thumbnail:
|
|
@@ -154,7 +122,7 @@ export const LinkToMediaField: NestableField = {
|
|
|
154
122
|
};
|
|
155
123
|
|
|
156
124
|
export const numberField: NestableField = {
|
|
157
|
-
name:
|
|
125
|
+
name: "Number",
|
|
158
126
|
description: "An integer or float.",
|
|
159
127
|
icon: "pin",
|
|
160
128
|
thumbnail:
|
|
@@ -163,7 +131,7 @@ export const numberField: NestableField = {
|
|
|
163
131
|
};
|
|
164
132
|
|
|
165
133
|
export const richTextField: NestableField = {
|
|
166
|
-
name:
|
|
134
|
+
name: "Rich Text",
|
|
167
135
|
description: "Text with formatting options.",
|
|
168
136
|
icon: "textFields",
|
|
169
137
|
thumbnail:
|
|
@@ -172,7 +140,7 @@ export const richTextField: NestableField = {
|
|
|
172
140
|
};
|
|
173
141
|
|
|
174
142
|
export const selectField: NestableField = {
|
|
175
|
-
name:
|
|
143
|
+
name: "Select",
|
|
176
144
|
description: "A dropdown of options.",
|
|
177
145
|
icon: "arrowDropDownCircle",
|
|
178
146
|
thumbnail:
|
|
@@ -181,7 +149,7 @@ export const selectField: NestableField = {
|
|
|
181
149
|
};
|
|
182
150
|
|
|
183
151
|
export const tableField: NestableField = {
|
|
184
|
-
name:
|
|
152
|
+
name: "Table",
|
|
185
153
|
description: "A structured table.",
|
|
186
154
|
icon: "table",
|
|
187
155
|
thumbnail:
|
|
@@ -190,7 +158,7 @@ export const tableField: NestableField = {
|
|
|
190
158
|
};
|
|
191
159
|
|
|
192
160
|
export const textField: NestableField = {
|
|
193
|
-
name:
|
|
161
|
+
name: "Text",
|
|
194
162
|
description: "A text string without formatting.",
|
|
195
163
|
icon: "title",
|
|
196
164
|
thumbnail:
|
|
@@ -199,7 +167,7 @@ export const textField: NestableField = {
|
|
|
199
167
|
};
|
|
200
168
|
|
|
201
169
|
export const timestampField: NestableField = {
|
|
202
|
-
name:
|
|
170
|
+
name: "Timestamp",
|
|
203
171
|
description: "A date and time.",
|
|
204
172
|
icon: "schedule",
|
|
205
173
|
thumbnail:
|
|
@@ -230,7 +198,7 @@ export const nestableFields: NestableField[] = [
|
|
|
230
198
|
*/
|
|
231
199
|
|
|
232
200
|
export const UIDField: UIDField = {
|
|
233
|
-
name:
|
|
201
|
+
name: "UID",
|
|
234
202
|
description: "Unique Identifier",
|
|
235
203
|
icon: "tag",
|
|
236
204
|
thumbnail:
|
|
@@ -243,7 +211,7 @@ export const UIDField: UIDField = {
|
|
|
243
211
|
*/
|
|
244
212
|
|
|
245
213
|
export const groupField: GroupField = {
|
|
246
|
-
name:
|
|
214
|
+
name: "Repeatable Group",
|
|
247
215
|
description: "A set of fields that editors can repeat.",
|
|
248
216
|
icon: "createNewFolder",
|
|
249
217
|
thumbnail:
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IconButton, Tooltip } from "@prismicio/editor-ui";
|
|
2
|
+
import { toast } from "react-toastify";
|
|
3
|
+
|
|
4
|
+
import { logout as managerLogout } from "@/apiClient";
|
|
5
|
+
import { invalidateActiveEnvironmentData } from "@/features/environments/useActiveEnvironment";
|
|
6
|
+
import { invalidateEnvironmentsData } from "@/features/environments/useEnvironments";
|
|
7
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
8
|
+
|
|
9
|
+
export function LogoutButton() {
|
|
10
|
+
const { logout: storeLogout } = useSliceMachineActions();
|
|
11
|
+
|
|
12
|
+
async function onClick() {
|
|
13
|
+
await managerLogout();
|
|
14
|
+
storeLogout();
|
|
15
|
+
|
|
16
|
+
// refresh queries to update the UI
|
|
17
|
+
invalidateEnvironmentsData();
|
|
18
|
+
invalidateActiveEnvironmentData();
|
|
19
|
+
|
|
20
|
+
toast.success("Logged out");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Tooltip content="Log out" side="right">
|
|
25
|
+
<IconButton
|
|
26
|
+
icon="logout"
|
|
27
|
+
onClick={() => void onClick()}
|
|
28
|
+
hiddenLabel="Log out"
|
|
29
|
+
/>
|
|
30
|
+
</Tooltip>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Fetcher,
|
|
3
|
+
invalidateFetcherData,
|
|
4
|
+
useRequest,
|
|
5
|
+
} from "@prismicio/editor-support/Suspense";
|
|
2
6
|
|
|
3
7
|
import { getActiveEnvironment } from "./actions/getActiveEnvironment";
|
|
4
8
|
|
|
9
|
+
export function invalidateActiveEnvironmentData() {
|
|
10
|
+
invalidateFetcherData(getActiveEnvironment as Fetcher<undefined[], unknown>);
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
export function useActiveEnvironment() {
|
|
6
14
|
return useRequest(getActiveEnvironment, []);
|
|
7
15
|
}
|
|
@@ -1,7 +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
|
|
|
8
|
+
export function invalidateEnvironmentsData() {
|
|
9
|
+
invalidateFetcherData(getEnvironments);
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
export function useEnvironments() {
|
|
6
13
|
return useRequest(getEnvironments, []);
|
|
7
14
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { FieldType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import type { Theme } from "theme-ui";
|
|
4
3
|
import { Flex, Text } from "theme-ui";
|
|
5
4
|
|
|
6
|
-
import { fieldLabels } from "@/domain/fields";
|
|
7
|
-
|
|
8
5
|
const ItemHeader: React.FC<{
|
|
9
|
-
|
|
6
|
+
text: React.ReactNode;
|
|
10
7
|
sliceFieldName: React.ReactNode;
|
|
11
8
|
theme: Theme;
|
|
12
9
|
WidgetIcon: React.ElementType;
|
|
13
|
-
}> = ({
|
|
10
|
+
}> = ({ text, sliceFieldName, theme, WidgetIcon }) => (
|
|
14
11
|
<Flex sx={{ alignItems: "center" }}>
|
|
15
12
|
<WidgetIcon
|
|
16
13
|
size={28}
|
|
@@ -33,7 +30,7 @@ const ItemHeader: React.FC<{
|
|
|
33
30
|
fontSize: "15px",
|
|
34
31
|
}}
|
|
35
32
|
>
|
|
36
|
-
{
|
|
33
|
+
{text}
|
|
37
34
|
</Text>
|
|
38
35
|
<Text
|
|
39
36
|
as="p"
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Box, Tooltip } from "@prismicio/editor-ui";
|
|
2
1
|
import * as CSS from "csstype";
|
|
3
2
|
import { IconType } from "react-icons";
|
|
4
3
|
import { Flex, Text, Theme } from "theme-ui";
|
|
5
4
|
|
|
6
|
-
import { CustomFieldType, fieldLabels } from "@/domain/fields";
|
|
7
5
|
import { TextWithTooltip } from "@/legacy/components/Tooltip/TextWithTooltip";
|
|
8
6
|
|
|
9
7
|
interface ItemHeaderProps {
|
|
@@ -11,7 +9,6 @@ interface ItemHeaderProps {
|
|
|
11
9
|
sliceFieldName: string | undefined;
|
|
12
10
|
theme: Theme;
|
|
13
11
|
WidgetIcon: IconType;
|
|
14
|
-
type: CustomFieldType;
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
const ItemHeader: React.FC<ItemHeaderProps> = ({
|
|
@@ -19,24 +16,20 @@ const ItemHeader: React.FC<ItemHeaderProps> = ({
|
|
|
19
16
|
sliceFieldName,
|
|
20
17
|
theme,
|
|
21
18
|
WidgetIcon,
|
|
22
|
-
type,
|
|
23
19
|
}) => (
|
|
24
20
|
<Flex sx={{ alignItems: "center", position: "relative" }}>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/>
|
|
38
|
-
</Box>
|
|
39
|
-
</Tooltip>
|
|
21
|
+
<WidgetIcon
|
|
22
|
+
size={28}
|
|
23
|
+
style={{
|
|
24
|
+
color: theme.colors?.primary as CSS.Property.Color,
|
|
25
|
+
marginRight: "8px",
|
|
26
|
+
borderRadius: "4px",
|
|
27
|
+
padding: "4px",
|
|
28
|
+
border: "2px solid",
|
|
29
|
+
borderColor: theme.colors?.primary as CSS.Property.Color,
|
|
30
|
+
flexShrink: 0,
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
40
33
|
<TextWithTooltip
|
|
41
34
|
text={text}
|
|
42
35
|
as="p"
|
|
@@ -110,7 +110,6 @@ function ListItem<F extends TabField, S extends AnyObjectSchema>({
|
|
|
110
110
|
theme={theme}
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing
|
|
112
112
|
text={config?.label || key}
|
|
113
|
-
type={widget.CUSTOM_NAME ?? widget.TYPE_NAME}
|
|
114
113
|
sliceFieldName={
|
|
115
114
|
renderFieldAccessor && renderFieldAccessor(key)
|
|
116
115
|
}
|
|
@@ -13,8 +13,10 @@ import {
|
|
|
13
13
|
Text,
|
|
14
14
|
} from "theme-ui";
|
|
15
15
|
|
|
16
|
-
import { checkAuthStatus, getState,
|
|
16
|
+
import { checkAuthStatus, getState, logout } from "@/apiClient";
|
|
17
17
|
import { getActiveEnvironment } from "@/features/environments/actions/getActiveEnvironment";
|
|
18
|
+
import { invalidateActiveEnvironmentData } from "@/features/environments/useActiveEnvironment";
|
|
19
|
+
import { invalidateEnvironmentsData } from "@/features/environments/useEnvironments";
|
|
18
20
|
import { useAutoSync } from "@/features/sync/AutoSyncProvider";
|
|
19
21
|
import { getUnSyncedChanges } from "@/features/sync/getUnSyncChanges";
|
|
20
22
|
import SliceMachineModal from "@/legacy/components/SliceMachineModal";
|
|
@@ -64,7 +66,7 @@ const LoginModal: React.FunctionComponent = () => {
|
|
|
64
66
|
|
|
65
67
|
try {
|
|
66
68
|
startLoadingLogin();
|
|
67
|
-
await
|
|
69
|
+
await logout();
|
|
68
70
|
window.open(loginRedirectUrl, "_blank");
|
|
69
71
|
await startPolling<CheckAuthStatusResponse, ValidAuthStatus>(
|
|
70
72
|
checkAuthStatus,
|
|
@@ -76,6 +78,10 @@ const LoginModal: React.FunctionComponent = () => {
|
|
|
76
78
|
60,
|
|
77
79
|
);
|
|
78
80
|
|
|
81
|
+
// refresh queries to update the UI
|
|
82
|
+
invalidateEnvironmentsData();
|
|
83
|
+
invalidateActiveEnvironmentData();
|
|
84
|
+
|
|
79
85
|
toast.success("Logged in");
|
|
80
86
|
stopLoadingLogin();
|
|
81
87
|
closeModals();
|
package/src/legacy/components/Navigation/SideNavEnvironmentSelector/SideNavEnvironmentSelector.tsx
CHANGED
|
@@ -18,6 +18,7 @@ import type { Environment } from "@slicemachine/manager/client";
|
|
|
18
18
|
import { clsx } from "clsx";
|
|
19
19
|
import type { FC, ReactNode } from "react";
|
|
20
20
|
|
|
21
|
+
import { LogoutButton } from "@/features/auth/LogoutButton";
|
|
21
22
|
import { LoginIcon } from "@/icons/LoginIcon";
|
|
22
23
|
import { LogoIcon } from "@/icons/LogoIcon";
|
|
23
24
|
|
|
@@ -138,6 +139,8 @@ export const SideNavEnvironmentSelector: FC<SideNavEnvironmentSelectorProps> = (
|
|
|
138
139
|
}
|
|
139
140
|
/>
|
|
140
141
|
) : undefined}
|
|
142
|
+
|
|
143
|
+
{variant === "default" && <LogoutButton />}
|
|
141
144
|
</Box>
|
|
142
145
|
</>
|
|
143
146
|
)}
|