slice-machine-ui 1.24.1-alpha.feat-disable-push-changes-with-git.1 → 1.24.1-alpha.feat-disable-push-changes-with-git.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/components/App/index.tsx +0 -2
- package/components/Changelog/index.tsx +29 -40
- package/components/Changelog/navigation/index.tsx +27 -23
- package/components/Changelog/versionDetails/{ReleaseNoteDetails.tsx → ReleaseNotesDetails.tsx} +5 -5
- package/components/Changelog/versionDetails/UpdateCommandBox.tsx +15 -11
- package/components/Changelog/versionDetails/VersionKindLabel.tsx +3 -2
- package/components/Changelog/versionDetails/index.tsx +17 -16
- package/components/Navigation/RunningVersion.tsx +14 -0
- package/components/Navigation/UpdateBox.tsx +16 -0
- package/components/Navigation/index.test.tsx +10 -35
- package/components/Navigation/index.tsx +14 -29
- package/components/ScreenshotChangesModal/VariationDropZone.tsx +18 -19
- package/lib/models/common/Environment.ts +0 -2
- package/out/404.html +1 -1
- package/out/_next/static/{xuVUCVxflC0RyiTkq5qed → 3e6nRUAimzMuaz5eEcgXv}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/286-877cd7b96660f95f.js +1 -0
- package/out/_next/static/chunks/{727-c6c0c0d8c72c2676.js → 727-ffb4c69fbb971ed7.js} +1 -1
- package/out/_next/static/chunks/{904-c09e8a519129a3d8.js → 904-d9089efa6d974e3e.js} +1 -1
- package/out/_next/static/chunks/pages/{_app-701b914e9631b4cc.js → _app-4658217e4b01d5ad.js} +26 -26
- package/out/_next/static/chunks/pages/changelog-57289ca6bc99702b.js +1 -0
- package/out/_next/static/chunks/pages/{changes-1ef4fc53dccfdf6f.js → changes-515dc0829e5be3db.js} +1 -1
- package/out/_next/static/chunks/pages/{labs-773e5e6044d04247.js → labs-85d5c752dd5148b6.js} +1 -1
- package/out/_next/static/chunks/pages/settings-6f3e9b82e5b0aa79.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-4cd51835ba731872.js → [variation]-89c911fd39271b5d.js} +1 -1
- package/out/_next/static/chunks/pages/{slices-e0ce615c38e8338d.js → slices-5dc0c55c386e047a.js} +1 -1
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/settings.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/apiClient.ts +0 -50
- package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +14 -0
- package/src/features/changelog/useSliceMachineReleaseNotes.ts +16 -0
- package/src/features/changelog/useSliceMachineVersions.ts +15 -0
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +4 -6
- package/src/features/documentation/MarkdownRenderer/index.tsx +4 -6
- package/src/features/settings/git/GitProvider.ts +21 -21
- package/src/features/settings/git/GitProviderConnectButtons.tsx +5 -5
- package/src/hooks/useAdapterName.ts +4 -5
- package/src/hooks/useMarketingContent.ts +0 -3
- package/src/hooks/useSliceMachineRunningVersion.ts +14 -0
- package/src/hooks/useUpdateAvailable.ts +17 -0
- package/src/modules/environment/index.ts +2 -71
- package/src/modules/loading/types.ts +0 -2
- package/src/modules/useSliceMachineActions.ts +2 -11
- package/src/modules/userContext/index.ts +0 -19
- package/src/modules/userContext/types.ts +0 -4
- package/src/redux/saga.ts +0 -2
- package/test/src/modules/__fixtures__/serverState.ts +0 -13
- package/test/src/modules/environment.test.ts +0 -57
- package/test/src/modules/userContext.test.ts +0 -31
- package/lib/models/common/versions.ts +0 -39
- package/out/_next/static/chunks/286-ed90373e9a469944.js +0 -1
- package/out/_next/static/chunks/pages/changelog-cb1df3a70b20f1b8.js +0 -1
- package/out/_next/static/chunks/pages/settings-e404580aee7f138e.js +0 -1
- package/src/hooks/useChangelog.ts +0 -12
- package/test/pages/simulator.test.tsx +0 -332
- /package/out/_next/static/{xuVUCVxflC0RyiTkq5qed → 3e6nRUAimzMuaz5eEcgXv}/_ssgManifest.js +0 -0
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.js" defer=""></script><script src="/_next/static/chunks/799-0af1215eb2b3c17e.js" defer=""></script><script src="/_next/static/chunks/727-ffb4c69fbb971ed7.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-3c8e721ec6802127.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"3e6nRUAimzMuaz5eEcgXv","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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/be1f49e49a5aa7eb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/be1f49e49a5aa7eb.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.js" defer=""></script><script src="/_next/static/chunks/799-0af1215eb2b3c17e.js" defer=""></script><script src="/_next/static/chunks/727-ffb4c69fbb971ed7.js" defer=""></script><script src="/_next/static/chunks/pages/index-cf93d16e9c63b6db.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"3e6nRUAimzMuaz5eEcgXv","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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.js" defer=""></script><script src="/_next/static/chunks/pages/labs-85d5c752dd5148b6.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"3e6nRUAimzMuaz5eEcgXv","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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/72465cc1225f28a2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/72465cc1225f28a2.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/72465cc1225f28a2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/72465cc1225f28a2.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-4feb6bb3eddbc768.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b12edad30a3617e5.js" defer=""></script><script src="/_next/static/chunks/474-5a072e6fac61f703.js" defer=""></script><script src="/_next/static/chunks/25-3aa4d4b24167d340.js" defer=""></script><script src="/_next/static/chunks/799-0af1215eb2b3c17e.js" defer=""></script><script src="/_next/static/chunks/318-19dbcae10cdb6408.js" defer=""></script><script src="/_next/static/chunks/904-d9089efa6d974e3e.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-84a22c5e480d3fa9.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_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":"3e6nRUAimzMuaz5eEcgXv","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/settings.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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/ca32882a5d2d8d88.css" as="style"/><link rel="stylesheet" href="/_next/static/css/ca32882a5d2d8d88.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/ca32882a5d2d8d88.css" as="style"/><link rel="stylesheet" href="/_next/static/css/ca32882a5d2d8d88.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.js" defer=""></script><script src="/_next/static/chunks/pages/settings-6f3e9b82e5b0aa79.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/settings","query":{},"buildId":"3e6nRUAimzMuaz5eEcgXv","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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.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/18539003-5c90777ef33ded7b.js" defer=""></script><script src="/_next/static/chunks/777-7bc4ca95c82802e5.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-22770c807a7d7090.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_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":"3e6nRUAimzMuaz5eEcgXv","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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/b22c0750c14cc089.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b22c0750c14cc089.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/b22c0750c14cc089.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b22c0750c14cc089.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js" defer=""></script><script src="/_next/static/chunks/4c744e84-e3161d754618373f.js" defer=""></script><script src="/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js" defer=""></script><script src="/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js" defer=""></script><script src="/_next/static/chunks/183-4feb6bb3eddbc768.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b12edad30a3617e5.js" defer=""></script><script src="/_next/static/chunks/25-3aa4d4b24167d340.js" defer=""></script><script src="/_next/static/chunks/318-19dbcae10cdb6408.js" defer=""></script><script src="/_next/static/chunks/286-877cd7b96660f95f.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-89c911fd39271b5d.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_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":"3e6nRUAimzMuaz5eEcgXv","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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f8eb526e10bc2441.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f8eb526e10bc2441.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
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/f86234529ac7fa66.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f86234529ac7fa66.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f8eb526e10bc2441.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f8eb526e10bc2441.css" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-4658217e4b01d5ad.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/c8eae200-966ce352f7b5d2b9.js" defer=""></script><script src="/_next/static/chunks/50-cfc2514205b86001.js" defer=""></script><script src="/_next/static/chunks/25-3aa4d4b24167d340.js" defer=""></script><script src="/_next/static/chunks/286-877cd7b96660f95f.js" defer=""></script><script src="/_next/static/chunks/pages/slices-5dc0c55c386e047a.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_buildManifest.js" defer=""></script><script src="/_next/static/3e6nRUAimzMuaz5eEcgXv/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"3e6nRUAimzMuaz5eEcgXv","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": "1.24.1-alpha.feat-disable-push-changes-with-git.
|
|
3
|
+
"version": "1.24.1-alpha.feat-disable-push-changes-with-git.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": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@radix-ui/react-visually-hidden": "1.0.3",
|
|
39
|
-
"@slicemachine/manager": "0.18.1-alpha.feat-disable-push-changes-with-git.
|
|
40
|
-
"start-slicemachine": "0.12.16-alpha.feat-disable-push-changes-with-git.
|
|
39
|
+
"@slicemachine/manager": "0.18.1-alpha.feat-disable-push-changes-with-git.3",
|
|
40
|
+
"start-slicemachine": "0.12.16-alpha.feat-disable-push-changes-with-git.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@emotion/react": "11.11.1",
|
package/src/apiClient.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { CheckAuthStatusResponse } from "@models/common/Auth";
|
|
|
9
9
|
import ServerState from "@models/server/ServerState";
|
|
10
10
|
import { CustomScreenshotRequest } from "@lib/models/common/Screenshots";
|
|
11
11
|
import { ComponentUI } from "@lib/models/common/ComponentUI";
|
|
12
|
-
import { PackageChangelog } from "@lib/models/common/versions";
|
|
13
12
|
|
|
14
13
|
import { managerClient } from "./managerClient";
|
|
15
14
|
|
|
@@ -209,55 +208,6 @@ export const saveSliceMock = async (
|
|
|
209
208
|
});
|
|
210
209
|
};
|
|
211
210
|
|
|
212
|
-
export const getChangelog = async (): Promise<PackageChangelog> => {
|
|
213
|
-
const [
|
|
214
|
-
currentVersion,
|
|
215
|
-
latestNonBreakingVersion,
|
|
216
|
-
sliceMachineUpdateAvailable,
|
|
217
|
-
sliceMachineVersionWithKind,
|
|
218
|
-
adapterUpdateAvailable,
|
|
219
|
-
adapterVersions,
|
|
220
|
-
adapterName,
|
|
221
|
-
] = await Promise.all([
|
|
222
|
-
managerClient.versions.getRunningSliceMachineVersion(),
|
|
223
|
-
managerClient.versions.getLatestNonBreakingSliceMachineVersion(),
|
|
224
|
-
managerClient.versions.checkIsSliceMachineUpdateAvailable(),
|
|
225
|
-
managerClient.versions.getAllStableSliceMachineVersionsWithKind(),
|
|
226
|
-
managerClient.versions.checkIsAdapterUpdateAvailable(),
|
|
227
|
-
managerClient.versions.getAllStableAdapterVersions(),
|
|
228
|
-
managerClient.project.getAdapterName(),
|
|
229
|
-
]);
|
|
230
|
-
|
|
231
|
-
const sliceMachineVersionsWithMetadata = await Promise.all(
|
|
232
|
-
sliceMachineVersionWithKind.map(async (versionWithKind) => {
|
|
233
|
-
const releaseNotes =
|
|
234
|
-
await managerClient.versions.getSliceMachineReleaseNotesForVersion({
|
|
235
|
-
version: versionWithKind.version,
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
return {
|
|
239
|
-
versionNumber: versionWithKind.version,
|
|
240
|
-
releaseNote: releaseNotes ?? null,
|
|
241
|
-
kind: versionWithKind.kind,
|
|
242
|
-
};
|
|
243
|
-
}),
|
|
244
|
-
);
|
|
245
|
-
|
|
246
|
-
return {
|
|
247
|
-
sliceMachine: {
|
|
248
|
-
currentVersion,
|
|
249
|
-
latestNonBreakingVersion: latestNonBreakingVersion ?? null,
|
|
250
|
-
updateAvailable: sliceMachineUpdateAvailable,
|
|
251
|
-
versions: sliceMachineVersionsWithMetadata,
|
|
252
|
-
},
|
|
253
|
-
adapter: {
|
|
254
|
-
name: adapterName,
|
|
255
|
-
updateAvailable: adapterUpdateAvailable,
|
|
256
|
-
versions: adapterVersions,
|
|
257
|
-
},
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
|
|
261
211
|
export const telemetry = {
|
|
262
212
|
group: managerClient.telemetry.group,
|
|
263
213
|
track: managerClient.telemetry.track,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
|
|
3
|
+
import { managerClient } from "@src/managerClient";
|
|
4
|
+
|
|
5
|
+
async function getSliceMachineLatestNonBreakingVersion() {
|
|
6
|
+
const latestNonBreakingVersion =
|
|
7
|
+
await managerClient.versions.getLatestNonBreakingSliceMachineVersion();
|
|
8
|
+
|
|
9
|
+
return latestNonBreakingVersion;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function useSliceMachineLatestNonBreakingVersion() {
|
|
13
|
+
return useRequest(getSliceMachineLatestNonBreakingVersion, []);
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
|
|
3
|
+
import { managerClient } from "@src/managerClient";
|
|
4
|
+
|
|
5
|
+
async function getSliceMachineReleaseNotes(version: string) {
|
|
6
|
+
const latestNonBreakingVersion =
|
|
7
|
+
await managerClient.versions.getSliceMachineReleaseNotesForVersion({
|
|
8
|
+
version,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
return latestNonBreakingVersion;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function useSliceMachineReleaseNotes(version: string) {
|
|
15
|
+
return useRequest(getSliceMachineReleaseNotes, [version]);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
|
|
3
|
+
import type { Version } from "@slicemachine/manager";
|
|
4
|
+
import { managerClient } from "@src/managerClient";
|
|
5
|
+
|
|
6
|
+
async function getSliceMachineVersions(): Promise<Version[]> {
|
|
7
|
+
const sliceMachineVersions =
|
|
8
|
+
await managerClient.versions.getAllStableSliceMachineVersionsWithKind();
|
|
9
|
+
|
|
10
|
+
return sliceMachineVersions;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function useSliceMachineVersions() {
|
|
14
|
+
return useRequest(getSliceMachineVersions, []);
|
|
15
|
+
}
|
|
@@ -25,12 +25,10 @@ const PageSnippetContent: FC<PageSnippetContentProps> = ({ model }) => {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const trackOpenSnippet = () => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
}
|
|
28
|
+
void telemetry.track({
|
|
29
|
+
event: "page-type:open-snippet",
|
|
30
|
+
framework: adapter,
|
|
31
|
+
});
|
|
34
32
|
};
|
|
35
33
|
|
|
36
34
|
return (
|
|
@@ -33,12 +33,10 @@ const MarkdownCodeBlock = (props: CodeProps) => {
|
|
|
33
33
|
})();
|
|
34
34
|
|
|
35
35
|
const onCopy = () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
}
|
|
36
|
+
void telemetry.track({
|
|
37
|
+
event: "page-type:copy-snippet",
|
|
38
|
+
framework: adapter,
|
|
39
|
+
});
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
return (
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
+
import { GIT_PROVIDER, GitProvider } from "@slicemachine/manager/client";
|
|
2
|
+
|
|
1
3
|
import { BitbucketIcon } from "@src/icons/BitbucketIcon";
|
|
2
4
|
import { GitHubIcon } from "@src/icons/GitHubIcon";
|
|
3
5
|
import { GitLabIcon } from "@src/icons/GitLabIcon";
|
|
4
6
|
import { managerClient } from "@src/managerClient";
|
|
5
7
|
|
|
6
|
-
export type GitProvider = keyof typeof gitProviderToConfig;
|
|
7
|
-
|
|
8
|
-
const GITHUB_APP_SLUG = "prismic-io";
|
|
9
|
-
|
|
10
8
|
export const gitProviderToConfig = {
|
|
11
9
|
gitHub: {
|
|
12
|
-
connect: async () =>
|
|
13
|
-
const state = await managerClient.git.createGitHubAuthState();
|
|
14
|
-
const url = new URL(
|
|
15
|
-
`https://github.com/apps/${GITHUB_APP_SLUG}/installations/new`,
|
|
16
|
-
);
|
|
17
|
-
url.searchParams.set("state", state.key);
|
|
18
|
-
window.open(url, "git-hub-app-installation");
|
|
19
|
-
},
|
|
10
|
+
connect: async () => await openInstallationWindow("gitHub"),
|
|
20
11
|
Icon: GitHubIcon,
|
|
21
12
|
name: "GitHub",
|
|
22
|
-
supported:
|
|
13
|
+
supported: isSupported("gitHub"),
|
|
23
14
|
},
|
|
24
15
|
bitbucket: {
|
|
25
|
-
connect: () =>
|
|
26
|
-
throw new Error("Not implemented.");
|
|
27
|
-
},
|
|
16
|
+
connect: async () => await openInstallationWindow("bitbucket"),
|
|
28
17
|
Icon: BitbucketIcon,
|
|
29
18
|
name: "Bitbucket",
|
|
30
|
-
supported:
|
|
19
|
+
supported: isSupported("bitbucket"),
|
|
31
20
|
},
|
|
32
21
|
gitLab: {
|
|
33
|
-
connect: () =>
|
|
34
|
-
throw new Error("Not implemented.");
|
|
35
|
-
},
|
|
22
|
+
connect: async () => await openInstallationWindow("gitLab"),
|
|
36
23
|
Icon: GitLabIcon,
|
|
37
24
|
name: "GitLab",
|
|
38
|
-
supported:
|
|
25
|
+
supported: isSupported("gitLab"),
|
|
39
26
|
},
|
|
40
27
|
};
|
|
28
|
+
|
|
29
|
+
async function openInstallationWindow(provider: string) {
|
|
30
|
+
if (!isSupported(provider)) {
|
|
31
|
+
throw new Error("Not implemented.");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const url = await managerClient.git.getProviderAppInstallURL({ provider });
|
|
35
|
+
window.open(url, "git-provider-app-installation");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function isSupported(provider: string): provider is GitProvider {
|
|
39
|
+
return Boolean(Object.values<string>(GIT_PROVIDER).includes(provider));
|
|
40
|
+
}
|
|
@@ -3,10 +3,7 @@ import { Button, ButtonGroup, Text, tokens } from "@prismicio/editor-ui";
|
|
|
3
3
|
import { type ComponentPropsWithoutRef, type FC, useState } from "react";
|
|
4
4
|
import { toast } from "react-toastify";
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
type GitProvider,
|
|
8
|
-
gitProviderToConfig,
|
|
9
|
-
} from "@src/features/settings/git/GitProvider";
|
|
6
|
+
import { gitProviderToConfig } from "@src/features/settings/git/GitProvider";
|
|
10
7
|
|
|
11
8
|
export const GitProviderConnectButtons: FC = () => (
|
|
12
9
|
<ButtonGroup>
|
|
@@ -20,7 +17,10 @@ export const GitProviderConnectButtons: FC = () => (
|
|
|
20
17
|
</ButtonGroup>
|
|
21
18
|
);
|
|
22
19
|
|
|
23
|
-
type GitProviderConnectButtonProps = {
|
|
20
|
+
type GitProviderConnectButtonProps = {
|
|
21
|
+
provider: keyof typeof gitProviderToConfig;
|
|
22
|
+
sx?: SX;
|
|
23
|
+
};
|
|
24
24
|
|
|
25
25
|
const GitProviderConnectButton: FC<GitProviderConnectButtonProps> = ({
|
|
26
26
|
provider,
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { managerClient } from "@src/managerClient";
|
|
2
|
-
|
|
3
1
|
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
4
2
|
|
|
3
|
+
import { managerClient } from "@src/managerClient";
|
|
4
|
+
|
|
5
5
|
async function getAdapterName() {
|
|
6
6
|
try {
|
|
7
7
|
return await managerClient.project.getAdapterName();
|
|
8
8
|
} catch (e) {
|
|
9
|
-
|
|
10
|
-
return undefined;
|
|
9
|
+
throw new Error("Error while trying to get adapter name");
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
export function useAdapterName(): string
|
|
13
|
+
export function useAdapterName(): string {
|
|
15
14
|
return useRequest(getAdapterName, []);
|
|
16
15
|
}
|
|
@@ -57,9 +57,6 @@ const DEFAULT_CONTENT: MarketingContent = {
|
|
|
57
57
|
|
|
58
58
|
export function useMarketingContent(): MarketingContent {
|
|
59
59
|
const adapterName = useAdapterName();
|
|
60
|
-
if (adapterName === undefined) {
|
|
61
|
-
return DEFAULT_CONTENT;
|
|
62
|
-
}
|
|
63
60
|
|
|
64
61
|
return CONTENT_BY_ADAPTER[adapterName] ?? DEFAULT_CONTENT;
|
|
65
62
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
|
|
3
|
+
import { managerClient } from "@src/managerClient";
|
|
4
|
+
|
|
5
|
+
async function getSliceMachineRunningVersion() {
|
|
6
|
+
const sliceMachineRunningVersion =
|
|
7
|
+
await managerClient.versions.getRunningSliceMachineVersion();
|
|
8
|
+
|
|
9
|
+
return sliceMachineRunningVersion;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function useSliceMachineRunningVersion() {
|
|
13
|
+
return useRequest(getSliceMachineRunningVersion, []);
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
|
|
3
|
+
import { managerClient } from "@src/managerClient";
|
|
4
|
+
|
|
5
|
+
async function getIsUpdateAvailable() {
|
|
6
|
+
const [sliceMachineUpdateAvailable, adapterUpdateAvailable] =
|
|
7
|
+
await Promise.all([
|
|
8
|
+
managerClient.versions.checkIsSliceMachineUpdateAvailable(),
|
|
9
|
+
managerClient.versions.checkIsAdapterUpdateAvailable(),
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
return { sliceMachineUpdateAvailable, adapterUpdateAvailable };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function useUpdateAvailable() {
|
|
16
|
+
return useRequest(getIsUpdateAvailable, []);
|
|
17
|
+
}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import { Reducer } from "redux";
|
|
2
2
|
import { EnvironmentStoreType } from "./types";
|
|
3
|
-
import {
|
|
4
|
-
ActionType,
|
|
5
|
-
createAction,
|
|
6
|
-
createAsyncAction,
|
|
7
|
-
getType,
|
|
8
|
-
} from "typesafe-actions";
|
|
3
|
+
import { ActionType, createAction, getType } from "typesafe-actions";
|
|
9
4
|
import type { PackageManager, APIEndpoints } from "@slicemachine/manager";
|
|
10
5
|
import { SliceMachineStoreType } from "@src/redux/type";
|
|
11
6
|
import { FrontEndEnvironment } from "@models/common/Environment";
|
|
12
7
|
import { LibraryUI } from "@models/common/LibraryUI";
|
|
13
|
-
import { PackageChangelog } from "@lib/models/common/versions";
|
|
14
8
|
import { SliceSM } from "@lib/models/common/Slice";
|
|
15
9
|
import { CustomTypeSM } from "@lib/models/common/CustomType";
|
|
16
10
|
import ErrorWithStatus from "@lib/models/common/ErrorWithStatus";
|
|
17
11
|
import { AuthStatus } from "../userContext/types";
|
|
18
|
-
import * as apiClient from "@src/apiClient";
|
|
19
|
-
import { call, fork, put, takeLatest } from "redux-saga/effects";
|
|
20
|
-
import { withLoader } from "../loading";
|
|
21
|
-
import { LoadingKeysEnum } from "../loading/types";
|
|
22
12
|
|
|
23
13
|
// Action Creators
|
|
24
14
|
export const refreshStateCreator = createAction("STATE/REFRESH.RESPONSE")<{
|
|
@@ -35,22 +25,8 @@ export const updateManifestCreator = createAction("STATE/UPDATE_MANIFEST")<{
|
|
|
35
25
|
}>();
|
|
36
26
|
|
|
37
27
|
// Actions Creators
|
|
38
|
-
export const getChangelogCreator = createAsyncAction(
|
|
39
|
-
"CHANGELOG.REQUEST",
|
|
40
|
-
"CHANGELOG.RESPONSE",
|
|
41
|
-
"CHANGELOG.FAILURE",
|
|
42
|
-
)<
|
|
43
|
-
undefined,
|
|
44
|
-
{
|
|
45
|
-
changelog: PackageChangelog;
|
|
46
|
-
},
|
|
47
|
-
undefined
|
|
48
|
-
>();
|
|
49
|
-
|
|
50
28
|
type EnvironmentActions = ActionType<
|
|
51
|
-
| typeof
|
|
52
|
-
| typeof getChangelogCreator
|
|
53
|
-
| typeof updateManifestCreator
|
|
29
|
+
typeof refreshStateCreator | typeof updateManifestCreator
|
|
54
30
|
>;
|
|
55
31
|
|
|
56
32
|
// Selectors
|
|
@@ -79,24 +55,6 @@ export const selectIsSimulatorAvailableForFramework = (
|
|
|
79
55
|
return store.environment.supportsSliceSimulator;
|
|
80
56
|
};
|
|
81
57
|
|
|
82
|
-
export const getChangelog = (store: SliceMachineStoreType) => {
|
|
83
|
-
return (
|
|
84
|
-
store.environment.changelog ?? {
|
|
85
|
-
sliceMachine: {
|
|
86
|
-
currentVersion: "",
|
|
87
|
-
updateAvailable: false,
|
|
88
|
-
latestNonBreakingVersion: null,
|
|
89
|
-
versions: [],
|
|
90
|
-
},
|
|
91
|
-
adapter: {
|
|
92
|
-
updateAvailable: false,
|
|
93
|
-
versions: [],
|
|
94
|
-
name: "",
|
|
95
|
-
},
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
58
|
export const getPackageManager = (
|
|
101
59
|
store: SliceMachineStoreType,
|
|
102
60
|
): PackageManager => {
|
|
@@ -129,34 +87,7 @@ export const environmentReducer: Reducer<
|
|
|
129
87
|
localSliceSimulatorURL: action.payload.value,
|
|
130
88
|
},
|
|
131
89
|
};
|
|
132
|
-
case getType(getChangelogCreator.success):
|
|
133
|
-
return { ...state, changelog: action.payload.changelog };
|
|
134
90
|
default:
|
|
135
91
|
return state;
|
|
136
92
|
}
|
|
137
93
|
};
|
|
138
|
-
|
|
139
|
-
export function* getChangelogSaga(): Generator<
|
|
140
|
-
unknown,
|
|
141
|
-
void,
|
|
142
|
-
PackageChangelog
|
|
143
|
-
> {
|
|
144
|
-
try {
|
|
145
|
-
const changelog = yield call(apiClient.getChangelog);
|
|
146
|
-
yield put(getChangelogCreator.success({ changelog }));
|
|
147
|
-
} catch {
|
|
148
|
-
yield put(getChangelogCreator.failure());
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function* watchChangelog() {
|
|
153
|
-
yield takeLatest(
|
|
154
|
-
getType(getChangelogCreator.request),
|
|
155
|
-
withLoader(getChangelogSaga, LoadingKeysEnum.CHANGELOG),
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Saga Exports
|
|
160
|
-
export function* watchChangelogSagas() {
|
|
161
|
-
yield fork(watchChangelog);
|
|
162
|
-
}
|
|
@@ -5,7 +5,5 @@ export enum LoadingKeysEnum {
|
|
|
5
5
|
REVIEW = "REVIEW",
|
|
6
6
|
CHECK_SIMULATOR = "CHECK_SIMULATOR",
|
|
7
7
|
CHECK_SIMULATOR_IFRAME = "CHECK_SIMULATOR_IFRAME",
|
|
8
|
-
GENERATE_SLICE_CUSTOM_SCREENSHOT = "GENERATE_SLICE_CUSTOM_SCREENSHOT",
|
|
9
8
|
SIMULATOR_SAVE_MOCK = "SIMULATOR_SAVE_MOCK",
|
|
10
|
-
CHANGELOG = "CHANGELOG",
|
|
11
9
|
}
|
|
@@ -6,13 +6,12 @@ import { startLoadingActionCreator, stopLoadingActionCreator } from "./loading";
|
|
|
6
6
|
import {
|
|
7
7
|
sendAReviewCreator,
|
|
8
8
|
skipReviewCreator,
|
|
9
|
-
updatesViewedCreator,
|
|
10
9
|
hasSeenTutorialsToolTipCreator,
|
|
11
10
|
hasSeenSimulatorToolTipCreator,
|
|
12
11
|
hasSeenChangesToolTipCreator,
|
|
13
12
|
changesPushSuccess,
|
|
14
13
|
} from "./userContext";
|
|
15
|
-
import {
|
|
14
|
+
import { refreshStateCreator } from "./environment";
|
|
16
15
|
import {
|
|
17
16
|
checkSimulatorSetupCreator,
|
|
18
17
|
connectToSimulatorIframeCreator,
|
|
@@ -31,7 +30,7 @@ import {
|
|
|
31
30
|
sliceUpdateSuccess,
|
|
32
31
|
sliceRenameSuccess,
|
|
33
32
|
} from "./slices";
|
|
34
|
-
import {
|
|
33
|
+
import { UserReviewType } from "./userContext/types";
|
|
35
34
|
import { GenericToastTypes, openToasterCreator } from "./toaster";
|
|
36
35
|
import { CustomTypes } from "@lib/models/common/CustomType";
|
|
37
36
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
@@ -90,8 +89,6 @@ const useSliceMachineActions = () => {
|
|
|
90
89
|
reviewType,
|
|
91
90
|
}),
|
|
92
91
|
);
|
|
93
|
-
const setUpdatesViewed = (versions: UserContextStoreType["updatesViewed"]) =>
|
|
94
|
-
dispatch(updatesViewedCreator(versions));
|
|
95
92
|
const setSeenSimulatorToolTip = () =>
|
|
96
93
|
dispatch(hasSeenSimulatorToolTipCreator());
|
|
97
94
|
const setSeenTutorialsToolTip = () =>
|
|
@@ -122,10 +119,6 @@ const useSliceMachineActions = () => {
|
|
|
122
119
|
);
|
|
123
120
|
};
|
|
124
121
|
|
|
125
|
-
const getChangelog = () => {
|
|
126
|
-
dispatch(getChangelogCreator.request());
|
|
127
|
-
};
|
|
128
|
-
|
|
129
122
|
/**
|
|
130
123
|
* Success actions = sync store state from external actions. If its name
|
|
131
124
|
* contains "Creator", it means it is still used in a saga and that `.request`
|
|
@@ -227,7 +220,6 @@ const useSliceMachineActions = () => {
|
|
|
227
220
|
deleteSliceSuccess,
|
|
228
221
|
sendAReview,
|
|
229
222
|
skipReview,
|
|
230
|
-
setUpdatesViewed,
|
|
231
223
|
setSeenTutorialsToolTip,
|
|
232
224
|
setSeenSimulatorToolTip,
|
|
233
225
|
setSeenChangesToolTip,
|
|
@@ -236,7 +228,6 @@ const useSliceMachineActions = () => {
|
|
|
236
228
|
closeModals,
|
|
237
229
|
openToaster,
|
|
238
230
|
saveSliceMock,
|
|
239
|
-
getChangelog,
|
|
240
231
|
pushChangesSuccess,
|
|
241
232
|
createCustomTypeSuccess,
|
|
242
233
|
};
|