@bigbinary/neeto-molecules 3.16.17 → 3.16.18

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.
@@ -22,6 +22,7 @@ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
22
22
  var Delete = require('@bigbinary/neeto-icons/Delete');
23
23
  var Plus = require('@bigbinary/neeto-icons/Plus');
24
24
  var Label = require('@bigbinary/neetoui/Label');
25
+ var HelpPopover = require('./HelpPopover.js');
25
26
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
26
27
  var jsxRuntime = require('react/jsx-runtime');
27
28
  var Checkbox = require('@bigbinary/neetoui/Checkbox');
@@ -35,9 +36,6 @@ require('./index-JY2zVpnv.js');
35
36
  require('./_commonjsHelpers-BJu3ubxk.js');
36
37
  require('./Breadcrumbs.js');
37
38
  require('@bigbinary/neeto-commons-frontend/utils/general');
38
- require('./HelpPopover.js');
39
- require('@bigbinary/neeto-icons/Help');
40
- require('@bigbinary/neetoui/Popover');
41
39
  require('./MoreDropdown.js');
42
40
  require('@bigbinary/neeto-icons/MenuHorizontal');
43
41
  require('@bigbinary/neeto-icons/MenuVertical');
@@ -49,6 +47,8 @@ require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
49
47
  require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
50
48
  require('@bigbinary/neeto-icons/Search');
51
49
  require('@bigbinary/neeto-commons-frontend/utils');
50
+ require('@bigbinary/neeto-icons/Help');
51
+ require('@bigbinary/neetoui/Popover');
52
52
  require('react-syntax-highlighter/dist/esm/prism-light.js');
53
53
  require('react-syntax-highlighter/dist/esm/styles/prism');
54
54
  require('./CopyToClipboardButton.js');
@@ -239,7 +239,8 @@ var toCamelCasedString = function toCamelCasedString(string) {
239
239
  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; }
240
240
  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), !0).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; }
241
241
  var DynamicQueryParams = function DynamicQueryParams(_ref) {
242
- var updateCustomization = _ref.updateCustomization;
242
+ var updateCustomization = _ref.updateCustomization,
243
+ queryParamsProps = _ref.queryParamsProps;
243
244
  var _useTranslation = reactI18next.useTranslation(),
244
245
  t = _useTranslation.t;
245
246
  var _useState = React.useState([INITIAL_QUERY_PARAM]),
@@ -267,10 +268,15 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
267
268
  });
268
269
  }, [queryParams]);
269
270
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
270
- children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
271
- className: "mb-2",
272
- "data-cy": "dynamic-query-params-label",
273
- children: t("neetoMolecules.productEmbed.queryParam.label")
271
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
272
+ className: "mb-2 flex",
273
+ children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
274
+ "data-cy": "dynamic-query-params-label",
275
+ "data-testid": "dynamic-query-params-label",
276
+ children: queryParamsProps.label || t("neetoMolecules.productEmbed.queryParam.label")
277
+ }), neetoCist.isPresent(queryParamsProps.helpPopoverProps) && /*#__PURE__*/jsxRuntime.jsx(HelpPopover, _objectSpread$3({
278
+ className: "ml-1"
279
+ }, queryParamsProps.helpPopoverProps))]
274
280
  }), queryParams.map(function (param, index) {
275
281
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
276
282
  className: "mb-2 flex gap-1",
@@ -317,6 +323,7 @@ var ElementPopup$1 = function ElementPopup(_ref) {
317
323
  var customization = _ref.customization,
318
324
  updateCustomization = _ref.updateCustomization,
319
325
  isQueryParamsEnabled = _ref.isQueryParamsEnabled,
326
+ queryParamsProps = _ref.queryParamsProps,
320
327
  otherCustomizations = _ref.otherCustomizations;
321
328
  var elementSelector = customization.elementSelector;
322
329
  var _useTranslation = reactI18next.useTranslation(),
@@ -344,6 +351,7 @@ var ElementPopup$1 = function ElementPopup(_ref) {
344
351
  });
345
352
  }
346
353
  }), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
354
+ queryParamsProps: queryParamsProps,
347
355
  updateCustomization: updateCustomization
348
356
  })]
349
357
  });
@@ -353,6 +361,7 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
353
361
  var customization = _ref.customization,
354
362
  updateCustomization = _ref.updateCustomization,
355
363
  isQueryParamsEnabled = _ref.isQueryParamsEnabled,
364
+ queryParamsProps = _ref.queryParamsProps,
356
365
  otherCustomizations = _ref.otherCustomizations;
357
366
  var _useTranslation = reactI18next.useTranslation(),
358
367
  t = _useTranslation.t;
@@ -439,6 +448,7 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
439
448
  });
440
449
  }
441
450
  }), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
451
+ queryParamsProps: queryParamsProps,
442
452
  updateCustomization: updateCustomization
443
453
  })]
444
454
  });
@@ -448,6 +458,7 @@ var Inline$1 = function Inline(_ref) {
448
458
  var customization = _ref.customization,
449
459
  updateCustomization = _ref.updateCustomization,
450
460
  isQueryParamsEnabled = _ref.isQueryParamsEnabled,
461
+ queryParamsProps = _ref.queryParamsProps,
451
462
  otherCustomizations = _ref.otherCustomizations;
452
463
  var height = customization.height,
453
464
  width = customization.width,
@@ -514,6 +525,7 @@ var Inline$1 = function Inline(_ref) {
514
525
  }
515
526
  })]
516
527
  }), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
528
+ queryParamsProps: queryParamsProps,
517
529
  updateCustomization: updateCustomization
518
530
  })]
519
531
  });
@@ -1353,6 +1365,7 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
1353
1365
  customEmbedScriptPath = _ref.customEmbedScriptPath,
1354
1366
  customPreviewIframeUrl = _ref.customPreviewIframeUrl,
1355
1367
  id = _ref.id,
1368
+ queryParamsProps = _ref.queryParamsProps,
1356
1369
  isQueryParamsEnabled = _ref.isQueryParamsEnabled,
1357
1370
  options = _ref.options,
1358
1371
  extraArgs = _ref.extraArgs,
@@ -1433,6 +1446,7 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
1433
1446
  customization: customization,
1434
1447
  isQueryParamsEnabled: isQueryParamsEnabled,
1435
1448
  otherCustomizations: otherCustomizations,
1449
+ queryParamsProps: queryParamsProps,
1436
1450
  updateCustomization: updateCustomization
1437
1451
  })]
1438
1452
  })
@@ -1533,6 +1547,11 @@ var ProductEmbed = function ProductEmbed(_ref) {
1533
1547
  id = _ref.id,
1534
1548
  _ref$isQueryParamsEna = _ref.isQueryParamsEnabled,
1535
1549
  isQueryParamsEnabled = _ref$isQueryParamsEna === void 0 ? false : _ref$isQueryParamsEna,
1550
+ _ref$queryParamsProps = _ref.queryParamsProps,
1551
+ queryParamsProps = _ref$queryParamsProps === void 0 ? {
1552
+ helpPopoverProps: {},
1553
+ label: ""
1554
+ } : _ref$queryParamsProps,
1536
1555
  _ref$options = _ref.options,
1537
1556
  options = _ref$options === void 0 ? {} : _ref$options,
1538
1557
  _ref$extraArgs = _ref.extraArgs,
@@ -1557,6 +1576,7 @@ var ProductEmbed = function ProductEmbed(_ref) {
1557
1576
  isQueryParamsEnabled: isQueryParamsEnabled,
1558
1577
  options: options,
1559
1578
  otherCustomizations: otherCustomizations,
1579
+ queryParamsProps: queryParamsProps,
1560
1580
  selectedEmbed: selectedEmbed,
1561
1581
  supportedLanguages: supportedLanguages
1562
1582
  }) : /*#__PURE__*/jsxRuntime.jsx(EmbedSelector, {