@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.
@@ -1,5 +1,15 @@
1
1
  {
2
2
  "neetoThemes": {
3
+ "entityType": {
4
+ "quiz": "Quiz",
5
+ "quiz_other": "Quizzes",
6
+ "form": "Form",
7
+ "form_other": "Forms",
8
+ "meeting": "Meeting",
9
+ "meeting_other": "Meetings",
10
+ "recording": "Recording",
11
+ "recording_other": "Recordings"
12
+ },
3
13
  "common": {
4
14
  "design": "Design",
5
15
  "preview": "Preview",
@@ -33,8 +43,8 @@
33
43
  },
34
44
  "message": {
35
45
  "deleteTheme_zero": "You are permanently deleting the theme \"{{name, anyCase}}\". Are you sure you want to proceed?",
36
- "deleteTheme_one": "You are permanently deleting the theme \"{{name, anyCase}}\". This theme is being used in one {{entityType, anyCase}}. {{entityType, anyCase}} using this theme would fall back to using the default theme \"Plain blue\". Are you sure you want to proceed?",
37
- "deleteTheme_other": "You are permanently deleting the theme \"{{name, anyCase}}\". This theme is being used in {{count}} {{entityType, anyCase}}. {{entityType, anyCase}}s using this theme would fall back to using the default theme \"Plain blue\". Are you sure you want to proceed?"
46
+ "deleteTheme_one": "You are permanently deleting the theme \"{{name, anyCase}}\". This theme is being used in one {{entityType}}. {{entityType, anyCase}} using this theme would fall back to using the default theme \"{{defaultThemeName, anyCase}}\". Are you sure you want to proceed?",
47
+ "deleteTheme_other": "You are permanently deleting the theme \"{{name, anyCase}}\". This theme is being used in {{count}} {{entityType}}. {{entityType, anyCase}} using this theme would fall back to using the default theme \"{{defaultThemeName, anyCase}}\". Are you sure you want to proceed?"
38
48
  }
39
49
  },
40
50
  "build": {
package/dist/index.cjs.js CHANGED
@@ -88,6 +88,7 @@ var useConfigStore = zustand.create(reactUtils.withImmutableActions(function (se
88
88
  entityType: "",
89
89
  entityId: "",
90
90
  variableNamesMap: {},
91
+ defaultThemeName: "Plain blue",
91
92
  isFetchingSchema: true,
92
93
  isTemplateThemesEnabled: false,
93
94
  setConfigState: set
@@ -346,10 +347,13 @@ var useThemeUtils = function useThemeUtils() {
346
347
  var _ref$schema = _ref.schema,
347
348
  themePropertiesSchema = _ref$schema === void 0 ? [] : _ref$schema,
348
349
  _ref$variableNamesMap = _ref.variableNamesMap,
349
- variableNamesMap = _ref$variableNamesMap === void 0 ? {} : _ref$variableNamesMap;
350
+ variableNamesMap = _ref$variableNamesMap === void 0 ? {} : _ref$variableNamesMap,
351
+ _ref$defaultThemeName = _ref.defaultThemeName,
352
+ defaultThemeName = _ref$defaultThemeName === void 0 ? "" : _ref$defaultThemeName;
350
353
  return setConfigState({
351
354
  themePropertiesSchema: themePropertiesSchema,
352
- variableNamesMap: variableNamesMap
355
+ variableNamesMap: variableNamesMap,
356
+ defaultThemeName: defaultThemeName
353
357
  });
354
358
  }
355
359
  }),
@@ -1695,7 +1699,7 @@ var TitleBar = function TitleBar(_ref) {
1695
1699
 
1696
1700
  var MemoizedAlert = /*#__PURE__*/react.memo(Alert__default["default"]);
1697
1701
  var Sidebar = function Sidebar(_ref) {
1698
- var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3;
1702
+ var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3, _themeToDelete$curren4;
1699
1703
  var thumbnail = _ref.thumbnail,
1700
1704
  onPropertiesChange = _ref.onPropertiesChange;
1701
1705
  var _useState = react.useState(DESIGN_SCREENS.THEMES),
@@ -1718,12 +1722,14 @@ var Sidebar = function Sidebar(_ref) {
1718
1722
  return {
1719
1723
  entityType: store["entityType"],
1720
1724
  entityId: store["entityId"],
1721
- isFetchingSchema: store["isFetchingSchema"]
1725
+ isFetchingSchema: store["isFetchingSchema"],
1726
+ defaultThemeName: store["defaultThemeName"]
1722
1727
  };
1723
1728
  }, shallow.shallow),
1724
1729
  entityType = _useConfigStore.entityType,
1725
1730
  entityId = _useConfigStore.entityId,
1726
- isFetchingSchema = _useConfigStore.isFetchingSchema;
1731
+ isFetchingSchema = _useConfigStore.isFetchingSchema,
1732
+ defaultThemeName = _useConfigStore.defaultThemeName;
1727
1733
  var _useThemeStore = useThemeStore(function (store) {
1728
1734
  return {
1729
1735
  setThemeState: store["setThemeState"]
@@ -1875,7 +1881,10 @@ var Sidebar = function Sidebar(_ref) {
1875
1881
  message: t("neetoThemes.alerts.message.deleteTheme", {
1876
1882
  name: (_themeToDelete$curren2 = themeToDelete.current) === null || _themeToDelete$curren2 === void 0 ? void 0 : _themeToDelete$curren2.name,
1877
1883
  count: (_themeToDelete$curren3 = themeToDelete.current) === null || _themeToDelete$curren3 === void 0 ? void 0 : _themeToDelete$curren3.appliedCount,
1878
- entityType: entityType
1884
+ defaultThemeName: defaultThemeName,
1885
+ entityType: t("neetoThemes.entityType.".concat(entityType.toLowerCase()), {
1886
+ count: (_themeToDelete$curren4 = themeToDelete.current) === null || _themeToDelete$curren4 === void 0 ? void 0 : _themeToDelete$curren4.appliedCount
1887
+ })
1879
1888
  }),
1880
1889
  onClose: handleCloseDeleteAlert,
1881
1890
  onSubmit: handleDeleteTheme