slice-machine-ui 1.26.1-beta.10 → 1.26.1-beta.12
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/.eslintrc.js +6 -1
- package/.storybook/preview.tsx +2 -1
- package/out/404.html +1 -1
- package/out/_next/static/chunks/{183-ebd633fed7c74545.js → 183-6ad5c4eb28d4b155.js} +1 -1
- package/out/_next/static/chunks/207-f71df53ed0b0ac4d.js +1 -0
- package/out/_next/static/chunks/453-1a14e86de385fe7c.js +1 -0
- package/out/_next/static/chunks/614-af117b661cd3429a.js +1 -0
- package/out/_next/static/chunks/90-2d4bdae13d031364.js +1 -0
- package/out/_next/static/chunks/91-1c3665ce38e58792.js +1 -0
- package/out/_next/static/chunks/96-33e38032f1e55366.js +1 -0
- package/out/_next/static/chunks/pages/{_app-f7ec0d037993439e.js → _app-01bcd29a595cec3a.js} +2 -2
- package/out/_next/static/chunks/pages/changelog-ac1004bdd31d17f8.js +1 -0
- package/out/_next/static/chunks/pages/changes-5c4bd80747884a8c.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/[customTypeId]-8bcc4d88f470d3f7.js +1 -0
- package/out/_next/static/chunks/pages/{custom-types-3c8e721ec6802127.js → custom-types-75e8eddec659f440.js} +1 -1
- package/out/_next/static/chunks/pages/{index-cf93d16e9c63b6db.js → index-16754a04037cf9c1.js} +1 -1
- package/out/_next/static/chunks/pages/labs-d6f2feb6720ee64c.js +1 -0
- package/out/_next/static/chunks/pages/page-types/[pageTypeId]-8461ab4fcfaf0755.js +1 -0
- package/out/_next/static/chunks/pages/settings-7ad1540dc0af794d.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-9941e7eeb9d4d084.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-217d0b0469d4320e.js +1 -0
- package/out/_next/static/chunks/pages/slices-801310de228fd05e.js +1 -0
- package/out/_next/static/css/17da9daaa8986410.css +1 -0
- package/out/_next/static/css/{27f2b9b9c9f65885.css → 663a1bac4ce890da.css} +1 -1
- package/out/_next/static/css/70e3649c6ba13fdc.css +1 -0
- package/out/_next/static/css/c36992b18975f9b9.css +1 -0
- package/out/_next/static/css/{fa4e416634515cbb.css → df904982b9637c1a.css} +1 -1
- package/out/_next/static/svF8JPCb25QlsmymuzIiN/_buildManifest.js +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/settings.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +3 -3
- package/sentry.client.config.ts +2 -1
- package/src/ErrorBoundary.tsx +1 -1
- package/src/apiClient.ts +13 -9
- package/src/components/BaseHoverCard/BaseHoverCard.stories.tsx +1 -1
- package/src/components/BaseHoverCard/BaseHoverCard.test.tsx +1 -1
- package/src/components/BaseHoverCard/BaseHoverCard.tsx +1 -1
- package/src/components/BlankSlate/BlankSlate.stories.tsx +1 -1
- package/src/components/BlankSlate/index.ts +1 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +1 -1
- package/src/components/Card/Card.stories.tsx +3 -3
- package/src/components/Card/Card.tsx +3 -2
- package/src/components/CodeBlock/CodeBlock.tsx +6 -6
- package/src/components/ContentTabs/ContentTabs.tsx +1 -1
- package/src/components/Count/Count.tsx +1 -1
- package/src/components/Divider/Divider.stories.tsx +1 -1
- package/src/components/HoverCard/HoverCard.stories.tsx +3 -2
- package/src/components/HoverCard/HoverCard.test.tsx +2 -2
- package/src/components/HoverCard/HoverCard.tsx +2 -2
- package/src/components/HoverCard/index.ts +3 -3
- package/src/components/SideNav/SideNav.stories.tsx +6 -6
- package/src/components/SideNav/SideNav.tsx +6 -5
- package/src/components/SideNav/SideNavEnvironmentSelector.tsx +3 -3
- package/src/components/Table/Table.stories.tsx +2 -2
- package/src/components/Table/Table.test.tsx +2 -2
- package/src/components/Table/Table.tsx +2 -2
- package/src/components/Table/index.ts +1 -1
- package/src/components/TextLink/TextLink.stories.tsx +1 -1
- package/src/components/TextLink/TextLink.tsx +1 -1
- package/src/domain/__tests__/customType.test.ts +1 -2
- package/src/domain/__tests__/slice.test.ts +3 -3
- package/src/domain/customType.ts +1 -2
- package/src/domain/slice.ts +7 -4
- package/src/features/autoSave/AutoSaveStatusIndicator.tsx +2 -2
- package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +1 -1
- package/src/features/changelog/useSliceMachineReleaseNotes.ts +1 -1
- package/src/features/changelog/useSliceMachineVersions.ts +2 -2
- package/src/features/changes/BlankSlates/NoChangesBlankSlate.tsx +11 -14
- package/src/features/changes/PushChangesButton.tsx +5 -5
- package/src/features/changes/StatusBadge.tsx +2 -2
- package/src/features/customTypes/EditDropdown.tsx +6 -9
- package/src/features/customTypes/PageTypeOnboarding.tsx +5 -5
- package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +11 -12
- package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +11 -10
- package/src/features/customTypes/actions/convertCustomToPageType.ts +4 -4
- package/src/features/customTypes/actions/createCustomType.ts +5 -5
- package/src/features/customTypes/actions/deleteCustomType.ts +3 -3
- package/src/features/customTypes/actions/renameCustomType.ts +3 -3
- package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +8 -8
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +17 -12
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +7 -7
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +3 -3
- package/src/features/customTypes/customTypesBuilder/useCustomType.ts +1 -1
- package/src/features/customTypes/customTypesConfig.ts +2 -2
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +16 -16
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +9 -9
- package/src/features/customTypes/customTypesTable/useCustomTypes.ts +8 -8
- package/src/features/documentation/MarkdownRenderer/index.tsx +5 -6
- package/src/features/documentation/useDocumentation.ts +1 -1
- package/src/features/environments/actions/getActiveEnvironment.ts +1 -1
- package/src/features/environments/actions/getEnvironments.ts +1 -1
- package/src/features/environments/actions/setEnvironment.ts +3 -3
- package/src/features/inAppGuide/InAppGuideContext.tsx +2 -2
- package/src/features/inAppGuide/InAppGuideDialog.tsx +4 -4
- package/src/features/inAppGuide/inAppGuideContent.tsx +2 -2
- package/src/features/labs/labsList/LabsList.tsx +2 -2
- package/src/features/labs/labsList/LabsListItem.tsx +1 -1
- package/src/features/labs/labsList/LabsPage.tsx +5 -5
- package/src/features/labs/labsList/useLab.tsx +1 -1
- package/src/features/settings/SettingsPage.tsx +4 -4
- package/src/features/settings/git/ConnectGitRepository.tsx +9 -9
- package/src/features/settings/git/GitOwnerSelect.tsx +1 -1
- package/src/features/settings/git/GitProvider.ts +4 -4
- package/src/features/settings/git/GitProviderConnectButtons.tsx +1 -1
- package/src/features/settings/git/GitRepositoriesList.tsx +5 -5
- package/src/features/settings/git/GitRepositoriesSearch.tsx +5 -5
- package/src/features/settings/git/GitRepositoryConnectDialog.tsx +3 -3
- package/src/features/settings/git/useGitIntegrationExperiment.ts +1 -1
- package/src/features/settings/git/useGitOwners.ts +1 -1
- package/src/features/settings/git/useGitRepos.ts +1 -1
- package/src/features/settings/git/useLinkedGitRepos.ts +2 -2
- package/src/features/settings/git/useWriteAPIToken.ts +2 -2
- package/src/features/slices/actions/addSlicesToSliceZone.ts +2 -2
- package/src/features/slices/actions/createSlice.ts +5 -5
- package/src/features/slices/actions/deleteSlice.ts +1 -1
- package/src/features/slices/actions/renameSlice.ts +4 -4
- package/src/features/slices/actions/uploadSliceScreenshot.ts +2 -2
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +9 -9
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +6 -6
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +12 -12
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +3 -3
- package/src/features/slices/convertLegacySlice/types.ts +2 -2
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +6 -6
- package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +9 -9
- package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +4 -4
- package/src/features/slices/sliceBuilder/actions/renameVariation.ts +3 -3
- package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +1 -1
- package/src/features/slices/sliceCards/NonSharedSliceCard.tsx +4 -4
- package/src/features/slices/sliceCards/SharedSliceCard.tsx +7 -7
- package/src/features/slicesTemplates/actions/createSlicesTemplates.ts +2 -2
- package/src/features/slicesTemplates/useSlicesTemplates.ts +2 -1
- package/src/features/sync/AutoSyncProvider.tsx +17 -17
- package/src/features/sync/actions/pushChanges.ts +4 -3
- package/src/features/sync/actions/trackPushChangesSuccess.ts +3 -3
- package/src/features/sync/components/AutoSyncStatusIndicator.tsx +4 -4
- package/src/features/sync/fetchUnSyncChanges.ts +5 -5
- package/src/features/sync/getUnSyncChanges.ts +9 -9
- package/src/features/sync/useUnSyncChanges.ts +5 -5
- package/src/hooks/useActionQueue.tsx +5 -5
- package/src/hooks/useAdapterName.ts +1 -1
- package/src/hooks/useAuthStatus.ts +2 -2
- package/src/hooks/useCurrentSlice.tsx +4 -4
- package/src/hooks/useEditorContent.ts +5 -4
- package/src/hooks/useExperimentVariant.ts +2 -2
- package/src/hooks/useIsEmptyProject.ts +1 -1
- package/src/hooks/useRepositoryInformation.ts +2 -2
- package/src/hooks/useRouteChange.tsx +1 -1
- package/src/hooks/useSMTracker.ts +6 -6
- package/src/hooks/useScreenshotChangesModal.ts +4 -3
- package/src/hooks/useServerState.ts +4 -4
- package/src/hooks/useSliceMachineConfig.ts +2 -2
- package/src/hooks/useSliceMachineRunningVersion.ts +1 -1
- package/src/hooks/useThrottle.ts +1 -1
- package/src/hooks/useUpdateAvailable.ts +1 -1
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/hooks/useWindowSize.ts +2 -1
- package/{components → src/legacy/components}/App/index.tsx +8 -8
- package/{components → src/legacy/components}/AppLayout/index.tsx +5 -6
- package/{components → src/legacy/components}/AuthInstructions/index.jsx +1 -1
- package/{components → src/legacy/components}/Button/index.tsx +1 -2
- package/{components → src/legacy/components}/Card/Default.jsx +2 -1
- package/{components → src/legacy/components}/Card/Preview.jsx +1 -1
- package/{components → src/legacy/components}/Card/WithTabs/index.jsx +4 -3
- package/{components → src/legacy/components}/Card/index.tsx +1 -0
- package/{components → src/legacy/components}/Changelog/index.tsx +8 -8
- package/{components → src/legacy/components}/Changelog/navigation/VersionBadge.tsx +2 -1
- package/{components → src/legacy/components}/Changelog/navigation/VersionTag.tsx +1 -0
- package/{components → src/legacy/components}/Changelog/navigation/index.tsx +6 -6
- package/{components → src/legacy/components}/Changelog/versionDetails/UpdateCommandBox.tsx +6 -6
- package/{components → src/legacy/components}/Changelog/versionDetails/VersionKindLabel.tsx +3 -4
- package/{components → src/legacy/components}/Changelog/versionDetails/index.tsx +5 -5
- package/{components → src/legacy/components}/ChangesEmptyState/AuthErrorPage.tsx +3 -3
- package/{components → src/legacy/components}/ChangesItems/ChangesItems.tsx +14 -14
- package/{components → src/legacy/components}/ChangesItems/DevCollaborationExperiment.tsx +3 -3
- package/{components → src/legacy/components}/CodeBlock/index.tsx +3 -3
- package/{components → src/legacy/components}/ConfigErrors/index.jsx +4 -3
- package/{components → src/legacy/components}/CustomTypeTable/changesPage.tsx +9 -8
- package/{components → src/legacy/components}/DeleteCTModal/index.tsx +9 -9
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +4 -4
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +9 -9
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +9 -8
- package/{components → src/legacy/components}/DeleteSliceModal/index.tsx +6 -6
- package/{components → src/legacy/components}/DeleteVariationModal/index.tsx +6 -6
- package/{components → src/legacy/components}/DropDownSelector/index.tsx +2 -4
- package/{components → src/legacy/components}/EmptyState/index.tsx +3 -3
- package/{components → src/legacy/components}/FormFields/Array.jsx +2 -4
- package/{components → src/legacy/components}/FormFields/Checkbox.jsx +1 -1
- package/{components → src/legacy/components}/FormFields/CheckboxControl.jsx +1 -1
- package/{components → src/legacy/components}/FormFields/Input.tsx +3 -2
- package/{components → src/legacy/components}/FormFields/SelectDefaultValue.jsx +1 -1
- package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +18 -18
- package/{components → src/legacy/components}/Forms/CreateSliceModal/CreateSliceModal.tsx +10 -10
- package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +12 -12
- package/{components → src/legacy/components}/Forms/RenameSliceModal/RenameSliceModal.tsx +8 -8
- package/src/legacy/components/Forms/RenameVariationModal/RenameVariationModal.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.tsx +6 -6
- package/{components → src/legacy/components}/Forms/components/InputBox.tsx +2 -2
- package/{components → src/legacy/components}/Forms/components/SelectRepeatable.tsx +4 -3
- package/{components → src/legacy/components}/Forms/formsValidator.ts +6 -4
- package/{components → src/legacy/components}/FullPage/index.tsx +1 -1
- package/{components → src/legacy/components}/ListItem/Header.tsx +3 -2
- package/{components → src/legacy/components}/ListItem/index.tsx +8 -10
- package/{components → src/legacy/components}/LoadingPage/index.tsx +1 -0
- package/{components → src/legacy/components}/LoginModal/index.tsx +22 -22
- package/{components → src/legacy/components}/ModalFormCard/index.tsx +7 -6
- package/{components → src/legacy/components}/Navigation/ChangesItem.tsx +12 -12
- package/{components → src/legacy/components}/Navigation/Environment.tsx +13 -13
- package/{components → src/legacy/components}/Navigation/RunningVersion.tsx +2 -2
- package/{components → src/legacy/components}/Navigation/UpdateBox.tsx +3 -3
- package/src/legacy/components/Navigation/VideoItem.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Navigation/VideoItem.tsx +14 -13
- package/src/legacy/components/Navigation/index.module.css.d.ts +5 -0
- package/{components → src/legacy/components}/Navigation/index.test.tsx +12 -12
- package/{components → src/legacy/components}/Navigation/index.tsx +20 -21
- package/{components → src/legacy/components}/ReviewModal/ReviewForm.tsx +12 -12
- package/{components → src/legacy/components}/ReviewModal/ReviewModal.tsx +6 -6
- package/{components → src/legacy/components}/ScreenshotChangesModal/VariationDropZone.tsx +7 -7
- package/{components → src/legacy/components}/ScreenshotChangesModal/index.tsx +12 -15
- package/{components → src/legacy/components}/ScreenshotChangesModal/useCustomScreenshot.tsx +1 -1
- package/{components → src/legacy/components}/ScreenshotPreviewModal/index.tsx +8 -7
- package/{components → src/legacy/components}/Simulator/components/FailedConnect/index.tsx +3 -3
- package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/MenuList.tsx +2 -1
- package/{components → src/legacy/components}/Simulator/components/Header/VariationsPopover/index.tsx +4 -5
- package/{components → src/legacy/components}/Simulator/components/Header/index.tsx +7 -7
- package/{components → src/legacy/components}/Simulator/components/IframeRenderer/index.tsx +3 -4
- package/{components → src/legacy/components}/Simulator/components/Toolbar/ScreensizeInput/index.tsx +2 -1
- package/{components → src/legacy/components}/Simulator/components/Toolbar/index.tsx +4 -5
- package/{components → src/legacy/components}/Simulator/index.tsx +20 -26
- package/{components → src/legacy/components}/SliceMachineDrawer/index.tsx +3 -2
- package/{components → src/legacy/components}/ToasterContainer/index.tsx +3 -5
- package/{components → src/legacy/components}/Tooltip/TextWithTooltip.tsx +2 -2
- package/{components → src/legacy/components}/Tooltip/index.jsx +2 -2
- package/{components → src/legacy/components}/Warnings/index.jsx +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +4 -4
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/List.tsx +8 -8
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +11 -11
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +3 -3
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +4 -3
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/index.tsx +26 -23
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/SliceZone/sliceTemplatesComingSoon.ts +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/InputBox.tsx +1 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/create.tsx +2 -1
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/delete.tsx +2 -2
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabModal/update.tsx +3 -2
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/TabZone/index.tsx +29 -26
- package/{lib → src/legacy/lib}/builders/CustomTypeBuilder/index.tsx +5 -5
- package/{lib → src/legacy/lib}/builders/SliceBuilder/FieldZones/index.tsx +20 -20
- package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/AddVariationModal.tsx +7 -7
- package/{lib → src/legacy/lib}/builders/SliceBuilder/Sidebar/index.tsx +12 -12
- package/{lib → src/legacy/lib}/builders/SliceBuilder/SimulatorButton/index.tsx +12 -11
- package/{lib → src/legacy/lib}/builders/SliceBuilder/index.tsx +9 -9
- package/{lib → src/legacy/lib}/builders/common/EditModal/Field.jsx +3 -5
- package/{lib → src/legacy/lib}/builders/common/EditModal/Form.jsx +1 -1
- package/{lib → src/legacy/lib}/builders/common/EditModal/index.jsx +14 -16
- package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/index.jsx +3 -4
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/ErrorTooltip.tsx +2 -2
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +4 -5
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/Hints/index.tsx +2 -1
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/NewField.tsx +16 -13
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/index.jsx +3 -3
- package/{lib → src/legacy/lib}/builders/common/Zone/components/EmptyState/index.tsx +1 -1
- package/{lib → src/legacy/lib}/builders/common/Zone/index.jsx +3 -3
- package/{lib → src/legacy/lib}/builders/utils/index.ts +1 -1
- package/{lib → src/legacy/lib}/forms/fields.ts +1 -2
- package/{lib → src/legacy/lib}/forms/index.ts +1 -0
- package/{lib → src/legacy/lib}/models/common/CustomType/index.ts +5 -4
- package/{lib → src/legacy/lib}/models/common/CustomType/sliceZone.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/DeprecatedMockConfigMessage.tsx +3 -2
- package/{lib → src/legacy/lib}/models/common/Environment.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/Group.ts +3 -2
- package/{lib → src/legacy/lib}/models/common/Library.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/LibraryUI.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/ModelData.ts +3 -3
- package/{lib → src/legacy/lib}/models/common/ModelStatus/compareCustomTypeModels.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/ModelStatus/compareSliceModels.ts +2 -1
- package/{lib → src/legacy/lib}/models/common/ModelStatus/index.ts +10 -9
- package/{lib → src/legacy/lib}/models/common/normalizers/customType.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/normalizers/slices.ts +3 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Boolean/index.ts +5 -7
- package/{lib → src/legacy/lib}/models/common/widgets/Color/index.ts +2 -3
- package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/Form.tsx +9 -10
- package/{lib → src/legacy/lib}/models/common/widgets/ContentRelationship/index.ts +7 -7
- package/{lib → src/legacy/lib}/models/common/widgets/GeoPoint/index.ts +2 -3
- package/{lib → src/legacy/lib}/models/common/widgets/Group/Form.jsx +6 -6
- package/{lib → src/legacy/lib}/models/common/widgets/Group/ListItem/index.jsx +18 -24
- package/{lib → src/legacy/lib}/models/common/widgets/Group/index.ts +5 -3
- package/{lib → src/legacy/lib}/models/common/widgets/Image/Form.tsx +9 -11
- package/{lib → src/legacy/lib}/models/common/widgets/Image/components.tsx +6 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Image/index.ts +3 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Link/Form.jsx +5 -7
- package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/Form.jsx +4 -6
- package/{lib → src/legacy/lib}/models/common/widgets/LinkToMedia/index.ts +4 -4
- package/{lib → src/legacy/lib}/models/common/widgets/Select/FormFields.jsx +7 -7
- package/{lib → src/legacy/lib}/models/common/widgets/Select/index.ts +3 -6
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/Form.tsx +12 -11
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/index.ts +3 -6
- package/{lib → src/legacy/lib}/models/common/widgets/StructuredText/options.tsx +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Timestamp/index.ts +4 -5
- package/{lib → src/legacy/lib}/models/common/widgets/UID/index.ts +4 -5
- package/{lib → src/legacy/lib}/models/common/widgets/Widget.ts +3 -1
- package/{lib → src/legacy/lib}/models/common/widgets/withGroup.ts +1 -2
- package/{lib → src/legacy/lib}/models/server/ServerState.ts +4 -3
- package/{lib → src/legacy/lib}/utils/index.ts +4 -5
- package/{lib → src/legacy/lib}/utils/shared/customTypes.ts +1 -1
- package/src/modules/availableCustomTypes/index.ts +15 -13
- package/src/modules/availableCustomTypes/types.ts +2 -2
- package/src/modules/environment/index.ts +10 -8
- package/src/modules/environment/types.ts +1 -1
- package/src/modules/loading/index.ts +3 -2
- package/src/modules/modal/index.ts +4 -2
- package/src/modules/slices/index.ts +13 -9
- package/src/modules/slices/selector.ts +1 -1
- package/src/modules/slices/types.ts +2 -2
- package/src/modules/useSliceMachineActions.ts +25 -20
- package/src/modules/userContext/index.ts +5 -3
- package/{pages → src/pages}/_app.tsx +23 -25
- package/{pages → src/pages}/changelog.tsx +1 -1
- package/{pages → src/pages}/changes.tsx +22 -19
- package/src/pages/custom-types/[customTypeId].tsx +1 -0
- package/{pages → src/pages}/custom-types.tsx +1 -1
- package/{pages → src/pages}/index.tsx +3 -3
- package/src/pages/labs.tsx +1 -0
- package/src/pages/page-types/[pageTypeId].tsx +1 -0
- package/src/pages/settings.tsx +1 -0
- package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/index.tsx +3 -3
- package/{pages → src/pages}/slices/[lib]/[sliceName]/[variation]/simulator.tsx +2 -2
- package/{pages → src/pages}/slices.tsx +21 -21
- package/src/redux/reducer.ts +8 -7
- package/src/redux/store.ts +8 -6
- package/src/redux/type.ts +7 -6
- package/src/theme.ts +1 -2
- package/test/__setup__.ts +10 -8
- package/test/__testutils__/createTestPlugin.ts +3 -2
- package/test/__testutils__/createTestProject.ts +5 -4
- package/test/__testutils__/index.tsx +6 -5
- package/test/__testutils__/mockAWSACLAPI.ts +1 -1
- package/test/__testutils__/mockCustomTypesAPI.ts +1 -1
- package/test/__testutils__/mockPrismicAuthAPI.ts +1 -1
- package/test/__testutils__/mockPrismicUserAPI.ts +2 -3
- package/test/__testutils__/readMSWFormData.ts +1 -1
- package/test/components/IframeRenderer.test.ts +3 -2
- package/test/lib/builders/EditModal.test.tsx +5 -3
- package/test/lib/builders/buildersUtils.test.ts +3 -3
- package/test/lib/consts.test.ts +6 -2
- package/test/lib/models/common/CustomType.test.ts +6 -2
- package/test/lib/models/common/ModelStatus.test.ts +6 -4
- package/test/lib/models/common/Slice.test.ts +3 -2
- package/test/lib/models/common/widgets/index.test.ts +8 -4
- package/test/lib/utils/index.test.ts +3 -2
- package/test/lib/utils/preferWroomBase.test.ts +3 -2
- package/test/lib/utils/shared/customTypes.test.ts +2 -1
- package/test/pages/slices.test.tsx +10 -10
- package/test/src/modules/__fixtures__/serverState.ts +1 -1
- package/test/src/modules/__fixtures__/sliceUtilsFactory.ts +3 -3
- package/test/src/modules/availableCustomTypes/index.test.ts +3 -3
- package/test/src/modules/environment.test.ts +3 -5
- package/test/src/modules/loading.test.ts +3 -3
- package/test/src/modules/modal.test.ts +5 -5
- package/test/src/modules/slices.test.ts +3 -2
- package/test/src/modules/userContext.test.ts +3 -3
- package/test/src/normalizers/customType.test.ts +16 -3
- package/test/src/utils/fieldNameCreator.test.ts +1 -1
- package/tsconfig.json +1 -6
- package/vite.config.ts +5 -10
- package/out/_next/static/chunks/25-792af14760d9df34.js +0 -1
- package/out/_next/static/chunks/286-e0950c3083c672e8.js +0 -1
- package/out/_next/static/chunks/318-77a29f41c3a027e3.js +0 -1
- package/out/_next/static/chunks/382-aacd61be9adba45a.js +0 -1
- package/out/_next/static/chunks/727-d0d6a29f0793bde2.js +0 -1
- package/out/_next/static/chunks/799-7b910b896ff60ebe.js +0 -1
- package/out/_next/static/chunks/pages/changelog-055db8139a22a592.js +0 -1
- package/out/_next/static/chunks/pages/changes-f43ad4ab5e00f9b9.js +0 -1
- package/out/_next/static/chunks/pages/custom-types/[customTypeId]-89ccb93ce7409ad0.js +0 -1
- package/out/_next/static/chunks/pages/labs-73a12d2fe0233fb9.js +0 -1
- package/out/_next/static/chunks/pages/page-types/[pageTypeId]-dbf86fe3a94dc892.js +0 -1
- package/out/_next/static/chunks/pages/settings-417f1d5c1e558c88.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-01d67e97cb901e46.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-a8933b0ef10806cd.js +0 -1
- package/out/_next/static/chunks/pages/slices-3c9b08adf578b020.js +0 -1
- package/out/_next/static/css/0e0d6c4ec6bf7373.css +0 -1
- package/out/_next/static/css/be1f49e49a5aa7eb.css +0 -1
- package/out/_next/static/css/f8eb526e10bc2441.css +0 -1
- package/out/_next/static/w56F6n1XbyP8jyJHeri22/_buildManifest.js +0 -1
- package/pages/custom-types/[customTypeId].tsx +0 -1
- package/pages/labs.tsx +0 -1
- package/pages/page-types/[pageTypeId].tsx +0 -1
- package/pages/settings.tsx +0 -1
- package/out/_next/static/{w56F6n1XbyP8jyJHeri22 → svF8JPCb25QlsmymuzIiN}/_ssgManifest.js +0 -0
- package/{components → src/legacy/components}/Card/CardBox.tsx +0 -0
- package/{components → src/legacy/components}/Card/WithTabs/components.jsx +1 -1
- package/{components → src/legacy/components}/Changelog/versionDetails/ReleaseNotesDetails.tsx +1 -1
- package/{components → src/legacy/components}/ChangesEmptyState/OfflinePage.tsx +1 -1
- package/{components → src/legacy/components}/ChangesEmptyState/index.ts +1 -1
- package/{components → src/legacy/components}/ChangesItems/ErrorBanner.tsx +1 -1
- package/{components → src/legacy/components}/ChangesItems/index.ts +0 -0
- package/{components → src/legacy/components}/ChangesSectionHeader/ChangesSectionHeader.tsx +0 -0
- package/{components → src/legacy/components}/ChangesSectionHeader/index.ts +0 -0
- package/{components → src/legacy/components}/DeleteDocumentsDrawer/index.tsx +1 -1
- package/{components → src/legacy/components}/DropDownSelector/MenuList.tsx +0 -0
- package/{components → src/legacy/components}/Flex/index.tsx +0 -0
- package/{components → src/legacy/components}/FormFields/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/CreateCustomTypeModal/index.tsx +0 -0
- package/{components → src/legacy/components}/Forms/CreateSliceModal/index.tsx +0 -0
- package/{components → src/legacy/components}/Forms/RenameCustomTypeModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/RenameSliceModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/RenameVariationModal/RenameVariationModal.module.css +0 -0
- package/{components → src/legacy/components}/Forms/RenameVariationModal/index.ts +0 -0
- package/{components → src/legacy/components}/Forms/components/FlexCard.tsx +0 -0
- package/{components → src/legacy/components}/Forms/formsTypes.ts +0 -0
- package/{components → src/legacy/components}/Grid/index.tsx +0 -0
- package/{components → src/legacy/components}/InputDeleteIcon/index.jsx +1 -1
- package/{components → src/legacy/components}/ItemHeader/index.tsx +1 -1
- package/{components → src/legacy/components}/Li/index.tsx +0 -0
- package/{components → src/legacy/components}/ListItem/utils.js +0 -0
- package/{components → src/legacy/components}/MissingLibraries/index.tsx +0 -0
- package/{components → src/legacy/components}/Navigation/VideoItem.module.css +0 -0
- package/{components → src/legacy/components}/Navigation/index.module.css +0 -0
- package/{components → src/legacy/components}/ReactTooltipPortal/index.tsx +0 -0
- package/{components → src/legacy/components}/ReviewModal/ReviewFormSelect.tsx +1 -1
- package/{components → src/legacy/components}/ReviewModal/index.ts +0 -0
- package/{components → src/legacy/components}/ScreenshotPreview/index.tsx +1 -1
- package/{components → src/legacy/components}/Simulator/components/FullPage/index.tsx +0 -0
- package/{components → src/legacy/components}/Simulator/components/Header/links.ts +0 -0
- package/{components → src/legacy/components}/SliceMachineIconButton/index.tsx +1 -1
- package/{components → src/legacy/components}/SliceMachineModal/index.tsx +1 -1
- package/{components → src/legacy/components}/WindowPortal/index.js +0 -0
- package/{components → src/legacy/components}/YoutubeEmbed/index.tsx +0 -0
- package/{lib → src/legacy/lib}/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +0 -0
- package/{lib → src/legacy/lib}/builders/common/Zone/Card/components/EditItem.jsx +0 -0
- package/{lib → src/legacy/lib}/consts.ts +0 -0
- package/{lib → src/legacy/lib}/env/sentry.ts +0 -0
- package/{lib → src/legacy/lib}/forms/defaults.ts +1 -1
- package/{lib → src/legacy/lib}/forms/types.ts +0 -0
- package/{lib → src/legacy/lib}/hljs/svelte.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Auth.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/ComponentUI.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/CustomType/tab.ts +4 -4
- package/{lib → src/legacy/lib}/models/common/ErrorWithStatus.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Fields.ts +1 -1
- package/{lib → src/legacy/lib}/models/common/Manifest.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/PrismicData.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/PrismicFile.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Screenshots.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Simulator.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Slice.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/Slices.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/UserProfile.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/Warning.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/widgets/Date/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Embed/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Link/index.ts +3 -3
- package/{lib → src/legacy/lib}/models/common/widgets/Number/index.ts +2 -2
- package/{lib → src/legacy/lib}/models/common/widgets/Text/index.ts +5 -5
- package/{lib → src/legacy/lib}/models/common/widgets/ctBuilderArray.ts +0 -0
- package/{lib → src/legacy/lib}/models/common/widgets/index.ts +1 -1
- /package/{lib → src/legacy/lib}/models/common/widgets/sliceBuilderArray.ts +0 -0
- /package/{lib → src/legacy/lib}/prismic/endpoints.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/poll.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/preferWroomBase.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/repo.ts +0 -0
- /package/{lib → src/legacy/lib}/utils/str.ts +0 -0
- /package/{pages → src/pages}/api/embed.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Table,
|
|
1
|
+
export { Table, TableBody, TableCell, TableHead, TableRow } from "./Table";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Text } from "@prismicio/editor-ui";
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
|
-
import { type FC, type ReactNode
|
|
3
|
+
import { cloneElement, type FC, isValidElement, type ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
import styles from "./TextLink.module.css";
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { it, describe, expect } from "vitest";
|
|
2
1
|
import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ComponentUI } from "@/legacy/lib/models/common/ComponentUI";
|
|
5
|
+
import { Slices } from "@/legacy/lib/models/common/Slice";
|
|
6
6
|
|
|
7
7
|
import { deleteRepeatableZone } from "../slice";
|
|
8
8
|
|
package/src/domain/customType.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { removeKey } from "@prismicio/editor-support/Object";
|
|
1
2
|
import {
|
|
2
3
|
CustomType,
|
|
3
4
|
DynamicSection,
|
|
@@ -9,8 +10,6 @@ import {
|
|
|
9
10
|
SlicesFieldType,
|
|
10
11
|
UID,
|
|
11
12
|
} from "@prismicio/types-internal/lib/customtypes";
|
|
12
|
-
import { removeKey } from "@prismicio/editor-support/Object";
|
|
13
|
-
|
|
14
13
|
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
15
14
|
|
|
16
15
|
type DeleteSliceZoneSliceArgs = {
|
package/src/domain/slice.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { NestableWidget } from "@prismicio/types-internal/lib/customtypes";
|
|
1
2
|
import type {
|
|
2
3
|
CompositeSlice,
|
|
3
4
|
LegacySlice,
|
|
4
5
|
SharedSlice,
|
|
5
6
|
} from "@prismicio/types-internal/lib/customtypes/widgets/slices";
|
|
6
|
-
import { NestableWidget } from "@prismicio/types-internal/lib/customtypes";
|
|
7
7
|
|
|
8
|
-
import type { ComponentUI } from "
|
|
9
|
-
import type {
|
|
10
|
-
|
|
8
|
+
import type { ComponentUI } from "@/legacy/lib/models/common/ComponentUI";
|
|
9
|
+
import type {
|
|
10
|
+
VariationSM,
|
|
11
|
+
WidgetsArea,
|
|
12
|
+
} from "@/legacy/lib/models/common/Slice";
|
|
13
|
+
import { pascalize, snakelize } from "@/legacy/lib/utils/str";
|
|
11
14
|
|
|
12
15
|
type CopySliceVariationArgs = {
|
|
13
16
|
copiedVariation: VariationSM;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
1
|
import { Box, Icon, ProgressCircle, Text } from "@prismicio/editor-ui";
|
|
2
|
+
import { FC } from "react";
|
|
3
3
|
|
|
4
|
-
import { ActionQueueStatus } from "
|
|
4
|
+
import { ActionQueueStatus } from "@/hooks/useActionQueue";
|
|
5
5
|
|
|
6
6
|
type AutoSaveStatusIndicatorProps = {
|
|
7
7
|
status: ActionQueueStatus;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
2
|
|
|
3
|
-
import { managerClient } from "
|
|
3
|
+
import { managerClient } from "@/managerClient";
|
|
4
4
|
|
|
5
5
|
async function getSliceMachineLatestNonBreakingVersion() {
|
|
6
6
|
const latestNonBreakingVersion =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
2
|
|
|
3
|
-
import { managerClient } from "
|
|
3
|
+
import { managerClient } from "@/managerClient";
|
|
4
4
|
|
|
5
5
|
async function getSliceMachineReleaseNotes(version: string) {
|
|
6
6
|
const latestNonBreakingVersion =
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
|
-
|
|
3
2
|
import type { Version } from "@slicemachine/manager";
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
import { managerClient } from "@/managerClient";
|
|
5
5
|
|
|
6
6
|
async function getSliceMachineVersions(): Promise<Version[]> {
|
|
7
7
|
const sliceMachineVersions =
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
+
import { Button, Image, tokens } from "@prismicio/editor-ui";
|
|
1
2
|
import router from "next/router";
|
|
3
|
+
import { FiExternalLink } from "react-icons/fi";
|
|
4
|
+
import { useSelector } from "react-redux";
|
|
2
5
|
|
|
3
6
|
import {
|
|
4
7
|
BlankSlate,
|
|
5
|
-
BlankSlateImage,
|
|
6
|
-
BlankSlateTitle,
|
|
7
|
-
BlankSlateDescription,
|
|
8
8
|
BlankSlateActions,
|
|
9
9
|
BlankSlateContent,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { SliceMachineStoreType } from "
|
|
18
|
-
import { getRepoName } from "@src/modules/environment";
|
|
19
|
-
|
|
20
|
-
import { createDocumentsListEndpointFromRepoName } from "@lib/utils/repo";
|
|
10
|
+
BlankSlateDescription,
|
|
11
|
+
BlankSlateImage,
|
|
12
|
+
BlankSlateTitle,
|
|
13
|
+
} from "@/components/BlankSlate";
|
|
14
|
+
import { TextLink } from "@/components/TextLink";
|
|
15
|
+
import { createDocumentsListEndpointFromRepoName } from "@/legacy/lib/utils/repo";
|
|
16
|
+
import { getRepoName } from "@/modules/environment";
|
|
17
|
+
import { SliceMachineStoreType } from "@/redux/type";
|
|
21
18
|
|
|
22
19
|
export const NoChangesBlankSlate = () => {
|
|
23
20
|
const { repoName } = useSelector((state: SliceMachineStoreType) => ({
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
type ComponentPropsWithoutRef,
|
|
4
4
|
type ElementRef,
|
|
5
5
|
type FC,
|
|
6
|
+
forwardRef,
|
|
6
7
|
type ReactNode,
|
|
7
8
|
Suspense,
|
|
8
|
-
forwardRef,
|
|
9
9
|
} from "react";
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
12
|
+
import { gitProviderToConfig } from "@/features/settings/git/GitProvider";
|
|
13
|
+
import { useGitIntegrationExperiment } from "@/features/settings/git/useGitIntegrationExperiment";
|
|
14
|
+
import { useLinkedGitRepos } from "@/features/settings/git/useLinkedGitRepos";
|
|
15
15
|
|
|
16
16
|
type PushChangesButtonProps = Required<BarePushChangesButtonProps>;
|
|
17
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Badge, Tooltip } from "@prismicio/editor-ui";
|
|
2
2
|
import type { ComponentPropsWithoutRef, FC } from "react";
|
|
3
3
|
|
|
4
|
-
import { ModelStatus } from "
|
|
5
|
-
import { AuthStatus } from "
|
|
4
|
+
import { ModelStatus } from "@/legacy/lib/models/common/ModelStatus";
|
|
5
|
+
import { AuthStatus } from "@/modules/userContext/types";
|
|
6
6
|
|
|
7
7
|
export type StatusBadgeProps = GetStatusBadgeContentArgs;
|
|
8
8
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type FC, useState } from "react";
|
|
2
1
|
import {
|
|
3
2
|
DropdownMenu,
|
|
4
3
|
DropdownMenuContent,
|
|
@@ -7,20 +6,18 @@ import {
|
|
|
7
6
|
Icon,
|
|
8
7
|
IconButton,
|
|
9
8
|
} from "@prismicio/editor-ui";
|
|
9
|
+
import { type CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
10
|
+
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
10
11
|
import { useRouter } from "next/router";
|
|
12
|
+
import { type FC, useState } from "react";
|
|
11
13
|
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import
|
|
14
|
+
import { DeleteCustomTypeModal } from "@/legacy/components/DeleteCTModal";
|
|
15
|
+
import { RenameCustomTypeModal } from "@/legacy/components/Forms/RenameCustomTypeModal";
|
|
16
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
15
17
|
|
|
16
18
|
import { convertCustomToPageType } from "./actions/convertCustomToPageType";
|
|
17
|
-
|
|
18
19
|
import { CUSTOM_TYPES_CONFIG } from "./customTypesConfig";
|
|
19
20
|
|
|
20
|
-
import { RenameCustomTypeModal } from "@components/Forms/RenameCustomTypeModal";
|
|
21
|
-
import { DeleteCustomTypeModal } from "@components/DeleteCTModal";
|
|
22
|
-
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
23
|
-
|
|
24
21
|
type EditDropdownProps = {
|
|
25
22
|
isChangesLocal: boolean;
|
|
26
23
|
format: CustomTypeFormat;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Box, Button, Text } from "@prismicio/editor-ui";
|
|
3
1
|
import { cache } from "@prismicio/editor-support/Suspense";
|
|
2
|
+
import { Box, Button, Text } from "@prismicio/editor-ui";
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { BlankPageIcon } from "
|
|
7
|
-
import {
|
|
5
|
+
import { getIsEmptyProject } from "@/hooks/useIsEmptyProject";
|
|
6
|
+
import { BlankPageIcon } from "@/icons/BlankPageIcon";
|
|
7
|
+
import { CreateCustomTypeModal } from "@/legacy/components/Forms/CreateCustomTypeModal";
|
|
8
8
|
|
|
9
9
|
export function PageTypeOnboarding() {
|
|
10
10
|
const [isCreatingCustomType, setIsCreatingCustomType] = useState(false);
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
// @vitest-environment jsdom
|
|
2
|
-
import { describe, vi, test, TestContext } from "vitest";
|
|
3
2
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
4
|
-
|
|
5
|
-
import mockRouter from "next-router-mock";
|
|
6
|
-
|
|
7
3
|
import {
|
|
8
|
-
CustomTypeFormat,
|
|
9
4
|
createSliceMachineManager,
|
|
5
|
+
CustomTypeFormat,
|
|
10
6
|
} from "@slicemachine/manager";
|
|
11
7
|
import { createSliceMachineManagerMSWHandler } from "@slicemachine/manager/test";
|
|
12
|
-
import
|
|
13
|
-
import { render, screen, within } from "test/__testutils__";
|
|
14
|
-
import { createTestPlugin } from "test/__testutils__/createTestPlugin";
|
|
15
|
-
import { createTestProject } from "test/__testutils__/createTestProject";
|
|
16
|
-
import { CustomTypesBuilderPage } from "../customTypesBuilder/CustomTypesBuilderPage";
|
|
17
|
-
import pkg from "../../../../package.json";
|
|
18
|
-
|
|
8
|
+
import mockRouter from "next-router-mock";
|
|
19
9
|
import { createDynamicRouteParser } from "next-router-mock/dynamic-routes";
|
|
10
|
+
import { describe, test, TestContext, vi } from "vitest";
|
|
11
|
+
|
|
12
|
+
import { render, screen, within } from "@/../test/__testutils__";
|
|
13
|
+
import { createTestPlugin } from "@/../test/__testutils__/createTestPlugin";
|
|
14
|
+
import { createTestProject } from "@/../test/__testutils__/createTestProject";
|
|
15
|
+
import { CustomTypes } from "@/legacy/lib/models/common/CustomType";
|
|
16
|
+
|
|
17
|
+
import pkg from "../../../../package.json";
|
|
18
|
+
import { CustomTypesBuilderPage } from "../customTypesBuilder/CustomTypesBuilderPage";
|
|
20
19
|
|
|
21
20
|
mockRouter.useParser(
|
|
22
21
|
createDynamicRouteParser([
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
// @vitest-environment jsdom
|
|
2
|
-
import { describe, vi, test, TestContext } from "vitest";
|
|
3
|
-
import mockRouter from "next-router-mock";
|
|
4
2
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
5
|
-
|
|
6
3
|
import {
|
|
7
|
-
CustomTypeFormat,
|
|
8
4
|
createSliceMachineManager,
|
|
5
|
+
CustomTypeFormat,
|
|
9
6
|
} from "@slicemachine/manager";
|
|
10
7
|
import { createSliceMachineManagerMSWHandler } from "@slicemachine/manager/test";
|
|
11
8
|
import { CustomTypeReadHookData } from "@slicemachine/plugin-kit";
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
9
|
+
import mockRouter from "next-router-mock";
|
|
10
|
+
import { describe, test, TestContext, vi } from "vitest";
|
|
11
|
+
|
|
12
|
+
import { render, screen, waitFor, within } from "@/../test/__testutils__";
|
|
13
|
+
import { createTestPlugin } from "@/../test/__testutils__/createTestPlugin";
|
|
14
|
+
import { createTestProject } from "@/../test/__testutils__/createTestProject";
|
|
15
|
+
import { CustomTypes } from "@/legacy/lib/models/common/CustomType";
|
|
16
|
+
|
|
18
17
|
import pkg from "../../../../package.json";
|
|
18
|
+
import { CUSTOM_TYPES_MESSAGES } from "../customTypesMessages";
|
|
19
|
+
import { CustomTypesTablePage } from "../customTypesTable/CustomTypesTablePage";
|
|
19
20
|
|
|
20
21
|
const formats = [
|
|
21
22
|
{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { toast } from "react-toastify";
|
|
2
1
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
-
|
|
4
2
|
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import { toast } from "react-toastify";
|
|
4
|
+
|
|
5
|
+
import { updateCustomType } from "@/apiClient";
|
|
6
|
+
import { convertToPageType } from "@/domain/customType";
|
|
7
7
|
|
|
8
8
|
import { CUSTOM_TYPES_MESSAGES } from "../customTypesMessages";
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { toast } from "react-toastify";
|
|
2
1
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
-
|
|
4
|
-
import { ToastMessageWithPath } from "@components/ToasterContainer";
|
|
5
2
|
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
6
|
-
import {
|
|
7
|
-
|
|
3
|
+
import { toast } from "react-toastify";
|
|
4
|
+
|
|
5
|
+
import { telemetry, updateCustomType } from "@/apiClient";
|
|
6
|
+
import { create } from "@/domain/customType";
|
|
7
|
+
import { ToastMessageWithPath } from "@/legacy/components/ToasterContainer";
|
|
8
8
|
|
|
9
9
|
import { CUSTOM_TYPES_MESSAGES } from "../customTypesMessages";
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { toast } from "react-toastify";
|
|
2
1
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
-
|
|
4
|
-
import { managerClient } from "@src/managerClient";
|
|
5
2
|
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
3
|
+
import { toast } from "react-toastify";
|
|
4
|
+
|
|
5
|
+
import { managerClient } from "@/managerClient";
|
|
6
6
|
|
|
7
7
|
import { CUSTOM_TYPES_MESSAGES } from "../customTypesMessages";
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { toast } from "react-toastify";
|
|
2
1
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
-
|
|
4
|
-
import { managerClient } from "@src/managerClient";
|
|
5
2
|
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
3
|
+
import { toast } from "react-toastify";
|
|
4
|
+
|
|
5
|
+
import { managerClient } from "@/managerClient";
|
|
6
6
|
|
|
7
7
|
import { CUSTOM_TYPES_MESSAGES } from "../customTypesMessages";
|
|
8
8
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import { useStableCallback } from "@prismicio/editor-support/React";
|
|
2
|
+
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
1
3
|
import {
|
|
2
|
-
ReactNode,
|
|
3
4
|
createContext,
|
|
5
|
+
ReactNode,
|
|
4
6
|
useCallback,
|
|
5
7
|
useContext,
|
|
6
8
|
useMemo,
|
|
7
9
|
useState,
|
|
8
10
|
} from "react";
|
|
9
|
-
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
10
|
-
import { useStableCallback } from "@prismicio/editor-support/React";
|
|
11
11
|
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
12
|
+
import { updateCustomType } from "@/apiClient";
|
|
13
|
+
import { getFormat } from "@/domain/customType";
|
|
14
|
+
import { useAutoSync } from "@/features/sync/AutoSyncProvider";
|
|
15
|
+
import { ActionQueueStatus, useActionQueue } from "@/hooks/useActionQueue";
|
|
16
|
+
import useSliceMachineActions from "@/modules/useSliceMachineActions";
|
|
17
17
|
|
|
18
18
|
import { CUSTOM_TYPES_MESSAGES } from "../customTypesMessages";
|
|
19
19
|
|
|
@@ -4,6 +4,13 @@ import { useRouter } from "next/router";
|
|
|
4
4
|
import { type FC, useEffect } from "react";
|
|
5
5
|
import { useSelector } from "react-redux";
|
|
6
6
|
|
|
7
|
+
import { BreadcrumbItem } from "@/components/Breadcrumb";
|
|
8
|
+
import { getFormat } from "@/domain/customType";
|
|
9
|
+
import { AutoSaveStatusIndicator } from "@/features/autoSave/AutoSaveStatusIndicator";
|
|
10
|
+
import {
|
|
11
|
+
CUSTOM_TYPES_CONFIG,
|
|
12
|
+
readBuilderPageDynamicSegment,
|
|
13
|
+
} from "@/features/customTypes/customTypesConfig";
|
|
7
14
|
import {
|
|
8
15
|
AppLayout,
|
|
9
16
|
AppLayoutActions,
|
|
@@ -11,22 +18,20 @@ import {
|
|
|
11
18
|
AppLayoutBreadcrumb,
|
|
12
19
|
AppLayoutContent,
|
|
13
20
|
AppLayoutHeader,
|
|
14
|
-
} from "
|
|
15
|
-
import { CustomTypeBuilder } from "
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
} from "@/legacy/components/AppLayout";
|
|
22
|
+
import { CustomTypeBuilder } from "@/legacy/lib/builders/CustomTypeBuilder";
|
|
23
|
+
import {
|
|
24
|
+
CustomTypes,
|
|
25
|
+
CustomTypeSM,
|
|
26
|
+
} from "@/legacy/lib/models/common/CustomType";
|
|
27
|
+
import { hasLocal } from "@/legacy/lib/models/common/ModelData";
|
|
28
|
+
import { selectCustomTypeById } from "@/modules/availableCustomTypes";
|
|
29
|
+
import type { SliceMachineStoreType } from "@/redux/type";
|
|
23
30
|
|
|
24
|
-
import { CUSTOM_TYPES_CONFIG } from "../customTypesConfig";
|
|
25
31
|
import { CUSTOM_TYPES_MESSAGES } from "../customTypesMessages";
|
|
26
32
|
import { EditDropdown } from "../EditDropdown";
|
|
27
|
-
import { PageSnippetDialog } from "./PageSnippetDialog";
|
|
28
33
|
import { CustomTypeProvider } from "./CustomTypeProvider";
|
|
29
|
-
import {
|
|
34
|
+
import { PageSnippetDialog } from "./PageSnippetDialog";
|
|
30
35
|
|
|
31
36
|
export const CustomTypesBuilderPage: FC = () => {
|
|
32
37
|
const router = useRouter();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { FC, Suspense } from "react";
|
|
2
1
|
import { Button, Dialog, DialogHeader, ScrollArea } from "@prismicio/editor-ui";
|
|
3
2
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import { FC, Suspense } from "react";
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { telemetry } from "@/apiClient";
|
|
6
|
+
import { ContentTabs } from "@/components/ContentTabs";
|
|
7
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
8
|
+
import { MarkdownRenderer } from "@/features/documentation/MarkdownRenderer";
|
|
9
|
+
import { useDocumentation } from "@/features/documentation/useDocumentation";
|
|
10
|
+
import { useAdapterName } from "@/hooks/useAdapterName";
|
|
8
11
|
|
|
9
12
|
import * as styles from "./PageSnippetDialog.css";
|
|
10
|
-
import { telemetry } from "@src/apiClient";
|
|
11
|
-
import { useAdapterName } from "@src/hooks/useAdapterName";
|
|
12
|
-
import { ErrorBoundary } from "@src/ErrorBoundary";
|
|
13
13
|
|
|
14
14
|
type PageSnippetContentProps = { model: CustomType };
|
|
15
15
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
1
|
import { ActionList, ActionListItem, Badge, Box } from "@prismicio/editor-ui";
|
|
2
|
+
import { FC } from "react";
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
BlankSlate,
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
BlankSlateContent,
|
|
8
8
|
BlankSlateDescription,
|
|
9
9
|
BlankSlateTitle,
|
|
10
|
-
} from "
|
|
11
|
-
import { SliceMachinePrinterIcon } from "
|
|
10
|
+
} from "@/components/BlankSlate";
|
|
11
|
+
import { SliceMachinePrinterIcon } from "@/icons/SliceMachinePrinterIcon";
|
|
12
12
|
|
|
13
13
|
export type SliceZoneBlankSlateProps = {
|
|
14
14
|
openUpdateSliceZoneModal: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRequest } from "@prismicio/editor-support/Suspense";
|
|
2
2
|
import type { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
|
|
4
|
-
import { managerClient } from "
|
|
4
|
+
import { managerClient } from "@/managerClient";
|
|
5
5
|
|
|
6
6
|
export function useCustomType(id: string): CustomType | undefined {
|
|
7
7
|
return useRequest(readCustomType, [id]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NextRouter } from "next/router";
|
|
2
2
|
|
|
3
|
-
import { DatabaseIcon } from "
|
|
4
|
-
import { PageStackIcon } from "
|
|
3
|
+
import { DatabaseIcon } from "@/icons/DatabaseIcon";
|
|
4
|
+
import { PageStackIcon } from "@/icons/PageStackIcon";
|
|
5
5
|
|
|
6
6
|
export const CUSTOM_TYPES_CONFIG = {
|
|
7
7
|
page: {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Button, Icon, Image, tokens } from "@prismicio/editor-ui";
|
|
2
|
+
import { type CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import { type CustomTypeFormat } from "@slicemachine/manager";
|
|
3
4
|
import { useRouter } from "next/router";
|
|
5
|
+
import { type FC } from "react";
|
|
4
6
|
|
|
7
|
+
import {
|
|
8
|
+
BlankSlate,
|
|
9
|
+
BlankSlateActions,
|
|
10
|
+
BlankSlateContent,
|
|
11
|
+
BlankSlateDescription,
|
|
12
|
+
BlankSlateImage,
|
|
13
|
+
BlankSlateTitle,
|
|
14
|
+
} from "@/components/BlankSlate";
|
|
5
15
|
import {
|
|
6
16
|
Table,
|
|
7
17
|
TableBody,
|
|
8
18
|
TableCell,
|
|
9
19
|
TableHead,
|
|
10
20
|
TableRow,
|
|
11
|
-
} from "
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { type CustomTypeFormat } from "@slicemachine/manager";
|
|
16
|
-
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
17
|
-
import {
|
|
18
|
-
BlankSlate,
|
|
19
|
-
BlankSlateImage,
|
|
20
|
-
BlankSlateTitle,
|
|
21
|
-
BlankSlateDescription,
|
|
22
|
-
BlankSlateActions,
|
|
23
|
-
BlankSlateContent,
|
|
24
|
-
} from "@src/components/BlankSlate";
|
|
21
|
+
} from "@/components/Table";
|
|
22
|
+
import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
|
|
23
|
+
import { ReusableIcon } from "@/icons/ReusableIcon";
|
|
24
|
+
import { UniqueIcon } from "@/icons/UniqueIcon";
|
|
25
25
|
|
|
26
26
|
import { CUSTOM_TYPES_CONFIG } from "../customTypesConfig";
|
|
27
27
|
import { EditDropdown } from "../EditDropdown";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { type FC, Suspense, useState } from "react";
|
|
2
1
|
import {
|
|
3
|
-
Button,
|
|
4
2
|
Box,
|
|
5
|
-
|
|
3
|
+
Button,
|
|
6
4
|
DefaultErrorMessage,
|
|
5
|
+
ProgressCircle,
|
|
7
6
|
} from "@prismicio/editor-ui";
|
|
7
|
+
import type { CustomTypeFormat } from "@slicemachine/manager";
|
|
8
8
|
import Head from "next/head";
|
|
9
|
+
import { type FC, Suspense, useState } from "react";
|
|
9
10
|
|
|
11
|
+
import { BreadcrumbItem } from "@/components/Breadcrumb";
|
|
12
|
+
import { ErrorBoundary } from "@/ErrorBoundary";
|
|
13
|
+
import { CUSTOM_TYPES_MESSAGES } from "@/features/customTypes/customTypesMessages";
|
|
10
14
|
import {
|
|
11
15
|
AppLayout,
|
|
12
16
|
AppLayoutActions,
|
|
13
17
|
AppLayoutBreadcrumb,
|
|
14
18
|
AppLayoutContent,
|
|
15
19
|
AppLayoutHeader,
|
|
16
|
-
} from "
|
|
17
|
-
import { CreateCustomTypeModal } from "
|
|
18
|
-
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
19
|
-
import { ErrorBoundary } from "@src/ErrorBoundary";
|
|
20
|
-
import type { CustomTypeFormat } from "@slicemachine/manager";
|
|
20
|
+
} from "@/legacy/components/AppLayout";
|
|
21
|
+
import { CreateCustomTypeModal } from "@/legacy/components/Forms/CreateCustomTypeModal";
|
|
21
22
|
|
|
22
23
|
import { CustomTypesTable } from "./CustomTypesTable";
|
|
23
|
-
import { BreadcrumbItem } from "@src/components/Breadcrumb";
|
|
24
24
|
|
|
25
25
|
type CustomTypesTablePageProps = {
|
|
26
26
|
format: CustomTypeFormat;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useCallback, useEffect } from "react";
|
|
2
|
-
import { useSelector } from "react-redux";
|
|
3
|
-
|
|
4
1
|
import { updateData, useRequest } from "@prismicio/editor-support/Suspense";
|
|
5
2
|
import type { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
6
3
|
import type { CustomTypeFormat } from "@slicemachine/manager";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { useCallback, useEffect } from "react";
|
|
5
|
+
import { useSelector } from "react-redux";
|
|
6
|
+
|
|
7
|
+
import { CustomTypes } from "@/legacy/lib/models/common/CustomType";
|
|
8
|
+
import { hasLocal } from "@/legacy/lib/models/common/ModelData";
|
|
9
|
+
import { managerClient } from "@/managerClient";
|
|
10
|
+
import { selectAllCustomTypes } from "@/modules/availableCustomTypes";
|
|
11
|
+
import type { SliceMachineStoreType } from "@/redux/type";
|
|
12
12
|
|
|
13
13
|
type UseCustomTypesReturnType = {
|
|
14
14
|
customTypes: CustomType[];
|