Options
All
  • Public
  • Public/Protected
  • All
Menu

@sensenet/control-mapper

sn-control-mapper

Gitter chat Build Status codecov Greenkeeper badge NPM version NPM downloads License Commitizen friendly

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.

Usage example:


import { Repository } from "@sensenet/client-core";
import { ControlMapper } from "@sensenet/control-mapper";

const repository = new Repository({ /** repository settings */});
const mapper = new ControlMapper(repository, 
                                 ExampleControlBase,
                                 (setting) => new ExampleClientSetting(setting),
                                 ExampleDefaultControl,
                                 ExampleDefaultFieldControl)
        .setupFieldSettingDefault(NumberFieldSetting, (setting) => MyNumberFieldImplementation)
        .setupFieldSettingDefault(PasswordFieldSetting, (setting) => MyPasswordFieldImplementation);

Generated using TypeDoc