Skip to main content

String Dictionary Value Model

The string dictionary value model describes a dictionary of string values. The keys are always strings, never null or undefined.

Example

Check the Editors Example.

Configurations

import { createStringDictionaryValueModel } from 'sequential-workflow-editor-model';

builder
.property('foo')
.value(
createStringDictionaryValueModel({
uniqueKeys: true,
valueMinLength: 3
})
);

Optional properties:

  • uniqueKeys - if true, then the keys must be unique,
  • valueMinLength - the minimum length of the string value.

Value Reading

To read the value you just need to read the property value:

const value: StringDictionary = stepOrRoot.properties['foo'];

The value is stored in a simple object:

interface StringDictionary {
items: StringDictionaryItem[];
}
interface StringDictionaryItem {
key: string;
value: string;
}

Model Id

The model id is stringDictionary.