@quintype/components 3.8.0 → 3.8.2-logs.0

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/cjs/index.js CHANGED
@@ -5053,6 +5053,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5053
5053
  var accessTypeKey = get__default["default"](_this.props, ["accessTypeKey"]);
5054
5054
  var isStaging = get__default["default"](_this.props, ["isStaging"]);
5055
5055
  var enableAccesstype = get__default["default"](_this.props, ["enableAccesstype"]);
5056
+ console.log("loadscript===============", _this.props);
5056
5057
 
5057
5058
  if (!enableAccesstype) {
5058
5059
  return false;
@@ -5064,6 +5065,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5064
5065
  var isATScriptAlreadyPresent = document.querySelector("script[src=\"".concat(accessTypeHost, "\"]"));
5065
5066
 
5066
5067
  if (accessTypeKey && !isATScriptAlreadyPresent && !global.AccessType && global.document) {
5068
+ console.log("coming in creating the script---------");
5067
5069
  var accessTypeScript = document.createElement("script");
5068
5070
 
5069
5071
  accessTypeScript.onload = function () {
@@ -5485,40 +5487,57 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5485
5487
  })));
5486
5488
 
5487
5489
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "getSubscriptionForUser", /*#__PURE__*/_asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9() {
5490
+ var _global, _window, _global2, _global2$get;
5491
+
5488
5492
  var _yield$awaitHelper8, error, _yield$awaitHelper8$d, subscriptions;
5489
5493
 
5490
5494
  return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
5491
5495
  while (1) {
5492
5496
  switch (_context9.prev = _context9.next) {
5493
5497
  case 0:
5498
+ console.log(typeof global !== 'undefined' ? 'Node.js' : 'Browser');
5499
+ console.log("global.Accesstype---------", (_global = global) === null || _global === void 0 ? void 0 : _global.AccessType);
5500
+ console.log("window.Accesstype---------", (_window = window) === null || _window === void 0 ? void 0 : _window.AccessType);
5501
+ console.log("global---------", global);
5502
+ console.log("object keys----", Object.keys(global));
5503
+ console.log("object keys global.window----", Object.keys(global.window));
5504
+ console.log("global window enumerable", Object.getOwnPropertyDescriptor(global.window, 'Accesstype'));
5505
+ console.log("window----------", window);
5506
+ console.log("global?.get?.('Accesstype')----", (_global2 = global) === null || _global2 === void 0 ? void 0 : (_global2$get = _global2.get) === null || _global2$get === void 0 ? void 0 : _global2$get.call(_global2, 'Accesstype'));
5507
+ setTimeout(function () {
5508
+ console.log("settimeout---------", global.Accesstype); // Check if it exists after some time
5509
+ }, 1000);
5510
+
5494
5511
  if (global.AccessType) {
5495
- _context9.next = 2;
5512
+ _context9.next = 12;
5496
5513
  break;
5497
5514
  }
5498
5515
 
5499
5516
  return _context9.abrupt("return", {});
5500
5517
 
5501
- case 2:
5502
- _context9.next = 4;
5518
+ case 12:
5519
+ _context9.next = 14;
5503
5520
  return awaitHelper(global.AccessType.getSubscriptions());
5504
5521
 
5505
- case 4:
5522
+ case 14:
5506
5523
  _yield$awaitHelper8 = _context9.sent;
5507
5524
  error = _yield$awaitHelper8.error;
5508
5525
  _yield$awaitHelper8$d = _yield$awaitHelper8.data;
5509
5526
  subscriptions = _yield$awaitHelper8$d === void 0 ? [] : _yield$awaitHelper8$d;
5510
5527
 
5511
5528
  if (!error) {
5512
- _context9.next = 10;
5529
+ _context9.next = 21;
5513
5530
  break;
5514
5531
  }
5515
5532
 
5533
+ console.log("user subscription error-------", error);
5516
5534
  return _context9.abrupt("return", error);
5517
5535
 
5518
- case 10:
5536
+ case 21:
5537
+ console.log("subscription----------", subscriptions);
5519
5538
  return _context9.abrupt("return", subscriptions);
5520
5539
 
5521
- case 11:
5540
+ case 23:
5522
5541
  case "end":
5523
5542
  return _context9.stop();
5524
5543
  }
@@ -5584,6 +5603,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
5584
5603
 
5585
5604
  _defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "initAccessType", function (callback) {
5586
5605
  var accessTypeBkIntegrationId = _this.props.accessTypeBkIntegrationId;
5606
+ console.log("init accesstype-----");
5587
5607
 
5588
5608
  try {
5589
5609
  _this.loadScript(function () {
@@ -42,6 +42,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
42
42
  var accessTypeKey = get(_this.props, ["accessTypeKey"]);
43
43
  var isStaging = get(_this.props, ["isStaging"]);
44
44
  var enableAccesstype = get(_this.props, ["enableAccesstype"]);
45
+ console.log("loadscript===============", _this.props);
45
46
 
46
47
  if (!enableAccesstype) {
47
48
  return false;
@@ -53,6 +54,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
53
54
  var isATScriptAlreadyPresent = document.querySelector("script[src=\"".concat(accessTypeHost, "\"]"));
54
55
 
55
56
  if (accessTypeKey && !isATScriptAlreadyPresent && !global.AccessType && global.document) {
57
+ console.log("coming in creating the script---------");
56
58
  var accessTypeScript = document.createElement("script");
57
59
 
58
60
  accessTypeScript.onload = function () {
@@ -474,40 +476,57 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
474
476
  })));
475
477
 
476
478
  _defineProperty(_assertThisInitialized(_this), "getSubscriptionForUser", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
479
+ var _global, _window, _global2, _global2$get;
480
+
477
481
  var _yield$awaitHelper8, error, _yield$awaitHelper8$d, subscriptions;
478
482
 
479
483
  return _regeneratorRuntime.wrap(function _callee9$(_context9) {
480
484
  while (1) {
481
485
  switch (_context9.prev = _context9.next) {
482
486
  case 0:
487
+ console.log(typeof global !== 'undefined' ? 'Node.js' : 'Browser');
488
+ console.log("global.Accesstype---------", (_global = global) === null || _global === void 0 ? void 0 : _global.AccessType);
489
+ console.log("window.Accesstype---------", (_window = window) === null || _window === void 0 ? void 0 : _window.AccessType);
490
+ console.log("global---------", global);
491
+ console.log("object keys----", Object.keys(global));
492
+ console.log("object keys global.window----", Object.keys(global.window));
493
+ console.log("global window enumerable", Object.getOwnPropertyDescriptor(global.window, 'Accesstype'));
494
+ console.log("window----------", window);
495
+ console.log("global?.get?.('Accesstype')----", (_global2 = global) === null || _global2 === void 0 ? void 0 : (_global2$get = _global2.get) === null || _global2$get === void 0 ? void 0 : _global2$get.call(_global2, 'Accesstype'));
496
+ setTimeout(function () {
497
+ console.log("settimeout---------", global.Accesstype); // Check if it exists after some time
498
+ }, 1000);
499
+
483
500
  if (global.AccessType) {
484
- _context9.next = 2;
501
+ _context9.next = 12;
485
502
  break;
486
503
  }
487
504
 
488
505
  return _context9.abrupt("return", {});
489
506
 
490
- case 2:
491
- _context9.next = 4;
507
+ case 12:
508
+ _context9.next = 14;
492
509
  return awaitHelper(global.AccessType.getSubscriptions());
493
510
 
494
- case 4:
511
+ case 14:
495
512
  _yield$awaitHelper8 = _context9.sent;
496
513
  error = _yield$awaitHelper8.error;
497
514
  _yield$awaitHelper8$d = _yield$awaitHelper8.data;
498
515
  subscriptions = _yield$awaitHelper8$d === void 0 ? [] : _yield$awaitHelper8$d;
499
516
 
500
517
  if (!error) {
501
- _context9.next = 10;
518
+ _context9.next = 21;
502
519
  break;
503
520
  }
504
521
 
522
+ console.log("user subscription error-------", error);
505
523
  return _context9.abrupt("return", error);
506
524
 
507
- case 10:
525
+ case 21:
526
+ console.log("subscription----------", subscriptions);
508
527
  return _context9.abrupt("return", subscriptions);
509
528
 
510
- case 11:
529
+ case 23:
511
530
  case "end":
512
531
  return _context9.stop();
513
532
  }
@@ -573,6 +592,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
573
592
 
574
593
  _defineProperty(_assertThisInitialized(_this), "initAccessType", function (callback) {
575
594
  var accessTypeBkIntegrationId = _this.props.accessTypeBkIntegrationId;
595
+ console.log("init accesstype-----");
576
596
 
577
597
  try {
578
598
  _this.loadScript(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/components",
3
- "version": "3.8.0",
3
+ "version": "3.8.2-logs.0",
4
4
  "description": "Components to help build Quintype Node.js apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",