powerpagestoolkit 2.2.0 → 2.3.101
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/bundle.js +7 -2
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -257,10 +257,14 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
257
257
|
} else {
|
|
258
258
|
this.element.addEventListener("input", this.updateValue.bind(this));
|
|
259
259
|
}
|
|
260
|
+
this._observeValueChanges();
|
|
260
261
|
}
|
|
261
262
|
updateValue() {
|
|
262
263
|
switch (this.element.type) {
|
|
263
264
|
case "checkbox":
|
|
265
|
+
this.value = +this.element.checked;
|
|
266
|
+
this.checked = this.element.checked;
|
|
267
|
+
break;
|
|
264
268
|
case "radio":
|
|
265
269
|
this.value = this.element.checked;
|
|
266
270
|
this.checked = this.element.checked;
|
|
@@ -270,6 +274,8 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
270
274
|
this.element.selectedOptions
|
|
271
275
|
).map((option) => option.value);
|
|
272
276
|
break;
|
|
277
|
+
case "select-one":
|
|
278
|
+
this.value = this.element.value;
|
|
273
279
|
case "number":
|
|
274
280
|
this.value = this.element.value !== "" ? Number(this.element.value) : null;
|
|
275
281
|
break;
|
|
@@ -281,9 +287,8 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
281
287
|
this.yesRadio.updateValue();
|
|
282
288
|
this.noRadio.updateValue();
|
|
283
289
|
this.checked = this.yesRadio.checked;
|
|
284
|
-
this.value = this.yesRadio
|
|
290
|
+
this.value = +this.yesRadio.checked;
|
|
285
291
|
}
|
|
286
|
-
this._observeValueChanges();
|
|
287
292
|
}
|
|
288
293
|
// Add a method to observe value changes using MutationObserver
|
|
289
294
|
_observeValueChanges() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerpagestoolkit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.101",
|
|
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/index.d.ts",
|