slice-machine-ui 1.26.1-beta.1 → 1.26.1-beta.11
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/components/App/index.tsx +6 -7
- package/components/AppLayout/index.tsx +6 -8
- package/components/AuthInstructions/index.jsx +1 -1
- package/components/Button/index.tsx +1 -2
- package/components/Card/Default.jsx +2 -1
- package/components/Card/Preview.jsx +1 -1
- package/components/Card/WithTabs/components.jsx +1 -1
- package/components/Card/WithTabs/index.jsx +4 -3
- package/components/Card/index.tsx +1 -0
- package/components/Changelog/index.tsx +6 -7
- package/components/Changelog/navigation/VersionBadge.tsx +2 -1
- package/components/Changelog/navigation/VersionTag.tsx +1 -0
- package/components/Changelog/navigation/index.tsx +3 -4
- package/components/Changelog/versionDetails/ReleaseNotesDetails.tsx +1 -1
- package/components/Changelog/versionDetails/UpdateCommandBox.tsx +4 -5
- package/components/Changelog/versionDetails/VersionKindLabel.tsx +3 -4
- package/components/Changelog/versionDetails/index.tsx +4 -5
- package/components/ChangesEmptyState/AuthErrorPage.tsx +2 -3
- package/components/ChangesEmptyState/OfflinePage.tsx +1 -1
- package/components/ChangesEmptyState/index.ts +1 -1
- package/components/ChangesItems/ChangesItems.tsx +9 -10
- package/components/ChangesItems/DevCollaborationExperiment.tsx +2 -3
- package/components/ChangesItems/ErrorBanner.tsx +1 -1
- package/components/CodeBlock/index.tsx +3 -4
- package/components/ConfigErrors/index.jsx +1 -1
- package/components/CustomTypeTable/changesPage.tsx +6 -6
- package/components/DeleteCTModal/index.tsx +6 -7
- package/components/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +2 -3
- package/components/DeleteDocumentsDrawer/HardDeleteDocumentsDrawer.tsx +8 -9
- package/components/DeleteDocumentsDrawer/SoftDeleteDocumentsDrawer.tsx +8 -8
- package/components/DeleteDocumentsDrawer/index.tsx +1 -1
- package/components/DeleteSliceModal/index.tsx +6 -7
- package/components/DeleteVariationModal/index.tsx +5 -6
- package/components/DropDownSelector/index.tsx +2 -4
- package/components/EmptyState/index.tsx +3 -4
- package/components/FormFields/Array.jsx +2 -4
- package/components/FormFields/Checkbox.jsx +1 -1
- package/components/FormFields/CheckboxControl.jsx +1 -1
- package/components/FormFields/Input.tsx +1 -1
- package/components/FormFields/SelectDefaultValue.jsx +1 -1
- package/components/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +15 -16
- package/components/Forms/CreateSliceModal/CreateSliceModal.tsx +9 -10
- package/components/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +11 -12
- package/components/Forms/RenameSliceModal/RenameSliceModal.tsx +6 -7
- package/components/Forms/RenameVariationModal/RenameVariationModal.module.css +5 -0
- package/components/Forms/RenameVariationModal/RenameVariationModal.tsx +6 -7
- package/components/Forms/components/InputBox.tsx +2 -2
- package/components/Forms/components/SelectRepeatable.tsx +3 -3
- package/components/Forms/formsValidator.ts +3 -2
- package/components/FullPage/index.tsx +1 -1
- package/components/InputDeleteIcon/index.jsx +1 -1
- package/components/ItemHeader/index.tsx +1 -1
- package/components/ListItem/Header.tsx +1 -1
- package/components/ListItem/index.tsx +7 -10
- package/components/LoadingPage/index.tsx +1 -0
- package/components/LoginModal/index.tsx +22 -23
- package/components/ModalFormCard/index.tsx +5 -5
- package/components/Navigation/ChangesItem.tsx +8 -9
- package/components/Navigation/Environment.tsx +7 -8
- package/components/Navigation/RunningVersion.tsx +1 -2
- package/components/Navigation/UpdateBox.tsx +3 -4
- package/components/Navigation/VideoItem.tsx +16 -16
- package/components/Navigation/index.module.css +3 -0
- package/components/Navigation/index.test.tsx +14 -12
- package/components/Navigation/index.tsx +18 -20
- package/components/ReviewModal/ReviewForm.tsx +12 -13
- package/components/ReviewModal/ReviewFormSelect.tsx +1 -1
- package/components/ReviewModal/ReviewModal.tsx +6 -7
- package/components/ScreenshotChangesModal/VariationDropZone.tsx +7 -8
- package/components/ScreenshotChangesModal/index.tsx +10 -14
- package/components/ScreenshotChangesModal/useCustomScreenshot.tsx +1 -2
- package/components/ScreenshotPreview/index.tsx +1 -1
- package/components/ScreenshotPreviewModal/index.tsx +4 -4
- package/components/Simulator/components/FailedConnect/index.tsx +3 -4
- package/components/Simulator/components/Header/VariationsPopover/index.tsx +3 -5
- package/components/Simulator/components/Header/index.tsx +4 -5
- package/components/Simulator/components/IframeRenderer/index.tsx +3 -5
- package/components/Simulator/components/Toolbar/index.tsx +2 -4
- package/components/Simulator/index.tsx +19 -26
- package/components/SliceMachineDrawer/index.tsx +2 -2
- package/components/SliceMachineIconButton/index.tsx +1 -1
- package/components/SliceMachineModal/index.tsx +1 -1
- package/components/ToasterContainer/index.tsx +3 -5
- package/components/Tooltip/TextWithTooltip.tsx +2 -3
- package/components/Tooltip/index.jsx +2 -3
- package/components/Warnings/index.jsx +1 -1
- package/lib/builders/CustomTypeBuilder/SliceZone/DeleteSliceZoneModal.tsx +2 -3
- package/lib/builders/CustomTypeBuilder/SliceZone/List.tsx +4 -5
- package/lib/builders/CustomTypeBuilder/SliceZone/SlicesTemplatesModal.tsx +8 -9
- package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +2 -3
- package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +3 -3
- package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +21 -22
- package/lib/builders/CustomTypeBuilder/TabModal/InputBox.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/TabModal/delete.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/TabModal/update.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/TabZone/index.tsx +20 -21
- package/lib/builders/CustomTypeBuilder/index.tsx +4 -5
- package/lib/builders/SliceBuilder/FieldZones/index.tsx +105 -41
- package/lib/builders/SliceBuilder/Sidebar/AddVariationModal.tsx +7 -8
- package/lib/builders/SliceBuilder/Sidebar/index.tsx +7 -8
- package/lib/builders/SliceBuilder/SimulatorButton/index.tsx +9 -12
- package/lib/builders/SliceBuilder/index.tsx +11 -8
- package/lib/builders/common/EditModal/Field.jsx +2 -5
- package/lib/builders/common/EditModal/Form.jsx +1 -1
- package/lib/builders/common/EditModal/index.jsx +11 -17
- package/lib/builders/common/SelectFieldTypeModal/index.jsx +3 -5
- package/lib/builders/common/Zone/Card/components/ErrorTooltip.tsx +2 -3
- package/lib/builders/common/Zone/Card/components/Hints/CodeBlock.tsx +4 -6
- package/lib/builders/common/Zone/Card/components/Hints/index.tsx +1 -1
- package/lib/builders/common/Zone/Card/components/NewField.tsx +13 -14
- package/lib/builders/common/Zone/Card/index.jsx +2 -3
- package/lib/builders/common/Zone/components/EmptyState/index.tsx +2 -2
- package/lib/builders/common/Zone/index.jsx +3 -4
- package/lib/forms/defaults.ts +1 -1
- package/lib/forms/fields.ts +1 -2
- package/lib/forms/index.ts +1 -0
- package/lib/models/common/ComponentUI.ts +1 -1
- package/lib/models/common/CustomType/index.ts +5 -4
- package/lib/models/common/CustomType/sliceZone.ts +2 -1
- package/lib/models/common/CustomType/tab.ts +4 -4
- package/lib/models/common/DeprecatedMockConfigMessage.tsx +2 -2
- package/lib/models/common/Environment.ts +2 -2
- package/lib/models/common/Fields.ts +1 -1
- package/lib/models/common/Group.ts +3 -2
- package/lib/models/common/Library.ts +2 -1
- package/lib/models/common/LibraryUI.ts +1 -1
- package/lib/models/common/ModelData.ts +1 -1
- package/lib/models/common/ModelStatus/compareCustomTypeModels.ts +2 -1
- package/lib/models/common/ModelStatus/compareSliceModels.ts +2 -1
- package/lib/models/common/ModelStatus/index.ts +10 -9
- package/lib/models/common/Slice.ts +2 -2
- package/lib/models/common/Slices.ts +2 -2
- package/lib/models/common/normalizers/customType.ts +1 -1
- package/lib/models/common/normalizers/slices.ts +3 -2
- package/lib/models/common/widgets/Boolean/index.ts +5 -7
- package/lib/models/common/widgets/Color/index.ts +2 -3
- package/lib/models/common/widgets/ContentRelationship/Form.tsx +7 -9
- package/lib/models/common/widgets/ContentRelationship/index.ts +7 -8
- package/lib/models/common/widgets/Date/index.ts +2 -2
- package/lib/models/common/widgets/Embed/index.ts +2 -2
- package/lib/models/common/widgets/GeoPoint/index.ts +2 -3
- package/lib/models/common/widgets/Group/Form.jsx +3 -4
- package/lib/models/common/widgets/Group/ListItem/index.jsx +13 -23
- package/lib/models/common/widgets/Group/index.ts +4 -3
- package/lib/models/common/widgets/Image/Form.tsx +8 -11
- package/lib/models/common/widgets/Image/components.tsx +5 -5
- package/lib/models/common/widgets/Image/index.ts +3 -5
- package/lib/models/common/widgets/Link/Form.jsx +3 -5
- package/lib/models/common/widgets/Link/index.ts +3 -3
- package/lib/models/common/widgets/LinkToMedia/Form.jsx +2 -4
- package/lib/models/common/widgets/LinkToMedia/index.ts +3 -4
- package/lib/models/common/widgets/Number/index.ts +2 -2
- package/lib/models/common/widgets/Select/FormFields.jsx +7 -8
- package/lib/models/common/widgets/Select/index.ts +3 -6
- package/lib/models/common/widgets/StructuredText/Form.tsx +10 -10
- package/lib/models/common/widgets/StructuredText/index.ts +3 -6
- package/lib/models/common/widgets/StructuredText/options.tsx +2 -2
- package/lib/models/common/widgets/Text/index.ts +5 -5
- package/lib/models/common/widgets/Timestamp/index.ts +4 -5
- package/lib/models/common/widgets/UID/index.ts +4 -5
- package/lib/models/common/widgets/Widget.ts +2 -1
- package/lib/models/common/widgets/index.ts +1 -1
- package/lib/models/common/widgets/withGroup.ts +1 -2
- package/lib/models/server/ServerState.ts +4 -3
- package/lib/utils/index.ts +4 -5
- package/out/404.html +1 -1
- package/out/_next/static/6WrgMw0SELcypoJCYNiKd/_buildManifest.js +1 -0
- package/out/_next/static/chunks/{25-792af14760d9df34.js → 25-607d5cfe6492f4e8.js} +1 -1
- package/out/_next/static/chunks/286-6ee80333008646b9.js +1 -0
- package/out/_next/static/chunks/318-c84322cba57be932.js +1 -0
- package/out/_next/static/chunks/382-8194eab141c7ea2f.js +1 -0
- package/out/_next/static/chunks/727-b53258380c1a11f1.js +1 -0
- package/out/_next/static/chunks/799-68887319f3169f78.js +1 -0
- package/out/_next/static/chunks/pages/{_app-756c037ed6c707e9.js → _app-6177e3581af44083.js} +1 -1
- package/out/_next/static/chunks/pages/changelog-2d061c06b2b82e28.js +1 -0
- package/out/_next/static/chunks/pages/changes-cde59d56dc849106.js +1 -0
- package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-d1a4a07e6b600fa6.js → [customTypeId]-89ccb93ce7409ad0.js} +1 -1
- package/out/_next/static/chunks/pages/index-b5817351a77c6d40.js +1 -0
- package/out/_next/static/chunks/pages/labs-0fc7d01b8c9bfc2a.js +1 -0
- package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-a724ff12ef322020.js → [pageTypeId]-dbf86fe3a94dc892.js} +1 -1
- package/out/_next/static/chunks/pages/settings-897ad13a08f73048.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-ed3157875529f0f2.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-69cf4b12bb354f9f.js +1 -0
- package/out/_next/static/chunks/pages/slices-391f6c4b30af0759.js +1 -0
- package/out/_next/static/css/{838fd8bb5a7c32b0.css → 0e0d6c4ec6bf7373.css} +1 -1
- package/out/_next/static/css/{21654235130d0806.css → 243a4d347efcfd53.css} +1 -1
- package/out/_next/static/css/{b22c0750c14cc089.css → 27f2b9b9c9f65885.css} +1 -1
- package/out/_next/static/css/{72465cc1225f28a2.css → 6e65ff596e3b465e.css} +1 -1
- package/out/_next/static/css/70e3649c6ba13fdc.css +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/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 +5 -3
- package/pages/_app.tsx +6 -8
- package/pages/changelog.tsx +1 -2
- package/pages/changes.tsx +17 -15
- package/pages/custom-types.tsx +1 -2
- package/pages/index.tsx +1 -2
- package/pages/slices/[lib]/[sliceName]/[variation]/index.tsx +2 -3
- package/pages/slices/[lib]/[sliceName]/[variation]/simulator.tsx +2 -3
- package/pages/slices.tsx +22 -20
- package/sentry.client.config.ts +1 -1
- package/src/ErrorBoundary.tsx +1 -2
- package/src/apiClient.ts +7 -8
- 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.module.css +11 -0
- package/src/components/Breadcrumb/Breadcrumb.module.css.d.ts +6 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +34 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +43 -25
- package/src/components/Breadcrumb/index.ts +1 -1
- package/src/components/Card/Card.stories.tsx +1 -2
- package/src/components/Card/Card.tsx +3 -2
- package/src/components/CodeBlock/CodeBlock.module.css +46 -0
- package/src/components/CodeBlock/CodeBlock.module.css.d.ts +10 -0
- package/src/components/CodeBlock/CodeBlock.tsx +7 -8
- package/src/components/ContentTabs/ContentTabs.module.css +60 -0
- package/src/components/ContentTabs/ContentTabs.module.css.d.ts +12 -0
- package/src/components/ContentTabs/ContentTabs.tsx +2 -2
- package/src/components/Count/Count.module.css +19 -0
- package/src/components/Count/Count.module.css.d.ts +6 -0
- package/src/components/{Counter/Counter.stories.tsx → Count/Count.stories.tsx} +3 -3
- package/src/components/{Counter/Counter.tsx → Count/Count.tsx} +3 -4
- package/src/components/Count/index.ts +1 -0
- package/src/components/Divider/Divider.stories.tsx +1 -1
- package/src/components/HoverCard/HoverCard.module.css +79 -0
- package/src/components/HoverCard/HoverCard.module.css.d.ts +13 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +3 -2
- package/src/components/HoverCard/HoverCard.test.tsx +2 -2
- package/src/components/HoverCard/HoverCard.tsx +3 -4
- package/src/components/HoverCard/index.ts +3 -3
- package/src/components/SideNav/SideNav.stories.tsx +6 -7
- package/src/components/SideNav/SideNav.tsx +6 -6
- package/src/components/SideNav/SideNavEnvironmentSelector.tsx +3 -4
- package/src/components/Table/Table.stories.tsx +2 -2
- package/src/components/Table/Table.test.tsx +1 -2
- package/src/components/Table/Table.tsx +2 -2
- package/src/components/Table/index.ts +1 -1
- package/src/components/TextLink/TextLink.module.css +58 -0
- package/src/components/TextLink/TextLink.module.css.d.ts +11 -0
- package/src/components/TextLink/TextLink.stories.tsx +1 -1
- package/src/components/TextLink/TextLink.tsx +5 -5
- package/src/domain/__tests__/customType.test.ts +1 -2
- package/src/domain/__tests__/slice.test.ts +40 -0
- package/src/domain/customType.ts +1 -2
- package/src/domain/slice.ts +29 -5
- package/src/features/autoSave/AutoSaveStatusIndicator.tsx +1 -2
- package/src/features/changelog/useSliceMachineLatestNonBreakingVersion.ts +0 -1
- package/src/features/changelog/useSliceMachineReleaseNotes.ts +0 -1
- package/src/features/changelog/useSliceMachineVersions.ts +0 -1
- package/src/features/changes/BlankSlates/NoChangesBlankSlate.tsx +9 -13
- package/src/features/changes/PushChangesButton.tsx +5 -6
- package/src/features/changes/StatusBadge.tsx +2 -3
- package/src/features/customTypes/EditDropdown.tsx +6 -10
- package/src/features/customTypes/PageTypeOnboarding.tsx +4 -5
- package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +12 -15
- package/src/features/customTypes/__tests__/CustomTypesTablePage.test.tsx +7 -7
- package/src/features/customTypes/actions/convertCustomToPageType.ts +2 -3
- package/src/features/customTypes/actions/createCustomType.ts +2 -3
- package/src/features/customTypes/actions/deleteCustomType.ts +2 -3
- package/src/features/customTypes/actions/renameCustomType.ts +2 -3
- package/src/features/customTypes/customTypesBuilder/CustomTypeProvider.tsx +8 -9
- package/src/features/customTypes/customTypesBuilder/CustomTypesBuilderPage.tsx +22 -16
- package/src/features/customTypes/customTypesBuilder/PageSnippetDialog/PageSnippetDialog.tsx +4 -5
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +1 -2
- package/src/features/customTypes/customTypesBuilder/useCustomType.ts +0 -1
- package/src/features/customTypes/customTypesConfig.ts +1 -2
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +14 -15
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +21 -23
- package/src/features/customTypes/customTypesTable/useCustomTypes.ts +4 -5
- package/src/features/documentation/MarkdownRenderer/index.tsx +5 -7
- package/src/features/documentation/useDocumentation.ts +0 -1
- package/src/features/environments/actions/getActiveEnvironment.ts +0 -1
- package/src/features/environments/actions/setEnvironment.ts +1 -2
- package/src/features/inAppGuide/InAppGuideContext.tsx +2 -3
- package/src/features/inAppGuide/InAppGuideDialog.tsx +4 -5
- package/src/features/inAppGuide/inAppGuideContent.tsx +1 -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 +7 -5
- package/src/features/labs/labsList/useLab.tsx +0 -1
- package/src/features/settings/SettingsPage.tsx +8 -6
- package/src/features/settings/git/ConnectGitRepository.tsx +2 -3
- package/src/features/settings/git/GitOwnerSelect.tsx +1 -2
- package/src/features/settings/git/GitProvider.ts +0 -1
- package/src/features/settings/git/GitProviderConnectButtons.tsx +1 -2
- package/src/features/settings/git/GitRepositoriesList.tsx +1 -2
- package/src/features/settings/git/GitRepositoriesSearch.tsx +1 -2
- package/src/features/settings/git/GitRepositoryConnectDialog.tsx +3 -4
- package/src/features/settings/git/useGitOwners.ts +0 -1
- package/src/features/settings/git/useGitRepos.ts +0 -1
- package/src/features/settings/git/useLinkedGitRepos.ts +0 -1
- package/src/features/settings/git/useWriteAPIToken.ts +0 -1
- package/src/features/slices/actions/addSlicesToSliceZone.ts +1 -2
- package/src/features/slices/actions/createSlice.ts +3 -4
- package/src/features/slices/actions/deleteSlice.ts +1 -2
- package/src/features/slices/actions/renameSlice.ts +3 -4
- package/src/features/slices/actions/uploadSliceScreenshot.ts +1 -2
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +9 -10
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +7 -8
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css +14 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.module.css.d.ts +6 -0
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +10 -11
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceMergeWithIdenticalDialog.tsx +5 -8
- package/src/features/slices/convertLegacySlice/types.ts +1 -1
- package/src/features/slices/sliceBuilder/FloatingBackButton.tsx +3 -4
- package/src/features/slices/sliceBuilder/SliceBuilderProvider.tsx +9 -10
- package/src/features/slices/sliceBuilder/actions/deleteVariation.ts +2 -3
- package/src/features/slices/sliceBuilder/actions/renameVariation.ts +1 -2
- package/src/features/slices/sliceBuilder/useGroupsInSlicesExperiment.ts +8 -0
- package/src/features/slices/sliceCards/NonSharedSliceCard.tsx +2 -3
- package/src/features/slices/sliceCards/SharedSliceCard.tsx +4 -5
- package/src/features/slicesTemplates/actions/createSlicesTemplates.ts +2 -3
- package/src/features/sync/AutoSyncProvider.tsx +17 -18
- package/src/features/sync/actions/pushChanges.ts +1 -1
- package/src/features/sync/components/AutoSyncStatusIndicator.tsx +2 -3
- package/src/features/sync/fetchUnSyncChanges.ts +1 -1
- package/src/features/sync/getUnSyncChanges.ts +4 -4
- package/src/features/sync/useUnSyncChanges.ts +4 -5
- package/src/hooks/useActionQueue.tsx +5 -5
- package/src/hooks/useAdapterName.ts +0 -1
- package/src/hooks/useAuthStatus.ts +1 -2
- package/src/hooks/useCurrentSlice.tsx +2 -3
- package/src/hooks/useEditorContent.ts +3 -3
- package/src/hooks/useExperimentVariant.ts +0 -1
- package/src/hooks/useIsEmptyProject.ts +0 -1
- package/src/hooks/useRepositoryInformation.ts +2 -3
- package/src/hooks/useRouteChange.tsx +1 -1
- package/src/hooks/useSMTracker.ts +4 -5
- package/src/hooks/useScreenshotChangesModal.ts +3 -3
- package/src/hooks/useServerState.ts +4 -5
- package/src/hooks/useSliceMachineConfig.ts +1 -2
- package/src/hooks/useSliceMachineRunningVersion.ts +0 -1
- package/src/hooks/useThrottle.ts +1 -1
- package/src/hooks/useUpdateAvailable.ts +0 -1
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/hooks/useWindowSize.ts +2 -1
- package/src/modules/availableCustomTypes/index.ts +13 -12
- package/src/modules/environment/index.ts +9 -8
- package/src/modules/loading/index.ts +3 -2
- package/src/modules/modal/index.ts +3 -2
- package/src/modules/slices/index.ts +4 -4
- package/src/modules/slices/types.ts +1 -1
- package/src/modules/useSliceMachineActions.ts +22 -21
- package/src/modules/userContext/index.ts +5 -4
- package/src/redux/reducer.ts +5 -5
- package/src/redux/store.ts +6 -5
- package/src/redux/type.ts +4 -4
- package/src/theme.ts +1 -2
- package/test/__setup__.ts +3 -0
- package/vite.config.ts +4 -3
- package/components/Forms/RenameVariationModal/RenameVariationModal.css.ts +0 -7
- package/components/Navigation/index.css.ts +0 -5
- package/out/_next/static/chunks/286-e0950c3083c672e8.js +0 -1
- package/out/_next/static/chunks/318-d6f1200138628ec3.js +0 -1
- package/out/_next/static/chunks/727-2c302be2def92786.js +0 -1
- package/out/_next/static/chunks/799-7b910b896ff60ebe.js +0 -1
- package/out/_next/static/chunks/904-c9221a5cb09524e8.js +0 -1
- package/out/_next/static/chunks/pages/changelog-5c9ac93faf0df06b.js +0 -1
- package/out/_next/static/chunks/pages/changes-3e4989e09fd412a8.js +0 -1
- package/out/_next/static/chunks/pages/index-cf93d16e9c63b6db.js +0 -1
- package/out/_next/static/chunks/pages/labs-6f5925cd6cdcee9e.js +0 -1
- package/out/_next/static/chunks/pages/settings-f0620e5b727cda03.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]-8d7043e6638d65cd.js +0 -1
- package/out/_next/static/chunks/pages/slices-77cff50b1df13579.js +0 -1
- package/out/_next/static/css/be1f49e49a5aa7eb.css +0 -1
- package/out/_next/static/dLmvq3LL0BsWu15laiKoK/_buildManifest.js +0 -1
- package/src/components/Breadcrumb/Breadcrumb.css.ts +0 -5
- package/src/components/Breadcrumb/Breadcrumb.stories.ts +0 -32
- package/src/components/CodeBlock/CodeBlock.css.ts +0 -37
- package/src/components/ContentTabs/ContentTabs.css.ts +0 -49
- package/src/components/Counter/Counter.css.ts +0 -26
- package/src/components/Counter/index.ts +0 -1
- package/src/components/HoverCard/HoverCard.css.ts +0 -105
- package/src/components/TextLink/TextLink.css.ts +0 -65
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.css.ts +0 -15
- /package/out/_next/static/{dLmvq3LL0BsWu15laiKoK → 6WrgMw0SELcypoJCYNiKd}/_ssgManifest.js +0 -0
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { SetStateAction, useState } from "react";
|
|
2
|
-
import { Box } from "theme-ui";
|
|
3
|
-
import { FormikErrors } from "formik";
|
|
4
|
-
import { useSelector } from "react-redux";
|
|
5
|
-
import { useRouter } from "next/router";
|
|
6
|
-
|
|
7
1
|
import ModalFormCard from "@components/ModalFormCard";
|
|
8
|
-
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
9
|
-
import { SliceMachineStoreType } from "@src/redux/type";
|
|
10
|
-
import {
|
|
11
|
-
selectAllCustomTypeIds,
|
|
12
|
-
selectAllCustomTypeLabels,
|
|
13
|
-
} from "@src/modules/availableCustomTypes";
|
|
14
|
-
import { slugify } from "@lib/utils/str";
|
|
15
2
|
import { API_ID_REGEX } from "@lib/consts";
|
|
3
|
+
import { slugify } from "@lib/utils/str";
|
|
16
4
|
import type { CustomTypeFormat } from "@slicemachine/manager";
|
|
17
|
-
import {
|
|
5
|
+
import { getFormat } from "@src/domain/customType";
|
|
18
6
|
import {
|
|
19
|
-
CustomTypeOrigin,
|
|
20
7
|
createCustomType,
|
|
8
|
+
CustomTypeOrigin,
|
|
21
9
|
} from "@src/features/customTypes/actions/createCustomType";
|
|
22
10
|
import { CUSTOM_TYPES_CONFIG } from "@src/features/customTypes/customTypesConfig";
|
|
23
|
-
import {
|
|
11
|
+
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
24
12
|
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
13
|
+
import {
|
|
14
|
+
selectAllCustomTypeIds,
|
|
15
|
+
selectAllCustomTypeLabels,
|
|
16
|
+
} from "@src/modules/availableCustomTypes";
|
|
17
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
18
|
+
import { SliceMachineStoreType } from "@src/redux/type";
|
|
19
|
+
import { FormikErrors } from "formik";
|
|
20
|
+
import { useRouter } from "next/router";
|
|
21
|
+
import { SetStateAction, useState } from "react";
|
|
22
|
+
import { useSelector } from "react-redux";
|
|
23
|
+
import { Box } from "theme-ui";
|
|
25
24
|
|
|
26
25
|
import { InputBox } from "../components/InputBox";
|
|
27
26
|
import { SelectRepeatable } from "../components/SelectRepeatable";
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { Box, Label } from "theme-ui";
|
|
2
|
-
import { FC, useState } from "react";
|
|
3
|
-
import Select from "react-select";
|
|
4
|
-
import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
5
|
-
|
|
6
|
-
import { SliceSM } from "@lib/models/common/Slice";
|
|
7
|
-
import { LibraryUI } from "@lib/models/common/LibraryUI";
|
|
8
1
|
import ModalFormCard from "@components/ModalFormCard";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
2
|
+
import { LibraryUI } from "@lib/models/common/LibraryUI";
|
|
3
|
+
import { SliceSM } from "@lib/models/common/Slice";
|
|
4
|
+
import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
11
5
|
import { getState } from "@src/apiClient";
|
|
6
|
+
import { createSlice } from "@src/features/slices/actions/createSlice";
|
|
12
7
|
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
8
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
9
|
+
import { FC, useState } from "react";
|
|
10
|
+
import Select from "react-select";
|
|
11
|
+
import { Box, Label } from "theme-ui";
|
|
13
12
|
|
|
14
|
-
import { validateSliceModalValues } from "../formsValidator";
|
|
15
13
|
import { InputBox } from "../components/InputBox";
|
|
14
|
+
import { validateSliceModalValues } from "../formsValidator";
|
|
16
15
|
|
|
17
16
|
type CreateSliceModalProps = {
|
|
18
17
|
onClose: () => void;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Box } from "theme-ui";
|
|
3
|
-
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
4
|
-
import ModalFormCard from "../../ModalFormCard";
|
|
5
|
-
import { InputBox } from "../components/InputBox";
|
|
6
|
-
import { useSelector } from "react-redux";
|
|
7
|
-
import { SliceMachineStoreType } from "@src/redux/type";
|
|
8
|
-
import { FormikErrors } from "formik";
|
|
9
|
-
|
|
10
|
-
import { selectAllCustomTypeLabels } from "@src/modules/availableCustomTypes";
|
|
11
1
|
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
12
2
|
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
13
|
-
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
14
|
-
|
|
15
3
|
import { renameCustomType } from "@src/features/customTypes/actions/renameCustomType";
|
|
4
|
+
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
16
5
|
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
6
|
+
import { selectAllCustomTypeLabels } from "@src/modules/availableCustomTypes";
|
|
7
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
8
|
+
import { SliceMachineStoreType } from "@src/redux/type";
|
|
9
|
+
import { FormikErrors } from "formik";
|
|
10
|
+
import { useState } from "react";
|
|
11
|
+
import { useSelector } from "react-redux";
|
|
12
|
+
import { Box } from "theme-ui";
|
|
13
|
+
|
|
14
|
+
import ModalFormCard from "../../ModalFormCard";
|
|
15
|
+
import { InputBox } from "../components/InputBox";
|
|
17
16
|
|
|
18
17
|
interface RenameCustomTypeModalProps {
|
|
19
18
|
isChangesLocal: boolean;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { Box } from "theme-ui";
|
|
2
|
-
import { useSelector } from "react-redux";
|
|
3
|
-
|
|
4
|
-
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
5
|
-
import { SliceMachineStoreType } from "@src/redux/type";
|
|
6
|
-
import { getLibraries, getRemoteSlices } from "@src/modules/slices";
|
|
7
1
|
import { ComponentUI } from "@lib/models/common/ComponentUI";
|
|
8
2
|
import { renameSlice } from "@src/features/slices/actions/renameSlice";
|
|
9
3
|
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
4
|
+
import { getLibraries, getRemoteSlices } from "@src/modules/slices";
|
|
5
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
6
|
+
import { SliceMachineStoreType } from "@src/redux/type";
|
|
7
|
+
import { useSelector } from "react-redux";
|
|
8
|
+
import { Box } from "theme-ui";
|
|
10
9
|
|
|
11
|
-
import { InputBox } from "../components/InputBox";
|
|
12
10
|
import ModalFormCard from "../../ModalFormCard";
|
|
11
|
+
import { InputBox } from "../components/InputBox";
|
|
13
12
|
import { SliceModalValues } from "../formsTypes";
|
|
14
13
|
import { validateSliceModalValues } from "../formsValidator";
|
|
15
14
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ComponentUI } from "@lib/models/common/ComponentUI";
|
|
2
|
+
import type { VariationSM } from "@lib/models/common/Slice";
|
|
1
3
|
import {
|
|
2
4
|
Box,
|
|
3
5
|
Dialog,
|
|
@@ -7,16 +9,13 @@ import {
|
|
|
7
9
|
FormInput,
|
|
8
10
|
Text,
|
|
9
11
|
} from "@prismicio/editor-ui";
|
|
10
|
-
import { Formik } from "formik";
|
|
11
|
-
import { useState, type FC } from "react";
|
|
12
|
-
|
|
13
|
-
import type { ComponentUI } from "@lib/models/common/ComponentUI";
|
|
14
|
-
import type { VariationSM } from "@lib/models/common/Slice";
|
|
15
12
|
import { renameVariation } from "@src/features/slices/sliceBuilder/actions/renameVariation";
|
|
13
|
+
import { useSliceState } from "@src/features/slices/sliceBuilder/SliceBuilderProvider";
|
|
16
14
|
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
15
|
+
import { Formik } from "formik";
|
|
16
|
+
import { type FC, useState } from "react";
|
|
17
17
|
|
|
18
|
-
import
|
|
19
|
-
import { useSliceState } from "@src/features/slices/sliceBuilder/SliceBuilderProvider";
|
|
18
|
+
import styles from "./RenameVariationModal.module.css";
|
|
20
19
|
|
|
21
20
|
type RenameVariationModalProps = {
|
|
22
21
|
isOpen: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
2
|
+
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
2
3
|
import { useField } from "formik";
|
|
4
|
+
import React, { FC } from "react";
|
|
3
5
|
import { Box, Radio } from "theme-ui";
|
|
4
6
|
|
|
5
|
-
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
6
7
|
import { FlexCard } from "./FlexCard";
|
|
7
|
-
import { CustomTypeFormat } from "@slicemachine/manager";
|
|
8
8
|
|
|
9
9
|
type SelectRepeatableProps = {
|
|
10
10
|
format: CustomTypeFormat;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RESERVED_SLICE_NAME, API_ID_REGEX } from "@lib/consts";
|
|
1
|
+
import { API_ID_REGEX, RESERVED_SLICE_NAME } from "@lib/consts";
|
|
3
2
|
import { LibraryUI } from "@lib/models/common/LibraryUI";
|
|
4
3
|
import { SliceSM } from "@lib/models/common/Slice";
|
|
5
4
|
import camelCase from "lodash/camelCase";
|
|
6
5
|
import startCase from "lodash/startCase";
|
|
7
6
|
|
|
7
|
+
import { SliceModalValues } from "./formsTypes";
|
|
8
|
+
|
|
8
9
|
type SliceModalValuesValidity =
|
|
9
10
|
| {
|
|
10
11
|
sliceName?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextWithTooltip } from "@components/Tooltip/TextWithTooltip";
|
|
2
|
+
import * as CSS from "csstype";
|
|
2
3
|
import { IconType } from "react-icons";
|
|
3
4
|
import { Flex, Text, Theme } from "theme-ui";
|
|
4
|
-
import * as CSS from "csstype";
|
|
5
5
|
|
|
6
6
|
interface ItemHeaderProps {
|
|
7
7
|
text: string;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
+
import { TabField } from "@lib/models/common/CustomType";
|
|
2
|
+
import { Widget } from "@lib/models/common/widgets/Widget";
|
|
3
|
+
import { Menu, MenuButton, MenuItem, MenuList } from "@reach/menu-button";
|
|
1
4
|
import React, { Fragment } from "react";
|
|
2
5
|
import { Draggable } from "react-beautiful-dnd";
|
|
3
|
-
import {
|
|
4
|
-
|
|
6
|
+
import { AiOutlineEdit } from "react-icons/ai";
|
|
7
|
+
import { BsThreeDotsVertical } from "react-icons/bs";
|
|
8
|
+
import { FaBars } from "react-icons/fa";
|
|
5
9
|
import { Box, Flex, useThemeUI } from "theme-ui";
|
|
10
|
+
import { AnyObjectSchema } from "yup";
|
|
6
11
|
|
|
7
12
|
import Li from "../Li";
|
|
8
13
|
import SliceMachineIconButton from "../SliceMachineIconButton";
|
|
9
14
|
import ItemHeader from "./Header";
|
|
10
15
|
|
|
11
|
-
import { AiOutlineEdit } from "react-icons/ai";
|
|
12
|
-
import { BsThreeDotsVertical } from "react-icons/bs";
|
|
13
|
-
|
|
14
|
-
import { FaBars } from "react-icons/fa";
|
|
15
|
-
import { Widget } from "@lib/models/common/widgets/Widget";
|
|
16
|
-
import { AnyObjectSchema } from "yup";
|
|
17
|
-
import { TabField } from "@lib/models/common/CustomType";
|
|
18
|
-
|
|
19
16
|
type Item<F extends TabField> = { key: string; value: F };
|
|
20
17
|
|
|
21
18
|
interface ListItemProps<F extends TabField, S extends AnyObjectSchema> {
|
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import SliceMachineModal from "@components/SliceMachineModal";
|
|
2
|
+
import { normalizeFrontendCustomTypes } from "@lib/models/common/normalizers/customType";
|
|
3
|
+
import { normalizeFrontendSlices } from "@lib/models/common/normalizers/slices";
|
|
4
|
+
import { buildEndpoints } from "@lib/prismic/endpoints";
|
|
5
|
+
import { startPolling } from "@lib/utils/poll";
|
|
6
|
+
import preferWroomBase from "@lib/utils/preferWroomBase";
|
|
7
|
+
import { CheckAuthStatusResponse } from "@models/common/Auth";
|
|
8
|
+
import { checkAuthStatus, getState, startAuth } from "@src/apiClient";
|
|
9
|
+
import { getActiveEnvironment } from "@src/features/environments/actions/getActiveEnvironment";
|
|
10
|
+
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
11
|
+
import { getUnSyncedChanges } from "@src/features/sync/getUnSyncChanges";
|
|
12
|
+
import { getEnvironment } from "@src/modules/environment";
|
|
13
|
+
import { isLoading } from "@src/modules/loading";
|
|
14
|
+
import { LoadingKeysEnum } from "@src/modules/loading/types";
|
|
15
|
+
import { isModalOpen } from "@src/modules/modal";
|
|
16
|
+
import { ModalKeysEnum } from "@src/modules/modal/types";
|
|
17
|
+
import { AuthStatus } from "@src/modules/userContext/types";
|
|
18
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
19
|
+
import { SliceMachineStoreType } from "@src/redux/type";
|
|
2
20
|
import React from "react";
|
|
21
|
+
import Modal from "react-modal";
|
|
22
|
+
import { useSelector } from "react-redux";
|
|
23
|
+
import { toast } from "react-toastify";
|
|
3
24
|
import {
|
|
4
25
|
Button,
|
|
5
26
|
Card,
|
|
@@ -10,28 +31,6 @@ import {
|
|
|
10
31
|
Spinner,
|
|
11
32
|
Text,
|
|
12
33
|
} from "theme-ui";
|
|
13
|
-
import { toast } from "react-toastify";
|
|
14
|
-
import { useSelector } from "react-redux";
|
|
15
|
-
|
|
16
|
-
import SliceMachineModal from "@components/SliceMachineModal";
|
|
17
|
-
import { checkAuthStatus, getState, startAuth } from "@src/apiClient";
|
|
18
|
-
import { buildEndpoints } from "@lib/prismic/endpoints";
|
|
19
|
-
import { startPolling } from "@lib/utils/poll";
|
|
20
|
-
import { CheckAuthStatusResponse } from "@models/common/Auth";
|
|
21
|
-
import { isModalOpen } from "@src/modules/modal";
|
|
22
|
-
import { SliceMachineStoreType } from "@src/redux/type";
|
|
23
|
-
import { isLoading } from "@src/modules/loading";
|
|
24
|
-
import { LoadingKeysEnum } from "@src/modules/loading/types";
|
|
25
|
-
import { ModalKeysEnum } from "@src/modules/modal/types";
|
|
26
|
-
import { getEnvironment } from "@src/modules/environment";
|
|
27
|
-
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
28
|
-
import preferWroomBase from "@lib/utils/preferWroomBase";
|
|
29
|
-
import { getUnSyncedChanges } from "@src/features/sync/getUnSyncChanges";
|
|
30
|
-
import { normalizeFrontendCustomTypes } from "@lib/models/common/normalizers/customType";
|
|
31
|
-
import { normalizeFrontendSlices } from "@lib/models/common/normalizers/slices";
|
|
32
|
-
import { AuthStatus } from "@src/modules/userContext/types";
|
|
33
|
-
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
34
|
-
import { getActiveEnvironment } from "@src/features/environments/actions/getActiveEnvironment";
|
|
35
34
|
|
|
36
35
|
interface ValidAuthStatus extends CheckAuthStatusResponse {
|
|
37
36
|
status: "ok";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Button } from "@components/Button";
|
|
2
2
|
import SliceMachineModal from "@components/SliceMachineModal";
|
|
3
3
|
import {
|
|
4
|
-
Formik,
|
|
5
4
|
Form,
|
|
5
|
+
Formik,
|
|
6
6
|
FormikErrors,
|
|
7
|
+
FormikProps,
|
|
7
8
|
FormikTouched,
|
|
8
9
|
FormikValues,
|
|
9
|
-
FormikProps,
|
|
10
10
|
} from "formik";
|
|
11
11
|
import type {
|
|
12
12
|
ComponentPropsWithoutRef,
|
|
13
13
|
ReactNode,
|
|
14
14
|
SetStateAction,
|
|
15
15
|
} from "react";
|
|
16
|
-
import
|
|
16
|
+
import Modal from "react-modal";
|
|
17
|
+
import { Button as ThemeButton, Close, Flex, Heading } from "theme-ui";
|
|
17
18
|
|
|
18
|
-
import { Button } from "@components/Button";
|
|
19
19
|
import Card from "../Card";
|
|
20
20
|
|
|
21
21
|
type ModalCardProps<T extends FormikValues> = {
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { type FC } from "react";
|
|
2
|
-
import { useRouter } from "next/router";
|
|
3
1
|
import { useMediaQuery } from "@prismicio/editor-support/React";
|
|
4
2
|
import {
|
|
5
3
|
Box,
|
|
4
|
+
breakpoints,
|
|
6
5
|
Button,
|
|
7
6
|
IconButton,
|
|
8
7
|
Text,
|
|
9
8
|
Tooltip,
|
|
10
|
-
breakpoints,
|
|
11
9
|
} from "@prismicio/editor-ui";
|
|
12
|
-
|
|
13
10
|
import {
|
|
14
11
|
HoverCard,
|
|
15
12
|
HoverCardCloseButton,
|
|
@@ -17,14 +14,16 @@ import {
|
|
|
17
14
|
HoverCardMedia,
|
|
18
15
|
HoverCardTitle,
|
|
19
16
|
} from "@src/components/HoverCard";
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import { useAuthStatus } from "@src/hooks/useAuthStatus";
|
|
17
|
+
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
18
|
+
import { AutoSyncStatusIndicator } from "@src/features/sync/components/AutoSyncStatusIndicator";
|
|
23
19
|
import { useUnSyncChanges } from "@src/features/sync/useUnSyncChanges";
|
|
20
|
+
import { useAuthStatus } from "@src/hooks/useAuthStatus";
|
|
21
|
+
import { useNetwork } from "@src/hooks/useNetwork";
|
|
24
22
|
import { ChangesIcon } from "@src/icons/ChangesIcon";
|
|
25
23
|
import { AuthStatus } from "@src/modules/userContext/types";
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
24
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
25
|
+
import { useRouter } from "next/router";
|
|
26
|
+
import { type FC } from "react";
|
|
28
27
|
|
|
29
28
|
export const ChangesItem: FC = () => {
|
|
30
29
|
const { setSeenChangesToolTip } = useSliceMachineActions();
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { normalizeFrontendCustomTypes } from "@lib/models/common/normalizers/customType";
|
|
2
|
+
import { normalizeFrontendSlices } from "@lib/models/common/normalizers/slices";
|
|
2
3
|
import {
|
|
3
4
|
Environment as EnvironmentType,
|
|
4
5
|
isUnauthenticatedError,
|
|
5
6
|
isUnauthorizedError,
|
|
6
7
|
} from "@slicemachine/manager/client";
|
|
7
|
-
|
|
8
8
|
import { getState, telemetry } from "@src/apiClient";
|
|
9
|
-
import {
|
|
9
|
+
import { SideNavEnvironmentSelector } from "@src/components/SideNav";
|
|
10
10
|
import { setEnvironment } from "@src/features/environments/actions/setEnvironment";
|
|
11
11
|
import { useActiveEnvironment } from "@src/features/environments/useActiveEnvironment";
|
|
12
|
-
import
|
|
13
|
-
import { SideNavEnvironmentSelector } from "@src/components/SideNav";
|
|
14
|
-
import { useNetwork } from "@src/hooks/useNetwork";
|
|
12
|
+
import { useEnvironments } from "@src/features/environments/useEnvironments";
|
|
15
13
|
import { useAutoSync } from "@src/features/sync/AutoSyncProvider";
|
|
16
|
-
import { normalizeFrontendSlices } from "@lib/models/common/normalizers/slices";
|
|
17
|
-
import { normalizeFrontendCustomTypes } from "@lib/models/common/normalizers/customType";
|
|
18
14
|
import { getUnSyncedChanges } from "@src/features/sync/getUnSyncChanges";
|
|
19
15
|
import { useAuthStatus } from "@src/hooks/useAuthStatus";
|
|
16
|
+
import { useNetwork } from "@src/hooks/useNetwork";
|
|
17
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
18
|
+
import { useState } from "react";
|
|
20
19
|
|
|
21
20
|
export function Environment() {
|
|
22
21
|
const { environments, error: useEnvironmentsError } = useEnvironments();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
|
|
3
1
|
import { RightElement } from "@src/components/SideNav";
|
|
4
2
|
import { useSliceMachineRunningVersion } from "@src/hooks/useSliceMachineRunningVersion";
|
|
3
|
+
import { FC } from "react";
|
|
5
4
|
|
|
6
5
|
export const RunningVersion: FC = () => {
|
|
7
6
|
const sliceMachineRunningVersion = useSliceMachineRunningVersion();
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import Link from "next/link";
|
|
3
|
-
|
|
4
|
-
import { useUpdateAvailable } from "@src/hooks/useUpdateAvailable";
|
|
5
1
|
import { UpdateInfo } from "@src/components/SideNav";
|
|
2
|
+
import { useUpdateAvailable } from "@src/hooks/useUpdateAvailable";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { FC } from "react";
|
|
6
5
|
|
|
7
6
|
export const UpdateBox: FC = () => {
|
|
8
7
|
const { sliceMachineUpdateAvailable, adapterUpdateAvailable } =
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type FC,
|
|
3
|
-
useCallback,
|
|
4
|
-
useRef,
|
|
5
|
-
RefCallback,
|
|
6
|
-
ReactNode,
|
|
7
|
-
forwardRef,
|
|
8
|
-
PropsWithChildren,
|
|
9
|
-
} from "react";
|
|
10
|
-
import { useSelector } from "react-redux";
|
|
11
|
-
import ReactTooltip from "react-tooltip";
|
|
12
|
-
import { Close, Flex, Paragraph } from "theme-ui";
|
|
13
1
|
import { ReactTooltipPortal } from "@components/ReactTooltipPortal";
|
|
14
2
|
import { telemetry } from "@src/apiClient";
|
|
15
|
-
import { SideNavLink, SideNavListItem } from "@src/components/SideNav";
|
|
16
|
-
import { PlayCircleIcon } from "@src/icons/PlayCircleIcon";
|
|
17
3
|
import {
|
|
18
4
|
HoverCard,
|
|
19
|
-
HoverCardDescription,
|
|
20
5
|
HoverCardCloseButton,
|
|
6
|
+
HoverCardDescription,
|
|
21
7
|
HoverCardMedia,
|
|
22
8
|
HoverCardTitle,
|
|
23
9
|
} from "@src/components/HoverCard";
|
|
10
|
+
import { SideNavLink, SideNavListItem } from "@src/components/SideNav";
|
|
11
|
+
import { useMarketingContent } from "@src/hooks/useMarketingContent";
|
|
12
|
+
import { PlayCircleIcon } from "@src/icons/PlayCircleIcon";
|
|
24
13
|
import { getUserReview } from "@src/modules/userContext";
|
|
25
14
|
import { SliceMachineStoreType } from "@src/redux/type";
|
|
26
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
type FC,
|
|
17
|
+
forwardRef,
|
|
18
|
+
PropsWithChildren,
|
|
19
|
+
ReactNode,
|
|
20
|
+
RefCallback,
|
|
21
|
+
useCallback,
|
|
22
|
+
useRef,
|
|
23
|
+
} from "react";
|
|
24
|
+
import { useSelector } from "react-redux";
|
|
25
|
+
import ReactTooltip from "react-tooltip";
|
|
26
|
+
import { Close, Flex, Paragraph } from "theme-ui";
|
|
27
27
|
|
|
28
28
|
import style from "./VideoItem.module.css";
|
|
29
29
|
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
// @vitest-environment jsdom
|
|
2
|
-
import {
|
|
2
|
+
import { FrontEndEnvironment } from "@lib/models/common/Environment";
|
|
3
|
+
import { cache } from "@prismicio/editor-support/Suspense";
|
|
4
|
+
import { createSliceMachineManager } from "@slicemachine/manager";
|
|
5
|
+
import { createSliceMachineManagerMSWHandler } from "@slicemachine/manager/test";
|
|
6
|
+
import {
|
|
7
|
+
AuthStatus,
|
|
8
|
+
UserContextStoreType,
|
|
9
|
+
} from "@src/modules/userContext/types";
|
|
3
10
|
import Router from "next/router";
|
|
4
11
|
import { act } from "react-dom/test-utils";
|
|
5
|
-
import { createSliceMachineManagerMSWHandler } from "@slicemachine/manager/test";
|
|
6
|
-
import { createSliceMachineManager } from "@slicemachine/manager";
|
|
7
|
-
|
|
8
|
-
import { FrontEndEnvironment } from "@lib/models/common/Environment";
|
|
9
|
-
import { UserContextStoreType } from "@src/modules/userContext/types";
|
|
10
|
-
import { AuthStatus } from "@src/modules/userContext/types";
|
|
11
|
-
import { createTestPlugin } from "test/__testutils__/createTestPlugin";
|
|
12
|
-
import { createTestProject } from "test/__testutils__/createTestProject";
|
|
13
12
|
import {
|
|
14
13
|
render,
|
|
15
|
-
within,
|
|
16
|
-
screen,
|
|
17
14
|
type RenderReturnType,
|
|
15
|
+
screen,
|
|
18
16
|
waitFor,
|
|
17
|
+
within,
|
|
19
18
|
} from "test/__testutils__";
|
|
19
|
+
import { createTestPlugin } from "test/__testutils__/createTestPlugin";
|
|
20
|
+
import { createTestProject } from "test/__testutils__/createTestProject";
|
|
21
|
+
import { describe, expect, test, vi } from "vitest";
|
|
22
|
+
|
|
20
23
|
import SideNavigation from "./index";
|
|
21
|
-
import { cache } from "@prismicio/editor-support/Suspense";
|
|
22
24
|
|
|
23
25
|
const mockRouter = vi.mocked(Router);
|
|
24
26
|
|
|
@@ -1,39 +1,37 @@
|
|
|
1
|
+
import VideoItem from "@components/Navigation/VideoItem";
|
|
1
2
|
import { Box } from "@prismicio/editor-ui";
|
|
2
|
-
import { Suspense, type FC } from "react";
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
import { useRouter } from "next/router";
|
|
5
|
-
import { useSelector } from "react-redux";
|
|
6
|
-
|
|
7
3
|
import { telemetry } from "@src/apiClient";
|
|
8
|
-
import
|
|
9
|
-
import { LightningIcon } from "@src/icons/Lightning";
|
|
10
|
-
import { MathPlusIcon } from "@src/icons/MathPlusIcon";
|
|
11
|
-
import { SettingsIcon } from "@src/icons/SettingsIcon";
|
|
12
|
-
import { CUSTOM_TYPES_CONFIG } from "@src/features/customTypes/customTypesConfig";
|
|
4
|
+
import { Divider } from "@src/components/Divider";
|
|
13
5
|
import {
|
|
6
|
+
SideNav,
|
|
14
7
|
SideNavLink,
|
|
15
|
-
SideNavListItem,
|
|
16
8
|
SideNavList,
|
|
17
|
-
|
|
9
|
+
SideNavListItem,
|
|
18
10
|
SideNavRepository,
|
|
19
11
|
} from "@src/components/SideNav/SideNav";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { userHasSeenTutorialsToolTip } from "@src/modules/userContext";
|
|
23
|
-
import { SliceMachineStoreType } from "@src/redux/type";
|
|
24
|
-
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
12
|
+
import { ErrorBoundary } from "@src/ErrorBoundary";
|
|
13
|
+
import { CUSTOM_TYPES_CONFIG } from "@src/features/customTypes/customTypesConfig";
|
|
25
14
|
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
26
15
|
import { useGitIntegrationExperiment } from "@src/features/settings/git/useGitIntegrationExperiment";
|
|
27
16
|
import { useRepositoryInformation } from "@src/hooks/useRepositoryInformation";
|
|
28
|
-
import {
|
|
17
|
+
import { FolderIcon } from "@src/icons/FolderIcon";
|
|
18
|
+
import { LightningIcon } from "@src/icons/Lightning";
|
|
19
|
+
import { MathPlusIcon } from "@src/icons/MathPlusIcon";
|
|
20
|
+
import { SettingsIcon } from "@src/icons/SettingsIcon";
|
|
21
|
+
import { userHasSeenTutorialsToolTip } from "@src/modules/userContext";
|
|
22
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
23
|
+
import { SliceMachineStoreType } from "@src/redux/type";
|
|
24
|
+
import Link from "next/link";
|
|
25
|
+
import { useRouter } from "next/router";
|
|
26
|
+
import { type FC, Suspense } from "react";
|
|
27
|
+
import { useSelector } from "react-redux";
|
|
29
28
|
|
|
30
29
|
import { ChangesItem } from "./ChangesItem";
|
|
31
30
|
import { Environment } from "./Environment";
|
|
31
|
+
import styles from "./index.module.css";
|
|
32
32
|
import { RunningVersion } from "./RunningVersion";
|
|
33
33
|
import { UpdateBox } from "./UpdateBox";
|
|
34
34
|
|
|
35
|
-
import * as styles from "./index.css";
|
|
36
|
-
|
|
37
35
|
const Navigation: FC = () => {
|
|
38
36
|
const { hasSeenTutorialsToolTip } = useSelector(
|
|
39
37
|
(store: SliceMachineStoreType) => ({
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import SliceMachineModal from "@components/SliceMachineModal";
|
|
2
|
+
import { telemetry } from "@src/apiClient";
|
|
3
|
+
import { isLoading } from "@src/modules/loading";
|
|
4
|
+
import { LoadingKeysEnum } from "@src/modules/loading/types";
|
|
5
|
+
import { isModalOpen } from "@src/modules/modal";
|
|
6
|
+
import { ModalKeysEnum } from "@src/modules/modal/types";
|
|
7
|
+
import { UserReviewType } from "@src/modules/userContext/types";
|
|
8
|
+
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
9
|
+
import { SliceMachineStoreType } from "@src/redux/type";
|
|
2
10
|
import { Field, Form, Formik } from "formik";
|
|
11
|
+
import { FC } from "react";
|
|
12
|
+
import Modal from "react-modal";
|
|
13
|
+
import { useSelector } from "react-redux";
|
|
3
14
|
import {
|
|
4
15
|
Box,
|
|
5
16
|
Button,
|
|
@@ -10,18 +21,6 @@ import {
|
|
|
10
21
|
Text,
|
|
11
22
|
Textarea,
|
|
12
23
|
} from "theme-ui";
|
|
13
|
-
import Modal from "react-modal";
|
|
14
|
-
import { useSelector } from "react-redux";
|
|
15
|
-
|
|
16
|
-
import SliceMachineModal from "@components/SliceMachineModal";
|
|
17
|
-
import { SliceMachineStoreType } from "@src/redux/type";
|
|
18
|
-
import { isModalOpen } from "@src/modules/modal";
|
|
19
|
-
import { isLoading } from "@src/modules/loading";
|
|
20
|
-
import { LoadingKeysEnum } from "@src/modules/loading/types";
|
|
21
|
-
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
22
|
-
import { ModalKeysEnum } from "@src/modules/modal/types";
|
|
23
|
-
import { telemetry } from "@src/apiClient";
|
|
24
|
-
import { UserReviewType } from "@src/modules/userContext/types";
|
|
25
24
|
|
|
26
25
|
import { ReviewFormSelect } from "./ReviewFormSelect";
|
|
27
26
|
|