create-sitecore-jss 22.5.0-beta.12 → 22.5.0-beta.14
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/dist/templates/angular-xmcloud/package.json +2 -2
- package/dist/templates/nextjs/package.json +6 -6
- package/dist/templates/nextjs/scripts/templates/component-src.ts +1 -0
- package/dist/templates/nextjs/src/Bootstrap.tsx +1 -0
- package/dist/templates/nextjs/src/Layout.tsx +1 -1
- package/dist/templates/nextjs/src/Navigation.tsx +1 -0
- package/dist/templates/nextjs/src/NotFound.tsx +1 -0
- package/dist/templates/nextjs/src/Scripts.tsx +2 -0
- package/dist/templates/nextjs/src/components/ContentBlock.tsx +1 -0
- package/dist/templates/nextjs/src/lib/next-config/plugins/monorepo.js +2 -2
- package/dist/templates/nextjs/src/pages/404.tsx +1 -0
- package/dist/templates/nextjs/src/pages/[[...path]].tsx +1 -1
- package/dist/templates/nextjs/src/pages/_app.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/Navigation.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Checkbox.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-ContentList.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Custom.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Date.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-File.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Image.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-ItemLink.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Link.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Number.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-RichText.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Text.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-ConnectedDemo.dynamic.tsx +1 -1
- package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-IntegratedDemo.tsx +2 -3
- package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-Layout.tsx +5 -1
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-ComponentParams.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-CustomRouteType.tsx +2 -3
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-EditFrame.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Reuse.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Tabs-Tab.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Multilingual.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-RouteFields.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Section.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-SitecoreContext.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Specimen.tsx +1 -0
- package/dist/templates/nextjs-styleguide/src/pages/_app.tsx +1 -0
- package/dist/templates/nextjs-styleguide-tracking/src/Navigation.tsx +1 -0
- package/dist/templates/nextjs-styleguide-tracking/src/Scripts.tsx +1 -0
- package/dist/templates/nextjs-sxa/scripts/templates/component-src.ts +1 -1
- package/dist/templates/nextjs-sxa/src/Layout.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +2 -2
- package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +2 -2
- package/dist/templates/nextjs-sxa/src/components/ColumnSplitter.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Container.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Image.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/LinkList.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Navigation.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/PageContent.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/PartialDesignDynamicPlaceholder.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Promo.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/RichText.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/RowSplitter.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Title.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/lib/next-config/plugins/sass.js +3 -0
- package/dist/templates/nextjs-sxa/src/pages/404.tsx +1 -0
- package/dist/templates/nextjs-sxa/src/pages/500.tsx +1 -0
- package/dist/templates/nextjs-sxa/src/pages/_app.tsx +1 -0
- package/dist/templates/nextjs-xmcloud/package.json +2 -2
- package/dist/templates/nextjs-xmcloud/scripts/templates/byoc-component-src.ts +1 -1
- package/dist/templates/nextjs-xmcloud/src/Bootstrap.tsx +1 -1
- package/dist/templates/nextjs-xmcloud/src/Scripts.tsx +1 -0
- package/dist/templates/nextjs-xmcloud/src/byoc/index.tsx +1 -1
- package/dist/templates/nextjs-xmcloud/src/components/CdpPageView.tsx +1 -0
- package/dist/templates/nextjs-xmcloud/src/components/FEAASScripts.tsx +1 -0
- package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/preview-mode.ts +8 -10
- package/dist/templates/nextjs-xmcloud/src/pages/[[...path]].tsx +1 -1
- package/dist/templates/nextjs-xmcloud/src/pages/feaas/render.tsx +1 -0
- package/dist/templates/react/package.json +3 -3
- package/package.json +2 -2
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"prepare:proxy-build": "ts-node --project src/tsconfig.webpack-server.json ./scripts/proxy-build.ts"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@sitecore-cloudsdk/core": "^0.
|
|
12
|
-
"@sitecore-cloudsdk/events": "^0.
|
|
11
|
+
"@sitecore-cloudsdk/core": "^0.5.1",
|
|
12
|
+
"@sitecore-cloudsdk/events": "^0.5.1",
|
|
13
13
|
"font-awesome": "^4.7.0",
|
|
14
14
|
"sass": "^1.52.3",
|
|
15
15
|
"sass-alias": "^1.0.5"
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@sitecore-jss/sitecore-jss-nextjs": "<%- version %>",
|
|
29
29
|
"graphql": "~15.8.0",
|
|
30
30
|
"graphql-tag": "^2.12.6",
|
|
31
|
-
"next": "^
|
|
31
|
+
"next": "^15.3.1",
|
|
32
32
|
"next-localization": "^0.12.0",
|
|
33
|
-
"react": "^
|
|
34
|
-
"react-dom": "^
|
|
33
|
+
"react": "^19.1.0",
|
|
34
|
+
"react-dom": "^19.1.0",
|
|
35
35
|
"sharp": "0.32.6"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@sitecore-jss/sitecore-jss-cli": "<%- version %>",
|
|
47
47
|
"@sitecore-jss/sitecore-jss-dev-tools": "<%- version %>",
|
|
48
48
|
"@types/node": "^22.9.0",
|
|
49
|
-
"@types/react": "^
|
|
50
|
-
"@types/react-dom": "^
|
|
49
|
+
"@types/react": "^19.1.2",
|
|
50
|
+
"@types/react-dom": "^19.1.3",
|
|
51
51
|
"@typescript-eslint/eslint-plugin": "^8.14.0",
|
|
52
52
|
"@typescript-eslint/parser": "^8.14.0",
|
|
53
53
|
"chalk": "~4.1.2",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"eslint-config-next": "^13.1.5",
|
|
60
60
|
"eslint-config-prettier": "^8.6.0",
|
|
61
61
|
"eslint-plugin-prettier": "^4.2.1",
|
|
62
|
-
"eslint-plugin-react": "^7.
|
|
62
|
+
"eslint-plugin-react": "^7.37.5",
|
|
63
63
|
"eslint-plugin-yaml": "^0.5.0",
|
|
64
64
|
"graphql-let": "^0.18.6",
|
|
65
65
|
"npm-run-all": "~4.1.5",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
function generateComponentSrc(componentName: string): string {
|
|
7
7
|
return `import { Text, Field, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
8
8
|
import { ComponentProps } from 'lib/component-props';
|
|
9
|
+
import { JSX } from 'react';
|
|
9
10
|
|
|
10
11
|
type ${componentName}Props = ComponentProps & {
|
|
11
12
|
fields: {
|
|
@@ -5,7 +5,7 @@ const monorepoPlugin = (nextConfig = {}) => {
|
|
|
5
5
|
return Object.assign({}, nextConfig, {
|
|
6
6
|
webpack: (config, options) => {
|
|
7
7
|
if (options.isServer) {
|
|
8
|
-
config.externals = ['
|
|
8
|
+
config.externals = ['vertx', ...config.externals];
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// Overload the Webpack config if it was already overloaded
|
|
@@ -14,7 +14,7 @@ const monorepoPlugin = (nextConfig = {}) => {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
return config;
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import { Text, Link, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
2
3
|
import { ComponentProps } from 'lib/component-props';
|
|
3
4
|
import NextLink from 'next/link';
|
|
@@ -114,9 +115,7 @@ const GraphQLIntegratedDemo = (props: GraphQlIntegratedDemoProps): JSX.Element =
|
|
|
114
115
|
<ul>
|
|
115
116
|
{contextItem.children.results.map((child: Item) => (
|
|
116
117
|
<li key={child.id}>
|
|
117
|
-
<NextLink href={child.url.path}>
|
|
118
|
-
{child.pageTitle.value}
|
|
119
|
-
</NextLink>
|
|
118
|
+
<NextLink href={child.url.path}>{child.pageTitle.value}</NextLink>
|
|
120
119
|
(editable title too! <Text field={child.pageTitle.jsonValue} />)
|
|
121
120
|
</li>
|
|
122
121
|
))}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import { Placeholder, useSitecoreContext } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
2
3
|
import { ComponentProps } from 'lib/component-props';
|
|
3
4
|
|
|
@@ -28,7 +29,10 @@ const GraphQLLayout = ({ rendering }: ComponentProps): JSX.Element => {
|
|
|
28
29
|
</>
|
|
29
30
|
)}
|
|
30
31
|
{!disconnectedMode && (
|
|
31
|
-
<Placeholder
|
|
32
|
+
<Placeholder
|
|
33
|
+
name="<%- helper.getAppPrefix(appPrefix, appName) %>jss-graphql-layout"
|
|
34
|
+
rendering={rendering}
|
|
35
|
+
/>
|
|
32
36
|
)}
|
|
33
37
|
</div>
|
|
34
38
|
);
|
package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-CustomRouteType.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import Link from 'next/link';
|
|
2
3
|
import { useSitecoreContext, Text, RichText, Field } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
3
4
|
|
|
@@ -27,9 +28,7 @@ const StyleguideCustomRouteType = (): JSX.Element => {
|
|
|
27
28
|
|
|
28
29
|
<RichText field={fields.content} />
|
|
29
30
|
|
|
30
|
-
<Link href="/styleguide">
|
|
31
|
-
Return to the Styleguide
|
|
32
|
-
</Link>
|
|
31
|
+
<Link href="/styleguide">Return to the Styleguide</Link>
|
|
33
32
|
</div>
|
|
34
33
|
);
|
|
35
34
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @returns component src boilerplate as a string
|
|
5
5
|
*/
|
|
6
6
|
function generateComponentSrc(componentName: string): string {
|
|
7
|
-
return `import
|
|
7
|
+
return `import { JSX } from 'react';
|
|
8
8
|
import { ComponentParams, ComponentRendering } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
9
9
|
|
|
10
10
|
interface ${componentName}Props {
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
float: left;
|
|
14
14
|
}
|
|
15
15
|
>.component-content {
|
|
16
|
+
padding: 15px;
|
|
17
|
+
margin: 0 0 30px 0;
|
|
16
18
|
@include respond-to(all-mobile) {
|
|
17
19
|
margin: 0 10px 30px 10px;
|
|
18
20
|
}
|
|
19
|
-
padding: 15px;
|
|
20
|
-
margin: 0 0 30px 0;
|
|
21
21
|
&:before, &:after {
|
|
22
22
|
opacity: 0.7;
|
|
23
23
|
box-shadow: 0 17px 10px rgba(0, 0, 0, 0.7);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import {
|
|
2
3
|
ComponentParams,
|
|
3
4
|
ComponentRendering,
|
|
4
5
|
Placeholder,
|
|
5
6
|
} from '@sitecore-jss/sitecore-jss-nextjs';
|
|
6
|
-
import React from 'react';
|
|
7
7
|
|
|
8
8
|
interface ComponentProps {
|
|
9
9
|
rendering: ComponentRendering & { params: ComponentParams };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CSSProperties, JSX } from 'react';
|
|
1
2
|
import {
|
|
2
3
|
EditMode,
|
|
3
4
|
Field,
|
|
@@ -8,7 +9,6 @@ import {
|
|
|
8
9
|
Text,
|
|
9
10
|
useSitecoreContext,
|
|
10
11
|
} from '@sitecore-jss/sitecore-jss-nextjs';
|
|
11
|
-
import React, { CSSProperties } from 'react';
|
|
12
12
|
|
|
13
13
|
interface Fields {
|
|
14
14
|
Image: ImageField & { metadata?: { [key: string]: unknown } };
|
|
@@ -11,6 +11,9 @@ const SassAlias = require('sass-alias');
|
|
|
11
11
|
'@sass': path.join(__dirname, '../../../assets', 'sass'),
|
|
12
12
|
'@fontawesome': path.join(__dirname, '../../../../node_modules', 'font-awesome'),
|
|
13
13
|
}).getImporter(),
|
|
14
|
+
// temporary measure until new versions of bootstrap and font-awesome released
|
|
15
|
+
quietDeps: true,
|
|
16
|
+
silenceDeprecations: ["import", "legacy-js-api"],
|
|
14
17
|
},
|
|
15
18
|
});
|
|
16
19
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@sitecore/components": "~2.0.1",
|
|
4
|
-
"@sitecore-cloudsdk/core": "^0.
|
|
5
|
-
"@sitecore-cloudsdk/events": "^0.
|
|
4
|
+
"@sitecore-cloudsdk/core": "^0.5.1",
|
|
5
|
+
"@sitecore-cloudsdk/events": "^0.5.1",
|
|
6
6
|
"@sitecore-feaas/clientside": "^0.5.19"
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @returns component src boilerplate as a string
|
|
5
5
|
*/
|
|
6
6
|
function generateComponentSrc(componentName: string): string {
|
|
7
|
-
return `import
|
|
7
|
+
return `import { JSX } from 'react';
|
|
8
8
|
import * as FEAAS from '@sitecore-feaas/clientside/react';
|
|
9
9
|
|
|
10
10
|
interface ${componentName}Props {
|
|
@@ -33,10 +33,8 @@ class PreviewModePlugin implements Plugin {
|
|
|
33
33
|
} = context.previewData;
|
|
34
34
|
|
|
35
35
|
const componentService = new RestComponentLayoutService({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
siteName: site,
|
|
39
|
-
configurationName: config.layoutServiceConfigurationName,
|
|
36
|
+
sitecoreEdgeContextId: config.sitecoreEdgeContextId,
|
|
37
|
+
sitecoreEdgeUrl: config.sitecoreEdgeUrl,
|
|
40
38
|
});
|
|
41
39
|
|
|
42
40
|
const componentData = await componentService.fetchComponentData({
|
|
@@ -49,18 +47,18 @@ class PreviewModePlugin implements Plugin {
|
|
|
49
47
|
version,
|
|
50
48
|
});
|
|
51
49
|
|
|
52
|
-
// we can reuse editing service, fortunately
|
|
53
|
-
const dictionaryData = await graphQLEditingService.fetchDictionaryData({
|
|
54
|
-
siteName: site,
|
|
55
|
-
language,
|
|
56
|
-
});
|
|
57
|
-
|
|
58
50
|
if (!componentData) {
|
|
59
51
|
throw new Error(
|
|
60
52
|
`Unable to fetch editing data for preview ${JSON.stringify(context.previewData)}`
|
|
61
53
|
);
|
|
62
54
|
}
|
|
63
55
|
|
|
56
|
+
// we can reuse editing service, fortunately
|
|
57
|
+
const dictionaryData = await graphQLEditingService.fetchDictionaryData({
|
|
58
|
+
siteName: site,
|
|
59
|
+
language,
|
|
60
|
+
});
|
|
61
|
+
|
|
64
62
|
props.locale = context.previewData.language;
|
|
65
63
|
props.layoutData = componentData;
|
|
66
64
|
props.headLinks = [];
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"graphql": "~16.8.1",
|
|
36
36
|
"graphql-tag": "~2.12.6",
|
|
37
37
|
"i18next": "^22.0.6",
|
|
38
|
-
"react": "^
|
|
38
|
+
"react": "^19.1.0",
|
|
39
39
|
"react-app-polyfill": "^3.0.0",
|
|
40
|
-
"react-dom": "^
|
|
40
|
+
"react-dom": "^19.1.0",
|
|
41
41
|
"react-helmet": "~6.1.0",
|
|
42
42
|
"react-i18next": "~12.0.0",
|
|
43
43
|
"react-router-dom": "~6.4.4",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"eslint-config-prettier": "^8.5.0",
|
|
68
68
|
"eslint-plugin-import": "^2.26.0",
|
|
69
69
|
"eslint-plugin-prettier": "^4.2.1",
|
|
70
|
-
"eslint-plugin-react": "^7.
|
|
70
|
+
"eslint-plugin-react": "^7.37.5",
|
|
71
71
|
"eslint-plugin-yaml": "^0.5.0",
|
|
72
72
|
"express": "^4.18.2",
|
|
73
73
|
"fs-extra": "^11.1.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.5.0-beta.
|
|
3
|
+
"version": "22.5.0-beta.14",
|
|
4
4
|
"description": "Sitecore JSS initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"ts-node": "^10.9.1",
|
|
66
66
|
"typescript": "~5.6.3"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "5d4ba1509f35d860a1920c2728fb203fbf11b2a5"
|
|
69
69
|
}
|