@pendo/web-sdk 2.311.3 → 2.312.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 +1 -1
- package/dist/pendo.debugger.min.js +6 -6
- package/dist/pendo.module.js +75 -58
- package/dist/pendo.module.min.js +10 -10
- package/dist/servers.json +7 -7
- package/package.json +1 -1
package/dist/pendo.module.js
CHANGED
|
@@ -3924,8 +3924,8 @@ let SERVER = '';
|
|
|
3924
3924
|
let ASSET_HOST = '';
|
|
3925
3925
|
let ASSET_PATH = '';
|
|
3926
3926
|
let DESIGNER_SERVER = '';
|
|
3927
|
-
let VERSION = '2.
|
|
3928
|
-
let PACKAGE_VERSION = '2.
|
|
3927
|
+
let VERSION = '2.312.1_';
|
|
3928
|
+
let PACKAGE_VERSION = '2.312.1';
|
|
3929
3929
|
let LOADER = 'xhr';
|
|
3930
3930
|
/* eslint-enable web-sdk-eslint-rules/no-gulp-env-references */
|
|
3931
3931
|
/**
|
|
@@ -11617,7 +11617,7 @@ function isTrustedOrigin(host) {
|
|
|
11617
11617
|
return true;
|
|
11618
11618
|
// Domains that Pendo owns, will be swapped in by build patches
|
|
11619
11619
|
const patterns = [
|
|
11620
|
-
/^https:\/\/(adopt\.)?((us1)\.)?(app|via|adopt|cdn)(\.(au|eu|gov|hsbc|jpn))?\.pendo\.io$/,
|
|
11620
|
+
/^https:\/\/(adopt\.)?((us1)\.)?(app|via|adopt|cdn|oem)(\.(au|eu|gov|hsbc|jpn))?\.pendo\.io$/,
|
|
11621
11621
|
/^https:\/\/([0-9]{8}t[0-9]{4}-dot-)pendo-(au|eu|govramp|hsbc|io|jp-prod|us1)\.appspot\.com$/,
|
|
11622
11622
|
/^https:\/\/hotfix-(ops|app)-([0-9]+-dot-)pendo-(au|eu|govramp|hsbc|io|jp-prod|us1)\.appspot\.com$/,
|
|
11623
11623
|
/^https:\/\/pendo-(au|eu|govramp|hsbc|io|jp-prod|us1)-static\.storage\.googleapis\.com$/,
|
|
@@ -16085,6 +16085,8 @@ var BuildingBlockTemplates = (function () {
|
|
|
16085
16085
|
var moduleStep = announcementsModule.steps[0];
|
|
16086
16086
|
if (moduleStep) {
|
|
16087
16087
|
syncColorMode(moduleStep, false);
|
|
16088
|
+
// Propagate dark mode state to announcement step for button styling CSS rules
|
|
16089
|
+
announcementStep.isDarkMode = moduleStep.isDarkMode;
|
|
16088
16090
|
if (moduleStep.isDarkMode) {
|
|
16089
16091
|
// Only apply overrides if we have actual color values to apply
|
|
16090
16092
|
var hasValidOverrides = darkModeOverrides.guideBackground ||
|
|
@@ -18563,53 +18565,48 @@ function attachImgLoadHandlers(curNode, step) {
|
|
|
18563
18565
|
recalculateGuideHeightOnImgLoad(dom(curNode), step);
|
|
18564
18566
|
}
|
|
18565
18567
|
}
|
|
18568
|
+
function imageNodeHandler(step) {
|
|
18569
|
+
var containerJSON = {};
|
|
18570
|
+
if (!step.containerId && step.domJson) {
|
|
18571
|
+
containerJSON = findGuideContainerJSON(step.domJson);
|
|
18572
|
+
}
|
|
18573
|
+
var containerId = step.containerId || (containerJSON.props && containerJSON.props.id) || '';
|
|
18574
|
+
var guideContainer = containerId ? dom(`#${containerId}`, step.guideElement)[0] : containerId;
|
|
18575
|
+
if (step && step.attributes && step.attributes.imgCount) {
|
|
18576
|
+
step.attributes.imgCount--;
|
|
18577
|
+
if (guideContainer && step.attributes.imgCount <= 0) {
|
|
18578
|
+
recalculateGuideWidth(containerId, step.guideElement);
|
|
18579
|
+
adjustGuideContentWidth(containerId, step.guideElement);
|
|
18580
|
+
FlexboxPolyfill.flexAllThings(containerId, step);
|
|
18581
|
+
var guide = step.getGuide();
|
|
18582
|
+
// calling recalculateGuideHeight with an announcement guide or Announcements Module breaks announcements display
|
|
18583
|
+
// in resource center
|
|
18584
|
+
if (!_.get(guide, 'attributes.isAnnouncement') && _.get(guide, 'attributes.resourceCenter.moduleId') !== 'AnnouncementsModule') {
|
|
18585
|
+
recalculateGuideHeight(containerId, step.guideElement);
|
|
18586
|
+
// In case a scrollbar exists, we should adjust content and flexAllThings again. APP-74827.
|
|
18587
|
+
var domContainer = guideContainer.children.item('pendo-guide-container');
|
|
18588
|
+
var containerHasOverflow = domContainer && domContainer.style && domContainer.style.overflow === 'auto';
|
|
18589
|
+
if (containerHasOverflow) {
|
|
18590
|
+
adjustGuideContentWidth(containerId, step.guideElement);
|
|
18591
|
+
FlexboxPolyfill.flexAllThings(step.containerId, step);
|
|
18592
|
+
}
|
|
18593
|
+
}
|
|
18594
|
+
BuildingBlockTooltips.positionStepForGuide(step, step.domJson, guideContainer);
|
|
18595
|
+
guideContainer.style.visibility = 'visible';
|
|
18596
|
+
guideContainer.parentNode.style.visibility = 'visible';
|
|
18597
|
+
dom.event.dispatch(guideContainer, {
|
|
18598
|
+
type: 'imagesLoaded'
|
|
18599
|
+
});
|
|
18600
|
+
}
|
|
18601
|
+
}
|
|
18602
|
+
}
|
|
18566
18603
|
function recalculateGuideHeightOnImgLoad(node, step) {
|
|
18567
18604
|
node.on('load', function () {
|
|
18568
|
-
|
|
18569
|
-
if (!step.containerId && step.domJson) {
|
|
18570
|
-
containerJSON = findGuideContainerJSON(step.domJson);
|
|
18571
|
-
}
|
|
18572
|
-
var containerId = step.containerId || (containerJSON.props && containerJSON.props.id) || '';
|
|
18573
|
-
var guideContainer = containerId ? dom('#' + containerId, step.guideElement)[0] : containerId;
|
|
18574
|
-
if (step && step.attributes && step.attributes.imgCount) {
|
|
18575
|
-
step.attributes.imgCount--;
|
|
18576
|
-
if (guideContainer && step.attributes.imgCount <= 0) {
|
|
18577
|
-
recalculateGuideWidth(containerId, step.guideElement);
|
|
18578
|
-
adjustGuideContentWidth(containerId, step.guideElement);
|
|
18579
|
-
FlexboxPolyfill.flexAllThings(containerId, step);
|
|
18580
|
-
var guide = step.getGuide();
|
|
18581
|
-
// calling recalculateGuideHeight with an announcement guide or Announcements Module breaks announcements display
|
|
18582
|
-
// in resource center
|
|
18583
|
-
if (!_.get(guide, 'attributes.isAnnouncement') && _.get(guide, 'attributes.resourceCenter.moduleId') !== 'AnnouncementsModule') {
|
|
18584
|
-
recalculateGuideHeight(containerId, step.guideElement);
|
|
18585
|
-
// In case a scrollbar exists, we should adjust content and flexAllThings again. APP-74827.
|
|
18586
|
-
var domContainer = guideContainer.children.item('pendo-guide-container');
|
|
18587
|
-
var containerHasOverflow = domContainer && domContainer.style && domContainer.style.overflow === 'auto';
|
|
18588
|
-
if (containerHasOverflow) {
|
|
18589
|
-
adjustGuideContentWidth(containerId, step.guideElement);
|
|
18590
|
-
FlexboxPolyfill.flexAllThings(step.containerId, step);
|
|
18591
|
-
}
|
|
18592
|
-
}
|
|
18593
|
-
BuildingBlockTooltips.positionStepForGuide(step, step.domJson, guideContainer);
|
|
18594
|
-
guideContainer.style.visibility = 'visible';
|
|
18595
|
-
guideContainer.parentNode.style.visibility = 'visible';
|
|
18596
|
-
dom.event.dispatch(guideContainer, {
|
|
18597
|
-
type: 'imagesLoaded'
|
|
18598
|
-
});
|
|
18599
|
-
}
|
|
18600
|
-
}
|
|
18605
|
+
imageNodeHandler(step);
|
|
18601
18606
|
});
|
|
18602
|
-
// For now, we'll just automatically show the guide if an image errors.
|
|
18603
18607
|
node.on('error', function () {
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
log.info('Failed to find guideContainer for id: ' + step.containerId);
|
|
18607
|
-
return;
|
|
18608
|
-
}
|
|
18609
|
-
BuildingBlockTooltips.positionStepForGuide(step, step.domJson, guideContainer);
|
|
18610
|
-
guideContainer.style.visibility = 'visible';
|
|
18611
|
-
guideContainer.parentNode.style.visibility = 'visible';
|
|
18612
|
-
FlexboxPolyfill.flexAllThings(step.containerId, step);
|
|
18608
|
+
log.info(`Error loading image (${node[0].src}) for guide step id "${step.id}" in guide id "${step.guideId}".`);
|
|
18609
|
+
imageNodeHandler(step);
|
|
18613
18610
|
});
|
|
18614
18611
|
}
|
|
18615
18612
|
function bindActionToNode(node, actionObject, step) {
|
|
@@ -40136,7 +40133,8 @@ class PromptPlugin {
|
|
|
40136
40133
|
this.loadConfig(this.configName)
|
|
40137
40134
|
.then(config => this.onConfigLoaded(config)).catch(() => { });
|
|
40138
40135
|
// Listen for URL changes to re-evaluate page rules
|
|
40139
|
-
|
|
40136
|
+
// Listening on guidesLoaded since normalizedUrl comes back from the guides playload
|
|
40137
|
+
(_a = this.api.Events.guidesLoaded) === null || _a === void 0 ? void 0 : _a.on(() => {
|
|
40140
40138
|
this.reEvaluatePageRules();
|
|
40141
40139
|
});
|
|
40142
40140
|
}
|
|
@@ -40970,7 +40968,7 @@ const RequiredQuestions = {
|
|
|
40970
40968
|
});
|
|
40971
40969
|
}
|
|
40972
40970
|
});
|
|
40973
|
-
step.attachEvent(step.guideElement.find('
|
|
40971
|
+
step.attachEvent(step.guideElement.find('[id^="pendo-guide-container"]')[0], 'click', function (event) {
|
|
40974
40972
|
if (!event.target.classList.contains('_pendo-button')) {
|
|
40975
40973
|
evaluateRequiredQuestions(requiredQuestions);
|
|
40976
40974
|
}
|
|
@@ -41070,7 +41068,7 @@ const RequiredQuestions = {
|
|
|
41070
41068
|
attributes: true,
|
|
41071
41069
|
childList: true,
|
|
41072
41070
|
characterData: true,
|
|
41073
|
-
subtree:
|
|
41071
|
+
subtree: true
|
|
41074
41072
|
};
|
|
41075
41073
|
const MutationObserver = getZoneSafeMethod$1(pendo._, 'MutationObserver');
|
|
41076
41074
|
const observer = new MutationObserver(applyRequiredIndicators);
|
|
@@ -44826,6 +44824,22 @@ function querySelectorAll(n2, selectors) {
|
|
|
44826
44824
|
function mutationObserverCtor() {
|
|
44827
44825
|
return getUntaintedPrototype("MutationObserver").constructor;
|
|
44828
44826
|
}
|
|
44827
|
+
function getUntaintedProxy() {
|
|
44828
|
+
var _a2, _b;
|
|
44829
|
+
let Proxy3 = window.Proxy;
|
|
44830
|
+
try {
|
|
44831
|
+
if (typeof window.Proxy !== "function" || !((_a2 = window.Proxy) == null ? void 0 : _a2.toString().includes("[native code]"))) {
|
|
44832
|
+
const cleanFrame = document.createElement("iframe");
|
|
44833
|
+
cleanFrame.style.display = "none";
|
|
44834
|
+
document.documentElement.appendChild(cleanFrame);
|
|
44835
|
+
Proxy3 = ((_b = cleanFrame.contentWindow) == null ? void 0 : _b.Proxy) || window.Proxy;
|
|
44836
|
+
document.documentElement.removeChild(cleanFrame);
|
|
44837
|
+
}
|
|
44838
|
+
} catch (err) {
|
|
44839
|
+
console.debug("Unable to get untainted Proxy from iframe", err);
|
|
44840
|
+
}
|
|
44841
|
+
return Proxy3;
|
|
44842
|
+
}
|
|
44829
44843
|
function patch(source, name, replacement) {
|
|
44830
44844
|
try {
|
|
44831
44845
|
if (!(name in source)) {
|
|
@@ -44905,7 +44919,8 @@ let _mirror = {
|
|
|
44905
44919
|
}
|
|
44906
44920
|
};
|
|
44907
44921
|
if (typeof window !== "undefined" && window.Proxy && window.Reflect) {
|
|
44908
|
-
|
|
44922
|
+
const Proxy3 = getUntaintedProxy();
|
|
44923
|
+
_mirror = new Proxy3(_mirror, {
|
|
44909
44924
|
get(target, prop, receiver) {
|
|
44910
44925
|
if (prop === "map") {
|
|
44911
44926
|
console.error(DEPARTED_MIRROR_ACCESS_WARNING);
|
|
@@ -45866,6 +45881,7 @@ const callbackWrapper = (cb) => {
|
|
|
45866
45881
|
return rrwebWrapped;
|
|
45867
45882
|
};
|
|
45868
45883
|
const mutationBuffers = [];
|
|
45884
|
+
const Proxy2 = getUntaintedProxy();
|
|
45869
45885
|
function getEventTarget(event) {
|
|
45870
45886
|
try {
|
|
45871
45887
|
if ("composedPath" in event) {
|
|
@@ -46259,6 +46275,7 @@ function getNestedCSSRulePositions(rule) {
|
|
|
46259
46275
|
);
|
|
46260
46276
|
const index2 = rules2.indexOf(childRule);
|
|
46261
46277
|
pos.unshift(index2);
|
|
46278
|
+
return recurse(childRule.parentRule, pos);
|
|
46262
46279
|
} else if (childRule.parentStyleSheet) {
|
|
46263
46280
|
const rules2 = Array.from(childRule.parentStyleSheet.cssRules);
|
|
46264
46281
|
const index2 = rules2.indexOf(childRule);
|
|
@@ -46284,7 +46301,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
|
|
|
46284
46301
|
};
|
|
46285
46302
|
}
|
|
46286
46303
|
const insertRule = win.CSSStyleSheet.prototype.insertRule;
|
|
46287
|
-
win.CSSStyleSheet.prototype.insertRule = new
|
|
46304
|
+
win.CSSStyleSheet.prototype.insertRule = new Proxy2(insertRule, {
|
|
46288
46305
|
apply: callbackWrapper(
|
|
46289
46306
|
(target, thisArg, argumentsList) => {
|
|
46290
46307
|
const [rule, index2] = argumentsList;
|
|
@@ -46309,7 +46326,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
|
|
|
46309
46326
|
return win.CSSStyleSheet.prototype.insertRule.apply(this, [rule, index2]);
|
|
46310
46327
|
};
|
|
46311
46328
|
const deleteRule = win.CSSStyleSheet.prototype.deleteRule;
|
|
46312
|
-
win.CSSStyleSheet.prototype.deleteRule = new
|
|
46329
|
+
win.CSSStyleSheet.prototype.deleteRule = new Proxy2(deleteRule, {
|
|
46313
46330
|
apply: callbackWrapper(
|
|
46314
46331
|
(target, thisArg, argumentsList) => {
|
|
46315
46332
|
const [index2] = argumentsList;
|
|
@@ -46335,7 +46352,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
|
|
|
46335
46352
|
let replace;
|
|
46336
46353
|
if (win.CSSStyleSheet.prototype.replace) {
|
|
46337
46354
|
replace = win.CSSStyleSheet.prototype.replace;
|
|
46338
|
-
win.CSSStyleSheet.prototype.replace = new
|
|
46355
|
+
win.CSSStyleSheet.prototype.replace = new Proxy2(replace, {
|
|
46339
46356
|
apply: callbackWrapper(
|
|
46340
46357
|
(target, thisArg, argumentsList) => {
|
|
46341
46358
|
const [text] = argumentsList;
|
|
@@ -46359,7 +46376,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
|
|
|
46359
46376
|
let replaceSync;
|
|
46360
46377
|
if (win.CSSStyleSheet.prototype.replaceSync) {
|
|
46361
46378
|
replaceSync = win.CSSStyleSheet.prototype.replaceSync;
|
|
46362
|
-
win.CSSStyleSheet.prototype.replaceSync = new
|
|
46379
|
+
win.CSSStyleSheet.prototype.replaceSync = new Proxy2(replaceSync, {
|
|
46363
46380
|
apply: callbackWrapper(
|
|
46364
46381
|
(target, thisArg, argumentsList) => {
|
|
46365
46382
|
const [text] = argumentsList;
|
|
@@ -46402,7 +46419,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
|
|
|
46402
46419
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
46403
46420
|
deleteRule: type.prototype.deleteRule
|
|
46404
46421
|
};
|
|
46405
|
-
type.prototype.insertRule = new
|
|
46422
|
+
type.prototype.insertRule = new Proxy2(
|
|
46406
46423
|
unmodifiedFunctions[typeKey].insertRule,
|
|
46407
46424
|
{
|
|
46408
46425
|
apply: callbackWrapper(
|
|
@@ -46434,7 +46451,7 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
|
|
|
46434
46451
|
)
|
|
46435
46452
|
}
|
|
46436
46453
|
);
|
|
46437
|
-
type.prototype.deleteRule = new
|
|
46454
|
+
type.prototype.deleteRule = new Proxy2(
|
|
46438
46455
|
unmodifiedFunctions[typeKey].deleteRule,
|
|
46439
46456
|
{
|
|
46440
46457
|
apply: callbackWrapper(
|
|
@@ -46524,7 +46541,7 @@ function initStyleDeclarationObserver({
|
|
|
46524
46541
|
stylesheetManager
|
|
46525
46542
|
}, { win }) {
|
|
46526
46543
|
const setProperty = win.CSSStyleDeclaration.prototype.setProperty;
|
|
46527
|
-
win.CSSStyleDeclaration.prototype.setProperty = new
|
|
46544
|
+
win.CSSStyleDeclaration.prototype.setProperty = new Proxy2(setProperty, {
|
|
46528
46545
|
apply: callbackWrapper(
|
|
46529
46546
|
(target, thisArg, argumentsList) => {
|
|
46530
46547
|
var _a2;
|
|
@@ -46555,7 +46572,7 @@ function initStyleDeclarationObserver({
|
|
|
46555
46572
|
)
|
|
46556
46573
|
});
|
|
46557
46574
|
const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;
|
|
46558
|
-
win.CSSStyleDeclaration.prototype.removeProperty = new
|
|
46575
|
+
win.CSSStyleDeclaration.prototype.removeProperty = new Proxy2(removeProperty, {
|
|
46559
46576
|
apply: callbackWrapper(
|
|
46560
46577
|
(target, thisArg, argumentsList) => {
|
|
46561
46578
|
var _a2;
|