0.2.0 • Published 5 months ago

@cartdotcom/layout v0.2.0

Weekly downloads
-
License
-
Repository
-
Last release
5 months 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

5 months ago

0.1.10

10 months ago

0.1.11

10 months ago

0.1.12

10 months ago

0.1.13

10 months ago

0.1.14

10 months ago

0.1.15

10 months ago

0.1.38

6 months ago

0.1.8

10 months ago

0.1.39

6 months ago

0.1.9

10 months ago

0.1.30

8 months ago

0.1.31

8 months ago

0.1.32

8 months ago

0.1.33

8 months ago

0.1.34

8 months ago

0.1.35

7 months ago

0.1.36

6 months ago

0.1.37

6 months ago

0.1.27

9 months ago

0.1.28

9 months ago

0.1.29

9 months ago

0.1.20

9 months ago

0.1.21

9 months ago

0.1.22

9 months ago

0.1.23

9 months ago

0.1.24

9 months ago

0.1.25

9 months ago

0.1.26

9 months ago

0.1.16

10 months ago

0.1.17

10 months ago

0.1.18

10 months ago

0.1.19

9 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.5

11 months ago

0.1.0

1 year ago

0.1.2

12 months ago

0.1.1

12 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago