create-sitecore-jss 22.10.0-canary.8 → 22.10.0

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 (229) hide show
  1. package/LICENSE.MD +202 -202
  2. package/README.md +10 -10
  3. package/dist/templates/angular/package.json +24 -25
  4. package/dist/templates/angular/scripts/generate-component-factory/template.ts +1 -3
  5. package/dist/templates/angular/server.bundle.ts +3 -2
  6. package/dist/templates/angular/src/app/ViewBag.ts +4 -0
  7. package/dist/templates/angular/src/app/app.component.ts +10 -9
  8. package/dist/templates/angular/src/app/app.module.ts +3 -1
  9. package/dist/templates/angular/src/app/app.server.module.ts +4 -5
  10. package/dist/templates/angular/src/app/components/app-components.shared.module.ts +16 -3
  11. package/dist/templates/angular/src/app/components/content-block/content-block.component.ts +2 -1
  12. package/dist/templates/angular/src/app/i18n/jss-translation-client-loader.service.ts +3 -2
  13. package/dist/templates/angular/src/app/i18n/jss-translation-server-loader.service.ts +6 -4
  14. package/dist/templates/angular/src/app/injection-tokens.ts +13 -0
  15. package/dist/templates/angular/src/app/jss-context.server-side.service.ts +8 -10
  16. package/dist/templates/angular/src/app/jss-context.service.ts +6 -4
  17. package/dist/templates/angular/src/app/jss-graphql.module.ts +58 -48
  18. package/dist/templates/angular/src/app/jss-graphql.service.ts +6 -6
  19. package/dist/templates/angular/src/app/jss-meta.service.ts +3 -2
  20. package/dist/templates/angular/src/app/routing/layout/layout.component.ts +10 -4
  21. package/dist/templates/angular/src/app/routing/navigation/navigation.component.ts +3 -0
  22. package/dist/templates/angular/src/app/routing/not-found/not-found.component.ts +1 -1
  23. package/dist/templates/angular/src/app/routing/routing.module.ts +3 -4
  24. package/dist/templates/angular/src/app/routing/scripts/scripts.module.ts +1 -1
  25. package/dist/templates/angular/src/assets/images/sc_logo.svg +52 -52
  26. package/dist/templates/angular-sxp/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  27. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  28. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  29. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  30. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  31. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  32. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  33. package/dist/templates/angular-sxp/data/dictionary/en.yml +4 -4
  34. package/dist/templates/angular-sxp/data/dictionary/{{language}}.yml +4 -4
  35. package/dist/templates/angular-sxp/data/routes/en.yml +61 -61
  36. package/dist/templates/angular-sxp/data/routes/graphql/en.yml +27 -27
  37. package/dist/templates/angular-sxp/data/routes/graphql/sample-1/en.yml +9 -9
  38. package/dist/templates/angular-sxp/data/routes/graphql/sample-2/en.yml +9 -9
  39. package/dist/templates/angular-sxp/data/routes/styleguide/custom-route-type/en.yml +12 -12
  40. package/dist/templates/angular-sxp/data/routes/styleguide/en.yml +271 -271
  41. package/dist/templates/angular-sxp/data/routes/styleguide/{{language}}.yml +25 -25
  42. package/dist/templates/angular-sxp/data/routes/{{language}}.yml +4 -4
  43. package/dist/templates/angular-sxp/sitecore/config/{{appName}}.config +90 -90
  44. package/dist/templates/angular-sxp/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +71 -71
  45. package/dist/templates/angular-sxp/sitecore/gitignore +2 -2
  46. package/dist/templates/angular-sxp/src/app/components/app-components.shared.module.ts +1 -3
  47. package/dist/templates/angular-sxp/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.html +41 -39
  48. package/dist/templates/angular-sxp/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.ts +5 -3
  49. package/dist/templates/angular-sxp/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.html +6 -4
  50. package/dist/templates/angular-sxp/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.ts +4 -4
  51. package/dist/templates/angular-sxp/src/app/components/graph-ql-layout/graph-ql-layout.component.html +3 -4
  52. package/dist/templates/angular-sxp/src/app/components/graph-ql-layout/graph-ql-layout.component.ts +4 -4
  53. package/dist/templates/angular-sxp/src/app/components/shared/styleguide-specimen/styleguide-specimen.component.ts +3 -4
  54. package/dist/templates/angular-sxp/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.ts +5 -5
  55. package/dist/templates/angular-sxp/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.module.ts +2 -5
  56. package/dist/templates/angular-sxp/src/app/components/styleguide-component-params/styleguide-component-params.component.html +8 -4
  57. package/dist/templates/angular-sxp/src/app/components/styleguide-component-params/styleguide-component-params.component.ts +2 -2
  58. package/dist/templates/angular-sxp/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.ts +5 -5
  59. package/dist/templates/angular-sxp/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.html +7 -3
  60. package/dist/templates/angular-sxp/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.ts +13 -4
  61. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.ts +2 -2
  62. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.html +20 -16
  63. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.ts +20 -3
  64. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.ts +2 -0
  65. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.ts +4 -1
  66. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.ts +3 -1
  67. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.ts +3 -1
  68. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.html +4 -4
  69. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.ts +4 -1
  70. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.ts +3 -1
  71. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.ts +2 -0
  72. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.ts +3 -1
  73. package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.ts +3 -1
  74. package/dist/templates/angular-sxp/src/app/components/styleguide-layout/styleguide-layout.component.html +12 -8
  75. package/dist/templates/angular-sxp/src/app/components/styleguide-layout/styleguide-layout.component.ts +2 -4
  76. package/dist/templates/angular-sxp/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.ts +3 -1
  77. package/dist/templates/angular-sxp/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.html +18 -15
  78. package/dist/templates/angular-sxp/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.ts +6 -4
  79. package/dist/templates/angular-sxp/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.html +2 -2
  80. package/dist/templates/angular-sxp/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.ts +4 -4
  81. package/dist/templates/angular-sxp/src/app/components/styleguide-multilingual/styleguide-multilingual.component.ts +7 -3
  82. package/dist/templates/angular-sxp/src/app/components/styleguide-route-fields/styleguide-route-fields.component.ts +5 -4
  83. package/dist/templates/angular-sxp/src/app/components/styleguide-section/styleguide-section.component.ts +2 -1
  84. package/dist/templates/angular-sxp/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.ts +7 -4
  85. package/dist/templates/angular-sxp/src/app/components/styleguide-tracking/styleguide-tracking.component.html +6 -2
  86. package/dist/templates/angular-sxp/src/app/components/styleguide-tracking/styleguide-tracking.component.ts +12 -12
  87. package/dist/templates/angular-sxp/src/app/jss-data-fetcher.service.ts +4 -2
  88. package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.component.ts +10 -0
  89. package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.module.ts +1 -1
  90. package/dist/templates/angular-sxp/src/app/routing/scripts/visitor-identification/visitor-identification.component.ts +6 -3
  91. package/dist/templates/angular-xmcloud/scripts/generate-component-factory/template.ts +1 -3
  92. package/dist/templates/angular-xmcloud/src/app/components/app-components.shared.module.ts +1 -2
  93. package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.html +6 -4
  94. package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.ts +4 -1
  95. package/dist/templates/angular-xmcloud/src/app/components/container/container.component.html +14 -5
  96. package/dist/templates/angular-xmcloud/src/app/components/container/container.component.ts +3 -0
  97. package/dist/templates/angular-xmcloud/src/app/components/image/image.component.html +21 -23
  98. package/dist/templates/angular-xmcloud/src/app/components/image/image.component.ts +5 -5
  99. package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.html +11 -10
  100. package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.ts +3 -0
  101. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.html +14 -17
  102. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.ts +3 -3
  103. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.html +3 -6
  104. package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.ts +8 -5
  105. package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.ts +4 -4
  106. package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.ts +2 -0
  107. package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.html +4 -6
  108. package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.ts +3 -0
  109. package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.html +3 -4
  110. package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.ts +3 -0
  111. package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.html +10 -9
  112. package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.ts +3 -0
  113. package/dist/templates/angular-xmcloud/src/app/components/title/title.component.html +4 -5
  114. package/dist/templates/angular-xmcloud/src/app/components/title/title.component.ts +5 -5
  115. package/dist/templates/angular-xmcloud/src/app/jss-link.service.ts +2 -2
  116. package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.html +38 -36
  117. package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.ts +10 -6
  118. package/dist/templates/angular-xmcloud/src/app/routing/scripts/cdp-page-view.component.ts +2 -3
  119. package/dist/templates/angular-xmcloud/src/app/routing/scripts/cloud-sdk-init.component.ts +2 -2
  120. package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.component.ts +13 -0
  121. package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.module.ts +1 -2
  122. package/dist/templates/nextjs/public/sc_logo.svg +52 -52
  123. package/dist/templates/nextjs-styleguide/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  124. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  125. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  126. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  127. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  128. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  129. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  130. package/dist/templates/nextjs-styleguide/data/dictionary/en.yml +4 -4
  131. package/dist/templates/nextjs-styleguide/data/dictionary/{{language}}.yml +4 -4
  132. package/dist/templates/nextjs-styleguide/data/routes/en.yml +63 -63
  133. package/dist/templates/nextjs-styleguide/data/routes/graphql/en.yml +27 -27
  134. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-1/en.yml +9 -9
  135. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-2/en.yml +9 -9
  136. package/dist/templates/nextjs-styleguide/data/routes/styleguide/custom-route-type/en.yml +12 -12
  137. package/dist/templates/nextjs-styleguide/data/routes/styleguide/en.yml +259 -259
  138. package/dist/templates/nextjs-styleguide/data/routes/styleguide/{{language}}.yml +25 -25
  139. package/dist/templates/nextjs-styleguide/data/routes/{{language}}.yml +4 -4
  140. package/dist/templates/nextjs-styleguide-tracking/data/dictionary/en.yml +5 -5
  141. package/dist/templates/nextjs-styleguide-tracking/data/routes/tracking/en.yml +8 -8
  142. package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +14 -14
  143. package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +42 -42
  144. package/dist/templates/react/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  145. package/dist/templates/react/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  146. package/dist/templates/react/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  147. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  148. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  149. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  150. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  151. package/dist/templates/react/data/dictionary/en.yml +4 -4
  152. package/dist/templates/react/data/dictionary/{{language}}.yml +4 -4
  153. package/dist/templates/react/data/routes/en.yml +61 -61
  154. package/dist/templates/react/data/routes/graphql/en.yml +27 -27
  155. package/dist/templates/react/data/routes/graphql/sample-1/en.yml +9 -9
  156. package/dist/templates/react/data/routes/graphql/sample-2/en.yml +9 -9
  157. package/dist/templates/react/data/routes/styleguide/custom-route-type/en.yml +12 -12
  158. package/dist/templates/react/data/routes/styleguide/en.yml +263 -263
  159. package/dist/templates/react/data/routes/styleguide/{{language}}.yml +26 -26
  160. package/dist/templates/react/data/routes/{{language}}.yml +4 -4
  161. package/dist/templates/react-native/.buckconfig +6 -6
  162. package/dist/templates/react-native/.eslintrc +74 -74
  163. package/dist/templates/react-native/.gitattributes +1 -1
  164. package/dist/templates/react-native/.prettierrc +9 -9
  165. package/dist/templates/react-native/.vscode/launch.json +42 -42
  166. package/dist/templates/react-native/.vscode/settings.json +1 -1
  167. package/dist/templates/react-native/LICENSE.txt +202 -202
  168. package/dist/templates/react-native/README.MD +115 -115
  169. package/dist/templates/react-native/android/app/BUCK +55 -55
  170. package/dist/templates/react-native/android/app/build.gradle +201 -201
  171. package/dist/templates/react-native/android/app/build_defs.bzl +19 -19
  172. package/dist/templates/react-native/android/app/proguard-rules.pro +10 -10
  173. package/dist/templates/react-native/android/app/src/debug/AndroidManifest.xml +8 -8
  174. package/dist/templates/react-native/android/app/src/main/AndroidManifest.xml +26 -26
  175. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainActivity.java +15 -15
  176. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainApplication.java +74 -74
  177. package/dist/templates/react-native/android/app/src/main/res/values/strings.xml +3 -3
  178. package/dist/templates/react-native/android/app/src/main/res/values/styles.xml +9 -9
  179. package/dist/templates/react-native/android/build.gradle +38 -38
  180. package/dist/templates/react-native/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  181. package/dist/templates/react-native/android/gradle.properties +21 -21
  182. package/dist/templates/react-native/android/gradlew +188 -188
  183. package/dist/templates/react-native/android/gradlew.bat +100 -100
  184. package/dist/templates/react-native/android/settings.gradle +3 -3
  185. package/dist/templates/react-native/app.json +3 -3
  186. package/dist/templates/react-native/assets/img/sc_logo.svg +52 -52
  187. package/dist/templates/react-native/data/content/Styleguide/ItemLinkField/Item1/en.json +10 -10
  188. package/dist/templates/react-native/data/routes/en.json +22 -22
  189. package/dist/templates/react-native/data/routes/styleguide/en.json +227 -227
  190. package/dist/templates/react-native/data/routes/styleguide/{{language}}.json +31 -31
  191. package/dist/templates/react-native/data/routes/{{language}}.json +7 -7
  192. package/dist/templates/react-native/gitignore +60 -60
  193. package/dist/templates/react-native/ios/Podfile +53 -53
  194. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.h +15 -15
  195. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.m +42 -42
  196. package/dist/templates/react-native/ios/{{appName}}/Base.lproj/LaunchScreen.xib +42 -42
  197. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/AppIcon.appiconset/Contents.json +38 -38
  198. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/Contents.json +6 -6
  199. package/dist/templates/react-native/ios/{{appName}}/Info.plist +57 -57
  200. package/dist/templates/react-native/ios/{{appName}}/main.m +16 -16
  201. package/dist/templates/react-native/ios/{{appName}}-tvOS/Info.plist +53 -53
  202. package/dist/templates/react-native/ios/{{appName}}-tvOSTests/Info.plist +24 -24
  203. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative-tvOS.xcscheme +129 -129
  204. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative.xcscheme +129 -129
  205. package/dist/templates/react-native/ios/{{appName}}Tests/BasicSampleReactNativeTests.m +72 -72
  206. package/dist/templates/react-native/ios/{{appName}}Tests/Info.plist +24 -24
  207. package/dist/templates/react-native/package.json +78 -78
  208. package/dist/templates/react-native/sitecore/config/{{appName}}.config +47 -47
  209. package/dist/templates/react-native/sitecore/gitignore +2 -2
  210. package/dist/templates/vue/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  211. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  212. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  213. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  214. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  215. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  216. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  217. package/dist/templates/vue/data/dictionary/en.yml +7 -7
  218. package/dist/templates/vue/data/dictionary/{{language}}.yml +7 -7
  219. package/dist/templates/vue/data/routes/en.yml +63 -63
  220. package/dist/templates/vue/data/routes/graphql/en.yml +34 -34
  221. package/dist/templates/vue/data/routes/graphql/sample-1/en.yml +9 -9
  222. package/dist/templates/vue/data/routes/graphql/sample-2/en.yml +9 -9
  223. package/dist/templates/vue/data/routes/styleguide/custom-route-type/en.yml +12 -12
  224. package/dist/templates/vue/data/routes/styleguide/en.yml +264 -264
  225. package/dist/templates/vue/data/routes/styleguide/{{language}}.yml +26 -26
  226. package/dist/templates/vue/data/routes/{{language}}.yml +4 -4
  227. package/dist/templates/vue/public/img/icons/safari-pinned-tab.svg +75 -75
  228. package/dist/templates/vue/src/assets/sc_logo.svg +52 -52
  229. package/package.json +2 -2
@@ -1,90 +1,90 @@
1
- <!--
2
- JSS Sitecore Configuration Patch File
3
-
4
- This configuration file registers the JSS site with Sitecore, and configures the Layout Service
5
- to work with it. Config patches need to be deployed to the Sitecore server.
6
-
7
- Normally `jss deploy config` can do this for local development. To manually deploy, or to deploy via CI,
8
- this file can be placed in the `App_Config/Include` folder, or a subfolder of it, within the Sitecore site.
9
- -->
10
- <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
11
- xmlns:set="http://www.sitecore.net/xmlconfig/set/"
12
- xmlns:role="http://www.sitecore.net/xmlconfig/role/">
13
- <sitecore>
14
- <settings>
15
- <!--
16
- PROXY CONFIGURATION
17
- When running JSS with the headless proxy (node-headless-ssr-proxy),
18
- the original IP address of clients is obscured by the proxy.
19
- This setting tells Sitecore to read the forwarded header the proxy sends,
20
- thus making analytics track the correct original client IP address.
21
- -->
22
- <setting name="Analytics.ForwardedRequestHttpHeader" set:value="X-Forwarded-For" />
23
- </settings>
24
- <sites>
25
- <!--
26
- JSS Site Registration
27
- This configures the site with Sitecore - i.e. host headers, item paths.
28
- If your JSS app lives within an existing Sitecore site, this may not be necessary.
29
-
30
- IMPORTANT: JSS sites ship in 'live mode', which makes development and testing easy,
31
- but disables workflow and publishing. Before going to production, change the `database`
32
- below to `web` instead of `master`.
33
- -->
34
- <site patch:before="site[@name='website']"
35
- inherits="website"
36
- name="<%- appName %>"
37
- hostName="<%- hostName.replace(/^https?:\/\//, '') %>"
38
- rootPath="/sitecore/content/<%- appName %>"
39
- startItem="/home"
40
- database="master" />
41
- </sites>
42
- <javaScriptServices>
43
- <apps>
44
- <!--
45
- JSS App Registration
46
- The JSS app needs to be registered in order to support layout service and import services.
47
-
48
- There are many available attributes, and they inherit the defaults if not explicitly specified here.
49
- Defaults are defined in `/App_Config/Sitecore/JavaScriptServices/Sitecore.JavaScriptServices.Apps.config`
50
-
51
- NOTE: graphQLEndpoint enables _Integrated GraphQL_. If not using integrated GraphQL, it can be removed.
52
-
53
- NOTE: layoutServiceConfiguration should be set to "default" when using GraphQL Edge schema.
54
- When using integrated GraphQL with Edge schema, a $language value is injected
55
- since language is required in all Edge queries. "jss" configuration does not do this (which is backwards
56
- compatible with JSS versions < 18.0.0).
57
- -->
58
- <app name="<%- appName %>"
59
- layoutServiceConfiguration="default"
60
- sitecorePath="/sitecore/content/<%- appName %>"
61
- inherits="defaults"
62
- useLanguageSpecificLayout="true"
63
- graphQLEndpoint="/sitecore/api/graph/edge" />
64
- </apps>
65
- <!--
66
- IMAGE RESIZING WHITELIST
67
- Using Sitecore server-side media resizing (i.e. the `imageParams` or `srcSet` props on the `<Image/>` helper component)
68
- could expose your Sitecore server to a denial-of-service attack by rescaling an image with many arbitrary dimensions.
69
- In JSS resizing param sets that are unknown are rejected by a whitelist.
70
-
71
- Sets of image sizing parameters that are used in app components must be whitelisted here.
72
- If a param set is not whitelisted, the image will be returned _without resizing_.
73
-
74
- To determine the image parameters being used, look at the query string on the `src` of the rendered image, i.e. '/img.jpg?mw=100&h=72' -> mw=100,h=72
75
- Note: the parameter sets defined here are comma-delimited (,) instead of &-delimited like the query string. Multiple sets are endline-delimited.
76
- -->
77
- <allowedMediaParams>
78
- <!-- XML element name is arbitary, useful for organizing and patching -->
79
- <styleguide-image-sample>
80
- mw=100,
81
- mh=50
82
- </styleguide-image-sample>
83
- <styleguide-image-sample-adaptive>
84
- mw=300
85
- mw=100
86
- </styleguide-image-sample-adaptive>
87
- </allowedMediaParams>
88
- </javaScriptServices>
89
- </sitecore>
90
- </configuration>
1
+ <!--
2
+ JSS Sitecore Configuration Patch File
3
+
4
+ This configuration file registers the JSS site with Sitecore, and configures the Layout Service
5
+ to work with it. Config patches need to be deployed to the Sitecore server.
6
+
7
+ Normally `jss deploy config` can do this for local development. To manually deploy, or to deploy via CI,
8
+ this file can be placed in the `App_Config/Include` folder, or a subfolder of it, within the Sitecore site.
9
+ -->
10
+ <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
11
+ xmlns:set="http://www.sitecore.net/xmlconfig/set/"
12
+ xmlns:role="http://www.sitecore.net/xmlconfig/role/">
13
+ <sitecore>
14
+ <settings>
15
+ <!--
16
+ PROXY CONFIGURATION
17
+ When running JSS with the headless proxy (node-headless-ssr-proxy),
18
+ the original IP address of clients is obscured by the proxy.
19
+ This setting tells Sitecore to read the forwarded header the proxy sends,
20
+ thus making analytics track the correct original client IP address.
21
+ -->
22
+ <setting name="Analytics.ForwardedRequestHttpHeader" set:value="X-Forwarded-For" />
23
+ </settings>
24
+ <sites>
25
+ <!--
26
+ JSS Site Registration
27
+ This configures the site with Sitecore - i.e. host headers, item paths.
28
+ If your JSS app lives within an existing Sitecore site, this may not be necessary.
29
+
30
+ IMPORTANT: JSS sites ship in 'live mode', which makes development and testing easy,
31
+ but disables workflow and publishing. Before going to production, change the `database`
32
+ below to `web` instead of `master`.
33
+ -->
34
+ <site patch:before="site[@name='website']"
35
+ inherits="website"
36
+ name="<%- appName %>"
37
+ hostName="<%- hostName.replace(/^https?:\/\//, '') %>"
38
+ rootPath="/sitecore/content/<%- appName %>"
39
+ startItem="/home"
40
+ database="master" />
41
+ </sites>
42
+ <javaScriptServices>
43
+ <apps>
44
+ <!--
45
+ JSS App Registration
46
+ The JSS app needs to be registered in order to support layout service and import services.
47
+
48
+ There are many available attributes, and they inherit the defaults if not explicitly specified here.
49
+ Defaults are defined in `/App_Config/Sitecore/JavaScriptServices/Sitecore.JavaScriptServices.Apps.config`
50
+
51
+ NOTE: graphQLEndpoint enables _Integrated GraphQL_. If not using integrated GraphQL, it can be removed.
52
+
53
+ NOTE: layoutServiceConfiguration should be set to "default" when using GraphQL Edge schema.
54
+ When using integrated GraphQL with Edge schema, a $language value is injected
55
+ since language is required in all Edge queries. "jss" configuration does not do this (which is backwards
56
+ compatible with JSS versions < 18.0.0).
57
+ -->
58
+ <app name="<%- appName %>"
59
+ layoutServiceConfiguration="default"
60
+ sitecorePath="/sitecore/content/<%- appName %>"
61
+ inherits="defaults"
62
+ useLanguageSpecificLayout="true"
63
+ graphQLEndpoint="/sitecore/api/graph/edge" />
64
+ </apps>
65
+ <!--
66
+ IMAGE RESIZING WHITELIST
67
+ Using Sitecore server-side media resizing (i.e. the `imageParams` or `srcSet` props on the `<Image/>` helper component)
68
+ could expose your Sitecore server to a denial-of-service attack by rescaling an image with many arbitrary dimensions.
69
+ In JSS resizing param sets that are unknown are rejected by a whitelist.
70
+
71
+ Sets of image sizing parameters that are used in app components must be whitelisted here.
72
+ If a param set is not whitelisted, the image will be returned _without resizing_.
73
+
74
+ To determine the image parameters being used, look at the query string on the `src` of the rendered image, i.e. '/img.jpg?mw=100&h=72' -> mw=100,h=72
75
+ Note: the parameter sets defined here are comma-delimited (,) instead of &-delimited like the query string. Multiple sets are endline-delimited.
76
+ -->
77
+ <allowedMediaParams>
78
+ <!-- XML element name is arbitary, useful for organizing and patching -->
79
+ <styleguide-image-sample>
80
+ mw=100,
81
+ mh=50
82
+ </styleguide-image-sample>
83
+ <styleguide-image-sample-adaptive>
84
+ mw=300
85
+ mw=100
86
+ </styleguide-image-sample-adaptive>
87
+ </allowedMediaParams>
88
+ </javaScriptServices>
89
+ </sitecore>
90
+ </configuration>
@@ -1,71 +1,71 @@
1
- # This file contains a GraphQL query that will be executed and the result provided to
2
- # your JSS component. You can run this query in GraphiQL ($endpoint/ui) for a nice editing experience.
3
-
4
- # Note that we're executing _two queries_ (datasource and contextItem)
5
- # within the context of the IntegratedDemoQuery _operation_. This makes it
6
- # very efficient at gathering data from multiple sources.
7
-
8
- query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language: String!) {
9
- # Datasource query
10
- # $datasource will always be set to the ID of the rendering's datasource item
11
- # (as long as the GraphQLData helper is used)
12
- datasource: item(path: $datasource, language: $language) {
13
- id
14
- name
15
- # Strongly-typed querying on known templates is possible!
16
- ...on <%- helper.getAppPrefix(appPrefix, appName, false) %>GraphQLIntegratedDemo {
17
- # Single-line text field
18
- sample1 {
19
- # the 'jsonValue' field is a JSON blob that represents the object that
20
- # should be passed to JSS field rendering helpers (i.e. text, image, link)
21
- jsonValue
22
- value
23
- }
24
- # General Link field
25
- sample2 {
26
- jsonValue
27
- # Structured querying of the field's values is possible
28
- text
29
- target
30
- url
31
- # Access to the template definition is possible
32
- definition {
33
- type
34
- shared
35
- }
36
- }
37
- }
38
- }
39
-
40
- # Context/route item query
41
- # $contextItem will always be set to the ID of the current context item (the route item)
42
- # (as long as the GraphQLData helper is used)
43
- contextItem: item(path: $contextItem, language: $language) {
44
- id
45
- # Get the page title from the app route template
46
- ...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
47
- pageTitle {
48
- value
49
- }
50
- }
51
-
52
- # List the children of the current route
53
- children(hasLayout: true) {
54
- results {
55
- id
56
- # typing fragments can be used anywhere!
57
- # so in this case, we're grabbing the 'pageTitle'
58
- # field on all child route items.
59
- ...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
60
- pageTitle {
61
- jsonValue
62
- value
63
- }
64
- }
65
- url {
66
- path
67
- }
68
- }
69
- }
70
- }
71
- }
1
+ # This file contains a GraphQL query that will be executed and the result provided to
2
+ # your JSS component. You can run this query in GraphiQL ($endpoint/ui) for a nice editing experience.
3
+
4
+ # Note that we're executing _two queries_ (datasource and contextItem)
5
+ # within the context of the IntegratedDemoQuery _operation_. This makes it
6
+ # very efficient at gathering data from multiple sources.
7
+
8
+ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language: String!) {
9
+ # Datasource query
10
+ # $datasource will always be set to the ID of the rendering's datasource item
11
+ # (as long as the GraphQLData helper is used)
12
+ datasource: item(path: $datasource, language: $language) {
13
+ id
14
+ name
15
+ # Strongly-typed querying on known templates is possible!
16
+ ...on <%- helper.getAppPrefix(appPrefix, appName, false) %>GraphQLIntegratedDemo {
17
+ # Single-line text field
18
+ sample1 {
19
+ # the 'jsonValue' field is a JSON blob that represents the object that
20
+ # should be passed to JSS field rendering helpers (i.e. text, image, link)
21
+ jsonValue
22
+ value
23
+ }
24
+ # General Link field
25
+ sample2 {
26
+ jsonValue
27
+ # Structured querying of the field's values is possible
28
+ text
29
+ target
30
+ url
31
+ # Access to the template definition is possible
32
+ definition {
33
+ type
34
+ shared
35
+ }
36
+ }
37
+ }
38
+ }
39
+
40
+ # Context/route item query
41
+ # $contextItem will always be set to the ID of the current context item (the route item)
42
+ # (as long as the GraphQLData helper is used)
43
+ contextItem: item(path: $contextItem, language: $language) {
44
+ id
45
+ # Get the page title from the app route template
46
+ ...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
47
+ pageTitle {
48
+ value
49
+ }
50
+ }
51
+
52
+ # List the children of the current route
53
+ children(hasLayout: true) {
54
+ results {
55
+ id
56
+ # typing fragments can be used anywhere!
57
+ # so in this case, we're grabbing the 'pageTitle'
58
+ # field on all child route items.
59
+ ...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
60
+ pageTitle {
61
+ jsonValue
62
+ value
63
+ }
64
+ }
65
+ url {
66
+ path
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -1,3 +1,3 @@
1
- manifest
2
- update-package
1
+ manifest
2
+ update-package
3
3
  package
@@ -20,6 +20,7 @@ import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
20
20
  RouterModule,
21
21
  JssModule,
22
22
  FormsModule,
23
+ StyleguideSpecimenComponent
23
24
  ],
24
25
  exports: [
25
26
  CommonModule,
@@ -28,8 +29,5 @@ import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
28
29
  FormsModule,
29
30
  StyleguideSpecimenComponent
30
31
  ],
31
- declarations: [
32
- StyleguideSpecimenComponent
33
- ],
34
32
  })
35
33
  export class AppComponentsSharedModule { }
@@ -9,47 +9,49 @@
9
9
  the cache. Consult the Apollo documentation for details.
10
10
  </p>
11
11
 
12
- <div *ngIf="query$ | async as queryResult; else loading">
12
+ @if (query$ | async; as queryResult) {
13
13
  <div>
14
- <h4>Datasource Item (via Connected GraphQL)</h4>
15
- id: {{ queryResult.data.datasource.id }}
16
- <br />
17
- name: {{ queryResult.data.datasource.name }}
18
- <br />
19
- sample1: {{ queryResult.data.datasource.sample1.value }}
20
- <br />
21
- sample1 (editable): <span *scText="queryResult.data.datasource.sample1.jsonValue"></span>
22
- <br />
23
- sample2:<br />
24
- <ul>
25
- <li>text: {{ queryResult.data.datasource.sample2.text }}</li>
26
- <li>url: {{ queryResult.data.datasource.sample2.url }}</li>
27
- <li>target: {{ queryResult.data.datasource.sample2.target }}</li>
28
- <li>
29
- editable: <a *scLink="queryResult.data.datasource.sample2.jsonValue"></a>
30
- </li>
31
- <li>field type: {{ queryResult.data.datasource.sample2.definition.type }}</li>
32
- <li>field is shared?: {{ queryResult.data.datasource.sample2.definition.shared.toString() }}</li>
33
- </ul>
34
- </div>
14
+ <div>
15
+ <h4>Datasource Item (via Connected GraphQL)</h4>
16
+ id: {{ queryResult.data.datasource.id }}
17
+ <br />
18
+ name: {{ queryResult.data.datasource.name }}
19
+ <br />
20
+ sample1: {{ queryResult.data.datasource.sample1.value }}
21
+ <br />
22
+ sample1 (editable): <span *scText="queryResult.data.datasource.sample1.jsonValue"></span>
23
+ <br />
24
+ sample2:<br />
25
+ <ul>
26
+ <li>text: {{ queryResult.data.datasource.sample2.text }}</li>
27
+ <li>url: {{ queryResult.data.datasource.sample2.url }}</li>
28
+ <li>target: {{ queryResult.data.datasource.sample2.target }}</li>
29
+ <li>
30
+ editable: <a *scLink="queryResult.data.datasource.sample2.jsonValue"></a>
31
+ </li>
32
+ <li>field type: {{ queryResult.data.datasource.sample2.definition.type }}</li>
33
+ <li>field is shared?: {{ queryResult.data.datasource.sample2.definition.shared.toString() }}</li>
34
+ </ul>
35
+ </div>
35
36
 
36
- <div>
37
- <h4>Route Item (via Connected GraphQL)</h4>
38
- id: {{ queryResult.data.contextItem.id }}
39
- <br />
40
- page title: {{ queryResult.data.contextItem.pageTitle.value }}
41
- <br />
42
- children:
43
- <ul>
44
- <li *ngFor="let child of queryResult.data.contextItem.children.results">
45
- <a [routerLink]="child.url.path">{{ child.pageTitle.value }}</a>
46
- (editable title too! <span *scText="child.pageTitle.jsonValue"></span>)
47
- </li>
48
- </ul>
37
+ <div>
38
+ <h4>Route Item (via Connected GraphQL)</h4>
39
+ id: {{ queryResult.data.contextItem.id }}
40
+ <br />
41
+ page title: {{ queryResult.data.contextItem.pageTitle.value }}
42
+ <br />
43
+ children:
44
+ <ul>
45
+ @for (child of queryResult.data.contextItem.children.results; track child) {
46
+ <li>
47
+ <a [routerLink]="child.url.path">{{ child.pageTitle.value }}</a>
48
+ (editable title too! <span *scText="child.pageTitle.jsonValue"></span>)
49
+ </li>
50
+ }
51
+ </ul>
52
+ </div>
49
53
  </div>
50
- </div>
51
-
52
- <ng-template #loading>
54
+ } @else {
53
55
  <p class="alert alert-info">GraphQL query is loading...</p>
54
- </ng-template>
56
+ }
55
57
  </div>
@@ -1,5 +1,6 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { ComponentRendering } from '@sitecore-jss/sitecore-jss-angular';
1
+ import { Component, Input, OnInit, inject } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { ComponentRendering, JssModule } from '@sitecore-jss/sitecore-jss-angular';
3
4
  import { DocumentNode } from 'graphql';
4
5
  import { JssGraphQLService } from '../../jss-graphql.service';
5
6
  import { ApolloQueryResult } from '@apollo/client/core';
@@ -14,6 +15,7 @@ const ComponentQuery: DocumentNode = require('graphql-tag/loader!./graph-ql-conn
14
15
  @Component({
15
16
  selector: 'app-graph-ql-connected-demo',
16
17
  templateUrl: './graph-ql-connected-demo.component.html',
18
+ imports: [CommonModule, JssModule]
17
19
  })
18
20
  export class GraphQLConnectedDemoComponent implements OnInit {
19
21
  @Input() rendering: ComponentRendering;
@@ -22,7 +24,7 @@ export class GraphQLConnectedDemoComponent implements OnInit {
22
24
  // inject the JssGraphQLService to make GraphQL queries
23
25
  // note that it's possible to use Apollo directly, but the JSS
24
26
  // service provides automatic GraphQL variables and SSR assistance.
25
- constructor(private graphQLService: JssGraphQLService) {}
27
+ private graphQLService = inject(JssGraphQLService);
26
28
 
27
29
  ngOnInit(): void {
28
30
  // the query result is an Rx Observable, so any observable patterns
@@ -38,10 +38,12 @@
38
38
  <br />
39
39
  children:
40
40
  <ul>
41
- <li *ngFor="let child of queryResult.data.contextItem.children.results">
42
- <a [routerLink]="child.url.path">{{ child.pageTitle.value }}</a>
43
- (editable title too! <span *scText="child.pageTitle.jsonValue"></span>)
44
- </li>
41
+ @for (child of queryResult.data.contextItem.children.results; track child) {
42
+ <li>
43
+ <a [routerLink]="child.url.path">{{ child.pageTitle.value }}</a>
44
+ (editable title too! <span *scText="child.pageTitle.jsonValue"></span>)
45
+ </li>
46
+ }
45
47
  </ul>
46
48
  </div>
47
49
  </div>
@@ -1,5 +1,6 @@
1
1
  import { Component, OnInit, Input } from '@angular/core';
2
- import { ComponentRendering } from '@sitecore-jss/sitecore-jss-angular';
2
+ import { CommonModule } from '@angular/common';
3
+ import { ComponentRendering, JssModule } from '@sitecore-jss/sitecore-jss-angular';
3
4
 
4
5
  interface QueryResult {
5
6
  data: {
@@ -63,13 +64,12 @@ interface ItemSearchResults {
63
64
  @Component({
64
65
  selector: 'app-graph-ql-integrated-demo',
65
66
  templateUrl: './graph-ql-integrated-demo.component.html',
67
+ imports: [CommonModule, JssModule]
66
68
  })
67
69
  export class GraphQLIntegratedDemoComponent implements OnInit {
68
70
  @Input() rendering: ComponentRendering;
69
71
  queryResult: QueryResult;
70
-
71
- constructor() {}
72
-
72
+
73
73
  ngOnInit() {
74
74
  this.queryResult = (this.rendering.fields as unknown) as QueryResult;
75
75
  }
@@ -1,5 +1,5 @@
1
1
  <div data-e2e-id="graphql-layout">
2
- <ng-container *ngIf="disconnectedMode">
2
+ @if (disconnectedMode) {
3
3
  <p>
4
4
  This app is running in disconnected mode. GraphQL requires connected mode, headless connected
5
5
  mode, or integrated mode to work.
@@ -12,11 +12,10 @@
12
12
  To view the GraphQL samples, restart the app using <code>jss start:connected</code>&nbsp; or
13
13
  deploy the app to Sitecore to run in integrated mode per the JSS documentation.
14
14
  </p>
15
- </ng-container>
16
- <ng-container *ngIf="!disconnectedMode">
15
+ } @else {
17
16
  <sc-placeholder
18
17
  name="<%- helper.getAppPrefix(appPrefix, appName) %>jss-graphql-layout"
19
18
  [rendering]="rendering"
20
19
  ></sc-placeholder>
21
- </ng-container>
20
+ }
22
21
  </div>
@@ -1,16 +1,16 @@
1
- import { Component, OnInit, Input } from '@angular/core';
2
- import { ComponentRendering } from '@sitecore-jss/sitecore-jss-angular';
1
+ import { Component, OnInit, Input, inject } from '@angular/core';
2
+ import { ComponentRendering, JssModule } from '@sitecore-jss/sitecore-jss-angular';
3
3
  import { JssContextService } from '../../jss-context.service';
4
4
 
5
5
  @Component({
6
6
  selector: 'app-graph-ql-layout',
7
7
  templateUrl: './graph-ql-layout.component.html',
8
+ imports: [JssModule]
8
9
  })
9
10
  export class GraphQLLayoutComponent implements OnInit {
10
11
  @Input() rendering: ComponentRendering;
11
12
  disconnectedMode: boolean;
12
-
13
- constructor(private contextService: JssContextService) { }
13
+ private contextService = inject(JssContextService);
14
14
 
15
15
  ngOnInit() {
16
16
  this.disconnectedMode = this.contextService.stateValue.sitecore.route.itemId === 'available-in-connected-mode';
@@ -1,5 +1,5 @@
1
1
  import { Component, OnInit, Input } from '@angular/core';
2
- import { ComponentRendering } from '@sitecore-jss/sitecore-jss-angular';
2
+ import { ComponentRendering, JssModule } from '@sitecore-jss/sitecore-jss-angular';
3
3
 
4
4
  function dasherize(str: string) {
5
5
  return str.replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, function(s, i) {
@@ -24,7 +24,8 @@ function dasherize(str: string) {
24
24
  </p>
25
25
  <div class="border p-2"><ng-content></ng-content></div>
26
26
  </div>
27
- `
27
+ `,
28
+ imports: [JssModule]
28
29
  })
29
30
  export class StyleguideSpecimenComponent implements OnInit {
30
31
  @Input() rendering: ComponentRendering;
@@ -32,8 +33,6 @@ export class StyleguideSpecimenComponent implements OnInit {
32
33
  id: string;
33
34
  componentName: string;
34
35
 
35
- constructor() { }
36
-
37
36
  ngOnInit() {
38
37
  this.id = `i${this.rendering.uid.replace(/[{}]/g, '')}`;
39
38
  this.componentName = dasherize(this.rendering.componentName);
@@ -1,13 +1,13 @@
1
1
  import { Component, Input } from '@angular/core';
2
- import { ComponentRendering } from '@sitecore-jss/sitecore-jss-angular';
2
+ import { ComponentRendering, JssModule } from '@sitecore-jss/sitecore-jss-angular';
3
+ import { StyleguideSpecimenComponent } from '../shared/styleguide-specimen/styleguide-specimen.component';
3
4
 
4
5
  @Component({
5
6
  selector: 'app-styleguide-angular-lazy-loading',
6
7
  templateUrl: './styleguide-angular-lazy-loading.component.html',
7
- styles: []
8
+ styles: [],
9
+ imports: [JssModule, StyleguideSpecimenComponent]
8
10
  })
9
11
  export class StyleguideAngularLazyLoadingComponent {
10
12
  @Input() rendering: ComponentRendering;
11
-
12
- constructor() { }
13
- }
13
+ };
@@ -10,10 +10,7 @@ import { AppComponentsSharedModule } from '../app-components.shared.module';
10
10
  imports: [
11
11
  // this call signals to JSS that this component is the one being lazy loaded by this module
12
12
  JssModule.forChild(StyleguideAngularLazyLoadingComponent),
13
- AppComponentsSharedModule
14
- ],
15
- declarations: [
16
- StyleguideAngularLazyLoadingComponent,
17
- ],
13
+ AppComponentsSharedModule,
14
+ ]
18
15
  })
19
16
  export class StyleguideAngularLazyLoadingModule { }
@@ -8,12 +8,16 @@
8
8
  <br />
9
9
  param type: <code>{{ useCtaType }}</code>
10
10
  <!-- because the param is a string, you need to compare it as a string - if(`useCta`) won't work correctly. -->
11
- <div *ngIf="useCta === 'true'" class="alert alert-info">the call to action is shown</div>
11
+ @if (useCta === 'true') {
12
+ <div class="alert alert-info">the call to action is shown</div>
13
+ }
12
14
  </div>
13
15
  <p>columns param: {{ columns }}</p>
14
16
  <div class="row">
15
- <div class="col-sm" *ngFor="let column of columnsArray">
16
- Column {{ column }}
17
- </div>
17
+ @for (column of columnsArray; track column) {
18
+ <div class="col-sm">
19
+ Column {{ column }}
20
+ </div>
21
+ }
18
22
  </div>
19
23
  </app-styleguide-specimen>