Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
*
Array.<Object>
Object
string
TextEditor
SplitPane
Popover
EntityTree
EntityTreeButton
Promise
Promise
Array.<Object>
Object
| null
Object
Object
| null
Array.<Object>
Array.<Object>
String
String
Main facade and API for extensions. Exposed as global variable Studio. It can be also imported from jsreport-studio when using extensions default webpack configuration
Kind: global class
Access: public
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
*
Array.<Object>
Object
string
TextEditor
SplitPane
Popover
EntityTree
EntityTreeButton
Promise
Promise
Array.<Object>
Object
| null
Object
Object
| null
Array.<Object>
Array.<Object>
String
String
Array.<function()>
Array of async functions invoked in sequence during initialization
Kind: instance property of Studio
Array.<function()>
Array of async functions invoked in sequence after the app has been rendered
Kind: instance property of Studio
Array.<function()>
Array of async functions invoked in sequence when preview process starts.
Kind: instance property of Studio
Array.<function()>
Array of functions used to resolve ace editor mode for template content. This is used by custom templating engines to add highlighting support for pug, ejs...
Kind: instance property of Studio
Array.<function()>
Array of functions used to resolve entity icon in entity tree, function accepts entity and returns string like fa-cog
Kind: instance property of Studio
Array.<function()>
Array of functions used to resolve filtering in entity tree, function accepts entity, entitySets and filter info, should return boolean to determine if item should be skipped or not
Kind: instance property of Studio
Sets the function returning the browser url path (defaultCalculatedPath, currentEntity) => String
Kind: instance property of Studio
Param | Type |
---|---|
fn | function |
Set the function retunring the visibility flag for particular toolbar button ('Save All') => return true
Kind: instance property of Studio
Param | Type |
---|---|
fn | function |
Override the default entities references loading with custom function (entitySet) => Promise([array])
Kind: instance property of Studio
Param | Type |
---|---|
fn | function |
Optionally you can avoid displaying default startup page
Kind: instance property of Studio
Param | Type |
---|---|
trueOrFalse | Boolean |
*
Provides methods get,patch,post,del for accessing jsreport server
Kind: instance property of Studio
Example
await Studio.api.patch('/odata/tasks', { data: { foo: '1' } })
Array.<Object>
Get registered entity sets, each one is object { visibleName: 'foo', nameAttribute: 'name' }
Kind: instance property of Studio
Object
Object[name] with registered extensions and its options
Kind: instance property of Studio
string
absolute root url to the server, like http://localhost/reporting
Kind: instance property of Studio
TextEditor
Ace editor React wrapper
Kind: instance property of Studio
Example
export default class DataEditor extends TextEditor { ... }
SplitPane
Component used to split content with sliders
Kind: instance property of Studio
Popover
Component used to show content in a popover
Kind: instance property of Studio
EntityTree
Component used to visualise entities
Kind: instance property of Studio
EntityTreeButton
Component used to add actions in EntityTree toolbar
Kind: instance property of Studio
Add new entity set, which will be automatically loaded through OData and displayed in the entity tree
Kind: instance method of Studio
Param | Type |
---|---|
entitySet | Object |
Example
Studio.addEntitySet({ name: 'data', visibleName: 'sample data' })
Add React component which will be displayed in toolbar
Kind: instance method of Studio
Param | Type | Default | Description |
---|---|---|---|
toolbarComponent | ReactComponent | function |
||
position | String |
left |
left, right, settings or settingsBottom |
Add React component which will be displayed as a wrapper/container for entity tree
Kind: instance method of Studio
Param | Type | Default | Description |
---|---|---|---|
entityTreeWrapperComponent | ReactComponent | function |
Add React component which will be displayed in toolbar of entity tree
Kind: instance method of Studio
Param | Type | Default | Description |
---|---|---|---|
entityTreeToolbarComponent | ReactComponent | function |
Add React component which will be displayed when rendering an item of entity tree
Kind: instance method of Studio
Param | Type | Default | Description |
---|---|---|---|
entityTreeItemComponent | ReactComponent | function |
||
position | String |
left |
right, groupRight or container |
Add React component which will be used as tab title
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
key | String |
used in openTab |
component | ReactComponent | function |
Add component used in tab as content editor
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
key | String |
key used in openTab({ editorComponentKey: ... , use entity set name if the editor should represent the main entity editor |
component | ReactComponent | function |
Add component used in the left Properties secion
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
string | function | String |
or title function used to render the section title |
component | ReactComponent | function |
|
shouldDisplay | function |
Set additional custom header to all api calls
Kind: instance method of Studio
Param | Type |
---|---|
key | String |
value | String |
Merges in the object defining the api which is used in api fialog
Kind: instance method of Studio
Param | Type |
---|---|
obj | Object |
Override the right preview pane with additional content setPreviewFrameSrc('data:text/html;charset=utf-8,foooooooo')
Kind: instance method of Studio
Param | Type |
---|---|
frameSrc | String |
Opens modal dialog.
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
componentOrText | ReacrComponent | String |
|
options | Object |
passed as props to the react component |
Invoke preview process for last active template
Kind: instance method of Studio
Collapse left pane
Kind: instance method of Studio
Open and activate new editor tab
Kind: instance method of Studio
Param | Type |
---|---|
tab | Object |
Example
//open entity editor
Studio.openTab({ _id: 'myentityid' })
//open custom page
Studio.openTab({ key: 'StartupPage', editorComponentKey: 'startup', title: 'Statup' })
Promise
Loads entity, which reference is already present in the ui state, from the remote API
Kind: instance method of Studio
Param | Type | Default |
---|---|---|
id | String |
|
force | Boolean |
false |
Remove the additional entity properties from the state, keep just meta and id
Kind: instance method of Studio
Param | Type |
---|---|
id | String |
Add entity to the state
Kind: instance method of Studio
Param | Type |
---|---|
entity | Object |
Update entity in the state
Kind: instance method of Studio
Param | Type |
---|---|
entity | Object |
Promise
Call remote API and persist (insert or update) entity
Kind: instance method of Studio
Param | Type |
---|---|
id | String |
Adds already existing (persisted) entity into the UI state
Kind: instance method of Studio
Param |
---|
entity |
Replace the existing entity in the state
Kind: instance method of Studio
Param | Type |
---|---|
oldId | String |
entity | Object |
Remove entity from the state
Kind: instance method of Studio
Param | Type |
---|---|
id | String |
Show ui signalization for running background operation
Kind: instance method of Studio
Hide ui signalization for running background operation
Kind: instance method of Studio
Synchronize the location with history
Kind: instance method of Studio
Array.<Object>
Get all settings from state
Kind: instance method of Studio
Save one setting in state and persist it on the server
Kind: instance method of Studio
Param | Type |
---|---|
key | String |
value | Object |
Get one setting value from the state
Kind: instance method of Studio
Param | Type | Default |
---|---|---|
key | String |
|
shouldThrow | Boolean |
true |
Object
| null
Searches for the entity in the UI state based on specified the shortid
Kind: instance method of Studio
Param | Type | Default |
---|---|---|
shortid | String |
|
shouldThrow | Boolean |
true |
Object
Returns the currently selected entity or null
Kind: instance method of Studio
Object
| null
Returns last active entity
Kind: instance method of Studio
Array.<Object>
Get all entities including meta attributes in array
Kind: instance method of Studio
Array.<Object>
Get references to entities
Kind: instance method of Studio
String
Get the path in absolute form like /api/images and make it working also for jsreport running on subpath like myserver.com/reporting/api/images
Kind: instance method of Studio
Param | Type |
---|---|
path | String |
String
This method is deprecated, use .resolveUrl
Get the path in absolute form like /api/images and make it working also for jsreport running on subpath like myserver.com/reporting/api/images
Kind: instance method of Studio
Param | Type |
---|---|
path | String |