@paystack/inline-js 2.20.3-dev.2 → 2.21.0-dev.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/inline.js CHANGED
@@ -1301,14 +1301,21 @@ var PaystackPop = (function () {
1301
1301
  }
1302
1302
 
1303
1303
  /* eslint-env browser */
1304
- function getReferrer() {
1305
- var href = window.location.href;
1306
-
1307
- if (href && href.length > 500) {
1308
- return href.split('?')[0];
1304
+ function splitURL(url) {
1305
+ if ((url === null || url === void 0 ? void 0 : url.length) > 500) {
1306
+ return url.split('?')[0];
1309
1307
  }
1310
1308
 
1311
- return href;
1309
+ return url;
1310
+ }
1311
+
1312
+ function getReferrer() {
1313
+ var _window$location = window.location,
1314
+ _window$location$href = _window$location.href,
1315
+ href = _window$location$href === void 0 ? '' : _window$location$href,
1316
+ _window$location$ance = _window$location.ancestorOrigins,
1317
+ ancestorOrigins = _window$location$ance === void 0 ? [] : _window$location$ance;
1318
+ return [href].concat(_toConsumableArray(ancestorOrigins)).map(splitURL).join(',');
1312
1319
  }
1313
1320
 
1314
1321
  function buildQuery(parameters) {
package/es/inline.js CHANGED
@@ -1298,14 +1298,21 @@ function validate(args) {
1298
1298
  }
1299
1299
 
1300
1300
  /* eslint-env browser */
1301
- function getReferrer() {
1302
- var href = window.location.href;
1303
-
1304
- if (href && href.length > 500) {
1305
- return href.split('?')[0];
1301
+ function splitURL(url) {
1302
+ if ((url === null || url === void 0 ? void 0 : url.length) > 500) {
1303
+ return url.split('?')[0];
1306
1304
  }
1307
1305
 
1308
- return href;
1306
+ return url;
1307
+ }
1308
+
1309
+ function getReferrer() {
1310
+ var _window$location = window.location,
1311
+ _window$location$href = _window$location.href,
1312
+ href = _window$location$href === void 0 ? '' : _window$location$href,
1313
+ _window$location$ance = _window$location.ancestorOrigins,
1314
+ ancestorOrigins = _window$location$ance === void 0 ? [] : _window$location$ance;
1315
+ return [href].concat(_toConsumableArray(ancestorOrigins)).map(splitURL).join(',');
1309
1316
  }
1310
1317
 
1311
1318
  function buildQuery(parameters) {
package/lib/inline.js CHANGED
@@ -1300,14 +1300,21 @@ function validate(args) {
1300
1300
  }
1301
1301
 
1302
1302
  /* eslint-env browser */
1303
- function getReferrer() {
1304
- var href = window.location.href;
1305
-
1306
- if (href && href.length > 500) {
1307
- return href.split('?')[0];
1303
+ function splitURL(url) {
1304
+ if ((url === null || url === void 0 ? void 0 : url.length) > 500) {
1305
+ return url.split('?')[0];
1308
1306
  }
1309
1307
 
1310
- return href;
1308
+ return url;
1309
+ }
1310
+
1311
+ function getReferrer() {
1312
+ var _window$location = window.location,
1313
+ _window$location$href = _window$location.href,
1314
+ href = _window$location$href === void 0 ? '' : _window$location$href,
1315
+ _window$location$ance = _window$location.ancestorOrigins,
1316
+ ancestorOrigins = _window$location$ance === void 0 ? [] : _window$location$ance;
1317
+ return [href].concat(_toConsumableArray(ancestorOrigins)).map(splitURL).join(',');
1311
1318
  }
1312
1319
 
1313
1320
  function buildQuery(parameters) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/inline-js",
3
- "version": "2.20.3-dev.2",
3
+ "version": "2.21.0-dev.1",
4
4
  "description": "Client-side library to load the Paystack checkout form",
5
5
  "main": "lib/inline.js",
6
6
  "module": "es/inline.js",