create-sitecore-jss 22.6.0 → 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 (210) hide show
  1. package/LICENSE.MD +202 -202
  2. package/README.md +10 -10
  3. package/dist/templates/angular/src/assets/images/sc_logo.svg +52 -52
  4. package/dist/templates/angular-sxp/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  5. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  6. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  7. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  8. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  9. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  10. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  11. package/dist/templates/angular-sxp/data/dictionary/en.yml +4 -4
  12. package/dist/templates/angular-sxp/data/dictionary/{{language}}.yml +4 -4
  13. package/dist/templates/angular-sxp/data/routes/en.yml +61 -61
  14. package/dist/templates/angular-sxp/data/routes/graphql/en.yml +27 -27
  15. package/dist/templates/angular-sxp/data/routes/graphql/sample-1/en.yml +9 -9
  16. package/dist/templates/angular-sxp/data/routes/graphql/sample-2/en.yml +9 -9
  17. package/dist/templates/angular-sxp/data/routes/styleguide/custom-route-type/en.yml +12 -12
  18. package/dist/templates/angular-sxp/data/routes/styleguide/en.yml +271 -271
  19. package/dist/templates/angular-sxp/data/routes/styleguide/{{language}}.yml +25 -25
  20. package/dist/templates/angular-sxp/data/routes/{{language}}.yml +4 -4
  21. package/dist/templates/angular-sxp/sitecore/config/{{appName}}.config +90 -90
  22. package/dist/templates/angular-sxp/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +71 -71
  23. package/dist/templates/angular-sxp/sitecore/gitignore +2 -2
  24. package/dist/templates/angular-xmcloud/package.json +2 -2
  25. package/dist/templates/nextjs/package.json +8 -21
  26. package/dist/templates/nextjs/public/sc_logo.svg +52 -52
  27. package/dist/templates/nextjs/scripts/templates/component-src.ts +1 -0
  28. package/dist/templates/nextjs/src/Bootstrap.tsx +1 -0
  29. package/dist/templates/nextjs/src/Layout.tsx +1 -1
  30. package/dist/templates/nextjs/src/Navigation.tsx +1 -0
  31. package/dist/templates/nextjs/src/NotFound.tsx +1 -0
  32. package/dist/templates/nextjs/src/Scripts.tsx +2 -0
  33. package/dist/templates/nextjs/src/components/ContentBlock.tsx +1 -0
  34. package/dist/templates/nextjs/src/lib/next-config/plugins/monorepo.js +2 -2
  35. package/dist/templates/nextjs/src/pages/404.tsx +1 -0
  36. package/dist/templates/nextjs/src/pages/[[...path]].tsx +1 -1
  37. package/dist/templates/nextjs/src/pages/_app.tsx +1 -0
  38. package/dist/templates/nextjs/src/temp/gitignore +0 -1
  39. package/dist/templates/nextjs/tsconfig.json +0 -1
  40. package/dist/templates/nextjs-styleguide/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  41. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  42. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  43. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  44. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  45. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  46. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  47. package/dist/templates/nextjs-styleguide/data/dictionary/en.yml +4 -4
  48. package/dist/templates/nextjs-styleguide/data/dictionary/{{language}}.yml +4 -4
  49. package/dist/templates/nextjs-styleguide/data/routes/en.yml +63 -63
  50. package/dist/templates/nextjs-styleguide/data/routes/graphql/en.yml +27 -27
  51. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-1/en.yml +9 -9
  52. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-2/en.yml +9 -9
  53. package/dist/templates/nextjs-styleguide/data/routes/styleguide/custom-route-type/en.yml +12 -12
  54. package/dist/templates/nextjs-styleguide/data/routes/styleguide/en.yml +259 -259
  55. package/dist/templates/nextjs-styleguide/data/routes/styleguide/{{language}}.yml +25 -25
  56. package/dist/templates/nextjs-styleguide/data/routes/{{language}}.yml +4 -4
  57. package/dist/templates/nextjs-styleguide/graphql.d.ts +5 -0
  58. package/dist/templates/nextjs-styleguide/package.json +3 -1
  59. package/dist/templates/nextjs-styleguide/src/Navigation.tsx +1 -0
  60. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Checkbox.tsx +1 -0
  61. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-ContentList.tsx +1 -0
  62. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Custom.tsx +1 -0
  63. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Date.tsx +1 -0
  64. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-File.tsx +1 -0
  65. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Image.tsx +1 -0
  66. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-ItemLink.tsx +1 -0
  67. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Link.tsx +1 -0
  68. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Number.tsx +1 -0
  69. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-RichText.tsx +1 -0
  70. package/dist/templates/nextjs-styleguide/src/components/fields/Styleguide-FieldUsage-Text.tsx +1 -0
  71. package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-ConnectedDemo.dynamic.tsx +59 -16
  72. package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-IntegratedDemo.tsx +2 -3
  73. package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-Layout.tsx +5 -1
  74. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-ComponentParams.tsx +1 -0
  75. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-CustomRouteType.tsx +2 -3
  76. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-EditFrame.tsx +1 -0
  77. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Reuse.tsx +1 -0
  78. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Tabs-Tab.tsx +4 -1
  79. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout-Tabs.tsx +4 -3
  80. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Layout.tsx +1 -0
  81. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Multilingual.tsx +1 -0
  82. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-RouteFields.tsx +1 -0
  83. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Section.tsx +1 -0
  84. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-SitecoreContext.tsx +1 -0
  85. package/dist/templates/nextjs-styleguide/src/components/styleguide/Styleguide-Specimen.tsx +1 -0
  86. package/dist/templates/{nextjs → nextjs-styleguide}/src/lib/next-config/plugins/graphql.js +2 -14
  87. package/dist/templates/nextjs-styleguide/src/pages/_app.tsx +1 -0
  88. package/dist/templates/nextjs-styleguide-tracking/data/dictionary/en.yml +5 -5
  89. package/dist/templates/nextjs-styleguide-tracking/data/routes/tracking/en.yml +8 -8
  90. package/dist/templates/nextjs-styleguide-tracking/src/Navigation.tsx +1 -0
  91. package/dist/templates/nextjs-styleguide-tracking/src/Scripts.tsx +1 -0
  92. package/dist/templates/nextjs-styleguide-tracking/src/components/styleguide/Styleguide-Tracking.tsx +7 -7
  93. package/dist/templates/nextjs-sxa/scripts/templates/component-src.ts +1 -1
  94. package/dist/templates/nextjs-sxa/src/Layout.tsx +1 -1
  95. package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +2 -2
  96. package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +2 -2
  97. package/dist/templates/nextjs-sxa/src/components/ColumnSplitter.tsx +1 -1
  98. package/dist/templates/nextjs-sxa/src/components/Container.tsx +1 -1
  99. package/dist/templates/nextjs-sxa/src/components/Image.tsx +1 -1
  100. package/dist/templates/nextjs-sxa/src/components/LinkList.tsx +1 -1
  101. package/dist/templates/nextjs-sxa/src/components/Navigation.tsx +1 -1
  102. package/dist/templates/nextjs-sxa/src/components/PageContent.tsx +1 -1
  103. package/dist/templates/nextjs-sxa/src/components/PartialDesignDynamicPlaceholder.tsx +1 -1
  104. package/dist/templates/nextjs-sxa/src/components/Promo.tsx +1 -1
  105. package/dist/templates/nextjs-sxa/src/components/RichText.tsx +1 -1
  106. package/dist/templates/nextjs-sxa/src/components/RowSplitter.tsx +1 -1
  107. package/dist/templates/nextjs-sxa/src/components/Title.tsx +1 -1
  108. package/dist/templates/nextjs-sxa/src/lib/next-config/plugins/sass.js +3 -0
  109. package/dist/templates/nextjs-sxa/src/pages/404.tsx +1 -0
  110. package/dist/templates/nextjs-sxa/src/pages/500.tsx +1 -0
  111. package/dist/templates/nextjs-sxa/src/pages/_app.tsx +1 -0
  112. package/dist/templates/nextjs-xmcloud/package.json +2 -2
  113. package/dist/templates/nextjs-xmcloud/scripts/templates/byoc-component-src.ts +1 -1
  114. package/dist/templates/nextjs-xmcloud/src/Bootstrap.tsx +1 -1
  115. package/dist/templates/nextjs-xmcloud/src/Scripts.tsx +1 -0
  116. package/dist/templates/nextjs-xmcloud/src/byoc/index.tsx +1 -1
  117. package/dist/templates/nextjs-xmcloud/src/components/CdpPageView.tsx +1 -0
  118. package/dist/templates/nextjs-xmcloud/src/components/FEAASScripts.tsx +1 -0
  119. package/dist/templates/nextjs-xmcloud/src/pages/[[...path]].tsx +1 -1
  120. package/dist/templates/nextjs-xmcloud/src/pages/feaas/render.tsx +1 -0
  121. package/dist/templates/react/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  122. package/dist/templates/react/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  123. package/dist/templates/react/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  124. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  125. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  126. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  127. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  128. package/dist/templates/react/data/dictionary/en.yml +4 -4
  129. package/dist/templates/react/data/dictionary/{{language}}.yml +4 -4
  130. package/dist/templates/react/data/routes/en.yml +61 -61
  131. package/dist/templates/react/data/routes/graphql/en.yml +27 -27
  132. package/dist/templates/react/data/routes/graphql/sample-1/en.yml +9 -9
  133. package/dist/templates/react/data/routes/graphql/sample-2/en.yml +9 -9
  134. package/dist/templates/react/data/routes/styleguide/custom-route-type/en.yml +12 -12
  135. package/dist/templates/react/data/routes/styleguide/en.yml +263 -263
  136. package/dist/templates/react/data/routes/styleguide/{{language}}.yml +26 -26
  137. package/dist/templates/react/data/routes/{{language}}.yml +4 -4
  138. package/dist/templates/react/package.json +3 -3
  139. package/dist/templates/react-native/.buckconfig +6 -6
  140. package/dist/templates/react-native/.eslintrc +74 -74
  141. package/dist/templates/react-native/.gitattributes +1 -1
  142. package/dist/templates/react-native/.prettierrc +9 -9
  143. package/dist/templates/react-native/.vscode/launch.json +42 -42
  144. package/dist/templates/react-native/.vscode/settings.json +1 -1
  145. package/dist/templates/react-native/LICENSE.txt +202 -202
  146. package/dist/templates/react-native/README.MD +115 -115
  147. package/dist/templates/react-native/android/app/BUCK +55 -55
  148. package/dist/templates/react-native/android/app/build.gradle +201 -201
  149. package/dist/templates/react-native/android/app/build_defs.bzl +19 -19
  150. package/dist/templates/react-native/android/app/proguard-rules.pro +10 -10
  151. package/dist/templates/react-native/android/app/src/debug/AndroidManifest.xml +8 -8
  152. package/dist/templates/react-native/android/app/src/main/AndroidManifest.xml +26 -26
  153. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainActivity.java +15 -15
  154. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainApplication.java +74 -74
  155. package/dist/templates/react-native/android/app/src/main/res/values/strings.xml +3 -3
  156. package/dist/templates/react-native/android/app/src/main/res/values/styles.xml +9 -9
  157. package/dist/templates/react-native/android/build.gradle +38 -38
  158. package/dist/templates/react-native/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  159. package/dist/templates/react-native/android/gradle.properties +21 -21
  160. package/dist/templates/react-native/android/gradlew +188 -188
  161. package/dist/templates/react-native/android/gradlew.bat +100 -100
  162. package/dist/templates/react-native/android/settings.gradle +3 -3
  163. package/dist/templates/react-native/app.json +3 -3
  164. package/dist/templates/react-native/assets/img/sc_logo.svg +52 -52
  165. package/dist/templates/react-native/data/content/Styleguide/ItemLinkField/Item1/en.json +10 -10
  166. package/dist/templates/react-native/data/routes/en.json +22 -22
  167. package/dist/templates/react-native/data/routes/styleguide/en.json +227 -227
  168. package/dist/templates/react-native/data/routes/styleguide/{{language}}.json +31 -31
  169. package/dist/templates/react-native/data/routes/{{language}}.json +7 -7
  170. package/dist/templates/react-native/gitignore +60 -60
  171. package/dist/templates/react-native/ios/Podfile +53 -53
  172. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.h +15 -15
  173. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.m +42 -42
  174. package/dist/templates/react-native/ios/{{appName}}/Base.lproj/LaunchScreen.xib +42 -42
  175. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/AppIcon.appiconset/Contents.json +38 -38
  176. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/Contents.json +6 -6
  177. package/dist/templates/react-native/ios/{{appName}}/Info.plist +57 -57
  178. package/dist/templates/react-native/ios/{{appName}}/main.m +16 -16
  179. package/dist/templates/react-native/ios/{{appName}}-tvOS/Info.plist +53 -53
  180. package/dist/templates/react-native/ios/{{appName}}-tvOSTests/Info.plist +24 -24
  181. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative-tvOS.xcscheme +129 -129
  182. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative.xcscheme +129 -129
  183. package/dist/templates/react-native/ios/{{appName}}Tests/BasicSampleReactNativeTests.m +72 -72
  184. package/dist/templates/react-native/ios/{{appName}}Tests/Info.plist +24 -24
  185. package/dist/templates/react-native/package.json +78 -78
  186. package/dist/templates/react-native/sitecore/config/{{appName}}.config +47 -47
  187. package/dist/templates/react-native/sitecore/gitignore +2 -2
  188. package/dist/templates/vue/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  189. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  190. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  191. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  192. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  193. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  194. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  195. package/dist/templates/vue/data/dictionary/en.yml +7 -7
  196. package/dist/templates/vue/data/dictionary/{{language}}.yml +7 -7
  197. package/dist/templates/vue/data/routes/en.yml +63 -63
  198. package/dist/templates/vue/data/routes/graphql/en.yml +34 -34
  199. package/dist/templates/vue/data/routes/graphql/sample-1/en.yml +9 -9
  200. package/dist/templates/vue/data/routes/graphql/sample-2/en.yml +9 -9
  201. package/dist/templates/vue/data/routes/styleguide/custom-route-type/en.yml +12 -12
  202. package/dist/templates/vue/data/routes/styleguide/en.yml +264 -264
  203. package/dist/templates/vue/data/routes/styleguide/{{language}}.yml +26 -26
  204. package/dist/templates/vue/data/routes/{{language}}.yml +4 -4
  205. package/dist/templates/vue/public/img/icons/safari-pinned-tab.svg +75 -75
  206. package/dist/templates/vue/src/assets/sc_logo.svg +52 -52
  207. package/package.json +2 -2
  208. package/dist/templates/nextjs/.graphql-let.yml +0 -8
  209. package/dist/templates/nextjs/scripts/fetch-graphql-introspection-data.ts +0 -46
  210. package/dist/templates/nextjs/src/temp/GraphQLIntrospectionResult.json +0 -22216
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Field, Text, Item, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Field, Text, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { DateField, Field, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { File, FileField, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { NextImage, ImageField, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Field, Text, Item, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Link, LinkField, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Text, Field, getFieldValue, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { RichText, Field, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Text, Field, getFieldValue, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from 'components/styleguide/Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,4 +1,4 @@
1
- import React, { useEffect } from 'react';
1
+ import React, { JSX, useEffect } from 'react';
2
2
  import {
3
3
  Text,
4
4
  Link,
@@ -8,24 +8,67 @@ import {
8
8
  withDatasourceCheck,
9
9
  } from '@sitecore-jss/sitecore-jss-nextjs';
10
10
  import { GraphQLRequestClient } from '@sitecore-jss/sitecore-jss-nextjs/graphql';
11
- import {
12
- resetEditorChromes
13
- } from '@sitecore-jss/sitecore-jss-nextjs/utils';
11
+ import { resetEditorChromes } from '@sitecore-jss/sitecore-jss-nextjs/utils';
14
12
  import NextLink from 'next/link';
15
- import { ConnectedDemoQueryDocument } from './GraphQL-ConnectedDemo.dynamic.graphql';
16
- import {
17
- <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute as AppRoute,
18
- Item,
19
- <%- helper.getAppPrefix(appPrefix, appName, false) %>GraphQlConnectedDemo as GrapQLConnectedDemoDatasource,
20
- } from 'graphql-types';
13
+ import ConnectedDemoQuery from './GraphQL-ConnectedDemo.dynamic.graphql';
21
14
  import { ComponentProps } from 'lib/component-props';
22
15
  import config from 'temp/config';
23
16
 
24
- type RouteItem = AppRoute & Item;
17
+ type GraphQLConnectedDemoDataSource = {
18
+ sample1: {
19
+ jsonValue: {
20
+ value: string;
21
+ };
22
+ value: string;
23
+ };
24
+ sample2: {
25
+ definition: {
26
+ type: string;
27
+ shared: boolean;
28
+ };
29
+ jsonValue: {
30
+ value: {
31
+ href: string;
32
+ linktype: string;
33
+ target: string;
34
+ text: string;
35
+ url: string;
36
+ };
37
+ };
38
+ target: string;
39
+ text: string;
40
+ url: string;
41
+ };
42
+ name: string;
43
+ id: string;
44
+ };
45
+
46
+ type Item = {
47
+ id: string;
48
+ url: {
49
+ path: string;
50
+ };
51
+ pageTitle: {
52
+ value: string;
53
+ jsonValue: {
54
+ value: string;
55
+ };
56
+ };
57
+ };
58
+
59
+ type ItemSearchResults = {
60
+ results: Item[];
61
+ };
25
62
 
26
63
  type GraphQLConnectedDemoData = {
27
- datasource: GrapQLConnectedDemoDatasource;
28
- contextItem: RouteItem;
64
+ datasource: GraphQLConnectedDemoDataSource;
65
+ contextItem: {
66
+ id: string;
67
+ children: ItemSearchResults;
68
+ pageTitle: {
69
+ value: string;
70
+ };
71
+ };
29
72
  };
30
73
 
31
74
  type GraphQLConnectedDemoProps = ComponentProps & GraphQLConnectedDemoData;
@@ -82,7 +125,7 @@ const GraphQLConnectedDemo = (props: GraphQLConnectedDemoProps): JSX.Element =>
82
125
  children:
83
126
  <ul>
84
127
  {props.contextItem.children.results.map((child) => {
85
- const routeItem = child as RouteItem;
128
+ const routeItem = child as Item;
86
129
 
87
130
  return (
88
131
  <li key={routeItem.id}>
@@ -115,7 +158,7 @@ export const getStaticProps: GetStaticComponentProps = async (rendering, layoutD
115
158
 
116
159
  const result = await graphQLClient.request<GraphQLConnectedDemoData>(
117
160
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
118
- ConnectedDemoQueryDocument as any,
161
+ ConnectedDemoQuery,
119
162
  {
120
163
  datasource: rendering.dataSource,
121
164
  contextItem: layoutData?.sitecore?.route?.itemId,
@@ -143,7 +186,7 @@ export const getServerSideProps: GetServerSideComponentProps = async (rendering,
143
186
 
144
187
  const result = await graphQLClient.request<GraphQLConnectedDemoData>(
145
188
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
146
- ConnectedDemoQueryDocument as any,
189
+ ConnectedDemoQuery,
147
190
  {
148
191
  datasource: rendering.dataSource,
149
192
  contextItem: layoutData?.sitecore?.route?.itemId,
@@ -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
  &nbsp; (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 name="<%- helper.getAppPrefix(appPrefix, appName) %>jss-graphql-layout" rendering={rendering} />
32
+ <Placeholder
33
+ name="<%- helper.getAppPrefix(appPrefix, appName) %>jss-graphql-layout"
34
+ rendering={rendering}
35
+ />
32
36
  )}
33
37
  </div>
34
38
  );
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import StyleguideSpecimen from './Styleguide-Specimen';
2
3
  import { ComponentProps } from 'lib/component-props';
3
4
  import { StyleguideSpecimenFields } from 'lib/component-props/styleguide';
@@ -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
  };
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Field, Item, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import { ComponentProps } from 'lib/component-props';
3
4
  import { EditFrame } from '@sitecore-jss/sitecore-jss-nextjs';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Placeholder } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from './Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import {
2
3
  Text,
3
4
  RichText,
@@ -7,13 +8,15 @@ import {
7
8
  } from '@sitecore-jss/sitecore-jss-nextjs';
8
9
  import { ComponentProps } from 'lib/component-props';
9
10
 
10
- type StyleguideLayoutTabsTabProps = ComponentProps & {
11
+ export type TabProps = {
11
12
  fields: {
12
13
  content: Field<string>;
13
14
  title: Field<string>;
14
15
  };
15
16
  };
16
17
 
18
+ type StyleguideLayoutTabsTabProps = ComponentProps & TabProps;
19
+
17
20
  /**
18
21
  * This is a single tab within the tabs sample component. These are added to the tabs placeholder.
19
22
  * This component demonstrates conditionally altering rendering when in the Sitecore Experience Editor to improve
@@ -3,6 +3,7 @@ import { withPlaceholder, withSitecoreContext, Text } from '@sitecore-jss/siteco
3
3
  import StyleguideSpecimen from './Styleguide-Specimen';
4
4
  import { ComponentWithContextProps } from 'lib/component-props';
5
5
  import { StyleguideSpecimenFields } from 'lib/component-props/styleguide';
6
+ import { TabProps } from './Styleguide-Layout-Tabs-Tab';
6
7
 
7
8
  interface StyleguideLayoutTabsState {
8
9
  activeTabIndex: number;
@@ -55,7 +56,7 @@ class StyleguideLayoutTabs extends React.Component<
55
56
  */}
56
57
  {!isEditing &&
57
58
  (tabsPlaceholder || [])
58
- .filter((tab: ReactElement) => tab.props && tab.props.fields)
59
+ .filter((tab: ReactElement) => tab.props && (tab.props as TabProps).fields)
59
60
  .map((tab: ReactElement, index: number) => (
60
61
  <li className="nav-item" key={`tab${index}`}>
61
62
  <a
@@ -63,14 +64,14 @@ class StyleguideLayoutTabs extends React.Component<
63
64
  onClick={() => this.setActiveTab(index)}
64
65
  href="#t"
65
66
  >
66
- <Text field={tab.props.fields.title} />
67
+ <Text field={(tab.props as TabProps).fields.title} />
67
68
  </a>
68
69
  </li>
69
70
  ))}
70
71
  </ul>
71
72
  <div className="p-3 border-left border-right border-bottom">
72
73
  {(tabsPlaceholder || []).map((tab: ReactElement) => {
73
- const isValid = tab.props && tab.props.fields;
74
+ const isValid = tab.props && (tab.props as TabProps).fields;
74
75
 
75
76
  // allow experience editor markup components to render
76
77
  if (!isValid && isEditing) return tab;
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import {
2
3
  Placeholder,
3
4
  getChildPlaceholder,
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Text, Field, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import Link from 'next/link';
3
4
  import { useI18n } from 'next-localization';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import Link from 'next/link';
2
3
  import { Text, Field, useSitecoreContext } from '@sitecore-jss/sitecore-jss-nextjs';
3
4
  import StyleguideSpecimen from './Styleguide-Specimen';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Field, Placeholder, Text, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import { ComponentProps } from 'lib/component-props';
3
4
 
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { useSitecoreContext } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import StyleguideSpecimen from './Styleguide-Specimen';
3
4
  import { ComponentProps } from 'lib/component-props';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { Text, RichText, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
  import { ComponentProps } from 'lib/component-props';
3
4
  import { StyleguideSpecimenFields } from 'lib/component-props/styleguide';
@@ -7,19 +7,7 @@ const graphqlPlugin = (nextConfig = {}) => {
7
7
  config.module.rules.push({
8
8
  test: /\.graphql$/,
9
9
  exclude: /node_modules/,
10
- use: [options.defaultLoaders.babel, { loader: 'graphql-let/loader' }],
11
- });
12
-
13
- config.module.rules.push({
14
- test: /\.graphqls$/,
15
- exclude: /node_modules/,
16
- use: ['graphql-let/schema/loader'],
17
- });
18
-
19
- config.module.rules.push({
20
- test: /\.ya?ml$/,
21
- type: 'json',
22
- use: 'yaml-loader',
10
+ loader: 'graphql-tag/loader',
23
11
  });
24
12
 
25
13
  // Overload the Webpack config if it was already overloaded
@@ -28,7 +16,7 @@ const graphqlPlugin = (nextConfig = {}) => {
28
16
  }
29
17
 
30
18
  return config;
31
- }
19
+ },
32
20
  });
33
21
  };
34
22
 
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import type { AppProps } from 'next/app';
2
3
  import Router from 'next/router';
3
4
  import { I18nProvider } from 'next-localization';
@@ -1,5 +1,5 @@
1
- styleguide-sample: This is a dictionary entry in English as a demonstration
2
- Documentation: Documentation
3
- Styleguide: Styleguide
4
- GraphQL: GraphQL
5
- Tracking: Tracking
1
+ styleguide-sample: This is a dictionary entry in English as a demonstration
2
+ Documentation: Documentation
3
+ Styleguide: Styleguide
4
+ GraphQL: GraphQL
5
+ Tracking: Tracking
@@ -1,8 +1,8 @@
1
- fields:
2
- pageTitle: Styleguide Tracking | Sitecore JSS
3
- placeholders:
4
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
5
- - componentName: Styleguide-Tracking
6
- fields:
7
- heading: Tracking
8
- description: <p><small>JSS supports tracking Sitecore analytics events from within apps. Give it a try with this handy interactive demo.</small></p>
1
+ fields:
2
+ pageTitle: Styleguide Tracking | Sitecore JSS
3
+ placeholders:
4
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
5
+ - componentName: Styleguide-Tracking
6
+ fields:
7
+ heading: Tracking
8
+ description: <p><small>JSS supports tracking Sitecore analytics events from within apps. Give it a try with this handy interactive demo.</small></p>
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import Link from 'next/link';
2
3
  import { useI18n } from 'next-localization';
3
4
  import config from 'temp/config';
@@ -1,3 +1,4 @@
1
+ import { JSX } from 'react';
1
2
  import { VisitorIdentification } from '@sitecore-jss/sitecore-jss-nextjs';
2
3
 
3
4
  const Scripts = (): JSX.Element => {
@@ -18,13 +18,13 @@ type StyleguideTrackingProps = ComponentWithContextProps & StyleguideSpecimenFie
18
18
  * Demonstrates analytics tracking patterns (xDB)
19
19
  */
20
20
  class StyleguideTracking extends React.Component<StyleguideTrackingProps> {
21
- private event: RefObject<HTMLInputElement>;
22
- private goal: RefObject<HTMLInputElement>;
23
- private outcomeName: RefObject<HTMLInputElement>;
24
- private outcomeValue: RefObject<HTMLInputElement>;
25
- private campaign: RefObject<HTMLInputElement>;
26
- private pageId: RefObject<HTMLInputElement>;
27
- private pageUrl: RefObject<HTMLInputElement>;
21
+ private event: RefObject<HTMLInputElement | null>;
22
+ private goal: RefObject<HTMLInputElement | null>;
23
+ private outcomeName: RefObject<HTMLInputElement | null>;
24
+ private outcomeValue: RefObject<HTMLInputElement | null>;
25
+ private campaign: RefObject<HTMLInputElement | null>;
26
+ private pageId: RefObject<HTMLInputElement | null>;
27
+ private pageUrl: RefObject<HTMLInputElement | null>;
28
28
 
29
29
  private trackingApiOptions: TrackingRequestOptions;
30
30
 
@@ -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 { ComponentParams, ComponentRendering } from '@sitecore-jss/sitecore-jss-nextjs';
9
9
 
10
10
  interface ${componentName}Props {
@@ -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.4.2",
5
- "@sitecore-cloudsdk/events": "^0.4.2",
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 {