NAV

Editor Extension SDK Reference

The Editor Extension SDK is a TypeScript library that provides access to Lucid's core application for editor extensions built using the Extension API.

Classes

BaseFieldTypeArray<Type>

core/data/fieldtypedefinition/fieldtypearray.BaseFieldTypeArray

Type parameters

Name
Type

Hierarchy

Constructors

constructor

new BaseFieldTypeArray<Type>(validTypesArray)

Type parameters
Name
Type
Parameters
Name Type
validTypesArray Type[]

Properties

validTypesArray

Readonly validTypesArray: Type[]

Methods

getInnerNonArrayTypes

getInnerNonArrayTypes(): Exclude<Type, BaseFieldTypeArray <Type>>[]

Returns

Exclude<Type, BaseFieldTypeArray <Type>>[]


getInnerTypes

getInnerTypes(): Type[]

Returns

Type[]


serializeType

Protected Abstract serializeType(t): SerializedFieldTypeArraySubTypes

Parameters
Name Type
t Type
Returns

SerializedFieldTypeArraySubTypes


toJSON

toJSON(): SerializedFieldTypeArray

Returns

SerializedFieldTypeArray


BlockProxy

document/blockproxy.BlockProxy

A block is a single shape on the document. A BlockProxy provides an interface to read and write the content of an existing block, and is typically accessed through PageProxy.blocks or another similar mechanism.

Hierarchy

Constructors

constructor

new BlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

ItemProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

ItemProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

ItemProxy.client


id

Readonly id: string

Inherited from

ItemProxy.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

ItemProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

ItemProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

ItemProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

ItemProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

ItemProxy.textStyles

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

ItemProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

ItemProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

ItemProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

ItemProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

ItemProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

ItemProxy.getBoundingBox


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

ItemProxy.getContainers


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

ItemProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

ItemProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

ItemProxy.getPageId


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

ItemProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

ItemProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

ItemProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

ItemProxy.setBoundingBox


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

ItemProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

ItemProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

ItemProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void


CardBlockProxy

document/blockclasses/cardblockproxy.CardBlockProxy

A generic lucid card block. This shape has all of the base functionality as a BlockProxy, as well as additional card specific properties.

Hierarchy

Constructors

constructor

new CardBlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

BlockProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

BlockProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

BlockProxy.client


id

Readonly id: string

Inherited from

BlockProxy.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

BlockProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

BlockProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

BlockProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textStyles


classNameRegex

Static classNameRegex: RegExp

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

BlockProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

BlockProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

BlockProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

BlockProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

BlockProxy.exists


getAssignee

getAssignee(): string

Returns

string


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

BlockProxy.getBoundingBox


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..

Inherited from

BlockProxy.getClassName


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.

Inherited from

BlockProxy.getConnectedLines


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

BlockProxy.getContainers


getDescription

getDescription(): string

Returns

string


getEndTime

getEndTime(): SerializedIsoDateObject

Returns

SerializedIsoDateObject


getEstimate

getEstimate(): number

Returns

number


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.

Inherited from

BlockProxy.getLineWidth


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

BlockProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

BlockProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

BlockProxy.getPageId


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have

Inherited from

BlockProxy.getRotatedBoundingBox


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.

Inherited from

BlockProxy.getRotation


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set

Inherited from

BlockProxy.getShadow


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.

Inherited from

BlockProxy.getSimpleStaticDataGraphic


getStartTime

getStartTime(): SerializedIsoDateObject

Returns

SerializedIsoDateObject


getStatus

getStatus(): StatusValues

Returns

StatusValues


getTitle

getTitle(): string

Returns

string


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void

Inherited from

BlockProxy.linkText


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void

Inherited from

BlockProxy.lockAspectRatio


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

BlockProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

BlockProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

BlockProxy.removeReferenceKey


setAssignee

setAssignee(assignee): void

Parameters
Name Type Description
assignee string The assignee that you want to set for this card.
Returns

void


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

BlockProxy.setBoundingBox


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void

Inherited from

BlockProxy.setDataSyncStateIconPosition


setDescription

setDescription(description): void

Parameters
Name Type Description
description string The description that you want to set for this card.
Returns

void


setEndTime

setEndTime(endTime): void

Parameters
Name Type Description
endTime SerializedIsoDateObject The end time that you want to set for this card.
Returns

void


setEstimate

setEstimate(estimate): void

Parameters
Name Type Description
estimate number The estimate that you want to set for this card.
Returns

void


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void

Inherited from

BlockProxy.setFillStyle


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void

Inherited from

BlockProxy.setLineWidth


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

BlockProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

BlockProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void

Inherited from

BlockProxy.setRotation


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void

Inherited from

BlockProxy.setShadow


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void

Inherited from

BlockProxy.setSimpleStaticDataGraphic


setStartTime

setStartTime(startTime): void

Parameters
Name Type Description
startTime SerializedIsoDateObject The start time that you want to set for this card.
Returns

void


setStatus

setStatus(status): void

Parameters
Name Type Description
status StatusValues The status that you want to set for this card.
Returns

void


setTitle

setTitle(title): void

Parameters
Name Type Description
title string The title that you want to set for this card.
Returns

void


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

BlockProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void

Inherited from

BlockProxy.unlockAspectRatio


CardConfigProxy

document/documentelement/cardconfigproxy.CardConfigProxy

Base class for anything on a Lucid document that has an ID and properties.

Hierarchy

Constructors

constructor

new CardConfigProxy(id, client)

Parameters
Name Type Description
id string The ID of this card config element
client EditorClient
Overrides

DocumentElementProxy.constructor

Properties

client

Protected Readonly client: EditorClient

Inherited from

DocumentElementProxy.client


id

Readonly id: string

Inherited from

DocumentElementProxy.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

DocumentElementProxy.properties


CollectionEnumFieldType

core/data/fieldtypedefinition/collectionenumfieldtype.CollectionEnumFieldType

Constructors

constructor

new CollectionEnumFieldType(collectionId)

Parameters
Name Type
collectionId string

Properties

collectionId

Readonly collectionId: string


PRIMARY_KEY

Static Readonly PRIMARY_KEY: Id = CollectionEnumFieldNames.Id

Specifies which groovy field name is used as the primary key.

This should be kept in sync with GroovyFieldNames in FieldType.scala

Methods

toJSON

toJSON(): SerializedCollectionEnumFieldType

Returns

SerializedCollectionEnumFieldType


CollectionProxy

data/collectionproxy.CollectionProxy

A collection is a set of data items, each with the same set of fields (though some data items may not have all fields defined).

Hierarchy

Constructors

constructor

new CollectionProxy(id, client)

Parameters
Name Type Description
id string ID of this collection on the current document
client EditorClient
Overrides

PropertyStoreProxy.constructor

Properties

client

Protected Readonly client: EditorClient

Inherited from

PropertyStoreProxy.client


id

Readonly id: string

Inherited from

PropertyStoreProxy.id


items

Readonly items: MapProxy <string, DataItemProxy >

The data items in this collection, organized by their primary key. The primary key is usually calculated from the content of the data item, but may differ from the expected value in some circumstances, e.g. if there are two data items that would have the same primary key.


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

getBranchedFrom

getBranchedFrom(): undefined | CollectionProxy

Some data collections may have local branches on the document, to store the set of changes that have been made by the user since the time the data was last refreshed from its source. For those collections, you can use this method to get the original data collection as it was last imported or refreshed.

Returns

undefined | CollectionProxy

the original collection from which this collection was branched, or undefined if this collection is not a branch


getFields

getFields(): string[]

Returns

string[]

an array of field names that are accessible on the items in this collection


getLocalChanges

getLocalChanges(): undefined | PatchCollectionProxy

Returns

undefined | PatchCollectionProxy

information about any changes made locally to the collection that have not been synchronized with the external data source.


getName

getName(): string

Returns

string

a human-readable name for this collection


getSchema

getSchema(): SchemaDefinition

Returns

SchemaDefinition


getSyncCollectionId

getSyncCollectionId(): undefined | string

Returns

undefined | string


patchItems

patchItems(patch): PatchDataItemsResult

Parameters
Name Type
patch Object
patch.added? Record<string, SerializedFieldType >[]
patch.changed? Map<string, Record<string, SerializedFieldType >>
patch.deleted? string[]
Returns

PatchDataItemsResult


ColorLegendEntryProxy

document/blockclasses/legendblockproxy.ColorLegendEntryProxy

Hierarchy

Constructors

constructor

new ColorLegendEntryProxy(legend, index)

Parameters
Name Type
legend LegendBlockProxy
index number
Overrides

LegendEntryProxy.constructor

Properties

index

Readonly index: number

Inherited from

LegendEntryProxy.index


legend

Protected Readonly legend: LegendBlockProxy

Inherited from

LegendEntryProxy.legend


type

Readonly type: LegendItemType

Inherited from

LegendEntryProxy.type

Methods

getColor

getColor(): string

Returns

string


getText

getText(): string

Returns

string

Inherited from

LegendEntryProxy.getText


setText

setText(text): void

Parameters
Name Type
text string
Returns

void

Inherited from

LegendEntryProxy.setText


CustomBlockProxy

document/blockclasses/customblockproxy.CustomBlockProxy

Custom shapes defined in extension packages (or other stencil-providing means like Visio stencil imports) are represented by a CustomBlockProxy.

Hierarchy

Constructors

constructor

new CustomBlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

BlockProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

BlockProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

BlockProxy.client


id

Readonly id: string

Inherited from

BlockProxy.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

BlockProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

BlockProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

BlockProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textStyles


classNameRegex

Static classNameRegex: RegExp

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

BlockProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

BlockProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

BlockProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

BlockProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

BlockProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

BlockProxy.getBoundingBox


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..

Inherited from

BlockProxy.getClassName


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.

Inherited from

BlockProxy.getConnectedLines


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

BlockProxy.getContainers


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.

Inherited from

BlockProxy.getLineWidth


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

BlockProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

BlockProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

BlockProxy.getPageId


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have

Inherited from

BlockProxy.getRotatedBoundingBox


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.

Inherited from

BlockProxy.getRotation


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set

Inherited from

BlockProxy.getShadow


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.

Inherited from

BlockProxy.getSimpleStaticDataGraphic


getStencilTextAreaName

getStencilTextAreaName(stencilTextAreaName): undefined | string

Parameters
Name Type
stencilTextAreaName string
Returns

undefined | string


isFromStencil

isFromStencil(library, shape): boolean

Parameters
Name Type
library string
shape string
Returns

boolean


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void

Inherited from

BlockProxy.linkText


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void

Inherited from

BlockProxy.lockAspectRatio


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

BlockProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

BlockProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

BlockProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

BlockProxy.setBoundingBox


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void

Inherited from

BlockProxy.setDataSyncStateIconPosition


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void

Inherited from

BlockProxy.setFillStyle


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void

Inherited from

BlockProxy.setLineWidth


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

BlockProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

BlockProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void

Inherited from

BlockProxy.setRotation


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void

Inherited from

BlockProxy.setShadow


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void

Inherited from

BlockProxy.setSimpleStaticDataGraphic


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

BlockProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void

Inherited from

BlockProxy.unlockAspectRatio


registerCustomBlockClass

Static registerCustomBlockClass(klass): void

Parameters
Name Type
klass CustomBlockProxyConstructor
Returns

void


DataConnector

dataconnector/dataconnector.DataConnector

Factory class to define a bunch of action handlers.

Constructors

constructor

new DataConnector(client)

Parameters
Name Type
client DataConnectorClient

Properties

actions

actions: Record<string, { actionResponder: ActionRequest< DataConnectorAsynchronousAction , unknown> ; asynchronous: true } | { actionResponder: ActionRequest< DataConnectorAction , unknown> ; asynchronous: false }> = {}


routes

routes: Record<string, DataConnectorRoute > = {}

Methods

defineAction

defineAction<T>(name, request, asynchronous?): DataConnector

Factory to define an action request handler

Type parameters
Name Type
T extends string
Parameters
Name Type Default value
name T undefined
request ActionTypeForName<T, boolean> undefined
asynchronous boolean false
Returns

DataConnector


defineAsynchronousAction

defineAsynchronousAction<T>(name, request): DataConnector

Factory to define an asynchronous action request handler

Type parameters
Name Type
T extends string
Parameters
Name Type
name T
request ActionTypeForName<T, true>
Returns

DataConnector


defineRoute

defineRoute(name, request): DataConnector

Factory to define a route handler

Parameters
Name Type
name string
request DataConnectorRoute
Returns

DataConnector


routeDebugServer

routeDebugServer(options): ExpressAppLike

Add a route to the given express app (or generate a new app) to serve this data connector

Parameters
Name Type
options RunDebugServerOptions
Returns

ExpressAppLike


runAction

runAction(url, headers, body): Promise<{ body: unknown ; status: number }>

Call a defined action handler and gather its serialized response

Parameters
Name Type
url string
headers Record<string, undefined | string | string[]>
body unknown
Returns

Promise<{ body: unknown ; status: number }>


runDebugServer

runDebugServer(options): void

Serve this data connector as a simple express app for debugging purposes

Parameters
Name Type
options RunDebugServerOptions
Returns

void


DataConnectorAction

dataconnector/actions/action.DataConnectorAction

Base class for actions to be performed by data connectors

Hierarchy

Constructors

constructor

new DataConnectorAction(name, context)

Parameters
Name Type
name string
context DataConnectorActionContext

Properties

context

context: DataConnectorActionContext


name

name: string


DataConnectorActionContext

dataconnector/actions/action.DataConnectorActionContext

This holds all the contextual information about a give data action.

Constructors

constructor

new DataConnectorActionContext(packageId, packageVersion, userCredential, dataConnectorName, installationId, documentCollections, updateFilterType)

Parameters
Name Type Description
packageId string The package ID of the extension that triggered this action
packageVersion string The version of the extension that triggered this action
userCredential string The authorized OAuth2 credential that Lucid has for the 3rd party this extension works with
dataConnectorName string The data connector name from manifest.json that triggered this action
installationId undefined | string The installation id of the extension/user that triggered this action
documentCollections Object Set of items this document is tracking as a Record<CollectionId, ItemPrimaryKey[]>
updateFilterType DataUpdateFilterType Update filter type for this document

Properties

dataConnectorName

dataConnectorName: string

The data connector name from manifest.json that triggered this action


documentCollections

documentCollections: Object

Set of items this document is tracking as a Record<CollectionId, ItemPrimaryKey[]>

Index signature

▪ [collectionId: CollectionId ]: ItemPrimaryKey []


installationId

installationId: undefined | string

The installation id of the extension/user that triggered this action


packageId

Readonly packageId: string

The package ID of the extension that triggered this action


packageVersion

packageVersion: string

The version of the extension that triggered this action


updateFilterType

updateFilterType: DataUpdateFilterType

Update filter type for this document


userCredential

userCredential: string

The authorized OAuth2 credential that Lucid has for the 3rd party this extension works with


DataConnectorAsynchronousAction

dataconnector/actions/action.DataConnectorAsynchronousAction

A generic "asynchronous" action to be performed by the data connector. This is an action that reports back to Lucid by calling back in the DataSourceClient rather than returning a meaningful value.

Hierarchy

Constructors

constructor

new DataConnectorAsynchronousAction(name, context, client, data)

Parameters
Name Type
name string
context DataConnectorActionContext
client DataSourceClient
data unknown
Overrides

DataConnectorAction.constructor

Properties

client

client: DataSourceClient


context

context: DataConnectorActionContext

Inherited from

DataConnectorAction.context


data

data: unknown


name

name: string

Inherited from

DataConnectorAction.name


DataConnectorClient

dataconnector/dataconnectorclient.DataConnectorClient

Client for requests to and from Lucid

Hierarchy

Constructors

constructor

new DataConnectorClient(cryptoDependencies, urls?, fetchMethod?)

Parameters
Name Type Default value
cryptoDependencies CryptoDependencies undefined
urls Object LUCID_URLS
urls.api string undefined
urls.main string undefined
fetchMethod GlobalFetchType globalFetch

Properties

urls

urls: Object = LUCID_URLS

Type declaration
Name Type
api string
main string

Methods

getDataSourceClient

getDataSourceClient(updateToken): DataSourceClient

Get a client for DataSource related requests to Lucid

Parameters
Name Type
updateToken string
Returns

DataSourceClient


getPublicKey

getPublicKey(): Promise<string>

Get Lucid's public key to verify requests came from Lucid if you don't want to use the SignatureValidator. Maybe you're not running in a NodeJS environment

Returns

Promise<string>


getSignatureValidator

getSignatureValidator(): Promise< SignatureValidator >

Get a validator to prove a given request came from Lucid

Returns

Promise< SignatureValidator >


parseActions

parseActions(url, headers, actions): Promise<undefined | DataConnectorAction []>

Validate and parse an action request from Lucid

Parameters
Name Type
url string
headers Record<string, unknown>
actions unknown
Returns

Promise<undefined | DataConnectorAction []>


DataConnectorManageWebhookAction

dataconnector/actions/action.DataConnectorManageWebhookAction

A "synchronous" style action indicating that Lucid would like to setup a webhook in the third party.

Hierarchy

Constructors

constructor

new DataConnectorManageWebhookAction(context, webhookToken, webhooks)

Parameters
Name Type Description
context DataConnectorActionContext -
webhookToken string Token to be added to the newly created webhook so that when it fires it will have permissions to make changes to Lucid documents.
webhooks Webhook [] A list of existing webhooks so you can be more granular about what you track. You may also find it useful to delete some of the existing webhooks. The response back to Lucid should include all existing webhooks (newly created or any of these that were not deleted).
Overrides

DataConnectorAction.constructor

Properties

context

context: DataConnectorActionContext

Inherited from

DataConnectorAction.context


name

name: string

Inherited from

DataConnectorAction.name


webhookToken

webhookToken: string

Token to be added to the newly created webhook so that when it fires it will have permissions to make changes to Lucid documents.


webhooks

webhooks: Webhook []

A list of existing webhooks so you can be more granular about what you track. You may also find it useful to delete some of the existing webhooks. The response back to Lucid should include all existing webhooks (newly created or any of these that were not deleted).


DataConnectorPatchAction

dataconnector/actions/action.DataConnectorPatchAction

A patch action is a kind of synchronous style action. It occurs when data is changed in the Lucid editor. All the changes are collected in the patches field.

Hierarchy

Constructors

constructor

new DataConnectorPatchAction(context, patches, client, name?)

Parameters
Name Type Default value Description
context DataConnectorActionContext undefined -
patches Patch [] undefined changes applied by Lucid
client DataSourceClient undefined -
name string DataConnectorActionKeys.Patch -
Overrides

DataConnectorAction.constructor

Properties

client

client: DataSourceClient


context

context: DataConnectorActionContext

Inherited from

DataConnectorAction.context


name

name: string

Inherited from

DataConnectorAction.name


patches

patches: Patch []

changes applied by Lucid


DataConnectorRequestError

dataconnector/dataconnector.DataConnectorRequestError

Thrown by any failable http APIs

Hierarchy

  • Error

    DataConnectorRequestError

Constructors

constructor

new DataConnectorRequestError(status, message, response, statusText?)

Parameters
Name Type
status number
message string
response string
statusText? string
Overrides

Error.constructor

Properties

message

message: string

Inherited from

Error.message


name

name: string

Inherited from

Error.name


response

response: string


stack

Optional stack: string

Inherited from

Error.stack


status

status: number


statusText

Optional statusText: string

Methods

toString

toString(): string

Returns

string


DataConnectorRequestState

dataconnector/dataconnector.DataConnectorRequestState

Constructors

constructor

new DataConnectorRequestState(itemRekeyer)

Parameters
Name Type
itemRekeyer ItemRekeyer

Properties

itemRekeyer

itemRekeyer: ItemRekeyer


DataConnectorResponseError

dataconnector/dataconnector.DataConnectorResponseError

Thrown by any APIs the client didn't recognize when parsing

Hierarchy

  • Error

    DataConnectorResponseError

Constructors

constructor

new DataConnectorResponseError(message, response)

Parameters
Name Type
message string
response string
Overrides

Error.constructor

Properties

message

message: string

Inherited from

Error.message


name

name: string

Inherited from

Error.name


response

response: string


stack

Optional stack: string

Inherited from

Error.stack


DataConnectorRunError

dataconnector/dataconnector.DataConnectorRunError

Throw this from an action request handler to produce a non-200 response code and not have to return the expected result type

Hierarchy

  • Error

    DataConnectorRunError

Constructors

constructor

new DataConnectorRunError(status, body, message?)

Parameters
Name Type
status number
body unknown
message? string
Overrides

Error.constructor

Properties

body

body: unknown


message

message: string

Inherited from

Error.message


name

name: string

Inherited from

Error.name


stack

Optional stack: string

Inherited from

Error.stack


status

status: number

Methods

withMessage

Static withMessage(status, message): DataConnectorRunError

Parameters
Name Type
status number
message string
Returns

DataConnectorRunError


DataConnectorSynchronousAction

dataconnector/actions/action.DataConnectorSynchronousAction

A generic "synchronous" action to be performed by the data connector.

Hierarchy

Constructors

constructor

new DataConnectorSynchronousAction(name, context, data)

Parameters
Name Type
name string
context DataConnectorActionContext
data unknown
Overrides

DataConnectorAction.constructor

Properties

context

context: DataConnectorActionContext

Inherited from

DataConnectorAction.context


data

data: unknown


name

name: string

Inherited from

DataConnectorAction.name


DataError

data/dataerror.DataError

The requested data or formula result couldn't be calculated.

Constructors

constructor

new DataError(error, type)

Parameters
Name Type Description
error string A human-readable description of the reason why the error occurred
type DataErrorType The kind of error that occurred

Properties

error

Readonly error: string


type

Readonly type: DataErrorType


DataItemProxy

data/dataitemproxy.DataItemProxy

One data item in a collection, consisting of key-value pairs

Hierarchy

Constructors

constructor

new DataItemProxy(primaryKey, collection, client)

Parameters
Name Type Description
primaryKey string The current primary key of the data item. This may change if the fields on the data item change, rendering this proxy inoperable.
collection CollectionProxy The collection that contains this data item.
client EditorClient

Properties

collection

Readonly collection: CollectionProxy


fields

Readonly fields: MapProxy <string, SerializedFieldType >

The fields on this data item, organized by their name.


primaryKey

Readonly primaryKey: string

Methods

exists

exists(): boolean

Returns

boolean

True if a data item exists in this collection at this primary key


DataProxy

data/dataproxy.DataProxy

The DataProxy class gives access to the tabular and graph data on the current Lucid document.

Data collections are organized into data sources. One data sources is typically produced for each data import, and may contain multiple collections.

Constructors

constructor

new DataProxy(client)

Parameters
Name Type
client EditorClient

Properties

dataSources

Readonly dataSources: MapProxy <string, DataSourceProxy >

Data sources on the current document, organized by their ID on this document. The ID will remain stable for as long as the data source exists on this document, but will vary from the data source ID on other documents if the same data is imported there.

Methods

addDataSource

addDataSource(name, sourceConfig): DataSourceProxy

Creates a new empty data source, which you can then add collections of data to.

Parameters
Name Type Description
name string Human-readable name of the new data source
sourceConfig Object Any configuration values that might be useful to reference later, such as the upstream origin of this data source
Returns

DataSourceProxy

the newly created data source


DataSourceClient

dataconnector/datasourceclient.DataSourceClient

Authenticated client for DataSource related requests to Lucid.

Hierarchy

Constructors

constructor

new DataSourceClient(urls, updateToken, fetchMethod?)

Parameters
Name Type Default value
urls Object undefined
urls.api string undefined
urls.main string undefined
updateToken string undefined
fetchMethod GlobalFetchType globalFetch

Methods

update

update(request): Promise<void>

Create or update a datasource. If you create a new collection it must be fully specified in terms of schema and and items. If it's just an update then the schema can be omitted (if unchanged) and items that already exist can be partial.

Parameters
Name Type
request DataSourceRequest
Returns

Promise<void>


DataSourceProxy

data/datasourceproxy.DataSourceProxy

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

Hierarchy

Constructors

constructor

new DataSourceProxy(id, client)

Parameters
Name Type Description
id string ID of the dataSource on the current document
client EditorClient
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

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
Name Type
name string
schema SchemaDefinition
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


DocumentElementProxy

document/documentelement/documentelementproxy.DocumentElementProxy

Base class for anything on a Lucid document that has an ID and properties.

Hierarchy

Constructors

constructor

new DocumentElementProxy(id, client)

Parameters
Name Type Description
id string The ID of this document element
client EditorClient
Overrides

PropertyStoreProxy.constructor

Properties

client

Protected Readonly client: EditorClient

Inherited from

PropertyStoreProxy.client


id

Readonly id: string

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


DocumentProxy

document/documentproxy.DocumentProxy

The currently-open Lucid document

Hierarchy

Constructors

constructor

new DocumentProxy(client)

Parameters
Name Type
client EditorClient
Overrides

ElementProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

ElementProxy.allShapeData


cardIntegrationConfigs

Readonly cardIntegrationConfigs: MapProxy <string, CardConfigProxy >


client

Protected Readonly client: EditorClient

Inherited from

ElementProxy.client


id

Readonly id: string

Inherited from

ElementProxy.id


pages

Readonly pages: MapProxy <string, PageProxy >

The set of pages on this document, organized by 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

ElementProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

ElementProxy.referenceKeys


rules

Readonly rules: MapProxy <string, RuleProxy >


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

ElementProxy.shapeData

Methods

addPage

addPage(def): PageProxy

Add a new page to the current document

Parameters
Name Type Description
def PageDefinition Definition of the page to add
Returns

PageProxy

The created page


addRule

addRule(definition): undefined | RuleProxy

Parameters
Name Type
definition RuleDefinition
Returns

undefined | RuleProxy


allBlocks

allBlocks(): Generator< BlockProxy , void, unknown>

An iterator over all blocks on all pages of the document

Returns

Generator< BlockProxy , void, unknown>


allLines

allLines(): Generator< LineProxy , void, unknown>

An iterator over all lines on all pages of the document

Returns

Generator< LineProxy , void, unknown>


duplicateItems

duplicateItems(ids): DuplicateItemsResult

Parameters
Name Type
ids string[]
Returns

DuplicateItemsResult


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

ElementProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

ElementProxy.exists


getTitle

getTitle(): string

Returns

string

The title of this document


hookAllChanges

hookAllChanges(callback): string

Infrequently, you may need to watch for any changes to the document. These changes may be the local user adding content, or a data integration sending updated records to a data collection, or a remote user hitting undo, or any user entering or exiting an intra-document mutex.

Because these changes may happen rapidly, the callback you provide here will only be called on a heavily-debounced schedule. The callback will happen between 1-10 seconds after changes are made to the document, depending on the frequency with which changes are happening.

Parameters
Name Type
callback () => void
Returns

string

A handle that can be passed into unhookAllChanges


hookCreateItems

hookCreateItems(callback): string

Watch for new blocks, lines, or groups added to this document. The callback will be called with new items created by the current user, but will not be called with items created

  • As part of a generated diagram, e.g. org chart
  • By another user on the same document
Parameters
Name Type
callback (items: ItemProxy []) => void
Returns

string

A handle that can be passed to unhookCreateItems


hookDeleteItems

hookDeleteItems(callback): string

Watch for new blocks, lines, or groups deleted from this document. The callback will be called with items deleted by the current user, but will not be called with items deleted

  • As part of a generated diagram, e.g. org chart
  • By another user on the same document
Parameters
Name Type
callback (itemIds: string[]) => void
Returns

string

A handle that can be passed to unhookDeleteItems


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

ElementProxy.removeReferenceKey


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

ElementProxy.setReferenceKey


setTitle

setTitle(title): void

Updates the title of this document

Parameters
Name Type Description
title string The new title for this document
Returns

void


unhookAllChanges

unhookAllChanges(handle): void

Parameters
Name Type Description
handle string Return value from hookAllChanges
Returns

void


unhookCreateItems

unhookCreateItems(handle): void

Parameters
Name Type Description
handle string Return value from hookCreateItems
Returns

void


unhookDeleteItems

unhookDeleteItems(handle): void

Parameters
Name Type Description
handle string Return value from hookDeleteItems
Returns

void


EditorClient

editorclient.EditorClient

Constructors

constructor

new EditorClient()

Methods

actionExists

actionExists(name): boolean

Parameters
Name Type Description
name string name of the action to check
Returns

boolean

true if a callback has been registered for this action; false otherwise


alert

alert(text, title?, buttonText?): AlertResult

Display an alert modal to the user

Parameters
Name Type Description
text string Body text to display in the alert modal
title? string Title of the alert modal; defaults to the extension title specified in manifest.json
buttonText? string Text for the OK button; defaults to "OK" (or a translation)
Returns

AlertResult

a Promise that resolves true if the user clicks OK, false if they otherwise dismiss the modal


asyncOAuthXhr

asyncOAuthXhr(providerName, request): Promise< TextXHRResponse >

Make an asyncronous OAuth network request. The request is enqueued to eventually execute. The request may be attempted multiple times with an overall timeout of 120 seconds.

Parameters
Name Type Description
providerName string Name of the OAuth provider
request OAuthXHRRequest & { responseFormat: "utf8" } Settings for the request
Returns

Promise< TextXHRResponse >

A promise that will either resolve or reject with an XHRResponse. If the HTTP status code is not 2xx, the promise will reject.

asyncOAuthXhr(providerName, request): Promise< BinaryXHRResponse >

Parameters
Name Type
providerName string
request OAuthXHRRequest & { responseFormat: "binary" }
Returns

Promise< BinaryXHRResponse >

asyncOAuthXhr(providerName, request): Promise< XHRResponse >

Parameters
Name Type
providerName string
request OAuthXHRRequest
Returns

Promise< XHRResponse >


awaitDataImport

awaitDataImport(dataConnectorName, syncDataSourceId, syncCollectionId, primaryKeys, timeout?): Promise< CollectionProxy >

Parameters
Name Type Default value
dataConnectorName string undefined
syncDataSourceId undefined | string undefined
syncCollectionId string undefined
primaryKeys string[] undefined
timeout number 30000
Returns

Promise< CollectionProxy >


canEditPackageSettings

canEditPackageSettings(): Promise<boolean>

Returns

Promise<boolean>

True if the current user is allowed to edit package settings on this installation of this extension (if any settings exist), or false otherwise.


confirm

confirm(text, title?, okText?, cancelText?): ConfirmResult

Display a confirm modal to the user

Parameters
Name Type Description
text string Body text to display in the alert modal
title? string Title of the alert modal; defaults to the extension title specified in manifest.json
okText? string Text for the OK button; defaults to "OK" (or a translation)
cancelText? string Text for the Cancel button; defaults to "Cancel" (or a translation)
Returns

ConfirmResult

a Promise that resolves true if the user clicks OK, false if they click Cancel or otherwise dismiss the modal


createUserImage

createUserImage(mediaType, data): Promise<string>

Upload an image and return a URL that can be used for displaying that image on the canvas. Note: the URL is public - anyone with the URL can access the image.

Parameters
Name Type Description
mediaType string The media type, e.g. 'image/png'
data string | Uint8Array The binary image contents, or a base64-encoded string
Returns

Promise<string>

A promise that resolves with the URL of the created image.


deleteAction

deleteAction(name): void

Remove the callback for a given action. If the action is later invoked, nothing will happen.

Parameters
Name Type Description
name string name of the action to unregister
Returns

void


download

download(filename, data, mime, base64): void

Initiate a browser file download of custom content

Parameters
Name Type Description
filename string Filename of the downloaded file
data string The content to put into the file, either in plain text or as base64-encoded binary data
mime string The MIME type to tell the browser it is downloading
base64 boolean If true, base64 decode the data before downloading it
Returns

void


duplicatePages

duplicatePages(pageNums): Promise<void>

Duplicates one or more pages of the current document as new pages.

Parameters
Name Type Description
pageNums number[] An array of zero-indexed page indices to duplicate from the current document
Returns

Promise<void>

a promise that resolves to void when the pages have been duplicated or the the duplication failed


getBlockProxy

getBlockProxy(id): BlockProxy

Create and return a proxy for accessing a block with the given ID. If the block is of a type that has a specific proxy implementation (e.g. an ERD block) then a specialized subclass of BlockProxy may be returned.

Parameters
Name Type Description
id string ID of the block to create a proxy for
Returns

BlockProxy

the given block


getCustomShapeDefinition

getCustomShapeDefinition(library, shape): Promise<undefined | BlockDefinition >

Load the requested shape library's content, and if it was found, return a block definition ready to be created.

Example usage:

const client = new EditorClient(); const viewport = new Viewport(client); const page = viewport.getCurrentPage(); if (page) { const def = await page.getCustomShapeDefinition('libraryName', 'shapeName'); if (def) { //Customize the shape about to be created def.boundingBox.x = 500; def.boundingBox.y = 500; //Create the shape itself const block = page.addBlock(def); //Set any data fields on the shape as needed block.shapeData.set('Value', 50); } }

Parameters
Name Type Description
library string Name of the shape library in this extension to search for
shape string Name of the shape within that library to search for
Returns

Promise<undefined | BlockDefinition >


getElementProxy

getElementProxy(id): ElementProxy

Parameters
Name Type Description
id string ID of the element to create a proxy for
Returns

ElementProxy

the given element


getItemProxy

getItemProxy(id): BlockProxy | LineProxy | GroupProxy

Parameters
Name Type Description
id string ID of the item to create a proxy for
Returns

BlockProxy | LineProxy | GroupProxy

the given item


getLineProxy

getLineProxy(id): LineProxy

Parameters
Name Type Description
id string ID of the line to create a proxy for
Returns

LineProxy

the given line


getOAuthClientId

getOAuthClientId(providerName): Promise<undefined | string>

Fetch the OAuth Client Id if there is one

Parameters
Name Type Description
providerName string Name of the OAuth provider
Returns

Promise<undefined | string>

A oauth client id or undefined if it doesn't exist


getOAuthToken

getOAuthToken(providerName): Promise<undefined | string>

Returns an OAuth token for the given provider, prompting the user to grant access if necessary

Parameters
Name Type Description
providerName string Name of the OAuth provider
Returns

Promise<undefined | string>

An oauth token, or undefined if a valid token cannot be obtained


getPackageSettings

getPackageSettings(): Promise<Map<string, JsonSerializable >>

If the extension package containing this editor extension has configurable settings, fetch the current values of those settings for this installation of this extension.

Only settings that have been set by the installing user will have a value in the map, other settings will be missing.

Returns

Promise<Map<string, JsonSerializable >>

A promise that resolves to a map of setting names to current setting values


getPageProxy

getPageProxy(id): PageProxy

Parameters
Name Type Description
id string ID of the page to create a proxy for
Returns

PageProxy

the given page


getProduct

getProduct(): LucidProduct

Get which Lucid product this editor extension has been loaded in.

Returns

LucidProduct


importPage

importPage(documentId, pageNums): Promise<void>

Import one or pages of the specified document or template into the current document as new pages. NOTE: The indices of the pages to import will change if the pages are rearranged on the source document or template.

Parameters
Name Type Description
documentId string The ID of the document or template to import
pageNums number[] An array of zero-indexed page indices to import from the document or template
Returns

Promise<void>

a promise that resolves to void when the pages have been imported or the the import failed


killExtension

killExtension(): void

Unload this extension immediately, removing any custom menu items etc., until the user refreshes the browser tab.

Returns

void


loadBlockClasses

loadBlockClasses(classNames): Promise<undefined>

Because code for block classes are loaded incrementally, you MUST call loadBlockClasses with the given block class name (and wait for it to resolve) before attempting to create a block. If you don't, an error will be thrown.

Parameters
Name Type Description
classNames string[] the block classes to load
Returns

Promise<undefined>

a promise that resolves when the block classes can be used to create new blocks on the document


oauthXhr

oauthXhr(providerName, request): Promise< TextXHRResponse >

Make an OAuth network request. Make the request immediately and only once with a 10 second timeout.

Parameters
Name Type Description
providerName string Name of the OAuth provider
request OAuthXHRRequest & { responseFormat: "utf8" } Settings for the request
Returns

Promise< TextXHRResponse >

A promise that will either resolve or reject with an XHRResponse. If the HTTP status code is not 2xx, the promise will reject.

oauthXhr(providerName, request): Promise< BinaryXHRResponse >

Parameters
Name Type
providerName string
request OAuthXHRRequest & { responseFormat: "binary" }
Returns

Promise< BinaryXHRResponse >

oauthXhr(providerName, request): Promise< XHRResponse >

Parameters
Name Type
providerName string
request OAuthXHRRequest
Returns

Promise< XHRResponse >


performDataAction

performDataAction(options): Promise< DataActionResponse >

Parameters
Name Type
options DataActionOptions
Returns

Promise< DataActionResponse >


permanentTokenXhr

permanentTokenXhr(providerName, request): Promise< BinaryXHRResponse >

Parameters
Name Type
providerName string
request XHRRequest & { responseFormat: "binary" }
Returns

Promise< BinaryXHRResponse >

permanentTokenXhr(providerName, request): Promise< XHRResponse >

Parameters
Name Type
providerName string
request XHRRequest
Returns

Promise< XHRResponse >


processAndClearBootstrapData

processAndClearBootstrapData(callback, markExtensionAsRequired?): Promise<void>

Parameters
Name Type Description
callback (data: JsonSerializable ) => void | Promise<void> A callback that processes the bootstrap data, if any, stored on the document and associated with this editor extension. If this callback is async (returns a promise), then the bootstrap data is not cleared off of the document until that promise resolves.
markExtensionAsRequired? boolean If bootstrap data is available for this editor extension, this will mark the document as requiring the extension. Once marked, if the extension is not installed the user will be notified about the extension being required on document load. The minimum extension version required by the document is the version provided in the request body when creating the document.
Returns

Promise<void>

a promise that resolves immediately if there is no available bootstrap data, or else after the callback successfully completes. This promise will reject/throw if the callback throws or returns a promise that rejects, or if there is another editor session processing the same bootstrap data at the same time.


prompt

prompt(text, title?): PromptResult

Display a prompt modal to the user

Parameters
Name Type Description
text string Body text to display in the alert modal
title? string Title of the alert modal; defaults to the extension title specified in manifest.json
Returns

PromptResult

a Promise that resolves to a string if a user enters one, or undefined if they cancel


registerAction

registerAction(name, callback): void

Register a named action. These actions can be triggered from custom UI, for example as the action of a custom menu item.

Some actions may return a value that is used by the core application, e.g. a visibleAction for a menu item. However, if you return a Promise from your callback, that value will be discarded and your action will return undefined instead. The ability to provide a callback that returns a Promise is only a convenience so that you can register actions with async callbacks for easy async/await.

Throws an error if the same action name is registered multiple times.

Parameters
Name Type Description
name string name of the action
callback (value: any) => void | JsonSerializable | Promise<any> function to execute when this action is invoked
Returns

void


registerFileUploadAction

registerFileUploadAction(name, callback): void

Register a named action that receives file upload data. These callbacks can be used in Menu.addMenuItem as the file action.

Parameters
Name Type Description
name string The name of the action
callback (files: FileUploadData []) => void Function to execute when this action is invoked
Returns

void


registerUnfurlHandler

registerUnfurlHandler(domain, callbacks): void

Registers a handler for link unfurling.

Parameters
Name Type Description
domain string The domain
callbacks UnfurlCallbacks The callbacks to call when a link matching the domain is pasted.
Returns

void


reloadExtension

reloadExtension(): void

Unload this extension, and then re-execute it.

Returns

void


sendCommand

sendCommand<C>(name, params): CommandArgs [C]["result"]

Execute an API command. This is the low-level API that most of this SDK wraps. It is not expected that you should ever need to use this directly.

Type parameters
Name Type
C extends CommandName
Parameters
Name Type Description
name C name of the API command to execute
params UnionToIntersection< CommandArgs [C]["query"]> data to pass to the API command
Returns

CommandArgs [C]["result"]

the output of the given API command


setPackageSettings

setPackageSettings(settings): Promise<undefined>

If the extension package containing this editor extension has configurable settings, set the value of those settings for this installation of this extension. A subset of setting values can be provided to update those values while leaving others unchanged.

If the user does not have permission to change settings on this installation of this extension, or if no settings exist, an error is thrown.

Parameters
Name Type
settings Record<string, string> | Map<string, string>
Returns

Promise<undefined>


showPackageSettingsModal

showPackageSettingsModal(): Promise<void>

If the extension package containing this editor extension has configurable settings, show a standard modal allowing the user to view or change those settings.

If the user does not have permission to change settings on this installation of this extension, or if no settings exist, an error is thrown.

Returns

Promise<void>

A promise that resolves when the user closes the settings modal.


triggerAuthFlow

triggerAuthFlow(providerName): TriggerAuthFlowResult

Parameters
Name Type
providerName string
Returns

TriggerAuthFlowResult


tryGetItemProxy

tryGetItemProxy(id): undefined | BlockProxy | LineProxy | GroupProxy

Parameters
Name Type Description
id string ID of the item to create a proxy for
Returns

undefined | BlockProxy | LineProxy | GroupProxy

the given item, or undefined if the item does not exist or an error occurs


withIntraDocumentMutex

withIntraDocumentMutex(name, callback): Promise<boolean>

Executes the given callback within a mutex scoped to the current document, extension, and the given name. If another editor session currently has the given mutex name locked within the same extension package ID on this same document, this function's returned promise will resolve to false. Otherwise, the mutex will be locked for the duration of the callback and the returned promise will resolve to true.

Parameters
Name Type Description
name string Name of the intra-document mutex to attempt to lock
callback () => void | Promise<void> Code to execute while the mutex is locked, if it is successfully locked
Returns

Promise<boolean>

A promise resolving to a boolean indicating whether the mutex was successfully locked


withSilentActions

withSilentActions(callback): void

Parameters
Name Type Description
callback () => void Callback that will be executed with the user's local undo/redo history suppressed. This is useful when you want to make changes to a document that will not be erased if the user uses undo or redo, for example adding shape data onto shapes as a result of a background process that collects data from a remote API.
Returns

void


xhr

xhr(request): Promise< TextXHRResponse >

Make a network request

Parameters
Name Type Description
request XHRRequest & { responseFormat: "utf8" } Settings for the network request
Returns

Promise< TextXHRResponse >

A promise that will either resolve or reject with an XHRResponse. If the HTTP status code is not 2xx, the promise will reject.

xhr(request): Promise< BinaryXHRResponse >

Parameters
Name Type
request XHRRequest & { responseFormat: "binary" }
Returns

Promise< BinaryXHRResponse >

xhr(request): Promise< XHRResponse >

Parameters
Name Type
request XHRRequest
Returns

Promise< XHRResponse >


ElementProxy

document/elementproxy.ElementProxy

An element is anything on a Lucid document that can have properties and shape data:

Hierarchy

Constructors

constructor

new ElementProxy(id, client)

Parameters
Name Type Description
id string ID of this element
client EditorClient
Overrides

PropertyStoreProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.


client

Protected Readonly client: EditorClient

Inherited from

PropertyStoreProxy.client


id

Readonly id: string

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


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Methods

executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void


ERDBlockProxy

document/blockclasses/erdblockproxy.ERDBlockProxy

A block is a single shape on the document. A BlockProxy provides an interface to read and write the content of an existing block, and is typically accessed through PageProxy.blocks or another similar mechanism.

Hierarchy

Constructors

constructor

new ERDBlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

BlockProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

BlockProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

BlockProxy.client


id

Readonly id: string

Inherited from

BlockProxy.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

BlockProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

BlockProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

BlockProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textStyles


classNameRegex

Static classNameRegex: RegExp

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

BlockProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

BlockProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

BlockProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

BlockProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

BlockProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

BlockProxy.getBoundingBox


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..

Inherited from

BlockProxy.getClassName


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.

Inherited from

BlockProxy.getConnectedLines


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

BlockProxy.getContainers


getFieldCount

getFieldCount(): number

Returns

number


getFields

getFields(): ERDFieldProxy []

Returns

ERDFieldProxy []


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.

Inherited from

BlockProxy.getLineWidth


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

BlockProxy.getLocation


getName

getName(): string

Returns

string


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

BlockProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

BlockProxy.getPageId


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have

Inherited from

BlockProxy.getRotatedBoundingBox


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.

Inherited from

BlockProxy.getRotation


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set

Inherited from

BlockProxy.getShadow


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.

Inherited from

BlockProxy.getSimpleStaticDataGraphic


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void

Inherited from

BlockProxy.linkText


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void

Inherited from

BlockProxy.lockAspectRatio


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

BlockProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

BlockProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

BlockProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

BlockProxy.setBoundingBox


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void

Inherited from

BlockProxy.setDataSyncStateIconPosition


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void

Inherited from

BlockProxy.setFillStyle


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void

Inherited from

BlockProxy.setLineWidth


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

BlockProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

BlockProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void

Inherited from

BlockProxy.setRotation


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void

Inherited from

BlockProxy.setShadow


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void

Inherited from

BlockProxy.setSimpleStaticDataGraphic


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

BlockProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void

Inherited from

BlockProxy.unlockAspectRatio


ERDFieldProxy

document/blockclasses/erdblockproxy.ERDFieldProxy

Constructors

constructor

new ERDFieldProxy(block, index)

Parameters
Name Type
block ERDBlockProxy
index number

Methods

getKey

getKey(): string | number | boolean | JsonArray | JsonObject

Returns

string | number | boolean | JsonArray | JsonObject


getName

getName(): string

Returns

string


getType

getType(): string | number | boolean | JsonArray | JsonObject

Returns

string | number | boolean | JsonArray | JsonObject


FieldTypeArray<SubTypes>

core/data/fieldtypedefinition/fieldtypearray.FieldTypeArray

Type parameters

Name Type
SubTypes extends FieldTypeArraySubTypes = FieldTypeArraySubTypes

Hierarchy

Constructors

constructor

new FieldTypeArray<SubTypes>(validTypesArray)

Type parameters
Name Type
SubTypes extends FieldTypeArraySubTypes = FieldTypeArraySubTypes
Parameters
Name Type
validTypesArray SubTypes[]
Inherited from

BaseFieldTypeArray.constructor

Properties

validTypesArray

Readonly validTypesArray: SubTypes[]

Inherited from

BaseFieldTypeArray.validTypesArray

Methods

getInnerNonArrayTypes

getInnerNonArrayTypes(): Exclude<SubTypes, BaseFieldTypeArray <SubTypes>>[]

Returns

Exclude<SubTypes, BaseFieldTypeArray <SubTypes>>[]

Inherited from

BaseFieldTypeArray.getInnerNonArrayTypes


getInnerTypes

getInnerTypes(): SubTypes[]

Returns

SubTypes[]

Inherited from

BaseFieldTypeArray.getInnerTypes


serializeType

Protected serializeType(t): string | SerializedCollectionEnumFieldType | ScalarFieldTypeEnum | SerializedFieldTypeArray

Parameters
Name Type
t FieldTypeArraySubTypes
Returns

string | SerializedCollectionEnumFieldType | ScalarFieldTypeEnum | SerializedFieldTypeArray

Overrides

BaseFieldTypeArray.serializeType


toJSON

toJSON(): SerializedFieldTypeArray

Returns

SerializedFieldTypeArray

Inherited from

BaseFieldTypeArray.toJSON


FormattedPrimaryKey<Fields, PrimaryKey>

core/data/fieldspecification.FormattedPrimaryKey

Generates a mapper that, given a primary key definition is able to produce the primary key for that item.

Type parameters

Name Type
Fields extends FieldsStructure
PrimaryKey extends keyof Fields

Constructors

constructor

new FormattedPrimaryKey<Fields, PrimaryKey>(...elements)

Type parameters
Name Type
Fields extends FieldsStructure
PrimaryKey extends string | number | symbol
Parameters
Name Type
...elements PrimaryKey[]

Properties

elements

Readonly elements: PrimaryKey[]

Methods

forItem

forItem(item): string

Generate the serialized form of the item's primary key.

For single value primary keys, the encoded values are just the json representation of the primary key. For example, if the primary key is ['id'] the following table shows encodings:

type value encoded
number 15 new Map([["15", ...], ...])
boolean false new Map([["false", ...], ...])
string "hello" new Map([['"hello"', ...], ...])

Take note of the extra quotes in the string case.

For primary keys with multiple values, first sort the array of primary keys then join the json encoded values from of the keys with commas. For example:

undefined
primary key = ["lastName", "firstName"] sorted key = ["firstName", "lastName"] row = {"lastName": "Smith", "firstName": "John", "age": 42} row key = '"John","Smith"' items = new Map([['"John","Smith"', {"lastName": "Smith", "firstName": "John", "age": 42}]])
Parameters
Name Type
item PartialItemType <Fields, PrimaryKey>
Returns

string


serializeList

Static serializeList(items): string

Parameters
Name Type
items unknown[]
Returns

string


GroupProxy

document/groupproxy.GroupProxy

A group of items on a page.

Hierarchy

Constructors

constructor

new GroupProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

ItemProxy.constructor

Properties

allBlocks

Readonly allBlocks: MapProxy <string, BlockProxy >

The blocks that are contained in this group, including those nested in deeper groups, organized by ID.


allGroups

Readonly allGroups: MapProxy <string, GroupProxy >

The groups that are contained in this group, including those nested in deeper groups, organized by ID.


allLines

Readonly allLines: MapProxy <string, LineProxy >

The lines that are contained in this group, including those nested in deeper groups, organized by ID.


allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

ItemProxy.allShapeData


blocks

Readonly blocks: MapProxy <string, BlockProxy >

The blocks that are directly contained in this group, organized by ID.


client

Protected Readonly client: EditorClient

Inherited from

ItemProxy.client


groups

Readonly groups: MapProxy <string, GroupProxy >

The groups that are directly contained in this group, organized by ID.


id

Readonly id: string

Inherited from

ItemProxy.id


lines

Readonly lines: MapProxy <string, LineProxy >

The lines that are directly contained in this group, organized by 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

ItemProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

ItemProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

ItemProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

ItemProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

ItemProxy.textStyles

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

ItemProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

ItemProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

ItemProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

ItemProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

ItemProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

ItemProxy.getBoundingBox


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

ItemProxy.getContainers


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

ItemProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

ItemProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

ItemProxy.getPageId


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

ItemProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

ItemProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

ItemProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

ItemProxy.setBoundingBox


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

ItemProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

ItemProxy.setReferenceKey


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

ItemProxy.unapplyRule


HumanReadableError

core/humanreadableerror.HumanReadableError

An error carrying a message that is good to be shown directly in the UI. These can be thrown from extensions and caught in core code.

Hierarchy

  • Error

    HumanReadableError

Constructors

constructor

new HumanReadableError(message?)

Parameters
Name Type
message? string
Inherited from

Error.constructor

Properties

message

message: string

Inherited from

Error.message


name

name: string = 'HumanReadableError'

Overrides

Error.name


stack

Optional stack: string

Inherited from

Error.stack


I18nFormattedList

interop.I18nFormattedList

Constructors

constructor

new I18nFormattedList()


I18nFormattedNumber

interop.I18nFormattedNumber

Constructors

constructor

new I18nFormattedNumber()


I18nSafeString

interop.I18nSafeString

Constructors

constructor

new I18nSafeString(str)

Parameters
Name Type
str string

Properties

value

value: string


IframeUI

ui/iframeui.IframeUI

Base class for defining and interacting with custom UI elements whose contents are displayed in an iframe.

Hierarchy

Constructors

constructor

new IframeUI(client)

Parameters
Name Type
client EditorClient

Properties

client

Protected Readonly client: EditorClient


framePosition

Protected framePosition: Object

The location of this frame within the top-level browser window. This is always updated immediately before messageFromFrame is called.

Type declaration
Name Type
h number
w number
x number
y number

loaded

Protected loaded: boolean = false

True after the iframe has fired an onload event (not all scripts are necessarily finished executing)


messageActionName

Protected messageActionName: string

Methods

frameClosed

Protected frameClosed(): void

Called when the iframe has been removed from the DOM

Returns

void


frameLoaded

Protected frameLoaded(): void

Called when the iframe has been constructed, its srcdoc set, and the window loaded event has fired

Returns

void


hookMessages

Protected hookMessages(): void

Subclasses must call hookMessages some time before the UI is displayed. A Modal will call this when the open() method is called, where a Panel will need to do this in the constructor to watch for the user opening the panel.

Returns

void


messageFromFrame

Protected messageFromFrame(message): void

Receives messages sent from the iframe via parent.postMessage(, '*')

Parameters
Name Type Description
message any data sent from the iframe
Returns

void


sendMessage

sendMessage(data): Promise<void>

Send a message to this UI component's iframe via window.postMessage.

Parameters
Name Type Description
data JsonSerializable Data to send to the iframe
Returns

Promise<void>


unhookMessages

Protected unhookMessages(): void

Subclasses must call unhookMessages to allow them to be garbage collected.

Returns

void


ItemProxy

document/itemproxy.ItemProxy

A block, line, or group on a page of the current document.

Hierarchy

Constructors

constructor

new ItemProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Overrides

ElementProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

ElementProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

ElementProxy.client


id

Readonly id: string

Inherited from

ElementProxy.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

ElementProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

ElementProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

ElementProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void


delete

delete(): void

Delete this item from the document

Returns

void


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

ElementProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

ElementProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number

getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

ElementProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

ElementProxy.setReferenceKey


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void


ItemRekeyer

dataconnector/itemrekeyer.ItemRekeyer

Constructors

constructor

new ItemRekeyer()

Methods

addRekeyingsFor

addRekeyingsFor(collectionId, itemsPatch, primaryKey?): void

Parameters
Name Type
collectionId string
itemsPatch ItemsPatch
primaryKey? FormattedPrimaryKey <any, string>
Returns

void


getRekeyingMap

getRekeyingMap(patch): undefined | RekeyingMap

Parameters
Name Type
patch Patch
Returns

undefined | RekeyingMap


ItemsPatchExhaustive

dataconnector/datasourceupdatetypes.ItemsPatchExhaustive

Constructors

constructor

new ItemsPatchExhaustive(items, rekeyingMap?, errors?)

Parameters
Name Type
items Map<string, SerializedFields >
rekeyingMap? Map<string, null | string>
errors? Map<string, SerializedLucidDictionary >

Properties

errors

Optional errors: Map<string, SerializedLucidDictionary >


items

items: Map<string, SerializedFields >


rekeyingMap

Optional rekeyingMap: Map<string, null | string>


ItemsPatchInexhaustive

dataconnector/datasourceupdatetypes.ItemsPatchInexhaustive

Constructors

constructor

new ItemsPatchInexhaustive(items, itemsDeleted?, errors?)

Parameters
Name Type Description
items Map<string, SerializedFields > Items to be added or changed in the collection. Mapping from item serialized primary key to the sparse patch of the item. See FormattedPrimaryKey.forItem.
itemsDeleted? string[] Items to remove from the collection, based on the same primary key algorithm.
errors? Map<string, SerializedLucidDictionary > -

Properties

errors

Optional errors: Map<string, SerializedLucidDictionary >


items

items: Map<string, SerializedFields >

Items to be added or changed in the collection. Mapping from item serialized primary key to the sparse patch of the item. See FormattedPrimaryKey.forItem.


itemsDeleted

Optional itemsDeleted: string[]

Items to remove from the collection, based on the same primary key algorithm.


LegendBlockProxy

document/blockclasses/legendblockproxy.LegendBlockProxy

A block is a single shape on the document. A BlockProxy provides an interface to read and write the content of an existing block, and is typically accessed through PageProxy.blocks or another similar mechanism.

Hierarchy

Constructors

constructor

new LegendBlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

BlockProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

BlockProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

BlockProxy.client


id

Readonly id: string

Inherited from

BlockProxy.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

BlockProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

BlockProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

BlockProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textStyles


classNameRegex

Static classNameRegex: RegExp

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

BlockProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

BlockProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

BlockProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

BlockProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

BlockProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

BlockProxy.getBoundingBox


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..

Inherited from

BlockProxy.getClassName


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.

Inherited from

BlockProxy.getConnectedLines


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

BlockProxy.getContainers


getHeader

getHeader(): string

Returns

string


getItems

getItems(): LegendEntryProxy []

Returns

LegendEntryProxy []


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.

Inherited from

BlockProxy.getLineWidth


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

BlockProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

BlockProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

BlockProxy.getPageId


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have

Inherited from

BlockProxy.getRotatedBoundingBox


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.

Inherited from

BlockProxy.getRotation


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set

Inherited from

BlockProxy.getShadow


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.

Inherited from

BlockProxy.getSimpleStaticDataGraphic


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void

Inherited from

BlockProxy.linkText


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void

Inherited from

BlockProxy.lockAspectRatio


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

BlockProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

BlockProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

BlockProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

BlockProxy.setBoundingBox


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void

Inherited from

BlockProxy.setDataSyncStateIconPosition


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void

Inherited from

BlockProxy.setFillStyle


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void

Inherited from

BlockProxy.setLineWidth


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

BlockProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

BlockProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void

Inherited from

BlockProxy.setRotation


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void

Inherited from

BlockProxy.setShadow


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void

Inherited from

BlockProxy.setSimpleStaticDataGraphic


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

BlockProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void

Inherited from

BlockProxy.unlockAspectRatio


LegendEntryProxy

document/blockclasses/legendblockproxy.LegendEntryProxy

Hierarchy

Constructors

constructor

new LegendEntryProxy(legend, index, type)

Parameters
Name Type
legend LegendBlockProxy
index number
type LegendItemType

Properties

index

Readonly index: number


legend

Protected Readonly legend: LegendBlockProxy


type

Readonly type: LegendItemType

Methods

getText

getText(): string

Returns

string


setText

setText(text): void

Parameters
Name Type
text string
Returns

void


LineProxy

document/lineproxy.LineProxy

A line on the current Lucid document

Hierarchy

Constructors

constructor

new LineProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

ItemProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

ItemProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

ItemProxy.client


id

Readonly id: string

Inherited from

ItemProxy.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

ItemProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

ItemProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

ItemProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

ItemProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

ItemProxy.textStyles

Methods

addTextArea

addTextArea(text, position): string

Adds a new text area to this line at the given location with the given initial plain text. The text will be styled with the document theme, if any.

Parameters
Name Type
text string
position LineTextAreaPositioning
Returns

string

The name of the text area added


applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

ItemProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

ItemProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

ItemProxy.delete


deleteTextArea

deleteTextArea(name): void

Deletes the given text area from the line, if it exists.

Parameters
Name Type
name string
Returns

void


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

ItemProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

ItemProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

ItemProxy.getBoundingBox


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

A list of lines whose endpoints are connected to this line


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

ItemProxy.getContainers


getDownstreamConnection

getDownstreamConnection(): undefined | void | BlockProxy | LineProxy

Returns

undefined | void | BlockProxy | LineProxy

The block or line connected to the second endpoint of this line, or undefined if none


getEndpoint1

getEndpoint1(): Object

Returns

Object

The definition of the first endpoint of this line


getEndpoint2

getEndpoint2(): Object

Returns

Object

The definition of the second endpoint of this line


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

ItemProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

ItemProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

ItemProxy.getPageId


getRelativePosition

getRelativePosition(relative): Point

Parameters
Name Type Description
relative number A distance, between 0 and 1, between the first and second endpoint of this line
Returns

Point

The coordinate of that relative position, relative to the containing page


getShape

getShape(): LineShape

Returns

LineShape


getTextAreaPosition

getTextAreaPosition(name): undefined | LineTextAreaPositioning

Parameters
Name Type
name string
Returns

undefined | LineTextAreaPositioning

The position of the given text area on this line, if it exists, or undefined if it does not exist.


getUpstreamConnection

getUpstreamConnection(): undefined | void | BlockProxy | LineProxy

Returns

undefined | void | BlockProxy | LineProxy

The block or line connected to the first endpoint of this line, or undefined if none


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

ItemProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

ItemProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

ItemProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

ItemProxy.setBoundingBox


setEndpoint1

setEndpoint1(endpoint): void

Update the first endpoint of this line

Parameters
Name Type Description
endpoint EndpointDefinition Line endpoint definition
Returns

void


setEndpoint2

setEndpoint2(endpoint): void

Update the second endpoint of this line

Parameters
Name Type Description
endpoint EndpointDefinition Line endpoint definition
Returns

void


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

ItemProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

ItemProxy.setReferenceKey


setShape

setShape(shape): void

Parameters
Name Type
shape LineShape
Returns

void


setTextAreaPosition

setTextAreaPosition(name, position): void

Updates the position of the given text area, if it exists. If not, an error is thrown.

Parameters
Name Type
name string
position LineTextAreaPositioning
Returns

void


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

ItemProxy.unapplyRule


LinkUnfurlBlockProxy

document/blockclasses/linkunfurlblockproxy.LinkUnfurlBlockProxy

This is the kind of block that appears when a link is pasted onto the canvas of a Lucid editor.

Hierarchy

Constructors

constructor

new LinkUnfurlBlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

BlockProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

BlockProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

BlockProxy.client


id

Readonly id: string

Inherited from

BlockProxy.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

BlockProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

BlockProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

BlockProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textStyles


classNameRegex

Static classNameRegex: RegExp

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

BlockProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

BlockProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

BlockProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

BlockProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

BlockProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

BlockProxy.getBoundingBox


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..

Inherited from

BlockProxy.getClassName


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.

Inherited from

BlockProxy.getConnectedLines


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

BlockProxy.getContainers


getDescription

getDescription(): string

Returns the description on the block.

Returns

string


getFaviconUrl

getFaviconUrl(): string

Gets the url for the favicon on the block

Returns

string


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.

Inherited from

BlockProxy.getLineWidth


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

BlockProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

BlockProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

BlockProxy.getPageId


getPreviewThumbnailUrl

getPreviewThumbnailUrl(): string

Gets the main thumbnail on the block

Returns

string


getProviderName

getProviderName(): string

Returns the name of the service the link belongs to, such as "Lucid" or "Google", as displayed below the title on the block.

Returns

string


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have

Inherited from

BlockProxy.getRotatedBoundingBox


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.

Inherited from

BlockProxy.getRotation


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set

Inherited from

BlockProxy.getShadow


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.

Inherited from

BlockProxy.getSimpleStaticDataGraphic


getTitle

getTitle(): string

Returns the title on the block, which is the main text shown on the block.

Returns

string


getUrl

getUrl(): undefined | string

Gets the URL the user will be redirected to when the user clicks the "Pop Out" action on the block.

Returns

undefined | string


hasIframe

hasIframe(): boolean

Returns true if there is an iframe URL already set for this unfurl block

Returns

boolean


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void

Inherited from

BlockProxy.linkText


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void

Inherited from

BlockProxy.lockAspectRatio


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

BlockProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

BlockProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

BlockProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

BlockProxy.setBoundingBox


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void

Inherited from

BlockProxy.setDataSyncStateIconPosition


setDescription

setDescription(description): void

Sets the description on the block.

Parameters
Name Type
description string
Returns

void


setFaviconUrl

setFaviconUrl(faviconUrl): void

Sets the favicon on the block

Parameters
Name Type
faviconUrl string
Returns

void


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void

Inherited from

BlockProxy.setFillStyle


setIframe

setIframe(unfurlIframe): void

Sets the URL to be loaded in an iframe when the user clicks the "Expand" action on the block.

Parameters
Name Type
unfurlIframe UnfurlIframe
Returns

void


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void

Inherited from

BlockProxy.setLineWidth


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

BlockProxy.setLocation


setPreviewThumbnailUrl

setPreviewThumbnailUrl(thumbnailUrl): void

Sets the main thumbnail on the block

Parameters
Name Type
thumbnailUrl string
Returns

void


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

BlockProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void

Inherited from

BlockProxy.setRotation


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void

Inherited from

BlockProxy.setShadow


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void

Inherited from

BlockProxy.setSimpleStaticDataGraphic


setThumbnailUrls

setThumbnailUrls(thumbnails): void

Sets additional thumbnails on the block

Parameters
Name Type
thumbnails string[]
Returns

void


setTitle

setTitle(title): void

Sets the title on the block, which is the main text shown on the block.

Parameters
Name Type
title string
Returns

void


setUrl

setUrl(url): void

Sets the URL the user will be redirected to when the user clicks the "Pop Out" action on the block.

Parameters
Name Type
url string
Returns

void


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

BlockProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void

Inherited from

BlockProxy.unlockAspectRatio


LiteralFieldType

core/data/fieldtypedefinition/literalfieldtype.LiteralFieldType

Constructors

constructor

new LiteralFieldType(literal)

Parameters
Name Type
literal string | number | boolean

Properties

literalStringPrefix

Static literalStringPrefix: string = '%'

Methods

getLiteral

getLiteral(): string | number | boolean

Returns

string | number | boolean


getScalarFieldType

getScalarFieldType(): ScalarFieldTypeEnum

Returns

ScalarFieldTypeEnum


toJSON

toJSON(): string

Returns

string


LucidCardIntegration

core/cardintegration/lucidcardintegration.LucidCardIntegration

Constructors

constructor

new LucidCardIntegration(client)

Parameters
Name Type
client EditorClient

Properties

addCard

Optional addCard: Object

If specified, allow the user to create new cards and convert other shapes to cards

Type declaration
Name Type
createCardData (input: Map<string, SerializedFieldType >) => Promise<{ collection: CollectionProxy ; primaryKey: string }>
getInputFields (inputSoFar: Map<string, SerializedFieldType >) => Promise< ExtensionCardFieldDefinition []>

client

Protected Readonly client: EditorClient


dataConnectorName

Abstract dataConnectorName: string

The name of the data connector associated with the card integration.


fieldConfiguration

Abstract fieldConfiguration: Object

Type declaration
Name Type Description
fieldValueSearchCallbacks? Map<string, string> Specify callbacks for searching for legal values for the given fields. For example, a Task collection may have an Assignee field that references a User collection, but you don't import all the users in the entire source data set. Here, you can provide a way to search for legal values for the Assignee field, similar to the ExtensionCardFieldDefinition.search functionality. Register a search callback using LucidCardIntegrationRegistry.registerFieldSearchCallback, then set the returned string as a value in this Map. The inputSoFar parameter passed to the callback will be all the current field values on the item being edited.
getAllFields (dataSource: DataSourceProxy ) => Promise<string[]> Callback to provide a list of all supported field names for the card integration.
onSelectedFieldsChange? (dataSource: DataSourceProxy , selectedFields: string[]) => Promise<void> Callback that handled changes in the fields the user wants to be displayed in the card integration. If this callback is not provided then the user will not be shown the modal to configure fields.

getDefaultConfig

Abstract getDefaultConfig: (dataSource: DataSourceProxy ) => Promise< CardIntegrationConfig >

Type declaration

▸ (dataSource): Promise< CardIntegrationConfig >

Provide the default configuration for a new import

Parameters
Name Type
dataSource DataSourceProxy
Returns

Promise< CardIntegrationConfig >


iconUrl

Abstract iconUrl: string

URL for an icon to display in toolbars, etc. Should be at least 24x24.


importModal

Optional importModal: LucidCardIntegrationCustomImportModal | LucidCardIntegrationStandardImportModal

This allows the user to import cards by selecting items from within a modal. You can either create a custom import modal or the standard import modal can be used.


itemLabel

Abstract itemLabel: string

Label used to identify one card worth of data, e.g. "Jira task"


itemsLabel

Abstract itemsLabel: string

Label used to identify multiple cards worth of data, e.g. "Jira tasks"


label

Abstract label: string

Label used to identify the integration, e.g. "Jira", which will be used in menu items, etc. Should be unique within any given extension.


showIntro

Optional showIntro: () => void

Type declaration

▸ (): void

If specified, and the user hasn't yet authorized the data connector for this extension, this should show the user an intro dialog or take some other action.

Returns

void


textStyle

Optional textStyle: Partial< TextStyle >

The default text style to use on cards created as part of this integration. These can be overridden by values in getDefaultConfig().fieldStyles for individual fields that should have different styles.

Methods

showCardImport

showCardImport(name): ImportCardsResult

Parameters
Name Type
name string
Returns

ImportCardsResult


LucidCardIntegrationCustomImportModal

core/cardintegration/lucidcardintegrationcustomimportmodal.LucidCardIntegrationCustomImportModal

Extending this class lets you create a custom import modal for a Lucid card integration.

Hierarchy

  • Modal

    LucidCardIntegrationCustomImportModal

Constructors

constructor

new LucidCardIntegrationCustomImportModal(client, config, cardIntegrationLabel)

Parameters
Name Type
client EditorClient
config ModalConfig
cardIntegrationLabel string
Overrides

Modal.constructor

Properties

client

Protected Readonly client: EditorClient

Inherited from

Modal.client


framePosition

Protected framePosition: Object

The location of this frame within the top-level browser window. This is always updated immediately before messageFromFrame is called.

Type declaration
Name Type
h number
w number
x number
y number
Inherited from

Modal.framePosition


loaded

Protected loaded: boolean = false

True after the iframe has fired an onload event (not all scripts are necessarily finished executing)

Inherited from

Modal.loaded


messageActionName

Protected messageActionName: string

Inherited from

Modal.messageActionName

Methods

createCards

Protected createCards(collectionId, primaryKeys): CreateCardsResult

Once the data has been imported, call this function to create Lucid cards on the canvas.

Parameters
Name Type
collectionId string
primaryKeys string[]
Returns

CreateCardsResult


frameClosed

Protected frameClosed(): void

Called when the iframe has been removed from the DOM

Returns

void

Inherited from

Modal.frameClosed


frameLoaded

Protected frameLoaded(): void

Called when the iframe has been constructed, its srcdoc set, and the window loaded event has fired

Returns

void

Inherited from

Modal.frameLoaded


hide

hide(): void

If this modal is currently visible, close it, destroying the iframe.

Returns

void

Inherited from

Modal.hide


hookMessages

Protected hookMessages(): void

Subclasses must call hookMessages some time before the UI is displayed. A Modal will call this when the open() method is called, where a Panel will need to do this in the constructor to watch for the user opening the panel.

Returns

void

Inherited from

Modal.hookMessages


messageFromFrame

Protected messageFromFrame(message): void

Receives messages sent from the iframe via parent.postMessage(, '*')

Parameters
Name Type Description
message any data sent from the iframe
Returns

void

Inherited from

Modal.messageFromFrame


sendMessage

sendMessage(data): Promise<void>

Send a message to this UI component's iframe via window.postMessage.

Parameters
Name Type Description
data JsonSerializable Data to send to the iframe
Returns

Promise<void>

Inherited from

Modal.sendMessage


show

show(): Promise<void>

Returns

Promise<void>

Inherited from

Modal.show


unhookMessages

Protected unhookMessages(): void

Subclasses must call unhookMessages to allow them to be garbage collected.

Returns

void

Inherited from

Modal.unhookMessages


LucidCardIntegrationRegistry

core/cardintegration/lucidcardintegrationregistry.LucidCardIntegrationRegistry

Constructors

constructor

new LucidCardIntegrationRegistry()

Methods

addCardIntegration

Static addCardIntegration(client, cardIntegration): void

Register a card integration.

Parameters
Name Type
client EditorClient
cardIntegration LucidCardIntegration
Returns

void


registerFieldOptionsCallback

Static registerFieldOptionsCallback(client, callback): string

Parameters
Name Type
client EditorClient
callback (inputSoFar: Map<string, SerializedFieldType >) => Promise< ExtensionCardFieldOption []>
Returns

string


registerFieldSearchCallback

Static registerFieldSearchCallback(client, callback): string

Parameters
Name Type
client EditorClient
callback (searchText: string, inputSoFar: Map<string, SerializedFieldType >) => Promise< ExtensionCardFieldOption []>
Returns

string


MapProxy<KEY, VALUE>

document/mapproxy.MapProxy

A data structure similar to a normal Map which accesses its data through API commands to the Lucid app. This structure is iterable with for...of.

Type parameters

Name
KEY
VALUE

Hierarchy

Constructors

constructor

new MapProxy<KEY, VALUE>(getKeys, getItem)

Type parameters
Name
KEY
VALUE
Parameters
Name Type
getKeys () => KEY[]
getItem (key: KEY) => VALUE

Accessors

size

get size(): number

Returns

number

Methods

filter

filter(filter): VALUE[]

Parameters
Name Type
filter (item: VALUE, key: KEY) => boolean
Returns

VALUE[]


find

find(filter): undefined | VALUE

Parameters
Name Type
filter (item: VALUE, key: KEY) => boolean
Returns

undefined | VALUE


first

first(): undefined | VALUE

Returns

undefined | VALUE


get

get(key): VALUE

Parameters
Name Type
key KEY
Returns

VALUE


keys

keys(): KEY[]

Returns

KEY[]


map

map<T>(callback): T[]

Type parameters
Name
T
Parameters
Name Type
callback (item: VALUE, key: KEY) => T
Returns

T[]


values

values(): Generator<Object, void, unknown>

Returns

Generator<Object, void, unknown>


Menu

ui/menu.Menu

Constructors

constructor

new Menu(client)

Parameters
Name Type
client EditorClient

Methods

addContentDockMenuItem

addContentDockMenuItem(item): void

Create an icon tied to an action (required) that appears in the left toolbar in Lucidspark and Teamspaces (not in Lucidchart).

The action must be registered with EditorClient.registerAction prior to using it in the menu.

Parameters
Name Type Description
item CustomContentDockMenu The definition of the new menu item
Returns

void


addContextMenuItem

addContextMenuItem(item): void

Create a menu in the right click context menu. Appears in both Lucidspark and Lucidchart.

The action must be registered with EditorClient.registerAction prior to using it in the menu.

Parameters
Name Type Description
item CustomMenuConfig The definition of the new menu item
Returns

void


addDropdownMenuItem

addDropdownMenuItem(item): void

Create a menu in the basic drop down top menus. In Lucidspark this will just be under the generic menu. In Lucidchart you can configure this to be in any of the other drop down menus.

The action must be registered with EditorClient.registerAction prior to using it in the menu.

Parameters
Name Type Description
item CustomDropdownMenu The definition of the new menu item
Returns

void


addMenuItem

addMenuItem(item): void

Generic function to create a new menu item to trigger custom code. You can use addDropdownMenuItem, addContextMenuItem, or addContentDockMenuItem for easier to use entrypoints.

The action must be registered with EditorClient.registerAction prior to using it in the menu.

Parameters
Name Type Description
item CustomMenuItem The definition of the new menu item
Returns

void


MockDataConnectorClient

dataconnector/dataconnectorclient.MockDataConnectorClient

Use this for writing automated tests for your data connector

Hierarchy

Constructors

constructor

new MockDataConnectorClient()

Overrides

DataConnectorClient.constructor

Properties

dataSourceClient

Readonly dataSourceClient: MockDataSourceClient

set properties on this to modify how data source updates are mocked


urls

urls: Object = LUCID_URLS

Type declaration
Name Type
api string
main string
Inherited from

DataConnectorClient.urls

Methods

getPublicKey

getPublicKey(): Promise<string>

Mocked version returns an empty string

Returns

Promise<string>

Overrides

DataConnectorClient.getPublicKey


getSignatureValidator

getSignatureValidator(): Promise< SignatureValidator >

Mocked version just always returns successful

Returns

Promise< SignatureValidator >

Overrides

DataConnectorClient.getSignatureValidator


parseActions

parseActions(url, headers, actions): Promise<undefined | DataConnectorAction []>

Validate and parse an action request from Lucid

Parameters
Name Type
url string
headers Record<string, unknown>
actions unknown
Returns

Promise<undefined | DataConnectorAction []>

Inherited from

DataConnectorClient.parseActions


MockDataSourceClient

dataconnector/datasourceclient.MockDataSourceClient

A version of the DataSourceClient that you can use for any automated tests of your data connector. Modify the gotUpdate field to change the behaviour of the update method.

Hierarchy

Constructors

constructor

new MockDataSourceClient()

Overrides

DataSourceClient.constructor

Properties

gotMetadata

gotMetadata: (keys: string[], prefixes: string[]) => MetadataRecord []

Type declaration

▸ (keys, prefixes): MetadataRecord []

Assign this to your mocked update function

Parameters
Name Type
keys string[]
prefixes string[]
Returns

MetadataRecord []


gotUpdate

gotUpdate: (request: DataSourceRequest ) => void

Type declaration

▸ (request): void

Assign this to your mocked update function

Parameters
Name Type
request DataSourceRequest
Returns

void


patchedMetadata

patchedMetadata: (patches: MetadataPatch []) => MetadataPatchResponse

Type declaration

▸ (patches): MetadataPatchResponse

Assign this to your mocked update function

Parameters
Name Type
patches MetadataPatch []
Returns

MetadataPatchResponse


MockSignatureValidator

dataconnector/signaturevalidator.MockSignatureValidator

Mock signature validator, always returns true.

Constructors

constructor

new MockSignatureValidator()

Methods

validate

validate(): boolean

Returns

boolean


Modal

ui/modal.Modal

Extend this class to show a custom modal to the user, whose contents are displayed in a sandboxed iframe controlled by your extension.

To pass a message to a script running in the modal, call sendMessage. The data you pass in will be sent to the iframe with window.postMessage.

To pass messages back from the modal to this class, call parent.postMessage from within the iframe. The data sent will be passed along to the messageFromFrame implementation on your Modal class.

Hierarchy

Constructors

constructor

new Modal(client, config)

Parameters
Name Type
client EditorClient
config ModalConfig
Overrides

IframeUI.constructor

Properties

client

Protected Readonly client: EditorClient

Inherited from

IframeUI.client


framePosition

Protected framePosition: Object

The location of this frame within the top-level browser window. This is always updated immediately before messageFromFrame is called.

Type declaration
Name Type
h number
w number
x number
y number
Inherited from

IframeUI.framePosition


loaded

Protected loaded: boolean = false

True after the iframe has fired an onload event (not all scripts are necessarily finished executing)

Inherited from

IframeUI.loaded


messageActionName

Protected messageActionName: string

Inherited from

IframeUI.messageActionName

Methods

frameClosed

Protected frameClosed(): void

Called when the iframe has been removed from the DOM

Returns

void

Overrides

IframeUI.frameClosed


frameLoaded

Protected frameLoaded(): void

Called when the iframe has been constructed, its srcdoc set, and the window loaded event has fired

Returns

void

Inherited from

IframeUI.frameLoaded


hide

hide(): void

If this modal is currently visible, close it, destroying the iframe.

Returns

void


hookMessages

Protected hookMessages(): void

Subclasses must call hookMessages some time before the UI is displayed. A Modal will call this when the open() method is called, where a Panel will need to do this in the constructor to watch for the user opening the panel.

Returns

void

Inherited from

IframeUI.hookMessages


messageFromFrame

Protected messageFromFrame(message): void

Receives messages sent from the iframe via parent.postMessage(, '*')

Parameters
Name Type Description
message any data sent from the iframe
Returns

void

Inherited from

IframeUI.messageFromFrame


sendMessage

sendMessage(data): Promise<void>

Send a message to this UI component's iframe via window.postMessage.

Parameters
Name Type Description
data JsonSerializable Data to send to the iframe
Returns

Promise<void>

Inherited from

IframeUI.sendMessage


show

show(): Promise<void>

Returns

Promise<void>


unhookMessages

Protected unhookMessages(): void

Subclasses must call unhookMessages to allow them to be garbage collected.

Returns

void

Inherited from

IframeUI.unhookMessages


NDimensionalFieldTypeArray

core/data/fieldtypedefinition/ndimensionalfieldtypearray.NDimensionalFieldTypeArray

Constructors

constructor

new NDimensionalFieldTypeArray(validTypesArray)

Parameters
Name Type
validTypesArray ( ScalarFieldTypeEnum | LiteralFieldType )[]

Properties

validTypesArray

Readonly validTypesArray: ( ScalarFieldTypeEnum | LiteralFieldType )[]

Methods

getInnerNonArrayTypes

getInnerNonArrayTypes(): ( ScalarFieldTypeEnum | LiteralFieldType )[]

Returns

( ScalarFieldTypeEnum | LiteralFieldType )[]


getInnerTypes

getInnerTypes(): ( ScalarFieldTypeEnum | LiteralFieldType | NDimensionalFieldTypeArray )[]

Returns

( ScalarFieldTypeEnum | LiteralFieldType | NDimensionalFieldTypeArray )[]


toJSON

toJSON(): SerializedNDimensionalFieldTypeArray

Returns

SerializedNDimensionalFieldTypeArray


PageProxy

document/pageproxy.PageProxy

One page in the current Lucid document

Hierarchy

Constructors

constructor

new PageProxy(id, client)

Parameters
Name Type Description
id string The ID of this page
client EditorClient
Overrides

ElementProxy.constructor

Properties

allBlocks

Readonly allBlocks: MapProxy <string, BlockProxy >

The blocks contained on this page, including ones inside groups


allGroups

Readonly allGroups: MapProxy <string, GroupProxy >

The groups contained on this page, including ones inside groups


allItems

Readonly allItems: MapProxy <string, BlockProxy | LineProxy | GroupProxy >

All blocks, lines, and groups on the page, including ones inside groups


allLines

Readonly allLines: MapProxy <string, LineProxy >

The lines contained on this page, including ones inside groups


allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

ElementProxy.allShapeData


blocks

Readonly blocks: MapProxy <string, BlockProxy >

The blocks contained directly on this page, not including ones inside groups


client

Protected Readonly client: EditorClient

Inherited from

ElementProxy.client


groups

Readonly groups: MapProxy <string, GroupProxy >

The groups contained directly on this page, not including ones inside groups


id

Readonly id: string

Inherited from

ElementProxy.id


lines

Readonly lines: MapProxy <string, LineProxy >

The lines contained directly on this page, not including ones inside groups


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

ElementProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

ElementProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

ElementProxy.shapeData

Methods

addBlock

addBlock(def): BlockProxy

Add a new block to this page.

IMPORTANT: Because code for block classes are loaded incrementally, you MUST call EditorClient.loadBlockClasses with the given block class name (and wait for it to resolve) before attempting to create a block. If you don't, an error will be thrown.

Parameters
Name Type Description
def BlockDefinition The definition of the new block to add
Returns

BlockProxy

The added block


addDiagramFromMermaid

addDiagramFromMermaid(diagramType, mermaid, origin?, exactPlacement?): Promise<( BlockProxy | LineProxy | GroupProxy )[]>

Add a diagram described by Mermaid markup to this page.

See https://mermaid.js.org/intro/syntax-reference.html for information on Mermaid markup syntax.

Parameters
Name Type Description
diagramType FLOWCHART The type of the diagram. Note that this is redundant because the Mermaid markup also contains the diagram type.
mermaid string Mermaid markup text describing the diagram to add.
origin? Point Where to place the diagram on the page. If absent some free space within or near the current viewport is automatically chosen.
exactPlacement? boolean If true and if origin is specified, places the diagram exactly at the specified origin instead of trying to find free space.
Returns

Promise<( BlockProxy | LineProxy | GroupProxy )[]>

An array of the proxies for all the objects in the added diagram.


addImage

addImage(def): Promise< BlockProxy >

Add a new image to this page.

Parameters
Name Type Description
def ImageDefinition The definition of the new image to add
Returns

Promise< BlockProxy >

The added image


addLine

addLine(def): LineProxy

Add a new line to this page.

Parameters
Name Type Description
def LineDefinition The definition of the new line to add
Returns

LineProxy

The added line


applyRuleToAllItems

applyRuleToAllItems(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to all items on this page
Returns

void


delete

delete(): void

Delete this page from the document if possible

Returns

void


duplicate

duplicate(): Promise<void>

Duplicates the page represented by the page proxy

Returns

Promise<void>


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

ElementProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

ElementProxy.exists


findAvailableSpace

findAvailableSpace(searchX, searchY, width, height): Object

Find available space on this page for adding new content.

Parameters
Name Type Description
searchX number Place to start the search
searchY number Place to start the search
width number
height number
Returns

Object

a reference to the page and origin (upper-left point) of the space you can add new content of the given size to.

Name Type
page PageProxy
x number
y number

findItems

findItems(boundingBox, searchType): ( BlockProxy | LineProxy | GroupProxy )[]

Parameters
Name Type Description
boundingBox Box An area of this page to search for blocks, lines, and groups
searchType GetItemsAtSearchType
Returns

( BlockProxy | LineProxy | GroupProxy )[]

Items in the given bounding box, based on the search type


getLLMContextForItems

getLLMContextForItems(items, contextType?): Object

Parameters
Name Type Default value
items ItemProxy [] undefined
contextType GetLLMContextType GetLLMContextType.Relational
Returns

Object

A string representing the content of the items provided, including immediate surrounding context if necessary, in a format that is easily understandable by LLMs like ChatGPT. Also a map of IDs, from the shortened IDs provided for the items in the context to the actual Lucid item IDs.

Name Type
idToLucidId Map<string, string>
prompt string

getPageNumber

getPageNumber(): number

Returns

number

the page number of this page


getRulesAppliedToAllItems

getRulesAppliedToAllItems(): RuleProxy []

Returns

RuleProxy []

All conditional formatting rules that are applied to every item on this page


getSvg

getSvg(items?, includeBackground?, viewBox?): GetSvgResult

Parameters
Name Type Default value Description
items? ItemProxy [] undefined If specified, only include these items in the resulting SVG
includeBackground boolean false If true, include the background of the page in the SVG. Otherwise the background is transparent.
viewBox? Box undefined If specified, crop the resulting SVG to the specified bounding box in page coordinates
Returns

GetSvgResult

A promise resolving to an SVG string


getTitle

getTitle(): string

Returns

string

the title of this page


groupBlocks

groupBlocks(blocks): GroupProxy

Creates a new group from a list of items.

Parameters
Name Type Description
blocks BlockProxy [] A non-empty array of items to group
Returns

GroupProxy

The added group


importLinks(links): Promise<void>

Import links onto this page as link unfurl blocks

NOTE: links will be unfurled by Lucid based on extensions installed by user

Parameters
Name Type Description
links string[] links to be imported onto the canvas as link unfurl blocks
Returns

Promise<void>


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

ElementProxy.removeReferenceKey


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

ElementProxy.setReferenceKey


setTitle

setTitle(title): void

Updates the page of this page

Parameters
Name Type Description
title string The new title for this page
Returns

void


unapplyRuleToAllItems

unapplyRuleToAllItems(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from the list applied to all items on this page
Returns

void


Panel

ui/panel.Panel

Extend this class to show a custom panel to the user, whose contents are displayed in a sandboxed iframe controlled by your extension.

To pass a message to a script running in the panel, call sendMessage. The data you pass in will be sent to the iframe with window.postMessage.

To pass messages back from the panel to this class, call parent.postMessage from within the iframe. The data sent will be passed along to the messageFromFrame implementation on your Panel class.

Hierarchy

Constructors

constructor

new Panel(client, config)

Parameters
Name Type
client EditorClient
config PanelConfig
Overrides

IframeUI.constructor

Properties

client

Protected Readonly client: EditorClient

Inherited from

IframeUI.client


config

Protected Readonly config: PanelConfig


framePosition

Protected framePosition: Object

The location of this frame within the top-level browser window. This is always updated immediately before messageFromFrame is called.

Type declaration
Name Type
h number
w number
x number
y number
Inherited from

IframeUI.framePosition


loaded

Protected loaded: boolean = false

True after the iframe has fired an onload event (not all scripts are necessarily finished executing)

Inherited from

IframeUI.loaded


messageActionName

Protected messageActionName: string

Inherited from

IframeUI.messageActionName

Methods

frameClosed

Protected frameClosed(): void

Called when the iframe has been removed from the DOM

Returns

void

Inherited from

IframeUI.frameClosed


frameLoaded

Protected frameLoaded(): void

Called when the iframe has been constructed, its srcdoc set, and the window loaded event has fired

Returns

void

Inherited from

IframeUI.frameLoaded


hide

hide(): void

Hide this panel if the panel is in the rightDock and it is currently visible.

Returns

void


hookMessages

Protected hookMessages(): void

Subclasses must call hookMessages some time before the UI is displayed. A Modal will call this when the open() method is called, where a Panel will need to do this in the constructor to watch for the user opening the panel.

Returns

void

Inherited from

IframeUI.hookMessages


messageFromFrame

Protected messageFromFrame(message): void

Receives messages sent from the iframe via parent.postMessage(, '*')

Parameters
Name Type Description
message any data sent from the iframe
Returns

void

Inherited from

IframeUI.messageFromFrame


sendMessage

sendMessage(data): Promise<void>

Send a message to this UI component's iframe via window.postMessage.

Parameters
Name Type Description
data JsonSerializable Data to send to the iframe
Returns

Promise<void>

Inherited from

IframeUI.sendMessage


show

show(): void

Show this panel if the panel is in the rightDock and it is not already visible.

Returns

void


unhookMessages

Protected unhookMessages(): void

Subclasses must call unhookMessages to allow them to be garbage collected.

Returns

void

Inherited from

IframeUI.unhookMessages


Patch

dataconnector/actions/action.Patch

A patch to be applied against the 3rd party datasource with changes coming from Lucid

Constructors

constructor

new Patch(id, itemsAdded, itemsChanged, itemsDeleted, itemOrderChanged, syncSourceId, syncCollectionId)

Parameters
Name Type Description
id string The id of the patch
itemsAdded PatchItems Mapping of item primary keys to new items introduced by Lucid
itemsChanged PatchItems Mapping of item primary keys to sparse changesets of pre-existing items changed by Lucid
itemsDeleted string[] List of item primary keys deleted by Lucid
itemOrderChanged undefined | [string, null | string][]
syncSourceId string The syncSourceId of the changed data source
syncCollectionId string The syncCollectionId of the changed collection

Properties

id

id: string

The id of the patch


itemOrderChanged

itemOrderChanged: undefined | [string, null | string][]


itemsAdded

itemsAdded: PatchItems

Mapping of item primary keys to new items introduced by Lucid


itemsChanged

itemsChanged: PatchItems

Mapping of item primary keys to sparse changesets of pre-existing items changed by Lucid


itemsDeleted

itemsDeleted: string[]

List of item primary keys deleted by Lucid


syncCollectionId

syncCollectionId: string

The syncCollectionId of the changed collection


syncSourceId

syncSourceId: string

The syncSourceId of the changed data source

Methods

getChange

getChange(collections?): PatchChange

Parameters
Name Type Default value
collections PatchChangeCollection [] []
Returns

PatchChange


toJSON

toJSON(): object

Returns

object


PatchChange

dataconnector/actions/patchresponsebody.PatchChange

Reports a completed change back to Lucid

Constructors

constructor

new PatchChange(patchId, syncId, collections)

Parameters
Name Type
patchId string
syncId string
collections PatchChangeCollection []

Properties

collections

collections: PatchChangeCollection []


patchId

patchId: string


syncId

syncId: string

Methods

getErrors

getErrors(): Record<string, Record<string, string>>

Returns

Record<string, Record<string, string>>


setError

setError(primaryKey, fieldName, error): void

Parameters
Name Type
primaryKey string
fieldName string
error string
Returns

void


setTooltipError

setTooltipError(primaryKey, error): void

Parameters
Name Type
primaryKey string
error string
Returns

void


PatchCollectionProxy

data/patchcollectionproxy.PatchCollectionProxy

Constructors

constructor

new PatchCollectionProxy(client, branchedCollection, patchCollection, originalCollection)

Use CollectionProxy.getLocalChanges() to get a PatchCollectionProxy rather than constructing one directly.

Parameters
Name Type
client EditorClient
branchedCollection CollectionProxy
patchCollection CollectionProxy
originalCollection CollectionProxy

Methods

getAddedItems

getAddedItems(): DataItemProxy []

Returns

DataItemProxy []

all data items that have been added to this collection locally, but that have not yet been synced back to the external data source.


getChangedItems

getChangedItems(): PatchedDataItemProxy []

Returns

PatchedDataItemProxy []

all data items that have been changed locally, but that have not yet been synced back to the external data source.


getDeletedItems

getDeletedItems(): DataItemProxy []

Returns

DataItemProxy []

all data items that were deleted from this collection locally, but that have not yet been deleted in the external data source.


PatchedDataItemProxy

data/patchcollectionproxy.PatchedDataItemProxy

One data item in a collection, consisting of key-value pairs

Hierarchy

Constructors

constructor

new PatchedDataItemProxy(primaryKey, collection, changedFields, original, client)

Parameters
Name Type Description
primaryKey string -
collection CollectionProxy -
changedFields string[] The names of all fields that have been changed locally on this data item and not yet synced back to the external data source.
original DataItemProxy The original data item, before local changes. You can query the original values for the changedFields from this data item.
client EditorClient -
Overrides

DataItemProxy.constructor

Properties

changedFields

Readonly changedFields: string[]

The names of all fields that have been changed locally on this data item and not yet synced back to the external data source.


collection

Readonly collection: CollectionProxy

Inherited from

DataItemProxy.collection


fields

Readonly fields: MapProxy <string, SerializedFieldType >

The fields on this data item, organized by their name.

Inherited from

DataItemProxy.fields


original

Readonly original: DataItemProxy

The original data item, before local changes. You can query the original values for the changedFields from this data item.


primaryKey

Readonly primaryKey: string

Inherited from

DataItemProxy.primaryKey

Methods

exists

exists(): boolean

Returns

boolean

True if a data item exists in this collection at this primary key

Inherited from

DataItemProxy.exists


PropertyStoreProxy

document/propertystoreproxy.PropertyStoreProxy

Base class for anything on a Lucid document that has an ID and properties.

Hierarchy

Constructors

constructor

new PropertyStoreProxy(id, client)

Parameters
Name Type Description
id string ID of this element
client EditorClient

Properties

client

Protected Readonly client: EditorClient


id

Readonly id: string


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.


ReferenceKeyProxy

data/referencekeyproxy.ReferenceKeyProxy

Constructors

constructor

new ReferenceKeyProxy(elementId, key, client, settings)

Parameters
Name Type
elementId undefined | string
key string | number
client EditorClient
settings SerializedReferenceKeyType

Properties

elementId

Readonly elementId: undefined | string


key

Readonly key: string | number

Accessors

collectionId

get collectionId(): undefined | string

Returns

undefined | string


definition

get definition(): ReferenceKeyDefinition

Returns

ReferenceKeyDefinition


primaryKey

get primaryKey(): undefined | string

Returns

undefined | string

Methods

getItem

getItem(): DataItemProxy

Returns

DataItemProxy


RekeyingMap

dataconnector/itemrekeyer.RekeyingMap

Constructors

constructor

new RekeyingMap(map)

Parameters
Name Type
map Map<string, null | string>

Properties

map

map: Map<string, null | string>

Methods

getNewKey

getNewKey(key): string

Parameters
Name Type
key string
Returns

string


getRecordWithNewKeys

getRecordWithNewKeys(items): PatchItems

Parameters
Name Type
items PatchItems
Returns

PatchItems


getRekeyedPatch

getRekeyedPatch(patch): Patch

Parameters
Name Type
patch Patch
Returns

Patch


RuleCondition

document/documentelement/ruleproxy.RuleCondition

Constructors

constructor

new RuleCondition(rule, client, key)

Parameters
Name Type
rule RuleProxy
client EditorClient
key string

Properties

condition

Readonly condition: Conditions

If this.type == ConditionType.Text, this is a TextConditions. If this.type == ConditionType.ShapeData, this is a ShapeDataConditions. If this.type == ConditionType.ShapeType, this is a ShapeTypeConditions. If this.type == ConditionType.ConnectedShapes, this is a ConnectedShapesConditions.


field

Readonly field: undefined | string

For shape data conditions, the name of the shape data field to test


fieldLabel

Readonly fieldLabel: undefined | string

For shape data conditions, the name to display to the end user to identify the field name


key

Readonly key: string


rule

Readonly rule: RuleProxy


type

Readonly type: ConditionType

What kind of condition is this? e.g. a formula evaluation, checking for non-empty text, etc.


value

Readonly value: ConditionValueType

For formula conditions, the formula string.

For other conditions,the value against which the condition is tested. For example, a condition with type = ConditionType.ShapeData condition = ShapeDataConditions.GreaterThan field = 'TheField' value = 14

will trigger when the shape data field "TheField" has a value that is greater than 14.

Methods

update

update(definition): void

Update this condition to reflect a new definition

Parameters
Name Type
definition ConditionDefinition
Returns

void


RuleEffect

document/documentelement/ruleproxy.RuleEffect

Constructors

constructor

new RuleEffect(rule, client, key)

Parameters
Name Type
rule RuleProxy
client EditorClient
key string

Properties

combination

Readonly combination: ConditionCombination

How multiple conditions are combined (AND vs OR)


conditions

Readonly conditions: MapProxy <string, RuleCondition >


dataGraphic

Readonly dataGraphic: undefined | { color: undefined | string ; image: undefined | { h: number ; url: string ; w: number } ; index: number ; position: BadgeEnumPosition ; set: DataGraphicIconSets }

For formatType = RuleFormattingType.DATA_GRAPHICS, a description of which icon appears and where


formatType

Readonly formatType: RuleFormattingType

What kind of effect is displayed? Formatting vs. icons vs. dynamic stencil, etc.


formatting

Readonly formatting: SerializedFormatting

For formatType = RuleFormattingType.FORMATTING, what styles are applied to blocks, lines, and pages?


key

Readonly key: string


rule

Readonly rule: RuleProxy

Methods

update

update(definition): void

Update this effect to reflect a new definition

Parameters
Name Type
definition EffectDefinition
Returns

void


RuleProxy

document/documentelement/ruleproxy.RuleProxy

Base class for anything on a Lucid document that has an ID and properties.

Hierarchy

Constructors

constructor

new RuleProxy(id, client)

Parameters
Name Type Description
id string The ID of this conditional formatting rule
client EditorClient
Overrides

DocumentElementProxy.constructor

Properties

client

Protected Readonly client: EditorClient

Inherited from

DocumentElementProxy.client


effects

Readonly effects: MapProxy <string, RuleEffect >


id

Readonly id: string

Inherited from

DocumentElementProxy.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

DocumentElementProxy.properties

Methods

delete

delete(): void

Delete this conditional formatting rule from the document

Returns

void


getName

getName(): string

Returns

string


getOrder

getOrder(): number

Returns

number


setName

setName(name): void

Parameters
Name Type
name string
Returns

void


update

update(definition): void

Update this rule to reflect a new definition

Parameters
Name Type
definition RuleDefinition
Returns

void


ShapeDataProxy

document/shapedataproxy.ShapeDataProxy

The shape data fields on a single element of the current document

Hierarchy

Constructors

constructor

new ShapeDataProxy(id, client)

Parameters
Name Type Description
id undefined | string The ID of the element, or undefined for the document itself
client EditorClient
Overrides

WriteableMapProxy.constructor

Properties

client

Protected Readonly client: EditorClient


id

Readonly id: undefined | string

Accessors

size

get size(): number

Returns

number

Inherited from

WriteableMapProxy.size

Methods

addInheritable

addInheritable(name, value): void

Add shape data to this element that is inherited by its descendants.

If you add an inheritable shape data to a page, whose formula is "=@Cost * 4", then each item on that page will have a new shape data entry (in allShapeData) by that name with the value calculated in the context of that individual item.

Inheritable shape data on a page affects all items on the page. Inheritable shape data on a group affects all items inside that group.

Parameters
Name Type Description
name string Name of the new shape data
value string Value (or formula, if starting with "=") of the new shape data
Returns

void


delete

delete(key): void

Delete the specified shape data from this element

Parameters
Name Type
key string
Returns

void


filter

filter(filter): ( SerializedFieldType | SerializedDataError )[]

Parameters
Name Type
filter (item: SerializedFieldType | SerializedDataError , key: string) => boolean
Returns

( SerializedFieldType | SerializedDataError )[]

Inherited from

WriteableMapProxy.filter


find

find(filter): SerializedFieldType | SerializedDataError

Parameters
Name Type
filter (item: SerializedFieldType | SerializedDataError , key: string) => boolean
Returns

SerializedFieldType | SerializedDataError

Inherited from

WriteableMapProxy.find


first

first(): SerializedFieldType | SerializedDataError

Returns

SerializedFieldType | SerializedDataError

Inherited from

WriteableMapProxy.first


get

get(key): SerializedFieldType | SerializedDataError

Parameters
Name Type
key string
Returns

SerializedFieldType | SerializedDataError

Inherited from

WriteableMapProxy.get


getString

getString(key): string

Parameters
Name Type Description
key string Name of the shape data to read
Returns

string

The value if it is a string, or an empty string if it does not exist or is not a string.


keys

keys(): string[]

Returns

string[]

Inherited from

WriteableMapProxy.keys


map

map<T>(callback): T[]

Type parameters
Name
T
Parameters
Name Type
callback (item: SerializedFieldType | SerializedDataError , key: string) => T
Returns

T[]

Inherited from

WriteableMapProxy.map


set

set(key, value, options?): void

Parameters
Name Type
key string
value SerializedFieldType | SerializedDataError
options SetterOptions
Returns

void

Inherited from

WriteableMapProxy.set


values

values(): Generator<null | string | number | boolean | SerializedMillisecondsDateObject | SerializedIsoDateObject | SerializedTimeObject | SerializedColorObjectFieldType | NestedSerializedLucidDictionary | JSONSerializedLucidDictionary | SerializedLucidCurrency | SerializedFieldType [] | SerializedDataError , void, unknown>

Returns

Generator<null | string | number | boolean | SerializedMillisecondsDateObject | SerializedIsoDateObject | SerializedTimeObject | SerializedColorObjectFieldType | NestedSerializedLucidDictionary | JSONSerializedLucidDictionary | SerializedLucidCurrency | SerializedFieldType [] | SerializedDataError , void, unknown>

Inherited from

WriteableMapProxy.values


ShapeLegendEntryProxy

document/blockclasses/legendblockproxy.ShapeLegendEntryProxy

Hierarchy

Constructors

constructor

new ShapeLegendEntryProxy(legend, index)

Parameters
Name Type
legend LegendBlockProxy
index number
Overrides

LegendEntryProxy.constructor

Properties

index

Readonly index: number

Inherited from

LegendEntryProxy.index


legend

Protected Readonly legend: LegendBlockProxy

Inherited from

LegendEntryProxy.legend


type

Readonly type: LegendItemType

Inherited from

LegendEntryProxy.type

Methods

getText

getText(): string

Returns

string

Inherited from

LegendEntryProxy.getText


setText

setText(text): void

Parameters
Name Type
text string
Returns

void

Inherited from

LegendEntryProxy.setText


SignatureValidator

dataconnector/signaturevalidator.SignatureValidator

Allows validation that requests originated from Lucid. This class can only be instanciated in a NodeJS environment. Technically any environment that provides NodeJS compatible implementations of globalThis.Buffer and globalThis.require('crypto') will work.

Constructors

constructor

new SignatureValidator(dependencies, publicKey)

Parameters
Name Type
dependencies CryptoDependencies
publicKey string

Methods

validate

validate(body, headers, url): boolean

Validate a given request came from Lucid.

Parameters
Name Type Description
body unknown The body of the request as a plain JavaScript object. This should be JSON.parse called on exactly the request body that came from Lucid.
headers Object The headers that are associated with the request. Only 'x-lucid-rsa-nonce' and 'x-lucid-signature' are required.
headers.x-lucid-rsa-nonce string -
headers.x-lucid-signature string -
url string The url of the current endpoint that is being requested.
Returns

boolean

true if the request is valid


SwimLaneBlockProxy

document/blockclasses/swimlaneblockproxy.SwimLaneBlockProxy

A block is a single shape on the document. A BlockProxy provides an interface to read and write the content of an existing block, and is typically accessed through PageProxy.blocks or another similar mechanism.

Hierarchy

Constructors

constructor

new SwimLaneBlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

BlockProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

BlockProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

BlockProxy.client


id

Readonly id: string

Inherited from

BlockProxy.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

BlockProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

BlockProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

BlockProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textStyles


classNameRegex

Static classNameRegex: RegExp

Methods

applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

BlockProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

BlockProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

BlockProxy.delete


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

BlockProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

BlockProxy.exists


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

BlockProxy.getBoundingBox


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..

Inherited from

BlockProxy.getClassName


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.

Inherited from

BlockProxy.getConnectedLines


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

BlockProxy.getContainers


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.

Inherited from

BlockProxy.getLineWidth


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

BlockProxy.getLocation


getMagnetized

getMagnetized(): boolean

Returns

boolean


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

BlockProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

BlockProxy.getPageId


getPrimaryLaneSizes

getPrimaryLaneSizes(): number[]

Returns

number[]


getPrimaryLanes

getPrimaryLanes(): SwimLanePrimaryLaneProxy []

Returns

SwimLanePrimaryLaneProxy []


getPrimaryLanesVertical

getPrimaryLanesVertical(): boolean

Returns

boolean


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have

Inherited from

BlockProxy.getRotatedBoundingBox


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.

Inherited from

BlockProxy.getRotation


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set

Inherited from

BlockProxy.getShadow


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.

Inherited from

BlockProxy.getSimpleStaticDataGraphic


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void

Inherited from

BlockProxy.linkText


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void

Inherited from

BlockProxy.lockAspectRatio


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

BlockProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

BlockProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

BlockProxy.removeReferenceKey


setBoundingBox

setBoundingBox(bb): void

Swim lanes only use the normal BoundingBox property for location. For size, it uses the PrimaryLane and SecondaryLane properties.

Parameters
Name Type
bb Box
Returns

void

Overrides

BlockProxy.setBoundingBox


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void

Inherited from

BlockProxy.setDataSyncStateIconPosition


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void

Inherited from

BlockProxy.setFillStyle


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void

Inherited from

BlockProxy.setLineWidth


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

BlockProxy.setLocation


setMagnetized

setMagnetized(magnetize): void

Parameters
Name Type
magnetize boolean
Returns

void


setPrimaryLaneSizes

setPrimaryLaneSizes(sizes): void

Parameters
Name Type
sizes number[]
Returns

void


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

BlockProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void

Inherited from

BlockProxy.setRotation


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void

Inherited from

BlockProxy.setShadow


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void

Inherited from

BlockProxy.setSimpleStaticDataGraphic


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

BlockProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void

Inherited from

BlockProxy.unlockAspectRatio


SwimLanePrimaryLaneProxy

document/blockclasses/swimlaneblockproxy.SwimLanePrimaryLaneProxy

Constructors

constructor

new SwimLanePrimaryLaneProxy(swimlane, index)

Parameters
Name Type
swimlane SwimLaneBlockProxy
index number

Properties

index

Readonly index: number


swimlane

Readonly swimlane: SwimLaneBlockProxy

Methods

getBoundingBox

getBoundingBox(): Object

Returns

Object

Name Type
h number
w number
x number
y number

getSize

getSize(): number

For horizontal lanes, the lane height. For vertical lanes, the lane width.

Returns

number


getTitle

getTitle(): string

Returns

string


setFill

setFill(fill): void

Parameters
Name Type
fill SimpleFillStyle
Returns

void


setTitle

setTitle(title): undefined

Parameters
Name Type
title string
Returns

undefined


TableBlockProxy

document/blockclasses/tableblockproxy.TableBlockProxy

A block is a single shape on the document. A BlockProxy provides an interface to read and write the content of an existing block, and is typically accessed through PageProxy.blocks or another similar mechanism.

Hierarchy

Constructors

constructor

new TableBlockProxy(id, client)

Parameters
Name Type Description
id string ID of this item
client EditorClient
Inherited from

BlockProxy.constructor

Properties

allShapeData

Readonly allShapeData: MapProxy <string, SerializedFieldType | DataError >

All shape data accessible on this element, including shape data inherited from the page or a containing group. This collection is read-only.

Inherited from

BlockProxy.allShapeData


client

Protected Readonly client: EditorClient

Inherited from

BlockProxy.client


id

Readonly id: string

Inherited from

BlockProxy.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

BlockProxy.properties


referenceKeys

Readonly referenceKeys: MapProxy <string | number, ReferenceKeyProxy >

The set of reference keys, organized by their ID, which can be either a string or number.

For more information, see the Developer Guide.

Inherited from

BlockProxy.referenceKeys


shapeData

Readonly shapeData: ShapeDataProxy

The shape data set directly on this element (not including any shape data inherited from the page or a containing group).

Inherited from

BlockProxy.shapeData


textAreas

Readonly textAreas: WriteableMapProxy <string, string, undefined, string>

The plain text in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textAreas


textStyles

Readonly textStyles: WriteableMapProxy <string, TextStyle , Promise<undefined>, Partial< TextStyle >>

The text style in each of the text areas on this item, organized by text area name.

Inherited from

BlockProxy.textStyles


classNameRegex

Static classNameRegex: RegExp

Methods

addColumn

addColumn(referenceCell, before?): TableColumnProxy

Parameters
Name Type Default value Description
referenceCell TableCellProxy undefined The cell to add the new column before or after.
before boolean false If true, the new column will be added before the reference cell, otherwise it will be added after.
Returns

TableColumnProxy

The TableColumnProxy for the newly added column.


addRow

addRow(referenceCell, before?): TableRowProxy

Parameters
Name Type Default value Description
referenceCell TableCellProxy undefined The cell to add the new row before or after.
before boolean false If true, the new row will be added before the reference cell, otherwise it will be added after.
Returns

TableRowProxy

The TableRowProxy for the newly added row.


applyRule

applyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to apply to this item
Returns

void

Inherited from

BlockProxy.applyRule


changeZOrder

changeZOrder(operation): void

Parameters
Name Type Description
operation ZOrderOperation How to adjust the Z order of this item relative to the other items it overlaps on the page
Returns

void

Inherited from

BlockProxy.changeZOrder


delete

delete(): void

Delete this item from the document

Returns

void

Inherited from

BlockProxy.delete


deleteColumn

deleteColumn(column): void

Parameters
Name Type Description
column number The index of the column to delete.
Returns

void


deleteRow

deleteRow(row): void

Parameters
Name Type Description
row number The index of the row to delete.
Returns

void


executeFormula

executeFormula(formula): SerializedFieldType | DataError

Execute a formula in the context of this element

Parameters
Name Type Description
formula string The formula text, e.g. "@a + @b" to add together the shape data values a and b.
Returns

SerializedFieldType | DataError

The result of the formula, or an error.

Inherited from

BlockProxy.executeFormula


exists

exists(): boolean

Returns

boolean

true if this element still exists on the document, or false otherwise

Inherited from

BlockProxy.exists


getAutoResizeColumns

getAutoResizeColumns(): boolean

Returns

boolean


getAutoResizeRows

getAutoResizeRows(): boolean

Returns

boolean


getBoundingBox

getBoundingBox(): Box

Returns

Box

The bounding box of this item relative to its containing page. As pages may change size to fit the content on them, note that these coordinates may be negative or very large.

If this is a rotated block, the bounding box returned here is where the block would be if it were unrotated.

Inherited from

BlockProxy.getBoundingBox


getCellByTextAreaKey

getCellByTextAreaKey(textAreaKey): undefined | TableCellProxy

Parameters
Name Type Description
textAreaKey string The text area key of a cell in the table
Returns

undefined | TableCellProxy

The TableCellProxy represented by the text area key, or undefined if the text area key does not exist in the table.


getClassName

getClassName(): string

Returns

string

The class name of this block. This name is not necessarily human-readable, and will remain consistent over time, e.g. "ProcessBlock"..

Inherited from

BlockProxy.getClassName


getColumnCount

getColumnCount(): number

Returns

number


getColumnWidths

getColumnWidths(): number[]

Returns

number[]


getConnectedLines

getConnectedLines(): LineProxy []

Returns

LineProxy []

An array of lines that have one or both endpoints connected to this block.

Inherited from

BlockProxy.getConnectedLines


getContainers

getContainers(): BlockProxy []

Returns

BlockProxy []

An array of blocks whose bounding boxes contain this item's upper-left corner

Inherited from

BlockProxy.getContainers


getLineWidth

getLineWidth(): number

Returns

number

The line width used by most kinds of blocks to render their outline.

Inherited from

BlockProxy.getLineWidth


getLocation

getLocation(): Object

Returns

Object

The x/y location of this item

Name Type
x number
y number
Inherited from

BlockProxy.getLocation


getPage

getPage(): PageProxy

Returns

PageProxy

The page containing this item

Inherited from

BlockProxy.getPage


getPageId

getPageId(): string

Returns

string

The ID of the page containing this item

Inherited from

BlockProxy.getPageId


getRotatedBoundingBox

getRotatedBoundingBox(): Box

Returns

Box

An axis-aligned bounding box containing this full item after any rotation it might have

Inherited from

BlockProxy.getRotatedBoundingBox


getRotation

getRotation(): number

Returns

number

The amount this block is rotated around its own center, in radians.

Inherited from

BlockProxy.getRotation


getRowCount

getRowCount(): number

Returns

number


getRowHeights

getRowHeights(): number[]

Returns

number[]


getRows

getRows(): TableRowProxy []

Returns

TableRowProxy []


getShadow

getShadow(): undefined | Shadow

Returns

undefined | Shadow

The current drop shadow on this block, or undefined if no shadow is set

Inherited from

BlockProxy.getShadow


getSimpleStaticDataGraphic

getSimpleStaticDataGraphic(): undefined | SimpleStaticDataGraphicSettings

Returns

undefined | SimpleStaticDataGraphicSettings

Settings for the simple static data graphic currently set on this block, or undefined if no simple data graphic is currently set. Note that if a data graphic exists that is not an icon, this will return undefined. This function will not consider data graphics set via conditional formatting rules.

Inherited from

BlockProxy.getSimpleStaticDataGraphic


linkText

linkText(textAreaKey, referenceKey, field): void

Link a text area to a data field, so that editing the text area will also update the associated data, and vice versa.

To use this, first establish a reference key on this block with setReferenceKey.

Parameters
Name Type
textAreaKey string
referenceKey string | number
field string
Returns

void

Inherited from

BlockProxy.linkText


lockAspectRatio

lockAspectRatio(): void

Lock this block's aspect ratio to its current value. This can be reversed with unlockAspectRatio.

Returns

void

Inherited from

BlockProxy.lockAspectRatio


measureText

measureText(name, maxWidth): MeasureTextResult

Measure the amount of space necessary to render the text in the given text area, given a width to measure that text within.

Parameters
Name Type Description
name string Name of the text area whose content we should measure
maxWidth number Width of the area in which to measure this text. The result will usually be no wider than this, but if a single word is long enough to go beyond this maxWidth, the width of that word will be returned.
Returns

MeasureTextResult

The size of rectangle necessary to render this text area's content.

Inherited from

BlockProxy.measureText


offset

offset(type, offset): void

Offset this item in the given direction by the given amount.

Parameters
Name Type Description
type LinearOffsetType The type of offset to apply to this item
offset Point The amount to offset
Returns

void

Inherited from

BlockProxy.offset


removeReferenceKey

removeReferenceKey(key): void

Remove the specified reference key from this element.

Parameters
Name Type
key string | number
Returns

void

Inherited from

BlockProxy.removeReferenceKey


setAutoResizeColumns

setAutoResizeColumns(auto): void

Parameters
Name Type
auto boolean
Returns

void


setAutoResizeRows

setAutoResizeRows(auto): void

Parameters
Name Type
auto boolean
Returns

void


setBoundingBox

setBoundingBox(bb): void

Attempts to move and resize this item to fit into the given bounding box. If this item (or another item it contains) has size or aspect ratio restrictions, it may not be possible to fit the requested location exactly.

This is done by moving this item to the requested location, then attempting to resize it from the bottom-right corner to the requested size.

Parameters
Name Type Description
bb Box The bounding box to attempt to make this item fill
Returns

void

Inherited from

BlockProxy.setBoundingBox


setColumnWidths

setColumnWidths(widths): void

Parameters
Name Type
widths number[]
Returns

void


setDataSyncStateIconPosition

setDataSyncStateIconPosition(position): void

Parameters
Name Type Description
position undefined | BadgeEnumPosition The postion where the data sync state icon should be displayed on the block. If this position is set to undefined then the state icon position will fallback to the default position for the block.
Returns

void

Inherited from

BlockProxy.setDataSyncStateIconPosition


setFillStyle

setFillStyle(fillStyle): void

Set the fill style used (by most kinds of blocks) to fill in their main opaque areas. This can be a string color (e.g. '#ff00ff80') or an image fill.

Parameters
Name Type
fillStyle SimpleFillStyle
Returns

void

Inherited from

BlockProxy.setFillStyle


setInsetMargin

setInsetMargin(margin): void

Parameters
Name Type Description
margin number The inset margin to be used, it control the margin for each table cell.
Returns

void


setLineWidth

setLineWidth(width): void

Parameters
Name Type Description
width number The line width to be used (by most kinds of blocks) to render this block's outline
Returns

void

Inherited from

BlockProxy.setLineWidth


setLocation

setLocation(location): void

Moves this item so that its upper-left corner is positioned at the given location (prior to any rotation)

Parameters
Name Type Description
location Point The target location
Returns

void

Inherited from

BlockProxy.setLocation


setReferenceKey

setReferenceKey(key, settings): void

Set a reference key on this element, replacing any existing reference at the specified key.

Parameters
Name Type
key string | number
settings ReferenceKeyDefinition
Returns

void

Inherited from

BlockProxy.setReferenceKey


setRotation

setRotation(radians): void

Parameters
Name Type Description
radians number Angle the block should be rotated
Returns

void

Inherited from

BlockProxy.setRotation


setRowHeights

setRowHeights(heights): void

Parameters
Name Type
heights number[]
Returns

void


setShadow

setShadow(shadow): void

Parameters
Name Type Description
shadow undefined | Shadow The drop shadow to set on the block, or undefined to clear the drop shadow
Returns

void

Inherited from

BlockProxy.setShadow


setSimpleStaticDataGraphic

setSimpleStaticDataGraphic(settings): void

Parameters
Name Type Description
settings undefined | SimpleStaticDataGraphicSettings Information about the static data graphic icon to set on this block.
Returns

void

Inherited from

BlockProxy.setSimpleStaticDataGraphic


unapplyRule

unapplyRule(rule): void

Parameters
Name Type Description
rule RuleProxy Rule to remove from this item
Returns

void

Inherited from

BlockProxy.unapplyRule


unlockAspectRatio

unlockAspectRatio(): void

Unlock the aspect ratio of this block, allowing it to be stretched vertically or horizontally independently.

Returns

void

Inherited from

BlockProxy.unlockAspectRatio


TableCellProxy

document/blockclasses/tableblockproxy.TableCellProxy

Constructors

constructor

new TableCellProxy(table, row, column)

Parameters
Name Type
table TableBlockProxy
row number
column number

Properties

column

Readonly column: number


row

Readonly row: number


table

Readonly table: TableBlockProxy

Methods

getBoundingBox

getBoundingBox(): Box

Returns

Box


getHeight

getHeight(): number

Returns

number

the pixel height of the cell, including any cells it is merged with.


getMergedCellSize

getMergedCellSize(): Object

Cells in a table can be merged together with adjacent cells into one larger cell. In this case, the upper- left cell remains visible but is enlarged to cover additional cells, and the other cells are hidden.

Returns

Object

the size of this cell, in how many cells horizontally and vertically have been merged into it. For most cells, this will be {w:1, h:1}, but if it has been merged with the cell to the right of it, it would be {w:2, h:1}.

Name Type
h number
w number

getText

getText(): string

Returns

string


getTextStyle

getTextStyle(): TextStyle

Returns

TextStyle


getWidth

getWidth(): number

Returns

number

the pixel width of the cell, including any cells it is merged with.


setFill

setFill(fill): void

Parameters
Name Type
fill SimpleFillStyle
Returns

void


setMergedCellSize

setMergedCellSize(size): void

/**

  • Cells in a table can be merged together with adjacent cells into one larger cell. In this case, the upper-
  • left cell remains visible but is enlarged to cover additional cells, and the other cells are hidden.
Parameters
Name Type Description
size Object the desired size of this cell, in how many cells horizontally and vertically are merged into it. * This normally {w:1, h:1} for a normal cell, or {w:2, h:1} to merge a cell with the one to the right of it, etc.
size.h number -
size.w number -
Returns

void


setText

setText(text): undefined

Parameters
Name Type
text string
Returns

undefined


setTextStyle

setTextStyle(style): void

Parameters
Name Type
style Partial< TextStyle >
Returns

void


TableColumnProxy

document/blockclasses/tableblockproxy.TableColumnProxy

Constructors

constructor

new TableColumnProxy(table, col)

Parameters
Name Type
table TableBlockProxy
col number

Properties

col

Readonly col: number


table

Readonly table: TableBlockProxy

Methods

getCells

getCells(): TableCellProxy []

Returns

TableCellProxy []


getWidth

getWidth(): number

Returns

number


TableRowProxy

document/blockclasses/tableblockproxy.TableRowProxy

Constructors

constructor

new TableRowProxy(table, row)

Parameters
Name Type
table TableBlockProxy
row number

Properties

row

Readonly row: number


table

Readonly table: TableBlockProxy

Methods

getCells

getCells(): TableCellProxy []

Returns

TableCellProxy []


getHeight

getHeight(): number

Returns

number


UserProxy

user/userproxy.UserProxy

The UserProxy class gives access to the current user on the current Lucid document.

Constructors

constructor

new UserProxy(client)

Parameters
Name Type
client EditorClient

Properties

id

Readonly id: string

Methods

getAccessPermssionOnDocument

getAccessPermssionOnDocument(): DocumentAccessPermission

Returns

DocumentAccessPermission

the permission the user has on the current document.


Viewport

ui/viewport.Viewport

Constructors

constructor

new Viewport(client)

Parameters
Name Type
client EditorClient

Methods

cancelDraggingNewBlock

cancelDraggingNewBlock(): void

If startDraggingNewBlock has been called, and the drag-new-block interaction is still active, cancel that interaction.

Returns

void


cancelDraggingNewImage

cancelDraggingNewImage(): void

If startDraggingNewImage has been called, and the drag-new-image interaction is still active, cancel that interaction.

Returns

void


dragPointerMove

dragPointerMove(x, y): void

After calling startDraggingNewBlock, call this to simulate the user moving the mouse at the given location within the top-level browser window.

This has no effect if the drag-new-block interaction is not active.

To convert a position in a Panel's iframe to a position in the top-level browser window, add the IframeUI.framePosition.

Parameters
Name Type
x number
y number
Returns

void


dragPointerUp

dragPointerUp(x, y): void

After calling startDraggingNewBlock, call this to simulate the user releasing the mouse button at the given location within the top-level browser window.

This has no effect if the drag-new-block interaction is not active.

To convert a position in a Panel's iframe to a position in the top-level browser window, add the IframeUI.framePosition.

Parameters
Name Type
x number
y number
Returns

void


findAvailableSpace

findAvailableSpace(width, height): Object

Find available space on the current page for adding new content.

Parameters
Name Type
width number
height number
Returns

Object

a reference to the page and origin (upper-left point) of the space you can add new content of the given size to.

Name Type
page PageProxy
x number
y number

focusCameraOnItems

focusCameraOnItems(items): void

Switch to the page containing these items, if necessary, and then animate the viewport to zoom in and focus on these items.

Parameters
Name Type Description
items ItemProxy [] The items the camera should zoom to
Returns

void


getCurrentPage

getCurrentPage(): undefined | PageProxy

Returns

undefined | PageProxy

the page currently being viewed


getSelectedItems

getSelectedItems(deep?): ItemProxy []

Parameters
Name Type Description
deep? boolean If true, and groups are selected, include the contents of those groups in the array
Returns

ItemProxy []

An array of currently-selected items on the currently-visible page


getVisibleRect

getVisibleRect(): Box

Returns

Box

the box for the current viewport location


hookSelection

hookSelection(callback): string

Parameters
Name Type Description
callback (items: ItemProxy []) => void Called when the user changes their selection of items
Returns

string

A handle representing this hook, which can be passed to unhookSelection to remove this hook.


hookTextEdit

hookTextEdit(callback, eager?): string

If callback returns false, text editing is prevented. If callback returns true, text editing continues as normal.

If callback returns a TextEditCompletionCallback(/extension-sdk/#modules_ui_viewport_texteditcompletioncallback), then text editing is allowed, but that completion callback is called.

when the user finishes editing that text. That completion callback may return true or false to allow or deny the edit, or also may return a replacement string to use instead of the text the user actually typed. If replacement text is provided, it will be styled as close to the original as possible, but styles that apply to only parts of the original text will be discarded.

Parameters
Name Type Description
callback (item: ItemProxy , textAreaKey: string, text?: string) => boolean | TextEditCompletionCallback | Promise<boolean | TextEditCompletionCallback > Called just before the user starts editing text.
eager? boolean Whether to trigger the callback eagerly during text edit
Returns

string

A handle representing this hook, which can be passed to unhookTextEdit to remove this hook.


setCurrentPage

setCurrentPage(page): void

View the given page in the viewport

Parameters
Name Type Description
page PageProxy The page to view
Returns

void


setSelectedItems

setSelectedItems(items): void

Unselect all currently-selected items, and select the subset of the given items that exist on the currently-visible page.

Parameters
Name Type
items ItemProxy []
Returns

void


startDraggingNewBlock

startDraggingNewBlock(definition): Promise<undefined | BlockProxy >

Start an interaction of the current user dragging a new block onto the current page, exactly as if they started dragging that block out of the normal toolbox. At the time this function is called, the user's primary mouse button should be down (e.g. in a mousedown event handler).

Parameters
Name Type Description
definition BlockDefinition Definition of the block to create if and where the user drops it on-canvas
Returns

Promise<undefined | BlockProxy >

A promise resolving to a reference to the created block, if successfully dropped, or undefined if the user cancels the drag interaction.


startDraggingNewImage

startDraggingNewImage(definition): Promise<undefined | BlockProxy >

Start an interaction of the current user dragging a new image onto the current page, exactly as if they started dragging that image out of the normal toolbox. At the time this function is called, the user's primary mouse button should be down (e.g. in a mousedown event handler).

Parameters
Name Type Description
definition ImageDefinition Definition of the image to create if and where the user drops it on-canvas
Returns

Promise<undefined | BlockProxy >

A promise resolving to a reference to the created image, if successfully dropped, or undefined if the user cancels the drag interaction.


unhookSelection

unhookSelection(handle): void

Remove a hook set by hookSelection.

Parameters
Name Type Description
handle string The return value of hookSelection.
Returns

void


unhookTextEdit

unhookTextEdit(handle): void

Remove a hook set by hookTextEdit.

Parameters
Name Type Description
handle string The return value of hookTextEdit.
Returns

void


Webhook

dataconnector/actions/action.Webhook

A description of an existing webhook that Lucid is keeping track of.

Constructors

constructor

new Webhook(documentCollections, webhookData)

Parameters
Name Type Description
documentCollections Object Set of items this webhook is tracking as a Record<CollectionId, ItemPrimaryKey[]>
webhookData unknown Arbitrary extra data to allow the data connector to better identitify the webhook.

Properties

documentCollections

documentCollections: Object

Set of items this webhook is tracking as a Record<CollectionId, ItemPrimaryKey[]>

Index signature

▪ [collectionId: CollectionId ]: ItemPrimaryKey []


webhookData

webhookData: unknown

Arbitrary extra data to allow the data connector to better identitify the webhook.


WriteableMapProxy<KEY, VALUE, WRITERETURN, WRITEVALUE>

document/mapproxy.WriteableMapProxy

A data structure similar to a normal Map which accesses its data through API commands to the Lucid app. This structure is iterable with for...of.

Type parameters

Name Type
KEY KEY
VALUE VALUE
WRITERETURN WRITERETURN
WRITEVALUE VALUE

Hierarchy

Constructors

constructor

new WriteableMapProxy<KEY, VALUE, WRITERETURN, WRITEVALUE>(getKeys, getItem, setter)

Type parameters
Name Type
KEY KEY
VALUE VALUE
WRITERETURN WRITERETURN
WRITEVALUE VALUE
Parameters
Name Type
getKeys () => KEY[]
getItem (key: KEY) => VALUE
setter (key: KEY, val: WRITEVALUE, options?: SetterOptions ) => WRITERETURN
Overrides

MapProxy.constructor

Accessors

size

get size(): number

Returns

number

Inherited from

MapProxy.size

Methods

filter

filter(filter): VALUE[]

Parameters
Name Type
filter (item: VALUE, key: KEY) => boolean
Returns

VALUE[]

Inherited from

MapProxy.filter


find

find(filter): undefined | VALUE

Parameters
Name Type
filter (item: VALUE, key: KEY) => boolean
Returns

undefined | VALUE

Inherited from

MapProxy.find


first

first(): undefined | VALUE

Returns

undefined | VALUE

Inherited from

MapProxy.first


get

get(key): VALUE

Parameters
Name Type
key KEY
Returns

VALUE

Inherited from

MapProxy.get


keys

keys(): KEY[]

Returns

KEY[]

Inherited from

MapProxy.keys


map

map<T>(callback): T[]

Type parameters
Name
T
Parameters
Name Type
callback (item: VALUE, key: KEY) => T
Returns

T[]

Inherited from

MapProxy.map


set

set(key, value, options?): WRITERETURN

Parameters
Name Type
key KEY
value WRITEVALUE
options SetterOptions
Returns

WRITERETURN


values

values(): Generator<Object, void, unknown>

Returns

Generator<Object, void, unknown>

Inherited from

MapProxy.values


Interfaces

Badgeable

core/properties/datagraphic/badgeposition.Badgeable

Properties

position

position: SerializedBadgeEnumPosition


BadgeEnumPosition

core/properties/datagraphic/badgeposition.BadgeEnumPosition

Properties

horizontalPos

horizontalPos: HorizontalBadgePos


layer

layer: BadgeLayerPos


responsive

responsive: BadgeResponsiveness


verticalPos

verticalPos: VerticalBadgePos


BaseConditionDefinition

document/ruledefinition.BaseConditionDefinition

Hierarchy

Properties

type

type: ConditionType

What kind of condition is this? e.g. a formula evaluation, checking for non-empty text, etc.


BaseEffectDefinition

document/ruledefinition.BaseEffectDefinition

Hierarchy

Properties

combination

combination: ConditionCombination

How multiple conditions are combined (AND vs OR)


conditions

conditions: ConditionDefinition []


tooltip

Optional tooltip: string


BaseXHRResponse

core/xhr.BaseXHRResponse

Hierarchy

Properties

headers

headers: Object

Headers sent by the server in the response

Index signature

▪ [key: string]: string


status

status: number

HTTP status, e.g. 200 or 404


timeout

Optional timeout: boolean

True if this request failed due to a timeout


url

url: string

URL of the final response, after any redirects


BinaryXHRResponse

core/xhr.BinaryXHRResponse

Hierarchy

Properties

headers

headers: Object

Headers sent by the server in the response

Index signature

▪ [key: string]: string

Inherited from

BaseXHRResponse.headers


responseData

responseData: Uint8Array

Contents of the response body


responseFormat

responseFormat: "binary"


status

status: number

HTTP status, e.g. 200 or 404

Inherited from

BaseXHRResponse.status


timeout

Optional timeout: boolean

True if this request failed due to a timeout

Inherited from

BaseXHRResponse.timeout


url

url: string

URL of the final response, after any redirects

Inherited from

BaseXHRResponse.url


BlockDefinition

document/blockdefinition.BlockDefinition

The information required to create a new block on the current document

Properties

boundingBox

boundingBox: Box

The initial location and size of the block on the page.


className

className: string

The type of block to create, e.g. "ProcessBlock".


fillStyle

Optional fillStyle: SimpleFillStyle

If specified, the initial FillColor property for the block


lineWidth

Optional lineWidth: number

If specified, the initial line width for the block


properties

Optional properties: JsonObject

Additional properties to set on the block immediately after creation. This is not typically set directly (it's easier and safer to call .properties.set() after block creation) but is set by EditorClient.getCustomShapeDefinition.


stencil

Optional stencil: JsonSerializable

If specified, the stencil to use for a custom shape. This is not typically set directly; use EditorClient.getCustomShapeDefinition.


BlockEndpointDefinition

document/linedefinition.BlockEndpointDefinition

A line endpoint connected to another block

Hierarchy

Properties

Optional autoLink: boolean

If true, this endpoint may move around the target block in order to make the line less complex


connection

connection: BlockProxy


inside

Optional inside: boolean

If true, the connection isn't to the edge of the target block, but inside it


linkX

linkX: number

0 to 1, relative X position in target block's bounding box


linkY

linkY: number

0 to 1, relative Y position in target block's bounding box


padding

Optional padding: number

If set, the distance from the connected block this endpoint should be


style

Optional style: string

Omit to use defaults (theme)

Inherited from

EndpointStyle.style


BufferSingleton

dataconnector/cryptodependencies.BufferSingleton

Methods

from

from(str, encoding?): unknown

Parameters
Name Type
str string
encoding? string
Returns

unknown


CardIntegrationConfig

core/cardintegration/cardintegrationconfig.CardIntegrationConfig

Properties

cardConfig

cardConfig: Object

Type declaration
Name Type Description
fieldDisplaySettings? Map<string, LucidCardFieldDisplaySettings > The data fields to be displayed on cards as data graphics
fieldNames string[] The data fields to be displayed on cards, as data-linked text fields
fieldStyles? Map<string, Partial< TextStyle >> The default text style to set on each of the above fields for new cards. Any style not specified will use a default value, and any field name not present will use all defaults.

cardDetailsPanelConfig

cardDetailsPanelConfig: Object

Type declaration
Name Type Description
fields { locked?: boolean ; name: string }[] The data fields to be displayed in the details panel of a card

CollectionDefinition

data/collectiondefinition.CollectionDefinition

Properties

items

items: Map<string, SerializedFields >


schema

schema: SchemaDefinition


CollectionPatch

dataconnector/datasourceupdatetypes.CollectionPatch

A patch to a collection or the definition of a new collection to be added. If adding a new collection, a schema must be provided. If modifying an existing collection, a schema may be omitted.

Properties

name

Optional name: string

The collection's display name


patch

patch: ItemsPatch

The patch to apply to the collection


represents

Optional represents: Items []

What the collection implicitly represents *


schema

Optional schema: SchemaDefinition

If changing an existing schema only the following changes are allowed:

  1. Adding a nullable field
  2. Promoting a type of a field to a union of types (string -> string | number)
  3. Adding a new variant to a union type (string | number -> string | number | boolean)
  • Removing a field is not allowed (just add | null and don't provide the field in patches anymore).
  • Changing a type in a way that any existing legal value is no longer valid for that field is not allowed.

CollectionReferenceKeyDefinition

data/referencekeydefinition.CollectionReferenceKeyDefinition

A reference key that points to a DataItem in a Collection. This is the most common type of reference key to create.

For more information, see the Developer Guide.

Properties

collectionId

collectionId: string

The ID of the collection referenced


fieldWhitelist

Optional fieldWhitelist: string[]

If specified, only expose this list of fields through this reference key. This can be used to limit namespace pollution in shape data from lots of unnecessary fields, or just to hide information you'd prefer not to be visible in the UI or through formulas.


primaryKey

primaryKey: string

The primary key of the data item referenced


readonly

Optional readonly: boolean

If true, prevent the user from editing the field values of this reference key through the normal UI


Console

interop.Console

MDN Reference

Methods

assert

assert(condition?, ...data): void

MDN Reference

Parameters
Name Type
condition? boolean
...data any[]
Returns

void

assert(condition?, ...data): void

Parameters
Name Type
condition? boolean
...data any[]
Returns

void


clear

clear(): void

MDN Reference

Returns

void

clear(): void

Returns

void


count

count(label?): void

MDN Reference

Parameters
Name Type
label? string
Returns

void

count(label?): void

Parameters
Name Type
label? string
Returns

void


countReset

countReset(label?): void

MDN Reference

Parameters
Name Type
label? string
Returns

void

countReset(label?): void

Parameters
Name Type
label? string
Returns

void


debug

debug(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

debug(...data): void

Parameters
Name Type
...data any[]
Returns

void


dir

dir(item?, options?): void

MDN Reference

Parameters
Name Type
item? any
options? any
Returns

void

dir(item?, options?): void

Parameters
Name Type
item? any
options? any
Returns

void


dirxml

dirxml(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

dirxml(...data): void

Parameters
Name Type
...data any[]
Returns

void


error

error(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

error(...data): void

Parameters
Name Type
...data any[]
Returns

void


group

group(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

group(...data): void

Parameters
Name Type
...data any[]
Returns

void


groupCollapsed

groupCollapsed(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

groupCollapsed(...data): void

Parameters
Name Type
...data any[]
Returns

void


groupEnd

groupEnd(): void

MDN Reference

Returns

void

groupEnd(): void

Returns

void


info

info(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

info(...data): void

Parameters
Name Type
...data any[]
Returns

void


log

log(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

log(...data): void

Parameters
Name Type
...data any[]
Returns

void


table

table(tabularData?, properties?): void

MDN Reference

Parameters
Name Type
tabularData? any
properties? string[]
Returns

void

table(tabularData?, properties?): void

Parameters
Name Type
tabularData? any
properties? string[]
Returns

void


time

time(label?): void

MDN Reference

Parameters
Name Type
label? string
Returns

void

time(label?): void

Parameters
Name Type
label? string
Returns

void


timeEnd

timeEnd(label?): void

MDN Reference

Parameters
Name Type
label? string
Returns

void

timeEnd(label?): void

Parameters
Name Type
label? string
Returns

void


timeLog

timeLog(label?, ...data): void

MDN Reference

Parameters
Name Type
label? string
...data any[]
Returns

void

timeLog(label?, ...data): void

Parameters
Name Type
label? string
...data any[]
Returns

void


timeStamp

timeStamp(label?): void

Parameters
Name Type
label? string
Returns

void

timeStamp(label?): void

Parameters
Name Type
label? string
Returns

void


trace

trace(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

trace(...data): void

Parameters
Name Type
...data any[]
Returns

void


warn

warn(...data): void

MDN Reference

Parameters
Name Type
...data any[]
Returns

void

warn(...data): void

Parameters
Name Type
...data any[]
Returns

void


CryptoModule

dataconnector/cryptodependencies.CryptoModule

Methods

createPublicKey

createPublicKey(key): unknown

Parameters
Name Type
key string
Returns

unknown


verify

verify(algorithm, data, publicKey, signature): boolean

Parameters
Name Type
algorithm string
data unknown
publicKey unknown
signature unknown
Returns

boolean


CustomContentDockMenu

ui/menu.CustomContentDockMenu

Data to create a content dock icon in Spark + Teamspaces

Hierarchy

Properties

action

action: string

The registered action to run when the menu item is clicked

Overrides

CustomMenuConfig.action


disabledAction

Optional disabledAction: string

If specified, what action's return value should determine if this menu item is disabled?

Inherited from

CustomMenuConfig.disabledAction


file

Optional file: Object

If specified, this menu item should launch a file picker

Type declaration
Name Type Description
accept string An accept string as specified for HTML file inputs
action string An action registered with EditorClient.registerFileUploadAction
binary? boolean If true, send the file contents to the callback action as a Uint8Array as well as a plain text string
singleFileOnly? boolean If true, only allow a single file to be selected for upload
Inherited from

CustomMenuConfig.file


iconUrl

iconUrl: string

The icon to display on the menu item. A URL (a data URI is fine) pointing to an icon representing the integration. This will be displayed at up to 32x32 CSS pixels in size.


label

label: string

The text to display on the menu item

Inherited from

CustomMenuConfig.label


visibleAction

Optional visibleAction: string

If specified, what action's return value should determine if this menu item is visible?

Inherited from

CustomMenuConfig.visibleAction


CustomDropdownMenu

ui/menu.CustomDropdownMenu

Data to create a dropdown menu in the main top menus.

Hierarchy

Properties

action

Optional action: string

The registered action to run when the menu item is clicked.

Inherited from

CustomMenuConfig.action


disabledAction

Optional disabledAction: string

If specified, what action's return value should determine if this menu item is disabled?

Inherited from

CustomMenuConfig.disabledAction


file

Optional file: Object

If specified, this menu item should launch a file picker

Type declaration
Name Type Description
accept string An accept string as specified for HTML file inputs
action string An action registered with EditorClient.registerFileUploadAction
binary? boolean If true, send the file contents to the callback action as a Uint8Array as well as a plain text string
singleFileOnly? boolean If true, only allow a single file to be selected for upload
Inherited from

CustomMenuConfig.file


label

label: string

The text to display on the menu item

Inherited from

CustomMenuConfig.label


location

Optional location: MenuLocation

Where in that menu to display this item in Lucidchart. Defaults to the extension menu. In Lucidspark the only valid menu is Extension, it will not appear otherwise.


visibleAction

Optional visibleAction: string

If specified, what action's return value should determine if this menu item is visible?

Inherited from

CustomMenuConfig.visibleAction


CustomIconEffectDefinition

document/ruledefinition.CustomIconEffectDefinition

Hierarchy

Properties

combination

combination: ConditionCombination

How multiple conditions are combined (AND vs OR)

Inherited from

BaseEffectDefinition.combination


conditions

conditions: ConditionDefinition []

Inherited from

BaseEffectDefinition.conditions


dataGraphic

dataGraphic: Object

Type declaration
Name Type
image { height: number ; url: string ; width: number }
image.height number
image.url string
image.width number
position BadgeEnumPosition
set CUSTOM_ICONS

formatType

formatType: DATA_GRAPHICS


tooltip

Optional tooltip: string

Inherited from

BaseEffectDefinition.tooltip


CustomMenuConfig

ui/menu.CustomMenuConfig

Data to create a menu

Hierarchy

Properties

action

Optional action: string

The registered action to run when the menu item is clicked.


disabledAction

Optional disabledAction: string

If specified, what action's return value should determine if this menu item is disabled?


file

Optional file: Object

If specified, this menu item should launch a file picker

Type declaration
Name Type Description
accept string An accept string as specified for HTML file inputs
action string An action registered with EditorClient.registerFileUploadAction
binary? boolean If true, send the file contents to the callback action as a Uint8Array as well as a plain text string
singleFileOnly? boolean If true, only allow a single file to be selected for upload

label

label: string

The text to display on the menu item


visibleAction

Optional visibleAction: string

If specified, what action's return value should determine if this menu item is visible?


CustomMenuItem

ui/menu.CustomMenuItem

A generic object to contain any information creating a menu might need. It is a little easier to use CustomMenuConfig, CustomDropdownMenu, or CustomContentDockMenu.

Properties

action

Optional action: string

The registered action to run when the menu item is clicked


disabledAction

Optional disabledAction: string

If specified, what action's return value should determine if this menu item is disabled?


file

Optional file: Object

If specified, this menu item should launch a file picker

Type declaration
Name Type Description
accept string An accept string as specified for HTML file inputs
action string An action registered with EditorClient.registerFileUploadAction
binary? boolean If true, send the file contents to the callback action as a Uint8Array as well as a plain text string
singleFileOnly? boolean If true, only allow a single file to be selected for upload

iconUrl

Optional iconUrl: string

The icon to display on the menu item. A URL (a data URI is fine) pointing to an icon representing the integration. This will be displayed at up to 32x32 CSS pixels in size.

NOTE: Not all menuTypes support displaying an icon


label

label: string

The text to display on the menu item


location

Optional location: MenuLocation

Where in that menu to display this item


menuType

menuType: MenuType

Which menu to display this item in


visibleAction

Optional visibleAction: string

If specified, what action's return value should determine if this menu item is visible?


DataGraphicEffectDefinition

document/ruledefinition.DataGraphicEffectDefinition

Hierarchy

Properties

combination

combination: ConditionCombination

How multiple conditions are combined (AND vs OR)

Inherited from

BaseEffectDefinition.combination


conditions

conditions: ConditionDefinition []

Inherited from

BaseEffectDefinition.conditions


dataGraphic

dataGraphic: Object

Type declaration
Name Type
color? string
index number
position BadgeEnumPosition
set STATUS_ICONS | STATUS_CIRCLES | STOPLIGHTS | TOGGLES | COMPLETION_PIES | TRENDING_ARROWS | STATUS_CHECK_BOXES | TRENDING_ARROWS_FLIPPED

formatType

formatType: DATA_GRAPHICS


tooltip

Optional tooltip: string

Inherited from

BaseEffectDefinition.tooltip


DeferredPromise<T>

core/defer.DeferredPromise

Type parameters

Name
T

Hierarchy

  • Promise<T>

    DeferredPromise

Properties

[interfaces_core_defer-DeferredPromise_-tostringtag-]

Readonly [toStringTag]: string

Inherited from

Promise.__@toStringTag@218


promise

promise: Promise<T>


reject

reject: (p1?: any) => any

Type declaration

▸ (p1?): any

Parameters
Name Type
p1? any
Returns

any


resolve

resolve: (p1: T) => any

Type declaration

▸ (p1): any

Parameters
Name Type
p1 T
Returns

any

Methods

catch

catch<TResult>(onrejected?): Promise<T | TResult>

Attaches a callback for only the rejection of the Promise.

Type parameters
Name Type
TResult never
Parameters
Name Type Description
onrejected? null | (reason: any) => TResult | PromiseLike<TResult> The callback to execute when the Promise is rejected.
Returns

Promise<T | TResult>

A Promise for the completion of the callback.

Inherited from

Promise.catch


finally

finally(onfinally?): Promise<T>

Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

Parameters
Name Type Description
onfinally? null | () => void The callback to execute when the Promise is settled (fulfilled or rejected).
Returns

Promise<T>

A Promise for the completion of the callback.

Inherited from

Promise.finally


then

then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>

Attaches callbacks for the resolution and/or rejection of the Promise.

Type parameters
Name Type
TResult1 T
TResult2 never
Parameters
Name Type Description
onfulfilled? null | (value: T) => TResult1 | PromiseLike<TResult1> The callback to execute when the Promise is resolved.
onrejected? null | (reason: any) => TResult2 | PromiseLike<TResult2> The callback to execute when the Promise is rejected.
Returns

Promise<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Inherited from

Promise.then


EndpointStyle

document/linedefinition.EndpointStyle

Hierarchy

Properties

style

Optional style: string

Omit to use defaults (theme)


ExtensionCardFieldDefinition

core/cardintegration/cardintegrationdefinitions.ExtensionCardFieldDefinition

The definition for a field to be included in a SchemaDefinition

Hierarchy

Properties

constraints

Optional constraints: FieldConstraintDefinition []

Inherited from

FieldDefinition.constraints


default

Optional default: SerializedFieldType

If defined, the default value for this field


description

Optional description: string

Additional information we can provide to users, e.g. as a hover tooltip


label

label: string

The label to display in the UI


mapping

Optional mapping: readonly SemanticFields [] | readonly SemanticKind []

Inherited from

FieldDefinition.mapping


name

name: string

Inherited from

FieldDefinition.name


options

Optional options: string | ExtensionCardFieldOption []

If specified, the list of options available to choose from, or the name of a registered action that returns the list of options (either directly or as a Promise).


Optional search: string

If specified, an action that takes the search text and input so far, and returns the list of options that should be displayed. This is useful when there are too many possible options to reasonably use the "options" option for options.


type

type: FieldTypeDefinition

Inherited from

FieldDefinition.type


ExtensionCardFieldOption

core/cardintegration/cardintegrationdefinitions.ExtensionCardFieldOption

For fields with Option or ApiOption type, the label and value for each available option

Properties

iconUrl

Optional iconUrl: string


label

label: string


value

value: SerializedFieldType


Failure<T>

core/result.Failure

Type parameters

Name
T

Properties

error

error: T


FieldDefinition

data/schemadefinition.FieldDefinition

The definition for a field to be included in a SchemaDefinition

Hierarchy

Properties

constraints

Optional constraints: FieldConstraintDefinition []


mapping

Optional mapping: readonly SemanticFields [] | readonly SemanticKind []


name

name: string


type

type: FieldTypeDefinition


FileUploadData

ui/menu.FileUploadData

Properties

binary

Optional binary: Uint8Array


fileName

fileName: string


text

text: string


FlattenedReferenceDefinition

data/referencekeydefinition.FlattenedReferenceDefinition

A reference key that has the field values embedded directly in the reference definition. This can be useful in cases when you want to have a standard schema of data associated with an element but do not for whatever reason want to construct an actual Collection to house that data.

Properties

data

data: Record<string, SerializedFieldType >

Field values available at this reference key


name

Optional name: string

Name to display to the user for the reference key (what would normally be the collection name)


schema

schema: SchemaDefinition

Schema of the data stored at this key


FormattingEffectDefinition

document/ruledefinition.FormattingEffectDefinition

Hierarchy

Properties

combination

combination: ConditionCombination

How multiple conditions are combined (AND vs OR)

Inherited from

BaseEffectDefinition.combination


conditions

conditions: ConditionDefinition []

Inherited from

BaseEffectDefinition.conditions


formatType

formatType: FORMATTING


formatting

formatting: Object

Type declaration
Name Type Description
borderColor? string If specified, the color to use for affected block borders
borderStyle? StrokeStyle If specified, the style to use for affected block borders
borderWidth? number If specified, the width to use for affected block borders
fillColor? string If specified, the color to use for affected block fills
lineColor? string If specified, the color to use for affected lines
lineStyle? StrokeStyle If specified, the style to use for affected lines
lineWidth? number If specified, the width to use for affected lines

tooltip

Optional tooltip: string

Inherited from

BaseEffectDefinition.tooltip


FormulaConditionDefinition

document/ruledefinition.FormulaConditionDefinition

Hierarchy

Properties

formula

formula: string

The formula string


type

type: Formula

What kind of condition is this? e.g. a formula evaluation, checking for non-empty text, etc.

Overrides

BaseConditionDefinition.type


I18nFormattedNumberParams

interop.I18nFormattedNumberParams

Properties

maximumFractionDigits

Optional maximumFractionDigits: number


minimumFractionDigits

Optional minimumFractionDigits: number


minimumIntegerDigits

Optional minimumIntegerDigits: number


useGrouping

Optional useGrouping: boolean


I18nReplacement

interop.I18nReplacement

Indexable

▪ [s: string]: number | string | string[] | I18nSafeString | I18nFormattedNumber | I18nFormattedList


ImageDefinition

document/imagedefinition.ImageDefinition

The information required to create a new image block on the current document

Properties

boundingBox

boundingBox: Box

The initial location and size of the block on the page.


fillStyle

fillStyle: SimpleImageFill

Settings for using an image as the fill style of a block.


lineColor

Optional lineColor: string

the border color for this image (default is black, #000000).


lineWidth

Optional lineWidth: number

The border width in pixels for this image (default is 1).


opacity

Optional opacity: number

The opacity (0 - 1) for this image (default is 1).


rotation

Optional rotation: number

The rotation for this image (deafult is 0).


rounding

Optional rounding: number

The rounding for this image (default is 0).


strokeStyle

Optional strokeStyle: StrokeStyle

The stroke style for the border of this image (default is Solid).


ImportResult

core/cardintegration/lucidcardintegrationstandardimportmodal.ImportResult

Result of importing data from the import modal

Properties

collection

collection: CollectionProxy


primaryKeys

primaryKeys: string[]


JsonObject

core/jsonserializable.JsonObject

Indexable

▪ [key: string]: JsonSerializable


LineDefinition

document/linedefinition.LineDefinition

The information required in order to create a new line

Properties

endpoint1

endpoint1: EndpointDefinition


endpoint2

endpoint2: EndpointDefinition


LineEndpointDefinition

document/linedefinition.LineEndpointDefinition

A line endpoint that is connected to another line at some distance along that other line, where 0 is at that line's endpoint1, and 1 is at that line's endpoint2.

Hierarchy

Properties

connection

connection: LineProxy


position

position: number

0 to 1, distance along the target line


style

Optional style: string

Omit to use defaults (theme)

Inherited from

EndpointStyle.style


LineTextAreaPositioning

document/linetextareapositioning.LineTextAreaPositioning

Properties

allowOverBlock

Optional allowOverBlock: boolean

Normally text on a line is not allowed to overlap a block that is connected to either end of the line. If allowOverBlock is true, then the text is allowed to overlap an attached block.


location

location: number

A number between 0 and 1 representing how far this text lies along the line, where 0 puts the text at the same location as the first endpoint, and 1 puts the text at the same location as the second endpoint.


side

side: 0 | 1 | -1

Which side of the line the text is displayed on. If zero, the text is on top of the line. If -1, the text is to the left of the line as you travel from the first to second endpoints. If 1, the text is to the right of the line as you travel from the first to second endpoints.


LockedFieldConstraintDefinition

data/schemadefinition.LockedFieldConstraintDefinition

Properties

type

type: LOCKED


value

Optional value: undefined


LucidCardFieldDisplaySettings

core/cardintegration/cardfielddisplaysettings.LucidCardFieldDisplaySettings

Configuration settings for how to display a particular field on the card itself. Currently only used for adding custom data graphics with stencils.

Properties

stencilConfig

Optional stencilConfig: StencilConfig


LucidCardIntegrationStandardImportModal

core/cardintegration/lucidcardintegrationstandardimportmodal.LucidCardIntegrationStandardImportModal

You can use the standard import modal can be used by providing the following data:

getSearchFields: Given the values entered by the user so far into search fields, return the list of all search fields to display in the search form.

search: Given values entered by the user into the search fields so far, return a collection of data to display in the results table. If partialImportMetadata is also returned, it will be used to create the tasks cards before the import is completed—which allows users to interact with the cards while the data is fetched asynchronously. The collectionId needs to match the id that will be returned from the completed import. The syncDataSourceId needs to match the syncDataSourceId that is passed into performDataAction. The last requirement for the partial import to work is that the primary keys in the data also returned in this search need to match the primary keys that will be returned on import.

import: The user checked the boxes beside the given list of items in the collection returned from search(). Import them, and return the collection and primary keys in that final collection that were imported.

onSetup: If specified, it's going to be called everytime the modal is setting up, right after the modal is displayed and before the initial form fields are shown to the user.

The config provided here is only used on the first import from a given source; on subsequent imports, the existing config will remain unchanged to preserve any customizations by the user.

Properties

getSearchFields

getSearchFields: (searchSoFar: Map<string, SerializedFieldType >) => Promise< ExtensionCardFieldDefinition []>

Type declaration

▸ (searchSoFar): Promise< ExtensionCardFieldDefinition []>

Parameters
Name Type
searchSoFar Map<string, SerializedFieldType >
Returns

Promise< ExtensionCardFieldDefinition []>


import

import: (primaryKeys: string[], searchFields: Map<string, SerializedFieldType >) => Promise< ImportResult >

Type declaration

▸ (primaryKeys, searchFields): Promise< ImportResult >

Parameters
Name Type
primaryKeys string[]
searchFields Map<string, SerializedFieldType >
Returns

Promise< ImportResult >


onSetup

Optional onSetup: () => Promise<void>

Type declaration

▸ (): Promise<void>

Returns

Promise<void>


search: (fields: Map<string, SerializedFieldType >) => Promise< SearchResult >

Type declaration

▸ (fields): Promise< SearchResult >

Parameters
Name Type
fields Map<string, SerializedFieldType >
Returns

Promise< SearchResult >


MaxLengthConstraintDefinition

data/schemadefinition.MaxLengthConstraintDefinition

Properties

type

type: MAX_LENGTH


value

value: number


MaxValueFieldConstraintDefinition

data/schemadefinition.MaxValueFieldConstraintDefinition

Properties

type

type: MAX_VALUE


value

value: number


MetadataPatch

dataconnector/datasourcemetadatatypes.MetadataPatch

Properties

key

key: string


newValue

newValue: unknown


oldValue

oldValue: unknown


MetadataRecord

dataconnector/datasourcemetadatatypes.MetadataRecord

Properties

key

key: string


value

value: unknown


MinValueFieldConstraintDefinition

data/schemadefinition.MinValueFieldConstraintDefinition

Properties

type

type: MIN_VALUE


value

value: number


NoWhitespaceFieldConstraintDefinition

data/schemadefinition.NoWhitespaceFieldConstraintDefinition

Properties

type

type: NO_WHITESPACE


value

Optional value: undefined


OAuthXHRRequest

core/xhr.OAuthXHRRequest

Hierarchy

Properties

data

Optional data: string

The data to send as the body of the request

Inherited from

XHRRequest.data


headers

Optional headers: Object

Headers to send with the request. If specifying an array, multiple headers with the same name will be sent

Index signature

▪ [key: string]: string | string[]

Inherited from

XHRRequest.headers


method

Optional method: string

HTTP method, e.g. "POST". If omitted, GET is used

Inherited from

XHRRequest.method


postResultTo

Optional postResultTo: string

When present, forwards the result of this request to the specified destination. Instead, this request returns whether the request will be made and forwarded, and not the actual request.

Note: There is an allow list which limits where the result can be posted. It is currently only to the result of LinkUnfurlBlockProxy#experimentalStartPDFUpload


responseFormat

Optional responseFormat: SendXHRResponseFormat

The desired format for the returned response body. Defaults to 'utf8'.

  • If 'utf8', the response body will be returned as a string.
  • If 'binary', the response body will be returned as a Uint8Array.
Inherited from

XHRRequest.responseFormat


streamCallback

Optional streamCallback: (chunk: string) => void

Type declaration

▸ (chunk): void

For utf8 responses, you can have the result streamed to you for endpoints that support it.

Parameters
Name Type
chunk string
Returns

void

Inherited from

XHRRequest.streamCallback


timeoutMs

Optional timeoutMs: number

If specified, this request should time out after the given number of milliseconds

Inherited from

XHRRequest.timeoutMs


url

url: string

URL to request

Inherited from

XHRRequest.url


PageDefinition

document/pagedefinition.PageDefinition

The information required to create a new page on the current document

Properties

title

title: string


PositionEndpointDefinition

document/linedefinition.PositionEndpointDefinition

A line endpoint that is free-floating at the given x/y location on the page

Hierarchy

Properties

connection

Optional connection: void


style

Optional style: string

Omit to use defaults (theme)

Inherited from

EndpointStyle.style


x

x: number


y

y: number


RequiredFieldConstraintDefinition

data/schemadefinition.RequiredFieldConstraintDefinition

Properties

type

type: REQUIRED


value

Optional value: undefined


RuleDefinition

document/ruledefinition.RuleDefinition

Properties

effects

effects: EffectDefinition []

The possible visual effects of this conditional formatting rule, in priority order. The first effect whose conditions are met is used.


name

name: string

User-readable name of this conditional formatting rule


SchemaDefinition

data/schemadefinition.SchemaDefinition

Definition of a schema for creating a Collection

Properties

fieldLabels

Optional fieldLabels: Record<string, string>

Maps field names to labels to display in the UI when necessary. If any field name is not present as a key in this label map, the field name itself will be the label.


fields

fields: FieldDefinition []


primaryKey

primaryKey: string[]

Field names that are used to construct primary keys for new data items. Typically this contains only one field name, and that field is usually unique.


SearchResult

core/cardintegration/lucidcardintegrationstandardimportmodal.SearchResult

Result of searching for data in the import modal

Properties

data

data: CollectionDefinition


fields

fields: ExtensionCardFieldDefinition []


partialImportMetadata

Optional partialImportMetadata: Object

Type declaration
Name Type
collectionId string
syncDataSourceId? string

SerializedCollectionPatch

dataconnector/datasourceupdatetypes.SerializedCollectionPatch

Properties

itemsPatch

itemsPatch: SerializedItemsPatch


properties

Optional properties: serializedPropertiesForApi


schema

Optional schema: SerializedSchemaForApi


SerializedDataItems

core/data/serializedfield/serializeddataitems.SerializedDataItems

Indexable

▪ [primaryKey: string]: SerializedFields


SerializedReferenceKey

core/data/referencekeys/serializedreferencekey.SerializedReferenceKey

Properties

cid

cid: string


f

Optional f: Object

Type declaration
Name Type
e? string
md? SerializedFields
pd TypedSerializedFlattenedReference
ts number

pk

pk: string


ro

Optional ro: boolean


wl

Optional wl: string[]


SerializedSourceConfig

core/data/datasource/upstreamconfig.SerializedSourceConfig

Indexable

▪ [primaryKey: string]: JsonObject


SetterOptions

document/mapproxy.SetterOptions

Properties

force

Optional force: boolean


Shadow

core/properties/shadow.Shadow

Properties

angle

angle: number


blur

blur: number


color

color: string


distance

distance: number


ShapeDataConditionDefinition

document/ruledefinition.ShapeDataConditionDefinition

Hierarchy

Properties

condition

condition: ShapeDataConditions


field

field: undefined | string

The name of the shape data field to test


fieldLabel

Optional fieldLabel: string

The name to display to the end user to identify the field name


type

type: ShapeData

What kind of condition is this? e.g. a formula evaluation, checking for non-empty text, etc.

Overrides

BaseConditionDefinition.type


value

Optional value: ConditionValueType

The value against which the condition is tested. For example, a condition with type = ConditionType.ShapeData condition = ShapeDataConditions.GreaterThan field = 'TheField' value = 14

will trigger when the shape data field "TheField" has a value that is greater than 14.


ShapeTypeConditionDefinition

document/ruledefinition.ShapeTypeConditionDefinition

Hierarchy

Properties

classNames

classNames: string[]


condition

condition: ShapeTypeConditions


type

type: ShapeType

What kind of condition is this? e.g. a formula evaluation, checking for non-empty text, etc.

Overrides

BaseConditionDefinition.type


SingleLineFieldConstraintDefinition

data/schemadefinition.SingleLineFieldConstraintDefinition

Properties

type

type: SINGLE_LINE_ONLY


value

Optional value: undefined


StencilConfig

core/cardintegration/cardfielddisplaysettings.StencilConfig

Properties

backgroundColor

Optional backgroundColor: string

For displayType values that support it, you may provide an override for the background color for this data. If this is not provided, the background color will default to the background color of the card itself, darkened 5%.

This may be provided as a literal color hex, e.g. "#00ff00ff" or as a formula by starting the string with "=", e.g. "=darken("#ffffff", 0.5)"


displayType

displayType: FieldDisplayType

How should we generate the stencil/data graphic from the specified field value? These are registered in LucidCardsLibrary.registerStencilDisplayTypes.


foregroundColor

Optional foregroundColor: string

For displayType values that support it, you may provide an override for the foreground color for this data. If this is not provided, the foreground color will default to grey.

This may be provided as a literal color hex, e.g. "#00ff00ff" or as a formula by starting the string with "=", e.g. "=darken("#ffffff", 0.5)"


horizontalPosition

Optional horizontalPosition: HorizontalBadgePos

Each display type has its default location on the card. You can override those default locations by setting these values.


imageBadgeSettings

Optional imageBadgeSettings: ImageBadgeSettings

For displayType values that support it, you may provide a height and a width for the image size. Images are 24px by 24px by default.


linkFormula

Optional linkFormula: string

If onClickHandlerKey is OpenBrowserWindow, this formula calculates the URL to open.


onClickHandlerKey

Optional onClickHandlerKey: OnClickHandlerKeys

If specified, what behavior should happen when the user clicks on the data graphic generated via the above displayType?


textBadgeSettings

Optional textBadgeSettings: TextBadgeSettings

Allows the same card to have multiple textbadges but have different properties. You can change bold, italic, underline, rounding, minwidth, minheight, maxtextwidth, maxfontsize


tooltipFormula

Optional tooltipFormula: string

If specified, the result of this formula (executed in the context of the data item associated with this card) will be used as a tooltip when the user hovers the cursor over this data graphic.


valueFormula

Optional valueFormula: string

If specified, the result of this formula (executed in the context of the data item associated with this card) will be used instead of the raw field value when creating the data graphic. This can be useful if, for example, you want to convert an ID into a URL.


verticalPosition

Optional verticalPosition: VerticalBadgePos

Each display type has its default location on the card. You can override those default locations by setting these values.


Success<T>

core/result.Success

Type parameters

Name
T

Properties

value

value: T


TextConditionDefinition

document/ruledefinition.TextConditionDefinition

Hierarchy

Properties

condition

condition: TextConditions


type

type: Text

What kind of condition is this? e.g. a formula evaluation, checking for non-empty text, etc.

Overrides

BaseConditionDefinition.type


value

Optional value: ConditionValueType

The value against which the condition is tested. For example, a condition with type = ConditionType.ShapeData condition = ShapeDataConditions.GreaterThan field = 'TheField' value = 14

will trigger when the shape data field "TheField" has a value that is greater than 14.


TextStyle

document/text/textstyle.TextStyle

Properties

align

align: string


bold

bold: boolean


color

color: string


font

font: string


italic

italic: boolean


size

size: number


underline

underline: boolean


TextXHRResponse

core/xhr.TextXHRResponse

Hierarchy

Properties

headers

headers: Object

Headers sent by the server in the response

Index signature

▪ [key: string]: string

Inherited from

BaseXHRResponse.headers


responseFormat

responseFormat: "utf8"


responseText

responseText: string

Plain text of the response body


status

status: number

HTTP status, e.g. 200 or 404

Inherited from

BaseXHRResponse.status


timeout

Optional timeout: boolean

True if this request failed due to a timeout

Inherited from

BaseXHRResponse.timeout


url

url: string

URL of the final response, after any redirects

Inherited from

BaseXHRResponse.url


UnfurlCallbacks

core/unfurl/unfurlcallbacks.UnfurlCallbacks

The callbacks that handle unfurls and refreshing.

Properties

afterUnfurlCallback

Optional afterUnfurlCallback: (blockProxy: LinkUnfurlBlockProxy , url: string) => Promise<void>

Type declaration

▸ (blockProxy, url): Promise<void>

Callback after initial unfurl The purpose is to allow unfurlCallback to happen quickly, while afterUnfurlCallback handles longer running process

For example, preview image could be added in unfurlCallback, but multiple thumbnails (or PDF conversion etc.) could be added in afterUnfurlCallback -

This callback is also used for refresh to re-fetch the information

Parameters
Name Type Description
blockProxy LinkUnfurlBlockProxy The block proxy of the unfurl block
url string -
Returns

Promise<void>


expandCallback

Optional expandCallback: (blockProxy: LinkUnfurlBlockProxy , url: string) => Promise<void>

Type declaration

▸ (blockProxy, url): Promise<void>

Callback upon clicking expand button. Occurs before attempting to expand iframe.

Parameters
Name Type Description
blockProxy LinkUnfurlBlockProxy The block proxy of the unfurl block
url string The url to unfurl
Returns

Promise<void>


unfurlCallback

unfurlCallback: (url: string) => Promise<undefined | UnfurlDetails | UnfurlRefreshErrorType >

Type declaration

▸ (url): Promise<undefined | UnfurlDetails | UnfurlRefreshErrorType >

Callback upon initial unfurl.

This should return with minimal delay to get a partial unfurl shown to the user as quick as possible. Final configuration of the unfurl should be done in afterUnfurlCallback.

This callback is also used for refresh to re-fetch the information

Parameters
Name Type Description
url string The url to unfurl
Returns

Promise<undefined | UnfurlDetails | UnfurlRefreshErrorType >

The details of the unfurl or undefined


UnfurlDetails

core/unfurl/unfurldetails.UnfurlDetails

A definition of the details required to show an unfurl block in the editor.

Properties

iframe

Optional iframe: UnfurlIframe

If the unfurl supports an expandable iframe, this configuration defines its properties.


previewImageUrl

Optional previewImageUrl: string

The url to show if there are no thumbnails.

This can be useful to show an initial image while using other mechanisms to add all thumbnails after the unfurl is created.


providerFaviconUrl

providerFaviconUrl: string

The favicon of the provider of this unfurl.


providerName

providerName: string

The name of the extension attributed to the unfurl. This is a user facing name that is used to attribute the unfurl to a specific third party.


thumbnails

Optional thumbnails: UnfurlThumbnail []

If the unfurl contains one or more images, this configuration defines those properties.


unfurlTitle

Optional unfurlTitle: string

The title associated with the link being unfurled. For example, the document or web page title.


UnfurlIframe

core/unfurl/unfurliframe.UnfurlIframe

A definition of the properties needed to expand an iframe for an unfurl

Properties

aspectRatio

Optional aspectRatio: UnfurlIframeAspectRatio

The size of the iframe requested If not provided, 16:9


iframeTitle

Optional iframeTitle: string

The iframe title for accessibility


iframeUrl

iframeUrl: string

The iframe url


UnfurlThumbnail

core/unfurl/unfurlthumbnail.UnfurlThumbnail

A definition of a single unfurl thumbnail

Properties

height

Optional height: number

The height of the image. This is not the height it will be displayed at, but rather the height the image actually is.


url

url: string

The URL to fetch the image from


width

Optional width: number

The width of the image. This is not the height it will be displayed at, but rather the width the image actually is.


UniqueEditFieldConstraintDefinition

data/schemadefinition.UniqueEditFieldConstraintDefinition

Properties

type

type: UNIQUE_EDIT


value

Optional value: undefined


UpstreamConfig

core/data/datasource/upstreamconfig.UpstreamConfig

Properties

dataSourceType

dataSourceType: DataSourceType


patchType

Optional patchType: UpstreamPatchType


sourceConfig

sourceConfig: Object

Index signature

▪ [index: string]: any


updateType

updateType: UpstreamUpdateType


XHRRequest

core/xhr.XHRRequest

Hierarchy

Properties

data

Optional data: string

The data to send as the body of the request


headers

Optional headers: Object

Headers to send with the request. If specifying an array, multiple headers with the same name will be sent

Index signature

▪ [key: string]: string | string[]


method

Optional method: string

HTTP method, e.g. "POST". If omitted, GET is used


responseFormat

Optional responseFormat: SendXHRResponseFormat

The desired format for the returned response body. Defaults to 'utf8'.

  • If 'utf8', the response body will be returned as a string.
  • If 'binary', the response body will be returned as a Uint8Array.

streamCallback

Optional streamCallback: (chunk: string) => void

Type declaration

▸ (chunk): void

For utf8 responses, you can have the result streamed to you for endpoints that support it.

Parameters
Name Type
chunk string
Returns

void


timeoutMs

Optional timeoutMs: number

If specified, this request should time out after the given number of milliseconds


url

url: string

URL to request


Enumerations

BadgeBoxFit

core/rules/badgeboxfit.BadgeBoxFit

Enumeration Members

fitHeight

fitHeight = "fit-height"


none

none = "none"


BadgeLayerPos

core/properties/datagraphic/badgeposition.BadgeLayerPos

Enumeration Members

EDGE

EDGE = 1


INSIDE

INSIDE = 0


OUTSIDE

OUTSIDE = 2


BadgeResponsiveness

core/properties/datagraphic/badgeposition.BadgeResponsiveness

Enumeration Members

STACK

STACK = 1


STATIC

STATIC = 0


CollectionEnumFieldNames

core/data/fieldtypedefinition/collectionenumfieldtype.CollectionEnumFieldNames

Contains the field names of all valid fields for a groovy metadata collection.

This should be kept in sync with GroovyFieldNames in FieldType.scala

Enumeration Members

Color

Color = "color"


Description

Description = "description"


IconUrl

IconUrl = "iconUrl"


Id

Id = "id"


Name

Name = "name"


CommandName

commandtypes.CommandName

The lucid-extension-sdk library interacts with core Lucid products through this set of possible commands. Typically, an extension author will not need to access any of these commands directly, as they are all exposed through appropriate classes and methods elsewhere in this SDK.

To use these directly, use EditorClient.sendCommand.

FOR DEVELOPERS AT LUCID: Follow this guide to add new commands: https://lucidatlassian.atlassian.net/wiki/x/3AA3Xww Before you add a new command bring it up in #api-committee to get feedback.

Enumeration Members

AddCardIntegration

AddCardIntegration = "aci"


AddDiagramFromMermaid

AddDiagramFromMermaid = "adfm"


AddDiagramFromText

AddDiagramFromText = "adft"


AddLineTextArea

AddLineTextArea = "alta"


AddMenuItem

AddMenuItem = "ami"


AddShapeData

AddShapeData = "asd"


AddSpreadsheetIntegration

AddSpreadsheetIntegration = "asi"


AddTableColumn

AddTableColumn = "atc"


AddTableRow

AddTableRow = "atr"


Alert

Alert = "a"


AnimateViewport

AnimateViewport = "av"


AwaitDataSourceImport

AwaitDataSourceImport = "adi"


AwaitImport

AwaitImport = "ai"


Bootstrap

Bootstrap = "b"


CalculateHash

CalculateHash = "hsh"


CanEditPackageSettings

CanEditPackageSettings = "ceps"


CancelDragBlockToCanvas

CancelDragBlockToCanvas = "cdc"


Confirm

Confirm = "c"


CreateBlock

CreateBlock = "cb"


CreateCards

CreateCards = "ca"


CreateCollection

CreateCollection = "cc"


CreateDataSource

CreateDataSource = "cds"


CreateDocumentElement

CreateDocumentElement = "cde"


CreateGroup

CreateGroup = "cg"


CreateLine

CreateLine = "cl"


CreatePage

CreatePage = "cp"


CreateUserImage

CreateUserImage = "cui"


DataAction

DataAction = "da"


DataItemExists

DataItemExists = "die"


DeleteDocumentElement

DeleteDocumentElement = "dde"


DeleteItem

DeleteItem = "di"


DeletePage

DeletePage = "dp"


DeleteShapeData

DeleteShapeData = "dsd"


DeleteTableColumn

DeleteTableColumn = "dtc"


DeleteTableRow

DeleteTableRow = "dtr"


Download

Download = "d"


DragPointerMove

DragPointerMove = "dpm"


DragPointerUp

DragPointerUp = "dpu"


DuplicateItems

DuplicateItems = "dis"


ElementExists

ElementExists = "ee"


ExecuteFormula

ExecuteFormula = "ef"


FindAvailableSpace

FindAvailableSpace = "fas"


FireBeaconEvent

FireBeaconEvent = "fbe"


GetConnectedLines

GetConnectedLines = "gcl"


GetCurrentPage

GetCurrentPage = "gcp"


GetCustomShape

GetCustomShape = "gcs"


GetDataItemField

GetDataItemField = "gdif"


GetDocumentAccessPermission

GetDocumentAccessPermission = "gdap"


GetDocumentChunks

GetDocumentChunks = "gdc"


GetDocumentId

GetDocumentId = "gdid"


GetElementType

GetElementType = "get"


GetEnvironmentConfig

GetEnvironmentConfig = "gec"


GetItemPageId

GetItemPageId = "gip"


GetItemsAt

GetItemsAt = "gia"


GetLLMContextFromItems

GetLLMContextFromItems = "llm"


GetOAuthClientId

GetOAuthClientId = "goci"


GetOAuthToken

GetOAuthToken = "got"


GetPackageSettings

GetPackageSettings = "gps"


GetProduct

GetProduct = "gpr"


GetProperty

GetProperty = "gp"


GetReferenceKey

GetReferenceKey = "grk"


GetRelativeLinePosition

GetRelativeLinePosition = "grlp"


GetSelection

GetSelection = "gs"


GetShapeData

GetShapeData = "gsd"


GetSvg

GetSvg = "gsvg"


GetTextStyle

GetTextStyle = "gts"


GetUserId

GetUserId = "guid"


GetVisibleRect

GetVisibleRect = "gvr"


HideModal

HideModal = "hm"


HidePanel

HidePanel = "hp"


HookAllChanges

HookAllChanges = "hac"


HookCreateItems

HookCreateItems = "hci"


HookDeleteItems

HookDeleteItems = "hdi"


HookSelection

HookSelection = "hs"


HookTextEdit

HookTextEdit = "hte"


ImportCards

ImportCards = "ic"


ImportLinks = "il"


ImportPage

ImportPage = "imp"


KillExtension

KillExtension = "k"


ListBlocks

ListBlocks = "lb"


ListCollectionFields

ListCollectionFields = "lcf"


ListCollections

ListCollections = "lc"


ListDataItems

ListDataItems = "ldi"


ListDataSources

ListDataSources = "lds"


ListDocumentElements

ListDocumentElements = "lde"


ListGroups

ListGroups = "lg"


ListLines

ListLines = "ll"


ListPages

ListPages = "lp"


ListProperties

ListProperties = "lpr"


ListReferenceKeys

ListReferenceKeys = "lrk"


ListShapeData

ListShapeData = "lsd"


ListTextAreas

ListTextAreas = "lta"


LoadBlockClasses

LoadBlockClasses = "lbc"


LogForTestCase

LogForTestCase = "log"


MeasureText

MeasureText = "mt"


OffsetItems

OffsetItems = "oi"


PatchDataItems

PatchDataItems = "pdi"


Prompt

Prompt = "p"


RegisterPanel

RegisterPanel = "rp"


RegisterUnfurl

RegisterUnfurl = "ru"


ReloadExtension

ReloadExtension = "r"


SendAsyncOAuthRequest

SendAsyncOAuthRequest = "aoauth"


SendOAuthRequest

SendOAuthRequest = "oauth"


SendPermanentTokenRequest

SendPermanentTokenRequest = "perm"


SendUIMessage

SendUIMessage = "suim"


SendXHR

SendXHR = "xhr"


SetCurrentPage

SetCurrentPage = "scp"


SetPackageSettings

SetPackageSettings = "sps"


SetProperty

SetProperty = "sp"


SetReferenceKey

SetReferenceKey = "srk"


SetSelection

SetSelection = "ss"


SetShapeData

SetShapeData = "ssd"


SetText

SetText = "st"


SetTextStyle

SetTextStyle = "sts"


ShowModal

ShowModal = "sm"


ShowPackageSettingsModal

ShowPackageSettingsModal = "spsm"


ShowPanel

ShowPanel = "spn"


SleepForTestCase

SleepForTestCase = "sleep"


StartDragBlockToCanvas

StartDragBlockToCanvas = "sdc"


StartPDFUploadRequest

StartPDFUploadRequest = "pdf"


ThrowForTestCase

ThrowForTestCase = "throw"


TriggerAuthFlow

TriggerAuthFlow = "tauth"


UnhookAllChanges

UnhookAllChanges = "uac"


UnhookCreateItems

UnhookCreateItems = "uci"


UnhookDeleteItems

UnhookDeleteItems = "udi"


UnhookSelection

UnhookSelection = "us"


UnhookTextEdit

UnhookTextEdit = "ute"


WithMutex

WithMutex = "wm"


WithSilentActions

WithSilentActions = "wsa"


ZOrder

ZOrder = "z"


ConditionCombination

core/rules/conditions.ConditionCombination

Enumeration Members

AND

AND = "AND"


OR

OR = "OR"


ConditionType

core/rules/conditiontype.ConditionType

Enumeration Members

ConnectedShapes

ConnectedShapes = 4


Containment

Containment = 5


Formula

Formula = 2


ShapeData

ShapeData = 1


ShapeType

ShapeType = 3


Text

Text = 0


ConnectedShapesCondition

core/rules/conditions.ConnectedShapesCondition

Enumeration Members

Between

Between = 14


Equal

Equal = 12


GreaterThan

GreaterThan = 8


GreaterThanOrEqual

GreaterThanOrEqual = 9


LessThan

LessThan = 10


LessThanOrEqual

LessThanOrEqual = 11


NotBetween

NotBetween = 15


NotEqual

NotEqual = 13


ContainmentConditions

core/rules/conditions.ContainmentConditions

Enumeration Members

TextContains

TextContains = 2


TextDoesNotContain

TextDoesNotContain = 3


DataConnectorActionKeys

dataconnector/actions/dataconnectoractionkeys.DataConnectorActionKeys

List of keys that are special kinds of actions and thus have more specific result types than just unknown

Enumeration Members

ManageWebhook

ManageWebhook = "ManageWebhook"


Patch

Patch = "Patch"


UnbatchedPatch

UnbatchedPatch = "UnbatchedPatch"


DataErrorType

core/dataerrortype.DataErrorType

Enumeration Members

AttributeNotFound

AttributeNotFound = 7

The formula contains an attribute reference to an entity that does not exist.


Evaluation

Evaluation = 4

An error occurred specific to a particular formula feature, e.g. adding together values of two different currencies.


InterfaceNotFound

InterfaceNotFound = 8

The formula contains an interface reference that does not exist.


InvalidFunction

InvalidFunction = 5

The formula attempts to call a function that does not exist.


InvalidParameter

InvalidParameter = 6

The formula passes an invalid parameter to a function.


Loop

Loop = 2

The formula directly or indirectly references itself. For example, if you have shape data a =

B

b =

C

c =

A

when trying to evaluate any of those values, they eventually reference themselves, and thus cannot be evaluated.


Parse

Parse = 1

A formula syntax error occurred


ReferenceNotFound

ReferenceNotFound = 3

The formula contains a reference to an entity that does not exist, e.g. an incorrect shape data name, field name, or object ID.


DataGraphicIconSets

core/properties/datagraphic/datagraphicindexes.DataGraphicIconSets

Enumeration Members

COMPLETION_PIES

COMPLETION_PIES = 4


CUSTOM_ICONS

CUSTOM_ICONS = -1


STATUS_CHECK_BOXES

STATUS_CHECK_BOXES = 6


STATUS_CIRCLES

STATUS_CIRCLES = 1


STATUS_ICONS

STATUS_ICONS = 0


STOPLIGHTS

STOPLIGHTS = 2


TOGGLES

TOGGLES = 3


TRENDING_ARROWS = 5


TRENDING_ARROWS_FLIPPED = 7


DataUpdateFilterType

data/dataupdatefiltertype.DataUpdateFilterType

Allows Lucid documents to determine what updates they will receive when changes happen in the data source

Enumeration Members

AllUpdates

AllUpdates = "AllUpdates"

All updates relevant to the data source will be sent to the document, new items created in the data source will be added to the document. Note that the in the documentCollections mapping in the DataConnectorActionContext will not have a list of all items in it with the DataUpdateFilterType selected


CurrentCollectionUpdates

CurrentCollectionUpdates = "CurrentCollectionUpdates"

All updates relevant to collections already present on the document will be sent to that document, new items added to those collections in the data source will be added to the document. Note that the documentCollections mapping in the DataConnectorActionContext will not have a list of all items in it with the DataUpdateFilterType selected


CurrentItemUpdates

CurrentItemUpdates = "CurrentItemUpdates"

All updates to items already present on the document will be sent to the document. New items created in the data source will not be created on the document.


DocumentAccessPermission

document/documentaccesspermission.DocumentAccessPermission

This enumeration represents the access permission a user can have on a document. Note: Additional values may be added to this enumeration.

Enumeration Members

Comment

Comment = "comment"

Can comment but can't share, edit, or change access permissions.


Edit

Edit = "edit"

Can edit but can't share, or change access permissions.


EditAndShare

EditAndShare = "editAndShare"

Can edit, share, and change access permissions.


View

View = "view"

Can view but can't share, edit, comment, or change access permissions.


DocumentElementType

document/documentelement/documentelementtype.DocumentElementType

An enumeration of document element types. A Document element represents a collection of data that is stored on a document.

Enumeration Members

CommentThreadMetadata

CommentThreadMetadata = "ThreadMetadata"


DataTransformation

DataTransformation = "DerivedStructure"


DocumentFormula

DocumentFormula = "Formula"


FontStylePreset

FontStylePreset = "FontStylePreset"


GeneratorView

GeneratorView = "GeneratorView"


IntraDocumentMutex

IntraDocumentMutex = "Mutex"


Path

Path = "Path"


Rule

Rule = "Rule"


ShapeSpecificDefaultProperties

ShapeSpecificDefaultProperties = "ShapeSpecificDefaultProperties"


ShapeStylePreset

ShapeStylePreset = "ShapeStylePreset"


Tag

Tag = "Tag"


TaskCardFieldsConfig

TaskCardFieldsConfig = "TaskCardFieldsConfig"


TrackedFormulaLocation

TrackedFormulaLocation = "TrackedFormulaLocation"


FieldConstraintType

core/data/serializedfield/serializedfielddefinition.FieldConstraintType

Enumeration Members

LOCKED

LOCKED = "locked"


MAX_LENGTH

MAX_LENGTH = "maxLength"


MAX_VALUE

MAX_VALUE = "maxValue"


MIN_VALUE

MIN_VALUE = "minValue"


NO_WHITESPACE

NO_WHITESPACE = "noWhitespace"


REQUIRED

REQUIRED = "required"


SINGLE_LINE_ONLY

SINGLE_LINE_ONLY = "singleLineOnly"


UNIQUE_EDIT

UNIQUE_EDIT = "uniqueEditType"


FieldDisplayType

core/cardintegration/cardfielddisplaysettings.FieldDisplayType

When configuring a field on a LucidCardBlock to be displayed as a data graphic, one of these values specifies the function to convert the field value to the data graphic settings. The definition of these functions is in LucidCardsLibrary.registerStencilDisplayTypes.

Enumeration Members

BasicTextBadge

BasicTextBadge = "BasicTextBadge"

Text badge with the full text of the field. Black text on a light gray background in the upper-right of the card.


DateBadge

DateBadge = "DateBadge"

Given a date, display a small calendar icon alongside a very short version of the date as a string, e.g. "Sep 9"


ImageBadge

ImageBadge = "ImageBadge"

Given a URL, display a small image cropped into a circle in the lower-left of the card.


InitializedString

InitializedString = "InitializedString"

Given a name (usually of a user), puts a text badge with their initials (first letter of each name) at the bottom-left of the card, black text on a light gray background.


SquareImageBadge

SquareImageBadge = "SquareImageBadge"

Given a URL, display a small image cropped into a square in the lower-left of the card.


StandardEstimation

StandardEstimation = "StandardEstimation"

Given a number, display the number in the bottom-left of the card. If the number is higher than 999, display 999.


UserProfile

UserProfile = "UserProfile"

Given an object containing iconUrl (optional) and name (optional), determine whether to display as an ImageBadge or InitializedString (or nothing, if neither is present).


GetDocumentChunksType

commandtypes.GetDocumentChunksType

Enumeration Members

Container

Container = 1

Breaks up a document into chunks by finding containing blocks


Geographic

Geographic = 0

Breaks up a document into chunks geographically


GetItemsAtSearchType

commandtypes.GetItemsAtSearchType

Enumeration Members

Contained

Contained = 2


Overlapping

Overlapping = 1


PossiblyOverlapping

PossiblyOverlapping = 0


GetLLMContextType

commandtypes.GetLLMContextType

Enumeration Members

PlainText

PlainText = 2

Get context containing only plain text displayed on the given items, more suitable for embeddings


Relational

Relational = 1

Get context in a format for LLMs where relationships among connected and contained items are preserved. Expand the scope of the selection to include blocks contained by the selection as well as lines connecting items in the selection.


RelationalWithoutExpansion

RelationalWithoutExpansion = 3

Get context in a format for LLMs where relationships among connected and contained items are preserved. Do not expand the scope of the selection, other than to ensure relationships are represented. Text on selected items will be included, but text on automatically added items will not.


HashAlgorithmEnum

commandtypes.HashAlgorithmEnum

Enumeration Members

sha256

sha256 = "SHA256"

Use the SHA 256 hashing algorithm


HorizontalBadgePos

core/properties/datagraphic/badgeposition.HorizontalBadgePos

Enumeration Members

CENTER

CENTER = 1


LEFT

LEFT = 0


RIGHT

RIGHT = 2


LegendItemType

document/blockclasses/legendblockproxy.LegendItemType

Enumeration Members

Color

Color = "color"


Shape

Shape = "shape"


LineShape

document/lineproxy.LineShape

Enumeration Members

Curve

Curve = "curve"


Diagonal

Diagonal = "diagonal"


Elbow

Elbow = "elbow"


LucidCardFields

core/cardintegration/cardfielddisplaysettings.LucidCardFields

Enumeration Members

Assignee

Assignee = "Assignee"


Description

Description = "Description"


EndTime

EndTime = "EndTime"


Estimate

Estimate = "Estimate"


StartTime

StartTime = "StartTime"


Status

Status = "Status"


Title

Title = "Title"


LucidProduct

core/lucidproduct.LucidProduct

Lucid products supporting the extension API

Enumeration Members

Chart

Chart = "chart"


Spark

Spark = "spark"


TeamSpaces

TeamSpaces = "teamspaces"


MenuLocation

ui/menu.MenuLocation

Semantic locations to place a new menu item.

Enumeration Members

Edit

Edit = 2


Export

Export = 5


Extension

Extension = 1

Default location: a new top-level menu entry for this extension, or the end of the context menu


Import

Import = 6


Share

Share = 4


View

View = 3


MenuType

ui/menu.MenuType

Type of menu you're adding. Consider using addDropdownMenuItem, addContextMenuItem, or addContentDockMenuItem for easier to use entrypoints and clearer requirements.

Enumeration Members

ContentDock

ContentDock = 3

The side dock in Lucidspark and Teamspaces


Context

Context = 2

The context menu that appears when the user right-clicks the canvas.


Main

Main = 1

The main drop down menus.


MermaidDiagramType

commandtypes.MermaidDiagramType

Enumeration Members

FLOWCHART

FLOWCHART = "flowchart"


OffsetType

core/offsettype.OffsetType

When adjusting the size or location of items on a page, these are the specific operations that are available.

Enumeration Members

CUSTOM

CUSTOM = 7


E

E = 9

Resize from the east (right) side of the selection, stretching horizontally.


MOVE

MOVE = 4

Move the selection without resizing.


N

N = 8

Resize from the north (upper) side of the selection, stretching vertically.


NE

NE = 1

Resize from the northeast (upper-right) corner of the selection, anchoring the lower-left corner in place.


NW

NW = 0

Resize from the northwest (upper-left) corner of the selection, anchoring the lower-right corner in place.


ROTATE

ROTATE = 5


S

S = 10

Resize from the south (lower) side of the selection, stretching vertically.


SCALE

SCALE = 6


SE

SE = 2

Resize from the southeast (lower-right) corner of the selection, anchoring the upper-left corner in place.


SW

SW = 3

Resize from the southwest (lower-left) corner of the selection, anchoring the upper-right corner in place.


W

W = 11

Resize from the west (left) side of the selection, stretching horizontally.


OnClickHandlerKeys

core/cardintegration/cardfielddisplaysettings.OnClickHandlerKeys

When configuring a field on a LucidCardBlock to be displayed as a data graphic, this click handler value specifies what to do when the user clicks on the data graphic produced.

Enumeration Members

BasicEditPanel

BasicEditPanel = "BasicEditPanel"

Display the UI panel to edit fields on the data associated with the card


CustomEditAction

CustomEditAction = "CustomEditAction"

Display a custom UI panel to edit non-standard fields on the data associated with the card


OpenBrowserWindow

OpenBrowserWindow = "OpenBrowserWindow"

Open a new browser window to a URL specified by linkFormula


PanelLocation

ui/panel.PanelLocation

Semantic locations to place a new menu item.

Enumeration Members

ContentDock

ContentDock = 2

In Lucidchart, create a sibling to the shape toolbox


ImageSearchTab

ImageSearchTab = 3

In Lucidchart & Lucidspark, add to the image dock


RightDock

RightDock = 1

In Lucidchart, create a sibling to the Contextual Panel


RuleFormattingType

core/rules/serializedeffect.RuleFormattingType

Enumeration Members

DATA_GRAPHICS

DATA_GRAPHICS = 1


FORMATTING

FORMATTING = 0


STENCIL

STENCIL = 2


ScalarFieldTypeEnum

core/data/fieldtypedefinition/scalarfieldtype.ScalarFieldTypeEnum

Enumeration Members

ANY

ANY = 0


BOOLEAN

BOOLEAN = 2


COLOR

COLOR = 4


CURRENCY

CURRENCY = 8


DATE

DATE = 5


DATEONLY

DATEONLY = 9


DICTIONARY

DICTIONARY = 7


NULL

NULL = 6


NUMBER

NUMBER = 1


STRING

STRING = 3


TIMEONLY

TIMEONLY = 10


SemanticCollection

core/data/datasource/semanticcollection.SemanticCollection

Used to define what a collection implicitly represents.

SemanticCollection.Items indicates that the collection's contents should be visualized as distinct elements (such as cards) that can be compared.

We currently only have one value in this enum. More will be added in the future.

The values in this enum are purposely generic.

Enumeration Members

Items

Items = "Items"


SemanticFields

core/data/fieldtypedefinition/semanticfields.SemanticFields

Semantic Fields serve as standardized categories that transcend individual data source labels, facilitating a uniform way to access and manipulate data. For instance, regardless of the source, data that pertains to "titles" or "user information" often carries the same kind of information, though it may be labeled differently across systems. Lucid’s Semantic Fields ensure that such data is recognized and treated consistently within the platform, regardless of external labeling conventions.

Semantic Mapping is the process through which Lucid aligns these disparate field names to a set of standardized Semantic Fields. By using Semantic Fields like Title, Description, User, and Project, Lucid simplifies the way users access and interact with data brought in from external sources.

Benefits of Semantic Fields: Uniformity: Ensures that data from diverse sources is referenced consistently within Lucid. Integration Simplicity: Simplifies the process of integrating new data sources into Lucid by mapping to an established set of Semantic Fields. Feature Compatibility: Allows for seamless use of Lucid’s intelligent features across all data, regardless of its origin. Data Organization: Provides a structured approach to organizing and grouping data within the Lucid ecosystem.

Enumeration Members

Description

Description = "description"

Captures detailed information or a summary about an item.


EndTime

EndTime = "time.endtime"

Pertains to the ending or completion time of an item.


Estimate

Estimate = "estimate"

Contains estimations related to items, like time or resource estimates.


ImageUrl

ImageUrl = "url.image"

Refers to the URL of the image associated with this item


IssueType

IssueType = "issuetype"

Classifies the type of issue or item, typically in the context of a ticketing system.


Priority

Priority = "priority"

Indicates the importance or urgency level of an item.


Project

Project = "project"

Relates to the project with which an item is associated.


Reporter

Reporter = "user.reporter"

Specific to the reporting user, typically in the context of a ticketing system.


SourceItemUrl

SourceItemUrl = "url"

The unique URL or identifier linking back to the item’s source.


Status

Status = "status"

Reflects status of an item, typically in the context of a ticketing system.


Time

Time = "time"

Refers to the time associated with an item.


Title

Title = "title"

Represents the title or main descriptor of an item.


User

User = "user"

Refers to the user associated with or assigned to an item.


SemanticKind

core/data/fieldtypedefinition/semantickind.SemanticKind

Deprecated

use SemanticFields instead. SemanticKind has not been removed to ensure backwards compatability.

Enumeration Members

Assignee

Assignee = "assignee"


Description

Description = "description"


EndTime

EndTime = "endtime"


Estimate

Estimate = "estimate"


GroupByHint

GroupByHint = "groupbyhint"


Id

Id = "id"


Image

Image = "image"


IssueType

IssueType = "issuetype"


Name

Name = "name"


PrimaryKeyReference

PrimaryKeyReference = "primarykeyreference"


Priority

Priority = "priority"


Project

Project = "project"


Reporter

Reporter = "reporter"


StartTime

StartTime = "starttime"


Status

Status = "status"


Title

Title = "title"


URL

URL = "url"


ShapeDataConditions

core/rules/conditions.ShapeDataConditions

Enumeration Members

Between

Between = 14


Equal

Equal = 12


GreaterThan

GreaterThan = 8


GreaterThanOrEqual

GreaterThanOrEqual = 9


LessThan

LessThan = 10


LessThanOrEqual

LessThanOrEqual = 11


NotBetween

NotBetween = 15


NotEqual

NotEqual = 13


TextContains

TextContains = 2


TextDoesNotContain

TextDoesNotContain = 3


TextEmpty

TextEmpty = 0


TextEndsWith

TextEndsWith = 7


TextEquals

TextEquals = 4

Deprecated


TextNotEmpty

TextNotEmpty = 1


TextNotEqual

TextNotEqual = 5

Deprecated


TextStartsWith

TextStartsWith = 6


ShapeDataInheritance

core/shapedatainheritance.ShapeDataInheritance

Enumeration Members

NAME

NAME = 1

Really just a UI level of inheritance, where the shape data panel should show the ability for you to enter a value under this name, and the name isn't editable. Because the default value for missing data is already empty, there's no need to actually do much down here in the model layer.


NONE

NONE = 0


VALUE

VALUE = 2

This is true inheritance, where the formula/value of the shape data is available on all descendant elements. i.e. if a page has a VALUE-inheritable shape data entry, that appears on every single Element on the page, including all groups and items inside those groups.


ShapeTypeConditions

core/rules/conditions.ShapeTypeConditions

Enumeration Members

TextContains

TextContains = 2


TextDoesNotContain

TextDoesNotContain = 3


SimpleImageFillPosition

core/properties/fillcolor.SimpleImageFillPosition

Different ways of laying out the image in the background of the block.

Enumeration Members

Fill

Fill = "fill"

The image retains its original aspect ratio, and is as small as possible while still completely covering the block


Fit

Fit = "fit"

The image retains its original aspect ratio, and is as large as possible while still fitting in the block


Original

Original = "original"

The image is shown in its original size if possible


Stretch

Stretch = "stretch"

The image is stretched to the bounding box of the block


Tile

Tile = "tile"

The image is tiled in its original size vertically and horizontally to fully cover the block


StatusValues

core/cardintegration/cardfielddisplaysettings.StatusValues

These are the six possible values for the status of a basic card block. Must be kept in sync with cake/app/webroot/ts/libraries/lucidcards/lucidcarddefaultstatus.ts

Enumeration Members

Blocked

Blocked = "Blocked"


Done

Done = "Done"


InProgress

InProgress = "In Progress"


New

New = "New"


NotDoing

NotDoing = "Not Doing"


Todo

Todo = "To Do"


StrokeStyle

core/properties/strokestyle.StrokeStyle

Enumeration Members

DashDot

DashDot = "dashdot"


DashDotDot

DashDotDot = "dashdotdot"


DashLongDash

DashLongDash = "dashlongdash"


Dashed

Dashed = "dashed"


Dashed24

Dashed24 = "dashed24"


Dashed32

Dashed32 = "dashed32"


Dashed44

Dashed44 = "dashed44"


DotDotDot

DotDotDot = "dotdotdot"


Dotted

Dotted = "dotted"


LongDash

LongDash = "longdash"


Solid

Solid = "solid"


StripeThickThick

StripeThickThick = "stripethickthick"


StripeThickThin

StripeThickThin = "stripethickthin"


StripeThickThinThick

StripeThickThinThick = "stripethickthinthick"


StripeThinThick

StripeThinThick = "stripethinthick"


StripeThinThickThin

StripeThinThickThin = "stripethinthickthin"


StripeThinThin

StripeThinThin = "stripethinthin"


StripeTriple

StripeTriple = "stripetriple"


TextConditions

core/rules/conditions.TextConditions

Enumeration Members

Between

Between = 14


Equal

Equal = 12


GreaterThan

GreaterThan = 8


GreaterThanOrEqual

GreaterThanOrEqual = 9


LessThan

LessThan = 10


LessThanOrEqual

LessThanOrEqual = 11


NotBetween

NotBetween = 15


NotEqual

NotEqual = 13


TextContains

TextContains = 2


TextDoesNotContain

TextDoesNotContain = 3


TextEmpty

TextEmpty = 0


TextNotEmpty

TextNotEmpty = 1


TextMarkupNames

document/text/textstyle.TextMarkupNames

Text styles that can be read and written with ItemProxy.textStyles.

Enumeration Members

Bold

Bold = "bold"


Color

Color = "color"


Family

Family = "font"


HAlign

HAlign = "align"


Italic

Italic = "italic"


Size

Size = "size"


Underline

Underline = "underline"


UnfurlCallbackType

core/unfurl/unfurlcallbacks.UnfurlCallbackType

Enumeration Members

AfterUnfurl

AfterUnfurl = "a"


ExpandCallback

ExpandCallback = "e"


Unfurl

Unfurl = "u"


UnfurlIframeAspectRatio

core/unfurl/unfurliframe.UnfurlIframeAspectRatio

An enumeration of of the supported unfurl Iframe aspect ratio. The iframe will be maximized to fit the screen responsively

Enumeration Members

FourToThree

FourToThree = "4:3"

Aspect ratio 4:3, wider rectangle


NineToSixteen

NineToSixteen = "9:16"

Aspect ratio 9:16, taller rectangle


SixteenToNine

SixteenToNine = "16:9"

Aspect ratio 16:9, wider rectangle This will be the default setting if not provided


Square

Square = "1:1"

Aspect ratio 1:1, square


ThreeToFour

ThreeToFour = "3:4"

Aspect ratio 3:4, taller rectangle


UnfurlRefreshErrorType

core/unfurl/unfurlrefresherrortype.UnfurlRefreshErrorType

Enumeration Members

AuthorizationFailure

AuthorizationFailure = "Authorization failure"


GenericFailure

GenericFailure = "Generic failure"


VerticalBadgePos

core/properties/datagraphic/badgeposition.VerticalBadgePos

Enumeration Members

BOTTOM

BOTTOM = 2


CENTER

CENTER = 1


TOP

TOP = 0


ZOrderOperation

commandtypes.ZOrderOperation

Enumeration Members

BOTTOM

BOTTOM = 4


DOWN

DOWN = 3


TOP

TOP = 2


UP

UP = 1


Modules

commandtypes

Enumerations

Type Aliases

AddCardIntegrationQuery

Ƭ AddCardIntegrationQuery: Object

Type declaration
Name Type Description
ac? { cc: string ; gif: string } If specified, add-card settings
ac.cc string Create card action
ac.gif string Get input fields action
cim? { sh: string } If specified, custom import modal
cim.sh string -
dcn string Data connector name
fc { fvsc?: [string, string][] ; gf: string ; osfc?: string } Field configuration
fc.fvsc? [string, string][] Field name -> callback name tuples for searching for legal field values in an enum
fc.gf string Callback to get field definitions for all fields supported by the card integration
fc.osfc? string Callback to handle a change in the fields the user want to be displayed
gdc string Get default config action
i? string Show intro if user has not yet authorized this integration
il string Item label
im? { gsf: string ; i: string ; os?: string ; s: string } If specified, import modal settings
im.gsf string Get search fields action
im.i string Import action
im.os? string OnSetup action
im.s string Search action
isl string Items label
n string Title/name
ts? Partial< TextStyle > Text style
u string Icon url

AddCardIntegrationResult

Ƭ AddCardIntegrationResult: undefined


AddDiagramFromMermaidQuery

Ƭ AddDiagramFromMermaidQuery: Object

Type declaration
Name Type Description
e? boolean If true, place the diagram exactly at the point. Otherwise, place it in open space near the point.
m string A mermaid diagram syntax string, e.g., flowchart TD\nA --> B
o? Point The point on the canvas for placing the diagram
t MermaidDiagramType Type of diagram as an enum, e.g., flowchart.

AddDiagramFromMermaidResult

Ƭ AddDiagramFromMermaidResult: Promise<string[]>

A list of shape ids that represent the mermaid diagram. Empty if the rendering fails.


AddLineTextAreaQuery

Ƭ AddLineTextAreaQuery: Object

Type declaration
Name Type Description
id string Which line
p SerializedLineTextAreaPositioning Where to place the text along the line
t string Plain text to put at this location (will be styled with document theme)

AddLineTextAreaResult

Ƭ AddLineTextAreaResult: string

The name of the created text area


AddMenuItemQuery

Ƭ AddMenuItemQuery: Object

Type declaration
Name Type Description
a? string Named action to run when the menu item is clicked
d? string Named action that returns whether the menu item should be disabled
f? { a: string ; ac: string ; b?: boolean ; s?: boolean } If specified, this menu item should launch a file picker
f.a string Action to call when files are selected
f.ac string File types to accept
f.b? boolean Return content in a binary ArrayBuffer instead of as text
f.s? boolean Single file only
i? string Url of the Icon to display on the menu item
l string Label to display on the menu item
loc? MenuLocation If specified, where to place the menu item; defaults to MenuLocation.Extension
t MenuType Which menu to put the item in
v? string Named action that returns whether the menu item should be visible

AddMenuItemResult

Ƭ AddMenuItemResult: undefined


AddShapeDataQuery

Ƭ AddShapeDataQuery: Object

Type declaration
Name Type Description
i ShapeDataInheritance Inheritance setting for the new shape data
id? string ID of the element to add this shape data to
n string Name for this shape data
v? SerializedFieldType Initial value of this shape data; use a string beginning with '=' for a formula

AddShapeDataResult

Ƭ AddShapeDataResult: undefined


AddTableColumnQuery

Ƭ AddTableColumnQuery: Object

Type declaration
Name Type Description
b boolean True if the column should be added before the reference cell
c number Column of the reference cell that the column should be added next to
id string ID of the table to add this column to
r number Row of the reference cell that the column should be added next to

AddTableColumnResult

Ƭ AddTableColumnResult: number

The index of the newly created column


AddTableRowQuery

Ƭ AddTableRowQuery: Object

Type declaration
Name Type Description
b boolean True if the row should be added before the reference cell
c number Column of the reference cell that the row should be added next to
id string ID of the table to add this row to
r number Row of the reference cell that the row should be added next to

AddTableRowResult

Ƭ AddTableRowResult: number

The index of the newly created row


AlertQuery

Ƭ AlertQuery: Object

Type declaration
Name Type Description
b string Body text
bt? string Button text; defaults to i18n'ed "OK"
t? string Title; defaults to extension title

AlertResult

Ƭ AlertResult: Promise<boolean>

True if they click OK, false otherwise


AnimateViewportQuery

Ƭ AnimateViewportQuery: Object

Type declaration
Name Type Description
bb Box Bounding box on that page that will fill as much of the viewport as possible
p string ID of the page to view

AnimateViewportResult

Ƭ AnimateViewportResult: Promise<void>


AwaitDataSourceImportQuery

Ƭ AwaitDataSourceImportQuery: Object

Type declaration
Name Type Description
n string Data Connector Name
s string Sync data source ID Nonce

AwaitDataSourceImportResult

Ƭ AwaitDataSourceImportResult: Promise<string>

Promise resolving to the data source ID where the data arrived


AwaitImportQuery

Ƭ AwaitImportQuery: Object

Type declaration
Name Type Description
c string Sync collection ID
n string Data Connector Name
pk string[] Keys to await
s? string Sync data source ID Nonce
t number Timeout in milliseconds; reject returned promise if no data appears in time

AwaitImportResult

Ƭ AwaitImportResult: Promise<string>

Promise resolving to the collection ID where the data arrived


BootstrapQuery

Ƭ BootstrapQuery: Object

Type declaration
Name Type Description
c string Named action that accepts the bootstrap data, and which may return a Promise or void. After awaiting\ the result of the callback, the bootstrap data is cleared.
m? boolean Marks a document as requiring the editor extension.

BootstrapResult

Ƭ BootstrapResult: Promise<void>


CalculateHashQuery

Ƭ CalculateHashQuery: Object

Type declaration
Name Type
a HashAlgorithmEnum
s string

CalculateHashResult

Ƭ CalculateHashResult: string


CanEditPackageSettingsQuery

Ƭ CanEditPackageSettingsQuery: undefined


CanEditPackageSettingsResult

Ƭ CanEditPackageSettingsResult: Promise<boolean>


CancelDragBlockToCanvasQuery

Ƭ CancelDragBlockToCanvasQuery: void


CancelDragBlockToCanvasResult

Ƭ CancelDragBlockToCanvasResult: undefined


CommandArgs

Ƭ CommandArgs: Object

This is a type declaration whose purpose is to allow TypeScript to enforce the correct parameter and return types from EditorClient.sendCommand based on which command name you pass in as the first parameter.

IMPORTANT - Before you add a new command bring it up in #api-committee to get feedback

Type declaration
Name Type
a { query: AlertQuery ; result: AlertResult }
a.query AlertQuery
a.result AlertResult
aci { query: AddCardIntegrationQuery ; result: AddCardIntegrationResult }
aci.query AddCardIntegrationQuery
aci.result AddCardIntegrationResult
adfm { query: AddDiagramFromMermaidQuery ; result: AddDiagramFromMermaidResult }
adfm.query AddDiagramFromMermaidQuery
adfm.result AddDiagramFromMermaidResult
adft { query: AddDiagramFromTextQuery ; result: AddDiagramFromTextResult }
adft.query AddDiagramFromTextQuery
adft.result AddDiagramFromTextResult
adi { query: AwaitDataSourceImportQuery ; result: AwaitDataSourceImportResult }
adi.query AwaitDataSourceImportQuery
adi.result AwaitDataSourceImportResult
ai { query: AwaitImportQuery ; result: AwaitImportResult }
ai.query AwaitImportQuery
ai.result AwaitImportResult
alta { query: AddLineTextAreaQuery ; result: AddLineTextAreaResult }
alta.query AddLineTextAreaQuery
alta.result AddLineTextAreaResult
ami { query: AddMenuItemQuery ; result: AddMenuItemResult }
ami.query AddMenuItemQuery
ami.result AddMenuItemResult
aoauth { query: SendAsyncOAuthRequestQuery ; result: SendOAuthRequestResponse }
aoauth.query SendAsyncOAuthRequestQuery
aoauth.result SendOAuthRequestResponse
asd { query: AddShapeDataQuery ; result: AddShapeDataResult }
asd.query AddShapeDataQuery
asd.result AddShapeDataResult
asi { query: AddSpreadsheetIntegrationQuery ; result: AddSpreadsheetIntegrationResult }
asi.query AddSpreadsheetIntegrationQuery
asi.result AddSpreadsheetIntegrationResult
atc { query: AddTableColumnQuery ; result: AddTableColumnResult }
atc.query AddTableColumnQuery
atc.result AddTableColumnResult
atr { query: AddTableRowQuery ; result: AddTableRowResult }
atr.query AddTableRowQuery
atr.result AddTableRowResult
av { query: AnimateViewportQuery ; result: AnimateViewportResult }
av.query AnimateViewportQuery
av.result AnimateViewportResult
b { query: BootstrapQuery ; result: BootstrapResult }
b.query BootstrapQuery
b.result BootstrapResult
c { query: ConfirmQuery ; result: ConfirmResult }
c.query ConfirmQuery
c.result ConfirmResult
ca { query: CreateCardsQuery ; result: CreateCardsResult }
ca.query CreateCardsQuery
ca.result CreateCardsResult
cb { query: CreateBlockQuery ; result: CreateBlockResult }
cb.query CreateBlockQuery
cb.result CreateBlockResult
cc { query: CreateCollectionQuery ; result: CreateCollectionResult }
cc.query CreateCollectionQuery
cc.result CreateCollectionResult
cdc { query: CancelDragBlockToCanvasQuery ; result: CancelDragBlockToCanvasResult }
cdc.query CancelDragBlockToCanvasQuery
cdc.result CancelDragBlockToCanvasResult
cde { query: CreateDocumentElementQuery ; result: CreateDocumentElementResult }
cde.query CreateDocumentElementQuery
cde.result CreateDocumentElementResult
cds { query: CreateDataSourceQuery ; result: CreateDataSourceResult }
cds.query CreateDataSourceQuery
cds.result CreateDataSourceResult
ceps { query: CanEditPackageSettingsQuery ; result: CanEditPackageSettingsResult }
ceps.query CanEditPackageSettingsQuery
ceps.result CanEditPackageSettingsResult
cg { query: CreateGroupQuery ; result: CreateGroupResult }
cg.query CreateGroupQuery
cg.result CreateGroupResult
cl { query: CreateLineQuery ; result: CreateLineResult }
cl.query CreateLineQuery
cl.result CreateLineResult
cp { query: CreatePageQuery ; result: CreatePageResult }
cp.query CreatePageQuery
cp.result CreatePageResult
cui { query: CreateUserImageQuery ; result: CreateUserImageResult }
cui.query CreateUserImageQuery
cui.result CreateUserImageResult
d { query: DownloadQuery ; result: DownloadResult }
d.query DownloadQuery
d.result DownloadResult
da { query: DataActionQuery ; result: DataActionResult }
da.query DataActionQuery
da.result DataActionResult
dde { query: DeleteDocumentElementQuery ; result: DeleteDocumentElementResult }
dde.query DeleteDocumentElementQuery
dde.result DeleteDocumentElementResult
di { query: DeleteItemQuery ; result: DeleteItemResult }
di.query DeleteItemQuery
di.result DeleteItemResult
die { query: DataItemExistsQuery ; result: DataItemExistsResult }
die.query DataItemExistsQuery
die.result DataItemExistsResult
dis { query: DuplicateItemsQuery ; result: DuplicateItemsResult }
dis.query DuplicateItemsQuery
dis.result DuplicateItemsResult
dp { query: DeletePageQuery ; result: DeletePageResult }
dp.query DeletePageQuery
dp.result DeletePageResult
dpm { query: DragPointerMoveQuery ; result: DragPointerMoveResult }
dpm.query DragPointerMoveQuery
dpm.result DragPointerMoveResult
dpu { query: DragPointerUpQuery ; result: DragPointerUpResult }
dpu.query DragPointerUpQuery
dpu.result DragPointerUpResult
dsd { query: DeleteShapeDataQuery ; result: DeleteShapeDataResult }
dsd.query DeleteShapeDataQuery
dsd.result DeleteShapeDataResult
dtc { query: DeleteTableColumnQuery ; result: DeleteTableColumnResult }
dtc.query DeleteTableColumnQuery
dtc.result DeleteTableColumnResult
dtr { query: DeleteTableRowQuery ; result: DeleteTableRowResult }
dtr.query DeleteTableRowQuery
dtr.result DeleteTableRowResult
ee { query: ElementExistsQuery ; result: ElementExistsResult }
ee.query ElementExistsQuery
ee.result ElementExistsResult
ef { query: ExecuteFormulaQuery ; result: ExecuteFormulaResult }
ef.query ExecuteFormulaQuery
ef.result ExecuteFormulaResult
fas { query: FindAvailableSpaceQuery ; result: FindAvailableSpaceResult }
fas.query FindAvailableSpaceQuery
fas.result FindAvailableSpaceResult
fbe { query: FireBeaconEventQuery ; result: FireBeaconEventResult }
fbe.query FireBeaconEventQuery
fbe.result FireBeaconEventResult
gcl { query: GetConnectedLinesQuery ; result: GetConnectedLinesResult }
gcl.query GetConnectedLinesQuery
gcl.result GetConnectedLinesResult
gcp { query: GetCurrentPageQuery ; result: GetCurrentPageResult }
gcp.query GetCurrentPageQuery
gcp.result GetCurrentPageResult
gcs { query: GetCustomShapeQuery ; result: GetCustomShapeResult }
gcs.query GetCustomShapeQuery
gcs.result GetCustomShapeResult
gdap { query: GetDocumentAccessPermissionQuery ; result: GetDocumentAccessPermissionResult }
gdap.query GetDocumentAccessPermissionQuery
gdap.result GetDocumentAccessPermissionResult
gdc { query: GetDocumentChunksQuery ; result: GetDocumentChunksResult }
gdc.query GetDocumentChunksQuery
gdc.result GetDocumentChunksResult
gdid { query: GetDocumentIdQuery ; result: GetDocumentIdResult }
gdid.query GetDocumentIdQuery
gdid.result GetDocumentIdResult
gdif { query: GetDataItemFieldQuery ; result: GetDataItemFieldResult }
gdif.query GetDataItemFieldQuery
gdif.result GetDataItemFieldResult
gec { query: GetEnvironmentConfigQuery ; result: GetEnvironmentConfigResult }
gec.query GetEnvironmentConfigQuery
gec.result GetEnvironmentConfigResult
get { query: GetElementTypeQuery ; result: GetElementTypeResult }
get.query GetElementTypeQuery
get.result GetElementTypeResult
gia { query: GetItemsAtQuery ; result: GetItemsAtResult }
gia.query GetItemsAtQuery
gia.result GetItemsAtResult
gip { query: GetItemPageIdQuery ; result: GetItemPageIdResult }
gip.query GetItemPageIdQuery
gip.result GetItemPageIdResult
goci { query: GetOAuthClientIdQuery ; result: GetOAuthClientIdResult }
goci.query GetOAuthClientIdQuery
goci.result GetOAuthClientIdResult
got { query: GetOAuthTokenQuery ; result: GetOAuthTokenResult }
got.query GetOAuthTokenQuery
got.result GetOAuthTokenResult
gp { query: GetPropertyQuery ; result: GetPropertyResult }
gp.query GetPropertyQuery
gp.result GetPropertyResult
gpr { query: GetProductQuery ; result: GetProductResult }
gpr.query GetProductQuery
gpr.result GetProductResult
gps { query: GetPackageSettingsQuery ; result: GetPackageSettingsResult }
gps.query GetPackageSettingsQuery
gps.result GetPackageSettingsResult
grk { query: GetReferenceKeyQuery ; result: GetReferenceKeyResult }
grk.query GetReferenceKeyQuery
grk.result GetReferenceKeyResult
grlp { query: GetRelativeLinePositionQuery ; result: GetRelativeLinePositionResult }
grlp.query GetRelativeLinePositionQuery
grlp.result GetRelativeLinePositionResult
gs { query: GetSelectionQuery ; result: GetSelectionResult }
gs.query GetSelectionQuery
gs.result GetSelectionResult
gsd { query: GetShapeDataQuery ; result: GetShapeDataResult }
gsd.query GetShapeDataQuery
gsd.result GetShapeDataResult
gsvg { query: GetSvgQuery ; result: GetSvgResult }
gsvg.query GetSvgQuery
gsvg.result GetSvgResult
gts { query: GetTextStyleQuery ; result: GetTextStyleResult }
gts.query GetTextStyleQuery
gts.result GetTextStyleResult
guid { query: GetUserIdQuery ; result: GetUserIdResult }
guid.query GetUserIdQuery
guid.result GetUserIdResult
gvr { query: GetVisibleRectQuery ; result: GetVisibleRectResult }
gvr.query GetVisibleRectQuery
gvr.result GetVisibleRectResult
hac { query: HookAllChangesQuery ; result: HookAllChangesResult }
hac.query HookAllChangesQuery
hac.result HookAllChangesResult
hci { query: HookCreateItemsQuery ; result: HookCreateItemsResult }
hci.query HookCreateItemsQuery
hci.result HookCreateItemsResult
hdi { query: HookDeleteItemsQuery ; result: HookDeleteItemsResult }
hdi.query HookDeleteItemsQuery
hdi.result HookDeleteItemsResult
hm { query: HideModalQuery ; result: HideModalResult }
hm.query HideModalQuery
hm.result HideModalResult
hp { query: HidePanelQuery ; result: HidePanelResult }
hp.query HidePanelQuery
hp.result HidePanelResult
hs { query: HookSelectionQuery ; result: HookSelectionResult }
hs.query HookSelectionQuery
hs.result HookSelectionResult
hsh { query: CalculateHashQuery ; result: CalculateHashResult }
hsh.query CalculateHashQuery
hsh.result CalculateHashResult
hte { query: HookTextEditQuery ; result: HookTextEditResult }
hte.query HookTextEditQuery
hte.result HookTextEditResult
ic { query: ImportCardsQuery ; result: ImportCardsResult }
ic.query ImportCardsQuery
ic.result ImportCardsResult
il { query: ImportLinksQuery ; result: ImportLinksResult }
il.query ImportLinksQuery
il.result ImportLinksResult
imp { query: ImportPageQuery ; result: ImportPageResult }
imp.query ImportPageQuery
imp.result ImportPageResult
k { query: KillExtensionQuery ; result: KillExtensionResult }
k.query KillExtensionQuery
k.result KillExtensionResult
lb { query: ListChildrenQuery ; result: ListChildrenResult }
lb.query ListChildrenQuery
lb.result ListChildrenResult
lbc { query: LoadBlockClassesQuery ; result: LoadBlockClassesResult }
lbc.query LoadBlockClassesQuery
lbc.result LoadBlockClassesResult
lc { query: ListCollectionsQuery ; result: ListCollectionsResult }
lc.query ListCollectionsQuery
lc.result ListCollectionsResult
lcf { query: ListCollectionFieldsQuery ; result: ListCollectionFieldsResult }
lcf.query ListCollectionFieldsQuery
lcf.result ListCollectionFieldsResult
lde { query: ListDocumentElementsQuery ; result: ListDocumentElementsResult }
lde.query ListDocumentElementsQuery
lde.result ListDocumentElementsResult
ldi { query: ListDataItemsQuery ; result: ListDataItemsResult }
ldi.query ListDataItemsQuery
ldi.result ListDataItemsResult
lds { query: ListDataSourcesQuery ; result: ListDataSourcesResult }
lds.query ListDataSourcesQuery
lds.result ListDataSourcesResult
lg { query: ListChildrenQuery ; result: ListChildrenResult }
lg.query ListChildrenQuery
lg.result ListChildrenResult
ll { query: ListChildrenQuery ; result: ListChildrenResult }
ll.query ListChildrenQuery
ll.result ListChildrenResult
llm { query: GetLLMContextFromItemsQuery ; result: GetLLMContextFromItemsResult }
llm.query GetLLMContextFromItemsQuery
llm.result GetLLMContextFromItemsResult
log { query: JsonSerializable ; result: JsonSerializable }
log.query JsonSerializable
log.result JsonSerializable
lp { query: ListPagesQuery ; result: ListPagesResult }
lp.query ListPagesQuery
lp.result ListPagesResult
lpr { query: ListPropertiesQuery ; result: ListPropertiesResult }
lpr.query ListPropertiesQuery
lpr.result ListPropertiesResult
lrk { query: ListReferenceKeysQuery ; result: ListReferenceKeysResult }
lrk.query ListReferenceKeysQuery
lrk.result ListReferenceKeysResult
lsd { query: ListShapeDataQuery ; result: ListShapeDataResult }
lsd.query ListShapeDataQuery
lsd.result ListShapeDataResult
lta { query: ListTextAreasQuery ; result: ListTextAreasResult }
lta.query ListTextAreasQuery
lta.result ListTextAreasResult
mt { query: MeasureTextQuery ; result: MeasureTextResult }
mt.query MeasureTextQuery
mt.result MeasureTextResult
oauth { query: SendOAuthRequestQuery ; result: SendOAuthRequestResponse }
oauth.query SendOAuthRequestQuery
oauth.result SendOAuthRequestResponse
oi { query: OffsetItemsQuery ; result: OffsetItemsResult }
oi.query OffsetItemsQuery
oi.result OffsetItemsResult
p { query: PromptQuery ; result: PromptResult }
p.query PromptQuery
p.result PromptResult
pdf { query: StartPDFUploadRequestQuery ; result: StartPDFUploadRequestResponse }
pdf.query StartPDFUploadRequestQuery
pdf.result StartPDFUploadRequestResponse
pdi { query: PatchDataItemsQuery ; result: PatchDataItemsResult }
pdi.query PatchDataItemsQuery
pdi.result PatchDataItemsResult
perm { query: SendPermanentTokenRequestQuery ; result: SendOAuthRequestResponse }
perm.query SendPermanentTokenRequestQuery
perm.result SendOAuthRequestResponse
r { query: ReloadExtensionQuery ; result: ReloadExtensionResult }
r.query ReloadExtensionQuery
r.result ReloadExtensionResult
rp { query: RegisterPanelQuery ; result: RegisterPanelResult }
rp.query RegisterPanelQuery
rp.result RegisterPanelResult
ru { query: RegisterUnfurlQuery ; result: RegisterUnfurlResult }
ru.query RegisterUnfurlQuery
ru.result RegisterUnfurlResult
scp { query: SetCurrentPageQuery ; result: SetCurrentPageResult }
scp.query SetCurrentPageQuery
scp.result SetCurrentPageResult
sdc { query: StartDragBlockToCanvasQuery ; result: StartDragBlockToCanvasResult }
sdc.query StartDragBlockToCanvasQuery
sdc.result StartDragBlockToCanvasResult
sleep { query: SleepForTestCaseQuery ; result: SleepForTestCaseResult }
sleep.query SleepForTestCaseQuery
sleep.result SleepForTestCaseResult
sm { query: ShowModalQuery ; result: ShowModalResult }
sm.query ShowModalQuery
sm.result ShowModalResult
sp { query: SetPropertyQuery ; result: SetPropertyResult }
sp.query SetPropertyQuery
sp.result SetPropertyResult
spn { query: ShowPanelQuery ; result: ShowPanelResult }
spn.query ShowPanelQuery
spn.result ShowPanelResult
sps { query: SetPackageSettingsQuery ; result: SetPackageSettingsResult }
sps.query SetPackageSettingsQuery
sps.result SetPackageSettingsResult
spsm { query: ShowPackageSettingsModalQuery ; result: ShowPackageSettingsModalResult }
spsm.query ShowPackageSettingsModalQuery
spsm.result ShowPackageSettingsModalResult
srk { query: SetReferenceKeyQuery ; result: SetReferenceKeyResult }
srk.query SetReferenceKeyQuery
srk.result SetReferenceKeyResult
ss { query: SetSelectionQuery ; result: SetSelectionResult }
ss.query SetSelectionQuery
ss.result SetSelectionResult
ssd { query: SetShapeDataQuery ; result: SetShapeDataResult }
ssd.query SetShapeDataQuery
ssd.result SetShapeDataResult
st { query: SetTextQuery ; result: SetTextResult }
st.query SetTextQuery
st.result SetTextResult
sts { query: SetTextStyleQuery ; result: SetTextStyleResult }
sts.query SetTextStyleQuery
sts.result SetTextStyleResult
suim { query: SendUIMessageQuery ; result: SendUIMessageResult }
suim.query SendUIMessageQuery
suim.result SendUIMessageResult
tauth { query: TriggerAuthFlowQuery ; result: TriggerAuthFlowResult }
tauth.query TriggerAuthFlowQuery
tauth.result TriggerAuthFlowResult
throw { query: ThrowForTestCaseQuery ; result: ThrowForTestCaseResult }
throw.query ThrowForTestCaseQuery
throw.result ThrowForTestCaseResult
uac { query: UnhookAllChangesQuery ; result: UnhookAllChangesResult }
uac.query UnhookAllChangesQuery
uac.result UnhookAllChangesResult
uci { query: UnhookCreateItemsQuery ; result: UnhookCreateItemsResult }
uci.query UnhookCreateItemsQuery
uci.result UnhookCreateItemsResult
udi { query: UnhookDeleteItemsQuery ; result: UnhookDeleteItemsResult }
udi.query UnhookDeleteItemsQuery
udi.result UnhookDeleteItemsResult
us { query: UnhookSelectionQuery ; result: UnhookSelectionResult }
us.query UnhookSelectionQuery
us.result UnhookSelectionResult
ute { query: UnhookTextEditQuery ; result: UnhookTextEditResult }
ute.query UnhookTextEditQuery
ute.result UnhookTextEditResult
wm { query: WithMutexQuery ; result: WithMutexResult }
wm.query WithMutexQuery
wm.result WithMutexResult
wsa { query: WithSilentActionsQuery ; result: WithSilentActionsResult }
wsa.query WithSilentActionsQuery
wsa.result WithSilentActionsResult
xhr { query: SendXHRQuery ; result: SendXHRResponse }
xhr.query SendXHRQuery
xhr.result SendXHRResponse
z { query: ZOrderQuery ; result: ZOrderResult }
z.query ZOrderQuery
z.result ZOrderResult

ConfirmQuery

Ƭ ConfirmQuery: Object

Type declaration
Name Type Description
b string Body text
c? string Cancel button text; defaults to i18n'ed "Cancel"
o? string OK button text; defaults to i18n'ed "OK"
t? string Title; defaults to extension title

ConfirmResult

Ƭ ConfirmResult: Promise<boolean>

True if they click OK, false otherwise


CreateBlockQuery

Ƭ CreateBlockQuery: Object

Type declaration
Name Type Description
c string Class name of the block to create
p? string By default, we add the block to the current page & currently active group. If specified, the block will instead be created as a direct child of the given page.
s? JsonSerializable If specified, the stencil for a custom shape. Only valid if the class name is 'CustomBlock'

CreateBlockResult

Ƭ CreateBlockResult: string


CreateCardsQuery

Ƭ CreateCardsQuery: Object

Type declaration
Name Type Description
cid string Identifier for the cards integration.
coid string Identifier for the collection.
pks string[] Primary keys of the items to import.

CreateCardsResult

Ƭ CreateCardsResult: Promise<string[]>


CreateCollectionFieldDefinition

Ƭ CreateCollectionFieldDefinition: Object

Type declaration
Name Type Description
n string Name of the field
t SerializedFieldTypeDefinition Type of the values in this field

CreateCollectionQuery

Ƭ CreateCollectionQuery: Object

Type declaration
Name Type Description
f CreateCollectionFieldDefinition [] Fields that can be set on data items in this collection
fl? Record<string, string> -
n string Name of the collection
p string[] Field(s) to use as the primary key of this collection
s string ID of the data source to add this collection to

CreateCollectionResult

Ƭ CreateCollectionResult: string


CreateDataSourceQuery

Ƭ CreateDataSourceQuery: Object

Type declaration
Name Type Description
n string Name of the data source
s { [key: string]: JsonSerializable ; } Source configuration for this data source--information about where it came from, or any metadata that might be useful

CreateDataSourceResult

Ƭ CreateDataSourceResult: string


CreateDocumentElementQuery

Ƭ CreateDocumentElementQuery: Object

Type declaration
Name Type Description
p Record<string, any> Properties to set on that element
t DocumentElementType Type of element to create

CreateDocumentElementResult

Ƭ CreateDocumentElementResult: string | undefined


CreateGroupQuery

Ƭ CreateGroupQuery: Object

Type declaration
Name Type Description
i string[] List of item IDs to group
p? string By default, we add the group to the current page & currently active group. If specified, the group will instead be created as a direct child of the given page.

CreateGroupResult

Ƭ CreateGroupResult: string


CreateLineQuery

Ƭ CreateLineQuery: Object

Type declaration
Name Type Description
p? string By default, we add the line to the current page & currently active group. If specified, the line will instead be created as a direct child of the given page.

CreateLineResult

Ƭ CreateLineResult: string


CreatePageQuery

Ƭ CreatePageQuery: void


CreatePageResult

Ƭ CreatePageResult: string


CreateUserImageQuery

Ƭ CreateUserImageQuery: Object

Type declaration
Name Type Description
d string base64-encoded image data
t string media type

CreateUserImageResult

Ƭ CreateUserImageResult: Promise< RawCreateUserImageResult >


DataActionQuery

Ƭ DataActionQuery: Object

Type declaration
Name Type Description
a boolean Is Async
fd? unknown Flow Data
fn string Flow Name
n string Data Connector Name
s? string Sync data source ID Nonce

DataActionResult

Ƭ DataActionResult: Promise< RawDataActionResult >


DataItemExistsQuery

Ƭ DataItemExistsQuery: Object

Type declaration
Name Type Description
c string Collection ID to check
pk string Primary key to check

DataItemExistsResult

Ƭ DataItemExistsResult: boolean


DeleteDocumentElementQuery

Ƭ DeleteDocumentElementQuery: string


DeleteDocumentElementResult

Ƭ DeleteDocumentElementResult: boolean


DeleteItemQuery

Ƭ DeleteItemQuery: string


DeleteItemResult

Ƭ DeleteItemResult: boolean


DeletePageQuery

Ƭ DeletePageQuery: string


DeletePageResult

Ƭ DeletePageResult: boolean


DeleteShapeDataQuery

Ƭ DeleteShapeDataQuery: Object

Type declaration
Name Type Description
id? string ID of the element to delete this shape data from
n string Name for this shape data

DeleteShapeDataResult

Ƭ DeleteShapeDataResult: undefined


DeleteTableColumnQuery

Ƭ DeleteTableColumnQuery: Object

Type declaration
Name Type Description
i number Index of the column to delete
id string ID of the table to delete this column from

DeleteTableColumnResult

Ƭ DeleteTableColumnResult: void


DeleteTableRowQuery

Ƭ DeleteTableRowQuery: Object

Type declaration
Name Type Description
i number Index of the row to delete
id string ID of the table to delete this row from

DeleteTableRowResult

Ƭ DeleteTableRowResult: void


DownloadQuery

Ƭ DownloadQuery: Object

Type declaration
Name Type Description
b64 boolean If true, data is base64-encoded and should be converted to binary for download
d string Data to put in the file
f string Filename of the download
m string MIME type for the download

DownloadResult

Ƭ DownloadResult: undefined


DragPointerMoveQuery

Ƭ DragPointerMoveQuery: Object

Type declaration
Name Type
x number
y number

DragPointerMoveResult

Ƭ DragPointerMoveResult: undefined


DragPointerUpQuery

Ƭ DragPointerUpQuery: Object

Type declaration
Name Type
x number
y number

DragPointerUpResult

Ƭ DragPointerUpResult: undefined


DuplicateItemsQuery

Ƭ DuplicateItemsQuery: Object

Type declaration
Name Type
ids string[]

DuplicateItemsResult

Ƭ DuplicateItemsResult: Promise<string[]>


ElementExistsQuery

Ƭ ElementExistsQuery: Object

Type declaration
Name Type
id? string

ElementExistsResult

Ƭ ElementExistsResult: boolean


ExecuteFormulaQuery

Ƭ ExecuteFormulaQuery: Object

Type declaration
Name Type Description
f string Formula to execute, e.g. '@a + @b' or 'CONTAINEDBY'
id string ID of the element to execute a formula on

ExecuteFormulaResult

Ƭ ExecuteFormulaResult: SerializedFieldType | SerializedDataError


FindAvailableSpaceQuery

Ƭ FindAvailableSpaceQuery: Object

Type declaration
Name Type Description
h number Height
p? string If specified, the page to find space on. Otherwise use the visible page.
w number Width
x? number If specified, the location to search near. Otherwise use the viewport.
y? number If specified, the location to search near. Otherwise use the viewport.

FindAvailableSpaceResult

Ƭ FindAvailableSpaceResult: Object

Type declaration
Name Type Description
p string ID of the page you should add content to
x number Origin of the rectangle of empty space
y number Origin of the rectangle of empty space

FireBeaconEventQuery

Ƭ FireBeaconEventQuery: Object

Type declaration
Name Type Description
e string the beacon event to be sent

FireBeaconEventResult

Ƭ FireBeaconEventResult: void


GetConnectedLinesQuery

Ƭ GetConnectedLinesQuery: string


GetConnectedLinesResult

Ƭ GetConnectedLinesResult: string[]


GetCurrentPageQuery

Ƭ GetCurrentPageQuery: void


GetCurrentPageResult

Ƭ GetCurrentPageResult: string | undefined


GetCustomShapeQuery

Ƭ GetCustomShapeQuery: Object

Type declaration
Name Type Description
l string Name of the custom shape library in this same extension package
s string Name of the shape in that library to find

GetCustomShapeResult

Ƭ GetCustomShapeResult: Promise<{ bb: Box ; p: JsonObject ; s: JsonSerializable } | undefined>


GetDataItemFieldQuery

Ƭ GetDataItemFieldQuery: Object

Type declaration
Name Type Description
c string Collection ID to query
f string Name of field to read
pk string Primary key of the data item to read

GetDataItemFieldResult

Ƭ GetDataItemFieldResult: SerializedFieldType


GetDocumentAccessPermissionQuery

Ƭ GetDocumentAccessPermissionQuery: void


GetDocumentAccessPermissionResult

Ƭ GetDocumentAccessPermissionResult: DocumentAccessPermission


GetDocumentChunksQuery

Ƭ GetDocumentChunksQuery: Object

Type declaration
Name Type
t GetDocumentChunksType []

GetDocumentChunksResult

Ƭ GetDocumentChunksResult: SerializedDocumentChunk[]


GetDocumentIdQuery

Ƭ GetDocumentIdQuery: void


GetDocumentIdResult

Ƭ GetDocumentIdResult: string


GetElementTypeQuery

Ƭ GetElementTypeQuery: Object

Type declaration
Name Type
id? string

GetElementTypeResult

Ƭ GetElementTypeResult: "block" | "line" | "group" | "visual-activity" | "page" | "document" | "generator" | "panel"


GetEnvironmentConfigQuery

Ƭ GetEnvironmentConfigQuery: string


GetEnvironmentConfigResult

Ƭ GetEnvironmentConfigResult: JsonSerializable


GetItemPageIdQuery

Ƭ GetItemPageIdQuery: string


GetItemPageIdResult

Ƭ GetItemPageIdResult: string


GetItemsAtQuery

Ƭ GetItemsAtQuery: Object

Type declaration
Name Type Description
bb Box Bounding box to search
p string Page ID to search
s GetItemsAtSearchType Search type

GetItemsAtResult

Ƭ GetItemsAtResult: string[]

IDs of the items found


GetLLMContextFromItemsQuery

Ƭ GetLLMContextFromItemsQuery: Object

Type declaration
Name Type Description
i string[] List of item IDs to return LLM-readable context for
p string Page ID to find closely-related items
t? GetLLMContextType Type of context to get

GetLLMContextFromItemsResult

Ƭ GetLLMContextFromItemsResult: Object

Type declaration
Name Type Description
id Record<string, string> A map from IDs specified in the prompt string to actual Lucid item IDs
p string A string in a format that LLMs like ChatGPT can easily understand, representing the content of the items specified as well as their immediate context if necessary

GetOAuthClientIdQuery

Ƭ GetOAuthClientIdQuery: Object

Type declaration
Name Type Description
p string OAuth provider name as specified in the package manifest

GetOAuthClientIdResult

Ƭ GetOAuthClientIdResult: Promise<string | undefined>


GetOAuthTokenQuery

Ƭ GetOAuthTokenQuery: Object

Type declaration
Name Type Description
p string OAuth provider name as specified in the package manifest

GetOAuthTokenResult

Ƭ GetOAuthTokenResult: Promise<string | undefined>


GetPackageSettingsQuery

Ƭ GetPackageSettingsQuery: undefined


GetPackageSettingsResult

Ƭ GetPackageSettingsResult: Promise<Record<string, JsonSerializable >>


GetProductQuery

Ƭ GetProductQuery: undefined


GetProductResult

Ƭ GetProductResult: LucidProduct


GetPropertyQuery

Ƭ GetPropertyQuery: Object

Type declaration
Name Type Description
id? string ID of the LucidElement to read a property from, or undefined to read from the LucidDocument
p string Name of the property to read

GetPropertyResult

Ƭ GetPropertyResult: JsonSerializable


GetReferenceKeyQuery

Ƭ GetReferenceKeyQuery: Object

Type declaration
Name Type Description
id? string ID of the LucidElement to read a reference key from, or undefined to read from the LucidDocument
k number | string Reference key to get

GetReferenceKeyResult

Ƭ GetReferenceKeyResult: SerializedReferenceKeyType


GetRelativeLinePositionQuery

Ƭ GetRelativeLinePositionQuery: Object

Type declaration
Name Type Description
id string Block or line ID to check the connections on
p number Relative position in range of [0,1] along the line

GetRelativeLinePositionResult

Ƭ GetRelativeLinePositionResult: Point


GetSelectionQuery

Ƭ GetSelectionQuery: Object

Type declaration
Name Type Description
d? boolean If set, additionally return all items inside selected groups

GetSelectionResult

Ƭ GetSelectionResult: string[]


GetShapeDataQuery

Ƭ GetShapeDataQuery: Object

Type declaration
Name Type Description
id? string ID of the element to query shape data from
n string Name of the shape data to read

GetShapeDataResult

Ƭ GetShapeDataResult: SerializedFieldType | SerializedDataError


GetSvgQuery

Ƭ GetSvgQuery: Object

Type declaration
Name Type Description
bb? Box If specified, the bounding box specifying what portion of the page to show
bg boolean True to include the background of the page
i? string[] If specified, only include these item IDs
p string Page ID to get an image of

GetSvgResult

Ƭ GetSvgResult: Promise<string>


GetTextStyleQuery

Ƭ GetTextStyleQuery: Object

Type declaration
Name Type Description
id string ID of the element to get text style from
n string Name of the text area to get text style from

GetTextStyleResult

Ƭ GetTextStyleResult: TextStyle


GetUserIdQuery

Ƭ GetUserIdQuery: void


GetUserIdResult

Ƭ GetUserIdResult: string


GetVisibleRectQuery

Ƭ GetVisibleRectQuery: void


GetVisibleRectResult

Ƭ GetVisibleRectResult: Box


HideModalQuery

Ƭ HideModalQuery: Object

Type declaration
Name Type Description
n string Name of the modal's action for receiving events, i.e. ShowModalQuery['n']

HideModalResult

Ƭ HideModalResult: undefined


HidePanelQuery

Ƭ HidePanelQuery: Object

Type declaration
Name Type Description
n string Name of the panel's action for receiving events, i.e. RegisterPanelQuery['n']

HidePanelResult

Ƭ HidePanelResult: undefined


HookAllChangesQuery

Ƭ HookAllChangesQuery: Object

Type declaration
Name Type Description
n string Name of the action for receiving events. Will be called with no parameters periodically as changes are made to the document

HookAllChangesResult

Ƭ HookAllChangesResult: undefined


HookCreateItemsQuery

Ƭ HookCreateItemsQuery: Object

Type declaration
Name Type Description
n string Name of the action for receiving events. Will be called with an array of strings of all recently created item IDs.

HookCreateItemsResult

Ƭ HookCreateItemsResult: undefined


HookDeleteItemsQuery

Ƭ HookDeleteItemsQuery: Object

Type declaration
Name Type Description
n string Name of the action for receiving events. Will be called with an array of strings of all recently deleted item IDs.

HookDeleteItemsResult

Ƭ HookDeleteItemsResult: undefined


HookSelectionQuery

Ƭ HookSelectionQuery: Object

Type declaration
Name Type Description
n string Name of the action for receiving events. Will be called with an array of strings of all selected item IDs.

HookSelectionResult

Ƭ HookSelectionResult: undefined


HookTextEditQuery

Ƭ HookTextEditQuery: Object

Type declaration
Name Type Description
e? boolean Whether to trigger the text hook callback eagerly during text edit
n string Name of the action for receiving these events

HookTextEditResult

Ƭ HookTextEditResult: undefined


ImportCardsQuery

Ƭ ImportCardsQuery: string

Name of the card integration registered by this extension to show the import dialog for


ImportCardsResult

Ƭ ImportCardsResult: Promise<void>

Resolves when the import dialog is closed


ImportLinksQuery

Ƭ ImportLinksQuery: Object

Type declaration
Name Type Description
l string[] Links to be imported onto the canvas as link unfurl blocks
p? string By default, we import the links onto the current page. If specified, the links will instead be imported onto the given page.

ImportLinksResult

Ƭ ImportLinksResult: void


ImportPageQuery

Ƭ ImportPageQuery: Object

Type declaration
Name Type Description
id string The ID of the document or template to import
n number[] Page numbers of specified document or template to import (zero-indexed)

ImportPageResult

Ƭ ImportPageResult: Promise<void>

Resolves when the import succeeds or fails


KillExtensionQuery

Ƭ KillExtensionQuery: void


KillExtensionResult

Ƭ KillExtensionResult: undefined


ListChildrenQuery

Ƭ ListChildrenQuery: Object

Type declaration
Name Type Description
d? boolean "deep" - If true, get all children at any level of group nesting; otherwise only immediate children
id string Parent ID to search inside

ListChildrenResult

Ƭ ListChildrenResult: string[]


ListCollectionFieldsQuery

Ƭ ListCollectionFieldsQuery: Object

Type declaration
Name Type Description
id string Collection ID to query

ListCollectionFieldsResult

Ƭ ListCollectionFieldsResult: string[]


ListCollectionsQuery

Ƭ ListCollectionsQuery: Object

Type declaration
Name Type Description
id string ID of the data source to list collections for

ListCollectionsResult

Ƭ ListCollectionsResult: string[]


ListDataItemsQuery

Ƭ ListDataItemsQuery: Object

Type declaration
Name Type Description
id string Collection ID to list items from

ListDataItemsResult

Ƭ ListDataItemsResult: string[]


ListDataSourcesQuery

Ƭ ListDataSourcesQuery: undefined


ListDataSourcesResult

Ƭ ListDataSourcesResult: string[]


ListDocumentElementsQuery

Ƭ ListDocumentElementsQuery: Object

Type declaration
Name Type
t DocumentElementType

ListDocumentElementsResult

Ƭ ListDocumentElementsResult: string[]


ListPagesQuery

Ƭ ListPagesQuery: void


ListPagesResult

Ƭ ListPagesResult: string[]


ListPropertiesQuery

Ƭ ListPropertiesQuery: Object

Type declaration
Name Type
id? string

ListPropertiesResult

Ƭ ListPropertiesResult: string[]


ListReferenceKeysQuery

Ƭ ListReferenceKeysQuery: Object

Type declaration
Name Type Description
id? string ID of the element to list reference keys for, or undefined for the document

ListReferenceKeysResult

Ƭ ListReferenceKeysResult: (string | number)[]

Reference key IDs


ListShapeDataQuery

Ƭ ListShapeDataQuery: Object

Type declaration
Name Type Description
i? boolean True to include inherited shape data from containing groups and/or page
id? string -

ListShapeDataResult

Ƭ ListShapeDataResult: string[]


ListTextAreasQuery

Ƭ ListTextAreasQuery: string


ListTextAreasResult

Ƭ ListTextAreasResult: string[]


LoadBlockClassesQuery

Ƭ LoadBlockClassesQuery: string[]


LoadBlockClassesResult

Ƭ LoadBlockClassesResult: Promise<undefined>


MeasureTextQuery

Ƭ MeasureTextQuery: Object

Type declaration
Name Type Description
id string ID of the element to measure text area
n string Name of the text area to measure
w number Max width for giving text area

MeasureTextResult

Ƭ MeasureTextResult: Object

Type declaration
Name Type Description
h number Text area height
w number Text area width

OffsetItemsQuery

Ƭ OffsetItemsQuery: Object

Type declaration
Name Type Description
ids string[] IDs of the items (blocks, lines, groups) to move
o Point How far to offset
t LinearOffsetType What kind of offset to perform

OffsetItemsResult

Ƭ OffsetItemsResult: undefined


PatchDataItemsQuery

Ƭ PatchDataItemsQuery: Object

Type declaration
Name Type Description
a Record<string, SerializedFieldType >[] Data items to add to the collection
c Record<string, Record<string, SerializedFieldType >> Data items to change field values on, keyed by primary key
d string[] Primary keys of items to delete
id string ID of the data collection to patch

PatchDataItemsResult

Ƭ PatchDataItemsResult: string[]

Primary keys inserted, if any


PromptQuery

Ƭ PromptQuery: Object

Type declaration
Name Type Description
b string Body text
t? string Title; defaults to extension title

PromptResult

Ƭ PromptResult: Promise<string | undefined>


RawCreateUserImageResult

Ƭ RawCreateUserImageResult: Object

Type declaration
Name Type Description
u string The resulting image URL

RawDataActionResult

Ƭ RawDataActionResult: { c: number } & { t: string } | { j: unknown }


RawSendXHRResponse

Ƭ RawSendXHRResponse: Object

Type declaration
Name Type Description
h { [key: string]: string; } Headers sent with the response
s number Status code of the response
t string Plain-text or base64-encoded response body
to? boolean true if the request timed out
url string URL of the response after any redirects

RawTriggerAuthFlowResult

Ƭ RawTriggerAuthFlowResult: Object

Type declaration
Name Type
s boolean

RegisterPanelQuery

Ƭ RegisterPanelQuery: Object

Type declaration
Name Type Description
c? string Content to display in the panel; full HTML page preferred
h? number Desired panel height
i string Icon URL, preferably a base64-encoded URL
l PanelLocation Where to display the panel
n string Name of the panel's action for receiving events; generated automatically by Panel base class
p? boolean If true, we will persist the panel's iframe
t string Title to show on the panel
to? string tooltip
u? string URL to display in the panel (this or c is required). Can be relative to /public directory in the package
v? string Named action that returns whether the button to open the panel should be visible
w? number Desired panel width

RegisterPanelResult

Ƭ RegisterPanelResult: undefined


RegisterUnfurlQuery

Ƭ RegisterUnfurlQuery: Object

Type declaration
Name Type Description
a? string For backwards compatility
aua? string After Unfurl Action name for the unfurl handler
d string Domain to unfurl, e.g. www.google.com
e? string Expand Callback Action name for the unfurl handler
ua? string Unfurl Action name for the unfurl handler

RegisterUnfurlResult

Ƭ RegisterUnfurlResult: boolean


ReloadExtensionQuery

Ƭ ReloadExtensionQuery: void


ReloadExtensionResult

Ƭ ReloadExtensionResult: undefined


SendAsyncOAuthRequestQuery

Ƭ SendAsyncOAuthRequestQuery: SendXHRQuery & { p: string }


SendOAuthRequestQuery

Ƭ SendOAuthRequestQuery: SendXHRQuery & { p: string ; prt?: string }


SendOAuthRequestResponse

Ƭ SendOAuthRequestResponse: SendXHRResponse


SendPermanentTokenRequestQuery

Ƭ SendPermanentTokenRequestQuery: SendXHRQuery & { p: string }


SendPermanentTokenRequestResponse

Ƭ SendPermanentTokenRequestResponse: SendXHRResponse


SendUIMessageQuery

Ƭ SendUIMessageQuery: Object

Type declaration
Name Type Description
d? JsonSerializable Content of the message to send to the custom UI component
n string Name of the UI component's action for receiving events, e.g. ShowModalQuery['n']

SendUIMessageResult

Ƭ SendUIMessageResult: undefined


SendXHRQuery

Ƭ SendXHRQuery: Object

Type declaration
Name Type Description
d? string The data to send with the request. For GET requests, this specifies the query string. For non-GET requests, this is sent as the body of the request. If this is specified, and no 'Content-Type' header is specified, a 'text/plain; charset=utf-8' content type is sent.
f? SendXHRResponseFormat The desired format for the returned response body. Defaults to 'utf8'. - If 'utf8', the response body will be returned as a string. - If 'binary', the response body will be returned as a Uint8Array.
h? { [key: string]: string | string[]; } Headers to send with the request
m? string HTTP method, e.g. 'GET', 'FETCH', etc. Defaults to GET
ms? number Timeout in milliseconds, if specified
s? string If set, a callback to call with chunks of the response as they arrive. Only valid for utf8 (text) requests, and only called on successful responses. The full final response will still be returned as normal.
url string -

SendXHRResponse

Ƭ SendXHRResponse: Promise< RawSendXHRResponse >


SendXHRResponseFormat

Ƭ SendXHRResponseFormat: "utf8" | "binary"


SetCurrentPageQuery

Ƭ SetCurrentPageQuery: string


SetCurrentPageResult

Ƭ SetCurrentPageResult: Promise<void>


SetPackageSettingsQuery

Ƭ SetPackageSettingsQuery: Record<string, string>


SetPackageSettingsResult

Ƭ SetPackageSettingsResult: Promise<undefined>


SetPropertyQuery

Ƭ SetPropertyQuery: Object

Type declaration
Name Type Description
id? string ID of the element to change
p string Name of the property to change
v? JsonSerializable New value of the property

SetPropertyResult

Ƭ SetPropertyResult: undefined


SetReferenceKeyQuery

Ƭ SetReferenceKeyQuery: Object

Type declaration
Name Type Description
id? string ID of the element to set the reference key on
k string | number ID of the reference key to set
v? SerializedReferenceKeyType New reference key settings, or undefined to remove the reference key

SetReferenceKeyResult

Ƭ SetReferenceKeyResult: undefined


SetSelectionQuery

Ƭ SetSelectionQuery: Object

Type declaration
Name Type Description
i string[] IDs of the elements to select

SetSelectionResult

Ƭ SetSelectionResult: undefined


SetShapeDataQuery

Ƭ SetShapeDataQuery: Object

Type declaration
Name Type Description
id? string ID of the element to set this shape data on
n string Name for the already-existing shape data to update
v? SerializedFieldType Value to set; use a string beginning with '=' for a formula

SetShapeDataResult

Ƭ SetShapeDataResult: undefined


SetTextQuery

Ƭ SetTextQuery: Object

Type declaration
Name Type Description
f? boolean Optional force boolean for extension to update uneditable items
id string ID of the element to change text on
n string Name of the text area to update
t string Plain text to put in the text area

SetTextResult

Ƭ SetTextResult: undefined


SetTextStyleQuery

Ƭ SetTextStyleQuery: Object

Type declaration
Name Type Description
id string ID of the element to set text style on
n string Name of the text area to set text style on
s Partial< TextStyle > Text styles to set

SetTextStyleResult

Ƭ SetTextStyleResult: Promise<undefined>


ShowModalQuery

Ƭ ShowModalQuery: Object

Type declaration
Name Type Description
c? string Content to display in the modal; full HTML page preferred
cl? boolean Chromeless (without a header and borders) or not
fs? boolean FullScreen or not
h? number Desired modal height
n string Name of the modal's action for receiving events; generated automatically by Modal base class
t? string Title to show on the modal
tb? boolean TransparentBackground or not
u? string URL to display in the modal (this or c is required). Can be relative to /public directory in the package
w? number Desired modal width

ShowModalResult

Ƭ ShowModalResult: Promise<undefined>


ShowPackageSettingsModalQuery

Ƭ ShowPackageSettingsModalQuery: undefined


ShowPackageSettingsModalResult

Ƭ ShowPackageSettingsModalResult: Promise<void>


ShowPanelQuery

Ƭ ShowPanelQuery: Object

Type declaration
Name Type Description
n string Name of the panel's action for receiving events, i.e. RegisterPanelQuery['n']

ShowPanelResult

Ƭ ShowPanelResult: undefined


SleepForTestCaseQuery

Ƭ SleepForTestCaseQuery: number


SleepForTestCaseResult

Ƭ SleepForTestCaseResult: Promise<void>


StartDragBlockToCanvasQuery

Ƭ StartDragBlockToCanvasQuery: Object

Type declaration
Name Type Description
c string Class name of the block to create
p { [key: string]: JsonSerializable ; } Additional properties to set on the block being dragged
s? JsonSerializable If specified, the stencil for a custom shape. Only valid if the class name is 'CustomBlock'
sz { h: number ; w: number } Size of the block to create
sz.h number -
sz.w number -

StartDragBlockToCanvasResult

Ƭ StartDragBlockToCanvasResult: Promise<string | undefined>


StartPDFUploadRequestQuery

Ƭ StartPDFUploadRequestQuery: string


ThrowForTestCaseQuery

Ƭ ThrowForTestCaseQuery: number


ThrowForTestCaseResult

Ƭ ThrowForTestCaseResult: undefined | Promise<void>


TriggerAuthFlowQuery

Ƭ TriggerAuthFlowQuery: Object

Type declaration
Name Type Description
p string OAuth or merge provider name as specified in the package manifest

TriggerAuthFlowResult

Ƭ TriggerAuthFlowResult: Promise< RawTriggerAuthFlowResult >


UnhookAllChangesQuery

Ƭ UnhookAllChangesQuery: Object

Type declaration
Name Type Description
n string Name of the action passed to HookAllChanges

UnhookAllChangesResult

Ƭ UnhookAllChangesResult: undefined


UnhookCreateItemsQuery

Ƭ UnhookCreateItemsQuery: Object

Type declaration
Name Type Description
n string Name of the action passed to HookCreateItems

UnhookCreateItemsResult

Ƭ UnhookCreateItemsResult: undefined


UnhookDeleteItemsQuery

Ƭ UnhookDeleteItemsQuery: Object

Type declaration
Name Type Description
n string Name of the action passed to HookDeleteItems

UnhookDeleteItemsResult

Ƭ UnhookDeleteItemsResult: undefined


UnhookSelectionQuery

Ƭ UnhookSelectionQuery: Object

Type declaration
Name Type Description
n string Name of the action for receiving these events

UnhookSelectionResult

Ƭ UnhookSelectionResult: undefined


UnhookTextEditQuery

Ƭ UnhookTextEditQuery: Object

Type declaration
Name Type Description
n string Name of the action for receiving these events

UnhookTextEditResult

Ƭ UnhookTextEditResult: undefined


WithMutexQuery

Ƭ WithMutexQuery: Object

Type declaration
Name Type Description
a string Name of the action to run within the given mutex
n string Name of the intra-document mutex to hold for the duration of this action

WithMutexResult

Ƭ WithMutexResult: Promise<boolean>

Resolves true if operation succeeded, or false if the mutex was held by someone else


WithSilentActionsQuery

Ƭ WithSilentActionsQuery: Object

Type declaration
Name Type Description
a string Name of the synchronous action to run with undo/redo history suppressed

WithSilentActionsResult

Ƭ WithSilentActionsResult: void


ZOrderQuery

Ƭ ZOrderQuery: Object

Type declaration
Name Type Description
i string[] IDs of the items to adjust Z order
o ZOrderOperation Operation to perform on these items

ZOrderResult

Ƭ ZOrderResult: undefined

Functions

isRawSendXHRResponse

isRawSendXHRResponse(val): val is RawSendXHRResponse

Parameters
Name Type
val any
Returns

val is RawSendXHRResponse


core/base64

Functions

decodeBase64

decodeBase64(base64String): Uint8Array

Parameters
Name Type
base64String string
Returns

Uint8Array


encodeBase64

encodeBase64(byteArray): string

Parameters
Name Type
byteArray Uint8Array
Returns

string


core/cardintegration/cardfielddisplaysettings

Enumerations

Interfaces

Type Aliases

ImageBadgeSettings

Ƭ ImageBadgeSettings: Object

Type declaration
Name Type
height number
width number

TextBadgeSettings

Ƭ TextBadgeSettings: Object

Type declaration
Name Type
bold? boolean
italic? boolean
maxfontsize? number
maxtextwidth? number
minheight? number
minwidth? number
rounding? number
underline? boolean

Functions

isFieldDisplayType

isFieldDisplayType(x): x is FieldDisplayType

Parameters
Name Type
x unknown
Returns

x is FieldDisplayType


isOnClickHandlerKey

isOnClickHandlerKey(x): x is OnClickHandlerKeys

Parameters
Name Type
x unknown
Returns

x is OnClickHandlerKeys


core/cardintegration/cardintegrationconfig

Interfaces


core/cardintegration/cardintegrationdefinitions

Interfaces

Functions

isSerializedFieldOption

isSerializedFieldOption(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isSerializedFieldOptions

isSerializedFieldOptions(p1): p1 is DestructureGuardedTypeObj<Object>[]

Creates a validator which tests if the target is an array and if all elements of the array satisfy the given sub-validator.

Parameters
Name Type
p1 unknown
Returns

p1 is DestructureGuardedTypeObj<Object>[]

A validator for the array type


core/cardintegration/lucidcardintegration

Classes

References

ImportResult

Re-exports ImportResult


SearchResult

Re-exports SearchResult


core/cardintegration/lucidcardintegrationcustomimportmodal

Classes


core/cardintegration/lucidcardintegrationdefinitions


core/cardintegration/lucidcardintegrationregistry

Classes


core/cardintegration/lucidcardintegrationstandardimportmodal

Interfaces


core/checks

Type Aliases

Tuple

Ƭ Tuple<T, N>: N extends N ? number extends N ? T[] : TupleOfHelper<T, N, []> : never

Type parameters
Name Type
T T
N extends number

Functions

isAny

isAny(val): val is any

Deprecated

Prefer isUnknown

Parameters
Name Type
val unknown
Returns

val is any


isArray

isArray(val): val is unknown[]

Returns true if the specified value is an array.

This is safer than using Array.isArray directly because it doesn't introduce an any type.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is unknown[]

Whether variable is an array.


isAtLeastLength

isAtLeastLength<T, N>(arr, minimumLength): arr is [...Tuple<T, N>[], ...T[]]

Type parameters
Name Type
T T
N extends number
Parameters
Name Type
arr T[]
minimumLength N
Returns

arr is [...Tuple<T, N>[], ...T[]]


isBoolean

isBoolean(val): val is boolean

Returns true if the specified value is a boolean.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is boolean

Whether variable is boolean.


isDef

isDef<F>(val): val is F

Returns true if the specified value is not undefined.

Type parameters
Name
F
Parameters
Name Type Description
val undefined | F Variable to test.
Returns

val is F

Whether variable is defined.


isDefAndNotNull

isDefAndNotNull<F>(val): val is F

Returns true if the specified value is defined and not null.

Type parameters
Name
F
Parameters
Name Type Description
val undefined | null | F Variable to test.
Returns

val is F

Whether variable is defined and not null.


isEmptyOrNullishObject

isEmptyOrNullishObject(val): val is Object

Returns true if the specified object is either empty or all existing keys map to a nullish value

Parameters
Name Type Description
val unknown Variable to test
Returns

val is Object

Whether variable is empty or maps exclusively to nullish values


isExactLength

isExactLength<T, N>(arr, exactLength): arr is Tuple<T, N>

Type parameters
Name Type
T T
N extends number
Parameters
Name Type
arr T[]
exactLength N
Returns

arr is Tuple<T, N>


isFunction

isFunction(val): val is Function

Parameters
Name Type
val unknown
Returns

val is Function


isInfinite

isInfinite(val): val is number

Returns true if the specified value is either positive or negative infinity.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is number

Whether variable is positive or negative infinity.


isInstanceOf

isInstanceOf<T>(klass): (x: unknown) => x is T

Since instanceof should generally be avoided, this function should generally be avoided as well.

A valid use case is for native types, like Uint8Array.

Type parameters
Name
T
Parameters
Name Type
klass AbstractConstructor<T>
Returns

fn

▸ (x): x is T

Parameters
Name Type
x unknown
Returns

x is T


isInt

isInt(val): val is number

Returns true if the specified value is an integer.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is number

Whether variable is an integer.


isLiteral

isLiteral<T>(t): (x: unknown) => x is T

Type parameters
Name Type
T extends string | number | boolean | symbol
Parameters
Name Type
t T
Returns

fn

▸ (x): x is T

Parameters
Name Type
x unknown
Returns

x is T


isNull

isNull(val): val is null

Returns true if the specified value is null.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is null

Whether variable is null.


isNullish

isNullish(val): val is undefined | null

Returns true if the specified value is null or undefined.

Parameters
Name Type Description
val unknown Variable to test
Returns

val is undefined | null

Whether the variable is null or undefined.


isNumber

isNumber(val): val is number

Returns true if the specified value is a number.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is number

Whether variable is a number.


isObject

isObject(val): val is object

Returns true if the specified value is an object (including arrays and functions) (i.e. it's safe to do property accesses on it).

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is object

Whether variable is an object.


isObjectUnsafe

isObjectUnsafe(val): val is Object

Returns true for objects, includings arrays and functions. Matches the behavior of goog.isObject, with a more permissive type.

Parameters
Name Type Description
val any Variable to test.
Returns

val is Object

Whether variable is an object.


isObjectUnsafer

isObjectUnsafer(val): val is Object

Returns true for objects, includings arrays and functions. Matches the behavior of goog.isObject, with an extremely permissive type.

Parameters
Name Type Description
val any Variable to test.
Returns

val is Object

Whether variable is an object.


isPromise

isPromise(val): val is Promise<unknown>

Parameters
Name Type
val unknown
Returns

val is Promise<unknown>


isRecord

isRecord<T>(typeGuard): (val: unknown) => val is Record<string, T>

Returns true if the specified value is an object (i.e. it's safe to do property accesses on it), and every value matches the record type.

Type parameters
Name
T
Parameters
Name Type
typeGuard (a: unknown) => a is T
Returns

fn

Whether variable is an object.

▸ (val): val is Record<string, T>

Parameters
Name Type
val unknown
Returns

val is Record<string, T>


isString

isString(val): val is string

Returns true if the specified value is a string.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is string

Whether variable is a string.


isTypedArray

isTypedArray<T>(typeGuard): (val: unknown) => val is T[]

Returns true if the specified value is an array and every element passes the type guard function.

Type parameters
Name
T
Parameters
Name Type Description
typeGuard (a: unknown) => a is T the type guard function to test every element in the array.
Returns

fn

Whether variable is an array of the given type.

▸ (val): val is T[]

Parameters
Name Type
val unknown
Returns

val is T[]


isUndefined

isUndefined(val): val is undefined

Returns true if the specified value is undefined.

Parameters
Name Type Description
val unknown Variable to test.
Returns

val is undefined

Whether variable is undefined.


isUnknown

isUnknown(val): val is unknown

Parameters
Name Type
val unknown
Returns

val is unknown


isVoid

isVoid(x): x is void

Returns true if the specified value is undefined.

Parameters
Name Type
x unknown
Returns

x is void

Whether variable is undefined.


core/data/datasource/alphabet

Variables

alphabet

Const alphabet: string[]


core/data/datasource/datasourcetype


core/data/datasource/datasourceutils


core/data/datasource/metadatatypes


core/data/datasource/previewdatatypes


core/data/datasource/semanticcollection

Enumerations

Functions

isSemanticCollection

isSemanticCollection(x): x is Items

Parameters
Name Type
x unknown
Returns

x is Items


core/data/datasource/serializeddatasourceproperties

Type Aliases

SerializedSourceForeignKey

Ƭ SerializedSourceForeignKey: Object

Type declaration
Name Type
Id string
RelationshipType string
Represents? string | null
SourceFields string[]

Functions

isSerializedSourceForeignKey

isSerializedSourceForeignKey(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


core/data/datasource/serializedimporteddatasource


core/data/datasource/serializedupstreamconfig


core/data/datasource/spreadsheetpossibledatatypes

Variables

SpreadSheetPossibleDataTypes

Const SpreadSheetPossibleDataTypes: ScalarFieldTypeEnum []


core/data/datasource/upstreamconfig

Interfaces

Functions

deserializeUpstreamConfig

deserializeUpstreamConfig(config): UpstreamConfig

Parameters
Name Type
config SerializedUpstreamConfig
Returns

UpstreamConfig


isSerializedSourceConfig

isSerializedSourceConfig(x): x is SerializedSourceConfig

Parameters
Name Type
x unknown
Returns

x is SerializedSourceConfig


serializeUpstreamConfig

serializeUpstreamConfig(config): SerializedUpstreamConfig

Parameters
Name Type
config UpstreamConfig
Returns

SerializedUpstreamConfig


core/data/datasource/upstreampatchtype


core/data/datasource/upstreamupdatetype


core/data/fieldspecification

Classes

Type Aliases

ItemType

Ƭ ItemType<Fields>: { [Field in keyof Fields]: TsTypeOf<Fields[Field]["type"]> }

The type of a item in the FieldsStructure, that is if the FieldsStructure represents

undefined
[{Name: "id", Type: ScalarFieldTypeEnum.STRING}]

then ItemType for that would be:

undefined
{'id': string}
Type parameters
Name Type
Fields extends FieldsStructure

PartialItemType

Ƭ PartialItemType<Fields, PrimaryKey>: Pick< ItemType <Fields>, PrimaryKey> & Partial<Omit< ItemType <Fields>, PrimaryKey>>

Just like ItemType, but the fields not part of the primary key can be undefined.

Type parameters
Name Type
Fields extends FieldsStructure
PrimaryKey extends keyof Fields

Functions

declareSchema

declareSchema<Names, Types, Constraint, Fields, PrimaryKey>(__namedParameters): Object

Specifies all the fields that this itegration will be sending to the data-sync service. Give you well typed methods to convert from YourType[] to {[PrimaryKey:string]: YourType} which is what most of the data sync service calls expect.

There is fromItems which does the above will full type information, and fromItems sparse which allows all the fields not part of the primaryKey to be undefined. The former should be used with initial imports, and the latter can be used for updates.

Type parameters
Name Type
Names extends string
Types extends Readonly< FieldTypeDefinition >
Constraint extends FieldConstraintDefinition
Fields extends { [Name in string]: Object }
PrimaryKey extends string | number | symbol
Parameters
Name Type
__namedParameters Object
__namedParameters.fields Fields
__namedParameters.primaryKey PrimaryKey[]
Returns

Object

Name Type
array { constraints: FieldConstraintDefinition [] ; mapping: readonly SemanticFields [] | readonly SemanticKind [] ; name: Exclude<keyof Fields, number> ; type: FieldTypeDefinition }[]
example Fields
fromItems (items: ItemType <Fields>[]) => Map<string, ItemType <Fields>>
fromItemsSparse (items: PartialItemType <Fields, PrimaryKey>[]) => Map<string, PartialItemType <Fields, PrimaryKey>>
primaryKey FormattedPrimaryKey <Fields, PrimaryKey>

core/data/fieldtypedefinition/basefieldtypedefinition

Type Aliases

AnyFieldTypeArrayDefinition

Ƭ AnyFieldTypeArrayDefinition: FieldTypeArray | NDimensionalFieldTypeArray


BaseFieldTypeDefinition

Ƭ BaseFieldTypeDefinition: ScalarFieldTypeEnum | LiteralFieldType | FieldTypeArray <any> | NDimensionalFieldTypeArray | CollectionEnumFieldType


SerializedBaseFieldTypeDefinition

Ƭ SerializedBaseFieldTypeDefinition: ScalarFieldTypeEnum | SerializedLiteralFieldType | SerializedFieldTypeArray | SerializedNDimensionalFieldTypeArray | SerializedCollectionEnumFieldType

Functions

deserializeBaseFieldTypeDefinition

deserializeBaseFieldTypeDefinition(baseFieldType): BaseFieldTypeDefinition

Parameters
Name Type
baseFieldType SerializedBaseFieldTypeDefinition
Returns

BaseFieldTypeDefinition


isBaseFieldTypeDefinition

isBaseFieldTypeDefinition(fieldType): fieldType is BaseFieldTypeDefinition

Parameters
Name Type
fieldType any
Returns

fieldType is BaseFieldTypeDefinition


isSerializedBaseFieldTypeDefinition

isSerializedBaseFieldTypeDefinition(definition): definition is SerializedBaseFieldTypeDefinition

Parameters
Name Type
definition any
Returns

definition is SerializedBaseFieldTypeDefinition


serializeBaseFieldTypeDefinition

serializeBaseFieldTypeDefinition(baseFieldType): SerializedBaseFieldTypeDefinition

Parameters
Name Type
baseFieldType BaseFieldTypeDefinition
Returns

SerializedBaseFieldTypeDefinition


core/data/fieldtypedefinition/collectionenumfieldtype

Enumerations

Classes

Type Aliases

SerializedCollectionEnumFieldType

Ƭ SerializedCollectionEnumFieldType: Object

Type declaration
Name Type
COLLECTION_ENUM string

Variables

CollectionEnumFieldTypeKey

Const CollectionEnumFieldTypeKey: "COLLECTION_ENUM"

Functions

deserializeCollectionEnumFieldType

deserializeCollectionEnumFieldType(serializedCollectionEnumFieldType): CollectionEnumFieldType

Parameters
Name Type
serializedCollectionEnumFieldType SerializedCollectionEnumFieldType
Returns

CollectionEnumFieldType


isCollectionEnumFieldNames

isCollectionEnumFieldNames(x): x is CollectionEnumFieldNames

Parameters
Name Type
x unknown
Returns

x is CollectionEnumFieldNames


isCollectionEnumFieldType

isCollectionEnumFieldType(fieldType): fieldType is CollectionEnumFieldType

Parameters
Name Type
fieldType FieldTypeDefinition
Returns

fieldType is CollectionEnumFieldType


isSerializedCollectionEnumFieldType

isSerializedCollectionEnumFieldType(fieldType): fieldType is SerializedCollectionEnumFieldType

Parameters
Name Type
fieldType any
Returns

fieldType is SerializedCollectionEnumFieldType


core/data/fieldtypedefinition/fieldtypearray

Classes

Type Aliases

FieldTypeArraySubTypes

Ƭ FieldTypeArraySubTypes: ScalarFieldTypeEnum | CollectionEnumFieldType | LiteralFieldType | FieldTypeArray <any>


SerializedFieldTypeArray

Ƭ SerializedFieldTypeArray: Object

Type declaration
Name Type
ND false
validTypes SerializedFieldTypeArraySubTypes []

SerializedFieldTypeArraySubTypes

Ƭ SerializedFieldTypeArraySubTypes: ScalarFieldTypeEnum | SerializedLiteralFieldType | SerializedFieldTypeArray | SerializedCollectionEnumFieldType

Functions

deserializeFieldTypeArray

deserializeFieldTypeArray(serializedFieldTypeArray): FieldTypeArray

Parameters
Name Type
serializedFieldTypeArray SerializedFieldTypeArray
Returns

FieldTypeArray


isSerializedFieldTypeArray

isSerializedFieldTypeArray(fieldType, validateTypeCheck): fieldType is SerializedFieldTypeArray

Parameters
Name Type
fieldType any
validateTypeCheck (t: unknown) => boolean
Returns

fieldType is SerializedFieldTypeArray


core/data/fieldtypedefinition/fieldtypedefinition

Type Aliases

FieldTypeDefinition

Ƭ FieldTypeDefinition: BaseFieldTypeDefinition | BaseFieldTypeDefinition []


SerializedFieldTypeDefinition

Ƭ SerializedFieldTypeDefinition: SerializedBaseFieldTypeDefinition | SerializedBaseFieldTypeDefinition []

Functions

deserializeFieldTypeDefinition

deserializeFieldTypeDefinition(fieldType): BaseFieldTypeDefinition []

Parameters
Name Type
fieldType SerializedBaseFieldTypeDefinition []
Returns

BaseFieldTypeDefinition []

deserializeFieldTypeDefinition(fieldType): FieldTypeDefinition

Parameters
Name Type
fieldType SerializedFieldTypeDefinition
Returns

FieldTypeDefinition


fieldTypesEqual

fieldTypesEqual(a, b, checkEnumCollectionId?): boolean

Parameters
Name Type Default value
a FieldTypeDefinition undefined
b FieldTypeDefinition undefined
checkEnumCollectionId boolean true
Returns

boolean


isSerializedFieldTypeDefinition

isSerializedFieldTypeDefinition(definition): definition is SerializedFieldTypeDefinition

Parameters
Name Type
definition any
Returns

definition is SerializedFieldTypeDefinition


serializeFieldTypeDefinition

serializeFieldTypeDefinition(fieldType): SerializedBaseFieldTypeDefinition

Parameters
Name Type
fieldType BaseFieldTypeDefinition
Returns

SerializedBaseFieldTypeDefinition

serializeFieldTypeDefinition(fieldType): SerializedFieldTypeDefinition

Parameters
Name Type
fieldType FieldTypeDefinition
Returns

SerializedFieldTypeDefinition


core/data/fieldtypedefinition/literalfieldtype

Classes

Type Aliases

SerializedLiteralFieldType

Ƭ SerializedLiteralFieldType: string

Functions

deserializeLiteralFieldType

deserializeLiteralFieldType(serializedLiteralFieldType): LiteralFieldType

String literals without the literalStringPrefix will return the boolean literal false

Parameters
Name Type
serializedLiteralFieldType string
Returns

LiteralFieldType


isLiteralFieldType

isLiteralFieldType(fieldType): fieldType is LiteralFieldType

Parameters
Name Type
fieldType any
Returns

fieldType is LiteralFieldType


isSerializedLiteralFieldType

isSerializedLiteralFieldType(definition): definition is string

Parameters
Name Type
definition any
Returns

definition is string


core/data/fieldtypedefinition/ndimensionalfieldtypearray

Classes

Type Aliases

SerializedNDimensionalFieldTypeArray

Ƭ SerializedNDimensionalFieldTypeArray: Object

Type declaration
Name Type
ND true
validTypes ( ScalarFieldTypeEnum | SerializedLiteralFieldType )[]

Functions

deserializeNDimensionalFieldTypeArray

deserializeNDimensionalFieldTypeArray(serializedNDimensionalFieldTypeArray): NDimensionalFieldTypeArray

Parameters
Name Type
serializedNDimensionalFieldTypeArray SerializedNDimensionalFieldTypeArray
Returns

NDimensionalFieldTypeArray


isNDimensionalFieldTypeArray

isNDimensionalFieldTypeArray(fieldType): fieldType is NDimensionalFieldTypeArray

Parameters
Name Type
fieldType any
Returns

fieldType is NDimensionalFieldTypeArray


isSerializedNDimensionalFieldTypeArray

isSerializedNDimensionalFieldTypeArray(fieldType): fieldType is SerializedNDimensionalFieldTypeArray

Parameters
Name Type
fieldType any
Returns

fieldType is SerializedNDimensionalFieldTypeArray


isValidTypeForNDimensionalFieldTypeArray

isValidTypeForNDimensionalFieldTypeArray(fieldType): fieldType is ScalarFieldTypeEnum | LiteralFieldType

Parameters
Name Type
fieldType any
Returns

fieldType is ScalarFieldTypeEnum | LiteralFieldType


core/data/fieldtypedefinition/scalarfieldtype

Enumerations

Variables

AnyScalarFieldType

Const AnyScalarFieldType: ScalarFieldTypeEnum []

Functions

isScalarFieldTypeEnum

isScalarFieldTypeEnum(fieldType): fieldType is ScalarFieldTypeEnum

Parameters
Name Type
fieldType any
Returns

fieldType is ScalarFieldTypeEnum


core/data/fieldtypedefinition/semanticfields

Enumerations

Functions

isSemanticFields

isSemanticFields(x): x is SemanticFields

Parameters
Name Type
x unknown
Returns

x is SemanticFields


core/data/fieldtypedefinition/semantickind

Enumerations

Functions

isSemanticKind

isSemanticKind(x): x is SemanticKind

Parameters
Name Type
x unknown
Returns

x is SemanticKind


semanticKindToSemanticFields

semanticKindToSemanticFields(semanticField): SemanticFields | undefined

Parameters
Name Type
semanticField SemanticFields | SemanticKind
Returns

SemanticFields | undefined


core/data/fieldtypedefinition/utils

Functions

isDateFieldTypeDefinition

isDateFieldTypeDefinition(fieldType): fieldType is DATE | DATEONLY | (DATE | DATEONLY)[]

Parameters
Name Type
fieldType unknown
Returns

fieldType is DATE | DATEONLY | (DATE | DATEONLY)[]


isDateScalarFieldTypeEnum

isDateScalarFieldTypeEnum(fieldType): fieldType is DATE | DATEONLY

Parameters
Name Type
fieldType unknown
Returns

fieldType is DATE | DATEONLY


core/data/formulastring

Functions

serializeFormulaString

serializeFormulaString(value): string

Escape single quotes (') as ('') and surround the given string with single quotes.

Parameters
Name Type
value string
Returns

string


core/data/referencekeys/serializedreferencekey

Interfaces

Type Aliases

SerializedFlattenedReference

Ƭ SerializedFlattenedReference: TypedSerializedFlattenedReference | UnTypedSerializedFlattenedReference


SerializedReferenceKeyType

Ƭ SerializedReferenceKeyType: SerializedReferenceKey | SerializedFlattenedReference


TypedSerializedFlattenedReference

Ƭ TypedSerializedFlattenedReference: Object

Type declaration
Name Type
d { [index: string]: SerializedFieldType ; }
n? string
sc SerializedSchema

UnTypedSerializedFlattenedReference

Ƭ UnTypedSerializedFlattenedReference: Object

Index signature

▪ [index: string]: SerializedFieldType

Type declaration
Name Type
192d0e9f-2f5a-4032-9f03-59bbf1ea5891 true
192d0e9f-2f5a-4032-9f03-59bbf1ea5891_n? string

Variables

FlattenedReferenceKeyId

Const FlattenedReferenceKeyId: "192d0e9f-2f5a-4032-9f03-59bbf1ea5891"


FlattenedReferenceKeyName

Const FlattenedReferenceKeyName: "192d0e9f-2f5a-4032-9f03-59bbf1ea5891_n"


core/data/serializedfield/serializeddataitems

Interfaces

Functions

isSerializedDataItems

isSerializedDataItems(x): x is Record<any, Record<any, SerializedFieldType>>

Parameters
Name Type
x unknown
Returns

x is Record<any, Record<any, SerializedFieldType>>


core/data/serializedfield/serializedfielddefinition

Enumerations

Type Aliases

SerializedFieldConstraint

Ƭ SerializedFieldConstraint: Object

Type declaration
Name Type
Details? JsonSerializable
Type FieldConstraintType

SerializedFieldDefinition

Ƭ SerializedFieldDefinition: Object

Type declaration
Name Type
Constraints? SerializedFieldConstraint []
Mapping? readonly SemanticFields [] | readonly SemanticKind []
Name string
SyncSchema? string
Type SerializedFieldTypeDefinition

Functions

isFieldConstraintType

isFieldConstraintType(x): x is FieldConstraintType

Parameters
Name Type
x unknown
Returns

x is FieldConstraintType


isSerializedFieldConstraint

isSerializedFieldConstraint(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isSerializedFieldDefinition

isSerializedFieldDefinition(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


core/data/serializedfield/serializedfields

Type Aliases

JSONSerializedLucidDictionary

Ƭ JSONSerializedLucidDictionary: Object

Type declaration
Name Type
js { [index: string]: SerializedJsonFieldType ; }

NestedSerializedLucidDictionary

Ƭ NestedSerializedLucidDictionary: Object

Type declaration
Name Type
dict { [index: string]: SerializedFieldType ; }

SerializedCMYKColor

Ƭ SerializedCMYKColor: Object

Type declaration
Name Type
a? number
b? undefined
c number
g? undefined
k number
m number
r? undefined
t? number
y number

SerializedColorObject

Ƭ SerializedColorObject: SerializedRGBColor | SerializedCMYKColor | SerializedCMYKColor & SerializedCorrectedColor


SerializedColorObjectFieldType

Ƭ SerializedColorObjectFieldType: Object

Type declaration
Name Type
color SerializedColorObject

SerializedCorrectedColor

Ƭ SerializedCorrectedColor: Object

Type declaration
Name Type
cB number
cG number
cR number

SerializedFieldType

Ƭ SerializedFieldType: number | boolean | string | null | SerializedLucidDateObject | SerializedTimeObject | SerializedColorObjectFieldType | SerializedLucidDictionary | SerializedLucidCurrency | undefined | SerializedFieldType []


SerializedFields

Ƭ SerializedFields: Object

Index signature

▪ [fieldName: string]: SerializedFieldType


SerializedIsoDateObject

Ƭ SerializedIsoDateObject: Object

Type declaration
Name Type
displayTimezone? string
isoDate string

SerializedJsonFieldType

Ƭ SerializedJsonFieldType: number | boolean | string | null | undefined | SerializedJsonFieldType [] | { [index: string]: SerializedJsonFieldType ; }


SerializedLucidCurrency

Ƭ SerializedLucidCurrency: Object

Type declaration
Name Type
a number
t string

SerializedLucidDateObject

Ƭ SerializedLucidDateObject: SerializedMillisecondsDateObject | SerializedIsoDateObject


SerializedLucidDictionary

Ƭ SerializedLucidDictionary: NestedSerializedLucidDictionary | JSONSerializedLucidDictionary


SerializedMillisecondsDateObject

Ƭ SerializedMillisecondsDateObject: Object

Type declaration
Name Type
isDateOnly? boolean
ms number

SerializedRGBColor

Ƭ SerializedRGBColor: Object

Type declaration
Name Type
a? number
b number
c? undefined
g number
k? undefined
m? undefined
r number
t? number
y? undefined

SerializedTimeObject

Ƭ SerializedTimeObject: Object

Type declaration
Name Type
hours number
milliseconds? number
minutes? number
seconds? number

Functions

isJsonSerializedLucidDictionary

isJsonSerializedLucidDictionary(subject): subject is DestructureGuardedTypeObj<Object>

a dictionary type that only supports raw js, primarily used when external data could be arbritrary js

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isNestedSerializedLucidDictionary

isNestedSerializedLucidDictionary(subject): subject is DestructureGuardedTypeObj<Object>

a dictionary type that has full type support

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isSerializedColorObjectFieldType

isSerializedColorObjectFieldType(value): value is SerializedColorObjectFieldType

Parameters
Name Type
value any
Returns

value is SerializedColorObjectFieldType


isSerializedFieldType

isSerializedFieldType(value): value is SerializedFieldType

Parameters
Name Type
value any
Returns

value is SerializedFieldType


isSerializedFields

isSerializedFields(x): x is Record<any, SerializedFieldType>

Parameters
Name Type
x unknown
Returns

x is Record<any, SerializedFieldType>


isSerializedJsonFieldType

isSerializedJsonFieldType(value): value is SerializedJsonFieldType

Parameters
Name Type
value any
Returns

value is SerializedJsonFieldType


isSerializedLucidCurrency

isSerializedLucidCurrency(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isSerializedLucidDateObject

isSerializedLucidDateObject(x): x is DestructureGuardedTypeObj<Object> | DestructureGuardedTypeObj<Object>

Parameters
Name Type
x unknown
Returns

x is DestructureGuardedTypeObj<Object> | DestructureGuardedTypeObj<Object>


isSerializedLucidDictionary

isSerializedLucidDictionary(x): x is DestructureGuardedTypeObj<Object> | DestructureGuardedTypeObj<Object>

Parameters
Name Type
x unknown
Returns

x is DestructureGuardedTypeObj<Object> | DestructureGuardedTypeObj<Object>


isSerializedMillisecondsDateObject

isSerializedMillisecondsDateObject(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isSerializedTimeObject

isSerializedTimeObject(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


core/data/serializedfield/serializedschema

Type Aliases

SerializedLabelOverrides

Ƭ SerializedLabelOverrides: Object

Index signature

▪ [key: string]: string


SerializedSchema

Ƭ SerializedSchema: Object

Type declaration
Name Type
FieldLabelOverrides? SerializedLabelOverrides
Fields SerializedFieldDefinition []
PrimaryKey string[]

Functions

isSerializedSchema

isSerializedSchema(schema): schema is SerializedSchema

Parameters
Name Type
schema any
Returns

schema is SerializedSchema


core/dataerrortype

Enumerations


core/defer

Interfaces

Functions

defer

defer<T>(): DeferredPromise <T>

Type parameters
Name Type
T void
Returns

DeferredPromise <T>


core/guards

Type Aliases

DestructureGuardedTypeObj

Ƭ DestructureGuardedTypeObj<Obj>: WithUndefinedAsOptional <{ [key in keyof Obj]: GuardToType<Obj[key]> }>

Type parameters
Name Type
Obj extends Object

GuardToType

Ƭ GuardToType<Guard>: Guard extends (p1: unknown) => p1 is infer Type ? Type : never

Type parameters
Name
Guard

Validator

Ƭ Validator<TO, FROM>: (p1: FROM) => p1 is TO

Type parameters
Name Type
TO extends FROM
FROM unknown
Type declaration

▸ (p1): p1 is TO

Parameters
Name Type
p1 FROM
Returns

p1 is TO


core/humanreadableerror

Classes


core/iframe/iframeutils

Variables

DEFAULT_IFRAME_HEIGHT

Const DEFAULT_IFRAME_HEIGHT: number = 9


DEFAULT_IFRAME_WIDTH

Const DEFAULT_IFRAME_WIDTH: number = 16

Aspect ratio 16:9, wider rectangle This will be the default setting if not provided

The values are small since we only use width and height value to calculate aspect ratio So in this case, it will be width/height, which will be 16:9 It's the same result as 1600 and 900 as default width and height


core/jsonserializable

Interfaces

Type Aliases

JsonArray

Ƭ JsonArray: JsonSerializable []


JsonSerializable

Ƭ JsonSerializable: undefined | null | string | number | boolean | JsonArray | JsonObject

Any type that can be natively converted to a string with JSON.stringify.

Functions

isJsonObject

isJsonObject(x): x is JsonObject

Parameters
Name Type
x unknown
Returns

x is JsonObject


isJsonSerializable

isJsonSerializable(x): x is JsonSerializable

Parameters
Name Type
x unknown
Returns

x is JsonSerializable


core/lucidproduct

Enumerations


core/object

Functions

flatten

flatten<T>(a): T[]

Type parameters
Name
T
Parameters
Name Type
a T[][]
Returns

T[]


fromEntries

fromEntries<K, T>(entries): { [key in K]: T }

Type parameters
Name Type
K extends PropertyKey
T T
Parameters
Name Type
entries Iterable<readonly [K, T]>
Returns

{ [key in K]: T }


objectEvery

objectEvery<T, O>(obj, f, opt_this?): boolean

Type parameters
Name Type
T T
O extends Object
Parameters
Name Type
obj O
f (this: undefined | T, _0: O[string & keyof O], _1: string & keyof O, _2: O) => any
opt_this? T
Returns

boolean


core/offsettype

Enumerations

Type Aliases

LinearOffsetType

Ƭ LinearOffsetType: NW | NE | SE | SW | MOVE | N | E | S | W

Functions

isLinearOffsetType

isLinearOffsetType(offsetType): offsetType is LinearOffsetType

Parameters
Name Type
offsetType unknown
Returns

offsetType is LinearOffsetType


core/optionalkey

Type Aliases

WithUndefinedAsOptional

Ƭ WithUndefinedAsOptional<T>: { [key in keyof T]?: T[key] } & { [key in DefinedKeys<T>]-?: T[key] }

WithUndefinedAsOptional<{a: number|undefined, b: number, c: any}> => {a?: number|undefined, b:number, c?: any}

Type parameters
Name Type
T extends object

WithUndefinedAsOptionalRecursive

Ƭ WithUndefinedAsOptionalRecursive<T>: T extends object ? { [key in DefinedKeys<T>]-?: WithUndefinedAsOptionalRecursive<T[key]> } & { [key in UndefinedKeys<T>]?: WithUndefinedAsOptionalRecursive<T[key]> } : T

Type parameters
Name
T

core/properties/datagraphic/badgeposition

Enumerations

Interfaces

Type Aliases

SerializedBadgeEnumPosition

Ƭ SerializedBadgeEnumPosition: Object

Type declaration
Name Type
horiz? HorizontalBadgePos
layer? BadgeLayerPos
responsive? BadgeResponsiveness
vert? VerticalBadgePos

Variables

BadgePositionsClockwise

Const BadgePositionsClockwise: { horizontalPos: number ; verticalPos: number }[]


defaultBadgePosition

Const defaultBadgePosition: Object

Type declaration
Name Type
horizontalPos HorizontalBadgePos
layer BadgeLayerPos
responsive BadgeResponsiveness
verticalPos VerticalBadgePos

defaultBadgePositionSerialized

Const defaultBadgePositionSerialized: Object

Type declaration
Name Type
horiz HorizontalBadgePos
layer BadgeLayerPos
responsive BadgeResponsiveness
vert VerticalBadgePos

Functions

badgePositionsEqual

badgePositionsEqual(a, b): boolean

Parameters
Name Type
a BadgeEnumPosition
b BadgeEnumPosition
Returns

boolean


deserializeBadgeEnumPosition

deserializeBadgeEnumPosition(serialized?): BadgeEnumPosition

Parameters
Name Type
serialized? SerializedBadgeEnumPosition
Returns

BadgeEnumPosition

deserializeBadgeEnumPosition(serialized?): BadgeEnumPosition | undefined

Parameters
Name Type
serialized? null | SerializedBadgeEnumPosition
Returns

BadgeEnumPosition | undefined


isHorizontalPos

isHorizontalPos(maybePos): maybePos is HorizontalBadgePos

Parameters
Name Type
maybePos undefined | null | HorizontalBadgePos
Returns

maybePos is HorizontalBadgePos


isLayerPos

isLayerPos(maybePos): maybePos is BadgeLayerPos

Parameters
Name Type
maybePos undefined | null | BadgeLayerPos
Returns

maybePos is BadgeLayerPos


isValidSerializedBadgeEnumPosition

isValidSerializedBadgeEnumPosition(val): val is SerializedBadgeEnumPosition

Parameters
Name Type
val any
Returns

val is SerializedBadgeEnumPosition


isVerticalPos

isVerticalPos(maybePos): maybePos is VerticalBadgePos

Parameters
Name Type
maybePos undefined | null | VerticalBadgePos
Returns

maybePos is VerticalBadgePos


serializeBadgeEnumPosition

serializeBadgeEnumPosition(position?): SerializedBadgeEnumPosition

Parameters
Name Type
position? null | BadgeEnumPosition
Returns

SerializedBadgeEnumPosition


serializeBadgeEnumPositionAsKey

serializeBadgeEnumPositionAsKey(position): string

Parameters
Name Type
position BadgeEnumPosition
Returns

string


core/properties/datagraphic/datagraphicindexes

Enumerations

Type Aliases

DataGraphicIconIndexes

Ƭ DataGraphicIconIndexes: Object

Type declaration
Name Type
iconImage? DataGraphicImage
index number
set DataGraphicIconSets

DataGraphicIconLibrarySets

Ƭ DataGraphicIconLibrarySets: Exclude< DataGraphicIconSets , CUSTOM_ICONS >


DataGraphicImage

Ƭ DataGraphicImage: Object

Type declaration
Name Type
h number
url string
w number

Functions

areDataGraphicIconIndexesEqual

areDataGraphicIconIndexesEqual(a, b): boolean

Parameters
Name Type
a DataGraphicIconIndexes
b DataGraphicIconIndexes
Returns

boolean


areDataGraphicImagesEqual

areDataGraphicImagesEqual(a, b): boolean

Parameters
Name Type
a undefined | DataGraphicImage
b undefined | DataGraphicImage
Returns

boolean


core/properties/datagraphic/staticdatagraphicsettings

Type Aliases

SerializedSimpleStaticDataGraphicSettings

Ƭ SerializedSimpleStaticDataGraphicSettings: Object

Type declaration
Name Type
color string
icon DataGraphicIconIndexes
pos SerializedBadgeEnumPosition

SimpleStaticDataGraphicSettings

Ƭ SimpleStaticDataGraphicSettings: Object

Type declaration
Name Type
color string
icon DataGraphicIconIndexes
position BadgeEnumPosition

Functions

deserializeSimpleStaticDataGraphicSettings

deserializeSimpleStaticDataGraphicSettings(settings): SimpleStaticDataGraphicSettings

Parameters
Name Type
settings SerializedSimpleStaticDataGraphicSettings
Returns

SimpleStaticDataGraphicSettings


isSerializedSimpleStaticDataGraphicSettings

isSerializedSimpleStaticDataGraphicSettings(settings): settings is SerializedSimpleStaticDataGraphicSettings

Parameters
Name Type
settings unknown
Returns

settings is SerializedSimpleStaticDataGraphicSettings


serializeSimpleStaticDataGraphicSettings

serializeSimpleStaticDataGraphicSettings(settings): SerializedSimpleStaticDataGraphicSettings

Parameters
Name Type
settings SimpleStaticDataGraphicSettings
Returns

SerializedSimpleStaticDataGraphicSettings


core/properties/fillcolor

Enumerations

Type Aliases

SimpleFillStyle

Ƭ SimpleFillStyle: string | SimpleImageFill

Settings for the fill style of a block.

If a string is provided, it must be a hex color string, e.g. '#ff00ff' or '#aabbcc80'.


SimpleImageFill

Ƭ SimpleImageFill: Object

Settings for using an image as the fill style of a block.

Type declaration
Name Type Description
position SimpleImageFillPosition Different ways of laying out the image in the background of the block.
url string URL of the image to display. If a data URL is provided, the image will be uploaded to the current user's Lucid account and the URL replaced with a Lucid-provided one.

core/properties/shadow

Interfaces

Type Aliases

SerializedShadow

Ƭ SerializedShadow: Object

Type declaration
Name Type
ang? number
b number
c string
x number
y number

Functions

deserializeShadow

deserializeShadow(shadow): Shadow

Parameters
Name Type
shadow SerializedShadow
Returns

Shadow


serializeShadow

serializeShadow(shadow): SerializedShadow

Parameters
Name Type
shadow Shadow
Returns

SerializedShadow


core/properties/strokestyle

Enumerations

Functions

convertStrokeStyleToBorder

convertStrokeStyleToBorder(strokeStyle): string

Parameters
Name Type
strokeStyle StrokeStyle
Returns

string


isStrokeStyle

isStrokeStyle(value): value is StrokeStyle

Parameters
Name Type
value any
Returns

value is StrokeStyle


core/result

Interfaces

Type Aliases

Result

Ƭ Result<S, F>: Success <S> | Failure <F>

Type parameters
Name
S
F

Functions

groupByResultType

groupByResultType<S, F>(results): [ Success <S>[], Failure <F>[]]

Type parameters
Name
S
F
Parameters
Name Type
results Result <S, F>[]
Returns

[ Success <S>[], Failure <F>[]]


isEqual

isEqual<S, F>(a, b, valueCompS, valueCompF): boolean

Type parameters
Name
S
F
Parameters
Name Type
a undefined | Result <S, F>
b undefined | Result <S, F>
valueCompS (p1: S, p2: S) => boolean
valueCompF (p1: F, p2: F) => boolean
Returns

boolean


isFailure

isFailure<S, F>(res): res is Failure<F>

Type parameters
Name
S
F
Parameters
Name Type
res Result <S, F>
Returns

res is Failure<F>


isSuccess

isSuccess<S, F>(res): res is Success<S>

Type parameters
Name
S
F
Parameters
Name Type
res Result <S, F>
Returns

res is Success<S>


core/rules/badgeboxfit

Enumerations


core/rules/conditions

Enumerations

Type Aliases

Conditions

Ƭ Conditions: TextConditions | ShapeDataConditions | ShapeTypeConditions | ConnectedShapesCondition | ContainmentConditions


core/rules/conditiontype

Enumerations


core/rules/serializedcondition

Type Aliases

Between

Ƭ Between: Object

Type declaration
Name Type
After number | undefined
Before number | undefined

ConditionValueType

Ƭ ConditionValueType: string | number | boolean | Between | undefined | string[]


SerializedCondition

Ƭ SerializedCondition: Object

See lucid-extension-sdk/document/documentelement/ruleproxy.ts for a description of each of these fields

Type declaration
Name Type
Condition Conditions
DisplayLabel? string
Label? string
Source string
Type ConditionType
Value? ConditionValueType

core/rules/serializeddatagraphic

Type Aliases

SerializedDataGraphic

Ƭ SerializedDataGraphic: Object

Type declaration
Name Type
Color? string
Image? SerializedDataGraphicImage
Index number
Position SerializedBadgeEnumPosition
Set DataGraphicIconSets

SerializedDataGraphicImage

Ƭ SerializedDataGraphicImage: Object

Type declaration
Name Type
h number
url string
w number

core/rules/serializedeffect

Enumerations

Type Aliases

FormattingInterface

Ƭ FormattingInterface: Object

Index signature

▪ [index: string]: string


SerializedEffect

Ƭ SerializedEffect: Object

Type declaration
Name Type
Combination ConditionCombination
ConditionOrder number[]
DataGraphic? SerializedDataGraphic
FormatType RuleFormattingType
Formatting SerializedFormatting
StencilGraphic? SerializedStencilGraphic
Tooltip? string

SerializedFormatting

Ƭ SerializedFormatting: Object

Type declaration
Name Type
Block? FormattingInterface
Line? FormattingInterface
Page? FormattingInterface

core/rules/serializedstencilgraphic

Type Aliases

SerializedStencilGraphic

Ƭ SerializedStencilGraphic: Object

Type declaration
Name Type Description
AutoHide? boolean AutoHide used to be an undefined property that should default to true. Either continue handling undefined case when deserializing, or write a BCU that changes undefined to true.
Badge? SerializedBadgeEnumPosition -
BoxFit? BadgeBoxFit -
Properties { [index: string]: number | string | boolean; } -
Stencil string -

Functions

isSerializedStencilGraphic

isSerializedStencilGraphic(v): v is SerializedStencilGraphic

Parameters
Name Type
v unknown
Returns

v is SerializedStencilGraphic


core/serializeddataerror

Type Aliases

SerializedDataError

Ƭ SerializedDataError: Object

Type declaration
Name Type
error string
type DataErrorType

Functions

isSerializedDataError

isSerializedDataError(raw): raw is SerializedDataError

Parameters
Name Type
raw unknown
Returns

raw is SerializedDataError


core/shapedatainheritance

Enumerations


core/spreadsheetintegration/lucidspreadsheetintegration

Functions

isImportedResults

isImportedResults(x): x is ImportedResults

Parameters
Name Type
x unknown
Returns

x is ImportedResults


core/spreadsheetintegration/lucidspreadsheetintegrationregistry


core/unfurl/unfurlcallbacks

Enumerations

Interfaces


core/unfurl/unfurldetails

Interfaces


core/unfurl/unfurliframe

Enumerations

Interfaces

Functions

generateIframeAttributes

generateIframeAttributes(unfurlIframe): IframeAttributes

Parameters
Name Type
unfurlIframe UnfurlIframe
Returns

IframeAttributes


core/unfurl/unfurlrefresherrortype

Enumerations

Functions

unfurlRefreshErrorTypeValidator

unfurlRefreshErrorTypeValidator(x): x is UnfurlRefreshErrorType

Parameters
Name Type
x unknown
Returns

x is UnfurlRefreshErrorType


core/unfurl/unfurlthumbnail

Interfaces


core/validators/validators

Type Aliases

ValidatorWithMessage

Ƭ ValidatorWithMessage: (x: unknown) => true | string

Type declaration

▸ (x): true | string

Parameters
Name Type
x unknown
Returns

true | string

Functions

arrayValidator

arrayValidator<T>(subValidator): (p1: unknown) => p1 is T[]

Creates a validator which tests if the target is an array and if all elements of the array satisfy the given sub-validator.

Type parameters
Name
T
Parameters
Name Type
subValidator (p1: unknown) => p1 is T
Returns

fn

A validator for the array type

▸ (p1): p1 is T[]

Parameters
Name Type
p1 unknown
Returns

p1 is T[]


asAssertion

asAssertion<TO, FROM>(validator): (val: FROM) => asserts val is TO

Type parameters
Name
TO
FROM
Parameters
Name Type
validator Validator <TO, FROM>
Returns

fn

▸ (val): asserts val is TO

Parameters
Name Type
val FROM
Returns

asserts val is TO


both

both<A, B>(validatorA, validatorB): (x: unknown) => x is A & B

Create a validator that combines two validators. This is useful for validating properties that have been composed of a generic and more specific values.

Type parameters
Name
A
B
Parameters
Name Type
validatorA Validator <A>
validatorB Validator <B>
Returns

fn

▸ (x): x is A & B

Parameters
Name Type
x unknown
Returns

x is A & B


either

either<A, B>(validatorA, validatorB): (x: unknown) => x is A | B

Create a validator that merges two validators. This is useful for validating properties that have 2 disjoint sets of possible values. e.g. {someObject: string}|false

Type parameters
Name
A
B
Parameters
Name Type
validatorA Validator <A>
validatorB Validator <B>
Returns

fn

▸ (x): x is A | B

Parameters
Name Type
x unknown
Returns

x is A | B


enumValidator

enumValidator<T>(enumMap): (x: unknown) => x is Object extends T ? never : T[keyof T]

Creates a validator which tests if the target is a value in the specified enum. Note that numbers in enums are reverse-mapped by the TS transpiler, so the specified keys are also values.

Type parameters
Name
T
Parameters
Name Type
enumMap T
Returns

fn

▸ (x): x is Object extends T ? never : T[keyof T]

Parameters
Name Type
x unknown
Returns

x is Object extends T ? never : T[keyof T]


exclude

exclude<T, U>(validator, excludeValidator): (x: unknown) => x is Exclude<U, T>

Create a validator that allows types excluding those that satisfy an excludeValidator.

Type parameters
Name
T
U
Parameters
Name Type
validator (x: unknown) => x is U
excludeValidator (x: U) => x is T
Returns

fn

▸ (x): x is Exclude<U, T>

Parameters
Name Type
x unknown
Returns

x is Exclude<U, T>


isBooleanOrEmptyString

isBooleanOrEmptyString(x): x is boolean | ""

This validator validates that value is either boolean or empty string

Parameters
Name Type
x unknown
Returns

x is boolean | ""


isBoundingBox

isBoundingBox(subject): subject is DestructureGuardedTypeObj<Object>

Tests if the given target is a bounding box.

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isDate

isDate(x): x is Date

Parameters
Name Type
x unknown
Returns

x is Date


isFalse

isFalse(x): x is false

Parameters
Name Type
x unknown
Returns

x is false


isFlag

isFlag(x): x is boolean | 0 | 1

Returns true if the target is equal to either zero or one or is a boolean.

Parameters
Name Type
x unknown
Returns

x is boolean | 0 | 1


isNullOption

isNullOption(value): value is undefined | null

Parameters
Name Type
value unknown
Returns

value is undefined | null


isNumberOrEmptyString

isNumberOrEmptyString(x): x is number | ""

This validator validates that value is either number or empty string

Parameters
Name Type
x unknown
Returns

x is number | ""


isOpacity

isOpacity(x): x is number

Returns if an object is a number between 0 and 100.

Parameters
Name Type
x unknown
Returns

x is number


isPanelSize

isPanelSize(subject): subject is DestructureGuardedTypeObj<Object>

Tests if the given target is a panel size.

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isPointLike

isPointLike(subject): subject is DestructureGuardedTypeObj<Object>

Tests if the given target satisfies the PointLike interface.

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isPositiveNumber

isPositiveNumber(x): x is number

Parameters
Name Type
x unknown
Returns

x is number


isRestrictions

isRestrictions(subject): subject is DestructureGuardedTypeObj<Object>

This validator validates model of lucid.model.restrictions

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isSet

isSet(x): x is Object

This validator only allows objects whose values are all booleans set to true.

Parameters
Name Type
x unknown
Returns

x is Object

A validator for the map


isSize

isSize(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


isStringOrNegativeOne

isStringOrNegativeOne(x): x is string | -1

This validator validates that value is either string or -1

Parameters
Name Type
x unknown
Returns

x is string | -1


isTrue

isTrue(x): x is true

Parameters
Name Type
x unknown
Returns

x is true


mapValidator

mapValidator<T>(subValidator): (x: unknown) => x is Object

Creates a validator which tests if the target is an object and if all values in the object satisfy the given sub-validator. This does not perform any tests on the object keys, which are allowed to be arbitrary strings.

Type parameters
Name
T
Parameters
Name Type
subValidator (p1: unknown) => p1 is T
Returns

fn

A validator for the map Note that unlike objectValidator, this performs no validation on the names or number of the keys and treats all values equally

▸ (x): x is Object

Parameters
Name Type
x unknown
Returns

x is Object


maxLengthValidator

maxLengthValidator(max): (x: unknown) => x is string

Parameters
Name Type
max number
Returns

fn

▸ (x): x is string

Parameters
Name Type
x unknown
Returns

x is string


minLengthValidator

minLengthValidator(min): (x: unknown) => x is string

Parameters
Name Type
min number
Returns

fn

▸ (x): x is string

Parameters
Name Type
x unknown
Returns

x is string


nullable

nullable<T>(subValidator): (x: unknown) => x is null | T

Create a validator which allows the target to be either null or satisfy the sub-validator.

Type parameters
Name
T
Parameters
Name Type
subValidator (p1: unknown) => p1 is T
Returns

fn

A validator for the array type

▸ (x): x is null | T

Parameters
Name Type
x unknown
Returns

x is null | T


nullableOption

nullableOption<T>(subValidator): (x: unknown) => x is undefined | null | T

Create a validator which allows the target to be undefined, null, or satisfy the sub-validator.

Type parameters
Name
T
Parameters
Name Type
subValidator (p1: unknown) => p1 is T
Returns

fn

A validator for the array type

▸ (x): x is undefined | null | T

Parameters
Name Type
x unknown
Returns

x is undefined | null | T


objectOfValidator

objectOfValidator<T>(subValidator): (x: unknown) => x is Record<any, T>

Type parameters
Name
T
Parameters
Name Type
subValidator Validator <T>
Returns

fn

▸ (x): x is Record<any, T>

Parameters
Name Type
x unknown
Returns

x is Record<any, T>


objectValidator

objectValidator<T>(validatorStructure): (subject: unknown) => subject is DestructureGuardedTypeObj<T>

Creates a validator which tests if the target is an object and if the structure of the object matches the structure of the passed-in validator object. The values in the validator object are in turn validators. This means that if the validator object has a (key,value) pair of the form ('key', keyValidator), then in order for the target object (x) to match, keyValidator(x['key']) must return true for all keys in the validatorStructure.

Note that you can use lucid.validators.option to create optional parameters in validation structure.

Type parameters
Name Type
T extends Object
Parameters
Name Type
validatorStructure T
Returns

fn

▸ (subject): subject is DestructureGuardedTypeObj<T>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<T>


option

option<T>(subValidator): (x: unknown) => x is undefined | T

Create a validator which allows the target to be undefined or satisfy the sub-validator.

Type parameters
Name
T
Parameters
Name Type
subValidator (p1: unknown) => p1 is T
Returns

fn

A validator for the array type

▸ (x): x is undefined | T

Parameters
Name Type
x unknown
Returns

x is undefined | T


partialObjectValidator

partialObjectValidator<T>(validatorStructure): (subject: unknown) => subject is Partial<DestructureGuardedTypeObj<T>>

Creates a validator which tests if the target is an object and if the structure of the object matches the structure of the passed-in validator object, but with every entry being optional.

Type parameters
Name Type
T extends Object
Parameters
Name Type
validatorStructure T
Returns

fn

▸ (subject): subject is Partial<DestructureGuardedTypeObj<T>>

Parameters
Name Type
subject unknown
Returns

subject is Partial<DestructureGuardedTypeObj<T>>


propertyValidator

propertyValidator<T>(subValidator, preSaveActions): (subject: unknown) => subject is DestructureGuardedTypeObj<Object>

Get a validator which returns whether the property calculation structure is correct.

Type parameters
Name
T
Parameters
Name Type
subValidator (p1: unknown) => p1 is T
preSaveActions (p1: unknown) => unknown[]
Returns

fn

▸ (subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


rangeValidator

rangeValidator(min, max): (x: unknown) => x is number

Creates a validator which tests if the target is a number and is equal to or between the min and max values.

Parameters
Name Type
min number
max number
Returns

fn

▸ (x): x is number

Parameters
Name Type
x unknown
Returns

x is number


recordValidator

recordValidator<K, V>(keyList, valueValidator): (x: unknown) => x is Record<K, V>

Type parameters
Name Type
K extends string
V V
Parameters
Name Type
keyList K[]
valueValidator Validator <V>
Returns

fn

▸ (x): x is Record<K, V>

Parameters
Name Type
x unknown
Returns

x is Record<K, V>


someValidator

someValidator<T, A>(...validators): (x: any) => x is GuardToType<A[number]>

Creates a validator that the given unknown matches at least one of the given validators

Type parameters
Name Type
T T
A extends (p1: unknown) => p1 is T[]
Parameters
Name Type
...validators A
Returns

fn

▸ (x): x is GuardToType<A[number]>

Parameters
Name Type
x any
Returns

x is GuardToType<A[number]>


someValue

someValue<T>(...values): (x: unknown) => x is T[number]

Creates a validator that the given unknown is one of the supplied values

Type parameters
Name Type
T extends (string | number | symbol)[]
Parameters
Name Type
...values T
Returns

fn

▸ (x): x is T[number]

Parameters
Name Type
x unknown
Returns

x is T[number]


strictObjectValidator

strictObjectValidator<T>(validatorStructure): (subject: unknown) => subject is DestructureGuardedTypeObj<T>

Similar to objectValidator, but if the object has any non-undefined keys, they must also be present in the validator structure. This is useful for things where extra data is unwanted, like Property serialization. the loose version is often prefered because this one makes backwards compatible changes to the data harder, because it requires an additional PR when the data transfers between services:

  1. A PR that adds the option() to this validator; 2. A PR that sends the new data; 3. A PR to remove the option(); compared to the (non-strict)objectValidator steps:
  2. A PR that adds the option() to this validator and sends the new data; 2. A PR to remove the option();
Type parameters
Name Type
T extends Object
Parameters
Name Type
validatorStructure T
Returns

fn

▸ (subject): subject is DestructureGuardedTypeObj<T>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<T>


stringEnumValidator

stringEnumValidator<T>(enumMap): (x: unknown) => x is Object extends T ? never : T[keyof T]

Creates a validator which tests if the target is a string and is one of the values in the specified enum (object).

Type parameters
Name
T
Parameters
Name Type
enumMap T
Returns

fn

▸ (x): x is Object extends T ? never : T[keyof T]

Parameters
Name Type
x unknown
Returns

x is Object extends T ? never : T[keyof T]


tupleValidator

tupleValidator<V>(...tupleValidators): (x: any) => x is { [key in string | number | symbol]: GuardToType<V[key]> }

Creates a validator for a fixed width array where each entry in the array can have a separate validator

Type parameters
Name Type
V extends (p1: unknown) => p1 is unknown[]
Parameters
Name Type
...tupleValidators V
Returns

fn

▸ (x): x is { [key in string | number | symbol]: GuardToType<V[key]> }

Parameters
Name Type
x any
Returns

x is { [key in string | number | symbol]: GuardToType<V[key]> }


typedRecordValidator

typedRecordValidator<K, V>(keyValidator, valueValidator): (x: unknown) => x is Record<K, V>

Type parameters
Name Type
K extends string | number | symbol
V V
Parameters
Name Type
keyValidator Validator <K>
valueValidator Validator <V>
Returns

fn

▸ (x): x is Record<K, V>

Parameters
Name Type
x unknown
Returns

x is Record<K, V>


validatorWithMessage

validatorWithMessage<T>(validator, message, sub?): ValidatorWithMessage

Type parameters
Name
T
Parameters
Name Type
validator (x: unknown) => x is T
message string
sub? ValidatorWithMessage
Returns

ValidatorWithMessage


core/xhr

Interfaces

Type Aliases

XHRResponse

Ƭ XHRResponse: TextXHRResponse | BinaryXHRResponse

Functions

isBinaryXHRResponse

isBinaryXHRResponse(p1): p1 is BinaryXHRResponse

Parameters
Name Type
p1 unknown
Returns

p1 is BinaryXHRResponse


isTextXHRResponse

isTextXHRResponse(p1): p1 is TextXHRResponse

Parameters
Name Type
p1 unknown
Returns

p1 is TextXHRResponse


isXHRResponse

isXHRResponse(p1): p1 is XHRResponse

Parameters
Name Type
p1 unknown
Returns

p1 is XHRResponse


data/branchedcollectionid


data/collectiondefinition

Interfaces


data/collectionerrortypes

Variables

CollectionUpstreamSchemaStatus

Const CollectionUpstreamSchemaStatus: "__CollectionUpstreamSchemaStatus__"


data/collectionproxy

Classes


data/dataerror

Classes


data/dataitemproxy

Classes


data/dataproxy

Classes


data/datasourceproxy

Classes


data/dataupdatefiltertype

Enumerations


data/patchcollectionproxy

Classes


data/referencekeydefinition

Interfaces

Type Aliases

ReferenceKeyDefinition

Ƭ ReferenceKeyDefinition: CollectionReferenceKeyDefinition | FlattenedReferenceDefinition


data/referencekeyproxy

Classes


data/schemadefinition

Interfaces

Type Aliases

FieldConstraintDefinition

Ƭ FieldConstraintDefinition: RequiredFieldConstraintDefinition | LockedFieldConstraintDefinition | MinValueFieldConstraintDefinition | MaxValueFieldConstraintDefinition | SingleLineFieldConstraintDefinition | NoWhitespaceFieldConstraintDefinition | UniqueEditFieldConstraintDefinition | MaxLengthConstraintDefinition

Functions

isFieldConstraintDefinition

isFieldConstraintDefinition(x): x is Object

Parameters
Name Type
x unknown
Returns

x is Object


minMaxFieldConstraintValidator

minMaxFieldConstraintValidator(val): val is MIN_VALUE | MAX_VALUE | MAX_LENGTH

Parameters
Name Type
val unknown
Returns

val is MIN_VALUE | MAX_VALUE | MAX_LENGTH


dataconnector/actions/action

Classes

Type Aliases

CollectionId

Ƭ CollectionId: string


ItemPrimaryKey

Ƭ ItemPrimaryKey: string


PatchItems

Ƭ PatchItems: Object

Index signature

▪ [primaryKey: ItemPrimaryKey ]: { [fieldName: string]: unknown; }


dataconnector/actions/dataconnectoractionkeys

Enumerations


dataconnector/actions/managewebhookresponsebody

Type Aliases

SerializedManageWebhookResponseBody

Ƭ SerializedManageWebhookResponseBody: Object

Wire format for ManageWebhookResponses

Type declaration
Name Type
documentCollections Record<string, string[]>
webhookData unknown

Functions

serializeManageWebhookResponse

serializeManageWebhookResponse(webhookResponse): SerializedManageWebhookResponseBody

Convert the ManageWebhookResponse to Lucid's wire format

Parameters
Name Type
webhookResponse Webhook
Returns

SerializedManageWebhookResponseBody


dataconnector/actions/patchresponsebody

Classes

Type Aliases

PatchChangeCollection

Ƭ PatchChangeCollection: Object

Type declaration
Name Type
collectionId string
itemsPatch ItemsPatch

SerializedPatchChange

Ƭ SerializedPatchChange: Object

Wire format for changes parts of a patch response

Type declaration
Name Type
collections { collectionId: string ; itemsPatch: SerializedItemsPatch }[]
syncId string

SerializedPatchResponseBody

Ƭ SerializedPatchResponseBody: Object

Wire format for "Patch" Action responses

Type declaration
Name Type
changes SerializedPatchChange []
errors SerializedPatchErrors

Variables

PatchErrorTooltipField

Const PatchErrorTooltipField: "__canvasTooltipDataSyncError__"

Placeholder field name for tool tip errors

Functions

serializePatchChanges

serializePatchChanges(changes): SerializedPatchResponseBody

Parameters
Name Type
changes PatchChange [][]
Returns

SerializedPatchResponseBody


serializePatchResponse

serializePatchResponse(patchChange): SerializedPatchChange

Convert a Patch change to our wire format

Parameters
Name Type
patchChange PatchChange
Returns

SerializedPatchChange


dataconnector/actions/serializedactions

Functions

actionsHeaderValidator

actionsHeaderValidator(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


deserializeActions

deserializeActions(client, actions): DataConnectorAction [] | undefined

Function to convert the lucid action wire format into a clean list of actions

Parameters
Name Type
client DataConnectorClient
actions unknown
Returns

DataConnectorAction [] | undefined


dataconnector/cryptodependencies

Interfaces

Type Aliases

CryptoDependencies

Ƭ CryptoDependencies: Object

Type declaration
Name Type
Buffer BufferSingleton
crypto CryptoModule

dataconnector/dataconnector

Classes

Type Aliases

DataConnectorRoute

Ƭ DataConnectorRoute: (args: { body: string ; headers: Record<string, string[] | string | undefined> ; query: Record<string, undefined | string> }) => Promise<{ body?: string ; headers?: Record<string, string | undefined> ; status: number }>

Type declaration

▸ (args): Promise<{ body?: string ; headers?: Record<string, string | undefined> ; status: number }>

Type to define an arbitrary non-action request to this server. Useful for handling webhook responses in the same lambda that handles data actions

Parameters
Name Type
args Object
args.body string
args.headers Record<string, string[] | string | undefined>
args.query Record<string, undefined | string>
Returns

Promise<{ body?: string ; headers?: Record<string, string | undefined> ; status: number }>


dataconnector/dataconnectorclient

Classes


dataconnector/datasourceclient

Classes


dataconnector/datasourcemetadatatypes

Interfaces

Type Aliases

MetadataPatchResponse

Ƭ MetadataPatchResponse: NoContent | Conflict

Functions

isSerializedMetadataRecord

isSerializedMetadataRecord(subject): subject is DestructureGuardedTypeObj<Object>

Parameters
Name Type
subject unknown
Returns

subject is DestructureGuardedTypeObj<Object>


dataconnector/datasourceupdatetypes

Classes

Interfaces

Type Aliases

DataSourceRequest

Ƭ DataSourceRequest: Object

Container for an update to a data source

Type declaration
Name Type Description
collections Record<string, CollectionPatch > Collections to add or update to the data source
dataSourceConfiguration? { patchType: UpstreamPatchType } Configuration for the data source to be added or modified
dataSourceConfiguration.patchType UpstreamPatchType Configures how changes made to the data are pushed to the external source
dataSourceName string The name of the data source to be added or modified
updateFilterType? DataUpdateFilterType The current update filter type associated with this request

ItemsPatch

Ƭ ItemsPatch: { errors?: Map<string, SerializedLucidDictionary > ; items: Map<string, SerializedFields > ; itemsDeleted?: string[] } | ItemsPatchInexhaustive | ItemsPatchExhaustive


SerializedItemsPatch

Ƭ SerializedItemsPatch: { errors?: Record<string, SerializedLucidDictionary > ; items: Record<string, SerializedFields > ; itemsDeleted: string[] } | { errors?: Record<string, SerializedLucidDictionary > ; exhaustiveItems: Record<string, SerializedFields > ; rekeyingMap?: Record<string, string | null> }

Functions

schemaOKStatus

schemaOKStatus(): [string, SerializedLucidDictionary ]

For the moment, when the upstream Google Sheet is changed in such a way that the schema has changed, we simply stop updates from happening. We do need to alert the user that this has happened, though. We also need to know when the updates are happening properly so we can clear the error once the user has resolved the problem. Since the only way to delete errors is to overwrite them, we simply overwrite the error to be OK on every successful import.

Returns

[string, SerializedLucidDictionary ]

The error map entry which alerts the document that this problem has been resolved.


schemaOutOfSyncStatus

schemaOutOfSyncStatus(oldPrimaryKey, newPrimaryKey): [string, SerializedLucidDictionary ]

For the moment, when the upstream Google Sheet is changed in such a way that the schema has changed, we simply stop updates from happening. We do need to alert the user that this has happened, though. This is a utility function for creating the appropriate entry in the errors map so that the user can be alerted that updates have stopped and what they need to do to fix it.

The eventual, proposed fix is to allow schemas to have version numbers so that changes to the schema from Google can simply be folded in to the on-document copies of the data and all following edits.

Parameters
Name Type Description
oldPrimaryKey string[] The primary key stored in the data sync service and which currently is used to interpret patches.
newPrimaryKey string[] The primary key as it has been changed in the real Google Sheets.
Returns

[string, SerializedLucidDictionary ]

The error map entry which alerts the document that this problem has happened.


serializeCollectionPatch

serializeCollectionPatch(patch): SerializedCollectionPatch

Parameters
Name Type
patch CollectionPatch
Returns

SerializedCollectionPatch


serializeItemsPatch

serializeItemsPatch(patch): SerializedItemsPatch

Parameters
Name Type
patch ItemsPatch
Returns

SerializedItemsPatch


dataconnector/debugserver

Type Aliases

RunDebugServerOptions

Ƭ RunDebugServerOptions: Object

Options for how to run the debug server

Type declaration
Name Type Description
app? ExpressAppLike The app you want to route your debug server on. If you leave this undefined, we'll create one
express ExpressLike We don't want to have the lucid-extension-sdk depend on express. You can pass the imported express modules here
port? number The port to listen on
prefix? string prefix for the debug server routes. Useful if you want to distinguish different data connectors

dataconnector/defaultfetchfunction


dataconnector/itemrekeyer

Classes


dataconnector/signaturevalidator

Classes


dataconnector/throwunsuccessful


document/blockclasses/blockproxyregistry

Type Aliases

BlockProxyConstructor

Ƭ BlockProxyConstructor: typeof BlockProxy & { classNameRegex: RegExp }

The base BlockProxy class provides no special functionality for any specific type of block.

To provide direct type-safe support for specific block types, extend BlockProxy and add a classNameRegex, then include your new block proxy in the allProxyClasses list. Then, whenever we construct a proxy to represent a block on the document, we will check each available proxy class and use one of these if available.

Functions

findProxyClass

findProxyClass(className): BlockProxyConstructor | undefined

Parameters
Name Type
className string
Returns

BlockProxyConstructor | undefined


document/blockclasses/cardblockproxy

Classes


document/blockclasses/customblockproxy

Classes

Type Aliases

CustomBlockProxyConstructor

Ƭ CustomBlockProxyConstructor: typeof BlockProxy & { library: string ; shape: string }


document/blockclasses/erdblockproxy

Classes


document/blockclasses/legendblockproxy

Enumerations

Classes


document/blockclasses/linkunfurlblockproxy

Classes


document/blockclasses/swimlaneblockproxy

Classes


document/blockclasses/tableblockproxy

Classes


document/blockdefinition

Interfaces


document/blockproxy

Classes


document/documentaccesspermission

Enumerations


document/documentchunk


document/documentelement/cardconfigproxy

Classes


document/documentelement/documentelementproxy

Classes


document/documentelement/documentelementtype

Enumerations


document/documentelement/ruleproxy

Classes


document/documentproxy

Classes


document/elementproxy

Classes


document/groupproxy

Classes


document/imagedefinition

Interfaces

Functions

imageToBlockDefinition

imageToBlockDefinition(definition): BlockDefinition

Turns an image definition into a block definition.

Parameters
Name Type
definition ImageDefinition
Returns

BlockDefinition


document/itemproxy

Classes


document/linedefinition

Interfaces

Type Aliases

EndpointDefinition

Ƭ EndpointDefinition: BlockEndpointDefinition | LineEndpointDefinition | PositionEndpointDefinition

The definition of one line endpoint, which may be free-floating at a given location, or attached to another block or line

Functions

isBlockEndpointDefinition

isBlockEndpointDefinition(endpoint): endpoint is BlockEndpointDefinition

Checks if the endpoint is a BlockEndpointDefinition.

Parameters
Name Type
endpoint EndpointDefinition
Returns

endpoint is BlockEndpointDefinition


isLineEndpointDefinition

isLineEndpointDefinition(endpoint): endpoint is LineEndpointDefinition

Checks if the endpoint is a LineEndpointDefinition.

Parameters
Name Type
endpoint EndpointDefinition
Returns

endpoint is LineEndpointDefinition


isPositionEndpointDefinition

isPositionEndpointDefinition(endpoint): endpoint is PositionEndpointDefinition

Checks if the endpoint is a PositionEndpointDefinition.

Parameters
Name Type
endpoint EndpointDefinition
Returns

endpoint is PositionEndpointDefinition


document/lineproxy

Enumerations

Classes


document/linetextareapositioning

Interfaces


document/mapproxy

Classes

Interfaces


document/pagedefinition

Interfaces


document/pageproxy

Classes


document/propertystoreproxy

Classes


document/ruledefinition

Interfaces

Type Aliases

ConditionDefinition

Ƭ ConditionDefinition: FormulaConditionDefinition | ShapeDataConditionDefinition | TextConditionDefinition | ShapeTypeConditionDefinition


EffectDefinition

Ƭ EffectDefinition: FormattingEffectDefinition | DataGraphicEffectDefinition | CustomIconEffectDefinition


document/shapedataproxy

Classes


document/text/textstyle

Enumerations

Interfaces

Functions

isPartialTextStyle

isPartialTextStyle(subject): subject is Partial<DestructureGuardedTypeObj<Object>>

Parameters
Name Type
subject unknown
Returns

subject is Partial<DestructureGuardedTypeObj<Object>>


editorclient

Classes

Type Aliases

DataActionOptions

Ƭ DataActionOptions: Object

Type declaration
Name Type
actionData? unknown
actionName string
asynchronous? boolean
dataConnectorName string
syncDataSourceIdNonce? string

DataActionResponse

Ƭ DataActionResponse: { status: number } & { json: unknown } | { text: string }


interop

Namespaces

Classes

Interfaces


math

Type Aliases

Box

Ƭ Box: Object

Type declaration
Name Type
h number
w number
x number
y number

Point

Ƭ Point: Object

Type declaration
Name Type
x number
y number

Functions

boxCenter

boxCenter(b): Object

Parameters
Name Type
b Box
Returns

Object

Name Type
x number
y number

boxFrom4Points

boxFrom4Points(a, b, c, d): Box

Parameters
Name Type
a Point
b Point
c Point
d Point
Returns

Box


boxesOverlap

boxesOverlap(a, b): boolean

Do two boxes overlap?

Parameters
Name Type
a Box
b Box
Returns

boolean


clip

clip(a, b): Box

Gets the intersection of two boxes

Parameters
Name Type
a Box
b Box
Returns

Box

a clipped to b


combinedBoundingBox

combinedBoundingBox(boxes): Box

Parameters
Name Type
boxes [ Box , ...Box[]]
Returns

Box

combinedBoundingBox(boxes): Box | undefined

Parameters
Name Type
boxes Box []
Returns

Box | undefined


isBoxWithin

isBoxWithin(a, b): boolean

Is box a completely within box b?

Parameters
Name Type
a Box
b Box
Returns

boolean


padBox

padBox(box, padding): Box

Parameters
Name Type
box Box
padding number
Returns

Box


percentBoxesOverlap

percentBoxesOverlap(a, b): number

return the percentage of a that overlaps with b. if a is entirely within b, it returns 1 (or a number a little less than 1 (e.g., 0.99999999999) due to numerical inaccuracy); if a is entirely outside b, it returns 0.

Parameters
Name Type
a Box
b Box
Returns

number


rotateAroundFn

rotateAroundFn(anchor, angle): (p1: Point ) => Point

Parameters
Name Type
anchor Point
angle number
Returns

fn

▸ (p1): Point

Parameters
Name Type
p1 Point
Returns

Point


rotateBox

rotateBox(b, angle, center?): [ Point , Point , Point , Point ]

Parameters
Name Type
b Box
angle number
center? Point
Returns

[ Point , Point , Point , Point ]


rotatedBoundingBox

rotatedBoundingBox(b, angle, center?): Box

Returns the bounding box that would surround the given box when rotated the given amount.

Parameters
Name Type
b Box
angle number
center? Point
Returns

Box


toCornersAsArray

toCornersAsArray(box): [ Point , Point , Point , Point ]

Parameters
Name Type
box Box
Returns

[ Point , Point , Point , Point ]


message/unfurleventmessage


Namespace: i18n

interop.i18n

Functions

formatList

formatList(value, params?): I18nFormattedList

Parameters
Name Type
value string[]
params? any
Returns

I18nFormattedList


formatNumber

formatNumber(value, params): I18nFormattedNumber

Parameters
Name Type
value number
params I18nFormattedNumberParams
Returns

I18nFormattedNumber


get

get(key, replacements?, wrappers?, gender?): string

Parameters
Name Type
key string
replacements? I18nReplacement
wrappers? string[]
gender? string
Returns

string


getInLocale

getInLocale(locale, key, replacements?, wrappers?): string

Parameters
Name Type
locale string
key string
replacements? I18nReplacement
wrappers? string[]
Returns

string


getLanguage

getLanguage(): string

Returns

string


setData

setData(data, language): void

Parameters
Name Type
data Object
language string
Returns

void


ui/alertmodal


ui/iframeui

Classes


ui/menu

Enumerations

Classes

Interfaces


ui/modal

Classes

Type Aliases

ModalConfig

Ƭ ModalConfig: { content: string ; url?: never } | { content?: never ; url: string } & { chromeless?: false | never ; title: string } | { chromeless: true ; title?: never } & { fullScreen?: false | never ; height: number ; transparentBackground?: false | never ; width: number } | { fullScreen: true ; height?: never ; transparentBackground?: boolean ; width?: never }

Configuration required to display a Modal.


ui/panel

Enumerations

Classes

Type Aliases

PanelConfig

Ƭ PanelConfig: { height?: number ; iconUrl: string ; location: PanelLocation ; persist?: boolean ; title: string ; toolTip?: string ; visibleAction?: string ; width?: number } & { content: string ; url?: never } | { content?: never ; url: string }


ui/viewport

Classes

Type Aliases

TextEditCompletionCallback

Ƭ TextEditCompletionCallback: (newValue: string) => boolean | string | Promise<boolean | string>

Type declaration

▸ (newValue): boolean | string | Promise<boolean | string>

A text editing hook provided to Viewport.hookTextEdit may return a TextEditCompletionCallback to specify what behavior should happen when the user finishes editing text.

If this callback returns false, the edit is reverted.

If this callback returns a string, the typed value is replaced with that string.

Parameters
Name Type
newValue string
Returns

boolean | string | Promise<boolean | string>


user/userproxy

Classes