@sensenet/control-mapper
v3.2.0
Published
Control mapping utility for sensenet
Downloads
152
Readme
@sensenet/control-mapper
This NPM package contains a control mapping tool for sensenet. This can be used for specifying relations between sensenet schemas and specified UI controls at content and field level and can be used for automatized form generation.
Install
# Yarn
yarn add @sensenet/control-mapper
# NPM
npm install @sensenet/control-mapper
Usage
import { Repository } from '@sensenet/client-core'
import { ControlMapper } from '@sensenet/control-mapper'
const repository = new Repository({
/** repository settings */
})
const mapper = new ControlMapper(repository, ExampleDefaultControl, ExampleDefaultFieldControl)
.setupFieldSettingDefault('NumberFieldSetting', setting => MyNumberFieldImplementation)
.setupFieldSettingDefault('PasswordFieldSetting', setting => MyPasswordFieldImplementation)