Usage
Typescript Import Format
//This namespace exports multiple static methods or members. To import
import * as MetadataTypes from "ojs/metadata";
//Now you can access the methods as MetadataTypes.methodName and so on
For additional information visit:
Type Definitions
-
ComponentMetadata
-
- The name can include only letters, digits, '-', and '_'.
- The letters in the name should be all lowercase.
- The name must start with a lowercase letter.
- The name cannot be one of the following reserved names:
- annotation-xml
- color-profile
- font-face
- font-face-src
- font-face-uri
- font-face-format
- font-face-name
- missing-glyph
- At least one hyphen is required.
- The first segment (up to the first hyphen) is a namespace prefix. The namespace prefix 'oj' is reserved for components that are bundled with the JET release.
- The first hyphen must be followed by at least one character.
- By convention, the slot name for a component's Default slot is the empty string:
""
. - Slots should follow a logical ordering representing their preferred presentation in a design-time environment:
- The Default slot should always be first.
- Slots that are rendered in specific locations should be ordered from top-start to bottom-end.
- Slots that are more typically used should be ordered ahead of slots that are used in more specialized use cases.
- Always use the full name of the component when declaring a dependency upon it.
- Dependencies upon JET Custom Components, JET Reference Components, and JET Resource Components may use semantic version range syntax to specify the range of versions that are acceptable to fulfill the dependency requirement.
- Strings in the
implements
array may not contain any hyphen characters. - the name of the license text file packaged with the component
- a URL to a remote license file
- If specified, then there should exist a JET Pack whose name is the
pack
value, and which lists this component's full name in itsdependencies
metadata. - If unspecified, then this is a standalone JET Component that is not a member of any JET Pack.
"common"
- an ordered group of properties that are commonly used for configuring this component, so they should be prominently highlighted and the design time environment should provide extra assistance"data"
- an ordered group of properties associated with data binding- Component authors are not required to map all of their properties within their component's
propertyLayout
object. Design time environments are expected to implement designs that enable access to both mapped and unmapped properties. - Nested propertyLayoutGroups enable support for design time environments that expose collapsible sections of related properties –
in which case, a section heading is suggested by that propertyLayoutGroup's
displayName
. - If the design time environment does not support nested property groupings, then the assumption is that nested propertyLayoutGroups will be inlined within their common parent propertyLayoutGroup.
- Deprecated:
-
Since Value Description 8.0.0
Array<MetadataTypes.StyleGroup> The MetadataTypes.StyleGroup type is deprecated. Use instances of the MetadataTypes.StyleClass, MetadataTypes.StyleSet, and MetadataTypes.StyleTemplate types for the content of the styleClasses array. - Since:
- 7.0.0
Properties:
Key Used at Runtime Type Argument Default Description name
no
string The component name must meet the following requirements (based upon the W3C Custom Element spec): Note:
The full name of a component consists of itspack
metadata value (if specified) and itsname
metadata value, appended together with a hyphen separating them:[pack_value]-[name_value]
. This full name corresponds to the Component's custom element tag name. The names of standalone custom JET Web Components (i.e., custom components that are not members of a JET Pack, nor are JET Packs themselves) have the following additional requirements:version
no
string The component version (following semantic version rules). Note that changes to the metadata even for minor updates like updating the jetVersion should result in at least a patch component version change, e.g. 1.0.0 -> 1.0.1. jetVersion
no
string The semantic version of the supported JET version(s). JET Component authors should not specify a semantic version range that includes unreleased JET major versions as major releases may contain non backwards compatible changes. Authors should instead recertify components with each major release and update the metadata or release a new version that is compatible with the new release changes. properties
yes
{[key:string] : MetadataTypes.ComponentMetadataProperties} <optional>
Object containing the properties defined by the component. Each key represents a component property name, and its value is an object with additional metadata for that property. See the Properties table below for details. methods
yes
{[key:string] : MetadataTypes.ComponentMetadataMethods} <optional>
Object containing the methods defined by the component. Each key represents a component method name, and its value is an object with additional metadata for that method. See the Methods table below for details. events
yes
{[key:string] : MetadataTypes.ComponentMetadataEvents} <optional>
Object containing events defined by the component. Each key represents a component event name, and its value is an object with additional metadata for that event. See the Events table below for details. slots
yes
{[key:string] : MetadataTypes.ComponentMetadataSlots} <optional>
Object containing the slots defined by the component. Each key represents a component slot name, and its value is an object with additional metadata for that slot. See the Slots table below for details. Note:
dynamicSlots
yes
{[key:string] : MetadataTypes.ComponentMetadataSlots} <optional>
Optional object containing information about dynamic slots supported by the component. (Dynamic slot names are specified by the application, and are not known by the component until runtime.) Each key represents a dynamic slot definition, and its value is an object with additional metadata describing a dynamic template slot. A component property whose value is a dynamic template slot name can specify a dynamic slot definition key in its corresponding
dynamicSlotDef
metadata in order to map the dynamic template slot name to the additional metadata in thedynamicSlots
object.Note:
By convention, an empty object is sufficient for specifying that the component supports dynamic slots. Conversely, if thedynamicSlots
metadata element is unspecified, then the component does not support dynamic slots.dependencies
no
{[key:string] : string} <optional>
Dependency to semantic version mapping for JET Component dependencies. 3rd party libraries should not be included directly in this mapping; instead, define the 3rd party library with a JET Reference Component and include the dependency upon that Reference Component. Example:
dependencies: {"oj-foo-composite1": "1.2.0", "oj-foo-composite2": "^2.1.0"}
Note:
description
no
string <optional>
A translatable high-level description for the component. Content should typically consist of one or two sentences. displayName
no
string <optional>
A user friendly, translatable name of the component. extension
no
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata help
no
string <optional>
Specifies a URL to detailed API documentation for this component. The value is either an absolute URL or it is relative to a base URL as specified by the help
metadata property of the containing JET Pack.icon
no
MetadataTypes.Icon <optional>
One or more optional images for representing the component within a design time environment's component palette. implements
no
Array.<string> <optional>
An optional array of strings, where each string represents a "duck type" or interface contract that this JET Web Component will fulfill. Note
Example
The 'oj-foo' JET Pack includes a number of components that implement aFooContentElement
TypeScript interface. This interface describes the contract that the oj-foo-dashboard container requires of its children in order to perform layout. An oj-foo-newsfeed component can advertise its adherence to theFooContentElement
contract through its metadata:{ "name": "newsfeed", "version": "1.0.0", "jetVersion": "^10.0.0", "pack": "oj-foo" "displayName": "Foo News Feed", "type": "composite", "implements": ["FooContentElement"], ... }
license
no
string <optional>
A reference to the license under which use of the component is granted. The value can be: pack
no
string <optional>
Identifies the component as belonging to the specified JET Component Pack, or JET Pack. A JET Pack is a versioned set of JET Components with additional metadata that enables applications to easily install and configure path mappings to the components and shared resources in that JET Pack.
paths
no
{cdn: MetadataTypes.Paths} <optional>
Specifies path metadata that is used to generate RequireJS path mappings for loading this component at runtime from a Content Delivery Network, or CDN. It is strongly recommended that CDN urls be specified with https:
, as this is required for HTTP/2 and the consuming app may be configured to disallow non-secure urls.Note:
The information in thepaths
property is ignored for JET Custom Components that are part of a JET Pack – only the JET Pack itself will be path mapped.preferredParent
no
Array.<MetadataTypes.PreferredParent> <optional>
An optional array of one or more PreferredParent objects, specifying the container preferences for this custom element. propertyLayout
no
Array.<MetadataTypes.PropertyLayoutGroup> <optional>
An optional ordered array of one or more PropertyLayoutGroup objects. A propertyLayoutGroup enables a component author to order and shape the groupings of their properties in the design time environment for their component. Reserved groupings include:
Notes
Example
A typical Property Inspector layout for the oj-input-text component might look as follows:"propertyLayout": [ { "propertyGroup": "common", "displayName": "Common", "items": ["labelHint", "placeholder", "required", "disabled", "readonly"] }, { "propertyGroup": "data", "displayName": "Data", "items": ["value"] } ]
since
no
string <optional>
The JET version (or, for custom components, the JET Pack version) in which this component was first introduced. The version string must follow semantic version rules. Only production version numbers should be used. status
no
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this component. styleClasses
no
Array<MetadataTypes.StyleClassItem> | Array.<MetadataTypes.StyleGroup> <optional>
Optional array of style classes, style class sets, and style class templates that are applicable to this component. styleVariables
no
Array.<MetadataTypes.StyleVariable> <optional>
Optional array of CSS variables that are applicable to this component. subcomponentType
no
"data" | "patternImpl" | "packPrivate" <optional>
Identifies this JET Component as a sub-component (in other words, a component that is expected to function within a containing parent component). The value of this metadata property specifies the role of this sub-component within its container. Supported values are:
Value Description data Identifies this sub-component as providing data at runtime in the form of property values within a corresponding template slot. patternImpl Identifies this sub-component as providing the implementation for a broader Visual Builder pattern. packPrivate Identifies this sub-component as a private base class implementation that is extended by other public Web Components in a JET Pack. type
no
"composite" | "core" | "pack" | "reference" | "resource" <optional>
"composite" Identifies the type of this JET Component. Supported values are:
Value Description composite Identifies the component as a custom JET Web Component. This is the default, if type
is unspecified.core Identifies the component as a JET Web Component that is bundled with a particular version of JET. pack Identifies the component as a JET Component Pack, or JET Pack. A JET Pack is a versioned set of JET Web Components with additional metadata that enables applications to easily install and configure path mappings to the artifacts in that JET Pack. The
dependencies
metadata property is used to specify the versioned components that make up the JET Pack.reference Identifies the component as a JET Reference Component, which describes a versioned external 3rd party library. A JET Reference Component can be referenced in the
dependencies
metadata of a JET Pack, a JET Resource Component, or an individual JET Web Component.resource Identifes the component as a JET Resource Component, which describes a versioned set of shared resources (such as shared CSS, JavaScript base classes & utility code, icons, translation bundles, etc.) A JET Resource Component can be referenced in the
dependencies
metadata of a JET Pack, another JET Resource Component, or an individual JET Web Component.Metadata for JET Packs, JET Reference Components, and JET Resource Components are described in more detail in the JET Packs topic.
-
ComponentMetadataEvents
-
"common"
- Applications will commonly want to invoke application logic in response to this event, so it should be prominently highlighted and the design time environment should provide extra assistance.- Since:
- 7.0.0
Properties:
Name Type Argument Description bubbles
boolean <optional>
Indicates whether the event bubbles up through the DOM or not. Defaults to false. cancelable
boolean <optional>
Indicates whether the event is cancelable or not. Defaults to false. description
string <optional>
A translatable high-level description for the event. Content should typically consist of one or two sentences. detail
{[key:string] : MetadataTypes.EventDetailItem} <optional>
Describes the properties available on the event's detail
property, which contains data passed when initializing the event. Each key represents an event detail item, and the value is an object with additional metadata for that particular event detail item.displayName
string <optional>
A user friendly, translatable name of the event. eventGroup
string <optional>
Optional group name for this event in a design time environment. Reserved values are: eventGroup
, then members of that event'sdetail
metadata can be also be flagged with that sameeventGroup
name – this enables the design time environment to map event payload details with any extra assistance afforded by that grouping.extension
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata help
string <optional>
Specifies a URL to detailed API documentation for this component event. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this event. visible
boolean <optional>
Specifies whether the event should be visible at design time. True by default. -
ComponentMetadataMethods
-
- Since:
- 7.0.0
Properties:
Key Used at Runtime Type Argument Description internalName
yes
string <optional>
An optional ViewModel method name that is different from, but maps to this method. description
no
string <optional>
A translatable high-level description for the method. Content should typically consist of one or two sentences. displayName
no
string <optional>
A user friendly, translatable name of the method. extension
no
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata help
no
string <optional>
Specifies a URL to detailed API documentation for this component method. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.params
no
Array.<MetadataTypes.MethodParam> <optional>
An array of objects describing the method parameters. return
no
string <optional>
The return type of the method, typically following Google Closure Compiler syntax. The metadata also supports TypeScript data types. status
no
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this method. visible
no
boolean <optional>
Specifies whether the method should be visible at design time. True by default. -
ComponentMetadataProperties
-
- For normal dynamic slots, set the
dynamicSlotDef
metadata value to an empty string:""
. - For dynamic template slots, the
dynamicSlotDef
metadata value is the key for looking up additional metadata about this dynamic template slot in the component'sdynamicSlots
metadata object. This includesdata
metadata describing variables on the application context object passed into the dynamic template slot at runtime. "common"
- Applications will commonly want to react to changes to this property at runtime, so its corresponding property change event should be prominently highlighted and the design time environment should provide extra assistance."common"
- This property is commonly used for configuring this component, so it should be prominently highlighted and the design time environment should provide extra assistance."data"
- This property is commonly associated with data binding.- Component authors are not required to map all of their properties to a particular
propertyGroup
. Design time environments are expected to implement designs that enable access to both mapped and unmapped properties. - Component authors can optionally specify their preferred layout and ordering of component
properties within a
propertyGroup
by providing additional Component-levelpropertyLayout
metadata. - Conversely, if a property is mapped to a particular
propertyGroup
but is not referenced in the correspondingpropertyLayout
metadata, then its layout and ordering is undefined. - Since:
- 7.0.0
Properties:
Key Used at Runtime Type Argument Description enumValues
yes
Array.<string> <optional>
An optional list of valid enum values for a string property. An error is thrown if a property value does not match one of the provided enumValues. properties
yes
{[key:string] : MetadataTypes.ComponentMetadataProperties} <optional>
A nested properties object for complex properties. Each key represents a subproperty name, and its value is an object with additional metadata for that subproperty. Subproperties exposed using nested properties objects in the metadata can be set using dot notation in the attribute. See the Subproperties section for more details on working with subproperties. readOnly
yes
boolean <optional>
Determines whether a property can be updated outside of the ViewModel. False by default. If readOnly is true, the property can only be updated by the ViewModel or by the components within the composite component. This property only needs to be defined for the top level property, with subproperties inheriting that value. type
yes
string The type of the property, following Google Closure Compiler syntax. The runtime will parse string, number, boolean, array and object types for non data-bound attributes, but will not provide type checking for array and object elements. However, for documentation purposes, it may still be beneficial to provide array and object element details using the Closure Compiler syntax. value
yes
Array | object | boolean | number | null | string <optional>
An optional default value for a property. This default value must be expressible as valid JSON. For complex properties, the default value can be specified as an object for the top level property, or else at the leaf subproperty levels, but not both. binding
yes
MetadataTypes.PropertyBinding <optional>
Runtime metadata for specifying property's behavior related to JET bindings writeback
yes
boolean <optional>
Applicable when the application uses two-way data binding to bind an expression to a property. If writeback is true, the JET Web Component can directly update the value of the bound expression after a user interaction like selection. False by default. This property only needs to be defined for the top level property, with subproperties inheriting that value. description
no
string <optional>
A translatable high-level description for the property. Content should typically consist of one or two sentences. displayName
no
string <optional>
A user friendly, translatable name of the property. dynamicSlotDef
no
string <optional>
If specified, then the property value is a dynamic slot name. eventGroup
no
string <optional>
Optional group name for this property's corresponding [property]Changed event in a design time environment. Reserved values are: exclusiveMaximum
no
number | string <optional>
Validation metadata - specifies the exclusive high end of a possible range of values (e.g., "exclusiveMaximum": 1.0 → valid property value is <1.0). If the value is a string, then it is assumed to represent a dateTime value in the ISO 8601 extended date/time format.
For properties of typeArray<number> | Array<string>
, the validation applies to all values in the array.exclusiveMinimum
no
number | string <optional>
Validation metadata - specifies the exclusive low end of a possible range of values (e.g., "exclusiveMinimum": 0.0 → valid property value is >0.0). If the value is a string, then it is assumed to represent a dateTime value in the ISO 8601 extended date/time format.
For properties of typeArray<number> | Array<string>
, the validation applies to all values in the array.extension
no
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata format
no
string <optional>
Format hint for a primitive type that can be used for simple validation in the design time environment, or to invoke a specialized customizer control or set of controls. For properties of type Array<number> | Array<string>
, the hint applies to all values in the array.
The following set of reserved format keywords are supported:{number} type formats
Keyword Description double
floating point number with double precision float
floating point number with single precision int32
signed 32-bit integer int64
signed 64-bit integer {string} type formats
Keyword Description binary
sequence of octets byte
sequence of base64-encoded characters color
CSS color value date
date in RFC 3339 format, using the "full-date" profile date-time
date-time in RFC 3339 format, using the "date-time" profile email
Internet email address in RFC 5322 format time
time in RFC 3339 format, using the "full-time" profile password
hint to UIs to obscure input uri
Uniform Resource Identifier in RFC 3986 format help
no
string <optional>
Specifies a URL to detailed API documentation for this component property. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.maximum
no
number | string <optional>
Validation metadata - specifies the inclusive high end of a possible range of values (e.g., "maximum": 1.0 → valid property value is <=1.0). If the value is a string, then it is assumed to represent a dateTime value in the ISO 8601 extended date/time format.
For properties of typeArray<number> | Array<string>
, the validation applies to all values in the array.minimum
no
number | string <optional>
Validation metadata - specifies the inclusive low end of a possible range of values (e.g., "minimum": 0.0 → valid property value is >=0.0). If the value is a string, then it is assumed to represent a dateTime value in the ISO 8601 extended date/time format.
For properties of typeArray<number> | Array<string>
, the validation applies to all values in the array.minCapabilities
no
MetadataTypes.MinCapabilities <optional>
An object describing the minimum set of required capabilities supported by the bound Property's value. The keys of the minCapabilities object identify a capability name, and the corresponding values are JSON Objects that specify a minimum set of requirements supported by that named capability. pattern
no
string <optional>
Javascript regular expression that can be used to validate a string value at design time.
For properties of typeArray<string>
, the validation rule applies to all values in the array.Example:
To validate a string that matches the format of a U.S. Social Security number, you could specify the following:"pattern": "^\d{3}-?\d{2}-?\d{4}$"
placeholder
no
string <optional>
User-friendly, translatable hint text that appears in an empty input field at design time. propertyEditorValues
no
{[key:string] : MetadataTypes.PropertyEditorValue} <optional>
Design time metadata that lists suggested property values, and optional information about each suggested value. Each key represents a suggested property value – if enumValues runtime metadata is specified, then it is expected that some or all of the keys will match the values in the enumValues array. Conversely, the absence of enumValues runtime metadata indicates that the property can accept values in addition to those suggested by its propertyEditorValues metadata. propertyGroup
no
string <optional>
Optional group name for this property in a design time environment. Reserved values include: propertyGroup
specified as "common.legend"Notes
required
no
boolean <optional>
Signals to the design time environment whether this property must have a value specified. False by default. Note that required
should not be set to true if a defaultvalue
has been defined for the property already.status
no
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this property. templateSlotRenderType
no
string <optional>
Optional override for a dynamic template slot's renderer function signature type alias name.
If unspecified, a default renderer function signature type alias name will be generated by converting the property name from camelCase to PascalCase and prepending with 'Render'.Note:
This metadata only applies if the property value is a dynamic template slot name. Refer to thedynamicSlotDef
metadata property for more information.translatable
no
boolean <optional>
True if the value of this property (or its sub-properties, unless explicitly overridden) is eligible to be included when application resources are translated for Internationalization. False by default.
For properties of typeArray<string>
, the translatability status applies to all values in the array.units
no
string <optional>
User-friendly, translatable text string specifying what units are represented by a property value -- e.g., "pixels". visible
no
boolean <optional>
Specifies whether the property should be visible at design time. True by default. - For normal dynamic slots, set the
-
ComponentMetadataSlots
-
- For each
preferredContent
string value, search the set of currently registered JET Web Components and add any Component to the list of suggested slot contents whoseimplements
array contains that string value. - Since:
- 7.0.0
Properties:
Key Used at Runtime Type Argument Description implicitBusyContext
yes
boolean <optional>
Specifies whether the JET runtime should implicitly provide a BusyContext scoped to the slot's contents. This provides application developers a mechanism for waiting until all of a slot's component contents have been created and any bindings applied before programmatically interacting with the contents. False by default. Note:
This property does not apply to template slots nor dynamic slots.data
no
{[key:string] : MetadataTypes.SlotDataVariable} <optional>
An object whose keys are the variable names available on $current
and whose values are objects that provide additional metadata about the variable. These variables extend what's available on the application context object passed into the the template slot at runtime, and will be exposed as subproperties on the$current
variable and any application provided aliases.Note:
This property only applies to template slots.description
no
string <optional>
A translatable high-level description for the slot. Content should typically consist of one or two sentences. displayName
no
string <optional>
A user friendly, translatable name of the slot. extension
no
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata help
no
string <optional>
Specifies a URL to detailed API documentation for this component slot. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.maxItems
no
number <optional>
Specifies the maximum number of elements that the design time environment should allow to be added to this slot. If unspecified, the default is that there is no maximum. minItems
no
number <optional>
Specifies the minimum number of elements that the design time environment should allow to be added to this slot. If unspecified, the default is 0. preferredContent
no
Array.<string> <optional>
An optional array of strings, where each string represents a preferred "duck type" or interface contract that the slot's content should fulfill. The expectation is that each string should match a corresponding implements
metadata string value as specified by another JET Web Component.
Design time environments will use this metadata to populate a list of suggested JET Web Components that can be added to this slot's content:Example
The 'oj-foo' JET Pack includes a number of components that implement aFooContentElement
TypeScript interface. This interface describes the contract that the oj-foo-dashboard container expects of its children in order to perform layout. The oj-foo-dashboard component can advertise its preference for default slot content that fullfills theFooContentElement
contract through its metadata:{ "name": "dashboard", "version": "1.0.0", "jetVersion": "^10.0.0", "pack": "oj-foo" "displayName": "Foo Dashboard", "type": "composite", ... "slots": { "": { "displayName": "Default", "description": "Child elements managed by the oj-foo-dashboard", "preferredContent": ["FooContentElement"] } } }
status
no
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this slot. templateSlotRenderType
no
string <optional>
Optional override for a template slot's renderer function signature type alias name.
If unspecified, a default renderer function signature type alias name will be generated by converting the template slot name from camelCase to PascalCase and prepending with 'Render'.Note:
This property only applies to template slots.visible
no
boolean <optional>
Specifies whether the slot should be visible at design time. True by default. - For each
-
EventDetailItem
-
- Since:
- 7.1.0
Properties:
Name Type Argument Description description
string <optional>
An optional, translatable description of this event detail item. Content should typically consist of one or two sentences. type
string The type of this event detail item's value, typically following Google Closure Compiler syntax. The metadata also supports TypeScript data types. status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this event detail item. eventGroup
string <optional>
Optional flag that maps this event detail item for special consideration in a design time environment -- the value should match the eventGroup
value of the containing Event metadata element. -
FilterCapabilities
-
- Since:
- 9.1.0
Properties:
Name Type Description textFilter
boolean Specifies whether a bound DataProvider must provide a text filtering capability. nestedFilter
boolean Specifies whether a bound DataProvider must provide a nested filtering capability. -
Icon
-
- Since:
- 7.1.0
Properties:
Name Type Argument Description iconPath
string <optional>
A relative path to an icon that represents the default (enabled) state. selectedIconPath
string <optional>
A relative path to the icon that represents the selected state. hoverIconPath
string <optional>
A relative path to the icon that represents the hover state. -
MethodParam
-
- Since:
- 7.1.0
Properties:
Name Type Argument Description description
string <optional>
A translatable high-level description for the parameter. Content should typically consist of one or two sentences. name
string The name of the parameter. status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this parameter. type
string The type of the parameter, typically following Google Closure Compiler syntax. The metadata also supports TypeScript data types. -
MinCapabilities
-
- Since:
- 9.1.0
Properties:
Name Type Argument Description filter
MetadataTypes.FilterCapabilities <optional>
Describes minimum filtering capabilities for a bound DataProvider. -
Paths
-
- Since:
- 7.1.0
Properties:
Name Type Argument Description min
string <optional>
Specifies the location of the optimized form of the artifact. debug
string <optional>
Specifies the location of the debug form of the artifact. -
PreferredParent
-
- Since:
- 15.0.0
Properties:
Name Type Argument Default Description parentInterface
string Specifies the "duck type" or interface contract that this custom element's container will fulfill.
Potential container custom elements advertise their supported interface contracts via theirimplements
metadata.isDirectParent
boolean <optional>
true Specifies whether the preferred custom element container needs to be a direct parent of this custom element (intervening JET Binding elements are permissible).
If set tofalse
, then the preferred container can appear anywhere on the page as an ancestor of this custom element.extension
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this preferredParent
item. -
PropertyBinding
-
- Since:
- 9.0.0
Properties:
Key Used at Runtime Type Argument Description consume
yes
{name: string} <optional>
Allows property to consume a value provided by an ancestor component. The value will be consumed only if the property's attribute has not been set, i.e. the provided value is used as a default. The 'name' property should be set to the name of the variable published by an ancestor component. provide
yes
Array.<MetadataTypes.ProvideProperty> <optional>
Allows property to provide one or more values to be consumed by descendant components. The provided value will come from the literal attribute value, explicit expression binding or an implicit (consumed) binding provided by an ancestor component -
PropertyEditorValue
-
- Since:
- 7.1.0
Properties:
Name Type Argument Description description
string <optional>
A translatable high-level description for the value. Content should typically consist of one or two sentences. displayName
string <optional>
A displayable, translatable label for the value. icon
MetadataTypes.Icon <optional>
One or more optional images for representing the value. -
PropertyLayoutGroup
-
"common"
- an ordered group of properties that are commonly used for configuring this component, so they should be prominently highlighted and the design time environment should provide extra assistance"data"
- an ordered group of properties associated with data binding- Items of type
string
represent the names of component properties or sub-properties. - Items of type
PropertyLayoutGroup
represent a nested layout structure. - Since:
- 7.1.0
Properties:
Name Type Argument Description propertyGroup
string The property group name associated with this propertyLayoutGroup. Reserved values include: displayName
string <optional>
An optional user friendly, translatable name for this propertyLayoutGroup. items
Array<string | MetadataTypes.PropertyLayoutGroup> An ordered array of one or more items in this propertyLayoutGroup: -
ProvideProperty
-
- Since:
- 9.0.0
Properties:
Key Used at Runtime Type Argument Description name
yes
string A name used to publish the property for descendant components default
yes
string | number | boolean | null <optional>
Optional default value for the propagated property. The value will be used when the property has no explicit or implicit (consumed) binding, and no literal attribute value. Note that the transform map will not be applied to this value. transform
yes
Record<string, string | number | boolean | null> <optional>
A transform map that can be used to change the original string value of the property before publishing it for descendant components. Each key represents a possible original value, and the value represents its replacement. If the original value is not found in the transform map, it will be published for descendants without any changes. -
SlotDataVariable
-
- Since:
- 7.1.0
Properties:
Name Type Argument Description description
string <optional>
A translatable high-level description for the slot data variable. Content should typically consist of one or two sentences. status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this slot data variable. type
string The slot data variable type, typically following Google Closure Compiler syntax. The metadata also supports TypeScript data types. -
Status
-
"antiPattern"
- Indicates that using the specified API feature results in application behavior that is an anti-pattern for one or more specified themes."deprecated"
- Indicates that the specified API feature is deprecated, and is subject to removal in a later release."maintenance"
- Applicable at the Component-level only. Indicates that the specified Component is in maintenance mode (still supported, but no new features planned), and that one or more alternatives are available that supersede this Component going forward."supersedes"
- Applicable at the Component-level only. Indicates that the specified Component supersedes one or more Components that are either deprecated or in maintenance mode.- If
type
is set to"deprecated"
andtarget
is set to"propertyType"
, thenvalue
is used to specify the particular types of a property's union type that have been deprecated. Similarly,target
values of"parameterType"
and"returnType"
refer to particular type deprecations for a method parameter's union type and a method return union type, respectively. - If
type
is set to"deprecated"
andtarget
is set to"propertyValue"
, thenvalue
is used to specify the particular enum values of a property that have been deprecated. - If
type
is set to"antiPattern"
andtarget
is set to"propertyValue"
, thenvalue
is used to specify one or more property enum values whose use results in application behavior that is an anti-pattern for one or more themes identified by the correspondingthemes
Status property. - If
type
is set to"maintenance"
, thenvalue
is used to specify the full name of one or more superseding Components. - Similarly, if
type
is set to"supersedes"
, thenvalue
is used to specify the full name of one or more Components that are deprecated or in maintenance mode due to the availability of this superseding alternative. - Since:
- 7.1.0
Properties:
Name Type Argument Description type
"antiPattern" | "deprecated" | "maintenance" | "supersedes" <optional>
The status type. The following types are supported: since
string <optional>
The version (following semantic version rules) when the specified status was first established. Only production version numbers should be used. description
string <optional>
A translatable high-level description for the specified status change. For deprecated API features, this should ideally direct developers to an alternative solution. At the Component-level, the description should be used to provide context for the status change (as needed). Content should typically consist of one or two sentences. target
"propertyType" | "propertyValue" | "parameterType" | "returnType" <optional>
The target of the specified status. Applicable only if the status type is "deprecated"
or"antiPattern"
.
If no target is provided, then the status applies to the current API feature.themes
Array.<("Alta"|"Redwood"|"Stable"|string)> <optional>
The themes associated with the specified status. Available only if the status type is "antiPattern"
.value
Array.<string> <optional>
Array of values associated with the specified status. Its meaning depends upon the combination of type
andtarget
values: -
StyleClass
-
- descendent selector (space)
- child selector (>)
- adjacent sibling selector (+)
- general sibling selector (~)
- If the
styleClasses
item is associated with a component, then the default target element is the HTML custom element corresponding to the component. - If the
styleClasses
item is not associated with a component, then the default target element is any element. - Since:
- 8.0.0
Properties:
Name Type Argument Description name
string The name of the style class. kind
"class" Discriminant that identifies the object instance as a style class. displayName
string <optional>
A user friendly, translatable name of the style class. description
string <optional>
A translatable high-level description for the style class. Content should typically consist of one or two sentences. extension
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata help
string <optional>
Specifies a URL to detailed API documentation for this style class. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.scope
"public" | "protected" <optional>
Specifies the scope of this style class. Supported values are:
Value Description public Identifies the style class as part of the public API. protected Identifies the style class as an implementation mechanism that can be modified in application CSS, but may not be directly applied in an application's HTML markup. If unspecified, the default is "public".
status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this style class. styleSelector
string <optional>
An optional CSS combinator expression that specifies the target element for this style class. The following CSS combinators are supported: If unspecified, then the default behavior depends upon the context:
-
StyleClassItem
-
Discriminated union type for items in the ComponentMetadata.styleClasses array:
{MetadataTypes.StyleClass|MetadataTypes.StyleSet|MetadataTypes.StyleTemplate}
The common
kind
property acts as a discriminant for determining the type of a particular instance.- Since:
- 8.0.0
-
StyleGroup
-
- Deprecated:
-
Since Description 8.0.0
The MetadataTypes.StyleGroup type is deprecated. Use the MetadataTypes.StyleClass, MetadataTypes.StyleSet, and/or MetadataTypes.StyleTemplate types.
- Since:
- 8.0.0
Properties:
Name Type Argument Description styleGroup
Array.<string> <optional>
Array of mutually exclusive style class names that belong to this group. description
string <optional>
A translatable high-level description for this group of styleClasses. Content should typically consist of one or two sentences. -
StyleSet
-
- Since:
- 8.0.0
Properties:
Name Type Argument Description name
string The identifier for the style set. kind
"set" Discriminant that identifies the object instance as a style set. displayName
string <optional>
A user friendly, translatable name of the style set. description
string <optional>
A translatable high-level description for the style set. Content should typically consist of one or two sentences. extension
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata help
string <optional>
Specifies a URL to detailed API documentation for this style set. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.scope
"public" | "protected" <optional>
Specifies the scope of this style set. Supported values are:
Value Description public Identifies the style set as part of the public API. protected Identifies the style set as an implementation mechanism that can be modified in application CSS, but may not be directly applied in an application's HTML markup. If unspecified, the default is "public".
status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this style set. styleRelation
"exclusive" | "inclusive" Specifies whether the style classes that make up this style set are mutually exclusive. styleItems
Array<(MetadataTypes.StyleClass | MetadataTypes.StyleSet | MetadataTypes.StyleTemplate)> An array of items that belong to this style set. -
StyleTemplate
-
- descendent selector (space)
- child selector ($gt)
- adjacent sibling selector (+)
- general sibling selector (~)
- If the
styleClasses
item is associated with a component, then the default target element is the HTML custom element corresponding to the component. - If the
styleClasses
item is not associated with a component, then the default target element is any element. - Since:
- 8.0.0
Properties:
Name Type Argument Description name
string A series of style classes expressed as a tokenized name string. kind
"template" Discriminant that identifies the object instance as a style template. displayName
string <optional>
A user friendly, translatable name of the style template. description
string <optional>
A translatable high-level description for the style template. Content should typically consist of one or two sentences. extension
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata help
string <optional>
Specifies a URL to detailed API documentation for this style template. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.scope
"public" | "protected" <optional>
Specifies the scope of this style template. Supported values are:
Value Description public Identifies the style template as part of the public API. protected Identifies the style template as an implementation mechanism that can be modified in application CSS, but may not be directly applied in an application's HTML markup. If unspecified, the default is "public".
status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this style template. styleSelector
string <optional>
An optional CSS combinator expression that specifies the target element for this style template. The following CSS combinators are supported: If unspecified, then the default behavior depends upon the context:
tokens
Array.<(MetadataTypes.StyleTemplateToken)> An ordered set of substitution tokens used in this style template. -
StyleTemplateToken
-
- Since:
- 8.0.0
Properties:
Name Type Argument Description name
string The name of the substitution token. displayName
string <optional>
A user friendly, translatable name of the substitution token. description
string <optional>
A translatable high-level description for the substitution token. Content should typically consist of one or two sentences. styleRelation
"exclusive" | "inclusive" Specifies whether the style classes that result from the substitution of this token are mutually exclusive. values
Array.<(MetadataTypes.StyleTemplateTokenValue)> An ordered set of substitution token values. -
StyleTemplateTokenValue
-
- Since:
- 8.0.0
Properties:
Name Type Argument Description name
string The substitution token value. displayName
string <optional>
A user friendly, translatable name of the substitution token value. description
string <optional>
A translatable high-level description for the substitution token value. Content should typically consist of one or two sentences. status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this substitution token value. -
StyleVariable
-
- Since:
- 11.0.0
Properties:
Name Type Argument Description name
string The name of the CSS variable. displayName
string <optional>
A user friendly, translatable name of the CSS variable. description
string <optional>
A translatable high-level description for the CSS variable. Content should typically consist of one or two sentences. extension
object <optional>
Placeholder for Extension metadata. Each section is identified by a key that specifies the downstream tool that will process this metadata. For example:
Name Type Description vbdt
{Object} Identifies an object with Visual Builder design time metadata formats
Array.<("color"|"length"|"number"|"percentage"|"rgb_values"|"time")> <optional>
Array of format hints that can be used for simple validation in the design time environment, or to invoke a specialized customizer control or set of controls. The following set of reserved format keywords are supported:
Value Description color Specifies a CSS color value, or an expression that yields a CSS color value. length Specifies a CSS length value, or an expression that yields a CSS length value. number Specifies a CSS number value, or an expression that yields a CSS number value. percentage Specifies a CSS percentage value, or an expression that yields a CSS percentage value. rgb_values Specifies a color using an RGB number sequence, typically used for CSS color palette variables. time Specifies a CSS time value, or an expression that yields a CSS time value. help
string <optional>
Specifies a URL to detailed API documentation for this CSS variable. The value can be either an absolute URL, or a link to an anchor position relative to the page specified by the Component-level help
value.keywords
Array.<string> <optional>
An array of keywords that can be specified as a value for this variable. Useful for simple validation in the design time environment, or to populate a specialized customizer control. Note that CSS-wide keywords like initial
,inherit
, andunset
are assumed for all CSS variables.status
Array.<MetadataTypes.Status> <optional>
Optional array of status objects that are applicable to this CSS variable.