create-sitecore-jss 22.1.0-canary.9 → 22.2.0-canary.2

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 (213) hide show
  1. package/dist/bin.js +69 -28
  2. package/dist/common/processes/install.js +9 -2
  3. package/dist/common/processes/transform.js +7 -2
  4. package/dist/init-runner.js +12 -8
  5. package/dist/initializers/angular/index.js +16 -0
  6. package/dist/initializers/angular/prompts.js +22 -1
  7. package/dist/initializers/angular-sxp/index.js +56 -0
  8. package/dist/initializers/angular-xmcloud/index.js +56 -0
  9. package/dist/initializers/node-xmcloud-proxy/index.js +32 -0
  10. package/dist/templates/angular/.env +5 -3
  11. package/dist/templates/angular/README.md +5 -45
  12. package/dist/templates/angular/angular.json +1 -6
  13. package/dist/templates/angular/package.json +43 -53
  14. package/dist/templates/angular/proxy.conf.js +5 -23
  15. package/dist/templates/angular/scripts/bootstrap.ts +5 -24
  16. package/dist/templates/angular/scripts/config/index.ts +28 -0
  17. package/dist/templates/angular/scripts/config/plugins/computed.ts +21 -0
  18. package/dist/templates/angular/scripts/config/plugins/fallback.ts +23 -0
  19. package/dist/templates/angular/scripts/config/plugins/package-json.ts +22 -0
  20. package/dist/templates/angular/scripts/config/plugins/scjssconfig.ts +29 -0
  21. package/dist/templates/angular/scripts/generate-config.ts +53 -73
  22. package/dist/templates/angular/scripts/generate-plugins.ts +28 -0
  23. package/dist/templates/angular/scripts/temp/gitignore +2 -0
  24. package/dist/templates/angular/scripts/update-graphql-fragment-data.ts +4 -2
  25. package/dist/templates/angular/server.bundle.ts +20 -2
  26. package/dist/templates/angular/src/app/app.module.ts +0 -2
  27. package/dist/templates/angular/src/app/components/app-components.shared.module.ts +4 -19
  28. package/dist/templates/angular/src/app/jss-context.server-side.service.ts +0 -2
  29. package/dist/templates/angular/src/app/lib/config.ts +16 -0
  30. package/dist/templates/angular/src/app/lib/dictionary-service-factory.ts +21 -13
  31. package/dist/templates/angular/src/app/lib/layout-service-factory.ts +20 -12
  32. package/dist/templates/angular/src/app/routing/layout/layout.component.html +1 -1
  33. package/dist/templates/angular/src/app/routing/layout/layout.component.ts +1 -2
  34. package/dist/templates/angular/src/app/routing/navigation/navigation.component.html +5 -6
  35. package/dist/templates/angular/src/app/routing/navigation/navigation.component.ts +1 -2
  36. package/dist/templates/angular/src/app/routing/routing.module.ts +14 -21
  37. package/dist/templates/angular/src/app/routing/scripts/scripts.component.html +1 -0
  38. package/dist/templates/angular/src/app/routing/scripts/scripts.component.ts +7 -0
  39. package/dist/templates/angular/src/app/routing/scripts/scripts.module.ts +8 -0
  40. package/dist/templates/angular/src/graphql-fragment-types.ts +0 -95
  41. package/dist/templates/angular/src/polyfills.ts +2 -6
  42. package/dist/templates/angular/src/test.ts +1 -6
  43. package/dist/templates/angular/tsconfig.json +7 -2
  44. package/dist/templates/angular-sxp/package.json +12 -0
  45. package/dist/templates/angular-sxp/proxy.conf.js +43 -0
  46. package/dist/templates/angular-sxp/scripts/config/plugins/disconnected.ts +27 -0
  47. package/dist/templates/angular-sxp/src/app/components/app-components.shared.module.ts +35 -0
  48. package/dist/templates/{angular → angular-sxp}/src/app/jss-data-fetcher.service.ts +3 -1
  49. package/dist/templates/angular-sxp/src/app/routing/navigation/navigation.component.html +23 -0
  50. package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.component.html +3 -0
  51. package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.module.ts +9 -0
  52. package/dist/templates/{angular/src/app/routing → angular-sxp/src/app/routing/scripts}/visitor-identification/visitor-identification.component.ts +9 -3
  53. package/dist/templates/angular-sxp/src/graphql-fragment-types.ts +219 -0
  54. package/dist/templates/angular-xmcloud/.env +8 -0
  55. package/dist/templates/angular-xmcloud/package.json +10 -0
  56. package/dist/templates/angular-xmcloud/scripts/config/plugins/xmcloud.ts +23 -0
  57. package/dist/templates/angular-xmcloud/scripts/proxy-build.ts +15 -0
  58. package/dist/templates/angular-xmcloud/src/app/lib/config.ts +15 -0
  59. package/dist/templates/angular-xmcloud/src/app/lib/graphql-client-factory.ts +44 -0
  60. package/dist/templates/nextjs/next.config.js +5 -0
  61. package/dist/templates/nextjs/package.json +7 -6
  62. package/dist/templates/nextjs/src/lib/next-config/plugins/cors-header.js +0 -9
  63. package/dist/templates/nextjs/src/pages/[[...path]].tsx +1 -13
  64. package/dist/templates/nextjs-styleguide/package.json +1 -1
  65. package/dist/templates/nextjs-sxa/src/assets/sass/components/title/_component-title.scss +19 -13
  66. package/dist/templates/nextjs-sxa/src/components/Image.tsx +22 -12
  67. package/dist/templates/nextjs-sxa/src/components/Promo.tsx +1 -1
  68. package/dist/templates/nextjs-sxa/src/components/Title.tsx +10 -13
  69. package/dist/templates/nextjs-xmcloud/package.json +1 -1
  70. package/dist/templates/nextjs-xmcloud/src/Scripts.tsx +2 -0
  71. package/dist/templates/nextjs-xmcloud/src/lib/dictionary-service-factory.ts +46 -0
  72. package/dist/templates/nextjs-xmcloud/src/lib/graphql-editing-service.ts +9 -0
  73. package/dist/templates/nextjs-xmcloud/src/lib/middleware/plugins/personalize.ts +6 -5
  74. package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/personalize.ts +7 -3
  75. package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/preview-mode.ts +72 -0
  76. package/dist/templates/nextjs-xmcloud/src/pages/api/editing/render.ts +46 -0
  77. package/dist/templates/node-headless-ssr-experience-edge/package.json +2 -2
  78. package/dist/templates/node-headless-ssr-proxy/package.json +4 -4
  79. package/dist/templates/node-xmcloud-proxy/.env +8 -0
  80. package/dist/templates/node-xmcloud-proxy/README.md +36 -0
  81. package/dist/templates/node-xmcloud-proxy/package.json +25 -0
  82. package/dist/templates/node-xmcloud-proxy/src/config.ts +19 -0
  83. package/dist/templates/node-xmcloud-proxy/src/index.ts +161 -0
  84. package/dist/templates/node-xmcloud-proxy/src/types.ts +59 -0
  85. package/dist/templates/node-xmcloud-proxy/tsconfig.json +22 -0
  86. package/dist/templates/react/package.json +5 -5
  87. package/dist/templates/react-native/package.json +4 -4
  88. package/dist/templates/vue/package.json +4 -4
  89. package/package.json +4 -4
  90. /package/dist/templates/angular/src/app/lib/{client-factory.ts → graphql-client-factory.ts} +0 -0
  91. /package/dist/templates/{angular → angular-sxp}/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +0 -0
  92. /package/dist/templates/{angular → angular-sxp}/data/component-content/gitignore +0 -0
  93. /package/dist/templates/{angular → angular-sxp}/data/content/Styleguide/ContentListField/Item1/en.yml +0 -0
  94. /package/dist/templates/{angular → angular-sxp}/data/content/Styleguide/ContentListField/Item2/en.yml +0 -0
  95. /package/dist/templates/{angular → angular-sxp}/data/content/Styleguide/EditFrameDemo/Item1/en.yml +0 -0
  96. /package/dist/templates/{angular → angular-sxp}/data/content/Styleguide/EditFrameDemo/Item2/en.yml +0 -0
  97. /package/dist/templates/{angular → angular-sxp}/data/content/Styleguide/ItemLinkField/Item1/en.yml +0 -0
  98. /package/dist/templates/{angular → angular-sxp}/data/content/Styleguide/ItemLinkField/Item2/en.yml +0 -0
  99. /package/dist/templates/{angular → angular-sxp}/data/content/gitignore +0 -0
  100. /package/dist/templates/{angular → angular-sxp}/data/dictionary/en.yml +0 -0
  101. /package/dist/templates/{angular → angular-sxp}/data/dictionary/{{language}}.yml +0 -0
  102. /package/dist/templates/{angular → angular-sxp}/data/media/files/jss.pdf +0 -0
  103. /package/dist/templates/{angular → angular-sxp}/data/media/img/jss_logo.png +0 -0
  104. /package/dist/templates/{angular → angular-sxp}/data/media/img/sc_logo.png +0 -0
  105. /package/dist/templates/{angular → angular-sxp}/data/routes/en.yml +0 -0
  106. /package/dist/templates/{angular → angular-sxp}/data/routes/graphql/en.yml +0 -0
  107. /package/dist/templates/{angular → angular-sxp}/data/routes/graphql/sample-1/en.yml +0 -0
  108. /package/dist/templates/{angular → angular-sxp}/data/routes/graphql/sample-2/en.yml +0 -0
  109. /package/dist/templates/{angular → angular-sxp}/data/routes/styleguide/custom-route-type/en.yml +0 -0
  110. /package/dist/templates/{angular → angular-sxp}/data/routes/styleguide/en.yml +0 -0
  111. /package/dist/templates/{angular → angular-sxp}/data/routes/styleguide/{{language}}.yml +0 -0
  112. /package/dist/templates/{angular → angular-sxp}/data/routes/{{language}}.yml +0 -0
  113. /package/dist/templates/{angular → angular-sxp}/scripts/disconnected-mode-proxy.ts +0 -0
  114. /package/dist/templates/{angular → angular-sxp}/scripts/lint-yml.ts +0 -0
  115. /package/dist/templates/{angular → angular-sxp}/sitecore/config/{{appName}}.config +0 -0
  116. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/component-content.sitecore.ts +0 -0
  117. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/Styleguide-Layout-Reuse.sitecore.ts +0 -0
  118. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/Styleguide-Layout-Tabs-Tab.sitecore.ts +0 -0
  119. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/Styleguide-Layout-Tabs.sitecore.ts +0 -0
  120. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/Styleguide-Layout.sitecore.ts +0 -0
  121. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/Styleguide-Multilingual.sitecore.ts +0 -0
  122. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/Styleguide-Section.sitecore.ts +0 -0
  123. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/content-block.sitecore.ts +0 -0
  124. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/graph-ql-connected-demo.sitecore.ts +0 -0
  125. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +0 -0
  126. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.ts +0 -0
  127. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/graph-ql-layout.sitecore.ts +0 -0
  128. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-angular-lazy-loading.sitecore.ts +0 -0
  129. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-component-params.sitecore.ts +0 -0
  130. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-custom-route-type.sitecore.ts +0 -0
  131. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-edit-frame.sitecore.ts +0 -0
  132. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-checkbox.sitecore.ts +0 -0
  133. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-content-list.sitecore.ts +0 -0
  134. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-custom.sitecore.ts +0 -0
  135. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-date.sitecore.ts +0 -0
  136. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-file.sitecore.ts +0 -0
  137. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-image.sitecore.ts +0 -0
  138. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-item-link.sitecore.ts +0 -0
  139. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-link.sitecore.ts +0 -0
  140. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-number.sitecore.ts +0 -0
  141. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-rich-text.sitecore.ts +0 -0
  142. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-field-usage-text.sitecore.ts +0 -0
  143. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-route-fields.sitecore.ts +0 -0
  144. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-sitecore-context.sitecore.ts +0 -0
  145. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/components/styleguide-tracking.sitecore.ts +0 -0
  146. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/config.js +0 -0
  147. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/content.sitecore.ts +0 -0
  148. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/dictionary.sitecore.ts +0 -0
  149. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/placeholders.sitecore.ts +0 -0
  150. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/routes.sitecore.ts +0 -0
  151. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/templates/Styleguide-Explanatory-Component.sitecore.ts +0 -0
  152. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/templates/styleguide-content-list-template.sitecore.ts +0 -0
  153. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/templates/styleguide-edit-frame-list-item-template.sitecore.ts +0 -0
  154. /package/dist/templates/{angular → angular-sxp}/sitecore/definitions/templates/styleguide-item-link-template.sitecore.ts +0 -0
  155. /package/dist/templates/{angular → angular-sxp}/sitecore/gitignore +0 -0
  156. /package/dist/templates/{angular → angular-sxp}/sitecore/pipelines/example.patch.ts +0 -0
  157. /package/dist/templates/{angular → angular-sxp}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.graphql +0 -0
  158. /package/dist/templates/{angular → angular-sxp}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.html +0 -0
  159. /package/dist/templates/{angular → angular-sxp}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.ts +0 -0
  160. /package/dist/templates/{angular → angular-sxp}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.html +0 -0
  161. /package/dist/templates/{angular → angular-sxp}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.ts +0 -0
  162. /package/dist/templates/{angular → angular-sxp}/src/app/components/graph-ql-layout/graph-ql-layout.component.html +0 -0
  163. /package/dist/templates/{angular → angular-sxp}/src/app/components/graph-ql-layout/graph-ql-layout.component.ts +0 -0
  164. /package/dist/templates/{angular → angular-sxp}/src/app/components/shared/styleguide-specimen/styleguide-specimen.component.ts +0 -0
  165. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.html +0 -0
  166. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.ts +0 -0
  167. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.module.ts +0 -0
  168. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-component-params/styleguide-component-params.component.html +0 -0
  169. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-component-params/styleguide-component-params.component.ts +0 -0
  170. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.html +0 -0
  171. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.ts +0 -0
  172. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.html +0 -0
  173. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.ts +0 -0
  174. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.html +0 -0
  175. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.ts +0 -0
  176. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.html +0 -0
  177. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.ts +0 -0
  178. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.html +0 -0
  179. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.ts +0 -0
  180. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.html +0 -0
  181. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.ts +0 -0
  182. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.html +0 -0
  183. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.ts +0 -0
  184. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.html +0 -0
  185. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.ts +0 -0
  186. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.html +0 -0
  187. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.ts +0 -0
  188. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.html +0 -0
  189. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.ts +0 -0
  190. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.html +0 -0
  191. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.ts +0 -0
  192. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.html +0 -0
  193. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.ts +0 -0
  194. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.html +0 -0
  195. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.ts +0 -0
  196. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout/styleguide-layout.component.html +0 -0
  197. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout/styleguide-layout.component.ts +0 -0
  198. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.html +0 -0
  199. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.ts +0 -0
  200. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.html +0 -0
  201. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.ts +0 -0
  202. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.html +0 -0
  203. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.ts +0 -0
  204. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.html +0 -0
  205. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.ts +0 -0
  206. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.html +0 -0
  207. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.ts +0 -0
  208. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-section/styleguide-section.component.html +0 -0
  209. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-section/styleguide-section.component.ts +0 -0
  210. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.html +0 -0
  211. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.ts +0 -0
  212. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-tracking/styleguide-tracking.component.html +0 -0
  213. /package/dist/templates/{angular → angular-sxp}/src/app/components/styleguide-tracking/styleguide-tracking.component.ts +0 -0
@@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common';
3
3
  import { FormsModule } from '@angular/forms';
4
4
  import { TranslateModule } from '@ngx-translate/core';
5
5
  import { RouterModule } from '@angular/router';
6
- import { StyleguideSpecimenComponent } from './shared/styleguide-specimen/styleguide-specimen.component';
7
6
  import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
8
7
 
9
8
  /*
@@ -14,22 +13,8 @@ import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
14
13
  Don't want code generation? See ./.gitignore for instructions to turn it off.
15
14
  */
16
15
  @NgModule({
17
- imports: [
18
- CommonModule,
19
- TranslateModule,
20
- RouterModule,
21
- JssModule,
22
- FormsModule,
23
- ],
24
- exports: [
25
- CommonModule,
26
- TranslateModule,
27
- RouterModule,
28
- FormsModule,
29
- StyleguideSpecimenComponent
30
- ],
31
- declarations: [
32
- StyleguideSpecimenComponent
33
- ],
16
+ imports: [CommonModule, TranslateModule, RouterModule, JssModule, FormsModule],
17
+ exports: [CommonModule, TranslateModule, RouterModule, FormsModule],
18
+ declarations: [],
34
19
  })
35
- export class AppComponentsSharedModule { }
20
+ export class AppComponentsSharedModule {}
@@ -2,7 +2,6 @@ import { Injectable, Inject, TransferState } from '@angular/core';
2
2
  import { JssContextService, jssKey } from './jss-context.service';
3
3
  import { JssState } from './JssState';
4
4
  import { Observable, of as observableOf } from 'rxjs';
5
- import { JssDataFetcherService } from './jss-data-fetcher.service';
6
5
  import { JssLayoutService } from './layout/jss-layout.service';
7
6
 
8
7
  /**
@@ -15,7 +14,6 @@ export class JssContextServerSideService extends JssContextService {
15
14
  constructor(
16
15
  protected transferState: TransferState,
17
16
  protected layoutService: JssLayoutService,
18
- protected dataFetcher: JssDataFetcherService,
19
17
  // this initial state from sitecore is injected by server.bundle for "integrated" mode
20
18
  @Inject('JSS_SERVER_LAYOUT_DATA') private serverToSsrState: JssState
21
19
  ) {
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Represents the type of config object available within the generated /environments/environment.js
3
+ */
4
+ export interface JssConfig extends Record<string, string | boolean | undefined> {
5
+ production?: false;
6
+ sitecoreApiKey?: string;
7
+ sitecoreApiHost?: string;
8
+ sitecoreSiteName?: string;
9
+ defaultLanguage?: string;
10
+ graphQLEndpoint?: string;
11
+ graphQLEndpointPath?: string;
12
+ <% if (!locals.xmcloud) { -%>
13
+ layoutServiceConfigurationName?: string;
14
+ <% } -%>
15
+ defaultServerRoute?: string;
16
+ }
@@ -1,30 +1,38 @@
1
1
  import {
2
2
  DictionaryService,
3
3
  GraphQLDictionaryService,
4
+ <% if (!locals.xmcloud) { -%>
4
5
  RestDictionaryService,
5
6
  constants,
7
+ <% } -%>
6
8
  } from '@sitecore-jss/sitecore-jss-angular';
7
9
  import { environment as env } from '../../environments/environment';
8
- import { clientFactory } from './client-factory';
10
+ import { clientFactory } from './graphql-client-factory';
9
11
 
10
12
  export class DictionaryServiceFactory {
11
13
  create(): DictionaryService {
12
- return process.env.FETCH_WITH === constants.FETCH_WITH.GRAPHQL
13
- ? new GraphQLDictionaryService({
14
- clientFactory,
15
- siteName: env.sitecoreSiteName,
16
- /*
17
- The Dictionary Service needs a root item ID in order to fetch dictionary phrases for the current
18
- app. If your Sitecore instance only has 1 JSS App, you can specify the root item ID here;
19
- otherwise, the service will attempt to figure out the root item for the current JSS App using GraphQL and app name.
20
- rootItemId: '{GUID}'
21
- */
22
- })
23
- : new RestDictionaryService({
14
+ const service =
15
+ <% if (!locals.xmcloud) { -%>
16
+ process.env.FETCH_WITH === constants.FETCH_WITH.REST
17
+ ? new RestDictionaryService({
24
18
  apiHost: env.sitecoreApiHost,
25
19
  apiKey: env.sitecoreApiKey,
26
20
  siteName: env.sitecoreSiteName,
21
+ })
22
+ :
23
+ <% } -%>
24
+ new GraphQLDictionaryService({
25
+ clientFactory,
26
+ siteName: env.sitecoreSiteName,
27
+ /*
28
+ The Dictionary Service needs a root item ID in order to fetch dictionary phrases for the current
29
+ app. If your Sitecore instance only has 1 JSS App, you can specify the root item ID here;
30
+ otherwise, the service will attempt to figure out the root item for the current JSS App using GraphQL and app name.
31
+ rootItemId: '{GUID}'
32
+ */
27
33
  });
34
+
35
+ return service;
28
36
  }
29
37
  }
30
38
 
@@ -1,25 +1,33 @@
1
1
  import {
2
2
  LayoutService,
3
3
  GraphQLLayoutService,
4
+ <% if (!locals.xmcloud) { -%>
4
5
  RestLayoutService,
5
6
  constants,
7
+ <% } -%>
6
8
  } from '@sitecore-jss/sitecore-jss-angular';
7
9
  import { environment } from '../../environments/environment';
8
- import { clientFactory } from './client-factory';
10
+ import { clientFactory } from './graphql-client-factory';
9
11
 
10
12
  export class LayoutServiceFactory {
11
13
  create(): LayoutService {
12
- return process.env.FETCH_WITH === constants.FETCH_WITH.GRAPHQL
13
- ? new GraphQLLayoutService({
14
- clientFactory,
15
- siteName: environment.sitecoreSiteName,
16
- })
17
- : new RestLayoutService({
18
- apiHost: environment.sitecoreApiHost,
19
- apiKey: environment.sitecoreApiKey,
20
- siteName: environment.sitecoreSiteName,
21
- configurationName: environment.layoutServiceConfigurationName,
22
- });
14
+ const service =
15
+ <% if (!locals.xmcloud) { -%>
16
+ process.env.FETCH_WITH === constants.FETCH_WITH.REST
17
+ ? new RestLayoutService({
18
+ apiHost: environment.sitecoreApiHost,
19
+ apiKey: environment.sitecoreApiKey,
20
+ siteName: environment.sitecoreSiteName,
21
+ configurationName: environment.layoutServiceConfigurationName,
22
+ })
23
+ :
24
+ <% } -%>
25
+ new GraphQLLayoutService({
26
+ clientFactory,
27
+ siteName: environment.sitecoreSiteName,
28
+ });
29
+
30
+ return service;
23
31
  }
24
32
  }
25
33
 
@@ -1,7 +1,7 @@
1
1
  <app-navigation></app-navigation>
2
2
  <div class="container">
3
3
  <ng-container *ngIf="state === LayoutState.Layout">
4
- <app-visitor-identification></app-visitor-identification>
4
+ <app-scripts></app-scripts>
5
5
  <sc-placeholder
6
6
  name="<%- helper.getAppPrefix(appPrefix, appName) %>jss-main"
7
7
  [rendering]="route"
@@ -71,9 +71,8 @@ export class LayoutComponent implements OnInit, OnDestroy {
71
71
  }
72
72
  }
73
73
 
74
- onPlaceholderLoaded(placeholderName: string) {
74
+ onPlaceholderLoaded(_placeholderName: string) {
75
75
  // you may optionally hook to the loaded event for a placeholder,
76
76
  // which can be useful for analytics and other DOM-based things that need to know when a placeholder's content is available.
77
- console.debug(`layout.component.ts: placeholder component fired loaded event for the ${placeholderName} placeholder`);
78
77
  }
79
78
  }
@@ -1,4 +1,6 @@
1
- <div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom">
1
+ <div
2
+ class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom"
3
+ >
2
4
  <h5 class="my-0 me-md-auto fw-normal">
3
5
  <a routerLink="/" class="text-dark" class="logo"></a>
4
6
  </h5>
@@ -11,11 +13,8 @@
11
13
  >
12
14
  {{ 'Documentation' | translate }}
13
15
  </a>
14
- <a routerLink="/styleguide" class="p-2 text-dark">
15
- {{ 'Styleguide' | translate }}
16
- </a>
17
- <a routerLink="/graphql" class="p-2 text-dark">
18
- {{ 'GraphQL' | translate }}
16
+ <a href="https://github.com/Sitecore/jss" class="p-2 text-dark">
17
+ {{ 'JSS Repository' | translate }}
19
18
  </a>
20
19
  </nav>
21
20
  </div>
@@ -4,5 +4,4 @@ import { Component } from '@angular/core';
4
4
  selector: 'app-navigation',
5
5
  templateUrl: './navigation.component.html',
6
6
  })
7
- export class NavigationComponent {
8
- }
7
+ export class NavigationComponent {}
@@ -9,7 +9,7 @@ import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
9
9
  import { BrowserModule } from '@angular/platform-browser';
10
10
  import { NavigationComponent } from './navigation/navigation.component';
11
11
  import { TranslateModule } from '@ngx-translate/core';
12
- import { VisitorIdentificationComponent } from './visitor-identification/visitor-identification.component';
12
+ import { ScriptsModule } from './scripts/scripts.module';
13
13
 
14
14
  export function jssRouteMatcher(url: UrlSegment[]): UrlMatchResult {
15
15
  // use the route builder to parse out language / server route
@@ -27,7 +27,7 @@ export function jssRouteMatcher(url: UrlSegment[]): UrlMatchResult {
27
27
 
28
28
  return {
29
29
  consumed: url,
30
- posParams
30
+ posParams,
31
31
  };
32
32
  }
33
33
 
@@ -39,32 +39,25 @@ const routes: Routes = [
39
39
  matcher: jssRouteMatcher,
40
40
  component: LayoutComponent,
41
41
  resolve: {
42
- jssState: jssRouteResolver
42
+ jssState: jssRouteResolver,
43
43
  },
44
44
  runGuardsAndResolvers: 'always',
45
- }
45
+ },
46
46
  ];
47
47
 
48
48
  @NgModule({
49
49
  imports: [
50
- RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload', initialNavigation: 'enabledBlocking' }),
50
+ RouterModule.forRoot(routes, {
51
+ onSameUrlNavigation: 'reload',
52
+ initialNavigation: 'enabledBlocking',
53
+ }),
51
54
  JssModule,
52
55
  TranslateModule,
53
- BrowserModule
54
- ],
55
- exports: [
56
- RouterModule,
57
- TranslateModule,
58
- ],
59
- declarations: [
60
- NotFoundComponent,
61
- ServerErrorComponent,
62
- LayoutComponent,
63
- NavigationComponent,
64
- VisitorIdentificationComponent
56
+ BrowserModule,
57
+ ScriptsModule,
65
58
  ],
66
- providers: [
67
- JssRouteBuilderService,
68
- ]
59
+ exports: [RouterModule, TranslateModule],
60
+ declarations: [NotFoundComponent, ServerErrorComponent, LayoutComponent, NavigationComponent],
61
+ providers: [JssRouteBuilderService],
69
62
  })
70
- export class RoutingModule { }
63
+ export class RoutingModule {}
@@ -0,0 +1,7 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'app-scripts',
5
+ templateUrl: './scripts.component.html',
6
+ })
7
+ export class ScriptsComponent {}
@@ -0,0 +1,8 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { ScriptsComponent } from './scripts.component';
3
+
4
+ @NgModule({
5
+ exports: [ScriptsComponent],
6
+ declarations: [ScriptsComponent],
7
+ })
8
+ export class ScriptsModule {}
@@ -48,9 +48,6 @@ export default {
48
48
  {
49
49
  name: 'UnknownItem',
50
50
  },
51
- {
52
- name: 'StyleguideComponentParamsRenderingParameters',
53
- },
54
51
  {
55
52
  name: 'C__StandardTemplate',
56
53
  },
@@ -60,95 +57,6 @@ export default {
60
57
  {
61
58
  name: 'RenderEngineType',
62
59
  },
63
- {
64
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideTracking',
65
- },
66
- {
67
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideSitecoreContext',
68
- },
69
- {
70
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideSection',
71
- },
72
- {
73
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideRouteFields',
74
- },
75
- {
76
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideMultilingual',
77
- },
78
- {
79
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideLayoutTabsTab',
80
- },
81
- {
82
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideLayoutTabs',
83
- },
84
- {
85
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideLayoutReuse',
86
- },
87
- {
88
- name:
89
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideItemLinkItemTemplate',
90
- },
91
- {
92
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageText',
93
- },
94
- {
95
- name:
96
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageRichText',
97
- },
98
- {
99
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageNumber',
100
- },
101
- {
102
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageLink',
103
- },
104
- {
105
- name:
106
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageItemLink',
107
- },
108
- {
109
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageImage',
110
- },
111
- {
112
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageFile',
113
- },
114
- {
115
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageDate',
116
- },
117
- {
118
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageCustom',
119
- },
120
- {
121
- name:
122
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageContentList',
123
- },
124
- {
125
- name:
126
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideFieldUsageCheckbox',
127
- },
128
- {
129
- name:
130
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideExplanatoryComponent',
131
- },
132
- {
133
- name:
134
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideContentListItemTemplate',
135
- },
136
- {
137
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideComponentParams',
138
- },
139
- {
140
- name:
141
- '<%- helper.getAppPrefix(appPrefix, appName, false) %>StyleguideAngularLazyLoading',
142
- },
143
- {
144
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>GraphQLIntegratedDemo',
145
- },
146
- {
147
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>GraphQLConnectedDemo',
148
- },
149
- {
150
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType',
151
- },
152
60
  {
153
61
  name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ContentBlock',
154
62
  },
@@ -194,9 +102,6 @@ export default {
194
102
  kind: 'INTERFACE',
195
103
  name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
196
104
  possibleTypes: [
197
- {
198
- name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType',
199
- },
200
105
  {
201
106
  name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
202
107
  },
@@ -47,16 +47,12 @@ import 'core-js/es/reflect';
47
47
  // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
48
48
 
49
49
  /** Polyfill for node.js process **/
50
- (window as any).process = { env: { DEBUG: undefined }, };
51
-
52
-
50
+ (window as any).process = { env: { DEBUG: undefined } };
53
51
 
54
52
  /***************************************************************************************************
55
53
  * Zone JS is required by Angular itself.
56
54
  */
57
- import 'zone.js/dist/zone'; // Included with Angular CLI.
58
-
59
-
55
+ import 'zone.js'; // Included with Angular CLI.
60
56
 
61
57
  /***************************************************************************************************
62
58
  * APPLICATION IMPORTS
@@ -1,11 +1,6 @@
1
1
  // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
2
 
3
- import 'zone.js/dist/long-stack-trace-zone';
4
- import 'zone.js/dist/proxy.js';
5
- import 'zone.js/dist/sync-test';
6
- import 'zone.js/dist/jasmine-patch';
7
- import 'zone.js/dist/async-test';
8
- import 'zone.js/dist/fake-async-test';
3
+ import 'zone.js/testing';
9
4
  import { getTestBed } from '@angular/core/testing';
10
5
  import {
11
6
  BrowserDynamicTestingModule,
@@ -24,8 +24,13 @@
24
24
  "lib": ["es2018", "dom", "esnext.asynciterable"],
25
25
  "paths": {
26
26
  "@angular/*": ["../node_modules/@angular/*"],
27
- "rxjs": ["node_modules/rxjs", "../node_modules/rxjs"]
27
+ "rxjs": ["node_modules/rxjs", "../node_modules/rxjs"],
28
+ "lib/*": ["src/app/lib/*"],
28
29
  },
29
- "baseUrl": "./"
30
+ "baseUrl": "./",
31
+ "esModuleInterop": true
32
+ },
33
+ "ts-node": {
34
+ "require": ["tsconfig-paths/register"]
30
35
  }
31
36
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "scripts": {
3
+ "start": "cross-env-shell JSS_MODE=disconnected \"npm-run-all --serial bootstrap --parallel start:angular start:proxy start:watch-components\"",
4
+ "start:proxy": "ts-node --project src/tsconfig.webpack-server.json scripts/disconnected-mode-proxy.ts",
5
+ "lint:yml": "ts-node ./scripts/lint-yml.ts",
6
+ "lint": "ng lint <%- appName %> --fix && npm run lint:yml",
7
+ "scaffold": "ng generate @sitecore-jss/sitecore-jss-angular-schematics:jss-component"
8
+ },
9
+ "devDependencies": {
10
+ "yaml-lint": "^1.2.4"
11
+ }
12
+ }
@@ -0,0 +1,43 @@
1
+ /*
2
+ When the app runs in disconnected mode, and Sitecore is not present, we need to give
3
+ the app copies of the Sitecore APIs it depends on (layout service, dictionary service, content service)
4
+ to talk to so that the app can run using the locally defined disconnected data.
5
+
6
+ When the app runs in connected mode, Sitecore is present and some of the requests should be
7
+ proxied to the Sitecore API
8
+
9
+ This is accomplished by spinning up a small Express server that mocks the APIs, and then
10
+ telling angular-cli to proxy requests to the API paths to this express instance.
11
+
12
+ */
13
+ const constants = require('@sitecore-jss/sitecore-jss-angular/cjs').constants;
14
+ const environment = require('./src/environments/environment.js').environment;
15
+
16
+ const port = 3043;
17
+
18
+ const PROXY_CONFIG =
19
+ process.env.JSS_MODE === constants.JSS_MODE.DISCONNECTED
20
+ ? [
21
+ {
22
+ context: ['/data', '/sitecore'],
23
+ target: `http://localhost:${port}`,
24
+ secure: false,
25
+ },
26
+ ]
27
+ : [
28
+ {
29
+ context: [
30
+ // API endpoints
31
+ '/sitecore',
32
+ // media items
33
+ '/-',
34
+ // visitor identification
35
+ '/layouts',
36
+ ],
37
+ target: environment.sitecoreApiHost,
38
+ secure: false,
39
+ changeOrigin: true,
40
+ },
41
+ ];
42
+
43
+ module.exports = PROXY_CONFIG;
@@ -0,0 +1,27 @@
1
+ import { JssConfig } from 'lib/config';
2
+ import { ConfigPlugin } from '..';
3
+ import { constants } from '@sitecore-jss/sitecore-jss-angular/cjs';
4
+ const chalk = require('chalk');
5
+
6
+ /**
7
+ * This plugin will check if fetchwith graphgl is beeing used in disconnected mode and throw error if so
8
+ */
9
+ class DisconnectedPlugin implements ConfigPlugin {
10
+ // should come before other plugins
11
+ order = 0;
12
+
13
+ async exec(config: JssConfig) {
14
+ const disconnected = process.env.JSS_MODE === constants.JSS_MODE.DISCONNECTED;
15
+ if (disconnected && process.env.FETCH_WITH === constants.FETCH_WITH.GRAPHQL) {
16
+ throw new Error(
17
+ chalk.red(
18
+ 'GraphQL requests to Dictionary and Layout services are not supported in disconnected mode.'
19
+ )
20
+ );
21
+ }
22
+
23
+ return config;
24
+ }
25
+ }
26
+
27
+ export const disconnectedPlugin = new DisconnectedPlugin();
@@ -0,0 +1,35 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { TranslateModule } from '@ngx-translate/core';
5
+ import { RouterModule } from '@angular/router';
6
+ import { StyleguideSpecimenComponent } from './shared/styleguide-specimen/styleguide-specimen.component';
7
+ import { JssModule } from '@sitecore-jss/sitecore-jss-angular';
8
+
9
+ /*
10
+ This module is imported by the generated app-components.module.ts.
11
+ You can use this module to provide shared Angular components that are not
12
+ JSS components, etc to the generated module.
13
+
14
+ Don't want code generation? See ./.gitignore for instructions to turn it off.
15
+ */
16
+ @NgModule({
17
+ imports: [
18
+ CommonModule,
19
+ TranslateModule,
20
+ RouterModule,
21
+ JssModule,
22
+ FormsModule,
23
+ ],
24
+ exports: [
25
+ CommonModule,
26
+ TranslateModule,
27
+ RouterModule,
28
+ FormsModule,
29
+ StyleguideSpecimenComponent
30
+ ],
31
+ declarations: [
32
+ StyleguideSpecimenComponent
33
+ ],
34
+ })
35
+ export class AppComponentsSharedModule { }
@@ -3,7 +3,9 @@ import { HttpClient, HttpErrorResponse } from '@angular/common/http';
3
3
  import { HttpResponse } from '@sitecore-jss/sitecore-jss-angular';
4
4
  import { Observable, lastValueFrom } from 'rxjs';
5
5
 
6
- @Injectable()
6
+ @Injectable({
7
+ providedIn: 'root'
8
+ })
7
9
  export class JssDataFetcherService {
8
10
  constructor(
9
11
  private readonly httpClient: HttpClient,
@@ -0,0 +1,23 @@
1
+ <div
2
+ class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom"
3
+ >
4
+ <h5 class="my-0 me-md-auto fw-normal">
5
+ <a routerLink="/" class="text-dark" class="logo"></a>
6
+ </h5>
7
+ <nav class="my-2 my-md-0 me-md-3">
8
+ <a
9
+ class="p-2 text-dark"
10
+ href="https://jss.sitecore.com"
11
+ target="_blank"
12
+ rel="noopener noreferrer"
13
+ >
14
+ {{ 'Documentation' | translate }}
15
+ </a>
16
+ <a routerLink="/styleguide" class="p-2 text-dark">
17
+ {{ 'Styleguide' | translate }}
18
+ </a>
19
+ <a routerLink="/graphql" class="p-2 text-dark">
20
+ {{ 'GraphQL' | translate }}
21
+ </a>
22
+ </nav>
23
+ </div>
@@ -0,0 +1,3 @@
1
+ <div>
2
+ <app-visitor-identification></app-visitor-identification>
3
+ </div>
@@ -0,0 +1,9 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { ScriptsComponent } from './scripts.component';
3
+ import { VisitorIdentificationComponent } from './visitor-identification/visitor-identification.component';
4
+
5
+ @NgModule({
6
+ exports: [ScriptsComponent],
7
+ declarations: [ScriptsComponent, VisitorIdentificationComponent],
8
+ })
9
+ export class ScriptsModule {}