Skip to content

Releases: williamtroup/JsonTree.js

JsonTree.js v2.5.0 - Translations! Lambda support! Complete value clicking support! UI improvements and fixes!

09 Aug 10:22
9f51456
Compare
Choose a tag to compare

New Features:

  • Added lambda display support.
  • Added value-clicking support for Objects and Arrays!
  • Added translation support! A new folder called "translations" under "dist" has been added, with support for the following languages:
    1. af Afrikaans
    2. ar Arabic
    3. hy Armenian
    4. be Belarusian
    5. bn Bengali
    6. bg Bulgarian
    7. ca Catalan
    8. zh Chinese (simplified)
    9. da Danish
    10. nl Dutch
    11. en English (default)
    12. eo Esperanto
    13. et Estonian
    14. fa Farsi
    15. fi Finnish
    16. fr French
    17. fy Frisian
    18. gl Galician
    19. ka Georgian
    20. de German
    21. el Greek
    22. he Hebrew
    23. hi Hindi
    24. hu Hungarian
    25. is Icelandic
    26. id Indonesian
    27. ga Irish
    28. it Italian
    29. ja Japanese
    30. ko Korean
    31. lv Latvian
    32. lt Lithuanian
    33. lb Luxembourgish
    34. ms Malay
    35. ne Nepali
    36. no Norwegian
    37. pl Polish
    38. pt Portuguese
    39. ro Romanian
    40. si Sinhalese
    41. sk Slovak
    42. sl Slovenian
    43. es Spanish
    44. sv Swedish
    45. tl Tagalog
    46. ta Tamil
    47. zh-tw Taiwanese
    48. te Telugu
    49. th Thai
    50. tr Turkish
    51. uk Ukrainian

Configuration Options:

  • Added a new option called "text.functionText", which states the default text to show for a function (if using a lambda, defaults to "function").

UI Improvements:

  • Added a transition that is used for the contents when switching pages.
  • When "showValueColors" is set to false, the same font weights, and styles, are still applied to the titles and values.
  • When "showValueColors" is set to false, if a value click event is set, the hover effect for the values is now shown.

JsonTree.js v2.4.0 - Undefined type support! Themes! Opening/Closing brace/bracket support, with UI and code improvements!

07 Aug 21:22
da13843
Compare
Choose a tag to compare

New Features:

  • Added undefined type support (shown instead of null, or unknown)!
  • Added two themes, the default, and a new light theme, under the "dist/themes".

Binding Options:

  • Added a new binding option called "showOpeningClosingCurlyBraces" (defaults to false), which states if opening/closing curly braces should be shown.
  • Added a new binding option called "showOpeningClosingSquaredBrackets" (defaults to false), which states if opening/closing curly brackets should be shown.
  • Added {ff} (milliseconds padded) and {f} (milliseconds) support for the "dateTimeFormat" binding option.

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onCopyJsonReplacer", which fires an event and gets the result that should be used for values when copying the JSON to the clipboard.

General Improvements:

  • Increased the font weight of the navigation buttons in the title bar (so they stand out more).
  • Minor refactoring of function names.
  • Huge improvements to the HTML testing files.
  • Updated the project to the latest NPM packages.

JsonTree.js v2.3.0 - BigInt and Symbol type support! More parsing options! UI improvements and fixes!

06 Aug 10:39
520cd0b
Compare
Choose a tag to compare

New Features:

  • Added custom tooltip support!
  • Added bigint type support!
  • Added symbol type support!
  • Added ignore empty objects support!
  • Added more parsing options!

Binding Options:

  • Added a new binding option called "tooltip.delay" (defaults to 750), which states how long to wait before showing a tooltip (in milliseconds).
  • Added a new binding option called "ignore.bigIntValues" (defaults to false), which states if bigint values should be ignored.
  • Added a new binding option called "ignore.symbolValues" (defaults to false), which states if symbol values should be ignored.
  • Added a new binding option called "ignore.emptyObjects" (defaults to true), which states if empty objects should be ignored.
  • Added a new binding option called "showArrayIndexBrackets" (defaults to true), which states if the array index brackets should be shown.
  • Moved to "parseStringsToDates" to "parse.stringsToDates".
  • Added a new binding option called "parse.stringsToBooleans" (defaults to false), which states if string values should be parsed to boolean values (if valid).
  • Added a new binding option called "parse.stringsToNumbers" (defaults to false), which states if string values should be parsed to number values (if valid).

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onBigIntRender", which fires an event when a bigint value is rendered (allow element render overrides).
  • Added a new binding option custom trigger called "onSymbolRender", which fires an event when a symbol value is rendered (allow element render overrides).

General Improvements:

  • Massively improved the sorting of object property names (now uses a collator to sort them correctly).
  • Added a new export enum called "DataType", which states all of the type names that will be returned when clicking a value.
  • Null values can now be clicked (if an event is available).
  • The "There is currently no JSON to view." text is now shown in a different color.
  • The "Copy" button will now ensure that functions, and other types, are included (they are converted to strings).

Fixes:

  • Fixed a fault that caused the wrong tooltips to be assigned to the title bar buttons.

JsonTree.js v2.2.0 - Drag & Drop support! String to Date parsing! More ways to manage JSON, more events, and UI improvements!

04 Aug 19:13
40cc3f2
Compare
Choose a tag to compare

New Features:

  • Added JSON file-dropping support! Simply drag and drop your JSON file onto the main display and watch it render!
  • Added string to Date() parsing!

Binding Options:

  • Added a new binding option called "fileDroppingEnabled" (defaults to true), which states if JSON files can be dropped onto the main display and shown.
  • Added a new binding option called "parseStringsToDates" (defaults to false), which states if string values should be parsed to Date() objects (if valid).
  • Added a new binding option called "copyIndentSpaces" (defaults to 2), which states the total spaces that should be used for the indentation when the JSON is copied.

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onBackPage", which fires an event when moving back a page (when showing arrays as pages).
  • Added a new binding option custom trigger called "onNextPage", which fires an event when moving forward a page (when showing arrays as pages).
  • Added a new binding option custom trigger called "onSetJson", which fires an event when the JSON data is changed.

Configuration Options:

  • Added a new option called "text.noJsonToViewText", which states the text to show when no JSON is available to view (defaults to "There is currently no JSON to view.").

Public API Functions:

  • Added a new public function called "setJSON()", which will set the display using the JSON object/string you pass.
  • Added a new public function called "getJSON()", which will return the JSON that is currently being displayed.

UI Improvements:

  • The contents (everything under the title bar) are now in their own container.
  • Added scrolling support for large content data.
  • The buttons in the title bar will no longer wrap to the next line when a smaller screen is used.

General Improvements:

  • Added configuration settings to force types to be declared.
  • Added missing type declarations.
  • Updated the project to the latest NPM packages.

JsonTree.js v2.1.0 - Array paging support! Image buttons! UI improvements, code improvements, and fixes!

19 Jul 12:45
fc52a8c
Compare
Choose a tag to compare

New Features:

  • Added data array paging (with new Back/Next buttons in the title bar), which will allow you to show base data array items on separate pages.
  • The title bar buttons now use symbols instead of text (to free up space), and use tooltips that use existing configuration settings.

Binding Options:

  • The binding option "title.showCopyButton" now defaults to true.
  • Added a new binding option called "showArrayItemsAsSeparateObjects" (defaults to false), which states if base data array items should be shown on separate pages.
  • Added a new binding option called "copyOnlyCurrentPage" (defaults to false), which states if the current page of JSON should be copied, instead of everything (when "showArrayItemsAsSeparateObjects" is true).

Configuration Options:

  • BREAKING: All text-based configuration options are now under a new section called "text".
  • Added a new option called "text.closeAllButtonSymbolText", which states the symbol text to use for the "Open All" button (defaults to "↓").
  • Added a new option called "text.openAllButtonSymbolText", which states the symbol text to use for the "Close All" button (defaults to "↑").
  • Added a new option called "text.copyAllButtonSymbolText", which states the symbol text to use for the "Copy All" button (defaults to "❐").
  • Added a new option called "text.backButtonText", which states the symbol text to use for the "Back" button (defaults to "Back").
  • Added a new option called "text.nextButtonText", which states the symbol text to use for the "Next" button (defaults to "Next").
  • Added a new option called "text.backButtonSymbolText", which states the symbol text to use for the "Back" button (defaults to "←").
  • Added a new option called "text.nextButtonSymbolText", which states the symbol text to use for the "Next" button (defaults to "→").

General Improvements:

  • Fixed the nuspec file causing very large NuGet packages to be created.
  • Fixed missing return types for private functions.
  • Massive code reorganization (.ts files moved into separate folders).
  • NPM package updates.
  • Moved all string concatenations to use string templates.
  • When "Copy All" is pressed, the JSON copied to the clipboard is now in a friendly format.
  • Array value indexes are now shown inside [] characters (helps to show it's an index).

Fixes:

  • Fixed an issue that caused the buttons in the display to use the wrong font.

JsonTree.js v2.0.0 - Rewritten in TypeScript, allowing greater React, Angular, and other library support!

09 Jul 16:48
83829bf
Compare
Choose a tag to compare

Language Shift:

  • The entire project has been rewritten in TypeScript, allowing all components to be exported, which allows better support for libraries such as React, Angular, etc.
  • The TypeScript code is compiled to ES2016 instead of ES5 (older browsers, such as IE, are no longer supported).

Building:

  • You can now run separate builds to produce CJS, ESM, and Minimized project versions.
  • All files not required for the NPM packages have now been excluded.

Testing:

  • Removed the "src" and "dist" folders under "test". Only the dist versions remain, removing duplication.
  • Added "BUILD_INSTRUCTIONS.md" to help first-time users set up their dev environments.

JsonTree.js v1.1.2 - CDN support!

25 Jun 22:02
c5902d1
Compare
Choose a tag to compare
  • Added CDN link support, and updated documentation.

JsonTree.js v1.1.1 - Third party library support (via export)

17 Jun 16:38
f58c13b
Compare
Choose a tag to compare
  • Added export support for the global "$jsontree" object, which can now be imported as "jsontree.js".

JsonTree.js v1.1.0 - Ignore value support! Hex color support! Minor improvements!

15 Jun 16:52
e9872be
Compare
Choose a tag to compare

New Features:

  • Added ignore all value types support!

Binding Options:

  • BREAKING: All binding ignore options are now available under a new area called "ignore".
  • Added a new binding option called "ignore.booleanValues" (defaults to false), which states if boolean values should be ignored.
  • Added a new binding option called "ignore.decimalValues" (defaults to false), which states if decimal values should be ignored.
  • Added a new binding option called "ignore.numberValues" (defaults to false), which states if number values should be ignored.
  • Added a new binding option called "ignore.stringValues" (defaults to false), which states if string values should be ignored.
  • Added a new binding option called "ignore.dateValues" (defaults to false), which states if date values should be ignored.
  • Added a new binding option called "ignore.objectValues" (defaults to false), which states if object values should be ignored.
  • Added a new binding option called "ignore.arrayValues" (defaults to false), which states if array values should be ignored.
  • Added a new binding option called "showStringHexColors" (defaults to false), which states if HEX color only string values should show the color in the display.

Binding Options - Custom Triggers:

  • The custom trigger "onValueClick" has a new parameter called "type", which states the value type that was clicked ("string", "boolean", etc).
  • The custom trigger "onValueClick" is no longer assigned to null values.

JsonTree.js v1.0.0 - New configuration and binding options! New formatting! Restructing!

13 Jun 15:11
34a70a4
Compare
Choose a tag to compare

New Features:

  • Added full date and time rendering support! This can be adjusted for the display using the binding option "dateTimeFormat".

Binding Options:

  • BREAKING: Renamed the binding attribute "data-jsontree-options" to "data-jsontree-js".
  • BREAKING: All binding option events are now available under a new area called "events".
  • BREAKING: All title bar binding options are now available under a new area called "title" (with renames).
  • The binding option "dateTimeFormat" now defaults to "{dd}{o} {mmmm} {yyyy} {hh}:{MM}:{ss}" and now supports "{mmmm}", "{mmm}", "{dddd}", and "{ddd}" (see documentation).
  • Added a new binding option called "maximumStringLength" (defaults to 0, state will use the full string), which states the maximum size a string can be in the display.

Configuration Options:

  • Added new configuration option "stText" (defaults to "st"), which states the day ordinal for the first day.
  • Added new configuration option "ndText" (defaults to "nd"), which states the day ordinal for the second day.
  • Added new configuration option "rdText" (defaults to "rd"), which states the day ordinal for the third day.
  • Added new configuration option "thText" (defaults to "th"), which states the day ordinal for the other days.
  • Added new configuration option "dayNames" (defaults to all day names starting from Monday), which states all the full-day names.
  • Added new configuration option "dayNamesAbbreviated" (defaults to all day names starting from Mon), which states all the abbreviated day names.
  • Added new configuration option "monthNames" (defaults to all month names starting from January), which states all the full month names.
  • Added new configuration option "monthNamesAbbreviated" (defaults to all month names starting from Jan), which states all the abbreviated month names.
  • Added new configuration option "ellipsisText" (defaults to "..."), which states the ellipsis text to use for areas that are too long.

Fixes & Improvements:

  • All text translations now allow empty text to be passed (which will prevent them from defaulting to the English version).