Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
*
Array.<Object>
Object
Array.<string>
string
TextEditor
SplitPane
Popover
Popup
EntityTree
EntityTreeButton
MultiSelect
MultiSelect
EntityRefSelect
Promise
Promise
Array.<Object>
Array.<Object>
Object
| null
Object
| null
Object
Object
| null
Array.<Object>
Object
| null
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.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
Array.<function()>
*
Array.<Object>
Object
Array.<string>
string
TextEditor
SplitPane
Popover
Popup
EntityTree
EntityTreeButton
MultiSelect
MultiSelect
EntityRefSelect
Promise
Promise
Array.<Object>
Array.<Object>
Object
| null
Object
| null
Object
Object
| null
Array.<Object>
Object
| null
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 run template preview process starts.
Kind: instance property of Studio
Array.<function()>
Array of functions invoked in sequence when a report preview is render. It should return an object describing the styles to apply to the Frame preview of the report
Kind: instance property of Studio
Array.<function()>
Array of functions invoked in sequence when new entity is about to be added.
Kind: instance property of Studio
Array.<function()>
Array of async functions invoked in sequence when editor entity save 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 jade,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
Array.<function()>
Array of functions used to resolve drop into entity tree
Kind: instance property of Studio
Array.<function()>
Array of functions used to resolve entity editor component editor, function accepts entity and returns string represent the component editor key
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 |
Override the default entity remove behavior (id) => {})
Kind: instance property of Studio
Param | Type |
---|---|
fn | function |
*
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' }
Kind: instance property of Studio
Object
Object[name] with registered extensions and its options
Kind: instance property of Studio
Array.<string>
Array of registeresd engines
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
Popup
Component used to show content in a popup
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
MultiSelect
Component used for multi-select options
Kind: instance property of Studio
MultiSelect
Component used for file upload
Kind: instance property of Studio
EntityRefSelect
Component used to select entity refs
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 | |
---|---|---|
entityTreeWrapperComponent | ReactComponent \ |
function |
Add React component which will be displayed in toolbar of entity tree
Kind: instance method of Studio
Param | Type | |
---|---|---|
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 |
right |
right, groupRight or container |
Add a fn to resolve items for the context menu at Entity Tree
Kind: instance method of Studio
Param | Type |
---|---|
fn | function |
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 |
|
reformat | function |
function handling reformatting code |
Add component used in the left Properties section
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 |
Add component used in the MainPreview section
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
type | String |
name of the new type of content that is going to display in MainPreview |
component | ReactComponent |
the component that is responsible of rendering the new type of content |
opts | Object |
options related to the presence of elements in the MainPreview title bar (tabs, actions, defaultActiveTab) |
Add component displayed at the startup page top
Kind: instance method of Studio
Param | Type | |
---|---|---|
startupComponent | ReactComponent \ |
function |
Set additional custom header to all api calls
Kind: instance method of Studio
Param | Type |
---|---|
key | String |
value | String |
Render new content/data inside the MainPreview of studio
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
params | Object |
metadata about the preview |
Updates the content/data inside the MainPreview of studio
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
id | String |
Preview id of the content to update |
params | Object |
new metadata about the preview to update |
Cleans the content inside the MainPreview of studio
Kind: instance method of Studio
Opens modal dialog.
Kind: instance method of Studio
Param | Type | Description | |
---|---|---|---|
componentOrText | ReactComponent \ |
String |
|
options | Object |
passed as props to the react component |
Invokes run template preview process, when no template is passed it is invoked for the last active template
Kind: instance method of Studio
Collapse entity in EntityTree
Kind: instance method of Studio
Collapse left pane
Kind: instance method of Studio
Collapse preview 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' })
Open tab for a new entity
Kind: instance method of Studio
Param | Type |
---|---|
tab | Object |
Example
// open entity editor
Studio.openTab({ entitySet, entity, name })
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
Emits an error that shows the message in a modal
Kind: instance method of Studio
Param | Type | Description |
---|---|---|
e | Error |
|
ignoreModal | Boolean |
defaults to false |
Synchronize the location with history
Kind: instance method of Studio
Clear the current state and reload internally studio
Kind: instance method of Studio
Array.<Object>
Get the current theme (it will check localstorage for user preference and fallback to the default theme configured)
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 _id
Kind: instance method of Studio
Param | Type | Default |
---|---|---|
_id | String |
|
shouldThrow | Boolean |
true |
Object
| null
Searches for the entity in the UI state based on specified 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
Object
| null
If exists get a text editor instance of an opened text editor by name
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
Assemble entity absolute path
Kind: instance method of Studio
Param | Type |
---|---|
entity | * |