@bigbinary/neeto-themes-frontend 4.2.8 → 4.2.10

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,8 +9,8 @@ var reactI18next = require('react-i18next');
9
9
  var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
10
10
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
11
11
  var Toastr = require('@bigbinary/neetoui/Toastr');
12
- var useGlobalThemesApi = require('../useGlobalThemesApi-DjZDCCZE.js');
13
- var useExpandedSection = require('../useExpandedSection-BTBI4UqP.js');
12
+ var useGlobalThemesApi = require('../useGlobalThemesApi-Bx5QeeJE.js');
13
+ var useExpandedSection = require('../useExpandedSection-D0PusQFE.js');
14
14
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
15
15
  var classnames = require('classnames');
16
16
  var utils$1 = require('@bigbinary/neeto-commons-frontend/utils');
@@ -321,12 +321,12 @@ var CustomCSS = function CustomCSS(_ref) {
321
321
  var _useFormikContext = formik.useFormikContext(),
322
322
  values = _useFormikContext.values,
323
323
  setFieldValue = _useFormikContext.setFieldValue;
324
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
324
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
325
325
  return {
326
326
  themePropertiesSchema: store["themePropertiesSchema"],
327
327
  helpPopoverProps: store["helpPopoverProps"]
328
328
  };
329
- }, shallow.shallow),
329
+ })),
330
330
  themePropertiesSchema = _useConfigStore.themePropertiesSchema,
331
331
  helpPopoverProps = _useConfigStore.helpPopoverProps;
332
332
  var _helpPopoverProps$cus = helpPopoverProps.customCss,
@@ -1025,17 +1025,17 @@ var Properties = function Properties(_ref) {
1025
1025
  var onPropertiesChange = _ref.onPropertiesChange,
1026
1026
  condition = _ref.condition,
1027
1027
  themeId = _ref.themeId;
1028
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1028
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1029
1029
  return {
1030
1030
  themePropertiesSchema: store["themePropertiesSchema"]
1031
1031
  };
1032
- }, shallow.shallow),
1032
+ })),
1033
1033
  themePropertiesSchema = _useConfigStore.themePropertiesSchema;
1034
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
1034
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
1035
1035
  return {
1036
1036
  setThemeState: store["setThemeState"]
1037
1037
  };
1038
- }, shallow.shallow),
1038
+ })),
1039
1039
  setThemeState = _useThemeStore.setThemeState;
1040
1040
  var _useFormikContext = formik.useFormikContext(),
1041
1041
  setFieldValue = _useFormikContext.setFieldValue,
@@ -1243,11 +1243,11 @@ var ImageBlock = function ImageBlock(_ref) {
1243
1243
  var _useFormikContext = formik.useFormikContext(),
1244
1244
  setFieldValue = _useFormikContext.setFieldValue,
1245
1245
  values = _useFormikContext.values;
1246
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1246
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1247
1247
  return {
1248
1248
  themePropertiesSchema: store["themePropertiesSchema"]
1249
1249
  };
1250
- }, shallow.shallow),
1250
+ })),
1251
1251
  themePropertiesSchema = _useConfigStore.themePropertiesSchema;
1252
1252
  var propertySchema = neetoCist.findBy({
1253
1253
  key: attribute
@@ -1351,11 +1351,11 @@ var Images = function Images(_ref) {
1351
1351
  fixedAspectRatio = _ref.fixedAspectRatio;
1352
1352
  var _useFormikContext = formik.useFormikContext(),
1353
1353
  values = _useFormikContext.values;
1354
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1354
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1355
1355
  return {
1356
1356
  helpPopoverProps: store["helpPopoverProps"]
1357
1357
  };
1358
- }, shallow.shallow),
1358
+ })),
1359
1359
  helpPopoverProps = _useConfigStore.helpPopoverProps;
1360
1360
  var key = neetoCist.snakeToCamelCase(attribute);
1361
1361
  var title = buildLabel(key, "image");
@@ -1383,11 +1383,11 @@ var ThemeMeta = function ThemeMeta(_ref) {
1383
1383
  var className = _ref.className;
1384
1384
  var _useTranslation = reactI18next.useTranslation(),
1385
1385
  t = _useTranslation.t;
1386
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1386
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1387
1387
  return {
1388
1388
  helpPopoverProps: store["helpPopoverProps"]
1389
1389
  };
1390
- }, shallow.shallow),
1390
+ })),
1391
1391
  helpPopoverProps = _useConfigStore.helpPopoverProps;
1392
1392
  var _helpPopoverProps$nam = helpPopoverProps.name,
1393
1393
  nameHelpPopoverProps = _helpPopoverProps$nam === void 0 ? {} : _helpPopoverProps$nam;
@@ -1427,7 +1427,7 @@ var Customize = function Customize(_ref) {
1427
1427
  _useState2 = _slicedToArray(_useState, 2),
1428
1428
  popoverInstance = _useState2[0],
1429
1429
  setPopoverInstance = _useState2[1];
1430
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1430
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1431
1431
  return {
1432
1432
  themePropertiesSchema: store["themePropertiesSchema"],
1433
1433
  entityId: store["entityId"],
@@ -1437,7 +1437,7 @@ var Customize = function Customize(_ref) {
1437
1437
  enabledFeatures: store["enabledFeatures"],
1438
1438
  proFeatures: store["proFeatures"]
1439
1439
  };
1440
- }, shallow.shallow),
1440
+ })),
1441
1441
  themePropertiesSchema = _useConfigStore.themePropertiesSchema,
1442
1442
  entityId = _useConfigStore.entityId,
1443
1443
  entityType = _useConfigStore.entityType,
@@ -1450,12 +1450,12 @@ var Customize = function Customize(_ref) {
1450
1450
  var _useQueryParams = reactUtils.useQueryParams(),
1451
1451
  sourceThemeId = _useQueryParams.source;
1452
1452
  var isCustomizingSystemTheme = !themeId && neetoCist.isPresent(sourceThemeId);
1453
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
1453
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
1454
1454
  return {
1455
1455
  currentTheme: store["currentTheme"],
1456
1456
  setThemeState: store["setThemeState"]
1457
1457
  };
1458
- }, shallow.shallow),
1458
+ })),
1459
1459
  currentTheme = _useThemeStore.currentTheme,
1460
1460
  setThemeState = _useThemeStore.setThemeState;
1461
1461
  var _useShowGlobalTheme = useGlobalThemesApi.useShowGlobalTheme(entityType),
@@ -1778,11 +1778,11 @@ var Thumbnail = function Thumbnail(_ref) {
1778
1778
  isPreviewing = _ref.isPreviewing,
1779
1779
  isHighLightedTheme = _ref.isHighLightedTheme,
1780
1780
  theme = _ref.theme;
1781
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1781
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1782
1782
  return {
1783
1783
  themePropertiesSchema: store["themePropertiesSchema"]
1784
1784
  };
1785
- }, shallow.shallow),
1785
+ })),
1786
1786
  _useConfigStore$theme = _useConfigStore.themePropertiesSchema,
1787
1787
  themePropertiesSchema = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
1788
1788
  var _themePropertiesSchem = _slicedToArray(themePropertiesSchema, 2),
@@ -1867,13 +1867,13 @@ var Card = function Card(_ref) {
1867
1867
  Thumbnail$1 = _ref.thumbnail;
1868
1868
  var _useTranslation = reactI18next.useTranslation(),
1869
1869
  t = _useTranslation.t;
1870
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1870
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1871
1871
  return {
1872
1872
  themePropertiesSchema: store["themePropertiesSchema"],
1873
1873
  enabledFeatures: store["enabledFeatures"],
1874
1874
  proFeatures: store["proFeatures"]
1875
1875
  };
1876
- }, shallow.shallow),
1876
+ })),
1877
1877
  themePropertiesSchema = _useConfigStore.themePropertiesSchema,
1878
1878
  enabledFeatures = _useConfigStore.enabledFeatures,
1879
1879
  proFeatures = _useConfigStore.proFeatures;
@@ -2073,19 +2073,19 @@ var Themes = function Themes(_ref) {
2073
2073
  t = _useTranslation.t;
2074
2074
  var _useThemeUtils = useExpandedSection.useThemeUtils(),
2075
2075
  setTheme = _useThemeUtils.setTheme;
2076
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2076
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2077
2077
  return {
2078
2078
  setThemeState: store["setThemeState"],
2079
2079
  previewingTheme: store["previewingTheme"]
2080
2080
  };
2081
- }, shallow.shallow),
2081
+ })),
2082
2082
  setThemeState = _useThemeStore.setThemeState,
2083
2083
  previewingTheme = _useThemeStore.previewingTheme;
2084
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2084
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2085
2085
  return {
2086
2086
  entityType: store["entityType"]
2087
2087
  };
2088
- }, shallow.shallow),
2088
+ })),
2089
2089
  entityType = _useConfigStore.entityType;
2090
2090
  var _useQueryParams = reactUtils.useQueryParams(),
2091
2091
  _useQueryParams$searc = _useQueryParams.searchTerm,
@@ -2227,19 +2227,19 @@ var TitleBar = function TitleBar(_ref) {
2227
2227
  handleToggleSearch = _ref.handleToggleSearch;
2228
2228
  var _useTranslation = reactI18next.useTranslation(),
2229
2229
  t = _useTranslation.t;
2230
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2230
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2231
2231
  return {
2232
2232
  previewingTheme: store["previewingTheme"]
2233
2233
  };
2234
- }, shallow.shallow),
2234
+ })),
2235
2235
  previewingTheme = _useThemeStore.previewingTheme;
2236
2236
  var themeId = previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id;
2237
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2237
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2238
2238
  return {
2239
2239
  entityType: store["entityType"],
2240
2240
  helpDocUrl: store["helpDocUrl"]
2241
2241
  };
2242
- }, shallow.shallow),
2242
+ })),
2243
2243
  entityType = _useConfigStore.entityType,
2244
2244
  helpDocUrl = _useConfigStore.helpDocUrl;
2245
2245
  var _useQueryParams = reactUtils.useQueryParams(),
@@ -2350,23 +2350,23 @@ var Sidebar = function Sidebar(_ref) {
2350
2350
  react.useEffect(function () {
2351
2351
  setIsThemesSidebarCollapsed(!isLargerScreen);
2352
2352
  }, [isLargerScreen]);
2353
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2353
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2354
2354
  return {
2355
2355
  entityType: store["entityType"],
2356
2356
  entityId: store["entityId"],
2357
2357
  isFetchingSchema: store["isFetchingSchema"],
2358
2358
  defaultThemeName: store["defaultThemeName"]
2359
2359
  };
2360
- }, shallow.shallow),
2360
+ })),
2361
2361
  entityType = _useConfigStore.entityType,
2362
2362
  entityId = _useConfigStore.entityId,
2363
2363
  isFetchingSchema = _useConfigStore.isFetchingSchema,
2364
2364
  defaultThemeName = _useConfigStore.defaultThemeName;
2365
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2365
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2366
2366
  return {
2367
2367
  setThemeState: store["setThemeState"]
2368
2368
  };
2369
- }, shallow.shallow),
2369
+ })),
2370
2370
  setThemeState = _useThemeStore.setThemeState;
2371
2371
  var didScrollActiveThemeIntoView = react.useRef(null);
2372
2372
  var _useTranslation = reactI18next.useTranslation(),
@@ -2645,19 +2645,19 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
2645
2645
  _ref$proFeatures = _ref.proFeatures,
2646
2646
  proFeatures = _ref$proFeatures === void 0 ? {} : _ref$proFeatures;
2647
2647
  react.useMemo(useGlobalThemesApi.registerNeetoThemesTranslations, []);
2648
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2648
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2649
2649
  return {
2650
2650
  setThemeState: store["setThemeState"]
2651
2651
  };
2652
- }, shallow.shallow),
2652
+ })),
2653
2653
  setThemeState = _useThemeStore.setThemeState;
2654
2654
  var _useThemeUtils = useExpandedSection.useThemeUtils(),
2655
2655
  setTheme = _useThemeUtils.setTheme;
2656
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2656
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2657
2657
  return {
2658
2658
  setConfigState: store["setConfigState"]
2659
2659
  };
2660
- }, shallow.shallow),
2660
+ })),
2661
2661
  setConfigState = _useConfigStore.setConfigState;
2662
2662
  var _useTranslation = reactI18next.useTranslation(),
2663
2663
  t = _useTranslation.t;