slice-machine-ui 1.18.1-dev-next-release.2 → 1.18.1-dev-next-release.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Button/index.tsx +2 -2
- package/components/Changelog/index.tsx +1 -1
- package/components/Changelog/versionDetails/UpdateCommandBox.tsx +1 -1
- package/components/ChangesItems/ChangesItems.tsx +2 -2
- package/components/CustomTypeTable/changesPage.tsx +1 -1
- package/components/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +3 -3
- package/components/DeleteDocumentsDrawer/ReferencesErrorDrawer.tsx +3 -3
- package/components/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +3 -3
- package/components/DeleteSliceModal/index.tsx +1 -1
- package/components/FormFields/CheckboxControl.jsx +1 -1
- package/components/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +5 -5
- package/components/Forms/CreateSliceModal/CreateSliceModal.tsx +1 -1
- package/components/Forms/RenameSliceModal/RenameSliceModal.tsx +1 -1
- package/components/Forms/formsValidator.ts +2 -2
- package/components/Grid/index.tsx +1 -1
- package/components/Li/index.tsx +2 -2
- package/components/ListItem/index.tsx +2 -2
- package/components/ListItem/utils.js +1 -1
- package/components/LoginModal/index.tsx +2 -2
- package/components/ModalFormCard/index.tsx +2 -2
- package/components/Navigation/VideoItem.tsx +2 -2
- package/components/Navigation/index.test.tsx +8 -8
- package/components/Navigation/index.tsx +2 -2
- package/components/ReviewModal/ReviewForm.tsx +1 -1
- package/components/ReviewModal/ReviewModal.tsx +4 -4
- package/components/ScreenshotChangesModal/VariationDropZone.tsx +6 -6
- package/components/ScreenshotChangesModal/index.tsx +3 -3
- package/components/ScreenshotPreviewModal/index.tsx +2 -2
- package/components/Simulator/components/Header/index.tsx +1 -1
- package/components/Simulator/components/IframeRenderer/index.tsx +2 -2
- package/components/Simulator/components/SetupModal/index.tsx +1 -1
- package/components/Simulator/components/Toolbar/index.tsx +2 -2
- package/components/Simulator/index.tsx +5 -5
- package/components/Tooltip/TextWithTooltip.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/SliceZone/List.tsx +2 -2
- package/lib/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +4 -4
- package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +12 -12
- package/lib/builders/CustomTypeBuilder/TabZone/index.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/index.tsx +1 -1
- package/lib/builders/SliceBuilder/FieldZones/index.tsx +4 -4
- package/lib/builders/SliceBuilder/Header/SimulatorButton/index.tsx +1 -1
- package/lib/builders/SliceBuilder/Header/VariationsPopover/index.tsx +1 -1
- package/lib/builders/SliceBuilder/Header/index.tsx +2 -2
- package/lib/builders/SliceBuilder/index.tsx +2 -2
- package/lib/builders/common/EditModal/Form.jsx +1 -1
- package/lib/builders/common/EditModal/index.jsx +3 -3
- package/lib/builders/common/Zone/Card/components/NewField.tsx +7 -7
- package/lib/builders/common/Zone/index.jsx +2 -2
- package/lib/builders/utils/index.ts +1 -1
- package/lib/forms/defaults.ts +3 -3
- package/lib/forms/fields.ts +3 -3
- package/lib/forms/index.ts +3 -3
- package/lib/models/common/ComponentUI.ts +3 -3
- package/lib/models/common/CustomType/group.ts +2 -2
- package/lib/models/common/CustomType/index.ts +4 -4
- package/lib/models/common/CustomType/tab.ts +7 -7
- package/lib/models/common/ErrorWithStatus.ts +4 -1
- package/lib/models/common/Fields.ts +1 -1
- package/lib/models/common/Group.ts +5 -5
- package/lib/models/common/Library.ts +1 -1
- package/lib/models/common/Manifest.ts +4 -4
- package/lib/models/common/ModelData.ts +6 -6
- package/lib/models/common/ModelStatus/compareCustomTypeModels.ts +1 -1
- package/lib/models/common/ModelStatus/compareSliceModels.ts +4 -4
- package/lib/models/common/ModelStatus/index.ts +5 -5
- package/lib/models/common/Screenshots.ts +1 -1
- package/lib/models/common/Slice.ts +7 -7
- package/lib/models/common/Slices.ts +5 -5
- package/lib/models/common/UserProfile.ts +1 -1
- package/lib/models/common/Variation.ts +6 -6
- package/lib/models/common/normalizers/customType.ts +3 -3
- package/lib/models/common/normalizers/slices.ts +2 -2
- package/lib/models/common/widgets/Boolean/index.ts +2 -2
- package/lib/models/common/widgets/ContentRelationship/Form.tsx +2 -2
- package/lib/models/common/widgets/ContentRelationship/index.ts +2 -2
- package/lib/models/common/widgets/Group/ListItem/index.jsx +3 -3
- package/lib/models/common/widgets/Image/Form.tsx +3 -3
- package/lib/models/common/widgets/StructuredText/Form.tsx +2 -2
- package/lib/models/common/widgets/StructuredText/index.ts +2 -2
- package/lib/utils/index.ts +1 -1
- package/lib/utils/poll.ts +3 -3
- package/lib/utils/shared/customTypes.ts +1 -1
- package/next.config.mjs +3 -3
- package/out/404.html +1 -1
- package/out/_next/static/{4_g3bWryyxcdGzgi4MHr- → HGF5llOreY_Hv9IuGfW25}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/125-e3857af2068bbedf.js +11 -0
- package/out/_next/static/chunks/pages/{_app-b2f6093b3f1e9f24.js → _app-925e9450acf20963.js} +12 -12
- 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 +5 -5
- package/pages/_app.tsx +1 -1
- package/pages/api/embed.js +1 -1
- package/pages/slices.tsx +4 -4
- package/src/apiClient.ts +11 -11
- package/src/components/BaseHoverCard/BaseHoverCard.test.tsx +1 -1
- package/src/components/HoverCard/HoverCard.tsx +1 -1
- package/src/components/SideNav/SideNav.tsx +2 -2
- package/src/components/Table/Table.test.tsx +1 -1
- package/src/components/TextLink/TextLink.tsx +1 -1
- package/src/domain/__tests__/CustomTypeModel.test.ts +19 -19
- package/src/domain/customType.ts +10 -10
- package/src/domain/slice.ts +5 -5
- package/src/features/changes/StatusBadge.tsx +1 -1
- package/src/features/customTypes/EditDropdown.tsx +1 -1
- package/src/features/customTypes/PageTypeOnboarding.tsx +2 -2
- package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +7 -7
- package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +24 -22
- package/src/features/customTypes/actions/convertCustomToPageType.ts +3 -3
- package/src/features/customTypes/actions/deleteCustomType.ts +1 -1
- package/src/features/customTypes/actions/renameCustomType.ts +1 -1
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +3 -3
- package/src/features/customTypes/customTypesConfig.ts +3 -3
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +2 -2
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +3 -3
- package/src/features/customTypes/customTypesTable/createCustomType.ts +2 -2
- package/src/features/customTypes/customTypesTable/useCustomTypes.ts +7 -7
- package/src/features/labs/labsList/LabsList.tsx +3 -3
- package/src/features/labs/labsList/useLab.tsx +1 -1
- package/src/features/slices/actions/addSlicesToSliceZone.ts +1 -1
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +2 -2
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +5 -5
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +11 -11
- package/src/features/slicesTemplates/useSlicesTemplates.ts +1 -1
- package/src/hooks/useCurrentSlice.tsx +2 -2
- package/src/hooks/useElementSize.ts +1 -1
- package/src/hooks/useModelStatus.ts +13 -10
- package/src/hooks/useRouteChange.tsx +1 -1
- package/src/hooks/useSMTracker.ts +2 -2
- package/src/hooks/useSliceMachineConfig.ts +1 -1
- package/src/hooks/useThrottle.ts +10 -7
- package/src/hooks/useUnSyncChanges.ts +5 -5
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/modules/availableCustomTypes/index.ts +19 -19
- package/src/modules/environment/index.ts +6 -6
- package/src/modules/loading/index.ts +3 -3
- package/src/modules/modal/index.ts +2 -2
- package/src/modules/pushChangesSaga/index.ts +7 -7
- package/src/modules/pushChangesSaga/trackPushChangesSuccess.ts +3 -3
- package/src/modules/screenshots/actions.ts +2 -2
- package/src/modules/screenshots/sagas.ts +9 -9
- package/src/modules/selectedCustomType/actions.ts +10 -10
- package/src/modules/selectedCustomType/reducer.ts +26 -26
- package/src/modules/selectedCustomType/sagas.ts +5 -5
- package/src/modules/selectedCustomType/selectors.ts +4 -4
- package/src/modules/selectedCustomType/stateHelpers.ts +1 -1
- package/src/modules/selectedSlice/actions.ts +4 -4
- package/src/modules/selectedSlice/reducer.ts +7 -7
- package/src/modules/selectedSlice/sagas.ts +4 -4
- package/src/modules/selectedSlice/selectors.ts +5 -5
- package/src/modules/simulator/index.ts +20 -17
- package/src/modules/slices/index.ts +18 -18
- package/src/modules/toaster/index.tsx +3 -3
- package/src/modules/toaster/utils.tsx +1 -1
- package/src/modules/useSliceMachineActions.ts +43 -41
- package/src/modules/userContext/index.ts +9 -9
- package/src/redux/store.ts +2 -2
- package/src/theme.ts +1 -1
- package/src/utils/editor.ts +1 -1
- package/src/utils/fieldNameCreator.ts +2 -2
- package/test/__setup__.ts +18 -7
- package/test/__testutils__/createPrismicAuthLoginResponse.ts +1 -1
- package/test/__testutils__/createTestPlugin.ts +1 -1
- package/test/__testutils__/createTestProject.ts +3 -3
- package/test/__testutils__/index.tsx +1 -1
- package/test/__testutils__/mockAWSACLAPI.ts +9 -9
- package/test/__testutils__/mockCustomTypesAPI.ts +16 -16
- package/test/__testutils__/mockPrismicAuthAPI.ts +3 -3
- package/test/__testutils__/mockPrismicUserAPI.ts +4 -4
- package/test/__testutils__/readMSWFormData.ts +3 -3
- package/test/components/CreateCustomTypeModal.test.tsx +1 -1
- package/test/components/LoginModal.test.tsx +2 -2
- package/test/lib/builders/EditModal.test.tsx +5 -5
- package/test/lib/builders/buildersUtils.test.ts +13 -13
- package/test/lib/models/common/CustomType/sliceZone.test.ts +2 -2
- package/test/lib/models/common/ModelStatus.test.ts +1 -1
- package/test/lib/models/common/widgets/index.test.ts +6 -6
- package/test/lib/utils/shared/customTypes.test.ts +1 -1
- package/test/pages/custom-types.test.tsx +7 -7
- package/test/pages/simulator.test.tsx +5 -5
- package/test/pages/slices.test.tsx +4 -4
- package/test/src/hooks/useModelStatus.test.ts +2 -3
- package/test/src/modules/__fixtures__/sliceUtilsFactory.ts +2 -2
- package/test/src/modules/availableCustomTypes/index.test.ts +20 -18
- package/test/src/modules/environment.test.ts +2 -2
- package/test/src/modules/loading.test.ts +1 -1
- package/test/src/modules/modal.test.ts +1 -1
- package/test/src/modules/pushChangesSaga.test.ts +10 -10
- package/test/src/modules/screenshots/sagas.test.ts +5 -5
- package/test/src/modules/selectedCustomType/reducer.test.ts +25 -25
- package/test/src/modules/selectedCustomType/sagas.test.ts +3 -3
- package/test/src/modules/selectedSlice/__testutils__/getRefreshStateCreatorPayloadData.ts +1 -1
- package/test/src/modules/selectedSlice/reducer.test.ts +12 -12
- package/test/src/modules/selectedSlice/sagas.test.ts +6 -6
- package/test/src/modules/simulator.test.ts +10 -10
- package/test/src/modules/slices.test.ts +5 -5
- package/test/src/modules/toaster/utils.test.ts +3 -3
- package/test/src/normalizers/customType.test.ts +5 -5
- package/test/src/utils/fieldNameCreator.test.ts +1 -1
- package/out/_next/static/chunks/125-84464edfe25651eb.js +0 -19
- /package/out/_next/static/{4_g3bWryyxcdGzgi4MHr- → HGF5llOreY_Hv9IuGfW25}/_ssgManifest.js +0 -0
|
@@ -48,7 +48,7 @@ export const Button = forwardRef<HTMLButtonElement, SmButtonProps>(
|
|
|
48
48
|
variant = "primary",
|
|
49
49
|
...rest
|
|
50
50
|
},
|
|
51
|
-
ref
|
|
51
|
+
ref,
|
|
52
52
|
) => (
|
|
53
53
|
<ThemeUIButton
|
|
54
54
|
ref={ref}
|
|
@@ -89,5 +89,5 @@ export const Button = forwardRef<HTMLButtonElement, SmButtonProps>(
|
|
|
89
89
|
</>
|
|
90
90
|
)}
|
|
91
91
|
</ThemeUIButton>
|
|
92
|
-
)
|
|
92
|
+
),
|
|
93
93
|
);
|
|
@@ -17,7 +17,7 @@ export default function Changelog() {
|
|
|
17
17
|
changelog: getChangelog(store),
|
|
18
18
|
packageManager: getPackageManager(store),
|
|
19
19
|
isChangelogLoading: isLoading(store, LoadingKeysEnum.CHANGELOG),
|
|
20
|
-
})
|
|
20
|
+
}),
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
const latestVersion = changelog.sliceMachine.versions[0];
|
|
@@ -94,7 +94,7 @@ export const UpdateCommandBox: React.FC<UpdateCommandBoxProps> = ({
|
|
|
94
94
|
|
|
95
95
|
function getInstallCommand(
|
|
96
96
|
packageManager: PackageManager,
|
|
97
|
-
packagesSpecs: string[]
|
|
97
|
+
packagesSpecs: string[],
|
|
98
98
|
): string {
|
|
99
99
|
const packagesSpecsStr = packagesSpecs.join(" ");
|
|
100
100
|
|
|
@@ -33,7 +33,7 @@ export const ChangesItems: React.FC<ChangesItemsProps> = ({
|
|
|
33
33
|
const { sliceFilterFn, defaultVariationSelector } = modalPayload;
|
|
34
34
|
|
|
35
35
|
const screenshotChangesSlices = unSyncedSlices.filter(
|
|
36
|
-
(s) => modelsStatuses.slices[s.model.id] !== ModelStatus.Deleted
|
|
36
|
+
(s) => modelsStatuses.slices[s.model.id] !== ModelStatus.Deleted,
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
return (
|
|
@@ -71,7 +71,7 @@ export const ChangesItems: React.FC<ChangesItemsProps> = ({
|
|
|
71
71
|
(slice) =>
|
|
72
72
|
countMissingScreenshots(slice) > 0 &&
|
|
73
73
|
modelsStatuses.slices[slice.model.id] !==
|
|
74
|
-
ModelStatus.Deleted
|
|
74
|
+
ModelStatus.Deleted,
|
|
75
75
|
) && (
|
|
76
76
|
<Text
|
|
77
77
|
sx={{
|
|
@@ -21,7 +21,7 @@ export const HardDeleteDocumentsDrawer: React.FunctionComponent<{
|
|
|
21
21
|
useSelector((store: SliceMachineStoreType) => ({
|
|
22
22
|
isDeleteDocumentsDrawerOpen: isModalOpen(
|
|
23
23
|
store,
|
|
24
|
-
ModalKeysEnum.HARD_DELETE_DOCUMENTS_DRAWER
|
|
24
|
+
ModalKeysEnum.HARD_DELETE_DOCUMENTS_DRAWER,
|
|
25
25
|
),
|
|
26
26
|
remoteOnlyCustomTypes: selectAllCustomTypes(store).filter(isRemoteOnly),
|
|
27
27
|
modalData: store.pushChanges,
|
|
@@ -39,7 +39,7 @@ export const HardDeleteDocumentsDrawer: React.FunctionComponent<{
|
|
|
39
39
|
const associatedDocumentsCards = modalData.details.customTypes.map(
|
|
40
40
|
(customTypeDetail) => {
|
|
41
41
|
const customType = remoteOnlyCustomTypes.find(
|
|
42
|
-
(customType) => getModelId(customType) === customTypeDetail.id
|
|
42
|
+
(customType) => getModelId(customType) === customTypeDetail.id,
|
|
43
43
|
);
|
|
44
44
|
if (customType === undefined) return null;
|
|
45
45
|
|
|
@@ -52,7 +52,7 @@ export const HardDeleteDocumentsDrawer: React.FunctionComponent<{
|
|
|
52
52
|
numberOfDocuments={customTypeDetail.numberOfDocuments}
|
|
53
53
|
/>
|
|
54
54
|
);
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
56
|
);
|
|
57
57
|
|
|
58
58
|
return (
|
|
@@ -20,7 +20,7 @@ export const ReferencesErrorDrawer: React.FunctionComponent<{
|
|
|
20
20
|
isOpen: isModalOpen(store, ModalKeysEnum.REFERENCES_MISSING_DRAWER),
|
|
21
21
|
localCustomTypes: selectAllCustomTypes(store).filter(hasLocal),
|
|
22
22
|
modalData: store.pushChanges,
|
|
23
|
-
})
|
|
23
|
+
}),
|
|
24
24
|
);
|
|
25
25
|
const { closeModals, openToaster } = useSliceMachineActions();
|
|
26
26
|
|
|
@@ -36,7 +36,7 @@ export const ReferencesErrorDrawer: React.FunctionComponent<{
|
|
|
36
36
|
const associatedDocumentsCards = modalData.details.customTypes.map(
|
|
37
37
|
(customTypeDetail) => {
|
|
38
38
|
const customType = localCustomTypes.find(
|
|
39
|
-
(customType) => getModelId(customType) === customTypeDetail.id
|
|
39
|
+
(customType) => getModelId(customType) === customTypeDetail.id,
|
|
40
40
|
);
|
|
41
41
|
if (customType === undefined) return null;
|
|
42
42
|
|
|
@@ -47,7 +47,7 @@ export const ReferencesErrorDrawer: React.FunctionComponent<{
|
|
|
47
47
|
name={customType.local.label ?? customType.local.id}
|
|
48
48
|
/>
|
|
49
49
|
);
|
|
50
|
-
}
|
|
50
|
+
},
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
return (
|
|
@@ -50,7 +50,7 @@ export const SoftDeleteDocumentsDrawer: React.FunctionComponent<{
|
|
|
50
50
|
useSelector((store: SliceMachineStoreType) => ({
|
|
51
51
|
isDeleteDocumentsDrawerOpen: isModalOpen(
|
|
52
52
|
store,
|
|
53
|
-
ModalKeysEnum.SOFT_DELETE_DOCUMENTS_DRAWER
|
|
53
|
+
ModalKeysEnum.SOFT_DELETE_DOCUMENTS_DRAWER,
|
|
54
54
|
),
|
|
55
55
|
remoteOnlyCustomTypes: selectAllCustomTypes(store).filter(isRemoteOnly),
|
|
56
56
|
modalData: store.pushChanges,
|
|
@@ -68,7 +68,7 @@ export const SoftDeleteDocumentsDrawer: React.FunctionComponent<{
|
|
|
68
68
|
const associatedDocumentsCards = modalData.details.customTypes.map(
|
|
69
69
|
(customTypeDetail) => {
|
|
70
70
|
const customType = remoteOnlyCustomTypes.find(
|
|
71
|
-
(customType) => getModelId(customType) === customTypeDetail.id
|
|
71
|
+
(customType) => getModelId(customType) === customTypeDetail.id,
|
|
72
72
|
);
|
|
73
73
|
if (customType === undefined) return null;
|
|
74
74
|
|
|
@@ -81,7 +81,7 @@ export const SoftDeleteDocumentsDrawer: React.FunctionComponent<{
|
|
|
81
81
|
numberOfDocuments={customTypeDetail.numberOfDocuments}
|
|
82
82
|
/>
|
|
83
83
|
);
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
85
|
);
|
|
86
86
|
|
|
87
87
|
return (
|
|
@@ -24,7 +24,7 @@ export const DeleteSliceModal: React.FunctionComponent<
|
|
|
24
24
|
(store: SliceMachineStoreType) => ({
|
|
25
25
|
isSliceModalOpen: isModalOpen(store, ModalKeysEnum.DELETE_SLICE),
|
|
26
26
|
isDeletingSlice: isLoading(store, LoadingKeysEnum.DELETE_SLICE),
|
|
27
|
-
})
|
|
27
|
+
}),
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
const { closeModals, deleteSlice } = useSliceMachineActions();
|
|
@@ -27,7 +27,7 @@ const CheckboxControl = ({
|
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment
|
|
28
28
|
const [isChecked, setCheck] = useState(
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/strict-boolean-expressions
|
|
30
|
-
defaultValue || field.defaultValue || false
|
|
30
|
+
defaultValue || field.defaultValue || false,
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
useEffect(() => {
|
|
@@ -49,7 +49,7 @@ export const CreateCustomTypeModal: React.FC<CreateCustomTypeModalProps> = ({
|
|
|
49
49
|
customTypeLabels: selectAllCustomTypeLabels(store),
|
|
50
50
|
isCreateCustomTypeModalOpen: isModalOpen(
|
|
51
51
|
store,
|
|
52
|
-
ModalKeysEnum.CREATE_CUSTOM_TYPE
|
|
52
|
+
ModalKeysEnum.CREATE_CUSTOM_TYPE,
|
|
53
53
|
),
|
|
54
54
|
isCreatingCustomType: isLoading(store, LoadingKeysEnum.CREATE_CUSTOM_TYPE),
|
|
55
55
|
}));
|
|
@@ -77,8 +77,8 @@ export const CreateCustomTypeModal: React.FC<CreateCustomTypeModalProps> = ({
|
|
|
77
77
|
values: FormValues,
|
|
78
78
|
setValues: (
|
|
79
79
|
values: SetStateAction<FormValues>,
|
|
80
|
-
shouldValidate?: boolean
|
|
81
|
-
) => void
|
|
80
|
+
shouldValidate?: boolean,
|
|
81
|
+
) => void,
|
|
82
82
|
) => {
|
|
83
83
|
if (isIdFieldPristine) {
|
|
84
84
|
setValues({
|
|
@@ -96,8 +96,8 @@ export const CreateCustomTypeModal: React.FC<CreateCustomTypeModalProps> = ({
|
|
|
96
96
|
setFieldValue: (
|
|
97
97
|
field: string,
|
|
98
98
|
value: string,
|
|
99
|
-
shouldValidate?: boolean
|
|
100
|
-
) => Promise<unknown
|
|
99
|
+
shouldValidate?: boolean,
|
|
100
|
+
) => Promise<unknown>,
|
|
101
101
|
) => {
|
|
102
102
|
void setFieldValue("id", e.target.value);
|
|
103
103
|
setIsIdFieldPristine(false);
|
|
@@ -27,7 +27,7 @@ export const RenameSliceModal: React.FC<RenameSliceModalProps> = ({
|
|
|
27
27
|
isRenameSliceModalOpen: isModalOpen(store, ModalKeysEnum.RENAME_SLICE),
|
|
28
28
|
localLibs: getLibraries(store),
|
|
29
29
|
remoteLibs: getRemoteSlices(store),
|
|
30
|
-
})
|
|
30
|
+
}),
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
const handleOnSubmit = (values: SliceModalValues) => {
|
|
@@ -14,7 +14,7 @@ type SliceModalValuesValidity =
|
|
|
14
14
|
export function validateSliceModalValues(
|
|
15
15
|
{ sliceName }: SliceModalValues,
|
|
16
16
|
localLibs: ReadonlyArray<LibraryUI>,
|
|
17
|
-
remoteLibs: ReadonlyArray<SliceSM
|
|
17
|
+
remoteLibs: ReadonlyArray<SliceSM>,
|
|
18
18
|
): SliceModalValuesValidity {
|
|
19
19
|
if (!sliceName) {
|
|
20
20
|
return { sliceName: "Cannot be empty" };
|
|
@@ -37,7 +37,7 @@ export function validateSliceModalValues(
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const localNames = localLibs.flatMap((lib) =>
|
|
40
|
-
lib.components.map((slice) => slice.model.name)
|
|
40
|
+
lib.components.map((slice) => slice.model.name),
|
|
41
41
|
);
|
|
42
42
|
const remoteNames = remoteLibs.map((slice) => slice.name);
|
|
43
43
|
const usedNames = [...localNames, ...remoteNames];
|
package/components/Li/index.tsx
CHANGED
|
@@ -10,7 +10,7 @@ interface LiProps {
|
|
|
10
10
|
const Li = forwardRef(
|
|
11
11
|
(
|
|
12
12
|
{ children, Component = Flex, sx = {}, ...rest }: LiProps,
|
|
13
|
-
ref: React.ForwardedRef<HTMLDivElement
|
|
13
|
+
ref: React.ForwardedRef<HTMLDivElement>,
|
|
14
14
|
) => (
|
|
15
15
|
<Component
|
|
16
16
|
as="li"
|
|
@@ -26,7 +26,7 @@ const Li = forwardRef(
|
|
|
26
26
|
>
|
|
27
27
|
{children}
|
|
28
28
|
</Component>
|
|
29
|
-
)
|
|
29
|
+
),
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
export default Li;
|
|
@@ -25,7 +25,7 @@ interface ListItemProps<F extends TabField, S extends AnyObjectSchema> {
|
|
|
25
25
|
enterEditMode: (
|
|
26
26
|
itemInfo: [string, F],
|
|
27
27
|
modelFieldName: string | undefined,
|
|
28
|
-
index: number
|
|
28
|
+
index: number,
|
|
29
29
|
) => void;
|
|
30
30
|
modelFieldName?: string;
|
|
31
31
|
renderFieldAccessor?: (key: string) => string;
|
|
@@ -123,7 +123,7 @@ function ListItem<F extends TabField, S extends AnyObjectSchema>({
|
|
|
123
123
|
enterEditMode(
|
|
124
124
|
[key, item.value],
|
|
125
125
|
modelFieldName,
|
|
126
|
-
index
|
|
126
|
+
index,
|
|
127
127
|
)
|
|
128
128
|
}
|
|
129
129
|
/>
|
|
@@ -40,7 +40,7 @@ const LoginModal: React.FunctionComponent = () => {
|
|
|
40
40
|
isOpen: isModalOpen(store, ModalKeysEnum.LOGIN),
|
|
41
41
|
isLoginLoading: isLoading(store, LoadingKeysEnum.LOGIN),
|
|
42
42
|
env: getEnvironment(store),
|
|
43
|
-
})
|
|
43
|
+
}),
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
const { closeModals, startLoadingLogin, stopLoadingLogin, openToaster } =
|
|
@@ -66,7 +66,7 @@ const LoginModal: React.FunctionComponent = () => {
|
|
|
66
66
|
Boolean(status.shortId) &&
|
|
67
67
|
Boolean(status.intercomHash),
|
|
68
68
|
3000,
|
|
69
|
-
60
|
|
69
|
+
60,
|
|
70
70
|
);
|
|
71
71
|
|
|
72
72
|
openToaster("Logged in", ToasterType.SUCCESS);
|
|
@@ -24,12 +24,12 @@ type ModalCardProps<T extends FormikValues> = {
|
|
|
24
24
|
field: string,
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
26
|
value: any,
|
|
27
|
-
shouldValidate?: boolean | undefined
|
|
27
|
+
shouldValidate?: boolean | undefined,
|
|
28
28
|
) => Promise<void | FormikErrors<FormikValues>>;
|
|
29
29
|
values: T;
|
|
30
30
|
setValues: (
|
|
31
31
|
values: SetStateAction<T>,
|
|
32
|
-
shouldValidate?: boolean | undefined
|
|
32
|
+
shouldValidate?: boolean | undefined,
|
|
33
33
|
) => void;
|
|
34
34
|
}) => JSX.Element;
|
|
35
35
|
close: () => void;
|
|
@@ -59,7 +59,7 @@ export const VideoItem = forwardRef<HTMLLIElement, VideoItemProps>(
|
|
|
59
59
|
</SideNavListItem>
|
|
60
60
|
</MaybeVideoTooltipWrapper>
|
|
61
61
|
);
|
|
62
|
-
}
|
|
62
|
+
},
|
|
63
63
|
);
|
|
64
64
|
|
|
65
65
|
type MaybeVideoTooltipWrapperProps = VideoItemProps & {
|
|
@@ -131,7 +131,7 @@ const OldVideoItem: FC<OldVideoItemProps> = ({
|
|
|
131
131
|
}
|
|
132
132
|
ref.current = node;
|
|
133
133
|
},
|
|
134
|
-
[hasSeenTutorialsToolTip]
|
|
134
|
+
[hasSeenTutorialsToolTip],
|
|
135
135
|
);
|
|
136
136
|
|
|
137
137
|
return (
|
|
@@ -153,7 +153,7 @@ describe("Side Navigation", () => {
|
|
|
153
153
|
await user.click(link);
|
|
154
154
|
|
|
155
155
|
expect(mockRouter.asPath).toBe(path);
|
|
156
|
-
}
|
|
156
|
+
},
|
|
157
157
|
);
|
|
158
158
|
|
|
159
159
|
test("should display the number of changes on the 'Changes' item", async () => {
|
|
@@ -177,7 +177,7 @@ describe("Side Navigation", () => {
|
|
|
177
177
|
|
|
178
178
|
expect(within(changesItem).queryByText("1")).not.toBeInTheDocument();
|
|
179
179
|
expect(
|
|
180
|
-
within(changesItem).queryByText("Logged out")
|
|
180
|
+
within(changesItem).queryByText("Logged out"),
|
|
181
181
|
).not.toBeInTheDocument();
|
|
182
182
|
});
|
|
183
183
|
|
|
@@ -241,7 +241,7 @@ describe("Side Navigation", () => {
|
|
|
241
241
|
.closest("a") as HTMLAnchorElement;
|
|
242
242
|
|
|
243
243
|
expect(
|
|
244
|
-
within(changesItem).queryByText("Logged out")
|
|
244
|
+
within(changesItem).queryByText("Logged out"),
|
|
245
245
|
).not.toBeInTheDocument();
|
|
246
246
|
});
|
|
247
247
|
|
|
@@ -265,7 +265,7 @@ describe("Side Navigation", () => {
|
|
|
265
265
|
createSliceMachineManagerMSWHandler({
|
|
266
266
|
url: "http://localhost:3000/_manager",
|
|
267
267
|
sliceMachineManager: manager,
|
|
268
|
-
})
|
|
268
|
+
}),
|
|
269
269
|
);
|
|
270
270
|
|
|
271
271
|
renderSideNavigation({ canUpdate: true });
|
|
@@ -276,8 +276,8 @@ describe("Side Navigation", () => {
|
|
|
276
276
|
await waitFor(() =>
|
|
277
277
|
expect(link).toHaveAttribute(
|
|
278
278
|
"href",
|
|
279
|
-
"https://prismic.io/academy/prismic-and-nextjs"
|
|
280
|
-
)
|
|
279
|
+
"https://prismic.io/academy/prismic-and-nextjs",
|
|
280
|
+
),
|
|
281
281
|
);
|
|
282
282
|
|
|
283
283
|
expect(link).toHaveAttribute("target", "_blank");
|
|
@@ -290,7 +290,7 @@ describe("Side Navigation", () => {
|
|
|
290
290
|
?.parentElement as HTMLElement;
|
|
291
291
|
expect(link).toHaveAttribute(
|
|
292
292
|
"href",
|
|
293
|
-
"https://youtube.com/playlist?list=PLUVZjQltoA3wnaQudcqQ3qdZNZ6hyfyhH"
|
|
293
|
+
"https://youtube.com/playlist?list=PLUVZjQltoA3wnaQudcqQ3qdZNZ6hyfyhH",
|
|
294
294
|
);
|
|
295
295
|
expect(link).toHaveAttribute("target", "_blank");
|
|
296
296
|
|
|
@@ -299,7 +299,7 @@ describe("Side Navigation", () => {
|
|
|
299
299
|
const tooltip = await screen.findByRole("tooltip");
|
|
300
300
|
expect(tooltip).toBeVisible();
|
|
301
301
|
const closeButton = await within(tooltip).findByTestId(
|
|
302
|
-
"video-tooltip-close-button"
|
|
302
|
+
"video-tooltip-close-button",
|
|
303
303
|
);
|
|
304
304
|
await user.click(closeButton);
|
|
305
305
|
|
|
@@ -66,7 +66,7 @@ const Navigation: FC = () => {
|
|
|
66
66
|
})}
|
|
67
67
|
href={CUSTOM_TYPES_CONFIG["page"].tablePagePathname}
|
|
68
68
|
active={CUSTOM_TYPES_CONFIG["page"].matchesTablePagePathname(
|
|
69
|
-
router.asPath
|
|
69
|
+
router.asPath,
|
|
70
70
|
)}
|
|
71
71
|
component={Link}
|
|
72
72
|
Icon={CUSTOM_TYPES_CONFIG.page.Icon}
|
|
@@ -81,7 +81,7 @@ const Navigation: FC = () => {
|
|
|
81
81
|
})}
|
|
82
82
|
href={CUSTOM_TYPES_CONFIG["custom"].tablePagePathname}
|
|
83
83
|
active={CUSTOM_TYPES_CONFIG["custom"].matchesTablePagePathname(
|
|
84
|
-
router.asPath
|
|
84
|
+
router.asPath,
|
|
85
85
|
)}
|
|
86
86
|
component={Link}
|
|
87
87
|
Icon={CUSTOM_TYPES_CONFIG.custom.Icon}
|
|
@@ -37,7 +37,7 @@ export const ReviewForm: FC<ReviewFormProps> = (props) => {
|
|
|
37
37
|
(store: SliceMachineStoreType) => ({
|
|
38
38
|
isReviewLoading: isLoading(store, LoadingKeysEnum.REVIEW),
|
|
39
39
|
isLoginModalOpen: isModalOpen(store, ModalKeysEnum.LOGIN),
|
|
40
|
-
})
|
|
40
|
+
}),
|
|
41
41
|
);
|
|
42
42
|
const { skipReview, sendAReview, startLoadingReview, stopLoadingReview } =
|
|
43
43
|
useSliceMachineActions();
|
|
@@ -16,7 +16,7 @@ export const ReviewModal: FC = () => {
|
|
|
16
16
|
customTypes: selectAllCustomTypes(store),
|
|
17
17
|
libraries: getLibraries(store),
|
|
18
18
|
lastSyncChange: getLastSyncChange(store),
|
|
19
|
-
})
|
|
19
|
+
}),
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
const sliceCount =
|
|
@@ -33,13 +33,13 @@ export const ReviewModal: FC = () => {
|
|
|
33
33
|
(customType) =>
|
|
34
34
|
hasLocal(customType) &&
|
|
35
35
|
customType.local.tabs.some(
|
|
36
|
-
(tab) => tab.sliceZone && tab.sliceZone?.value.length > 0
|
|
37
|
-
)
|
|
36
|
+
(tab) => tab.sliceZone && tab.sliceZone?.value.length > 0,
|
|
37
|
+
),
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
const hasPushedAnHourAgo = Boolean(
|
|
41
41
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
42
|
-
lastSyncChange && Date.now() - lastSyncChange >= 3600000
|
|
42
|
+
lastSyncChange && Date.now() - lastSyncChange >= 3600000,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
const isAdvancedRepository =
|
|
@@ -96,9 +96,9 @@ const DropZone: React.FC<DropZoneProps> = ({
|
|
|
96
96
|
(state: SliceMachineStoreType) => ({
|
|
97
97
|
isLoadingScreenshot: isLoading(
|
|
98
98
|
state,
|
|
99
|
-
LoadingKeysEnum.GENERATE_SLICE_CUSTOM_SCREENSHOT
|
|
99
|
+
LoadingKeysEnum.GENERATE_SLICE_CUSTOM_SCREENSHOT,
|
|
100
100
|
),
|
|
101
|
-
})
|
|
101
|
+
}),
|
|
102
102
|
);
|
|
103
103
|
|
|
104
104
|
const { FileInputRenderer, fileInputProps } = useCustomScreenshot({
|
|
@@ -107,7 +107,7 @@ const DropZone: React.FC<DropZoneProps> = ({
|
|
|
107
107
|
variationID,
|
|
108
108
|
slice,
|
|
109
109
|
file,
|
|
110
|
-
isDragActive ? "dragAndDrop" : "upload"
|
|
110
|
+
isDragActive ? "dragAndDrop" : "upload",
|
|
111
111
|
);
|
|
112
112
|
setIsHover(false);
|
|
113
113
|
},
|
|
@@ -117,7 +117,7 @@ const DropZone: React.FC<DropZoneProps> = ({
|
|
|
117
117
|
if (file.size > 128000000) {
|
|
118
118
|
return openToaster(
|
|
119
119
|
"File is too big. Max file size: 128Mb.",
|
|
120
|
-
ToasterType.ERROR
|
|
120
|
+
ToasterType.ERROR,
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
generateSliceCustomScreenshot(variationID, slice, file, "dragAndDrop");
|
|
@@ -131,7 +131,7 @@ const DropZone: React.FC<DropZoneProps> = ({
|
|
|
131
131
|
const clipboardItems = await navigator.clipboard.read();
|
|
132
132
|
if (clipboardItems[0] !== undefined) {
|
|
133
133
|
const maybeType = clipboardItems[0].types.find((type) =>
|
|
134
|
-
imageTypes.map((t) => `image/${t}`).includes(type)
|
|
134
|
+
imageTypes.map((t) => `image/${t}`).includes(type),
|
|
135
135
|
);
|
|
136
136
|
if (maybeType !== undefined) {
|
|
137
137
|
const blob = await clipboardItems[0].getType(maybeType);
|
|
@@ -153,7 +153,7 @@ const DropZone: React.FC<DropZoneProps> = ({
|
|
|
153
153
|
}
|
|
154
154
|
return openToaster(
|
|
155
155
|
`Only files of type ${imageTypes.join(", ")} are accepted.`,
|
|
156
|
-
ToasterType.ERROR
|
|
156
|
+
ToasterType.ERROR,
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
159
|
};
|
|
@@ -157,7 +157,7 @@ const VariationsList = ({
|
|
|
157
157
|
|
|
158
158
|
const variationSetter = (
|
|
159
159
|
defaultVariationSelector: SliceVariationSelector | undefined,
|
|
160
|
-
slices: ComponentUI[]
|
|
160
|
+
slices: ComponentUI[],
|
|
161
161
|
) =>
|
|
162
162
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
163
163
|
defaultVariationSelector ||
|
|
@@ -182,7 +182,7 @@ const ScreenshotChangesModal = ({
|
|
|
182
182
|
}));
|
|
183
183
|
|
|
184
184
|
const [variationSelector, setVariationSelector] = useState(
|
|
185
|
-
variationSetter(defaultVariationSelector, slices)
|
|
185
|
+
variationSetter(defaultVariationSelector, slices),
|
|
186
186
|
);
|
|
187
187
|
|
|
188
188
|
useEffect(() => {
|
|
@@ -269,7 +269,7 @@ const ScreenshotChangesModal = ({
|
|
|
269
269
|
{supportsClipboardRead ? <FigmaTip /> : undefined}
|
|
270
270
|
{(() => {
|
|
271
271
|
const slice = slices.find(
|
|
272
|
-
(s) => s.model.id === variationSelector.sliceID
|
|
272
|
+
(s) => s.model.id === variationSelector.sliceID,
|
|
273
273
|
);
|
|
274
274
|
return slice ? (
|
|
275
275
|
<VariationDropZone
|
|
@@ -22,9 +22,9 @@ const ScreenshotPreviewModal: React.FunctionComponent<ScreenshotModalProps> = ({
|
|
|
22
22
|
(store: SliceMachineStoreType) => ({
|
|
23
23
|
isScreenshotModalOpen: isModalOpen(
|
|
24
24
|
store,
|
|
25
|
-
ModalKeysEnum.SCREENSHOT_PREVIEW
|
|
25
|
+
ModalKeysEnum.SCREENSHOT_PREVIEW,
|
|
26
26
|
),
|
|
27
|
-
})
|
|
27
|
+
}),
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
const { closeModals } = useSliceMachineActions();
|
|
@@ -16,7 +16,7 @@ import { VariationSM } from "@lib/models/common/Slice";
|
|
|
16
16
|
const redirect = (
|
|
17
17
|
model: ComponentUI,
|
|
18
18
|
variation: { id: string } | undefined,
|
|
19
|
-
isSimulator?: boolean
|
|
19
|
+
isSimulator?: boolean,
|
|
20
20
|
): void => {
|
|
21
21
|
if (!variation) {
|
|
22
22
|
void router.push(`/${model.href}/${model.model.name}`);
|
|
@@ -9,7 +9,7 @@ import { ScreenDimensions } from "@lib/models/common/Screenshots";
|
|
|
9
9
|
|
|
10
10
|
function useSimulatorClient(): readonly [
|
|
11
11
|
SimulatorClient | undefined,
|
|
12
|
-
RefCallback<HTMLIFrameElement
|
|
12
|
+
RefCallback<HTMLIFrameElement>,
|
|
13
13
|
] {
|
|
14
14
|
const [client, setClient] = useState<SimulatorClient | undefined>();
|
|
15
15
|
const clientRef = useRef<SimulatorClient>();
|
|
@@ -149,7 +149,7 @@ const IframeRenderer: React.FunctionComponent<IframeRendererProps> = ({
|
|
|
149
149
|
|
|
150
150
|
export function getScaling(
|
|
151
151
|
{ height: iframeHeight, width: iframeWidth }: ScreenDimensions,
|
|
152
|
-
{ height: viewportHeight, width: viewportWidth }: ScreenDimensions
|
|
152
|
+
{ height: viewportHeight, width: viewportWidth }: ScreenDimensions,
|
|
153
153
|
): number {
|
|
154
154
|
if (iframeWidth > viewportWidth || iframeHeight > viewportHeight) {
|
|
155
155
|
return iframeWidth - viewportWidth > iframeHeight - viewportHeight
|
|
@@ -83,7 +83,7 @@ const SetupModal: React.FC<{ isOpen: boolean }> = ({ isOpen }) => {
|
|
|
83
83
|
isSimulatorAvailableForFramework:
|
|
84
84
|
selectIsSimulatorAvailableForFramework(state),
|
|
85
85
|
setupSteps: selectSetupSteps(state),
|
|
86
|
-
})
|
|
86
|
+
}),
|
|
87
87
|
);
|
|
88
88
|
|
|
89
89
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
@@ -30,7 +30,7 @@ export const Toolbar: React.FC<ToolbarProps> = ({
|
|
|
30
30
|
actionsDisabled,
|
|
31
31
|
}) => {
|
|
32
32
|
const [selectedDropdown, setSelectedDropdown] = useState<string>(
|
|
33
|
-
ScreenSizeOptions.DESKTOP
|
|
33
|
+
ScreenSizeOptions.DESKTOP,
|
|
34
34
|
);
|
|
35
35
|
|
|
36
36
|
const dropDownChangeHandler = (selected: string) => {
|
|
@@ -45,7 +45,7 @@ export const Toolbar: React.FC<ToolbarProps> = ({
|
|
|
45
45
|
const screenSizeChangeHandler = (newScreenDimensions: ScreenDimensions) => {
|
|
46
46
|
const matchingIndex = Object.values(ScreenSizes).findIndex(
|
|
47
47
|
(dimension) =>
|
|
48
|
-
JSON.stringify(dimension) === JSON.stringify(newScreenDimensions)
|
|
48
|
+
JSON.stringify(dimension) === JSON.stringify(newScreenDimensions),
|
|
49
49
|
);
|
|
50
50
|
|
|
51
51
|
const newDropDownState =
|
|
@@ -77,7 +77,7 @@ const Simulator: ComponentWithSliceProps = ({ slice, variation }) => {
|
|
|
77
77
|
env: "prod",
|
|
78
78
|
unsplashUrl: endpoints.PrismicUnsplash,
|
|
79
79
|
}),
|
|
80
|
-
[endpoints.PrismicOembed, endpoints.PrismicUnsplash]
|
|
80
|
+
[endpoints.PrismicOembed, endpoints.PrismicUnsplash],
|
|
81
81
|
);
|
|
82
82
|
|
|
83
83
|
const setupIntervalId = useRef<NodeJS.Timeout | null>(null);
|
|
@@ -156,14 +156,14 @@ const Simulator: ComponentWithSliceProps = ({ slice, variation }) => {
|
|
|
156
156
|
};
|
|
157
157
|
|
|
158
158
|
const [screenDimensions, setScreenDimensions] = useState<ScreenDimensions>(
|
|
159
|
-
ScreenSizes[ScreenSizeOptions.DESKTOP]
|
|
159
|
+
ScreenSizes[ScreenSizeOptions.DESKTOP],
|
|
160
160
|
);
|
|
161
161
|
|
|
162
162
|
const sharedSlice = useMemo(() => Slices.fromSM(slice.model), [slice.model]);
|
|
163
163
|
|
|
164
164
|
// state used only to store updates coming from the editor
|
|
165
165
|
const [editorState, setEditorState] = useState<SharedSliceContent | null>(
|
|
166
|
-
null
|
|
166
|
+
null,
|
|
167
167
|
);
|
|
168
168
|
|
|
169
169
|
// computed state that takes the editorState if any change
|
|
@@ -190,7 +190,7 @@ const Simulator: ComponentWithSliceProps = ({ slice, variation }) => {
|
|
|
190
190
|
}
|
|
191
191
|
).id,
|
|
192
192
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
193
|
-
[]
|
|
193
|
+
[],
|
|
194
194
|
);
|
|
195
195
|
|
|
196
196
|
// When the content change, we re-render the content but overwrite the newly
|
|
@@ -202,7 +202,7 @@ const Simulator: ComponentWithSliceProps = ({ slice, variation }) => {
|
|
|
202
202
|
id: renderedSliceId,
|
|
203
203
|
}),
|
|
204
204
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
205
|
-
[sharedSlice, editorContent]
|
|
205
|
+
[sharedSlice, editorContent],
|
|
206
206
|
);
|
|
207
207
|
|
|
208
208
|
const apiContent = useThrottle(renderSliceMockCb, 800, [
|