@mx-cartographer/experiences 6.2.9-alpha.al4 → 6.2.9-alpha.al5

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/index.es.js CHANGED
@@ -3198,21 +3198,22 @@ const Dn = ({
3198
3198
  sx: c = {},
3199
3199
  title: d = ""
3200
3200
  }) => {
3201
- const [_, { height: u, width: h }] = oc(), m = () => window.opener && window.opener.location ? window.opener.location.toString() : document.referrer, C = () => {
3201
+ const [_, { height: u, width: h }] = oc(), m = () => {
3202
+ console.log(window.self !== window.top);
3202
3203
  try {
3203
3204
  if (window.self !== window.top) {
3204
- const f = {
3205
+ const C = {
3205
3206
  type: "MINI_WIDGET_CTA_CLICK",
3206
3207
  payload: {
3207
3208
  widgetTitle: d,
3208
3209
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
3209
3210
  }
3210
- }, E = m().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), y = window.parent || window.opener || !1;
3211
- y && y.postMessage && E && y.postMessage(f, E);
3211
+ };
3212
+ window.parent.postMessage(C, "*");
3212
3213
  }
3213
3214
  r && r();
3214
- } catch (f) {
3215
- console.error("Error sending postMessage:", f);
3215
+ } catch (C) {
3216
+ console.error("Error sending postMessage:", C);
3216
3217
  }
3217
3218
  };
3218
3219
  return /* @__PURE__ */ l(Gt, { className: e, sx: { borderRadius: "8px", ...c }, children: [
@@ -3223,7 +3224,7 @@ const Dn = ({
3223
3224
  ee,
3224
3225
  {
3225
3226
  endIcon: /* @__PURE__ */ t(yt, { name: "keyboard_arrow_right_rounded" }),
3226
- onClick: C,
3227
+ onClick: m,
3227
3228
  children: /* @__PURE__ */ t(p, { bold: !0, variant: "Small", children: o })
3228
3229
  }
3229
3230
  ),