slice-machine-ui 2.20.5-alpha.jp-import-slices-2.2 → 2.20.5-alpha.jp-import-slices-2.4
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/{-Yjs5UmgvuB8nY3BLb3TK → YsRTz3LIf87dqWf5YAnWe}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/907-9aa257827e094780.js +1 -0
- package/out/_next/static/chunks/pages/{_app-89df34df01f52931.js → _app-1bdd68963ee3fbe2.js} +2 -2
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-80defa14b6ea36f7.js → [customTypeId]-02704945f838f3da.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-f4ff9ad74b44bf09.js → [pageTypeId]-8f29474c7d2c5daa.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/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/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/DialogButtons.tsx +35 -0
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/DialogContent.tsx +25 -0
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/DialogTabs.tsx +32 -0
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/ImportSlicesFromLibraryModal.tsx +27 -112
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/LibrarySlicesDialogContent.tsx +320 -0
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/LocalSlicesDialogContent.tsx +117 -0
- package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +5 -1
- package/out/_next/static/chunks/660-e3d7a5444ab7391e.js +0 -1
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/LibrarySlicesTab.tsx +0 -125
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/LocalSlicesTab.tsx +0 -67
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/ReuseExistingSlicesContext.tsx +0 -279
- /package/out/_next/static/{-Yjs5UmgvuB8nY3BLb3TK → YsRTz3LIf87dqWf5YAnWe}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(60802)}])},60802:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[625],{95759:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/custom-types/[customTypeId]",function(){return t(60802)}])},60802:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return _.H}});var _=t(61907)}},function(n){n.O(0,[898,917,525,461,139,397,66,183,344,256,130,21,882,647,630,633,907,888,774,179],function(){return n(n.s=95759)}),_N_E=n.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(89173)}])},89173:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[936],{61367:function(n,u,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/page-types/[pageTypeId]",function(){return e(89173)}])},89173:function(n,u,e){"use strict";e.r(u),e.d(u,{default:function(){return t.H}});var t=e(61907)}},function(n){n.O(0,[898,917,525,461,139,397,66,183,344,256,130,21,882,647,630,633,907,888,774,179],function(){return n(n.s=61367)}),_N_E=n.O()}]);
|
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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.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-bc83e25e8d316ca9.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"YsRTz3LIf87dqWf5YAnWe","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/changes.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.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/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/125-00b909bdbab2ca15.js" defer=""></script><script src="/_next/static/chunks/882-8ab59c0c72307c87.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/changes-6f371ebe52dbe76a.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.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/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/130-e1a16d2f94fb2b64.js" defer=""></script><script src="/_next/static/chunks/21-f3962d02eda0a46e.js" defer=""></script><script src="/_next/static/chunks/882-8ab59c0c72307c87.js" defer=""></script><script src="/_next/static/chunks/647-a29bee23cb9ac7a2.js" defer=""></script><script src="/_next/static/chunks/630-4fe1e982234bd925.js" defer=""></script><script src="/_next/static/chunks/633-2d20c3e815c79c7f.js" defer=""></script><script src="/_next/static/chunks/907-9aa257827e094780.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-02704945f838f3da.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_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":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-a29bee23cb9ac7a2.js" defer=""></script><script src="/_next/static/chunks/248-2902bda47821f37b.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-5acd56959b60346f.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.js" defer=""></script><script src="/_next/static/chunks/397-e6c340070a3bcb41.js" defer=""></script><script src="/_next/static/chunks/647-a29bee23cb9ac7a2.js" defer=""></script><script src="/_next/static/chunks/248-2902bda47821f37b.js" defer=""></script><script src="/_next/static/chunks/pages/index-0d8cb369de720a35.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.js" defer=""></script><script src="/_next/static/chunks/pages/labs-16d118a80936d583.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.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/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/130-e1a16d2f94fb2b64.js" defer=""></script><script src="/_next/static/chunks/21-f3962d02eda0a46e.js" defer=""></script><script src="/_next/static/chunks/882-8ab59c0c72307c87.js" defer=""></script><script src="/_next/static/chunks/647-a29bee23cb9ac7a2.js" defer=""></script><script src="/_next/static/chunks/630-4fe1e982234bd925.js" defer=""></script><script src="/_next/static/chunks/633-2d20c3e815c79c7f.js" defer=""></script><script src="/_next/static/chunks/907-9aa257827e094780.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-8f29474c7d2c5daa.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_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":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.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/130-e1a16d2f94fb2b64.js" defer=""></script><script src="/_next/static/chunks/429-e5d7e39160de9f5e.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-873c0c89aaf50b3c.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_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":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.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/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/183-4ea255b867ff171b.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/256-07f768a2b19b0a0e.js" defer=""></script><script src="/_next/static/chunks/444-d39213143f782fec.js" defer=""></script><script src="/_next/static/chunks/484-3e011e79c41f0342.js" defer=""></script><script src="/_next/static/chunks/882-8ab59c0c72307c87.js" defer=""></script><script src="/_next/static/chunks/630-4fe1e982234bd925.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-0e9aa745ed9fe1ec.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_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":"YsRTz3LIf87dqWf5YAnWe","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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.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/b30fbbc3ed00a725.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b30fbbc3ed00a725.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-e986dd216b883a74.js" defer=""></script><script src="/_next/static/chunks/framework-ab7ddb551c23d05a.js" defer=""></script><script src="/_next/static/chunks/main-de87250a4e0c9fcf.js" defer=""></script><script src="/_next/static/chunks/pages/_app-1bdd68963ee3fbe2.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/66-d9d3bcb5d041cb6d.js" defer=""></script><script src="/_next/static/chunks/344-b64f09e670634ed1.js" defer=""></script><script src="/_next/static/chunks/444-d39213143f782fec.js" defer=""></script><script src="/_next/static/chunks/882-8ab59c0c72307c87.js" defer=""></script><script src="/_next/static/chunks/633-2d20c3e815c79c7f.js" defer=""></script><script src="/_next/static/chunks/593-7ffd1197c3405ef8.js" defer=""></script><script src="/_next/static/chunks/pages/slices-93fc784c443a996c.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_buildManifest.js" defer=""></script><script src="/_next/static/YsRTz3LIf87dqWf5YAnWe/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"YsRTz3LIf87dqWf5YAnWe","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.20.5-alpha.jp-import-slices-2.
|
|
3
|
+
"version": "2.20.5-alpha.jp-import-slices-2.4",
|
|
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.26.5-alpha.jp-import-slices-2.
|
|
39
|
-
"start-slicemachine": "0.12.70-alpha.jp-import-slices-2.
|
|
38
|
+
"@slicemachine/manager": "0.26.5-alpha.jp-import-slices-2.4",
|
|
39
|
+
"start-slicemachine": "0.12.70-alpha.jp-import-slices-2.4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@emotion/react": "11.11.1",
|
package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/DialogButtons.tsx
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DialogActionButton,
|
|
3
|
+
DialogActions,
|
|
4
|
+
DialogCancelButton,
|
|
5
|
+
} from "@prismicio/editor-ui";
|
|
6
|
+
|
|
7
|
+
import { getSubmitButtonLabel } from "../shared/getSubmitButtonLabel";
|
|
8
|
+
|
|
9
|
+
export function ReuseSlicesDialogContent() {}
|
|
10
|
+
|
|
11
|
+
interface DialogButtonsProps {
|
|
12
|
+
totalSelected: number;
|
|
13
|
+
onSubmit: () => void;
|
|
14
|
+
location: "custom_type" | "page_type";
|
|
15
|
+
typeName: string;
|
|
16
|
+
isSubmitting?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function DialogButtons(props: DialogButtonsProps) {
|
|
20
|
+
const { totalSelected, onSubmit, isSubmitting, location, typeName } = props;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<DialogActions>
|
|
24
|
+
<DialogCancelButton disabled={isSubmitting} size="medium" />
|
|
25
|
+
<DialogActionButton
|
|
26
|
+
disabled={totalSelected === 0}
|
|
27
|
+
loading={isSubmitting}
|
|
28
|
+
onClick={() => void onSubmit()}
|
|
29
|
+
size="medium"
|
|
30
|
+
>
|
|
31
|
+
{getSubmitButtonLabel(location, typeName)} ({totalSelected})
|
|
32
|
+
</DialogActionButton>
|
|
33
|
+
</DialogActions>
|
|
34
|
+
);
|
|
35
|
+
}
|
package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/DialogContent.tsx
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Box } from "@prismicio/editor-ui";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
interface DialogContentProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function DialogContent(args: DialogContentProps) {
|
|
10
|
+
const { children, selected } = args;
|
|
11
|
+
|
|
12
|
+
if (!selected) {
|
|
13
|
+
return (
|
|
14
|
+
<Box display="none" minHeight={0}>
|
|
15
|
+
{children}
|
|
16
|
+
</Box>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Box display="flex" flexDirection="column" flexGrow={1} minHeight={0}>
|
|
22
|
+
{children}
|
|
23
|
+
</Box>
|
|
24
|
+
);
|
|
25
|
+
}
|
package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/DialogTabs.tsx
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Box, Tab } from "@prismicio/editor-ui";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
interface DialogTabsProps {
|
|
5
|
+
selectedTab: "local" | "library";
|
|
6
|
+
onSelectTab: (tab: "local" | "library") => void;
|
|
7
|
+
rightContent?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function DialogTabs(props: DialogTabsProps) {
|
|
11
|
+
const { selectedTab, onSelectTab, rightContent } = props;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Box justifyContent="space-between" padding={16} border={{ bottom: true }}>
|
|
15
|
+
<Box gap={8}>
|
|
16
|
+
<Tab
|
|
17
|
+
selected={selectedTab === "local"}
|
|
18
|
+
onClick={() => onSelectTab("local")}
|
|
19
|
+
>
|
|
20
|
+
Local Slices
|
|
21
|
+
</Tab>
|
|
22
|
+
<Tab
|
|
23
|
+
selected={selectedTab === "library"}
|
|
24
|
+
onClick={() => onSelectTab("library")}
|
|
25
|
+
>
|
|
26
|
+
Library Slices
|
|
27
|
+
</Tab>
|
|
28
|
+
</Box>
|
|
29
|
+
{rightContent}
|
|
30
|
+
</Box>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -1,40 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Box,
|
|
3
2
|
Dialog,
|
|
4
|
-
DialogActionButton,
|
|
5
|
-
DialogActions,
|
|
6
|
-
DialogCancelButton,
|
|
7
3
|
DialogContent,
|
|
8
4
|
DialogDescription,
|
|
9
5
|
DialogHeader,
|
|
10
|
-
Tab,
|
|
11
6
|
} from "@prismicio/editor-ui";
|
|
12
7
|
import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
13
|
-
import {
|
|
8
|
+
import { useState } from "react";
|
|
14
9
|
|
|
15
|
-
import {
|
|
10
|
+
import { LibrarySlicesDialogContent } from "./LibrarySlicesDialogContent";
|
|
11
|
+
import { LocalSlicesDialogContent } from "./LocalSlicesDialogContent";
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
import { useExistingSlices } from "../shared/useExistingSlices";
|
|
19
|
-
import { useImportSlicesFromGithub } from "./hooks/useImportSlicesFromGithub";
|
|
20
|
-
import { LibrarySlicesTab } from "./LibrarySlicesTab";
|
|
21
|
-
import { LocalSlicesTab } from "./LocalSlicesTab";
|
|
22
|
-
import {
|
|
23
|
-
ReuseExistingSlicesProvider,
|
|
24
|
-
useReuseExistingSlicesContext,
|
|
25
|
-
} from "./ReuseExistingSlicesContext";
|
|
26
|
-
|
|
27
|
-
interface ImportSlicesFromLibraryModalContent {
|
|
13
|
+
interface ImportSlicesFromLibraryModalProps {
|
|
28
14
|
open: boolean;
|
|
29
15
|
location: "custom_type" | "page_type";
|
|
30
16
|
typeName: string;
|
|
31
|
-
availableSlices?:
|
|
17
|
+
availableSlices: (SharedSlice & { thumbnailUrl?: string })[];
|
|
32
18
|
onSuccess: (args: { slices: SharedSlice[]; library?: string }) => void;
|
|
33
19
|
onClose: () => void;
|
|
34
20
|
}
|
|
35
21
|
|
|
36
|
-
function
|
|
37
|
-
props:
|
|
22
|
+
export function ImportSlicesFromLibraryModal(
|
|
23
|
+
props: ImportSlicesFromLibraryModalProps,
|
|
38
24
|
) {
|
|
39
25
|
const {
|
|
40
26
|
open,
|
|
@@ -46,28 +32,12 @@ function ImportSlicesFromLibraryModalContent(
|
|
|
46
32
|
} = props;
|
|
47
33
|
const [selectedTab, setSelectedTab] = useState("local");
|
|
48
34
|
|
|
49
|
-
const existingSlices = useExistingSlices({ open });
|
|
50
|
-
const { resetSlices } = useImportSlicesFromGithub();
|
|
51
|
-
const { submit, isSubmitting, totalSelected, reset } =
|
|
52
|
-
useReuseExistingSlicesContext();
|
|
53
|
-
|
|
54
35
|
const onOpenChange = (open: boolean) => {
|
|
55
|
-
if (open
|
|
36
|
+
if (open) return;
|
|
56
37
|
onClose();
|
|
57
|
-
reset();
|
|
58
|
-
resetSlices();
|
|
59
38
|
setSelectedTab("local");
|
|
60
39
|
};
|
|
61
40
|
|
|
62
|
-
const onSubmit = async () => {
|
|
63
|
-
try {
|
|
64
|
-
const result = await submit({ existingSlices, location, resetSlices });
|
|
65
|
-
onSuccess(result);
|
|
66
|
-
} catch (error) {
|
|
67
|
-
// Error is already handled in the submit function
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
41
|
return (
|
|
72
42
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
73
43
|
<DialogHeader title="Reuse an existing slice" />
|
|
@@ -75,81 +45,26 @@ function ImportSlicesFromLibraryModalContent(
|
|
|
75
45
|
<DialogDescription hidden>
|
|
76
46
|
Select existing slices or import slices from a GitHub repository
|
|
77
47
|
</DialogDescription>
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</Box>
|
|
98
|
-
{selectedTab === "library" && "<repo-select>"}
|
|
99
|
-
</Box>
|
|
100
|
-
<TabContent selected={selectedTab === "local"}>
|
|
101
|
-
<LocalSlicesTab availableSlices={availableSlices} />
|
|
102
|
-
</TabContent>
|
|
103
|
-
<TabContent selected={selectedTab === "library"}>
|
|
104
|
-
<LibrarySlicesTab />
|
|
105
|
-
</TabContent>
|
|
106
|
-
</Box>
|
|
107
|
-
|
|
108
|
-
<DialogActions>
|
|
109
|
-
<DialogCancelButton disabled={isSubmitting} size="medium" />
|
|
110
|
-
<DialogActionButton
|
|
111
|
-
disabled={totalSelected === 0}
|
|
112
|
-
loading={isSubmitting}
|
|
113
|
-
onClick={() => void onSubmit()}
|
|
114
|
-
size="medium"
|
|
115
|
-
>
|
|
116
|
-
{getSubmitButtonLabel(location, typeName)} ({totalSelected})
|
|
117
|
-
</DialogActionButton>
|
|
118
|
-
</DialogActions>
|
|
48
|
+
<LocalSlicesDialogContent
|
|
49
|
+
open={open}
|
|
50
|
+
location={location}
|
|
51
|
+
typeName={typeName}
|
|
52
|
+
selected={selectedTab === "local"}
|
|
53
|
+
onSelectTab={setSelectedTab}
|
|
54
|
+
availableSlices={availableSlices}
|
|
55
|
+
onSuccess={onSuccess}
|
|
56
|
+
onClose={onClose}
|
|
57
|
+
/>
|
|
58
|
+
<LibrarySlicesDialogContent
|
|
59
|
+
open={open}
|
|
60
|
+
location={location}
|
|
61
|
+
typeName={typeName}
|
|
62
|
+
selected={selectedTab === "library"}
|
|
63
|
+
onSelectTab={setSelectedTab}
|
|
64
|
+
onSuccess={onSuccess}
|
|
65
|
+
onClose={onClose}
|
|
66
|
+
/>
|
|
119
67
|
</DialogContent>
|
|
120
68
|
</Dialog>
|
|
121
69
|
);
|
|
122
70
|
}
|
|
123
|
-
|
|
124
|
-
interface TabContentProps {
|
|
125
|
-
children: ReactNode;
|
|
126
|
-
selected: boolean;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function TabContent(args: TabContentProps) {
|
|
130
|
-
const { children, selected } = args;
|
|
131
|
-
|
|
132
|
-
if (!selected) {
|
|
133
|
-
return (
|
|
134
|
-
<Box display="none" minHeight={0}>
|
|
135
|
-
{children}
|
|
136
|
-
</Box>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return (
|
|
141
|
-
<Box display="flex" flexDirection="column" flexGrow={1} minHeight={0}>
|
|
142
|
-
{children}
|
|
143
|
-
</Box>
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export function ImportSlicesFromLibraryModal(
|
|
148
|
-
props: ImportSlicesFromLibraryModalContent,
|
|
149
|
-
) {
|
|
150
|
-
return (
|
|
151
|
-
<ReuseExistingSlicesProvider>
|
|
152
|
-
<ImportSlicesFromLibraryModalContent {...props} />
|
|
153
|
-
</ReuseExistingSlicesProvider>
|
|
154
|
-
);
|
|
155
|
-
}
|