@mx-cartographer/experiences 9.4.27 → 9.4.28

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [9.4.28] - 09-16-2026
2
+
3
+ - **FIXED** - RUM `beforeSend` no longer drops the page's own `document` resource event (MEW-4052)
4
+
1
5
  ## [9.4.27] - 09-16-2026
2
6
 
3
7
  - **FIXED** - Insights V2 `FeeDetected` and `LargeTransaction` CTAs opened the "Something went wrong" drawer instead of the transaction. [ditto!19](https://gitlab.com/mxtechnologies/mx/experiences/projects/ditto/-/merge_requests/19) renamed `primary_cta_block` from `view_charge` to `transaction_details`, naming the block for the drilldown it opens rather than the button copy (which tupac owns and can change). Neither name was registered here — `actionBlocksKey.TRANSACTION_DETAILS_ACTION_BLOCK` carried `TransactionDetailsBlock`, a name no backend ever sent. `ActionBlockLayer` resolves the CTA by exact match and `hasDrawerBlock()` returns true for any non-empty string, so an unregistered name opens the drawer onto the error state rather than failing silently. Points the registry key at the name ditto now sends, and updates the `FeeDetected`/`LargeTransaction` mock payloads to match. No alias is kept for `view_charge`: ditto no longer sends it and it was never registered (MEW2-3254)
@@ -1,13 +1,17 @@
1
- var t = /(\/(?:md\/[^/?#]+|login)\/)[^?#]+/g, s = (e) => typeof e == "string" ? e.replace(t, "$1REDACTED") : e;
2
- function i({ scrubSsoPaths: e = !1 } = {}) {
1
+ var s = /(\/(?:md\/[^/?#]+|login)\/)[^?#]+/g, t = (e) => typeof e == "string" ? e.replace(s, "$1REDACTED") : e, i = /* @__PURE__ */ new Set([
2
+ "xhr",
3
+ "fetch",
4
+ "document"
5
+ ]);
6
+ function c({ scrubSsoPaths: e = !1 } = {}) {
3
7
  return (r) => {
4
- if (e && (r.view.url = s(r.view.url), r.view.referrer = s(r.view.referrer), r.type === "resource" && (r.resource.url = s(r.resource.url)), r.type === "error" && r.error.resource && (r.error.resource.url = s(r.error.resource.url))), r.type !== "resource" || r.resource.type === "xhr" || r.resource.type === "fetch") return !0;
8
+ if (e && (r.view.url = t(r.view.url), r.view.referrer = t(r.view.referrer), r.type === "resource" && (r.resource.url = t(r.resource.url)), r.type === "error" && r.error.resource && (r.error.resource.url = t(r.error.resource.url))), r.type !== "resource" || i.has(r.resource.type)) return !0;
5
9
  const u = r.resource.status_code;
6
10
  return !(u !== void 0 && u > 0 && u < 400);
7
11
  };
8
12
  }
9
- var c = 50;
10
- function f(e = 50) {
13
+ var f = 50;
14
+ function l(e = 50) {
11
15
  const r = [];
12
16
  return {
13
17
  push(u, o) {
@@ -28,10 +32,10 @@ function f(e = 50) {
28
32
  };
29
33
  }
30
34
  export {
31
- c as DEFAULT_RUM_ERROR_BUFFER_SIZE,
32
- i as buildRumBeforeSend,
33
- f as createRumErrorBuffer,
34
- s as redactSsoPath
35
+ f as DEFAULT_RUM_ERROR_BUFFER_SIZE,
36
+ c as buildRumBeforeSend,
37
+ l as createRumErrorBuffer,
38
+ t as redactSsoPath
35
39
  };
36
40
 
37
41
  //# sourceMappingURL=rum.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rum.es.js","names":[],"sources":["../../src/rum/rum.ts"],"sourcesContent":["import type { RumEvent, RumInitConfiguration } from '@datadog/browser-rum'\n\n// scrub the really long sso token because it's unhelpful and noisy in events\nconst SSO_PATH_PATTERN = /(\\/(?:md\\/[^/?#]+|login)\\/)[^?#]+/g\n\nexport const redactSsoPath = <T extends string | undefined>(value: T): T =>\n typeof value === 'string' ? (value.replace(SSO_PATH_PATTERN, '$1REDACTED') as T) : value\n\nexport interface RumBeforeSendOptions {\n scrubSsoPaths?: boolean\n}\n\n// runs on every RUM event before it is sent to Datadog\nexport function buildRumBeforeSend({\n scrubSsoPaths = false,\n}: RumBeforeSendOptions = {}): NonNullable<RumInitConfiguration['beforeSend']> {\n return (event: RumEvent) => {\n if (scrubSsoPaths) {\n event.view.url = redactSsoPath(event.view.url)\n event.view.referrer = redactSsoPath(event.view.referrer)\n if (event.type === 'resource') event.resource.url = redactSsoPath(event.resource.url)\n if (event.type === 'error' && event.error.resource) {\n event.error.resource.url = redactSsoPath(event.error.resource.url)\n }\n }\n\n if (event.type !== 'resource') return true\n if (event.resource.type === 'xhr' || event.resource.type === 'fetch') return true\n const status = event.resource.status_code\n return !(status !== undefined && status > 0 && status < 400)\n }\n}\n\n// Holds errors that happen before Datadog RUM has started up, so they aren't lost\nexport interface RumErrorBuffer<Context = Record<string, unknown>> {\n push(error: unknown, context?: Context): boolean\n flush(send: (error: unknown, context?: Context) => void): void\n readonly size: number\n}\n\nexport const DEFAULT_RUM_ERROR_BUFFER_SIZE = 50\n\nexport function createRumErrorBuffer<Context = Record<string, unknown>>(\n maxSize: number = DEFAULT_RUM_ERROR_BUFFER_SIZE,\n): RumErrorBuffer<Context> {\n const items: Array<{ error: unknown; context?: Context }> = []\n return {\n push(error, context) {\n if (items.length >= maxSize) return false\n items.push({ error, context })\n return true\n },\n flush(send) {\n while (items.length > 0) {\n const item = items.shift()\n if (item) send(item.error, item.context)\n }\n },\n get size() {\n return items.length\n },\n }\n}\n"],"mappings":"AAGA,IAAM,IAAmB,sCAEZ,IAAA,CAA+C,MAC1D,OAAO,KAAU,WAAY,EAAM,QAAQ,GAAkB,YAAY,IAAU;AAOrF,SAAgB,EAAmB,EACjC,eAAA,IAAgB,GAAA,IACQ,CAAC,GAAoD;AAC7E,SAAA,CAAQ,MAAoB;AAW1B,QAVI,MACF,EAAM,KAAK,MAAM,EAAc,EAAM,KAAK,GAAG,GAC7C,EAAM,KAAK,WAAW,EAAc,EAAM,KAAK,QAAQ,GACnD,EAAM,SAAS,eAAY,EAAM,SAAS,MAAM,EAAc,EAAM,SAAS,GAAG,IAChF,EAAM,SAAS,WAAW,EAAM,MAAM,aACxC,EAAM,MAAM,SAAS,MAAM,EAAc,EAAM,MAAM,SAAS,GAAG,KAIjE,EAAM,SAAS,cACf,EAAM,SAAS,SAAS,SAAS,EAAM,SAAS,SAAS,QAAS,QAAO;AAC7E,UAAM,IAAS,EAAM,SAAS;AAC9B,WAAO,EAAE,MAAW,UAAa,IAAS,KAAK,IAAS;AAAA,EAC1D;AACF;AASA,IAAa,IAAgC;AAE7C,SAAgB,EACd,IAAA,IACyB;AACzB,QAAM,IAAsD,CAAC;AAC7D,SAAO;AAAA,IACL,KAAK,GAAO,GAAS;AACnB,aAAI,EAAM,UAAU,IAAgB,MACpC,EAAM,KAAK;AAAA,QAAE,OAAA;AAAA,QAAO,SAAA;AAAA,MAAQ,CAAC,GACtB;AAAA,IACT;AAAA,IACA,MAAM,GAAM;AACV,aAAO,EAAM,SAAS,KAAG;AACvB,cAAM,IAAO,EAAM,MAAM;AACzB,QAAI,KAAM,EAAK,EAAK,OAAO,EAAK,OAAO;AAAA,MACzC;AAAA,IACF;AAAA,IACA,IAAI,OAAO;AACT,aAAO,EAAM;AAAA,IACf;AAAA,EACF;AACF"}
1
+ {"version":3,"file":"rum.es.js","names":[],"sources":["../../src/rum/rum.ts"],"sourcesContent":["import type { RumEvent, RumInitConfiguration } from '@datadog/browser-rum'\n\n// scrub the really long sso token because it's unhelpful and noisy in events\nconst SSO_PATH_PATTERN = /(\\/(?:md\\/[^/?#]+|login)\\/)[^?#]+/g\n\nexport const redactSsoPath = <T extends string | undefined>(value: T): T =>\n typeof value === 'string' ? (value.replace(SSO_PATH_PATTERN, '$1REDACTED') as T) : value\n\nexport interface RumBeforeSendOptions {\n scrubSsoPaths?: boolean\n}\n\n// API calls and the page's own navigation timing are always kept; only successful static assets are dropped\nconst KEPT_RESOURCE_TYPES = new Set(['xhr', 'fetch', 'document'])\n\n// runs on every RUM event before it is sent to Datadog\nexport function buildRumBeforeSend({\n scrubSsoPaths = false,\n}: RumBeforeSendOptions = {}): NonNullable<RumInitConfiguration['beforeSend']> {\n return (event: RumEvent) => {\n if (scrubSsoPaths) {\n event.view.url = redactSsoPath(event.view.url)\n event.view.referrer = redactSsoPath(event.view.referrer)\n if (event.type === 'resource') event.resource.url = redactSsoPath(event.resource.url)\n if (event.type === 'error' && event.error.resource) {\n event.error.resource.url = redactSsoPath(event.error.resource.url)\n }\n }\n\n if (event.type !== 'resource') return true\n if (KEPT_RESOURCE_TYPES.has(event.resource.type)) return true\n const status = event.resource.status_code\n return !(status !== undefined && status > 0 && status < 400)\n }\n}\n\n// Holds errors that happen before Datadog RUM has started up, so they aren't lost\nexport interface RumErrorBuffer<Context = Record<string, unknown>> {\n push(error: unknown, context?: Context): boolean\n flush(send: (error: unknown, context?: Context) => void): void\n readonly size: number\n}\n\nexport const DEFAULT_RUM_ERROR_BUFFER_SIZE = 50\n\nexport function createRumErrorBuffer<Context = Record<string, unknown>>(\n maxSize: number = DEFAULT_RUM_ERROR_BUFFER_SIZE,\n): RumErrorBuffer<Context> {\n const items: Array<{ error: unknown; context?: Context }> = []\n return {\n push(error, context) {\n if (items.length >= maxSize) return false\n items.push({ error, context })\n return true\n },\n flush(send) {\n while (items.length > 0) {\n const item = items.shift()\n if (item) send(item.error, item.context)\n }\n },\n get size() {\n return items.length\n },\n }\n}\n"],"mappings":"AAGA,IAAM,IAAmB,sCAEZ,IAAA,CAA+C,MAC1D,OAAO,KAAU,WAAY,EAAM,QAAQ,GAAkB,YAAY,IAAU,GAO/E,IAAsB,oBAAI,IAAI;AAAA,EAAC;AAAA,EAAO;AAAA,EAAS;AAAU,CAAC;AAGhE,SAAgB,EAAmB,EACjC,eAAA,IAAgB,GAAA,IACQ,CAAC,GAAoD;AAC7E,SAAA,CAAQ,MAAoB;AAW1B,QAVI,MACF,EAAM,KAAK,MAAM,EAAc,EAAM,KAAK,GAAG,GAC7C,EAAM,KAAK,WAAW,EAAc,EAAM,KAAK,QAAQ,GACnD,EAAM,SAAS,eAAY,EAAM,SAAS,MAAM,EAAc,EAAM,SAAS,GAAG,IAChF,EAAM,SAAS,WAAW,EAAM,MAAM,aACxC,EAAM,MAAM,SAAS,MAAM,EAAc,EAAM,MAAM,SAAS,GAAG,KAIjE,EAAM,SAAS,cACf,EAAoB,IAAI,EAAM,SAAS,IAAI,EAAG,QAAO;AACzD,UAAM,IAAS,EAAM,SAAS;AAC9B,WAAO,EAAE,MAAW,UAAa,IAAS,KAAK,IAAS;AAAA,EAC1D;AACF;AASA,IAAa,IAAgC;AAE7C,SAAgB,EACd,IAAA,IACyB;AACzB,QAAM,IAAsD,CAAC;AAC7D,SAAO;AAAA,IACL,KAAK,GAAO,GAAS;AACnB,aAAI,EAAM,UAAU,IAAgB,MACpC,EAAM,KAAK;AAAA,QAAE,OAAA;AAAA,QAAO,SAAA;AAAA,MAAQ,CAAC,GACtB;AAAA,IACT;AAAA,IACA,MAAM,GAAM;AACV,aAAO,EAAM,SAAS,KAAG;AACvB,cAAM,IAAO,EAAM,MAAM;AACzB,QAAI,KAAM,EAAK,EAAK,OAAO,EAAK,OAAO;AAAA,MACzC;AAAA,IACF;AAAA,IACA,IAAI,OAAO;AACT,aAAO,EAAM;AAAA,IACf;AAAA,EACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.4.27",
3
+ "version": "9.4.28",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",