slice-machine-ui 2.19.2-alpha.lg-import-slices.1 → 2.19.2-alpha.xru-unskip-e2e-test-redirection.2
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/UxC5PuGC_LR5N5R6FFDo6/_buildManifest.js +1 -0
- package/out/_next/static/chunks/422-c9192a1dbdd2ae0e.js +1 -0
- package/out/_next/static/chunks/{429-e5d7e39160de9f5e.js → 429-aab52070cad2884b.js} +1 -1
- package/out/_next/static/chunks/489-ce3053e1d81ade83.js +1 -0
- package/out/_next/static/chunks/907-180eb33eefccc237.js +1 -0
- package/out/_next/static/chunks/pages/{_app-a8345a65a46d8112.js → _app-0e4d39dfdf8ae39a.js} +1 -1
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-97120b65616617fb.js → [customTypeId]-af9376721beb489e.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-b358358b5c2c1c43.js → [pageTypeId]-a24665e91b882169.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-8c70298caf51bed0.js → simulator-faeb6d2f77d97096.js} +1 -1
- package/out/_next/static/chunks/pages/slices-81c1c3f1bcad60f4.js +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +3 -3
- package/src/features/customTypes/customTypesBuilder/CreateSliceFromImageModal/CreateSliceFromImageModal.tsx +36 -3
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +0 -11
- package/src/features/customTypes/customTypesBuilder/sliceCreationOptions.tsx +0 -14
- package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +0 -51
- package/src/pages/slices.tsx +0 -30
- package/out/_next/static/Q_2lm2CqEzK8hMGWeR30R/_buildManifest.js +0 -1
- package/out/_next/static/chunks/130-e1a16d2f94fb2b64.js +0 -1
- package/out/_next/static/chunks/489-d6580011169630a1.js +0 -1
- package/out/_next/static/chunks/585-c89bb2471e85b9f8.js +0 -1
- package/out/_next/static/chunks/928-ebbe58b08e1e70b1.js +0 -1
- package/out/_next/static/chunks/954-bedaaabf664584a0.js +0 -1
- package/out/_next/static/chunks/pages/slices-d5a2b0fcb7490565.js +0 -1
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/ImportSlicesFromLibraryModal.tsx +0 -291
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/SliceCard.tsx +0 -48
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/hooks/useImportSlicesFromGithub.ts +0 -93
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/index.tsx +0 -1
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/types.ts +0 -28
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/utils/addSlices.ts +0 -193
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/utils/github.ts +0 -630
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/utils/mapWithConcurrency.ts +0 -28
- package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/utils/sliceWithoutConflicts.ts +0 -51
- package/src/features/customTypes/customTypesBuilder/shared/getSubmitButtonLabel.ts +0 -12
- package/src/features/customTypes/customTypesBuilder/shared/useExistingSlices.ts +0 -26
- /package/out/_next/static/{Q_2lm2CqEzK8hMGWeR30R → UxC5PuGC_LR5N5R6FFDo6}/_ssgManifest.js +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const getSubmitButtonLabel = (
|
|
2
|
-
location: "custom_type" | "page_type" | "slices",
|
|
3
|
-
) => {
|
|
4
|
-
switch (location) {
|
|
5
|
-
case "custom_type":
|
|
6
|
-
return "Add to type";
|
|
7
|
-
case "page_type":
|
|
8
|
-
return "Add to page";
|
|
9
|
-
case "slices":
|
|
10
|
-
return "Add to slices";
|
|
11
|
-
}
|
|
12
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
-
import { useEffect, useRef } from "react";
|
|
3
|
-
|
|
4
|
-
import { managerClient } from "@/managerClient";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Keeps track of the existing slices in the project.
|
|
8
|
-
* Re-fetches them when the modal is opened.
|
|
9
|
-
*/
|
|
10
|
-
export function useExistingSlices({ open }: { open: boolean }) {
|
|
11
|
-
const ref = useRef<SharedSlice[]>([]);
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
if (!open) return;
|
|
15
|
-
|
|
16
|
-
ref.current = [];
|
|
17
|
-
managerClient.slices
|
|
18
|
-
.readAllSlices()
|
|
19
|
-
.then((slices) => {
|
|
20
|
-
ref.current = slices.models.map(({ model }) => model);
|
|
21
|
-
})
|
|
22
|
-
.catch(() => null);
|
|
23
|
-
}, [open]);
|
|
24
|
-
|
|
25
|
-
return ref;
|
|
26
|
-
}
|
|
File without changes
|