create-sitecore-jss 22.7.0-canary.1 → 22.7.0-canary.10
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 +8 -21
- 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/src/temp/gitignore +0 -1
- package/dist/templates/nextjs/tsconfig.json +0 -1
- package/dist/templates/nextjs-styleguide/graphql.d.ts +5 -0
- package/dist/templates/nextjs-styleguide/package.json +3 -1
- 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 +59 -16
- 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 +4 -1
- package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Tabs.tsx +4 -3
- 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 → nextjs-styleguide}/src/lib/next-config/plugins/graphql.js +2 -14
- 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-styleguide-tracking/src/components/styleguide/Styleguide-Tracking.tsx +7 -7
- 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/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
- package/dist/templates/nextjs/.graphql-let.yml +0 -8
- package/dist/templates/nextjs/scripts/fetch-graphql-introspection-data.ts +0 -46
- package/dist/templates/nextjs/src/temp/GraphQLIntrospectionResult.json +0 -22216
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This Layout is needed for Starter Kit.
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import { JSX } from 'react';
|
|
5
5
|
import Head from 'next/head';
|
|
6
6
|
import { Placeholder, LayoutServiceData, Field, HTMLLink } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
7
7
|
import config from 'temp/config';
|
|
@@ -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.
|
|
5
|
-
"@sitecore-cloudsdk/events": "^0.5.
|
|
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 {
|
|
@@ -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.0.0",
|
|
39
39
|
"react-app-polyfill": "^3.0.0",
|
|
40
|
-
"react-dom": "^
|
|
40
|
+
"react-dom": "^19.0.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.7.0-canary.
|
|
3
|
+
"version": "22.7.0-canary.10",
|
|
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": "98bc01faa6487f50b8f39498af7eac98ecc86445"
|
|
69
69
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { GraphQLRequestClient } from '@sitecore-jss/sitecore-jss-nextjs/graphql';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import { getIntrospectionQuery } from 'graphql';
|
|
4
|
-
|
|
5
|
-
// This script load graphql introspection data in order to use graphql code generator and generate typescript types
|
|
6
|
-
// The `jss graphql:update` command should be executed when Sitecore templates related to the site are altered.
|
|
7
|
-
|
|
8
|
-
let jssConfig;
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
// eslint-disable-next-line
|
|
12
|
-
jssConfig = require('../src/temp/config');
|
|
13
|
-
} catch (e) {
|
|
14
|
-
console.error(
|
|
15
|
-
'Unable to require JSS config. Ensure `jss setup` has been run, and the app has been started at least once after setup.'
|
|
16
|
-
);
|
|
17
|
-
console.error(e);
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
console.log(`Fetch graphql introspection data from ${jssConfig.graphQLEndpoint}...`);
|
|
22
|
-
|
|
23
|
-
const client = new GraphQLRequestClient(jssConfig.graphQLEndpoint, {
|
|
24
|
-
apiKey: jssConfig.sitecoreApiKey,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
client
|
|
28
|
-
.request(getIntrospectionQuery())
|
|
29
|
-
.then(result => {
|
|
30
|
-
fs.writeFile(
|
|
31
|
-
'./src/temp/GraphQLIntrospectionResult.json',
|
|
32
|
-
JSON.stringify(result, null, 2),
|
|
33
|
-
err => {
|
|
34
|
-
if (err) {
|
|
35
|
-
console.error('Error writing GraphQLIntrospectionResult file', err);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
console.log('GraphQL Introspection Data successfully fetched!');
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
})
|
|
43
|
-
.catch(e => {
|
|
44
|
-
console.error(e);
|
|
45
|
-
process.exit(1);
|
|
46
|
-
});
|