@bigbinary/neeto-themes-frontend 4.2.9 → 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.
package/dist/cjs/hooks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var useExpandedSection = require('../useExpandedSection-BTBI4UqP.js');
3
+ var useExpandedSection = require('../useExpandedSection-D0PusQFE.js');
4
4
  require('@babel/runtime/helpers/slicedToArray');
5
5
  require('zustand/shallow');
6
6
  require('react');
package/dist/cjs/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var NeetoThemesBuilder = require('./NeetoThemesBuilder.js');
4
- var useExpandedSection = require('../useExpandedSection-BTBI4UqP.js');
5
- var useGlobalThemesApi = require('../useGlobalThemesApi-DjZDCCZE.js');
4
+ var useExpandedSection = require('../useExpandedSection-D0PusQFE.js');
5
+ var useGlobalThemesApi = require('../useGlobalThemesApi-Bx5QeeJE.js');
6
6
  var utils = require('../index-CZdpMMBb.js');
7
7
  require('zustand/shallow');
8
8
  require('react');
@@ -6,8 +6,8 @@ var neetoAtoms = require('@bigbinary/neeto-atoms');
6
6
  var neetoCist = require('@bigbinary/neeto-cist');
7
7
  var reactUtils$1 = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
8
8
  var reactI18next = require('react-i18next');
9
- var useGlobalThemesApi = require('../../useGlobalThemesApi-DjZDCCZE.js');
10
- var useExpandedSection = require('../../useExpandedSection-BTBI4UqP.js');
9
+ var useGlobalThemesApi = require('../../useGlobalThemesApi-Bx5QeeJE.js');
10
+ var useExpandedSection = require('../../useExpandedSection-D0PusQFE.js');
11
11
  var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
12
12
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
13
13
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
@@ -425,12 +425,12 @@ var CustomCSS = function CustomCSS(_ref) {
425
425
  var _useFormikContext = formik.useFormikContext(),
426
426
  values = _useFormikContext.values,
427
427
  setFieldValue = _useFormikContext.setFieldValue;
428
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
428
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
429
429
  return {
430
430
  themePropertiesSchema: store["themePropertiesSchema"],
431
431
  helpPopoverProps: store["helpPopoverProps"]
432
432
  };
433
- }, shallow.shallow),
433
+ })),
434
434
  themePropertiesSchema = _useConfigStore.themePropertiesSchema,
435
435
  helpPopoverProps = _useConfigStore.helpPopoverProps;
436
436
  var _helpPopoverProps$cus = helpPopoverProps.customCss,
@@ -1022,17 +1022,17 @@ var Properties = function Properties(_ref) {
1022
1022
  var onPropertiesChange = _ref.onPropertiesChange,
1023
1023
  condition = _ref.condition,
1024
1024
  themeId = _ref.themeId;
1025
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1025
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1026
1026
  return {
1027
1027
  themePropertiesSchema: store["themePropertiesSchema"]
1028
1028
  };
1029
- }, shallow.shallow),
1029
+ })),
1030
1030
  themePropertiesSchema = _useConfigStore.themePropertiesSchema;
1031
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
1031
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
1032
1032
  return {
1033
1033
  setThemeState: store["setThemeState"]
1034
1034
  };
1035
- }, shallow.shallow),
1035
+ })),
1036
1036
  setThemeState = _useThemeStore.setThemeState;
1037
1037
  var _useFormikContext = formik.useFormikContext(),
1038
1038
  setFieldValue = _useFormikContext.setFieldValue,
@@ -1261,11 +1261,11 @@ var ImageBlock = function ImageBlock(_ref) {
1261
1261
  var _useFormikContext = formik.useFormikContext(),
1262
1262
  setFieldValue = _useFormikContext.setFieldValue,
1263
1263
  values = _useFormikContext.values;
1264
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1264
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1265
1265
  return {
1266
1266
  themePropertiesSchema: store["themePropertiesSchema"]
1267
1267
  };
1268
- }, shallow.shallow),
1268
+ })),
1269
1269
  themePropertiesSchema = _useConfigStore.themePropertiesSchema;
1270
1270
  var propertySchema = neetoCist.findBy({
1271
1271
  key: attribute
@@ -1370,12 +1370,12 @@ var Images = function Images(_ref) {
1370
1370
  fixedAspectRatio = _ref.fixedAspectRatio;
1371
1371
  var _useFormikContext = formik.useFormikContext(),
1372
1372
  values = _useFormikContext.values;
1373
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1373
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1374
1374
  return {
1375
1375
  helpPopoverProps: store["helpPopoverProps"],
1376
1376
  themePropertiesSchema: store["themePropertiesSchema"]
1377
1377
  };
1378
- }, shallow.shallow),
1378
+ })),
1379
1379
  helpPopoverProps = _useConfigStore.helpPopoverProps,
1380
1380
  themePropertiesSchema = _useConfigStore.themePropertiesSchema;
1381
1381
  var key = neetoCist.snakeToCamelCase(attribute);
@@ -1407,11 +1407,11 @@ var ThemeMeta = function ThemeMeta(_ref) {
1407
1407
  var className = _ref.className;
1408
1408
  var _useTranslation = reactI18next.useTranslation(),
1409
1409
  t = _useTranslation.t;
1410
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1410
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1411
1411
  return {
1412
1412
  helpPopoverProps: store["helpPopoverProps"]
1413
1413
  };
1414
- }, shallow.shallow),
1414
+ })),
1415
1415
  helpPopoverProps = _useConfigStore.helpPopoverProps;
1416
1416
  var _helpPopoverProps$nam = helpPopoverProps.name,
1417
1417
  nameHelpPopoverProps = _helpPopoverProps$nam === void 0 ? {} : _helpPopoverProps$nam;
@@ -1452,7 +1452,7 @@ var Customize = function Customize(_ref) {
1452
1452
  _useState2 = _slicedToArray(_useState, 2),
1453
1453
  isNotAppliedPopoverOpen = _useState2[0],
1454
1454
  setIsNotAppliedPopoverOpen = _useState2[1];
1455
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1455
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1456
1456
  return {
1457
1457
  themePropertiesSchema: store["themePropertiesSchema"],
1458
1458
  entityId: store["entityId"],
@@ -1462,7 +1462,7 @@ var Customize = function Customize(_ref) {
1462
1462
  enabledFeatures: store["enabledFeatures"],
1463
1463
  proFeatures: store["proFeatures"]
1464
1464
  };
1465
- }, shallow.shallow),
1465
+ })),
1466
1466
  themePropertiesSchema = _useConfigStore.themePropertiesSchema,
1467
1467
  entityId = _useConfigStore.entityId,
1468
1468
  entityType = _useConfigStore.entityType,
@@ -1475,12 +1475,12 @@ var Customize = function Customize(_ref) {
1475
1475
  var _useQueryParams = reactUtils$1.useQueryParams(),
1476
1476
  sourceThemeId = _useQueryParams.source;
1477
1477
  var isCustomizingSystemTheme = !themeId && neetoCist.isPresent(sourceThemeId);
1478
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
1478
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
1479
1479
  return {
1480
1480
  currentTheme: store["currentTheme"],
1481
1481
  setThemeState: store["setThemeState"]
1482
1482
  };
1483
- }, shallow.shallow),
1483
+ })),
1484
1484
  currentTheme = _useThemeStore.currentTheme,
1485
1485
  setThemeState = _useThemeStore.setThemeState;
1486
1486
  var _useShowGlobalTheme = useGlobalThemesApi.useShowGlobalTheme(entityType),
@@ -1805,11 +1805,11 @@ var Thumbnail = function Thumbnail(_ref) {
1805
1805
  isPreviewing = _ref.isPreviewing,
1806
1806
  isHighLightedTheme = _ref.isHighLightedTheme,
1807
1807
  theme = _ref.theme;
1808
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1808
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1809
1809
  return {
1810
1810
  themePropertiesSchema: store["themePropertiesSchema"]
1811
1811
  };
1812
- }, shallow.shallow),
1812
+ })),
1813
1813
  _useConfigStore$theme = _useConfigStore.themePropertiesSchema,
1814
1814
  themePropertiesSchema = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
1815
1815
  var _themePropertiesSchem = _slicedToArray(themePropertiesSchema, 2),
@@ -1893,13 +1893,13 @@ var Card = function Card(_ref) {
1893
1893
  Thumbnail$1 = _ref.thumbnail;
1894
1894
  var _useTranslation = reactI18next.useTranslation(),
1895
1895
  t = _useTranslation.t;
1896
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
1896
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
1897
1897
  return {
1898
1898
  themePropertiesSchema: store["themePropertiesSchema"],
1899
1899
  enabledFeatures: store["enabledFeatures"],
1900
1900
  proFeatures: store["proFeatures"]
1901
1901
  };
1902
- }, shallow.shallow),
1902
+ })),
1903
1903
  themePropertiesSchema = _useConfigStore.themePropertiesSchema,
1904
1904
  enabledFeatures = _useConfigStore.enabledFeatures,
1905
1905
  proFeatures = _useConfigStore.proFeatures;
@@ -2102,19 +2102,19 @@ var Themes = function Themes(_ref) {
2102
2102
  t = _useTranslation.t;
2103
2103
  var _useThemeUtils = useExpandedSection.useThemeUtils(),
2104
2104
  setTheme = _useThemeUtils.setTheme;
2105
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2105
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2106
2106
  return {
2107
2107
  setThemeState: store["setThemeState"],
2108
2108
  previewingTheme: store["previewingTheme"]
2109
2109
  };
2110
- }, shallow.shallow),
2110
+ })),
2111
2111
  setThemeState = _useThemeStore.setThemeState,
2112
2112
  previewingTheme = _useThemeStore.previewingTheme;
2113
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2113
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2114
2114
  return {
2115
2115
  entityType: store["entityType"]
2116
2116
  };
2117
- }, shallow.shallow),
2117
+ })),
2118
2118
  entityType = _useConfigStore.entityType;
2119
2119
  var _useQueryParams = reactUtils$1.useQueryParams(),
2120
2120
  _useQueryParams$searc = _useQueryParams.searchTerm,
@@ -2259,19 +2259,19 @@ var TitleBar = function TitleBar(_ref) {
2259
2259
  handleToggleSearch = _ref.handleToggleSearch;
2260
2260
  var _useTranslation = reactI18next.useTranslation(),
2261
2261
  t = _useTranslation.t;
2262
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2262
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2263
2263
  return {
2264
2264
  previewingTheme: store["previewingTheme"]
2265
2265
  };
2266
- }, shallow.shallow),
2266
+ })),
2267
2267
  previewingTheme = _useThemeStore.previewingTheme;
2268
2268
  var themeId = previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id;
2269
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2269
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2270
2270
  return {
2271
2271
  entityType: store["entityType"],
2272
2272
  helpDocUrl: store["helpDocUrl"]
2273
2273
  };
2274
- }, shallow.shallow),
2274
+ })),
2275
2275
  entityType = _useConfigStore.entityType,
2276
2276
  helpDocUrl = _useConfigStore.helpDocUrl;
2277
2277
  var _useQueryParams = reactUtils$1.useQueryParams(),
@@ -2378,23 +2378,23 @@ var Sidebar = function Sidebar(_ref) {
2378
2378
  react.useEffect(function () {
2379
2379
  setIsThemesSidebarCollapsed(!isLargerScreen);
2380
2380
  }, [isLargerScreen]);
2381
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2381
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2382
2382
  return {
2383
2383
  entityType: store["entityType"],
2384
2384
  entityId: store["entityId"],
2385
2385
  isFetchingSchema: store["isFetchingSchema"],
2386
2386
  defaultThemeName: store["defaultThemeName"]
2387
2387
  };
2388
- }, shallow.shallow),
2388
+ })),
2389
2389
  entityType = _useConfigStore.entityType,
2390
2390
  entityId = _useConfigStore.entityId,
2391
2391
  isFetchingSchema = _useConfigStore.isFetchingSchema,
2392
2392
  defaultThemeName = _useConfigStore.defaultThemeName;
2393
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2393
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2394
2394
  return {
2395
2395
  setThemeState: store["setThemeState"]
2396
2396
  };
2397
- }, shallow.shallow),
2397
+ })),
2398
2398
  setThemeState = _useThemeStore.setThemeState;
2399
2399
  var didScrollActiveThemeIntoView = react.useRef(null);
2400
2400
  var _useTranslation = reactI18next.useTranslation(),
@@ -2675,19 +2675,19 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
2675
2675
  _ref$proFeatures = _ref.proFeatures,
2676
2676
  proFeatures = _ref$proFeatures === void 0 ? {} : _ref$proFeatures;
2677
2677
  react.useMemo(useGlobalThemesApi.registerNeetoThemesTranslations, []);
2678
- var _useThemeStore = useExpandedSection.useThemeStore(function (store) {
2678
+ var _useThemeStore = useExpandedSection.useThemeStore(shallow.useShallow(function (store) {
2679
2679
  return {
2680
2680
  setThemeState: store["setThemeState"]
2681
2681
  };
2682
- }, shallow.shallow),
2682
+ })),
2683
2683
  setThemeState = _useThemeStore.setThemeState;
2684
2684
  var _useThemeUtils = useExpandedSection.useThemeUtils(),
2685
2685
  setTheme = _useThemeUtils.setTheme;
2686
- var _useConfigStore = useExpandedSection.useConfigStore(function (store) {
2686
+ var _useConfigStore = useExpandedSection.useConfigStore(shallow.useShallow(function (store) {
2687
2687
  return {
2688
2688
  setConfigState: store["setConfigState"]
2689
2689
  };
2690
- }, shallow.shallow),
2690
+ })),
2691
2691
  setConfigState = _useConfigStore.setConfigState;
2692
2692
  var _useTranslation = reactI18next.useTranslation(),
2693
2693
  t = _useTranslation.t;