powerpagestoolkit 2.0.0 → 2.0.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.
@@ -40,6 +40,7 @@ export declare const _init: unique symbol;
40
40
  [_init](): Promise<void>;
41
41
  private _initValueSync;
42
42
  updateValue(): void;
43
+ private _observeValueChanges;
43
44
  private _attachVisibilityController;
44
45
  private _attachRadioButtons;
45
46
  /**
package/dist/bundle.js CHANGED
@@ -281,6 +281,17 @@ var DOMNodeReference = class {
281
281
  this.yesRadio.updateValue();
282
282
  this.noRadio.updateValue();
283
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
+ });
284
295
  }
285
296
  _attachVisibilityController() {
286
297
  this.visibilityController = this.element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerpagestoolkit",
3
- "version": "2.0.0",
3
+ "version": "2.0.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/@types",