@bigbinary/neeto-themes-frontend 1.2.5 → 1.2.7

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/index.js CHANGED
@@ -42,6 +42,7 @@ var useConfigStore = create$1(withImmutableActions(function (set) {
42
42
  entityType: "",
43
43
  entityId: "",
44
44
  variableNamesMap: {},
45
+ defaultThemeName: "Plain blue",
45
46
  isFetchingSchema: true,
46
47
  isTemplateThemesEnabled: false,
47
48
  setConfigState: set
@@ -300,10 +301,13 @@ var useThemeUtils = function useThemeUtils() {
300
301
  var _ref$schema = _ref.schema,
301
302
  themePropertiesSchema = _ref$schema === void 0 ? [] : _ref$schema,
302
303
  _ref$variableNamesMap = _ref.variableNamesMap,
303
- variableNamesMap = _ref$variableNamesMap === void 0 ? {} : _ref$variableNamesMap;
304
+ variableNamesMap = _ref$variableNamesMap === void 0 ? {} : _ref$variableNamesMap,
305
+ _ref$defaultThemeName = _ref.defaultThemeName,
306
+ defaultThemeName = _ref$defaultThemeName === void 0 ? "" : _ref$defaultThemeName;
304
307
  return setConfigState({
305
308
  themePropertiesSchema: themePropertiesSchema,
306
- variableNamesMap: variableNamesMap
309
+ variableNamesMap: variableNamesMap,
310
+ defaultThemeName: defaultThemeName
307
311
  });
308
312
  }
309
313
  }),
@@ -1649,7 +1653,7 @@ var TitleBar = function TitleBar(_ref) {
1649
1653
 
1650
1654
  var MemoizedAlert = /*#__PURE__*/memo(Alert);
1651
1655
  var Sidebar = function Sidebar(_ref) {
1652
- var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3;
1656
+ var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3, _themeToDelete$curren4;
1653
1657
  var thumbnail = _ref.thumbnail,
1654
1658
  onPropertiesChange = _ref.onPropertiesChange;
1655
1659
  var _useState = useState(DESIGN_SCREENS.THEMES),
@@ -1672,12 +1676,14 @@ var Sidebar = function Sidebar(_ref) {
1672
1676
  return {
1673
1677
  entityType: store["entityType"],
1674
1678
  entityId: store["entityId"],
1675
- isFetchingSchema: store["isFetchingSchema"]
1679
+ isFetchingSchema: store["isFetchingSchema"],
1680
+ defaultThemeName: store["defaultThemeName"]
1676
1681
  };
1677
1682
  }, shallow),
1678
1683
  entityType = _useConfigStore.entityType,
1679
1684
  entityId = _useConfigStore.entityId,
1680
- isFetchingSchema = _useConfigStore.isFetchingSchema;
1685
+ isFetchingSchema = _useConfigStore.isFetchingSchema,
1686
+ defaultThemeName = _useConfigStore.defaultThemeName;
1681
1687
  var _useThemeStore = useThemeStore(function (store) {
1682
1688
  return {
1683
1689
  setThemeState: store["setThemeState"]
@@ -1829,7 +1835,10 @@ var Sidebar = function Sidebar(_ref) {
1829
1835
  message: t("neetoThemes.alerts.message.deleteTheme", {
1830
1836
  name: (_themeToDelete$curren2 = themeToDelete.current) === null || _themeToDelete$curren2 === void 0 ? void 0 : _themeToDelete$curren2.name,
1831
1837
  count: (_themeToDelete$curren3 = themeToDelete.current) === null || _themeToDelete$curren3 === void 0 ? void 0 : _themeToDelete$curren3.appliedCount,
1832
- entityType: entityType
1838
+ defaultThemeName: defaultThemeName,
1839
+ entityType: t("neetoThemes.entityType.".concat(entityType.toLowerCase()), {
1840
+ count: (_themeToDelete$curren4 = themeToDelete.current) === null || _themeToDelete$curren4 === void 0 ? void 0 : _themeToDelete$curren4.appliedCount
1841
+ })
1833
1842
  }),
1834
1843
  onClose: handleCloseDeleteAlert,
1835
1844
  onSubmit: handleDeleteTheme