slice-machine-ui 1.18.0 → 1.18.1-dev-next-release.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/lib/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +1 -3
- package/lib/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +1 -3
- package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +1 -3
- package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +112 -111
- package/lib/builders/CustomTypeBuilder/TabZone/index.tsx +17 -14
- package/lib/builders/CustomTypeBuilder/index.tsx +1 -5
- package/lib/builders/common/Zone/index.jsx +16 -14
- package/out/404.html +1 -1
- package/out/_next/static/{qlZhCFx7chEVWL_rXHIqX → FEq-xW5j6MjhKS2i9X-By}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/377-404ac40f863464df.js +1 -0
- package/out/_next/static/chunks/{590-b89154069f96f832.js → 590-ab38d53732035bf0.js} +1 -1
- package/out/_next/static/chunks/933-a14914fafa262353.js +1 -0
- package/out/_next/static/chunks/pages/{_app-7273106cbfbb324e.js → _app-6fc456a5c5e92284.js} +2 -2
- package/out/_next/static/css/1fbd45881dcf43c4.css +1 -0
- package/out/_next/static/css/a3838b28ab738f1e.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/slices/[lib]/[sliceName]/[variation]/screenshot.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 +4 -4
- package/src/components/List/List.css.ts +57 -8
- package/src/components/List/List.stories.tsx +31 -12
- package/src/components/List/List.tsx +18 -10
- package/src/components/List/index.ts +1 -1
- package/src/components/Window/Window.css.ts +12 -5
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +1 -1
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +1 -1
- package/out/_next/static/chunks/377-96290662f5b987a1.js +0 -1
- package/out/_next/static/chunks/933-f0e0417175a08fb8.js +0 -1
- package/out/_next/static/css/7aca5b80aec5d9fd.css +0 -1
- package/out/_next/static/css/d4b59834999106a5.css +0 -1
- /package/out/_next/static/{qlZhCFx7chEVWL_rXHIqX → FEq-xW5j6MjhKS2i9X-By}/_ssgManifest.js +0 -0
|
@@ -6,19 +6,17 @@ import Card from "@components/Card";
|
|
|
6
6
|
import SliceMachineModal from "@components/SliceMachineModal";
|
|
7
7
|
|
|
8
8
|
type DeleteSliceZoneModalProps = {
|
|
9
|
-
isDeleteSliceZoneModalOpen: boolean;
|
|
10
9
|
deleteSliceZone: () => void;
|
|
11
10
|
closeDeleteSliceZoneModal: () => void;
|
|
12
11
|
};
|
|
13
12
|
|
|
14
13
|
export const DeleteSliceZoneModal: FC<DeleteSliceZoneModalProps> = ({
|
|
15
|
-
isDeleteSliceZoneModalOpen,
|
|
16
14
|
deleteSliceZone,
|
|
17
15
|
closeDeleteSliceZoneModal,
|
|
18
16
|
}) => {
|
|
19
17
|
return (
|
|
20
18
|
<SliceMachineModal
|
|
21
|
-
isOpen
|
|
19
|
+
isOpen
|
|
22
20
|
shouldCloseOnOverlayClick={true}
|
|
23
21
|
style={{
|
|
24
22
|
content: {
|
|
@@ -16,7 +16,6 @@ import UpdateSliceZoneModalList from "./UpdateSliceZoneModalList";
|
|
|
16
16
|
import { sliceTemplatesComingSoon } from "./sliceTemplatesComingSoon";
|
|
17
17
|
|
|
18
18
|
interface UpdateSliceModalProps {
|
|
19
|
-
isOpen: boolean;
|
|
20
19
|
formId: string;
|
|
21
20
|
close: () => void;
|
|
22
21
|
onSuccess: (slices: SharedSlice[]) => Promise<void>;
|
|
@@ -29,7 +28,6 @@ export type SliceZoneFormValues = {
|
|
|
29
28
|
};
|
|
30
29
|
|
|
31
30
|
export const SlicesTemplatesModal: FC<UpdateSliceModalProps> = ({
|
|
32
|
-
isOpen,
|
|
33
31
|
formId,
|
|
34
32
|
close,
|
|
35
33
|
onSuccess,
|
|
@@ -40,8 +38,8 @@ export const SlicesTemplatesModal: FC<UpdateSliceModalProps> = ({
|
|
|
40
38
|
|
|
41
39
|
return (
|
|
42
40
|
<ModalFormCard
|
|
41
|
+
isOpen
|
|
43
42
|
buttonLabel="Add"
|
|
44
|
-
isOpen={isOpen}
|
|
45
43
|
formId={formId}
|
|
46
44
|
close={close}
|
|
47
45
|
onSubmit={(values: SliceZoneFormValues) => {
|
|
@@ -7,7 +7,6 @@ import ModalFormCard from "../../../../components/ModalFormCard";
|
|
|
7
7
|
import UpdateSliceZoneModalList from "./UpdateSliceZoneModalList";
|
|
8
8
|
|
|
9
9
|
interface UpdateSliceModalProps {
|
|
10
|
-
isOpen: boolean;
|
|
11
10
|
formId: string;
|
|
12
11
|
close: () => void;
|
|
13
12
|
onSubmit: (slices: SharedSlice[]) => Promise<void>;
|
|
@@ -19,7 +18,6 @@ export type SliceZoneFormValues = {
|
|
|
19
18
|
};
|
|
20
19
|
|
|
21
20
|
const UpdateSliceZoneModal: React.FC<UpdateSliceModalProps> = ({
|
|
22
|
-
isOpen,
|
|
23
21
|
formId,
|
|
24
22
|
close,
|
|
25
23
|
onSubmit,
|
|
@@ -27,8 +25,8 @@ const UpdateSliceZoneModal: React.FC<UpdateSliceModalProps> = ({
|
|
|
27
25
|
}) => {
|
|
28
26
|
return (
|
|
29
27
|
<ModalFormCard
|
|
28
|
+
isOpen
|
|
30
29
|
buttonLabel="Add"
|
|
31
|
-
isOpen={isOpen}
|
|
32
30
|
formId={formId}
|
|
33
31
|
close={close}
|
|
34
32
|
onSubmit={(values: SliceZoneFormValues) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button,
|
|
3
|
-
Box,
|
|
4
3
|
Switch,
|
|
5
4
|
DropdownMenu,
|
|
6
5
|
DropdownMenuTrigger,
|
|
@@ -22,7 +21,7 @@ import type { SliceZoneSlice } from "@lib/models/common/CustomType/sliceZone";
|
|
|
22
21
|
import type { ComponentUI } from "@lib/models/common/ComponentUI";
|
|
23
22
|
import type { LibraryUI } from "@lib/models/common/LibraryUI";
|
|
24
23
|
import type { SlicesSM } from "@lib/models/common/Slices";
|
|
25
|
-
import {
|
|
24
|
+
import { ListHeader } from "@src/components/List";
|
|
26
25
|
import { SliceZoneBlankSlate } from "@src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate";
|
|
27
26
|
import { telemetry } from "@src/apiClient";
|
|
28
27
|
import {
|
|
@@ -207,70 +206,69 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
207
206
|
};
|
|
208
207
|
|
|
209
208
|
return (
|
|
210
|
-
|
|
209
|
+
<>
|
|
211
210
|
{query.newPageType === undefined ? (
|
|
212
|
-
<
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
<
|
|
217
|
-
<
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
</DropdownMenuTrigger>
|
|
211
|
+
<ListHeader
|
|
212
|
+
actions={
|
|
213
|
+
sliceZone ? (
|
|
214
|
+
<DropdownMenu>
|
|
215
|
+
<DropdownMenuTrigger>
|
|
216
|
+
<Button variant="secondary" startIcon="add">
|
|
217
|
+
Add slices
|
|
218
|
+
</Button>
|
|
219
|
+
</DropdownMenuTrigger>
|
|
222
220
|
|
|
223
|
-
|
|
221
|
+
<DropdownMenuContent align="end">
|
|
222
|
+
<DropdownMenuItem
|
|
223
|
+
startIcon={<Icon name="add" size="large" />}
|
|
224
|
+
onSelect={openCreateSliceModal}
|
|
225
|
+
description="Start from scratch."
|
|
226
|
+
>
|
|
227
|
+
Create new
|
|
228
|
+
</DropdownMenuItem>
|
|
229
|
+
|
|
230
|
+
{availableSlicesTemplates.length > 0 ? (
|
|
224
231
|
<DropdownMenuItem
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
description="
|
|
232
|
+
onSelect={openSlicesTemplatesModal}
|
|
233
|
+
startIcon={<Icon name="contentCopy" size="large" />}
|
|
234
|
+
description="Select from premade examples."
|
|
235
|
+
shortcut={<Badge color="purple" title="New" />}
|
|
228
236
|
>
|
|
229
|
-
|
|
237
|
+
Use template
|
|
230
238
|
</DropdownMenuItem>
|
|
239
|
+
) : undefined}
|
|
231
240
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
} else {
|
|
264
|
-
setIsDeleteSliceZoneModalOpen(true);
|
|
265
|
-
}
|
|
266
|
-
}}
|
|
267
|
-
/>
|
|
268
|
-
) : undefined
|
|
269
|
-
}
|
|
270
|
-
>
|
|
271
|
-
Slice Zone
|
|
272
|
-
</ListHeader>
|
|
273
|
-
</List>
|
|
241
|
+
{availableSlicesToAdd.length > 0 ? (
|
|
242
|
+
<DropdownMenuItem
|
|
243
|
+
onSelect={openUpdateSliceZoneModal}
|
|
244
|
+
startIcon={<Icon name="folder" size="large" />}
|
|
245
|
+
description="Select from your own slices."
|
|
246
|
+
>
|
|
247
|
+
Select existing
|
|
248
|
+
</DropdownMenuItem>
|
|
249
|
+
) : undefined}
|
|
250
|
+
</DropdownMenuContent>
|
|
251
|
+
</DropdownMenu>
|
|
252
|
+
) : undefined
|
|
253
|
+
}
|
|
254
|
+
toggle={
|
|
255
|
+
customType.format !== "page" || tabId !== "Main" ? (
|
|
256
|
+
<Switch
|
|
257
|
+
checked={!!sliceZone}
|
|
258
|
+
onCheckedChange={(checked) => {
|
|
259
|
+
if (checked) {
|
|
260
|
+
onCreateSliceZone();
|
|
261
|
+
} else {
|
|
262
|
+
setIsDeleteSliceZoneModalOpen(true);
|
|
263
|
+
}
|
|
264
|
+
}}
|
|
265
|
+
size="small"
|
|
266
|
+
/>
|
|
267
|
+
) : undefined
|
|
268
|
+
}
|
|
269
|
+
>
|
|
270
|
+
Slice Zone
|
|
271
|
+
</ListHeader>
|
|
274
272
|
) : undefined}
|
|
275
273
|
{sliceZone ? (
|
|
276
274
|
slicesInSliceZone.length > 0 ? (
|
|
@@ -296,56 +294,59 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
296
294
|
/>
|
|
297
295
|
)
|
|
298
296
|
) : undefined}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
297
|
+
{isUpdateSliceZoneModalOpen && (
|
|
298
|
+
<UpdateSliceZoneModal
|
|
299
|
+
formId={`tab-slicezone-form-${tabId}`}
|
|
300
|
+
availableSlices={availableSlicesToAdd}
|
|
301
|
+
onSubmit={async (slices: SharedSlice[]) => {
|
|
302
|
+
const newCustomType = await addSlicesToSliceZone({
|
|
303
|
+
customType,
|
|
304
|
+
tabId,
|
|
305
|
+
slices,
|
|
306
|
+
});
|
|
307
|
+
onAddSlicesToSliceZone(newCustomType);
|
|
308
|
+
closeUpdateSliceZoneModal();
|
|
309
|
+
redirectToEditMode();
|
|
310
|
+
toast.success("Slice(s) added to slice zone");
|
|
311
|
+
}}
|
|
312
|
+
close={closeUpdateSliceZoneModal}
|
|
313
|
+
/>
|
|
314
|
+
)}
|
|
315
|
+
{isSlicesTemplatesModalOpen && (
|
|
316
|
+
<SlicesTemplatesModal
|
|
317
|
+
formId={`tab-slicezone-form-${tabId}`}
|
|
318
|
+
availableSlicesTemplates={availableSlicesTemplates}
|
|
319
|
+
localLibraries={localLibraries}
|
|
320
|
+
onSuccess={async (slices: SharedSlice[]) => {
|
|
321
|
+
const newCustomType = await addSlicesToSliceZone({
|
|
322
|
+
customType,
|
|
323
|
+
tabId,
|
|
324
|
+
slices,
|
|
325
|
+
});
|
|
326
|
+
onAddSlicesToSliceZone(newCustomType);
|
|
327
|
+
closeSlicesTemplatesModal();
|
|
328
|
+
redirectToEditMode();
|
|
329
|
+
toast.success(
|
|
330
|
+
<ToastMessageWithPath
|
|
331
|
+
message="Slice template(s) added to slice zone and created at: "
|
|
332
|
+
path={`${localLibraries[0].name}/`}
|
|
333
|
+
/>
|
|
334
|
+
);
|
|
335
|
+
}}
|
|
336
|
+
close={closeSlicesTemplatesModal}
|
|
337
|
+
/>
|
|
338
|
+
)}
|
|
339
|
+
{isDeleteSliceZoneModalOpen && (
|
|
340
|
+
<DeleteSliceZoneModal
|
|
341
|
+
closeDeleteSliceZoneModal={() => {
|
|
342
|
+
setIsDeleteSliceZoneModalOpen(false);
|
|
343
|
+
}}
|
|
344
|
+
deleteSliceZone={() => {
|
|
345
|
+
onDeleteSliceZone();
|
|
346
|
+
setIsDeleteSliceZoneModalOpen(false);
|
|
347
|
+
}}
|
|
348
|
+
/>
|
|
349
|
+
)}
|
|
349
350
|
{localLibraries?.length !== 0 && isCreateSliceModalOpen && (
|
|
350
351
|
<CreateSliceModal
|
|
351
352
|
onSuccess={async (newSlice: SharedSlice) => {
|
|
@@ -369,7 +370,7 @@ const SliceZone: React.FC<SliceZoneProps> = ({
|
|
|
369
370
|
onClose={closeCreateSliceModal}
|
|
370
371
|
/>
|
|
371
372
|
)}
|
|
372
|
-
|
|
373
|
+
</>
|
|
373
374
|
);
|
|
374
375
|
};
|
|
375
376
|
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
} from "@lib/models/common/CustomType";
|
|
14
14
|
import type { SlicesSM } from "@lib/models/common/Slices";
|
|
15
15
|
import { ensureDnDDestination, ensureWidgetTypeExistence } from "@lib/utils";
|
|
16
|
+
import { List } from "@src/components/List";
|
|
16
17
|
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
17
18
|
import type { SliceMachineStoreType } from "@src/redux/type";
|
|
18
19
|
import { telemetry } from "@src/apiClient";
|
|
@@ -132,15 +133,15 @@ const TabZone: FC<TabZoneProps> = ({
|
|
|
132
133
|
};
|
|
133
134
|
|
|
134
135
|
return (
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
>
|
|
136
|
+
<ErrorBoundary>
|
|
137
|
+
<Suspense
|
|
138
|
+
fallback={
|
|
139
|
+
<Box padding={32}>
|
|
140
|
+
<ProgressCircle />
|
|
141
|
+
</Box>
|
|
142
|
+
}
|
|
143
|
+
>
|
|
144
|
+
<List style={{ flexGrow: 1 }}>
|
|
144
145
|
{query.newPageType === undefined ? (
|
|
145
146
|
<Zone
|
|
146
147
|
zoneType="customType"
|
|
@@ -164,8 +165,10 @@ const TabZone: FC<TabZoneProps> = ({
|
|
|
164
165
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
165
166
|
`data${transformKeyAccessor(item.key)}`
|
|
166
167
|
}
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
renderFieldAccessor={(key) =>
|
|
169
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument
|
|
170
|
+
`data${transformKeyAccessor(key)}`
|
|
171
|
+
}
|
|
169
172
|
dataCy="ct-static-zone"
|
|
170
173
|
isRepeatableCustomType={customType.repeatable}
|
|
171
174
|
/>
|
|
@@ -181,9 +184,9 @@ const TabZone: FC<TabZoneProps> = ({
|
|
|
181
184
|
onCreateSliceZone={onCreateSliceZone}
|
|
182
185
|
onDeleteSliceZone={onDeleteSliceZone}
|
|
183
186
|
/>
|
|
184
|
-
</
|
|
185
|
-
</
|
|
186
|
-
</
|
|
187
|
+
</List>
|
|
188
|
+
</Suspense>
|
|
189
|
+
</ErrorBoundary>
|
|
187
190
|
);
|
|
188
191
|
};
|
|
189
192
|
|
|
@@ -42,11 +42,7 @@ export const CustomTypeBuilder: FC<CustomTypeBuilderProps> = (props) => {
|
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<>
|
|
45
|
-
<Window
|
|
46
|
-
style={{
|
|
47
|
-
height: sliceZoneEmpty ? "100%" : undefined,
|
|
48
|
-
}}
|
|
49
|
-
>
|
|
45
|
+
<Window style={sliceZoneEmpty ? { flexGrow: 1 } : undefined}>
|
|
50
46
|
{customType.format === "page" ? <WindowFrame /> : undefined}
|
|
51
47
|
{query.newPageType === "true" ? (
|
|
52
48
|
<TabZone
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Button, ButtonGroup } from "@prismicio/editor-ui";
|
|
1
|
+
import { Button, ButtonGroup, Switch, Text } from "@prismicio/editor-ui";
|
|
2
2
|
import { array, arrayOf, bool, func, object, shape, string } from "prop-types";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { BaseStyles, Heading } from "theme-ui";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { ListHeader } from "@src/components/List";
|
|
7
7
|
|
|
8
8
|
import SelectFieldTypeModal from "../SelectFieldTypeModal";
|
|
9
9
|
import NewField from "./Card/components/NewField";
|
|
@@ -73,31 +73,33 @@ const Zone = ({
|
|
|
73
73
|
const onCancelNewField = () => setNewFieldData(null);
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
|
-
|
|
76
|
+
<>
|
|
77
77
|
{isCustomType ? (
|
|
78
78
|
<ListHeader
|
|
79
79
|
actions={
|
|
80
80
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
81
81
|
fields.length > 0 ? (
|
|
82
|
-
|
|
82
|
+
<>
|
|
83
|
+
<Text color="grey11" component="span">
|
|
84
|
+
Show code snippets?
|
|
85
|
+
</Text>
|
|
86
|
+
<Switch
|
|
87
|
+
checked={showHints}
|
|
88
|
+
onCheckedChange={setShowHints}
|
|
89
|
+
size="small"
|
|
90
|
+
/>
|
|
83
91
|
<Button
|
|
84
|
-
variant="secondary"
|
|
85
|
-
onClick={() => setShowHints(!showHints)}
|
|
86
|
-
>
|
|
87
|
-
{showHints ? "Hide" : "Show"} code snippets
|
|
88
|
-
</Button>
|
|
89
|
-
<Button
|
|
90
|
-
variant="secondary"
|
|
91
|
-
onClick={() => enterSelectMode()}
|
|
92
92
|
data-cy={`add-${
|
|
93
93
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
94
94
|
isRepeatable ? "Repeatable" : "Static"
|
|
95
95
|
}-field`}
|
|
96
|
+
onClick={enterSelectMode}
|
|
96
97
|
startIcon="add"
|
|
98
|
+
variant="secondary"
|
|
97
99
|
>
|
|
98
100
|
Add a new field
|
|
99
101
|
</Button>
|
|
100
|
-
|
|
102
|
+
</>
|
|
101
103
|
) : undefined
|
|
102
104
|
}
|
|
103
105
|
>
|
|
@@ -211,7 +213,7 @@ const Zone = ({
|
|
|
211
213
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
212
214
|
widgetsArray={widgetsArrayWithCondUid}
|
|
213
215
|
/>
|
|
214
|
-
|
|
216
|
+
</>
|
|
215
217
|
);
|
|
216
218
|
};
|
|
217
219
|
|
package/out/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Slice Machine</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/66b3836ab88b0c5c.css" as="style"/><link rel="stylesheet" href="/_next/static/css/66b3836ab88b0c5c.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-6fc456a5c5e92284.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/FEq-xW5j6MjhKS2i9X-By/_buildManifest.js" defer=""></script><script src="/_next/static/FEq-xW5j6MjhKS2i9X-By/_ssgManifest.js" defer=""></script></head><body><div id="__next"><style data-emotion="css-global 413pep">html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;color:var(--theme-ui-colors-text);background-color:var(--theme-ui-colors-background);}html.theme-ui-light,.theme-ui-light html{--theme-ui-colors-text:#25252D;--theme-ui-colors-textClear:#6F6E77;--theme-ui-colors-grayLight:#E8E8ED;--theme-ui-colors-hoverBackground:#f2f2f2;--theme-ui-colors-background:#FFF;--theme-ui-colors-backgroundClear:#FFF;--theme-ui-colors-primary:#5D40F7;--theme-ui-colors-purpleLight:#F6F1FC;--theme-ui-colors-purpleLight01:#6548FF1A;--theme-ui-colors-purple12:#F1EEFE;--theme-ui-colors-purpleStrong:#5842C3;--theme-ui-colors-whiteButtonText:#1A1523;--theme-ui-colors-codeBlockBackground:#32275F;--theme-ui-colors-failedConnectText:#86848D;--theme-ui-colors-changesWarning-background:#FFECC7;--theme-ui-colors-changesWarning-color:#5C0C17;--theme-ui-colors-greyIcon:#6F6E77;--theme-ui-colors-greyIconDisabled:#C9D0D8;--theme-ui-colors-missingScreenshotBanner-color:#5C0C17;--theme-ui-colors-missingScreenshotBanner-bg:#FFECC7;--theme-ui-colors-badge-new-bg:#DBEDDB;--theme-ui-colors-badge-new-color:#05644D;--theme-ui-colors-badge-modified-bg:#FFECC7;--theme-ui-colors-badge-modified-color:#5C0C17;--theme-ui-colors-badge-synced-bg:purple12;--theme-ui-colors-badge-synced-color:#5842C3;--theme-ui-colors-badge-deleted-bg:rgba(203, 36, 49, 0.1);--theme-ui-colors-badge-unknown-bg:#F3F5F7;--theme-ui-colors-badge-unknown-color:#9AA4AF;--theme-ui-colors-codeBlockBorder:#545454;--theme-ui-colors-secondary:#F9FAFB;--theme-ui-colors-danger:#CB2431;--theme-ui-colors-highlight:hsl(10, 40%, 90%);--theme-ui-colors-purple:#5B3DF5;--theme-ui-colors-purple08:#5842C3;--theme-ui-colors-muted:#F9F9FB;--theme-ui-colors-icons:#8091A5;--theme-ui-colors-gray:#F8F9FA;--theme-ui-colors-grey01:#F3F5F7;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-grey03:#F4F2F4;--theme-ui-colors-grey04:#9AA4AF;--theme-ui-colors-grey05:#667587;--theme-ui-colors-grey07:#F9F8F9;--theme-ui-colors-grey10:#86848D;--theme-ui-colors-grey12:#1A1523;--theme-ui-colors-greyTransparent:rgba(37, 37, 45, 0.4);--theme-ui-colors-borders:#E4E2E4;--theme-ui-colors-bordersFocused:#6E56CF;--theme-ui-colors-deep:#0E2150;--theme-ui-colors-deep1:#A0ADE7;--theme-ui-colors-lightGreen:#EBF8F1;--theme-ui-colors-lightOrange:#FDF4EC;--theme-ui-colors-darkOrange:#C17C10;--theme-ui-colors-error:#E55737;--theme-ui-colors-success:#3AB97A;--theme-ui-colors-headSection:#fff;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-warning02:#ED811C;--theme-ui-colors-sidebar:#F1F1F4;--theme-ui-colors-link:#6E56CF;--theme-ui-colors-choggleBox:#5163BA;--theme-ui-colors-darkBorder:#DCDBDD;--theme-ui-colors-code-border:#DFE1E5;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;}html.theme-ui-dark,.theme-ui-dark html{--theme-ui-colors-text:#fff;--theme-ui-colors-textClear:#6E707B;--theme-ui-colors-hoverBackground:#202020;--theme-ui-colors-grey02:#E6E6EA;--theme-ui-colors-background:#202022;--theme-ui-colors-backgroundClear:#28282C;--theme-ui-colors-primary:#4E54D7;--theme-ui-colors-secondary:#28282C;--theme-ui-colors-icons:#5D5D71;--theme-ui-colors-gray:#1D1D1F;--theme-ui-colors-borders:#3A3A46;--theme-ui-colors-deep:#28282C;--theme-ui-colors-headSection:#28282C;--theme-ui-colors-warning:#E67E22;--theme-ui-colors-sidebar:#28282C;--theme-ui-colors-code-border:#5D5D6F;--theme-ui-colors-code-blue:#3B41BD;--theme-ui-colors-code-gray:#667587;--theme-ui-colors-code-orange:#EA6D46;--theme-ui-colors-code-green:#3AB97A;--theme-ui-colors-link:#A9A9C6;--theme-ui-colors-choggleBox:#fff;}</style><style data-emotion="css-global h19pgh">*{box-sizing:border-box;}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;line-height:1.5;font-weight:400;}body{margin:0;}</style><style data-emotion="css yvak7d">.css-yvak7d{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 57px);width:100vw;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}</style><div class="css-yvak7d"><style data-emotion="css uqm8ih">.css-uqm8ih{box-sizing:border-box;margin:0;min-width:0;color:var(--theme-ui-colors-primary);overflow:visible;}</style><svg stroke-width="4" viewBox="0 0 32 32" width="48" height="48" fill="none" stroke="currentColor" role="img" id="spinner" class="css-uqm8ih"><title>Loading</title><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" opacity="0.125"></circle><circle stroke-width="4" r="12" cx="16" cy="16" fill="none" stroke-dasharray="20 110"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 16 16" to="360 16 16" dur="750ms" repeatCount="indefinite"></animateTransform></circle></svg></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"FEq-xW5j6MjhKS2i9X-By","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,c,e,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,l,u,d,f){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,i,b,"static/chunks/pages/index-5266b7f0ca55025a.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-11c9e241f5a8a4cb.js"],"/changes":[c,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",a,e,"static/css/f585032018f6024b.css","static/chunks/pages/changes-e58a6f4217ec2d9e.js"],"/custom-types":[s,i,b,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[n,s,a,t,l,u,"static/chunks/pages/custom-types/[customTypeId]-1b420cadc2703ffc.js"],"/labs":["static/chunks/pages/labs-395232bcec99d42a.js"],"/page-types/[pageTypeId]":[n,s,a,t,l,u,"static/chunks/pages/page-types/[pageTypeId]-926e762906e3ab7a.js"],"/slices":[c,a,e,"static/css/22d69420bda374a7.css","static/chunks/pages/slices-b686960d7d228e36.js"],"/slices/[lib]/[sliceName]/[variation]":[c,d,e,t,"static/css/a3838b28ab738f1e.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-5b6c6912b66de61f.js"],"/slices/[lib]/[sliceName]/[variation]/screenshot":[f,"static/chunks/pages/slices/[lib]/[sliceName]/[variation]/screenshot-76d40513025fd76d.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[c,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-1bb05c8aa7db2bc2.js",f,d,"static/chunks/113-34b6cf41a62f08ce.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-37ba73cd3c821e04.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/screenshot","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/550-1dafbcec5d50b384.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/590-ab38d53732035bf0.js","static/chunks/573-8678a91b09707f5d.js","static/chunks/377-404ac40f863464df.js","static/chunks/840-39dbcc97d7813e7f.js","static/css/26b51745402a92af.css","static/chunks/125-84464edfe25651eb.js","static/chunks/933-a14914fafa262353.js","static/css/1fbd45881dcf43c4.css","static/chunks/909-e4eec905c21ad8ad.js","static/chunks/746-2ca4784811bde7c1.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[377],{96377:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var s=t(62230),i=t(85244),d=t(17064),r=t(81541),a=t(52322),c=t(71651),l=t(13980),o=t(2784),u=t(65077),p=t(75289),x=t(28173),f=t(75012),h=t(9620),y=t(2967),j=t(71168),g=t(21078),b=t(13394),m=t(99968),v=t(92809),_=function(e){var n=e.fields,t=e.title,d=e.tabId,r=e.enterEditMode,c=e.enterSelectMode,l=e.onDragEnd,o=e.renderFieldAccessor,u=e.onDeleteItem,x=e.showHints,f=e.newField,h=e.renderHintBase,_=e.isRepeatable,R=e.dataCy,C=e.isRepeatableCustomType,k=e.sx;return(0,a.jsx)(y.Z5,{onDragEnd:l,children:(0,a.jsx)(y.bK,{droppableId:t,children:function(e,t){return(0,a.jsxs)(p.xu,(0,i.Z)((0,s.Z)({as:"ul",ref:e.innerRef},e.droppableProps),{"data-cy":R,sx:k,children:[n.map(function(e,n){var l=e.value,f=l.config,y=l.type,R=(0,m.t)(b,f,y);if(!R)return(0,a.jsx)(j.Z,{children:(0,a.jsxs)(p.xv,{children:['Field type "',y,'" not supported']})});var k={item:e,index:n,tabId:d,widget:R,showHints:x,key:e.key,enterSelectMode:c,renderFieldAccessor:o,enterEditMode:r,parentSnapshot:t,deleteItem:u,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:C};if(R.CustomListItem){var w=R.CustomListItem;return(0,a.jsx)(w,(0,s.Z)({},k))}var S=(0,a.jsx)(v.Z,{item:e,show:x,isRepeatable:_,renderHintBase:h,Widgets:b,typeName:R.CUSTOM_NAME||R.TYPE_NAME});return(0,a.jsx)(g.Z,(0,i.Z)((0,s.Z)({},k),{HintElement:S}))}),e.placeholder,f]}))}})})},R=function(e){var n=e.onEnterSelectMode,t=e.zoneName;return(0,a.jsxs)(p.xu,{sx:{textAlign:"center",my:4},children:[(0,a.jsx)(p.X6,{as:"h5",children:"Add a new field here"}),(0,a.jsx)(p.xu,{sx:{my:2},children:(0,a.jsxs)(p.xv,{sx:{color:"textClear"},children:["Add a field to your ",t," Zone"]})}),(0,a.jsx)(p.xu,{sx:{display:"flex",justifyContent:"center",marginTop:16},children:(0,a.jsx)(c.zx,{variant:"secondary",onClick:function(){return n()},"data-cy":"add-".concat(t,"-field"),startIcon:"add",children:"Add a new field"})})]})},C=function(e){var n=e.Heading,t=e.Actions;return(0,a.jsxs)(p.kC,{bg:"grey02",sx:{pl:3,pr:2,py:2,mb:2,borderRadius:"6px",alignItems:"center",minHeight:"51px",justifyContent:"space-between"},children:[(0,a.jsx)(p.kC,{sx:{alignItems:"center"},children:n}),(0,a.jsx)(p.kC,{sx:{alignItems:"center"},children:t})]})},k=function(e){var n=e.zoneType,t=e.tabId,l=e.title,y=e.fields,j=e.poolOfFieldsToCheck,g=e.widgetsArray,b=e.isRepeatable,m=e.onDeleteItem,v=e.onSaveNewField,k=e.onDragEnd,w=e.EditModal,S=e.onSave,I=e.dataTip,Z=e.renderHintBase,A=e.renderFieldAccessor,E=e.dataCy,T=e.isRepeatableCustomType,F="customType"===n,N=Object.entries(j).find(function(e){return"UID"===(0,d.Z)(e,2)[1].value.type})?g.filter(function(e){return"UID"!==e.TYPE_NAME}):g,q=(0,o.useState)(!1),H=q[0],M=q[1],O=(0,o.useState)({isOpen:!1}),D=O[0],z=O[1],B=(0,o.useState)({isOpen:!1}),P=B[0],U=B[1],L=(0,o.useState)(null),X=L[0],Y=L[1],K=function(e){z({isOpen:!0,field:e})},V=function(){U({isOpen:!0})},W=function(){z({isOpen:!1})},G=function(){return U({isOpen:!1})},J=function(e){Y({widgetTypeName:e,fields:y}),U({isOpen:!1})},Q=function(){return Y(null)};return(0,a.jsxs)(a.Fragment,{children:[F?(0,a.jsx)(x.Bu,{actions:y.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.xv,{color:"grey11",component:"span",children:"Show code snippets?"}),(0,a.jsx)(c.rs,{checked:H,onCheckedChange:M,size:"small"}),(0,a.jsx)(c.zx,{"data-cy":"add-".concat(b?"Repeatable":"Static","-field"),onClick:V,startIcon:"add",variant:"secondary",children:"Add a new field"})]}):void 0,children:l}):(0,a.jsx)(u.xR,{children:(0,a.jsx)(C,{Heading:(0,a.jsx)(p.X6,{as:"h6",children:l}),Actions:y.length>0?(0,a.jsxs)(c.hE,{size:"medium",variant:"secondary",children:[(0,a.jsxs)(c.zx,{variant:"secondary",onClick:function(){return M(!H)},children:[H?"Hide":"Show"," code snippets"]}),(0,a.jsx)(c.zx,{variant:"secondary",onClick:function(){return V()},"data-cy":"add-".concat(b?"Repeatable":"Static","-field"),startIcon:"add",children:"Add a new field"})]}):null})}),0!==y.length||X?y.length>0||X?(0,a.jsx)(u.xR,{children:(0,a.jsx)(_,{tabId:t,isRepeatable:b,fields:y,showHints:H,dataTip:I,title:l,renderFieldAccessor:A,renderHintBase:Z,enterEditMode:K,enterSelectMode:V,onDragEnd:k,onDeleteItem:m,dataCy:E,isRepeatableCustomType:T,newField:X&&(0,a.jsx)(h.Z,(0,i.Z)((0,s.Z)({},X),{fields:j||y,onSave:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];v.apply(void 0,(0,r.Z)(n)),Y(null)},onCancelNewField:Q})),sx:F?{paddingInline:"16px !important"}:{}})}):void 0:(0,a.jsx)(u.xR,{children:(0,a.jsx)(R,{onEnterSelectMode:function(){return V()},zoneName:b?"Repeatable":"Static"})}),(0,a.jsx)(w,{data:D,close:W,onSave:S,fields:j,zoneType:n}),(0,a.jsx)(f.Z,{data:P,close:G,onSelect:J,widgetsArray:N})]})};k.propTypes={isRepeatable:l.bool,title:l.string.isRequired,dataTip:l.string.isRequired,onSave:l.func.isRequired,onSaveNewField:l.func.isRequired,onDragEnd:l.func.isRequired,onDeleteItem:l.func.isRequired,poolOfFieldsToCheck:(0,l.arrayOf)((0,l.shape)({key:l.string,value:l.object})),renderHintBase:l.func.isRequired,renderFieldAccessor:l.func.isRequired,widgetsArray:l.array.isRequired,fields:(0,l.arrayOf)((0,l.shape)({key:l.string.isRequired,value:(0,l.shape)({config:l.object,fields:l.array,type:l.string.isRequired})}))};var w=k},28173:function(e,n,t){"use strict";t.d(n,{aV:function(){return c},Bu:function(){return l}});var s=t(62230),i=t(85244),d=t(98240),r=t(52322),a=t(71651);t(56996),t(97798);var c=function(e){return(0,r.jsx)("div",(0,i.Z)((0,s.Z)({},e),{className:"_2a96i71 _1ecs97d9bi _1ecs97d9bk _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9bt _1ecs97d9c9"}))},l=function(e){var n=e.actions,t=e.children,c=e.toggle,l=(0,d.Z)(e,["actions","children","toggle"]);return(0,r.jsxs)("div",(0,i.Z)((0,s.Z)({},l),{className:"_2a96i73 _2a96i72 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d9bq _1ecs97d48s _1ecs97d4g5 _1ecs97d9f1 _1ecs97d9bj _1ecs97d9jc _1ecs97d9u4 _1ecs97d18 _1ecs97d8l _1ecs97d9ep _1ecs97d9ld _1ecs97d9ts",children:[(0,r.jsx)(a.xv,{color:"grey11",component:"span",variant:"bold",children:t}),c,Boolean(n)?(0,r.jsx)("div",{className:"_1ecs97d9bi _1ecs97d9bk _1ecs97d9bu _1ecs97d9bq _1ecs97d9bv _1ecs97d9ld _1ecs97d9c1",children:n}):null]}))}},97798:function(){},56996:function(){}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{59469:function(e,t,n){"use strict";var c=n(62230),i=n(52322),o=n(75289);t.Z=function(e){var t=e.elems,n=e.renderElem,r=e.defineElementKey,s=e.gridTemplateMinPx,d=e.gridGap,a=e.sx;return(0,i.jsx)(o.xu,{as:"section",sx:(0,c.Z)({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(void 0===s?"320px":s,", 1fr))"),gridGap:void 0===d?"16px":d,pt:2},a),children:t.map(function(e,t){return e?(0,i.jsx)("span",{children:n(e,t)},"".concat(r(e),"-").concat(t+1)):null})})}},24804:function(e,t,n){"use strict";n.d(t,{Zb:function(){return b},T$:function(){return f},eW:function(){return x},ZB:function(){return p},Lm:function(){return C}});var c=n(67557),i=n(62230),o=n(85244),r=n(98240),s=n(52322),d=n(50002),a=n(71651),l=n(6277),u=n(2784);n(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[590],{59469:function(e,t,n){"use strict";var c=n(62230),i=n(52322),o=n(75289);t.Z=function(e){var t=e.elems,n=e.renderElem,r=e.defineElementKey,s=e.gridTemplateMinPx,d=e.gridGap,a=e.sx;return(0,i.jsx)(o.xu,{as:"section",sx:(0,c.Z)({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(void 0===s?"320px":s,", 1fr))"),gridGap:void 0===d?"16px":d,pt:2},a),children:t.map(function(e,t){return e?(0,i.jsx)("span",{children:n(e,t)},"".concat(r(e),"-").concat(t+1)):null})})}},24804:function(e,t,n){"use strict";n.d(t,{Zb:function(){return b},T$:function(){return f},eW:function(){return x},ZB:function(){return p},Lm:function(){return C}});var c=n(67557),i=n(62230),o=n(85244),r=n(98240),s=n(52322),d=n(50002),a=n(71651),l=n(6277),u=n(2784);n(95201);var v={solid:"_1ecs97d3c _1ecs97dap _1ecs97d30a _1ecs97d30b _1ecs97d30g _1ecs97d30h",outlined:"_1ecs97d2i _1ecs97d9v _1ecs97dw _1ecs97d89 _1ecs97d2w _1ecs97da9 _1ecs97d2zm _1ecs97d2zn _1ecs97d2z2 _1ecs97d2z3 _1ecs97d2z8 _1ecs97d2z9"},h={div:"_1ecs97d9bi _1ecs97d9bl _1ecs97d9bv",img:"kedahr9 _1ecs97d9ji _1ecs97d9c5"},m={small:"kedahr2",medium:"kedahr3"},_={solid:"kedahr4 _1ecs97d1u _1ecs97d97",outlined:"kedahr5 _1ecs97d18 _1ecs97d8l"},b=function(e){var t,n=e.size,a=e.variant,h=void 0===a?"solid":a,b={className:(0,l.W)("_1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d268 _1ecs97d2dl _1ecs97d9d7 _1ecs97d9ej _1ecs97d9ex _1ecs97d9bj _1ecs97d9c9 _1ecs97d9cd",m[void 0===n?"medium":n],_[h],(t={},(0,c.Z)(t,"kedahr6",e.interactive),(0,c.Z)(t,v[h],e.interactive),t))};if(!0===e.interactive&&void 0===e.href){e.size,e.variant,e.interactive;var p=e.checked,f=e.disabled,x=e.onClick,C=(0,r.Z)(e,["size","variant","interactive","checked","disabled","onClick"]);return(0,s.jsx)("div",(0,o.Z)((0,i.Z)({},C,b),{"data-disabled":!0===f?"":void 0,"data-state":!0===p?"checked":void 0,onClick:function(e){if(!0!==f&&void 0!==x){var t=e.target;(0,d.J)(t)===e.currentTarget&&x(e)}},tabIndex:!0===f?void 0:0}))}if(!0===e.interactive){e.size,e.variant,e.interactive;var g=e.component,j=(0,r.Z)(e,["size","variant","interactive","component"]);return(0,u.createElement)(void 0===g?"a":g,(0,o.Z)((0,i.Z)({},j,b),{onClick:function(e){var t=e.target;(0,d.J)(t)!==e.currentTarget&&e.preventDefault()}}))}e.size,e.variant,e.interactive;var y=(0,r.Z)(e,["size","variant","interactive"]);return(0,s.jsx)("div",(0,i.Z)({},y,b))},p=function(e){var t=e.className,n=e.component,c=void 0===n?"img":n,d=e.overlay,a=(0,r.Z)(e,["className","component","overlay"]);return(0,s.jsxs)("div",{className:"kedahr7 _1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d9bw _1ecs97d9bv _1ecs97d9jo _1ecs97d9cd",children:[(0,u.createElement)(c,(0,o.Z)((0,i.Z)({},a),{className:(0,l.W)(h[c],t)})),Boolean(d)?(0,s.jsx)("div",{className:"kedahra _1ecs97d9bi _1ecs97d9bl _1ecs97d9ln _1ecs97d9cb _1ecs97d9cz",children:d}):void 0]})},f=function(e){return(0,s.jsx)("div",(0,o.Z)((0,i.Z)({},e),{className:"kedahrc kedahrb _1ecs97d9bi _1ecs97d9bk _1ecs97d9bq _1ecs97d9bj _1ecs97d9bu _1ecs97d9jc _1ecs97d9c0"}))},x=function(e){var t=e.action,n=e.subtitle,c=e.title,d=(0,r.Z)(e,["action","subtitle","title"]);return(0,s.jsxs)("div",(0,o.Z)((0,i.Z)({},d),{className:"kedahrd kedahrb _1ecs97d9bi _1ecs97d9bk _1ecs97d9bq _1ecs97d9bj _1ecs97d9bu _1ecs97d9ld _1ecs97d9je",children:[(0,s.jsxs)("div",{className:"kedahre _1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d9bw _1ecs97d9bv _1ecs97d9hc",children:[(0,s.jsx)(a.xv,{component:"span",noWrap:!0,variant:"bold",children:c}),(0,s.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"small",children:n})]}),t]}))},C=function(e){var t=e.children,n=(0,r.Z)(e,["children"]);return(0,s.jsx)("div",(0,o.Z)((0,i.Z)({},n),{className:"kedahrf _1ecs97d9bi _1ecs97d9bk _1ecs97d9bt _1ecs97d9j6 _1ecs97d9nb _1ecs97d9bz _1ecs97d9ta _1ecs97d9cb",children:(0,s.jsx)(a.xv,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:t})}))}},34728:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var c=n(52322),i=n(71651),o=n(32681),r=n(79096),s=function(e){var t=function(e){var t=d[e.modelType];switch(e.modelStatus){case o.G.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(t," exists only locally. Upon sync, it will be pushed to your remote repository.")};case o.G.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(t," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case o.G.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(t," is in sync with the remote repository.")};case o.G.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(t," has been deleted locally.")};case o.G.Unknown:if(!e.isOnline)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (no internet connection)."};if(e.authStatus===r.t.UNAUTHORIZED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};if(e.authStatus===r.t.FORBIDDEN)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (you don't have access to the repository)."};default:return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (unknown error)."}}}(e),n=t.badgeColor,s=t.badgeTitle,a=t.tooltipContent;return(0,c.jsx)(i.u,{content:a,side:"bottom",children:(0,c.jsx)(i.Ct,{color:n,title:s})})},d={CustomType:"type",Slice:"slice"}},82131:function(e,t,n){"use strict";n.d(t,{B:function(){return _}});var c=n(62230),i=n(85244),o=n(52322),r=n(71651),s=n(39097),d=n.n(s),a=n(30180),l=n(24804),u=n(5479),v=n(34728),h=n(49451),m=function(e){return(0,o.jsx)("svg",(0,i.Z)((0,c.Z)({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5.5C4 4.67157 4.67157 4 5.5 4H18.5C19.3284 4 20 4.67157 20 5.5V12.4413C20 12.4512 19.9997 12.461 19.9991 12.4707C20.0072 12.6083 19.9586 12.7485 19.8536 12.8536C19.6583 13.0488 19.3417 13.0488 19.1464 12.8536L16.3536 10.0607C16.1583 9.8654 15.8417 9.8654 15.6464 10.0607L11.8536 13.8536C11.6583 14.0488 11.3417 14.0488 11.1464 13.8536L9.35355 12.0607C9.15829 11.8654 8.84171 11.8654 8.64645 12.0607L5 15.7071V18.5C5 18.7761 5.22386 19 5.5 19H12.5C12.7761 19 13 19.2239 13 19.5C13 19.7761 12.7761 20 12.5 20H5.5C4.67157 20 4 19.3284 4 18.5V15.5003V15.4997V5.5ZM11.5 12.7929L14.9393 9.35355C15.5251 8.76777 16.4749 8.76777 17.0607 9.35355L19 11.2929V5.5C19 5.22386 18.7761 5 18.5 5H5.5C5.22386 5 5 5.22386 5 5.5V14.2929L7.93934 11.3536C8.52513 10.7678 9.47487 10.7678 10.0607 11.3536L11.5 12.7929ZM16.5 13C16.7761 13 17 13.2239 17 13.5V16H19.5C19.7761 16 20 16.2239 20 16.5C20 16.7761 19.7761 17 19.5 17H17V19.5C17 19.7761 16.7761 20 16.5 20C16.2239 20 16 19.7761 16 19.5V17H13.5C13.2239 17 13 16.7761 13 16.5C13 16.2239 13.2239 16 13.5 16H16V13.5C16 13.2239 16.2239 13 16.5 13Z",fill:"currentColor"})}))},_=function(e){var t=e.action,n=e.isDeletedSlice,s=e.onUpdateScreenshot,m=e.slice,_=a.dN.variation(m);if(!_)return null;var p=h.Y.getBuilderPagePathname({libraryName:m.href,sliceName:m.model.name,variationId:_.id}),f=(0,u.d7)(m,_),x=!!s&&!n;return(0,o.jsxs)(l.Zb,(0,i.Z)((0,c.Z)({},void 0===p||n?{interactive:!1}:{component:d(),href:p,interactive:!0}),{children:[void 0!==f?(0,o.jsx)(l.ZB,{overlay:x?(0,o.jsx)(r.xu,{alignItems:"center",justifyContent:"center",children:(0,o.jsx)(b,{onClick:s})}):void 0,src:f}):(0,o.jsx)(l.ZB,{component:"div",children:(0,o.jsxs)(r.xu,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,o.jsx)(r.xv,{color:"grey11",component:"span",children:"No screenshot available"}),x?(0,o.jsx)(b,{onClick:s}):void 0]})}),(0,o.jsx)(l.eW,{action:"menu"===t.type?(0,o.jsxs)(r.h_,{modal:!0,children:[(0,o.jsx)(r.$F,{children:(0,o.jsx)(r.hU,{icon:"moreVert"})}),(0,o.jsxs)(r.AW,{align:"end",children:[(0,o.jsx)(r.Xi,{onSelect:t.onRename,startIcon:(0,o.jsx)(r.I5,{name:"edit"}),children:"Rename"}),(0,o.jsx)(r.Xi,{color:"tomato",onSelect:t.onRemove,startIcon:(0,o.jsx)(r.I5,{name:"delete"}),children:"Delete"})]})]}):"remove"===t.type?(0,o.jsx)(r.hU,{icon:"close",onClick:t.onRemove}):(0,o.jsx)(v.O,{authStatus:t.authStatus,isOnline:t.isOnline,modelStatus:t.modelStatus,modelType:"Slice"}),subtitle:"".concat(m.model.variations.length," variation").concat(m.model.variations.length>1?"s":""),title:m.model.name}),x&&(0,u.cx)(m)>0?(0,o.jsx)(l.Lm,{children:"Missing screenshot"}):void 0]}))},b=function(e){return(0,o.jsx)(r.zx,{onClick:e.onClick,renderStartIcon:function(){return(0,o.jsx)(m,{color:r.TV.color.greyLight11})},variant:"secondary",children:"Update screenshot"})}},49451:function(e,t,n){"use strict";n.d(t,{Y:function(){return c}});var c={getBuilderPagePathname:function(e){return"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}}},95201:function(){}}]);
|