Registers an action
An action is a piece of logic executed by the mobile app. most of the time when a component is pressed
An Action is a Typescript class that implements ActionInterface and provide an execute
method as per this example
class MyAction implements ActionInterface {
async execute(properties: PropertyModel[]) {
...
}
}
const myActionInstance = new MyAction()
zySdk.services.registry.registerAction(MyActionMetadata, myActionInstance)
Action metadata that describes the action
Action instance that implements ActionInterface
Should be ignored or be set to false
Registers a visual component. The component must be a custom element, compliant with WebComponents specifications
class MyComponent extends HTMLElement {
...
}
zySdk.services.registry.registerComponent(MyComponentMetadata, MyComponent)
Component metadata that describes the component
CustomElement Class to register. The component does not need to register the custom element
Should be ignored or be set to false
Registers a function
A function is a piece of logic executed by the mobile app. when a formula
is being evaluated
A function is a Typescript class that implements FunctionInterface and provide an execute
method as per this example
class MyFunction implements FunctionInterface {
async execute(properties: FunctionParameterModel[]) {
...
}
}
const myActionInstance = new MyAction()
zySdk.services.registry.registerAction(MyActionMetadata, myActionInstance)
Should be ignored or be set to false
Registers a Theme
const theme = {
name: 'MyTheme',
theme: {
primaryColor: '#4f7d96',
primaryTextColor: '#ffffff',
secondaryColor: '#fe844b',
secondaryTextColor: '#ffffff',
backgroundColor: '#f0f6f9',
textColor: '#474f5b',
tertiaryColor: '#0000000a',
tertiaryTextColor: '#000000',
rtl: false
}
}
zySdk.services.registry.registerTheme(theme)
Theme to register
Should be ignored or be set to false
This services allows registration of components, actions and themes
Registrations should happen the soonest as possible at Plugin startup