# Changelog of version 4


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


### Features

* **core base:** Store the pattern instance on the element also when instantiating manually without scanning the DOM. Also store the pattern instance directly on the DOM node without jQuery.data. ([252f537](https://github.com/Patternslib/patterns/commit/252f537dc3e266b991edef84c2d79c2784a9b1af))
* **core dom:** add_event_listener and remove_event_listener methods to register event handlers for DOM nodes which can be unregistered by an id. Event handlers with the same id on the same node won't be registered twice. ([57febfd](https://github.com/Patternslib/patterns/commit/57febfd18c5a5d015ab837114ad999f9c14ab2d7))


### Bug Fixes

* **pat modal:** Wait a tick before destroying the modal so that registered event handlers (like form submit) can kick in before the modal disappears. ([c26ed3a](https://github.com/Patternslib/patterns/commit/c26ed3a70067bb54df4b7575cc10b81654974127))


### Maintenance

* **dependencies:** Upgrade dev dependencies up to minor releases and other releases up to patch level. ([42cd837](https://github.com/Patternslib/patterns/commit/42cd83716435c595b038ea14da55fc5bb55f205c))


## [4.6.1](https://github.com/Patternslib/patterns/compare/4.6.0...4.6.1) (2021-08-18)


### Bug Fixes

* **pat inject:** Parse data attributes as JSON also when the value is a JSON array. ([de9ee8b](https://github.com/Patternslib/patterns/commit/de9ee8b762ed67b359928e713bee021e7465d3c8))


## [4.6.0](https://github.com/Patternslib/patterns/compare/4.5.5...4.6.0) (2021-08-17)


### Features

* **core parser:** Add config to not group parsed options. This allows more flexibility when reusing the parser. ([7fea6e6](https://github.com/Patternslib/patterns/commit/7fea6e6a0920989a2575f9d4aca1aa4c18fc084e))


### Bug Fixes

* **pat inject:** Use the main argument parser when rebasing HTML so that it supports all kinds of arguments, including multiple configurations as seen in pat-inject and semicolons at the end of a config line after a line-break. ([d65892d](https://github.com/Patternslib/patterns/commit/d65892d629aa94e41a54d7a16c6a4d0f24c4b2d6))


### Maintenance

* **pat inject:** Fix invalid HTML in demo. ([725f834](https://github.com/Patternslib/patterns/commit/725f834d5c7d6de151e8dc4b7b529efc21c60188))


## [4.5.5](https://github.com/Patternslib/patterns/compare/4.5.4...4.5.5) (2021-07-23)


### Bug Fixes

* **core dom:** querySelectorAllAndMe: Do not break when no element is passed but return an empty list. ([b5a7177](https://github.com/Patternslib/patterns/commit/b5a7177c7d0901ca8dbe2dad0383c37da6c63fa0))
* **core registry:** scan: Do not throw an error when trying to scan undefined. ([8c97ae5](https://github.com/Patternslib/patterns/commit/8c97ae5fedf4cb16d55106c5bb80b20a8bf0734e))
* **pat tooltip:** If a  trigger is defined, do not prevent other event handlers from being run. Prevents an error where a form submit button was prevented from submitting the form when it also had the  class applied. ([db70b55](https://github.com/Patternslib/patterns/commit/db70b557785cf41c6140d87b7b163a6944fbfdb3))


### Maintenance

* **pat tooltip:** Correct demo - 1) there is no source: auto, 2) source: content is only for the contents of the tooltip element. When referencing other content on the same page, source: ajax has to be used. ([9205ce0](https://github.com/Patternslib/patterns/commit/9205ce0c4df57a6030f16992db7642c047ddef96))
* **pat tooltip:** Document that delay can be defined with units. ([88d271a](https://github.com/Patternslib/patterns/commit/88d271a1fb189b76d09cc7d784319d5a99c13bb6))


## [4.5.4](https://github.com/Patternslib/patterns/compare/4.5.3...4.5.4) (2021-07-15)


### Bug Fixes

* **pat bumper:** Fix IntersectionObserver issue with Safari where rootMargin wasn't correctly recognized due to formatting issues. ([c0c3351](https://github.com/Patternslib/patterns/commit/c0c3351888d2ead17ac472565f78a5680d647690))
* **pat tabs:** Prevent infinite loop when only child element is .extra-tabs. ([812fb50](https://github.com/Patternslib/patterns/commit/812fb504263eaaf7b8241e11ce22a8c5d00cd68c))


### Maintenance

* **dependencies:** Patch level upgrades (eslint minor level) of development dependencies. ([6f6f613](https://github.com/Patternslib/patterns/commit/6f6f6130ecd0301c883962b8b9e503427fdf76d8))
* Fix the pre-commit command ([8401791](https://github.com/Patternslib/patterns/commit/8401791d088193ceb6cc7a6c9a3776b63964f527))


## [4.5.3](https://github.com/Patternslib/patterns/compare/4.5.2...4.5.3) (2021-06-30)


### Features

* **core utils:** Add animation_frame which returns a Promise to be resolved with the next animation frame. Can be used to await for the next repaint cycle in async functions. ([808439a](https://github.com/Patternslib/patterns/commit/808439af22941b92a61d41ee1dacd366622f9c8b))
* **core utils:** Add get_bounds function to return the client bounding rectangle with rounded integer values instead of double/float values. ([2be2abe](https://github.com/Patternslib/patterns/commit/2be2abebc8a3aa68bc776e41896a36766fbf8758))
* **core utils:** Make getCSSValue return pixels as integer by default. Introduce a as_float option, if float/double values are needed. ([e0c027d](https://github.com/Patternslib/patterns/commit/e0c027dd2ac990d812cf6e92ae1a14016a1fb7e1))


### Bug Fixes

* **pat tabs:** Improve algorithm to calculate available width to ensure better stability (not shrinking while moving tabs) and correctness (taking .extra-tabs and style updates while moving tabs into account). ([b812aba](https://github.com/Patternslib/patterns/commit/b812abae6367fc6c1915e60c3cf02792de1c0f09))
* **pat tabs:** Only run the ResizeObserver callback when width of parent container has changed. This avoids a infinite ResizeObserver callback loop when the height changes due to tab manipulation. Also apply a small threshold of 3 pixels for which the callback isn't run to avoid unnecessary runs. ([7a4432e](https://github.com/Patternslib/patterns/commit/7a4432e49745f028728afa9f588b8de95d655954))


### Maintenance

* **core utils getCSSValue:** Test for returning 0 if a numerical value (as_pixels, as_float) was requested which doesn't exist. ([51f5bcb](https://github.com/Patternslib/patterns/commit/51f5bcb375a726e1ff7bd0820f8abb79d122d318))
* **pat tabs:** More debug messages. ([83fcfc5](https://github.com/Patternslib/patterns/commit/83fcfc5114a06b363bbb000c40c2f4f1686edf2c))


## [4.5.2](https://github.com/Patternslib/patterns/compare/4.5.1...4.5.2) (2021-06-28)


### Bug Fixes

* **pat tabs:** Only calculate available space twice: Once initially and then after the extra-tabs span including extra classes have been added. This should stabilize tabs calculation in some cases. ([923614a](https://github.com/Patternslib/patterns/commit/923614ab304b617bba64d62ac7b77a3f4cde41af))


### Maintenance

* **pat tabs:** Test for debounce timeout. ([3c184aa](https://github.com/Patternslib/patterns/commit/3c184aa161cef82b75afb1d85a00f91a839b9bfc))


## [4.5.1](https://github.com/Patternslib/patterns/compare/4.5.0...4.5.1) (2021-06-25)


### Bug Fixes

* **pat tabs:** Improve calculation of available width by querying the new available width after each recurision where a tab has been moved into the extra-tabs span. The width might change due to an applied padding when the extra-tabs span is added. ([92c284a](https://github.com/Patternslib/patterns/commit/92c284af00eb1f2a75363734efb4811b705f02b9))


## [4.5.0](https://github.com/Patternslib/patterns/compare/4.4.4...4.5.0) (2021-06-25)


### Bug Fixes

* **pat bumper:** Do not the intersection observer callback break when no root is found. ([008b307](https://github.com/Patternslib/patterns/commit/008b3079f33800628b56c422c6bb6096dd294e62))
* **pat bumper:** Wait for next repaint cycle before searching for the scroll container. Fixes a corner case where no scroll container was found after injecting content and initializing this pattern in the same repaint cycle where no CSS was yet applied. ([4da6918](https://github.com/Patternslib/patterns/commit/4da69182d421027b9d429c6a2ac9d12be3221e10))


### Breaking Changes

* **pat bumper:** Rework pat-bumper to only set bumping classes. Needs CSS position:sticky. Does not set positions via JavaScript anymore. Ensure performant operation by using an IntersectionObserver. Note: You need to set your pat-bumper elements via CSS to position: sticky. Ref: [#846](https://github.com/Patternslib/patterns/issues/846) Fixes: [#846](https://github.com/Patternslib/patterns/issues/846). Fixes: [#870](https://github.com/Patternslib/patterns/issues/870). ([82d3112](https://github.com/Patternslib/patterns/commit/82d3112edce9afd265c0f9c9b97a6036059b8b16))
* **pat sticky:** Remove obsolete polyfill for position: sticky. ([bb2bc9a](https://github.com/Patternslib/patterns/commit/bb2bc9ab346c703719229b856ecb0948922cc38c))


### Maintenance

* **dependencies:** Minor version upgrade of dependencies. ([92ac3d0](https://github.com/Patternslib/patterns/commit/92ac3d029b434178ca64872480449bbb58a15f5e))
* **pat bumper:** Remove unused/unnecessary side and margin options. Side is dropped as we always set the classes according to the bumped position. Margin is retrieved from the CSS. Register observers for x+y scroll containers if they are different. ([12d56e9](https://github.com/Patternslib/patterns/commit/12d56e9fc222d4fa80bcc8587620454de3a839a0))
* **pat bumper:** Warn and exit if no position:sticky support is available. E.g. IE11. ([3fe42a9](https://github.com/Patternslib/patterns/commit/3fe42a9e84b1819e0ed869c6587eebd638cea1af))


## [4.4.4](https://github.com/Patternslib/patterns/compare/4.4.3...4.4.4) (2021-06-24)


### Bug Fixes

* **pat tabs:** Improve available width calculation by excluding invisible and absolute positioned elements, making it more robust for different scenarios. ([bb0dd19](https://github.com/Patternslib/patterns/commit/bb0dd19a509d9d588b988b78730322b8a8971a64))


## [4.4.3](https://github.com/Patternslib/patterns/compare/4.4.2...4.4.3) (2021-06-24)


### Bug Fixes

* **pat forward:** Allow to define the delay with units, e.g. 100ms. ([add916b](https://github.com/Patternslib/patterns/commit/add916b9fec6df7fe89ebb6282e669bb4c86c0df))
* **pat scroll:** Allow to define the delay with units, e.g. 100ms. Fixes: [#869](https://github.com/Patternslib/patterns/issues/869) ([5a7f783](https://github.com/Patternslib/patterns/commit/5a7f783c24955107fcf1ead318eb808217025af0))
* **pat scroll:** Reverse the semantics of the scroll offset. Offsets are substracted from the target position to stop BEFORE it. Fixes: [#867](https://github.com/Patternslib/patterns/issues/867) ([318fc99](https://github.com/Patternslib/patterns/commit/318fc9927e426318d83a7de794aa96d8b31768f1))
* **pat tabs:** Do not count extra-tabs element against available width as this one is absolutely positioned. Fixes: [#868](https://github.com/Patternslib/patterns/issues/868). ([bb2e48c](https://github.com/Patternslib/patterns/commit/bb2e48cd57b145df32992cac32498dad973d00c8))


### Maintenance

* **pat autofocus:** Use utils.debounce instead custom logic. ([3c9a51c](https://github.com/Patternslib/patterns/commit/3c9a51cf6ce423ffed76e8b9407f0a37b6967b56))
* **pat calendar:** Use utils.debounce instead custom logic. ([abc4c21](https://github.com/Patternslib/patterns/commit/abc4c2123886b9a510d602b6e042228a38fb5cc0))
* **pat collapsible:** scroll semantics have changed for pat-scroll. Adapt tests and add doku. ([99a2d38](https://github.com/Patternslib/patterns/commit/99a2d387c23d17772ed869d9e413552d82c8539c))
* **pat navigation tests:** Use utils.timeout instead nested setTimeout in tests. ([a477076](https://github.com/Patternslib/patterns/commit/a477076aefe6c27c32d32b6f3323b29be8c32958))
* **pat selectbox:** Use utils.timeout instead setTimeout. ([0eea9b2](https://github.com/Patternslib/patterns/commit/0eea9b2cd87246ffe19bbca2d06945ee7672b29c))
* **pat tabs:** Clarify tabs calculation logic in code. ([98866ed](https://github.com/Patternslib/patterns/commit/98866eddfa67869efeaa40d5f94e54116d94b566))


## [4.4.2](https://github.com/Patternslib/patterns/compare/4.4.1...4.4.2) (2021-06-17)


### Bug Fixes

* **pat tabs:** Improve calculation of available space. It does now 1) check for line breaks of tab elements and 2) check if new position exceeds initial width of .pat-tabs container. ([6d323ac](https://github.com/Patternslib/patterns/commit/6d323ac664979b17453d077ae92e1dfcafa35201))


## [4.4.1](https://github.com/Patternslib/patterns/compare/4.4.0...4.4.1) (2021-06-16)


### Features

* **styles:** Introduce a ``_fonts.scss`` to do font imports. Fixes a problem where Webpack could not resolve the font assets path correctly. ([1439e0e](https://github.com/Patternslib/patterns/commit/1439e0e1610770e5447eb68f1ca32db44dfb6d92))
* **webpack:** Allow passing a config object which overrides keys from a base config. ([f8973ae](https://github.com/Patternslib/patterns/commit/f8973aedb0fdadd669aea4b4ee6d5e7164dda32e))


### Maintenance

* **dependencies:** Minor version updates. ([ccb00a0](https://github.com/Patternslib/patterns/commit/ccb00a0d1b98fec024a0b54802aa6ac3958939f2))
* **dependencies:** Upgrade fullcalendar to 5.8.0. ([3c8dcab](https://github.com/Patternslib/patterns/commit/3c8dcab120ca09cd517a64a088f49f1c12e426bb))


## [4.4.0](https://github.com/Patternslib/patterns/compare/4.3.1...4.4.0) (2021-06-15)


### Features

* **core utils debounce:** Improve cancelation of previous runs. ([a845264](https://github.com/Patternslib/patterns/commit/a845264379826a790291bfa71a392caa8f4479f2))
* **pat bumper:** Extra classes depending on bumped side ([#847](https://github.com/Patternslib/patterns/issues/847)). ([5b1acac](https://github.com/Patternslib/patterns/commit/5b1acac3cf67c0aa84208f31562e47e2c3724716))
* **pat collapsible:** async support for transition function. ([8c35a1a](https://github.com/Patternslib/patterns/commit/8c35a1afa86170dc966b84b67958548adeace1bd))
* **pat collapsible:** Scroll offset support. ([48a2cdd](https://github.com/Patternslib/patterns/commit/48a2cdddee49c7934fa6d49242cb90f899a135b6)), closes [#840](https://github.com/Patternslib/patterns/issues/840)
* **pat collapsible:** Scrolling support. ([18901c8](https://github.com/Patternslib/patterns/commit/18901c8b8fd9fd68dbbe771b11a7cdae14d5064a)), closes [#840](https://github.com/Patternslib/patterns/issues/840)
* **pat scroll:** Add support for selector self. ([be4d322](https://github.com/Patternslib/patterns/commit/be4d322929d6b1683163fd88636527be1e3eaeaf)), closes [#840](https://github.com/Patternslib/patterns/issues/840)
* **pat scroll:** Add trigger value "manual". ([f3a04a6](https://github.com/Patternslib/patterns/commit/f3a04a6ec2273cdbb2527e990303a0e11e4ca699)), closes [#840](https://github.com/Patternslib/patterns/issues/840)
* **pat scroll:** Allow a delay before scrolling ([#842](https://github.com/Patternslib/patterns/issues/842)). ([cd146eb](https://github.com/Patternslib/patterns/commit/cd146ebed9ea0da0a35a244a36144979222199e6))
* **pat scroll:** Support await for smoothScroll. ([0a353b3](https://github.com/Patternslib/patterns/commit/0a353b33309e7f308b20b1a91f4b5ef9026e768b))
* **pat tabs:** Extra classes to indicate tabs state ([#841](https://github.com/Patternslib/patterns/issues/841)). ([aa0efbe](https://github.com/Patternslib/patterns/commit/aa0efbeaa2adee456a5c16757fd662a6839978b1))


### Bug Fixes

* **pat tabs:** Improve calculation of available space of pat-tabs. Ref: [#848](https://github.com/Patternslib/patterns/issues/848). ([77787af](https://github.com/Patternslib/patterns/commit/77787af9907c502bf83cb7989312f2e8915364c6))


### Breaking Changes

* **pat scroll:** Apply offset to scrolling position. ([6d54876](https://github.com/Patternslib/patterns/commit/6d548761c6d5eb4a7c29dee877293ff53cd64bde)), closes [#840](https://github.com/Patternslib/patterns/issues/840)


### Maintenance

* **dependencies:** Upgrade dependencies on major level. ([c190e52](https://github.com/Patternslib/patterns/commit/c190e52bcf5e5b7e6a8901a137ec4574cb7624c2))
* **dependencies:** Upgrade dependencies on minor+patch level. ([53d1434](https://github.com/Patternslib/patterns/commit/53d1434bc87cad2c71aacf1dbeeb4b853c1c5c9c))
* **pat bumper:** Anounce breaking change for pat-bumper. The JavaScript based positioning will be dropped and needs to be done via CSS position:sticky only. This pattern will only set classes to indicate a bumped element. ([206b02f](https://github.com/Patternslib/patterns/commit/206b02f8bf7ac659d7a48ac6c9c8e3aafba7f0c6))
* **pat scroll:** Add debug message when scrolling. ([eeaf054](https://github.com/Patternslib/patterns/commit/eeaf05413fe5e0c7935eb5a64749def33b999d08))
* **pat scroll:** Un-skip selector:bottom test - it passes now. ([769e578](https://github.com/Patternslib/patterns/commit/769e5783403ca38bd1f6c8c76eb69f412bbf7357))
* **pat scroll:** Updated demo to properly show the use of `delay` ([#842](https://github.com/Patternslib/patterns/issues/842)). ([8984519](https://github.com/Patternslib/patterns/commit/8984519fab2dfe7f6377279f1f42e41963bf028c))
* **webpack:** Add config entry to minify all available bundles and chunks. No need to configure bundle minification in depending packages. ([b7b1587](https://github.com/Patternslib/patterns/commit/b7b1587e2206ea191e4795c4c03dc0b1d7759e13))
* **webpack:** Remove unnecessary moment resolve-alias. No need to overload in sub packages for that anymore. ([1127367](https://github.com/Patternslib/patterns/commit/112736716cda3e7872760e72ca9311a8d081db37))
* Minor code modernizations and cleanup. ([81fa5dc](https://github.com/Patternslib/patterns/commit/81fa5dca6a2bba9434977e17ea0ad7def4acced5))
* Replace last occurrences of underscore debounce with utils debounce. ([2ef57bf](https://github.com/Patternslib/patterns/commit/2ef57bfc13c97f4cb09542cf2f63d8d88c44ea4b))
* **webpack:** Update build system with necessary changed from recent version updates. We're still on Webpack 4. ([fbff9f9](https://github.com/Patternslib/patterns/commit/fbff9f9700a55ef33691afaac2375b83e115acd6))


## [4.3.1](https://github.com/Patternslib/patterns/compare/4.3.0...4.3.1) (2021-06-08)


### Bug Fixes

* **pat calendar:** Fix .cal-title only searched within calendar controls since 4.2.4. Fixes current date not being updated when browsing the calendar. ([7362b33](https://github.com/Patternslib/patterns/commit/7362b337b8a68ebd2d41bb1bb26bb4f3dd27130c))


### Maintenance

* **pat sticky:** Deprecate pat sticky. Use CSS position:sticky instead. ([8ac4603](https://github.com/Patternslib/patterns/commit/8ac4603c772a1fe3a3e2e1b38d1e0117124e2c7d))


## [4.3.0](https://github.com/Patternslib/patterns/compare/4.2.4...4.3.0) (2021-06-01)


### Features

* **core push kit:** Set connection parameters. ([427d0f1](https://github.com/Patternslib/patterns/commit/427d0f1e60653c95eef073f2a5279032702141e6))
* **core push kit:** Support for desktop notifications via patterns-notification-exchange and patterns-notification-filter meta tags. ([4c3a615](https://github.com/Patternslib/patterns/commit/4c3a6152ab1bf27dd19d350c11f9b742d961d113))
* **core push kit:** Use logging framework. ([515acc9](https://github.com/Patternslib/patterns/commit/515acc9d33265668f5162e0a8e94d4394259056b))
* **core push kit:** Use more generic patterns-push-filter instead patterns-push-user-id to show filtering is available for any topics. ([2aa51b7](https://github.com/Patternslib/patterns/commit/2aa51b78d44f5c459f9b99920962ea05014529db))


### Bug Fixes

* **pat push:** Fix push kit and push pattern for basic operation. ([34ecbf8](https://github.com/Patternslib/patterns/commit/34ecbf802b37e40855425e34453e2fac0b1857e7))


### Maintenance

* **core push kit:** Modernize code. ([8987d82](https://github.com/Patternslib/patterns/commit/8987d8201b984b0eed2ed89d014157ed79479c05))
* **core push kit:** Simplify push kit config, use url instead of server-url. ([6bed6be](https://github.com/Patternslib/patterns/commit/6bed6be0189d1f1dc86a9237f0518aaa03b7cb4d))
* **core push kit:** Upgrade stompjs ([4ad7532](https://github.com/Patternslib/patterns/commit/4ad7532d0b621a4c6192be05fe1db4f47b2ba076))
* **docs:** Add note about changing the loglevel through query parameters from https://github.com/Patternslib/logging#configuring-through-url ([695c56b](https://github.com/Patternslib/patterns/commit/695c56b474e81b43efb4bf4c3d23843ad1b1a03e))
* **pat push:** Modernize code. ([e3da26f](https://github.com/Patternslib/patterns/commit/e3da26f41554f944e4ea1924db3a0576aabcac57))
* **pat push demo:** Allow to pass the exchange name to the push send script. ([86435f0](https://github.com/Patternslib/patterns/commit/86435f00af14a95349b2773f0872f47566dd1aa6))
* **pat push demo:** Provide Makefile to manage rabbitmq and producer. ([743e210](https://github.com/Patternslib/patterns/commit/743e2109d5d20a53d8c0089ac093e5b51ab26488))
* **pat push demo:** Update documentation and examples. ([bdaaf84](https://github.com/Patternslib/patterns/commit/bdaaf84052007f13c6dfdd442c47a699b86f3fa4))


## [4.2.4](https://github.com/Patternslib/patterns/compare/4.2.3...4.2.4) (2021-04-28)


### Bug Fixes

* **core parser:** Allow line breaks and spaces before and after pattern arguments. ([ff9c248](https://github.com/Patternslib/patterns/commit/ff9c24865d37e8b0dfdebfe8c8e44963b5e3e2ef))
* **pat calendar:** Implement calendar-controls. ([bbbed29](https://github.com/Patternslib/patterns/commit/bbbed299404f08749eb6e8f65e62a6e88f8c7fc5))


### Maintenance

* **Tests:** Remove left-over log messages. ([058ba74](https://github.com/Patternslib/patterns/commit/058ba743cc454a8c1cd9be0260b26d8be47b5c28))


## [4.2.3](https://github.com/Patternslib/patterns/compare/4.2.2...4.2.3) (2021-04-26)


### Bug Fixes

* **pat scroll:** Fix scrolling on body as scroll container. ([a099517](https://github.com/Patternslib/patterns/commit/a099517f02bcd7a03e9cc6138ee9f18a79dcd1f0))


## [4.2.2](https://github.com/Patternslib/patterns/compare/4.2.1...4.2.2) (2021-04-23)


### Bug Fixes

* **pat date picker:** Add test to check for working clear button in styled behavior with formatted dates. Needs previous commit to work. ([cdb7ba4](https://github.com/Patternslib/patterns/commit/cdb7ba408b277663712da1cf8354119fee1c6dc4))
* **pat display time:** Restore old behavior and clear the pat-display-time contents on empty datetime attributes. ([58f992c](https://github.com/Patternslib/patterns/commit/58f992c25b0926c590fde30ce2ef2f7843822181))


### Maintenance

* Upgrade all version within the specified range. ([b0924a7](https://github.com/Patternslib/patterns/commit/b0924a7ccf8c5906f527ccb92296ffa0e534099b))


## [4.2.1](https://github.com/Patternslib/patterns/compare/4.2.0...4.2.1) (2021-04-22)


### Bug Fixes

* **pat date picker:** styled behavior: do not format the date when no output-format is given. Also, only import display-date when it's actually used. ([ca8ddae](https://github.com/Patternslib/patterns/commit/ca8ddaedfadb6b309154d195c0323f20df03c607))
* **pat display time:** Fix relative date / from-now option to work again. ([95e5dea](https://github.com/Patternslib/patterns/commit/95e5dea3f147b5bd5110f087049bbf36dbe3624a))


### Maintenance

* **pat display time:** Add tests with a fixed timezone. ([40bea37](https://github.com/Patternslib/patterns/commit/40bea37cdd27f3aec2d72a2fd5828ebe38bca6a4))
* **Release process:** Fix make release-patch target to really release a patch level version. release-it does default to minor level. ([35461c4](https://github.com/Patternslib/patterns/commit/35461c4186f316994f68d7fe40b464e55d51d9a8))


## [4.2.0](https://github.com/Patternslib/patterns/compare/4.1.0...4.2.0) (2021-04-21)


### Features

* **core utils:** Add localized_isodate utility method to return in ISO 8602 date. This is to work around timezone shifting issues with the UTC based toISOString method. ([2b395b7](https://github.com/Patternslib/patterns/commit/2b395b7017f73b63dc41c2886bb25654627315d0))


### Bug Fixes

* **pat date picker tests:** Fix failing test when running around midnight due to timezone shifting issues. ([3dd8527](https://github.com/Patternslib/patterns/commit/3dd852785f09f191498781afaba60e87ac18256a))


### Maintenance

* **Build:** Also babel-load mockup from node_modules. This simple addition makes unnecessarily complex overload code in mockup obsolete. ([76337b9](https://github.com/Patternslib/patterns/commit/76337b931d1f6cff5c3b177e2cc5773a1dfc6465))
* **Release workflow:** Do not include the release commit message in the changelog and bypass the commitlint pre-commit hook. ([3ef05dc](https://github.com/Patternslib/patterns/commit/3ef05dc5de83c0c0bee8fc75c0d6c1165245fb83))


## [4.1.0](https://github.com/Patternslib/patterns/compare/4.0.0...4.1.0) (2021-04-21)


### Features

* **core registry:** Do not scan patterns wrapped within ``<template>`` tags. ([d9889e3](https://github.com/Patternslib/patterns/commit/d9889e31d40216f59981b1d5a9297512dc2096d0))
* **core utils:** Add "ensureArray" which always returns an array. ([0981cb4](https://github.com/Patternslib/patterns/commit/0981cb45c2af4d93fdd58b81b834a0b4adfa6a04))
* **pat clone:** Allow ``<template>`` tags for clone templates. ([585d8ee](https://github.com/Patternslib/patterns/commit/585d8ee681a13837537d75f4d5c4545483e6923a))
* **pat date picker:** Add clear button for styled behavior. ([147df92](https://github.com/Patternslib/patterns/commit/147df9266c2ec97fe4397a38b0582ee4df37d709))
* **pat date picker:** Support disabled state and do not initialize the date picker. ([cbca469](https://github.com/Patternslib/patterns/commit/cbca4694be489a5d41233eeaa1fa1199f29a881f))
* **polyfill:** Add Node.remove polyfill. ([e6853be](https://github.com/Patternslib/patterns/commit/e6853bed5bfd6e584d2736cbd013f64bca075166))


### Bug Fixes

* **pat date picker:** Fix pat-validation compatiblity. ([61e7231](https://github.com/Patternslib/patterns/commit/61e7231799d53151ef7956b2a2210e5c87213b69))
* **pat date picker:** Improve pat-autosubmit compatibility. ([a8dc1c8](https://github.com/Patternslib/patterns/commit/a8dc1c80e76d30e691ea2248becf87ac9a9fd71a))


### Breaking Changes

* **pat date picker:** Allow for formatted dates in "styled" behavior. ([81fea60](https://github.com/Patternslib/patterns/commit/81fea60e161a6796c19ed5aa365f550db3268b67))
* **pat datetime picker:** Only support "native" behavior. ([b14503d](https://github.com/Patternslib/patterns/commit/b14503db9f1f25c2318c5fc1a9cff2c637bd9b92))


### Maintenance

* **Build:** Don't re-add the husky commitlint check, we have it already in the repository. ([9e3e899](https://github.com/Patternslib/patterns/commit/9e3e8994d75155f2e55a933a6e4e4182c86541a5))
* **Build:** Fix typo Maintainance->Maintenance. ([03ab244](https://github.com/Patternslib/patterns/commit/03ab244dad4b2029ef1a305f55c698b760bcc945))
* **Build:** Run yarn upgrade to get latest versions of dependencies within the specified range. ([1824a80](https://github.com/Patternslib/patterns/commit/1824a80010b15c9b3d8349cf3ec25115880cf160))
* **Cleanup:** cosmetics ([ad78c14](https://github.com/Patternslib/patterns/commit/ad78c142c28d7dbf14c49e8e91b6d8a4e68daf11))
* **Cleanup:** Increase JavaScript line length to 89 characters to make most ``// prettier-ignore`` statements obsolete. ([2e7e50f](https://github.com/Patternslib/patterns/commit/2e7e50f6747bfe1b3be928599232088758060682))
* **docs:** Update README and RELEASE for latest changes. ([385f02e](https://github.com/Patternslib/patterns/commit/385f02efbc2f4915c86e69dd3be1564634b44d3c))
* **Docs:** Note about use of the legend pattern. ([dd10577](https://github.com/Patternslib/patterns/commit/dd10577997c9141ce8da200ed0e570d237f57313))
* **pat date picker:** Add demo example including pat-clone. ([73f7c34](https://github.com/Patternslib/patterns/commit/73f7c344b9bbff6272b825dd54bf09ba1a7d5558))
* **pat date picker:** Document after/offset-days feature. ([8a209d2](https://github.com/Patternslib/patterns/commit/8a209d20f183593d130055b858539bfd2fb8ee56))
* **pat date picker:** Use async/await fetch for i18n and cleanup code. ([1546966](https://github.com/Patternslib/patterns/commit/1546966bf55ff16f4c9a10e849a5e2eb63bff4c7))
* **release:** call make step in release step ([223ba66](https://github.com/Patternslib/patterns/commit/223ba6629e1e66ad7e892aae3a71aa2e3c5e6507))
* **Release workflow:** Fixes to the release workflow. ([8f8314b](https://github.com/Patternslib/patterns/commit/8f8314baedb5711f2db804b1d8ea95990196e5d9))
* Install pre-commit hook for commit messge format. ([77d0a39](https://github.com/Patternslib/patterns/commit/77d0a39ddc5113b9103987521c1b2be3ed01ea52))
* **release:** Fix the release-web step ([f936f4d](https://github.com/Patternslib/patterns/commit/f936f4db7604c86a01c91abdfe0caba0c6bf7096))


## [4.0.0](https://github.com/Patternslib/patterns/compare/4.0.0-dev.0...4.0.0) (2021-04-15)


### Bug Fixes

* **core registry:** Re-add scanning of hidden patterns ([3cefe1b](https://github.com/Patternslib/patterns/commit/3cefe1b19570ff937c68bbf570c5a5e195832c67))
* **Webpack:** Need to set publicPath for dev server. ([bc4506a](https://github.com/Patternslib/patterns/commit/bc4506a613edf98dfea57f1cf2a439905659eb0b))


### Maintenance

* **Cleanup:** Configure editorconfig to use 4 spaces for .json files. ([7a54d4c](https://github.com/Patternslib/patterns/commit/7a54d4c81acb0b10a80a3f67bcae8aaab92ac4e5))
* **Cleanup:** Reformat package.json using 4 spaces instead of 2. ([c445219](https://github.com/Patternslib/patterns/commit/c445219b452f783c939e275b2867fd0a9b173225))
* **Docs:** Remove section about customizing ``__webpack_public_path__`` - this is now set automatically. ([4c7cedc](https://github.com/Patternslib/patterns/commit/4c7cedc847878dd4048b7b6472a1c711de73dd0e))
* **Docs:** Update developer documentation. ([ebb06d3](https://github.com/Patternslib/patterns/commit/ebb06d39b0bd84b247993c58e02c3a0736f5b065))
* **Docs:** Update release process documentation. ([c66a8b1](https://github.com/Patternslib/patterns/commit/c66a8b1c9ae9de8b17a018090bf3bc795a6c6f84))
* **pat clone:** Test for not initializing patterns wrapped within .cant-touch-this classes. ([698044f](https://github.com/Patternslib/patterns/commit/698044f07acffe0e37cc0c4d29060133f9d6cda2))
* **Release:** Add make targets for releasing Patternslib. ([7853726](https://github.com/Patternslib/patterns/commit/78537261471fcd7ceae4de6b06ac42a7f51e2ec4))
* **Release:** Do not auto-create github releases ([bebd0ce](https://github.com/Patternslib/patterns/commit/bebd0cedebfa2989204d5fc902b84b408c9b3d5f))
* **Release:** git tag is done by release-it, no need to do it manually ([d1a1a92](https://github.com/Patternslib/patterns/commit/d1a1a925fab78e7ce7b66cf89f88518c89f7eca6))
* **Release:** Load the version just changed by the release-it script anew and add major/minor/patch targets ([fbfbe64](https://github.com/Patternslib/patterns/commit/fbfbe64e81df9a0af3b1058721e512611fbe3345))
* **Release:** Tag the release in Github ([54952e8](https://github.com/Patternslib/patterns/commit/54952e8ecee05bab100aa94733595777cbdd1b83))
* **Release workflow:** Add 'release-web' target to Makefile for creating a bundle tarball to download. ([2d7bc5e](https://github.com/Patternslib/patterns/commit/2d7bc5e82c20e748ff65a3950ac7e02264fe01db))
* **Release workflow:** Add commitlint for consistent commits allowing for automatic changelog generation. ([6a14bb6](https://github.com/Patternslib/patterns/commit/6a14bb6d894e18e46da9c173eb492d0437448e1e))
* **Release workflow:** Configure release-it with changelog generation using conventional changelog. ([be3b1aa](https://github.com/Patternslib/patterns/commit/be3b1aa30517738c6c722e351c4baebc70f2cf5d))
* **Release workflow:** Install husky for commitlint pre-commit hook. ([ce41cbe](https://github.com/Patternslib/patterns/commit/ce41cbef2aea2d2c4d9c96e36d67bd799ffcdc44))
* **Webpack:** Add Modernizr to default bundle. ([23a691c](https://github.com/Patternslib/patterns/commit/23a691c08a5ce808751a7a13238bd11e8c71cd6d))
* **Webpack:** Change package scope to @patternslib/patternslib for the version 4 main release. ([991246d](https://github.com/Patternslib/patterns/commit/991246d31bb14000ad28518fc342187ad87732ed))
* yarn install. ([ac6d163](https://github.com/Patternslib/patterns/commit/ac6d163136f84579c6d43cbcbcb66c8f0f3c1cbb))
* **Webpack:** Do not hardcode-set the ``__webpack_public_path__`` in development mode. It's automatically set since recently. ([87c7878](https://github.com/Patternslib/patterns/commit/87c78781ac7b56be13b30f15e350774de870431e))
* **Webpack:** Move production and development configurations into main config. ([d94655f](https://github.com/Patternslib/patterns/commit/d94655fdae91538f08ce0916860f39aebd4391ee))
* **Webpack:** Remove the optimization.minimize config option and let it be set by dev/prod modes. ([3812d19](https://github.com/Patternslib/patterns/commit/3812d194e033c80405998ea586aa05a8c1c2ab78))
* **Webpack:** Use argv.mode insted of env.NODE_ENV following recommendations. ([632c294](https://github.com/Patternslib/patterns/commit/632c29490906d5563738260d63a9d9574df01d96))


## 4.0.0-dev - unreleased

### Breaking

-   Upgrade to ES6 style imports and remove RequireJS.
-   Removed unused or obsolete patterns:
    -   pat-carousel-legacy - use pat-carousel instead.
    -   pat-checked-flag - use pat-checklist instead.
    -   pat-chosen - use pat-autosuggest instead.
    -   pat-edit-tinymce
    -   pat-placeholder - placeholder fully supported since IE10.
    -   pat-slideshow-builder
    -   simplePlaceholder from jquery-ext.
-   IE11 is not supported by default anymore.
    There is a `polyfills` bundle, which adds IE11 support for the time being.
    The `polyfills` bundle can be injected on demand with the `polyfills-loader` script.
-   pat tooltip: Remove undocumented "souce: content-html" parameter.
-   pat tooltip: Remove undocumented "souce: auto" parameter. This parameter should not be used as it is not explicit enough and would lead to unintuitive behavior.
-   pat tooltip: Change show/hide classes to ``tooltip-active-click`` resp. ``tooltip-active-hover`` and ``tooltip-inactive``.
    Fixes: https://github.com/quaive/ploneintranet/issues/3723
-   Remove outdated pre IE9 browser compatibility polyfill `core/compat`.
-   Remove unused `lib/htmlparser`.
-   Remove obsolete library `prefixfree`.
-   pat date picker: Remove ``format`` argument and just use the ISO 8601 standard "YYYY-MM-DD", like the specification of date inputs defines it.
    Format would have submitted a formatted value where the ISO standard is expected.
    This also allows for removing the dependency of ``pat-date-picker`` on MomentJS.
-   pat datetime picker:
        - Change CSS selectors for better namespacing and remove implicit dependency on glyphicons.
        - Remove dependency on MomentJS.
        - After updating the original input, let the ``change`` event bubble up.
        - Support ``native`` behavior.


### Features

-   pat gallery: Import styles for photoswipe.
-   pat carousel: Import styles for slick carousel.
-   pat auto suggest: Import styles for select2.
-   pat-tooltip: Import styles for tippy.
-   pat-modal: Import styles.
-   pat datetime picker: Import styles.
-   pat date picker: Import styles for pikaday.
-   Styles: Import styles by setting ``__patternslib_import_styles``
    Allow importing styles from external libraries in Patternslib JavaScript via the global variable ``window.__patternslib_import_styles`` set to ``true``.
    This allows loading these styles automatically via Webpack.
    Disable setting style import per default.
-   pat carousel: Use ``imagesloaded`` instead of timeout to wait for images to have been loaded.
-   core registry: Do not scan patterns within trees with attribute ``hidden`` or class ``cant-touch-this``.
-   Implenent lazy loading for external libraries via dynamic imports. Leads to significantly reduced bundle sizes.
-   Upgrade pat-calendar to use latest fullcalendar version (5.3.0).
-   pat calendar: Add fullcalendar list views.
-   pat calendar: Store the current date and view in query parameters.
-   pat calendar: Fetch events from the backend.
-   pat calendar: Allow filtering/hiding events based in comparing the checkbox id with the classes of the displayed events.
-   pat calendar: Support `pat-inject` on events with a URL via `pat-inject-source` and `pat-inject-target` configuration options.
-   pat calendar: Support `pat-switch` for rendered events via some configuration options.
-   pat calendar: Support `pat-tooltip` on events with a URL via `pat-tooltip-source` set to `ajax`.
-   pat calendar: Support `pat-modal` on events with a URL via `pat-modal-class` set to some CSS class names.
-   pat calendar: Store view, date and active categories per URL, allowing to individually customize the calendar per page.
-   pat calendar: Support `url` in the event JSON model additionally to `@id`.
    The unique identifier is often not semantically correct for a URL to the item, especially when we want to call a specific view.
-   pat tooltip: Use tippy v6 based implementation.
-   pat tooltip: Introduce new option ``arrowPadding`` to define the padding of the box arrow from the corners of the tooltip.
-   pat tooltip: set content when mounting to avoid positioning problems.
-   Allow overriding the public path from outside via the definition of a ``window.__patternslib_public_path__`` global variable.
-   Introduce new ``core/dom`` module for DOM manipulation and traversing.
    ``core/dom`` includes methods which help transition from jQuery to the JavaScript DOM API.
-   core dom: Add ``get_parents`` to return all parent elements from a given DOM node.
-   core dom: Add ``toNodeArray`` to return an array of DOM nodes if a NodeList, single DOM node or a jQuery object was passed.
-   core dom: Add ``querySelectorAllAndMe`` to do a querySelectorAll including the starter element.
-   core dom: Add ``wrap`` wrap an element with a wrapper element.
-   core dom: Add ``hide`` and ``show`` for DOM elements which retain the original display value.
-   core dom: Add ``find_parents`` to find all parents of an element matching a CSS selector.
-   core dom: Add ``find_scoped`` to search for elements matching the given selector within the current scope of the given element
-   core dom: Add ``is_visible`` to check if an element is visible or not.
-   core dom: Add ``create_from_string`` to create a DOM Element from a string.
    unless an ``id`` selector is given - in that case the search is done globally.
-   pat date picker: Support updating a date if it is before another dependent date.
-   pat tabs: Refactor based on ``ResizeObserver`` and fix problems calculating the with with transitions.
-   pat tabs: When clicking on the ``extra-tabs`` element, toggle between ``open`` and ``closed`` classes to allow opening/closing an extra-tabs menu via CSS.
-   pat autofocus: Do not autofocus in iframes. Fixes: #761.
-   pat inject: Allow configurable error pages by defining the error page URLs via meta tags with the name ``pat-inject-status-``.
    Can be disabled by adding ``pat-inject-errorhandler.off`` to the URL's query string.
-   core utils: Add ``jqToNode`` to return a DOM node if a jQuery node was passed.
-   pat inject: Rebase URLs in pattern configuration attributes. This avoids URLs in pattern configuration to point to unreachable paths in the context where the result is injected into.
-   pat forward: Add `delay` option for delaying the click action forwarding for a given number of milliseconds.
-   pat forward: Add `self` as possible value for the `selector` option to trigger the event on itself.
-   pat-scroll: Implement `selector:bottom` attribute value to scroll to the bottom of the scroll container.
-   pat-scroll: Do handle click events also when trigger is set to `auto`.


### Technical

-   Infrastructure: Upgrade jQuery to 3.6.0.
-   Webpack: Backport changes from Mockup - add loaders for images, svg, sass and xml.
-   Webpack: Automatically detect the chunk path or "__webpack_public_path__" while still allowing for overriding via "__patternslib_public_path__".
-   Export all parsers in all patterns to be able to modify default values or add aliases.
-   core polyfills: Add polyfill for Node.closest method.
-   Core Base: ``await`` for initalization in the base class constructor, so that the ``init`` event is really thrown after initialization is done.
-   pat calendar: Explicitly import JavaScript language files to avoid missing Webpack TypeScript loader errors.
-   Use Babel for all files, allowing latest JavaScript features everywhere.
-   Add example `minimalpattern`.
-   Replace `slave` terminology with `dependent`.
-   Update build infrastructure and packages.
-   Use yarn instead of npm.
-   Use node-sass instead of Ruby sass.
-   Use eslint instead jshint.
-   Use Jest with jsdom as testing framework instead of Karma/Jasmine.
-   Do not automatically start a browser when starting the development server.
-   Allow for the JavaScript feature "optional chaining" via Babel.
-   Do not depend on `modernizr`.
-   Core store: Ignore invalid JSON values.
-   Core utils: Add method to check input type support.
-   Core utils: Add new async timeout function. Used for waiting in tests.
-   Core utils: Add `checkCSSFeature` method to be used instead of `modernizr` feature detection.
-   Core: Allow plain DOM nodes for initalization in base and parser.
-   Build infrastructure: Build into /dist and cleanup before building.
-   utils: Add `isIE` method to detect Internet Explorer browsers.
-   Build infrastructure: Configure babel for less transformations when in ``development`` environment for better code readability.
-   Core Base: Register a plain DOM nodes as ``this.el`` alongside the jQuery node.
-   Webpack: Add CSS from JS at first in HEAD.
    Configure ``style_loader`` to insert CSS at the TOP of the html ``<head>``
    Provide a webpack-helpers module with a ``top_head_insert`` function which can be reused in depending projects.
-   Build infra: Switch the CI system to GitHub Actions and drop Travis CI.
-   core base: Add the parser instance to pattern attributes if available.
    We can then reuse the parser from registered patterns. This is used in the ``_rebaseHTML`` method of pat-inject to URL-rebase the pattern configuration.


### Fixes

-   core dom is_visible: Mock in tests to check only for hidden to avoid unavailable offsetWidth/offsetHeight in Jest.
-   pat calendar, pat checklist, pat datetime-picker: Dispatch DOM events with bubbling and canceling features enabled, as real DOM events do.
    Fixes a problem where calendar categories did not show their initial state correctly.
-   pat inject: Make sure that nested pat-inject element have the correct context for target ``self``. Fixes: https://github.com/quaive/ploneintranet.prototype/issues/1164
-   pat calendar: Fix language loading error "Error: Cannot find module './en.js'"
-   pat depends, pat auto suggest: Fix a problem with initialization of ``pat-auto-suggest`` which occurred after the lazy loading changes.
-   pat checklist: Also dispatch standard ``change`` event when de/selecting all items.
-   pat select: Add missing ``<span>`` element around the select element itself. Fixes: https://github.com/quaive/ploneintranet.prototype/issues/1087
-   pat depends/core utils: Do not set inline styles when showing elements in transition mode ``none``. Fixes #719.
-   pat scroll: Fix scrolling offset incorrectly applied. Fixes: #763.
-   Core registry: Fix ``transformPattern`` to also work with patterns which extend from Base.
    Fixes a problem with pat-auto-suggest not auto submitting.
-   pat autofocus: Implement documented behavior to not focus on prefilled element, if there is another autofocus element which is empty.
-   pat autofocus: Instead of calling autofocus for each element call it only once.
-   pat autofocus: Register event handler only once.
-   pat-checklist: For global de/select buttons, do not change any other checkboxes than the ones the de/select button belongs to.
-   Documentation fixes:
    -   pat-inject: Fix documentation about special target ``self`` and demo that behavior.
    -   pat-autosubmit: Fix demo to show configuration on individual inputs.
    -   pat-clone demo: Remove unstyled tooltip/clone demo
    -   pat date picker demo: Use current date for min/max example.
    -   pat depends demo: Remove unused sections.
    -   pat expandable tree demo: Extend the demo with more levels and folders.
    -   pat scroll demo: Remove debug page.

