Releases: discoveryjs/discovery
Releases · discoveryjs/discovery
1.0.0-beta.42
- Exposed
lookupObjectMarker(value, type?)
andlookupObjectMarkerAll(value)
methods to prepare handler - Added
Widget#queryFn(query)
method - Added
Widget#queryToConfig(query)
method (uses internally for extracting config from a string) - Isolated view defined props and pass it to view's render. That means that special properties (
view
,when
,data
,whenData
,className
andpostRender
) aren't passing to a view's render now - Added queryable values in view's config. A queryable value is a string that starts with
=
, e.g.{ view: 'list', limit: '= size() > 13 ? 10 : false' }
will show entire list if its size <= 13, otherwise show by chunks of 10 items - Added in-string configuration for views, e.g.
"list{ limit: size() > 13 ? 10 : false, item: 'auto-link' }"
will be converted into{ view: 'list', limit: '=size() > 13 ? 10 : false', item: 'auto-link' }
- Made header on report page sticky positioned
- Fixed view rendering breaking on data query processing
- Fixed
Symbol()
stringifying instruct
view - Fixed overlapping a selection by view name spotlighting in view editor
- Fixed report scroll jumping on typing in an editor due to change in rendered content height
- Fixed
table
view rendering crash on column order detection - Fixed auto-sorting for a table view column with both
data
andcontent
in config
1.0.0-beta.41
- Reworked data loading progress bar to respect
Content-Encoding
andX-File-Size
headers - Fixed styles for
h3
,h4
andh5
views
1.0.0-beta.40
- Fixed regression of non-expandable cells with implicit details (i.e. for objects) in
table
view
1.0.0-beta.39 Views showcase!
- Fixed patching for
prismjs@^1.21.0
- Bumped jora to
1.0.0-beta.3
- Introduced view's showcase page (
#views-showcase
) - Core
- Improved error handling in data prepare handler
- Display data loading progress
- Reworked navigation panel and introduced
Widget#nav
API - Removed
Widget#addBadge()
method (useWidget#nav
API instead) - Added
Widget#setPageRef()
method - Added optional
postRender()
method in view config, which is useful for final decoration - Fixed empty entry (i.e.
{ "": true }
) in#.params
when page's route has no params
- Report page
- Improved syntax highlighting in editors
- Added known view highlighting in view editor
- Fixed loss of functions, regexps and dates on view source formatting on report page
- Improved available views presentation
- Changes in views:
alert
- Changed variations to have
.view-alert
class - Fixed CSS styles
- Changed variations to have
block
- Removed missed styles, it affected
<h2>
by legacy reasons
- Removed missed styles, it affected
button
- Added support for
href
andexternal
values indata
, which ignores when button is disabled oronClick
is specified - Don't apply
onClick
when button is disabled - Add
onclick
class to element whenonClick
handler is applied - Preserve style of hover state while triggered popup is showing
- Fixed styles to preserve a consistent size across variations
- Added support for
header
- Changed variations to have
.view-header
class - Fixed CSS styles
- Changed variations to have
menu-item
- Added support for
href
andexternal
values indata
, which ignores when item is disabled oronClick
is specified - Changed to use
<a>
as a view root element - Add
onclick
class to element whenonClick
handler is applied - Preserve style of hover state while triggered popup is showing
- Added support for
select
- Added
beforeItems
andafterItems
options to specify content before/after items - Added
limit
option to limit items count on first render - Added
minItemsFilter
option to specify minimal items count (excluding reset item) required to apply filter input (default10
) - Changed popup content layout and styles
- Added
signature
- Changed location path in details popup to use
[index]
instead ofpick(index)
- Changed location path in details popup to use
source
- Added highlighting for
discovery-view
anddiscovery-query
- Added highlighting for
struct
- Improved estimated JSON size computation in action popup
- Added "Copy path" to action popup
table
- Added auto detection for column sorting state, i.e. determine an order of values in a column and mark column coresponding to the order if any
- Make column non-sortable when all its values are equal, since sorting have no effect
- Used natural sorting approach for generated sorting functions
- Inverted icons for sorting direction
tabs
- Changed
tabs
config option to take a query - Fixed
tab.content
overriding bytabConfig.content
(tab.content
wins as intended now) - Apply tabs configuration to tab's config instead of data
- Changed
tab
- Moved
value
andtext
from data to config - Added
disabled
config option - Add
onclick
class to element whenonClick
handler is applied
- Moved
1.0.0-beta.38
- Fixed switching to "Processing..." label on data is loaded and decoded instead of TTFB time
1.0.0-beta.37
- Extended
prepare
handler to take extension API as a second parameter. For now API contains following methods:addValueAnnotation()
to define a value annotation used mostly instruct
view. The first argument should be a handler: a function or a string query. Handler takes a value and context, which contains properties:host
(an object or an array that includes a value),key
,index
andparent
(a reference to parent context). The handler should return falsy value (when no annotation needed) or an object with following fields (all fields are optional):place
–'after'
(by default) or'before'
, where to place annotation before or after a valuestyle
–'default'
(by default),'none'
(no any visual styles for annotation block) or'badge'
(uses for object markers)className
- additional CSS classes that should be added to annotation blocktext
– annotation texttitle
– value fortitle
attributeicon
- url, dataURI or class name withicon-
prefixhref
- annotation is a linkexternal
- when annotation is a link, open in new window when true
defineObjectMarker(name, options)
to define an object marker, which returns a function to wrap objects, i.e.object.forEach(defineObjectMarker('foo', { /* options */ }))
. Options (all are optional):refs
– a list of string (a field name) or function (getter), which values should refer to an object beside direct reference to object. Uses for unique object values, e.g.id
lookupRefs
- a list of string (a field name) or function (getter), that uses to retrieve additional values to identify original objectpage
- a string, marker should be a link to specified pageref
- a string (a field name) or a function (getter), a value that uses in link to page to identify objecttitle
- astring (a field name) or a function (getter), a text that represent an object, e.g. inauto-link
addQueryHelpers()
method the same asWidget#addQueryHelpers()
- Added a set of default methods:
marker(type?)
– returns any marker associated with a value, whentype
is specified only this type of marker may be returnedmarkerAll()
– returns all markers associated with a value
- Removed
Widget#addEntityResolver()
method, usedefineObjectMarker()
instead - Removed
Widget#addValueLinkResolver()
method, usedefineObjectMarker()
withpage
option instead - Removed
Widget#addQueryHelpers()
method, useaddQueryHelpers()
instead - Removed
resolveLink
option forpage.define()
, usepage
option indefineObjectMarker()
instead
1.0.0-beta.36
- Bumped deps: [email protected]
- Fixed exception in
table
view when column query is empty
1.0.0-beta.35
Bumped deps: [email protected], [email protected]
1.0.0-beta.34
- Bumped jora version to
1.0.0-beta.1
- Improved error handling in query editor
- Fixed ignoring explicit column sorting in
table
view when value is falsy
1.0.0-beta.33
- Fixed
table
's cell content rendering when col config is a string - Changed default sorting order to
desc
intable
view - Improved
table
auto-sorting detection