@firecms/core 3.3.0-canary.7e3431b → 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 +85 -54
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +85 -54
- package/dist/index.umd.js.map +1 -1
- package/dist/types/translations.d.ts +2 -2
- package/package.json +3 -3
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +5 -2
- package/src/components/HomePage/NavigationCardBinding.tsx +6 -3
- package/src/core/DefaultDrawer.tsx +1 -1
- package/src/hooks/useBuildNavigationController.tsx +5 -1
- package/src/locales/de.ts +2 -2
- package/src/locales/en.ts +2 -2
- package/src/locales/es.ts +2 -2
- package/src/locales/fr.ts +2 -2
- package/src/locales/hi.ts +2 -2
- package/src/locales/it.ts +2 -2
- package/src/locales/pt.ts +2 -2
- package/src/types/translations.ts +2 -2
- package/src/util/resolutions.ts +3 -0
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(
|
|
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
|
|
21005
|
-
if ($[
|
|
21006
|
-
|
|
21007
|
-
$[
|
|
21008
|
-
$[
|
|
21009
|
-
$[
|
|
21010
|
-
$[
|
|
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
|
-
|
|
21030
|
+
t72 = $[24];
|
|
21013
21031
|
}
|
|
21014
|
-
return
|
|
21032
|
+
return t72;
|
|
21015
21033
|
}
|
|
21016
|
-
let
|
|
21017
|
-
if ($[
|
|
21018
|
-
|
|
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
|
-
$[
|
|
21026
|
-
$[
|
|
21027
|
-
$[
|
|
21028
|
-
$[
|
|
21029
|
-
$[
|
|
21030
|
-
$[
|
|
21043
|
+
$[25] = navigate;
|
|
21044
|
+
$[26] = onClick;
|
|
21045
|
+
$[27] = path;
|
|
21046
|
+
$[28] = url;
|
|
21047
|
+
$[29] = userConfigurationPersistence;
|
|
21048
|
+
$[30] = t7;
|
|
21031
21049
|
} else {
|
|
21032
|
-
|
|
21050
|
+
t7 = $[30];
|
|
21033
21051
|
}
|
|
21034
|
-
let
|
|
21035
|
-
if ($[
|
|
21036
|
-
|
|
21037
|
-
$[
|
|
21038
|
-
$[
|
|
21039
|
-
$[
|
|
21040
|
-
$[
|
|
21041
|
-
$[
|
|
21042
|
-
$[
|
|
21043
|
-
$[
|
|
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
|
-
|
|
21063
|
+
t8 = $[37];
|
|
21046
21064
|
}
|
|
21047
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
25803
|
+
authController,
|
|
25804
|
+
userConfigPersistence
|
|
25805
|
+
}), [collection, fullPath, userConfigPersistence]);
|
|
25782
25806
|
const hasEnumProperty = useMemo(() => {
|
|
25783
|
-
const
|
|
25784
|
-
return Object.values(
|
|
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
|
|
25796
|
-
for (const [key_0, property_0] of Object.entries(
|
|
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
|
-
|
|
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
|
-
|
|
33072
|
-
|
|
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
|
-
|
|
33743
|
-
|
|
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
|
-
|
|
34414
|
-
|
|
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
|
-
|
|
35083
|
-
|
|
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
|
-
|
|
35752
|
-
|
|
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
|
-
|
|
36421
|
-
|
|
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
|
-
|
|
37090
|
-
|
|
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:",
|