Skip to content

Releases: Patternslib/Patterns

Release 9.8.0-beta.0

07 Dec 15:16

Choose a tag to compare

Release 9.8.0-beta.0 Pre-release
Pre-release

9.8.0-beta.0 (2022-12-07)

Bug Fixes

  • Build: Fix tiptap error. (6e67655)Fix tiptap "Unhandled Promise Rejection" error due to multiple versions
    of a tiptap dependency installed. Removing yarn.lock in re-installing
    solves this.

Release 9.8.0-alpha.3

07 Dec 13:17

Choose a tag to compare

Release 9.8.0-alpha.3 Pre-release
Pre-release

9.8.0-alpha.3 (2022-12-07)

Bug Fixes

  • pat-clone-code: Fix a Content-Security-Policy problem. (e38f987)Do not use dom.template for the wrapper template to not get caught by
    the browser's Content-Security-Policy. If set, a unsafe-eval error would
    be thrown and the pattern refuse to run.

Breaking Changes

  • pat-validation: Remove error-template option. (78c544b)This is a breaking change.

Due to a Content-Security-Policy problem with dom.template when
unsafe-eval is not set - which you wouldn't set if possible - we had to
remove the error-template parameter. Instead the template is now defined
in a error_template method on the Patten class and can be customized by
subclassing and extending the pat-validation pattern or by patching it
via Pattern.prototype.

Maintenance

  • Build: Upgrade dependencies. (fed2716)

  • core dom template: Warn about using dom.template due to a CSR probmel. (989fa9f)Warn about a problem of dom.template with a Content-Security-Policy set.
    If a CSR rule is set then dom.template would break the code unless
    'unsafe-eval' is allowed (which you wouldn't normally allow when using a CSR).
    Therefore it is not recommended to use this template function.

  • pat-clone-code: Better example, correct documentation. (028ba07)

  • Remove IE related code paths. (9de0d95)

Release 9.8.0-alpha.2

07 Dec 00:56

Choose a tag to compare

Release 9.8.0-alpha.2 Pre-release
Pre-release

9.8.0-alpha.2 (2022-12-07)

Features

  • Build: Include the build in the npm package. (544b589)The compiled build is now included in npm packages by including the dist
    directory in .npmignore. To not increase the package size too much the
    JavaScript map files are not included. Now you can include Patternslib
    by using unpkg or jsDelivr like so:

https://unpkg.com/@patternslib/[email protected]/dist/bundle.min.js
or
https://cdn.jsdelivr.net/npm/@patternslib/[email protected]/dist/bundle.min.js

  • core dom: Add is_input method. (554e32e)Add "is_input" to test if a element is of input type.
    This is basically the same as $(":input") from Sizzle/jQuery.

  • pat-markdown: Soft-depend on pat-syntax-highlight. (cf0f6e3)Only highlight code blocks when the pattern is available.

Not hard-depending and importing pat-syntax-highlight fixes a problem
where only including pat-markup also included pat-syntax-highlight and
it's big highlight.js library.

This can reduce the generated bundle size significantly.

  • pat-tooltip: Soft-depend on pat-markdown. (1f81238)Only register the markdown data type handler when the pattern is available.

Not hard-depending and importing pat-markdown fixes a problem where only
including pat-tooltip also included pat-markdown and
pat-syntax-highlight with it's big highlight.js library.

This can reduce the generated bundle size significantly.

Bug Fixes

  • pat-bumper: Fix runtime error due to reference to wrong container. (893d392)

  • pat-collapsible: Class-based patterns cannot be jQuery plugins. (eedcc47)

  • pat-syntax-highlight: Do not load all languages. (c34d4a0)Change the import so that no language is included by default.
    Instead import the languages dynamically.

This reduces the download size when pat-syntaax-highlight is used
significantly.

  • pat-syntax-highlight: Fix language registration. (19bbb53)Fix a typo where all languages were registered as "javascript".

Maintenance

  • Add deprecation note for public_path. (f6d8124)

  • Build: Remove the IE11 polyfills-loader. (6eaddec)Clear out the polyfills-loader script but keep the module for backwards
    compatibility. No IE11 compatibility polyfills are included anymore as
    support for IE11 has recently really and finally dropped. The
    polyfills-loader.js file is still shipped but empty for compatibility
    with projects including the polyfills loader.

  • Build: Remove unused prismljs and google-code-prettify modules. (ed808e5)

  • Build: Update browserslist setting. (a29b9e8)Explicitly remove ie11 from browserslist.
    It wasn't used due to the "not dead" setting anyways.

  • Build: Upgrade @patternslib/dev. (ed8d13a)

  • Build: Upgrade pat-tiptap to 4.7.0. (ad0be10)

  • core basepattern: Avoid code linting problem. (d2836bd)Avoid code linting problem and make clear the init method is/can be
    asynchronous.

  • pat-markdown: Improve registering the markdown handler for pat-inject. (3f17e99)Wait a tick before registering the markdown type handler for pat-inject.

With that there is no need for pat-inject to be imported before
pat-markdown, as long as it is imported side by side with pat-markdown.

  • pat-markdown: Switch to class based pattern. (c6dc8b0)

  • pat-stacks: The trigger should be a static property. (4f0bb0f)

  • pat-syntax-highlight: The trigger should be a static property. (e341681)

  • pat-tooltip: Switch to class based pattern. (4fdb12a)

Release 9.8.0-alpha.1

06 Dec 17:18

Choose a tag to compare

Release 9.8.0-alpha.1 Pre-release
Pre-release

9.8.0-alpha.1 (2022-12-06)

Bug Fixes

  • pat-bumper: Do not calculate padding/margin on viewport. (baae37c)On the viewport as scrolling container paddings and margins are not
    influencing the sticky element's position. This is contrary to other
    scrolling containers within the document. The position calculation is
    easier and only consists of the clientWidth/Height to respect scrollbar
    widths.

  • pat-bumper: Fix position calculation for sticky elements. (4da8d70)Following the sticky position specification only top, right, bottom and
    left values are used to compute the position relative to the scrolling
    container.

  • pat-bumper: Support dynamic position values. (b70fad2)The container and element positions need to be calculated every time, as
    they are likely to be changed by dynamically assigned classes. This can
    be the case for different position values based on the scrolling
    direction classes set by pat-scroll-box.

Maintenance

  • Build: Upgrade dependencies. (5e5b54d)

  • pat-autofocus: Fix sporadic autofocus test failures. (9c13c56)

Release 9.8.0-alpha.0

05 Dec 21:36

Choose a tag to compare

Release 9.8.0-alpha.0 Pre-release
Pre-release

9.8.0-alpha.0 (2022-12-05)

Features

  • core basepattern: Provide the parser as static attribute. (49db677)This change is backwards compatible Change the parser attribute to a
    static attribute and provide it also on the object. This change was
    necessary because pat-inject was using the parser on a registered
    Pattern class to rebase URL configurations in the rebaseHTML method.
    There was no access to the parser attribute on non-instatiated objects
    before, now it is.

  • pat-autosuggest: Add a configurable separator for multiple values. (21cbe8f)

Bug Fixes

  • pat-auto-suggest: Adapt to changes from pat-depends where the event is called on the pat-depends element itself. (926de33)

  • pat-autofocus: Refocus on DOM updates by other Patterns. (4dc2963), closes #1092Set the focus if appropriate when the DOM has changed and a pat-update
    event has thrown. Please note, this does not use an IntersectionObserver
    but relies on other Patterns using the pat-update event. This behavior
    got lost in Patternslib 6.1 and is now restored.Fixes: #1092

  • pat-bumper: Correctly set the bumpuing classes. (e66b987), closes #1083The bumping classes are now set correctly on any bumping direction.

The logic is adapted to work with any top, right, bottom, left, margin, border
and padding setting on a wrapping container, two different containers for x and
y scrolling and on the window viewport as container.Fixes: #1083

  • pat-scroll-box: Fix failing tests due to timing inconsitencies. (7a03ef8)

Maintenance

  • core utils: utils.hideOrShow: add updated dom to pat-update event data. (0b5f92f)

  • pat stacks: Modernize code. (7928880)

  • pat-autofocus: Switch to class based patterns. (4302d6c)

  • pat-bumper: Correct documentation. (fa0254c)

  • pat-bumper: No IE11 support anymore. (bae3f55)

  • pat-bumper: Switch to class based patterns. (2b04cbc)

  • pat-clone-code: Make parser attribute a static attribute. (eb70b84)

  • pat-clone: Add updated dom to pat-update event data. (18375fe), closes #1092Related: #1092

  • pat-clone: Modernize code. (f0d8d5b)

  • pat-collapsible: Add updated dom to pat-update event data. (fde478c), closes #1092Related: #1092

  • pat-collapsible: Modernize code. (870f6dc)

  • pat-collapsible: Switch to class based pattern. (417b0d6)

  • pat-depends: Always throw update event and add changed dom structure. (6152afd), closes #1092Trigger pat-update on pat-depends itself and add updated dom structure to pat-update event data.
    This allows other patterns to also listen to changes in pat-depends.
    Goes together with the previous change on pat-autofocus.Related: #1092

  • pat-equaliser: Add updated dom to pat-update event data. (c66a431)

  • pat-scroll: Add updated dom to pat-update event data. (fc23966)

  • pat-scroll: Code cleanup. (4f27b99)

  • pat-scroll: Fix test markup. (9b788a0)

  • pat-sortable: Add updated dom to pat-update event data. (18711eb)

  • pat-stacks: Add updated dom to pat-update event data. (41f8bb3)

  • pat-stacks: Switch to class based pattern. (6065eae)

  • pat-switch: Add updated dom to pat-update event data. (7434236)

  • pat-toggle: Add updated dom to pat-update event data. (56a0073)

Release 9.7.0

15 Nov 22:17

Choose a tag to compare

9.7.0 (2022-11-15)

Maintenance

  • Build: Upgrade dependencies. (9258dff)

Release 9.7.0-alpha.5

26 Oct 22:34

Choose a tag to compare

Release 9.7.0-alpha.5 Pre-release
Pre-release

9.7.0-alpha.5 (2022-10-26)

Bug Fixes

  • pat markdown: Restore old behavior where the trigger element was replaced with the rendered content wrapped in a div. (ecb0330)

Release 9.7.0-alpha.4

24 Oct 23:37

Choose a tag to compare

Release 9.7.0-alpha.4 Pre-release
Pre-release

9.7.0-alpha.4 (2022-10-24)

Features

  • core dom: Add "delete_data" to remove a previously set variable on a DOM element. (6b128bf)

Bug Fixes

  • pat inject: Fix closing of panels after successful inject. (3ff3b60)Fix case where close-panel event was suppressed while injection is in progress but suppressing was never released.
    This prevented any other close-panel events from being handled properly.

Release 9.7.0-alpha.3

17 Oct 07:52

Choose a tag to compare

Release 9.7.0-alpha.3 Pre-release
Pre-release

9.7.0-alpha.3 (2022-10-17)

Features

  • core basepattern: Add one-time event listener registration method. (7df79e7)This implements the one-time listener from the Base pattern.
    The listener helper is used in to wait for the pattern initialization to be finished.

Bug Fixes

  • core base: Do not fail if initialized with an empty jQuery object. (34b14b4)

Release 9.7.0-alpha.2

15 Oct 13:25

Choose a tag to compare

Release 9.7.0-alpha.2 Pre-release
Pre-release

9.7.0-alpha.2 (2022-10-15)

Features

Maintenance

  • Build: Move webpack Module Federation config from here to @patternslib/dev but keep backwards compatible exports in here. (a0f7c07)

  • Build: Upgrade dependencies. (d6c34ac)

  • Docs: Document core.dom.is_visible. (e4f7bfe)

  • Tests: Remove unnecessary console.log from pat-validation tests. (fdaea14)

  • Tests: Remove unnecessary console.log statements from pat-clone-code tests. (19843ad)

  • Tests: Update is_visible mock to latest code changes - hidden is not set anymore due to form validation incompatibilities with Chrome. (41e56e0)

  • Tests: Use real path for @patternslib/patternslib module mapping. When extending this config elsewhere the path would not be right. (37520b7)