Initialization
This page describes how to initialize the storage configurator.
You will need to know how to set attributes or send events to the configurator ๐
Mandatory data
Simple launch
The most common use case: you want to lauch the configurator on an empty project. You only need two things:
Attribute name | Attribute value |
---|---|
data-distribution-id | The id of your application distribution. |
data-authentication-token | Your authentication token. |
Note: See the communication page to know how to send an event ๐.
Simple project load
You can load an already existing project.
The common use case is this one:
- You open an empty project ๐
- You add some boxes, some sub components and you save your project ๐ for later use
- Then you want to reload the saved project.
To do so, you will need a third attribute:
Attribute name | Attribute value |
---|---|
data-project-uuid | The uuid of the project you want to load. |
Alternatively, you can send the project uuid in the initialization event.
const projectToLoad = {
projectUuid: "[The project uuid]"
}
configurator.dispatchEvent(new CustomEvent("configuratorInit", {detail: projectToLoad}));
Optional data
The best way to configure the optional attributes is to set their value in your application distribution, but you can also choose to configure it in the DOM.
The values you set in the DOM will override the eventual values from the Application Distribution.
See the Storage Configurator integration dedicated page ๐.