@firecms/core 3.3.0-canary.69e5ab1 → 3.3.0-canary.9452021

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.es.js CHANGED
@@ -849,8 +849,13 @@ const resolveCollection = ({
849
849
  ...a,
850
850
  ...b
851
851
  }), {});
852
+ const {
853
+ properties: overrideProps,
854
+ ...restOverrides
855
+ } = collectionOverride ?? {};
852
856
  return {
853
857
  ...collection,
858
+ ...restOverrides,
854
859
  properties: cleanedProperties,
855
860
  originalCollection: collection
856
861
  };
@@ -20915,7 +20920,7 @@ function SmallNavigationCard(t0) {
20915
20920
  return t5;
20916
20921
  }
20917
20922
  function NavigationCardBinding(t0) {
20918
- const $ = c(35);
20923
+ const $ = c(38);
20919
20924
  const {
20920
20925
  path,
20921
20926
  collection,
@@ -20928,6 +20933,9 @@ function NavigationCardBinding(t0) {
20928
20933
  shrink
20929
20934
  } = t0;
20930
20935
  const userConfigurationPersistence = useUserConfigurationPersistence();
20936
+ const {
20937
+ t
20938
+ } = useTranslation();
20931
20939
  const t1 = collection ?? view;
20932
20940
  let t2;
20933
20941
  if ($[0] !== t1) {
@@ -21000,51 +21008,61 @@ function NavigationCardBinding(t0) {
21000
21008
  t5 = $[13];
21001
21009
  }
21002
21010
  const actions = t5;
21011
+ let t6;
21012
+ if ($[18] !== name || $[19] !== t) {
21013
+ t6 = t(name);
21014
+ $[18] = name;
21015
+ $[19] = t;
21016
+ $[20] = t6;
21017
+ } else {
21018
+ t6 = $[20];
21019
+ }
21020
+ const translatedName = t6;
21003
21021
  if (type === "admin") {
21004
- let t62;
21005
- if ($[18] !== collectionIcon || $[19] !== name || $[20] !== url) {
21006
- t62 = /* @__PURE__ */ jsx(SmallNavigationCard, { icon: collectionIcon, name, url });
21007
- $[18] = collectionIcon;
21008
- $[19] = name;
21009
- $[20] = url;
21010
- $[21] = t62;
21022
+ let t72;
21023
+ if ($[21] !== collectionIcon || $[22] !== translatedName || $[23] !== url) {
21024
+ t72 = /* @__PURE__ */ jsx(SmallNavigationCard, { icon: collectionIcon, name: translatedName, url });
21025
+ $[21] = collectionIcon;
21026
+ $[22] = translatedName;
21027
+ $[23] = url;
21028
+ $[24] = t72;
21011
21029
  } else {
21012
- t62 = $[21];
21030
+ t72 = $[24];
21013
21031
  }
21014
- return t62;
21032
+ return t72;
21015
21033
  }
21016
- let t6;
21017
- if ($[22] !== navigate || $[23] !== onClick || $[24] !== path || $[25] !== url || $[26] !== userConfigurationPersistence) {
21018
- t6 = () => {
21034
+ let t7;
21035
+ if ($[25] !== navigate || $[26] !== onClick || $[27] !== path || $[28] !== url || $[29] !== userConfigurationPersistence) {
21036
+ t7 = () => {
21019
21037
  onClick?.();
21020
21038
  navigate(url);
21021
21039
  if (userConfigurationPersistence) {
21022
21040
  userConfigurationPersistence.setRecentlyVisitedPaths([path, ...(userConfigurationPersistence.recentlyVisitedPaths ?? []).filter((p_0) => p_0 !== path)]);
21023
21041
  }
21024
21042
  };
21025
- $[22] = navigate;
21026
- $[23] = onClick;
21027
- $[24] = path;
21028
- $[25] = url;
21029
- $[26] = userConfigurationPersistence;
21030
- $[27] = t6;
21043
+ $[25] = navigate;
21044
+ $[26] = onClick;
21045
+ $[27] = path;
21046
+ $[28] = url;
21047
+ $[29] = userConfigurationPersistence;
21048
+ $[30] = t7;
21031
21049
  } else {
21032
- t6 = $[27];
21050
+ t7 = $[30];
21033
21051
  }
21034
- let t7;
21035
- if ($[28] !== actions || $[29] !== collectionIcon || $[30] !== description || $[31] !== name || $[32] !== shrink || $[33] !== t6) {
21036
- t7 = /* @__PURE__ */ jsx(NavigationCard, { icon: collectionIcon, name, description, actions, onClick: t6, shrink });
21037
- $[28] = actions;
21038
- $[29] = collectionIcon;
21039
- $[30] = description;
21040
- $[31] = name;
21041
- $[32] = shrink;
21042
- $[33] = t6;
21043
- $[34] = t7;
21052
+ let t8;
21053
+ if ($[31] !== actions || $[32] !== collectionIcon || $[33] !== description || $[34] !== shrink || $[35] !== t7 || $[36] !== translatedName) {
21054
+ t8 = /* @__PURE__ */ jsx(NavigationCard, { icon: collectionIcon, name: translatedName, description, actions, onClick: t7, shrink });
21055
+ $[31] = actions;
21056
+ $[32] = collectionIcon;
21057
+ $[33] = description;
21058
+ $[34] = shrink;
21059
+ $[35] = t7;
21060
+ $[36] = translatedName;
21061
+ $[37] = t8;
21044
21062
  } else {
21045
- t7 = $[34];
21063
+ t8 = $[37];
21046
21064
  }
21047
- return t7;
21065
+ return t8;
21048
21066
  }
21049
21067
  const animateLayoutChanges = (args) => defaultAnimateLayoutChanges({
21050
21068
  ...args,
@@ -25523,7 +25541,12 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
25523
25541
  const scrollRestoration = useScrollRestoration();
25524
25542
  const collection = useMemo(() => {
25525
25543
  const userOverride = userConfigPersistence?.getCollectionConfig(fullPath);
25526
- return userOverride ? mergeDeep(collectionProp, userOverride) : collectionProp;
25544
+ if (!userOverride) return collectionProp;
25545
+ const {
25546
+ properties,
25547
+ ...rest
25548
+ } = userOverride;
25549
+ return mergeDeep(collectionProp, rest);
25527
25550
  }, [collectionProp, fullPath, userConfigPersistence?.getCollectionConfig]);
25528
25551
  const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE;
25529
25552
  const collectionRef = React__default.useRef(collection);
@@ -25777,11 +25800,12 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
25777
25800
  collection,
25778
25801
  path: fullPath,
25779
25802
  propertyConfigs: customizationController.propertyConfigs,
25780
- authController
25781
- }), [collection, fullPath]);
25803
+ authController,
25804
+ userConfigPersistence
25805
+ }), [collection, fullPath, userConfigPersistence]);
25782
25806
  const hasEnumProperty = useMemo(() => {
25783
- const properties = resolvedCollection.properties;
25784
- return Object.values(properties).some((prop) => prop && prop.dataType === "string" && prop.enumValues);
25807
+ const properties_0 = resolvedCollection.properties;
25808
+ return Object.values(properties_0).some((prop) => prop && prop.dataType === "string" && prop.enumValues);
25785
25809
  }, [resolvedCollection.properties]);
25786
25810
  const enabledViews = useMemo(() => {
25787
25811
  const configured = collection.enabledViews ?? ["table", "cards", "kanban"];
@@ -25792,8 +25816,8 @@ const EntityCollectionView$1 = React__default.memo(function EntityCollectionView
25792
25816
  }, [collection.enabledViews, hasEnumProperty]);
25793
25817
  const kanbanPropertyOptions = useMemo(() => {
25794
25818
  const options = [];
25795
- const properties_0 = resolvedCollection.properties;
25796
- for (const [key_0, property_0] of Object.entries(properties_0)) {
25819
+ const properties_1 = resolvedCollection.properties;
25820
+ for (const [key_0, property_0] of Object.entries(properties_1)) {
25797
25821
  const prop_0 = property_0;
25798
25822
  if (prop_0 && prop_0.dataType === "string" && prop_0.enumValues) {
25799
25823
  options.push({
@@ -28096,7 +28120,14 @@ function useBuildNavigationController(props) {
28096
28120
  if (!collections_0) return void 0;
28097
28121
  const baseCollection = getCollectionByPathOrId(removeInitialAndTrailingSlashes(idOrPath), collections_0);
28098
28122
  const userOverride = includeUserOverride ? userConfigPersistence?.getCollectionConfig(idOrPath) : void 0;
28099
- const overriddenCollection = baseCollection ? mergeDeep(baseCollection, userOverride ?? {}) : void 0;
28123
+ let overriddenCollection = baseCollection;
28124
+ if (baseCollection && userOverride) {
28125
+ const {
28126
+ properties,
28127
+ ...rest
28128
+ } = userOverride;
28129
+ overriddenCollection = mergeDeep(baseCollection, rest);
28130
+ }
28100
28131
  let result = overriddenCollection;
28101
28132
  if (overriddenCollection) {
28102
28133
  const subcollections = overriddenCollection.subcollections;
@@ -33068,8 +33099,8 @@ const en = {
33068
33099
  cms_users: "CMS Users",
33069
33100
  roles_menu: "Roles",
33070
33101
  project_settings: "Project settings",
33071
- firestore_explorer: "Firestore Explorer",
33072
- explore_your_firestore_data: "Explore your Firestore data",
33102
+ firestore_manager: "Firestore Manager",
33103
+ manage_your_firestore_data: "Manage your Firestore data",
33073
33104
  // ─── FireCMS Cloud Login ──────────────────────────────────────
33074
33105
  build_admin_panel_in_minutes: "Build Your Firebase Admin Panel in Minutes",
33075
33106
  go_live_instantly: "Go live instantly:",
@@ -33739,8 +33770,8 @@ const es = {
33739
33770
  cms_users: "Usuarios del CMS",
33740
33771
  roles_menu: "Roles",
33741
33772
  project_settings: "Ajustes del proyecto",
33742
- firestore_explorer: "Explorador de Firestore",
33743
- explore_your_firestore_data: "Explora tus datos de Firestore",
33773
+ firestore_manager: "Gestor de Firestore",
33774
+ manage_your_firestore_data: "Gestiona tus datos de Firestore",
33744
33775
  // ─── FireCMS Cloud Login ──────────────────────────────────────
33745
33776
  build_admin_panel_in_minutes: "Crea tu panel de administración de Firebase en minutos",
33746
33777
  go_live_instantly: "En vivo al instante:",
@@ -34410,8 +34441,8 @@ const de = {
34410
34441
  cms_users: "CMS-Benutzer",
34411
34442
  roles_menu: "Rollen",
34412
34443
  project_settings: "Projekteinstellungen",
34413
- firestore_explorer: "Firestore-Explorer",
34414
- explore_your_firestore_data: "Deine Firestore-Daten durchsuchen",
34444
+ firestore_manager: "Firestore-Manager",
34445
+ manage_your_firestore_data: "Deine Firestore-Daten verwalten",
34415
34446
  // ─── FireCMS Cloud Login ──────────────────────────────────────
34416
34447
  build_admin_panel_in_minutes: "Erstellen Sie Ihr Firebase Admin Panel in wenigen Minuten",
34417
34448
  go_live_instantly: "Sofort live gehen:",
@@ -35079,8 +35110,8 @@ const fr = {
35079
35110
  cms_users: "Utilisateurs du CMS",
35080
35111
  roles_menu: "Rôles",
35081
35112
  project_settings: "Paramètres du projet",
35082
- firestore_explorer: "Explorateur Firestore",
35083
- explore_your_firestore_data: "Explorez vos données Firestore",
35113
+ firestore_manager: "Gestionnaire Firestore",
35114
+ manage_your_firestore_data: "Gérez vos données Firestore",
35084
35115
  // ─── FireCMS Cloud Login ──────────────────────────────────────
35085
35116
  build_admin_panel_in_minutes: "Créez votre panneau d'administration Firebase en quelques minutes",
35086
35117
  go_live_instantly: "Mise en ligne immédiate :",
@@ -35748,8 +35779,8 @@ const it = {
35748
35779
  cms_users: "Utenti CMS",
35749
35780
  roles_menu: "Ruoli",
35750
35781
  project_settings: "Impostazioni del progetto",
35751
- firestore_explorer: "Esplora Firestore",
35752
- explore_your_firestore_data: "Esplora i tuoi dati Firestore",
35782
+ firestore_manager: "Gestore Firestore",
35783
+ manage_your_firestore_data: "Gestisci i tuoi dati Firestore",
35753
35784
  // ─── FireCMS Cloud Login ──────────────────────────────────────
35754
35785
  build_admin_panel_in_minutes: "Crea il tuo pannello di amministrazione Firebase in pochi minuti",
35755
35786
  go_live_instantly: "Online in un istante:",
@@ -36417,8 +36448,8 @@ const hi = {
36417
36448
  cms_users: "CMS उपयोगकर्ता",
36418
36449
  roles_menu: "भूमिकाएँ",
36419
36450
  project_settings: "परियोजना सेटिंग",
36420
- firestore_explorer: "Firestore एक्सप्लोरर",
36421
- explore_your_firestore_data: "अपने Firestore डेटा का अन्वेषण करें",
36451
+ firestore_manager: "Firestore मैनेजर",
36452
+ manage_your_firestore_data: "अपने Firestore डेटा का प्रबंधन करें",
36422
36453
  // ─── FireCMS Cloud Login ──────────────────────────────────────
36423
36454
  build_admin_panel_in_minutes: "मिनटों में अपना Firebase एडमिन पैनल बनाएं",
36424
36455
  go_live_instantly: "तुरंत लाइव जाएं:",
@@ -37086,8 +37117,8 @@ const pt = {
37086
37117
  cms_users: "Utilizadores do CMS",
37087
37118
  roles_menu: "Funções",
37088
37119
  project_settings: "Definições do projeto",
37089
- firestore_explorer: "Explorador do Firestore",
37090
- explore_your_firestore_data: "Explore os seus dados do Firestore",
37120
+ firestore_manager: "Gerenciador do Firestore",
37121
+ manage_your_firestore_data: "Gerencie os seus dados do Firestore",
37091
37122
  // ─── FireCMS Cloud Login ──────────────────────────────────────
37092
37123
  build_admin_panel_in_minutes: "Construa o Seu Painel de Administração Firebase em Minutos",
37093
37124
  go_live_instantly: "Entre em produção instantaneamente:",