Skip to content

Releases: Patternslib/Patterns

Release 9.8.0-alpha.0

05 Dec 21:36
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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)

Release 9.7.0-alpha.1

11 Oct 05:27
Compare
Choose a tag to compare
Release 9.7.0-alpha.1 Pre-release
Pre-release

9.7.0-alpha.1 (2022-10-11)

Features

  • Build: Add global switch window.__patternslib_disable_modernizr to optionally disable modernizr. (2a0ec96)While this is convenient to quickly disable modernizr and also splits modernizr out from the main bundle entry file it was necessary for the clone-code pattern to get a clean code example for the whole html tree.

  • core registry: Move clone-code Pattern to the beginning. (9f7f5ef)We want clone-code to clone the markup before any other patterns are
    modifying it.

  • pat-date-picker: Add placeholder support for styled behavior. (752036f)/cc @cornae
    This fixes the following two issues:

Fixes: #837
Fixes: quaive/ploneintranet.prototype#1289

  • pat-markdown: Initialize syntax highlight when parsing markup. (8fd88c0)

  • pat-markdown: Switch to marked as markdown library to support better syntax highlight libraries. (3739935)

  • pat-sortable: Add the sortable-item class to each sortable element. (0513102)The current situation requires the integrator to add the sortable-item class
    on all sortables manually. If that is not done there can be styling problems
    like a missing insert marker which makes it hard to use the pattern. As the
    pattern already defines what should be a sortable it we also let the pattern
    assign the class "sortable-item".

  • pat-sortable: Optionally import the sortable styles. (fe90c73)Import the sortable styles when the global variable
    __patternslib_import_styles is set to true (the default is false).
    This allows to show the sortable marker without having to separately
    load all the styles.

  • pat-sortable: Support dynamic sortable lists. (5f3076c)When new items were added to a sortable list e.g. via pat-clone or
    pat-inject, those items could not be sorted. We are now re-initializing
    the sortable pattern after a pat-update event and make new elements
    sortable.

  • pat-syntax-highlight: Switch to highlight.js. (85212ba)highlight.js allows to dyamically load languages in a webpack
    environment (almost, see next commit). Prism.js is mainly a Node.js
    library and currently not suited to load languages dynamically.

  • pat-validation: Validate also newly added form elements. (8838da0)When form elements were added via user interaction - e.g. by using
    pat-clone or pat-inject - those elements were not validated. Now the
    form validation is re-initialized after a pat-update event and this
    problem is fixed.

Bug Fixes

  • core registry: Do not scan TextNode content for patterns. (76a83c5)TextNode cannot hold markup, so there is also no needto scan those
    elements for patterns.

  • pat-date-picker: Do not throw a blur event after selecting a date. (a20a883)When a date was selected with the date picker a blur and changed
    event was thrown. Now we only throw a changed event if da date was
    selected. If no date was selected we throw a blur event allow
    pat-validation do validate required date input fields when no value was
    given.

  • pat-syntax-highlight: Depend on highlight.js <11. (0f00d8c)highlight.js version 11 does not allow dynamic imports of languages and
    styles with webpack due to an exports field in package.json.

See: highlightjs/highlight.js#3634

  • pat-validation: Fallback error messages for not-before and not-after. (831ee60)If no error messages were provided for the not-before and not-after
    constraints on date fields no error messages were shown even when those inputs
    had form validation errors.
    Now we are always providing a fallback error message based on the label
    or input name.

  • pat-validation: Fix problem with multiple form validation runs. (a8b7981)Due to some event listers calling each other multiple times, the form
    was validated up to 5 times in one validation run. This commit fixes
    multiple validation runs when a form element was disabled, e.g. when the
    submit button was disabled after validation errors.

Maintenance

  • core utils: Improve escape/unescape for safer version which makes use use of browser features. (97ca0b1)

  • core utils: safeClone - document which versions of IE are affected. (8bec57a)

  • pat-markdown: Modernize code. (81c4e14)

  • pat-syntax-highlight: Switch to class based pattern. (8fb23e1)

  • pat-toggle: Add alias attribute for attr to toggle an attribute. (fcfdb84)

  • pat-validation: Rename log to logger for better naming. (9ed77c8)

  • pat-validation: Use more debug messages. (c8c656a)

Release 9.7.0-alpha.0

28 Sep 23:16
Compare
Choose a tag to compare
Release 9.7.0-alpha.0 Pre-release
Pre-release

9.7.0-alpha.0 (2022-09-28)

Features

  • Add class based base pattern. (5933a35)This is a new way to define Patterns by extending the BasePattern class and instantiating it on an element.
    This is additionally to the old Base pattern approach or even the very old approach of just defining a Pattern following the specs.
    The BasePattern class in core/basepattern uses JavaScript classes with all the object oriented benefits.
    Yes, that might be syntactic sugar, but then again not.

For usage see: src/core/basepattern.md

Maintenance

  • core registry: Support class based pattern initialization. (2c9e9dd)

Release 9.6.1

28 Sep 15:58
Compare
Choose a tag to compare

9.6.1 (2022-09-28)

Bug Fixes

  • core dom: show/hide - do not set the hidden attribute. (af24138)In Chrome and Safari hidden but required input fields (e.g. hidden automatically by pat-autosuggest or pat-date-picker) cannot be submitted if they fail the browser's native validation.
    The browser tries to set a validation message but fails because the element is not focusable.
    See: https://stackoverflow.com/a/28340579/1337474

Release 9.6.0

28 Sep 09:55
Compare
Choose a tag to compare

9.6.0 (2022-09-28)

Features

  • core events: Add blur and focus event factories. (c5942d2)

  • pat auto suggest: Improve pat-validation integration. (11e9a0b)Allow pat-validate to check for validity when select2 was interacted with but
    no value selected.

  • pat date picker: Improve pat-validation integration. (57c974b)Allow pat-validate to check for validity when date picker was interacted with
    but no value selected.

  • pat validation: Validate whole form on submit or single error. (bc27e41)Validate the whole form when a single error happens and some elements were
    disabled or when a form submit is done.
    This gives the user a better feedback about any data problems in the
    form and allows the user to see any other errors at all since the submit
    elements could have been disabled and form validation would eventually
    not be triggered.

Maintenance

  • Build: Upgrade dependencies. (b3f4f0a)

  • core dom: Fix signature of removeAttribute in show method. (58ddc8e)

  • pat date picker: Use logging framework instead of console.log. (e35932f)

  • Update close-panel documentation. (4a4cd49)