@bigbinary/neeto-site-blocks 1.13.6 → 1.13.7

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
@@ -5680,6 +5680,10 @@ var DropdownWrapper = styled__default["default"].div(function (_ref) {
5680
5680
  } : {};
5681
5681
  });
5682
5682
 
5683
+ var embedPage = function embedPage(href) {
5684
+ return "<!DOCTYPE html>\n<html>\n<head>\n <style>\n html {\n overflow: hidden;\n }\n .embed-booking {\n height: 100vh;\n width: 100%;\n position: relative;\n overflow-x: hidden;\n }\n .new-header {\n height: 12rem;\n width: 100%;\n background: white;\n display: flex;\n flex-direction: column;\n font-size: 0.875rem;\n font-family: Inter;\n padding: 10px;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 1;\n z-index: 1;\n\n @media (min-width: 576px) {\n width: 32rem;\n border: 1px solid gray;\n }\n }\n .background {\n height: 100%;\n width: 100%;\n display: flex;\n background-size: contain;\n opacity: 40%;\n background: url(https://ik.imagekit.io/a6t22upil/neeto-site-web/static/neeto-cal-cover-image);\n background-repeat: no-repeat;\n }\n\n .anchor {\n background: #101828;\n padding: 10px;\n border: none;\n color: white;\n border-radius: 9999px;\n cursor: pointer;\n text-decoration: none;\n }\n\n p {\n font-size: 1rem;\n text-align: center;\n font-weight: 500;\n }\n </style>\n</head>\n<body>\n <div class=\"embed-booking\">\n <div class=\"background\"/></div>\n <div class=\"new-header\">\n <p> Paste the inline embed code of your booking page in properties to add your booking page here </p>\n <p> If you don't have booking page </p>\n <a target=\"_blank\" class=\"anchor\" href=".concat(href, "> Create a booking page on NeetoCal</a>\n </div>\n </div>\n</body>\n</html>\n");
5685
+ };
5686
+
5683
5687
  var useElementClick = function useElementClick(_ref) {
5684
5688
  var id = _ref.id,
5685
5689
  _ref$index = _ref.index,
@@ -13481,7 +13485,6 @@ var POSITIONS = {
13481
13485
  }
13482
13486
  };
13483
13487
  var EMAIL_REGEX = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
13484
- var EMBED_DEFAULT_PAGE = "<!DOCTYPE html>\n<html>\n<head>\n <style>\n .embed-booking {\n height: 100vh;\n width: 100%;\n position: relative;\n }\n .new-header {\n height: 12rem;\n width: 32rem;\n background: white;\n display: flex;\n flex-direction: column;\n font-size: 0.875rem;\n font-family: Inter;\n padding: 10px;\n justify-content: center;\n border: 1px solid gray;\n align-items: center;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 1;\n z-index: 1;\n }\n .background {\n height: 100%;\n width: 100%;\n display: flex;\n background-size: contain;\n opacity: 40%;\n background: url(https://ik.imagekit.io/a6t22upil/neeto-site-web/static/neeto-cal-cover-image);\n background-repeat: no-repeat;\n }\n\n .anchor {\n background: #101828;\n padding: 10px;\n border: none;\n color: white;\n border-radius: 9999px;\n cursor: pointer;\n text-decoration: none;\n }\n\n p {\n font-size: 1rem;\n text-align: center;\n font-weight: 500;\n }\n </style>\n</head>\n<body>\n <div class=\"embed-booking\">\n <div class=\"background\"/></div>\n <div class=\"new-header\">\n <p> Paste the inline embed code of your booking page in properties to add your booking page here </p>\n <p> If you don't have booking page </p>\n <a target=\"_blank\" class=\"anchor\"> Create a booking page on NeetoCal</a>\n </div>\n </div>\n</body>\n</html>\n";
13485
13488
 
13486
13489
  var validateEmail = function validateEmail(email) {
13487
13490
  return EMAIL_REGEX.test(email);
@@ -13745,32 +13748,7 @@ var CtaWithLogo = function CtaWithLogo(_ref) {
13745
13748
  });
13746
13749
  };
13747
13750
 
13748
- var Embed = function Embed(_ref) {
13749
- var configurations = _ref.configurations,
13750
- className = _ref.className,
13751
- id = _ref.id;
13752
- var properties = configurations.properties,
13753
- design = configurations.design;
13754
- var content = properties.content,
13755
- enableAnimation = properties.enableAnimation;
13756
- return /*#__PURE__*/jsxRuntime.jsx(BlockWrapper, {
13757
- className: className,
13758
- enableAnimation: enableAnimation,
13759
- id: id,
13760
- design: design.body,
13761
- nestedClassName: "h-full flex items-center justify-center",
13762
- children: neetoCist.isNotEmpty(content) ? /*#__PURE__*/jsxRuntime.jsx(Interweave, {
13763
- content: content,
13764
- allowList: ["iframe"],
13765
- className: "ns-embed-block relative flex h-0 w-full pb-[56.25%] lg:static lg:pb-0"
13766
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography$1, {
13767
- className: "text-center font-semibold",
13768
- children: "No content to display"
13769
- })
13770
- });
13771
- };
13772
-
13773
- var _excluded$m = ["configurations", "className", "id"];
13751
+ var _excluded$m = ["configurations", "className", "id", "disableButtonAndLinks", "embedUrl", "isAddNewPane"];
13774
13752
  function ownKeys$m(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13775
13753
  function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
13776
13754
  var EmbedBooking = function EmbedBooking(_ref) {
@@ -13778,6 +13756,10 @@ var EmbedBooking = function EmbedBooking(_ref) {
13778
13756
  _ref$className = _ref.className,
13779
13757
  className = _ref$className === void 0 ? "" : _ref$className,
13780
13758
  id = _ref.id,
13759
+ disableButtonAndLinks = _ref.disableButtonAndLinks,
13760
+ _ref$embedUrl = _ref.embedUrl,
13761
+ embedUrl = _ref$embedUrl === void 0 ? "" : _ref$embedUrl,
13762
+ isAddNewPane = _ref.isAddNewPane,
13781
13763
  otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$m);
13782
13764
  var properties = configurations.properties,
13783
13765
  design = configurations.design;
@@ -13788,7 +13770,7 @@ var EmbedBooking = function EmbedBooking(_ref) {
13788
13770
  code = _properties$embed.code,
13789
13771
  embedPosition = _properties$embed.embedPosition,
13790
13772
  src = properties.backgroundImage.src;
13791
- var iframeInitialContent = neetoCist.isNotEmpty(code) ? "<!DOCTYPE html><html><head></head><body><div class=\"embed-booking\">\n ".concat(code, "\n </div></body></html>") : EMBED_DEFAULT_PAGE;
13773
+ var iframeInitialContent = neetoCist.isNotEmpty(code) ? "<!DOCTYPE html><html><head></head><body><div class=\"embed-booking\">\n ".concat(code, "\n </div></body></html>") : (disableButtonAndLinks || isAddNewPane) && embedPage(embedUrl);
13792
13774
  var baseClasses = "grid gap-y-6 lg:gap-6 grid-cols-12 grid-flow-row-dense";
13793
13775
  var mediaBaseClasses = classnames__default["default"]("col-span-12 flex flex-col items-center justify-center w-full h-[550px] border border-gray-100", {
13794
13776
  "order-1 lg:col-span-7": POSITIONS.LEFT.label === embedPosition,
@@ -13849,13 +13831,37 @@ var EmbedBooking = function EmbedBooking(_ref) {
13849
13831
  design: design.embed,
13850
13832
  children: /*#__PURE__*/jsxRuntime.jsx(Frame__default["default"], {
13851
13833
  className: "h-full w-full",
13852
- initialContent: iframeInitialContent,
13853
- sandbox: "allow-scripts allow-same-origin allow-forms allow-modals allow-orientation-lock allow-popups"
13834
+ initialContent: iframeInitialContent
13854
13835
  })
13855
13836
  })]
13856
13837
  });
13857
13838
  };
13858
13839
 
13840
+ var EmbedVideo = function EmbedVideo(_ref) {
13841
+ var configurations = _ref.configurations,
13842
+ className = _ref.className,
13843
+ id = _ref.id;
13844
+ var properties = configurations.properties,
13845
+ design = configurations.design;
13846
+ var content = properties.content,
13847
+ enableAnimation = properties.enableAnimation;
13848
+ return /*#__PURE__*/jsxRuntime.jsx(BlockWrapper, {
13849
+ className: className,
13850
+ enableAnimation: enableAnimation,
13851
+ id: id,
13852
+ design: design.body,
13853
+ nestedClassName: "h-full flex items-center justify-center",
13854
+ children: neetoCist.isNotEmpty(content) ? /*#__PURE__*/jsxRuntime.jsx(Interweave, {
13855
+ content: content,
13856
+ allowList: ["iframe"],
13857
+ className: "ns-embed-block relative flex h-0 w-full pb-[56.25%] lg:static lg:pb-0"
13858
+ }) : /*#__PURE__*/jsxRuntime.jsx(Typography$1, {
13859
+ className: "text-center font-semibold",
13860
+ children: "No content to display"
13861
+ })
13862
+ });
13863
+ };
13864
+
13859
13865
  var _excluded$l = ["configurations", "className", "id"],
13860
13866
  _excluded2$1 = ["question", "answer", "design", "enableAnimation", "index"];
13861
13867
  function ownKeys$l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -17645,8 +17651,8 @@ exports.CtaClassic = CtaClassic;
17645
17651
  exports.CtaWithEmailAction = CtaWithEmailAction;
17646
17652
  exports.CtaWithLogo = CtaWithLogo;
17647
17653
  exports.DESIGN_OPTIONS = index$1;
17648
- exports.Embed = Embed;
17649
17654
  exports.EmbedBooking = EmbedBooking;
17655
+ exports.EmbedVideo = EmbedVideo;
17650
17656
  exports.FaqWithAccordion = FaqWithHamburgerView;
17651
17657
  exports.FeatureWithBulletList = FeatureWithBulletList;
17652
17658
  exports.FeatureWithDetails = FeatureWithDetails;