@lynx-js/web-elements 0.12.3 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @lynx-js/web-elements
|
|
2
2
|
|
|
3
|
+
## 0.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Preserve custom element false-attribute filtering metadata when applying the component decorator. ([#2603](https://github.com/lynx-family/lynx-stack/pull/2603))
|
|
8
|
+
|
|
3
9
|
## 0.12.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
|
|
|
11
11
|
let templateElement;
|
|
12
12
|
const attributeReactiveClasses = attributeReactiveClassesOptional.filter((e) => Boolean(e));
|
|
13
13
|
return (target, { addInitializer }) => {
|
|
14
|
+
var _a;
|
|
14
15
|
const observedStyleProperties = new Set([
|
|
15
16
|
...attributeReactiveClasses
|
|
16
17
|
.filter((e) => e.observedCSSProperties)
|
|
@@ -20,7 +21,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
|
|
|
20
21
|
// @ts-ignore
|
|
21
22
|
class CustomElement extends target {
|
|
22
23
|
static registerPlugin(reactiveClass) {
|
|
23
|
-
|
|
24
|
+
_a.observedAttributes.push(...reactiveClass.observedAttributes);
|
|
24
25
|
if (reactiveClass.observedCSSProperties) {
|
|
25
26
|
for (const property of reactiveClass.observedCSSProperties) {
|
|
26
27
|
observedStyleProperties.add(property);
|
|
@@ -83,7 +84,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
|
|
|
83
84
|
/** handle attribute='false' */
|
|
84
85
|
setAttribute(qualifiedName, value) {
|
|
85
86
|
if (value.toString() === 'false'
|
|
86
|
-
&& !
|
|
87
|
+
&& !_a.notToFilterFalseAttributes?.has(qualifiedName)
|
|
87
88
|
&& !qualifiedName.startsWith('data-')) {
|
|
88
89
|
this.removeAttribute(qualifiedName);
|
|
89
90
|
return;
|
|
@@ -94,7 +95,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
|
|
|
94
95
|
const attributes = this.attributes;
|
|
95
96
|
for (let index = 0, attr; (attr = attributes.item(index)); index++) {
|
|
96
97
|
if (attr.value === 'false'
|
|
97
|
-
&& !
|
|
98
|
+
&& !_a.notToFilterFalseAttributes?.has(attr.name)
|
|
98
99
|
&& !attr.name.startsWith('data-')) {
|
|
99
100
|
this.removeAttributeNode(attr);
|
|
100
101
|
}
|
|
@@ -105,7 +106,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
|
|
|
105
106
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
106
107
|
super.attributeChangedCallback
|
|
107
108
|
&& super.attributeChangedCallback(name, oldValue, newValue);
|
|
108
|
-
if (!
|
|
109
|
+
if (!_a.notToFilterFalseAttributes?.has(name)
|
|
109
110
|
&& !name.startsWith('data-')) {
|
|
110
111
|
if (oldValue === 'false')
|
|
111
112
|
oldValue = null;
|
|
@@ -219,6 +220,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
|
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
}
|
|
223
|
+
_a = CustomElement;
|
|
222
224
|
addInitializer(() => {
|
|
223
225
|
customElements.define(tag, CustomElement);
|
|
224
226
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-elements",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -139,8 +139,8 @@
|
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@playwright/test": "^1.58.2",
|
|
142
|
-
"@rsbuild/core": "
|
|
143
|
-
"@rsbuild/plugin-source-build": "1.0.
|
|
142
|
+
"@rsbuild/core": "2.0.11",
|
|
143
|
+
"@rsbuild/plugin-source-build": "1.0.5",
|
|
144
144
|
"@types/markdown-it": "^14.1.1",
|
|
145
145
|
"nyc": "^17.1.0",
|
|
146
146
|
"tslib": "^2.8.1",
|