ouisys-engine 2.1.65 → 2.1.68

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.
@@ -170,24 +170,28 @@ function _submitMSISDNWithConfig() {
170
170
  }
171
171
 
172
172
  var startEvinaAgency = function startEvinaAgency(config) {
173
- var host = config.host;
174
- var newHost = (0, _utilities.getHost)({
175
- host: host
176
- });
177
- var rockmanId = window.pac_analytics.visitor.rockmanId;
178
- var url = "https://".concat(newHost, "/tallyman/helper/?action=mi-agency&process=a2-du-evina-start&rockman_id=").concat(rockmanId);
179
- fetch(url).then(function (x) {
180
- return x.text();
181
- }).then(function (txt) {
182
- return (0, _loadScriptInnerHtml.default)(txt);
183
- }).then(function () {
184
- console.log('Ev ready');
185
- var event = new Event('DCBProtectRun');
186
-
187
- if (typeof window != "undefined") {
188
- document.dispatchEvent(event);
189
- }
190
- });
173
+ try {
174
+ var host = config.host;
175
+ var newHost = (0, _utilities.getHost)({
176
+ host: host
177
+ });
178
+ var rockmanId = window.pac_analytics.visitor.rockmanId;
179
+ var url = "https://".concat(newHost, "/tallyman/helper/?action=mi-agency&process=a2-du-evina-start&rockman_id=").concat(rockmanId);
180
+ fetch(url).then(function (x) {
181
+ return x.text();
182
+ }).then(function (txt) {
183
+ return (0, _loadScriptInnerHtml.default)(txt);
184
+ }).then(function () {
185
+ console.log('Ev ready');
186
+ var event = new Event('DCBProtectRun');
187
+
188
+ if (typeof window != "undefined") {
189
+ document.dispatchEvent(event);
190
+ }
191
+ });
192
+ } catch (err) {
193
+ console.error("startEvinaAgency ERROR", err);
194
+ }
191
195
  };
192
196
 
193
197
  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, "&").concat(search, "&"));
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":
@@ -65,7 +65,13 @@ var handleFormSubmit = function handleFormSubmit(_ref2) {
65
65
  }
66
66
  } else {
67
67
  if (!!internationalNumber) {
68
- onEnd(internationalNumber.match(/\d+/gi).join(''));
68
+ if (process.env.country == "ci") {
69
+ onEnd(internationalNumber.match(/\d+/gi).join(''), {
70
+ network_type: networkType
71
+ });
72
+ } else {
73
+ onEnd(internationalNumber.match(/\d+/gi).join(''));
74
+ }
69
75
  }
70
76
  }
71
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ouisys-engine",
3
- "version": "2.1.65",
3
+ "version": "2.1.68",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": "dist dev-tools",
@@ -37,18 +37,23 @@ export async function submitMSISDNWithConfig(window: Window, config: IConfig, in
37
37
  }
38
38
 
39
39
  export const startEvinaAgency = (config: IConfig)=>{
40
- const { host } = config
41
- const newHost = getHost({host});
42
- const rockmanId = window.pac_analytics.visitor.rockmanId;
43
- const url = `https://${newHost}/tallyman/helper/?action=mi-agency&process=a2-du-evina-start&rockman_id=${rockmanId}`;
40
+ try{
41
+ const { host } = config
42
+ const newHost = getHost({host});
43
+ const rockmanId = window.pac_analytics.visitor.rockmanId;
44
+ const url = `https://${newHost}/tallyman/helper/?action=mi-agency&process=a2-du-evina-start&rockman_id=${rockmanId}`;
45
+
46
+ fetch(url).then((x)=>x.text()).then((txt)=>loadScriptInnerHtml(txt)).then(()=>{
47
+ console.log('Ev ready');
48
+ let event = new Event('DCBProtectRun');
49
+ if(typeof window != "undefined"){
50
+ document.dispatchEvent(event);
51
+ }
52
+ });
53
+ }catch(err){
54
+ console.error("startEvinaAgency ERROR", err)
55
+ }
44
56
 
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
57
  }
53
58
 
54
59
  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}&${search}&`
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
 
@@ -55,7 +55,11 @@ export const handleFormSubmit = ({
55
55
  }
56
56
  }else{
57
57
  if(!!internationalNumber){
58
- onEnd(internationalNumber.match(/\d+/gi).join(''));
58
+ if(process.env.country == "ci"){
59
+ onEnd(internationalNumber.match(/\d+/gi).join(''), { network_type:networkType });
60
+ }else{
61
+ onEnd(internationalNumber.match(/\d+/gi).join(''));
62
+ }
59
63
  }
60
64
  }
61
65
  }
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "semi": true,
3
- "trailingComma": "none",
4
- "singleQuote": true,
5
- "printWidth": 120,
6
- "tabWidth": 2
7
- };