Releases: discoveryjs/discovery
Releases · discoveryjs/discovery
1.0.0-beta.71 Embed API and reworked actions
- Added
embed
extension to provide a communication with a host in case when an app is loaded into iframe - Added
embed
support for preloader - Added
dist/discovery-embed-host.js
into package, a ESM module which provides an API to communicate with an app loaded into a sandbox (iframe) - Added
setup()
method forupload
extension to specify custom settings - Added
#.actions.uploadFile.dragdrop
to indicate drag&drop file supported or not (provided byupload
extension) - Added
startLoadData
,startSetData
andunloadData
events - Added
callAction(name, ...args, callback?)
andactionHandler(name, ...args, callback?)
jora helpers, thecallback
is applying to handle a result of an action call when specified - Changed
tooltip
to use evaluated value instead of raw config value - Changed
Progressbar
to be inherited fromPublisher
- Replaced
Widget#actions
withWidget#action
which is a dictionary, i.e. now availableWidget#action.define(name, callback)
,Widget#action.revoke(name)
,Widget#action.call(name, ...args)
and the rest methods ofDict
(actions also available via#.actions
in jora queries) - Fixed
markerAll()
jora helper - Fixed
upload
options setting - Fixed applying twice the extensions passed via
App
's options - Fixed suggestions for context value (
#
) in report's query editor - Tweaked nested list styles in
markdown
view - Removed obsoleted methods:
Widget#addEntityResolver()
Widget#addValueLinkResolver()
Widget#addBadge()
Widget#addQueryHelpers()
1.0.0-beta.70
- Added new options for usage sections:
demoData
,highlight
andhighlightProps
- Improved the view inspector to display entire data flow transitions
- Changes for annotations in
struct
:- Accept strings and functions in
annotations
option (beside{ query: ... }
notation) - Changed
debug
option to take a string value which will be used in debug messages - Added
#.context
for annotation's queries to have an access tostruct
's context - Added
tooltip
option - Removed
title
option
- Accept strings and functions in
1.0.0-beta.69
- Implemented
tooltip
as a view wide option - Changes in
source
view:- Added
maxSourceSizeToHighlight
option - Added
tooltip
option for refs, e.g.source:{ refs: [{ range: [1, 4], tooltip: "struct" }] }
- Tweaked styles for refs
- Removed
error
option - Removed
disabled
option
- Added
1.0.0-beta.68
- Fixed copy to clipboard in FireFox
1.0.0-beta.67
- Added
type: module
topackage.json
- Fixed suggestions in query editor when a pattern contains upper case letters
- Uniformed number delimeter insertion in all places, added a HTML escaping and fixed pattern matching
- Fixed testing a string is URL in
struct
view to accept dashes in a domain name - Fixed an unnecessary caught exception on the lib loading
- Added
darkmode
attribute on a preloader container when dark mode is used - Removed
dataField
parameter inloadDataFromUrl()
method, this parameter might be passed viaoptions
- Added option
loadDataOptions
in preloader's config to pass it asoptions
to load data methods - Changed
Widget
constructor fromWidget(container, defaultPage, options)
toWidget(options)
,container
anddefaultPage
values can be specified viaoptions
asoptions.container
andoptions.defaultPage
respectively - Changed
App
constructor fromApp(container, options)
toApp(options)
,container
value can be specified viaoptions
asoptions.container
- Changed
App
's default value forcontainer
option todocument.body
styles
option ofWidget
&App
:- Added
"inline"
and"external"
as aliases for"style"
and"link"
respectively - Added support for
media
attribute for inline styles instyles
option ofWidget
&App
, e.g.new App({ styles: [ { type: 'style', content: '...', media: 'all and (max-width: 1000px)' } ] })
- Added
1.0.0-beta.66
- Added
text-numeric
view - Added
alert-primary
view - Added
destroy()
method to Popup view - Added
external
data option forbadge
views - Added
version
to library exports - Added Discovery.js credits into nav popup
- Allowed
className
inview{ config }
notation - Changed
className
in view config to take a string starting with=
as a query, e.g.{ view: 'block', className: '=query' }
- Eliminated unnecessary query execution and view rendering on a report page when changing non-affecting page params. As a side effect page params
query
,view
,title
,dzen
andnoedit
are not available for the main query and views anymore - Changes in
struct
view:- Added a view as table for array and object values
- Added a thousandth delimiter for all numeric indicators
- Added
allowedExcessStringLength
,maxStringLength
,maxCompactStringLength
andmaxCompactPropertyLength
options - Fixed a crush on open actions popup view when a value has too much nested structure
- Changes in
table
view:- Added
scalarAsStruct
andcolSpan
config options totable-cell
- Added
cols
andisScalar()
to thetable-row
's context - Changed rendering of scalar values using
struct
view - Changed rendering of
null
value asnull
string instead of an empty cell - Fixed rendering of arrays when object values mixed with scalar values
- Fixed collapsing a row height when all cells are empty
- Hide a more buttons row when no buttons (gave a few extra pixels in the bottom of a table)
- Added
- Uniformed a monospace font family across all views
- Fixed suggestions in query editor to suggest values with the same quotes as a pattern string
- Fixed highlighting issues in
source
view - Bumped jora to 1.0.0-beta.7
1.0.0-beta.65
- Fixed "copy text to clipboard" feature to use a fallback in case of
clipboard-write
permission is not granted (#90) - Reduced init time of
Widget
by lazy init for the report page views, i.e. init views only when the report page is opened for the first time - Tweaked
source
view styles - Fixed badge views styles to change a color on hover only when
href
attribute is set - Fixed exception when
lookup()
method of object marker is called with an unknown type, returnundefined
instead - Fixed hanging up when a pattern matches zero-length substring (i.e. in
input
view with typeregexp
) - Fixed edge cases in displaying an error location in query editor
- Bumped jora to 1.0.0-beta.6
- Improved performance of variants generation for suggestions popup up to 30-40 times
- Changed suggestions behaviour in query editor to be less intrusive
- Changed style for suggestions popup, use icons for value types instead of captions
- Fixed report page header editing to not re-render a report on input
1.0.0-beta.64
- Fixed loading stage order
- Improved accuracy for loading timings log
- Fixed loading progressbar appearance delay, i.e. no more visible progressbar when data instantly loaded
- Fixed setting of
data
oncontext
when a prepare handler returns a new value, before changescontext.data
contained a reference to an original (loaded) value, for nowWidget#context.data
is always equal toWidget#data
after aloadData()
call - Fixed action buttons on data load error page
- Added
preset/upload
- Added a way to customise error message rendering on data load: if an error has a
renderContent
property its value is using as a config for rendering instead of default "red box" - Added
rejectData(message, renderContent)
method toprepare
handler API, for a rejecting data due to a bad format or other reasons - View inspector:
- Displayed data changes in case a
config.data
is used - Added
D
andC
badges in sidebar whendata
orcontext
of the view is different with a parent view - Fixed unnecessary sidebar scrolling on view selection
- Displayed data changes in case a
- Changed a behaviour when a preset is not found, for now just render nothing instead of warning badge
- Removed
mode
from context and amodelfree
specific logic (with a single exception for special in routing, will be removed in next releases)
1.0.0-beta.63
- Bumped dependencies to latest versions (fixes security issues)
- Fixed
popup
view to auto hide when trigger elements are removing from a document - Fixed progress bar state update on data loading after a discovery instance init
- Removed
App.modelfreeLoadData()
method, useApp#loadDataFromEvent()
or#.actions.upload
instead - Added
Widget#unloadData()
method to reset loaded data and context if any - Added
#.dataLoaded
property to indicate is data loaded or not - Generalized approach to upload data:
- API exposed as an extension which can be imported as
import { upload } from '@discoveryjs/discovery'
and configured viaoptions.upload
- Turns on automatically when
options.upload
is truthy forApp
- Options supported for
options.upload
:accept
("application/json,.json"
when ommited) – specify accept attribute for file selection inputsdragdrop
(true
when ommited) – enable "drop file to load data" feature
- API exposed as an extension which can be imported as
- Added
Widget#actions
(available as#.actions
in jora queries) dictionary for special actions:startInspect
andstopInspect
when inspector is applieduploadFile
andunloadData
whenupload
extension is applied
markdown
view:- Added support for simple text interpolation using
{{ query }}
syntax - Added support for array of strings as
source
value - Fixed table cell styling
- Tweaked styles for list and checkbox
- Added support for simple text interpolation using
- Tweaked styles for nested list views
- Added thousandth delimiter for default rendering of a number in
table
view cell
1.0.0-beta.62
- Fixed code highlighting in
source
view - Added alias
jora
fordiscovery-query
syntax (used insource
andmarkdown
) - Added anchor support for headers and
anchor
option to enable it - Added anchor support for headers in
markdown
view andanchors
option to disable it - Changed
hstack
to use flexbox for layout - Added
image
view - Changed
image-preview
to behave asimage
but with chess background - Added
lineNum
option to thesource
view - Fixed position highlighting in query editor on lexical error