@ada-support/embed2 1.0.35 → 1.0.37
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.
|
@@ -12,5 +12,5 @@ interface TriggerCampaignImplParams {
|
|
|
12
12
|
messageService: MessageService;
|
|
13
13
|
}
|
|
14
14
|
export declare function triggerCampaignImpl({ adaSettings, chatterToken, campaign, ignoreStatus, ignoreFrequency, clearCampaignToTrigger, messageService, }: TriggerCampaignImplParams): void;
|
|
15
|
-
export declare const getCampaignToTrigger: (adaSettings: StartOptions,
|
|
15
|
+
export declare const getCampaignToTrigger: (adaSettings: StartOptions, marketingCampaigns: MarketingCampaign[] | undefined, options: EvaluateCampaignParams, onlyBasic: boolean) => MarketingCampaign;
|
|
16
16
|
export {};
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -8492,7 +8492,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8492
8492
|
return event;
|
|
8493
8493
|
},
|
|
8494
8494
|
environment: "production",
|
|
8495
|
-
release: "
|
|
8495
|
+
release: "26ba329763628125ccd447c10be0476c80863a64",
|
|
8496
8496
|
sampleRate: 0.25,
|
|
8497
8497
|
autoSessionTracking: false,
|
|
8498
8498
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -9176,7 +9176,7 @@ function getEmbedURL(_ref) {
|
|
|
9176
9176
|
polyfillVersionString = "legacy";
|
|
9177
9177
|
}
|
|
9178
9178
|
|
|
9179
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9179
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "26ba329", "/index.html");
|
|
9180
9180
|
}
|
|
9181
9181
|
/**
|
|
9182
9182
|
* Generate the Chat / API URL
|
|
@@ -10324,7 +10324,7 @@ function triggerCampaignImpl(_ref) {
|
|
|
10324
10324
|
});
|
|
10325
10325
|
}
|
|
10326
10326
|
}
|
|
10327
|
-
var getCampaignToTrigger = function getCampaignToTrigger(adaSettings,
|
|
10327
|
+
var getCampaignToTrigger = function getCampaignToTrigger(adaSettings, marketingCampaigns, options, onlyBasic) {
|
|
10328
10328
|
var _options$ignoreStatus = options.ignoreStatus,
|
|
10329
10329
|
ignoreStatus = _options$ignoreStatus === void 0 ? false : _options$ignoreStatus,
|
|
10330
10330
|
_options$ignoreFreque = options.ignoreFrequency,
|
|
@@ -10333,6 +10333,10 @@ var getCampaignToTrigger = function getCampaignToTrigger(adaSettings, chatterTok
|
|
|
10333
10333
|
return marketingCampaigns === null || marketingCampaigns === void 0 ? void 0 : find_default()(marketingCampaigns).call(marketingCampaigns, function (campaign) {
|
|
10334
10334
|
if (campaign.status !== "active" && !ignoreStatus) {
|
|
10335
10335
|
return false;
|
|
10336
|
+
}
|
|
10337
|
+
|
|
10338
|
+
if (onlyBasic && !campaign.message_text) {
|
|
10339
|
+
return false;
|
|
10336
10340
|
} // Campaigns with no trigger conditions can only be triggered manually
|
|
10337
10341
|
|
|
10338
10342
|
|
|
@@ -12595,14 +12599,13 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12595
12599
|
var useDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
12596
12600
|
var _this$props8 = this.props,
|
|
12597
12601
|
adaSettings = _this$props8.adaSettings,
|
|
12598
|
-
chatterToken = _this$props8.chatterToken,
|
|
12599
12602
|
client = _this$props8.client;
|
|
12600
12603
|
|
|
12601
12604
|
if (!hasCampaignsEnabled(client)) {
|
|
12602
12605
|
return;
|
|
12603
12606
|
}
|
|
12604
12607
|
|
|
12605
|
-
var campaignToTrigger = getCampaignToTrigger(adaSettings,
|
|
12608
|
+
var campaignToTrigger = getCampaignToTrigger(adaSettings, client.marketing_campaigns, params, !client.features.afm_proactive_messaging);
|
|
12606
12609
|
|
|
12607
12610
|
if (campaignToTrigger) {
|
|
12608
12611
|
if (useDelay) {
|
|
@@ -13845,7 +13848,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
13845
13848
|
/* harmony export */ });
|
|
13846
13849
|
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(14|(1[5-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(92|(9[3-9]|\\d{3,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(14|(1[5-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
13847
13850
|
var isProduction = "production" === "production";
|
|
13848
|
-
var embed2Version = "
|
|
13851
|
+
var embed2Version = "26ba329";
|
|
13849
13852
|
|
|
13850
13853
|
/***/ }),
|
|
13851
13854
|
|
|
@@ -23242,7 +23245,7 @@ function _loadEmbed() {
|
|
|
23242
23245
|
polyfillVersionString = "legacy";
|
|
23243
23246
|
}
|
|
23244
23247
|
|
|
23245
|
-
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "
|
|
23248
|
+
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "26ba329", "/index.js");
|
|
23246
23249
|
}
|
|
23247
23250
|
|
|
23248
23251
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|
|
@@ -23369,10 +23372,10 @@ function createEmbedObject() {
|
|
|
23369
23372
|
handle: adaSettings.handle,
|
|
23370
23373
|
embedVersion: 2,
|
|
23371
23374
|
embedSettings: adaSettings,
|
|
23372
|
-
version: "1.0.
|
|
23375
|
+
version: "1.0.37",
|
|
23373
23376
|
isNpm: true,
|
|
23374
23377
|
hostPage: window.location.href,
|
|
23375
|
-
commitHash: "
|
|
23378
|
+
commitHash: "26ba329"
|
|
23376
23379
|
}, {
|
|
23377
23380
|
sampleRate: 0.01 // 1% of logs will go through
|
|
23378
23381
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-support/embed2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/npm-entry",
|
|
6
6
|
"typings": "dist/npm-entry/index.d.ts",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"bundle-report-intro:modern": "webpack-bundle-analyzer --port 4204 dist/embed/modern/intro/local/stats.json dist/embed/modern/intro/local",
|
|
47
47
|
"bundle-report-x-storage:modern": "webpack-bundle-analyzer --port 4205 dist/embed/modern/x-storage/local/stats.json dist/embed/modern/x-storage/local",
|
|
48
48
|
"bundle-report:modern": "yarn build && run-p bundle-report-entry bundle-report-button:modern bundle-report-client:modern bundle-report-mask:modern bundle-report-intro:modern bundle-report-x-storage:modern",
|
|
49
|
-
"prepare": "husky install"
|
|
49
|
+
"prepare": "husky install",
|
|
50
|
+
"check-package-version": "./check-package-version.sh"
|
|
50
51
|
},
|
|
51
52
|
"keywords": [],
|
|
52
53
|
"author": "",
|