CardView
Base view for working with a collection of objects that reside on the server. Typically, results are filtered by applying AND operation between two filters: permanentFilter (which is set programmatically and is not visible) and searchValue entered by the user.
More details on the smart search syntax: https://datagrok.ai/help/datagrok/smart-search
Extends
Extended by
Constructors
new CardView()
new CardView(
dart):CardView
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Overrides
Source
Properties
| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
|---|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | View._functions | View._functions |
_name | protected | string | 'New View' | - | View._name | View._name |
_properties | protected | Property[] | [] | - | View._properties | View._properties |
_root | protected | HTMLElement | undefined | - | View._root | View._root |
dart | public | any | undefined | - | View.dart | View.dart |
factory | public | null | Func | null | Constructor function. No parameters, returns [Widget]. | View.factory | View.factory |
isDetached | public | boolean | false | - | View.isDetached | View.isDetached |
props | public | any | undefined | - | View.props | View.props |
subs | public | Subscription[] | undefined | - | View.subs | View.subs |
temp | public | any | undefined | Contains auxiliary information | View.temp | View.temp |
ALL_VIEW_TYPES | readonly | string[] | ... | - | View.ALL_VIEW_TYPES | View.ALL_VIEW_TYPES |
APPS | readonly | "apps" | 'apps' | - | View.APPS | View.APPS |
BROWSE | readonly | "browse" | 'browse' | - | View.BROWSE | View.BROWSE |
DATABASES | readonly | "databases" | 'databases' | - | View.DATABASES | View.DATABASES |
DATA_CONNECTIONS | readonly | "connections" | 'connections' | - | View.DATA_CONNECTIONS | View.DATA_CONNECTIONS |
DATA_JOB_RUNS | readonly | "jobs" | 'jobs' | - | View.DATA_JOB_RUNS | View.DATA_JOB_RUNS |
DATA_QUERY_RUNS | readonly | "queryruns" | 'queryruns' | - | View.DATA_QUERY_RUNS | View.DATA_QUERY_RUNS |
DOCKERS | readonly | "dockers" | 'dockers' | - | View.DOCKERS | View.DOCKERS |
EMAILS | readonly | "emails" | 'emails' | - | View.EMAILS | View.EMAILS |
FILES | readonly | "files" | 'files' | - | View.FILES | View.FILES |
FORUM | readonly | "forum" | 'forum' | - | View.FORUM | View.FORUM |
FUNCTIONS | readonly | "functions" | 'functions' | - | View.FUNCTIONS | View.FUNCTIONS |
GROUPS | readonly | "groups" | 'groups' | - | View.GROUPS | View.GROUPS |
HELP | readonly | "help" | 'help' | - | View.HELP | View.HELP |
JS_EDITOR | readonly | "js" | 'js' | - | View.JS_EDITOR | View.JS_EDITOR |
MODELS | readonly | "models" | 'models' | - | View.MODELS | View.MODELS |
NOTEBOOKS | readonly | "notebooks" | 'notebooks' | - | View.NOTEBOOKS | View.NOTEBOOKS |
OPEN_TEXT | readonly | "text" | 'text' | - | View.OPEN_TEXT | View.OPEN_TEXT |
PACKAGES | readonly | "packages" | 'packages' | - | View.PACKAGES | View.PACKAGES |
PACKAGE_REPOSITORIES | readonly | "repositories" | 'repositories' | - | View.PACKAGE_REPOSITORIES | View.PACKAGE_REPOSITORIES |
PROJECTS | readonly | "projects" | 'projects' | - | View.PROJECTS | View.PROJECTS |
QUERIES | readonly | "queries" | 'queries' | - | View.QUERIES | View.QUERIES |
SCRIPT | readonly | "script" | 'script' | - | View.SCRIPT | View.SCRIPT |
SCRIPTS | readonly | "scripts" | 'scripts' | - | View.SCRIPTS | View.SCRIPTS |
SETTINGS | readonly | "settings" | 'settings' | - | View.SETTINGS | View.SETTINGS |
SKETCH | readonly | "sketch" | 'sketch' | - | View.SKETCH | View.SKETCH |
USERS | readonly | "users" | 'users' | - | View.USERS | View.USERS |
VIEW_LAYOUTS | readonly | "layouts" | 'layouts' | - | View.VIEW_LAYOUTS | View.VIEW_LAYOUTS |
WEB_SERVICES | readonly | "webservices" | 'webservices' | - | View.WEB_SERVICES | View.WEB_SERVICES |
WELCOME | readonly | "welcome" | 'welcome' | - | View.WELCOME | View.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
categoryFilters
getcategoryFilters():object
Category filter properties list
setcategoryFilters(ff):void
Parameters
| Parameter | Type |
|---|---|
ff | object |
Returns
object
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
filters
getfilters():object
Text filter properties list
setfilters(ff):void
Parameters
| Parameter | Type |
|---|---|
ff | object |
Returns
object
Source
helpUrl
gethelpUrl():null|string
sethelpUrl(url):void
Parameters
| Parameter | Type |
|---|---|
url | null | string |
Returns
null | string
View help URL.
Source
hierarchy
gethierarchy():string[]
Grouping properties list
sethierarchy(s):void
Parameters
| Parameter | Type |
|---|---|
s | string[] |
Returns
string[]
Source
hierarchyProperties
gethierarchyProperties():object
All possible grouping properties list
sethierarchyProperties(s):void
Parameters
| Parameter | Type |
|---|---|
s | object |
Returns
object
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
meta
getmeta():ObjectHandler<any>
Object handler (instructions how to render, drag-and-drop, etc)
setmeta(s):void
Parameters
| Parameter | Type |
|---|---|
s | ObjectHandler<any> |
Returns
ObjectHandler<any>
Source
name
getname():string
View name. It gets shown in the tab handle.
setname(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
objectType
getobjectType():string
Semantic type of the items.
setobjectType(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
permanentFilter
getpermanentFilter():string
Programmatically defined invisible filter expression.
setpermanentFilter(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
renderMode
getrenderMode():RENDER_MODE
Render mode
setrenderMode(s):void
Parameters
| Parameter | Type |
|---|---|
s | RENDER_MODE |
Returns
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
searchFields
getsearchFields():string[]
setsearchFields(s):void
Parameters
| Parameter | Type |
|---|---|
s | string[] |
Returns
string[]
Source
searchValue
getsearchValue():string
User-specified filter expression.
setsearchValue(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
showTree
getshowTree():boolean
Grouping mode on
setshowTree(s):void
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
boolean
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
Inherited from
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[]
Inherited from
Source
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
Source
getIcon()
getIcon():
null|HTMLElement
Returns
null | HTMLElement
View icon. Override in subclasses.
Inherited from
Source
getInfo()
getInfo():
ViewLayout
Saves view as a ViewInfo. Only applicable to certain views, such as TableView.
Returns
Inherited from
Source
getProperties()
getProperties():
Property[]
Returns all properties of this widget.
Returns
Property[]
Inherited from
Source
getRibbonPanels()
getRibbonPanels():
HTMLElement[][]
Returns
HTMLElement[][]
Inherited from
Source
handlePath()
handlePath(
_urlPath):void
Handles URL path. Override in subclasses.
Parameters
| Parameter | Type |
|---|---|
_urlPath | string |
Returns
void
Inherited from
Source
loadLayout()
loadLayout(
layout,pickupColumnTags?):void
Loads previously saved view layout. Only applicable to certain views, such as TableView. See also saveLayout
Parameters
| Parameter | Type |
|---|---|
layout | ViewLayout |
pickupColumnTags? | boolean |
Returns
void
Inherited from
Source
loadStateMap()
loadStateMap(
_stateMap):void
Loads view state map. Override in subclasses.
Parameters
| Parameter | Type |
|---|---|
_stateMap | object |
Returns
void
Inherited from
Source
onFrameAttached()
onFrameAttached(
dataFrame):void
Parameters
| Parameter | Type |
|---|---|
dataFrame | DataFrame |
Returns
void
Inherited from
Source
onPropertyChanged()
onPropertyChanged(
property):void
Gets called when viewer's property is changed.
Parameters
| Parameter | Type | Description |
|---|---|---|
property | null | Property | or null, if multiple properties were changed. |
Returns
void
Inherited from
Source
pin()
pin():
void
Pins the view. Pinned views are not closed when a new view is opened.
Returns
void
Inherited from
Source
refresh()
refresh():
void
Returns
void
Source
repaint()
repaint():
void
Returns
void
Source
saveLayout()
saveLayout(
options?):ViewLayout
Saves view layout as a string. Only applicable to certain views, such as TableView. See also loadLayout
Parameters
| Parameter | Type |
|---|---|
options? | object |
options.saveWithData? | boolean |
Returns
Inherited from
Source
saveStateMap()
saveStateMap():
null|object
Returns
null | object
Viewer state map. Override in subclasses.
Inherited from
Source
setIcon()
setIcon(
icon):void
Parameters
| Parameter | Type |
|---|---|
icon | HTMLElement |
Returns
void
Inherited from
Source
setRibbonPanels()
setRibbonPanels(
panels,clear):void
Sets custom view panels on the ribbon.
Parameters
| Parameter | 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
Source
sourceRowsChanged()
sourceRowsChanged():
void
Returns
void
Inherited from
Source
sub()
sub(
subscription):void
Registers a subscription to an external event.
Parameters
| Parameter | Type | Description |
|---|---|---|
subscription | Subscription |
Returns
void
Inherited from
Source
toDart()
toDart():
any
Returns
any
Inherited from
Source
create()
staticcreate(options?):CardView
Creates a new CardView object with the specified options.
Parameters
| Parameter | Type |
|---|---|
options? | any |
Returns
Overrides
Source
createByType()
staticcreateByType(viewType,options?):View
Creates one of the standard views based on the view type (such as 'functions')
Parameters
| Parameter | Type |
|---|---|
viewType | string |
options? | any |
Returns
Inherited from
Source
find()
staticfind(root):null|Widget<any>
Finds existing widget from its visual root.
Parameters
| Parameter | Type |
|---|---|
root | Element |
Returns
null | Widget<any>
Inherited from
Source
forObject()
staticforObject(x):null|View
Creates a view for the specified object, if it is registered, or null otherwise.
Parameters
| Parameter | Type |
|---|---|
x | any |
Returns
null | View
Inherited from
Source
fromDart()
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Inherited from
Source
fromRoot()
staticfromRoot(root):View
Creates and returns a view with the specified element inside.
Parameters
| Parameter | Type |
|---|---|
root | HTMLElement |
Returns
Inherited from
Source
fromViewAsync()
staticfromViewAsync(getViewAsync,ribbon):any
Parameters
| Parameter | Type | Default value |
|---|---|---|
getViewAsync | () => Promise <View> | undefined |
ribbon | boolean | true |
Returns
any
Inherited from
Source
getAll()
staticgetAll():Widget<any>[]
Returns all currently active widgets.
Returns
Widget<any>[]