@aranova/tracking-react 1.9.0 → 1.11.0

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/client.mjs CHANGED
@@ -1077,9 +1077,15 @@ function parseConversionConfig(raw) {
1077
1077
  services,
1078
1078
  goals,
1079
1079
  linked_hostnames: Array.isArray(obj.linked_hostnames) ? obj.linked_hostnames.filter((h) => typeof h === "string" && h.length > 0) : [],
1080
- integrations: parseIntegrations(obj.integrations)
1080
+ integrations: parseIntegrations(obj.integrations),
1081
+ lead_forms: parseLeadForms(obj.lead_forms)
1081
1082
  };
1082
1083
  }
1084
+ function parseLeadForms(value) {
1085
+ if (!value || typeof value !== "object") return null;
1086
+ const version2 = value.registry_version;
1087
+ return typeof version2 === "number" ? { registry_version: version2 } : null;
1088
+ }
1083
1089
  var CACHE_PREFIX = "_aranova_cfg_";
1084
1090
  function cacheKey(url) {
1085
1091
  return `${CACHE_PREFIX}${url}`;
@@ -2660,6 +2666,7 @@ var jsonValueSchema = z7.lazy(
2660
2666
  z7.record(z7.string(), jsonValueSchema)
2661
2667
  ])
2662
2668
  ).register(z7.globalRegistry, { id: "JsonSerializableValue" });
2669
+ var contractName = z7.string().check(z7.regex(/^[a-z][a-z0-9_]{0,47}(:[a-z0-9_-]{1,48})?$/));
2663
2670
  var formSubmitMetadataSchema = z7.strictObject({
2664
2671
  form: z7.strictObject({
2665
2672
  id: z7.string(),
@@ -2670,9 +2677,24 @@ var formSubmitMetadataSchema = z7.strictObject({
2670
2677
  name: z7.string(),
2671
2678
  type: z7.string(),
2672
2679
  label: z7.nullable(z7.string()),
2673
- value: jsonValueSchema
2680
+ value: jsonValueSchema,
2681
+ role: z7.optional(z7.nullable(contractName))
2674
2682
  })
2675
2683
  )
2684
+ ),
2685
+ kind: z7.optional(z7.nullable(contractName)),
2686
+ contract_version: z7.optional(z7.nullable(z7.int().check(z7.gte(1)))),
2687
+ contract_hash: z7.optional(z7.nullable(z7.string().check(z7.maxLength(64)))),
2688
+ extra: z7.optional(
2689
+ z7.nullable(
2690
+ z7.array(
2691
+ z7.strictObject({
2692
+ key: z7.string().check(z7.maxLength(64)),
2693
+ label: z7.string().check(z7.maxLength(200)),
2694
+ value: jsonValueSchema
2695
+ })
2696
+ ).check(z7.maxLength(20))
2697
+ )
2676
2698
  )
2677
2699
  }),
2678
2700
  page: z7.strictObject({
@@ -3958,7 +3980,7 @@ function GoogleAdsTracking(props) {
3958
3980
  import { createContext as createContext2, useContext as useContext2, useEffect as useEffect5, useMemo as useMemo4 } from "react";
3959
3981
 
3960
3982
  // package.json
3961
- var version = "1.9.0";
3983
+ var version = "1.11.0";
3962
3984
 
3963
3985
  // ../tracking-core/src/phone-react.tsx
3964
3986
  import {