dataformsjs

🌟 DataFormsJS 🌟 A minimal JavaScript Framework, standalone React and Web Components, and JSX Compiler for rapid development of high quality websites and single page applications.

MIT License

Downloads
402
Stars
186
Committers
6

Bot releases are visible (Hide)

dataformsjs - DataFormsJS v5.14.5 Latest Release

Published by ConradSollitt about 1 month ago

  • Security update for the starter/example webserver that is included with the main project.
    • The file app.js uses a custom express-like API with a minimal web server which allows DataFormsJS examples to run using Node.js built-in features and no outside dependencies.
    • A Path traversal vulnerability was found with credit thanks to Hamidreza Hamidi and Jafar Akhoundali.
    • The issue was decodeURIComponent was called out of order allowing for Proof-of-concept (POC) Path traversal attacks on a local developer machine using URLs such as http://127.0.0.1:8080/..%2fpackage.json or bash 127.0.0.1:8080/%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd
    • This impacts the development download of the project but not the NPM published release.
  • Replaced CDN https://unpkg.com/ with https://www.jsdelivr.com/
    • The property jsxLoader.babelUrl was changed and can be set back to unpkg if needed by setting the URL prior to the page being loaded.
    • All example pages and apps referenced unpkg for React and related libraries.
    • Even though IE is no longer supported it still works on legacy Windows Servers but unpkg blocks it from downloading CDN content. Given this fact, its possible they may block other browsers in the future so switching to jsDelivr helps avoid issues were code could break and it allows jsxLoader plus all React examples to work out of the box for IE again.
  • Updated several ImageGallery React and Web Components so that css @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {} would only be included if the browser is IE 11.
    • Edge browser started giving a deprecation warning when using this CSS media query.
    • Additionally, the main site, the playground site, and many examples were updated to dynamically handle the CSS media query for IE but not other browsers.
  • Fixed Unit Tests for React and Preact pages
  • Updated Unit Tests to run from Port 4000 instead of Port 5000 because Port 5000 is now used by default on Mac for AirPlay and was causing a conflict when running tests on a Mac.
dataformsjs - DataFormsJS v5.14.4

Published by ConradSollitt 2 months ago

dataformsjs - DataFormsJS v5.14.3

Published by ConradSollitt over 1 year ago

  • jsxLoader Update so that JSX Files are compiled and added to the page only after all files are downloaded
  • Special Thanks to m1sta for opening this issue and providing great examples to show the error https://github.com/m1sta
dataformsjs - DataFormsJS v5.14.2

Published by ConradSollitt over 1 year ago

  • 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.
dataformsjs - DataFormsJS v5.14.1

Published by ConradSollitt almost 2 years ago

  • 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.
dataformsjs - DataFormsJS v5.14.0

Published by ConradSollitt almost 2 years ago

dataformsjs - DataFormsJS v5.13.1

Published by ConradSollitt over 2 years ago

  • 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.
dataformsjs - DataFormsJS v5.13.0

Published by ConradSollitt over 2 years ago

  • 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
dataformsjs - DataFormsJS v5.12.1

Published by ConradSollitt over 2 years ago

  • 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
dataformsjs - DataFormsJS v5.12.0

Published by ConradSollitt over 2 years ago

dataformsjs - DataFormsJS v5.11.0

Published by ConradSollitt over 2 years ago

  • 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);
    
dataformsjs - DataFormsJS v5.10.6

Published by ConradSollitt almost 3 years ago

dataformsjs - DataFormsJS v5.10.5

Published by ConradSollitt almost 3 years ago

  • 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.
dataformsjs - DataFormsJS v5.10.4

Published by ConradSollitt about 3 years ago

  • 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
dataformsjs - DataFormsJS v5.10.3

Published by ConradSollitt about 3 years ago

dataformsjs - DataFormsJS v5.10.2

Published by ConradSollitt about 3 years ago

  • 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()
    
dataformsjs - DataFormsJS v5.10.1

Published by ConradSollitt about 3 years ago

  • 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>
    
dataformsjs - DataFormsJS v5.10.0

Published by ConradSollitt about 3 years ago

dataformsjs - DataFormsJS v5.9.1

Published by ConradSollitt about 3 years ago

  • 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; }"
    
dataformsjs - DataFormsJS v5.9.0

Published by ConradSollitt over 3 years ago