@codebards/ik-embeddable-form 0.0.2678487150-qa → 0.0.2678648663-qa

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/embed.js CHANGED
@@ -1658,9 +1658,9 @@ var IKEmbeddableFormBundle = function(exports) {
1658
1658
  return id;
1659
1659
  }
1660
1660
  const WORDPRESS_FIELD_CLICK_IDS = {
1661
- fullName: "Full-Name",
1662
- email: "Email-Address-7",
1663
- phone: "webinar_pnumber",
1661
+ fullName: "name-input",
1662
+ email: "email-input",
1663
+ phone: "phone-input",
1664
1664
  experience: "gql_experience",
1665
1665
  domain: "gql_domain_role",
1666
1666
  primaryGoal: "gql_Start_Interviewing",
@@ -1673,9 +1673,9 @@ var IKEmbeddableFormBundle = function(exports) {
1673
1673
  };
1674
1674
  const STEP_VIEW_CLICK_IDS = {
1675
1675
  "slot-selection": "webinar-modal_button_show-webinar-slots",
1676
- "profile-details": "Gql-form_button_gpl-registration-step",
1677
- "goals-details": "Gql-form_button_gpl-registration-step",
1678
- "consultation-prefs": "Gql-form_button_gpl-registration-step"
1676
+ "profile-details": "Gql-form_button_gql-registration-step",
1677
+ "goals-details": "Gql-form_button_gql-registration-step",
1678
+ "consultation-prefs": "Gql-form_button_gql-registration-step"
1679
1679
  };
1680
1680
  const WORDPRESS_BACK_CLICK_ID = "webinar-modal_button_go-back";
1681
1681
  function resolveFieldClickId(fieldName) {
@@ -1734,7 +1734,7 @@ var IKEmbeddableFormBundle = function(exports) {
1734
1734
  }
1735
1735
  function resolveClickId(formData, stepId, clickId) {
1736
1736
  const ctx = getWebinarContextOrNull();
1737
- const fromConfig = "";
1737
+ const fromConfig = stepId ? PROCEED_CLICK_IDS[stepId] : "";
1738
1738
  return fromConfig || String(formData.dataClickId ?? formData.DataClickID ?? (ctx == null ? void 0 : ctx.dataClickId) ?? stepId ?? "");
1739
1739
  }
1740
1740
  function buildFormEventsRow(formData, clickId) {
@@ -1992,7 +1992,12 @@ var IKEmbeddableFormBundle = function(exports) {
1992
1992
  return () => this.listeners.delete(listener);
1993
1993
  }
1994
1994
  async start() {
1995
+ var _a;
1995
1996
  this.analytics.trackFormOpen(this.config.id, this.openConfig.variant);
1997
+ const dataClickId = (_a = this.openConfig.dataClickId) == null ? void 0 : _a.trim();
1998
+ if (dataClickId) {
1999
+ void trackClickActivity(dataClickId, {});
2000
+ }
1996
2001
  this.fireStepAnalytics(this.getCurrentStep());
1997
2002
  this.startSlotsPrefetch();
1998
2003
  await this.maybeAutoExecute(this.getCurrentStep());
@@ -2070,6 +2075,10 @@ var IKEmbeddableFormBundle = function(exports) {
2070
2075
  this.setState({ formData: this.buildInitialFormData() });
2071
2076
  }
2072
2077
  }
2078
+ /** Top-right "X" close icon specifically - distinct from success/error close paths. */
2079
+ trackCloseIconClick() {
2080
+ void trackClickActivity("Icon_material-close", {});
2081
+ }
2073
2082
  trackSlotSelection(slot) {
2074
2083
  const data = {
2075
2084
  ...this.enrichFormDataForApi(),
@@ -20185,11 +20194,15 @@ var IKEmbeddableFormBundle = function(exports) {
20185
20194
  engine.onClose();
20186
20195
  onClose();
20187
20196
  };
20197
+ const handleCloseIconClick = () => {
20198
+ engine.trackCloseIconClick();
20199
+ handleClose();
20200
+ };
20188
20201
  return /* @__PURE__ */ u$1(
20189
20202
  Modal,
20190
20203
  {
20191
20204
  isOpen: true,
20192
- onClose: handleClose,
20205
+ onClose: handleCloseIconClick,
20193
20206
  config,
20194
20207
  openConfig,
20195
20208
  progressSteps,
@@ -20806,7 +20819,7 @@ ${intlTelStyles}`;
20806
20819
  destroy();
20807
20820
  },
20808
20821
  getVersion() {
20809
- return "1.0.23";
20822
+ return "1.0.24";
20810
20823
  }
20811
20824
  };
20812
20825
  if (typeof window !== "undefined") {