@firecms/core 3.3.0-canary.2064433 → 3.3.0-canary.3afa809

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.
@@ -412,8 +412,8 @@ export interface FireCMSTranslations {
412
412
  cms_users: string;
413
413
  roles_menu: string;
414
414
  project_settings: string;
415
- firestore_explorer: string;
416
- explore_your_firestore_data: string;
415
+ firestore_manager: string;
416
+ manage_your_firestore_data: string;
417
417
  build_admin_panel_in_minutes: string;
418
418
  go_live_instantly: string;
419
419
  create_production_ready_back_offices: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.3.0-canary.2064433",
4
+ "version": "3.3.0-canary.3afa809",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -53,8 +53,8 @@
53
53
  "@dnd-kit/core": "^6.3.1",
54
54
  "@dnd-kit/modifiers": "^9.0.0",
55
55
  "@dnd-kit/sortable": "^10.0.0",
56
- "@firecms/formex": "^3.3.0-canary.2064433",
57
- "@firecms/ui": "^3.3.0-canary.2064433",
56
+ "@firecms/formex": "^3.3.0-canary.3afa809",
57
+ "@firecms/ui": "^3.3.0-canary.3afa809",
58
58
  "@floating-ui/dom": "^1.7.4",
59
59
  "@radix-ui/react-portal": "^1.1.10",
60
60
  "@radix-ui/react-slot": "^1.2.4",
@@ -70,7 +70,13 @@ export const Scaffold = React.memo<PropsWithChildren<ScaffoldProps>>(
70
70
  const includeDrawer = drawerChildren.length > 0;
71
71
  const largeLayout = useLargeLayout();
72
72
 
73
- const [drawerOpen, setDrawerOpen] = React.useState(false);
73
+ const [drawerOpen, setDrawerOpen] = React.useState(() => {
74
+ try {
75
+ return localStorage.getItem("firecms_drawer_open") === "true";
76
+ } catch {
77
+ return false;
78
+ }
79
+ });
74
80
  const [onHover, setOnHover] = React.useState(false);
75
81
 
76
82
  const setOnHoverTrue = useCallback(() => setOnHover(true), []);
@@ -78,10 +84,16 @@ export const Scaffold = React.memo<PropsWithChildren<ScaffoldProps>>(
78
84
 
79
85
  const handleDrawerOpen = useCallback(() => {
80
86
  setDrawerOpen(true);
87
+ try {
88
+ localStorage.setItem("firecms_drawer_open", "true");
89
+ } catch { /* ignore */ }
81
90
  }, []);
82
91
 
83
92
  const handleDrawerClose = useCallback(() => {
84
93
  setDrawerOpen(false);
94
+ try {
95
+ localStorage.setItem("firecms_drawer_open", "false");
96
+ } catch { /* ignore */ }
85
97
  }, []);
86
98
 
87
99
  const computedDrawerOpen: boolean = drawerOpen || Boolean(largeLayout && autoOpenDrawer && onHover);
@@ -178,7 +178,9 @@ export const EntityCollectionView = React.memo(
178
178
 
179
179
  const collection = useMemo(() => {
180
180
  const userOverride = userConfigPersistence?.getCollectionConfig<M>(fullPath);
181
- return (userOverride ? mergeDeep(collectionProp, userOverride) : collectionProp) as EntityCollection<M>;
181
+ if (!userOverride) return collectionProp;
182
+ const { properties, ...rest } = userOverride;
183
+ return mergeDeep(collectionProp, rest) as EntityCollection<M>;
182
184
  }, [collectionProp, fullPath, userConfigPersistence?.getCollectionConfig]);
183
185
 
184
186
  const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE;
@@ -507,7 +509,8 @@ export const EntityCollectionView = React.memo(
507
509
  path: fullPath,
508
510
  propertyConfigs: customizationController.propertyConfigs,
509
511
  authController,
510
- }), [collection, fullPath]);
512
+ userConfigPersistence,
513
+ }), [collection, fullPath, userConfigPersistence]);
511
514
 
512
515
  // Check if Kanban view is possible (collection has at least one string enum property)
513
516
  const hasEnumProperty = useMemo(() => {
@@ -1,6 +1,6 @@
1
1
  import { useNavigate } from "react-router-dom";
2
2
 
3
- import { useCustomizationController, useFireCMSContext } from "../../hooks";
3
+ import { useCustomizationController, useFireCMSContext, useTranslation } from "../../hooks";
4
4
  import { NavigationEntry, PluginHomePageActionsProps } from "../../types";
5
5
  import { IconForView } from "../../util";
6
6
  import { useUserConfigurationPersistence } from "../../hooks/useUserConfigurationPersistence";
@@ -38,6 +38,7 @@ export function NavigationCardBinding({
38
38
  }) {
39
39
 
40
40
  const userConfigurationPersistence = useUserConfigurationPersistence();
41
+ const { t } = useTranslation();
41
42
  const collectionIcon = <IconForView collectionOrView={collection ?? view}/>;
42
43
 
43
44
  const navigate = useNavigate();
@@ -92,15 +93,17 @@ export function NavigationCardBinding({
92
93
  {actionsArray}
93
94
  </>
94
95
 
96
+ const translatedName = t(name);
97
+
95
98
  if (type === "admin") {
96
99
  return <SmallNavigationCard icon={collectionIcon}
97
- name={name}
100
+ name={translatedName}
98
101
  url={url}/>;
99
102
  }
100
103
 
101
104
  return <NavigationCard
102
105
  icon={collectionIcon}
103
- name={name}
106
+ name={translatedName}
104
107
  description={description}
105
108
  actions={actions}
106
109
  onClick={() => {
@@ -128,7 +128,7 @@ export function DefaultDrawer({
128
128
  }}
129
129
  key={entry.id}>
130
130
  {<IconForView collectionOrView={entry.view} />}
131
- {t(entry.name as any)}
131
+ {t(entry.name)}
132
132
  </MenuItem>)}
133
133
 
134
134
  </Menu>}
@@ -414,7 +414,11 @@ export function useBuildNavigationController<EC extends EntityCollection, USER e
414
414
  const baseCollection = getCollectionByPathOrId(removeInitialAndTrailingSlashes(idOrPath), collections);
415
415
 
416
416
  const userOverride = includeUserOverride ? userConfigPersistence?.getCollectionConfig(idOrPath) : undefined;
417
- const overriddenCollection = baseCollection ? mergeDeep(baseCollection, userOverride ?? {}) : undefined;
417
+ let overriddenCollection = baseCollection;
418
+ if (baseCollection && userOverride) {
419
+ const { properties, ...rest } = userOverride;
420
+ overriddenCollection = mergeDeep(baseCollection, rest);
421
+ }
418
422
 
419
423
  let result: Partial<EntityCollection> | undefined = overriddenCollection;
420
424
 
package/src/locales/de.ts CHANGED
@@ -437,8 +437,8 @@ export const de: FireCMSTranslations = {
437
437
  cms_users: "CMS-Benutzer",
438
438
  roles_menu: "Rollen",
439
439
  project_settings: "Projekteinstellungen",
440
- firestore_explorer: "Firestore-Explorer",
441
- explore_your_firestore_data: "Deine Firestore-Daten durchsuchen",
440
+ firestore_manager: "Firestore-Manager",
441
+ manage_your_firestore_data: "Deine Firestore-Daten verwalten",
442
442
 
443
443
  // ─── FireCMS Cloud Login ──────────────────────────────────────
444
444
  build_admin_panel_in_minutes: "Erstellen Sie Ihr Firebase Admin Panel in wenigen Minuten",
package/src/locales/en.ts CHANGED
@@ -445,8 +445,8 @@ export const en: FireCMSTranslations = {
445
445
  cms_users: "CMS Users",
446
446
  roles_menu: "Roles",
447
447
  project_settings: "Project settings",
448
- firestore_explorer: "Firestore Explorer",
449
- explore_your_firestore_data: "Explore your Firestore data",
448
+ firestore_manager: "Firestore Manager",
449
+ manage_your_firestore_data: "Manage your Firestore data",
450
450
 
451
451
  // ─── FireCMS Cloud Login ──────────────────────────────────────
452
452
  build_admin_panel_in_minutes: "Build Your Firebase Admin Panel in Minutes",
package/src/locales/es.ts CHANGED
@@ -445,8 +445,8 @@ export const es: FireCMSTranslations = {
445
445
  cms_users: "Usuarios del CMS",
446
446
  roles_menu: "Roles",
447
447
  project_settings: "Ajustes del proyecto",
448
- firestore_explorer: "Explorador de Firestore",
449
- explore_your_firestore_data: "Explora tus datos de Firestore",
448
+ firestore_manager: "Gestor de Firestore",
449
+ manage_your_firestore_data: "Gestiona tus datos de Firestore",
450
450
 
451
451
  // ─── FireCMS Cloud Login ──────────────────────────────────────
452
452
  build_admin_panel_in_minutes: "Crea tu panel de administración de Firebase en minutos",
package/src/locales/fr.ts CHANGED
@@ -437,8 +437,8 @@ export const fr: FireCMSTranslations = {
437
437
  cms_users: "Utilisateurs du CMS",
438
438
  roles_menu: "Rôles",
439
439
  project_settings: "Paramètres du projet",
440
- firestore_explorer: "Explorateur Firestore",
441
- explore_your_firestore_data: "Explorez vos données Firestore",
440
+ firestore_manager: "Gestionnaire Firestore",
441
+ manage_your_firestore_data: "Gérez vos données Firestore",
442
442
 
443
443
  // ─── FireCMS Cloud Login ──────────────────────────────────────
444
444
  build_admin_panel_in_minutes: "Créez votre panneau d'administration Firebase en quelques minutes",
package/src/locales/hi.ts CHANGED
@@ -437,8 +437,8 @@ export const hi: FireCMSTranslations = {
437
437
  cms_users: "CMS उपयोगकर्ता",
438
438
  roles_menu: "भूमिकाएँ",
439
439
  project_settings: "परियोजना सेटिंग",
440
- firestore_explorer: "Firestore एक्सप्लोरर",
441
- explore_your_firestore_data: "अपने Firestore डेटा का अन्वेषण करें",
440
+ firestore_manager: "Firestore मैनेजर",
441
+ manage_your_firestore_data: "अपने Firestore डेटा का प्रबंधन करें",
442
442
 
443
443
  // ─── FireCMS Cloud Login ──────────────────────────────────────
444
444
  build_admin_panel_in_minutes: "मिनटों में अपना Firebase एडमिन पैनल बनाएं",
package/src/locales/it.ts CHANGED
@@ -437,8 +437,8 @@ export const it: FireCMSTranslations = {
437
437
  cms_users: "Utenti CMS",
438
438
  roles_menu: "Ruoli",
439
439
  project_settings: "Impostazioni del progetto",
440
- firestore_explorer: "Esplora Firestore",
441
- explore_your_firestore_data: "Esplora i tuoi dati Firestore",
440
+ firestore_manager: "Gestore Firestore",
441
+ manage_your_firestore_data: "Gestisci i tuoi dati Firestore",
442
442
 
443
443
  // ─── FireCMS Cloud Login ──────────────────────────────────────
444
444
  build_admin_panel_in_minutes: "Crea il tuo pannello di amministrazione Firebase in pochi minuti",
package/src/locales/pt.ts CHANGED
@@ -442,8 +442,8 @@ export const pt: FireCMSTranslations = {
442
442
  cms_users: "Utilizadores do CMS",
443
443
  roles_menu: "Funções",
444
444
  project_settings: "Definições do projeto",
445
- firestore_explorer: "Explorador do Firestore",
446
- explore_your_firestore_data: "Explore os seus dados do Firestore",
445
+ firestore_manager: "Gerenciador do Firestore",
446
+ manage_your_firestore_data: "Gerencie os seus dados do Firestore",
447
447
 
448
448
  // ─── FireCMS Cloud Login ──────────────────────────────────────
449
449
  build_admin_panel_in_minutes: "Construa o Seu Painel de Administração Firebase em Minutos",
@@ -467,8 +467,8 @@ export interface FireCMSTranslations {
467
467
  cms_users: string;
468
468
  roles_menu: string;
469
469
  project_settings: string;
470
- firestore_explorer: string;
471
- explore_your_firestore_data: string;
470
+ firestore_manager: string;
471
+ manage_your_firestore_data: string;
472
472
 
473
473
  // ─── FireCMS Cloud Login ──────────────────────────────────────
474
474
  build_admin_panel_in_minutes: string;
@@ -90,8 +90,11 @@ export const resolveCollection = <M extends Record<string, any>,>
90
90
  .map(([id, property]) => ({ [id]: property }))
91
91
  .reduce((a, b) => ({ ...a, ...b }), {});
92
92
 
93
+ const { properties: overrideProps, ...restOverrides } = collectionOverride ?? {};
94
+
93
95
  return {
94
96
  ...collection,
97
+ ...restOverrides,
95
98
  properties: cleanedProperties,
96
99
  originalCollection: collection
97
100
  } as ResolvedEntityCollection<M>;