@bigbinary/neeto-molecules 5.3.9 → 5.3.11

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.
@@ -9,7 +9,7 @@ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
9
9
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
10
10
  var primitives = require('@bigbinary/neeto-atoms/primitives');
11
11
  var reactI18next = require('react-i18next');
12
- var Columns$1 = require('../Columns-rqa7goJu.js');
12
+ var Columns$1 = require('../Columns-D5WkMJk3.js');
13
13
  require('@babel/runtime/helpers/toConsumableArray');
14
14
  require('@tanstack/react-query');
15
15
  require('@bigbinary/neeto-commons-frontend/v2/react-utils/useMutationWithInvalidation');
@@ -39,7 +39,7 @@ require('@bigbinary/neeto-commons-frontend/v2/react-utils/useFuncDebounce');
39
39
  require('@bigbinary/neeto-commons-frontend/v2/react-utils/useQueryParams');
40
40
  require('@bigbinary/neeto-commons-frontend/v2/react-utils/useUpdateEffect');
41
41
  require('../search-DoXqXFel.js');
42
- require('../Columns-rqa7goJu.js');
42
+ require('../Columns-D5WkMJk3.js');
43
43
  require('@dnd-kit/core');
44
44
  require('@dnd-kit/modifiers');
45
45
  require('@dnd-kit/sortable');
@@ -21,7 +21,7 @@ import { C as ChevronRight } from '../chevron-right-CEsVcNLw.js';
21
21
  import SubHeader from './SubHeader.js';
22
22
  import '../createLucideIcon--oLqczpc.js';
23
23
  import '@bigbinary/neeto-atoms/primitives';
24
- import '../Columns-C20zru7a.js';
24
+ import '../Columns-DrqMacTG.js';
25
25
  import '@babel/runtime/helpers/toConsumableArray';
26
26
  import '@dnd-kit/core';
27
27
  import '@dnd-kit/modifiers';
@@ -1,4 +1,4 @@
1
- export { C as COLUMNS_ORDER_STORAGE_KEY, H as HIDDEN_COLUMNS_STORAGE_KEY, T as TABLE_CONFIGURATION_QUERY_KEY, a as default, u as useTableConfigurations } from '../Columns-C20zru7a.js';
1
+ export { C as COLUMNS_ORDER_STORAGE_KEY, H as HIDDEN_COLUMNS_STORAGE_KEY, T as TABLE_CONFIGURATION_QUERY_KEY, a as default, u as useTableConfigurations } from '../Columns-DrqMacTG.js';
2
2
  import '@babel/runtime/helpers/defineProperty';
3
3
  import '@babel/runtime/helpers/objectWithoutProperties';
4
4
  import '@babel/runtime/helpers/toConsumableArray';
@@ -1,12 +1,11 @@
1
1
  import { useShallow } from 'zustand/shallow';
2
- import { useEffect, useState, useMemo, useRef } from 'react';
2
+ import { useEffect, useState, useMemo, useRef, createElement } from 'react';
3
3
  import { isPresent, filterBy, hyphenate, noop } from '@bigbinary/neeto-cist';
4
4
  import { useLocation, useHistory } from 'react-router-dom';
5
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
6
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
7
7
  import { Label, Input, Button, Select, ColorPicker, Checkbox, Switch, Typography, Spinner, Callout } from '@bigbinary/neeto-atoms';
8
8
  import classnames from 'classnames';
9
- import useStateWithDependency from '@bigbinary/neeto-commons-frontend/v2/react-utils/useStateWithDependency';
10
9
  import { toPairs, mergeDeepLeft, isEmpty, mergeLeft } from 'ramda';
11
10
  import { useTranslation } from 'react-i18next';
12
11
  import { t } from 'i18next';
@@ -1632,12 +1631,23 @@ var EmbedRenderer = function EmbedRenderer(_ref) {
1632
1631
  _useState2 = _slicedToArray(_useState, 2),
1633
1632
  isScriptLoading = _useState2[0],
1634
1633
  setIsScriptLoading = _useState2[1];
1635
- var _useStateWithDependen = useStateWithDependency(function () {
1634
+ var _useState3 = useState(function () {
1636
1635
  return buildDefaultCustomization(options);
1637
- }, [options === null || options === void 0 || (_options$iframe = options.iframe) === null || _options$iframe === void 0 ? void 0 : _options$iframe.iframeUrl]),
1638
- _useStateWithDependen2 = _slicedToArray(_useStateWithDependen, 2),
1639
- customizations = _useStateWithDependen2[0],
1640
- setCustomizations = _useStateWithDependen2[1];
1636
+ }),
1637
+ _useState4 = _slicedToArray(_useState3, 2),
1638
+ customizations = _useState4[0],
1639
+ setCustomizations = _useState4[1];
1640
+ var iframeUrl = options === null || options === void 0 || (_options$iframe = options.iframe) === null || _options$iframe === void 0 ? void 0 : _options$iframe.iframeUrl;
1641
+ useEffect(function () {
1642
+ setCustomizations(function (prevState) {
1643
+ var _prevState$iframe;
1644
+ return ((_prevState$iframe = prevState.iframe) === null || _prevState$iframe === void 0 ? void 0 : _prevState$iframe.iframeUrl) === iframeUrl ? prevState : _objectSpread$1(_objectSpread$1({}, prevState), {}, {
1645
+ iframe: _objectSpread$1(_objectSpread$1({}, prevState.iframe), {}, {
1646
+ iframeUrl: iframeUrl
1647
+ })
1648
+ });
1649
+ });
1650
+ }, [iframeUrl]);
1641
1651
  var description = customizations[selectedEmbed].description;
1642
1652
  var customization = customizations[selectedEmbed];
1643
1653
  var CustomizationComponent = EMBED_CUSTOMIZATION_COMPONENTS[selectedEmbed];
@@ -1857,7 +1867,7 @@ var ProductEmbed = function ProductEmbed(_ref) {
1857
1867
  queryParamsProps: queryParamsProps
1858
1868
  });
1859
1869
  }, []);
1860
- return selectedEmbed ? /*#__PURE__*/jsx(EmbedRenderer, {
1870
+ return selectedEmbed ? /*#__PURE__*/createElement(EmbedRenderer, {
1861
1871
  className: className,
1862
1872
  customEmbedScriptPath: customEmbedScriptPath,
1863
1873
  customPreviewIframeUrl: customPreviewIframeUrl,
@@ -1869,7 +1879,8 @@ var ProductEmbed = function ProductEmbed(_ref) {
1869
1879
  otherCustomizations: otherCustomizations,
1870
1880
  queryParamsProps: queryParamsProps,
1871
1881
  selectedEmbed: selectedEmbed,
1872
- supportedLanguages: supportedLanguages
1882
+ supportedLanguages: supportedLanguages,
1883
+ key: id
1873
1884
  }) : /*#__PURE__*/jsx(EmbedSelector, {
1874
1885
  goBackLink: goBackLink,
1875
1886
  options: options,