@discoveryjs/discovery
Advanced tools
Changelog
1.0.0-beta.73 (05-04-2023)
loadDataFromStream()
and loadDataFromFile()
methods when no options
parameter is specified#.actions
availability for an App's overlay renderingChangelog
1.0.0-beta.72 (05-04-2023)
<a>
tags) work without router extension enabled. Use ignore-href
class on an anchor to prevent navigation by href
attribute if neededpermalink
action to generate current state of an app (absolute page URL by default), it can be overridden by embedding hostWidget#setPageHash()
to make leading #
optional, i.e. Widget#setPageHash('#report')
and Widget#setPageHash('report')
give the same result nowApp#loadData
with App#uploadData(source, extractResourceMetadata)
method, which takes source instead of a function returning a sourcesetRouterPreventLocationUpdate()
method for preloader and app to prevent location updates (and browser's history as well) on internal navigationsetPageHash()
method for preloader embed APIWidget#datasets
and #.datasets
to store loaded datasets (data itself and its meta data as an object). Current APIs assume to work with a single dataset (data), so this list contains zero or one element for now. However, future version will allow to load and work with multiple datasets (still need to think about the details)dataset
option in Widget#setData()
method options to provide dataset's attributes, which is optional and a dataset object will has data
field only if the option is not providedstart(resource)
method to loadFromPush()
APIoptions
) if provided (see release notes for details)loadDataOptions
into all the loading methods as options
Widget#setDataProgress(data, context, progressbar)
signature into setDataProgress(data, context, options)
, where options
is an object { dataset?, progressbar? }
#.name
and #.createdAt
, use #.datasets[].resource | { name, createdAt }
insteaddata
from Windget#context
, however, data
is still available in a render context as data
of default dataset, i.e. #.data
which the same as #.datasets[].data
Widget#dataLoaded
and #.dataLoaded
flags, use Widget#hasDatasets()
method or #.datasets
in jora queriesloadDataFromUrl()
method:
getContentSize
option to not take url
parameter anymoregetContentSize
handler to prefer X-File-Size
header over Content-Length
headergetContentCreatedAt
option to specify a function to retrieve createdAt
from a fetch's response (by default, retrieve a value from the X-File-Created-At
header if present, or Last-Modified
header otherwise)getContentEncodedSize
optionapplication/json
content typedataField
optionWidget#lib
Changelog
1.0.0-beta.71 (20-03-2023)
embed
extension to provide a communication with a host in case when an app is loaded into iframeembed
support for to pass loadDataOptions
into all the loading methods as options
dist/discovery-embed-host.js
into package, a ESM module which provides an API to communicate with an app loaded into a sandbox (iframe)setup()
method for upload
extension to specify custom settings#.actions.uploadFile.dragdrop
to indicate drag&drop file supported or not (provided by upload
extension)startLoadData
, startSetData
and unloadData
eventscallAction(name, ...args, callback?)
and actionHandler(name, ...args, callback?)
jora helpers, the callback
is applying to handle a result of an action call when specifiedtooltip
to use evaluated value instead of raw config valueProgressbar
to be inherited from Publisher
Widget#actions
with Widget#action
which is a dictionary, i.e. now available Widget#action.define(name, callback)
, Widget#action.revoke(name)
, Widget#action.call(name, ...args)
and the rest methods of Dict
(actions also available via #.actions
in jora queries)markerAll()
jora helperupload
options settingApp
's options#
) in report's query editormarkdown
viewWidget#addEntityResolver()
Widget#addValueLinkResolver()
Widget#addBadge()
Widget#addQueryHelpers()
Changelog
1.0.0-beta.70 (10-10-2022)
demoData
, highlight
and highlightProps
struct
:
annotations
option (beside { query: ... }
notation)debug
option to take a string value which will be used in debug messages#.context
for annotation's queries to have an access to struct
's contexttooltip
optiontitle
optionChangelog
1.0.0-beta.69 (29-09-2022)
tooltip
as a view wide optionsource
view
maxSourceSizeToHighlight
optiontooltip
option for refs, e.g. source:{ refs: [{ range: [1, 4], tooltip: "struct" }] }
error
optiondisabled
optionChangelog
1.0.0-beta.68 (05-09-2022)
Changelog
1.0.0-beta.67 (09-08-2022)
type: module
to package.json
struct
view to accept dashes in a domain namedarkmode
attribute on a preloader container when dark mode is useddataField
parameter in loadDataFromUrl()
method, this parameter might be passed via options
loadDataOptions
in preloader's config to pass it as options
to load data methodsWidget
constructor from Widget(container, defaultPage, options)
to Widget(options)
, container
and defaultPage
values can be specified via options
as options.container
and options.defaultPage
respectivelyApp
constructor from App(container, options)
to App(options)
, container
value can be specified via options
as options.container
App
's default value for container
option to document.body
styles
option of Widget
& App
:
"inline"
and "external"
as aliases for "style"
and "link"
respectivelymedia
attribute for inline styles in styles
option of Widget
& App
, e.g.
new App({
styles: [
{ type: 'style', content: '...', media: 'all and (max-width: 1000px)' }
]
})
Changelog
1.0.0-beta.66 (14-07-2022)
text-numeric
viewalert-primary
viewdestroy()
method to Popup viewexternal
data option for badge
viewsversion
to library exportsclassName
in view{ config }
notationclassName
in view config to take a string starting with =
as a query, e.g. { view: 'block', className: '=query' }
query
, view
, title
, dzen
and noedit
are not available for the main query and views anymorestruct
view:
allowedExcessStringLength
, maxStringLength
, maxCompactStringLength
and maxCompactPropertyLength
optionstable
view:
scalarAsStruct
and colSpan
config options to table-cell
cols
and isScalar()
to the table-row
's contextstruct
viewnull
value as null
string instead of an empty cellsource
viewChangelog
1.0.0-beta.65 (18-04-2022)
clipboard-write
permission is not granted (#90)Widget
by lazy init for the report page views, i.e. init views only when the report page is opened for the first timesource
view styleshref
attribute is setlookup()
method of object marker is called with an unknown type, return undefined
insteadinput
view with type regexp
)Changelog
1.0.0-beta.64 (15-02-2022)
data
on context
when a prepare handler returns a new value, before changes context.data
contained a reference to an original (loaded) value, for now Widget#context.data
is always equal to Widget#data
after a loadData()
callpreset/upload
renderContent
property its value is using as a config for rendering instead of default "red box"rejectData(message, renderContent)
method to prepare
handler API, for a rejecting data due to a bad format or other reasonsconfig.data
is usedD
and C
badges in sidebar when data
or context
of the view is different with a parent viewmode
from context and a modelfree
specific logic (with a single exception for special in routing, will be removed in next releases)