ouisys-engine 2.1.69 → 2.1.72
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/.eslintrc.js +5 -0
- package/.prettierignore +3 -0
- package/.vscode/settings.json +6 -0
- package/dist/reducers/pinFlow/utils.js +2 -3
- package/dist/utilities/index.js +14 -6
- package/package.json +1 -1
- package/prettier.config.js +7 -0
- package/src/@types/window.d.ts +1 -0
- package/src/reducers/pinFlow/utils.ts +2 -3
- package/src/utilities/index.ts +11 -5
package/.eslintrc.js
ADDED
package/.prettierignore
ADDED
|
@@ -116,7 +116,6 @@ var bupperizeCountry = function bupperizeCountry(c) {
|
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
var uniqidResult = "";
|
|
119
|
-
var uniqidOnLoadResult = "";
|
|
120
119
|
|
|
121
120
|
function loadMcpShield(_x5, _x6) {
|
|
122
121
|
return _loadMcpShield.apply(this, arguments);
|
|
@@ -150,7 +149,7 @@ function _loadMcpShield() {
|
|
|
150
149
|
|
|
151
150
|
case 11:
|
|
152
151
|
(0, _loadScriptInnerHtml.default)(mcpShieldResult.source);
|
|
153
|
-
|
|
152
|
+
uniqidResult = mcpShieldResult.uniqid;
|
|
154
153
|
return _context2.abrupt("return", mcpShieldResult);
|
|
155
154
|
|
|
156
155
|
case 14:
|
|
@@ -227,7 +226,7 @@ function _submitMSISDNOnce() {
|
|
|
227
226
|
extraParamsQs = !extraParams ? '' : '&' + Object.keys(extraParams).map(function (k) {
|
|
228
227
|
return "".concat(k, "=").concat(extraParams[k]);
|
|
229
228
|
}).join('&');
|
|
230
|
-
uniqid =
|
|
229
|
+
uniqid = !!uniqidResult && uniqidResult != "" ? "&mcpUniqid=".concat(uniqidResult) : '';
|
|
231
230
|
_context3.next = 18;
|
|
232
231
|
return window.tallymanApi.triggerPin(host, country, slug, device, offer, msisdn, rockmanId, extraParamsQs, search, uniqid);
|
|
233
232
|
|
package/dist/utilities/index.js
CHANGED
|
@@ -9,6 +9,8 @@ var _utils = require("../reducers/moFlow/utils");
|
|
|
9
9
|
|
|
10
10
|
var _utils2 = require("../reducers/moRedirFlow/utils");
|
|
11
11
|
|
|
12
|
+
var _utils3 = require("../reducers/pinFlow/utils");
|
|
13
|
+
|
|
12
14
|
var isDMBCheck = function isDMBCheck() {
|
|
13
15
|
return window.pac_analytics.visitor.xaid != null && (window.pac_analytics.visitor.xaid.toLowerCase().indexOf("dmb") != -1 || window.pac_analytics.visitor.xaid.toLowerCase().indexOf("amb")) != -1 ? true : false;
|
|
14
16
|
};
|
|
@@ -24,12 +26,18 @@ var getHost = function getHost(_ref) {
|
|
|
24
26
|
exports.getHost = getHost;
|
|
25
27
|
|
|
26
28
|
var setOnLoadUtilities = function setOnLoadUtilities(config) {
|
|
27
|
-
if (
|
|
28
|
-
(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
(
|
|
29
|
+
if (typeof window != "undefined") {
|
|
30
|
+
if (process.env.country.toLowerCase() === "cz") {
|
|
31
|
+
(0, _utils.getGoogleReCaptchaConfig)(config);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (process.env.country.toLowerCase() === "a2" && process.env.NODE_ENV === "production") {
|
|
35
|
+
(0, _utils2.startEvinaAgency)(config);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq") {
|
|
39
|
+
(0, _utils3.loadMcpShield)(window, config);
|
|
40
|
+
}
|
|
33
41
|
}
|
|
34
42
|
};
|
|
35
43
|
|
package/package.json
CHANGED
package/src/@types/window.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export default async function submitMSISDN(window: Window, maybeConfig: IConfig,
|
|
|
17
17
|
const bupperizeCountry = (c:string) => c == 'gb' ? 'uk' : c;
|
|
18
18
|
|
|
19
19
|
let uniqidResult = "";
|
|
20
|
-
let uniqidOnLoadResult = "";
|
|
21
20
|
export async function loadMcpShield(window: Window, config: IConfig): Promise<IMcpShieldResult> {
|
|
22
21
|
const { slug, country, device, host } = config;
|
|
23
22
|
|
|
@@ -31,7 +30,7 @@ export async function loadMcpShield(window: Window, config: IConfig): Promise<IM
|
|
|
31
30
|
console.warn(mcpShieldResult.message);
|
|
32
31
|
}else{
|
|
33
32
|
loadScriptInnerHtml(mcpShieldResult.source);
|
|
34
|
-
|
|
33
|
+
uniqidResult = mcpShieldResult.uniqid;
|
|
35
34
|
return mcpShieldResult
|
|
36
35
|
}
|
|
37
36
|
}catch(err){
|
|
@@ -73,7 +72,7 @@ async function submitMSISDNOnce(window: Window, config: IConfig, internationalMS
|
|
|
73
72
|
|
|
74
73
|
const search = (window.location.search.indexOf("redirect-back=1") == -1) ? (window.location.search.substr(1) || '') : ''
|
|
75
74
|
const extraParamsQs = !extraParams ? '' : '&' + Object.keys(extraParams).map(k => `${k}=${extraParams[k]}`).join('&')
|
|
76
|
-
const uniqid = (
|
|
75
|
+
const uniqid = (!!uniqidResult && uniqidResult != "") ? `&mcpUniqid=${uniqidResult}` : '';
|
|
77
76
|
|
|
78
77
|
|
|
79
78
|
|
package/src/utilities/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getGoogleReCaptchaConfig } from "../reducers/moFlow/utils";
|
|
2
2
|
import { startEvinaAgency } from "../reducers/moRedirFlow/utils";
|
|
3
|
+
import { loadMcpShield } from "../reducers/pinFlow/utils";
|
|
3
4
|
import { IConfig } from "../reducers/strategy/StrategyTypes";
|
|
4
5
|
|
|
5
6
|
export const isDMBCheck = ()=>{
|
|
@@ -12,10 +13,15 @@ export const getHost = ({host}:{host: string}): string=>{
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export const setOnLoadUtilities = (config:IConfig)=>{
|
|
15
|
-
if(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
if(typeof window != "undefined"){
|
|
17
|
+
if(process.env.country.toLowerCase() === "cz"){
|
|
18
|
+
getGoogleReCaptchaConfig(config)
|
|
19
|
+
}
|
|
20
|
+
if(process.env.country.toLowerCase() === "a2" && process.env.NODE_ENV === "production"){
|
|
21
|
+
startEvinaAgency(config)
|
|
22
|
+
}
|
|
23
|
+
if(process.env.country.toLowerCase() === "sa" || process.env.country.toLowerCase() === "iq"){
|
|
24
|
+
loadMcpShield(window, config);
|
|
25
|
+
}
|
|
20
26
|
}
|
|
21
27
|
}
|