ISerializedWebPartData interface

This structure represents the part of the serialized state of a web part which is controlled by the web part. It is extended by IWebPartData which contains additional data added by the framework to the serialized data.

Properties

dataVersion

Web part data version.

dynamicDataPaths

Paths for the dynamic data. This is used to reconstruct the dynamic data objects when deserializing the web part.

dynamicDataValues

Static values for the dynamic data. This is used to reconstruct the dynamic data objects when deserializing the web part.

properties

Web part specific properties. The individual web part owns the definition of these properties.

serverProcessedContent

The collections of data that can be processed by server side services like search index and link fixup.

Property Details

dataVersion

Web part data version.

dataVersion: Version;

Property Value

Remarks

Note that data version is different from the version field in the manifest. The manifest version is used to control the versioning of the web part code, while data version is used to control the versioning of the serialized data of the web part. Refer to dataVersion field of your web part for more information.

Supported values: MAJOR.MINOR

Example: "1.0"

dynamicDataPaths

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Paths for the dynamic data. This is used to reconstruct the dynamic data objects when deserializing the web part.

dynamicDataPaths?: {
        [path: string]: string;
    };

Property Value

{ [path: string]: string; }

Remarks

The key is the path within the web part properties, and the value is the dynamic data internal id.

Example:

{
  'pageContextUser':
    'PageContext:user',
  'anotherWebPartProperty':
    'WebPart.c3be45f2-7cd9-4e92-9c6c-a01d24dc04cf.3d6307e4-c8e1-4b2d-bef9-f1689c6eb7ea:aProperty'
}

dynamicDataValues

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Static values for the dynamic data. This is used to reconstruct the dynamic data objects when deserializing the web part.

dynamicDataValues?: {
        [path: string]: any;
    };

Property Value

{ [path: string]: any; }

Remarks

The key is the path within the web part properties, and the value is the dynamic data static value.

Example:

{
  'aStringProperty': 'thisIsAString',
  'aBooleanProperty': true
}

properties

Web part specific properties. The individual web part owns the definition of these properties.

properties?: any;

Property Value

any

Remarks

Used by the web part to manage its internal metadata and config data. The framework code never touches these properties.

Supported values: any JSON stringifiable object hierarchy.

Example: { 'value': 'text value' }

serverProcessedContent

The collections of data that can be processed by server side services like search index and link fixup.

serverProcessedContent?: ISerializedServerProcessedData;

Property Value