Skip to content

Release 9.8.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@thet thet released this 11 Dec 23:19
· 526 commits to master since this release

9.8.0-beta.1 (2022-12-11)

Features

  • core basepattern: Add a destroy method. (f9ca65a)The destroy method removes the pattern instance from the element.
    This is necessary to re-initialize the same pattern on the same element.

  • core events: Support await_pattern_init with pattern double registration attempt. (e8640a9)When a pattern is tried to be initialized on the same element twice,
    throw an event and use that event in await_pattern_init to reject
    the promise. When using await_pattern_init you might want to
    try/catch the block to handle any possible double-registration
    errors.

  • core events: Support once-events in add_event_listener. (fc0e333)Add support for once-events in add_event_listener and unregister them
    when called from the event_listener_map.

Bug Fixes

  • pat-tooltip: Cleanup tooltip after it's destroyed. (ac27e20)When the tooltip is destroyed, also call the tooltip's BasePattern destroy
    method to clean up and release the tooltip from the element. After that
    it can be instantiated on the same element again.
    This change was necessary after the recent BasePattern change.

  • pat-validation: Make sure to cancel submit events on invalid forms. (e218af2)Make sure that submit events are canceled on invalid forms by using a
    capturing event handler which is invoked before non-capturing events.

The previous commit exposed a problem with the submit event handling,
where the then non-capturing submit event handler was registered
later than the one from pat-inject because pat-validation's async
init method where pat-inject's init method is yet non-async. That
happened even the pat-validation's pattern initialization is
enforced to run first due to registration reordering in the Pattern
registry. Now with the capturing event handler this problem is
fixed.

Maintenance

  • core basepattern: Use identity instead equality comaprison instead in tests for stricter testing. (ce962d2)

  • Exclude more files from npm packages. (c312b96)

  • Only include dist/ and src/ directories in the npm package. (babc4b6)

  • pat-validation: Change to class based pattern. (11543ea)This is needed for better customization in deriving projects.

  • Upgrade dependencies. (399105f)

  • Use browserslist defaults. (8867fd8)