Home » Documentation » DataStore Selectors

DataStore Selectors

Table of Contents

Viewport Selectors

getViewports

Description: Returns all defined viewports.

Returns: object – All viewports


getViewport

Description: Returns the current active viewport. Defaults to DOM width if viewport is 0.

Returns: number – Active viewport width


getDesktop / getTablet / getMobile

Description: Returns the default desktop, tablet, or mobile viewport.

Returns: number – Viewport width for the device


getIframeSize

Description: Returns the size of the iframe.

Returns: Size – Width and height


getIframeViewport

Description: Returns the viewport currently applied inside the iframe.

Returns: number – Iframe viewport


Status Indicator Selectors

SelectorDescriptionReturn
isRegisteringChecks if registeringboolean
isLoadingChecks if loadingboolean
isSavingChecks if savingboolean
isAutoSavingChecks if autosavingboolean
isActiveChecks if activeboolean
isEditingChecks if editingboolean
isInspectingChecks if inspectingboolean

Range Selectors

SelectorDescriptionReturn
inDesktopRangeIndicates if viewport is in desktop rangeboolean
inTabletRangeIndicates if viewport is in tablet rangeboolean
inMobileRangeIndicates if viewport is in mobile rangeboolean

Block Status Selectors

SelectorDescriptionParametersReturn
isRegisteredChecks if a block is registeredclientId: stringboolean
hasBlockViewportsChecks if a block has saves, changes, or removesclientId: stringboolean
hasBlockDefaultsChecks if block has default style savesclientId: stringboolean
hasBlockSavesChecks if block has any saved statesclientId: stringboolean
hasBlockChangesChecks if block has any changesclientId: stringboolean
hasBlockPropertyChangesChecks if block property has changes for a viewportclientId: string,
viewport: number,
property: string
boolean
hasBlockValidsChecks if block has valid entriesclientId: stringboolean
hasBlockRemovesChecks if block has removalsclientId: stringboolean
hasBlockPropertyRemovesChecks if a block property has been removed for a viewportclientId: string,
viewport: number,
property: string
boolean

Block Data Selectors

SelectorDescriptionParametersReturn
getSavesReturns all savesobject
getBlockSavesReturns saves for a single blockclientId: stringobject
getBlockPropertySavesReturns saves for a block property in a viewportclientId: string,
viewport: number,
property: string
object
getGeneratedBlockSavesReturns computed block saves (merges changes, cleans removes)clientId: stringobject
getChangesReturns all changesobject
getBlockChangesReturns changes for a single blockclientId: stringobject
getBlockPropertyChangesReturns changes for a block property in a viewportclientId: string,
viewport: number,
property: string
object
getValidsReturns all validsobject
getBlockValidsReturns valids for a single blockclientId: stringobject
getViewportBlockValidsReturns block valids for the current viewportclientId: stringobject
getRemovesReturns all removesobject
getBlockRemovesReturns removes for a single blockclientId: stringobject
getBlockPropertyRemovesReturns removes for a block property in a viewportclientId: string,
viewport: number,
property: string
object

Editor & CSS Selectors

SelectorDescriptionParametersReturn
getLastEditReturns timestamp of last edit outside block contextnumber
getRendererPropertySetReturns all registered renderersRendererPropertySet
getRendererSetReturns renderer set for a specific keykey: stringRendererSet | false
needsRendererChecks if style properties require a rendererstyle: BlockStylesboolean
hasRendererChecks if a renderer exists for a propertykey: stringboolean
getCSSReturns generated CSS for a blockclientId: stringstring
getPreviewCSSReturns preview CSS for block attributesclientId: string,
blockName: string,
attributes: BlockAttributes
string
getSpectrumSetReturns spectrum set for a blockclientId: stringSpectrumSet
getPropertySpectrumSetReturns spectrum set filtered by propertyclientId: string,
property: string
SpectrumSet
getIndicatorPropertySetReturns grouped indicator properties for renderersIndicatorPropertySet