@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.
- package/dist/index.es.js +107 -61
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +107 -61
- package/dist/index.umd.js.map +1 -1
- package/dist/types/translations.d.ts +2 -2
- package/package.json +3 -3
- package/src/app/Scaffold.tsx +13 -1
- 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
|
};
|
|
@@ -12353,7 +12358,7 @@ function StorageUpload(t0) {
|
|
|
12353
12358
|
newValue.splice(fromIndex, 1);
|
|
12354
12359
|
newValue.splice(toIndex, 0, item);
|
|
12355
12360
|
setInternalValue(newValue);
|
|
12356
|
-
const fieldValue = newValue.filter(_temp3$4).map(_temp4$
|
|
12361
|
+
const fieldValue = newValue.filter(_temp3$4).map(_temp4$4);
|
|
12357
12362
|
onChange(fieldValue);
|
|
12358
12363
|
};
|
|
12359
12364
|
$[0] = multipleFilesSupported;
|
|
@@ -12547,7 +12552,7 @@ function _temp6$2(v_1) {
|
|
|
12547
12552
|
function _temp5$2(v_0) {
|
|
12548
12553
|
return !!v_0.storagePathOrDownloadUrl;
|
|
12549
12554
|
}
|
|
12550
|
-
function _temp4$
|
|
12555
|
+
function _temp4$4(e_0) {
|
|
12551
12556
|
return e_0.storagePathOrDownloadUrl;
|
|
12552
12557
|
}
|
|
12553
12558
|
function _temp3$4(e) {
|
|
@@ -18782,7 +18787,7 @@ function StringNumberFilterField(t0) {
|
|
|
18782
18787
|
let t11;
|
|
18783
18788
|
if ($[40] !== dataType || $[41] !== enumValues || $[42] !== internalValue || $[43] !== isNullOperation || $[44] !== multiple || $[45] !== name || $[46] !== operation || $[47] !== updateFilter) {
|
|
18784
18789
|
t11 = enumValues && multiple && /* @__PURE__ */ jsx(MultiSelect, { size: "medium", position: "item-aligned", value: Array.isArray(internalValue) ? internalValue.map(_temp3$3) : [], disabled: isNullOperation, onValueChange: (value_2) => {
|
|
18785
|
-
updateFilter(operation, dataType === "number" ? value_2.map(_temp4$
|
|
18790
|
+
updateFilter(operation, dataType === "number" ? value_2.map(_temp4$3) : value_2);
|
|
18786
18791
|
}, multiple, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { className: "absolute right-2 top-3", onClick: (e_2) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(CloseIcon, {}) }), children: enumValues.map((enumConfig_0) => /* @__PURE__ */ jsx(MultiSelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: String(enumConfig_0.id), enumValues, size: "small" }) }, `select_value_${name}_${enumConfig_0.id}`)) });
|
|
18787
18792
|
$[40] = dataType;
|
|
18788
18793
|
$[41] = enumValues;
|
|
@@ -18824,7 +18829,7 @@ function StringNumberFilterField(t0) {
|
|
|
18824
18829
|
}
|
|
18825
18830
|
return t13;
|
|
18826
18831
|
}
|
|
18827
|
-
function _temp4$
|
|
18832
|
+
function _temp4$3(v) {
|
|
18828
18833
|
return parseInt(v);
|
|
18829
18834
|
}
|
|
18830
18835
|
function _temp3$3(e_1) {
|
|
@@ -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;
|
|
@@ -30037,7 +30068,7 @@ function useBuildSideDialogsController() {
|
|
|
30037
30068
|
replace: true,
|
|
30038
30069
|
state: {
|
|
30039
30070
|
base_location: baseLocation,
|
|
30040
|
-
panels: updatedPanels.map(_temp4$
|
|
30071
|
+
panels: updatedPanels.map(_temp4$2)
|
|
30041
30072
|
}
|
|
30042
30073
|
});
|
|
30043
30074
|
}
|
|
@@ -30135,7 +30166,7 @@ function _temp6$1(p_4) {
|
|
|
30135
30166
|
function _temp5$1(p_3) {
|
|
30136
30167
|
return p_3.key;
|
|
30137
30168
|
}
|
|
30138
|
-
function _temp4$
|
|
30169
|
+
function _temp4$2(p_2) {
|
|
30139
30170
|
return p_2.key;
|
|
30140
30171
|
}
|
|
30141
30172
|
function _temp3$2(p_1) {
|
|
@@ -32281,7 +32312,7 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
|
|
|
32281
32312
|
const otherChildren = t3;
|
|
32282
32313
|
const includeDrawer = drawerChildren.length > 0;
|
|
32283
32314
|
const largeLayout = useLargeLayout();
|
|
32284
|
-
const [drawerOpen, setDrawerOpen] = React__default.useState(
|
|
32315
|
+
const [drawerOpen, setDrawerOpen] = React__default.useState(_temp4$1);
|
|
32285
32316
|
const [onHover, setOnHover] = React__default.useState(false);
|
|
32286
32317
|
let t4;
|
|
32287
32318
|
if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -32303,6 +32334,10 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
|
|
|
32303
32334
|
if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32304
32335
|
t6 = () => {
|
|
32305
32336
|
setDrawerOpen(true);
|
|
32337
|
+
try {
|
|
32338
|
+
localStorage.setItem("firecms_drawer_open", "true");
|
|
32339
|
+
} catch {
|
|
32340
|
+
}
|
|
32306
32341
|
};
|
|
32307
32342
|
$[8] = t6;
|
|
32308
32343
|
} else {
|
|
@@ -32313,6 +32348,10 @@ const Scaffold = React__default.memo(function Scaffold2(props) {
|
|
|
32313
32348
|
if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32314
32349
|
t7 = () => {
|
|
32315
32350
|
setDrawerOpen(false);
|
|
32351
|
+
try {
|
|
32352
|
+
localStorage.setItem("firecms_drawer_open", "false");
|
|
32353
|
+
} catch {
|
|
32354
|
+
}
|
|
32316
32355
|
};
|
|
32317
32356
|
$[9] = t7;
|
|
32318
32357
|
} else {
|
|
@@ -32665,6 +32704,13 @@ function _temp2$1(child_0) {
|
|
|
32665
32704
|
function _temp3$1(child_1) {
|
|
32666
32705
|
return child_1.type.componentType !== "Drawer" && child_1.type.componentType !== "AppBar";
|
|
32667
32706
|
}
|
|
32707
|
+
function _temp4$1() {
|
|
32708
|
+
try {
|
|
32709
|
+
return localStorage.getItem("firecms_drawer_open") === "true";
|
|
32710
|
+
} catch {
|
|
32711
|
+
return false;
|
|
32712
|
+
}
|
|
32713
|
+
}
|
|
32668
32714
|
const en = {
|
|
32669
32715
|
// ─── Form actions ────────────────────────────────────────────
|
|
32670
32716
|
save: "Save",
|
|
@@ -33068,8 +33114,8 @@ const en = {
|
|
|
33068
33114
|
cms_users: "CMS Users",
|
|
33069
33115
|
roles_menu: "Roles",
|
|
33070
33116
|
project_settings: "Project settings",
|
|
33071
|
-
|
|
33072
|
-
|
|
33117
|
+
firestore_manager: "Firestore Manager",
|
|
33118
|
+
manage_your_firestore_data: "Manage your Firestore data",
|
|
33073
33119
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
33074
33120
|
build_admin_panel_in_minutes: "Build Your Firebase Admin Panel in Minutes",
|
|
33075
33121
|
go_live_instantly: "Go live instantly:",
|
|
@@ -33739,8 +33785,8 @@ const es = {
|
|
|
33739
33785
|
cms_users: "Usuarios del CMS",
|
|
33740
33786
|
roles_menu: "Roles",
|
|
33741
33787
|
project_settings: "Ajustes del proyecto",
|
|
33742
|
-
|
|
33743
|
-
|
|
33788
|
+
firestore_manager: "Gestor de Firestore",
|
|
33789
|
+
manage_your_firestore_data: "Gestiona tus datos de Firestore",
|
|
33744
33790
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
33745
33791
|
build_admin_panel_in_minutes: "Crea tu panel de administración de Firebase en minutos",
|
|
33746
33792
|
go_live_instantly: "En vivo al instante:",
|
|
@@ -34410,8 +34456,8 @@ const de = {
|
|
|
34410
34456
|
cms_users: "CMS-Benutzer",
|
|
34411
34457
|
roles_menu: "Rollen",
|
|
34412
34458
|
project_settings: "Projekteinstellungen",
|
|
34413
|
-
|
|
34414
|
-
|
|
34459
|
+
firestore_manager: "Firestore-Manager",
|
|
34460
|
+
manage_your_firestore_data: "Deine Firestore-Daten verwalten",
|
|
34415
34461
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
34416
34462
|
build_admin_panel_in_minutes: "Erstellen Sie Ihr Firebase Admin Panel in wenigen Minuten",
|
|
34417
34463
|
go_live_instantly: "Sofort live gehen:",
|
|
@@ -35079,8 +35125,8 @@ const fr = {
|
|
|
35079
35125
|
cms_users: "Utilisateurs du CMS",
|
|
35080
35126
|
roles_menu: "Rôles",
|
|
35081
35127
|
project_settings: "Paramètres du projet",
|
|
35082
|
-
|
|
35083
|
-
|
|
35128
|
+
firestore_manager: "Gestionnaire Firestore",
|
|
35129
|
+
manage_your_firestore_data: "Gérez vos données Firestore",
|
|
35084
35130
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
35085
35131
|
build_admin_panel_in_minutes: "Créez votre panneau d'administration Firebase en quelques minutes",
|
|
35086
35132
|
go_live_instantly: "Mise en ligne immédiate :",
|
|
@@ -35748,8 +35794,8 @@ const it = {
|
|
|
35748
35794
|
cms_users: "Utenti CMS",
|
|
35749
35795
|
roles_menu: "Ruoli",
|
|
35750
35796
|
project_settings: "Impostazioni del progetto",
|
|
35751
|
-
|
|
35752
|
-
|
|
35797
|
+
firestore_manager: "Gestore Firestore",
|
|
35798
|
+
manage_your_firestore_data: "Gestisci i tuoi dati Firestore",
|
|
35753
35799
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
35754
35800
|
build_admin_panel_in_minutes: "Crea il tuo pannello di amministrazione Firebase in pochi minuti",
|
|
35755
35801
|
go_live_instantly: "Online in un istante:",
|
|
@@ -36417,8 +36463,8 @@ const hi = {
|
|
|
36417
36463
|
cms_users: "CMS उपयोगकर्ता",
|
|
36418
36464
|
roles_menu: "भूमिकाएँ",
|
|
36419
36465
|
project_settings: "परियोजना सेटिंग",
|
|
36420
|
-
|
|
36421
|
-
|
|
36466
|
+
firestore_manager: "Firestore मैनेजर",
|
|
36467
|
+
manage_your_firestore_data: "अपने Firestore डेटा का प्रबंधन करें",
|
|
36422
36468
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
36423
36469
|
build_admin_panel_in_minutes: "मिनटों में अपना Firebase एडमिन पैनल बनाएं",
|
|
36424
36470
|
go_live_instantly: "तुरंत लाइव जाएं:",
|
|
@@ -37086,8 +37132,8 @@ const pt = {
|
|
|
37086
37132
|
cms_users: "Utilizadores do CMS",
|
|
37087
37133
|
roles_menu: "Funções",
|
|
37088
37134
|
project_settings: "Definições do projeto",
|
|
37089
|
-
|
|
37090
|
-
|
|
37135
|
+
firestore_manager: "Gerenciador do Firestore",
|
|
37136
|
+
manage_your_firestore_data: "Gerencie os seus dados do Firestore",
|
|
37091
37137
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
37092
37138
|
build_admin_panel_in_minutes: "Construa o Seu Painel de Administração Firebase em Minutos",
|
|
37093
37139
|
go_live_instantly: "Entre em produção instantaneamente:",
|