DataSourceProxy

A data source represents a set of related data collections on a document. Typically one data source
is produced for each data import.

Extends


Constructors

new DataSourceProxy()

new DataSourceProxy(id, client): DataSourceProxy

Parameters

ParameterTypeDescription
idstringID of the dataSource on the current document
clientEditorClient

Returns

DataSourceProxy

Overrides

PropertyStoreProxy.constructor


Properties

client

protected readonly client: EditorClient;

Inherited from

PropertyStoreProxy.client


collections

readonly collections: MapProxy<string, CollectionProxy>;

The set of data collections in this data source, organized by ID on this document. The IDs will
remain stable for as long as the collection exists on this document, but will vary from
the collection ID on other documents if the same data is imported there.


id

readonly id: string;

ID of the dataSource on the current document

Inherited from

PropertyStoreProxy.id


properties

readonly properties: WriteableMapProxy<string, JsonSerializable, void, JsonSerializable>;

All properties available on this element, organized by name.
Not all properties are writeable (e.g. "ClassName" on a block).
To move or resize elements, use setLocation() or setBoundingBox() or offset() instead.

Inherited from

PropertyStoreProxy.properties


Methods

addCollection()

addCollection(name, schema): CollectionProxy

Create a new collection as part of this data source.

Parameters

ParameterTypeDescription
namestring
schemaSchemaDefinition

Returns

CollectionProxy

The newly created collection


getName()

getName(): string

Returns

string

A human-readable name for this data source


getSourceConfig()

getSourceConfig(): object

Returns

object

The source configuration values set when this data source was created