@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.
package/dist/ProductEmbed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { filterBy, hyphenate, noop } from '@bigbinary/neeto-cist';
|
|
1
|
+
import { isPresent, filterBy, hyphenate, noop } from '@bigbinary/neeto-cist';
|
|
2
2
|
import { useLocation, useHistory } from 'react-router-dom';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -20,6 +20,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
20
20
|
import Delete from '@bigbinary/neeto-icons/Delete';
|
|
21
21
|
import Plus from '@bigbinary/neeto-icons/Plus';
|
|
22
22
|
import Label from '@bigbinary/neetoui/Label';
|
|
23
|
+
import HelpPopover from './HelpPopover.js';
|
|
23
24
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
24
25
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
25
26
|
import Checkbox from '@bigbinary/neetoui/Checkbox';
|
|
@@ -33,9 +34,6 @@ import './index-DAYCJu79.js';
|
|
|
33
34
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
34
35
|
import './Breadcrumbs.js';
|
|
35
36
|
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
36
|
-
import './HelpPopover.js';
|
|
37
|
-
import '@bigbinary/neeto-icons/Help';
|
|
38
|
-
import '@bigbinary/neetoui/Popover';
|
|
39
37
|
import './MoreDropdown.js';
|
|
40
38
|
import '@bigbinary/neeto-icons/MenuHorizontal';
|
|
41
39
|
import '@bigbinary/neeto-icons/MenuVertical';
|
|
@@ -47,6 +45,8 @@ import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
|
|
47
45
|
import '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
|
|
48
46
|
import '@bigbinary/neeto-icons/Search';
|
|
49
47
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
48
|
+
import '@bigbinary/neeto-icons/Help';
|
|
49
|
+
import '@bigbinary/neetoui/Popover';
|
|
50
50
|
import 'react-syntax-highlighter/dist/esm/prism-light.js';
|
|
51
51
|
import 'react-syntax-highlighter/dist/esm/styles/prism';
|
|
52
52
|
import './CopyToClipboardButton.js';
|
|
@@ -237,7 +237,8 @@ var toCamelCasedString = function toCamelCasedString(string) {
|
|
|
237
237
|
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; }
|
|
238
238
|
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; }
|
|
239
239
|
var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
240
|
-
var updateCustomization = _ref.updateCustomization
|
|
240
|
+
var updateCustomization = _ref.updateCustomization,
|
|
241
|
+
queryParamsProps = _ref.queryParamsProps;
|
|
241
242
|
var _useTranslation = useTranslation(),
|
|
242
243
|
t = _useTranslation.t;
|
|
243
244
|
var _useState = useState([INITIAL_QUERY_PARAM]),
|
|
@@ -265,10 +266,15 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
265
266
|
});
|
|
266
267
|
}, [queryParams]);
|
|
267
268
|
return /*#__PURE__*/jsxs("div", {
|
|
268
|
-
children: [/*#__PURE__*/
|
|
269
|
-
className: "mb-2",
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
270
|
+
className: "mb-2 flex",
|
|
271
|
+
children: [/*#__PURE__*/jsx(Label, {
|
|
272
|
+
"data-cy": "dynamic-query-params-label",
|
|
273
|
+
"data-testid": "dynamic-query-params-label",
|
|
274
|
+
children: queryParamsProps.label || t("neetoMolecules.productEmbed.queryParam.label")
|
|
275
|
+
}), isPresent(queryParamsProps.helpPopoverProps) && /*#__PURE__*/jsx(HelpPopover, _objectSpread$3({
|
|
276
|
+
className: "ml-1"
|
|
277
|
+
}, queryParamsProps.helpPopoverProps))]
|
|
272
278
|
}), queryParams.map(function (param, index) {
|
|
273
279
|
return /*#__PURE__*/jsxs("div", {
|
|
274
280
|
className: "mb-2 flex gap-1",
|
|
@@ -315,6 +321,7 @@ var ElementPopup$1 = function ElementPopup(_ref) {
|
|
|
315
321
|
var customization = _ref.customization,
|
|
316
322
|
updateCustomization = _ref.updateCustomization,
|
|
317
323
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
324
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
318
325
|
otherCustomizations = _ref.otherCustomizations;
|
|
319
326
|
var elementSelector = customization.elementSelector;
|
|
320
327
|
var _useTranslation = useTranslation(),
|
|
@@ -342,6 +349,7 @@ var ElementPopup$1 = function ElementPopup(_ref) {
|
|
|
342
349
|
});
|
|
343
350
|
}
|
|
344
351
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsx(DynamicQueryParams, {
|
|
352
|
+
queryParamsProps: queryParamsProps,
|
|
345
353
|
updateCustomization: updateCustomization
|
|
346
354
|
})]
|
|
347
355
|
});
|
|
@@ -351,6 +359,7 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
351
359
|
var customization = _ref.customization,
|
|
352
360
|
updateCustomization = _ref.updateCustomization,
|
|
353
361
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
362
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
354
363
|
otherCustomizations = _ref.otherCustomizations;
|
|
355
364
|
var _useTranslation = useTranslation(),
|
|
356
365
|
t = _useTranslation.t;
|
|
@@ -437,6 +446,7 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
437
446
|
});
|
|
438
447
|
}
|
|
439
448
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsx(DynamicQueryParams, {
|
|
449
|
+
queryParamsProps: queryParamsProps,
|
|
440
450
|
updateCustomization: updateCustomization
|
|
441
451
|
})]
|
|
442
452
|
});
|
|
@@ -446,6 +456,7 @@ var Inline$1 = function Inline(_ref) {
|
|
|
446
456
|
var customization = _ref.customization,
|
|
447
457
|
updateCustomization = _ref.updateCustomization,
|
|
448
458
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
459
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
449
460
|
otherCustomizations = _ref.otherCustomizations;
|
|
450
461
|
var height = customization.height,
|
|
451
462
|
width = customization.width,
|
|
@@ -512,6 +523,7 @@ var Inline$1 = function Inline(_ref) {
|
|
|
512
523
|
}
|
|
513
524
|
})]
|
|
514
525
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsx(DynamicQueryParams, {
|
|
526
|
+
queryParamsProps: queryParamsProps,
|
|
515
527
|
updateCustomization: updateCustomization
|
|
516
528
|
})]
|
|
517
529
|
});
|
|
@@ -1351,6 +1363,7 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
|
|
|
1351
1363
|
customEmbedScriptPath = _ref.customEmbedScriptPath,
|
|
1352
1364
|
customPreviewIframeUrl = _ref.customPreviewIframeUrl,
|
|
1353
1365
|
id = _ref.id,
|
|
1366
|
+
queryParamsProps = _ref.queryParamsProps,
|
|
1354
1367
|
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
1355
1368
|
options = _ref.options,
|
|
1356
1369
|
extraArgs = _ref.extraArgs,
|
|
@@ -1431,6 +1444,7 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
|
|
|
1431
1444
|
customization: customization,
|
|
1432
1445
|
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
1433
1446
|
otherCustomizations: otherCustomizations,
|
|
1447
|
+
queryParamsProps: queryParamsProps,
|
|
1434
1448
|
updateCustomization: updateCustomization
|
|
1435
1449
|
})]
|
|
1436
1450
|
})
|
|
@@ -1531,6 +1545,11 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
1531
1545
|
id = _ref.id,
|
|
1532
1546
|
_ref$isQueryParamsEna = _ref.isQueryParamsEnabled,
|
|
1533
1547
|
isQueryParamsEnabled = _ref$isQueryParamsEna === void 0 ? false : _ref$isQueryParamsEna,
|
|
1548
|
+
_ref$queryParamsProps = _ref.queryParamsProps,
|
|
1549
|
+
queryParamsProps = _ref$queryParamsProps === void 0 ? {
|
|
1550
|
+
helpPopoverProps: {},
|
|
1551
|
+
label: ""
|
|
1552
|
+
} : _ref$queryParamsProps,
|
|
1534
1553
|
_ref$options = _ref.options,
|
|
1535
1554
|
options = _ref$options === void 0 ? {} : _ref$options,
|
|
1536
1555
|
_ref$extraArgs = _ref.extraArgs,
|
|
@@ -1555,6 +1574,7 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
1555
1574
|
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
1556
1575
|
options: options,
|
|
1557
1576
|
otherCustomizations: otherCustomizations,
|
|
1577
|
+
queryParamsProps: queryParamsProps,
|
|
1558
1578
|
selectedEmbed: selectedEmbed,
|
|
1559
1579
|
supportedLanguages: supportedLanguages
|
|
1560
1580
|
}) : /*#__PURE__*/jsx(EmbedSelector, {
|