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 either {@link Action1Interface} or a generation 2 constructor.
class MyAction implements Action1Interface {
async execute(properties: PropertyModel[]) {
...
}
}
zySdk.services.registry.registerAction(MyActionMetadata, MyAction)
Action metadata that describes the action
Action instance that implements {@link Action1Interface} or a generation 2 constructor
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 either {@link Function1Interface} or a generation 2 constructor.
class MyFunction {
myParameter: string
async execute() {
...
}
}
zySdk.services.registry.registerFunction(MyActionMetadata, MyFunction)
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