@bigbinary/neeto-molecules 3.16.1-beta → 3.16.2
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/CardLayout.js +3 -3
- package/dist/CardLayout.js.map +1 -1
- package/dist/Container.js +1 -1
- package/dist/CopyToClipboardButton.js +2 -3
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/OptionFields.js +1 -1
- package/dist/OptionFields.js.map +1 -1
- package/dist/ProductEmbed.js +302 -985
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/ShareViaLink.js +182 -421
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/cjs/CardLayout.js +3 -3
- package/dist/cjs/CardLayout.js.map +1 -1
- package/dist/cjs/Container.js +1 -1
- package/dist/cjs/CopyToClipboardButton.js +2 -3
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/OptionFields.js +1 -1
- package/dist/cjs/OptionFields.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +301 -984
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +180 -419
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +40 -48
- package/types/ProductEmbed.d.ts +0 -1
- package/types/ShareViaLink.d.ts +28 -25
package/dist/cjs/ProductEmbed.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
|
-
var reactRouterDom = require('react-router-dom');
|
|
5
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
4
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
7
5
|
var React = require('react');
|
|
8
6
|
var classnames = require('classnames');
|
|
7
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
9
8
|
var LeftArrow = require('@bigbinary/neeto-icons/LeftArrow');
|
|
10
9
|
var Button = require('@bigbinary/neetoui/Button');
|
|
11
10
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
12
11
|
var ramda = require('ramda');
|
|
13
12
|
var reactI18next = require('react-i18next');
|
|
14
|
-
var Container = require('./Container.js');
|
|
15
|
-
var Header = require('./Header.js');
|
|
16
|
-
var Select = require('@bigbinary/neetoui/Select');
|
|
17
13
|
var Codeblock = require('./Codeblock.js');
|
|
14
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
18
15
|
var i18next = require('i18next');
|
|
16
|
+
var Code$1 = require('@bigbinary/neeto-icons/Code');
|
|
19
17
|
var Input = require('@bigbinary/neetoui/Input');
|
|
20
18
|
var Callout = require('@bigbinary/neetoui/Callout');
|
|
21
19
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
@@ -23,43 +21,73 @@ var Delete = require('@bigbinary/neeto-icons/Delete');
|
|
|
23
21
|
var Plus = require('@bigbinary/neeto-icons/Plus');
|
|
24
22
|
var Label = require('@bigbinary/neetoui/Label');
|
|
25
23
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
26
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
27
24
|
var Checkbox = require('@bigbinary/neetoui/Checkbox');
|
|
25
|
+
var Select = require('@bigbinary/neetoui/Select');
|
|
28
26
|
var ColorPicker = require('@bigbinary/neetoui/ColorPicker');
|
|
29
|
-
var
|
|
27
|
+
var Tab = require('@bigbinary/neetoui/Tab');
|
|
28
|
+
var Radio = require('@bigbinary/neetoui/Radio');
|
|
30
29
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
31
30
|
var BrowserPreview = require('./BrowserPreview.js');
|
|
32
31
|
var injectCss = require('./inject-css-vQvjPR2x.js');
|
|
33
|
-
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
34
|
-
require('./index-JY2zVpnv.js');
|
|
35
|
-
require('./_commonjsHelpers-BJu3ubxk.js');
|
|
36
|
-
require('./Breadcrumbs.js');
|
|
37
|
-
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
38
|
-
require('./HelpPopover.js');
|
|
39
|
-
require('@bigbinary/neeto-icons/Help');
|
|
40
|
-
require('@bigbinary/neetoui/Popover');
|
|
41
|
-
require('./MoreDropdown.js');
|
|
42
|
-
require('@bigbinary/neeto-icons/MenuHorizontal');
|
|
43
|
-
require('@bigbinary/neeto-icons/MenuVertical');
|
|
44
|
-
require('@bigbinary/neetoui/Dropdown');
|
|
45
|
-
require('@bigbinary/neetoui/Tooltip');
|
|
46
|
-
require('./Search.js');
|
|
47
|
-
require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
|
|
48
|
-
require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
|
|
49
|
-
require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
|
|
50
|
-
require('@bigbinary/neeto-icons/Search');
|
|
51
|
-
require('@bigbinary/neeto-commons-frontend/utils');
|
|
52
32
|
require('react-syntax-highlighter/dist/esm/prism-light.js');
|
|
53
33
|
require('react-syntax-highlighter/dist/esm/styles/prism');
|
|
54
34
|
require('./CopyToClipboardButton.js');
|
|
35
|
+
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
55
36
|
require('@bigbinary/neeto-icons/Copy');
|
|
56
37
|
require('@bigbinary/neeto-icons/Check');
|
|
57
38
|
|
|
39
|
+
var Code = function Code(_ref) {
|
|
40
|
+
var code = _ref.code,
|
|
41
|
+
tab = _ref.tab;
|
|
42
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43
|
+
className: "neeto-molecules-embed__code-block relative w-full overflow-y-auto",
|
|
44
|
+
"data-cy": "embed-code-block",
|
|
45
|
+
"data-testid": "".concat(tab, "-code-block"),
|
|
46
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Codeblock, {
|
|
47
|
+
code: code
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var TAB_KEYS = {
|
|
53
|
+
HTML: "html",
|
|
54
|
+
REACT: "react"
|
|
55
|
+
};
|
|
56
|
+
var TABS = [{
|
|
57
|
+
key: TAB_KEYS.HTML,
|
|
58
|
+
label: i18next.t("neetoMolecules.productEmbed.tab.html"),
|
|
59
|
+
icon: Code$1
|
|
60
|
+
}, {
|
|
61
|
+
key: TAB_KEYS.REACT,
|
|
62
|
+
label: i18next.t("neetoMolecules.productEmbed.tab.react"),
|
|
63
|
+
icon: Code$1
|
|
64
|
+
}];
|
|
65
|
+
var EMBED_OPTIONS = {
|
|
66
|
+
INLINE: "inline",
|
|
67
|
+
FLOATING_POPUP: "floatingPopup",
|
|
68
|
+
ELEMENT_POPUP: "elementPopup"
|
|
69
|
+
};
|
|
70
|
+
var DEFAULT_CUSTOMIZATION = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, {
|
|
71
|
+
width: 100,
|
|
72
|
+
height: 100,
|
|
73
|
+
elementSelector: "inline-embed-container"
|
|
74
|
+
}), EMBED_OPTIONS.FLOATING_POPUP, {
|
|
75
|
+
showIcon: false,
|
|
76
|
+
btnText: "Open",
|
|
77
|
+
btnColor: "#008068",
|
|
78
|
+
btnTextColor: "#fff",
|
|
79
|
+
btnPosition: "bottomRight"
|
|
80
|
+
}), EMBED_OPTIONS.ELEMENT_POPUP, {
|
|
81
|
+
elementSelector: "open-popup-button"
|
|
82
|
+
});
|
|
83
|
+
var SCRIPT_ID = "embed-script";
|
|
84
|
+
var TAB_STRING = " ";
|
|
85
|
+
|
|
58
86
|
var FLOATING_BUTTON_POSITIONS = [{
|
|
59
|
-
label: i18next.t("neetoMolecules.productEmbed.
|
|
87
|
+
label: i18next.t("neetoMolecules.productEmbed.customization.position.bottomLeft"),
|
|
60
88
|
value: "bottomLeft"
|
|
61
89
|
}, {
|
|
62
|
-
label: i18next.t("neetoMolecules.productEmbed.
|
|
90
|
+
label: i18next.t("neetoMolecules.productEmbed.customization.position.bottomRight"),
|
|
63
91
|
value: "bottomRight"
|
|
64
92
|
}];
|
|
65
93
|
var INITIAL_QUERY_PARAM = {
|
|
@@ -203,13 +231,13 @@ var reactCodeGenerators = {
|
|
|
203
231
|
elementPopup: elementPopupEmbedCode
|
|
204
232
|
};
|
|
205
233
|
|
|
206
|
-
var _excluded = ["
|
|
234
|
+
var _excluded = ["tab", "type"];
|
|
207
235
|
var generateCode = function generateCode(options) {
|
|
208
236
|
var _reactCodeGenerators$, _htmlCodeGenerators$t;
|
|
209
|
-
var
|
|
237
|
+
var tab = options.tab,
|
|
210
238
|
type = options.type,
|
|
211
239
|
embeddedCodeOptions = _objectWithoutProperties(options, _excluded);
|
|
212
|
-
return
|
|
240
|
+
return tab === "react" ? (_reactCodeGenerators$ = reactCodeGenerators[type]) === null || _reactCodeGenerators$ === void 0 ? void 0 : _reactCodeGenerators$.call(reactCodeGenerators, embeddedCodeOptions) : (_htmlCodeGenerators$t = htmlCodeGenerators[type]) === null || _htmlCodeGenerators$t === void 0 ? void 0 : _htmlCodeGenerators$t.call(htmlCodeGenerators, embeddedCodeOptions);
|
|
213
241
|
};
|
|
214
242
|
var buildDefaultCustomization = function buildDefaultCustomization(defaultCustomizations) {
|
|
215
243
|
return ramda.mergeDeepLeft(defaultCustomizations, DEFAULT_CUSTOMIZATION);
|
|
@@ -230,14 +258,9 @@ var buildQueryParamsFromInputFields = function buildQueryParamsFromInputFields(i
|
|
|
230
258
|
var queryParamJsonString = JSON.stringify(queryParams, null, 2);
|
|
231
259
|
return queryParamJsonString.replace(/\n/g, " ").replace(/\s\s+/g, " ");
|
|
232
260
|
};
|
|
233
|
-
var toCamelCasedString = function toCamelCasedString(string) {
|
|
234
|
-
return string === null || string === void 0 ? void 0 : string.replace(/[_-]+(\w)/g, function (_, nextChar) {
|
|
235
|
-
return nextChar.toUpperCase();
|
|
236
|
-
});
|
|
237
|
-
};
|
|
238
261
|
|
|
239
|
-
function ownKeys$
|
|
240
|
-
function _objectSpread$
|
|
262
|
+
function ownKeys$1(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; }
|
|
263
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
241
264
|
var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
242
265
|
var updateCustomization = _ref.updateCustomization;
|
|
243
266
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -257,7 +280,7 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
257
280
|
};
|
|
258
281
|
var handleInputChange = function handleInputChange(index, field, value) {
|
|
259
282
|
var newQueryParams = queryParams.map(function (param, i) {
|
|
260
|
-
return i === index ? _objectSpread$
|
|
283
|
+
return i === index ? _objectSpread$1(_objectSpread$1({}, param), {}, _defineProperty({}, field, value)) : param;
|
|
261
284
|
});
|
|
262
285
|
setQueryParams(newQueryParams);
|
|
263
286
|
};
|
|
@@ -270,16 +293,16 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
270
293
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
271
294
|
className: "mb-2",
|
|
272
295
|
"data-cy": "dynamic-query-params-label",
|
|
273
|
-
children: t("neetoMolecules.productEmbed.queryParam.label")
|
|
296
|
+
children: t("neetoMolecules.productEmbed.customization.queryParam.label")
|
|
274
297
|
}), queryParams.map(function (param, index) {
|
|
275
298
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
276
|
-
className: "mb-
|
|
299
|
+
className: "mb-1 flex gap-1",
|
|
277
300
|
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
278
301
|
"data-cy": "dynamic-query-key-name-input",
|
|
279
302
|
"data-testid": "dynamic-query-key-name-input",
|
|
280
303
|
name: "queryParams.".concat(index, ".name"),
|
|
281
304
|
value: param.name,
|
|
282
|
-
placeholder: t("neetoMolecules.productEmbed.queryParam.keyNamePlaceholder"),
|
|
305
|
+
placeholder: t("neetoMolecules.productEmbed.customization.queryParam.keyNamePlaceholder"),
|
|
283
306
|
onChange: function onChange(e) {
|
|
284
307
|
return handleInputChange(index, "name", e.target.value);
|
|
285
308
|
}
|
|
@@ -288,7 +311,7 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
288
311
|
"data-testid": "dynamic-query-key-value-input",
|
|
289
312
|
name: "queryParams.".concat(index, ".value"),
|
|
290
313
|
value: param.value,
|
|
291
|
-
placeholder: t("neetoMolecules.productEmbed.queryParam.keyValuePlaceholder"),
|
|
314
|
+
placeholder: t("neetoMolecules.productEmbed.customization.queryParam.keyValuePlaceholder"),
|
|
292
315
|
onChange: function onChange(e) {
|
|
293
316
|
return handleInputChange(index, "value", e.target.value);
|
|
294
317
|
}
|
|
@@ -306,8 +329,8 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
306
329
|
"data-cy": "dynamic-query-add-new-button",
|
|
307
330
|
icon: Plus,
|
|
308
331
|
iconPosition: "left",
|
|
309
|
-
label: t("neetoMolecules.productEmbed.queryParam.addQueryParam"),
|
|
310
332
|
style: "link",
|
|
333
|
+
label: t("neetoMolecules.productEmbed.customization.queryParam.addQueryParam"),
|
|
311
334
|
onClick: handleAddQueryParam
|
|
312
335
|
})]
|
|
313
336
|
});
|
|
@@ -327,17 +350,22 @@ var ElementPopup$1 = function ElementPopup(_ref) {
|
|
|
327
350
|
queryParams: undefined
|
|
328
351
|
});
|
|
329
352
|
}, []);
|
|
330
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
353
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
354
|
+
className: "space-y-6",
|
|
355
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
356
|
+
"data-cy": "element-popup-header",
|
|
357
|
+
style: "h4",
|
|
358
|
+
children: t("neetoMolecules.productEmbed.customization.elementPopup.title")
|
|
359
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Callout, {
|
|
360
|
+
"data-cy": "element-popup-description",
|
|
361
|
+
children: t("neetoMolecules.productEmbed.customization.elementPopup.description")
|
|
334
362
|
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
335
363
|
className: "w-full",
|
|
336
364
|
"data-cy": "element-id-input-field",
|
|
337
365
|
"data-testid": "element-id-input-field",
|
|
338
|
-
label: t("neetoMolecules.productEmbed.elementPopup.elementId"),
|
|
339
366
|
value: elementSelector,
|
|
340
|
-
error: !elementSelector && t("neetoMolecules.productEmbed.elementPopup.warning"),
|
|
367
|
+
error: !elementSelector && t("neetoMolecules.productEmbed.customization.elementPopup.warning"),
|
|
368
|
+
label: t("neetoMolecules.productEmbed.customization.elementPopup.elementId"),
|
|
341
369
|
onChange: function onChange(e) {
|
|
342
370
|
return updateCustomization({
|
|
343
371
|
elementSelector: e.target.value
|
|
@@ -369,14 +397,28 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
369
397
|
});
|
|
370
398
|
}, []);
|
|
371
399
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
372
|
-
className: "
|
|
373
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
400
|
+
className: "space-y-6",
|
|
401
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
402
|
+
"data-cy": "popup-customization-header",
|
|
403
|
+
style: "h4",
|
|
404
|
+
children: t("neetoMolecules.productEmbed.customization.floatingPopup.title")
|
|
405
|
+
}), icon && /*#__PURE__*/jsxRuntime.jsx(Checkbox, {
|
|
406
|
+
checked: showIcon,
|
|
407
|
+
"data-cy": "show-icon-checkbox",
|
|
408
|
+
"data-testid": "show-icon-checkbox",
|
|
409
|
+
label: t("neetoMolecules.productEmbed.customization.floatingPopup.showCalIcon"),
|
|
410
|
+
onChange: function onChange(e) {
|
|
411
|
+
return updateCustomization({
|
|
412
|
+
showIcon: e.target.checked
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
374
416
|
className: "space-y-2",
|
|
375
417
|
children: /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
376
418
|
"data-cy": "button-text-input-field",
|
|
377
419
|
"data-testid": "button-text-input-field",
|
|
378
|
-
label: t("neetoMolecules.productEmbed.floatingPopup.button.text"),
|
|
379
420
|
value: btnText,
|
|
421
|
+
label: t("neetoMolecules.productEmbed.customization.floatingPopup.button.text"),
|
|
380
422
|
onChange: function onChange(e) {
|
|
381
423
|
return updateCustomization({
|
|
382
424
|
btnText: e.target.value
|
|
@@ -388,12 +430,12 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
388
430
|
children: /*#__PURE__*/jsxRuntime.jsx(Select, {
|
|
389
431
|
"data-cy": "button-position-select-field",
|
|
390
432
|
"data-testid": "button-position-select-field",
|
|
391
|
-
label: t("neetoMolecules.productEmbed.floatingPopup.button.pos"),
|
|
392
433
|
options: FLOATING_BUTTON_POSITIONS,
|
|
393
434
|
value: btnPosition,
|
|
394
435
|
getOptionValue: function getOptionValue(option) {
|
|
395
436
|
return typeof option === "string" ? option : option.value;
|
|
396
437
|
},
|
|
438
|
+
label: t("neetoMolecules.productEmbed.customization.floatingPopup.button.pos"),
|
|
397
439
|
onChange: function onChange(e) {
|
|
398
440
|
return updateCustomization({
|
|
399
441
|
btnPosition: e.value
|
|
@@ -401,13 +443,12 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
401
443
|
}
|
|
402
444
|
})
|
|
403
445
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
404
|
-
className: "flex items-center justify-between gap-2",
|
|
446
|
+
className: "flex items-center justify-between gap-x-2",
|
|
405
447
|
"data-cy": "button-color-label",
|
|
406
448
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
407
|
-
children: t("neetoMolecules.productEmbed.floatingPopup.button.color")
|
|
449
|
+
children: t("neetoMolecules.productEmbed.customization.floatingPopup.button.color")
|
|
408
450
|
}), /*#__PURE__*/jsxRuntime.jsx(ColorPicker, {
|
|
409
451
|
color: btnColor,
|
|
410
|
-
size: "medium",
|
|
411
452
|
onChange: function onChange(e) {
|
|
412
453
|
return updateCustomization({
|
|
413
454
|
btnColor: e.hex
|
|
@@ -415,29 +456,18 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
415
456
|
}
|
|
416
457
|
})]
|
|
417
458
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
418
|
-
className: "flex items-center justify-between gap-2",
|
|
459
|
+
className: "flex items-center justify-between gap-x-2",
|
|
419
460
|
"data-cy": "button-text-color-label",
|
|
420
461
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
421
|
-
children: t("neetoMolecules.productEmbed.floatingPopup.button.textColor")
|
|
462
|
+
children: t("neetoMolecules.productEmbed.customization.floatingPopup.button.textColor")
|
|
422
463
|
}), /*#__PURE__*/jsxRuntime.jsx(ColorPicker, {
|
|
423
464
|
color: btnTextColor,
|
|
424
|
-
size: "medium",
|
|
425
465
|
onChange: function onChange(e) {
|
|
426
466
|
return updateCustomization({
|
|
427
467
|
btnTextColor: e.hex
|
|
428
468
|
});
|
|
429
469
|
}
|
|
430
470
|
})]
|
|
431
|
-
}), icon && /*#__PURE__*/jsxRuntime.jsx(Checkbox, {
|
|
432
|
-
checked: showIcon,
|
|
433
|
-
"data-cy": "show-icon-checkbox",
|
|
434
|
-
"data-testid": "show-icon-checkbox",
|
|
435
|
-
label: t("neetoMolecules.productEmbed.floatingPopup.showCalIcon"),
|
|
436
|
-
onChange: function onChange(e) {
|
|
437
|
-
return updateCustomization({
|
|
438
|
-
showIcon: e.target.checked
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
471
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
|
|
442
472
|
updateCustomization: updateCustomization
|
|
443
473
|
})]
|
|
@@ -464,12 +494,17 @@ var Inline$1 = function Inline(_ref) {
|
|
|
464
494
|
queryParams: undefined
|
|
465
495
|
});
|
|
466
496
|
}, []);
|
|
467
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
468
|
-
|
|
497
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
498
|
+
className: "flex flex-col gap-y-6",
|
|
499
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
500
|
+
"data-cy": "customization-text",
|
|
501
|
+
style: "h4",
|
|
502
|
+
children: t("neetoMolecules.productEmbed.customization.inline.title")
|
|
503
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
469
504
|
className: "flex flex-col gap-2",
|
|
470
505
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
471
506
|
"data-cy": "window-size-text",
|
|
472
|
-
children: t("neetoMolecules.productEmbed.inline.sizeOfEmbedWindow")
|
|
507
|
+
children: t("neetoMolecules.productEmbed.customization.inline.sizeOfEmbedWindow")
|
|
473
508
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
474
509
|
className: "flex justify-between gap-x-2",
|
|
475
510
|
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
@@ -504,7 +539,7 @@ var Inline$1 = function Inline(_ref) {
|
|
|
504
539
|
className: "flex flex-col gap-2",
|
|
505
540
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
506
541
|
"data-cy": "inline-element-id-input-label",
|
|
507
|
-
children: t("neetoMolecules.productEmbed.inline.elementId")
|
|
542
|
+
children: t("neetoMolecules.productEmbed.customization.inline.elementId")
|
|
508
543
|
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
509
544
|
"data-cy": "inline-element-id-input-field",
|
|
510
545
|
"data-testid": "inline-element-id-input-field",
|
|
@@ -519,725 +554,93 @@ var Inline$1 = function Inline(_ref) {
|
|
|
519
554
|
});
|
|
520
555
|
};
|
|
521
556
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
532
|
-
}, other), {}, {
|
|
533
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("g", {
|
|
534
|
-
clipPath: "url(#clip0_8605_6776)",
|
|
535
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
536
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
537
|
-
height: "163",
|
|
538
|
-
rx: "6",
|
|
539
|
-
width: "278"
|
|
540
|
-
}), /*#__PURE__*/jsxRuntime.jsx("mask", {
|
|
541
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
542
|
-
id: "path-3-inside-1_8605_6776",
|
|
543
|
-
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
544
|
-
d: "M0 0h305v20H0z"
|
|
545
|
-
})
|
|
546
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
547
|
-
d: "M0 0h305v20H0z",
|
|
548
|
-
fill: "rgb(var(--neeto-ui-white))"
|
|
549
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
550
|
-
d: "M305 19H0v2h305z",
|
|
551
|
-
fill: "currentColor",
|
|
552
|
-
mask: "url(#path-3-inside-1_8605_6776)"
|
|
553
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
554
|
-
cx: "10.596",
|
|
555
|
-
cy: "10.432",
|
|
556
|
-
fill: "#FD5350",
|
|
557
|
-
r: "2.307"
|
|
558
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
559
|
-
cx: "18.143",
|
|
560
|
-
cy: "10.432",
|
|
561
|
-
fill: "#FEB33A",
|
|
562
|
-
r: "2.307"
|
|
563
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
564
|
-
cx: "25.69",
|
|
565
|
-
cy: "10.432",
|
|
566
|
-
fill: "#2CC146",
|
|
567
|
-
r: "2.307"
|
|
568
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
569
|
-
d: "M36 20h206v10H36zM36 150h206v12H36z",
|
|
570
|
-
fill: "currentColor"
|
|
571
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
572
|
-
height: "103.55",
|
|
573
|
-
rx: "5.217",
|
|
574
|
-
stroke: "rgb(var(--neeto-ui-gray-300))",
|
|
575
|
-
strokeWidth: "0.45",
|
|
576
|
-
width: "205.55",
|
|
577
|
-
x: "36.225",
|
|
578
|
-
y: "38.225"
|
|
579
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
580
|
-
fill: "currentColor",
|
|
581
|
-
height: "2.311",
|
|
582
|
-
rx: "1.156",
|
|
583
|
-
width: "36.079",
|
|
584
|
-
x: "45.32",
|
|
585
|
-
y: "81.914"
|
|
586
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
587
|
-
fill: "currentColor",
|
|
588
|
-
height: "2.311",
|
|
589
|
-
rx: "1.156",
|
|
590
|
-
width: "20.949",
|
|
591
|
-
x: "45.32",
|
|
592
|
-
y: "87.688"
|
|
593
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
594
|
-
fill: "#008068",
|
|
595
|
-
height: "7.988",
|
|
596
|
-
rx: "1",
|
|
597
|
-
width: "23.183",
|
|
598
|
-
x: "203.539",
|
|
599
|
-
y: "61.109"
|
|
600
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
601
|
-
fill: "currentColor",
|
|
602
|
-
height: "7.728",
|
|
603
|
-
rx: "1",
|
|
604
|
-
width: "23.183",
|
|
605
|
-
x: "203.539",
|
|
606
|
-
y: "73.57"
|
|
607
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
608
|
-
fill: "currentColor",
|
|
609
|
-
height: "8.134",
|
|
610
|
-
rx: "1",
|
|
611
|
-
width: "23.183",
|
|
612
|
-
x: "203.539",
|
|
613
|
-
y: "85.773"
|
|
614
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
615
|
-
fill: "currentColor",
|
|
616
|
-
height: "8.134",
|
|
617
|
-
rx: "1",
|
|
618
|
-
width: "23.183",
|
|
619
|
-
x: "203.539",
|
|
620
|
-
y: "98.383"
|
|
621
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
622
|
-
fill: "currentColor",
|
|
623
|
-
height: "8.134",
|
|
624
|
-
rx: "1",
|
|
625
|
-
width: "23.183",
|
|
626
|
-
x: "203.539",
|
|
627
|
-
y: "110.992"
|
|
628
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
629
|
-
cx: "52.077",
|
|
630
|
-
cy: "67.819",
|
|
631
|
-
fill: "currentColor",
|
|
632
|
-
r: "6.733"
|
|
633
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
634
|
-
cx: "120.314",
|
|
635
|
-
cy: "74.322",
|
|
636
|
-
fill: "currentColor",
|
|
637
|
-
r: "2.65"
|
|
638
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
639
|
-
cx: "120.322",
|
|
640
|
-
cy: "84.876",
|
|
641
|
-
fill: "currentColor",
|
|
642
|
-
r: "2.65"
|
|
643
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
644
|
-
cx: "120.322",
|
|
645
|
-
cy: "95.439",
|
|
646
|
-
fill: "currentColor",
|
|
647
|
-
r: "2.65"
|
|
648
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
649
|
-
cx: "130.954",
|
|
650
|
-
cy: "63.767",
|
|
651
|
-
fill: "currentColor",
|
|
652
|
-
r: "2.65"
|
|
653
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
654
|
-
cx: "130.954",
|
|
655
|
-
cy: "74.322",
|
|
656
|
-
fill: "currentColor",
|
|
657
|
-
r: "2.65"
|
|
658
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
659
|
-
cx: "130.954",
|
|
660
|
-
cy: "84.876",
|
|
661
|
-
fill: "currentColor",
|
|
662
|
-
r: "2.65"
|
|
663
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
664
|
-
cx: "130.954",
|
|
665
|
-
cy: "95.439",
|
|
666
|
-
fill: "currentColor",
|
|
667
|
-
r: "2.65"
|
|
668
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
669
|
-
cx: "141.572",
|
|
670
|
-
cy: "63.767",
|
|
671
|
-
fill: "currentColor",
|
|
672
|
-
r: "2.65"
|
|
673
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
674
|
-
cx: "141.572",
|
|
675
|
-
cy: "74.322",
|
|
676
|
-
fill: "currentColor",
|
|
677
|
-
r: "2.65"
|
|
678
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
679
|
-
cx: "141.572",
|
|
680
|
-
cy: "84.876",
|
|
681
|
-
fill: "currentColor",
|
|
682
|
-
r: "2.65"
|
|
683
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
684
|
-
cx: "141.572",
|
|
685
|
-
cy: "95.439",
|
|
686
|
-
fill: "currentColor",
|
|
687
|
-
r: "2.65"
|
|
688
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
689
|
-
cx: "152.181",
|
|
690
|
-
cy: "63.767",
|
|
691
|
-
fill: "currentColor",
|
|
692
|
-
r: "2.65"
|
|
693
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
694
|
-
cx: "152.181",
|
|
695
|
-
cy: "74.322",
|
|
696
|
-
fill: "currentColor",
|
|
697
|
-
r: "2.65"
|
|
698
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
699
|
-
cx: "152.181",
|
|
700
|
-
cy: "84.876",
|
|
701
|
-
fill: "currentColor",
|
|
702
|
-
r: "2.65"
|
|
703
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
704
|
-
cx: "162.806",
|
|
705
|
-
cy: "63.767",
|
|
706
|
-
fill: "currentColor",
|
|
707
|
-
r: "2.65"
|
|
708
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
709
|
-
cx: "162.806",
|
|
710
|
-
cy: "74.322",
|
|
711
|
-
fill: "#008068",
|
|
712
|
-
r: "2.65"
|
|
713
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
714
|
-
cx: "162.806",
|
|
715
|
-
cy: "84.876",
|
|
716
|
-
fill: "currentColor",
|
|
717
|
-
r: "2.65"
|
|
718
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
719
|
-
cx: "173.439",
|
|
720
|
-
cy: "63.767",
|
|
721
|
-
fill: "currentColor",
|
|
722
|
-
r: "2.65"
|
|
723
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
724
|
-
cx: "173.439",
|
|
725
|
-
cy: "74.322",
|
|
726
|
-
fill: "currentColor",
|
|
727
|
-
r: "2.65"
|
|
728
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
729
|
-
cx: "173.439",
|
|
730
|
-
cy: "84.876",
|
|
731
|
-
fill: "currentColor",
|
|
732
|
-
r: "2.65"
|
|
733
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
734
|
-
cx: "184.064",
|
|
735
|
-
cy: "63.767",
|
|
736
|
-
fill: "currentColor",
|
|
737
|
-
r: "2.65"
|
|
738
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
739
|
-
cx: "184.064",
|
|
740
|
-
cy: "74.322",
|
|
741
|
-
fill: "currentColor",
|
|
742
|
-
r: "2.65"
|
|
743
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
744
|
-
cx: "184.075",
|
|
745
|
-
cy: "84.876",
|
|
746
|
-
fill: "currentColor",
|
|
747
|
-
r: "2.65"
|
|
748
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
749
|
-
d: "M93.023 38v104",
|
|
750
|
-
stroke: "#E7E7E7",
|
|
751
|
-
strokeWidth: "0.454"
|
|
752
|
-
})]
|
|
753
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
754
|
-
height: "162",
|
|
755
|
-
rx: "5.5",
|
|
756
|
-
stroke: "rgb(var(--neeto-ui-gray-300))",
|
|
757
|
-
width: "277",
|
|
758
|
-
x: "0.5",
|
|
759
|
-
y: "0.5"
|
|
760
|
-
}), /*#__PURE__*/jsxRuntime.jsx("defs", {
|
|
761
|
-
children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
|
|
762
|
-
id: "clip0_8605_6776",
|
|
763
|
-
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
764
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
765
|
-
height: "163",
|
|
766
|
-
rx: "6",
|
|
767
|
-
width: "278"
|
|
768
|
-
})
|
|
769
|
-
})
|
|
770
|
-
})]
|
|
771
|
-
}));
|
|
772
|
-
};
|
|
773
|
-
var FloatingPopupIcon = function FloatingPopupIcon(_ref2) {
|
|
774
|
-
var other = Object.assign({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
775
|
-
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$2(_objectSpread$2({
|
|
776
|
-
fill: "none",
|
|
777
|
-
height: "163",
|
|
778
|
-
viewBox: "0 0 278 163",
|
|
779
|
-
width: "278",
|
|
780
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
781
|
-
}, other), {}, {
|
|
782
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("g", {
|
|
783
|
-
clipPath: "url(#clip0_9047_10870)",
|
|
784
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
785
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
786
|
-
height: "163",
|
|
787
|
-
rx: "6",
|
|
788
|
-
width: "278"
|
|
789
|
-
}), /*#__PURE__*/jsxRuntime.jsx("mask", {
|
|
790
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
791
|
-
id: "path-3-inside-1_9047_10870",
|
|
792
|
-
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
793
|
-
d: "M0 0H305V20H0V0Z"
|
|
794
|
-
})
|
|
795
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
796
|
-
d: "M0 0H305V20H0V0Z",
|
|
797
|
-
fill: "rgb(var(--neeto-ui-white))"
|
|
798
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
799
|
-
d: "M305 19H0V21H305V19Z",
|
|
800
|
-
fill: "currentColor",
|
|
801
|
-
mask: "url(#path-3-inside-1_9047_10870)"
|
|
802
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
803
|
-
cx: "10.5963",
|
|
804
|
-
cy: "10.4322",
|
|
805
|
-
fill: "#FD5350",
|
|
806
|
-
r: "2.30723"
|
|
807
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
808
|
-
cx: "18.1432",
|
|
809
|
-
cy: "10.4322",
|
|
810
|
-
fill: "#FEB33A",
|
|
811
|
-
r: "2.30723"
|
|
812
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
813
|
-
cx: "25.69",
|
|
814
|
-
cy: "10.4322",
|
|
815
|
-
fill: "#2CC146",
|
|
816
|
-
r: "2.30723"
|
|
817
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
818
|
-
fill: "currentColor",
|
|
819
|
-
height: "3",
|
|
820
|
-
opacity: "0.78",
|
|
821
|
-
rx: "1.5",
|
|
822
|
-
width: "84.6936",
|
|
823
|
-
x: "145",
|
|
824
|
-
y: "63"
|
|
825
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
826
|
-
fill: "currentColor",
|
|
827
|
-
height: "3",
|
|
828
|
-
opacity: "0.78",
|
|
829
|
-
rx: "1.5",
|
|
830
|
-
width: "89",
|
|
831
|
-
x: "145",
|
|
832
|
-
y: "70"
|
|
833
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
834
|
-
fill: "currentColor",
|
|
835
|
-
height: "3",
|
|
836
|
-
opacity: "0.78",
|
|
837
|
-
rx: "1.5",
|
|
838
|
-
width: "49",
|
|
839
|
-
x: "145",
|
|
840
|
-
y: "77"
|
|
841
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
842
|
-
fill: "currentColor",
|
|
843
|
-
height: "3",
|
|
844
|
-
opacity: "0.78",
|
|
845
|
-
rx: "1.5",
|
|
846
|
-
width: "84.6936",
|
|
847
|
-
x: "36",
|
|
848
|
-
y: "111"
|
|
849
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
850
|
-
fill: "currentColor",
|
|
851
|
-
height: "3",
|
|
852
|
-
opacity: "0.78",
|
|
853
|
-
rx: "1.5",
|
|
854
|
-
width: "89",
|
|
855
|
-
x: "36",
|
|
856
|
-
y: "118"
|
|
857
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
858
|
-
fill: "currentColor",
|
|
859
|
-
height: "3",
|
|
860
|
-
opacity: "0.78",
|
|
861
|
-
rx: "1.5",
|
|
862
|
-
width: "25.8387",
|
|
863
|
-
x: "36",
|
|
864
|
-
y: "125"
|
|
865
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
866
|
-
fill: "currentColor",
|
|
867
|
-
height: "35",
|
|
868
|
-
width: "96",
|
|
869
|
-
x: "36",
|
|
870
|
-
y: "57"
|
|
871
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
872
|
-
fill: "currentColor",
|
|
873
|
-
height: "35",
|
|
874
|
-
width: "95",
|
|
875
|
-
x: "145",
|
|
876
|
-
y: "102"
|
|
877
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
878
|
-
fill: "currentColor",
|
|
879
|
-
height: "26",
|
|
880
|
-
width: "204",
|
|
881
|
-
x: "36",
|
|
882
|
-
y: "20"
|
|
883
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
884
|
-
fill: "currentColor",
|
|
885
|
-
height: "14",
|
|
886
|
-
width: "204",
|
|
887
|
-
x: "36",
|
|
888
|
-
y: "148"
|
|
889
|
-
})]
|
|
890
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
891
|
-
height: "162",
|
|
892
|
-
rx: "5.5",
|
|
893
|
-
stroke: "rgb(var(--neeto-ui-gray-300))",
|
|
894
|
-
width: "277",
|
|
895
|
-
x: "0.5",
|
|
896
|
-
y: "0.5"
|
|
897
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
898
|
-
fill: "#008068",
|
|
899
|
-
height: "18",
|
|
900
|
-
rx: "9",
|
|
901
|
-
width: "69",
|
|
902
|
-
x: "194",
|
|
903
|
-
y: "134"
|
|
904
|
-
}), /*#__PURE__*/jsxRuntime.jsx("defs", {
|
|
905
|
-
children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
|
|
906
|
-
id: "clip0_9047_10870",
|
|
907
|
-
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
908
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
909
|
-
height: "163",
|
|
910
|
-
rx: "6",
|
|
911
|
-
width: "278"
|
|
912
|
-
})
|
|
913
|
-
})
|
|
914
|
-
})]
|
|
915
|
-
}));
|
|
916
|
-
};
|
|
917
|
-
var ElementPopupIcon = function ElementPopupIcon(_ref3) {
|
|
918
|
-
var other = Object.assign({}, (_objectDestructuringEmpty(_ref3), _ref3));
|
|
919
|
-
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$2(_objectSpread$2({
|
|
920
|
-
fill: "none",
|
|
921
|
-
height: "163",
|
|
922
|
-
viewBox: "0 0 278 163",
|
|
923
|
-
width: "278",
|
|
924
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
925
|
-
}, other), {}, {
|
|
926
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("g", {
|
|
927
|
-
clipPath: "url(#clip0_9047_10869)",
|
|
928
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
929
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
930
|
-
height: "163",
|
|
931
|
-
rx: "6",
|
|
932
|
-
width: "278"
|
|
933
|
-
}), /*#__PURE__*/jsxRuntime.jsx("mask", {
|
|
934
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
935
|
-
id: "path-3-inside-1_9047_10869",
|
|
936
|
-
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
937
|
-
d: "M0 0h305v20H0z"
|
|
938
|
-
})
|
|
939
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
940
|
-
d: "M0 0h305v20H0z",
|
|
941
|
-
fill: "rgb(var(--neeto-ui-white))"
|
|
942
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
943
|
-
d: "M305 19H0v2h305z",
|
|
944
|
-
fill: "currentColor",
|
|
945
|
-
mask: "url(#path-3-inside-1_9047_10869)"
|
|
946
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
947
|
-
cx: "10.596",
|
|
948
|
-
cy: "10.432",
|
|
949
|
-
fill: "#FD5350",
|
|
950
|
-
r: "2.307"
|
|
951
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
952
|
-
cx: "18.143",
|
|
953
|
-
cy: "10.432",
|
|
954
|
-
fill: "#FEB33A",
|
|
955
|
-
r: "2.307"
|
|
956
|
-
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
957
|
-
cx: "25.69",
|
|
958
|
-
cy: "10.432",
|
|
959
|
-
fill: "#2CC146",
|
|
960
|
-
r: "2.307"
|
|
961
|
-
})]
|
|
962
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
963
|
-
height: "162",
|
|
964
|
-
rx: "5.5",
|
|
965
|
-
stroke: "rgb(var(--neeto-ui-gray-300))",
|
|
966
|
-
width: "277",
|
|
967
|
-
x: "0.5",
|
|
968
|
-
y: "0.5"
|
|
969
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
970
|
-
fill: "currentColor",
|
|
971
|
-
height: "3.944",
|
|
972
|
-
opacity: "0.78",
|
|
973
|
-
rx: "1.972",
|
|
974
|
-
width: "85",
|
|
975
|
-
x: "135",
|
|
976
|
-
y: "58.461"
|
|
977
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
978
|
-
fill: "currentColor",
|
|
979
|
-
height: "3.944",
|
|
980
|
-
opacity: "0.78",
|
|
981
|
-
rx: "1.972",
|
|
982
|
-
width: "89",
|
|
983
|
-
x: "135",
|
|
984
|
-
y: "66.352"
|
|
985
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
986
|
-
fill: "#008068",
|
|
987
|
-
height: "7",
|
|
988
|
-
rx: "3.5",
|
|
989
|
-
width: "38",
|
|
990
|
-
x: "135",
|
|
991
|
-
y: "74"
|
|
992
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
993
|
-
fill: "currentColor",
|
|
994
|
-
height: "3.944",
|
|
995
|
-
opacity: "0.78",
|
|
996
|
-
rx: "1.972",
|
|
997
|
-
width: "85",
|
|
998
|
-
x: "135",
|
|
999
|
-
y: "100.859"
|
|
1000
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1001
|
-
fill: "currentColor",
|
|
1002
|
-
height: "3.944",
|
|
1003
|
-
opacity: "0.78",
|
|
1004
|
-
rx: "1.972",
|
|
1005
|
-
width: "89",
|
|
1006
|
-
x: "135",
|
|
1007
|
-
y: "108.75"
|
|
1008
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1009
|
-
fill: "currentColor",
|
|
1010
|
-
height: "3.944",
|
|
1011
|
-
opacity: "0.78",
|
|
1012
|
-
rx: "1.972",
|
|
1013
|
-
width: "26",
|
|
1014
|
-
x: "135",
|
|
1015
|
-
y: "116.641"
|
|
1016
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1017
|
-
d: "M36 52h88v34H36zM36 20h204v28H36zM240 162H36v-28h204zM36 90h88v41H36z",
|
|
1018
|
-
fill: "currentColor"
|
|
1019
|
-
}), /*#__PURE__*/jsxRuntime.jsx("defs", {
|
|
1020
|
-
children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
|
|
1021
|
-
id: "clip0_9047_10869",
|
|
1022
|
-
children: /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1023
|
-
fill: "rgb(var(--neeto-ui-white))",
|
|
1024
|
-
height: "163",
|
|
1025
|
-
rx: "6",
|
|
1026
|
-
width: "278"
|
|
1027
|
-
})
|
|
1028
|
-
})
|
|
1029
|
-
})]
|
|
1030
|
-
}));
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
var EMBED_OPTIONS = {
|
|
1034
|
-
INLINE: "inline",
|
|
1035
|
-
FLOATING_POPUP: "floatingPopup",
|
|
1036
|
-
ELEMENT_POPUP: "elementPopup"
|
|
1037
|
-
};
|
|
1038
|
-
var EMBED_ICONS = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, InlineEmbedIcon), EMBED_OPTIONS.FLOATING_POPUP, FloatingPopupIcon), EMBED_OPTIONS.ELEMENT_POPUP, ElementPopupIcon);
|
|
1039
|
-
var DEFAULT_CUSTOMIZATION = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, {
|
|
1040
|
-
width: 100,
|
|
1041
|
-
height: 100,
|
|
1042
|
-
elementSelector: "inline-embed-container"
|
|
1043
|
-
}), EMBED_OPTIONS.FLOATING_POPUP, {
|
|
1044
|
-
showIcon: false,
|
|
1045
|
-
btnText: "Open",
|
|
1046
|
-
btnColor: "#008068",
|
|
1047
|
-
btnTextColor: "#fff",
|
|
1048
|
-
btnPosition: "bottomRight"
|
|
1049
|
-
}), EMBED_OPTIONS.ELEMENT_POPUP, {
|
|
1050
|
-
elementSelector: "open-popup-button"
|
|
1051
|
-
});
|
|
1052
|
-
var EMBED_CUSTOMIZATION_COMPONENTS = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, Inline$1), EMBED_OPTIONS.FLOATING_POPUP, FloatingPopup$1), EMBED_OPTIONS.ELEMENT_POPUP, ElementPopup$1);
|
|
1053
|
-
var EMBED_TITLES = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, i18next.t("neetoMolecules.productEmbed.inline.title")), EMBED_OPTIONS.FLOATING_POPUP, i18next.t("neetoMolecules.productEmbed.floatingPopup.title")), EMBED_OPTIONS.ELEMENT_POPUP, i18next.t("neetoMolecules.productEmbed.elementPopup.title"));
|
|
1054
|
-
var SUPPORTED_LANGUAGES = [{
|
|
1055
|
-
value: "html",
|
|
1056
|
-
label: i18next.t("neetoMolecules.productEmbed.language.html")
|
|
1057
|
-
}, {
|
|
1058
|
-
value: "react",
|
|
1059
|
-
label: i18next.t("neetoMolecules.productEmbed.language.react")
|
|
1060
|
-
}];
|
|
1061
|
-
var SCRIPT_ID = "embed-script";
|
|
1062
|
-
var TAB_STRING = " ";
|
|
1063
|
-
|
|
1064
|
-
var Code = function Code(_ref) {
|
|
1065
|
-
var id = _ref.id,
|
|
1066
|
-
selectedEmbed = _ref.selectedEmbed,
|
|
1067
|
-
embedScriptLink = _ref.embedScriptLink,
|
|
1068
|
-
extraArgs = _ref.extraArgs,
|
|
1069
|
-
inlineWrapperStyle = _ref.inlineWrapperStyle,
|
|
1070
|
-
supportedLanguages = _ref.supportedLanguages,
|
|
1071
|
-
customization = _ref.customization;
|
|
1072
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1073
|
-
t = _useTranslation.t;
|
|
1074
|
-
var supportedLanguagesOptions = neetoCist.filterBy({
|
|
1075
|
-
value: function value(_value) {
|
|
1076
|
-
return supportedLanguages === null || supportedLanguages === void 0 ? void 0 : supportedLanguages.includes(_value);
|
|
1077
|
-
}
|
|
1078
|
-
}, SUPPORTED_LANGUAGES);
|
|
1079
|
-
var _useState = React.useState(supportedLanguagesOptions[0]),
|
|
1080
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1081
|
-
selectedLanguage = _useState2[0],
|
|
1082
|
-
setSelectedLanguage = _useState2[1];
|
|
1083
|
-
var code = generateCode({
|
|
1084
|
-
id: id,
|
|
1085
|
-
selectedLanguage: selectedLanguage.value,
|
|
1086
|
-
type: selectedEmbed,
|
|
557
|
+
var Customization = function Customization(_ref) {
|
|
558
|
+
var option = _ref.option,
|
|
559
|
+
customization = _ref.customization,
|
|
560
|
+
updateCustomization = _ref.updateCustomization,
|
|
561
|
+
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
562
|
+
otherCustomizations = _ref.otherCustomizations;
|
|
563
|
+
var type = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, Inline$1), EMBED_OPTIONS.FLOATING_POPUP, FloatingPopup$1), EMBED_OPTIONS.ELEMENT_POPUP, ElementPopup$1);
|
|
564
|
+
var Component = type[option];
|
|
565
|
+
return /*#__PURE__*/jsxRuntime.jsx(Component, {
|
|
1087
566
|
customization: customization,
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
567
|
+
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
568
|
+
otherCustomizations: otherCustomizations,
|
|
569
|
+
updateCustomization: updateCustomization
|
|
1091
570
|
});
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
style: "primary",
|
|
1118
|
-
label: t("neetoMolecules.productEmbed.copyCode")
|
|
1119
|
-
}
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
var Header = function Header(_ref) {
|
|
574
|
+
var supportedLanguagesTabs = _ref.supportedLanguagesTabs,
|
|
575
|
+
setTab = _ref.setTab,
|
|
576
|
+
tab = _ref.tab;
|
|
577
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
578
|
+
className: "flex w-full",
|
|
579
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Tab, {
|
|
580
|
+
noUnderline: true,
|
|
581
|
+
className: "neeto-molecules-product-embed-tab",
|
|
582
|
+
children: supportedLanguagesTabs.map(function (_ref2) {
|
|
583
|
+
var key = _ref2.key,
|
|
584
|
+
label = _ref2.label,
|
|
585
|
+
icon = _ref2.icon;
|
|
586
|
+
return /*#__PURE__*/React.createElement(Tab.Item, {
|
|
587
|
+
icon: icon,
|
|
588
|
+
active: tab === key,
|
|
589
|
+
"data-cy": "".concat(key, "-tab"),
|
|
590
|
+
"data-testid": "".concat(key, "-tab"),
|
|
591
|
+
key: key,
|
|
592
|
+
onClick: function onClick() {
|
|
593
|
+
return setTab(key);
|
|
594
|
+
}
|
|
595
|
+
}, label);
|
|
1120
596
|
})
|
|
1121
|
-
})
|
|
597
|
+
})
|
|
1122
598
|
});
|
|
1123
599
|
};
|
|
1124
600
|
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
return /*#__PURE__*/jsxRuntime.
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
fill: "currentColor",
|
|
1169
|
-
height: "12.706",
|
|
1170
|
-
opacity: "0.78",
|
|
1171
|
-
rx: "6.353",
|
|
1172
|
-
width: "376.941",
|
|
1173
|
-
y: "363.062"
|
|
1174
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1175
|
-
fill: "currentColor",
|
|
1176
|
-
height: "12.706",
|
|
1177
|
-
opacity: "0.78",
|
|
1178
|
-
rx: "6.353",
|
|
1179
|
-
width: "109.435",
|
|
1180
|
-
y: "392.711"
|
|
1181
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1182
|
-
d: "M0 127.203h374v148H0zM407 295h389v149H407zM0 .203h796v110H0zM0 460.203h796v59H0z",
|
|
1183
|
-
fill: "currentColor"
|
|
1184
|
-
})]
|
|
1185
|
-
}));
|
|
1186
|
-
};
|
|
1187
|
-
var ElementPopupPlaceholderImage = function ElementPopupPlaceholderImage(_ref2) {
|
|
1188
|
-
var other = Object.assign({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
1189
|
-
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$1(_objectSpread$1({
|
|
1190
|
-
fill: "none",
|
|
1191
|
-
height: "518",
|
|
1192
|
-
viewBox: "0 0 748 518",
|
|
1193
|
-
width: "748",
|
|
1194
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
1195
|
-
}, other), {}, {
|
|
1196
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1197
|
-
fill: "currentColor",
|
|
1198
|
-
height: "14.463",
|
|
1199
|
-
opacity: "0.78",
|
|
1200
|
-
rx: "7.231",
|
|
1201
|
-
width: "311.667",
|
|
1202
|
-
x: "363",
|
|
1203
|
-
y: "142.688"
|
|
1204
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1205
|
-
fill: "currentColor",
|
|
1206
|
-
height: "14.463",
|
|
1207
|
-
opacity: "0.78",
|
|
1208
|
-
rx: "7.231",
|
|
1209
|
-
width: "326.333",
|
|
1210
|
-
x: "363",
|
|
1211
|
-
y: "171.617"
|
|
1212
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1213
|
-
fill: "currentColor",
|
|
1214
|
-
height: "14.463",
|
|
1215
|
-
opacity: "0.78",
|
|
1216
|
-
rx: "7.231",
|
|
1217
|
-
width: "311.667",
|
|
1218
|
-
x: "363",
|
|
1219
|
-
y: "298.141"
|
|
1220
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1221
|
-
fill: "currentColor",
|
|
1222
|
-
height: "14.463",
|
|
1223
|
-
opacity: "0.78",
|
|
1224
|
-
rx: "7.231",
|
|
1225
|
-
width: "326.333",
|
|
1226
|
-
x: "363",
|
|
1227
|
-
y: "327.07"
|
|
1228
|
-
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1229
|
-
fill: "currentColor",
|
|
1230
|
-
height: "14.463",
|
|
1231
|
-
opacity: "0.78",
|
|
1232
|
-
rx: "7.231",
|
|
1233
|
-
width: "95.333",
|
|
1234
|
-
x: "363",
|
|
1235
|
-
y: "356"
|
|
1236
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1237
|
-
d: "M0 119h322.667v124.667H0zM0 0h748v104H0zM748 522.336H0V419.669h748zM0 258.328h322.667v150.333H0z",
|
|
1238
|
-
fill: "currentColor"
|
|
1239
|
-
})]
|
|
1240
|
-
}));
|
|
601
|
+
var Options = function Options(_ref) {
|
|
602
|
+
var options = _ref.options,
|
|
603
|
+
selectedOption = _ref.selectedOption,
|
|
604
|
+
setSelectedOption = _ref.setSelectedOption;
|
|
605
|
+
return /*#__PURE__*/jsxRuntime.jsx(Radio, {
|
|
606
|
+
stacked: true,
|
|
607
|
+
containerClassName: "w-full flex flex-col gap-y-4",
|
|
608
|
+
name: "options",
|
|
609
|
+
children: Object.entries(options).map(function (_ref2) {
|
|
610
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
611
|
+
key = _ref3[0],
|
|
612
|
+
_ref3$ = _ref3[1],
|
|
613
|
+
label = _ref3$.label,
|
|
614
|
+
description = _ref3$.description;
|
|
615
|
+
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
616
|
+
className: "neeto-ui-border-gray-300 neeto-ui-bg-white neeto-ui-rounded-lg w-full cursor-pointer border p-4",
|
|
617
|
+
"data-cy": "".concat(key, "-embed-option-label"),
|
|
618
|
+
"data-testid": "".concat(key, "-embed-option-label"),
|
|
619
|
+
htmlFor: key,
|
|
620
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
621
|
+
className: "flex items-center",
|
|
622
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Radio.Item, {
|
|
623
|
+
label: label,
|
|
624
|
+
checked: key === selectedOption,
|
|
625
|
+
className: "mb-0",
|
|
626
|
+
"data-cy": "".concat(key, "-embed-radio-button"),
|
|
627
|
+
"data-testid": "".concat(key, "-embed-radio-button"),
|
|
628
|
+
id: key,
|
|
629
|
+
name: "options",
|
|
630
|
+
value: key,
|
|
631
|
+
onChange: function onChange(event) {
|
|
632
|
+
return setSelectedOption(event.target.value);
|
|
633
|
+
}
|
|
634
|
+
})
|
|
635
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
636
|
+
className: "w-full pl-6 pt-1",
|
|
637
|
+
"data-cy": "".concat(key, "-embed-option-description"),
|
|
638
|
+
style: "body2",
|
|
639
|
+
children: description
|
|
640
|
+
})]
|
|
641
|
+
}, key);
|
|
642
|
+
})
|
|
643
|
+
});
|
|
1241
644
|
};
|
|
1242
645
|
|
|
1243
646
|
var ElementPopup = function ElementPopup(_ref) {
|
|
@@ -1253,17 +656,14 @@ var ElementPopup = function ElementPopup(_ref) {
|
|
|
1253
656
|
(_window$globalProps$a = window[globalProps.appName.replace(/^neeto/i, "neeto")]) === null || _window$globalProps$a === void 0 || _window$globalProps$a.embed(element, iframeURL);
|
|
1254
657
|
}
|
|
1255
658
|
}, []);
|
|
1256
|
-
return /*#__PURE__*/jsxRuntime.
|
|
1257
|
-
className: "relative h-full w-full
|
|
1258
|
-
children:
|
|
1259
|
-
className: "neeto-ui-text-gray-100 absolute inset-0 h-auto w-full p-10"
|
|
1260
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1261
|
-
className: "absolute left-[48.5294117647%] top-[39.0804597701%]",
|
|
659
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
660
|
+
className: "relative flex h-full w-full items-center justify-center p-6",
|
|
661
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1262
662
|
"data-cy": "preview-element-popup-button",
|
|
1263
663
|
"data-testid": "preview-element-popup-button",
|
|
1264
664
|
id: elementSelector,
|
|
1265
|
-
label: t("neetoMolecules.productEmbed.elementPopup.label")
|
|
1266
|
-
})
|
|
665
|
+
label: t("neetoMolecules.productEmbed.customization.elementPopup.label")
|
|
666
|
+
})
|
|
1267
667
|
});
|
|
1268
668
|
};
|
|
1269
669
|
|
|
@@ -1286,11 +686,9 @@ var FloatingPopup = function FloatingPopup(_ref) {
|
|
|
1286
686
|
btn.style.backgroundColor = btnColor;
|
|
1287
687
|
btn.style.color = btnTextColor;
|
|
1288
688
|
}, [btnColor, btnTextColor]);
|
|
1289
|
-
return /*#__PURE__*/jsxRuntime.
|
|
1290
|
-
className: "relative h-full w-full
|
|
1291
|
-
children:
|
|
1292
|
-
className: "neeto-ui-text-gray-100 h-auto w-full p-10"
|
|
1293
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
689
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
690
|
+
className: "relative h-full w-full",
|
|
691
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1294
692
|
"data-cy": "popup-preview-button",
|
|
1295
693
|
icon: icon && showIcon ? icon : null,
|
|
1296
694
|
iconPosition: "left",
|
|
@@ -1300,7 +698,7 @@ var FloatingPopup = function FloatingPopup(_ref) {
|
|
|
1300
698
|
"left-0": btnPosition === "bottomLeft",
|
|
1301
699
|
"right-0": btnPosition === "bottomRight"
|
|
1302
700
|
})
|
|
1303
|
-
})
|
|
701
|
+
})
|
|
1304
702
|
});
|
|
1305
703
|
};
|
|
1306
704
|
|
|
@@ -1319,14 +717,14 @@ var Inline = function Inline(_ref) {
|
|
|
1319
717
|
|
|
1320
718
|
var Preview = function Preview(_ref) {
|
|
1321
719
|
var isScriptLoading = _ref.isScriptLoading,
|
|
1322
|
-
|
|
720
|
+
selectedOption = _ref.selectedOption,
|
|
1323
721
|
id = _ref.id,
|
|
1324
722
|
customization = _ref.customization,
|
|
1325
723
|
_ref$customPreviewIfr = _ref.customPreviewIframeUrl,
|
|
1326
724
|
customPreviewIframeUrl = _ref$customPreviewIfr === void 0 ? "" : _ref$customPreviewIfr;
|
|
1327
725
|
var preview = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, Inline), EMBED_OPTIONS.FLOATING_POPUP, FloatingPopup), EMBED_OPTIONS.ELEMENT_POPUP, ElementPopup);
|
|
1328
726
|
var iframeURL = customPreviewIframeUrl || "".concat(location.origin, "/embed/").concat(id);
|
|
1329
|
-
var Component = preview[
|
|
727
|
+
var Component = preview[selectedOption];
|
|
1330
728
|
if (isScriptLoading) {
|
|
1331
729
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1332
730
|
className: "flex min-h-0 flex-grow items-center justify-center overflow-y-auto",
|
|
@@ -1343,40 +741,68 @@ var Preview = function Preview(_ref) {
|
|
|
1343
741
|
});
|
|
1344
742
|
};
|
|
1345
743
|
|
|
1346
|
-
var css = ".neeto-molecules-product-embed-size-input.neeto-ui-input__wrapper .neeto-ui-input__prefix{align-self:stretch;background-color:rgb(var(--neeto-ui-gray-200));margin-left:0!important;padding-left:.75rem;padding-right:.75rem}.neeto-molecules-product-embed-tab{gap:.5rem}.neeto-molecules-product-embed-tab .neeto-ui-tab{border-radius:var(--neeto-ui-btn-border-radius);color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-product-embed-tab .neeto-ui-tab:not(.active):hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-product-embed-tab .neeto-ui-tab.active{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-embed__left-sidebar{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto;width:100%}@media (min-width:768px){.neeto-molecules-embed__left-sidebar{border-right:1px solid rgb(var(--neeto-ui-gray-200));max-width:25rem}}@media (min-width:1024px){.neeto-molecules-embed__left-sidebar{max-width:
|
|
744
|
+
var css = ".neeto-molecules-product-embed-size-input.neeto-ui-input__wrapper .neeto-ui-input__prefix{align-self:stretch;background-color:rgb(var(--neeto-ui-gray-200));margin-left:0!important;padding-left:.75rem;padding-right:.75rem}.neeto-molecules-product-embed-tab{gap:.5rem}.neeto-molecules-product-embed-tab .neeto-ui-tab{border-radius:var(--neeto-ui-btn-border-radius);color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-product-embed-tab .neeto-ui-tab:not(.active):hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-product-embed-tab .neeto-ui-tab.active{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-embed__left-sidebar{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto;padding:1.5rem;width:100%}@media (min-width:768px){.neeto-molecules-embed__left-sidebar{border-right:1px solid rgb(var(--neeto-ui-gray-200));max-width:25rem}}@media (min-width:1024px){.neeto-molecules-embed__left-sidebar{max-width:27.5rem}}.neeto-molecules-embed__code-block .neeto-molecules-code-block{font-size:.875rem;height:15.625rem;margin-top:0!important}.neeto-molecules-embed__browser-preview{height:100%;min-height:18.75rem}.neeto-molecules-embed__browser-preview .neeto-molecules-browser-preview__body{position:relative}.neeto-molecules-embed__browser-preview .neeto-molecules-browser-preview__body iframe{height:100%;left:0;position:absolute;top:0;width:100%}";
|
|
1347
745
|
injectCss.n(css,{});
|
|
1348
746
|
|
|
1349
747
|
function ownKeys(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; }
|
|
1350
748
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1351
|
-
var
|
|
1352
|
-
var className = _ref.className,
|
|
1353
|
-
|
|
1354
|
-
|
|
749
|
+
var ProductEmbed = function ProductEmbed(_ref) {
|
|
750
|
+
var _ref$className = _ref.className,
|
|
751
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
752
|
+
_ref$customEmbedScrip = _ref.customEmbedScriptPath,
|
|
753
|
+
customEmbedScriptPath = _ref$customEmbedScrip === void 0 ? "" : _ref$customEmbedScrip,
|
|
754
|
+
_ref$customPreviewIfr = _ref.customPreviewIframeUrl,
|
|
755
|
+
customPreviewIframeUrl = _ref$customPreviewIfr === void 0 ? "" : _ref$customPreviewIfr,
|
|
756
|
+
_ref$goBackLink = _ref.goBackLink,
|
|
757
|
+
goBackLink = _ref$goBackLink === void 0 ? "" : _ref$goBackLink,
|
|
1355
758
|
id = _ref.id,
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
759
|
+
_ref$isQueryParamsEna = _ref.isQueryParamsEnabled,
|
|
760
|
+
isQueryParamsEnabled = _ref$isQueryParamsEna === void 0 ? false : _ref$isQueryParamsEna,
|
|
761
|
+
_ref$options = _ref.options,
|
|
762
|
+
options = _ref$options === void 0 ? {} : _ref$options,
|
|
763
|
+
_ref$extraArgs = _ref.extraArgs,
|
|
764
|
+
extraArgs = _ref$extraArgs === void 0 ? {} : _ref$extraArgs,
|
|
765
|
+
_ref$otherCustomizati = _ref.otherCustomizations,
|
|
766
|
+
otherCustomizations = _ref$otherCustomizati === void 0 ? neetoCist.noop : _ref$otherCustomizati,
|
|
767
|
+
_ref$inlineWrapperSty = _ref.inlineWrapperStyle,
|
|
768
|
+
inlineWrapperStyle = _ref$inlineWrapperSty === void 0 ? "" : _ref$inlineWrapperSty,
|
|
769
|
+
_ref$supportedLanguag = _ref.supportedLanguages,
|
|
770
|
+
supportedLanguages = _ref$supportedLanguag === void 0 ? ["html"] : _ref$supportedLanguag;
|
|
771
|
+
var supportedLanguagesTabs = neetoCist.filterBy({
|
|
772
|
+
key: function key(_key) {
|
|
773
|
+
return supportedLanguages === null || supportedLanguages === void 0 ? void 0 : supportedLanguages.includes(_key);
|
|
774
|
+
}
|
|
775
|
+
}, TABS);
|
|
1366
776
|
var _useState = React.useState(true),
|
|
1367
777
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1368
778
|
isScriptLoading = _useState2[0],
|
|
1369
779
|
setIsScriptLoading = _useState2[1];
|
|
1370
|
-
var _useState3 = React.useState(
|
|
780
|
+
var _useState3 = React.useState(supportedLanguagesTabs[0].key),
|
|
781
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
782
|
+
tab = _useState4[0],
|
|
783
|
+
setTab = _useState4[1];
|
|
784
|
+
var _useState5 = React.useState(EMBED_OPTIONS.INLINE),
|
|
785
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
786
|
+
selectedOption = _useState6[0],
|
|
787
|
+
setSelectedOption = _useState6[1];
|
|
788
|
+
var _useState7 = React.useState(function () {
|
|
1371
789
|
return buildDefaultCustomization(options);
|
|
1372
790
|
}),
|
|
1373
|
-
|
|
1374
|
-
customizations =
|
|
1375
|
-
setCustomizations =
|
|
1376
|
-
var
|
|
1377
|
-
|
|
1378
|
-
var CustomizationComponent = EMBED_CUSTOMIZATION_COMPONENTS[selectedEmbed];
|
|
791
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
792
|
+
customizations = _useState8[0],
|
|
793
|
+
setCustomizations = _useState8[1];
|
|
794
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
795
|
+
t = _useTranslation.t;
|
|
1379
796
|
var embedScriptLink = customEmbedScriptPath || "".concat(window.location.protocol, "//").concat(window.location.host, "/javascript/embed.js");
|
|
797
|
+
var code = generateCode({
|
|
798
|
+
id: id,
|
|
799
|
+
tab: tab,
|
|
800
|
+
type: selectedOption,
|
|
801
|
+
customization: customizations[selectedOption],
|
|
802
|
+
embedScriptLink: embedScriptLink,
|
|
803
|
+
extraArgs: extraArgs,
|
|
804
|
+
inlineWrapperStyle: inlineWrapperStyle
|
|
805
|
+
});
|
|
1380
806
|
var loadScript = function loadScript() {
|
|
1381
807
|
var script = document.createElement("script");
|
|
1382
808
|
script.id = SCRIPT_ID;
|
|
@@ -1386,184 +812,75 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
|
|
|
1386
812
|
};
|
|
1387
813
|
var updateCustomization = function updateCustomization(props) {
|
|
1388
814
|
return setCustomizations(function (prevState) {
|
|
1389
|
-
return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({},
|
|
815
|
+
return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, selectedOption, ramda.mergeLeft(props, prevState[selectedOption])));
|
|
1390
816
|
});
|
|
1391
817
|
};
|
|
1392
818
|
React.useEffect(function () {
|
|
1393
819
|
var isScriptLoaded = document.getElementById(SCRIPT_ID);
|
|
1394
820
|
if (isScriptLoaded) setIsScriptLoading(false);else loadScript();
|
|
1395
821
|
}, []);
|
|
1396
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
822
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1397
823
|
"data-testid": "embed-product",
|
|
1398
|
-
className: classnames("neeto-molecules-embed flex w-full flex-grow flex-col
|
|
824
|
+
className: classnames("neeto-molecules-embed flex w-full flex-grow flex-col md:flex-row", className),
|
|
1399
825
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1400
|
-
className: "neeto-molecules-embed__left-sidebar
|
|
1401
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
826
|
+
className: "neeto-molecules-embed__left-sidebar",
|
|
827
|
+
children: [goBackLink && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1402
828
|
className: "mb-4",
|
|
1403
|
-
"data-cy": "back-
|
|
1404
|
-
"data-testid": "back-
|
|
829
|
+
"data-cy": "back-button",
|
|
830
|
+
"data-testid": "back-button",
|
|
1405
831
|
icon: LeftArrow,
|
|
1406
832
|
iconPosition: "left",
|
|
1407
|
-
label: t("neetoMolecules.productEmbed.
|
|
833
|
+
label: t("neetoMolecules.productEmbed.backToShare"),
|
|
1408
834
|
size: "small",
|
|
1409
835
|
style: "link",
|
|
1410
|
-
to:
|
|
1411
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
}),
|
|
1416
|
-
className: "mt-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
id: id,
|
|
1429
|
-
inlineWrapperStyle: inlineWrapperStyle,
|
|
1430
|
-
selectedEmbed: selectedEmbed,
|
|
1431
|
-
supportedLanguages: supportedLanguages
|
|
1432
|
-
}), /*#__PURE__*/jsxRuntime.jsx(CustomizationComponent, {
|
|
1433
|
-
customization: customization,
|
|
1434
|
-
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
1435
|
-
otherCustomizations: otherCustomizations,
|
|
1436
|
-
updateCustomization: updateCustomization
|
|
1437
|
-
})]
|
|
1438
|
-
})
|
|
836
|
+
to: goBackLink
|
|
837
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
838
|
+
"data-cy": "embed-options-header-title",
|
|
839
|
+
style: "h3",
|
|
840
|
+
children: t("neetoMolecules.productEmbed.embedOptions.title")
|
|
841
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
842
|
+
className: "mt-6 flex w-full flex-col gap-y-6 md:pb-20",
|
|
843
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Options, {
|
|
844
|
+
options: options,
|
|
845
|
+
selectedOption: selectedOption,
|
|
846
|
+
setSelectedOption: setSelectedOption
|
|
847
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Customization, {
|
|
848
|
+
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
849
|
+
otherCustomizations: otherCustomizations,
|
|
850
|
+
updateCustomization: updateCustomization,
|
|
851
|
+
customization: customizations[selectedOption],
|
|
852
|
+
option: selectedOption
|
|
853
|
+
})]
|
|
1439
854
|
})]
|
|
1440
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1441
|
-
className: "neeto-molecules-embed__preview neeto-ui-bg-gray-50 flex min-h-screen w-full min-w-0 flex-col gap-3 overflow-y-auto p-6 md:h-full md:min-h-0 md:flex-grow",
|
|
1442
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Preview, {
|
|
1443
|
-
customPreviewIframeUrl: customPreviewIframeUrl,
|
|
1444
|
-
customization: customization,
|
|
1445
|
-
id: id,
|
|
1446
|
-
isScriptLoading: isScriptLoading,
|
|
1447
|
-
selectedEmbed: selectedEmbed
|
|
1448
|
-
})
|
|
1449
|
-
})]
|
|
1450
|
-
});
|
|
1451
|
-
};
|
|
1452
|
-
|
|
1453
|
-
var EmbedSelector = function EmbedSelector(_ref) {
|
|
1454
|
-
var options = _ref.options,
|
|
1455
|
-
goBackLink = _ref.goBackLink,
|
|
1456
|
-
title = _ref.title;
|
|
1457
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1458
|
-
t = _useTranslation.t;
|
|
1459
|
-
var history = reactRouterDom.useHistory();
|
|
1460
|
-
var location = reactRouterDom.useLocation();
|
|
1461
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
1462
|
-
className: "neeto-molecules-embed-landing-page py-8",
|
|
1463
|
-
children: [goBackLink && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1464
|
-
className: "mb-4",
|
|
1465
|
-
"data-cy": "back-button",
|
|
1466
|
-
"data-testid": "back-button",
|
|
1467
|
-
icon: LeftArrow,
|
|
1468
|
-
iconPosition: "left",
|
|
1469
|
-
label: t("neetoMolecules.productEmbed.backToShare"),
|
|
1470
|
-
size: "small",
|
|
1471
|
-
style: "link",
|
|
1472
|
-
to: goBackLink
|
|
1473
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
1474
|
-
className: "py-0",
|
|
1475
|
-
"data-testid": "embed-selector-header",
|
|
1476
|
-
title: t("neetoMolecules.productEmbed.title")
|
|
1477
855
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1478
|
-
className: "neeto-molecules-
|
|
1479
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1503
|
-
className: "neeto-molecules-embed-landing-page__card-icon mb-6 block",
|
|
1504
|
-
children: /*#__PURE__*/jsxRuntime.jsx(EmbedIcon, {
|
|
1505
|
-
className: "neeto-ui-text-gray-200 h-auto w-full max-w-72"
|
|
1506
|
-
})
|
|
1507
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1508
|
-
className: "mb-2",
|
|
1509
|
-
style: "h4",
|
|
1510
|
-
children: label
|
|
1511
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1512
|
-
style: "body2",
|
|
1513
|
-
children: description
|
|
1514
|
-
})]
|
|
1515
|
-
}, key);
|
|
1516
|
-
})
|
|
856
|
+
className: "neeto-molecules-embed__preview neeto-ui-bg-white flex min-h-screen w-full min-w-0 flex-col gap-3 overflow-y-auto p-6 md:min-h-0 md:flex-grow",
|
|
857
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
858
|
+
setTab: setTab,
|
|
859
|
+
supportedLanguagesTabs: supportedLanguagesTabs,
|
|
860
|
+
tab: tab
|
|
861
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
862
|
+
className: "flex min-h-0 flex-grow flex-col gap-3",
|
|
863
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
864
|
+
className: "flex-shrink-0",
|
|
865
|
+
"data-testid": "embed-code-block",
|
|
866
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Code, {
|
|
867
|
+
code: code,
|
|
868
|
+
tab: tab
|
|
869
|
+
})
|
|
870
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
871
|
+
className: "flex-grow",
|
|
872
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Preview, {
|
|
873
|
+
customPreviewIframeUrl: customPreviewIframeUrl,
|
|
874
|
+
id: id,
|
|
875
|
+
isScriptLoading: isScriptLoading,
|
|
876
|
+
selectedOption: selectedOption,
|
|
877
|
+
customization: customizations[selectedOption]
|
|
878
|
+
})
|
|
879
|
+
})]
|
|
1517
880
|
})]
|
|
1518
881
|
})]
|
|
1519
882
|
});
|
|
1520
883
|
};
|
|
1521
884
|
|
|
1522
|
-
var ProductEmbed = function ProductEmbed(_ref) {
|
|
1523
|
-
var title = _ref.title,
|
|
1524
|
-
_ref$className = _ref.className,
|
|
1525
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
1526
|
-
_ref$customEmbedScrip = _ref.customEmbedScriptPath,
|
|
1527
|
-
customEmbedScriptPath = _ref$customEmbedScrip === void 0 ? "" : _ref$customEmbedScrip,
|
|
1528
|
-
_ref$customPreviewIfr = _ref.customPreviewIframeUrl,
|
|
1529
|
-
customPreviewIframeUrl = _ref$customPreviewIfr === void 0 ? "" : _ref$customPreviewIfr,
|
|
1530
|
-
_ref$goBackLink = _ref.goBackLink,
|
|
1531
|
-
goBackLink = _ref$goBackLink === void 0 ? "" : _ref$goBackLink,
|
|
1532
|
-
id = _ref.id,
|
|
1533
|
-
_ref$isQueryParamsEna = _ref.isQueryParamsEnabled,
|
|
1534
|
-
isQueryParamsEnabled = _ref$isQueryParamsEna === void 0 ? false : _ref$isQueryParamsEna,
|
|
1535
|
-
_ref$options = _ref.options,
|
|
1536
|
-
options = _ref$options === void 0 ? {} : _ref$options,
|
|
1537
|
-
_ref$extraArgs = _ref.extraArgs,
|
|
1538
|
-
extraArgs = _ref$extraArgs === void 0 ? {} : _ref$extraArgs,
|
|
1539
|
-
_ref$otherCustomizati = _ref.otherCustomizations,
|
|
1540
|
-
otherCustomizations = _ref$otherCustomizati === void 0 ? neetoCist.noop : _ref$otherCustomizati,
|
|
1541
|
-
_ref$inlineWrapperSty = _ref.inlineWrapperStyle,
|
|
1542
|
-
inlineWrapperStyle = _ref$inlineWrapperSty === void 0 ? "" : _ref$inlineWrapperSty,
|
|
1543
|
-
_ref$supportedLanguag = _ref.supportedLanguages,
|
|
1544
|
-
supportedLanguages = _ref$supportedLanguag === void 0 ? ["html"] : _ref$supportedLanguag;
|
|
1545
|
-
var _useLocation = reactRouterDom.useLocation(),
|
|
1546
|
-
search = _useLocation.search;
|
|
1547
|
-
var queryParams = new URLSearchParams(search);
|
|
1548
|
-
var selectedEmbed = toCamelCasedString(queryParams.get("type"));
|
|
1549
|
-
return selectedEmbed ? /*#__PURE__*/jsxRuntime.jsx(EmbedRenderer, {
|
|
1550
|
-
className: className,
|
|
1551
|
-
customEmbedScriptPath: customEmbedScriptPath,
|
|
1552
|
-
customPreviewIframeUrl: customPreviewIframeUrl,
|
|
1553
|
-
extraArgs: extraArgs,
|
|
1554
|
-
id: id,
|
|
1555
|
-
inlineWrapperStyle: inlineWrapperStyle,
|
|
1556
|
-
isQueryParamsEnabled: isQueryParamsEnabled,
|
|
1557
|
-
options: options,
|
|
1558
|
-
otherCustomizations: otherCustomizations,
|
|
1559
|
-
selectedEmbed: selectedEmbed,
|
|
1560
|
-
supportedLanguages: supportedLanguages
|
|
1561
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(EmbedSelector, {
|
|
1562
|
-
goBackLink: goBackLink,
|
|
1563
|
-
options: options,
|
|
1564
|
-
title: title
|
|
1565
|
-
});
|
|
1566
|
-
};
|
|
1567
|
-
|
|
1568
885
|
module.exports = ProductEmbed;
|
|
1569
886
|
//# sourceMappingURL=ProductEmbed.js.map
|