Skip to content

Releases: discoveryjs/discovery

1.0.0-beta.71 Embed API and reworked actions

20 Mar 15:28
Compare
Choose a tag to compare
  • 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 for upload extension to specify custom settings
  • Added #.actions.uploadFile.dragdrop to indicate drag&drop file supported or not (provided by upload extension)
  • Added startLoadData, startSetData and unloadData events
  • Added callAction(name, ...args, callback?) and actionHandler(name, ...args, callback?) jora helpers, the callback 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 from Publisher
  • Replaced 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)
  • 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

10 Oct 20:51
Compare
Choose a tag to compare
  • Added new options for usage sections: demoData, highlight and highlightProps
  • 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 to struct's context
    • Added tooltip option
    • Removed title option

1.0.0-beta.69

29 Sep 17:18
Compare
Choose a tag to compare
  • 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

1.0.0-beta.68

05 Sep 20:17
Compare
Choose a tag to compare
  • Fixed copy to clipboard in FireFox

1.0.0-beta.67

08 Aug 23:10
Compare
Choose a tag to compare
  • Added type: module to package.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 in loadDataFromUrl() method, this parameter might be passed via options
  • Added option loadDataOptions in preloader's config to pass it as options to load data methods
  • Changed Widget constructor from Widget(container, defaultPage, options) to Widget(options), container and defaultPage values can be specified via options as options.container and options.defaultPage respectively
  • Changed App constructor from App(container, options) to App(options), container value can be specified via options as options.container
  • Changed App's default value for container option to document.body
  • styles option of Widget & App:
    • Added "inline" and "external" as aliases for "style" and "link" respectively
    • Added support for media attribute for inline styles in styles option of Widget & App, e.g.
      new App({
          styles: [
              { type: 'style', content: '...', media: 'all and (max-width: 1000px)' }
          ]
      })

1.0.0-beta.66

14 Jul 12:20
Compare
Choose a tag to compare
  • Added text-numeric view
  • Added alert-primary view
  • Added destroy() method to Popup view
  • Added external data option for badge views
  • Added version to library exports
  • Added Discovery.js credits into nav popup
  • Allowed className in view{ 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 and noedit 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 and maxCompactPropertyLength options
    • Fixed a crush on open actions popup view when a value has too much nested structure
  • Changes in table view:
    • Added scalarAsStruct and colSpan config options to table-cell
    • Added cols and isScalar() to the table-row's context
    • Changed rendering of scalar values using struct view
    • Changed rendering of null value as null 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)
  • 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

18 Apr 18:40
Compare
Choose a tag to compare
  • 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, return undefined instead
  • Fixed hanging up when a pattern matches zero-length substring (i.e. in input view with type regexp)
  • 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

15 Feb 14:46
Compare
Choose a tag to compare
  • 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 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() 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 to prepare 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 and C badges in sidebar when data or context of the view is different with a parent view
    • Fixed unnecessary sidebar scrolling on view selection
  • Changed a behaviour when a preset is not found, for now just render nothing instead of warning badge
  • Removed mode from context and a modelfree specific logic (with a single exception for special in routing, will be removed in next releases)

1.0.0-beta.63

07 Feb 08:29
Compare
Choose a tag to compare
  • 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, use App#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 via options.upload
    • Turns on automatically when options.upload is truthy for App
    • Options supported for options.upload:
      • accept ("application/json,.json" when ommited) – specify accept attribute for file selection inputs
      • dragdrop (true when ommited) – enable "drop file to load data" feature
  • Added Widget#actions (available as #.actions in jora queries) dictionary for special actions:
    • startInspect and stopInspect when inspector is applied
    • uploadFile and unloadData when upload 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
  • Tweaked styles for nested list views
  • Added thousandth delimiter for default rendering of a number in table view cell

1.0.0-beta.62

14 Oct 14:11
Compare
Choose a tag to compare
  • Fixed code highlighting in source view
  • Added alias jora for discovery-query syntax (used in source and markdown)
  • Added anchor support for headers and anchor option to enable it
  • Added anchor support for headers in markdown view and anchors option to disable it
  • Changed hstack to use flexbox for layout
  • Added image view
  • Changed image-preview to behave as image but with chess background
  • Added lineNum option to the source view
  • Fixed position highlighting in query editor on lexical error