@discoveryjs/discovery
Advanced tools
Changelog
1.0.0-beta.43 (20-10-2020)
Widget#pathToQuery(path)
methodtoggle
and toggle-group
viewschildren
option ignorance in itemConfig
when limitLines
is used for tree
viewhref
option to work for button
viewsignature
detailsWidget#nav.menu
item renderingChangelog
1.0.0-beta.42 (08-10-2020)
lookupObjectMarker(value, type?)
and lookupObjectMarkerAll(value)
methods to prepare handlerWidget#queryFn(query)
methodWidget#queryToConfig(query)
method (uses internally for extracting config from a string)view
, when
, data
, whenData
, className
and postRender
) aren't passing to a view's render now=
, e.g. { view: 'list', limit: '= size() > 13 ? 10 : false' }
will show entire list if its size <= 13, otherwise show by chunks of 10 items"list{ limit: size() > 13 ? 10 : false, item: 'auto-link' }"
will be converted into { view: 'list', limit: '=size() > 13 ? 10 : false', item: 'auto-link' }
Symbol()
stringifying in struct
viewtable
view rendering crash on column order detectiondata
and content
in configChangelog
1.0.0-beta.41 (06-10-2020)
Content-Encoding
and X-File-Size
headersh3
, h4
and h5
viewsChangelog
1.0.0-beta.40 (04-10-2020)
table
viewChangelog
1.0.0-beta.39 (02-10-2020)
prismjs@^1.21.0
1.0.0-beta.3
#views-showcase
)Widget#nav
APIWidget#addBadge()
method (use Widget#nav
API instead)Widget#setPageRef()
methodpostRender()
method in view config, which is useful for final decoration{ "": true }
) in #.params
when page's route has no paramsalert
.view-alert
classblock
<h2>
by legacy reasonsbutton
href
and external
values in data
, which ignores when button is disabled or onClick
is specifiedonClick
when button is disabledonclick
class to element when onClick
handler is appliedheader
.view-header
classmenu-item
href
and external
values in data
, which ignores when item is disabled or onClick
is specified<a>
as a view root elementonclick
class to element when onClick
handler is appliedselect
beforeItems
and afterItems
options to specify content before/after itemslimit
option to limit items count on first renderminItemsFilter
option to specify minimal items count (excluding reset item) required to apply filter input (default 10
)signature
[index]
instead of pick(index)
source
discovery-view
and discovery-query
struct
table
tabs
tabs
config option to take a querytab.content
overriding by tabConfig.content
(tab.content
wins as intended now)tab
value
and text
from data to configdisabled
config optiononclick
class to element when onClick
handler is appliedChangelog
1.0.0-beta.38 (19-05-2020)
Changelog
1.0.0-beta.37 (18-05-2020)
prepare
handler to take extension API as a second parameter. For now API contains following methods:
addValueAnnotation()
to define a value annotation used mostly in struct
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
and parent
(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 for title
attributeicon
- url, dataURI or class name with icon-
prefixhref
- annotation is a linkexternal
- when annotation is a link, open in new window when truedefineObjectMarker(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. in auto-link
addQueryHelpers()
method the same as Widget#addQueryHelpers()
marker(type?)
– returns any marker associated with a value, when type
is specified only this type of marker may be returnedmarkerAll()
– returns all markers associated with a valueWidget#addEntityResolver()
method, use defineObjectMarker()
insteadWidget#addValueLinkResolver()
method, use defineObjectMarker()
with page
option insteadWidget#addQueryHelpers()
method, use addQueryHelpers()
insteadresolveLink
option for page.define()
, use page
option in defineObjectMarker()
insteadChangelog
1.0.0-beta.36 (17-05-2020)
table
view when column query is emptyChangelog
1.0.0-beta.35 (14-05-2020)