create-sitecore-jss 22.2.0-canary.80 → 22.2.0-canary.83
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/bin.js +19 -35
- package/dist/common/index.js +3 -5
- package/dist/common/processes/install.js +2 -9
- package/dist/common/processes/next.js +3 -6
- package/dist/common/processes/transform.js +13 -18
- package/dist/common/prompts/base.js +25 -0
- package/dist/common/utils/helpers.js +19 -29
- package/dist/init-runner.js +11 -16
- package/dist/initializers/angular/index.js +0 -13
- package/dist/initializers/angular/prompts.js +1 -22
- package/dist/initializers/nextjs/index.js +2 -2
- package/dist/initializers/nextjs/prompts.js +0 -2
- package/dist/initializers/nextjs/remove-dev-dependencies.js +2 -2
- package/dist/initializers/nextjs-multisite/index.js +1 -1
- package/dist/initializers/nextjs-styleguide/index.js +1 -1
- package/dist/initializers/nextjs-styleguide-tracking/index.js +1 -1
- package/dist/initializers/nextjs-sxa/index.js +1 -1
- package/dist/initializers/nextjs-xmcloud/index.js +1 -1
- package/dist/initializers/react/index.js +3 -3
- package/dist/initializers/react/prompts.js +1 -1
- package/dist/initializers/react-native/prompts.js +0 -1
- package/dist/initializers/vue/prompts.js +1 -1
- package/dist/templates/angular/.env +3 -4
- package/dist/templates/angular/.eslintrc +0 -1
- package/dist/templates/angular/README.md +45 -5
- package/dist/templates/angular/angular.json +6 -1
- package/dist/templates/angular/gitignore +0 -5
- package/dist/templates/angular/package.json +18 -6
- package/dist/templates/angular/proxy.conf.js +23 -5
- package/dist/templates/angular/scripts/bootstrap.ts +24 -5
- package/dist/templates/angular/scripts/generate-component-factory.ts +166 -0
- package/dist/templates/angular/scripts/generate-config.ts +72 -71
- package/dist/templates/angular/scripts/update-graphql-fragment-data.ts +28 -21
- package/dist/templates/angular/server.bundle.ts +5 -3
- package/dist/templates/angular/src/app/JssState.ts +9 -2
- package/dist/templates/angular/src/app/app.module.ts +6 -5
- package/dist/templates/angular/src/app/app.server.module.ts +6 -9
- package/dist/templates/angular/src/app/components/app-components.shared.module.ts +19 -4
- package/dist/templates/angular/src/app/components/gitignore +1 -1
- package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-layout/graph-ql-layout.component.ts +1 -1
- package/dist/templates/angular/src/app/i18n/jss-translation-client-loader.service.ts +7 -15
- package/dist/templates/angular/src/app/i18n/jss-translation-server-loader.service.ts +2 -14
- package/dist/templates/angular/src/app/jss-context.server-side.service.ts +4 -4
- package/dist/templates/angular/src/app/jss-context.service.ts +11 -14
- package/dist/templates/{angular-sxp → angular}/src/app/jss-data-fetcher.service.ts +1 -3
- package/dist/templates/angular/src/app/jss-graphql.service.ts +7 -7
- package/dist/templates/angular/src/app/layout/jss-layout.service.ts +2 -2
- package/dist/templates/angular/src/app/lib/client-factory.ts +28 -0
- package/dist/templates/angular/src/app/lib/dictionary-service-factory.ts +13 -24
- package/dist/templates/angular/src/app/lib/layout-service-factory.ts +12 -20
- package/dist/templates/angular/src/app/routing/layout/layout.component.html +1 -1
- package/dist/templates/angular/src/app/routing/layout/layout.component.ts +11 -11
- package/dist/templates/angular/src/app/routing/navigation/navigation.component.html +6 -5
- package/dist/templates/angular/src/app/routing/navigation/navigation.component.ts +2 -1
- package/dist/templates/angular/src/app/routing/routing.module.ts +21 -14
- package/dist/templates/{angular-sxp/src/app/routing/scripts → angular/src/app/routing}/visitor-identification/visitor-identification.component.ts +3 -9
- package/dist/templates/angular/src/environments/gitignore +1 -2
- package/dist/templates/angular/src/graphql-fragment-types.ts +95 -0
- package/dist/templates/angular/tsconfig.json +2 -7
- package/dist/templates/nextjs/scripts/config/plugins/fallback.ts +1 -0
- package/dist/templates/nextjs/scripts/generate-config.ts +1 -8
- package/dist/templates/nextjs-styleguide/scripts/config/plugins/disconnected.ts +0 -1
- package/dist/templates/nextjs-sxa/src/assets/sass/components/common/_alignment.scss +7 -34
- package/dist/templates/nextjs-xmcloud/package.json +3 -2
- package/dist/templates/nextjs-xmcloud/src/Bootstrap.tsx +25 -10
- package/dist/templates/nextjs-xmcloud/src/byoc/{index.ts → index.tsx} +25 -8
- package/dist/templates/nextjs-xmcloud/src/components/CdpPageView.tsx +9 -14
- package/dist/templates/node-headless-ssr-proxy/src/config.ts +3 -3
- package/dist/templates/node-headless-ssr-proxy/src/httpAgents.ts +2 -2
- package/dist/templates/node-headless-ssr-proxy/src/index.ts +2 -9
- package/dist/templates/react/scripts/generate-config.js +3 -10
- package/dist/templates/vue/scripts/generate-config.js +0 -5
- package/package.json +2 -2
- package/dist/common/prompts/proxy.js +0 -35
- package/dist/common/prompts/sxp.js +0 -34
- package/dist/initializers/angular-sxp/index.js +0 -62
- package/dist/initializers/angular-xmcloud/index.js +0 -80
- package/dist/initializers/node-xmcloud-proxy/index.js +0 -33
- package/dist/templates/angular/scripts/config/index.ts +0 -28
- package/dist/templates/angular/scripts/config/plugins/computed.ts +0 -21
- package/dist/templates/angular/scripts/config/plugins/fallback.ts +0 -22
- package/dist/templates/angular/scripts/config/plugins/package-json.ts +0 -22
- package/dist/templates/angular/scripts/config/plugins/scjssconfig.ts +0 -29
- package/dist/templates/angular/scripts/generate-component-factory/index.ts +0 -45
- package/dist/templates/angular/scripts/generate-component-factory/plugins/component-factory.ts +0 -147
- package/dist/templates/angular/scripts/generate-component-factory/plugins/components.ts +0 -19
- package/dist/templates/angular/scripts/generate-component-factory/plugins/packages.ts +0 -29
- package/dist/templates/angular/scripts/generate-component-factory/template.ts +0 -46
- package/dist/templates/angular/scripts/generate-plugins.ts +0 -33
- package/dist/templates/angular/scripts/temp/gitignore +0 -2
- package/dist/templates/angular/server.exports.ts +0 -13
- package/dist/templates/angular/src/app/lib/config.ts +0 -16
- package/dist/templates/angular/src/app/lib/graphql-client-factory/config.ts +0 -21
- package/dist/templates/angular/src/app/lib/graphql-client-factory/index.ts +0 -16
- package/dist/templates/angular/src/app/routing/scripts/scripts.component.html +0 -1
- package/dist/templates/angular/src/app/routing/scripts/scripts.component.ts +0 -7
- package/dist/templates/angular/src/app/routing/scripts/scripts.module.ts +0 -8
- package/dist/templates/angular-sxp/.env +0 -2
- package/dist/templates/angular-sxp/package.json +0 -12
- package/dist/templates/angular-sxp/proxy.conf.js +0 -43
- package/dist/templates/angular-sxp/scripts/config/plugins/disconnected.ts +0 -29
- package/dist/templates/angular-sxp/src/app/components/app-components.shared.module.ts +0 -35
- package/dist/templates/angular-sxp/src/app/routing/navigation/navigation.component.html +0 -23
- package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.component.html +0 -3
- package/dist/templates/angular-sxp/src/app/routing/scripts/scripts.module.ts +0 -9
- package/dist/templates/angular-sxp/src/graphql-fragment-types.ts +0 -219
- package/dist/templates/angular-xmcloud/.env +0 -21
- package/dist/templates/angular-xmcloud/angular.json +0 -33
- package/dist/templates/angular-xmcloud/package.json +0 -17
- package/dist/templates/angular-xmcloud/scripts/bootstrap.ts +0 -28
- package/dist/templates/angular-xmcloud/scripts/config/plugins/xmcloud.ts +0 -39
- package/dist/templates/angular-xmcloud/scripts/generate-component-factory/plugins/packages.ts +0 -34
- package/dist/templates/angular-xmcloud/scripts/generate-component-factory/template.ts +0 -57
- package/dist/templates/angular-xmcloud/scripts/generate-metadata.ts +0 -25
- package/dist/templates/angular-xmcloud/scripts/proxy-build.ts +0 -15
- package/dist/templates/angular-xmcloud/server.exports.ts +0 -24
- package/dist/templates/angular-xmcloud/src/app/components/app-components.shared.module.ts +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.html +0 -5
- package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.ts +0 -40
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.html +0 -14
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.ts +0 -30
- package/dist/templates/angular-xmcloud/src/app/components/image/image.component.html +0 -36
- package/dist/templates/angular-xmcloud/src/app/components/image/image.component.ts +0 -67
- package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.html +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/link-list/link-list.component.ts +0 -41
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.html +0 -23
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation-item.component.ts +0 -65
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.html +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/navigation/navigation.component.ts +0 -49
- package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.html +0 -5
- package/dist/templates/angular-xmcloud/src/app/components/page-content/page-content.component.ts +0 -39
- package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.html +0 -1
- package/dist/templates/angular-xmcloud/src/app/components/partial-design-dynamic-placeholder/partial-design-dynamic-placeholder.component.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.html +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/promo/promo.component.ts +0 -13
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.html +0 -8
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.ts +0 -21
- package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.html +0 -11
- package/dist/templates/angular-xmcloud/src/app/components/row-splitter/row-splitter.component.ts +0 -35
- package/dist/templates/angular-xmcloud/src/app/components/sxa.component.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/title/title.component.html +0 -10
- package/dist/templates/angular-xmcloud/src/app/components/title/title.component.ts +0 -56
- package/dist/templates/angular-xmcloud/src/app/jss-link.service.ts +0 -55
- package/dist/templates/angular-xmcloud/src/app/lib/config.ts +0 -17
- package/dist/templates/angular-xmcloud/src/app/lib/graphql-client-factory/config.ts +0 -58
- package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.html +0 -38
- package/dist/templates/angular-xmcloud/src/app/routing/layout/layout.component.ts +0 -104
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/cdp-page-view.component.ts +0 -77
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/cloud-sdk-init.component.ts +0 -48
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.component.html +0 -5
- package/dist/templates/angular-xmcloud/src/app/routing/scripts/scripts.module.ts +0 -12
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_component.scss +0 -48
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_container.scss +0 -64
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_fonts.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_footer.scss +0 -31
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_header.scss +0 -51
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_navigation.scss +0 -150
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_promo.scss +0 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_rich-text.scss +0 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/_variables.scss +0 -10
- package/dist/templates/angular-xmcloud/src/assets/styles/basic/main.scss +0 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/main.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/_app.scss +0 -103
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_functions.scss +0 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_mixins.scss +0 -121
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/_vars.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_colors.scss +0 -283
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_fontSizes.scss +0 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/abstracts/vars/_margins.scss +0 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/_fonts.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/fonts/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/index.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/_link-button.scss +0 -26
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/links/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_inputs.scss +0 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_links.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/reset/_ui-datepicker.scss +0 -7
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext-files-icons.scss +0 -86
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/_richtext.scss +0 -101
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/richtext/index.scss +0 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/_typehead.scss +0 -95
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/base/typehead/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-column-splitter.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-container.scss +0 -27
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-image.scss +0 -18
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-navigation.scss +0 -51
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-promo.scss +0 -42
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/_component-richtext-content.scss +0 -19
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_alignment.scss +0 -26
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_boxed.scss +0 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_clearfix.scss +0 -11
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_highlighted.scss +0 -63
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_link-button.scss +0 -16
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/_promoted-box.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/common/index.scss +0 -6
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_bordered.scss +0 -24
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/_title-row-box.scss +0 -66
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/container/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/_image-default-size.scss +0 -6
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-left.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/image-alignment/_image-right.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/index.scss +0 -17
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_acaindent.scss +0 -5
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/_background.scss +0 -27
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/layout/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_component-link-list.scss +0 -45
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/_list-vertical.scss +0 -20
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/link-list/index.scss +0 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-fat.scss +0 -58
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-main-horizontal-vertical.scss +0 -176
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-mobile.scss +0 -85
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_navigation-sidebar.scss +0 -29
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/_sitemap-navigation.scss +0 -20
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/navigation/index.scss +0 -5
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_absolute-bottom-link.scss +0 -8
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-hero.scss +0 -40
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/_promo-shadow.scss +0 -42
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/promo/index.scss +0 -3
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/_rich-text-lists.scss +0 -63
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/rich-text/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_background-colors.scss +0 -14
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/_indent.scss +0 -13
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/spacing/index.scss +0 -2
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/_component-title.scss +0 -30
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/components/title/index.scss +0 -1
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/main.scss +0 -4
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/index.scss +0 -6
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/link-list/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/navigation/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/page-content/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/promo/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/rich-text/index.scss +0 -0
- package/dist/templates/angular-xmcloud/src/assets/styles/sass/variants/title/index.scss +0 -0
- package/dist/templates/nextjs-xmcloud/src/lib/context/index.ts +0 -22
- package/dist/templates/nextjs-xmcloud/src/lib/context/sdk/events.ts +0 -26
- package/dist/templates/node-headless-ssr-experience-edge/gitignore +0 -19
- package/dist/templates/node-headless-ssr-proxy/gitignore +0 -19
- package/dist/templates/node-xmcloud-proxy/.env +0 -14
- package/dist/templates/node-xmcloud-proxy/README.md +0 -36
- package/dist/templates/node-xmcloud-proxy/gitignore +0 -33
- package/dist/templates/node-xmcloud-proxy/package.json +0 -26
- package/dist/templates/node-xmcloud-proxy/src/config.ts +0 -25
- package/dist/templates/node-xmcloud-proxy/src/index.ts +0 -210
- package/dist/templates/node-xmcloud-proxy/src/types.ts +0 -27
- package/dist/templates/node-xmcloud-proxy/tsconfig.json +0 -22
- /package/dist/templates/{angular-sxp → angular}/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/component-content/gitignore +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ContentListField/Item1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ContentListField/Item2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/EditFrameDemo/Item1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/EditFrameDemo/Item2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ItemLinkField/Item1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/Styleguide/ItemLinkField/Item2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/content/gitignore +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/dictionary/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/dictionary/{{language}}.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/media/files/jss.pdf +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/media/img/jss_logo.png +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/media/img/sc_logo.png +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/sample-1/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/graphql/sample-2/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/custom-route-type/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/en.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/styleguide/{{language}}.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/data/routes/{{language}}.yml +0 -0
- /package/dist/templates/{angular-sxp → angular}/scripts/disconnected-mode-proxy.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/scripts/lint-yml.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/config/{{appName}}.config +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/component-content.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Reuse.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Tabs-Tab.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout-Tabs.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Layout.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Multilingual.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/Styleguide-Section.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/content-block.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-connected-demo.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/graph-ql-layout.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-angular-lazy-loading.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-component-params.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-custom-route-type.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-edit-frame.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-checkbox.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-content-list.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-custom.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-date.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-file.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-image.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-item-link.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-link.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-number.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-rich-text.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-field-usage-text.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-route-fields.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-sitecore-context.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/components/styleguide-tracking.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/config.js +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/content.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/dictionary.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/placeholders.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/routes.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/Styleguide-Explanatory-Component.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-content-list-template.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-edit-frame-list-item-template.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/definitions/templates/styleguide-item-link-template.sitecore.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/gitignore +0 -0
- /package/dist/templates/{angular-sxp → angular}/sitecore/pipelines/example.patch.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.graphql +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-connected-demo/graph-ql-connected-demo.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-integrated-demo/graph-ql-integrated-demo.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/graph-ql-layout/graph-ql-layout.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/shared/styleguide-specimen/styleguide-specimen.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-angular-lazy-loading/styleguide-angular-lazy-loading.module.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-component-params/styleguide-component-params.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-component-params/styleguide-component-params.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-custom-route-type/styleguide-custom-route-type.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-edit-frame/styleguide-edit-frame.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-checkbox/styleguide-field-usage-checkbox.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-content-list/styleguide-field-usage-content-list.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-custom/styleguide-field-usage-custom.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-date/styleguide-field-usage-date.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-file/styleguide-field-usage-file.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-image/styleguide-field-usage-image.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-item-link/styleguide-field-usage-item-link.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-link/styleguide-field-usage-link.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-number/styleguide-field-usage-number.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-rich-text/styleguide-field-usage-rich-text.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-field-usage-text/styleguide-field-usage-text.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout/styleguide-layout.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout/styleguide-layout.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-reuse/styleguide-layout-reuse.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs/styleguide-layout-tabs.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-layout-tabs-tab/styleguide-layout-tabs-tab.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-multilingual/styleguide-multilingual.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-route-fields/styleguide-route-fields.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-section/styleguide-section.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-section/styleguide-section.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-sitecore-context/styleguide-sitecore-context.component.ts +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-tracking/styleguide-tracking.component.html +0 -0
- /package/dist/templates/{angular-sxp → angular}/src/app/components/styleguide-tracking/styleguide-tracking.component.ts +0 -0
|
@@ -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 {
|
|
12
|
+
import { VisitorIdentificationComponent } from './visitor-identification/visitor-identification.component';
|
|
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,25 +39,32 @@ 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, {
|
|
51
|
-
onSameUrlNavigation: 'reload',
|
|
52
|
-
initialNavigation: 'enabledBlocking',
|
|
53
|
-
}),
|
|
50
|
+
RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload', initialNavigation: 'enabledBlocking' }),
|
|
54
51
|
JssModule,
|
|
55
52
|
TranslateModule,
|
|
56
|
-
BrowserModule
|
|
57
|
-
|
|
53
|
+
BrowserModule
|
|
54
|
+
],
|
|
55
|
+
exports: [
|
|
56
|
+
RouterModule,
|
|
57
|
+
TranslateModule,
|
|
58
|
+
],
|
|
59
|
+
declarations: [
|
|
60
|
+
NotFoundComponent,
|
|
61
|
+
ServerErrorComponent,
|
|
62
|
+
LayoutComponent,
|
|
63
|
+
NavigationComponent,
|
|
64
|
+
VisitorIdentificationComponent
|
|
58
65
|
],
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
providers: [
|
|
67
|
+
JssRouteBuilderService,
|
|
68
|
+
]
|
|
62
69
|
})
|
|
63
|
-
export class RoutingModule {}
|
|
70
|
+
export class RoutingModule { }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { Subscription } from 'rxjs';
|
|
3
|
-
import { JssContextService } from '
|
|
3
|
+
import { JssContextService } from '../../jss-context.service';
|
|
4
4
|
|
|
5
5
|
let emittedVI = false;
|
|
6
6
|
|
|
@@ -13,13 +13,7 @@ let emittedVI = false;
|
|
|
13
13
|
*/
|
|
14
14
|
@Component({
|
|
15
15
|
selector: 'app-visitor-identification',
|
|
16
|
-
template:
|
|
17
|
-
<meta
|
|
18
|
-
*ngIf="visitorIdentificationTimestamp"
|
|
19
|
-
name="VIcurrentDateTime"
|
|
20
|
-
[content]="visitorIdentificationTimestamp"
|
|
21
|
-
/>
|
|
22
|
-
`,
|
|
16
|
+
template: `<meta *ngIf="visitorIdentificationTimestamp" name="VIcurrentDateTime" [content]="visitorIdentificationTimestamp" />`,
|
|
23
17
|
})
|
|
24
18
|
export class VisitorIdentificationComponent implements OnInit, OnDestroy {
|
|
25
19
|
visitorIdentificationTimestamp: number;
|
|
@@ -27,7 +21,7 @@ export class VisitorIdentificationComponent implements OnInit, OnDestroy {
|
|
|
27
21
|
private contextSubscription: Subscription;
|
|
28
22
|
|
|
29
23
|
// inject the JssContextService, which maintains the current Sitecore Context
|
|
30
|
-
constructor(private jssContext: JssContextService) {}
|
|
24
|
+
constructor(private jssContext: JssContextService) { }
|
|
31
25
|
|
|
32
26
|
ngOnInit() {
|
|
33
27
|
this.contextSubscription = this.jssContext.state.subscribe((state) => {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
!.gitignore
|
|
1
|
+
*.ts
|
|
@@ -48,6 +48,9 @@ export default {
|
|
|
48
48
|
{
|
|
49
49
|
name: 'UnknownItem',
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
name: 'StyleguideComponentParamsRenderingParameters',
|
|
53
|
+
},
|
|
51
54
|
{
|
|
52
55
|
name: 'C__StandardTemplate',
|
|
53
56
|
},
|
|
@@ -57,6 +60,95 @@ export default {
|
|
|
57
60
|
{
|
|
58
61
|
name: 'RenderEngineType',
|
|
59
62
|
},
|
|
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
|
+
},
|
|
60
152
|
{
|
|
61
153
|
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ContentBlock',
|
|
62
154
|
},
|
|
@@ -102,6 +194,9 @@ export default {
|
|
|
102
194
|
kind: 'INTERFACE',
|
|
103
195
|
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
|
|
104
196
|
possibleTypes: [
|
|
197
|
+
{
|
|
198
|
+
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType',
|
|
199
|
+
},
|
|
105
200
|
{
|
|
106
201
|
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
|
|
107
202
|
},
|
|
@@ -24,13 +24,8 @@
|
|
|
24
24
|
"lib": ["es2018", "dom", "esnext.asynciterable"],
|
|
25
25
|
"paths": {
|
|
26
26
|
"@angular/*": ["../node_modules/@angular/*"],
|
|
27
|
-
"rxjs": ["node_modules/rxjs", "../node_modules/rxjs"]
|
|
28
|
-
"lib/*": ["src/app/lib/*"],
|
|
27
|
+
"rxjs": ["node_modules/rxjs", "../node_modules/rxjs"]
|
|
29
28
|
},
|
|
30
|
-
"baseUrl": "./"
|
|
31
|
-
"esModuleInterop": true
|
|
32
|
-
},
|
|
33
|
-
"ts-node": {
|
|
34
|
-
"require": ["tsconfig-paths/register"]
|
|
29
|
+
"baseUrl": "./"
|
|
35
30
|
}
|
|
36
31
|
}
|
|
@@ -13,6 +13,7 @@ class FallbackPlugin implements ConfigPlugin {
|
|
|
13
13
|
async exec(config: JssConfig) {
|
|
14
14
|
return Object.assign({}, config, {
|
|
15
15
|
defaultLanguage: config.defaultLanguage || 'en',
|
|
16
|
+
sitecoreApiKey: config.sitecoreApiKey || 'no-api-key-set',
|
|
16
17
|
layoutServiceConfigurationName: config.layoutServiceConfigurationName || 'default',
|
|
17
18
|
publicUrl: config.publicUrl || getPublicUrl(),
|
|
18
19
|
});
|
|
@@ -29,11 +29,6 @@ generateConfig(defaultConfig);
|
|
|
29
29
|
* @param {JssConfig} defaultConfig Default configuration.
|
|
30
30
|
*/
|
|
31
31
|
function generateConfig(defaultConfig: JssConfig): void {
|
|
32
|
-
// Handle undefined values
|
|
33
|
-
Object.keys(defaultConfig).forEach(prop => {
|
|
34
|
-
defaultConfig[prop] = defaultConfig[prop] || '';
|
|
35
|
-
}, {});
|
|
36
|
-
|
|
37
32
|
jssConfigFactory
|
|
38
33
|
.create(defaultConfig)
|
|
39
34
|
.then(config => {
|
|
@@ -58,9 +53,7 @@ const config = {};\n`;
|
|
|
58
53
|
|
|
59
54
|
// Set configuration values, allowing override with environment variables
|
|
60
55
|
Object.keys(config).forEach(prop => {
|
|
61
|
-
|
|
62
|
-
const value = config[prop] || '';
|
|
63
|
-
configText += `config.${prop} = process.env.${constantCase(prop)} || '${value.trim()}';\n`;
|
|
56
|
+
configText += `config.${prop} = process.env.${constantCase(prop)} || '${config[prop]?.trim()}';\n`;
|
|
64
57
|
});
|
|
65
58
|
|
|
66
59
|
configText += `module.exports = config;`;
|
|
@@ -1,53 +1,26 @@
|
|
|
1
|
-
@import '~bootstrap/scss/functions';
|
|
2
|
-
@import '~bootstrap/scss/variables';
|
|
3
|
-
@import '~bootstrap/scss/mixins';
|
|
4
|
-
|
|
5
|
-
$breakpoints: sm, md, lg, xl, xxl;
|
|
6
|
-
|
|
7
1
|
.position-left,
|
|
8
2
|
.position-left * {
|
|
9
|
-
|
|
3
|
+
text-align: left !important;
|
|
10
4
|
}
|
|
11
5
|
|
|
12
6
|
.position-right,
|
|
13
7
|
.position-right * {
|
|
14
|
-
|
|
8
|
+
text-align: right !important;
|
|
15
9
|
}
|
|
16
10
|
|
|
17
11
|
.position-center,
|
|
18
12
|
.position-center * {
|
|
19
|
-
|
|
13
|
+
text-align: center !important;
|
|
20
14
|
}
|
|
21
15
|
|
|
22
16
|
.position-left select {
|
|
23
|
-
|
|
17
|
+
direction: ltr !important;
|
|
24
18
|
}
|
|
25
19
|
|
|
26
20
|
.position-right select {
|
|
27
|
-
|
|
21
|
+
direction: rtl !important;
|
|
28
22
|
}
|
|
29
23
|
|
|
30
24
|
.position-center select {
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@mixin auto-margins($breakpoint) {
|
|
35
|
-
@include media-breakpoint-up(#{$breakpoint}) {
|
|
36
|
-
.ms-#{$breakpoint}-auto {
|
|
37
|
-
margin-left: auto !important;
|
|
38
|
-
margin-right: 0 !important;
|
|
39
|
-
}
|
|
40
|
-
.me-#{$breakpoint}-auto {
|
|
41
|
-
margin-right: auto !important;
|
|
42
|
-
margin-left: 0 !important;
|
|
43
|
-
}
|
|
44
|
-
.mx-#{$breakpoint}-auto {
|
|
45
|
-
margin-right: auto !important;
|
|
46
|
-
margin-left: auto !important;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@each $breakpoint in $breakpoints {
|
|
52
|
-
@include auto-margins($breakpoint);
|
|
53
|
-
}
|
|
25
|
+
text-align-last: center !important;
|
|
26
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@sitecore/components": "
|
|
4
|
-
"@sitecore-cloudsdk/
|
|
3
|
+
"@sitecore/components": "~2.0.0",
|
|
4
|
+
"@sitecore-cloudsdk/core": "^0.4.0",
|
|
5
|
+
"@sitecore-cloudsdk/events": "^0.4.0",
|
|
5
6
|
"@sitecore-feaas/clientside": "^0.5.17"
|
|
6
7
|
}
|
|
7
8
|
}
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
1
2
|
import { SitecorePageProps } from 'lib/page-props';
|
|
2
|
-
import {
|
|
3
|
+
import { CloudSDK } from '@sitecore-cloudsdk/core/browser';
|
|
4
|
+
import '@sitecore-cloudsdk/events/browser';
|
|
3
5
|
import config from 'temp/config';
|
|
6
|
+
import { LayoutServicePageState } from '@sitecore-jss/sitecore-jss-nextjs';
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* The Bootstrap component is the entry point for performing any initialization logic
|
|
7
10
|
* that needs to happen early in the application's lifecycle.
|
|
8
11
|
*/
|
|
9
12
|
const Bootstrap = (props: SitecorePageProps): JSX.Element | null => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
// Browser ClientSDK init allows for page view events to be tracked
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const pageState = props.layoutData?.sitecore?.context.pageState;
|
|
16
|
+
if (process.env.NODE_ENV === 'development')
|
|
17
|
+
console.debug('Browser Events SDK is not initialized in development environment');
|
|
18
|
+
else if (pageState !== LayoutServicePageState.Normal)
|
|
19
|
+
console.debug('Browser Events SDK is not initialized in edit and preview modes');
|
|
20
|
+
else {
|
|
21
|
+
CloudSDK({
|
|
22
|
+
sitecoreEdgeUrl: config.sitecoreEdgeUrl,
|
|
23
|
+
sitecoreEdgeContextId: config.sitecoreEdgeContextId,
|
|
24
|
+
siteName: props.site?.name || config.sitecoreSiteName,
|
|
25
|
+
enableBrowserCookie: true,
|
|
26
|
+
// Replace with the top level cookie domain of the website that is being integrated e.g ".example.com" and not "www.example.com"
|
|
27
|
+
cookieDomain: window.location.hostname.replace(/^www\./, ''),
|
|
28
|
+
})
|
|
29
|
+
.addEvents()
|
|
30
|
+
.initialize();
|
|
31
|
+
}
|
|
32
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
|
+
}, [props.site?.name]);
|
|
19
34
|
|
|
20
35
|
return null;
|
|
21
36
|
};
|
|
@@ -1,26 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import * as FEAAS from '@sitecore-feaas/clientside/react';
|
|
3
|
+
import * as Events from '@sitecore-cloudsdk/events/browser';
|
|
2
4
|
import '@sitecore/components/context';
|
|
3
5
|
import dynamic from 'next/dynamic';
|
|
4
|
-
import
|
|
6
|
+
import config from 'temp/config';
|
|
7
|
+
import {
|
|
8
|
+
LayoutServicePageState,
|
|
9
|
+
SitecoreContextReactContext,
|
|
10
|
+
} from '@sitecore-jss/sitecore-jss-nextjs';
|
|
5
11
|
/**
|
|
6
12
|
* This is an out-of-box bundler for External components (BYOC) (see Sitecore documentation for more details)
|
|
7
13
|
* It enables registering components in client-only or SSR/hybrid contexts
|
|
8
14
|
* It's recommended to not modify this file - please add BYOC imports in corresponding index.*.ts files instead
|
|
9
15
|
*/
|
|
10
16
|
|
|
11
|
-
// Set context properties to be available within BYOC components
|
|
12
|
-
FEAAS.setContextProperties(context);
|
|
13
|
-
|
|
14
17
|
// Import your client-only components via client-bundle. Nextjs's dynamic() call will ensure they are only rendered client-side
|
|
15
18
|
const ClientBundle = dynamic(() => import('./index.client'), {
|
|
16
19
|
ssr: false,
|
|
17
20
|
});
|
|
18
21
|
|
|
19
|
-
// Import your hybrid (server rendering with client hydration) components via index.hybrid.ts
|
|
20
|
-
import './index.hybrid';
|
|
21
|
-
|
|
22
22
|
// As long as component bundle is exported and rendered on page (as an empty element), client-only BYOC components are registered and become available
|
|
23
23
|
// The rest of components will be regsitered in both server and client-side contexts when this module is imported into Layout
|
|
24
24
|
FEAAS.enableNextClientsideComponents(dynamic, ClientBundle);
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// Import your hybrid (server rendering with client hydration) components via index.hybrid.ts
|
|
27
|
+
import './index.hybrid';
|
|
28
|
+
|
|
29
|
+
const BYOCInit = (): JSX.Element | null => {
|
|
30
|
+
const sitecoreContext = React.useContext(SitecoreContextReactContext).context;
|
|
31
|
+
// Set context properties to be available within BYOC components
|
|
32
|
+
FEAAS.setContextProperties({
|
|
33
|
+
sitecoreEdgeUrl: config.sitecoreEdgeUrl,
|
|
34
|
+
sitecoreEdgeContextId: config.sitecoreEdgeContextId,
|
|
35
|
+
pageState: sitecoreContext?.pageState || LayoutServicePageState.Normal,
|
|
36
|
+
siteName: sitecoreContext?.site?.name || config.sitecoreSiteName,
|
|
37
|
+
eventsSDK: Events,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return <FEAAS.ExternalComponentBundle />;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default BYOCInit;
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
useSitecoreContext,
|
|
5
5
|
} from '@sitecore-jss/sitecore-jss-nextjs';
|
|
6
6
|
import { useEffect } from 'react';
|
|
7
|
+
import { pageView } from '@sitecore-cloudsdk/events/browser';
|
|
7
8
|
import config from 'temp/config';
|
|
8
|
-
import { context } from 'lib/context';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* This is the CDP page view component.
|
|
@@ -46,19 +46,14 @@ const CdpPageView = (): JSX.Element => {
|
|
|
46
46
|
variantId as string,
|
|
47
47
|
scope
|
|
48
48
|
);
|
|
49
|
-
// there
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
pageVariantId,
|
|
58
|
-
language,
|
|
59
|
-
})
|
|
60
|
-
)
|
|
61
|
-
.catch((e) => console.debug(e));
|
|
49
|
+
// there can be cases where Events are not initialized which are expected to reject
|
|
50
|
+
pageView({
|
|
51
|
+
channel: 'WEB',
|
|
52
|
+
currency: 'USD',
|
|
53
|
+
page: route.name,
|
|
54
|
+
pageVariantId,
|
|
55
|
+
language,
|
|
56
|
+
}).catch((e) => console.debug(e));
|
|
62
57
|
}, [pageState, route, variantId, site]);
|
|
63
58
|
|
|
64
59
|
return <></>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProxyConfig, ServerBundle } from '@sitecore-jss/sitecore-jss-proxy';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import { RestDictionaryService } from '@sitecore-jss/sitecore-jss/i18n';
|
|
4
4
|
import { httpAgentsConfig } from './httpAgents';
|
|
@@ -13,7 +13,7 @@ let siteName = process.env.SITECORE_SITE_NAME || appName;
|
|
|
13
13
|
|
|
14
14
|
const bundlePath = process.env.SITECORE_JSS_SERVER_BUNDLE || `../dist/${appName}/server.bundle`;
|
|
15
15
|
|
|
16
|
-
const serverBundle = require(bundlePath) as
|
|
16
|
+
const serverBundle = require(bundlePath) as ServerBundle;
|
|
17
17
|
|
|
18
18
|
httpAgentsConfig.setUpDefaultAgents(serverBundle);
|
|
19
19
|
|
|
@@ -33,7 +33,7 @@ const dictionaryService = new RestDictionaryService({
|
|
|
33
33
|
/**
|
|
34
34
|
* @type {ProxyConfig}
|
|
35
35
|
*/
|
|
36
|
-
export const config:
|
|
36
|
+
export const config: ProxyConfig = {
|
|
37
37
|
/**
|
|
38
38
|
* The require'd server.bundle.js file from your pre-built JSS app
|
|
39
39
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ServerBundle } from '@sitecore-jss/sitecore-jss-proxy';
|
|
2
2
|
import keepAlive from 'agentkeepalive';
|
|
3
3
|
import http from 'http';
|
|
4
4
|
import https from 'https';
|
|
@@ -14,7 +14,7 @@ const httpAgent = new keepAlive(keepAliveConfig);
|
|
|
14
14
|
const httpsAgent = (new keepAlive.HttpsAgent(keepAliveConfig) as unknown) as https.Agent;
|
|
15
15
|
|
|
16
16
|
interface HttpAgentsConfig {
|
|
17
|
-
setUpDefaultAgents: (serverBundle:
|
|
17
|
+
setUpDefaultAgents: (serverBundle: ServerBundle) => void;
|
|
18
18
|
getAgent: (url: string) => http.Agent | https.Agent;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import compression from 'compression';
|
|
3
3
|
import 'dotenv/config';
|
|
4
|
-
import
|
|
4
|
+
import scProxy from '@sitecore-jss/sitecore-jss-proxy';
|
|
5
5
|
import { config } from './config';
|
|
6
6
|
//import { cacheMiddleware } from './cacheMiddleware';
|
|
7
7
|
|
|
@@ -42,14 +42,7 @@ server.use((req, _res, next) => {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
// For any other requests, we render app routes server-side and return them
|
|
45
|
-
server.use(
|
|
46
|
-
'*',
|
|
47
|
-
headlessProxy.middleware(
|
|
48
|
-
config.serverBundle.renderView,
|
|
49
|
-
config,
|
|
50
|
-
config.serverBundle.parseRouteUrl
|
|
51
|
-
)
|
|
52
|
-
);
|
|
45
|
+
server.use('*', scProxy(config.serverBundle.renderView, config, config.serverBundle.parseRouteUrl));
|
|
53
46
|
|
|
54
47
|
server.listen(port, () => {
|
|
55
48
|
console.log(`server listening on port ${port}!`);
|
|
@@ -31,11 +31,6 @@ generateConfig();
|
|
|
31
31
|
* NOTE! Any configs returned here will be written into the client-side JS bundle. DO NOT PUT SECRETS HERE.
|
|
32
32
|
*/
|
|
33
33
|
function generateConfig() {
|
|
34
|
-
// Handle undefined values
|
|
35
|
-
Object.keys(defaultConfig).forEach((prop) => {
|
|
36
|
-
defaultConfig[prop] = defaultConfig[prop] || '';
|
|
37
|
-
});
|
|
38
|
-
|
|
39
34
|
try {
|
|
40
35
|
config = jssConfigFactory.create(defaultConfig);
|
|
41
36
|
} catch (error) {
|
|
@@ -55,11 +50,9 @@ const config = {};\n`;
|
|
|
55
50
|
|
|
56
51
|
// Set base configuration values, allowing override with environment variables
|
|
57
52
|
Object.keys(config).forEach(prop => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
prop
|
|
62
|
-
)} || "${value.trim()}";\n`;
|
|
53
|
+
configText += `config.${prop} = process.env.REACT_APP_${constantCase(prop)} || "${
|
|
54
|
+
config[prop]?.trim()
|
|
55
|
+
}";\n`;
|
|
63
56
|
});
|
|
64
57
|
configText += 'module.exports = config;';
|
|
65
58
|
|
|
@@ -33,11 +33,6 @@ module.exports = function generateConfig(configOverrides) {
|
|
|
33
33
|
// and finally config passed in the configOverrides param wins.
|
|
34
34
|
const config = Object.assign(defaultConfig, scjssConfig, packageJson, configOverrides);
|
|
35
35
|
|
|
36
|
-
// Handle undefined values
|
|
37
|
-
Object.keys(config).forEach((prop) => {
|
|
38
|
-
config[prop] = config[prop] || '';
|
|
39
|
-
});
|
|
40
|
-
|
|
41
36
|
// The GraphQL endpoint is an example of making a _computed_ config setting
|
|
42
37
|
// based on other config settings.
|
|
43
38
|
const computedConfig = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.2.0-canary.
|
|
3
|
+
"version": "22.2.0-canary.83",
|
|
4
4
|
"description": "Sitecore JSS initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"ts-node": "^10.9.1",
|
|
64
64
|
"typescript": "~4.9.5"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "d56b18ae5aabcf3095dac9d45b9f28959bf10b64"
|
|
67
67
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.proxyPrompts = exports.FALLBACK_PROXYNAME = void 0;
|
|
7
|
-
const helpers_1 = require("../utils/helpers");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
exports.FALLBACK_PROXYNAME = 'sitecore-jss-proxy-app';
|
|
10
|
-
/**
|
|
11
|
-
* Set of CLI prompts for an SXP app
|
|
12
|
-
*/
|
|
13
|
-
exports.proxyPrompts = [
|
|
14
|
-
{
|
|
15
|
-
type: 'input',
|
|
16
|
-
name: 'proxyAppDestination',
|
|
17
|
-
message: 'Where would you like your proxy app created?',
|
|
18
|
-
default: (answers) => {
|
|
19
|
-
// default proxy destination should be under same root as main app
|
|
20
|
-
return (0, helpers_1.getDefaultProxyDestination)(answers.destination, answers.proxyName || exports.FALLBACK_PROXYNAME);
|
|
21
|
-
},
|
|
22
|
-
when: (answers) => {
|
|
23
|
-
if (answers.yes && !answers.proxyAppDestination) {
|
|
24
|
-
answers.proxyAppDestination = (0, helpers_1.getDefaultProxyDestination)(answers.destination, answers.proxyName || exports.FALLBACK_PROXYNAME);
|
|
25
|
-
}
|
|
26
|
-
return !answers.proxyAppDestination;
|
|
27
|
-
},
|
|
28
|
-
validate: (input, answers) => {
|
|
29
|
-
if (path_1.default.resolve(input) === path_1.default.resolve(answers.destination)) {
|
|
30
|
-
return 'Paths for main app and proxy cannot match. Please choose another destination';
|
|
31
|
-
}
|
|
32
|
-
return true;
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
];
|