slice-machine-ui 1.22.2 → 1.22.3-alpha.chore-introduce-css-modules.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/.depcheckrc +4 -1
- package/.eslintignore +1 -0
- package/components/DeleteVariationModal/index.tsx +12 -11
- package/components/Forms/CreateSliceModal/CreateSliceModal.tsx +2 -5
- package/components/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +9 -5
- package/components/Forms/RenameVariationModal/RenameVariationModal.tsx +12 -11
- package/components/ItemHeader/index.tsx +1 -0
- package/components/ListItem/index.tsx +5 -2
- package/components/ScreenshotChangesModal/VariationDropZone.tsx +31 -9
- package/components/ScreenshotChangesModal/index.tsx +3 -0
- package/components/ScreenshotChangesModal/useCustomScreenshot.tsx +5 -5
- package/components/Simulator/index.tsx +9 -3
- package/lib/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +2 -2
- package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +2 -2
- package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +12 -20
- package/lib/builders/CustomTypeBuilder/TabModal/update.tsx +3 -1
- package/lib/builders/CustomTypeBuilder/TabZone/index.tsx +119 -52
- package/lib/builders/CustomTypeBuilder/index.tsx +39 -42
- package/lib/builders/SliceBuilder/FieldZones/index.tsx +81 -56
- package/lib/builders/SliceBuilder/Sidebar/AddVariationModal.tsx +24 -16
- package/lib/builders/SliceBuilder/Sidebar/index.tsx +44 -46
- package/lib/builders/SliceBuilder/SimulatorButton/index.tsx +4 -28
- package/lib/builders/SliceBuilder/index.tsx +10 -96
- package/lib/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +5 -1
- package/lib/builders/common/Zone/Card/components/NewField.tsx +16 -15
- package/lib/builders/common/Zone/Card/index.jsx +2 -0
- package/lib/builders/common/Zone/index.jsx +3 -1
- package/lib/models/common/ComponentUI.ts +0 -14
- package/lib/models/common/CustomType/sliceZone.ts +0 -29
- package/lib/models/common/CustomType/tab.ts +10 -142
- package/lib/models/common/widgets/Group/ListItem/index.jsx +61 -23
- package/out/404.html +1 -1
- package/out/_next/static/QLcban0JdGEoFu6NgapR9/_buildManifest.js +1 -0
- package/out/_next/static/chunks/065a3ddb-9a38ca0d60f0bf2f.js +1 -0
- package/out/_next/static/chunks/183-4feb6bb3eddbc768.js +1 -0
- package/out/_next/static/chunks/18539003-7b2711e6c51d6fac.js +97 -0
- package/out/_next/static/chunks/1cc2734a-2c5b6c0367fcde86.js +1 -0
- package/out/_next/static/chunks/25-8fedd33ad9b6de5b.js +1 -0
- package/out/_next/static/chunks/286-ed90373e9a469944.js +1 -0
- package/out/_next/static/chunks/318-541db69860d31138.js +1 -0
- package/out/_next/static/chunks/{505-3f1cf09a086dcba8.js → 376-0ed5822f8afcaa7c.js} +3 -3
- package/out/_next/static/chunks/4c744e84-e3161d754618373f.js +1 -0
- package/out/_next/static/chunks/50-cfc2514205b86001.js +1 -0
- package/out/_next/static/chunks/543-f8766685f7f451e2.js +1 -0
- package/out/_next/static/chunks/59b4e022-7a3b5554b806349f.js +1 -0
- package/out/_next/static/chunks/696-b12edad30a3617e5.js +31 -0
- package/out/_next/static/chunks/727-15cf3f2fea9a37e5.js +1 -0
- package/out/_next/static/chunks/731-501990ebe6a71b32.js +1 -0
- package/out/_next/static/chunks/904-ccd8ca3368ce29fc.js +1 -0
- package/out/_next/static/chunks/{918-38d08f1e885b222d.js → 918-5bb55fb464e34768.js} +1 -1
- package/out/_next/static/chunks/f36c6662-03bb5e9d9aa0b0aa.js +1 -0
- package/out/_next/static/chunks/pages/_app-3bb7f58b43c87166.js +430 -0
- package/out/_next/static/chunks/pages/changelog-68d115a14f1423d7.js +1 -0
- package/out/_next/static/chunks/pages/{changes-52c9d917808d1461.js → changes-1cf9e7888029f113.js} +1 -1
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-3a37eb3373bb8823.js → [customTypeId]-3f862ad6111a1fc0.js} +1 -1
- package/out/_next/static/chunks/pages/{custom-types-2f5664d9492b13fb.js → custom-types-94b8f8dbf7727412.js} +1 -1
- package/out/_next/static/chunks/pages/{index-d8e3a2c0d712904f.js → index-64cfb8b0948ba8ef.js} +1 -1
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-733f3890c0466a05.js → [pageTypeId]-d1ffca11c42f2603.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-897ca93c114a1435.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-73dd999915509965.js +1 -0
- package/out/_next/static/chunks/pages/slices-7b09cb5130c63bb3.js +1 -0
- package/out/_next/static/css/37153180c3b0dd66.css +1 -0
- package/out/_next/static/css/538ecf581b0e7c11.css +1 -0
- package/out/_next/static/css/{5da5d3cd7a87c3cf.css → 72465cc1225f28a2.css} +1 -1
- package/out/_next/static/css/{77abb01eee0e43a7.css → b22c0750c14cc089.css} +1 -1
- package/out/_next/static/css/f8eb526e10bc2441.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]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +21 -11
- package/pages/slices/[lib]/[sliceName]/[variation]/index.tsx +25 -11
- package/pages/slices/[lib]/[sliceName]/[variation]/simulator.tsx +12 -9
- package/src/apiClient.ts +7 -6
- package/src/components/CodeBlock/CodeBlock.tsx +1 -0
- package/src/components/Kbd/Kbd.module.css +10 -0
- package/src/components/Kbd/Kbd.module.css.d.ts +5 -0
- package/src/components/Kbd/Kbd.tsx +1 -1
- package/src/components/Window/Window.tsx +7 -1
- package/src/domain/__tests__/customType.test.ts +785 -0
- package/src/domain/customType.ts +519 -6
- package/src/domain/slice.ts +166 -1
- package/src/features/autoSave/AutoSaveStatusIndicator.tsx +43 -0
- package/src/features/autoSave/useAutoSave.tsx +177 -0
- package/src/features/customTypes/EditDropdown.tsx +3 -0
- package/src/features/customTypes/actions/convertCustomToPageType.ts +2 -4
- package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +90 -0
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +46 -79
- package/src/features/customTypes/customTypesMessages.ts +4 -0
- package/src/features/slices/actions/addSlicesToSliceZone.ts +2 -7
- package/src/features/slices/actions/uploadSliceScreenshot.ts +45 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +5 -5
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +4 -10
- package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +110 -0
- package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +8 -24
- package/src/features/slices/sliceBuilder/actions/renameVariation.ts +8 -24
- package/src/features/slices/sliceCards/SharedSliceCard.tsx +1 -0
- package/src/hooks/useCurrentSlice.tsx +4 -16
- package/src/hooks/useScreenshotChangesModal.ts +1 -0
- package/src/hooks/useServerState.ts +1 -58
- package/src/modules/availableCustomTypes/index.ts +8 -3
- package/src/modules/simulator/index.ts +0 -2
- package/src/modules/slices/index.ts +32 -25
- package/src/modules/slices/selector.ts +30 -0
- package/src/modules/useSliceMachineActions.ts +20 -270
- package/src/redux/reducer.ts +0 -4
- package/src/redux/saga.ts +0 -6
- package/src/redux/type.ts +0 -4
- package/stylelint.config.js +17 -0
- package/test/src/modules/availableCustomTypes/index.test.ts +8 -10
- package/test/src/modules/simulator.test.ts +0 -2
- package/lib/models/common/CustomType/group.ts +0 -80
- package/lib/models/common/Variation.ts +0 -100
- package/out/_next/static/3vLhj_JZ10e4rwC2sTZNQ/_buildManifest.js +0 -1
- package/out/_next/static/chunks/18539003-4460ccbfe3109578.js +0 -97
- package/out/_next/static/chunks/482-49264466566eac99.js +0 -1
- package/out/_next/static/chunks/550-c80fd46fb64d1eef.js +0 -1
- package/out/_next/static/chunks/80-7b8a97d0122ff74a.js +0 -1
- package/out/_next/static/chunks/840-163f8a1040e6820d.js +0 -1
- package/out/_next/static/chunks/904-fe1af089657fb0cc.js +0 -1
- package/out/_next/static/chunks/958-3d829456f4f5632c.js +0 -1
- package/out/_next/static/chunks/pages/_app-f88a66f6532a8e87.js +0 -458
- package/out/_next/static/chunks/pages/changelog-4d0f2f1222e403fe.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-7b17cb59d0db03b5.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ef11594ce026b650.js +0 -1
- package/out/_next/static/chunks/pages/slices-884a936a9a062a65.js +0 -1
- package/out/_next/static/css/1bbf650dfd37ce69.css +0 -1
- package/out/_next/static/css/7d650bca12dc4061.css +0 -1
- package/out/_next/static/css/cb33580e45d01b59.css +0 -1
- package/postcss.config.js +0 -2
- package/src/components/Kbd/Kbd.css.ts +0 -16
- package/src/domain/__tests__/CustomTypeModel.test.ts +0 -247
- package/src/layouts/WithSlice.tsx +0 -26
- package/src/modules/screenshots/actions.ts +0 -21
- package/src/modules/screenshots/sagas.ts +0 -70
- package/src/modules/selectedCustomType/actions.ts +0 -147
- package/src/modules/selectedCustomType/index.ts +0 -11
- package/src/modules/selectedCustomType/reducer.ts +0 -287
- package/src/modules/selectedCustomType/sagas.ts +0 -72
- package/src/modules/selectedCustomType/selectors.ts +0 -33
- package/src/modules/selectedCustomType/stateHelpers.ts +0 -42
- package/src/modules/selectedCustomType/types.ts +0 -9
- package/src/modules/selectedSlice/actions.ts +0 -106
- package/src/modules/selectedSlice/reducer.ts +0 -175
- package/src/modules/selectedSlice/sagas.ts +0 -72
- package/src/modules/selectedSlice/selectors.ts +0 -55
- package/src/modules/selectedSlice/types.ts +0 -3
- package/src/modules/toaster/utils.tsx +0 -23
- package/test/lib/models/common/CustomType/sliceZone.test.ts +0 -49
- package/test/pages/custom-types.test.tsx +0 -625
- package/test/src/modules/selectedCustomType/__fixtures__/model.json +0 -119
- package/test/src/modules/selectedCustomType/reducer.test.ts +0 -322
- package/test/src/modules/selectedCustomType/sagas.test.ts +0 -89
- package/test/src/modules/selectedCustomType/selectors.test.ts +0 -54
- package/test/src/modules/selectedSlice/__fixtures__/mocks.json +0 -171
- package/test/src/modules/selectedSlice/__fixtures__/model.json +0 -35
- package/test/src/modules/selectedSlice/__testutils__/getRefreshStateCreatorPayloadData.ts +0 -72
- package/test/src/modules/selectedSlice/__testutils__/getSelectedSliceDummyData.ts +0 -30
- package/test/src/modules/selectedSlice/reducer.test.ts +0 -170
- package/test/src/modules/selectedSlice/sagas.test.ts +0 -82
- package/test/src/modules/toaster/utils.test.ts +0 -50
- /package/out/_next/static/{3vLhj_JZ10e4rwC2sTZNQ → QLcban0JdGEoFu6NgapR9}/_ssgManifest.js +0 -0
|
@@ -10,7 +10,7 @@ import { AvailableCustomTypesStoreType } from "@src/modules/availableCustomTypes
|
|
|
10
10
|
import { refreshStateCreator } from "@src/modules/environment";
|
|
11
11
|
|
|
12
12
|
import { dummyServerState } from "../__fixtures__/serverState";
|
|
13
|
-
import {
|
|
13
|
+
import { updateCustomType } from "@src/apiClient";
|
|
14
14
|
import { createCustomType } from "@src/features/customTypes/customTypesTable/createCustomType";
|
|
15
15
|
import { push } from "connected-next-router";
|
|
16
16
|
import { modalCloseCreator } from "@src/modules/modal";
|
|
@@ -231,7 +231,7 @@ describe("[Available Custom types module]", () => {
|
|
|
231
231
|
createCustomTypeCreator.request(actionPayload),
|
|
232
232
|
);
|
|
233
233
|
|
|
234
|
-
saga.next().call(
|
|
234
|
+
saga.next().call(updateCustomType, CustomTypes.fromSM(customTypeCreated));
|
|
235
235
|
saga
|
|
236
236
|
.next()
|
|
237
237
|
.put(
|
|
@@ -266,20 +266,18 @@ describe("[Available Custom types module]", () => {
|
|
|
266
266
|
repeatable: true,
|
|
267
267
|
format: "custom" as const,
|
|
268
268
|
};
|
|
269
|
-
const customTypeCreated =
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
actionPayload.format,
|
|
275
|
-
),
|
|
269
|
+
const customTypeCreated = createCustomType(
|
|
270
|
+
actionPayload.id,
|
|
271
|
+
actionPayload.label,
|
|
272
|
+
actionPayload.repeatable,
|
|
273
|
+
actionPayload.format,
|
|
276
274
|
);
|
|
277
275
|
const saga = testSaga(
|
|
278
276
|
createCustomTypeSaga,
|
|
279
277
|
createCustomTypeCreator.request(actionPayload),
|
|
280
278
|
);
|
|
281
279
|
|
|
282
|
-
saga.next().call(
|
|
280
|
+
saga.next().call(updateCustomType, customTypeCreated);
|
|
283
281
|
saga.throw(new Error()).put(
|
|
284
282
|
openToasterCreator({
|
|
285
283
|
content: "Internal Error: Custom type not saved",
|
|
@@ -26,7 +26,6 @@ import { updateSliceMock } from "@src/modules/slices";
|
|
|
26
26
|
import { modalOpenCreator } from "@src/modules/modal";
|
|
27
27
|
import { ModalKeysEnum } from "@src/modules/modal/types";
|
|
28
28
|
import { checkSimulatorSetup, getSimulatorSetupSteps } from "@src/apiClient";
|
|
29
|
-
import { updateSelectedSliceMocks } from "@src/modules/selectedSlice/actions";
|
|
30
29
|
import { createTestPlugin } from "test/__testutils__/createTestPlugin";
|
|
31
30
|
import { createTestProject } from "test/__testutils__/createTestProject";
|
|
32
31
|
import { createSliceMachineManager } from "@slicemachine/manager";
|
|
@@ -284,7 +283,6 @@ describe("[Simulator module]", () => {
|
|
|
284
283
|
}),
|
|
285
284
|
)
|
|
286
285
|
.put(updateSliceMock(payload.payload))
|
|
287
|
-
.put(updateSelectedSliceMocks({ mocks: payload.payload.mocks }))
|
|
288
286
|
.put(saveSliceMockCreator.success())
|
|
289
287
|
.run();
|
|
290
288
|
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { NestableWidget } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
-
import { GroupSM } from "../Group";
|
|
3
|
-
|
|
4
|
-
export const Group = {
|
|
5
|
-
addWidget(
|
|
6
|
-
group: GroupSM,
|
|
7
|
-
newField: { key: string; value: NestableWidget },
|
|
8
|
-
): GroupSM {
|
|
9
|
-
return {
|
|
10
|
-
...group,
|
|
11
|
-
config: {
|
|
12
|
-
...group.config,
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
14
|
-
fields: [...(group.config?.fields || []), newField],
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
deleteWidget(group: GroupSM, wkey: string): GroupSM {
|
|
19
|
-
return {
|
|
20
|
-
...group,
|
|
21
|
-
config: {
|
|
22
|
-
...group.config,
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
24
|
-
fields: (group.config?.fields || []).filter(({ key }) => key !== wkey),
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
reorderWidget(group: GroupSM, start: number, end: number): GroupSM {
|
|
29
|
-
const reorderedWidget: { key: string; value: NestableWidget } | undefined =
|
|
30
|
-
group.config?.fields?.[start];
|
|
31
|
-
if (!reorderedWidget)
|
|
32
|
-
throw new Error(`Unable to reorder the widget at index ${start}.`);
|
|
33
|
-
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
35
|
-
const reorderedArea = (group.config?.fields || []).reduce<
|
|
36
|
-
Array<{ key: string; value: NestableWidget }>
|
|
37
|
-
>((acc, field, index) => {
|
|
38
|
-
const elems = [field, reorderedWidget];
|
|
39
|
-
switch (index) {
|
|
40
|
-
case start:
|
|
41
|
-
return acc;
|
|
42
|
-
case end:
|
|
43
|
-
return [...acc, ...(end > start ? elems : elems.reverse())];
|
|
44
|
-
default:
|
|
45
|
-
return [...acc, field];
|
|
46
|
-
}
|
|
47
|
-
}, []);
|
|
48
|
-
|
|
49
|
-
return {
|
|
50
|
-
...group,
|
|
51
|
-
config: {
|
|
52
|
-
...group.config,
|
|
53
|
-
fields: reorderedArea,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
replaceWidget(
|
|
58
|
-
group: GroupSM,
|
|
59
|
-
previousKey: string,
|
|
60
|
-
newKey: string,
|
|
61
|
-
value: NestableWidget,
|
|
62
|
-
): GroupSM {
|
|
63
|
-
return {
|
|
64
|
-
...group,
|
|
65
|
-
config: {
|
|
66
|
-
...group.config,
|
|
67
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
68
|
-
fields: (group.config?.fields || []).map((t) => {
|
|
69
|
-
if (t.key === previousKey) {
|
|
70
|
-
return {
|
|
71
|
-
key: newKey,
|
|
72
|
-
value,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
return t;
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { NestableWidget } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
-
import { VariationSM, WidgetsArea } from "./Slice";
|
|
3
|
-
import { FieldsSM } from "./Fields";
|
|
4
|
-
|
|
5
|
-
import camelCase from "lodash/camelCase";
|
|
6
|
-
|
|
7
|
-
export const Variation = {
|
|
8
|
-
generateId(str: string): string {
|
|
9
|
-
return camelCase(str);
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
reorderWidget(
|
|
13
|
-
variation: VariationSM,
|
|
14
|
-
widgetsArea: WidgetsArea,
|
|
15
|
-
start: number,
|
|
16
|
-
end: number,
|
|
17
|
-
): VariationSM {
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
19
|
-
const widgets = variation[widgetsArea] || [];
|
|
20
|
-
const reorderedWidget: { key: string; value: NestableWidget } | undefined =
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
22
|
-
widgets && widgets[start];
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
24
|
-
if (!reorderedWidget)
|
|
25
|
-
throw new Error(
|
|
26
|
-
`Unable to reorder the widget at index ${start}. the list of widgets contains only ${widgets.length} elements.`,
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const reorderedArea = widgets.reduce<FieldsSM>((acc, widget, index) => {
|
|
30
|
-
const elems = [widget, reorderedWidget];
|
|
31
|
-
switch (index) {
|
|
32
|
-
case start:
|
|
33
|
-
return acc;
|
|
34
|
-
case end:
|
|
35
|
-
return [...acc, ...(end > start ? elems : elems.reverse())];
|
|
36
|
-
default:
|
|
37
|
-
return [...acc, widget];
|
|
38
|
-
}
|
|
39
|
-
}, []);
|
|
40
|
-
return {
|
|
41
|
-
...variation,
|
|
42
|
-
[widgetsArea]: reorderedArea,
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
replaceWidget(
|
|
47
|
-
variation: VariationSM,
|
|
48
|
-
widgetsArea: WidgetsArea,
|
|
49
|
-
previousKey: string,
|
|
50
|
-
newKey: string,
|
|
51
|
-
newValue: NestableWidget,
|
|
52
|
-
): VariationSM {
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
54
|
-
const widgets = variation[widgetsArea] || [];
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
...variation,
|
|
58
|
-
[widgetsArea]: widgets.reduce((acc: FieldsSM, { key, value }) => {
|
|
59
|
-
if (key === previousKey) {
|
|
60
|
-
return acc.concat([{ key: newKey, value: newValue }]);
|
|
61
|
-
} else {
|
|
62
|
-
return acc.concat([{ key, value }]);
|
|
63
|
-
}
|
|
64
|
-
}, []),
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
addWidget(
|
|
69
|
-
variation: VariationSM,
|
|
70
|
-
widgetsArea: WidgetsArea,
|
|
71
|
-
key: string,
|
|
72
|
-
value: NestableWidget,
|
|
73
|
-
): VariationSM {
|
|
74
|
-
return {
|
|
75
|
-
...variation,
|
|
76
|
-
[widgetsArea]: variation[widgetsArea]?.concat([{ key, value }]),
|
|
77
|
-
};
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
deleteWidget(
|
|
81
|
-
variation: VariationSM,
|
|
82
|
-
widgetsArea: WidgetsArea,
|
|
83
|
-
widgetKey: string,
|
|
84
|
-
): VariationSM {
|
|
85
|
-
return {
|
|
86
|
-
...variation,
|
|
87
|
-
[widgetsArea]: variation[widgetsArea]?.filter(
|
|
88
|
-
({ key }) => widgetKey !== key,
|
|
89
|
-
),
|
|
90
|
-
};
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
copyValue(variation: VariationSM, key: string, name: string): VariationSM {
|
|
94
|
-
return {
|
|
95
|
-
...variation,
|
|
96
|
-
id: key,
|
|
97
|
-
name,
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,u,l){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,i,b,"static/chunks/pages/index-d8e3a2c0d712904f.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-4d0f2f1222e403fe.js"],"/changes":[a,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,e,"static/css/7d650bca12dc4061.css","static/chunks/pages/changes-52c9d917808d1461.js"],"/custom-types":[c,i,b,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[n,s,c,t,u,l,"static/chunks/pages/custom-types/[customTypeId]-3a37eb3373bb8823.js"],"/labs":["static/chunks/pages/labs-526bb7d60a1b90f4.js"],"/page-types/[pageTypeId]":[n,s,c,t,u,l,"static/chunks/pages/page-types/[pageTypeId]-733f3890c0466a05.js"],"/slices":[a,s,e,"static/css/cb33580e45d01b59.css","static/chunks/pages/slices-884a936a9a062a65.js"],"/slices/[lib]/[sliceName]/[variation]":[a,s,e,t,"static/css/77abb01eee0e43a7.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-ef11594ce026b650.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[a,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-4460ccbfe3109578.js","static/chunks/505-3f1cf09a086dcba8.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-7b17cb59d0db03b5.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/958-3d829456f4f5632c.js","static/chunks/550-c80fd46fb64d1eef.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-7b8a97d0122ff74a.js","static/chunks/482-49264466566eac99.js","static/chunks/840-163f8a1040e6820d.js","static/css/be1f49e49a5aa7eb.css","static/chunks/474-5a072e6fac61f703.js","static/chunks/904-fe1af089657fb0cc.js","static/css/5da5d3cd7a87c3cf.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|