@bigbinary/neeto-site-blocks 1.18.4 → 1.18.6

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/index.cjs.js CHANGED
@@ -7227,9 +7227,15 @@ var Button = function Button(_ref) {
7227
7227
  children: label
7228
7228
  }));
7229
7229
  }
7230
+ if (action === "embed") {
7231
+ return /*#__PURE__*/jsxRuntime.jsx(StyledAnchor, _objectSpread$B(_objectSpread$B({}, commonProps), {}, {
7232
+ as: "button",
7233
+ href: "",
7234
+ children: label
7235
+ }));
7236
+ }
7230
7237
  return /*#__PURE__*/jsxRuntime.jsx(StyledAnchor, _objectSpread$B(_objectSpread$B({}, commonProps), {}, {
7231
- as: "button",
7232
- href: action === "embed" && "",
7238
+ to: commonProps.href,
7233
7239
  children: label
7234
7240
  }));
7235
7241
  };
@@ -13484,17 +13490,40 @@ var CtaClassic = function CtaClassic(_ref) {
13484
13490
  });
13485
13491
  };
13486
13492
 
13487
- //Ignoring PascalCase conventions since this is not react component and ignoring axios import outside /javascript/apis since this is a npm package
13488
- var subscribeForCtaWithInput = function subscribeForCtaWithInput(_ref) {
13489
- var apiEndpoint = _ref.apiEndpoint,
13490
- apiHeaders = _ref.apiHeaders,
13491
- email = _ref.email;
13492
- return axios__default["default"].post(apiEndpoint, {
13493
- email: email
13494
- }, {
13495
- headers: apiHeaders
13496
- });
13497
- };
13493
+ var subscribeForCtaWithInput = /*#__PURE__*/function () {
13494
+ var _ref2 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(_ref) {
13495
+ var apiEndpoint, apiHeaders, email, headers;
13496
+ return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
13497
+ while (1) switch (_context.prev = _context.next) {
13498
+ case 0:
13499
+ apiEndpoint = _ref.apiEndpoint, apiHeaders = _ref.apiHeaders, email = _ref.email;
13500
+ _context.prev = 1;
13501
+ headers = JSON.parse(apiHeaders);
13502
+ _context.next = 5;
13503
+ return axios__default["default"].post(apiEndpoint, {
13504
+ email: email
13505
+ }, {
13506
+ headers: headers
13507
+ });
13508
+ case 5:
13509
+ return _context.abrupt("return", _context.sent);
13510
+ case 8:
13511
+ _context.prev = 8;
13512
+ _context.t0 = _context["catch"](1);
13513
+ // eslint-disable-next-line no-console
13514
+ console.log(_context.t0);
13515
+ case 11:
13516
+ return _context.abrupt("return", {});
13517
+ case 12:
13518
+ case "end":
13519
+ return _context.stop();
13520
+ }
13521
+ }, _callee, null, [[1, 8]]);
13522
+ }));
13523
+ return function subscribeForCtaWithInput(_x) {
13524
+ return _ref2.apply(this, arguments);
13525
+ };
13526
+ }();
13498
13527
  var ctaApi = {
13499
13528
  subscribeForCtaWithInput: subscribeForCtaWithInput
13500
13529
  };