Skip to content

Releases: williamtroup/JsonTree.js

JsonTree.js v4.1.0 - Line numbers! Side-by-side comparisons! Context menus for values! Item selections! Lots of fixes!

07 Oct 20:14
4f6e3ae
Compare
Choose a tag to compare

New Features:

  • Added item selection support!
  • Added context menu support for all values, which will allow you to quickly Edit and Copy (values only), and Remove items (or copy multiple items).
  • Added support to remove array items when editing them (clearing the value, then pressing enter).
  • Added support to convert HTML objects to JSON when the Copy, Copy All, or the Export button is pressed.
  • Added line numbers support (one by default), with additional options!
  • Added property name comparison support (in paging mode with columns enabled)!
  • Added support to show just primitive types in the display (they are added to a new object so they can be viewed).

Binding Options:

  • BREAKING: Renamed the binding option "includeTimeZoneInDateTimeEditing" to "includeTimeZoneInDates";
  • Added a new binding option called "parse.stringsToSymbols" (defaults to false), which states if string values should be parsed to symbol values (if valid).
  • Added a new binding option category called "lineNumbers".
  • Added a new binding option called "lineNumbers.enabled" (defaults to true), which states if line numbers should be shown.
  • Added a new binding option called "lineNumbers.padNumbers" (defaults to false), which states if line numbers should be padded.
  • Added a new binding option called "lineNumbers.addDots" (defaults to true), which states if line numbers should show a dot after the number.
  • Added a new binding option called "showClosedArraySquaredBrackets" (defaults to true), which states if the closed squared symbols ([ ... ] text) should be shown.
  • Added a new binding option called "showClosedObjectCurlyBraces" (defaults to true), which states if the closed curly braces ({ ... } text) should be shown.
  • Added a new binding option called "paging.allowComparisons" (defaults to false), which states if side-by-side property name comparisons can be shown in the display.
  • Added a new binding option called "convertClickedValuesToString" (defaults to false), which states if the values click (when an event is assigned) should be converted to strings.

Improvements:

  • Updated the NPM packages to the latest versions.
  • Added a new CSS variable called "--json-tree-js-spacing-title-bar", which states the spacing to use for the title bars and panels (and containing buttons).
  • Clicking on the "[ ... ]" or "{ ... }" closed symbols text will now open the object/array/set/map/html.
  • The Binding Options and Configuration Options are now loaded using less memory (less overwrites).
  • Renamed the CSS classes "span.type-color" and "span.type" to "span.data-type-color" and "span.data-type".
  • The binding option "includeTimeZoneInDates" setting is now used when bulk editing, or copying JSON values!
  • Undefined Values are now treated as nulls when exporting, copying, or bulk editing.
  • If any binding option under "allowEditing" is set to false, then "allowEditing.bulk" is set to false as an override (so that manual overriding editing cannot be done).
  • Renamed all shorthand variable names so they are easier to read in code reviews.

Fixes:

  • Fixed some strange spacing issues around the title bar/panel buttons.
  • Fixed some missing semi-colons in the SASS.
  • Fixed some missing semi-colons in the TypeScript.
  • Fixed a fault that caused the binding option "showOpeningClosingSquaredBrackets" to be ignored.
  • Fixed a fault that caused the data type label to be shown next to the "There are no properties to view." text.
  • Fixed some missing data types, and incorrect variable types.
  • Fixed a fault that caused the array paging system to fail when showing data obtained from a URL source.

JsonTree.js v4.0.0 - Side-by-side paging columns! Footer! Control buttons! More types! Tons of fixes!

30 Sep 16:20
223d5f2
Compare
Choose a tag to compare

New Features:

  • Added paging column support! This will allow you to view multiple array pages on one page, with column reordering reordering support!
  • Added HTML type support (shown as an object, and can be viewed as a parent/array item)!
  • Added Lambda type support (this still shows as a function, but the type is now different, allowing additional filtering)!
  • Enter support in bulk editing! This will allow new entries to be added (you must use CTRL/CMD + Enter instead to confirm the changes)!
  • Added a footer bar! This will show the current page information, value sizes (in B, KB, MB, etc) and additional information (only shown in full-screen mode).
  • Added support to delete array pages (when enabled) via bulk editing!
  • Added a new contents control panel! This sits in the top-right, and allows quick access to moving, removing, bulk editing, etc.
  • Added new public functions that will allow the binding options for instances to be updated!
  • RegExp, Symbol, and Image values can now be edited!
  • Added support to filter only on data types available, along with showing the total count of each kind on the display.
  • Added Vietnamese language translation support.

Binding Options:

  • BREAKING: Renamed the binding option "showCounts" to "showObjectSizes".
  • BREAKING: Renamed the binding option "showTypes" to "showDataTypes".
  • BREAKING: Renamed the binding option "title.showTreeControls" to "title.showCloseOpenAllButtons".
  • BREAKING: Removed the binding option "copyOnlyCurrentPage".
  • Added a new binding option category called "paging".
  • Added a new binding option called "paging.enabled" (defaults to false), which states if paging is enabled (replaces "showArrayItemsAsSeparateObjects").
  • Added a new binding option called "paging.columnsPerPage" (defaults to 1, maximum of 6), which states how page columns (array items) to show for each page.
  • Added a new binding option called "paging.startPage" (defaults to 1), which states which page to start on when array paging is enabled.
  • Added a new binding option called "paging.synchronizeScrolling" (defaults to false), which states if the paging columns should synchronize their scroll positions.
  • Added a new binding option called "paging.allowColumnReordering" (defaults to true), which states if the columns can be reordered when editing is enabled.
  • Added a new binding option category called "footer".
  • Added a new binding option called "footer.enabled" (defaults to true), which states if the footer bar should be shown (in full-screen mode).
  • Added a new binding option called "footer.showDataTypes" (defaults to true), which states if the footer bar should show the value data types.
  • Added a new binding option called "footer.showLengths" (defaults to true), which states if the footer bar should show the key/value length.
  • Added a new binding option called "footer.showSizes" (defaults to true), which states if the footer bar should show the key/value sizes.
  • Added a new binding option called "footer.showPageOf" (defaults to true), which states if the footer bar should show the "Page x of y" text.
  • Added a new binding option called "footer.statusResetDelay" (defaults to 5000 milliseconds), which states how long the status notification text should be visible for.
  • Added a new binding option category called "controlPanel".
  • Added a new binding option called "controlPanel.enabled" (defaults to true), which states if the panel is enabled.
  • Added a new binding option called "controlPanel.showCopyButton" (defaults to true), which states if the copy button should be visible.
  • Added a new binding option called "controlPanel.showMovingButtons" (defaults to true), which states if the moving buttons should be visible.
  • Added a new binding option called "controlPanel.showRemoveButton" (defaults to false), which states if the remove button should be visible.
  • Added a new binding option called "controlPanel.showEditButton" (defaults to true), which states if the edit button should be visible.
  • Added a new binding option called "controlPanel.showCloseOpenAllButtons" (defaults to true), which states if the open/close all buttons should be visible.
  • Added a new binding option called "controlPanel.showSwitchToPagesButton" (defaults to true), which states if the switch to pages buttons should be visible.
  • Added a new binding option called "autoClose.htmlSize" (defaults to 0), which states the size an HTML object has to be before it's closed on the first load.
  • Added a new binding option called "sideMenu.showAvailableDataTypeCounts" (defaults to true), which shows the total count for each data item on display next to the checkbox text.
  • Added a new binding option called "sideMenu.showOnlyDataTypesAvailable" (defaults to false), which states that only the data types on display should be shown as filter checkboxes.
  • Added a new binding option called "maximumUrlLength" (defaults to 0, state will use the full Url), which states the maximum size a Url can be in the display.
  • Added a new binding option called "maximumEmailLength" (defaults to 0, state will use the full Email), which states the maximum size an Email can be in the display.
  • Added a new binding option called "minimumArrayIndexPadding" (defaults to 0), which states the minimum number of padding zeros that should be used on array indexes.
  • Added a new binding option called "arrayIndexPaddingCharacter" (defaults to "0"), which states the padding character that should be used for array indexes.
  • Added a new binding option called "ignore.htmlValues" (defaults to false), which states if HTML values should be ignored.
  • Added a new binding option called "ignore.lambdaValues" (defaults to false), which states if lambda values should be ignored.
  • The binding option "sideMenu.titleText" now defaults to whatever "title.text" is set to (will prevent having to set this twice).
  • Added a new binding option called "showCssStylesForHtmlObjects" (defaults to false), which states if the CSS styles should be shown for an HTML object.
  • Added a new binding option called "jsonPathAny" (defaults to ".."), which states the characters that should be used to define an "any" path.
  • Added a new binding option called "jsonPathSeparator" (defaults to ""), which states the separator to use for JSON paths.
  • Added a new binding option called "showChildIndexes" (defaults to true), which states if the child array/set indexes should be shown.
  • The binding option "showCommas" now defaults to true.
  • Added a new binding option called "allowEditing.regExpValues" (defaults to true), which states if RegExp values can be edited.
  • Added a new binding option called "allowEditing.symbolValues" (defaults to true), which states if Symbol values can be edited.
  • Added a new binding option called "allowEditing.imageValues" (defaults to true), which states if Image values can be edited.

Binding Options - Custom Triggers:

  • BREAKING: Every custom trigger must now accept the main JsonTree.js element as the first parameter, so you can identify which element the event came from.
  • Added a new binding option custom trigger called "onLambdaRender", which fires an event when a lambda value is rendered (allow element render overrides).
  • Added a new binding option custom trigger called "onFullScreenChange", which fires an event when the full-screen mode is changed (passes a flag to state if it's on).

Configuration Options:

  • BREAKING: Renamed "text.copyAllButtonSymbolText" to "text.copyButtonSymbolText".
  • Changed the EN default for the option "text.showTypesText" to "Show Data Types", and renamed it to "text.showDataTypesText".
  • Added a new option called "text.htmlText", which states the text to use for the html types (defaults to "html").
  • Added a new option called "text.waitingText", which states the text to use in the footer main status area when waiting (defaults to "Waiting...").
  • Added a new option called "text.pageOfText", which states the text to use in the footer for the array page index (defaults to "Page {0} of {1}").
  • Added a new option called "text.sizeText", which states the text to use in the footer for the value size (defaults to "Size: {0}").
  • Added a new option called "text.copiedText", which states the status text to use in the footer when the JSON is copied (defaults to "JSON copied to clipboard.").
  • Added a new option called "text.exportedText", which states the status text to use in the footer when the JSON is exported (defaults to "JSON exported.").
  • Added a new option called "text.importedText", which states the status text to use in the footer when JSON files are imported (defaults to "{0} JSON files imported.").
  • Added a new option called "text.ignoreDataTypesUpdated", which states the status text to use in the ignore data types is updated (defaults to "Ignore data types updated.").
  • Added a new option called "text.lengthText", which states the text to use in the footer for the length of the value (defaults to "Length: {0}").
  • Added a new option called "text.valueUpdatedText", which states the status text to use when a value is updated (defaults to "Value updated.").
  • Added a new option called "text.jsonUpdatedText", which states the status text to use when the JSON is updated (defaults to "JSON updated.").
  • Added a new option called "text.nameUpdatedText", which states the status text to use when a property name is updated (defaults to "Property name updated.").
  • Added a new option called "text.indexUpdatedText", which states the status text to use when an array index is updated (defaults to "Array index updated.").
  • Added a new option called "text.itemDeletedText", which states the status text to use when an item is deleted (defaults to "Item deleted.").
  • Added a new option called "text.arrayJsonItemDeleted", which states the status text to use when a JSON page is deleted (defaults to "Array JSON it...
Read more

JsonTree.js v3.1.1 - Lots of improvements and fixes!

11 Sep 12:40
526b639
Compare
Choose a tag to compare
  • Added more details to the README files.
  • Added missing translations to all files.
  • Fixed a fault that caused counts for Objects/Maps to be still shown when the binding option "showCounts" is set to false.
  • Fixed a fault that prevented the ellipsis text from being applied to a string correctly when the binding option "maximumStringLength" is set.
  • Fixed a fault that caused the ellipsis text version of a string value to be passed to the binding options event "events.onValueClick".
  • Changed the default value for the binding options "showPropertyNameQuotes" to true.

JsonTree.js v3.1.0 - URL fetching support! Email/URL opening support! UI enhancements! Fixes!!

07 Sep 13:38
781a6ab
Compare
Choose a tag to compare

New Features:

  • Added URL support for the "data" binding option!
  • Added URL/Email opening support!

Configuration Options:

  • Added a new option called "text.propertyColonCharacter", which states the character to use to split up the property name/index and value (defaults to ":").

Binding Options:

  • The binding option "ignore.emptyObjects" now defaults to false.
  • The binding option "data" will now accept a URL to a JSON file.
  • Added a new binding option called "showUrlOpenButtons" (defaults to true), which states if a URL can be opened in a new window.
  • Added a new binding option called "showEmailOpenButtons" (defaults to true), which states if an Email can be opened in the default email editor.

UI Improvements:

  • Undefined and Null values now appear more clearly when "showValueColors" is turned on.
  • When a value is a function and has a name, the text "function" is now shown at the start of the value.
  • When the binding option "ignore.emptyObjects" is set to false, objects that are empty show a zero count, and a new notice text label is shown under the header.

Configuration Options:

  • Added a new option called "text.noPropertiesText", which states the text to show when no properties are available for an object/map (defaults to "There are no properties to view.").
  • Added a new option called "text.openText", which states the open button text to show next to a URL/Email (defaults to "open").
  • Added a new option called "text.openSymbolText", which states the open button symbol text to show next to a URL/Email (defaults to "⤤").

Improvements:

  • Updates to the README files to make the features stand out.

Fixes:

  • Fixed a CSS fault that caused the checkboxes to be centred in the Side Menu.

JsonTree.js v3.0.0 - New side menu! New types! New display options! Bulk editing! Lots of improvements and fixes!

31 Aug 18:40
daafb9f
Compare
Choose a tag to compare

New Features:

  • BREAKING: The type "decimal" has been renamed to "float" (including supporting binding options).
  • Added URL, Image and Email type support!
  • Added support to show the object types in the UI (next to the property name/array index, off by default)!
  • Added support to show speech marks around the property names (off by default).
  • Added support to show object/array contents opened borders (on by default).
  • Added a new Side Menu (opened from the title bar, on by default), which allows the ignore configuration to be changed for the display.
  • Added a new button (to the side menu, on by default) that will allow you to import a list of JSON files.
  • Added a new button (to the side menu, on by default) that will allow you to export all the JSON being viewed to a file.
  • Added a new title bar button that will allow you to quickly toggle the full-screen mode (on by default).
  • Added array index editing support!
  • Added a massively improved drag-and-drop UI!
  • Added bulk JSON editing support!
  • Added property name and array index parent color support (on by default).
  • Added auto-close data types by size support (supports Objects, Arrays, Maps, and Set).

Shortcut Navigation Keys:

  • Pressing Ctrl/Command + F11 will toggle the full-screen mode.

Binding Options:

  • BREAKING: Removed the binding option "title.show", as "title.text" will now accept an empty string instead.
  • BREAKING: Moved the binding option "enableFullScreenToggling" to "title.enableFullScreenToggling".
  • BREAKING: Renamed the new binding option "copyIndentSpaces" to "jsonIndentSpaces" (now defaults to 8).
  • Added a new binding option called "ignore.urlValues" (defaults to false), which states if URL values should be ignored.
  • Added a new binding option called "ignore.imageValues" (defaults to false), which states if Image values should be ignored.
  • Added a new binding option called "ignore.emailValues" (defaults to false), which states if Email values should be ignored.
  • Added a new binding option called "allowEditing.urlValues" (defaults to true), which states if URL values can be edited.
  • Added a new binding option called "allowEditing.emailValues" (defaults to true), which states if Email values can be edited.
  • Added a new binding option called "showTypes" (defaults to false), which states if the type of each object should be shown in the display.
  • Added a new binding option called "logJsonValueToolTipPaths" (defaults to false), which states if the JSON value tooltips paths should be logged to the console.
  • Added a new binding option called "sideMenu.enabled" (defaults to true), which states if the side menu should be shown.
  • Added a new binding option called "sideMenu.showImportButton" (defaults to true), which states if the import button is shown.
  • Added a new binding option called "sideMenu.showExportButton" (defaults to true), which states if the export button is shown.
  • Added a new binding option called "sideMenu.titleText" (defaults to "JsonTree.js"), which states the side menu title bar text to use (can be blank, if required).
  • Added a new binding option called "title.showFullScreenButton" (defaults to true), which states if the full-screen button is shown.
  • Added a new binding option called "allowEditing.bulk" (defaults to true), which states if bulk editing (editing the whole JSON) is enabled.
  • The binding option called "openInFullScreenMode" will now force the UI to open in full-screen mode (even if "title.enableFullScreenToggling" is set to false).
  • Added a new binding option called "exportFilenameFormat" (defaults to "JsonTree_{dd}-{mm}-{yyyy}_{hh}-{MM}-{ss}.json"), which states the export filename format.
  • Added a new binding option called "showPropertyNameQuotes" (defaults to false), which states if speech marks should be shown around the property names.
  • Added a new binding option called "showOpenedObjectArrayBorders" (defaults to true), which states if the object/array contents should show the opened borders.
  • Added a new binding option called "showPropertyNameAndIndexColors" (defaults to true), which states if the object/array names/index should show the parent's color.
  • Added a new binding option called "autoClose.objectSize" (defaults to 0), which states the size an object has to be before it's closed on the first load.
  • Added a new binding option called "autoClose.arraySize" (defaults to 0), which states the size an array has to be before it's closed on the first load.
  • Added a new binding option called "autoClose.mapSize" (defaults to 0), which states the size a map has to be before it's closed on the first load.
  • Added a new binding option called "autoClose.setSize" (defaults to 0), which states the size a set has to be before it's closed on the first load.

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onUrlRender", which fires an event when a URL value is rendered (allow element render overrides).
  • Added a new binding option custom trigger called "onImageRender", which fires an event when an Image value is rendered (allow element render overrides).
  • Added a new binding option custom trigger called "onEmailRender", which fires an event when an Email value is rendered (allow element render overrides).
  • Added a new binding option custom trigger called "onExport", which fires an event when the JSON is exported.

Configuration Options:

  • Added a new option called "text.sideMenuButtonSymbolText", which states the symbol text to use for the side menu button (defaults to "☰").
  • Added a new option called "text.sideMenuButtonText", which states the text to use for the side menu button (defaults to "Show Menu").
  • Added a new option called "text.closeButtonSymbolText", which states the symbol text to use for the close button (defaults to "✕").
  • Added a new option called "text.closeButtonText", which states the text to use for the close button (defaults to "Close").
  • Added a new option called "text.showTypesText", which states the text to use for the show types header (defaults to "Show Types").
  • Added a new option called "text.selectAllText", which states the text to use for the select all button (defaults to "Select All").
  • Added a new option called "text.selectNoneText", which states the text to use for the select none button (defaults to "Select None").
  • Added a new option called "text.importButtonSymbolText", which states the symbol text to use for the import button (defaults to "↑").
  • Added a new option called "text.importButtonText", which states the text to use for the import button (defaults to "Import").
  • Added a new option called "text.fullScreenOnButtonSymbolText", which states the symbol text to use for the toggle full-screen on button (defaults to "↗").
  • Added a new option called "text.fullScreenOffButtonSymbolText", which states the symbol text to use for the toggle full-screen off button (defaults to "↙").
  • Added a new option called "text.fullScreenButtonText", which states the text to use for the toggle full-screen button (defaults to "Toggle Full-Screen").
  • Changed the default value of the option "text.closeAllButtonSymbolText" to "⇈".
  • Changed the default value of the option "text.openAllButtonSymbolText" to "⇊".
  • Added a new option called "text.copyButtonText", which states the text to use for the copy button (defaults to "Copy").
  • Added a new option called "text.dragAndDropSymbolText", which states the symbol text to use for the drag & drop title (defaults to "⇪").
  • Added a new option called "text.dragAndDropTitleText", which states the text to use for the drag & drop title (defaults to "Drag and drop your JSON files to upload").
  • Added a new option called "text.dragAndDropDescriptionText", which states the text to use for the drag & drop description (defaults to "Multiple files will be joined as an array").
  • Added a new option called "text.exportButtonSymbolText", which states the symbol text to use for the export button (defaults to "↓").
  • Added a new option called "text.exportButtonText", which states the text to use for the export button (defaults to "Export").

UI Improvements:

  • When there is no content to view due to the ignore rules, the "There is currently no JSON to view." message is now shown.

Fixes:

  • Fixed a fault that caused the Back/Next buttons to not be visible in the title bar when everything else is turned off.
  • Fixed a fault that prevented the border from being removed from the container when full-screen mode was on.
  • Fixed a fault that caused the UI to move to the previous/next page when using the arrow keys in an editable box.
  • Fixed the documentation that listed the wrong type names.
  • Fixed a fault that caused Maps, Weak Maps, Sets, Weak Sets, and RegExp values to be excluded when pressing the "Copy" button.
  • Fixed a global result fault to occur when removing the squared brackets from a number.
  • Fixed the binding option "addArrayIndexPadding" not working when set to true.

JsonTree.js v2.9.0 - RegExp, Set, and Map type support! Multiple file dropping support! Lots and lots of fixes!

27 Aug 10:50
47f1420
Compare
Choose a tag to compare

New Features:

  • Added RegExp type support!
  • Added Map/WeakMap type support!
  • Added Set/WeakSet type support!
  • Added multiple file-dropping support!

Binding Options:

  • Added a new binding option called "ignore.regExpValues" (defaults to false), which states if RegExp values should be ignored.
  • Added a new binding option called "ignore.mapValues" (defaults to false), which states if Map values should be ignored.
  • Added a new binding option called "ignore.setValues" (defaults to false), which states if Map values should be ignored.
  • The binding option "allowEditing" can now accept a boolean again to enable/disable all supported editable types (you can still pass them individually if required).
  • Added {fff} (milliseconds padded to 3 places) and {ff} (milliseconds padded to 2 places) support for the "dateTimeFormat" option.

Binding Options - Custom Triggers:

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

Configuration Options:

  • Added a new option called "text.mapText", which states the text to use for the map types (defaults to "map").
  • Added a new option called "text.setText", which states the text to use for the set types (defaults to "set").

UI Improvements:

  • The property name now also shows a tooltip, if available via the "valueToolTips" binding option.
  • The label "There is currently no JSON to view." is now centred in the screen when full-screen mode is turned on.

General Improvements:

  • Added an ignore path for ".DS_Store" files when packing the NuGet package.
  • Updated to the latest version of the NPM packages.

Fixes:

  • Fixed a fault that prevented NPM packages from being updated correctly.
  • Fixed the "Frisian" translation file missing some text.
  • Fixed a fault that caused the wrong type to be passed when clicking an Array type (when shown as the main object).
  • Fixed a fault that caused the closing symbols to show in the wrong position when the binding option "showArrowToggles" is set to false.
  • Fixed a fault that prevented the Open/Close All buttons from working when the binding option "showArrowToggles" is set to false.
  • Fixed a fault that caused zero padding to be used for the contents at the top when the title bar was not visible.
  • Fixed a fault that caused the title bar text to be centred when no data was available to be shown.
  • Fixed the title bar buttons not using the correct spacing.
  • Fixed the title bar text not using the correct margins when no data is available to be shown.
  • Fixed a missing space that is not being shown for the paging object index title.
  • Fixed a fault that caused the title bar buttons to appear in different sizes (if the default font is not available).
  • Fixed the missing colors in the theme files.
  • Fixed a fault that prevented additional margins for the last items in the display from being removed.

JsonTree.js v2.8.1 - Tooltip improvements! New settings! Fixes!

24 Aug 21:08
a11ea96
Compare
Choose a tag to compare

Binding Options:

  • Added a new binding option called "tooltip.offset" (defaults to 0), which states the additional offset to use for the tooltip position.
  • Added a new binding option called "editingValueClickDelay" (defaults to 500), which states how long an editable value should wait after being clicked to trigger the custom event.

General Improvements:

  • The value tooltips now take the "useZeroIndexingForArrays" binding option into account when mapping the path.
  • Added ".." support for tooltip values, which will allow specific names/indexes to be ignored so that the same tooltip can be set for multiple array object properties.
  • Tooltips shown for JSON values now use a new CSS class called "jsontree-js-tooltip-value" (by default, it looks like the regular tooltip).

Fixes:

  • When "destroy()" is called, the tooltip element is removed from the DOM.

JsonTree.js v2.8.0 - Tooltips for values! New options and events! Fixes!

22 Aug 17:57
d758f99
Compare
Choose a tag to compare

New Features:

  • Added value tooltip support (property names cannot be edited with this set)!

Binding Options:

  • Added a new binding option called "valueToolTips" (defaults to {}), which states the JSON paths to set tooltips for the values.
  • Added a new binding option called "allowEditing.propertyNames" (defaults to true), which states the JSON property named can be edited.

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onJsonEdit", which fires when a JSON property name/value is edited.

Fixes:

  • Fixed a fault that caused parsing values to render in the wrong type!
  • Fixed a fault that caused some of the new editing values to be ignored.

JsonTree.js v2.7.0 - GUID type support! Full-screen mode! Navigation keys! General improvements, UI updates, and fixes!

21 Aug 22:06
e0f4f13
Compare
Choose a tag to compare

New Features:

  • Added GUID type support!
  • Color type support is now implemented fully!
  • Allow editing can now be set for specific object types, instead of all of them!
  • Added navigation shortcut key support (when only one instance is created in the UI)!
  • Added full-screen support!

Navigation Shortcut Keys:

  • Added "Left" key support, which will move back a page (if arrays are paged).
  • Added "Right" key support, which will move a page forward (if arrays are paged).
  • I added "Down" key support, which will open all the nodes on the display.
  • Added "Up" key support, which will close all the nodes on the display.

Binding Options:

  • Added a new binding option called "ignore.guidValues" (defaults to false), which states if GUID values should be ignored.
  • Added a new binding option called "ignore.colorValues" (defaults to false), which states if color values should be ignored.
  • Removed the binding option "showStringHexColors" (not needed anymore).
  • BREAKING: The binding option "allowEditing" now allows you to state which object types you can edit (for example, allowEditing.booleanValues).
  • Added a new binding option called "allowEditing.booleanValues" (defaults to true), which states if boolean values can be edited.
  • Added a new binding option called "allowEditing.decimalValues" (defaults to true), which states if decimal values can be edited.
  • Added a new binding option called "allowEditing.numberValues" (defaults to true), which states if number values can be edited.
  • Added a new binding option called "allowEditing.stringValues" (defaults to true), which states if string values can be edited.
  • Added a new binding option called "allowEditing.dateValues" (defaults to true), which states if date values can be edited.
  • Added a new binding option called "allowEditing.bigIntValues" (defaults to true), which states if big int values can be edited.
  • Added a new binding option called "allowEditing.guidValues" (defaults to true), which states if GUID values can be edited.
  • Added a new binding option called "allowEditing.colorValues" (defaults to true), which states if color values can be edited.
  • Added a new binding option called "includeTimeZoneInDateTimeEditing" (defaults to true), which states if editing a date/time should include the timezone information.
  • Added a new binding option called "openInFullScreenMode" (defaults to false), which states if the UI should be shown in full-screen mode.
  • Added a new binding option called "enableFullScreenToggling" (defaults to true), which states if full-screen toggling is enabled (double-clicking the title bar).

Binding Options - Custom Triggers:

  • Added a new binding option custom trigger called "onGuidRender", which fires an event when a GUID value is rendered (allow element render overrides).
  • Added a new binding option custom trigger called "onColorRender", which fires an event when a color value is rendered (allow element render overrides).

UI Improvements:

  • The title bar now has a new style, which helps to separate it from the rest of the control.

General Improvements:

  • The GUIDs generated now used the "crypto.randomUUID()" instead of the custom-built one (this is now RFC4122-compliant).
  • Improved the event assignments, which are now single lines.

JsonTree.js v2.6.0 - Editing support! Lots of UI improvements and fixes!

13 Aug 18:39
463b8d7
Compare
Choose a tag to compare

New Features:

  • Added editing support! You can now edit property names and values while clearing the data will remove the item.

Binding Options:

  • Added a new binding option called "allowEditing" (defaults to true), which states if property name/value editing is allowed.

Binding Options - Custom Triggers:

  • When "onValueClick" is set, all HEX/RGB colors are now passed using a type of "color".

UI Improvements:

  • Strings that are RGB or RGBA colors are now shown as colors in the display (as with hex colors).
  • String HEX/RGB colors are now shown without the string quotes (if enabled).
  • Removed spacing around the fields and improved the margins.
  • The Array/Object contents opened/closed in the display are now remembered when switching between array pages (if turned on).

General Improvements:

  • Moved from ES2016 to ES2020.
  • Moved more code into the shared files.
  • When an ID is set for an element, it is removed when "destroy()" is called.
  • When an element is destroyed, if no classes are left on the element, the "class" attribute is now removed.