slice-machine-ui 2.2.2-alpha.lg-nested-group-snippets.2 → 2.2.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js +1 -0
- package/out/_next/static/chunks/18539003-eda642ad962ef598.js +22 -0
- package/out/_next/static/chunks/212-cbaa35389c0aacf1.js +1 -0
- package/out/_next/static/chunks/264-4bb6f3fb14863ef3.js +1 -0
- package/out/_next/static/chunks/465-47a6d2a5f66f521e.js +1 -0
- package/out/_next/static/chunks/574-6039c48fbc93b4a8.js +1 -0
- package/out/_next/static/chunks/{210-565d01ee9777d1a1.js → 66-d37d30551288858b.js} +2 -2
- package/out/_next/static/chunks/756-1e44fe84bedc262b.js +10 -0
- package/out/_next/static/chunks/816-68d4db26c0adab2e.js +1 -0
- package/out/_next/static/chunks/pages/_app-05ac13d573829b68.js +532 -0
- package/out/_next/static/chunks/pages/changelog-d309ea186a0e56bf.js +1 -0
- package/out/_next/static/chunks/pages/changes-1bb1a7b784a22151.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-a6ff1618238b3510.js → [customTypeId]-74be2c0ac9c854c7.js} +1 -1
- package/out/_next/static/chunks/pages/index-785a0ab6e2a4fc27.js +1 -0
- package/out/_next/static/chunks/pages/labs-2e4f3a5f68e65b93.js +1 -0
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-c300f963db847451.js → [pageTypeId]-d35c87b9aaec445a.js} +1 -1
- package/out/_next/static/chunks/pages/settings-25eb02893ed871b7.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-b47a72d5e94bd946.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-996e20b9b295a912.js +1 -0
- package/out/_next/static/chunks/pages/slices-cc44eeccd58d23a9.js +1 -0
- package/out/_next/static/css/b3bb731ce567d63f.css +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/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 +7 -7
- package/src/legacy/components/ListItem/index.tsx +1 -1
- package/src/legacy/lib/builders/CustomTypeBuilder/TabZone/index.tsx +3 -21
- package/src/legacy/lib/builders/SliceBuilder/FieldZones/index.tsx +6 -23
- package/src/legacy/lib/builders/SliceBuilder/VariationsList/index.tsx +2 -4
- package/src/legacy/lib/builders/SliceBuilder/index.tsx +1 -1
- package/src/legacy/lib/builders/common/EditModal/index.jsx +1 -1
- package/src/legacy/lib/builders/common/Zone/Card/components/Hints/index.tsx +1 -8
- package/src/legacy/lib/builders/common/Zone/Card/components/NewField.tsx +1 -1
- package/src/legacy/lib/builders/common/Zone/Card/index.jsx +1 -3
- package/src/legacy/lib/builders/utils/index.ts +0 -8
- package/src/legacy/lib/models/common/Group.ts +28 -51
- package/src/legacy/lib/models/common/widgets/Group/ListItem/index.jsx +8 -22
- package/src/legacy/lib/models/common/widgets/Group/index.ts +44 -0
- package/src/legacy/lib/models/common/widgets/Widget.ts +1 -10
- package/src/legacy/lib/models/common/widgets/ctBuilderArray.ts +20 -0
- package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
- package/src/legacy/lib/models/common/widgets/index.ts +31 -7
- package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
- package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
- package/test/lib/builders/buildersUtils.test.ts +1 -1
- package/test/lib/models/common/widgets/index.test.ts +1 -1
- package/out/_next/static/chunks/18539003-a6ba9867be2b3472.js +0 -22
- package/out/_next/static/chunks/212-58a99ab312f8a03b.js +0 -1
- package/out/_next/static/chunks/448-7a6843206737d199.js +0 -1
- package/out/_next/static/chunks/465-695ac5fedef986eb.js +0 -1
- package/out/_next/static/chunks/574-dfeb0e6aa3079da1.js +0 -1
- package/out/_next/static/chunks/756-31b94074da5d5a1c.js +0 -10
- package/out/_next/static/chunks/816-96fc9a79308019c7.js +0 -1
- package/out/_next/static/chunks/pages/_app-9b295100b552a8bd.js +0 -532
- package/out/_next/static/chunks/pages/changelog-f0cd26a9ae095e9e.js +0 -1
- package/out/_next/static/chunks/pages/changes-1a57f90433a0b5e2.js +0 -1
- package/out/_next/static/chunks/pages/index-a0530bd55c7e1872.js +0 -1
- package/out/_next/static/chunks/pages/labs-7b0abeef69494aec.js +0 -1
- package/out/_next/static/chunks/pages/settings-f82286dde10f624c.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-453f946e8879c829.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-b530a5e0ac9d0391.js +0 -1
- package/out/_next/static/chunks/pages/slices-7411822d74f1f6c1.js +0 -1
- package/out/_next/static/css/3c76d732d00eda61.css +0 -1
- package/out/_next/static/lLr-7N4Y19auzsORnpwN-/_buildManifest.js +0 -1
- package/src/hooks/useNestedGroupExperiment.ts +0 -8
- package/src/legacy/lib/models/common/widgets/Group/createGroupWidget.ts +0 -83
- package/src/legacy/lib/models/common/widgets/Group/index.tsx +0 -72
- package/src/legacy/lib/models/common/widgets/NestedGroup/index.tsx +0 -40
- package/src/legacy/lib/models/common/widgets/groupWidgets.ts +0 -7
- package/src/legacy/lib/models/common/widgets/nonGroupWidgets.ts +0 -33
- /package/out/_next/static/{lLr-7N4Y19auzsORnpwN- → JGphUg6eFq0-W11Pa7cMU}/_ssgManifest.js +0 -0
package/out/changelog.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.js" defer=""></script><script src="/_next/static/chunks/59b4e022-7a3b5554b806349f.js" defer=""></script><script src="/_next/static/chunks/183-6ad1d7303abecd2b.js" defer=""></script><script src="/_next/static/chunks/870-0c7a8a9622de78b7.js" defer=""></script><script src="/_next/static/chunks/pages/changelog-d309ea186a0e56bf.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changelog","query":{},"buildId":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/changes.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.css" data-n-g=""/><link rel="preload" href="/_next/static/css/6279e95f6aff22d5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/6279e95f6aff22d5.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.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/8eec4907-b712959d9f984b68.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/918-09e9e4a012d48a3a.js" defer=""></script><script src="/_next/static/chunks/816-68d4db26c0adab2e.js" defer=""></script><script src="/_next/static/chunks/152-c40fcb226b0df27f.js" defer=""></script><script src="/_next/static/chunks/pages/changes-1bb1a7b784a22151.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/changes","query":{},"buildId":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d0dd8015d7f5ea89.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d0dd8015d7f5ea89.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.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-6ad1d7303abecd2b.js" defer=""></script><script src="/_next/static/chunks/50-8d014b6d3cc35e30.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b992b9e1ce75777e.js" defer=""></script><script src="/_next/static/chunks/66-d37d30551288858b.js" defer=""></script><script src="/_next/static/chunks/816-68d4db26c0adab2e.js" defer=""></script><script src="/_next/static/chunks/212-cbaa35389c0aacf1.js" defer=""></script><script src="/_next/static/chunks/574-6039c48fbc93b4a8.js" defer=""></script><script src="/_next/static/chunks/264-4bb6f3fb14863ef3.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types/%5BcustomTypeId%5D-74be2c0ac9c854c7.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_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":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/custom-types.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.css" data-n-g=""/><link rel="preload" href="/_next/static/css/609c46c5c573c3ed.css" as="style"/><link rel="stylesheet" href="/_next/static/css/609c46c5c573c3ed.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.js" defer=""></script><script src="/_next/static/chunks/212-cbaa35389c0aacf1.js" defer=""></script><script src="/_next/static/chunks/465-47a6d2a5f66f521e.js" defer=""></script><script src="/_next/static/chunks/pages/custom-types-bac97f007a5ca743.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/custom-types","query":{},"buildId":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.css" data-n-g=""/><link rel="preload" href="/_next/static/css/609c46c5c573c3ed.css" as="style"/><link rel="stylesheet" href="/_next/static/css/609c46c5c573c3ed.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.js" defer=""></script><script src="/_next/static/chunks/212-cbaa35389c0aacf1.js" defer=""></script><script src="/_next/static/chunks/465-47a6d2a5f66f521e.js" defer=""></script><script src="/_next/static/chunks/pages/index-785a0ab6e2a4fc27.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/labs.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.js" defer=""></script><script src="/_next/static/chunks/pages/labs-2e4f3a5f68e65b93.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/labs","query":{},"buildId":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.css" data-n-g=""/><link rel="preload" href="/_next/static/css/d0dd8015d7f5ea89.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d0dd8015d7f5ea89.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.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-6ad1d7303abecd2b.js" defer=""></script><script src="/_next/static/chunks/50-8d014b6d3cc35e30.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b992b9e1ce75777e.js" defer=""></script><script src="/_next/static/chunks/66-d37d30551288858b.js" defer=""></script><script src="/_next/static/chunks/816-68d4db26c0adab2e.js" defer=""></script><script src="/_next/static/chunks/212-cbaa35389c0aacf1.js" defer=""></script><script src="/_next/static/chunks/574-6039c48fbc93b4a8.js" defer=""></script><script src="/_next/static/chunks/264-4bb6f3fb14863ef3.js" defer=""></script><script src="/_next/static/chunks/pages/page-types/%5BpageTypeId%5D-d35c87b9aaec445a.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_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":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"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/
|
|
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/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.js" defer=""></script><script src="/_next/static/chunks/pages/settings-25eb02893ed871b7.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/settings","query":{},"buildId":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.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-eda642ad962ef598.js" defer=""></script><script src="/_next/static/chunks/756-1e44fe84bedc262b.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D/simulator-b47a72d5e94bd946.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_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":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.css" data-n-g=""/><link rel="preload" href="/_next/static/css/8d1871dce67a3b49.css" as="style"/><link rel="stylesheet" href="/_next/static/css/8d1871dce67a3b49.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.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-6ad1d7303abecd2b.js" defer=""></script><script src="/_next/static/chunks/50-8d014b6d3cc35e30.js" defer=""></script><script src="/_next/static/chunks/543-f8766685f7f451e2.js" defer=""></script><script src="/_next/static/chunks/696-b992b9e1ce75777e.js" defer=""></script><script src="/_next/static/chunks/816-68d4db26c0adab2e.js" defer=""></script><script src="/_next/static/chunks/574-6039c48fbc93b4a8.js" defer=""></script><script src="/_next/static/chunks/152-c40fcb226b0df27f.js" defer=""></script><script src="/_next/static/chunks/pages/slices/%5Blib%5D/%5BsliceName%5D/%5Bvariation%5D-996e20b9b295a912.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_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":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/out/slices.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/b3bb731ce567d63f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b3bb731ce567d63f.css" data-n-g=""/><link rel="preload" href="/_next/static/css/f01f60095c76c7fb.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f01f60095c76c7fb.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-207ecb3e9b995dd9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-05ac13d573829b68.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-8d014b6d3cc35e30.js" defer=""></script><script src="/_next/static/chunks/816-68d4db26c0adab2e.js" defer=""></script><script src="/_next/static/chunks/152-c40fcb226b0df27f.js" defer=""></script><script src="/_next/static/chunks/pages/slices-cc44eeccd58d23a9.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js" defer=""></script><script src="/_next/static/JGphUg6eFq0-W11Pa7cMU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/slices","query":{},"buildId":"JGphUg6eFq0-W11Pa7cMU","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slice-machine-ui",
|
|
3
|
-
"version": "2.2.2-
|
|
3
|
+
"version": "2.2.2-beta.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A visual builder for your Slice Models with all the tools you need to generate data models and mock CMS content locally.",
|
|
6
6
|
"repository": {
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@radix-ui/react-visually-hidden": "1.0.3",
|
|
38
|
-
"@slicemachine/manager": "0.19.4-
|
|
39
|
-
"start-slicemachine": "0.12.23-
|
|
38
|
+
"@slicemachine/manager": "0.19.4-beta.1",
|
|
39
|
+
"start-slicemachine": "0.12.23-beta.1"
|
|
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.5.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.28",
|
|
46
|
+
"@prismicio/editor-support": "0.4.28",
|
|
47
|
+
"@prismicio/editor-ui": "0.4.28",
|
|
48
48
|
"@prismicio/mock": "0.3.3",
|
|
49
49
|
"@prismicio/mocks": "2.2.0",
|
|
50
50
|
"@prismicio/simulator": "0.1.4",
|
|
51
|
-
"@prismicio/types-internal": "2.
|
|
51
|
+
"@prismicio/types-internal": "2.4.1",
|
|
52
52
|
"@radix-ui/react-hover-card": "1.0.6",
|
|
53
53
|
"@radix-ui/react-tabs": "1.0.4",
|
|
54
54
|
"@reach/menu-button": "0.18.0",
|
|
@@ -14,7 +14,7 @@ import Li from "../Li";
|
|
|
14
14
|
import SliceMachineIconButton from "../SliceMachineIconButton";
|
|
15
15
|
import ItemHeader from "./Header";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
type Item<F extends TabField> = { key: string; value: F };
|
|
18
18
|
|
|
19
19
|
interface ListItemProps<F extends TabField, S extends AnyObjectSchema> {
|
|
20
20
|
item: Item<F>;
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
TabFieldsModel,
|
|
31
31
|
TabSM,
|
|
32
32
|
} from "@/legacy/lib/models/common/CustomType";
|
|
33
|
-
import
|
|
33
|
+
import ctBuilderArray from "@/legacy/lib/models/common/widgets/ctBuilderArray";
|
|
34
34
|
import type { AnyWidget } from "@/legacy/lib/models/common/widgets/Widget";
|
|
35
35
|
import {
|
|
36
36
|
ensureDnDDestination,
|
|
@@ -39,29 +39,11 @@ import {
|
|
|
39
39
|
import { transformKeyAccessor } from "@/legacy/lib/utils/str";
|
|
40
40
|
import { getContentTypeForTracking } from "@/utils/getContentTypeForTracking";
|
|
41
41
|
|
|
42
|
+
import * as Widgets from "../../../../lib/models/common/widgets/withGroup";
|
|
42
43
|
import EditModal from "../../common/EditModal";
|
|
43
44
|
import Zone from "../../common/Zone";
|
|
44
45
|
import SliceZone from "../SliceZone";
|
|
45
46
|
|
|
46
|
-
const widgetsArray = [
|
|
47
|
-
Widgets.UID,
|
|
48
|
-
Widgets.Group,
|
|
49
|
-
Widgets.StructuredText,
|
|
50
|
-
Widgets.Image,
|
|
51
|
-
Widgets.Link,
|
|
52
|
-
Widgets.LinkToMedia,
|
|
53
|
-
Widgets.ContentRelationship,
|
|
54
|
-
Widgets.Select,
|
|
55
|
-
Widgets.Boolean,
|
|
56
|
-
Widgets.Date,
|
|
57
|
-
Widgets.Timestamp,
|
|
58
|
-
Widgets.Embed,
|
|
59
|
-
Widgets.Number,
|
|
60
|
-
Widgets.GeoPoint,
|
|
61
|
-
Widgets.Color,
|
|
62
|
-
Widgets.Text,
|
|
63
|
-
];
|
|
64
|
-
|
|
65
47
|
interface TabZoneProps {
|
|
66
48
|
tabId: string;
|
|
67
49
|
}
|
|
@@ -245,7 +227,7 @@ const TabZone: FC<TabZoneProps> = ({ tabId }) => {
|
|
|
245
227
|
poolOfFieldsToCheck={poolOfFields}
|
|
246
228
|
showHints={true}
|
|
247
229
|
EditModal={EditModal}
|
|
248
|
-
widgetsArray={
|
|
230
|
+
widgetsArray={ctBuilderArray}
|
|
249
231
|
onDeleteItem={onDeleteItem}
|
|
250
232
|
onSave={onSave}
|
|
251
233
|
onSaveNewField={onSaveNewField}
|
|
@@ -27,7 +27,9 @@ import {
|
|
|
27
27
|
SlicePrimaryFieldSM,
|
|
28
28
|
WidgetsArea,
|
|
29
29
|
} from "@/legacy/lib/models/common/Slice";
|
|
30
|
-
import
|
|
30
|
+
import * as Widgets from "@/legacy/lib/models/common/widgets";
|
|
31
|
+
import groupBuilderWidgetsArray from "@/legacy/lib/models/common/widgets/groupBuilderArray";
|
|
32
|
+
import sliceBuilderWidgetsArray from "@/legacy/lib/models/common/widgets/sliceBuilderArray";
|
|
31
33
|
import { ensureDnDDestination } from "@/legacy/lib/utils";
|
|
32
34
|
import { transformKeyAccessor } from "@/legacy/lib/utils/str";
|
|
33
35
|
import { getContentTypeForTracking } from "@/utils/getContentTypeForTracking";
|
|
@@ -40,25 +42,6 @@ const dataTipText2 = `The repeatable zone is for a group<br/>
|
|
|
40
42
|
of fields that you want to be able to repeat an<br/>
|
|
41
43
|
indeterminate number of times, like FAQs`;
|
|
42
44
|
|
|
43
|
-
const itemsWidgetsArray = [
|
|
44
|
-
Widgets.StructuredText,
|
|
45
|
-
Widgets.Image,
|
|
46
|
-
Widgets.Link,
|
|
47
|
-
Widgets.LinkToMedia,
|
|
48
|
-
Widgets.ContentRelationship,
|
|
49
|
-
Widgets.Select,
|
|
50
|
-
Widgets.Boolean,
|
|
51
|
-
Widgets.Date,
|
|
52
|
-
Widgets.Timestamp,
|
|
53
|
-
Widgets.Embed,
|
|
54
|
-
Widgets.Number,
|
|
55
|
-
Widgets.GeoPoint,
|
|
56
|
-
Widgets.Color,
|
|
57
|
-
Widgets.Text,
|
|
58
|
-
];
|
|
59
|
-
|
|
60
|
-
const primaryWidgetsArray = [Widgets.Group, ...itemsWidgetsArray];
|
|
61
|
-
|
|
62
45
|
const FieldZones: FC = () => {
|
|
63
46
|
const { slice, setSlice, variation } = useSliceState();
|
|
64
47
|
const [
|
|
@@ -127,7 +110,7 @@ const FieldZones: FC = () => {
|
|
|
127
110
|
label: string;
|
|
128
111
|
widgetTypeName: keyof typeof Widgets;
|
|
129
112
|
}) => {
|
|
130
|
-
const widget =
|
|
113
|
+
const widget = sliceBuilderWidgetsArray.find(
|
|
131
114
|
(sliceBuilderWidget) =>
|
|
132
115
|
sliceBuilderWidget.CUSTOM_NAME === widgetTypeName ||
|
|
133
116
|
sliceBuilderWidget.TYPE_NAME === widgetTypeName,
|
|
@@ -205,7 +188,7 @@ const FieldZones: FC = () => {
|
|
|
205
188
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
206
189
|
fields={variation.primary}
|
|
207
190
|
EditModal={EditModal}
|
|
208
|
-
widgetsArray={
|
|
191
|
+
widgetsArray={sliceBuilderWidgetsArray}
|
|
209
192
|
onDeleteItem={_onDeleteItem(WidgetsArea.Primary)}
|
|
210
193
|
onSave={_onSave(WidgetsArea.Primary)}
|
|
211
194
|
onSaveNewField={_onSaveNewField(WidgetsArea.Primary)}
|
|
@@ -233,7 +216,7 @@ const FieldZones: FC = () => {
|
|
|
233
216
|
isRepeatable
|
|
234
217
|
title="Repeatable Zone"
|
|
235
218
|
dataTip={dataTipText2}
|
|
236
|
-
widgetsArray={
|
|
219
|
+
widgetsArray={groupBuilderWidgetsArray}
|
|
237
220
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
238
221
|
fields={variation.items}
|
|
239
222
|
EditModal={EditModal}
|
|
@@ -60,9 +60,7 @@ export const VariationsList: FC<VariationsListProps> = (props) => {
|
|
|
60
60
|
}}
|
|
61
61
|
startIcon="add"
|
|
62
62
|
color="grey"
|
|
63
|
-
|
|
64
|
-
Add a variation
|
|
65
|
-
</Button>
|
|
63
|
+
/>
|
|
66
64
|
</Box>
|
|
67
65
|
<div
|
|
68
66
|
className={styles.hideScrollbar}
|
|
@@ -126,7 +124,7 @@ export const VariationsList: FC<VariationsListProps> = (props) => {
|
|
|
126
124
|
// `Gradient`.
|
|
127
125
|
sx={{ position: "relative" }}
|
|
128
126
|
>
|
|
129
|
-
Add a variation
|
|
127
|
+
Add a new variation
|
|
130
128
|
</Button>
|
|
131
129
|
</Box>
|
|
132
130
|
</div>
|
|
@@ -20,7 +20,7 @@ import { VariationsList } from "./VariationsList";
|
|
|
20
20
|
|
|
21
21
|
export const SliceBuilder: FC = () => {
|
|
22
22
|
const { slice, actionQueueStatus } = useSliceState();
|
|
23
|
-
const horizontalScroll = useMediaQuery({ max: "
|
|
23
|
+
const horizontalScroll = useMediaQuery({ max: "medium" });
|
|
24
24
|
|
|
25
25
|
const contentDisplayProps = horizontalScroll
|
|
26
26
|
? { gridTemplateRows: "304px 1fr" }
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
createInitialValues,
|
|
12
12
|
} from "@/legacy/lib/forms";
|
|
13
13
|
import { DeprecatedMockConfigMessage } from "@/legacy/lib/models/common/DeprecatedMockConfigMessage";
|
|
14
|
-
import
|
|
14
|
+
import * as Widgets from "@/legacy/lib/models/common/widgets/withGroup";
|
|
15
15
|
import { removeProp } from "@/legacy/lib/utils";
|
|
16
16
|
|
|
17
17
|
import { findWidgetByConfigOrType } from "../../utils";
|
|
@@ -9,15 +9,9 @@ interface HintProps {
|
|
|
9
9
|
show: boolean;
|
|
10
10
|
item: Item;
|
|
11
11
|
renderHintBase: RenderHintBaseFN;
|
|
12
|
-
hintItemName?: string;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
const Hint: React.FC<HintProps> = ({
|
|
16
|
-
show,
|
|
17
|
-
renderHintBase,
|
|
18
|
-
item,
|
|
19
|
-
hintItemName,
|
|
20
|
-
}) => {
|
|
14
|
+
const Hint: React.FC<HintProps> = ({ show, renderHintBase, item }) => {
|
|
21
15
|
const fieldPathString = renderHintBase({ item });
|
|
22
16
|
|
|
23
17
|
// TODO: Call `swr`'s global `mutate` function when something changes to clear the cache.
|
|
@@ -26,7 +20,6 @@ const Hint: React.FC<HintProps> = ({
|
|
|
26
20
|
return await managerClient.snippets.readSnippets({
|
|
27
21
|
fieldPath: fieldPathString.split("."),
|
|
28
22
|
model: item.value,
|
|
29
|
-
itemName: hintItemName,
|
|
30
23
|
});
|
|
31
24
|
});
|
|
32
25
|
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
} from "@/legacy/lib/forms";
|
|
16
16
|
import { validateId } from "@/legacy/lib/forms/defaults";
|
|
17
17
|
import { InputType } from "@/legacy/lib/forms/fields";
|
|
18
|
-
import { Widgets } from "@/legacy/lib/models/common/widgets";
|
|
19
18
|
import { AnyWidget } from "@/legacy/lib/models/common/widgets/Widget";
|
|
19
|
+
import * as Widgets from "@/legacy/lib/models/common/widgets/withGroup";
|
|
20
20
|
import { slugify } from "@/legacy/lib/utils/str";
|
|
21
21
|
|
|
22
22
|
import { ErrorTooltip } from "./ErrorTooltip";
|
|
@@ -3,7 +3,7 @@ import { Box, Text } from "theme-ui";
|
|
|
3
3
|
|
|
4
4
|
import Li from "@/legacy/components/Li";
|
|
5
5
|
import ListItem from "@/legacy/components/ListItem";
|
|
6
|
-
import
|
|
6
|
+
import * as Widgets from "@/legacy/lib/models/common/widgets/withGroup";
|
|
7
7
|
|
|
8
8
|
import { findWidgetByConfigOrType } from "../../../utils";
|
|
9
9
|
import Hint from "./components/Hints";
|
|
@@ -103,8 +103,6 @@ const FieldZone = ({
|
|
|
103
103
|
isRepeatable={isRepeatable}
|
|
104
104
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
105
105
|
renderHintBase={renderHintBase}
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
107
|
-
hintItemName={widget.hintItemName}
|
|
108
106
|
Widgets={Widgets}
|
|
109
107
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/strict-boolean-expressions
|
|
110
108
|
typeName={widget.CUSTOM_NAME || widget.TYPE_NAME}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { GroupFieldType } from "@prismicio/types-internal/lib/customtypes/widgets";
|
|
2
|
-
|
|
3
1
|
import { TabField } from "@/legacy/lib/models/common/CustomType";
|
|
4
2
|
|
|
5
3
|
interface Widgets {
|
|
@@ -23,12 +21,6 @@ export const findWidgetByConfigOrType = (
|
|
|
23
21
|
return widgets.Link;
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
|
-
// The Group & NestedGroup widgets share the "Group" type. They are never
|
|
27
|
-
// in the same widget group, so this will use whichever is provided. For example,
|
|
28
|
-
// in the custom list item for Group, we always pass NestedGroup as the Group widget.
|
|
29
|
-
if (type === GroupFieldType) {
|
|
30
|
-
return widgets.Group ?? widgets.NestedGroup;
|
|
31
|
-
}
|
|
32
24
|
|
|
33
25
|
return widgets[type];
|
|
34
26
|
};
|
|
@@ -1,49 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
Group,
|
|
4
|
-
GroupFieldType,
|
|
5
|
-
} from "@prismicio/types-internal/lib/customtypes/widgets";
|
|
1
|
+
import { Group } from "@prismicio/types-internal/lib/customtypes/widgets";
|
|
6
2
|
import { StringOrNull } from "@prismicio/types-internal/lib/validators";
|
|
7
3
|
import { getOrElseW } from "fp-ts/lib/Either";
|
|
8
4
|
import * as t from "io-ts";
|
|
9
5
|
|
|
10
6
|
import { FieldsSM } from "./Fields";
|
|
11
7
|
|
|
12
|
-
const
|
|
13
|
-
t.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fields,
|
|
18
|
-
}),
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const createGroupSM = <TFields extends t.Mixed>(fields: TFields) =>
|
|
22
|
-
t.exact(
|
|
23
|
-
t.intersection([
|
|
24
|
-
t.type({
|
|
25
|
-
type: t.literal("Group"),
|
|
26
|
-
}),
|
|
27
|
-
t.partial({
|
|
28
|
-
fieldset: StringOrNull,
|
|
29
|
-
icon: t.string,
|
|
30
|
-
description: t.string,
|
|
31
|
-
config: createGroupConfig(fields),
|
|
32
|
-
}),
|
|
33
|
-
]),
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
export const NestedGroupSM = createGroupSM(FieldsSM);
|
|
37
|
-
export type NestedGroupSM = t.TypeOf<typeof NestedGroupSM>;
|
|
38
|
-
|
|
39
|
-
const GroupFieldsSM = t.array(
|
|
40
|
-
t.type({
|
|
41
|
-
key: t.string,
|
|
42
|
-
value: t.union([NestableWidget, NestedGroupSM]),
|
|
8
|
+
export const GroupConfig = t.exact(
|
|
9
|
+
t.partial({
|
|
10
|
+
label: StringOrNull,
|
|
11
|
+
repeat: t.boolean,
|
|
12
|
+
fields: FieldsSM,
|
|
43
13
|
}),
|
|
44
14
|
);
|
|
15
|
+
export type GroupConfig = t.TypeOf<typeof GroupConfig>;
|
|
45
16
|
|
|
46
|
-
export const GroupSM =
|
|
17
|
+
export const GroupSM = t.exact(
|
|
18
|
+
t.intersection([
|
|
19
|
+
t.type({
|
|
20
|
+
type: t.literal("Group"),
|
|
21
|
+
}),
|
|
22
|
+
t.partial({
|
|
23
|
+
fieldset: StringOrNull,
|
|
24
|
+
icon: t.string,
|
|
25
|
+
description: t.string,
|
|
26
|
+
config: GroupConfig,
|
|
27
|
+
}),
|
|
28
|
+
]),
|
|
29
|
+
);
|
|
47
30
|
export type GroupSM = t.TypeOf<typeof GroupSM>;
|
|
48
31
|
|
|
49
32
|
export const Groups = {
|
|
@@ -51,13 +34,10 @@ export const Groups = {
|
|
|
51
34
|
const fields = (() => {
|
|
52
35
|
if (!group.config?.fields) return;
|
|
53
36
|
|
|
54
|
-
return group.config.fields.reduce(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return { ...acc, [key]: value };
|
|
59
|
-
}
|
|
60
|
-
}, {});
|
|
37
|
+
return group.config.fields.reduce(
|
|
38
|
+
(acc, { key, value }) => ({ ...acc, [key]: value }),
|
|
39
|
+
{},
|
|
40
|
+
);
|
|
61
41
|
})();
|
|
62
42
|
|
|
63
43
|
return getOrElseW(() => {
|
|
@@ -78,13 +58,10 @@ export const Groups = {
|
|
|
78
58
|
if (!group.config?.fields) return;
|
|
79
59
|
|
|
80
60
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
81
|
-
return Object.entries(group.config?.fields || {}).map(([key, value]) => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return { key, value };
|
|
86
|
-
}
|
|
87
|
-
});
|
|
61
|
+
return Object.entries(group.config?.fields || {}).map(([key, value]) => ({
|
|
62
|
+
key,
|
|
63
|
+
value,
|
|
64
|
+
}));
|
|
88
65
|
})();
|
|
89
66
|
|
|
90
67
|
return getOrElseW(() => {
|