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.
Files changed (82) hide show
  1. package/dist/templates/angular-xmcloud/package.json +2 -2
  2. package/dist/templates/nextjs/package.json +8 -21
  3. package/dist/templates/nextjs/scripts/templates/component-src.ts +1 -0
  4. package/dist/templates/nextjs/src/Bootstrap.tsx +1 -0
  5. package/dist/templates/nextjs/src/Layout.tsx +1 -1
  6. package/dist/templates/nextjs/src/Navigation.tsx +1 -0
  7. package/dist/templates/nextjs/src/NotFound.tsx +1 -0
  8. package/dist/templates/nextjs/src/Scripts.tsx +2 -0
  9. package/dist/templates/nextjs/src/components/ContentBlock.tsx +1 -0
  10. package/dist/templates/nextjs/src/lib/next-config/plugins/monorepo.js +2 -2
  11. package/dist/templates/nextjs/src/pages/404.tsx +1 -0
  12. package/dist/templates/nextjs/src/pages/[[...path]].tsx +1 -1
  13. package/dist/templates/nextjs/src/pages/_app.tsx +1 -0
  14. package/dist/templates/nextjs/src/temp/gitignore +0 -1
  15. package/dist/templates/nextjs/tsconfig.json +0 -1
  16. package/dist/templates/nextjs-styleguide/graphql.d.ts +5 -0
  17. package/dist/templates/nextjs-styleguide/package.json +3 -1
  18. package/dist/templates/nextjs-styleguide/src/Navigation.tsx +1 -0
  19. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Checkbox.tsx +1 -0
  20. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-ContentList.tsx +1 -0
  21. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Custom.tsx +1 -0
  22. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Date.tsx +1 -0
  23. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-File.tsx +1 -0
  24. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Image.tsx +1 -0
  25. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-ItemLink.tsx +1 -0
  26. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Link.tsx +1 -0
  27. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Number.tsx +1 -0
  28. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-RichText.tsx +1 -0
  29. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Text.tsx +1 -0
  30. package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-ConnectedDemo.dynamic.tsx +59 -16
  31. package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-IntegratedDemo.tsx +2 -3
  32. package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-Layout.tsx +5 -1
  33. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-ComponentParams.tsx +1 -0
  34. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-CustomRouteType.tsx +2 -3
  35. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-EditFrame.tsx +1 -0
  36. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Reuse.tsx +1 -0
  37. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Tabs-Tab.tsx +4 -1
  38. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Tabs.tsx +4 -3
  39. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout.tsx +1 -0
  40. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Multilingual.tsx +1 -0
  41. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-RouteFields.tsx +1 -0
  42. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Section.tsx +1 -0
  43. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-SitecoreContext.tsx +1 -0
  44. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Specimen.tsx +1 -0
  45. package/dist/templates/{nextjs → nextjs-styleguide}/src/lib/next-config/plugins/graphql.js +2 -14
  46. package/dist/templates/nextjs-styleguide/src/pages/_app.tsx +1 -0
  47. package/dist/templates/nextjs-styleguide-tracking/src/Navigation.tsx +1 -0
  48. package/dist/templates/nextjs-styleguide-tracking/src/Scripts.tsx +1 -0
  49. package/dist/templates/nextjs-styleguide-tracking/src/components/styleguide/Styleguide-Tracking.tsx +7 -7
  50. package/dist/templates/nextjs-sxa/scripts/templates/component-src.ts +1 -1
  51. package/dist/templates/nextjs-sxa/src/Layout.tsx +1 -1
  52. package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +2 -2
  53. package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +2 -2
  54. package/dist/templates/nextjs-sxa/src/components/ColumnSplitter.tsx +1 -1
  55. package/dist/templates/nextjs-sxa/src/components/Container.tsx +1 -1
  56. package/dist/templates/nextjs-sxa/src/components/Image.tsx +1 -1
  57. package/dist/templates/nextjs-sxa/src/components/LinkList.tsx +1 -1
  58. package/dist/templates/nextjs-sxa/src/components/Navigation.tsx +1 -1
  59. package/dist/templates/nextjs-sxa/src/components/PageContent.tsx +1 -1
  60. package/dist/templates/nextjs-sxa/src/components/PartialDesignDynamicPlaceholder.tsx +1 -1
  61. package/dist/templates/nextjs-sxa/src/components/Promo.tsx +1 -1
  62. package/dist/templates/nextjs-sxa/src/components/RichText.tsx +1 -1
  63. package/dist/templates/nextjs-sxa/src/components/RowSplitter.tsx +1 -1
  64. package/dist/templates/nextjs-sxa/src/components/Title.tsx +1 -1
  65. package/dist/templates/nextjs-sxa/src/lib/next-config/plugins/sass.js +3 -0
  66. package/dist/templates/nextjs-sxa/src/pages/404.tsx +1 -0
  67. package/dist/templates/nextjs-sxa/src/pages/500.tsx +1 -0
  68. package/dist/templates/nextjs-sxa/src/pages/_app.tsx +1 -0
  69. package/dist/templates/nextjs-xmcloud/package.json +2 -2
  70. package/dist/templates/nextjs-xmcloud/scripts/templates/byoc-component-src.ts +1 -1
  71. package/dist/templates/nextjs-xmcloud/src/Bootstrap.tsx +1 -1
  72. package/dist/templates/nextjs-xmcloud/src/Scripts.tsx +1 -0
  73. package/dist/templates/nextjs-xmcloud/src/byoc/index.tsx +1 -1
  74. package/dist/templates/nextjs-xmcloud/src/components/CdpPageView.tsx +1 -0
  75. package/dist/templates/nextjs-xmcloud/src/components/FEAASScripts.tsx +1 -0
  76. package/dist/templates/nextjs-xmcloud/src/pages/[[...path]].tsx +1 -1
  77. package/dist/templates/nextjs-xmcloud/src/pages/feaas/render.tsx +1 -0
  78. package/dist/templates/react/package.json +3 -3
  79. package/package.json +2 -2
  80. package/dist/templates/nextjs/.graphql-let.yml +0 -8
  81. package/dist/templates/nextjs/scripts/fetch-graphql-introspection-data.ts +0 -46
  82. 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 React from 'react';
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';
@@ -3,8 +3,8 @@
3
3
  .row.column-splitter {
4
4
  margin-left: 0;
5
5
  margin-right: 0;
6
- padding-left: $default-padding / 2;
7
- padding-right: $default-padding / 2;
6
+ padding-left: $default-padding * 0.5;
7
+ padding-right: $default-padding * 0.5;
8
8
  max-width: none;
9
9
 
10
10
  > div {
@@ -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,4 +1,4 @@
1
- import React from 'react';
1
+ import { JSX } from 'react';
2
2
  import {
3
3
  ComponentParams,
4
4
  ComponentRendering,
@@ -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 } };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { JSX } from 'react';
2
2
  import { Link as JssLink, Text, LinkField, TextField } from '@sitecore-jss/sitecore-jss-nextjs';
3
3
 
4
4
  type ResultsFieldLink = {
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import { useState, JSX } from 'react';
2
2
  import {
3
3
  Link,
4
4
  LinkField,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { JSX } from 'react';
2
2
  import {
3
3
  RichText as JssRichText,
4
4
  useSitecoreContext,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { JSX } from 'react';
2
2
  import { Placeholder, ComponentRendering } from '@sitecore-jss/sitecore-jss-nextjs';
3
3
 
4
4
  type DynamicPlaceholderProps = {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { JSX } from 'react';
2
2
  import {
3
3
  NextImage as JssImage,
4
4
  Link as JssLink,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { JSX } from 'react';
2
2
  import { Field, RichText as JssRichText } from '@sitecore-jss/sitecore-jss-nextjs';
3
3
 
4
4
  interface Fields {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { JSX } from 'react';
2
2
  import {
3
3
  ComponentParams,
4
4
  ComponentRendering,
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import {
2
3
  Link,
3
4
  LinkField,
@@ -5,7 +6,6 @@ import {
5
6
  TextField,
6
7
  useSitecoreContext,
7
8
  } from '@sitecore-jss/sitecore-jss-nextjs';
8
- import React from 'react';
9
9
 
10
10
  interface Fields {
11
11
  data: {
@@ -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,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import config from 'temp/config';
2
3
  import {
3
4
  GraphQLErrorPagesService,
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import Head from 'next/head';
2
3
  import {
3
4
  GraphQLErrorPagesService,
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import type { AppProps } from 'next/app';
2
3
  import { I18nProvider } from 'next-localization';
3
4
  import { SitecorePageProps } from 'lib/page-props';
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "dependencies": {
3
3
  "@sitecore/components": "~2.0.1",
4
- "@sitecore-cloudsdk/core": "^0.5.0",
5
- "@sitecore-cloudsdk/events": "^0.5.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 React from 'react';
7
+ return `import { JSX } from 'react';
8
8
  import * as FEAAS from '@sitecore-feaas/clientside/react';
9
9
 
10
10
  interface ${componentName}Props {
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'react';
1
+ import { useEffect, JSX } from 'react';
2
2
  import { SitecorePageProps } from 'lib/page-props';
3
3
  import { CloudSDK } from '@sitecore-cloudsdk/core/browser';
4
4
  import '@sitecore-cloudsdk/events/browser';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { EditingScripts } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  // The BYOC bundle imports external (BYOC) components into the app and makes sure they are ready to be used
3
4
  import BYOC from 'src/byoc';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { JSX } from 'react';
2
2
  import * as FEAAS from '@sitecore-feaas/clientside/react';
3
3
  import * as Events from '@sitecore-cloudsdk/events/browser';
4
4
  import '@sitecore/components/context';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import {
2
3
  CdpHelper,
3
4
  LayoutServicePageState,
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import Image from 'next/image';
2
3
  import * as FEAAS from '@sitecore-feaas/clientside/react';
3
4
  import nextConfig from 'next.config';
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'react';
1
+ import { useEffect, JSX } from 'react';
2
2
  <% if (prerender === 'SSG') { -%>
3
3
  import { GetStaticPaths, GetStaticProps } from 'next';
4
4
  <% } else if (prerender === 'SSR') { -%>
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { GetServerSideProps } from 'next';
2
3
  import BYOC from 'src/byoc';
3
4
  import * as FEAAS from '@sitecore-feaas/clientside/react';
@@ -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": "^18.2.0",
38
+ "react": "^19.0.0",
39
39
  "react-app-polyfill": "^3.0.0",
40
- "react-dom": "^18.2.0",
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.31.11",
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.1",
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": "31b27434eca1cdfcc402ad567b7ecff70670f675"
68
+ "gitHead": "98bc01faa6487f50b8f39498af7eac98ecc86445"
69
69
  }
@@ -1,8 +0,0 @@
1
- schema:
2
- - './src/temp/GraphQLIntrospectionResult.json'
3
- documents: 'src/**/*.graphql'
4
- plugins:
5
- - typescript-operations
6
- - typed-document-node
7
- config:
8
- useIndexSignature: true
@@ -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
- });