Skip to content

Commit eb2ab00

Browse files
committed
Release new version.
1 parent 56a220c commit eb2ab00

File tree

2 files changed

+105
-1
lines changed

2 files changed

+105
-1
lines changed

CHANGES.md

+104
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,110 @@ See the [history](./docs/history/index.md) for older changelog entries.
44

55

66

7+
## [9.9.6-alpha.3](https://github.com/Patternslib/patterns/compare/9.9.6-alpha.2...9.9.6-alpha.3) (2023-10-16)
8+
9+
10+
### Features
11+
12+
13+
* **core events:** remove_event_listener - support removal by id and all at once. ([2e78439](https://github.com/Patternslib/patterns/commit/2e78439fcac3827ffd7d77811859bdd0b4ba3f9a))
14+
15+
Previously registered events can now be removed by a matching id with no
16+
element given, like:
17+
remove_event_listener(undefined, "my-event-id");
18+
When called with no parameters like "remove_event_listener()" all
19+
registered events are removed.
20+
21+
22+
* **core events:** remove_event_listener - support wildcard ids. ([b2d0651](https://github.com/Patternslib/patterns/commit/b2d0651a66b0d2e41c1f9da4ea01b22bd95a9d30))
23+
24+
The id parameter can be a wildcard string, e.g. `test-*-event`, which
25+
would match any event which starts with "test-" and ends with "-event".
26+
The wildcard "*" can be anywhere in the string and also be used multiple
27+
times. If no wildcard is present the search string is used for an exact
28+
match.
29+
30+
31+
* **core utils:** regexp_from_wildcard - Create regular expressions from wildcard strings. ([4cf724a](https://github.com/Patternslib/patterns/commit/4cf724af6eab7d558dce5bec5d6d378033012386))
32+
33+
This utility can be used for search strings with wildcards like "test-*-xyz".
34+
The wildcard can be at the beginning, somewhere in the middle or at the
35+
end and multiple wildcards can be used.
36+
This method was factored out from removeWildcardClass for broader usage.
37+
38+
39+
40+
### Bug Fixes
41+
42+
43+
* **core events:** Fix references in add_event_listener and remove_event_listener. ([7dd9aff](https://github.com/Patternslib/patterns/commit/7dd9aff5f5e079ab511225e4dd3a04a33c07de36))
44+
45+
add_event_listener and remove_event_listener did incorrectly use an
46+
object instead of a map to store element references. This is now fixed.
47+
48+
49+
* **core events:** Fixes for remove_event_listener. ([c2caf48](https://github.com/Patternslib/patterns/commit/c2caf4830f7295e6a4962c16f02dbc1f9e1f029c))
50+
51+
- Fix removing all events on a given element.
52+
- Clean up the event registry after removing events.
53+
54+
55+
* **pat checklist:** Fix incorrect usage of the dispatch method. ([0e6eb01](https://github.com/Patternslib/patterns/commit/0e6eb0180d18d00da7fdd89d4305d901f322ffeb))
56+
57+
This fixes a performance problem with pat-checklist.
58+
59+
60+
* **pat-inject:** Don't submit forms with invalid data. ([a0fa4d2](https://github.com/Patternslib/patterns/commit/a0fa4d2743ef0d96c2c58ebf2d6d14bd37188859))
61+
62+
Fix a problem with pat-inject and pat-validation where forms with
63+
invalid data could be submitted and the submit button wasn't inactive.
64+
The problem was fixed in two ways:
65+
66+
- pat-inject now has a check for browser-native form validation. Invalid
67+
forms would not be submitted.
68+
69+
- pat-inject now waits a tick before it get's initialized. Modern
70+
BasePattern based patterns including pat-validation are all deferred
71+
for 1 tick by design. pat-inject, being and older Pattern isn't
72+
deferred and thus initialized before pat-inject. It's initialized
73+
before pat-validation even though we have some Pattern initialization
74+
reorganization code in place - pat-inject not being deferred will have
75+
it's event handlers always run before any others. But now, with the
76+
1-tick defer in place, pat-inject's event handlers are run in the
77+
correct order - after pat-validation form validation which in case of
78+
an invalid form would also deactivate the submit button.
79+
80+
81+
82+
### Maintenance
83+
84+
85+
* **core utils:** Dispatch - document postpone parameter. ([cd7822c](https://github.com/Patternslib/patterns/commit/cd7822c53ff677ad16977791ad064baa6960a37d))
86+
87+
Better document the postpone parameter of the dispatch method.
88+
89+
90+
* **pat checklist:** Infinite scrolling example. ([18ac157](https://github.com/Patternslib/patterns/commit/18ac1575b7f0c96ddd943aaba7d70c01b6ef9340))
91+
92+
Add infinite scrolling example to demonstrate a performance problem
93+
which is solved by in this release.
94+
95+
96+
* **pat checklist:** Use Patternslib event factory. ([e12aaac](https://github.com/Patternslib/patterns/commit/e12aaace66eae8fcb1052ecb10e5e361a819d0aa))
97+
98+
Use Patternslib core event factory for the change event.
99+
100+
101+
* **pat checklist:** Use Patternslib event listeners. ([69831f3](https://github.com/Patternslib/patterns/commit/69831f34c49e33ee1224c511cb721c45b1a39268))
102+
103+
Change to Patternslib core event listeners to avoid double registration
104+
and allow better unregistration.
105+
106+
This fixes a performance problem with pat-checklist.
107+
108+
109+
* Upgrade dependencies. ([35bbd9c](https://github.com/Patternslib/patterns/commit/35bbd9cd3e4a16713481bd199b296fce0632843d))
110+
7111
## [9.9.6-alpha.2](https://github.com/Patternslib/patterns/compare/9.9.6-alpha.1...9.9.6-alpha.2) (2023-08-30)
8112

9113

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patternslib/patternslib",
3-
"version": "9.9.6-alpha.2",
3+
"version": "9.9.6-alpha.3",
44
"title": "Markup patterns to drive behaviour.",
55
"description": "Patternslib is a JavaScript library that enables designers to build rich interactive prototypes without the need for writing any Javascript. All events are triggered by classes and other attributes in the HTML, without abusing the HTML as a programming language. Accessibility, SEO and well structured HTML are core values of Patterns.",
66
"license": "BSD-3-Clause",

0 commit comments

Comments
 (0)