slice-machine-ui 1.20.1-dev-environments.2 → 1.20.1-dev-next-release.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AppLayout/index.tsx +10 -34
- package/components/Navigation/index.tsx +15 -32
- package/components/ReviewModal/ReviewForm.tsx +2 -2
- package/components/ReviewModal/ReviewModal.tsx +7 -0
- package/out/404.html +1 -1
- package/out/_next/static/BIxidu02_xbgjO9EV7tg4/_buildManifest.js +1 -0
- package/out/_next/static/chunks/{18539003-371d86ea83e7293b.js → 18539003-5d8b6a04053638af.js} +2 -2
- package/out/_next/static/chunks/{482-39cef3a713901788.js → 482-30c0f114c7213fa3.js} +1 -1
- package/out/_next/static/chunks/{125-f0e2eb84ee39757a.js → 505-fa47e200ac3a012d.js} +1 -1
- package/out/_next/static/chunks/{550-e72c08c598051224.js → 550-abf97d3008006056.js} +1 -1
- package/out/_next/static/chunks/{80-821a0b5d4ad61185.js → 80-72d903b2a0bd5dc3.js} +1 -1
- package/out/_next/static/chunks/840-8cec2bbd104111f2.js +1 -0
- package/out/_next/static/chunks/904-cb627b6d7b8068f9.js +1 -0
- package/out/_next/static/chunks/958-8f814daf5896ff97.js +1 -0
- package/out/_next/static/chunks/pages/{_app-61dfd5e4a504dad6.js → _app-2d01c2c528624eaf.js} +44 -44
- package/out/_next/static/chunks/pages/{changelog-4b8369d91d82b28b.js → changelog-fa36b9995c26e1d7.js} +1 -1
- package/out/_next/static/chunks/pages/changes-494c71511b2e8989.js +1 -0
- package/out/_next/static/chunks/pages/index-d8e3a2c0d712904f.js +1 -0
- package/out/_next/static/chunks/pages/labs-ebce03a4e7a95a4e.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-79a62d775e64898c.js → simulator-7b17cb59d0db03b5.js} +1 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-724893d27ffa426c.js → [variation]-763cc8c12e977b4a.js} +1 -1
- package/out/_next/static/chunks/pages/slices-22db04643850c1d8.js +1 -0
- package/out/_next/static/css/31841735992dea23.css +1 -0
- package/out/_next/static/css/58a89606d9ca9093.css +1 -0
- package/out/_next/static/css/5d18ccf403d4649a.css +1 -0
- package/out/_next/static/css/{51597cd1f01c4889.css → 78250665d395ea50.css} +1 -1
- package/out/_next/static/css/{16b41648cd1de03b.css → b0be58d878c0fac3.css} +1 -1
- package/out/_next/static/css/e48f99beffa085f5.css +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +7 -7
- package/pages/_app.tsx +39 -35
- package/pages/slices.tsx +0 -1
- package/src/components/Counter/Counter.css.ts +26 -0
- package/src/components/Counter/Counter.stories.tsx +17 -0
- package/src/components/Counter/Counter.tsx +16 -0
- package/src/components/Counter/index.ts +1 -0
- package/src/components/PageLayout/PageLayout.css.ts +3 -8
- package/src/components/PageLayout/PageLayout.stories.tsx +1 -10
- package/src/components/PageLayout/PageLayout.tsx +2 -7
- package/src/components/SideNav/SideNav.css.ts +10 -3
- package/src/components/SideNav/SideNav.stories.tsx +2 -29
- package/src/components/SideNav/SideNav.tsx +1 -5
- package/src/components/SideNav/index.ts +0 -1
- package/src/features/customTypes/__tests__/CustomTypeBuilderPage.test.tsx +3 -4
- package/src/features/inAppGuide/InAppGuideContext.tsx +47 -0
- package/src/features/inAppGuide/InAppGuideDialog.tsx +97 -0
- package/src/features/inAppGuide/inAppGuideContent.tsx +65 -0
- package/src/hooks/usePersistedState.ts +34 -0
- package/src/hooks/useRepositoryInformation.ts +24 -0
- package/src/icons/FlowerBackgroundIcon.tsx +17 -0
- package/src/icons/HelpIcon.tsx +19 -0
- package/test/pages/slices.test.tsx +8 -4
- package/test/src/modules/__fixtures__/serverState.ts +0 -2
- package/components/Navigation/Environment.tsx +0 -47
- package/components/Navigation/index.css.ts +0 -6
- package/out/_next/static/chunks/840-5b485c737b24324b.js +0 -1
- package/out/_next/static/chunks/904-6204ab2ad8798857.js +0 -1
- package/out/_next/static/chunks/958-c90d60818f1c468a.js +0 -1
- package/out/_next/static/chunks/pages/changes-db6e8c6be5ae076e.js +0 -1
- package/out/_next/static/chunks/pages/index-941b44c74dd339e4.js +0 -1
- package/out/_next/static/chunks/pages/labs-2922105ab714d32a.js +0 -1
- package/out/_next/static/chunks/pages/slices-93b7af2624c85b8e.js +0 -1
- package/out/_next/static/css/009bd7f5ac85fc6a.css +0 -1
- package/out/_next/static/css/3e88bd24e38f18d0.css +0 -1
- package/out/_next/static/css/6e4843007ff41825.css +0 -1
- package/out/_next/static/css/867d8d7ab4a75762.css +0 -1
- package/out/_next/static/eEMbH0pyO9pWG3REga3T2/_buildManifest.js +0 -1
- package/src/components/Divider/Divider.css.ts +0 -31
- package/src/components/Divider/Divider.stories.tsx +0 -27
- package/src/components/Divider/Divider.tsx +0 -25
- package/src/components/Divider/index.ts +0 -1
- package/src/components/SideNav/SideNavEnvironmentSelector.css.ts +0 -69
- package/src/components/SideNav/SideNavEnvironmentSelector.tsx +0 -163
- package/src/features/environments/actions/getActiveEnvironmentDomain.ts +0 -11
- package/src/features/environments/actions/getEnvironments.ts +0 -12
- package/src/features/environments/actions/setEnvironment.ts +0 -18
- package/src/features/environments/useActiveEnvironment.ts +0 -38
- package/src/features/environments/useEnvironments.ts +0 -7
- package/src/features/legacyState/actions/getLegacySliceMachineState.ts +0 -53
- package/src/features/legacyState/useLegacySliceMachineState.ts +0 -7
- /package/out/_next/static/{eEMbH0pyO9pWG3REga3T2 → BIxidu02_xbgjO9EV7tg4}/_ssgManifest.js +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Box, Button, ButtonGroup
|
|
1
|
+
import { Box, Button, ButtonGroup } from "@prismicio/editor-ui";
|
|
2
2
|
import { useRouter } from "next/router";
|
|
3
|
-
import { FC, PropsWithChildren
|
|
4
|
-
|
|
5
|
-
import { useActiveEnvironment } from "@src/features/environments/useActiveEnvironment";
|
|
3
|
+
import type { FC, PropsWithChildren } from "react";
|
|
6
4
|
|
|
7
5
|
import Navigation from "@components/Navigation";
|
|
8
6
|
import { Breadcrumb, type BreadcrumbProps } from "@src/components/Breadcrumb";
|
|
@@ -16,36 +14,14 @@ import {
|
|
|
16
14
|
export const AppLayout: FC<PropsWithChildren> = ({
|
|
17
15
|
children,
|
|
18
16
|
...otherProps
|
|
19
|
-
}) =>
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{children}
|
|
28
|
-
</PageLayoutWithActiveEnvironment>
|
|
29
|
-
</Suspense>
|
|
30
|
-
</ErrorBoundary>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const PageLayoutWithActiveEnvironment: FC<PropsWithChildren> = ({
|
|
35
|
-
children,
|
|
36
|
-
...otherProps
|
|
37
|
-
}) => {
|
|
38
|
-
const { activeEnvironment } = useActiveEnvironment();
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<PageLayout
|
|
42
|
-
activeEnvironmentKind={activeEnvironment?.kind ?? "prod"}
|
|
43
|
-
{...otherProps}
|
|
44
|
-
>
|
|
45
|
-
{children}
|
|
46
|
-
</PageLayout>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
17
|
+
}) => (
|
|
18
|
+
<PageLayout {...otherProps}>
|
|
19
|
+
<PageLayoutPane>
|
|
20
|
+
<Navigation />
|
|
21
|
+
</PageLayoutPane>
|
|
22
|
+
{children}
|
|
23
|
+
</PageLayout>
|
|
24
|
+
);
|
|
49
25
|
|
|
50
26
|
export const AppLayoutHeader: FC<PropsWithChildren> = ({
|
|
51
27
|
children,
|
|
@@ -13,61 +13,44 @@ import {
|
|
|
13
13
|
SideNavSeparator,
|
|
14
14
|
SideNavLink,
|
|
15
15
|
SideNavListItem,
|
|
16
|
+
SideNavLogo,
|
|
16
17
|
SideNavList,
|
|
17
18
|
UpdateInfo,
|
|
18
19
|
RightElement,
|
|
19
20
|
SideNav,
|
|
20
21
|
SideNavRepository,
|
|
21
22
|
} from "@src/components/SideNav/SideNav";
|
|
22
|
-
import { Divider } from "@src/components/Divider";
|
|
23
23
|
import { FolderIcon } from "@src/icons/FolderIcon";
|
|
24
24
|
import { userHasSeenTutorialsToolTip } from "@src/modules/userContext";
|
|
25
25
|
import { SliceMachineStoreType } from "@src/redux/type";
|
|
26
26
|
import useSliceMachineActions from "@src/modules/useSliceMachineActions";
|
|
27
|
-
import {
|
|
28
|
-
getApiEndpoint,
|
|
29
|
-
getChangelog,
|
|
30
|
-
getRepoName,
|
|
31
|
-
} from "@src/modules/environment";
|
|
27
|
+
import { getChangelog } from "@src/modules/environment";
|
|
32
28
|
import { CUSTOM_TYPES_MESSAGES } from "@src/features/customTypes/customTypesMessages";
|
|
33
|
-
import {
|
|
34
|
-
import { Environment } from "./Environment";
|
|
29
|
+
import { useRepositoryInformation } from "@src/hooks/useRepositoryInformation";
|
|
35
30
|
|
|
36
|
-
import
|
|
31
|
+
import { ChangesListItem } from "./ChangesListItem";
|
|
37
32
|
|
|
38
33
|
const Navigation: FC = () => {
|
|
39
|
-
const { changelog,
|
|
40
|
-
|
|
34
|
+
const { changelog, hasSeenTutorialsToolTip } = useSelector(
|
|
35
|
+
(store: SliceMachineStoreType) => ({
|
|
41
36
|
changelog: getChangelog(store),
|
|
42
|
-
repoName: getRepoName(store),
|
|
43
|
-
apiEndpoint: getApiEndpoint(store),
|
|
44
37
|
hasSeenTutorialsToolTip: userHasSeenTutorialsToolTip(store),
|
|
45
|
-
})
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
46
40
|
const router = useRouter();
|
|
47
|
-
const repoDomain = new URL(apiEndpoint).hostname.replace(".cdn", "");
|
|
48
|
-
const repoAddress = apiEndpoint.replace(".cdn.", ".").replace("/api/v2", "");
|
|
49
|
-
|
|
50
41
|
const { setUpdatesViewed, setSeenTutorialsToolTip } =
|
|
51
42
|
useSliceMachineActions();
|
|
43
|
+
const { repositoryName, repositoryDomain, repositoryUrl } =
|
|
44
|
+
useRepositoryInformation();
|
|
52
45
|
|
|
53
46
|
return (
|
|
54
47
|
<SideNav>
|
|
55
|
-
<
|
|
56
|
-
<Suspense>
|
|
57
|
-
<Environment />
|
|
58
|
-
</Suspense>
|
|
59
|
-
</ErrorBoundary>
|
|
60
|
-
|
|
61
|
-
<Divider
|
|
62
|
-
variant="edgeFaded"
|
|
63
|
-
color="grey6"
|
|
64
|
-
className={styles.environmentDivider}
|
|
65
|
-
/>
|
|
48
|
+
<SideNavLogo />
|
|
66
49
|
|
|
67
50
|
<SideNavRepository
|
|
68
|
-
repositoryName={
|
|
69
|
-
repositoryDomain={
|
|
70
|
-
href={
|
|
51
|
+
repositoryName={repositoryName}
|
|
52
|
+
repositoryDomain={repositoryDomain}
|
|
53
|
+
href={repositoryUrl}
|
|
71
54
|
/>
|
|
72
55
|
|
|
73
56
|
<SideNavList>
|
|
@@ -140,7 +123,7 @@ const Navigation: FC = () => {
|
|
|
140
123
|
<SideNavList position="bottom">
|
|
141
124
|
<SideNavLink
|
|
142
125
|
title="Invite team"
|
|
143
|
-
href={`${
|
|
126
|
+
href={`${repositoryUrl}/settings/users`}
|
|
144
127
|
Icon={(props) => <MathPlusIcon {...props} />}
|
|
145
128
|
onClick={() => {
|
|
146
129
|
void telemetry.track({
|
|
@@ -6,10 +6,12 @@ import { getLastSyncChange, getUserReview } from "@src/modules/userContext";
|
|
|
6
6
|
import { selectAllCustomTypes } from "@src/modules/availableCustomTypes";
|
|
7
7
|
import { getLibraries } from "@src/modules/slices";
|
|
8
8
|
import { hasLocal } from "@lib/models/common/ModelData";
|
|
9
|
+
import { useInAppGuide } from "@src/features/inAppGuide/InAppGuideContext";
|
|
9
10
|
|
|
10
11
|
import { ReviewForm } from "./ReviewForm";
|
|
11
12
|
|
|
12
13
|
export const ReviewModal: FC = () => {
|
|
14
|
+
const { isInAppGuideOpen } = useInAppGuide();
|
|
13
15
|
const { userReview, customTypes, libraries, lastSyncChange } = useSelector(
|
|
14
16
|
(store: SliceMachineStoreType) => ({
|
|
15
17
|
userReview: getUserReview(store),
|
|
@@ -19,6 +21,11 @@ export const ReviewModal: FC = () => {
|
|
|
19
21
|
}),
|
|
20
22
|
);
|
|
21
23
|
|
|
24
|
+
// Opt out directly if the in-app guide is open
|
|
25
|
+
if (isInAppGuideOpen) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
const sliceCount =
|
|
23
30
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
24
31
|
libraries && libraries.length
|
package/out/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/e48f99beffa085f5.css" as="style"/><link rel="stylesheet" href="/_next/static/css/e48f99beffa085f5.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-2d01c2c528624eaf.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/BIxidu02_xbgjO9EV7tg4/_buildManifest.js" defer=""></script><script src="/_next/static/BIxidu02_xbgjO9EV7tg4/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"BIxidu02_xbgjO9EV7tg4","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,e,a,t,i,b,f,n,u){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,i,b,"static/chunks/pages/index-d8e3a2c0d712904f.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-fa36b9995c26e1d7.js"],"/changes":[e,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,a,"static/css/78250665d395ea50.css","static/chunks/pages/changes-494c71511b2e8989.js"],"/custom-types":[c,i,b,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[f,s,c,t,n,u,"static/chunks/pages/custom-types/[customTypeId]-3a37eb3373bb8823.js"],"/labs":["static/chunks/pages/labs-ebce03a4e7a95a4e.js"],"/page-types/[pageTypeId]":[f,s,c,t,n,u,"static/chunks/pages/page-types/[pageTypeId]-733f3890c0466a05.js"],"/slices":[e,s,a,"static/css/58a89606d9ca9093.css","static/chunks/pages/slices-22db04643850c1d8.js"],"/slices/[lib]/[sliceName]/[variation]":[e,s,a,t,"static/css/31841735992dea23.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-763cc8c12e977b4a.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[e,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-5d8b6a04053638af.js","static/chunks/505-fa47e200ac3a012d.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-7b17cb59d0db03b5.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/958-8f814daf5896ff97.js","static/chunks/550-abf97d3008006056.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-72d903b2a0bd5dc3.js","static/chunks/482-30c0f114c7213fa3.js","static/chunks/840-8cec2bbd104111f2.js","static/css/b0be58d878c0fac3.css","static/chunks/474-2393e400314474be.js","static/chunks/904-cb627b6d7b8068f9.js","static/css/5d18ccf403d4649a.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|