View
A view is typically docked in the main document area of the Grok platform. See [TableView], [SketchView], etc
Extends
Extended by
Constructors
new View()
new View(
dart):View
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Overrides
Constructs
View
Source
Properties
| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
|---|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | ViewBase._functions | ViewBase._functions |
_name | protected | string | 'New View' | - | ViewBase._name | ViewBase._name |
_properties | protected | Property[] | [] | - | ViewBase._properties | ViewBase._properties |
_root | protected | HTMLElement | undefined | - | ViewBase._root | ViewBase._root |
dart | public | any | undefined | - | ViewBase.dart | ViewBase.dart |
factory | public | null | Func | null | Constructor function. No parameters, returns [Widget]. | ViewBase.factory | ViewBase.factory |
isDetached | public | boolean | false | - | ViewBase.isDetached | ViewBase.isDetached |
props | public | any | undefined | - | ViewBase.props | ViewBase.props |
subs | public | Subscription[] | undefined | - | ViewBase.subs | ViewBase.subs |
temp | public | any | undefined | Contains auxiliary information | ViewBase.temp | ViewBase.temp |
ALL_VIEW_TYPES | readonly | string[] | ... | - | - | - |
APPS | readonly | "apps" | 'apps' | - | - | - |
BROWSE | readonly | "browse" | 'browse' | - | - | - |
DATABASES | readonly | "databases" | 'databases' | - | - | - |
DATA_CONNECTIONS | readonly | "connections" | 'connections' | - | - | - |
DATA_JOB_RUNS | readonly | "jobs" | 'jobs' | - | - | - |
DATA_QUERY_RUNS | readonly | "queryruns" | 'queryruns' | - | - | - |
DOCKERS | readonly | "dockers" | 'dockers' | - | - | - |
EMAILS | readonly | "emails" | 'emails' | - | - | - |
FILES | readonly | "files" | 'files' | - | - | - |
FORUM | readonly | "forum" | 'forum' | - | - | - |
FUNCTIONS | readonly | "functions" | 'functions' | - | - | - |
GROUPS | readonly | "groups" | 'groups' | - | - | - |
HELP | readonly | "help" | 'help' | - | - | - |
JS_EDITOR | readonly | "js" | 'js' | - | - | - |
MODELS | readonly | "models" | 'models' | - | - | - |
NOTEBOOKS | readonly | "notebooks" | 'notebooks' | - | - | - |
OPEN_TEXT | readonly | "text" | 'text' | - | - | - |
PACKAGES | readonly | "packages" | 'packages' | - | - | - |
PACKAGE_REPOSITORIES | readonly | "repositories" | 'repositories' | - | - | - |
PROJECTS | readonly | "projects" | 'projects' | - | - | - |
QUERIES | readonly | "queries" | 'queries' | - | - | - |
SCRIPT | readonly | "script" | 'script' | - | - | - |
SCRIPTS | readonly | "scripts" | 'scripts' | - | - | - |
SETTINGS | readonly | "settings" | 'settings' | - | - | - |
SKETCH | readonly | "sketch" | 'sketch' | - | - | - |
USERS | readonly | "users" | 'users' | - | - | - |
VIEW_LAYOUTS | readonly | "layouts" | 'layouts' | - | - | - |
WEB_SERVICES | readonly | "webservices" | 'webservices' | - | - | - |
WELCOME | readonly | "welcome" | 'welcome' | - | - | - |
Accessors
basePath
getbasePath():string
Deprecated
use path instead
setbasePath(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
box
getbox():boolean
setbox(b):void
Parameters
| Parameter | Type |
|---|---|
b | boolean |
Returns
boolean
Source
children
getchildren():Widget<any>[]
Parent widget up the DOM tree, or null.
Returns
Widget<any>[]
Source
closing
getclosing():boolean
Whether the view is currently closing.
setclosing(c):void
Parameters
| Parameter | Type |
|---|---|
c | boolean |
Returns
boolean
Source
description
getdescription():string
View description. Used in UI and AI.
setdescription(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
entity
getentity():null|object
setentity(_e):void
Parameters
| Parameter | Type |
|---|---|
_e | null | object |
Returns
null | object
Source
helpUrl
gethelpUrl():null|string
sethelpUrl(url):void
Parameters
| Parameter | Type |
|---|---|
url | null | string |
Returns
null | string
View help URL.
Source
id
getid():string
Returns
string
Source
isPinned
getisPinned():boolean
Returns
boolean
Whether the view is pinned. Pinned views are not closed when a new view is opened.
Source
name
getname():string
View name. It gets shown in the tab handle.
setname(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
parent
getparent():null|Widget<any>
Parent widget up the DOM tree, or null.
Returns
null | Widget<any>
Source
parentCall
getparentCall():undefined|FuncCall
setparentCall(s):void
Parameters
| Parameter | Type |
|---|---|
s | undefined | FuncCall |
Returns
undefined | FuncCall
Source
parentView
getparentView():ViewBase
setparentView(s):void
Parameters
| Parameter | Type |
|---|---|
s | ViewBase |
Returns
Source
path
getpath():string
View URI, relative to the view root
setpath(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
ribbonMenu
getribbonMenu():Menu
View menu. Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon
setribbonMenu(menu):void
Parameters
| Parameter | Type |
|---|---|
menu | Menu |
Returns
Source
root
getroot():HTMLElement
Returns the content (visual root) of this view.
Returns
HTMLElement
Source
statusBarPanels
getstatusBarPanels():HTMLDivElement[]
Status bar panels to be shown on the bottom
setstatusBarPanels(panels):void
Parameters
| Parameter | Type |
|---|---|
panels | HTMLDivElement[] |
Returns
HTMLDivElement[]
Source
toolbox
gettoolbox():HTMLElement
View toolbox. Sample: https://public.datagrok.ai/js/samples/ui/views/toolbox
settoolbox(x):void
Parameters
| Parameter | Type |
|---|---|
x | HTMLElement |
Returns
HTMLElement
Source
type
gettype():string
View type
Returns
string
Source
Methods
_onAdded()
_onAdded():
void
Returns
void
Source
acceptsPath()
acceptsPath(
_urlPath):boolean
Checks if URL path is acceptable. Override in subclasses.
Parameters
| Parameter | Type |
|---|---|
_urlPath | string |
Returns
boolean
"true" if path is acceptable, "false" otherwise.
Inherited from
Source
addProperty()
privateaddProperty(propertyName,propertyType,defaultValue,options):any
Registers an property with the specified type, name, and defaultValue.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
propertyName | string | undefined | |
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 | |
defaultValue | any | null | |
options | null | object & IProperty | null |
Returns
any
Inherited from
See
Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization
Source
append()
append(
item):HTMLElement
Appends an item to this view. Use appendAll for appending multiple elements.
Parameters
| Parameter | Type | Description |
|---|---|---|
item | any |
Returns
HTMLElement
Inherited from
Source
appendAll()
appendAll(
items):HTMLElement
Appends multiple elements this view. Use append for appending a single element.
Parameters
| Parameter | Type | Description |
|---|---|---|
items | HTMLElement[] |
Returns
HTMLElement
Inherited from
Source
apply()
apply(
properties):Widget<any>
Parameters
| Parameter | Type | Description |
|---|---|---|
properties | object |
Returns
Widget<any>
Inherited from
Source
close()
close():
void
Closes this view.
Returns
void
Inherited from
Source
detach()
detach():
void
Detaches this view.
Returns
void
Inherited from
Source
getDartProperties()
getDartProperties():
any[]
Returns
any[]