# Changelog of version 5


## [5.5.0](https://github.com/Patternslib/patterns/compare/5.4.0...5.5.0) (2021-11-15)


### Bug Fixes

* **pat modal:** Fix injection problem with too early closed modals. ([e73bad9](https://github.com/Patternslib/patterns/commit/e73bad98879c1156d997cac3700babe852cef4de))

* **pat modal:** Fix not properly unregistered callbacks. ([297f248](https://github.com/Patternslib/patterns/commit/297f2483d0e90d746fa5b57c895ce6c4d4ee90f9))
Fix a problem with too many callback calls due to multiple handler registrations.
This also led to a situation where the modal was not closed due to one
callback unregistering an event handler where another would have closed
the modal.


## [5.4.0](https://github.com/Patternslib/patterns/compare/5.3.0...5.4.0) (2021-11-10)


### Features

* **pat ajax:** Add accept parameter with default text/html for ajax requests. We are mainly using text/html in Patternslib - if a JSON response is needed you need to configure it when using pat-ajax. ([f47ea84](https://github.com/Patternslib/patterns/commit/f47ea84c4628efa00e531ef7c5a6c07323867917))

* **pat inject:** After failed ajax request, remove loading and executing classes from target and trigger elements. ([3039a4f](https://github.com/Patternslib/patterns/commit/3039a4f84f1afeb45505665284f854f410b889ef))

* **pat inject:** Better error handling. ([64fdb9a](https://github.com/Patternslib/patterns/commit/64fdb9afa9f8f26296b246bb522438c1c1e52577))
Error handling: In a case of injection error, search for a configurable CSS id selector in the error response.
If it is found, inject the rendered error page into the document.
If no valid error response is found fall back to pre-configured error pages.
This allows for some more informative error pages than a very generic one.
The CSS id selector is defined by an optional URL fragment in the pre-configured error pages.


### Maintenance

* **dependencies:** Upgraade dev dependencies. ([e730900](https://github.com/Patternslib/patterns/commit/e7309000ed74ba44a8c158a6b03c847a12c46a2a))

* **pat ajax:** Add more tests for passing arguments. ([e64ecac](https://github.com/Patternslib/patterns/commit/e64ecace0c49a4b8981f224d3ef09bc261f9963f))

* **release process:** Use JS file instead JSON for the release-it config. ([fc597d7](https://github.com/Patternslib/patterns/commit/fc597d7ffda7c7bda316dc8dd7e4e01320bdcaed))

* **Release workflow:** Include commit body and footer messages in the generated Changelog. ([50c70fa](https://github.com/Patternslib/patterns/commit/50c70faac091694010c5c574ae92dbe167f47e80))


## [5.3.0](https://github.com/Patternslib/patterns/compare/5.1.2...5.3.0) (2021-10-28)


### Features

* **pat modal:** Dispatch a pat-modal-ready event after the modal is shown. ([4bfb841](https://github.com/Patternslib/patterns/commit/4bfb841642cd564127e643baf35260bfd6b98fdb))


### Bug Fixes

* **pat inject:** Dispatch the pat-inject-success event via plain JavaScript which better supports plain JavaScript event listeners. ([bf12c5c](https://github.com/Patternslib/patterns/commit/bf12c5c119cb34093d0cc00ffd01d949df063bd9))


### Maintenance

* **dependencies:** Upgrade dependencies up to minor versions. ([55bf6d6](https://github.com/Patternslib/patterns/commit/55bf6d624b1a601f45a90609481ed02af685ce8c))
* **Docs:** Add a reference to the changelog. ([0fc8788](https://github.com/Patternslib/patterns/commit/0fc8788f05cc12d48e21e9c467e90a8983f21d92))
* **Docs:** Update outdated information. ([6025b31](https://github.com/Patternslib/patterns/commit/6025b31e495746c0f317efe2ac09e2a5fe7dd7cb))


## [5.2.0] (2021-10-21)

* Unintentional release with no changes.


## [5.1.2](https://github.com/Patternslib/patterns/compare/5.1.1...5.1.2) (2021-10-21)


### Bug Fixes

* Ignore pat-update events with missing parameters. ([b8e1949](https://github.com/Patternslib/patterns/commit/b8e19492091e16e21fd90329bfad2bb187674965))


## [5.1.1](https://github.com/Patternslib/patterns/compare/5.1.0...5.1.1) (2021-10-21)


### Bug Fixes

* **pat modal:** Remove call to utils.redraw, which was added in 2014 but apparently never in utils. ([75c410c](https://github.com/Patternslib/patterns/commit/75c410c64ea0bf5e6681a89ac2255cece3e9fb16))

* **pat scroll-box:** Also set scroll classes immediately in a series of scroll events, additionally to the last scroll event within a threshold. Fixes a problem where some visual changes are applied recognizably late. ([07edce9](https://github.com/Patternslib/patterns/commit/07edce9f804441a1fce047e3b43a300f602f988a))

* **pat scroll-box:** Set classes on the last scroll event within the threshold time. Fixing a problem where scroll-position-top wasn't set correctly on subsequent scroll-up events. ([fd829d7](https://github.com/Patternslib/patterns/commit/fd829d732f4451ed18f8934ed63edf80804e1012))


### Maintenance

* **dependencies:** Upgrade dev dependencies up to minor releases. ([1cb75b7](https://github.com/Patternslib/patterns/commit/1cb75b7eff85e1da940b2bf5ad78712e7ca3382d))

* **pat scroll-box:** Restructure and modernize code for better readability. ([93fe976](https://github.com/Patternslib/patterns/commit/93fe9762515a682f937abeb6749a714c038cfd24))

* **pat subform:** Documenting the use case of submitting a subform to a different url via formaction on a subform submit button. ([14bd8f6](https://github.com/Patternslib/patterns/commit/14bd8f6cb5f69a312fc990af5f59d8e80514c989))


## [5.1.0](https://github.com/Patternslib/patterns/compare/5.0.0...5.1.0) (2021-10-04)


### Features

* **pat tooltip:** Add config option url to explicitly define an url where no ``<a href>`` is available. ([557cbe4](https://github.com/Patternslib/patterns/commit/557cbe40b60e5605e5ffb7f76fa06e495f055b51))

* **pat tooltip:** Allow to open the tooltip in JavaScript with via the trigger value none. ([f48dbf6](https://github.com/Patternslib/patterns/commit/f48dbf6d3838a62e2958426bfb86b909b8e14699))


### Bug Fixes

* **pat tooltip:** Wait a tick before repositioning after setting the content. Might fail due to unset popper instance. ([b5b2797](https://github.com/Patternslib/patterns/commit/b5b279759b558e8a012d116ef72cd5db49cd0304))


### Maintenance

* **cleanup:** Cleanup unused SCSS/CSS files. ([f53acb0](https://github.com/Patternslib/patterns/commit/f53acb0e8054b8182a0dd5cbf88acf4daf284601))

* **dependencies:** Upgrade dev dependencies up to minor releases. ([5417506](https://github.com/Patternslib/patterns/commit/54175063edce0df04ca7074ac8fd1479a480b424))

* **dependencies:** Upgrade dev dependencies up to minor releases. ([ffd3d73](https://github.com/Patternslib/patterns/commit/ffd3d73053f05f1a825558ffcb965fda501ef752))

* **dependencies:** Upgrade jest-watch-typeahead to 1.0.0. ([23fd772](https://github.com/Patternslib/patterns/commit/23fd772b15d18845291e556e52c085027d0df6f6))

* **dependencies:** Upgrade tippy.js to 6.3.2. ([5d2aed0](https://github.com/Patternslib/patterns/commit/5d2aed0aeed65eb92cd783ca1be33302b7a23ec1))

* **pat calendar:** Upgrade fullcalendar from 5.8.0 to 5.9.0. ([28eab77](https://github.com/Patternslib/patterns/commit/28eab77a134f84dc9ad184d49983f4ecb70d5b66))

* **pat tooltip:** Add pattern API methods to show/hide/destroy the tooltip. ([09a79e1](https://github.com/Patternslib/patterns/commit/09a79e1c22aa4015a953b7062b9ee177ff144a5a))

* **pat tooltip:** Minor code cleanup. ([6c175ee](https://github.com/Patternslib/patterns/commit/6c175ee9bd7bc6b1ac2d94091ce0e59d1021468c))

* Update patterns.css. ([39510a3](https://github.com/Patternslib/patterns/commit/39510a3adb41b7918c177327a99dc592b1b059f5))


## [5.0.0](https://github.com/Patternslib/patterns/compare/4.7.0...5.0.0) (2021-09-09)


### Bug Fixes

* **build:** Fix passing of environment variables for production and development, so that also babel get's notice of it. ([6a0ad46](https://github.com/Patternslib/patterns/commit/6a0ad4624c397ce299dbe5121ed68847b59d9e43))


### Maintenance

* **dependencies:** Upgrade dev dependencies up to minor releases. ([61d8bd1](https://github.com/Patternslib/patterns/commit/61d8bd125d46315e0c2caead50ce20419cf95c52))

* Development mode - explicitly set to no minification and no sourcemap generation (includes no inclusion of code via eval and thus preventing another layer of minification). ([f2de973](https://github.com/Patternslib/patterns/commit/f2de9739e3bee97627c85356a85d9816fd29c66b))

* In development mode, use latest Chrome and Firefox browser versions for better debugging. ([f04da66](https://github.com/Patternslib/patterns/commit/f04da664c61ae415f6ad222aad2a2cc6605fc410))


### Breaking Changes

* **build:** The development/production mode needs now be passed via the NODE_ENV environment variable, so that also babel gets notice of it. You eventually need to adapt your build environment. Refer to this change: https://github.com/Patternslib/Patterns/commit/6a0ad4624c397ce299dbe5121ed68847b59d9e43 ([be5a670](https://github.com/Patternslib/patterns/commit/be5a670deab2736c5933e245a6a0346dd1a97d25))

