create-sitecore-jss 22.6.0-canary.4 → 22.6.0-canary.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/processes/transform.js +2 -4
- package/dist/initializers/nextjs/index.js +2 -0
- package/dist/initializers/nextjs/prompts.js +11 -1
- package/dist/initializers/nextjs-xmcloud/index.js +2 -1
- package/dist/templates/angular/.eslintignore +3 -3
- package/dist/templates/angular/.eslintrc +66 -66
- package/dist/templates/angular/LICENSE.txt +202 -202
- package/dist/templates/angular/README.md +13 -13
- package/dist/templates/angular/angular.json +171 -171
- package/dist/templates/angular/e2e/tsconfig.e2e.json +15 -15
- package/dist/templates/angular/gitignore +52 -52
- package/dist/templates/angular/package.json +116 -116
- package/dist/templates/angular/scripts/temp/gitignore +2 -2
- package/dist/templates/angular/src/app/app.component.html +1 -1
- package/dist/templates/angular/src/app/components/content-block/content-block.component.html +4 -4
- package/dist/templates/angular/src/app/components/gitignore +7 -7
- package/dist/templates/angular/src/app/routing/layout/layout.component.html +17 -17
- package/dist/templates/angular/src/app/routing/navigation/navigation.component.html +20 -20
- package/dist/templates/angular/src/app/routing/not-found/not-found.component.html +7 -7
- package/dist/templates/angular/src/app/routing/scripts/scripts.component.html +1 -1
- package/dist/templates/angular/src/app/routing/server-error/server-error.component.html +3 -3
- package/dist/templates/angular/src/environments/gitignore +1 -1
- package/dist/templates/angular/src/index.html +12 -12
- package/dist/templates/angular/src/styles.css +34 -34
- package/dist/templates/angular/src/tsconfig.app.json +21 -21
- package/dist/templates/angular/src/tsconfig.server.json +20 -20
- package/dist/templates/angular/src/tsconfig.spec.json +24 -24
- package/dist/templates/angular/src/tsconfig.webpack-server.json +6 -6
- package/dist/templates/angular/tsconfig.json +38 -38
- package/dist/templates/angular-sxp/.env +2 -2
- package/dist/templates/angular-sxp/angular.json +13 -13
- package/dist/templates/angular-sxp/package.json +12 -12
- package/dist/templates/angular-sxp/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.graphql +69 -69
- package/dist/templates/angular-sxp/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.html +55 -55
- package/dist/templates/angular-sxp/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.html +47 -47
- package/dist/templates/angular-sxp/src/app/components/graph-ql-layout/graph-ql-layout.component.html +22 -22
- package/dist/templates/angular-sxp/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.html +5 -5
- package/dist/templates/angular-sxp/src/app/components/styleguide-component-params/styleguide-component-params.component.html +19 -19
- package/dist/templates/angular-sxp/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.html +14 -14
- package/dist/templates/angular-sxp/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.html +19 -19
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.html +11 -11
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.html +26 -26
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.html +4 -4
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.html +27 -27
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.html +10 -10
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.html +30 -30
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.html +17 -17
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.html +44 -44
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.html +11 -11
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.html +11 -11
- package/dist/templates/angular-sxp/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.html +13 -13
- package/dist/templates/angular-sxp/src/app/components/styleguide-layout/styleguide-layout.component.html +20 -20
- package/dist/templates/angular-sxp/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.html +52 -52
- package/dist/templates/angular-sxp/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.html +37 -37
- package/dist/templates/angular-sxp/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.html +12 -12
- package/dist/templates/angular-sxp/src/app/components/styleguide-multilingual/styleguide-multilingual.component.html +15 -15
- package/dist/templates/angular-sxp/src/app/components/styleguide-route-fields/styleguide-route-fields.component.html +8 -8
- package/dist/templates/angular-sxp/src/app/components/styleguide-section/styleguide-section.component.html +7 -7
- package/dist/templates/angular-sxp/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.html +3 -3
- package/dist/templates/angular-sxp/src/app/components/styleguide-tracking/styleguide-tracking.component.html +175 -175
- package/dist/templates/angular-sxp/src/app/routing/navigation/navigation.component.html +23 -23
- package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.component.html +3 -3
- package/dist/templates/angular-xmcloud/README.md +87 -87
- package/dist/templates/angular-xmcloud/angular.json +33 -33
- package/dist/templates/angular-xmcloud/package.json +17 -17
- package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.html +5 -5
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.html +14 -14
- package/dist/templates/angular-xmcloud/src/app/components/image/image.component.html +36 -36
- package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.html +15 -15
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.html +23 -23
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.html +21 -21
- package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.html +5 -5
- package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.html +1 -1
- package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.html +21 -21
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.html +8 -8
- package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.html +11 -11
- package/dist/templates/angular-xmcloud/src/app/components/title/title.component.html +10 -10
- package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.html +38 -38
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_component.scss +48 -48
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_container.scss +64 -64
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_fonts.scss +3 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_footer.scss +31 -31
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_header.scss +51 -51
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_navigation.scss +150 -150
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_promo.scss +58 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_rich-text.scss +11 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_variables.scss +9 -9
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/main.scss +8 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/main.scss +14 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/_app.scss +103 -103
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_functions.scss +8 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_mixins.scss +121 -121
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_vars.scss +3 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_colors.scss +283 -283
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_fontSizes.scss +16 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_margins.scss +10 -10
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/_fonts.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/index.scss +3 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/_link-button.scss +26 -26
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_inputs.scss +58 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_links.scss +14 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_ui-datepicker.scss +7 -7
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext-files-icons.scss +86 -86
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext.scss +101 -101
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/index.scss +2 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/_typehead.scss +95 -95
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-column-splitter.scss +14 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-container.scss +27 -27
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-image.scss +18 -18
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-navigation.scss +51 -51
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-promo.scss +42 -42
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-richtext-content.scss +19 -19
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_alignment.scss +25 -25
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_boxed.scss +16 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_clearfix.scss +11 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_highlighted.scss +62 -62
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_link-button.scss +16 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_promoted-box.scss +3 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/index.scss +5 -5
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_bordered.scss +23 -23
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_title-row-box.scss +66 -66
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/_image-default-size.scss +6 -6
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-left.scss +3 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-right.scss +3 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/index.scss +17 -17
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_acaindent.scss +5 -5
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_background.scss +27 -27
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_component-link-list.scss +45 -45
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_list-vertical.scss +20 -20
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/index.scss +2 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-fat.scss +58 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-main-horizontal-vertical.scss +176 -176
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-mobile.scss +85 -85
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-sidebar.scss +29 -29
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_sitemap-navigation.scss +20 -20
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/index.scss +5 -5
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_absolute-bottom-link.scss +8 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-hero.scss +40 -40
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-shadow.scss +42 -42
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/index.scss +3 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/_rich-text-lists.scss +63 -63
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_background-colors.scss +14 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_indent.scss +13 -13
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/index.scss +2 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/_component-title.scss +30 -30
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/index.scss +1 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/main.scss +4 -4
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/index.scss +5 -5
- package/dist/templates/nextjs/.eslintrc +31 -31
- package/dist/templates/nextjs/.gitattributes +11 -11
- package/dist/templates/nextjs/.graphql-let.yml +8 -8
- package/dist/templates/nextjs/.prettierrc +8 -8
- package/dist/templates/nextjs/.vscode/launch.json +15 -15
- package/dist/templates/nextjs/LICENSE.txt +202 -202
- package/dist/templates/nextjs/README.md +8 -8
- package/dist/templates/nextjs/gitignore +32 -32
- package/dist/templates/nextjs/package.json +87 -87
- package/dist/templates/nextjs/scripts/temp/gitignore +2 -2
- package/dist/templates/nextjs/sitecore/config/{{appName}}.config +165 -165
- package/dist/templates/nextjs/src/assets/app.css +36 -36
- package/dist/templates/nextjs/src/temp/GraphQLIntrospectionResult.json +22215 -22215
- package/dist/templates/nextjs/src/temp/gitignore +3 -3
- package/dist/templates/nextjs/tsconfig.json +38 -38
- package/dist/templates/nextjs/tsconfig.scripts.json +11 -11
- package/dist/templates/nextjs-styleguide/package.json +14 -14
- package/dist/templates/nextjs-styleguide/sitecore/definitions/components/graphql/GraphQL-IntegratedDemo.sitecore.graphql +71 -71
- package/dist/templates/nextjs-styleguide/sitecore/gitignore +3 -3
- package/dist/templates/nextjs-styleguide/src/components/graphql/GraphQL-ConnectedDemo.dynamic.graphql +69 -69
- package/dist/templates/nextjs-sxa/package.json +11 -11
- package/dist/templates/nextjs-sxa/src/assets/basic/_component.scss +48 -48
- package/dist/templates/nextjs-sxa/src/assets/basic/_container.scss +64 -64
- package/dist/templates/nextjs-sxa/src/assets/basic/_fonts.scss +3 -3
- package/dist/templates/nextjs-sxa/src/assets/basic/_footer.scss +31 -31
- package/dist/templates/nextjs-sxa/src/assets/basic/_header.scss +49 -49
- package/dist/templates/nextjs-sxa/src/assets/basic/_navigation.scss +150 -150
- package/dist/templates/nextjs-sxa/src/assets/basic/_promo.scss +58 -58
- package/dist/templates/nextjs-sxa/src/assets/basic/_rich-text.scss +11 -11
- package/dist/templates/nextjs-sxa/src/assets/basic/_variables.scss +9 -9
- package/dist/templates/nextjs-sxa/src/assets/basic/main.scss +8 -8
- package/dist/templates/nextjs-sxa/src/assets/main.scss +4 -4
- package/dist/templates/nextjs-sxa/src/assets/sass/_app.scss +103 -103
- package/dist/templates/nextjs-sxa/src/assets/sass/abstracts/_functions.scss +8 -8
- package/dist/templates/nextjs-sxa/src/assets/sass/abstracts/_mixins.scss +121 -121
- package/dist/templates/nextjs-sxa/src/assets/sass/abstracts/_vars.scss +3 -3
- package/dist/templates/nextjs-sxa/src/assets/sass/abstracts/vars/_colors.scss +283 -283
- package/dist/templates/nextjs-sxa/src/assets/sass/abstracts/vars/_fontSizes.scss +16 -16
- package/dist/templates/nextjs-sxa/src/assets/sass/abstracts/vars/_margins.scss +10 -10
- package/dist/templates/nextjs-sxa/src/assets/sass/base/fonts/_fonts.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/base/fonts/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/base/index.scss +3 -3
- package/dist/templates/nextjs-sxa/src/assets/sass/base/links/_link-button.scss +26 -26
- package/dist/templates/nextjs-sxa/src/assets/sass/base/links/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/base/reset/_inputs.scss +58 -58
- package/dist/templates/nextjs-sxa/src/assets/sass/base/reset/_links.scss +14 -14
- package/dist/templates/nextjs-sxa/src/assets/sass/base/reset/_ui-datepicker.scss +7 -7
- package/dist/templates/nextjs-sxa/src/assets/sass/base/richtext/_richtext-files-icons.scss +86 -86
- package/dist/templates/nextjs-sxa/src/assets/sass/base/richtext/_richtext.scss +101 -101
- package/dist/templates/nextjs-sxa/src/assets/sass/base/richtext/index.scss +2 -2
- package/dist/templates/nextjs-sxa/src/assets/sass/base/typehead/_typehead.scss +95 -95
- package/dist/templates/nextjs-sxa/src/assets/sass/base/typehead/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +14 -14
- package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-container.scss +27 -27
- package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-image.scss +18 -18
- package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-navigation.scss +51 -51
- package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-promo.scss +42 -42
- package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-richtext-content.scss +19 -19
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_alignment.scss +53 -53
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_boxed.scss +16 -16
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_clearfix.scss +11 -11
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_highlighted.scss +62 -62
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_link-button.scss +16 -16
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_promoted-box.scss +3 -3
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/index.scss +5 -5
- package/dist/templates/nextjs-sxa/src/assets/sass/components/container/_bordered.scss +23 -23
- package/dist/templates/nextjs-sxa/src/assets/sass/components/container/_title-row-box.scss +66 -66
- package/dist/templates/nextjs-sxa/src/assets/sass/components/container/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/image/_image-default-size.scss +6 -6
- package/dist/templates/nextjs-sxa/src/assets/sass/components/image/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/image-alignment/_image-left.scss +3 -3
- package/dist/templates/nextjs-sxa/src/assets/sass/components/image-alignment/_image-right.scss +3 -3
- package/dist/templates/nextjs-sxa/src/assets/sass/components/index.scss +17 -17
- package/dist/templates/nextjs-sxa/src/assets/sass/components/layout/_acaindent.scss +5 -5
- package/dist/templates/nextjs-sxa/src/assets/sass/components/layout/_background.scss +27 -27
- package/dist/templates/nextjs-sxa/src/assets/sass/components/layout/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/link-list/_component-link-list.scss +45 -45
- package/dist/templates/nextjs-sxa/src/assets/sass/components/link-list/_list-vertical.scss +20 -20
- package/dist/templates/nextjs-sxa/src/assets/sass/components/link-list/index.scss +2 -2
- package/dist/templates/nextjs-sxa/src/assets/sass/components/navigation/_navigation-fat.scss +58 -58
- package/dist/templates/nextjs-sxa/src/assets/sass/components/navigation/_navigation-main-horizontal-vertical.scss +176 -176
- package/dist/templates/nextjs-sxa/src/assets/sass/components/navigation/_navigation-mobile.scss +85 -85
- package/dist/templates/nextjs-sxa/src/assets/sass/components/navigation/_navigation-sidebar.scss +29 -29
- package/dist/templates/nextjs-sxa/src/assets/sass/components/navigation/_sitemap-navigation.scss +20 -20
- package/dist/templates/nextjs-sxa/src/assets/sass/components/navigation/index.scss +5 -5
- package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_absolute-bottom-link.scss +8 -8
- package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-hero.scss +40 -40
- package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +42 -42
- package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/index.scss +3 -3
- package/dist/templates/nextjs-sxa/src/assets/sass/components/rich-text/_rich-text-lists.scss +63 -63
- package/dist/templates/nextjs-sxa/src/assets/sass/components/rich-text/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/spacing/_background-colors.scss +14 -14
- package/dist/templates/nextjs-sxa/src/assets/sass/components/spacing/_indent.scss +13 -13
- package/dist/templates/nextjs-sxa/src/assets/sass/components/spacing/index.scss +2 -2
- package/dist/templates/nextjs-sxa/src/assets/sass/components/title/_component-title.scss +30 -30
- package/dist/templates/nextjs-sxa/src/assets/sass/components/title/index.scss +1 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/main.scss +4 -4
- package/dist/templates/nextjs-sxa/src/assets/sass/variants/index.scss +5 -5
- package/dist/templates/nextjs-sxa/src/components/ColumnSplitter.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Container.tsx +5 -5
- package/dist/templates/nextjs-sxa/src/components/Image.tsx +9 -9
- package/dist/templates/nextjs-sxa/src/components/LinkList.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Navigation.tsx +2 -2
- package/dist/templates/nextjs-sxa/src/components/PageContent.tsx +3 -3
- package/dist/templates/nextjs-sxa/src/components/Promo.tsx +3 -3
- package/dist/templates/nextjs-sxa/src/components/RichText.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/RowSplitter.tsx +1 -1
- package/dist/templates/nextjs-sxa/src/components/Title.tsx +2 -2
- package/dist/templates/nextjs-sxa/src/pages/api/sitemap.ts +12 -12
- package/dist/templates/nextjs-xmcloud/.env +19 -19
- package/dist/templates/nextjs-xmcloud/package.json +8 -8
- package/dist/templates/nextjs-xmcloud/scripts/generate-component-builder/plugins/form.ts +24 -0
- package/dist/templates/nextjs-xmcloud/src/lib/next-config/plugins/monorepo-xmcloud.js +4 -0
- package/dist/templates/nextjs-xmcloud/src/pages/[[...path]].tsx +112 -0
- package/dist/templates/node-headless-ssr-experience-edge/README.md +56 -56
- package/dist/templates/node-headless-ssr-experience-edge/gitignore +19 -19
- package/dist/templates/node-headless-ssr-experience-edge/package.json +34 -34
- package/dist/templates/node-headless-ssr-experience-edge/tsconfig.json +22 -22
- package/dist/templates/node-headless-ssr-proxy/.vscode/launch.json +47 -47
- package/dist/templates/node-headless-ssr-proxy/LICENSE.txt +202 -202
- package/dist/templates/node-headless-ssr-proxy/README.md +65 -65
- package/dist/templates/node-headless-ssr-proxy/gitignore +19 -19
- package/dist/templates/node-headless-ssr-proxy/package.json +39 -39
- package/dist/templates/node-headless-ssr-proxy/src/error.html +200 -200
- package/dist/templates/node-headless-ssr-proxy/tsconfig.json +22 -22
- package/dist/templates/node-xmcloud-proxy/README.md +165 -165
- package/dist/templates/node-xmcloud-proxy/gitignore +33 -33
- package/dist/templates/node-xmcloud-proxy/package.json +26 -26
- package/dist/templates/node-xmcloud-proxy/tsconfig.json +22 -22
- package/dist/templates/react/.prettierrc +9 -9
- package/dist/templates/react/LICENSE.txt +202 -202
- package/dist/templates/react/README.md +2402 -2402
- package/dist/templates/react/gitignore +25 -25
- package/dist/templates/react/package.json +5 -5
- package/dist/templates/react/public/index.html +35 -35
- package/dist/templates/react/sitecore/config/{{appName}}.config +90 -90
- package/dist/templates/react/sitecore/definitions/components/graphql/GraphQL-IntegratedDemo.sitecore.graphql +71 -71
- package/dist/templates/react/sitecore/gitignore +2 -2
- package/dist/templates/react/src/assets/sc_logo.svg +52 -52
- package/dist/templates/react/src/components/graphql/query.graphql +69 -69
- package/dist/templates/react/src/temp/GraphQLFragmentTypes.json +207 -207
- package/dist/templates/react/src/temp/gitignore +3 -3
- package/dist/templates/react-native/package.json +4 -4
- package/dist/templates/vue/.browserslistrc +2 -2
- package/dist/templates/vue/.prettierrc +9 -9
- package/dist/templates/vue/LICENSE.txt +202 -202
- package/dist/templates/vue/README.md +36 -36
- package/dist/templates/vue/gitignore +25 -25
- package/dist/templates/vue/package.json +87 -87
- package/dist/templates/vue/public/index.html +27 -27
- package/dist/templates/vue/public/manifest.json +14 -14
- package/dist/templates/vue/public/robots.txt +2 -2
- package/dist/templates/vue/sitecore/config/{{appName}}.config +89 -89
- package/dist/templates/vue/sitecore/definitions/components/GraphQL-IntegratedDemo.sitecore.graphql +71 -71
- package/dist/templates/vue/sitecore/gitignore +4 -4
- package/dist/templates/vue/src/assets/app.css +30 -30
- package/dist/templates/vue/src/components/GraphQL/GraphQL-ConnectedDemo.query.graphql +69 -69
- package/dist/templates/vue/src/temp/GraphQLFragmentTypes.json +273 -273
- package/dist/templates/vue/src/temp/gitignore +3 -3
- package/package.json +2 -2
|
@@ -52,7 +52,7 @@ export const Default = (props: NavigationProps): JSX.Element => {
|
|
|
52
52
|
const { sitecoreContext } = useSitecoreContext();
|
|
53
53
|
const styles =
|
|
54
54
|
props.params != null
|
|
55
|
-
? `${props.params.GridParameters ?? ''} ${props
|
|
55
|
+
? `${props.params.GridParameters ?? ''} ${props?.params?.Styles ?? ''}`.trimEnd()
|
|
56
56
|
: '';
|
|
57
57
|
const id = props.params != null ? props.params.RenderingIdentifier : null;
|
|
58
58
|
|
|
@@ -110,7 +110,7 @@ export const Default = (props: NavigationProps): JSX.Element => {
|
|
|
110
110
|
const NavigationList = (props: NavigationProps) => {
|
|
111
111
|
const { sitecoreContext } = useSitecoreContext();
|
|
112
112
|
const [active, setActive] = useState(false);
|
|
113
|
-
const classNameList = `${props
|
|
113
|
+
const classNameList = `${props?.fields?.Styles.concat('rel-level' + props.relativeLevel).join(
|
|
114
114
|
' '
|
|
115
115
|
)}`;
|
|
116
116
|
|
|
@@ -23,7 +23,7 @@ type ComponentContentProps = {
|
|
|
23
23
|
const ComponentContent = (props: ComponentContentProps) => {
|
|
24
24
|
const id = props.id;
|
|
25
25
|
return (
|
|
26
|
-
<div className={`component content ${props
|
|
26
|
+
<div className={`component content ${props?.styles}`} id={id ? id : undefined}>
|
|
27
27
|
<div className="component-content">
|
|
28
28
|
<div className="field-content">{props.children}</div>
|
|
29
29
|
</div>
|
|
@@ -37,7 +37,7 @@ export const Default = (props: PageContentProps): JSX.Element => {
|
|
|
37
37
|
|
|
38
38
|
if (!(props.fields && props.fields.Content) && !sitecoreContext?.route?.fields?.Content) {
|
|
39
39
|
return (
|
|
40
|
-
<div className={`component content ${props
|
|
40
|
+
<div className={`component content ${props?.params?.styles}`} id={id ? id : undefined}>
|
|
41
41
|
<div className="component-content">
|
|
42
42
|
<div className="field-content">[Content]</div>
|
|
43
43
|
</div>
|
|
@@ -50,7 +50,7 @@ export const Default = (props: PageContentProps): JSX.Element => {
|
|
|
50
50
|
: sitecoreContext?.route?.fields?.Content) as RichTextField;
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
|
-
<ComponentContent styles={props
|
|
53
|
+
<ComponentContent styles={props?.params?.styles} id={id}>
|
|
54
54
|
<JssRichText field={field} />
|
|
55
55
|
</ComponentContent>
|
|
56
56
|
);
|
|
@@ -21,7 +21,7 @@ type PromoProps = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const PromoDefaultComponent = (props: PromoProps): JSX.Element => (
|
|
24
|
-
<div className={`component promo ${props
|
|
24
|
+
<div className={`component promo ${props?.params?.styles}`}>
|
|
25
25
|
<div className="component-content">
|
|
26
26
|
<span className="is-empty-hint">Promo</span>
|
|
27
27
|
</div>
|
|
@@ -32,7 +32,7 @@ export const Default = (props: PromoProps): JSX.Element => {
|
|
|
32
32
|
const id = props.params.RenderingIdentifier;
|
|
33
33
|
if (props.fields) {
|
|
34
34
|
return (
|
|
35
|
-
<div className={`component promo ${props
|
|
35
|
+
<div className={`component promo ${props?.params?.styles}`} id={id ? id : undefined}>
|
|
36
36
|
<div className="component-content">
|
|
37
37
|
<div className="field-promoicon">
|
|
38
38
|
<JssImage field={props.fields.PromoIcon} />
|
|
@@ -59,7 +59,7 @@ export const WithText = (props: PromoProps): JSX.Element => {
|
|
|
59
59
|
const id = props.params.RenderingIdentifier;
|
|
60
60
|
if (props.fields) {
|
|
61
61
|
return (
|
|
62
|
-
<div className={`component promo ${props
|
|
62
|
+
<div className={`component promo ${props?.params?.styles}`} id={id ? id : undefined}>
|
|
63
63
|
<div className="component-content">
|
|
64
64
|
<div className="field-promoicon">
|
|
65
65
|
<JssImage field={props.fields.PromoIcon} />
|
|
@@ -20,7 +20,7 @@ export const Default = (props: RichTextProps): JSX.Element => {
|
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
22
|
<div
|
|
23
|
-
className={`component rich-text ${props
|
|
23
|
+
className={`component rich-text ${props?.params?.styles.trimEnd()}`}
|
|
24
24
|
id={id ? id : undefined}
|
|
25
25
|
>
|
|
26
26
|
<div className="component-content">{text}</div>
|
|
@@ -11,7 +11,7 @@ interface ComponentProps {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export const Default = (props: ComponentProps): JSX.Element => {
|
|
14
|
-
const styles = `${props
|
|
14
|
+
const styles = `${props?.params?.GridParameters ?? ''} ${props?.params?.Styles ?? ''}`.trimEnd();
|
|
15
15
|
const rowStyles = [
|
|
16
16
|
props.params.Styles1,
|
|
17
17
|
props.params.Styles2,
|
|
@@ -52,7 +52,7 @@ type ComponentContentProps = {
|
|
|
52
52
|
const ComponentContent = (props: ComponentContentProps) => {
|
|
53
53
|
const id = props.id;
|
|
54
54
|
return (
|
|
55
|
-
<div className={`component title ${props
|
|
55
|
+
<div className={`component title ${props?.styles}`} id={id ? id : undefined}>
|
|
56
56
|
<div className="component-content">
|
|
57
57
|
<div className="field-title">{props.children}</div>
|
|
58
58
|
</div>
|
|
@@ -79,7 +79,7 @@ export const Default = (props: TitleProps): JSX.Element => {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
return (
|
|
82
|
-
<ComponentContent styles={props
|
|
82
|
+
<ComponentContent styles={props?.params?.styles} id={props?.params?.RenderingIdentifier}>
|
|
83
83
|
<>
|
|
84
84
|
{sitecoreContext.pageEditing ? (
|
|
85
85
|
<Text field={text} />
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
2
2
|
import { NativeDataFetcher, GraphQLSitemapXmlService } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
3
3
|
import { siteResolver } from 'lib/site-resolver';
|
|
4
|
-
import config from 'temp/config';
|
|
5
4
|
import clientFactory from 'lib/graphql-client-factory';
|
|
6
5
|
|
|
7
|
-
const ABSOLUTE_URL_REGEXP = '^(?:[a-z]+:)?//';
|
|
8
|
-
|
|
9
6
|
const sitemapApi = async (
|
|
10
7
|
req: NextApiRequest,
|
|
11
8
|
res: NextApiResponse
|
|
@@ -30,13 +27,15 @@ const sitemapApi = async (
|
|
|
30
27
|
|
|
31
28
|
// regular sitemap
|
|
32
29
|
if (sitemapPath) {
|
|
33
|
-
const isAbsoluteUrl = sitemapPath.match(ABSOLUTE_URL_REGEXP);
|
|
34
|
-
const sitemapUrl = isAbsoluteUrl ? sitemapPath : `${config.sitecoreApiHost}${sitemapPath}`;
|
|
35
|
-
res.setHeader('Content-Type', 'text/xml;charset=utf-8');
|
|
36
|
-
|
|
37
30
|
try {
|
|
38
31
|
const fetcher = new NativeDataFetcher();
|
|
39
|
-
const xmlResponse = await fetcher.fetch<string>(
|
|
32
|
+
const xmlResponse = await fetcher.fetch<string>(sitemapPath);
|
|
33
|
+
|
|
34
|
+
if (!xmlResponse?.data) {
|
|
35
|
+
return res.redirect('/404');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
res.setHeader('Content-Type', 'text/xml;charset=utf-8');
|
|
40
39
|
|
|
41
40
|
return res.send(xmlResponse.data);
|
|
42
41
|
} catch (error) {
|
|
@@ -51,23 +50,24 @@ const sitemapApi = async (
|
|
|
51
50
|
return res.redirect('/404');
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
const
|
|
53
|
+
const reqHost = req.headers.host;
|
|
55
54
|
const reqProtocol = req.headers['x-forwarded-proto'] || 'https';
|
|
56
55
|
const SitemapLinks = sitemaps
|
|
57
56
|
.map((item: string) => {
|
|
58
57
|
const parseUrl = item.split('/');
|
|
59
58
|
const lastSegment = parseUrl[parseUrl.length - 1];
|
|
59
|
+
const escapedUrl = `${reqProtocol}://${reqHost}/${lastSegment}`.replace(/&/g, '&');
|
|
60
60
|
|
|
61
61
|
return `<sitemap>
|
|
62
|
-
<loc>${
|
|
62
|
+
<loc>${escapedUrl}</loc>
|
|
63
63
|
</sitemap>`;
|
|
64
64
|
})
|
|
65
65
|
.join('');
|
|
66
66
|
|
|
67
67
|
res.setHeader('Content-Type', 'text/xml;charset=utf-8');
|
|
68
68
|
|
|
69
|
-
return res.send(
|
|
70
|
-
<sitemapindex xmlns="http://sitemaps.org/schemas/sitemap/0.9"
|
|
69
|
+
return res.send(`<?xml version="1.0" encoding="UTF-8"?>
|
|
70
|
+
<sitemapindex xmlns="http://sitemaps.org/schemas/sitemap/0.9">${SitemapLinks}</sitemapindex>
|
|
71
71
|
`);
|
|
72
72
|
};
|
|
73
73
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
# ========== Sitecore Edge Platform ===========
|
|
3
|
-
|
|
4
|
-
# Your unified Sitecore Edge Context Id.
|
|
5
|
-
# This will be used over any Sitecore Preview / Delivery Edge variables (above).
|
|
6
|
-
SITECORE_EDGE_CONTEXT_ID=
|
|
7
|
-
|
|
8
|
-
# ==============================================
|
|
9
|
-
|
|
10
|
-
# An optional Sitecore Personalize scope identifier.
|
|
11
|
-
# This can be used to isolate personalization data when multiple XM Cloud Environments share a Personalize tenant.
|
|
12
|
-
# This should match the PAGES_PERSONALIZE_SCOPE environment variable for your connected XM Cloud Environment.
|
|
13
|
-
NEXT_PUBLIC_PERSONALIZE_SCOPE=
|
|
14
|
-
|
|
15
|
-
# Timeout (ms) for Sitecore CDP requests to respond within. Default is 400.
|
|
16
|
-
PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT=
|
|
17
|
-
|
|
18
|
-
# Timeout (ms) for Sitecore Experience Edge requests to respond within. Default is 400.
|
|
19
|
-
PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT=
|
|
1
|
+
|
|
2
|
+
# ========== Sitecore Edge Platform ===========
|
|
3
|
+
|
|
4
|
+
# Your unified Sitecore Edge Context Id.
|
|
5
|
+
# This will be used over any Sitecore Preview / Delivery Edge variables (above).
|
|
6
|
+
SITECORE_EDGE_CONTEXT_ID=
|
|
7
|
+
|
|
8
|
+
# ==============================================
|
|
9
|
+
|
|
10
|
+
# An optional Sitecore Personalize scope identifier.
|
|
11
|
+
# This can be used to isolate personalization data when multiple XM Cloud Environments share a Personalize tenant.
|
|
12
|
+
# This should match the PAGES_PERSONALIZE_SCOPE environment variable for your connected XM Cloud Environment.
|
|
13
|
+
NEXT_PUBLIC_PERSONALIZE_SCOPE=
|
|
14
|
+
|
|
15
|
+
# Timeout (ms) for Sitecore CDP requests to respond within. Default is 400.
|
|
16
|
+
PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT=
|
|
17
|
+
|
|
18
|
+
# Timeout (ms) for Sitecore Experience Edge requests to respond within. Default is 400.
|
|
19
|
+
PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT=
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"dependencies": {
|
|
3
|
-
"@sitecore/components": "~2.0.1",
|
|
4
|
-
"@sitecore-cloudsdk/core": "^0.4.2",
|
|
5
|
-
"@sitecore-cloudsdk/events": "^0.4.2",
|
|
6
|
-
"@sitecore-feaas/clientside": "^0.5.19"
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"dependencies": {
|
|
3
|
+
"@sitecore/components": "~2.0.1",
|
|
4
|
+
"@sitecore-cloudsdk/core": "^0.4.2",
|
|
5
|
+
"@sitecore-cloudsdk/events": "^0.4.2",
|
|
6
|
+
"@sitecore-feaas/clientside": "^0.5.19"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentBuilderPlugin, ComponentBuilderPluginConfig } from '..';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Provides Form component configuration
|
|
5
|
+
*/
|
|
6
|
+
class FormPlugin implements ComponentBuilderPlugin {
|
|
7
|
+
order = 1;
|
|
8
|
+
|
|
9
|
+
exec(config: ComponentBuilderPluginConfig) {
|
|
10
|
+
config.packages.push({
|
|
11
|
+
name: '@sitecore-jss/sitecore-jss-nextjs',
|
|
12
|
+
components: [
|
|
13
|
+
{
|
|
14
|
+
componentName: 'Form',
|
|
15
|
+
moduleName: 'Form',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
return config;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const formPlugin = new FormPlugin();
|
|
@@ -14,6 +14,10 @@ const monorepoPlugin = (nextConfig = {}) => {
|
|
|
14
14
|
'./node_modules/@sitecore-feaas/clientside/dist/browser/react.esm.js'
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
+
config.resolve.alias['@sitecore-cloudsdk/events'] = path.resolve(
|
|
18
|
+
CWD, './node_modules/@sitecore-cloudsdk/events'
|
|
19
|
+
);
|
|
20
|
+
|
|
17
21
|
// Overload the Webpack config if it was already overloaded
|
|
18
22
|
if (typeof nextConfig.webpack === 'function') {
|
|
19
23
|
return nextConfig.webpack(config, options);
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
<% if (prerender === 'SSG') { -%>
|
|
3
|
+
import { GetStaticPaths, GetStaticProps } from 'next';
|
|
4
|
+
<% } else if (prerender === 'SSR') { -%>
|
|
5
|
+
import { GetServerSideProps } from 'next';
|
|
6
|
+
<% } -%>
|
|
7
|
+
import NotFound from 'src/NotFound';
|
|
8
|
+
import Layout from 'src/Layout';
|
|
9
|
+
import {
|
|
10
|
+
SitecoreContext,
|
|
11
|
+
ComponentPropsContext,
|
|
12
|
+
<% if (prerender === 'SSG') { -%>
|
|
13
|
+
StaticPath,
|
|
14
|
+
<% } -%>
|
|
15
|
+
} from '@sitecore-jss/sitecore-jss-nextjs';
|
|
16
|
+
import { handleEditorFastRefresh } from '@sitecore-jss/sitecore-jss-nextjs/utils';
|
|
17
|
+
import { SitecorePageProps } from 'lib/page-props';
|
|
18
|
+
import { sitecorePagePropsFactory } from 'lib/page-props-factory';
|
|
19
|
+
import { componentBuilder } from 'temp/componentBuilder';
|
|
20
|
+
import config from 'temp/config';
|
|
21
|
+
<% if (prerender === 'SSG') { -%>
|
|
22
|
+
import { sitemapFetcher } from 'lib/sitemap-fetcher';
|
|
23
|
+
|
|
24
|
+
<% } -%>
|
|
25
|
+
|
|
26
|
+
const SitecorePage = ({ notFound, componentProps, layoutData, headLinks }: SitecorePageProps): JSX.Element => {
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
// Since Sitecore editors do not support Fast Refresh, need to refresh editor chromes after Fast Refresh finished
|
|
29
|
+
handleEditorFastRefresh();
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
if (notFound || !layoutData.sitecore.route) {
|
|
33
|
+
// Shouldn't hit this (as long as 'notFound' is being returned below), but just to be safe
|
|
34
|
+
return <NotFound />;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const isEditing = layoutData.sitecore.context.pageEditing;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ComponentPropsContext value={componentProps}>
|
|
41
|
+
<SitecoreContext
|
|
42
|
+
componentFactory={componentBuilder.getComponentFactory({ isEditing })}
|
|
43
|
+
layoutData={layoutData}
|
|
44
|
+
api={{
|
|
45
|
+
edge: {
|
|
46
|
+
contextId: config.sitecoreEdgeContextId,
|
|
47
|
+
edgeUrl: config.sitecoreEdgeUrl,
|
|
48
|
+
},
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<Layout layoutData={layoutData} headLinks={headLinks} />
|
|
52
|
+
</SitecoreContext>
|
|
53
|
+
</ComponentPropsContext>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
<% if (prerender === 'SSG') { -%>
|
|
58
|
+
// This function gets called at build and export time to determine
|
|
59
|
+
// pages for SSG ("paths", as tokenized array).
|
|
60
|
+
export const getStaticPaths: GetStaticPaths = async (context) => {
|
|
61
|
+
// Fallback, along with revalidate in getStaticProps (below),
|
|
62
|
+
// enables Incremental Static Regeneration. This allows us to
|
|
63
|
+
// leave certain (or all) paths empty if desired and static pages
|
|
64
|
+
// will be generated on request (development mode in this example).
|
|
65
|
+
// Alternatively, the entire sitemap could be pre-rendered
|
|
66
|
+
// ahead of time (non-development mode in this example).
|
|
67
|
+
// See https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration
|
|
68
|
+
|
|
69
|
+
let paths: StaticPath[] = [];
|
|
70
|
+
let fallback: boolean | 'blocking' = 'blocking';
|
|
71
|
+
|
|
72
|
+
if (process.env.NODE_ENV !== 'development' && process.env.DISABLE_SSG_FETCH?.toLowerCase() !== 'true') {
|
|
73
|
+
try {
|
|
74
|
+
// Note: Next.js runs export in production mode
|
|
75
|
+
paths = await sitemapFetcher.fetch(context);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
console.log('Error occurred while fetching static paths');
|
|
78
|
+
console.log(error);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
fallback = process.env.EXPORT_MODE ? false : fallback;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
paths,
|
|
86
|
+
fallback,
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// This function gets called at build time on server-side.
|
|
91
|
+
// It may be called again, on a serverless function, if
|
|
92
|
+
// revalidation (or fallback) is enabled and a new request comes in.
|
|
93
|
+
export const getStaticProps: GetStaticProps = async (context) => {
|
|
94
|
+
<% } else if (prerender === 'SSR') { -%>
|
|
95
|
+
// This function gets called at request time on server-side.
|
|
96
|
+
export const getServerSideProps: GetServerSideProps = async (context) => {
|
|
97
|
+
<% } -%>
|
|
98
|
+
const props = await sitecorePagePropsFactory.create(context);
|
|
99
|
+
|
|
100
|
+
return {
|
|
101
|
+
props,
|
|
102
|
+
<% if (prerender === 'SSG') { -%>
|
|
103
|
+
// Next.js will attempt to re-generate the page:
|
|
104
|
+
// - When a request comes in
|
|
105
|
+
// - At most once every 5 seconds
|
|
106
|
+
revalidate: 5, // In seconds
|
|
107
|
+
<% } -%>
|
|
108
|
+
notFound: props.notFound, // Returns custom 404 page with a status code of 404 when true
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export default SitecorePage;
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
# node/express scaffolding for SSR using Sitecore Experience Edge
|
|
2
|
-
|
|
3
|
-
Sitecore JSS for SSR using Experience Edge is considered experimental.
|
|
4
|
-
|
|
5
|
-
<!---
|
|
6
|
-
@TODO: Update to next version docs before release
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
[Documentation (Experience Platform)](https://doc.sitecore.com/xp/en/developers/hd/22/sitecore-headless-development/server-side-render-jss-apps-headlessly-using-a-sitecore-experience-edge-endpoint.html)
|
|
10
|
-
|
|
11
|
-
> This is a sample setup that is not officially supported by Sitecore.
|
|
12
|
-
|
|
13
|
-
This is a sample setup showing one of how you can configure rendering server on top of node.js and Express using Experience Edge. It performs only render of the sample app, quering layout data and dictionary data without proxying requests.
|
|
14
|
-
|
|
15
|
-
## Pre-requisites
|
|
16
|
-
|
|
17
|
-
1. Your instance needs to be configured with Headless Services Module and the API Key provisioned.
|
|
18
|
-
|
|
19
|
-
### // TODO: document how to test GraphQL queries
|
|
20
|
-
|
|
21
|
-
1. Next.js, React, Angular, and Vue samples support Experience Edge out of the box. The GraphQL components and query are compatible with the Experience Edge schema with no further changes necessary. Provide a `sc_apikey` header for authentication, this header is used for both Sitecore XM Edge schema and Sitecore Experience Edge. Refer to the GraphQL Connected demo component in the desired framework.
|
|
22
|
-
|
|
23
|
-
1. Build your JS app bundle with `jss build`.
|
|
24
|
-
|
|
25
|
-
> You can use JSS sample apps which support server side rendering (JSS integrated mode) to operate with this project.
|
|
26
|
-
|
|
27
|
-
1. Deploy the build artifacts from your app (`/dist` or `/build` within the app) to the `sitecoreDistPath` set in your app's `package.json` under the SSR sample root path. Most apps use `/dist/${jssAppName}`, for example `$ssrSampleRoot/dist/${jssAppName}`.
|
|
28
|
-
|
|
29
|
-
> Another way to deploy the artifacts to the SSR sample is to change the `instancePath` in your app's `scjssconfig.json` to the SSR sample root path, and then use `jss deploy files` within the app to complete the deployment to the SSR sample.
|
|
30
|
-
|
|
31
|
-
## Setup
|
|
32
|
-
|
|
33
|
-
Open `config.js` and specify your application bundle and connection settings.
|
|
34
|
-
|
|
35
|
-
### Environment Variables
|
|
36
|
-
|
|
37
|
-
The following environment variables can be set to configure the SSR sample instead of modifying `config.js`. You can use the `.env` file located in the root of the app or set these directly in the environment (for example, in containers).
|
|
38
|
-
|
|
39
|
-
| Parameter | Description |
|
|
40
|
-
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
-
| `SITECORE_JSS_APP_NAME` | The JSS app's name. Used in the default value of `SITECORE_JSS_SERVER_BUNDLE` if it's not set. Used as the `SITECORE_SITE_NAME` if it's not set. |
|
|
42
|
-
| `SITECORE_SITE_NAME` | The Sitecore site name. Used for layout and dictionary data requests. |
|
|
43
|
-
| `SITECORE_API_KEY` | The API key provisioned on Sitecore Experience Edge. |
|
|
44
|
-
| `SITECORE_JSS_SERVER_BUNDLE` | Path to the JSS app's `server.bundle.js` file. |
|
|
45
|
-
| `SITECORE_EXPERIENCE_EDGE_ENDPOINT` | Sitecore Experience Edge endpoint. |
|
|
46
|
-
| `DEFAULT_LANGUAGE` | The JSS app's default language. Used to determine language context in case language is not specified in request URL. |
|
|
47
|
-
| `PORT` | Optional. Port which will be used when start sample. Default can be seen in [config.js](./config.js). |
|
|
48
|
-
|
|
49
|
-
## Build & run
|
|
50
|
-
|
|
51
|
-
1. Run `npm install`
|
|
52
|
-
|
|
53
|
-
1. Run `npm run start`
|
|
54
|
-
|
|
55
|
-
You should be able to see the following message:
|
|
56
|
-
`server listening on port 3000!`.
|
|
1
|
+
# node/express scaffolding for SSR using Sitecore Experience Edge
|
|
2
|
+
|
|
3
|
+
Sitecore JSS for SSR using Experience Edge is considered experimental.
|
|
4
|
+
|
|
5
|
+
<!---
|
|
6
|
+
@TODO: Update to next version docs before release
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
[Documentation (Experience Platform)](https://doc.sitecore.com/xp/en/developers/hd/22/sitecore-headless-development/server-side-render-jss-apps-headlessly-using-a-sitecore-experience-edge-endpoint.html)
|
|
10
|
+
|
|
11
|
+
> This is a sample setup that is not officially supported by Sitecore.
|
|
12
|
+
|
|
13
|
+
This is a sample setup showing one of how you can configure rendering server on top of node.js and Express using Experience Edge. It performs only render of the sample app, quering layout data and dictionary data without proxying requests.
|
|
14
|
+
|
|
15
|
+
## Pre-requisites
|
|
16
|
+
|
|
17
|
+
1. Your instance needs to be configured with Headless Services Module and the API Key provisioned.
|
|
18
|
+
|
|
19
|
+
### // TODO: document how to test GraphQL queries
|
|
20
|
+
|
|
21
|
+
1. Next.js, React, Angular, and Vue samples support Experience Edge out of the box. The GraphQL components and query are compatible with the Experience Edge schema with no further changes necessary. Provide a `sc_apikey` header for authentication, this header is used for both Sitecore XM Edge schema and Sitecore Experience Edge. Refer to the GraphQL Connected demo component in the desired framework.
|
|
22
|
+
|
|
23
|
+
1. Build your JS app bundle with `jss build`.
|
|
24
|
+
|
|
25
|
+
> You can use JSS sample apps which support server side rendering (JSS integrated mode) to operate with this project.
|
|
26
|
+
|
|
27
|
+
1. Deploy the build artifacts from your app (`/dist` or `/build` within the app) to the `sitecoreDistPath` set in your app's `package.json` under the SSR sample root path. Most apps use `/dist/${jssAppName}`, for example `$ssrSampleRoot/dist/${jssAppName}`.
|
|
28
|
+
|
|
29
|
+
> Another way to deploy the artifacts to the SSR sample is to change the `instancePath` in your app's `scjssconfig.json` to the SSR sample root path, and then use `jss deploy files` within the app to complete the deployment to the SSR sample.
|
|
30
|
+
|
|
31
|
+
## Setup
|
|
32
|
+
|
|
33
|
+
Open `config.js` and specify your application bundle and connection settings.
|
|
34
|
+
|
|
35
|
+
### Environment Variables
|
|
36
|
+
|
|
37
|
+
The following environment variables can be set to configure the SSR sample instead of modifying `config.js`. You can use the `.env` file located in the root of the app or set these directly in the environment (for example, in containers).
|
|
38
|
+
|
|
39
|
+
| Parameter | Description |
|
|
40
|
+
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| `SITECORE_JSS_APP_NAME` | The JSS app's name. Used in the default value of `SITECORE_JSS_SERVER_BUNDLE` if it's not set. Used as the `SITECORE_SITE_NAME` if it's not set. |
|
|
42
|
+
| `SITECORE_SITE_NAME` | The Sitecore site name. Used for layout and dictionary data requests. |
|
|
43
|
+
| `SITECORE_API_KEY` | The API key provisioned on Sitecore Experience Edge. |
|
|
44
|
+
| `SITECORE_JSS_SERVER_BUNDLE` | Path to the JSS app's `server.bundle.js` file. |
|
|
45
|
+
| `SITECORE_EXPERIENCE_EDGE_ENDPOINT` | Sitecore Experience Edge endpoint. |
|
|
46
|
+
| `DEFAULT_LANGUAGE` | The JSS app's default language. Used to determine language context in case language is not specified in request URL. |
|
|
47
|
+
| `PORT` | Optional. Port which will be used when start sample. Default can be seen in [config.js](./config.js). |
|
|
48
|
+
|
|
49
|
+
## Build & run
|
|
50
|
+
|
|
51
|
+
1. Run `npm install`
|
|
52
|
+
|
|
53
|
+
1. Run `npm run start`
|
|
54
|
+
|
|
55
|
+
You should be able to see the following message:
|
|
56
|
+
`server listening on port 3000!`.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
|
|
6
|
-
# local env files
|
|
7
|
-
.env.local
|
|
8
|
-
.env.*.local
|
|
9
|
-
|
|
10
|
-
# IDE - VSCode
|
|
11
|
-
.vscode/*
|
|
12
|
-
!.vscode/settings.json
|
|
13
|
-
!.vscode/tasks.json
|
|
14
|
-
!.vscode/launch.json
|
|
15
|
-
!.vscode/extensions.json
|
|
16
|
-
|
|
17
|
-
# System Files
|
|
18
|
-
.DS_Store
|
|
19
|
-
Thumbs.db
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
/node_modules
|
|
5
|
+
|
|
6
|
+
# local env files
|
|
7
|
+
.env.local
|
|
8
|
+
.env.*.local
|
|
9
|
+
|
|
10
|
+
# IDE - VSCode
|
|
11
|
+
.vscode/*
|
|
12
|
+
!.vscode/settings.json
|
|
13
|
+
!.vscode/tasks.json
|
|
14
|
+
!.vscode/launch.json
|
|
15
|
+
!.vscode/extensions.json
|
|
16
|
+
|
|
17
|
+
# System Files
|
|
18
|
+
.DS_Store
|
|
19
|
+
Thumbs.db
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "node-headless-ssr-experience-edge-sample",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Node server-side-rendering sample for running JSS apps under Node hosting using Experience Edge",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"start": "ts-node ./src/index.ts"
|
|
7
|
-
},
|
|
8
|
-
"author": {
|
|
9
|
-
"name": "Sitecore Corporation",
|
|
10
|
-
"url": "https://jss.sitecore.com"
|
|
11
|
-
},
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/sitecore/jss.git"
|
|
15
|
-
},
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/sitecore/jss/issues"
|
|
18
|
-
},
|
|
19
|
-
"homepage": "https://jss.sitecore.com",
|
|
20
|
-
"license": "Apache-2.0",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@sitecore-jss/sitecore-jss": "
|
|
23
|
-
"compression": "^1.7.4",
|
|
24
|
-
"express": "^4.18.2",
|
|
25
|
-
"dotenv": "^16.0.3"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@types/compression": "^1.7.2",
|
|
29
|
-
"@types/express": "^4.17.17",
|
|
30
|
-
"ts-node": "^10.9.1",
|
|
31
|
-
"typescript": "~5.6.3"
|
|
32
|
-
},
|
|
33
|
-
"private": true
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "node-headless-ssr-experience-edge-sample",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Node server-side-rendering sample for running JSS apps under Node hosting using Experience Edge",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "ts-node ./src/index.ts"
|
|
7
|
+
},
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Sitecore Corporation",
|
|
10
|
+
"url": "https://jss.sitecore.com"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/sitecore/jss.git"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/sitecore/jss/issues"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://jss.sitecore.com",
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@sitecore-jss/sitecore-jss": "<%- version %>",
|
|
23
|
+
"compression": "^1.7.4",
|
|
24
|
+
"express": "^4.18.2",
|
|
25
|
+
"dotenv": "^16.0.3"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/compression": "^1.7.2",
|
|
29
|
+
"@types/express": "^4.17.17",
|
|
30
|
+
"ts-node": "^10.9.1",
|
|
31
|
+
"typescript": "~5.6.3"
|
|
32
|
+
},
|
|
33
|
+
"private": true
|
|
34
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"newLine": "LF",
|
|
4
|
-
"emitDecoratorMetadata": true,
|
|
5
|
-
"experimentalDecorators": true,
|
|
6
|
-
"noFallthroughCasesInSwitch": true,
|
|
7
|
-
"rootDir": ".",
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"forceConsistentCasingInFileNames": true,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"noImplicitAny": true,
|
|
12
|
-
"noUnusedLocals": true,
|
|
13
|
-
"noUnusedParameters": true,
|
|
14
|
-
"noImplicitReturns": true,
|
|
15
|
-
"strictFunctionTypes": false,
|
|
16
|
-
"downlevelIteration": true,
|
|
17
|
-
"moduleResolution": "node",
|
|
18
|
-
"isolatedModules": true,
|
|
19
|
-
"allowSyntheticDefaultImports": true
|
|
20
|
-
},
|
|
21
|
-
"exclude": ["node_modules", "dist"]
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"newLine": "LF",
|
|
4
|
+
"emitDecoratorMetadata": true,
|
|
5
|
+
"experimentalDecorators": true,
|
|
6
|
+
"noFallthroughCasesInSwitch": true,
|
|
7
|
+
"rootDir": ".",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"noUnusedLocals": true,
|
|
13
|
+
"noUnusedParameters": true,
|
|
14
|
+
"noImplicitReturns": true,
|
|
15
|
+
"strictFunctionTypes": false,
|
|
16
|
+
"downlevelIteration": true,
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"allowSyntheticDefaultImports": true
|
|
20
|
+
},
|
|
21
|
+
"exclude": ["node_modules", "dist"]
|
|
22
|
+
}
|