@bigbinary/neeto-themes-frontend 4.2.4-beta1 → 4.2.4-beta3

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/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-11-09T15:37:37.324Z
1
+ Built at 2026-11-09T17:20:16.688Z
@@ -1,5 +1,5 @@
1
1
  import { shallow } from 'zustand/shallow';
2
- import { Suspense, lazy, useState, useEffect, createElement, useRef, memo, useCallback, useMemo } from 'react';
2
+ import { Suspense, lazy, useState, useEffect, createElement, useMemo, useRef, memo, useCallback } from 'react';
3
3
  import { isPresent, hyphenate, findBy, findIndexBy, isNot, filterBy, snakeToCamelCase, isNotPresent, toLabelAndValue, capitalize, humanize, isNotEmpty, noop } from '@bigbinary/neeto-cist';
4
4
  import { withT, useQueryParams, useBreakpoints, PageTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
5
5
  import Spinner from '@bigbinary/neetoui/Spinner';
@@ -1474,9 +1474,13 @@ var Customize = function Customize(_ref) {
1474
1474
  _useListThemes$data2$ = _useListThemes$data2.defaultThemes,
1475
1475
  defaultThemes = _useListThemes$data2$ === void 0 ? [] : _useListThemes$data2$,
1476
1476
  isLoadingSystemThemes = _useListThemes.isLoading;
1477
- var themeToCustomize = isCustomizingSystemTheme ? buildSystemThemeCopy(findBy({
1477
+ var sourceTheme = isCustomizingSystemTheme ? findBy({
1478
1478
  id: sourceThemeId
1479
- }, defaultThemes)) : themeData;
1479
+ }, defaultThemes) : null;
1480
+ var systemThemeCopy = useMemo(function () {
1481
+ return buildSystemThemeCopy(sourceTheme);
1482
+ }, [sourceTheme === null || sourceTheme === void 0 ? void 0 : sourceTheme.id]);
1483
+ var themeToCustomize = isCustomizingSystemTheme ? systemThemeCopy : themeData;
1480
1484
  var isLoading = isFetchingSchema || isLoadingTheme || isCustomizingSystemTheme && isLoadingSystemThemes;
1481
1485
  var isThemeGlobalTheme = themeId && (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id) === themeId;
1482
1486
  var isCurrentThemeAndGlobalThemeSame = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === (globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.id);
@@ -1526,10 +1530,16 @@ var Customize = function Customize(_ref) {
1526
1530
  onApplyThemeSuccess === null || onApplyThemeSuccess === void 0 || onApplyThemeSuccess(theme);
1527
1531
  case 9:
1528
1532
  onCreateTheme(theme);
1533
+ if (isNewThemeRoute()) {
1534
+ _context.next = 12;
1535
+ break;
1536
+ }
1537
+ return _context.abrupt("return");
1538
+ case 12:
1529
1539
  history.replace(buildUrl(buildPathname(routes.themes.edit), {
1530
1540
  themeId: theme.id
1531
1541
  }));
1532
- case 11:
1542
+ case 13:
1533
1543
  case "end":
1534
1544
  return _context.stop();
1535
1545
  }