ouisys-engine 2.1.66 → 2.1.69
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.
|
@@ -59,6 +59,8 @@ var _utilities = require("../../utilities");
|
|
|
59
59
|
|
|
60
60
|
var _loadScriptInnerHtml = _interopRequireDefault(require("../../utilities/loadScriptInnerHtml"));
|
|
61
61
|
|
|
62
|
+
var _utils = require("../strategy/utils");
|
|
63
|
+
|
|
62
64
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
63
65
|
|
|
64
66
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -170,24 +172,33 @@ function _submitMSISDNWithConfig() {
|
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
var startEvinaAgency = function startEvinaAgency(config) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
175
|
+
try {
|
|
176
|
+
var configs = (0, _utils.getConfig)();
|
|
177
|
+
var defaultFlowConfig = configs.strategyConfigs.default;
|
|
178
|
+
|
|
179
|
+
var _ref = !!config ? config : defaultFlowConfig.flowConfig,
|
|
180
|
+
host = _ref.host;
|
|
181
|
+
|
|
182
|
+
var newHost = (0, _utilities.getHost)({
|
|
183
|
+
host: host
|
|
184
|
+
});
|
|
185
|
+
var rockmanId = window.pac_analytics.visitor.rockmanId;
|
|
186
|
+
var url = "https://".concat(newHost, "/tallyman/helper/?action=mi-agency&process=a2-du-evina-start&rockman_id=").concat(rockmanId);
|
|
187
|
+
fetch(url).then(function (x) {
|
|
188
|
+
return x.text();
|
|
189
|
+
}).then(function (txt) {
|
|
190
|
+
return (0, _loadScriptInnerHtml.default)(txt);
|
|
191
|
+
}).then(function () {
|
|
192
|
+
console.log('Ev ready');
|
|
193
|
+
var event = new Event('DCBProtectRun');
|
|
194
|
+
|
|
195
|
+
if (typeof window != "undefined") {
|
|
196
|
+
document.dispatchEvent(event);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
} catch (err) {
|
|
200
|
+
console.error("startEvinaAgency ERROR", err);
|
|
201
|
+
}
|
|
191
202
|
};
|
|
192
203
|
|
|
193
204
|
exports.startEvinaAgency = startEvinaAgency;
|
|
@@ -359,7 +359,7 @@ var getRedirectUrlBupperWay = /*#__PURE__*/function () {
|
|
|
359
359
|
}).join('&'); // one click flow must use http not https
|
|
360
360
|
|
|
361
361
|
xcid = window.location.href.split("/")[3].split('?')[0];
|
|
362
|
-
return _context3.abrupt("return", "http://".concat(host, "/").concat(bupperizeCountry(country), "/").concat(slug, "?offer=").concat(offer, "&atmobirun=1&rockman_id=").concat(window.pac_analytics.visitor.rockmanId, "&redirPixels=").concat(window.location.host, "&x-xcid=").concat(xcid).concat(extraParamsQs
|
|
362
|
+
return _context3.abrupt("return", "http://".concat(host, "/").concat(bupperizeCountry(country), "/").concat(slug, "?offer=").concat(offer, "&atmobirun=1&rockman_id=").concat(window.pac_analytics.visitor.rockmanId, "&redirPixels=").concat(window.location.host, "&x-xcid=").concat(xcid).concat(extraParamsQs).concat(search));
|
|
363
363
|
|
|
364
364
|
case 12:
|
|
365
365
|
case "end":
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import * as RDS from "../../common-types/RemoteDataState";
|
|
|
5
5
|
import loadScriptSrc from "../../utilities/loadScriptSrc";
|
|
6
6
|
import { getHost, isDMBCheck } from "../../utilities";
|
|
7
7
|
import loadScriptInnerHtml from "../../utilities/loadScriptInnerHtml";
|
|
8
|
+
import { getConfig } from "../strategy/utils";
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
export default async function submitMSISDN(window: Window, maybeConfig: IConfig, internationalMSISDN: string, extraParams?: {[key: string]: string}): Promise<string> {
|
|
@@ -37,18 +38,26 @@ export async function submitMSISDNWithConfig(window: Window, config: IConfig, in
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export const startEvinaAgency = (config: IConfig)=>{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
try{
|
|
42
|
+
const configs = getConfig();
|
|
43
|
+
const defaultFlowConfig = configs.strategyConfigs.default;
|
|
44
|
+
|
|
45
|
+
const { host } = !!config ? config : defaultFlowConfig.flowConfig;
|
|
46
|
+
const newHost = getHost({host});
|
|
47
|
+
const rockmanId = window.pac_analytics.visitor.rockmanId;
|
|
48
|
+
const url = `https://${newHost}/tallyman/helper/?action=mi-agency&process=a2-du-evina-start&rockman_id=${rockmanId}`;
|
|
49
|
+
|
|
50
|
+
fetch(url).then((x)=>x.text()).then((txt)=>loadScriptInnerHtml(txt)).then(()=>{
|
|
51
|
+
console.log('Ev ready');
|
|
52
|
+
let event = new Event('DCBProtectRun');
|
|
53
|
+
if(typeof window != "undefined"){
|
|
54
|
+
document.dispatchEvent(event);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}catch(err){
|
|
58
|
+
console.error("startEvinaAgency ERROR", err)
|
|
59
|
+
}
|
|
44
60
|
|
|
45
|
-
fetch(url).then((x)=>x.text()).then((txt)=>loadScriptInnerHtml(txt)).then(()=>{
|
|
46
|
-
console.log('Ev ready');
|
|
47
|
-
let event = new Event('DCBProtectRun');
|
|
48
|
-
if(typeof window != "undefined"){
|
|
49
|
-
document.dispatchEvent(event);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
61
|
}
|
|
53
62
|
|
|
54
63
|
export const mockedMSISDNEntrySuccess : IMoRedirFlowReducerState = {
|
|
@@ -194,7 +194,7 @@ export const getRedirectUrlBupperWay = async(window:Window, maybeConfig: IConfig
|
|
|
194
194
|
|
|
195
195
|
// one click flow must use http not https
|
|
196
196
|
const xcid = window.location.href.split("/")[3].split('?')[0];
|
|
197
|
-
return `http://${host}/${bupperizeCountry(country)}/${slug}?offer=${offer}&atmobirun=1&rockman_id=${window.pac_analytics.visitor.rockmanId}&redirPixels=${window.location.host}&x-xcid=${xcid}${extraParamsQs}
|
|
197
|
+
return `http://${host}/${bupperizeCountry(country)}/${slug}?offer=${offer}&atmobirun=1&rockman_id=${window.pac_analytics.visitor.rockmanId}&redirPixels=${window.location.host}&x-xcid=${xcid}${extraParamsQs}${search}`
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|