0.2.0 • Published 2 years ago

@cartdotcom/layout v0.2.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

This component was created to support the embedding of Brand Console's Layout within single-page applications (SPAs) outside the Brand Console monorepo.

It contains three other components linked together:

  • Header
  • Left Nav
  • Footer

Installation

To use this project, you first need to load the script:

<script src="https://unpkg.com/@cartdotcom/layout@latest/bundle-production.js"></script>

Notes:

  • latest can be replaced with any specific version available
  • production refers to the environment to get the layout from. Possible values: development, stage, production

Usage

Once the script is loaded, a new custom element <cart-layout /> will be available for use. Just add it to your application's index file.

<cart-layout
  product="mcm"
  logout-url="/logout"
  routes-with-blank-layout="/create-password,/login"
></cart-layout>

Arguments

ArgumentDescriptionRequired?TypeDefault Value
logout-urlUse this if the consuming application needs to trigger a specific URL after the user logs out using the unified layout layout button.Nostring
productThe application that will consume the layout.Yesstring (dfw, mcm, sf)
routes-with-blank-layoutA comma-separated list of paths within the application that require a blank layout to be rendered.Nostring
unauthenticated-routesA comma-separated list of paths within the application that don't require authentication.Nostring
oauth-callback-routesA comma-separated list of paths within the application that are OAuth callbacks for the Auth0 SDK to ignore.Nostring

The rendering of the custom element will make a container with id cartdotcom-container available within the document.

Then you can mount your application on this div#cartdotcom-container.

For Developers (Multichannel Management)

In order to update the menu items, commit the necessary changes to a branch and create a PR.

Deployment

  • Update the version in the package.json file to the latest version
  • npm run layout:build:all to compile the layout code for all 3 environments
  • Navigate to /dist/libs/layout
  • npm publish ... or add --dry-run to verify the contents
0.2.0

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.38

2 years ago

0.1.8

2 years ago

0.1.39

2 years ago

0.1.9

2 years ago

0.1.30

2 years ago

0.1.31

2 years ago

0.1.32

2 years ago

0.1.33

2 years ago

0.1.34

2 years ago

0.1.35

2 years ago

0.1.36

2 years ago

0.1.37

2 years ago

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.5

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago