@bigbinary/neeto-molecules 5.0.0 → 5.1.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.
@@ -107,25 +107,33 @@ var parseExtraArgs$1 = function parseExtraArgs(extraArgs) {
107
107
  return "\n".concat(TAB_STRING, " ").concat(key, ": \"").concat(value, "\"");
108
108
  });
109
109
  };
110
- var inlineEmbedCode$1 = function inlineEmbedCode(_ref3) {
111
- var customization = _ref3.customization,
112
- id = _ref3.id,
113
- embedScriptLink = _ref3.embedScriptLink,
114
- extraArgs = _ref3.extraArgs,
115
- inlineWrapperStyle = _ref3.inlineWrapperStyle,
116
- iframeStyle = _ref3.iframeStyle,
117
- queryParams = _ref3.queryParams;
110
+ var formatIframeAttributes$1 = function formatIframeAttributes(attributes) {
111
+ return toPairs(attributes).map(function (_ref3) {
112
+ var _ref4 = _slicedToArray(_ref3, 2),
113
+ key = _ref4[0],
114
+ value = _ref4[1];
115
+ return "\n".concat(TAB_STRING).concat(key, "=\"").concat(value, "\"");
116
+ }).join("");
117
+ };
118
+ var inlineEmbedCode$1 = function inlineEmbedCode(_ref5) {
119
+ var customization = _ref5.customization,
120
+ id = _ref5.id,
121
+ embedScriptLink = _ref5.embedScriptLink,
122
+ extraArgs = _ref5.extraArgs,
123
+ inlineWrapperStyle = _ref5.inlineWrapperStyle,
124
+ iframeStyle = _ref5.iframeStyle,
125
+ queryParams = _ref5.queryParams;
118
126
  var elementSelector = customization.elementSelector,
119
127
  dynamicHeight = customization.dynamicHeight;
120
128
  var processedInlineWrapperStyle = dynamicHeight !== null && dynamicHeight !== void 0 && dynamicHeight.value ? removeHeightFromStyle(inlineWrapperStyle) : inlineWrapperStyle;
121
129
  return "\n <!-- ".concat(globalProps.appName, " inline embed code begins -->\n <div style=\"").concat(processedInlineWrapperStyle, "\" id=\"").concat(elementSelector, "\">\n <!-- ").concat(globalProps.appName, " widget will be added here -->\n </div>\n ").concat(embedBaseScript(embedScriptLink), "\n <script>\n ").concat(camelCasedAppName$1, ".embed({\n type: \"inline\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",\n styles: \"").concat(iframeStyle, "\", ").concat(embedQueryParam$1(queryParams)).concat(embedEnv$1()).concat(parseExtraArgs$1(extraArgs), "\n });\n </script>\n <!-- ").concat(globalProps.appName, " inline embed code ends -->");
122
130
  };
123
- var floatingPopupEmbedCode$1 = function floatingPopupEmbedCode(_ref4) {
124
- var customization = _ref4.customization,
125
- id = _ref4.id,
126
- embedScriptLink = _ref4.embedScriptLink,
127
- extraArgs = _ref4.extraArgs,
128
- queryParams = _ref4.queryParams;
131
+ var floatingPopupEmbedCode$1 = function floatingPopupEmbedCode(_ref6) {
132
+ var customization = _ref6.customization,
133
+ id = _ref6.id,
134
+ embedScriptLink = _ref6.embedScriptLink,
135
+ extraArgs = _ref6.extraArgs,
136
+ queryParams = _ref6.queryParams;
129
137
  var btnTextColor = customization.btnTextColor,
130
138
  showIcon = customization.showIcon,
131
139
  btnText = customization.btnText,
@@ -134,32 +142,33 @@ var floatingPopupEmbedCode$1 = function floatingPopupEmbedCode(_ref4) {
134
142
  icon = customization.icon;
135
143
  return "\n <!-- ".concat(globalProps.appName, " floating-popup embed code begins -->\n ").concat(embedBaseScript(embedScriptLink), "\n <script>\n ").concat(camelCasedAppName$1, ".embed({\n type: \"floatingPopup\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n styles: {\n btnTextColor: \"").concat(btnTextColor, "\",\n btnPosition: \"").concat(btnPosition, "\",\n btnColor: \"").concat(btnColor, "\",\n btnText: \"").concat(btnText, "\", ").concat(icon ? "\n".concat(TAB_STRING).concat(TAB_STRING, "showIcon: ").concat(showIcon, ",") : "", "\n },").concat(embedQueryParam$1(queryParams)).concat(embedEnv$1()).concat(parseExtraArgs$1(extraArgs), "\n });\n </script>\n <!-- ").concat(globalProps.appName, " floating-popup embed code ends -->");
136
144
  };
137
- var elementPopupEmbedCode$1 = function elementPopupEmbedCode(_ref5) {
138
- var customization = _ref5.customization,
139
- id = _ref5.id,
140
- embedScriptLink = _ref5.embedScriptLink,
141
- extraArgs = _ref5.extraArgs,
142
- queryParams = _ref5.queryParams;
145
+ var elementPopupEmbedCode$1 = function elementPopupEmbedCode(_ref7) {
146
+ var customization = _ref7.customization,
147
+ id = _ref7.id,
148
+ embedScriptLink = _ref7.embedScriptLink,
149
+ extraArgs = _ref7.extraArgs,
150
+ queryParams = _ref7.queryParams;
143
151
  var elementSelector = customization.elementSelector;
144
152
  return "\n <!-- This is a demo button, you can use any element on your website instead. -->\n <!-- <button id=\"".concat(elementSelector, "\">Click to open popup</button> -->\n\n <!-- ").concat(globalProps.appName, " element-click embed code begins -->\n ").concat(embedBaseScript(embedScriptLink), "\n <script>\n ").concat(camelCasedAppName$1, ".embed({\n type: \"elementClick\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",").concat(embedQueryParam$1(queryParams)).concat(embedEnv$1()).concat(parseExtraArgs$1(extraArgs), "\n });\n </script>\n <!-- ").concat(globalProps.appName, " element-click embed code ends -->");
145
153
  };
146
- var iframeEmbedCode$1 = function iframeEmbedCode(_ref6) {
147
- var id = _ref6.id,
148
- customization = _ref6.customization,
149
- queryParams = _ref6.queryParams,
150
- embedScriptLink = _ref6.embedScriptLink;
154
+ var iframeEmbedCode$1 = function iframeEmbedCode(_ref8) {
155
+ var id = _ref8.id,
156
+ customization = _ref8.customization,
157
+ queryParams = _ref8.queryParams,
158
+ embedScriptLink = _ref8.embedScriptLink;
151
159
  var height = customization.height,
152
160
  width = customization.width,
153
161
  iframeTitle = customization.iframeTitle,
154
162
  iframeUrl = customization.iframeUrl,
155
- dynamicHeight = customization.dynamicHeight;
163
+ dynamicHeight = customization.dynamicHeight,
164
+ iframeAttributes = customization.iframeAttributes;
156
165
  var iframeSrc = buildIframeURL$1({
157
166
  id: id,
158
167
  iframeUrl: iframeUrl,
159
168
  queryParams: queryParams
160
169
  });
161
170
  var heightAttribute = dynamicHeight !== null && dynamicHeight !== void 0 && dynamicHeight.value ? "" : "\n".concat(TAB_STRING, "height=\"").concat(height, "\"");
162
- return "\n <!-- ".concat(globalProps.appName, " iframe embed code begins -->\n ").concat(dynamicHeight !== null && dynamicHeight !== void 0 && dynamicHeight.value && embedScriptLink ? embedBaseScript(embedScriptLink) : "", "\n <iframe\n allowfullscreen").concat(heightAttribute, "\n width=\"").concat(width, "\"\n frameborder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n ></iframe>\n <!-- ").concat(globalProps.appName, " iframe embed code ends -->");
171
+ return "\n <!-- ".concat(globalProps.appName, " iframe embed code begins -->\n ").concat(dynamicHeight !== null && dynamicHeight !== void 0 && dynamicHeight.value && embedScriptLink ? embedBaseScript(embedScriptLink) : "", "\n <iframe\n allowfullscreen").concat(heightAttribute, "\n width=\"").concat(width, "\"\n frameborder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"").concat(formatIframeAttributes$1(iframeAttributes), "\n ></iframe>\n <!-- ").concat(globalProps.appName, " iframe embed code ends -->");
163
172
  };
164
173
  var htmlCodeGenerators = {
165
174
  inline: inlineEmbedCode$1,
@@ -188,6 +197,14 @@ var parseExtraArgs = function parseExtraArgs(extraArgs) {
188
197
  return "\n".concat(TAB_STRING).concat(TAB_STRING).concat(key, ": \"").concat(value, "\"");
189
198
  });
190
199
  };
200
+ var formatIframeAttributes = function formatIframeAttributes(attributes) {
201
+ return toPairs(attributes).map(function (_ref3) {
202
+ var _ref4 = _slicedToArray(_ref3, 2),
203
+ key = _ref4[0],
204
+ value = _ref4[1];
205
+ return "\n".concat(TAB_STRING).concat(TAB_STRING, " ").concat(key, "=\"").concat(value, "\"");
206
+ }).join("");
207
+ };
191
208
  var parseInlineStyle = function parseInlineStyle(styleString) {
192
209
  return styleString.split(";").map(function (rule) {
193
210
  var _rule$split$map = rule.split(":").map(function (s) {
@@ -199,25 +216,25 @@ var parseInlineStyle = function parseInlineStyle(styleString) {
199
216
  return key && value ? "".concat(key, ": \"").concat(value, "\"") : null;
200
217
  }).filter(Boolean).join(", ");
201
218
  };
202
- var inlineEmbedCode = function inlineEmbedCode(_ref3) {
203
- var customization = _ref3.customization,
204
- id = _ref3.id,
205
- embedScriptLink = _ref3.embedScriptLink,
206
- extraArgs = _ref3.extraArgs,
207
- inlineWrapperStyle = _ref3.inlineWrapperStyle,
208
- iframeStyle = _ref3.iframeStyle,
209
- queryParams = _ref3.queryParams;
219
+ var inlineEmbedCode = function inlineEmbedCode(_ref5) {
220
+ var customization = _ref5.customization,
221
+ id = _ref5.id,
222
+ embedScriptLink = _ref5.embedScriptLink,
223
+ extraArgs = _ref5.extraArgs,
224
+ inlineWrapperStyle = _ref5.inlineWrapperStyle,
225
+ iframeStyle = _ref5.iframeStyle,
226
+ queryParams = _ref5.queryParams;
210
227
  var elementSelector = customization.elementSelector,
211
228
  dynamicHeight = customization.dynamicHeight;
212
229
  var processedInlineWrapperStyle = dynamicHeight !== null && dynamicHeight !== void 0 && dynamicHeight.value ? removeHeightFromStyle(inlineWrapperStyle) : inlineWrapperStyle;
213
230
  return "\n import { useEffect } from \"react\";\n\n const App = () => {\n const ".concat(embedFunctionName, " = () => {\n ").concat(embedScript(embedScriptLink), "\n embedScript.onload = () => {\n window.").concat(camelCasedAppName, ".embed({\n type: \"inline\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",\n styles: \"").concat(iframeStyle, "\",").concat(embedQueryParam(queryParams)).concat(embedEnv()).concat(parseExtraArgs(extraArgs), "\n });\n };\n\n document.body.appendChild(embedScript);\n ").concat(cleanupFunction, "\n };\n\n useEffect(() => ").concat(embedFunctionName, "(), []);\n\n return (\n <div\n id=\"inline-embed-container\"\n style={{ ").concat(parseInlineStyle(processedInlineWrapperStyle), " }}\n />\n );\n };");
214
231
  };
215
- var floatingPopupEmbedCode = function floatingPopupEmbedCode(_ref4) {
216
- var customization = _ref4.customization,
217
- id = _ref4.id,
218
- embedScriptLink = _ref4.embedScriptLink,
219
- extraArgs = _ref4.extraArgs,
220
- queryParams = _ref4.queryParams;
232
+ var floatingPopupEmbedCode = function floatingPopupEmbedCode(_ref6) {
233
+ var customization = _ref6.customization,
234
+ id = _ref6.id,
235
+ embedScriptLink = _ref6.embedScriptLink,
236
+ extraArgs = _ref6.extraArgs,
237
+ queryParams = _ref6.queryParams;
221
238
  var btnTextColor = customization.btnTextColor,
222
239
  showIcon = customization.showIcon,
223
240
  btnText = customization.btnText,
@@ -226,31 +243,32 @@ var floatingPopupEmbedCode = function floatingPopupEmbedCode(_ref4) {
226
243
  icon = customization.icon;
227
244
  return "\n import { useEffect } from \"react\";\n\n const App = () => {\n const ".concat(embedFunctionName, " = () => {\n ").concat(embedScript(embedScriptLink), "\n embedScript.onload = () => {\n window.").concat(camelCasedAppName, ".embed({\n type: \"floatingPopup\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n styles: {\n btnTextColor: \"").concat(btnTextColor, "\",\n btnPosition: \"").concat(btnPosition, "\",\n btnColor: \"").concat(btnColor, "\",\n btnText: \"").concat(btnText, "\",").concat(icon ? "\n".concat(TAB_STRING).concat(TAB_STRING).concat(TAB_STRING, "showIcon: ").concat(showIcon, ",") : "", "\n },").concat(embedQueryParam(queryParams)).concat(embedEnv()).concat(parseExtraArgs(extraArgs), "\n });\n };\n\n document.body.appendChild(embedScript);\n ").concat(cleanupFunction, "\n };\n\n useEffect(() => ").concat(embedFunctionName, "(), []);\n\n return <div />;\n };");
228
245
  };
229
- var elementPopupEmbedCode = function elementPopupEmbedCode(_ref5) {
230
- var customization = _ref5.customization,
231
- id = _ref5.id,
232
- embedScriptLink = _ref5.embedScriptLink,
233
- extraArgs = _ref5.extraArgs,
234
- queryParams = _ref5.queryParams;
246
+ var elementPopupEmbedCode = function elementPopupEmbedCode(_ref7) {
247
+ var customization = _ref7.customization,
248
+ id = _ref7.id,
249
+ embedScriptLink = _ref7.embedScriptLink,
250
+ extraArgs = _ref7.extraArgs,
251
+ queryParams = _ref7.queryParams;
235
252
  var elementSelector = customization.elementSelector;
236
253
  return "\n import { useEffect } from \"react\";\n\n const App = () => {\n const ".concat(embedFunctionName, " = () => {\n ").concat(embedScript(embedScriptLink), "\n embedScript.onload = () => {\n window.").concat(camelCasedAppName, ".embed({\n type: \"elementClick\",\n id: \"").concat(id, "\",\n organization: \"").concat(globalProps.organization.subdomain, "\",\n elementSelector: \"#").concat(elementSelector, "\",").concat(embedQueryParam(queryParams)).concat(embedEnv()).concat(parseExtraArgs(extraArgs), "\n });\n };\n\n document.body.appendChild(embedScript);\n ").concat(cleanupFunction, "\n };\n\n useEffect(() => ").concat(embedFunctionName, "(), []);\n\n return <button id=\"").concat(elementSelector, "\">Click to open popup</button>;\n };");
237
254
  };
238
- var iframeEmbedCode = function iframeEmbedCode(_ref6) {
239
- var customization = _ref6.customization,
240
- id = _ref6.id,
241
- queryParams = _ref6.queryParams;
255
+ var iframeEmbedCode = function iframeEmbedCode(_ref8) {
256
+ var customization = _ref8.customization,
257
+ id = _ref8.id,
258
+ queryParams = _ref8.queryParams;
242
259
  var height = customization.height,
243
260
  width = customization.width,
244
261
  iframeTitle = customization.iframeTitle,
245
262
  iframeUrl = customization.iframeUrl,
246
- dynamicHeight = customization.dynamicHeight;
263
+ dynamicHeight = customization.dynamicHeight,
264
+ iframeAttributes = customization.iframeAttributes;
247
265
  var iframeSrc = buildIframeURL$1({
248
266
  id: id,
249
267
  iframeUrl: iframeUrl,
250
268
  queryParams: queryParams
251
269
  });
252
270
  var heightAttribute = dynamicHeight !== null && dynamicHeight !== void 0 && dynamicHeight.value ? "" : "\n".concat(TAB_STRING).concat(TAB_STRING, " height=\"").concat(height, "\"");
253
- return "\n const App = () => {\n return (\n <>\n {/* ".concat(globalProps.appName, " iframe embed code begins */}\n <iframe\n allowFullScreen").concat(heightAttribute, "\n width=\"").concat(width, "\"\n frameBorder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"\n ></iframe>\n {/* ").concat(globalProps.appName, " iframe embed code ends */}\n </>\n );\n };\n");
271
+ return "\n const App = () => {\n return (\n <>\n {/* ".concat(globalProps.appName, " iframe embed code begins */}\n <iframe\n allowFullScreen").concat(heightAttribute, "\n width=\"").concat(width, "\"\n frameBorder=\"0\"\n title=\"").concat(iframeTitle, "\"\n src=\"").concat(iframeSrc, "\"").concat(formatIframeAttributes(iframeAttributes), "\n ></iframe>\n {/* ").concat(globalProps.appName, " iframe embed code ends */}\n </>\n );\n };\n");
254
272
  };
255
273
  var reactCodeGenerators = {
256
274
  inline: inlineEmbedCode,
@@ -260,8 +278,8 @@ var reactCodeGenerators = {
260
278
  };
261
279
 
262
280
  var _excluded$1 = ["selectedLanguage", "type"];
263
- function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
264
- function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
281
+ function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
282
+ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
265
283
  var buildQueryParams$1 = function buildQueryParams() {
266
284
  var customization = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
267
285
  var existingQueryParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -271,7 +289,7 @@ var buildQueryParams$1 = function buildQueryParams() {
271
289
  if (value) acc[key] = value;
272
290
  return acc;
273
291
  }, {});
274
- var mergedQueryParams = _objectSpread$7(_objectSpread$7({}, existingQueryParams), activeOptions);
292
+ var mergedQueryParams = _objectSpread$8(_objectSpread$8({}, existingQueryParams), activeOptions);
275
293
  if (isEmpty(mergedQueryParams)) return "";
276
294
  return JSON.stringify(mergedQueryParams, null, 2).replace(/\n/g, " ").replace(/\s\s+/g, " ");
277
295
  };
@@ -282,7 +300,7 @@ var generateCode = function generateCode(options) {
282
300
  embeddedCodeOptions = _objectWithoutProperties(options, _excluded$1);
283
301
  var queryParams = ((_embeddedCodeOptions$ = embeddedCodeOptions.customization) === null || _embeddedCodeOptions$ === void 0 ? void 0 : _embeddedCodeOptions$.queryParams) || {};
284
302
  var customization = embeddedCodeOptions.customization || {};
285
- var codeOptions = _objectSpread$7(_objectSpread$7({}, embeddedCodeOptions), {}, {
303
+ var codeOptions = _objectSpread$8(_objectSpread$8({}, embeddedCodeOptions), {}, {
286
304
  queryParams: buildQueryParams$1(customization, queryParams)
287
305
  });
288
306
  return selectedLanguage === "react" ? (_reactCodeGenerators$ = reactCodeGenerators[type]) === null || _reactCodeGenerators$ === void 0 ? void 0 : _reactCodeGenerators$.call(reactCodeGenerators, codeOptions) : (_htmlCodeGenerators$t = htmlCodeGenerators[type]) === null || _htmlCodeGenerators$t === void 0 ? void 0 : _htmlCodeGenerators$t.call(htmlCodeGenerators, codeOptions);
@@ -327,8 +345,8 @@ var removeHeightFromStyle = function removeHeightFromStyle(style) {
327
345
  return style.replace(/height\s*:\s*[^;]+;?\s*/g, "").trim();
328
346
  };
329
347
 
330
- function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
331
- function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
348
+ function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
349
+ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
332
350
  var DynamicQueryParams = function DynamicQueryParams(_ref) {
333
351
  var updateCustomization = _ref.updateCustomization;
334
352
  var _useTranslation = useTranslation(),
@@ -354,7 +372,7 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
354
372
  };
355
373
  var handleInputChange = function handleInputChange(index, field, value) {
356
374
  var newQueryParams = queryParams.map(function (param, i) {
357
- return i === index ? _objectSpread$6(_objectSpread$6({}, param), {}, _defineProperty({}, field, value)) : param;
375
+ return i === index ? _objectSpread$7(_objectSpread$7({}, param), {}, _defineProperty({}, field, value)) : param;
358
376
  });
359
377
  setQueryParams(newQueryParams);
360
378
  };
@@ -370,7 +388,7 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
370
388
  children: [/*#__PURE__*/jsx(Label, {
371
389
  "data-testid": "dynamic-query-params-label",
372
390
  children: queryParamsProps.label || t("neetoMolecules.productEmbed.queryParam.label")
373
- }), isPresent(queryParamsProps.helpPopoverProps) && /*#__PURE__*/jsx(HelpPopover, _objectSpread$6({
391
+ }), isPresent(queryParamsProps.helpPopoverProps) && /*#__PURE__*/jsx(HelpPopover, _objectSpread$7({
374
392
  className: "ms-1"
375
393
  }, queryParamsProps.helpPopoverProps))]
376
394
  }), queryParams.map(function (param, index) {
@@ -550,8 +568,8 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
550
568
  };
551
569
 
552
570
  var _excluded = ["value", "label", "helpIconProps"];
553
- function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
554
- function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
571
+ function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
572
+ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
555
573
  var SwitchOptions = function SwitchOptions(_ref) {
556
574
  var _ref$customization = _ref.customization,
557
575
  customization = _ref$customization === void 0 ? {} : _ref$customization,
@@ -576,12 +594,12 @@ var SwitchOptions = function SwitchOptions(_ref) {
576
594
  checked: value,
577
595
  label: label || SWITCH_OPTIONS[option].label,
578
596
  labelProps: helpIconProps && {
579
- helpIconProps: _objectSpread$5({
597
+ helpIconProps: _objectSpread$6({
580
598
  "data-testid": "help-icon-button"
581
599
  }, helpIconProps)
582
600
  },
583
601
  onChange: function onChange(e) {
584
- return updateCustomization(_defineProperty({}, option, _objectSpread$5(_objectSpread$5({}, rest), {}, {
602
+ return updateCustomization(_defineProperty({}, option, _objectSpread$6(_objectSpread$6({}, rest), {}, {
585
603
  label: label,
586
604
  helpIconProps: helpIconProps,
587
605
  value: e.target.checked
@@ -664,11 +682,11 @@ var Inline$1 = function Inline(_ref) {
664
682
  });
665
683
  };
666
684
 
667
- function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
668
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
685
+ function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
686
+ function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
669
687
  var InlineEmbedIcon = function InlineEmbedIcon(_ref) {
670
688
  var other = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
671
- return /*#__PURE__*/jsxs("svg", _objectSpread$4(_objectSpread$4({
689
+ return /*#__PURE__*/jsxs("svg", _objectSpread$5(_objectSpread$5({
672
690
  fill: "none",
673
691
  height: "163",
674
692
  viewBox: "0 0 278 163",
@@ -917,7 +935,7 @@ var InlineEmbedIcon = function InlineEmbedIcon(_ref) {
917
935
  };
918
936
  var FloatingPopupIcon = function FloatingPopupIcon(_ref2) {
919
937
  var other = Object.assign({}, (_objectDestructuringEmpty(_ref2), _ref2));
920
- return /*#__PURE__*/jsxs("svg", _objectSpread$4(_objectSpread$4({
938
+ return /*#__PURE__*/jsxs("svg", _objectSpread$5(_objectSpread$5({
921
939
  fill: "none",
922
940
  height: "163",
923
941
  viewBox: "0 0 278 163",
@@ -1061,7 +1079,7 @@ var FloatingPopupIcon = function FloatingPopupIcon(_ref2) {
1061
1079
  };
1062
1080
  var ElementPopupIcon = function ElementPopupIcon(_ref3) {
1063
1081
  var other = Object.assign({}, (_objectDestructuringEmpty(_ref3), _ref3));
1064
- return /*#__PURE__*/jsxs("svg", _objectSpread$4(_objectSpread$4({
1082
+ return /*#__PURE__*/jsxs("svg", _objectSpread$5(_objectSpread$5({
1065
1083
  fill: "none",
1066
1084
  height: "163",
1067
1085
  viewBox: "0 0 278 163",
@@ -1287,11 +1305,11 @@ var Code = function Code(_ref) {
1287
1305
  });
1288
1306
  };
1289
1307
 
1290
- function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1291
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1308
+ function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1309
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1292
1310
  var FloatingPopupPlaceholderImage = function FloatingPopupPlaceholderImage(_ref) {
1293
1311
  var other = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
1294
- return /*#__PURE__*/jsxs("svg", _objectSpread$3(_objectSpread$3({
1312
+ return /*#__PURE__*/jsxs("svg", _objectSpread$4(_objectSpread$4({
1295
1313
  fill: "none",
1296
1314
  height: "518",
1297
1315
  viewBox: "0 0 796 518",
@@ -1351,7 +1369,7 @@ var FloatingPopupPlaceholderImage = function FloatingPopupPlaceholderImage(_ref)
1351
1369
  };
1352
1370
  var ElementPopupPlaceholderImage = function ElementPopupPlaceholderImage(_ref2) {
1353
1371
  var other = Object.assign({}, (_objectDestructuringEmpty(_ref2), _ref2));
1354
- return /*#__PURE__*/jsxs("svg", _objectSpread$3(_objectSpread$3({
1372
+ return /*#__PURE__*/jsxs("svg", _objectSpread$4(_objectSpread$4({
1355
1373
  fill: "none",
1356
1374
  height: "518",
1357
1375
  viewBox: "0 0 748 518",
@@ -1494,24 +1512,28 @@ function useIframeHeightReset(iframeRef, dynamicHeight) {
1494
1512
  }, [dynamicHeight === null || dynamicHeight === void 0 ? void 0 : dynamicHeight.value, iframeRef]);
1495
1513
  }
1496
1514
 
1515
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1516
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1497
1517
  var Iframe = function Iframe(_ref) {
1498
1518
  var iframeURL = _ref.iframeURL,
1499
1519
  customization = _ref.customization;
1500
1520
  var height = customization.height,
1501
1521
  width = customization.width,
1502
1522
  iframeTitle = customization.iframeTitle,
1503
- dynamicHeight = customization.dynamicHeight;
1523
+ dynamicHeight = customization.dynamicHeight,
1524
+ iframeAttributes = customization.iframeAttributes;
1504
1525
  var iframeRef = useRef(null);
1505
1526
  useIframeHeightReset(iframeRef, dynamicHeight);
1506
- return /*#__PURE__*/jsx("iframe", {
1527
+ return /*#__PURE__*/jsx("iframe", _objectSpread$3(_objectSpread$3({}, _objectSpread$3(_objectSpread$3({}, iframeAttributes), {}, {
1507
1528
  height: height,
1508
- width: width,
1529
+ width: width
1530
+ })), {}, {
1509
1531
  allowFullScreen: true,
1510
1532
  className: "m-auto border-0",
1511
1533
  ref: iframeRef,
1512
1534
  src: iframeURL,
1513
1535
  title: iframeTitle
1514
- });
1536
+ }));
1515
1537
  };
1516
1538
 
1517
1539
  var Inline = function Inline(_ref) {