create-sitecore-jss 22.2.0-canary.9 → 22.2.1-canary.1
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 +28 -70
- package/dist/common/index.js +3 -5
- package/dist/common/processes/install.js +2 -9
- package/dist/common/processes/next.js +3 -3
- package/dist/common/processes/transform.js +14 -29
- package/dist/common/prompts/base.js +12 -0
- package/dist/common/utils/helpers.js +43 -28
- 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 -5
- package/dist/templates/angular/README.md +45 -5
- package/dist/templates/angular/angular.json +6 -1
- package/dist/templates/angular/package.json +20 -10
- package/dist/templates/angular/proxy.conf.js +23 -5
- package/dist/templates/angular/scripts/bootstrap.ts +24 -5
- package/dist/templates/angular/scripts/generate-config.ts +73 -53
- package/dist/templates/angular/scripts/update-graphql-fragment-data.ts +2 -4
- package/dist/templates/angular/server.bundle.ts +1 -19
- package/dist/templates/angular/src/app/app.module.ts +2 -0
- package/dist/templates/angular/src/app/components/app-components.shared.module.ts +19 -4
- package/dist/templates/angular/src/app/jss-context.server-side.service.ts +2 -0
- package/dist/templates/{angular-sxp → angular}/src/app/jss-data-fetcher.service.ts +1 -3
- package/dist/templates/angular/src/app/lib/dictionary-service-factory.ts +13 -21
- 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 +2 -1
- 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/graphql-fragment-types.ts +95 -0
- package/dist/templates/angular/tsconfig.json +2 -7
- package/dist/templates/nextjs/package.json +5 -5
- package/dist/templates/nextjs/src/lib/page-props-factory/plugins/component-props.ts +2 -1
- package/dist/templates/nextjs-styleguide/package.json +1 -1
- package/dist/templates/nextjs-sxa/src/components/Container.tsx +6 -14
- 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/nextjs-xmcloud/src/lib/middleware/plugins/personalize.ts +0 -1
- package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/component-themes.ts +2 -1
- package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/preview-mode.ts +2 -1
- package/dist/templates/node-headless-ssr-experience-edge/package.json +2 -2
- package/dist/templates/node-headless-ssr-proxy/package.json +3 -3
- package/dist/templates/react/package.json +5 -5
- package/dist/templates/react-native/package.json +4 -4
- package/dist/templates/vue/package.json +4 -4
- package/package.json +2 -2
- package/dist/common/prompts/sxp.js +0 -20
- package/dist/initializers/angular-sxp/index.js +0 -62
- package/dist/initializers/angular-xmcloud/index.js +0 -66
- package/dist/initializers/node-xmcloud-proxy/index.js +0 -32
- 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 -23
- 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-plugins.ts +0 -28
- package/dist/templates/angular/scripts/temp/gitignore +0 -2
- package/dist/templates/angular/src/app/lib/config.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/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 -27
- 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 -8
- package/dist/templates/angular-xmcloud/angular.json +0 -34
- package/dist/templates/angular-xmcloud/package.json +0 -15
- package/dist/templates/angular-xmcloud/scripts/config/plugins/xmcloud.ts +0 -23
- package/dist/templates/angular-xmcloud/scripts/proxy-build.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.html +0 -15
- package/dist/templates/angular-xmcloud/src/app/components/container/container.component.ts +0 -30
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.html +0 -13
- package/dist/templates/angular-xmcloud/src/app/components/richtext/richtext.component.ts +0 -16
- package/dist/templates/angular-xmcloud/src/app/components/sxa.component.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/lib/config.ts +0 -15
- package/dist/templates/angular-xmcloud/src/app/lib/graphql-client-factory.ts +0 -44
- 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 -49
- 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 -4
- 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-xmcloud-proxy/.env +0 -8
- package/dist/templates/node-xmcloud-proxy/README.md +0 -36
- package/dist/templates/node-xmcloud-proxy/package.json +0 -25
- package/dist/templates/node-xmcloud-proxy/src/config.ts +0 -19
- package/dist/templates/node-xmcloud-proxy/src/index.ts +0 -161
- package/dist/templates/node-xmcloud-proxy/src/types.ts +0 -59
- 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/graph-ql-layout/graph-ql-layout.component.ts +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
- /package/dist/templates/angular/src/app/lib/{graphql-client-factory.ts → client-factory.ts} +0 -0
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LayoutService,
|
|
3
3
|
GraphQLLayoutService,
|
|
4
|
-
<% if (!locals.xmcloud) { -%>
|
|
5
4
|
RestLayoutService,
|
|
6
5
|
constants,
|
|
7
|
-
<% } -%>
|
|
8
6
|
} from '@sitecore-jss/sitecore-jss-angular';
|
|
9
7
|
import { environment } from '../../environments/environment';
|
|
10
|
-
import { clientFactory } from './
|
|
8
|
+
import { clientFactory } from './client-factory';
|
|
11
9
|
|
|
12
10
|
export class LayoutServiceFactory {
|
|
13
11
|
create(): LayoutService {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
new GraphQLLayoutService({
|
|
26
|
-
clientFactory,
|
|
27
|
-
siteName: environment.sitecoreSiteName,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return service;
|
|
12
|
+
return process.env.FETCH_WITH === constants.FETCH_WITH.GRAPHQL
|
|
13
|
+
? new GraphQLLayoutService({
|
|
14
|
+
clientFactory,
|
|
15
|
+
siteName: environment.sitecoreSiteName,
|
|
16
|
+
})
|
|
17
|
+
: new RestLayoutService({
|
|
18
|
+
apiHost: environment.sitecoreApiHost,
|
|
19
|
+
apiKey: environment.sitecoreApiKey,
|
|
20
|
+
siteName: environment.sitecoreSiteName,
|
|
21
|
+
configurationName: environment.layoutServiceConfigurationName,
|
|
22
|
+
});
|
|
31
23
|
}
|
|
32
24
|
}
|
|
33
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<app-navigation></app-navigation>
|
|
2
2
|
<div class="container">
|
|
3
3
|
<ng-container *ngIf="state === LayoutState.Layout">
|
|
4
|
-
<app-
|
|
4
|
+
<app-visitor-identification></app-visitor-identification>
|
|
5
5
|
<sc-placeholder
|
|
6
6
|
name="<%- helper.getAppPrefix(appPrefix, appName) %>jss-main"
|
|
7
7
|
[rendering]="route"
|
|
@@ -71,8 +71,9 @@ export class LayoutComponent implements OnInit, OnDestroy {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
onPlaceholderLoaded(
|
|
74
|
+
onPlaceholderLoaded(placeholderName: string) {
|
|
75
75
|
// you may optionally hook to the loaded event for a placeholder,
|
|
76
76
|
// which can be useful for analytics and other DOM-based things that need to know when a placeholder's content is available.
|
|
77
|
+
console.debug(`layout.component.ts: placeholder component fired loaded event for the ${placeholderName} placeholder`);
|
|
77
78
|
}
|
|
78
79
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom"
|
|
3
|
-
>
|
|
1
|
+
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom">
|
|
4
2
|
<h5 class="my-0 me-md-auto fw-normal">
|
|
5
3
|
<a routerLink="/" class="text-dark" class="logo"></a>
|
|
6
4
|
</h5>
|
|
@@ -13,8 +11,11 @@
|
|
|
13
11
|
>
|
|
14
12
|
{{ 'Documentation' | translate }}
|
|
15
13
|
</a>
|
|
16
|
-
<a
|
|
17
|
-
{{ '
|
|
14
|
+
<a routerLink="/styleguide" class="p-2 text-dark">
|
|
15
|
+
{{ 'Styleguide' | translate }}
|
|
16
|
+
</a>
|
|
17
|
+
<a routerLink="/graphql" class="p-2 text-dark">
|
|
18
|
+
{{ 'GraphQL' | translate }}
|
|
18
19
|
</a>
|
|
19
20
|
</nav>
|
|
20
21
|
</div>
|
|
@@ -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) => {
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
3
|
"description": "Application utilizing Sitecore JavaScript Services and Next.js",
|
|
4
|
-
"version": "22.2.
|
|
4
|
+
"version": "22.2.1-canary",
|
|
5
5
|
"private": true,
|
|
6
6
|
"config": {
|
|
7
7
|
"appName": "<%- appName %>",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sitecore-jss/sitecore-jss-nextjs": "~22.2.
|
|
28
|
+
"@sitecore-jss/sitecore-jss-nextjs": "~22.2.1-canary",
|
|
29
29
|
"graphql": "~15.8.0",
|
|
30
30
|
"graphql-tag": "^2.12.6",
|
|
31
|
-
"next": "^14.
|
|
31
|
+
"next": "^14.2.7",
|
|
32
32
|
"next-localization": "^0.12.0",
|
|
33
33
|
"react": "^18.2.0",
|
|
34
34
|
"react-dom": "^18.2.0",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@graphql-codegen/typescript-operations": "^4.0.1",
|
|
44
44
|
"@graphql-codegen/typescript-resolvers": "^4.0.1",
|
|
45
45
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
46
|
-
"@sitecore-jss/sitecore-jss-cli": "~22.2.
|
|
47
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.
|
|
46
|
+
"@sitecore-jss/sitecore-jss-cli": "~22.2.1-canary",
|
|
47
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~22.2.1-canary",
|
|
48
48
|
"@types/node": "^20.14.2",
|
|
49
49
|
"@types/react": "^18.2.22",
|
|
50
50
|
"@types/react-dom": "^18.0.5",
|
|
@@ -7,7 +7,8 @@ import { Plugin, isServerSidePropsContext } from '..';
|
|
|
7
7
|
class ComponentPropsPlugin implements Plugin {
|
|
8
8
|
private componentPropsService: ComponentPropsService;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// Make sure to run this plugin last to ensure that the updated layout data is used
|
|
11
|
+
order = 10;
|
|
11
12
|
|
|
12
13
|
constructor() {
|
|
13
14
|
this.componentPropsService = new ComponentPropsService();
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import {
|
|
3
2
|
ComponentParams,
|
|
4
3
|
ComponentRendering,
|
|
5
4
|
Placeholder,
|
|
6
|
-
useSitecoreContext,
|
|
7
5
|
} from '@sitecore-jss/sitecore-jss-nextjs';
|
|
8
|
-
|
|
9
|
-
const BACKGROUND_REG_EXP = new RegExp(
|
|
10
|
-
/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/gi
|
|
11
|
-
);
|
|
6
|
+
import React from 'react';
|
|
12
7
|
|
|
13
8
|
interface ComponentProps {
|
|
14
9
|
rendering: ComponentRendering & { params: ComponentParams };
|
|
@@ -16,22 +11,19 @@ interface ComponentProps {
|
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
const DefaultContainer = (props: ComponentProps): JSX.Element => {
|
|
19
|
-
const { sitecoreContext } = useSitecoreContext();
|
|
20
14
|
const containerStyles = props.params && props.params.Styles ? props.params.Styles : '';
|
|
21
15
|
const styles = `${props.params.GridParameters} ${containerStyles}`.trimEnd();
|
|
22
16
|
const phKey = `container-${props.params.DynamicPlaceholderId}`;
|
|
23
17
|
const id = props.params.RenderingIdentifier;
|
|
18
|
+
const mediaUrlPattern = new RegExp(/mediaurl=\"([^"]*)\"/, 'i');
|
|
24
19
|
let backgroundImage = props.params.BackgroundImage as string;
|
|
25
20
|
let backgroundStyle: { [key: string]: string } = {};
|
|
26
21
|
|
|
27
|
-
if (backgroundImage) {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
?.match(BACKGROUND_REG_EXP)
|
|
31
|
-
?.pop()
|
|
32
|
-
?.replace(/-/gi, '')}`;
|
|
22
|
+
if (backgroundImage && backgroundImage.match(mediaUrlPattern)) {
|
|
23
|
+
const mediaUrl = backgroundImage.match(mediaUrlPattern)?.[1] || '';
|
|
24
|
+
|
|
33
25
|
backgroundStyle = {
|
|
34
|
-
backgroundImage: `url('${
|
|
26
|
+
backgroundImage: `url('${mediaUrl}')`,
|
|
35
27
|
};
|
|
36
28
|
}
|
|
37
29
|
|
|
@@ -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 <></>;
|
package/dist/templates/nextjs-xmcloud/src/lib/page-props-factory/plugins/component-themes.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { Plugin } from '..';
|
|
|
4
4
|
import config from 'temp/config';
|
|
5
5
|
|
|
6
6
|
class ComponentThemesPlugin implements Plugin {
|
|
7
|
-
|
|
7
|
+
// Make sure to run this plugin after the personalization plugin, since it relies on the layout data
|
|
8
|
+
order = 10;
|
|
8
9
|
|
|
9
10
|
async exec(props: SitecorePageProps) {
|
|
10
11
|
// Collect FEAAS, BYOC, SXA component themes
|
|
@@ -20,13 +20,14 @@ class PreviewModePlugin implements Plugin {
|
|
|
20
20
|
|
|
21
21
|
// If we're in Pages preview (editing) Metadata Edit Mode, prefetch the editing data
|
|
22
22
|
if (isEditingMetadataPreviewData(context.previewData)) {
|
|
23
|
-
const { site, itemId, language, version, variantIds } = context.previewData;
|
|
23
|
+
const { site, itemId, language, version, variantIds, layoutKind } = context.previewData;
|
|
24
24
|
|
|
25
25
|
const data = await graphQLEditingService.fetchEditingData({
|
|
26
26
|
siteName: site,
|
|
27
27
|
itemId,
|
|
28
28
|
language,
|
|
29
29
|
version,
|
|
30
|
+
layoutKind,
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
if (!data) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-headless-ssr-experience-edge-sample",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.1-canary",
|
|
4
4
|
"description": "Node server-side-rendering sample for running JSS apps under Node hosting using Experience Edge",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "ts-node ./src/index.ts"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"homepage": "https://jss.sitecore.com",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sitecore-jss/sitecore-jss": "~22.2.
|
|
22
|
+
"@sitecore-jss/sitecore-jss": "~22.2.1-canary",
|
|
23
23
|
"compression": "^1.7.4",
|
|
24
24
|
"express": "^4.18.2",
|
|
25
25
|
"dotenv": "^16.0.3"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-headless-ssr-proxy-sample",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.1-canary",
|
|
4
4
|
"description": "Node server-side-rendering proxy sample for running JSS apps under Node hosting",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "ts-node ./src/index.ts"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"homepage": "https://jss.sitecore.com",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sitecore-jss/sitecore-jss": "~22.2.
|
|
23
|
-
"@sitecore-jss/sitecore-jss-proxy": "~22.2.
|
|
22
|
+
"@sitecore-jss/sitecore-jss": "~22.2.1-canary",
|
|
23
|
+
"@sitecore-jss/sitecore-jss-proxy": "~22.2.1-canary",
|
|
24
24
|
"agentkeepalive": "^4.2.1",
|
|
25
25
|
"compression": "~1.7.4",
|
|
26
26
|
"express": "~4.19.2",
|