Skip to content

Releases: williamtroup/JHson.js

JHson v2.3.0 - Base 64 Image support! Rendering public functions! Support for new website!

09 Sep 21:23
5269b97
Compare
Choose a tag to compare

Public Functions:

  • Added "includeImagesAsBase64()" support for "json()", which states if the image source attributes should be included as a Base 64 URLs (defaults to false).
  • Added new public function "render()", which will render a specific DOM element using the options you specify.
  • Added new public function "renderAll()", which will find all new DOM elements with the "data-jhson-js" attribute and render them.

General Improvements:

  • When "includeCssProperties()" and "includeAttributes()" are set to true, the attribute "style" is now ignored.
  • Updated all documentation to reference the new website!

JHson v2.2.0 - More public functions for improved filtering! Large fixes!

08 Sep 19:45
2e3d326
Compare
Choose a tag to compare

Public Functions:

  • Added "includeDataAttributes()" support for "json()", which states if the data attributes should be included (defaults to true).
  • Added "addDataAttributes()" support for "html()" (including binding support), which states if the data attributes should be added (defaults to true).
  • Added "removeOriginalDataAttributes()" support for "html()" (including binding support), which states if the original data attributes should be removed (defaults to true).
  • Added "propertyReplacer()" support for "json()", which states a JSON property replacer function to use when writing the JSON (defaults to null).
  • Added "ignoreNodeCondition()" support for "json()", which states a condition function (that accepts a DOM element) that states if a node should be included in the JSON (defaults to null).
  • Added "get()" support for "html()", which returns the HTML DOM element created from the JSON.

Documentation:

  • Updated the documentation to show the right properties for the objects, and added missing documentation for the binding attribute.

Fixes:

  • Fixed a huge fault that prevented all other binding properties (other than the "json") from working when set in DOM attribute "data-jhson-js".

JHson.js v2.1.0 - New public functions! Massive code restructuring! Fixes!

07 Sep 23:42
bbf5f28
Compare
Choose a tag to compare

Public Functions:

  • Added "insertBefore()" support for "html()", which states if the HTML should be written before the first detected child (if the HTML is not to be cleared, defaults to false).
  • Added "generateUniqueMissingNames()" support for "json()", which states if the JSON should contain unique names for elements that don't contain them (defaults to false).

General Improvements:

  • Updated all of the NPM packages to the latest versions.
  • Moved from ES2016 to ES2020.
  • Added new rules to enforce stricter types across the code base.
  • Completely reorganized the files into separate folders, with some renames.
  • The GUIDs generated now used the "crypto.randomUUID()" instead of the custom-built one (this is now RFC4122-compliant).
  • Added some missing types.
  • Added an ignore path for ".DS_Store" files when packing the NuGet package.
  • Improved the way events are assigned.

Documentation:

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

Fixes:

  • Fixed some errors in the documentation headers for each file.
  • Fixed a fault that caused html() > write() to loop through the remaining keys once the main one has been found.
  • Fixed some errors in the documentation that stated the wrong defaults.

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

15 Jul 19:57
869ede2
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.
  • Added CDN links for the minimized version of the files.
  • 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.

JHson v1.2.2 - CDN support!

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

JHson.js v1.2.1 - Third party library support (via export)

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

JHson v1.2.0 - Template variable defaults! Minor renames and improvements!

08 Jun 16:13
0ce3407
Compare
Choose a tag to compare
  • BREAKING: Renamed the binding attribute "data-jhson-options" to "data-jhson-js".
  • The public function "setConfiguration()" can now only be called with a valid object.
  • Template variables now support defaults! This allows you to use the following syntax {{your_variable | your default value}} to specify a default value.
  • The public function "html().write()" will now only do all of its actions if the JSON specified is valid.

JHson v1.1.0 - Use Strict! Major fix!

19 Mar 14:51
8debf6c
Compare
Choose a tag to compare
  • Added "use strict" support internally and updated all public functions to use the new scope.
  • Fixed a fault that caused the function parameter "properties" to collide with an outer scope variable of the same name for "json() > ignoreCssProperties()".

JHson.js v1.0.0 - Binding support for JSON to HTML!

13 Mar 23:28
79488b4
Compare
Choose a tag to compare

New Features:

  • Added binding support! You can now add the attribute "data-jhson-options" to any DOM element to bind JSON, which will be written as HTML.

Binding Options:

  • Added binding options support, which is based on all the options available to "html()".

Binding Options - Custom Triggers:

  • Added binding option custom trigger "onBeforeRenderComplete", which fires before the rendering of an element.
  • Added binding option custom trigger "onRenderComplete", which fires when the rendering of an element is complete.

Public Functions:

  • Added a new public function called "renderAll()", which will find all the DOM elements with the attribute assigned and render their JSON as HTML.

Fixes & Improvements:

  • Fixed a major fault that caused the scope of the chained functions to fail when specific methods were called.
  • Updated the main project description.

JHson.js v0.9.0 - New method, improvements and fixes!

12 Mar 23:25
65d34a2
Compare
Choose a tag to compare

Public Functions:

  • Added "generateUniqueMissingIds()" support for "json()", which states if the JSON should contain unique IDs for elements that don't contain them.

Fixes & Improvements:

  • Fixed a fault that allowed the text to be obtained for a textarea DOM element when the option "includeText()" is set to false.
  • Improved the support for returning the correct scope when calling chained functions.