Class: ViewConfiguration

$k. ViewConfiguration

new $k.ViewConfiguration()

Configuration of a semantic element editor

Extends

Methods

static$k.ViewConfiguration.forElement(semanticElement, context) : object

Returns the configuration for the semantic element

Name Type Description
semanticElement $k.SemanticElement
context $k.SemanticElement optional

Context of the configuration

Since:
  • 4.1.0
Returns:
Type Description
object The rendered JSON object

static$k.ViewConfiguration.from(configurationElement) : $k.ViewConfiguration

Returns the confguration defined by the element

Name Type Description
configurationElement $k.SemanticElement

The configuration element

Since:
  • 4.1.0
Returns:
Type Description
$k.ViewConfiguration

static$k.ViewConfiguration.synchronize(object) : $k.ViewConfiguration

Update the semantic element from the JSON string / literal object

Name Type Description
object object

JSON string or literal object

Since:
  • 4.1.0
See:
Throws:
Type Description
$k.exception.SchemaError

Got an synchronisation error

Returns:
Type Description
$k.ViewConfiguration

static$k.ViewConfiguration.synchronizeJSON(jsonObject) : $k.ViewConfiguration

Update the semantic element from the JSON string / literal object

Name Type Description
jsonObject object

JSON string or literal object

Deprecated
  • Use synchronize(jsonObject)
    Throws:
    Type Description
    $k.exception.SchemaError

    Got an synchronisation error

    Returns:
    Type Description
    $k.ViewConfiguration

    configElement() : $k.SemanticElement

    Since:
    • 4.1.0
    Returns:
    Type Description
    $k.SemanticElement

    relationTargetSearch(searchString) : Array.<$k.SemanticElement>

    Name Type Description
    searchString string optional

    Search string for the target element

    Version:
    • Experimental feature, might be removed at any time
    Since:
    • 4.1.0
    Returns:
    Type Description
    Array.<$k.SemanticElement> The rendered object

    render(semanticElement, keyFilter, detailFilter) : object

    Render the element as a literal object

    Name Type Description
    semanticElement $k.SemanticElement optional
    keyFilter object optional

    Alternative 1: An array of strings defining a filter which property names to include.

    Alternative 2: An object with "include" and/or "exclude" keys

    {"exclude": ["key1", ...]}
    includes all but the listed properties, while
    {"include": ["key1", ...]}
    or
    ["key1", ...]
    includes only the listed properties.

    Non-optional properties are always included

    Alternative 3: A JSONRenderContext

    detailFilter object optional

    A filter to define the granularity of the JSON structure

    [ "schema" ]
    includes json with schema information

    Since:
    • 4.1.0
    See:
    • $k.ViewConfiguration#synchronize
    Returns:
    Type Description
    object The rendered object

    renderJSON(semanticElement, excludeKeys, detailFilter) : object

    Render the element as a JavaScript object

    Name Type Description
    semanticElement $k.SemanticElement
    excludeKeys Array.<string> optional

    Collection of property names that are excluded

    detailFilter object optional

    A filter to define the granularity of the JSON structure

    [ "schema" ]
    includes json with schema information

    Deprecated
    • Use render(semanticElement, {"exclude": excludedKeys}) instead
      Returns:
      Type Description
      object The rendered JSON object