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
.jsfile 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 outdatedandnpm update - Moved
jest-environment-jsdomtodevDependenciesfromdependencies
- Export path of some helpers
- Updated
responsiveImageSrcsettest for custom sizes
responsiveImageSizesresponsiveImageSrcset
package.jsonrepository url update
- read me updates
setFocusOnTargetfocusTrap
isVisiblegetFocusableElementslisteners(listeners.add()andlisteners.remove())nl2brremoveEmojiremoveHTMLentitiesremoveNoneASCIICharactersremoveNonePrintableCharactersreplaceAccentedCharacters
Along with tests for each.
- Update
resized: attempt to fire aresize(and soresizedandmediaQueryUpdated) events on Firefox text scaling - which doesn't fire a nativeresizeevent. 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
oritentationChangeFixrenamed toorientationChangeFix.- removed
manageBehaviorsandcreateBehaviors- 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
focusTrapandsetFocusOnTargetwill clean up itstabindexattribute if they had to set it to focusgetMetaContentByNamereturns null of no meta tag found
- tests added or updated for:
cookieHandlercopyTextToClipboarddebouncefocusDisplayHandlerfocusTrapgetMetaContentByNamegetOffsetios100vhFixisBreakpointorientationChangeFixresizedsetFocusOnTarget
- incomplete tests have "todo" set
ajaxRequestjsonpRequestmessagesresponsiveImageUpdatesendEventToSegmentiostore
- wiki links updated
getCurrentMediaQuerynow replaces out " in returned current breakpoint CSS variableisBreakpointcan 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.jsadd better comment on this utility
store.jsadd 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/
resizedhelper updated to capture current media query being""
- updates
isBreakpointbreakpoints 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--1vhCSS var to the:rootfor CSS usage to counter iOS frustrating 100vh change when the browser chrome disappearsresponsiveImageUpdate- updates imagesizesattribute on resized to make Safari recalc which source to use from thesrcsetmanageBehaviorsandcreateBehaviorfrom the boilerplate to create and manage behaviors, this version has the initial data bindings development
- updates to:
setFocusOnTargetresizedto sends breakpoint info on resized and sets current media query on loadgetCurrentMediaQueryreads breakpoint info from a CSS variable--breakpointfocusTrapgets cleaned upajaxRequestcan now send JSON forms
- query string character replacement updated in
.fromObject()inqueryStringHandlerto matchfixedEncodeURIComponentat MDN:encodeURIComponent
resizedsends its event to thewindowand not thedocumentfor backwards compatibility
- Deprecated helpers are no longer used inside other helpers. If you're using
scrolledyou'll need to readevent.detail.lastandevent.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
focusTrapincorrectly removing events
- Update compiled version
- Added
focusTrapandfocusDisplayHandlerto the index.js so this can be imported into your app
- Added
focusTrapandfocusDisplayHandlerto 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
isBreakpointhelper to query if a breakpoint is active
- Updated
copyTextToClipboardas recent browser updates stopped it working
- Updated
lazyLoadto v2.1.1 inline with updates to that lib
- Updated
package-lock.json
- Updated
lazyLoadto init correctly
- Updated
lazyLoadto 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
messagetomessages, updatedmessage--hidetos-hide
- Added
fontLoadObserver
- Refactored
debounce
- Added default success message to
copyTextToClipboard
- Added
lazyLoad, a A17-helperised version of: https://github.com/area17/lazyload
- Updated
manageBehaviorsto not have warning typo...
- Updated
manageBehaviorsto warn when behavior fails to init and not trap JS errors from inside a behavior
- Added
forEachto loopquerySelectorAllnodes
getOffsetreturns a full fixedgetBoundingClientRectoutput (position with scroll) so includes bottom, right, width and height now
resizedchecks for and setswindow.A17.currentMediaQuerywhen media query changes
- Added
jsdomanjsdom-global(https://github.com/rstacruz/jsdom-global) todevDependenciesto test DOM events in Mocha tests. - Added
.updateParameter()method toqueryStringHandlerhelper Wiki - Added new
setFocusOnTargethelper Wiki (with test) - Added new
copyTextToClipboardhelper Wiki (no test, not sure how to test..)
- Merge
turnObjectToQueryStringandturnQueryStringToObjectintoqueryStringHandleras.toObject()and.fromObject()methods - Add new
debouncehelper Wiki
Changed dependencies from a17.helpers format to module
Add all the helpers from original version
Basic structure and testing function