@backbase/portal-model

## Warning: This library is in alpha.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@backbase/portal-model
Minified + gzip package size for @backbase/portal-model in KB

Readme

Backbase Portal Model

Warning: This library is in alpha.

Utilities and classes for representing and parsing portal models.

Usage

.ItemModel

new .ItemModel()

Create a new ItemModel instance

ItemModel.read(filePath)

filePath Type: string

Read the model.xml at filePath and initialise the instance's model.

Returns a Promise that will resolve to a JS Object that represents the model.

ItemModel.createFeature(name)

name Type: string

Initialse the instance's model as a CXP Shared Feature with name.

Returns a Promise that will resolve to a JS Object that represents the model.

ItemModel.isEmpty

Returns true if the model hasn't been initialised.

ItemModel.getXml

Return XML string of the instance's model (which can be used in a package.zip).

ItemModel.getProperty(name)

name Type: string

Returns the value of the property matching name. getProperty: function(name) {

ItemModel.addProperty(name, value)

name Type: string

value Type: string

Adds a string type property to the model with name and value.

ItemModel.getType()

Returns one of template/container/feature/widget.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.