Skip to main content

DockView

A view is typically docked in the main document area of the Grok platform. See [TableView], [SketchView], etc

Extends

Constructors

new DockView()

new DockView(dart): DockView

Parameters

ParameterType
dartany

Returns

DockView

Overrides

View . constructor

Source

src/views/view.ts:668

Properties

PropertyModifierTypeDefault valueDescriptionInherited from
_functionsprotectedFunc[][]-View._functions
_nameprotectedstring'New View'-View._name
_propertiesprotectedProperty[][]-View._properties
_rootprotectedHTMLElementundefined-View._root
dartpublicanyundefined-View.dart
factorypublicnull | FuncnullConstructor function. No parameters, returns [Widget].View.factory
isDetachedpublicbooleanfalse-View.isDetached
propspublicanyundefined-View.props
subspublicSubscription[]undefined-View.subs
temppublicanyundefinedContains auxiliary informationView.temp
ALL_VIEW_TYPESreadonlystring[]...-View.ALL_VIEW_TYPES
APPSreadonly"apps"'apps'-View.APPS
BROWSEreadonly"browse"'browse'-View.BROWSE
DATABASESreadonly"databases"'databases'-View.DATABASES
DATA_CONNECTIONSreadonly"connections"'connections'-View.DATA_CONNECTIONS
DATA_JOB_RUNSreadonly"jobs"'jobs'-View.DATA_JOB_RUNS
DATA_QUERY_RUNSreadonly"queryruns"'queryruns'-View.DATA_QUERY_RUNS
DOCKERSreadonly"dockers"'dockers'-View.DOCKERS
EMAILSreadonly"emails"'emails'-View.EMAILS
FILESreadonly"files"'files'-View.FILES
FORUMreadonly"forum"'forum'-View.FORUM
FUNCTIONSreadonly"functions"'functions'-View.FUNCTIONS
GROUPSreadonly"groups"'groups'-View.GROUPS
HELPreadonly"help"'help'-View.HELP
JS_EDITORreadonly"js"'js'-View.JS_EDITOR
MODELSreadonly"models"'models'-View.MODELS
NOTEBOOKSreadonly"notebooks"'notebooks'-View.NOTEBOOKS
OPEN_TEXTreadonly"text"'text'-View.OPEN_TEXT
PACKAGESreadonly"packages"'packages'-View.PACKAGES
PACKAGE_REPOSITORIESreadonly"repositories"'repositories'-View.PACKAGE_REPOSITORIES
PROJECTSreadonly"projects"'projects'-View.PROJECTS
QUERIESreadonly"queries"'queries'-View.QUERIES
SCRIPTreadonly"script"'script'-View.SCRIPT
SCRIPTSreadonly"scripts"'scripts'-View.SCRIPTS
SETTINGSreadonly"settings"'settings'-View.SETTINGS
SKETCHreadonly"sketch"'sketch'-View.SKETCH
USERSreadonly"users"'users'-View.USERS
VIEW_LAYOUTSreadonly"layouts"'layouts'-View.VIEW_LAYOUTS
WEB_SERVICESreadonly"webservices"'webservices'-View.WEB_SERVICES
WELCOMEreadonly"welcome"'welcome'-View.WELCOME

Accessors

basePath

get basePath(): string

Deprecated

use path instead

set basePath(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/views/view.ts:126


box

get box(): boolean

set box(b): void

Parameters

ParameterType
bboolean

Returns

boolean

Source

src/views/view.ts:74


children

get children(): Widget<any>[]

Parent widget up the DOM tree, or null.

Returns

Widget<any>[]

Source

src/widgets.ts:293


closing

get closing(): boolean

Whether the view is currently closing.

set closing(c): void

Parameters

ParameterType
cboolean

Returns

boolean

Source

src/views/view.ts:144


description

get description(): string

View description. Used in UI and AI.

set description(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/views/view.ts:280


entity

get entity(): null | object

set entity(_e): void

Parameters

ParameterType
_enull | object

Returns

null | object

Source

src/views/view.ts:122


helpUrl

get helpUrl(): null | string

set helpUrl(url): void

Parameters

ParameterType
urlnull | string

Returns

null | string

View help URL.

Source

src/views/view.ts:284


id

get id(): string

Returns

string

Source

src/views/view.ts:275


isPinned

get isPinned(): boolean

Returns

boolean

Whether the view is pinned. Pinned views are not closed when a new view is opened.

Source

src/views/view.ts:288


name

get name(): string

View name. It gets shown in the tab handle.

set name(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/views/view.ts:319


parent

get parent(): null | Widget<any>

Parent widget up the DOM tree, or null.

Returns

null | Widget<any>

Source

src/widgets.ts:290


parentCall

get parentCall(): undefined | FuncCall

set parentCall(s): void

Parameters

ParameterType
sundefined | FuncCall

Returns

undefined | FuncCall

Source

src/views/view.ts:113


parentView

get parentView(): ViewBase

set parentView(s): void

Parameters

ParameterType
sViewBase

Returns

ViewBase

Source

src/views/view.ts:116


path

get path(): string

View URI, relative to the view root

set path(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/views/view.ts:171


ribbonMenu

get ribbonMenu(): Menu

View menu. Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon

set ribbonMenu(menu): void

Parameters

ParameterType
menuMenu

Returns

Menu

Source

src/views/view.ts:136


root

get root(): HTMLElement

Returns the content (visual root) of this view.

Returns

HTMLElement

Source

src/views/view.ts:267


statusBarPanels

get statusBarPanels(): HTMLDivElement[]

Status bar panels to be shown on the bottom

set statusBarPanels(panels): void

Parameters

ParameterType
panelsHTMLDivElement[]

Returns

HTMLDivElement[]

Source

src/views/view.ts:140


toolbox

get toolbox(): HTMLElement

View toolbox. Sample: https://public.datagrok.ai/js/samples/ui/views/toolbox

set toolbox(x): void

Parameters

ParameterType
xHTMLElement

Returns

HTMLElement

Source

src/views/view.ts:131


type

get type(): string

View type

Returns

string

Source

src/views/view.ts:271

Methods

_handleResize()

_handleResize(): string

Returns

string

Source

src/views/view.ts:676


_onAdded()

_onAdded(): void

Returns

void

Inherited from

View . _onAdded

Source

src/views/view.ts:332


acceptsPath()

acceptsPath(_urlPath): boolean

Checks if URL path is acceptable. Override in subclasses.

Parameters

ParameterType
_urlPathstring

Returns

boolean

"true" if path is acceptable, "false" otherwise.

Inherited from

View . acceptsPath

Source

src/views/view.ts:179


addProperty()

private addProperty(propertyName, propertyType, defaultValue, options): any

Registers an property with the specified type, name, and defaultValue.

Parameters

ParameterTypeDefault valueDescription
propertyNamestringundefined
propertyType"string" | "bigint" | "object" | "map" | "file" | "view" | "blob" | "int" | "double" | "bool" | "byte_array" | "datetime" | "qnum" | "dataframe" | "num" | "string_list" | "dataframe_list" | "cell" | "column" | "column_list" | "graphics" | "tablerowfiltercall" | "colfiltercall" | "bitset" | "dynamic" | "viewer" | "list" | "semantic_value" | "func" | "funccall" | "property" | "categorical" | "numerical" | "GridCellRenderArgs" | "element" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook"undefined
defaultValueanynull
optionsnull | object & IPropertynull

Returns

any

Inherited from

View . addProperty

See

Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization

Source

src/widgets.ts:318


append()

append(item): HTMLElement

Appends an item to this view. Use appendAll for appending multiple elements.

Parameters

ParameterTypeDescription
itemany

Returns

HTMLElement

Inherited from

View . append

Source

src/views/view.ts:184


appendAll()

appendAll(items): HTMLElement

Appends multiple elements this view. Use append for appending a single element.

Parameters

ParameterTypeDescription
itemsHTMLElement[]

Returns

HTMLElement

Inherited from

View . appendAll

Source

src/views/view.ts:191


apply()

apply(properties): Widget<any>

Parameters

ParameterTypeDescription
propertiesobject

Returns

Widget<any>

Inherited from

View . apply

Source

src/widgets.ts:257


close()

close(): void

Closes this view.

Returns

void

Inherited from

View . close

Source

src/views/view.ts:201


detach()

detach(): void

Detaches this view.

Returns

void

Inherited from

View . detach

Source

src/views/view.ts:196


getDartProperties()

getDartProperties(): any[]

Returns

any[]

Inherited from

View . getDartProperties

Source

src/widgets.ts:278


getFunctions()

getFunctions(): Func[]

Functions that are applicable to this particular widget. Used in the UI to display context actions, and for the AI integrations.

Returns

Func[]

Inherited from

View . getFunctions

Source

src/views/view.ts:264


getIcon()

getIcon(): null | HTMLElement

Returns

null | HTMLElement

View icon. Override in subclasses.

Inherited from

View . getIcon

Source

src/views/view.ts:160


getInfo()

getInfo(): ViewLayout

Saves view as a ViewInfo. Only applicable to certain views, such as TableView.

Returns

ViewLayout

Inherited from

View . getInfo

Source

src/views/view.ts:313


getProperties()

getProperties(): Property[]

Returns all properties of this widget.

Returns

Property[]

Inherited from

View . getProperties

Source

src/views/view.ts:263


getRibbonPanels()

getRibbonPanels(): HTMLElement[][]

Returns

HTMLElement[][]

Inherited from

View . getRibbonPanels

Source

src/views/view.ts:155


handlePath()

handlePath(_urlPath): void

Handles URL path. Override in subclasses.

Parameters

ParameterType
_urlPathstring

Returns

void

Inherited from

View . handlePath

Source

src/views/view.ts:175


initDock()

initDock(): string

Returns

string

Source

src/views/view.ts:672


loadLayout()

loadLayout(layout, pickupColumnTags?): void

Loads previously saved view layout. Only applicable to certain views, such as TableView. See also saveLayout

Parameters

ParameterType
layoutViewLayout
pickupColumnTags?boolean

Returns

void

Inherited from

View . loadLayout

Source

src/views/view.ts:298


loadStateMap()

loadStateMap(_stateMap): void

Loads view state map. Override in subclasses.

Parameters

ParameterType
_stateMapobject

Returns

void

Inherited from

View . loadStateMap

Source

src/views/view.ts:168


onFrameAttached()

onFrameAttached(dataFrame): void

Parameters

ParameterType
dataFrameDataFrame

Returns

void

Inherited from

View . onFrameAttached

Source

src/widgets.ts:284


onPropertyChanged()

onPropertyChanged(property): void

Gets called when viewer's property is changed.

Parameters

ParameterTypeDescription
propertynull | Propertyor null, if multiple properties were changed.

Returns

void

Inherited from

View . onPropertyChanged

Source

src/widgets.ts:276


pin()

pin(): void

Pins the view. Pinned views are not closed when a new view is opened.

Returns

void

Inherited from

View . pin

Source

src/views/view.ts:291


saveLayout()

saveLayout(options?): ViewLayout

Saves view layout as a string. Only applicable to certain views, such as TableView. See also loadLayout

Parameters

ParameterType
options?object
options.saveWithData?boolean

Returns

ViewLayout

Inherited from

View . saveLayout

Source

src/views/view.ts:306


saveStateMap()

saveStateMap(): null | object

Returns

null | object

Viewer state map. Override in subclasses.

Inherited from

View . saveStateMap

Source

src/views/view.ts:165


setIcon()

setIcon(icon): void

Parameters

ParameterType
iconHTMLElement

Returns

void

Inherited from

View . setIcon

Source

src/views/view.ts:162


setRibbonPanels()

setRibbonPanels(panels, clear): void

Sets custom view panels on the ribbon.

Parameters

ParameterTypeDefault valueDescription
panelsHTMLElement[][]undefined
clearbooleantrueClear all previous before setup Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon

Returns

void

Inherited from

View . setRibbonPanels

Source

src/views/view.ts:151


sourceRowsChanged()

sourceRowsChanged(): void

Returns

void

Inherited from

View . sourceRowsChanged

Source

src/widgets.ts:282


sub()

sub(subscription): void

Registers a subscription to an external event.

Parameters

ParameterTypeDescription
subscriptionSubscription

Returns

void

Inherited from

View . sub

Source

src/widgets.ts:250


toDart()

toDart(): any

Returns

any

Inherited from

View . toDart

Source

src/widgets.ts:242


create()

static create(options?): View

Creates a new empty view.

Parameters

ParameterTypeDescription
options?null | string | object

Returns

View

Inherited from

View . create

Source

src/views/view.ts:247


createByType()

static createByType(viewType, options?): View

Creates one of the standard views based on the view type (such as 'functions')

Parameters

ParameterType
viewTypestring
options?any

Returns

View

Inherited from

View . createByType

Source

src/views/view.ts:255


find()

static find(root): null | Widget<any>

Finds existing widget from its visual root.

Parameters

ParameterType
rootElement

Returns

null | Widget<any>

Inherited from

View . find

Source

src/widgets.ts:238


forObject()

static forObject(x): null | View

Creates a view for the specified object, if it is registered, or null otherwise.

Parameters

ParameterType
xany

Returns

null | View

Inherited from

View . forObject

Source

src/views/view.ts:233


fromDart()

static fromDart(dart): TableView | View

Parameters

ParameterType
dartany

Returns

TableView | View

Inherited from

View . fromDart

Source

src/views/view.ts:224


fromRoot()

static fromRoot(root): View

Creates and returns a view with the specified element inside.

Parameters

ParameterType
rootHTMLElement

Returns

View

Inherited from

View . fromRoot

Source

src/views/view.ts:238


fromViewAsync()

static fromViewAsync(getViewAsync, ribbon): any

Parameters

ParameterTypeDefault value
getViewAsync() => Promise <View>undefined
ribbonbooleantrue

Returns

any

Inherited from

View . fromViewAsync

Source

src/views/view.ts:259


getAll()

static getAll(): Widget<any>[]

Returns all currently active widgets.

Returns

Widget<any>[]

Inherited from

View . getAll

Source

src/widgets.ts:233