@bigbinary/neeto-molecules 3.16.8 → 3.16.9
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 +3 -2
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/IpRestriction.js +1 -0
- package/dist/IpRestriction.js.map +1 -1
- package/dist/NeetoWidget.js +1 -1
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/ProductEmbed.js +985 -302
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/ShareViaLink.js +450 -189
- 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 +3 -2
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/IpRestriction.js +1 -0
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +1 -1
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +984 -301
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +448 -187
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +48 -40
- package/types/ProductEmbed.d.ts +1 -0
- package/types/ShareViaLink.d.ts +28 -28
package/dist/cjs/ProductEmbed.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
|
+
var reactRouterDom = require('react-router-dom');
|
|
3
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
6
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
7
|
var React = require('react');
|
|
6
8
|
var classnames = require('classnames');
|
|
7
|
-
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
9
|
var LeftArrow = require('@bigbinary/neeto-icons/LeftArrow');
|
|
9
10
|
var Button = require('@bigbinary/neetoui/Button');
|
|
10
11
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
11
12
|
var ramda = require('ramda');
|
|
12
13
|
var reactI18next = require('react-i18next');
|
|
14
|
+
var Container = require('./Container.js');
|
|
15
|
+
var Header = require('./Header.js');
|
|
16
|
+
var Select = require('@bigbinary/neetoui/Select');
|
|
13
17
|
var Codeblock = require('./Codeblock.js');
|
|
14
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
15
18
|
var i18next = require('i18next');
|
|
16
|
-
var Code$1 = require('@bigbinary/neeto-icons/Code');
|
|
17
19
|
var Input = require('@bigbinary/neetoui/Input');
|
|
18
20
|
var Callout = require('@bigbinary/neetoui/Callout');
|
|
19
21
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
@@ -21,73 +23,43 @@ var Delete = require('@bigbinary/neeto-icons/Delete');
|
|
|
21
23
|
var Plus = require('@bigbinary/neeto-icons/Plus');
|
|
22
24
|
var Label = require('@bigbinary/neetoui/Label');
|
|
23
25
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
26
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
24
27
|
var Checkbox = require('@bigbinary/neetoui/Checkbox');
|
|
25
|
-
var Select = require('@bigbinary/neetoui/Select');
|
|
26
28
|
var ColorPicker = require('@bigbinary/neetoui/ColorPicker');
|
|
27
|
-
var
|
|
28
|
-
var Radio = require('@bigbinary/neetoui/Radio');
|
|
29
|
+
var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
|
|
29
30
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
30
31
|
var BrowserPreview = require('./BrowserPreview.js');
|
|
31
32
|
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');
|
|
32
52
|
require('react-syntax-highlighter/dist/esm/prism-light.js');
|
|
33
53
|
require('react-syntax-highlighter/dist/esm/styles/prism');
|
|
34
54
|
require('./CopyToClipboardButton.js');
|
|
35
|
-
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
36
55
|
require('@bigbinary/neeto-icons/Copy');
|
|
37
56
|
require('@bigbinary/neeto-icons/Check');
|
|
38
57
|
|
|
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
|
-
|
|
86
58
|
var FLOATING_BUTTON_POSITIONS = [{
|
|
87
|
-
label: i18next.t("neetoMolecules.productEmbed.
|
|
59
|
+
label: i18next.t("neetoMolecules.productEmbed.floatingPopup.position.bottomLeft"),
|
|
88
60
|
value: "bottomLeft"
|
|
89
61
|
}, {
|
|
90
|
-
label: i18next.t("neetoMolecules.productEmbed.
|
|
62
|
+
label: i18next.t("neetoMolecules.productEmbed.floatingPopup.position.bottomRight"),
|
|
91
63
|
value: "bottomRight"
|
|
92
64
|
}];
|
|
93
65
|
var INITIAL_QUERY_PARAM = {
|
|
@@ -231,13 +203,13 @@ var reactCodeGenerators = {
|
|
|
231
203
|
elementPopup: elementPopupEmbedCode
|
|
232
204
|
};
|
|
233
205
|
|
|
234
|
-
var _excluded = ["
|
|
206
|
+
var _excluded = ["selectedLanguage", "type"];
|
|
235
207
|
var generateCode = function generateCode(options) {
|
|
236
208
|
var _reactCodeGenerators$, _htmlCodeGenerators$t;
|
|
237
|
-
var
|
|
209
|
+
var selectedLanguage = options.selectedLanguage,
|
|
238
210
|
type = options.type,
|
|
239
211
|
embeddedCodeOptions = _objectWithoutProperties(options, _excluded);
|
|
240
|
-
return
|
|
212
|
+
return selectedLanguage === "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);
|
|
241
213
|
};
|
|
242
214
|
var buildDefaultCustomization = function buildDefaultCustomization(defaultCustomizations) {
|
|
243
215
|
return ramda.mergeDeepLeft(defaultCustomizations, DEFAULT_CUSTOMIZATION);
|
|
@@ -258,9 +230,14 @@ var buildQueryParamsFromInputFields = function buildQueryParamsFromInputFields(i
|
|
|
258
230
|
var queryParamJsonString = JSON.stringify(queryParams, null, 2);
|
|
259
231
|
return queryParamJsonString.replace(/\n/g, " ").replace(/\s\s+/g, " ");
|
|
260
232
|
};
|
|
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
|
+
};
|
|
261
238
|
|
|
262
|
-
function ownKeys$
|
|
263
|
-
function _objectSpread$
|
|
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
|
+
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; }
|
|
264
241
|
var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
265
242
|
var updateCustomization = _ref.updateCustomization;
|
|
266
243
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -280,7 +257,7 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
280
257
|
};
|
|
281
258
|
var handleInputChange = function handleInputChange(index, field, value) {
|
|
282
259
|
var newQueryParams = queryParams.map(function (param, i) {
|
|
283
|
-
return i === index ? _objectSpread$
|
|
260
|
+
return i === index ? _objectSpread$3(_objectSpread$3({}, param), {}, _defineProperty({}, field, value)) : param;
|
|
284
261
|
});
|
|
285
262
|
setQueryParams(newQueryParams);
|
|
286
263
|
};
|
|
@@ -293,16 +270,16 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
293
270
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
294
271
|
className: "mb-2",
|
|
295
272
|
"data-cy": "dynamic-query-params-label",
|
|
296
|
-
children: t("neetoMolecules.productEmbed.
|
|
273
|
+
children: t("neetoMolecules.productEmbed.queryParam.label")
|
|
297
274
|
}), queryParams.map(function (param, index) {
|
|
298
275
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
299
|
-
className: "mb-
|
|
276
|
+
className: "mb-2 flex gap-1",
|
|
300
277
|
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
301
278
|
"data-cy": "dynamic-query-key-name-input",
|
|
302
279
|
"data-testid": "dynamic-query-key-name-input",
|
|
303
280
|
name: "queryParams.".concat(index, ".name"),
|
|
304
281
|
value: param.name,
|
|
305
|
-
placeholder: t("neetoMolecules.productEmbed.
|
|
282
|
+
placeholder: t("neetoMolecules.productEmbed.queryParam.keyNamePlaceholder"),
|
|
306
283
|
onChange: function onChange(e) {
|
|
307
284
|
return handleInputChange(index, "name", e.target.value);
|
|
308
285
|
}
|
|
@@ -311,7 +288,7 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
311
288
|
"data-testid": "dynamic-query-key-value-input",
|
|
312
289
|
name: "queryParams.".concat(index, ".value"),
|
|
313
290
|
value: param.value,
|
|
314
|
-
placeholder: t("neetoMolecules.productEmbed.
|
|
291
|
+
placeholder: t("neetoMolecules.productEmbed.queryParam.keyValuePlaceholder"),
|
|
315
292
|
onChange: function onChange(e) {
|
|
316
293
|
return handleInputChange(index, "value", e.target.value);
|
|
317
294
|
}
|
|
@@ -329,8 +306,8 @@ var DynamicQueryParams = function DynamicQueryParams(_ref) {
|
|
|
329
306
|
"data-cy": "dynamic-query-add-new-button",
|
|
330
307
|
icon: Plus,
|
|
331
308
|
iconPosition: "left",
|
|
309
|
+
label: t("neetoMolecules.productEmbed.queryParam.addQueryParam"),
|
|
332
310
|
style: "link",
|
|
333
|
-
label: t("neetoMolecules.productEmbed.customization.queryParam.addQueryParam"),
|
|
334
311
|
onClick: handleAddQueryParam
|
|
335
312
|
})]
|
|
336
313
|
});
|
|
@@ -350,22 +327,17 @@ var ElementPopup$1 = function ElementPopup(_ref) {
|
|
|
350
327
|
queryParams: undefined
|
|
351
328
|
});
|
|
352
329
|
}, []);
|
|
353
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
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")
|
|
330
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
331
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Callout, {
|
|
332
|
+
"data-cy": "element-popup-callout",
|
|
333
|
+
children: t("neetoMolecules.productEmbed.elementPopup.callout")
|
|
362
334
|
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
363
335
|
className: "w-full",
|
|
364
336
|
"data-cy": "element-id-input-field",
|
|
365
337
|
"data-testid": "element-id-input-field",
|
|
338
|
+
label: t("neetoMolecules.productEmbed.elementPopup.elementId"),
|
|
366
339
|
value: elementSelector,
|
|
367
|
-
error: !elementSelector && t("neetoMolecules.productEmbed.
|
|
368
|
-
label: t("neetoMolecules.productEmbed.customization.elementPopup.elementId"),
|
|
340
|
+
error: !elementSelector && t("neetoMolecules.productEmbed.elementPopup.warning"),
|
|
369
341
|
onChange: function onChange(e) {
|
|
370
342
|
return updateCustomization({
|
|
371
343
|
elementSelector: e.target.value
|
|
@@ -397,28 +369,14 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
397
369
|
});
|
|
398
370
|
}, []);
|
|
399
371
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
400
|
-
className: "
|
|
401
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
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", {
|
|
372
|
+
className: "flex w-full flex-col gap-y-4",
|
|
373
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
416
374
|
className: "space-y-2",
|
|
417
375
|
children: /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
418
376
|
"data-cy": "button-text-input-field",
|
|
419
377
|
"data-testid": "button-text-input-field",
|
|
378
|
+
label: t("neetoMolecules.productEmbed.floatingPopup.button.text"),
|
|
420
379
|
value: btnText,
|
|
421
|
-
label: t("neetoMolecules.productEmbed.customization.floatingPopup.button.text"),
|
|
422
380
|
onChange: function onChange(e) {
|
|
423
381
|
return updateCustomization({
|
|
424
382
|
btnText: e.target.value
|
|
@@ -430,12 +388,12 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
430
388
|
children: /*#__PURE__*/jsxRuntime.jsx(Select, {
|
|
431
389
|
"data-cy": "button-position-select-field",
|
|
432
390
|
"data-testid": "button-position-select-field",
|
|
391
|
+
label: t("neetoMolecules.productEmbed.floatingPopup.button.pos"),
|
|
433
392
|
options: FLOATING_BUTTON_POSITIONS,
|
|
434
393
|
value: btnPosition,
|
|
435
394
|
getOptionValue: function getOptionValue(option) {
|
|
436
395
|
return typeof option === "string" ? option : option.value;
|
|
437
396
|
},
|
|
438
|
-
label: t("neetoMolecules.productEmbed.customization.floatingPopup.button.pos"),
|
|
439
397
|
onChange: function onChange(e) {
|
|
440
398
|
return updateCustomization({
|
|
441
399
|
btnPosition: e.value
|
|
@@ -443,12 +401,13 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
443
401
|
}
|
|
444
402
|
})
|
|
445
403
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
446
|
-
className: "flex items-center justify-between gap-
|
|
404
|
+
className: "flex items-center justify-between gap-2",
|
|
447
405
|
"data-cy": "button-color-label",
|
|
448
406
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
449
|
-
children: t("neetoMolecules.productEmbed.
|
|
407
|
+
children: t("neetoMolecules.productEmbed.floatingPopup.button.color")
|
|
450
408
|
}), /*#__PURE__*/jsxRuntime.jsx(ColorPicker, {
|
|
451
409
|
color: btnColor,
|
|
410
|
+
size: "medium",
|
|
452
411
|
onChange: function onChange(e) {
|
|
453
412
|
return updateCustomization({
|
|
454
413
|
btnColor: e.hex
|
|
@@ -456,18 +415,29 @@ var FloatingPopup$1 = function FloatingPopup(_ref) {
|
|
|
456
415
|
}
|
|
457
416
|
})]
|
|
458
417
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
459
|
-
className: "flex items-center justify-between gap-
|
|
418
|
+
className: "flex items-center justify-between gap-2",
|
|
460
419
|
"data-cy": "button-text-color-label",
|
|
461
420
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
462
|
-
children: t("neetoMolecules.productEmbed.
|
|
421
|
+
children: t("neetoMolecules.productEmbed.floatingPopup.button.textColor")
|
|
463
422
|
}), /*#__PURE__*/jsxRuntime.jsx(ColorPicker, {
|
|
464
423
|
color: btnTextColor,
|
|
424
|
+
size: "medium",
|
|
465
425
|
onChange: function onChange(e) {
|
|
466
426
|
return updateCustomization({
|
|
467
427
|
btnTextColor: e.hex
|
|
468
428
|
});
|
|
469
429
|
}
|
|
470
430
|
})]
|
|
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
|
+
}
|
|
471
441
|
}), otherCustomizations(), isQueryParamsEnabled && /*#__PURE__*/jsxRuntime.jsx(DynamicQueryParams, {
|
|
472
442
|
updateCustomization: updateCustomization
|
|
473
443
|
})]
|
|
@@ -494,17 +464,12 @@ var Inline$1 = function Inline(_ref) {
|
|
|
494
464
|
queryParams: undefined
|
|
495
465
|
});
|
|
496
466
|
}, []);
|
|
497
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
498
|
-
|
|
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", {
|
|
467
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
468
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
504
469
|
className: "flex flex-col gap-2",
|
|
505
470
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
506
471
|
"data-cy": "window-size-text",
|
|
507
|
-
children: t("neetoMolecules.productEmbed.
|
|
472
|
+
children: t("neetoMolecules.productEmbed.inline.sizeOfEmbedWindow")
|
|
508
473
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
509
474
|
className: "flex justify-between gap-x-2",
|
|
510
475
|
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
@@ -539,7 +504,7 @@ var Inline$1 = function Inline(_ref) {
|
|
|
539
504
|
className: "flex flex-col gap-2",
|
|
540
505
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
541
506
|
"data-cy": "inline-element-id-input-label",
|
|
542
|
-
children: t("neetoMolecules.productEmbed.
|
|
507
|
+
children: t("neetoMolecules.productEmbed.inline.elementId")
|
|
543
508
|
}), /*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
544
509
|
"data-cy": "inline-element-id-input-field",
|
|
545
510
|
"data-testid": "inline-element-id-input-field",
|
|
@@ -554,93 +519,725 @@ var Inline$1 = function Inline(_ref) {
|
|
|
554
519
|
});
|
|
555
520
|
};
|
|
556
521
|
|
|
557
|
-
var
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
522
|
+
function ownKeys$2(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; }
|
|
523
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
524
|
+
var InlineEmbedIcon = function InlineEmbedIcon(_ref) {
|
|
525
|
+
var other = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
526
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$2(_objectSpread$2({
|
|
527
|
+
fill: "none",
|
|
528
|
+
height: "163",
|
|
529
|
+
viewBox: "0 0 278 163",
|
|
530
|
+
width: "278",
|
|
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
|
+
}));
|
|
571
1031
|
};
|
|
572
1032
|
|
|
573
|
-
var
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
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,
|
|
1087
|
+
customization: customization,
|
|
1088
|
+
embedScriptLink: embedScriptLink,
|
|
1089
|
+
extraArgs: extraArgs,
|
|
1090
|
+
inlineWrapperStyle: inlineWrapperStyle
|
|
1091
|
+
});
|
|
1092
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1093
|
+
className: "flex flex-col gap-3",
|
|
1094
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1095
|
+
className: "flex items-center justify-between",
|
|
1096
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1097
|
+
style: "h4",
|
|
1098
|
+
children: t("neetoMolecules.productEmbed.embedCode")
|
|
1099
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Select, {
|
|
1100
|
+
className: "w-28 flex-grow-0",
|
|
1101
|
+
options: supportedLanguagesOptions,
|
|
1102
|
+
size: "small",
|
|
1103
|
+
strategy: "fixed",
|
|
1104
|
+
value: selectedLanguage,
|
|
1105
|
+
onChange: setSelectedLanguage
|
|
1106
|
+
})]
|
|
1107
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1108
|
+
className: "neeto-molecules-embed__code-block relative w-full overflow-y-auto",
|
|
1109
|
+
"data-cy": "embed-code-block",
|
|
1110
|
+
"data-testid": "embed-code-block",
|
|
1111
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Codeblock, {
|
|
1112
|
+
code: code,
|
|
1113
|
+
codeblockProps: {
|
|
1114
|
+
"data-testid": "".concat(selectedLanguage.value, "-code-block")
|
|
1115
|
+
},
|
|
1116
|
+
copyButtonProps: {
|
|
1117
|
+
style: "primary",
|
|
1118
|
+
label: t("neetoMolecules.productEmbed.copyCode")
|
|
1119
|
+
}
|
|
596
1120
|
})
|
|
597
|
-
})
|
|
1121
|
+
})]
|
|
598
1122
|
});
|
|
599
1123
|
};
|
|
600
1124
|
|
|
601
|
-
var
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
return /*#__PURE__*/jsxRuntime.
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
1125
|
+
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; }
|
|
1126
|
+
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; }
|
|
1127
|
+
var FloatingPopupPlaceholderImage = function FloatingPopupPlaceholderImage(_ref) {
|
|
1128
|
+
var other = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
1129
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$1(_objectSpread$1({
|
|
1130
|
+
fill: "none",
|
|
1131
|
+
height: "518",
|
|
1132
|
+
viewBox: "0 0 796 518",
|
|
1133
|
+
width: "796",
|
|
1134
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1135
|
+
}, other), {}, {
|
|
1136
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1137
|
+
fill: "currentColor",
|
|
1138
|
+
height: "12.706",
|
|
1139
|
+
opacity: "0.78",
|
|
1140
|
+
rx: "6.353",
|
|
1141
|
+
width: "358.702",
|
|
1142
|
+
x: "406.645",
|
|
1143
|
+
y: "152.109"
|
|
1144
|
+
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1145
|
+
fill: "currentColor",
|
|
1146
|
+
height: "12.706",
|
|
1147
|
+
opacity: "0.78",
|
|
1148
|
+
rx: "6.353",
|
|
1149
|
+
width: "376.941",
|
|
1150
|
+
x: "406.645",
|
|
1151
|
+
y: "181.758"
|
|
1152
|
+
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1153
|
+
fill: "currentColor",
|
|
1154
|
+
height: "12.706",
|
|
1155
|
+
opacity: "0.78",
|
|
1156
|
+
rx: "6.353",
|
|
1157
|
+
width: "207.529",
|
|
1158
|
+
x: "406.645",
|
|
1159
|
+
y: "211.406"
|
|
1160
|
+
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
1161
|
+
fill: "currentColor",
|
|
1162
|
+
height: "12.706",
|
|
1163
|
+
opacity: "0.78",
|
|
1164
|
+
rx: "6.353",
|
|
1165
|
+
width: "358.702",
|
|
1166
|
+
y: "333.414"
|
|
1167
|
+
}), /*#__PURE__*/jsxRuntime.jsx("rect", {
|
|
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
|
+
}));
|
|
644
1241
|
};
|
|
645
1242
|
|
|
646
1243
|
var ElementPopup = function ElementPopup(_ref) {
|
|
@@ -656,14 +1253,17 @@ var ElementPopup = function ElementPopup(_ref) {
|
|
|
656
1253
|
(_window$globalProps$a = window[globalProps.appName.replace(/^neeto/i, "neeto")]) === null || _window$globalProps$a === void 0 || _window$globalProps$a.embed(element, iframeURL);
|
|
657
1254
|
}
|
|
658
1255
|
}, []);
|
|
659
|
-
return /*#__PURE__*/jsxRuntime.
|
|
660
|
-
className: "relative
|
|
661
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1256
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1257
|
+
className: "relative h-full w-full overflow-hidden",
|
|
1258
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ElementPopupPlaceholderImage, {
|
|
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%]",
|
|
662
1262
|
"data-cy": "preview-element-popup-button",
|
|
663
1263
|
"data-testid": "preview-element-popup-button",
|
|
664
1264
|
id: elementSelector,
|
|
665
|
-
label: t("neetoMolecules.productEmbed.
|
|
666
|
-
})
|
|
1265
|
+
label: t("neetoMolecules.productEmbed.elementPopup.label")
|
|
1266
|
+
})]
|
|
667
1267
|
});
|
|
668
1268
|
};
|
|
669
1269
|
|
|
@@ -686,9 +1286,11 @@ var FloatingPopup = function FloatingPopup(_ref) {
|
|
|
686
1286
|
btn.style.backgroundColor = btnColor;
|
|
687
1287
|
btn.style.color = btnTextColor;
|
|
688
1288
|
}, [btnColor, btnTextColor]);
|
|
689
|
-
return /*#__PURE__*/jsxRuntime.
|
|
690
|
-
className: "relative h-full w-full",
|
|
691
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1289
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1290
|
+
className: "relative h-full w-full overflow-hidden",
|
|
1291
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(FloatingPopupPlaceholderImage, {
|
|
1292
|
+
className: "neeto-ui-text-gray-100 h-auto w-full p-10"
|
|
1293
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
692
1294
|
"data-cy": "popup-preview-button",
|
|
693
1295
|
icon: icon && showIcon ? icon : null,
|
|
694
1296
|
iconPosition: "left",
|
|
@@ -698,7 +1300,7 @@ var FloatingPopup = function FloatingPopup(_ref) {
|
|
|
698
1300
|
"left-0": btnPosition === "bottomLeft",
|
|
699
1301
|
"right-0": btnPosition === "bottomRight"
|
|
700
1302
|
})
|
|
701
|
-
})
|
|
1303
|
+
})]
|
|
702
1304
|
});
|
|
703
1305
|
};
|
|
704
1306
|
|
|
@@ -717,14 +1319,14 @@ var Inline = function Inline(_ref) {
|
|
|
717
1319
|
|
|
718
1320
|
var Preview = function Preview(_ref) {
|
|
719
1321
|
var isScriptLoading = _ref.isScriptLoading,
|
|
720
|
-
|
|
1322
|
+
selectedEmbed = _ref.selectedEmbed,
|
|
721
1323
|
id = _ref.id,
|
|
722
1324
|
customization = _ref.customization,
|
|
723
1325
|
_ref$customPreviewIfr = _ref.customPreviewIframeUrl,
|
|
724
1326
|
customPreviewIframeUrl = _ref$customPreviewIfr === void 0 ? "" : _ref$customPreviewIfr;
|
|
725
1327
|
var preview = _defineProperty(_defineProperty(_defineProperty({}, EMBED_OPTIONS.INLINE, Inline), EMBED_OPTIONS.FLOATING_POPUP, FloatingPopup), EMBED_OPTIONS.ELEMENT_POPUP, ElementPopup);
|
|
726
1328
|
var iframeURL = customPreviewIframeUrl || "".concat(location.origin, "/embed/").concat(id);
|
|
727
|
-
var Component = preview[
|
|
1329
|
+
var Component = preview[selectedEmbed];
|
|
728
1330
|
if (isScriptLoading) {
|
|
729
1331
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
730
1332
|
className: "flex min-h-0 flex-grow items-center justify-center overflow-y-auto",
|
|
@@ -741,68 +1343,40 @@ var Preview = function Preview(_ref) {
|
|
|
741
1343
|
});
|
|
742
1344
|
};
|
|
743
1345
|
|
|
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;
|
|
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:30.3125rem}}.neeto-molecules-embed__code-block .neeto-molecules-code-block{font-size:.875rem;height:13.4375rem;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%}.neeto-molecules-embed-landing-page__card{background-color:rgb(var(--neeto-ui-white))!important;border:1px solid rgb(var(--neeto-ui-gray-300))!important;border-radius:.75rem!important;outline:1px solid rgb(var(--neeto-ui-white))!important;padding:1.5rem!important;text-align:left!important;transition:all .3s!important}.neeto-molecules-embed-landing-page__card:hover{border-color:rgb(var(--neeto-ui-primary-500))!important;outline:1px solid rgb(var(--neeto-ui-primary-500))!important}";
|
|
745
1347
|
injectCss.n(css,{});
|
|
746
1348
|
|
|
747
1349
|
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; }
|
|
748
1350
|
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; }
|
|
749
|
-
var
|
|
750
|
-
var
|
|
751
|
-
|
|
752
|
-
|
|
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,
|
|
1351
|
+
var EmbedRenderer = function EmbedRenderer(_ref) {
|
|
1352
|
+
var className = _ref.className,
|
|
1353
|
+
customEmbedScriptPath = _ref.customEmbedScriptPath,
|
|
1354
|
+
customPreviewIframeUrl = _ref.customPreviewIframeUrl,
|
|
758
1355
|
id = _ref.id,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
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);
|
|
1356
|
+
isQueryParamsEnabled = _ref.isQueryParamsEnabled,
|
|
1357
|
+
options = _ref.options,
|
|
1358
|
+
extraArgs = _ref.extraArgs,
|
|
1359
|
+
otherCustomizations = _ref.otherCustomizations,
|
|
1360
|
+
inlineWrapperStyle = _ref.inlineWrapperStyle,
|
|
1361
|
+
supportedLanguages = _ref.supportedLanguages,
|
|
1362
|
+
selectedEmbed = _ref.selectedEmbed;
|
|
1363
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
1364
|
+
t = _useTranslation.t;
|
|
1365
|
+
var location = reactRouterDom.useLocation();
|
|
776
1366
|
var _useState = React.useState(true),
|
|
777
1367
|
_useState2 = _slicedToArray(_useState, 2),
|
|
778
1368
|
isScriptLoading = _useState2[0],
|
|
779
1369
|
setIsScriptLoading = _useState2[1];
|
|
780
|
-
var _useState3 = React.useState(
|
|
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 () {
|
|
1370
|
+
var _useState3 = React.useState(function () {
|
|
789
1371
|
return buildDefaultCustomization(options);
|
|
790
1372
|
}),
|
|
791
|
-
|
|
792
|
-
customizations =
|
|
793
|
-
setCustomizations =
|
|
794
|
-
var
|
|
795
|
-
|
|
1373
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1374
|
+
customizations = _useState4[0],
|
|
1375
|
+
setCustomizations = _useState4[1];
|
|
1376
|
+
var description = customizations[selectedEmbed].description;
|
|
1377
|
+
var customization = customizations[selectedEmbed];
|
|
1378
|
+
var CustomizationComponent = EMBED_CUSTOMIZATION_COMPONENTS[selectedEmbed];
|
|
796
1379
|
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
|
-
});
|
|
806
1380
|
var loadScript = function loadScript() {
|
|
807
1381
|
var script = document.createElement("script");
|
|
808
1382
|
script.id = SCRIPT_ID;
|
|
@@ -812,75 +1386,184 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
812
1386
|
};
|
|
813
1387
|
var updateCustomization = function updateCustomization(props) {
|
|
814
1388
|
return setCustomizations(function (prevState) {
|
|
815
|
-
return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({},
|
|
1389
|
+
return _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, selectedEmbed, ramda.mergeLeft(props, prevState[selectedEmbed])));
|
|
816
1390
|
});
|
|
817
1391
|
};
|
|
818
1392
|
React.useEffect(function () {
|
|
819
1393
|
var isScriptLoaded = document.getElementById(SCRIPT_ID);
|
|
820
1394
|
if (isScriptLoaded) setIsScriptLoading(false);else loadScript();
|
|
821
1395
|
}, []);
|
|
822
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
1396
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
823
1397
|
"data-testid": "embed-product",
|
|
824
|
-
className: classnames("neeto-molecules-embed flex w-full flex-grow flex-col md:flex-row", className),
|
|
1398
|
+
className: classnames("neeto-molecules-embed flex w-full flex-grow flex-col p-0 md:flex-row", className),
|
|
825
1399
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
826
|
-
className: "neeto-molecules-embed__left-sidebar",
|
|
827
|
-
children: [
|
|
1400
|
+
className: "neeto-molecules-embed__left-sidebar px-5 py-8 md:h-full md:overflow-y-auto md:px-10",
|
|
1401
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
828
1402
|
className: "mb-4",
|
|
829
|
-
"data-cy": "back-button",
|
|
830
|
-
"data-testid": "back-button",
|
|
1403
|
+
"data-cy": "back-to-embed-selection-button",
|
|
1404
|
+
"data-testid": "back-to-embed-selection-button",
|
|
831
1405
|
icon: LeftArrow,
|
|
832
1406
|
iconPosition: "left",
|
|
833
|
-
label: t("neetoMolecules.productEmbed.
|
|
1407
|
+
label: t("neetoMolecules.productEmbed.backToEmbedSelection"),
|
|
834
1408
|
size: "small",
|
|
835
1409
|
style: "link",
|
|
836
|
-
to:
|
|
837
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
842
|
-
className: "mt-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
1410
|
+
to: location.pathname
|
|
1411
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
1412
|
+
className: "py-0",
|
|
1413
|
+
"data-testid": "".concat(neetoCist.hyphenate(selectedEmbed), "-embed-title"),
|
|
1414
|
+
title: EMBED_TITLES[selectedEmbed]
|
|
1415
|
+
}), description && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1416
|
+
className: "mt-2",
|
|
1417
|
+
"data-cy": "".concat(neetoCist.hyphenate(selectedEmbed), "-description"),
|
|
1418
|
+
style: "body2",
|
|
1419
|
+
children: description
|
|
1420
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1421
|
+
className: "mt-4 flex w-full flex-col gap-y-6",
|
|
1422
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1423
|
+
className: "space-y-6",
|
|
1424
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Code, {
|
|
1425
|
+
customization: customization,
|
|
1426
|
+
embedScriptLink: embedScriptLink,
|
|
1427
|
+
extraArgs: extraArgs,
|
|
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
|
+
})
|
|
854
1439
|
})]
|
|
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")
|
|
855
1477
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
856
|
-
className: "neeto-molecules-
|
|
857
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
1478
|
+
className: "neeto-molecules-embed-landing-page__container mx-auto w-full max-w-5xl py-6 md:py-10",
|
|
1479
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1480
|
+
className: "mb-2",
|
|
1481
|
+
style: "h2",
|
|
1482
|
+
children: title || t("neetoMolecules.productEmbed.embedSelectionTitle", {
|
|
1483
|
+
productName: globalProps.appName
|
|
1484
|
+
})
|
|
1485
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1486
|
+
className: "mb-8",
|
|
1487
|
+
style: "body1",
|
|
1488
|
+
children: t("neetoMolecules.productEmbed.embedSelectionDescription")
|
|
1489
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1490
|
+
className: "neeto-molecules-embed-landing-page__cards-wrapper grid w-full grid-cols-1 flex-wrap gap-6 md:grid-cols-3",
|
|
1491
|
+
children: Object.entries(options).map(function (_ref2) {
|
|
1492
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
1493
|
+
key = _ref3[0],
|
|
1494
|
+
_ref3$ = _ref3[1],
|
|
1495
|
+
label = _ref3$.label,
|
|
1496
|
+
description = _ref3$.description;
|
|
1497
|
+
var EmbedIcon = EMBED_ICONS[key];
|
|
1498
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1499
|
+
className: "neeto-molecules-embed-landing-page__card w-full",
|
|
1500
|
+
"data-testid": "embed-selector-card-".concat(neetoCist.hyphenate(key)),
|
|
1501
|
+
onClick: reactUtils.handleMetaClick(history, "".concat(location.pathname, "?type=").concat(neetoCist.hyphenate(key))),
|
|
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
|
+
})
|
|
880
1517
|
})]
|
|
881
1518
|
})]
|
|
882
1519
|
});
|
|
883
1520
|
};
|
|
884
1521
|
|
|
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
|
+
|
|
885
1568
|
module.exports = ProductEmbed;
|
|
886
1569
|
//# sourceMappingURL=ProductEmbed.js.map
|