Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@patternslib/patternslib

Package Overview
Dependencies
Maintainers
7
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternslib/patternslib - npm Package Versions

13
16

9.9.10-alpha.1

Diff

Changelog

Source

9.9.10-alpha.1 (2023-11-09)

Features

  • core dom: find_form - find a related form element. (01b348d)

    Add a function to find a related form element. If called on any element it would first try to get a input element and get it's associated form - which can be different and as a last resort to find the element's enclosing form. Otherwise return undefined.

Bug Fixes

  • pat autosubmit: Re-add support for autosubmit on non form elements. (a2530f3)

    Fix a problem introduces in Patternslib 9.9.7 where pat-autosubmit did not work when not defined on a form or input element.

As a side effect, the submit event is now always invoked on the related or nearest form of the element where pat-autosubmit was defined on. If that element is not a form element a related (input.form) or the nearest parent form is searched and the submit event invoked upon.

Maintenance

  • pat autosubmit: Improve debug messages. (8c01058)

  • pat inject: Add more debug messages. (fddb3b6)

thet
published 9.9.10-alpha.0 •

Changelog

Source

9.9.10-alpha.0 (2023-11-08)

Features

  • core events: Support the submitter property on submit_event events. (2e6b7e5)

Bug Fixes

  • pat autosubmit: Fix a typo where pat-autosubmit wasn't working for subforms anymore. (3be0170)

  • pat autosubmit: Trigger the submit event with the correct submitter property. (36c0c36)

    This resp. the previous commit in event.js fixes a problem where the submitter was the added to the browser automatically and could lead to incorrect form submission data in combination with pat-ajax. E.g. we had a case where for a file upload the delete button's value was submitted, where it shouldn't have.

thet
published 9.9.9 •

Changelog

Source

9.9.9 (2023-11-06)

Features

  • pat inject: Support submit buttons with child elements. (3821ca8)

    Send the value of a submit button even if a child element of the submit button was clicked and not the submit button itself.

Bug Fixes

  • pat inject: Fix issue with submit buttons which are added later. (edf9f5e)

    Fix an issue with submit buttons which were added after initialization of pat-inject which did not send their value (e.g. via a pat-inject call).

Ref: scrum-1670

Maintenance

  • pat inject: Restructure pat-inject 9.2 tests. (981d71f)

  • Upgrade caniuse-lite db. (8ccdc6d)

thet
published 9.9.8 •

Changelog

Source

9.9.8 (2023-10-23)

Bug Fixes

  • pat-push: Fix form submits not working with pat-inject. (09822c5)

  • pat-subform: Fix subform submits not working with pat-inject. (79436cb)

Maintenance

  • pat-ajax: Use bare JavaScript submit for tests. (98e4235)

  • pat-inject: Use bare JavaScript submit for tests. (bec5184)

  • pat-sortable: Use bare JavaScript submit for tests. (59bbe4d)

thet
published 9.9.7 •

Changelog

Source

9.9.7 (2023-10-22)

Features

  • core events: Add a event factory for a generic bubbling and cancelable event. (ed6777e)

Bug Fixes

  • pat-inject: Fix problem with pat-autosubmit together with pat-sortable and/or pat-clone. (2e3d9a2)

  • pat-inject: Fix problem with pat-autosubmit. (8ab6029)

    Fix a problem since Patternslib 9.9.6 where pat-inject didn't work together with pat-autosubmit.

Maintenance

  • pat-autosubmit: Add a test for delayed autosubmit. (e487ff5)

  • pat-autosubmit: Make use of add_event_listener. (035bd76)

    This has advantages regarding preventing double registrations and allowing wildcard removal.

  • pat-autosubmit: Number the individual test cases. (9d20ea1)

  • pat-autosubmit: Simplify the sortable+clone demo example a bit. (a8b316b)

  • pat-inject: Log a warning if inject isn't initialized when pushState isn't available. (2b897ca)

thet
published 9.9.6 •

Changelog

Source

9.9.6 (2023-10-20)

thet
published 9.9.6-alpha.3 •

Changelog

Source

9.9.6-alpha.3 (2023-10-16)

Features

  • core events: remove_event_listener - support removal by id and all at once. (2e78439)

    Previously registered events can now be removed by a matching id with no element given, like: remove_event_listener(undefined, "my-event-id"); When called with no parameters like "remove_event_listener()" all registered events are removed.

  • core events: remove_event_listener - support wildcard ids. (b2d0651)

    The id parameter can be a wildcard string, e.g. test-*-event, which would match any event which starts with "test-" and ends with "-event". The wildcard "*" can be anywhere in the string and also be used multiple times. If no wildcard is present the search string is used for an exact match.

  • core utils: regexp_from_wildcard - Create regular expressions from wildcard strings. (4cf724a)

    This utility can be used for search strings with wildcards like "test-*-xyz". The wildcard can be at the beginning, somewhere in the middle or at the end and multiple wildcards can be used. This method was factored out from removeWildcardClass for broader usage.

Bug Fixes

  • core events: Fix references in add_event_listener and remove_event_listener. (7dd9aff)

    add_event_listener and remove_event_listener did incorrectly use an object instead of a map to store element references. This is now fixed.

  • core events: Fixes for remove_event_listener. (c2caf48)

    • Fix removing all events on a given element.
  • Clean up the event registry after removing events.
  • pat checklist: Fix incorrect usage of the dispatch method. (0e6eb01)

    This fixes a performance problem with pat-checklist.

  • pat-inject: Don't submit forms with invalid data. (a0fa4d2)

    Fix a problem with pat-inject and pat-validation where forms with invalid data could be submitted and the submit button wasn't inactive. The problem was fixed in two ways:

  • pat-inject now has a check for browser-native form validation. Invalid forms would not be submitted.

  • pat-inject now waits a tick before it get's initialized. Modern BasePattern based patterns including pat-validation are all deferred for 1 tick by design. pat-inject, being and older Pattern isn't deferred and thus initialized before pat-inject. It's initialized before pat-validation even though we have some Pattern initialization reorganization code in place - pat-inject not being deferred will have it's event handlers always run before any others. But now, with the 1-tick defer in place, pat-inject's event handlers are run in the correct order - after pat-validation form validation which in case of an invalid form would also deactivate the submit button.

Maintenance

  • core utils: Dispatch - document postpone parameter. (cd7822c)

    Better document the postpone parameter of the dispatch method.

  • pat checklist: Infinite scrolling example. (18ac157)

    Add infinite scrolling example to demonstrate a performance problem which is solved by in this release.

  • pat checklist: Use Patternslib event factory. (e12aaac)

    Use Patternslib core event factory for the change event.

  • pat checklist: Use Patternslib event listeners. (69831f3)

    Change to Patternslib core event listeners to avoid double registration and allow better unregistration.

This fixes a performance problem with pat-checklist.

thet
published 9.9.6-alpha.2 •

Changelog

Source

9.9.6-alpha.2 (2023-08-30)

Maintenance

  • Upgrade pat-tiptap with new tiptap version. (f0c2602)
thet
published 9.9.6-alpha.1 •

Changelog

Source

9.9.6-alpha.1 (2023-08-30)

Breaking Changes

  • pat-scroll: Remove implicit and unpreventable scroll support for pat-stacks. (92e1e6b)

    With a pat-scroll as parent of a pat-stacks enabled navigation anchors, the page would scroll to the target configured for pat-scroll. This behavior could not be prevented and led to unwanted effects when using pat-stacks inside pat-collapsible which itself uses pat-scroll when configured properly.

This commit removes the scrolling support for pat-stacks within pat-scroll in favor of an explicit and configurable scrolling behavior in pat-stacks itself.

Features

  • core dom: Add dom.element_uuid to get/set an uuid to a DOM node. (a7e5de1)

  • pat stacks: Add a destroy method to unregister event handlers. (8479cfa)

  • pat-stacks: Add configurable scroll support. (a8aae63)

    Add "scroll-selector" and "scroll-offset" arguments to pat-stacks, likewise as in pat-collapsible. "scroll-selector" accepts a CSS selector string or the special values "self" to scroll to the element itself and "none" to block any scrolling behavior from parent pat-stacks configuration options.

With these configuration options you can control the scrolling behavior for pat-stacks on a fine-grained level.

Maintenance

  • pat-stacks: Adapt code to Patternslib standards. (2f95379)

  • Upgrade dependencies. (9bd50b8)

thet
published 9.10.0 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc