DataFormsJS v5.5.0 Release Notes
Release Date: 2020-12-13 // over 3 years ago-
5.5.0 (December 13, 2020)
- 🌐 Web Component
<json-data>
- Added setter properties for
url
andurlParams
. Previously only getters were defined and this resulted in the Component not working with Preact. - With this release DataFormsJS Web Components now work with Preact in addition to React
- Demo:
- https://www.dataformsjs.com/examples/web-components-with-preact.htm
- Added setter properties for
Started including
version
property for two files:- Main
DataFormsJS.js
file - React
jsxLoader.js
file - The version property is updated automatically from
scripts/build.js
using the value frompackage.json
when the version changes. Version is included in the full sourceDataFormsJS.js, jsxLoader.js
and in the*.min.js
files.
// FrameworkDataFormsJS.version === '5.5.0'app.version === '5.5.0'// JSX LoaderjsxLoader.version === '5.5.0'
- Main
JSX Loader
- Added default fetch options for fetching JSX Templates
- To use different options set this as soon as the script is loaded and before the document
DOMContentLoaded
event runs. - The default options provide for flexibility with 'cors', prevention of caching issues with 'no-store', and security by using 'same-origin' for
credentials
.
// New default optionsjsxLoader.fetchOptions = {mode: 'cors',cache: 'no-store',credentials: 'same-origin',};// Previously
null
was used forfetch(url, null)
so the following// can be used if needed orfetchOptions
can be customized for apps// that need to use security to fetch JSX Templates:jsxLoader.fetchOptions = null;React Components
- Updated the ES5 build for all React Components so that the compiled code from Babel is enclosed in Immediately Invoked Function Expressions (IIFE) and only needed Component and Classes are assigned to the global
window
object. - The resulting code is slightly smaller for each Component and variables intended for private module scope are no longer made available globally.
- Updated the ES5 build for all React Components so that the compiled code from Babel is enclosed in Immediately Invoked Function Expressions (IIFE) and only needed Component and Classes are assigned to the global
- 🌐 Web Component