@pendo/agent 2.304.0 → 2.305.1

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/dom.esm.js CHANGED
@@ -7359,7 +7359,7 @@ function getScreenPosition(element) {
7359
7359
  };
7360
7360
  }
7361
7361
 
7362
- var VERSION = '2.304.0_';
7362
+ var VERSION = '2.305.1_';
7363
7363
 
7364
7364
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7365
7365
 
@@ -3904,8 +3904,8 @@ let SERVER = '';
3904
3904
  let ASSET_HOST = '';
3905
3905
  let ASSET_PATH = '';
3906
3906
  let DESIGNER_SERVER = '';
3907
- let VERSION = '2.304.0_';
3908
- let PACKAGE_VERSION = '2.304.0';
3907
+ let VERSION = '2.305.1_';
3908
+ let PACKAGE_VERSION = '2.305.1';
3909
3909
  let LOADER = 'xhr';
3910
3910
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3911
3911
  /**
@@ -18858,6 +18858,30 @@ var addExtension = (function setupExtensionService(ExtService) {
18858
18858
  return addExtensionPublic;
18859
18859
  })(ExtensionService);
18860
18860
 
18861
+ function syncColorMode(step, rerender = false) {
18862
+ const darkModeSelector = _.get(step, 'attributes.darkMode.selector', '');
18863
+ if (!darkModeSelector)
18864
+ return;
18865
+ // Determine the target dark mode state
18866
+ let targetDarkMode;
18867
+ if (pendo$1.designerEnabled && _.has(step, 'attributes.darkMode.override')) {
18868
+ // In designer mode, use the override value
18869
+ targetDarkMode = step.attributes.darkMode.override;
18870
+ }
18871
+ else {
18872
+ // In client mode, detect based on selector
18873
+ targetDarkMode = pendo$1.Sizzle(darkModeSelector).length > 0;
18874
+ }
18875
+ // Update and rerender if the state changed
18876
+ if (step.isDarkMode !== targetDarkMode) {
18877
+ step.isDarkMode = targetDarkMode;
18878
+ if (rerender) {
18879
+ step.hide();
18880
+ step.show(step.seenReason);
18881
+ }
18882
+ }
18883
+ }
18884
+
18861
18885
  var BuildingBlockResourceCenter = (function () {
18862
18886
  return {
18863
18887
  initializeResourceCenter,
@@ -19105,6 +19129,9 @@ var BuildingBlockResourceCenter = (function () {
19105
19129
  if (isSupportedNativeIntegration(integrationProvider))
19106
19130
  renderNativeIntegration(integrationProvider);
19107
19131
  var step = module.steps[0];
19132
+ if (step.isDarkMode === undefined) {
19133
+ syncColorMode(step);
19134
+ }
19108
19135
  var domJsonToRender = updatePseudoStyleSelectors(step.domJson);
19109
19136
  domJsonToRender.props['data-pendo-guide-id'] = module.id;
19110
19137
  var renderedGuide = buildNodeFromJSON(domJsonToRender, step);
@@ -20988,30 +21015,6 @@ class AutoDisplayPhase {
20988
21015
  }
20989
21016
  }
20990
21017
 
20991
- function syncColorMode(step, rerender = false) {
20992
- const darkModeSelector = _.get(step, 'attributes.darkMode.selector', '');
20993
- if (!darkModeSelector)
20994
- return;
20995
- // Determine the target dark mode state
20996
- let targetDarkMode;
20997
- if (pendo$1.designerEnabled && _.has(step, 'attributes.darkMode.override')) {
20998
- // In designer mode, use the override value
20999
- targetDarkMode = step.attributes.darkMode.override;
21000
- }
21001
- else {
21002
- // In client mode, detect based on selector
21003
- targetDarkMode = pendo$1.Sizzle(darkModeSelector).length > 0;
21004
- }
21005
- // Update and rerender if the state changed
21006
- if (step.isDarkMode !== targetDarkMode) {
21007
- step.isDarkMode = targetDarkMode;
21008
- if (rerender) {
21009
- step.hide();
21010
- step.show(step.seenReason);
21011
- }
21012
- }
21013
- }
21014
-
21015
21018
  /*
21016
21019
  * Guide Loop
21017
21020
  *
@@ -26769,9 +26772,13 @@ class NetworkRequestIntercept {
26769
26772
  const contentLengthHeader = config.headers.get('content-length');
26770
26773
  // Check if content type is readable (text or JSON)
26771
26774
  const isReadableContent = contentType.indexOf('text/') !== -1 || contentType.indexOf('application/json') !== -1;
26775
+ const isEventStream = contentType.indexOf('text/event-stream') !== -1;
26776
+ // Cannot read event stream content as text or else it will block the consumer from receiving the event stream messages
26777
+ if (isEventStream) {
26778
+ return '[Event stream content]';
26779
+ }
26772
26780
  if (!isReadableContent) {
26773
- const typeDisplay = contentType;
26774
- return `[Binary content: ${typeDisplay}]`;
26781
+ return `[Binary content: ${contentType}]`;
26775
26782
  }
26776
26783
  if (contentLengthHeader) {
26777
26784
  const size = parseInt(contentLengthHeader, 10);
@@ -38067,7 +38074,7 @@ const FrustrationEvent = (function () {
38067
38074
  deadClickTimeouts = {};
38068
38075
  }
38069
38076
  function handleClickEvent(eventData, browserEvent) {
38070
- const isHyperlinked = browserEvent.target && browserEvent.target.tagName === 'A' && browserEvent.target.hasAttribute('href');
38077
+ const isHyperlinked = browserEvent.target && browserEvent.target.tagName === 'A' && _.isFunction(browserEvent.target.hasAttribute) && browserEvent.target.hasAttribute('href');
38071
38078
  const isDeadClickEligibleTag = browserEvent.target && !_.contains(deadClickIneligibleTags, browserEvent.target.tagName);
38072
38079
  if (canQueueDeadClicks && !hasHighlightedText && isDeadClickEligibleTag && !isHyperlinked) {
38073
38080
  queueDeadClick(eventData);
@@ -43661,6 +43668,7 @@ function serializeNode(n2, options) {
43661
43668
  mirror: mirror2,
43662
43669
  blockClass,
43663
43670
  blockSelector,
43671
+ hideSelector,
43664
43672
  needsMask,
43665
43673
  inlineStylesheet,
43666
43674
  maskInputOptions = {},
@@ -43702,6 +43710,7 @@ function serializeNode(n2, options) {
43702
43710
  doc,
43703
43711
  blockClass,
43704
43712
  blockSelector,
43713
+ hideSelector,
43705
43714
  inlineStylesheet,
43706
43715
  maskInputOptions,
43707
43716
  maskInputFn,
@@ -43800,6 +43809,7 @@ function serializeElementNode(n2, options) {
43800
43809
  doc,
43801
43810
  blockClass,
43802
43811
  blockSelector,
43812
+ hideSelector,
43803
43813
  inlineStylesheet,
43804
43814
  maskInputOptions = {},
43805
43815
  maskInputFn,
@@ -43812,6 +43822,7 @@ function serializeElementNode(n2, options) {
43812
43822
  needsMask
43813
43823
  } = options;
43814
43824
  const needBlock = _isBlockedElement(n2, blockClass, blockSelector);
43825
+ const needHide = needBlock && hideSelector ? _isBlockedElement(n2, "", hideSelector) : false;
43815
43826
  const tagName = getValidTagName$1(n2);
43816
43827
  let attributes = {};
43817
43828
  const len = n2.attributes.length;
@@ -43958,7 +43969,12 @@ function serializeElementNode(n2, options) {
43958
43969
  attributes.rr_scrollTop = n2.scrollTop;
43959
43970
  }
43960
43971
  }
43961
- if (needBlock) {
43972
+ if (needHide) {
43973
+ attributes = {
43974
+ class: attributes.class,
43975
+ rr_display: "none"
43976
+ };
43977
+ } else if (needBlock) {
43962
43978
  const { width, height } = n2.getBoundingClientRect();
43963
43979
  attributes = {
43964
43980
  class: attributes.class,
@@ -44033,6 +44049,7 @@ function serializeNodeWithId(n2, options) {
44033
44049
  mirror: mirror2,
44034
44050
  blockClass,
44035
44051
  blockSelector,
44052
+ hideSelector,
44036
44053
  maskTextClass,
44037
44054
  maskTextSelector,
44038
44055
  skipChild = false,
@@ -44069,6 +44086,7 @@ function serializeNodeWithId(n2, options) {
44069
44086
  mirror: mirror2,
44070
44087
  blockClass,
44071
44088
  blockSelector,
44089
+ hideSelector,
44072
44090
  needsMask,
44073
44091
  inlineStylesheet,
44074
44092
  maskInputOptions,
@@ -44118,6 +44136,7 @@ function serializeNodeWithId(n2, options) {
44118
44136
  mirror: mirror2,
44119
44137
  blockClass,
44120
44138
  blockSelector,
44139
+ hideSelector,
44121
44140
  needsMask,
44122
44141
  maskTextClass,
44123
44142
  maskTextSelector,
@@ -44177,6 +44196,7 @@ function serializeNodeWithId(n2, options) {
44177
44196
  mirror: mirror2,
44178
44197
  blockClass,
44179
44198
  blockSelector,
44199
+ hideSelector,
44180
44200
  needsMask,
44181
44201
  maskTextClass,
44182
44202
  maskTextSelector,
@@ -44218,6 +44238,7 @@ function serializeNodeWithId(n2, options) {
44218
44238
  mirror: mirror2,
44219
44239
  blockClass,
44220
44240
  blockSelector,
44241
+ hideSelector,
44221
44242
  needsMask,
44222
44243
  maskTextClass,
44223
44244
  maskTextSelector,
@@ -44256,6 +44277,7 @@ function snapshot(n2, options) {
44256
44277
  mirror: mirror2 = new Mirror(),
44257
44278
  blockClass = "rr-block",
44258
44279
  blockSelector = null,
44280
+ hideSelector = null,
44259
44281
  maskTextClass = "rr-mask",
44260
44282
  maskTextSelector = null,
44261
44283
  inlineStylesheet = true,
@@ -44315,6 +44337,7 @@ function snapshot(n2, options) {
44315
44337
  mirror: mirror2,
44316
44338
  blockClass,
44317
44339
  blockSelector,
44340
+ hideSelector,
44318
44341
  maskTextClass,
44319
44342
  maskTextSelector,
44320
44343
  skipChild: false,
@@ -45031,6 +45054,7 @@ class MutationBuffer {
45031
45054
  __publicField(this, "mutationCb");
45032
45055
  __publicField(this, "blockClass");
45033
45056
  __publicField(this, "blockSelector");
45057
+ __publicField(this, "hideSelector");
45034
45058
  __publicField(this, "maskTextClass");
45035
45059
  __publicField(this, "maskTextSelector");
45036
45060
  __publicField(this, "inlineStylesheet");
@@ -45094,6 +45118,7 @@ class MutationBuffer {
45094
45118
  mirror: this.mirror,
45095
45119
  blockClass: this.blockClass,
45096
45120
  blockSelector: this.blockSelector,
45121
+ hideSelector: this.hideSelector,
45097
45122
  maskTextClass: this.maskTextClass,
45098
45123
  maskTextSelector: this.maskTextSelector,
45099
45124
  skipChild: true,
@@ -45271,7 +45296,12 @@ class MutationBuffer {
45271
45296
  index.childNodes(textarea),
45272
45297
  (cn) => index.textContent(cn) || ""
45273
45298
  ).join("");
45274
- const needsMask = needMaskingText(textarea, this.maskTextClass, this.maskTextSelector, true);
45299
+ const needsMask = needMaskingText(
45300
+ textarea,
45301
+ this.maskTextClass,
45302
+ this.maskTextSelector,
45303
+ true
45304
+ );
45275
45305
  item.attributes.value = maskInputValue({
45276
45306
  element: textarea,
45277
45307
  maskInputOptions: this.maskInputOptions,
@@ -45466,6 +45496,7 @@ class MutationBuffer {
45466
45496
  "mutationCb",
45467
45497
  "blockClass",
45468
45498
  "blockSelector",
45499
+ "hideSelector",
45469
45500
  "maskTextClass",
45470
45501
  "maskTextSelector",
45471
45502
  "inlineStylesheet",
@@ -47663,6 +47694,7 @@ function record(options = {}) {
47663
47694
  checkoutEveryNth,
47664
47695
  blockClass = "rr-block",
47665
47696
  blockSelector = null,
47697
+ hideSelector = null,
47666
47698
  ignoreClass = "rr-ignore",
47667
47699
  ignoreSelector = null,
47668
47700
  maskTextClass = "rr-mask",
@@ -47861,6 +47893,7 @@ function record(options = {}) {
47861
47893
  bypassOptions: {
47862
47894
  blockClass,
47863
47895
  blockSelector,
47896
+ hideSelector,
47864
47897
  maskTextClass,
47865
47898
  maskTextSelector,
47866
47899
  inlineStylesheet,
@@ -47902,6 +47935,7 @@ function record(options = {}) {
47902
47935
  mirror,
47903
47936
  blockClass,
47904
47937
  blockSelector,
47938
+ hideSelector,
47905
47939
  maskTextClass,
47906
47940
  maskTextSelector,
47907
47941
  inlineStylesheet,
@@ -48055,6 +48089,7 @@ function record(options = {}) {
48055
48089
  maskTextFn,
48056
48090
  keepIframeSrcFn,
48057
48091
  blockSelector,
48092
+ hideSelector,
48058
48093
  slimDOMOptions,
48059
48094
  dataURLOptions,
48060
48095
  mirror,
@@ -48336,7 +48371,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
48336
48371
  };
48337
48372
 
48338
48373
  const RECORDING_CONFIG_WORKERURL$1 = 'recording.workerUrl';
48339
- const MAX_SIZE = 1000000;
48374
+ const MAX_SIZE = 2000000;
48340
48375
  const RESOURCE_CACHING$1 = 'resourceCaching';
48341
48376
  class Transport {
48342
48377
  constructor(WorkerClass, pendo, api) {
@@ -48400,6 +48435,10 @@ class Transport {
48400
48435
  if (strPayload.length > this.maxSize) {
48401
48436
  const error = new Error('maximum recording payload size exceeded');
48402
48437
  error.reason = 'HEAVY_EVENT';
48438
+ error.context = {
48439
+ size: strPayload.length,
48440
+ count: payload === null || payload === void 0 ? void 0 : payload.recordingPayloadCount
48441
+ };
48403
48442
  throw error;
48404
48443
  }
48405
48444
  envelope.body = this.pendo.compress(strPayload, 'binary');
@@ -53647,6 +53686,8 @@ class SessionRecorder {
53647
53686
  password: true,
53648
53687
  tel: true
53649
53688
  });
53689
+ const blockedSelectors = ['.pendo-ignore', '.pendo-sr-ignore'].concat(recordingOptions.blockedSelectors || []);
53690
+ const hiddenSelectors = ['.pendo-sr-hide'].concat(recordingOptions.hiddenSelectors || []);
53650
53691
  const config = {
53651
53692
  maskInputFn: this.pendo._.partial(maskInput, maskOptions),
53652
53693
  maskTextFn: this.pendo._.partial(maskText, maskOptions),
@@ -53654,7 +53695,9 @@ class SessionRecorder {
53654
53695
  maskTextClass: null,
53655
53696
  maskInputOptions: maskOptions.maskInputOptions,
53656
53697
  blockClass: null,
53657
- blockSelector: ['.pendo-ignore', '.pendo-sr-ignore'].concat(recordingOptions.blockedSelectors || []).join(','),
53698
+ // we need to concat hidden selectors to re-use block selector logic
53699
+ blockSelector: blockedSelectors.concat(hiddenSelectors).join(','),
53700
+ hideSelector: hiddenSelectors.join(','),
53658
53701
  recordCrossOriginIframes: recordingOptions.recordCrossOriginIframes != null ? recordingOptions.recordCrossOriginIframes : true
53659
53702
  };
53660
53703
  return config;
@@ -54114,7 +54157,7 @@ class SessionRecorder {
54114
54157
  }
54115
54158
  catch (e) {
54116
54159
  if (e.reason) {
54117
- this.logStopReason(e.reason);
54160
+ this.logStopReason(e.reason, e.context);
54118
54161
  }
54119
54162
  else {
54120
54163
  this.logStopReason('SEND_QUEUE_ERROR', e);