Skip to content

Latest commit

History

History
1303 lines (1102 loc) 路 93.3 KB

CHANGELOG.md

File metadata and controls

1303 lines (1102 loc) 路 93.3 KB

DataFormsJS Change Log

DataFormsJS uses Semantic Versioning.

Overall the core Framework files, React Components, and Web Components and API are expected to remain stable however the version number is expected to increase to much larger numbers in the future due to the changes to smaller scripts and components. This change log includes all npm release history and new website features or major changes.

5.14.3 (Jan 29, 2023)

  • jsxLoader Update so that JSX Files are compiled and added to the page only after all files are downloaded
    • Related Issue: #22
    • Previously JSX files were asynchronously download, compiled, and added to the page in the order that they downloaded.
    • This caused issues when files downloaded in an unexpected order.
  • Special Thanks to m1sta for opening this issue and providing great examples to show the error https://github.com/m1sta

5.14.2 (Jan 29, 2023)

  • Web Components - Renamed function [utils.js].isAttachedToDom() to [utils.js].isDomAttached() because the text string ToDom would show up when searching source code for case-insensitive todo. This is a minor update but prevents the files from showing up in external projects by accident. This could be considered a breaking change if an app calls the function but that is unlikely the case and it's mostly an internal function because it's undocumented outside of the changelog; that is the reason why a patch version is being released.

5.14.1 (Dec 7, 2022)

  • Fixed a bug in Web Component <json-data> that was introduced on the previous build where format.{func} was not working in [data-show] attributes.

5.14.0 (Nov 28, 2022)

5.13.1 (May 2, 2022)

  • Update Code Comments on React Component <JsonData>
    • Previously @license was included in the main comment which resulted in Vite including about 5 kB (uncompressed) and about 1.5 kB of extra code on the build process.
    • Comments were updated so that they are not included on build resulting in smaller files.
  • Update Framework, React, and Web Components for Date/Time formatting:
    • Update for en-US to use format {date} {time} instead of {date}, {time} because most people in the US (and software programs) do not use the comma while Chrome uses the comma.

5.13.0 (February 25, 2022)

  • DataFormsJS App Object
    • ~/js/DataFormsJS.js
    • New Feature - Pass HTML Attributes as Properties to HTML Controls
      • This is similar in concept to passing props with React or Vue and allows easy and quick customization of content in the HTML control.
    • Update - When manually calling app.refreshHtmlControl() nested HTML controls are now rendered
    • Fix typo in error message
    • Example of the new features is being published on the Handlebars Places Demo:
  • Web Components - Component Class
  • Framework Plugins - Excel and CSV Export
    • ~/js/plugins/exportToCsv.js
    • ~/js/plugins/exportToExcel.js
    • Add support so that elements using the plugin are refreshed when app.refreshHtmlControl() is called.
    • Minor fix handled by using onRendered(rootElement) instead of onRendered().
    • For Excel text columns were the the max character width is less than 20 an extra 2 pixels of space will be added so content better fits.
  • I18N update
    • Framework Plugin ~/js/plugins/i18n.js
    • Web Component ~/js/web-components/i18n-service.js
    • Added ability to find and replace i18n keys inside of an attribute string by using syntax [[key]]
      • Example data-export-file-name="[[Countries]].xlsx" data-i18n-attr="data-export-file-name"
      • Previously both Countries and Countries.xlsx would have had to be defined for each language
      • Now only Countries has to be defined
      • For Vue apps this applies to the v-i18n-attr directive

5.12.1 (February 19, 2022)

  • Excel Export (Web Component and Framework Plugin)
    • Default data-worksheet-name to data-export-file-name excluding file extension .xlsx if the attribute is not included
    • Trim spaces for text fields
    • Set header style (gray fill color, bold, etc) only on the cells used rather than the entire row
  • CSV Export (Web Component and Framework Plugin)
    • Trim spaces for text fields

5.12.0 (February 16, 2022)

5.11.0 (February 8, 2022)

  • Updated DataFormsJS Framework to support JavaScript classes
    • Originally the DataFormsJS Framework was designed and developed prior to ES6 being supported among Web Browsers. Because of this custom app code was designed around ES5. This update allows for custom app code (Pages and Plugins) to use classes rather than objects which allows for modern style JavaScript development.
    • Functions updated and added for the main App object:
    • Bug fix with Chosen Plugin for IE
    • New class version of the core jsonData page object:
      • js/pages/classes/JsonData.js
      • All variables and functions from the original file exist in the new one. The purpose of the new file is so that an app can extend it for custom page logic when defining pages as ES6 classes rather than ES5 objects.
    • Replaces all occurrences of String.prototype.substr() with String.prototype.substring(). IDE's such as VS Code show substr() as depreciated because it is a non-standard function.
    • Updated package.json to use the latest and specific versions of @babel/standalone, terser, and uglify-js for the build process. This makes the build process work across systems as expected.
    // Framework updates to support Classes
    
    app.addPage('name', class Page {
        onRouteLoad() {}
        onBeforeRender() {}
        onRendered() {}
        onRouteUnload() {}
    })
    
    app.addPlugin('name', class Plugin {
        onRouteLoad() {}
        onBeforeRender() {}
        onRendered() {}
        onRouteUnload() {}
    })
    
    class MyPage extends JsonData {
        onRendered() {
            console.log('MyPage.onRendered()')
        }
    }
    app.addPage('MyPage', MyPage);

5.10.6 (January 6, 2022)

  • Updated jsxLoader to for additional JSX syntax from issues 20 and 21.
    • jsxLoader: Less than operator assumed to be an open element - #20
    • jsxLoader: Uncaught SyntaxError: Unexpected token ',' - #21
    • Special Thanks to Bj枚rgvin Ragnarsson (nifgraup) for opening these issues and providing great examples to show the error https://github.com/nifgraup

Web Server Updates (December 30, 2021)

5.10.5 (November 12, 2021)

  • Updates for DataFormsJS Markdown Components
    • All 3 versions updated:
      • Web Component <markdown-content>
      • Framework Control <markdown-content>
      • React Component <Markdown>
    • Add support for marked version 4.# which was released earlier this month. Previously version 3 was supported.
    • Both versions 3 and 4 are now supported.

5.10.4 (September 30, 2021)

  • No code changes however two .DS_Store where accidentally published to npm so this release excludes them
    • These are Mac system files created automatically by finder when viewing a folder
    • They are excluded from Github using rules from .gitignore, however npm published them
    • In general these files cause no issues but they are binary files so malicious authors can use them for attacks which is why they do not belong in npm or git

5.10.3 (September 27, 2021)

  • Updated jsxLoader to support functions that return JSX elements inside of props.

5.10.2 (September 25, 2021)

  • Updated <json-data> Web Component
    • Added HTML Attribute manual-fetch-mode, that if defined on an element prevents the web service from running when the page first loads. This allows for scenarios where one user may need to see the data and another user may not based on permissions. When this attribute is defined the fetch() method can be used to download the data.
    <json-data url="..." manual-fetch-mode>
    document.querySelector('json-data[manual-fetch-mode]').fetch()

5.10.1 (September 3, 2021)

  • Updated the new Animation Service and Plugin to include an optional property for specifying intersectionRatio *
    <animation-service intersection-ratio="0.3"></animation-service>
    
    <script>
      // Framework Plugin Property
      app.plugins.animation.intersectionRatio = 0.3
    </script>

5.10.0 (September 3, 2021)

5.9.1 (August 6, 2021)

  • Web Component <json-data>
    • Updated logic related to the HTML onready event attribute to only run JavaScript code if the <json-data> is still connected to the page when the web service completes.
    • For SPA if the user clicks of the page on a long running task then fetch will still be running but the element will not longer be connected.
    • This would result in an error being shown to the user if an expected element or other item is missing from the page.
    • In the example below if the user clicked of the page quickly an error alert would be displayed by default, this update prevents the code from running so the end user has a better and expected experience.
      <json-data onready="() => { document.getElementById('element1').textContent = document.getElementById('element2').textContent; }"

5.9.0 (June 5, 2021)

5.8.1 (April 29, 2021)

  • Update <data-list> Web Component to clear innerHTML when an empty list is passed to the value property.
    • This matches the intended behavior for applications and matches the Framework JavaScript <data-list> Control
    • An example of when this would happen is on a search screen. If the previous search returned data and the next search returns an error then both error and past data would show. This fixes the issue.
  • Update functions format.date(), format.dateTime(), format.time() to handle null or empty strings
    • Update affects related code for all version:
      • Web Components: js/web-components/utils-format.js
      • React Class: js/react/es6/Format.js
      • Framework: js/extensions/format.js
    • Example of the issue
      • If Web Component <data-table> or other templating code called <td>${format.date(startDate)}</td> and startDate was null then the value 12/31/1969 would be displayed because it's the starting Unix time.
      • The previous work-around was to use logic in the templating code like this: <td>${startDate === null ? '' : format.date(startDate)}</td>

5.8.0 (March 24, 2021)

  • JSX Loader Updates
    • Improvements for Legacy Browsers (IE, UC Browser, Legacy Edge, etc)
      • Add default support for destructuring assignment using spread operator, previously this was available but required extra config. This is commonly used with reducers (both Redux and native React Hooks).
      • Updated version of @babel/standalone from 7.12.9 to 7.12.12. At the time of release Babel is update to version 7.13.12 however builds starting at 7.12.13 have a broken regex for IE
    • Add support for <hr/>. With previous releases <hr/> caused a compiler error while including the space <hr /> worked.
  • DataFormsJS Framework app
    • Updated CDN Version for css-vars-ponyfill from 2.4.2 to 2.4.3 and added support for CSS Ponyfill/Polyfill on inline <style> elements that include the attribute data-css-vars-ponyfill
  • Added Class CssVars for React
    • Allows for ability to define CSS Variable Polyfill/Ponyfill automatically for older browsers.
    • Previously some of the examples had custom code included directly on each page to make this happen.
    • Now a [data-css-vars-ponyfill] attribute simply needs to be included on the style sheet, example:
    <link rel="stylesheet" href="css/site.css" data-css-vars-ponyfill>
    • Then call CssVars.ponyfill() from JavaScript
    • This class is available in the root DataFormsJS React Namespace
    • When used this automatically downloads and runs css-vars-ponyfill one time when the page is first loaded.
    • https://github.com/jhildenbiddle/css-vars-ponyfill
    • As of 2021 this will mostly used on sites that support IE 11. Unless a very old version of Mobile Safari or Android Device is used they will typically support CSS Variables.

5.7.1 (March 6, 2021)

  • Updated Framework filter.js Plugin to handle sort.js classes data-sort-class-odd and data-sort-class-even when using table column filters (typically for a click to filter event). Previously the classes were handled for general table filters.

5.7.0 (February 3, 2021)

5.6.1 (January 4, 2021)

  • Fix to load CSS Variable Polyfill/Ponyfill from Web Components polyfill.js for basic Web Pages when not SPA

5.6.0 (January 4, 2021)

  • Web Components
    • Added new Web Components based on Framework Plugins
      • <export-to-csv-service> based on js/plugins/exportToCsv.js
      • <highlighter-service> based on js/plugins/highlighter.js
      • <filter-service> based on js/plugins/filter.js. This service Web Component would be used instead of <input is="input-filter"> for apps that use clickable elements to filter and other advanced functionality not included in the smaller input-filter Component.
      • Example for all new Components is provided in http://127.0.0.1:8080/log-table-web-services#/10
    • Updated <nav is="spa-links"> to include new option [data-nav-match="start"]
    • Bug Fix for function setElementText() from file js/web-components/utils.js
      • Elements input, select, textarea were having the innerText set rather than the value property to to a string compare error
      • Affected <json-data> for [data-bind] and <url-router> for [url-param]
  • Framework Updates
    • Added ability to define CSS Variable Polyfill/Ponyfill automatically for older browsers.
      • Previously the main site and a number of examples had custom code included directly on each page to make this happen.
      • Now a [data-css-vars-ponyfill] attribute simply needs to be included on the style sheet, example:
      <link rel="stylesheet" href="css/site.css" data-css-vars-ponyfill>
      • When used this automatically downloads and runs css-vars-ponyfill one time when the page is first loaded.
      • https://github.com/jhildenbiddle/css-vars-ponyfill
      • As of 2021 this will mostly used on sites that support IE 11. Unless a very old version of Mobile Safari or Android Device is used they will typically support CSS Variables.
      • This feature includes new a function app.cssVarsPonyfill() and a new property app.settings.cssPonyfillUrl
    • js/plugins/exportToCsv.js - Added support to export using [data-value] attributes if they exist. data-value is used for Sorting and if used contains the expected number or date format needed for exporting.
    • Updated js/plugins/navLinks.js to include new option [data-nav-match="start"]
  • Set enumerable: true for the version property. Affects two files:
    • Main DataFormsJS.js file
    • React jsxLoader.js file

5.5.0 (December 13, 2020)

  • Web Component <json-data>
  • 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 from package.json when the version changes. Version is included in the full source DataFormsJS.js, jsxLoader.js and in the *.min.js files.
    // Framework
    DataFormsJS.version === '5.5.0'
    app.version === '5.5.0'
    
    // JSX Loader
    jsxLoader.version === '5.5.0'
  • 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 options
    jsxLoader.fetchOptions = {
      mode: 'cors',
      cache: 'no-store',
      credentials: 'same-origin',
    };
    
    // Previously `null` was used for `fetch(url, null)` so the following
    // can be used if needed or `fetchOptions` 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.

5.4.1 (December 9, 2020)

  • Web Component <markdown-content>
    • Fix so that loading screen shows when using url, show-source, loading-selector attributes together.
    • DOM event order would trigger the loading screen to clear when using show-source while content from url was still being downloaded.
    • Example Code:
    <markdown-content
      url="https://raw.githubusercontent.com/dataformsjs/dataformsjs/master/README.md"
      show-source
      loading-selector="#loading-screen">
    </markdown-content>

5.4.0 (December 4, 2020)

  • React jsxLoader
    • Added support for data-type="module" on scripts. This feature was added on Babel Standalone 7.10.0
    • Updated Babel Standalone CDN Version used for old browsers from 7.12.6 to the latest version 7.12.9.
  • Updated all NPM Dev Dependencies to use latest version for Build and Minification

5.3.1 (December 2, 2020)

  • Web Component <input is="input-filter"> could previously run too soon for long running web services when the content was waiting on data downloaded from <json-data>. The result was 0 Records Found message depending on the app. This has now been fixed.
  • Web Component Polyfill File now sets window.usingWebComponentsPolyfill = true as soon as the file will be used. This allows for apps to handle logic much quicker when DOMContentLoaded is handled.
  • Framework Control <markdown-content> has an added value property to match the API of the related Web Component.

5.3.0 (November 24, 2020)

5.2.0 (November 23, 2020)

  • Add React Component <Markdown>
    • Based on DataFormsJS Web Component <markdown-content>
    • The DataFormsJS <Markdown> React Component makes it easy to display markdown content from a web service or URL:
    const url = "https://raw.githubusercontent.com/dataformsjs/dataformsjs/master/README.md"
    <Markdown url={url} />
    <Markdown url={url} isLoading={<IsLoading />} className="markdown" />
  • Fix js/web-components/markdown-content.js so that it shows it shows the correct background color and full CSS styles for Code Syntax when using highlight.js. With previous releases this worked with the Framework version js/controls/markdown-content.js
  • Updates for both Framework and Web Component <markdown-content>
    • Fix issue where there were running highlight.js against the document rather than only elements under <markdown-content>
    • Added default use of remarkable.linkify plugin when using Remarkable
    • Added error handling to display an error through showError() or app.showError() for Markdown fetch errors. For example if a 404 occurs.
  • Framework Control now makes requests through app.fetch() so that custom security or other app defined Request Headers will be included.
  • <nav is="spa-links"> Web Component - Set links on initial connectedCallback() event. Previously it was first called based on router events however this caused a timing issue depending on when the file was loaded in related to the <url-router>.

5.1.1 (November 21, 2020)

  • Several of the *.min.js files were built showing version 5.0.2 in the header comments. Package has been republished to show correct version.

5.1.0 (November 21, 2020)

5.0.2 (November 20, 2020)

  • Fixed Web Component <nav is="spa-links"> so that it works on Safari.

5.0.1 (November 19, 2020)

  • Added attribute data-filter-search-text to js/web-components/input-filter.js based on Framework version from js/plugins/filter.js.

5.0.0 (November 19, 2020)

Credits / Thanks!

  • Thanks ElevateBart for helping with the idea and API proposal related to jsxLoader updates with this release: https://github.com/elevatebart
    • #16
    • The result is that jsxLoader can not be used from both node and webpack without side effects. Originally jsxLoader was intended only for browser use and it would always check if polyfills or babel standalone were needed based on the browser environment. Now this can be turned off.

Release Overview

  • Many updates have been made for overall improvement of DataFormsJS Web Components

    • The updates are significant and make using the Web Components much easier for complex apps and sites; and provide for wider browser support.
    • The new features make for an easier to use API for customizing content on page after data is displayed. Previously the places demo required a lot of custom JavaScript on the page in order to display flag icons, format table data, and additional items.
    • Added ability to polyfill Web Components for older browsers using the standard Framework that gets loaded from a single file and then that file polyfill.js loads additional framework files as needed.
    • Web Components have been updated for full support with React (16 and 17) and React Router. Additionally Web Components have been tested and have partial support for Vue 2 and Vue 3 when using Vue Router.
    • Web Component Examples:
    • Added new easier to use API for <url-router> and <json-data> Web Components
    • Added ability to define custom <template> for table <tr> in <data-table>
    • Improvements for <json-data>
      • Added option for formatting text from (date, time, number, custom functions, etc)
      • Added ability to use new attribute click-selector for search forms similar to the main Framework.
      • Added data-show="js-expression" to show or hide items. It works similar to Vue v-show.
      • Added ability to include global variables from window scope using {variable} syntax
        • <json-data url="{rootApiUrl}/web-service">
        • window.rootApiUrl = 'http...';
        • This allows an SPA site that contains many different HTML files with the same Root URL to point to the server from one location rather than updating each file.
        • Any variable name can be used as long as it is defined. This allows for rapid testing or changes to point to a different server when using <json-data>.
        • The actual update exists in [utils.js].buildUrl().
        • A similar update has been made for the main DataFormsJS Framework app.buildUrl().
      • Added new attribute [transform-data] that allows for a JavaScript function to be specified and used to transform the downloaded data before it is passed to other elements.
    • Added new Web Component <nav is="spa-links">. Previously SPA Nav Links were handled from custom JavaScript code on the page. Now this functionality is much easier for a site to include as only HTML is needed.
    • <url-router> and <url-hash-router> are now combined into one component <url-router> and <url-hash-router> has been removed.
    • <url-router> now has the ability to lazy load scripts (CSS and JavaScript) per route in a similar manner to the main framework using the new window.lazyLoad option and related HTML Attributes.
    • New Class WebComponentService which can be used to define "service" Web Components
      • The term "service" is used here because the intended use is that components created with this class do not render content but rather provide a service that updates other elements on the page based on HTML attributes element class names, etc. and that the service needs to run when content on the page changes from SPA routes or JSON Services.
      • This is a similar concept to the DataFormsJS Framework Plugins feature allowing for custom functionality to be defined easily and with little API code outside of standard DOM and JavaScript.
      • This will be used by all DataFormsJS Web Components that end with "service" in the component name.
    • Added new Web Component <data-view> and related Framework JavaScript Control for viewing data from <json-data> or other web components.
    • Added new Web Component <keydown-action-service>. Based on Framework Plugin js/plugins/keydownAction.js
    • Added new Web Component <html-import-service>. Based on standard framework features for [data-template-url] and [data-template-id].
    • Added new Web Component <show-errors-service>. Based on standard framework features for <html data-show-errors>.
    • Added new Web Component <prism-service>. Based on Framework Plugin js/plugins/prism.js
    • Added ability to style errors using CSS from utils.js when calling showError(element, message) or showErrorAlert(message).
    • New functions in utils.js: loadCss(id, css), isAttachedToDom(element)
    • Added [X] Close Button for js/web-components/old-browser-warning.js so that users can close the alert. With the new close button using js/web-components/safari-nomodule.js is no longer needed, however the file is still being kept for reference and sites that want to customize and use it.
    • js\web-components\data-list.js
      • Added HTML attribute root-attr which allows for any attribute to be set on the root element. Previously only the class could be set from root-class. The attribute root-class is still supported.
    • For <url-router> and DataFormsJS Framework when using HTMl5 History Mode (pushState, popstate) the Mac Command Key is now supported so users can open SPA links in a separate tab. Previously the only the {Control} key worked which is used on Windows for new tags and on Mac for a context menu (right-click menu).
  • DataFormsJS React Components and jsxLoader Updates

    • Minor bug fix where empty data props were not parsed correctly in a specific condition if this previous prop was not empty; this was found when updating Web Components for full React Support.
    • Added Node Support for jsxLoader
    • Added ability for jsxLoader to run from webpack (or in a browser) without any side effects if only the compiler is needed. Documentation will be updated after npm release on how this can be handled.
    • Previously jsxLoader only worked in a browser.
    • jsxLoader is now available as a node API and it works in the browser.
    • Added new compiler settings and options:
    jsxLoader.compiler.pragma = 'React.createElement';
    jsxLoader.compiler.pragmaFrag = 'React.Fragment';
    jsxLoader.compiler.maxRecursiveCalls = 1000;
    // The above setting replaces `jsxLoader.maxRecursiveCalls` so it's a breaking
    // change, however it's mostly just an internal property for unit testing and
    // for safety in the event of an unexpected error.
    
    jsxLoader.compiler.addUseStrict = true;
    // By default "use strict"; is now added to the top of compiled JS code if
    // does not already exist. This can be turned off by setting `addUseStrict = false`.
    // This behavior is similar to the latest version of Babel 7.
    
    // Added new code hint that is supported by Babel:
    /* @jsxFrag Vue.Fragment */
    • Updated the CDN version of Babel Standalone used for old browsers from 7.10.4 to 7.12.6
    • Added improved error message for compile errors where the number of opening tags did not match the number of closing tags. Previously some of these errors were only caught at runtime and not compile time.
    • Updated .eslintrc.js for improved syntax validation when using VS Code with *.jsx example and test files
    • When calling jsxLoader.usePreact a global React variable pointing to preact will be assigned to window by default if not already set and Preact is loaded.
    • ES6 *.min.js Components can now be loaded in a web browser using [type="module"]. Previously only the ES5 min files could be loaded in a browser.
    <!-- Previous Release typical CDN usage -->
    <script src="dataformsjs/js/react/es5/DataFormsJS.min.js"></script>
    
    <!--
      With the latest release of DataFormsJS modern browsers can use the smaller files with
      modern code syntax while legacy browsers still the es5 build.
    -->
    <script type="module" src="dataformsjs/js/react/es6/DataFormsJS.min.js"></script>
    <script nomodule src="dataformsjs/js/react/es5/DataFormsJS.min.js"></script>
    • Format class has several functions added that were previously private scoped in the module:
      • isNumber(n)
      • formatDateTime(dateTime, options)
      • formatNumber(value, options)
      • They are mostly internal so for usage view the source code.
  • Enhancements for DataFormsJS Framework files and general updates:

    • Added app.updateTemplatesForIE(rootElement). IE 11 considers <template> elements as valid elements so it applies querySelector() and related methods to elements under <templates>'s so replace with them <script type="text/x-template">. This avoids issues of <template> elements that contain embedded content. Previously this was only handled once per page load but now is handled (for IE only) when views are rendered.
    • Added features in js/plugins/dataBind.js based on the Web Components version.
    • New file js/extensions/format.js which is used with the Web Components Polyfill
    • Updated js/plugins/filter.js so that it shows 0 count for empty tables. Previously it expected the table to have at least one <tbody> element. A similar update was made for js/web-components/input-filter.js
    • Previously if using <template> with jsonData page types all .is-loading, .has-error, .is-loaded elements could quickly flash on screen during page changes. This has been fixed.
    • Routes and JavaScript controls will have empty data HTML attributes mapped to true by default instead of an empty string. Previously data-load-only-once="true" was used on many pages but now only data-load-only-once is required. Additionally null is now supported as an option.
    • js/plugins/i18n.js
      • Added app.plugins.i18n.getUserDefaultLang()
      • The following global API was added so that it can be used easily with templating or by app custom logic. This was based on the Web Component verison which uses simple JavaScript templating and basic functions.
        window.i18n_Locale = 'en|fr|es|zh-CN'; // Selected language, updated on each page change
        window.i18nText(key) // Returns I18n content for the current page
    • data-load-only-once="true"
  • Enhancements for "JavaScript Controls" in the standard Framework. The Framework JavaScript Controls are a similar concept to Web Components but work with all Browsers.

    • Added ability to easily reload by calling app.activeJsControls(control). Updating already loaded controls is not common but can be used in very specific scenarios. For example the new Web Components Polyfill uses it.
    • Update API to include model as a parameter in control.onLoad(element, model)
    • Specific controls <data-table> and <data-list> have significant new functionality based on the matching Web Components that allows for basic templating from HTML. The template syntax is based on JavaScript template literals (template strings) and with the new features basic sites or apps that previously required Handlebars or Vue for templating could possibly use these instead. Use of templating requires using a new file js/extensions/jsTemplate.js.
    • Data Attributes for JavaScript controls will not use boolean data types when "true" or "false" are specified. This was created for the new data-load-only-once attribute added to js/controls/json-data.js for compatability with the Web Components version. A new fromCache option was added as a parameter to onFetch based on this change.
    • Added new functions app.unloadUnattachedJsControls() and app.unloadJsControl(jsControl). They are mostly for internal use but are available for advanced usage if needed.
  • Image Gallery Update for Overlay when title/alt is not used:

    • All versions updated (Web Component, Framework Plugin, React)
    • By default if title is not used the position {index}/{end} is displayed. Previously it aligned to the left of the screen. Now it will be aligned in the right of the screen only if title is missing which matches the behavior if the title is included
    • To change position see the following CSS examples (works in all browsers included IE):
      • .image-gallery-overlay div.no-title { justify-content: flex-start; }
      • .image-gallery-overlay div.no-title { justify-content: center; }
  • Bug fix for js/pages/entryForm.js where the saveUrl did not allow for variables from the model if the URL of the page did not include any URL parameters.

  • All Leaflet code has been updated to download map images using https instead of http; originally when DataFormsJS was published https was not available as a free option for leaflet.

    • Additionally error messages have been improved for Leaflet.
    • Files updates:
      • <leaflet-map> Web Component
      • LeafletMap React Component and main DataFormsJS.js React file
      • leaflet Framework plugin.
  • Updated dependencies used for building the *.min.js files

    • @babel/standalone updated from 7.7.7 to 7.12.6, used to build es5 version of React Components
    • uglify-js updated from 3.7.3 to 3.11.6
    • eslint updated from 7.3.1 to 7.13.0
  • Replaced uglify-es with terser for the minification of React Components and Web Components

    • *.min.js files are generated from npm run build. Only changed files get updated
    • Build Script scripts/build.js
    • uglify-es is an abandon projects and terser is a widely used fork.

Breaking Changes

For the standard Framework most breaking changes are minor and only expected to affect internal API's and examples. Several Framework "JavaScript Controls" were updated to match behavior of the Web Components in order to provide more features and so they can be used with the new Web Components Polyfill. If you developed a site or app with any of the breaking changes they are quick to update and if you need help please open an issue.

For React Components one component LeafletMap and one class I18n that would not be commonly used in most apps have been dropped from the core ES5 build file js/react/es5/DataFormsJS.js. However new options exist so they (along with all other components and classes) have improved options for loading.

<!-- Previous Release included [I18n, LeafletMap] and was ES5 sytnax only for CDN -->
<script src="../js/react/es5/DataFormsJS.min.js"></script>

<!--
  In the places demo the above script was replaced with the following.
-->
<script type="module" src="../js/react/es6/DataFormsJS.min.js"></script>
<script type="module" src="../js/react/es6/I18n.min.js"></script>
<script type="module" src="../js/react/es6/LeafletMap.min.js"></script>

<script nomodule src="../js/react/es5/DataFormsJS.min.js"></script>
<script nomodule src="../js/react/es5/I18n.min.js"></script>
<script nomodule src="../js/react/es5/LeafletMap.min.js"></script>

<!--
  However for most sites this will be enough and it results in a smaller
  download size for the end user and modern code for most users.
-->
<script type="module" src="../js/react/es6/DataFormsJS.min.js"></script>
<script nomodule src="../js/react/es5/DataFormsJS.min.js"></script>

The Web Components have the most complex breaking changes related to API usage however due to the complexity of the earlier API it's unlikely to affect any site. If a site did use the earlier API it is generally quick to update as well.

  • Removed <url-hash-router>
    • This can now be replaced with <url-router>
    • <url-router> previously only worked with HTML5 History Routes pushState/popstate. To use history routes now use <url-router mode="history">
  • js/web-components/utils.js
    • Removed showOldBrowserWarning(). The feature has been replaced with the new js/web-components/polyfill.js and also the file js/web-components/old-browser-warning.js now includes a [X] close button so it it runs on Safari 10.1 or an old Chromium browser that doesn't support [nomodule] the user can simply close the alert.
    • Removed componentsAreSetup(). This function is no longer needed and the logic related to it's usage prevented Web Components from working with React and was not fully valid based on Custom Element specs because elements were writing HTML attributes on their constructor().
  • Web Components API for <json-data>, <url-router> have been changed significantly. Previously the API required async/await from module JavaScript and was complex to use. It has now been simplified so that events bubble up to the document can be handled easily from the root document event listener and so standard JavaScript functions can be called from HTML attributes.
  • Framework JavaScript Controls
    • Dropped support for replacing the control element with a basic element. Example, previously <json-data> would have been converted to <div data-control="json-data">. Now the data-control attribute is added but the element is not converted.
    • This behavior allows for easier to use API from sites and apps that use the <json-data> Web Component and Polyfill.
  • js/plugins/filter.js - Removed error alert for text Column filter requires a table to be correctly defined that happened if a table was missing when the filter was loaded. The reason is that it makes sense for certain apps to have a defined filter and only optionally include the table.
  • js/controls/data-table.js - Replaced data-source with data-bind and now <data-table> will be converted to a <div> with a <table> in the <div> instead of converting to a <table> directly. Additionally <template> support has been added.
    • Code before Update:
    <data-table
        class="countries click-to-highlight"
        data-source="countries"
        data-labels="Code, Name, Size (KM), Population, Continent"
        data-i18n-attr="data-labels"
        data-sort
        data-sort-class-odd="row-odd"
        data-sort-class-even="row-even">
    </data-table>
    • Code after Update:
    <data-table
        data-bind="countries"
        data-labels="Code, Name, Size (KM), Population, Continent"
        data-i18n-attr="data-labels"
        data-table-attr="
            class=countries click-to-highlight,
            data-sort
            data-sort-class-odd=row-odd,
            data-sort-class-even=row-even">
    </data-table>
  • js/controls/data-list.js
    • Replaced data-source with data-bind and now <data-list> will be converted to a <div> with a <ul> in the <div> instead of converting to a <ul> directly.
    • <template> support has been added.
  • Rename jsPlugins.js function refreshJsPlugins() to refreshPlugins() so it matches the standard Framework.
    • Affects Web Components and React
    • js/web-components/jsPlugins.js
    • js/react/jsPlugins.js
  • Combined Framework Plugins js/plugins/navList.js and js/plugins/navLinks.js
    • All demos used navLinks.js and only the main site used navList.js
    • navList.js has been deleted but the functionality can now be handled by using navLinks.js and setting the following option from JavaScript: app.plugins.navLinks.itemSelector = 'nav li';

4.8.0 (October 5, 2020)

  • Added new API function for Framework plugins for reloading plugin.
    • app.plugins[name].reload()
    • This makes using plugins easier for basic HTML pages that are not Single Page Apps (SPA).
    • Example usage, before the update if an basic HTML app make content changes and needed to reload a plugin it would look like this for plugins that needed to call onRouteUnload():
      • app.plugins.imageGallery.onRouteUnload();
        app.refreshPlugins();
      • or:
      • app.plugins.imageGallery.onRouteUnload();
        app.plugins.imageGallery.onRendered();
    • Now a single easier to read line can be used:
      app.plugins.imageGallery.reload();
    • The function gets defined and added automatically by the root DataFormsJS|app object when app.addPlugin() is called. If a reload function or property already exists on the plugin the no change is made to the plugin.
    • File updated: js/DataFormsJS.js https://github.com/dataformsjs/dataformsjs/blob/master/js/DataFormsJS.js
  • Added default cursor: pointer for React and Framework Image Gallery Controls.

4.7.1 (October 1, 2020)

4.7.0 (October 1, 2020)

  • js/plugins/clickUrlAction.js
    • Added actions refresh-plugins and call-function
    • refresh-plugins can be used on Vue apps instead of update-view which only works for Handlebars and other templating engines
    • refresh-plugins is used on the Vue Entry Form Demo https://www.dataformsjs.com/examples/entry-form-demo-vue.htm
    • call-function is generic and allows an app to call any global JavaScript function

4.6.3 (September 30, 2020)

4.6.2 (September 30, 2020)

  • js/plugins/listEditor.js - Bug fix where <input type="checkbox"> or <input type="radio"> did not track changes on some modern browsers Samsung Internet for Android and UC Browser - Windows Desktop. The reason is because oninput was used instead of onchange. Previously onchange was only used for IE 11 but now it's used for all browsers on checkboxes and radio controls.
  • Fixed Local development issue (localhost only) with UC Browser where https://polyfill.io was not included in the CSP (Content Security Policy)

4.6.1 (September 30, 2020)

4.6.0 (September 29, 2020)

Release Overview

  • This release contains many small updates, in general:
    • Framework Entry Form Scripts now work with Vue. The existing Handlebars demo has been updated and a new Vue demo created.
    • Vue 3.0.0 has been confirmed to work with DataFormsJS. No changes needed from previous release, however some new functions are available for working with Vue.
    • Image Gallery controls are updated for improved User Experience (UX) and better Accessibility on Desktop Computers.
    • Image Gallery now includes support for next-gen images (AVIF and WebP)

Release Details

4.5.5 (September 11, 2020)

  • Minor Bug Fix for Image Gallery Controls.
    • A console error could occur on some cases if the user was on a slow device and the image had partialy loaded but they clicked off the overlay because the Loading... label was being set with a hidden attribute after it was unloaded. An actual error alert would show on the standard framework when using <html data-show-errors>.
    • All Versions updated:
      • Framework Plugin: js/plugins/imageGallery.js
      • Web Component: js/web-components/image-gallery.js
      • React Component: js/react/es6/ImageGallery.js
  • Confirmed Vue 3 (RC 10) works with the Framework, previously RC 8 was confirmed

4.5.4 (September 11, 2020)

  • Minor UX (User Experience) Improvements for Image Gallery Controls.
    • Updated Loading... indicator so that CSS padding and background color match the index and title elements
    • Changed Loading... indicator so that it shows if the image takes longer than 2 seconds to load rather than 1 second. On tested mobile devices with low or mid-range bandwidth this was a better interval.
    • On Framework Plugin and Web Component <img alt="{title}"> can be used for the overlay title if the attribute title is missing.
    • All Versions updated:
      • Framework Plugin: js/plugins/imageGallery.js
      • Web Component: js/web-components/image-gallery.js
      • React Component: js/react/es6/ImageGallery.js

4.5.3 (September 10, 2020)

4.5.2 (September 4, 2020)

  • Minor CSS update for js/web-components/old-browser-warning.js so that the warning displays full screen width on IE 11 for all or most pages

4.5.1 (August 28, 2020)

4.5.0 (August 28, 2020)

  • Add Framework Plugin: js/plugins/modalAlert.js
    • Example Usage:
    <style>
    .modal-overlay .modal-content {
        background-color: black;
        padding: 40px 80px;
        color: white;
        font-size: 1.5em;
    }
    </style>
    <div class="modal-content"
        hidden
        data-show-every="1 day">
      50% OFF SITEWIDE + FREE SHIPPING ON ALL U.S. ORDERS
    </div>
    • Attribute data-show-every is optional and allows for simple text to interval conversion, works only with time ranges in a single duration [second(s), minute(s), hour(s), day(s)]. Examples:
      • 30 seconds
      • 1 MINUTE
      • 12 Hours
      • 1 day
    • If the element has an optional [data-hide-on-page-load] attribute then the modal will not be displayed by default and the app can showing it by calling app.plugins.modalAlert.showModal().
    • Plugin is small and easy to copy and customize if an app needs similar behavior

4.4.2 (August 13, 2020)

  • Minor CSS updates for Image Gallery Controls so that Title and Index div displays to a max-width of 1300px. Code comments also updated on different options for overriding the default CSS. All Versions updated:
    • Framework Plugin: js/plugins/imageGallery.js
    • Web Component: js/web-components/image-gallery.js
    • React Component: js/react/es6/ImageGallery.js
  • Website Updates (not affecting NPM)
    • Image Gallery Demos
      • Added Example Code and Usage to all Image Gallery Demos
      • Added Vue Demo http://127.0.0.1:8080/image-gallery-vue
      • Layout Improvements for IE 11 (Handlebars and React)
    • Added Vue 3 using JSX Experimental Demo: http://127.0.0.1:8080/examples/hello-world/en/vue3-with-jsx.htm

4.4.1 (August 12, 2020)

  • Minor CSS updates for Image Title and Index on Image Gallery Controls so that a light transparent background shows by default. All Versions updated:
    • Framework Plugin: js/plugins/imageGallery.js
    • Web Component: js/web-components/image-gallery.js
    • React Component: js/react/es6/ImageGallery.js

4.4.0 (August 12, 2020)

  • Bug fix for js/react/jsxLoader.js so that the less than or equal to operator <= is not parsed as an Element
  • New Features and Enhancements for Image Gallery plus fixes for IE 11
    • All Versions updated:
      • Framework Plugin: js/plugins/imageGallery.js
      • Web Component: js/web-components/image-gallery.js
      • React Component: js/react/es6/ImageGallery.js
    • Enhancements
      • On mobile devices swiping in the middle of the screen no longer triggers the overlay to close accidently on the click event. Previously this would occur from time to time.
      • Minor performance updates related to preloading images so that the loading code is called only once per image.
    • New Features
      • If title attribute is specified on the img tag, image-gallery web component, or included with data source for React then it will be displayed at the bottom of the screen.
      • Image Index/Position is now displayed be default and can be easily hidden from CSS by the calling app if desired
    • IE 11 Fixes
      • Layout improvements for Image Overlay so image is not cut off on narrow windows (IE flexbox issue)
      • Fixed issue with arrow and escape keys not working
    • Demo Pages:

4.3.0 (August 11, 2020)

  • New Feature - Image Gallery
    • Framework Plugin: js/plugins/imageGallery.js
    • Web Component: js/web-components/image-gallery.js
    • React Component: js/react/es6/ImageGallery.js
    • Demo Pages
      • examples/image-gallery-hbs.htm
      • examples/image-gallery-web.htm
      • examples/image-gallery-react.htm
  • New Framework Plugin js/plugins/onePageSite.js
    • This plugin allows for one page style web sites where a nav link will scroll to a target element on the page.
    • By default DataFormsJS is used for single page apps however when using this script other framework plugins and controls can be easily used with one page sites.
    • Demo Pages:
      • examples/one-page-site-hbs.htm
      • examples/one-page-and-spa-hbs.htm
  • js/DataFormsJS.js
    • Added new API function for plugins onAllowRouteChange(path) that allows for plugins to cancel the route from changing on Single Page Apps (SPA)
    • This API function was created for the new onePageSite.js plugin
  • js/extensions/handlebars-helpers.js
    • New Helper function jsonEncode - Encode an object as a JSON value, this is useful when adding related object data for an element in a [data-*] attribute of the element.

4.2.2 (July 13, 2020)

  • js/react/jsxLoader.js
    • Added jsxLoader.globalNamespaces and improved jsxLoader.addBabelPolyfills() so that global namespaces can be defined more with less code and so that more modules are handled automatically. This is being added for a new demo with React-Toastify at https://awesome-web-react.js.org/ which will be published after the new release.
    • Added Object.values and Array.prototype.findIndex to jsxLoader.polyfillUrl.
    • Updated 'jsxLoader.babelUrl' from version 7.8.4 to version 7.10.4. New URL: https://unpkg.com/@babel/standalone@7.10.4/babel.js
  • Added config file for ESLint .eslintrc.js and added eslint as a dev dependency in package.json
    • All code is valid based on defined rules so no changes to framework code were needed.

4.2.1 (June 17, 2020)

  • js/DataFormsJS.js
    • Improvements for Vue 2 so that long running tasks can still run in the background after a user goes to a new page in an SPA.
    • New setting added app.settings.clearVue2WatchersOnRouteUnload which defaults to false.
    • Originally Vue 2 Instances View Models were converted back to plain JavaScript objects on route changes to reduce the number of watchers that exist in memory when a models was not for the active page.
    • By default this will result in more Vue watchers being created on SPA's that have many pages, however for pages that have long running functions in the background that update the model the results are more predictable for the user because when they go back to the original page it will show the updates.
    • In general this has a minimal performance impact for most apps but if needed watchers can still be cleared using the new setting.
    • To see how this works try this example: https://www.dataformsjs.com/examples/image-classification-vue.htm
      • When using Vue 2 upload several images then quickly move to another tab while the images are still uploading.
      • After you have clicked off the main page type app.models into DevTools and you can see that the model for the main page is a Vue Model.
      • Once you come back to the original page then the prediction should be displayed for each image.
      • Then from DevTools execute app.settings.clearVue2WatchersOnRouteUnload = true and try the same steps.
      • If you type app.models into DevTools from another page you will now see that the original model is a plain JavaScript object.
      • Once you come back to the original page the images will still show Loading ... however there will be fewer Vue watchers for the app.
      • This does not affect Vue 3 or other view engines such as Handlebars because the original model reference is still kept in memory at app.models.
  • js/plugins/filter.js
    • Updated anonymous functions on event handlers to used named function expressions which makes it easier to find the source code from Browser DevTools.
    • Updated code comments in onRouteUnload() with more details on how it works with Vue 3 compared to other plugins.
  • Started including version number in code comments of several minimized files. This makes it clear which version is being used if referencing the latest version (rather than a specific version) from a CDN. For example: https://cdn.jsdelivr.net/npm/dataformsjs@latest/js/DataFormsJS.min.js
    • js/DataFormsJS.min.js
    • js/react/jsxLoader.min.js
    • js/react/es5/DataFormsJS.min.js
    • js/web-components/json-data.min.js
    • js/web-components/url-hash-router.min.js

4.2.0 (June 16, 2020)

  • Added Support for Vue 3 (Beta 15) to the main DataFormsJS Framework, updated files:
    • js/DataFormsJS.js
    • js/controls/json-data.js
    • js/extensions/vue-directives.js
    • js/plugins/filter.js
    • js/plugins/i18n.js
  • For all example pages and the Code Playground Templates Vue 2 can simply be swapped out with Vue 3 and the pages/apps will work as expected.
  • Vue 3 is still in Beta so additional updates may be required before or after the final release of Vue 3.
  • Vue 2 - Improved support for the v-cloak directive to hide the view while it is rendering. Previously this was set on individual elements in the template however for compatibility with both Vue 2 and Vue 3 this is now handled automatically by DataFormsJS on the main view element. By default DataFormsJS adds required CSS for v-clock from the properties app.vueCss and vueStyleId.
  • Vue 2 - Added support for computed properties to be defined directly on the page object. Previously computed properties had to be defined on the controller object which made it harder to define computed properties since controllers are typically setup in HTML rather than JavaScript. Also works with Vue 3. Example usage: examples/template-files-vue.htm
  • Added support to allow model properties the filter.js attributes data-filter-results-text-all and data-filter-results-text-filtered, example usage: examples/html/regions-vue.htm and examples/html/regions-hbs.htm

4.1.0 (May 21, 2020)

4.0.1 (March 12, 2020)

  • jsxLoader.js - Fix for incorrect parsing of JavaScript comments nested with-in elements

4.0.0 (March 12, 2020)

  • Breaking Changes - Relatively minor but they are breaking so a new major release number is being used:
    • Removed previously depreciated PolyfillService Component/Class.
    • Removed support for I18n without the use of a fetch polyfill for legacy browsers.
    • Both of these items are no longer needed due to creation of jsxLoader.js and for build tools create-react-app, etc Polyfills can be bundled.
  • jsxLoader.js - General improvements for additional JSX Syntax
    • Fixed issue where links https:// were being partially parsed as single-line comments inside of an element
    • Improved loop syntax elements needed to be enclosed in a () in certain situtations
      // Before
      {props.data && props.data.categories && props.data.categories.map(category => {
          return (<Category item={category} />)
      })}
    
      // After
      {props.data && props.data.categories && props.data.categories.map(category => {
          return <Category item={category} />
      })}
    • Fixed issue where some characters such as '>' were being parsed within prop strings:
      <InputFilter filter-selector="section.category ul > li" />
    • Added Array.prototype.find to Polyfill Bundle for Legacy Browsers
  • Added new JavaScript class Cache for simple state caching and re-use with React and Preact Apps.
  • React InputFilter Component
    • Added a new afterFilter property to allow applications to define a custom events once data is filtered
    • Previously if using a label to show filter results from [filter-results-selector] both [filter-results-text-all] and [filter-results-text-filtered] were required; now only one property is required.
  • DataFormsJS Framework Object DataFormsJS.js
    • Added app.settings.lazyTemplateSelector to allow for loading screens between page views when using app.lazyLoad. In most cases loading logic is used on actual page content however this helps with the user experince to indicate page change on slow mobile devices and scripts are being loaded.
    • Added Array.prototype.find to Polyfill Bundle for Legacy Browsers

3.6.2 (February 25, 2020)

  • jsxLoader.js
    • Added support for Shorthand React.Fragment Syntax <>
    • Switched Babel Standalone from Version 6 to Version 7.8.4
    • Switched eval code syntax to use new Function('"use strict";' + jsxLoader.evalCode)(); instead of eval(jsxLoader.evalCode);
    • Load additional Polyfills from polyfill.io service and added jsxLoader.addAdditionalPolyfills() function.
    • Added additional Unit Tests

3.6.1 (February 20, 2020)

  • Bug fix <LazyLoad> so that it works with Safari on iOS 9 when using Dynamic Components in the isLoaded prop.

3.6.0 (February 20, 2020)

  • Added Web Based Compiler for React/JSX jsxLoader.js.
    • For use as an alternative to Babel, webpack, etc
    • Also works for React alternatives including Preact and Alibaba Rax
    • All React Demos on the main web site and repository now use jsxLoader.js
    • Added additional demos to the main site for React and initial demos for Preact and Rax
  • Added new LazyLoad React Component for code splitting of JSX code on large apps and lazy loading of JavaScript and CSS files.
  • Added Initial Unit Testing for React Components and the JSX Loader
  • JsonData Component
    • Added GraphQL Support with new properties:
      • graphQL={true}
      • query="{query}"
      • querySrc="{url}"
      • variables={}
  • Added js/scripts/polyfills.js using feature detection to polyfill trimStart(), trimEnd(), trimLeft(), and trimRight()
  • With the new features this PolyfillService Component/Class is being depreciated and will be removed in a future release. A console warning is provided if using the class. A console warning is also included in the I18n class which currently uses either fetch or XMLHttpRequest.

3.5.4 (February 20, 2020)

  • DataFormsJS - Added pollyfill check and support if Promise.prototype.finally is missing. This was found to affect the UC Browser.
  • JsonData Component
    • Added support for missing isLoaded elements so that JsonData can be used to ping the server without displaying data. For example <JsonData url="https://www.dataformsjs.com/data/geonames/countries" />
    • Update for onViewUpdated event so that is called on the initial loading state before data is fetched. Previously it was only called after data has downloaded or if there was an error downloading data.
    • Added Error Handling for custom onViewUpdated events. The prevents issues from display data when an error occurs in third-party or app code.
  • Improved Support for Preact when using React Components
    • React Components ES5 Build Version will detect if preact is being used instead of React and work automatically
    • InputFilter will detect if preact is being used as an alias in a web page for React and then use onInput instead of onChange

3.5.3 (February 2, 2020)

  • Improvements for IE 11
    • Bug fix for when template elements were used that included embedded HTML. IE doesn't support the template element so DataFormsJS converts them to script type="text/x-template" elements when the page is loaded. Previously it simply hide the template elements but an edge case error was found when Framework JavaScript controls were used in the embedded templates.
    • Added Cache Busting for IE when app.fetch() is called with cache = no-cache|no-store. Earlier pre-release versions of DataFormsJS used this but it was removed once the GitHub fetch Polyfill was used.
  • Updated Unit Tests so that they work with Firefox and IE 11. Originally Unit Testing occurred in all Browsers but changed to Webkit only prior to the initial release due to time constrains.
  • Updates for React Components - Removed the requirement for custom import and exports definitions when using babel-standalone from a browser.

3.5.2 (January 28, 2020)

  • js/DataFormsJS.js - Bug fix for HTML5 History API nav menus with Safari on iOS 9 (iPad 2, iPhone 6, and older devices)

3.5.1 (January 17, 2020)

  • Improvments for using Vue
    • js/DataFormsJS.js - When the Vue Instance Model is destroyed using $destroy() it is now added back to the app.models cache as a plain JavaScript Object. Minor update so a site will use less memory and allow for easier debugging from Browser Dev Tools.
    • js/DataFormsJS.js - When the mounted() event is called it waits for vm.$nextTick and also calls app.loadAllJsControls();
    • js/controls/json-data.js - Only assigned key control properties [isLoading, isLoaded, hasError, errorMessage] are set to the active Vue Model, this prevents issues with the js/pages/jsonData.js and related controllers/pages such as overwritting common controller properties [url, graphqlId, etc.].
    • These improvements for Vue improve how framework JS controls work with Vue. Example is on search screen in the places demo: https://www.dataformsjs.com/examples/places-demo-vue.htm#/en/search

3.5.0 (January 16, 2020)

  • Added ability to use js/controls/json-data.js with Vue
  • Improvements for Vue with the main framework app file js/DataFormsJS.js
    • app.refreshPlugins() - Plugins do not call the onRendered() function until $nextTick() of the Active Vue Model
    • app.updateView() - Better support for Framework JavaScript Controls by calling app.loadAllJsControls() in $nextTick() after the Vue Model is initially updated.
  • DataFormsJS Namespace for React Components js/react/es6/DataFormsJS.js - Added the LeafletMap Component
  • Edge case bug fix to prevent app.loadJsControl() from calling control.onLoad() while it is still loading

3.4.2 (January 3, 2020)

  • HTML5 History API Update so that if [ctrl] is held down when a link is clicked then the click event is ignored so that the link can be opened in a new tab.
    • Affects files DataFormsJS.js and js/web-components/url-router.js
  • React Class I18n - Now sets the root html lang="lang" attribute when language has been changed
  • Updated Build Process to use local npm devDependencies from package.json rather than Global CLI commands and a Browser-based page for Babel

Website (December 24, 2019)

3.4.1 (December 23, 2019)

  • Fix for plugins/i18n.js to read settings before the first route loads, behavior similar to all releases before 3.4.0.

3.4.0 (December 23, 2019)

  • New features for i18n Support to use a user's default language for multilingual sites
    • Main DataFormsJS.js and plugins/i18n.js files work together and use navigator.languages to redirect to a user default language when language is not specified in initial URL
    • React Class I18n, added property getUserDefaultLang which can be used by an app with supportedLocales to get the locale for the user

3.3.3 (December 11, 2019)

  • Readme file update so images show in npm

3.3.2 (December 11, 2019)

3.3.1 (December 11, 2019)

  • Fixed error app.routingMode is not a function when standard plugins i18n.js, navList.js, navLinks.js are used with React or Web Components

3.3.0 (December 11, 2019)

3.2.0 (December 6, 2019)

  • Plugin i18n.js - Changed textContent of data-i18n-nav-lang to use specified capitalization rather than upper-case. The previous release 3.1.5 should have actually been 3.2.0 because it introduced new features.

3.1.5 (December 4, 2019)

  • Plugin i18n.js - Added support for i18n nav menus for the selected page and multiple languages with new attributes data-i18n-nav-lang and data-i18n-nav-selected.

3.1.4 (November 29, 2019)

  • Updated readme file for npm

3.1.3 (November 29, 2019)

  • Fixed error when using multiple rendering engines in a single app where changes to the URL source on existing HTML controls would use the wrong rendering engine. Rare edge case error that affected the main site.
  • Updated npm package.json file to include the broswer property

3.1.2 (November 25, 2019)

  • Fixed error from previous fix where plugins that call next(false) from onRouteLoad(next) would not trigger the next route to finish loading. Affected js/plugins/i18n.js.

3.1.1 (November 25, 2019)

  • DataFormsJS.js - Fix for race conditions where a previous page is still loading and the new page is called multiple times. The errors would only show on pages that use a lot of custom JavaScript and if the user clicks quickly from page to page while services or resources were still loading.

3.1.0 (November 25, 2019)

  • Web Components - New functions in js/web-components/utils.js - showErrorAlert() and showOldBrowserWarning()
  • Web Components - showOldBrowserWarning() checks modern browsers that support script type="module but do not support custom elements (known to affect MS Edge using the EdgeHTML rendering engine)
  • Web Components - Check Old Browsers from url-hash-router and json-data
  • Web Components - Updated all *.min.js files to use the *.min.js version of related files from import statements

3.0.0 (November 21, 2019)

  • Web Components - Add polyfill support for specific components for Safari, Samsung Internet, and Edge
    • Breaking change for Web Component ul is="data-list" - Changed element to "data-list"
    • utils.js - Added new function polyfillCustomElements()
    • input-filter.js, sortable-table.js, leaflet-map.js - Added window._webComponentPolyfills and related code
  • React Component JsonData - Added new optional props fetchOptions and fetchHeaders
  • Web Component json-data - Added data caching support with new attribute load-only-once="true"
  • DataFormsJS.js - Set scroll position to 0, 0 on hash change for SPA's
  • DataFormsJS.js and jsPlugins.js for both React and Web Components - Updated CSS white-space style for .dataformsjs-error and .dataformsjs-fatal-error

2.0.0 (November 18, 2019)

  • Breaking change for React Components File Structure, no new features added.
  • Switched React Components from JSX to JavaScript so that npm install dataformsjs works better with create-react-app.
  • Updated build process for React Components.

1.0.1 (November 15, 2019)

  • Fix package.json file for NPM Publishing

1.0.0 (November 14, 2019)

  • Initial public release