Class: View
dg.View
A view is typically docked in the main document area of the Grok platform. See [TableView], [SketchView], etc
Hierarchy
↳
View
↳↳
TableView
↳↳
ScriptView
↳↳
DockView
↳↳
BrowseView
↳↳
CardView
Constructors
constructor
• new View(dart
)
Constructs
View
Parameters
Name | Type |
---|---|
dart | any |
Overrides
Defined in
Properties
_name
• Protected
_name: string
= 'New View'
Inherited from
Defined in
_root
• Protected
_root: HTMLElement
Inherited from
Defined in
dart
• dart: any
Inherited from
Defined in
subs
• subs: Subscription
[]
Inherited from
Defined in
temp
• temp: any
Contains auxiliary information
Defined in
ALL_VIEW_TYPES
▪ Static
Readonly
ALL_VIEW_TYPES: string
[]
Defined in
APPS
▪ Static
Readonly
APPS: "apps"
Defined in
DATABASES
▪ Static
Readonly
DATABASES: "databases"
Defined in
DATA_CONNECTIONS
▪ Static
Readonly
DATA_CONNECTIONS: "connections"
Defined in
DATA_JOB_RUNS
▪ Static
Readonly
DATA_JOB_RUNS: "jobs"
Defined in
DATA_QUERY_RUNS
▪ Static
Readonly
DATA_QUERY_RUNS: "queryruns"
Defined in
EMAILS
▪ Static
Readonly
EMAILS: "emails"
Defined in
FILES
▪ Static
Readonly
FILES: "files"
Defined in
FORUM
▪ Static
Readonly
FORUM: "forum"
Defined in
FUNCTIONS
▪ Static
Readonly
FUNCTIONS: "functions"
Defined in
GROUPS
▪ Static
Readonly
GROUPS: "groups"
Defined in
HELP
▪ Static
Readonly
HELP: "help"
Defined in
JS_EDITOR
▪ Static
Readonly
JS_EDITOR: "js"
Defined in
MODELS
▪ Static
Readonly
MODELS: "models"
Defined in
NOTEBOOKS
▪ Static
Readonly
NOTEBOOKS: "notebooks"
Defined in
OPEN_TEXT
▪ Static
Readonly
OPEN_TEXT: "text"
Defined in
PACKAGES
▪ Static
Readonly
PACKAGES: "packages"
Defined in
PACKAGE_REPOSITORIES
▪ Static
Readonly
PACKAGE_REPOSITORIES: "repositories"
Defined in
PROJECTS
▪ Static
Readonly
PROJECTS: "projects"
Defined in
QUERIES
▪ Static
Readonly
QUERIES: "queries"
Defined in
SCRIPT
▪ Static
Readonly
SCRIPT: "script"
Defined in
SCRIPTS
▪ Static
Readonly
SCRIPTS: "scripts"
Defined in
SETTINGS
▪ Static
Readonly
SETTINGS: "settings"
Defined in
SKETCH
▪ Static
Readonly
SKETCH: "sketch"
Defined in
USERS
▪ Static
Readonly
USERS: "users"
Defined in
VIEW_LAYOUTS
▪ Static
Readonly
VIEW_LAYOUTS: "layouts"
Defined in
WEB_SERVICES
▪ Static
Readonly
WEB_SERVICES: "webservices"
Defined in
WELCOME
▪ Static
Readonly
WELCOME: "welcome"
Defined in
Accessors
basePath
• get
basePath(): string
View type URI. Note that path is specific to the instance of the view.
Returns
string
Inherited from
ViewBase.basePath
Defined in
• set
basePath(s
): void
Parameters
Name | Type |
---|---|
s | string |
Returns
void
Inherited from
ViewBase.basePath
Defined in
box
• get
box(): boolean
Returns
boolean
Inherited from
ViewBase.box
Defined in
• set
box(b
): void
Parameters
Name | Type |
---|---|
b | boolean |
Returns
void
Inherited from
ViewBase.box
Defined in
closing
• get
closing(): boolean
Whether the view is currently closing.
Returns
boolean
Inherited from
ViewBase.closing
Defined in
• set
closing(c
): void
Parameters
Name | Type |
---|---|
c | boolean |
Returns
void
Inherited from
ViewBase.closing
Defined in
description
• get
description(): string
Returns
string
Overrides
ViewBase.description
Defined in
• set
description(s
): void
Parameters
Name | Type |
---|---|
s | string |
Returns
void
Overrides
ViewBase.description
Defined in
entity
• get
entity(): null
| object
Returns
null
| object
Inherited from
ViewBase.entity
Defined in
• set
entity(e
): void
Parameters
Name | Type |
---|---|
e | null | object |
Returns
void
Inherited from
ViewBase.entity
Defined in
helpUrl
• get
helpUrl(): null
| string
Returns
null
| string
View help URL.
Overrides
ViewBase.helpUrl
Defined in
• set
helpUrl(url
): void
Parameters
Name | Type |
---|---|
url | null | string |
Returns
void
Overrides
ViewBase.helpUrl
Defined in
id
• get
id(): string
Returns
string
Defined in
name
• get
name(): string
View name. It gets shown in the tab handle.
Returns
string
Overrides
ViewBase.name
Defined in
• set
name(s
): void
Parameters
Name | Type |
---|---|
s | string |
Returns
void
Overrides
ViewBase.name
Defined in
parentCall
• get
parentCall(): undefined
| FuncCall
Returns
undefined
| FuncCall
Inherited from
ViewBase.parentCall
Defined in
• set
parentCall(s
): void
Parameters
Name | Type |
---|---|
s | undefined | FuncCall |
Returns
void
Inherited from
ViewBase.parentCall
Defined in
parentView
• get
parentView(): ViewBase
Returns
Inherited from
ViewBase.parentView
Defined in
• set
parentView(s
): void
Parameters
Name | Type |
---|---|
s | ViewBase |
Returns
void
Inherited from
ViewBase.parentView
Defined in
path
• get
path(): string
View URI, relative to the platform root. See also basePath
Returns
string
Inherited from
ViewBase.path
Defined in
• set
path(s
): void
Parameters
Name | Type |
---|---|
s | string |
Returns
void
Inherited from
ViewBase.path
Defined in
ribbonMenu
• get
ribbonMenu(): Menu
View menu. Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon
Returns
Inherited from
ViewBase.ribbonMenu
Defined in
• set
ribbonMenu(menu
): void
Parameters
Name | Type |
---|---|
menu | Menu |
Returns
void
Inherited from
ViewBase.ribbonMenu
Defined in
root
• get
root(): HTMLElement
Returns
HTMLElement
Overrides
ViewBase.root
Defined in
statusBarPanels
• get
statusBarPanels(): HTMLDivElement
[]
Status bar panels to be shown on the bottom
Returns
HTMLDivElement
[]
Inherited from
ViewBase.statusBarPanels
Defined in
• set
statusBarPanels(panels
): void
Parameters
Name | Type |
---|---|
panels | HTMLDivElement [] |
Returns
void
Inherited from
ViewBase.statusBarPanels
Defined in
toolbox
• get
toolbox(): HTMLElement
View toolbox. Sample: https://public.datagrok.ai/js/samples/ui/views/toolbox
Returns
HTMLElement
Inherited from
ViewBase.toolbox
Defined in
• set
toolbox(x
): void
Parameters
Name | Type |
---|---|
x | HTMLElement |
Returns
void
Inherited from
ViewBase.toolbox
Defined in
type
• get
type(): string
View type
Returns
string
Overrides
ViewBase.type
Defined in
Methods
_onAdded
▸ _onAdded(): void
Returns
void
Defined in
acceptsPath
▸ acceptsPath(path
): boolean
Checks if URL path is acceptable.
Parameters
Name | Type | Description |
---|---|---|
path | string | URL path. |
Returns
boolean
"true" if path is acceptable, "false" otherwise.
Inherited from
Defined in
append
▸ append(item
): HTMLElement
Appends an item to this view. Use appendAll for appending multiple elements.
Parameters
Name | Type |
---|---|
item | any |
Returns
HTMLElement
Inherited from
Defined in
appendAll
▸ appendAll(items
): HTMLElement
Appends multiple elements this view. Use append for appending a single element.
Parameters
Name | Type |
---|---|
items | HTMLElement [] |
Returns
HTMLElement
Inherited from
Defined in
close
▸ close(): void
Closes this view.
Returns
void
Inherited from
Defined in
detach
▸ detach(): void
Detaches this view.
Returns
void
Inherited from
Defined in
getIcon
▸ getIcon(): null
| HTMLElement
Returns
null
| HTMLElement
View icon.
Inherited from
Defined in
getInfo
▸ getInfo(): ViewLayout
Saves view as a ViewInfo. Only applicable to certain views, such as TableView.
Returns
Defined in
getRibbonPanels
▸ getRibbonPanels(): HTMLElement
[][]
Returns
HTMLElement
[][]
Inherited from
Defined in
handlePath
▸ handlePath(path
): void
Handles URL path.
Parameters
Name | Type | Description |
---|---|---|
path | string | URL path. |
Returns
void
Inherited from
Defined in
loadLayout
▸ loadLayout(layout
, pickupColumnTags?
): void
Loads previously saved view layout. Only applicable to certain views, such as TableView. See also saveLayout
Parameters
Name | Type |
---|---|
layout | ViewLayout |
pickupColumnTags? | boolean |
Returns
void
Defined in
loadStateMap
▸ loadStateMap(stateMap
): void
Load view state map.
Parameters
Name | Type | Description |
---|---|---|
stateMap | object | State map. |
Returns
void
Inherited from
Defined in
saveLayout
▸ saveLayout(): ViewLayout
Saves view layout as a string. Only applicable to certain views, such as TableView. See also loadLayout
Returns
Defined in
saveStateMap
▸ saveStateMap(): null
| object
Returns
null
| object
Viewer state map.
Inherited from
Defined in
setRibbonPanels
▸ setRibbonPanels(panels
, clear?
): void
Sets custom view panels on the ribbon.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
panels | HTMLElement [][] | undefined | |
clear | boolean | true | Clear all previous before setup Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon |
Returns
void
Inherited from
Defined in
create
▸ Static
create(options?
): View
Creates a new empty view.
Parameters
Name | Type |
---|---|
options? | null | string | {} |
Returns
Defined in
createByType
▸ Static
createByType(viewType
, options?
): View
Creates one of the standard views based on the view type (such as 'functions')
Parameters
Name | Type |
---|---|
viewType | string |
options? | any |
Returns
Defined in
forObject
▸ Static
forObject(x
): null
| View
Creates a view for the specified object, if it is registered, or null otherwise.
Parameters
Name | Type |
---|---|
x | any |
Returns
null
| View
Defined in
fromDart
▸ Static
fromDart(dart
): View
| TableView
Parameters
Name | Type |
---|---|
dart | any |
Returns
Defined in
fromRoot
▸ Static
fromRoot(root
): View
Parameters
Name | Type |
---|---|
root | HTMLElement |