@amplifyup/sdk 0.3.2 → 0.3.3-uat.110.gb0b2158

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/react.mjs CHANGED
@@ -2197,13 +2197,13 @@ var AmplifyUpSDK = class {
2197
2197
  });
2198
2198
  }
2199
2199
  /**
2200
- * Track form field interaction
2200
+ * Track form field interaction. The typed value is never sent: the event
2201
+ * carries the field name and whether the field was filled.
2201
2202
  */
2202
2203
  trackFormFieldInteraction(fieldName, fieldValue) {
2203
2204
  this.track("Form Field Interaction", {
2204
2205
  fieldName,
2205
- fieldValue: fieldValue ? fieldValue.substring(0, 100) : void 0
2206
- // Truncate for privacy
2206
+ filled: Boolean(fieldValue)
2207
2207
  });
2208
2208
  }
2209
2209
  /**
@@ -4058,26 +4058,11 @@ function ComposerProvider({
4058
4058
  const detail = event.detail || {};
4059
4059
  applyProps(detail.props, detail.layoutNodeId);
4060
4060
  };
4061
- const onMessage = (event) => {
4062
- if (event.data?.type === "AMPLIFYUP_PROPS_PATCH") {
4063
- applyProps(event.data.props, event.data.layoutNodeId);
4064
- return;
4065
- }
4066
- if (event.data?.type !== "AMPLIFYUP_FIELD_PATCH") return;
4067
- applyField(
4068
- event.data.fieldName,
4069
- event.data.value,
4070
- event.data.layoutNodeId,
4071
- event.data.ref
4072
- );
4073
- };
4074
4061
  window.addEventListener("amplifyup:field-patch", onPatch);
4075
4062
  window.addEventListener("amplifyup:props-patch", onPropsPatch);
4076
- window.addEventListener("message", onMessage);
4077
4063
  return () => {
4078
4064
  window.removeEventListener("amplifyup:field-patch", onPatch);
4079
4065
  window.removeEventListener("amplifyup:props-patch", onPropsPatch);
4080
- window.removeEventListener("message", onMessage);
4081
4066
  };
4082
4067
  }, [ownsStore, store]);
4083
4068
  return /* @__PURE__ */ jsx(ComposerStoreContext.Provider, { value: store, children });