Combine injection and components targets into a single uom target to avoid having to concatenate them later on with a Rake task. Also, remove obsolete rake assets:build task.
Move all components (including injection) to root of assets folder.
Move utility functions to utils folder.
Use third-party versions of hasLocalStorage utility.
Remove debranded target.
Drop Turbolinks support.
Refactor target entry files with ES6.
Refactor component initialisation code:
Remove UOMbind, UOMloadComponents, UOMloadInjection and UOMbindIcons.
Create ComponentManager module with methods to register and initialise components.
Let each component declare its name (label in codebase), the selector to use to find occurrences of the component on the page, as well as its JS and CSS dependencies.
Allow passing props to a component via the data-props attribute, which accepts the string representation of a JSON object.
Expose well-structured API to the global object: window.uom, including:
an array of registered components (not instances): window.uom.components,
the window.uom.applyInjection function to inject the components that need to be injected
the component manager's methods: window.uom.initComponent, window.uom.initAllComponents, window.uom.registerComponents,
Make es6 extension optional when importing or requiring files with Webpack.
Add aliases to Webpack to simplify import/require paths.
Remove references to HTML5shiv.
Initialise CreateNameSpace module only once as part of the injection, instead of three times.
Show components in documentation based on presence of 00-overview.md file in order to skip injection components.
Breaking change!
The design system no longer listens for Turbolinks events page:load and page:restore. You may listen for them yourself and call window.uom.inject and window.uom.initAllComponents.
injection
andcomponents
targets into a singleuom
target to avoid having to concatenate them later on with a Rake task. Also, remove obsoleterake assets:build
task.assets
folder.utils
folder.hasLocalStorage
utility.debranded
target.UOMbind
,UOMloadComponents
,UOMloadInjection
andUOMbindIcons
.ComponentManager
module with methods to register and initialise components.label
in codebase), theselector
to use to find occurrences of the component on the page, as well as its JS and CSS dependencies.data-props
attribute, which accepts the string representation of a JSON object.window.uom
, including:window.uom.components
,window.uom.applyInjection
function to inject the components that need to be injectedwindow.uom.initComponent
,window.uom.initAllComponents
,window.uom.registerComponents
,window.uom.utils
--easeInOutQuad
,findUp
,loadScript
,loadStylesheet
,smoothScrollTo
,window.uom.vendor
--cssesc
,WebFont
.es6
extension optional when importing or requiring files with Webpack.CreateNameSpace
module only once as part of the injection, instead of three times.00-overview.md
file in order to skip injection components.Breaking change!
page:load
andpage:restore
. You may listen for them yourself and callwindow.uom.inject
andwindow.uom.initAllComponents
.window.UOMloadInjection
becomeswindow.uom.applyInjection
window.UOMloadComponents
becomeswindow.uom.initAllComponents
window.UOMbind
andwindow.UOMbindIcons
becomewindow.uom.initComponent
window.cssesc
becomeswindow.uom.vendor.cssesc
window.loadScript
andwindow.loadStylesheeet
becomewindow.uom.utils.<...>