powerpagestoolkit 2.0.1 → 2.0.102
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/dist/@types/DOMNodeReference.d.ts +1 -0
- package/dist/bundle.js +11 -1
- package/package.json +7 -1
package/dist/bundle.js
CHANGED
|
@@ -253,7 +253,6 @@ var DOMNodeReference = class {
|
|
|
253
253
|
if (elementType === "checkbox" || elementType === "radio") {
|
|
254
254
|
this.element.addEventListener("click", this.updateValue.bind(this));
|
|
255
255
|
} else if (elementType === "select-one" || elementType === "select" || elementType === "select-multiple") {
|
|
256
|
-
this.element.addEventListener("input", this.updateValue.bind(this));
|
|
257
256
|
this.element.addEventListener("change", this.updateValue.bind(this));
|
|
258
257
|
} else {
|
|
259
258
|
this.element.addEventListener("input", this.updateValue.bind(this));
|
|
@@ -282,6 +281,17 @@ var DOMNodeReference = class {
|
|
|
282
281
|
this.yesRadio.updateValue();
|
|
283
282
|
this.noRadio.updateValue();
|
|
284
283
|
}
|
|
284
|
+
this._observeValueChanges();
|
|
285
|
+
}
|
|
286
|
+
// Add a method to observe value changes using MutationObserver
|
|
287
|
+
_observeValueChanges() {
|
|
288
|
+
const observer = new MutationObserver(() => {
|
|
289
|
+
this.updateValue();
|
|
290
|
+
});
|
|
291
|
+
observer.observe(this.element, {
|
|
292
|
+
attributes: true,
|
|
293
|
+
attributeFilter: ["value"]
|
|
294
|
+
});
|
|
285
295
|
}
|
|
286
296
|
_attachVisibilityController() {
|
|
287
297
|
this.visibilityController = this.element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerpagestoolkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.102",
|
|
4
4
|
"description": "Reference, manipulate, and engage with Power Pages sites through the nodes in the DOM; use a variety of custom methods that allow customizing your power pages site quicker and easier. ",
|
|
5
5
|
"main": "./dist/bundle.js",
|
|
6
6
|
"types": "./dist/@types",
|
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
"frontend",
|
|
54
54
|
"web-development"
|
|
55
55
|
],
|
|
56
|
+
"exports": {
|
|
57
|
+
".": {
|
|
58
|
+
"import": "./dist/index.js",
|
|
59
|
+
"types": "./dist/index.d.ts"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
56
62
|
"files": [
|
|
57
63
|
"dist/bundle.js",
|
|
58
64
|
"dist/@types"
|