@sensenet/control-mapper

Control mapping utility for sensenet

Usage no npm install needed!

<script type="module">
  import sensenetControlMapper from 'https://cdn.skypack.dev/@sensenet/control-mapper';
</script>

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.

NPM version NPM downloads License: GPL v2

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)