@bigbinary/neeto-molecules 3.16.69 → 3.16.70

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.
@@ -153,7 +153,7 @@ var iframeEmbedCode$1 = function iframeEmbedCode(_ref6) {
153
153
  queryParams: queryParams,
154
154
  extraArgs: extraArgs
155
155
  });
156
- return "\n <!-- ".concat(globalProps.appName, " iframe embed code begins -->\n <iframe\n allowfullscreen\n height=\"").concat(height, "%\"\n width=\"").concat(width, "%\"\n frameborder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n />\n <!-- ").concat(globalProps.appName, " iframe embed code ends -->");
156
+ return "\n <!-- ".concat(globalProps.appName, " iframe embed code begins -->\n <iframe\n allowfullscreen\n height=\"").concat(height, "\"\n width=\"").concat(width, "\"\n frameborder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n />\n <!-- ").concat(globalProps.appName, " iframe embed code ends -->");
157
157
  };
158
158
  var htmlCodeGenerators = {
159
159
  inline: inlineEmbedCode$1,
@@ -242,7 +242,7 @@ var iframeEmbedCode = function iframeEmbedCode(_ref6) {
242
242
  queryParams: queryParams,
243
243
  extraArgs: extraArgs
244
244
  });
245
- return "\n const App = () => {\n return (\n <>\n {/* ".concat(globalProps.appName, " iframe embed code begins */}\n <iframe\n allowFullScreen\n height=\"").concat(height, "%\"\n width=\"").concat(width, "%\"\n frameBorder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n />\n {/* ").concat(globalProps.appName, " iframe embed code ends */}\n </>\n );\n };\n ");
245
+ return "\n const App = () => {\n return (\n <>\n {/* ".concat(globalProps.appName, " iframe embed code begins */}\n <iframe\n allowFullScreen\n height=\"").concat(height, "\"\n width=\"").concat(width, "\"\n frameBorder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n />\n {/* ").concat(globalProps.appName, " iframe embed code ends */}\n </>\n );\n };\n ");
246
246
  };
247
247
  var reactCodeGenerators = {
248
248
  inline: inlineEmbedCode,
@@ -539,23 +539,14 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
539
539
  };
540
540
 
541
541
  var Iframe$1 = function Iframe(_ref) {
542
- var customization = _ref.customization,
543
- updateCustomization = _ref.updateCustomization,
542
+ var updateCustomization = _ref.updateCustomization,
544
543
  otherCustomizations = _ref.otherCustomizations;
545
- var _useTranslation = reactI18next.useTranslation(),
546
- t = _useTranslation.t;
547
544
  var _useProductEmbedStore = useProductEmbedStore(function (store) {
548
545
  return {
549
546
  isQueryParamsEnabled: store["isQueryParamsEnabled"]
550
547
  };
551
548
  }, shallow.shallow),
552
549
  isQueryParamsEnabled = _useProductEmbedStore.isQueryParamsEnabled;
553
- var height = customization.height,
554
- width = customization.width;
555
- var handleInputChange = function handleInputChange(_ref2, attribute) {
556
- var value = _ref2.target.value;
557
- return updateCustomization(_defineProperty({}, attribute, value));
558
- };
559
550
  React.useEffect(function () {
560
551
  if (isQueryParamsEnabled) return;
561
552
  updateCustomization({
@@ -563,42 +554,7 @@ var Iframe$1 = function Iframe(_ref) {
563
554
  });
564
555
  }, []);
565
556
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
566
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
567
- className: "flex flex-col gap-2",
568
- children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
569
- "data-cy": "window-size-text",
570
- children: t("neetoMolecules.productEmbed.iframe.sizeOfIframe")
571
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
572
- className: "flex justify-between gap-x-2",
573
- children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
574
- className: "neeto-molecules-product-embed-size-input",
575
- "data-cy": "iframe-width-input-field",
576
- "data-testid": "iframe-width-input-field",
577
- max: 100,
578
- min: 0,
579
- prefix: "W",
580
- suffix: "%",
581
- type: "number",
582
- value: width,
583
- onChange: function onChange(e) {
584
- return handleInputChange(e, "width");
585
- }
586
- }), /*#__PURE__*/jsxRuntime.jsx(Input, {
587
- className: "neeto-molecules-product-embed-size-input",
588
- "data-cy": "iframe-height-input-field",
589
- "data-testid": "iframe-height-input-field",
590
- max: 100,
591
- min: 0,
592
- prefix: "H",
593
- suffix: "%",
594
- type: "number",
595
- value: height,
596
- onChange: function onChange(e) {
597
- return handleInputChange(e, "height");
598
- }
599
- })]
600
- })]
601
- }), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
557
+ children: [otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
602
558
  updateCustomization: updateCustomization
603
559
  })]
604
560
  });