All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Adds
.js
file extension to all internal imports
- ios100vhFix : add back export
- Add Typescript support
- Package json - Set
type : module
: A17 helpers are now forced to be treated like mjs files (ES modules)
- JSDoc : add JSDoc documentation to remaining helpers
responsiveImageSizes
: Fix test of empty sizes object
SplitText
: Use now the toChars utility to split the string by chars.- JSDoc : add JSDoc basic documentation to most of the individual helpers
toChars
: Split text by Chars utility : more complete utility to split a string by a separator.
SplitText
: Split text by Chars, Words or Lines
- Ran
npm outdated
andnpm update
- Moved
jest-environment-jsdom
todevDependencies
fromdependencies
- Export path of some helpers
- Updated
responsiveImageSrcset
test for custom sizes
responsiveImageSizes
responsiveImageSrcset
package.json
repository url update
- read me updates
setFocusOnTarget
focusTrap
isVisible
getFocusableElements
listeners
(listeners.add()
andlisteners.remove()
)nl2br
removeEmoji
removeHTMLentities
removeNoneASCIICharacters
removeNonePrintableCharacters
replaceAccentedCharacters
Along with tests for each.
- Update
resized
: attempt to fire aresize
(and soresized
andmediaQueryUpdated
) events on Firefox text scaling - which doesn't fire a nativeresize
event. This was an issue because as you text scale, you will also likely be changing your visible breakpoint, as you go up in text size, you'll likely go down in breakpoint.
- Update
ios100vhFix
: get the greater of document.documentElement.clientHeight versus window.innerHeight to fix incorrect height when the browser UI is hiding on iOS15 and above.
- updated outdated packages
- fix typo in orientationChangeFix test
- added Code of Conduct
- removed Rollup
oritentationChangeFix
renamed toorientationChangeFix
.- removed
manageBehaviors
andcreateBehaviors
- behaviors and behavior management has been split out into its own library A17-Behaviors.fontLoadObserver
- use https://github.com/zachleat/fontfaceonloadlazyLoad
- use https://www.npmjs.com/package/@area17/a17-lazyload
- updated
focusTrap
andsetFocusOnTarget
will clean up itstabindex
attribute if they had to set it to focusgetMetaContentByName
returns null of no meta tag found
- tests added or updated for:
cookieHandler
copyTextToClipboard
debounce
focusDisplayHandler
focusTrap
getMetaContentByName
getOffset
ios100vhFix
isBreakpoint
orientationChangeFix
resized
setFocusOnTarget
- incomplete tests have "todo" set
ajaxRequest
jsonpRequest
messages
responsiveImageUpdate
sendEventToSegmentio
store
- wiki links updated
getCurrentMediaQuery
now replaces out " in returned current breakpoint CSS variableisBreakpoint
can now accept a list of breakpoints to check against (doesn't need a global)
- Update Production bundle
queryStringHandler
: dont replace plus signs from query strings
store.js
add better comment on this utility
store.js
add new tiny library to help you manage state across your application. Inspired by great libraries like Vuex and Redux and based on Beedle. For more informations, see demo : http://bp7store.dev.area17.com/
resized
helper updated to capture current media query being""
- updates
isBreakpoint
breakpoints to use shorthand breakpoint names:'xs', 'md', 'lg', 'xl', 'xxl'
(in line with A17 boilerplate 7.1.0 and A17 Tailwind plugins)
- removes deprecated and useless utilities:
- forEach gone (just use native forEach)
- scrollToY (just use native with options)
- triggerCustomEvent (use native:
node.dispatchEvent(new CustomEvent('event:name', { detail: { foo: 'bar' } }));
)
- adds:
ios100vhFix
- adds a--1vh
CSS var to the:root
for CSS usage to counter iOS frustrating 100vh change when the browser chrome disappearsresponsiveImageUpdate
- updates imagesizes
attribute on resized to make Safari recalc which source to use from thesrcset
manageBehaviors
andcreateBehavior
from the boilerplate to create and manage behaviors, this version has the initial data bindings development
- updates to:
setFocusOnTarget
resized
to sends breakpoint info on resized and sets current media query on loadgetCurrentMediaQuery
reads breakpoint info from a CSS variable--breakpoint
focusTrap
gets cleaned upajaxRequest
can now send JSON forms
- query string character replacement updated in
.fromObject()
inqueryStringHandler
to matchfixedEncodeURIComponent
at MDN:encodeURIComponent
resized
sends its event to thewindow
and not thedocument
for backwards compatibility
- Deprecated helpers are no longer used inside other helpers. If you're using
scrolled
you'll need to readevent.detail.last
andevent.detail.prev
(and notevent.data.xxxx
)
- Support is IE11+, Safari 10+, Edge, recent Chrome, recent FF to bring into line with A17 FE Boilerplate (and no longer IE9+, Safari 6+).
- Deprecation notices on:
- forEach
- manageBehaviors
- triggerCustomEvent
- Added
scrolled
- a custom event to track requestAnimationFrame limited scroll events
- Fix
focusTrap
incorrectly removing events
- Update compiled version
- Added
focusTrap
andfocusDisplayHandler
to the index.js so this can be imported into your app
- Added
focusTrap
andfocusDisplayHandler
to trap keyboard tab focus within an element and to help style keyboard focus states
- ajaxRequest returns the request so you can abort it in your project function
- Scroll to Y : call the onComplete callback even if not scrolling
- Add rollup.js for compile the package. Now Everything is compiled. (Don't forget to compile it then push npm if you are updating it)
- Added
isBreakpoint
helper to query if a breakpoint is active
- Updated
copyTextToClipboard
as recent browser updates stopped it working
- Updated
lazyLoad
to v2.1.1 inline with updates to that lib
- Updated
package-lock.json
- Updated
lazyLoad
to init correctly
- Updated
lazyLoad
to v2.1.0 inline with updates to that lib
- Links to Wiki updated
- Missing semicolons on imports added
- Files with tabs as spaces converted to spaces for spaces
- Added .editorconfig
- Alphabetised
index.js
- Renamed
message
tomessages
, updatedmessage--hide
tos-hide
- Added
fontLoadObserver
- Refactored
debounce
- Added default success message to
copyTextToClipboard
- Added
lazyLoad
, a A17-helperised version of: https://github.com/area17/lazyload
- Updated
manageBehaviors
to not have warning typo...
- Updated
manageBehaviors
to warn when behavior fails to init and not trap JS errors from inside a behavior
- Added
forEach
to loopquerySelectorAll
nodes
getOffset
returns a full fixedgetBoundingClientRect
output (position with scroll) so includes bottom, right, width and height now
resized
checks for and setswindow.A17.currentMediaQuery
when media query changes
- Added
jsdom
anjsdom-global
(https://github.com/rstacruz/jsdom-global) todevDependencies
to test DOM events in Mocha tests. - Added
.updateParameter()
method toqueryStringHandler
helper Wiki - Added new
setFocusOnTarget
helper Wiki (with test) - Added new
copyTextToClipboard
helper Wiki (no test, not sure how to test..)
- Merge
turnObjectToQueryString
andturnQueryStringToObject
intoqueryStringHandler
as.toObject()
and.fromObject()
methods - Add new
debounce
helper Wiki
Changed dependencies from a17.helpers
format to module
Add all the helpers from original version
Basic structure and testing function