@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.umd.js
CHANGED
|
@@ -826,8 +826,13 @@
|
|
|
826
826
|
...a,
|
|
827
827
|
...b
|
|
828
828
|
}), {});
|
|
829
|
+
const {
|
|
830
|
+
properties: overrideProps,
|
|
831
|
+
...restOverrides
|
|
832
|
+
} = collectionOverride ?? {};
|
|
829
833
|
return {
|
|
830
834
|
...collection,
|
|
835
|
+
...restOverrides,
|
|
831
836
|
properties: cleanedProperties,
|
|
832
837
|
originalCollection: collection
|
|
833
838
|
};
|
|
@@ -12330,7 +12335,7 @@
|
|
|
12330
12335
|
newValue.splice(fromIndex, 1);
|
|
12331
12336
|
newValue.splice(toIndex, 0, item);
|
|
12332
12337
|
setInternalValue(newValue);
|
|
12333
|
-
const fieldValue = newValue.filter(_temp3$4).map(_temp4$
|
|
12338
|
+
const fieldValue = newValue.filter(_temp3$4).map(_temp4$4);
|
|
12334
12339
|
onChange(fieldValue);
|
|
12335
12340
|
};
|
|
12336
12341
|
$[0] = multipleFilesSupported;
|
|
@@ -12524,7 +12529,7 @@
|
|
|
12524
12529
|
function _temp5$2(v_0) {
|
|
12525
12530
|
return !!v_0.storagePathOrDownloadUrl;
|
|
12526
12531
|
}
|
|
12527
|
-
function _temp4$
|
|
12532
|
+
function _temp4$4(e_0) {
|
|
12528
12533
|
return e_0.storagePathOrDownloadUrl;
|
|
12529
12534
|
}
|
|
12530
12535
|
function _temp3$4(e) {
|
|
@@ -18759,7 +18764,7 @@
|
|
|
18759
18764
|
let t11;
|
|
18760
18765
|
if ($[40] !== dataType || $[41] !== enumValues || $[42] !== internalValue || $[43] !== isNullOperation || $[44] !== multiple || $[45] !== name || $[46] !== operation || $[47] !== updateFilter) {
|
|
18761
18766
|
t11 = enumValues && multiple && /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { size: "medium", position: "item-aligned", value: Array.isArray(internalValue) ? internalValue.map(_temp3$3) : [], disabled: isNullOperation, onValueChange: (value_2) => {
|
|
18762
|
-
updateFilter(operation, dataType === "number" ? value_2.map(_temp4$
|
|
18767
|
+
updateFilter(operation, dataType === "number" ? value_2.map(_temp4$3) : value_2);
|
|
18763
18768
|
}, multiple, endAdornment: internalValue && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "absolute right-2 top-3", onClick: (e_2) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, {}) }), children: enumValues.map((enumConfig_0) => /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsxRuntime.jsx(EnumValuesChip, { enumKey: String(enumConfig_0.id), enumValues, size: "small" }) }, `select_value_${name}_${enumConfig_0.id}`)) });
|
|
18764
18769
|
$[40] = dataType;
|
|
18765
18770
|
$[41] = enumValues;
|
|
@@ -18801,7 +18806,7 @@
|
|
|
18801
18806
|
}
|
|
18802
18807
|
return t13;
|
|
18803
18808
|
}
|
|
18804
|
-
function _temp4$
|
|
18809
|
+
function _temp4$3(v) {
|
|
18805
18810
|
return parseInt(v);
|
|
18806
18811
|
}
|
|
18807
18812
|
function _temp3$3(e_1) {
|
|
@@ -20892,7 +20897,7 @@
|
|
|
20892
20897
|
return t5;
|
|
20893
20898
|
}
|
|
20894
20899
|
function NavigationCardBinding(t0) {
|
|
20895
|
-
const $ = reactCompilerRuntime.c(
|
|
20900
|
+
const $ = reactCompilerRuntime.c(38);
|
|
20896
20901
|
const {
|
|
20897
20902
|
path,
|
|
20898
20903
|
collection,
|
|
@@ -20905,6 +20910,9 @@
|
|
|
20905
20910
|
shrink
|
|
20906
20911
|
} = t0;
|
|
20907
20912
|
const userConfigurationPersistence = useUserConfigurationPersistence();
|
|
20913
|
+
const {
|
|
20914
|
+
t
|
|
20915
|
+
} = useTranslation();
|
|
20908
20916
|
const t1 = collection ?? view;
|
|
20909
20917
|
let t2;
|
|
20910
20918
|
if ($[0] !== t1) {
|
|
@@ -20977,51 +20985,61 @@
|
|
|
20977
20985
|
t5 = $[13];
|
|
20978
20986
|
}
|
|
20979
20987
|
const actions = t5;
|
|
20988
|
+
let t6;
|
|
20989
|
+
if ($[18] !== name || $[19] !== t) {
|
|
20990
|
+
t6 = t(name);
|
|
20991
|
+
$[18] = name;
|
|
20992
|
+
$[19] = t;
|
|
20993
|
+
$[20] = t6;
|
|
20994
|
+
} else {
|
|
20995
|
+
t6 = $[20];
|
|
20996
|
+
}
|
|
20997
|
+
const translatedName = t6;
|
|
20980
20998
|
if (type === "admin") {
|
|
20981
|
-
let
|
|
20982
|
-
if ($[
|
|
20983
|
-
|
|
20984
|
-
$[
|
|
20985
|
-
$[
|
|
20986
|
-
$[
|
|
20987
|
-
$[
|
|
20999
|
+
let t72;
|
|
21000
|
+
if ($[21] !== collectionIcon || $[22] !== translatedName || $[23] !== url) {
|
|
21001
|
+
t72 = /* @__PURE__ */ jsxRuntime.jsx(SmallNavigationCard, { icon: collectionIcon, name: translatedName, url });
|
|
21002
|
+
$[21] = collectionIcon;
|
|
21003
|
+
$[22] = translatedName;
|
|
21004
|
+
$[23] = url;
|
|
21005
|
+
$[24] = t72;
|
|
20988
21006
|
} else {
|
|
20989
|
-
|
|
21007
|
+
t72 = $[24];
|
|
20990
21008
|
}
|
|
20991
|
-
return
|
|
21009
|
+
return t72;
|
|
20992
21010
|
}
|
|
20993
|
-
let
|
|
20994
|
-
if ($[
|
|
20995
|
-
|
|
21011
|
+
let t7;
|
|
21012
|
+
if ($[25] !== navigate || $[26] !== onClick || $[27] !== path || $[28] !== url || $[29] !== userConfigurationPersistence) {
|
|
21013
|
+
t7 = () => {
|
|
20996
21014
|
onClick?.();
|
|
20997
21015
|
navigate(url);
|
|
20998
21016
|
if (userConfigurationPersistence) {
|
|
20999
21017
|
userConfigurationPersistence.setRecentlyVisitedPaths([path, ...(userConfigurationPersistence.recentlyVisitedPaths ?? []).filter((p_0) => p_0 !== path)]);
|
|
21000
21018
|
}
|
|
21001
21019
|
};
|
|
21002
|
-
$[
|
|
21003
|
-
$[
|
|
21004
|
-
$[
|
|
21005
|
-
$[
|
|
21006
|
-
$[
|
|
21007
|
-
$[
|
|
21020
|
+
$[25] = navigate;
|
|
21021
|
+
$[26] = onClick;
|
|
21022
|
+
$[27] = path;
|
|
21023
|
+
$[28] = url;
|
|
21024
|
+
$[29] = userConfigurationPersistence;
|
|
21025
|
+
$[30] = t7;
|
|
21008
21026
|
} else {
|
|
21009
|
-
|
|
21027
|
+
t7 = $[30];
|
|
21010
21028
|
}
|
|
21011
|
-
let
|
|
21012
|
-
if ($[
|
|
21013
|
-
|
|
21014
|
-
$[
|
|
21015
|
-
$[
|
|
21016
|
-
$[
|
|
21017
|
-
$[
|
|
21018
|
-
$[
|
|
21019
|
-
$[
|
|
21020
|
-
$[
|
|
21029
|
+
let t8;
|
|
21030
|
+
if ($[31] !== actions || $[32] !== collectionIcon || $[33] !== description || $[34] !== shrink || $[35] !== t7 || $[36] !== translatedName) {
|
|
21031
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(NavigationCard, { icon: collectionIcon, name: translatedName, description, actions, onClick: t7, shrink });
|
|
21032
|
+
$[31] = actions;
|
|
21033
|
+
$[32] = collectionIcon;
|
|
21034
|
+
$[33] = description;
|
|
21035
|
+
$[34] = shrink;
|
|
21036
|
+
$[35] = t7;
|
|
21037
|
+
$[36] = translatedName;
|
|
21038
|
+
$[37] = t8;
|
|
21021
21039
|
} else {
|
|
21022
|
-
|
|
21040
|
+
t8 = $[37];
|
|
21023
21041
|
}
|
|
21024
|
-
return
|
|
21042
|
+
return t8;
|
|
21025
21043
|
}
|
|
21026
21044
|
const animateLayoutChanges = (args) => sortable.defaultAnimateLayoutChanges({
|
|
21027
21045
|
...args,
|
|
@@ -25500,7 +25518,12 @@
|
|
|
25500
25518
|
const scrollRestoration = useScrollRestoration();
|
|
25501
25519
|
const collection = React.useMemo(() => {
|
|
25502
25520
|
const userOverride = userConfigPersistence?.getCollectionConfig(fullPath);
|
|
25503
|
-
|
|
25521
|
+
if (!userOverride) return collectionProp;
|
|
25522
|
+
const {
|
|
25523
|
+
properties,
|
|
25524
|
+
...rest
|
|
25525
|
+
} = userOverride;
|
|
25526
|
+
return mergeDeep(collectionProp, rest);
|
|
25504
25527
|
}, [collectionProp, fullPath, userConfigPersistence?.getCollectionConfig]);
|
|
25505
25528
|
const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE;
|
|
25506
25529
|
const collectionRef = React.useRef(collection);
|
|
@@ -25754,11 +25777,12 @@
|
|
|
25754
25777
|
collection,
|
|
25755
25778
|
path: fullPath,
|
|
25756
25779
|
propertyConfigs: customizationController.propertyConfigs,
|
|
25757
|
-
authController
|
|
25758
|
-
|
|
25780
|
+
authController,
|
|
25781
|
+
userConfigPersistence
|
|
25782
|
+
}), [collection, fullPath, userConfigPersistence]);
|
|
25759
25783
|
const hasEnumProperty = React.useMemo(() => {
|
|
25760
|
-
const
|
|
25761
|
-
return Object.values(
|
|
25784
|
+
const properties_0 = resolvedCollection.properties;
|
|
25785
|
+
return Object.values(properties_0).some((prop) => prop && prop.dataType === "string" && prop.enumValues);
|
|
25762
25786
|
}, [resolvedCollection.properties]);
|
|
25763
25787
|
const enabledViews = React.useMemo(() => {
|
|
25764
25788
|
const configured = collection.enabledViews ?? ["table", "cards", "kanban"];
|
|
@@ -25769,8 +25793,8 @@
|
|
|
25769
25793
|
}, [collection.enabledViews, hasEnumProperty]);
|
|
25770
25794
|
const kanbanPropertyOptions = React.useMemo(() => {
|
|
25771
25795
|
const options = [];
|
|
25772
|
-
const
|
|
25773
|
-
for (const [key_0, property_0] of Object.entries(
|
|
25796
|
+
const properties_1 = resolvedCollection.properties;
|
|
25797
|
+
for (const [key_0, property_0] of Object.entries(properties_1)) {
|
|
25774
25798
|
const prop_0 = property_0;
|
|
25775
25799
|
if (prop_0 && prop_0.dataType === "string" && prop_0.enumValues) {
|
|
25776
25800
|
options.push({
|
|
@@ -28073,7 +28097,14 @@
|
|
|
28073
28097
|
if (!collections_0) return void 0;
|
|
28074
28098
|
const baseCollection = getCollectionByPathOrId(removeInitialAndTrailingSlashes(idOrPath), collections_0);
|
|
28075
28099
|
const userOverride = includeUserOverride ? userConfigPersistence?.getCollectionConfig(idOrPath) : void 0;
|
|
28076
|
-
|
|
28100
|
+
let overriddenCollection = baseCollection;
|
|
28101
|
+
if (baseCollection && userOverride) {
|
|
28102
|
+
const {
|
|
28103
|
+
properties,
|
|
28104
|
+
...rest
|
|
28105
|
+
} = userOverride;
|
|
28106
|
+
overriddenCollection = mergeDeep(baseCollection, rest);
|
|
28107
|
+
}
|
|
28077
28108
|
let result = overriddenCollection;
|
|
28078
28109
|
if (overriddenCollection) {
|
|
28079
28110
|
const subcollections = overriddenCollection.subcollections;
|
|
@@ -30014,7 +30045,7 @@
|
|
|
30014
30045
|
replace: true,
|
|
30015
30046
|
state: {
|
|
30016
30047
|
base_location: baseLocation,
|
|
30017
|
-
panels: updatedPanels.map(_temp4$
|
|
30048
|
+
panels: updatedPanels.map(_temp4$2)
|
|
30018
30049
|
}
|
|
30019
30050
|
});
|
|
30020
30051
|
}
|
|
@@ -30112,7 +30143,7 @@
|
|
|
30112
30143
|
function _temp5$1(p_3) {
|
|
30113
30144
|
return p_3.key;
|
|
30114
30145
|
}
|
|
30115
|
-
function _temp4$
|
|
30146
|
+
function _temp4$2(p_2) {
|
|
30116
30147
|
return p_2.key;
|
|
30117
30148
|
}
|
|
30118
30149
|
function _temp3$2(p_1) {
|
|
@@ -32258,7 +32289,7 @@
|
|
|
32258
32289
|
const otherChildren = t3;
|
|
32259
32290
|
const includeDrawer = drawerChildren.length > 0;
|
|
32260
32291
|
const largeLayout = useLargeLayout();
|
|
32261
|
-
const [drawerOpen, setDrawerOpen] = React.useState(
|
|
32292
|
+
const [drawerOpen, setDrawerOpen] = React.useState(_temp4$1);
|
|
32262
32293
|
const [onHover, setOnHover] = React.useState(false);
|
|
32263
32294
|
let t4;
|
|
32264
32295
|
if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -32280,6 +32311,10 @@
|
|
|
32280
32311
|
if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32281
32312
|
t6 = () => {
|
|
32282
32313
|
setDrawerOpen(true);
|
|
32314
|
+
try {
|
|
32315
|
+
localStorage.setItem("firecms_drawer_open", "true");
|
|
32316
|
+
} catch {
|
|
32317
|
+
}
|
|
32283
32318
|
};
|
|
32284
32319
|
$[8] = t6;
|
|
32285
32320
|
} else {
|
|
@@ -32290,6 +32325,10 @@
|
|
|
32290
32325
|
if ($[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32291
32326
|
t7 = () => {
|
|
32292
32327
|
setDrawerOpen(false);
|
|
32328
|
+
try {
|
|
32329
|
+
localStorage.setItem("firecms_drawer_open", "false");
|
|
32330
|
+
} catch {
|
|
32331
|
+
}
|
|
32293
32332
|
};
|
|
32294
32333
|
$[9] = t7;
|
|
32295
32334
|
} else {
|
|
@@ -32642,6 +32681,13 @@
|
|
|
32642
32681
|
function _temp3$1(child_1) {
|
|
32643
32682
|
return child_1.type.componentType !== "Drawer" && child_1.type.componentType !== "AppBar";
|
|
32644
32683
|
}
|
|
32684
|
+
function _temp4$1() {
|
|
32685
|
+
try {
|
|
32686
|
+
return localStorage.getItem("firecms_drawer_open") === "true";
|
|
32687
|
+
} catch {
|
|
32688
|
+
return false;
|
|
32689
|
+
}
|
|
32690
|
+
}
|
|
32645
32691
|
const en = {
|
|
32646
32692
|
// ─── Form actions ────────────────────────────────────────────
|
|
32647
32693
|
save: "Save",
|
|
@@ -33045,8 +33091,8 @@
|
|
|
33045
33091
|
cms_users: "CMS Users",
|
|
33046
33092
|
roles_menu: "Roles",
|
|
33047
33093
|
project_settings: "Project settings",
|
|
33048
|
-
|
|
33049
|
-
|
|
33094
|
+
firestore_manager: "Firestore Manager",
|
|
33095
|
+
manage_your_firestore_data: "Manage your Firestore data",
|
|
33050
33096
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
33051
33097
|
build_admin_panel_in_minutes: "Build Your Firebase Admin Panel in Minutes",
|
|
33052
33098
|
go_live_instantly: "Go live instantly:",
|
|
@@ -33716,8 +33762,8 @@
|
|
|
33716
33762
|
cms_users: "Usuarios del CMS",
|
|
33717
33763
|
roles_menu: "Roles",
|
|
33718
33764
|
project_settings: "Ajustes del proyecto",
|
|
33719
|
-
|
|
33720
|
-
|
|
33765
|
+
firestore_manager: "Gestor de Firestore",
|
|
33766
|
+
manage_your_firestore_data: "Gestiona tus datos de Firestore",
|
|
33721
33767
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
33722
33768
|
build_admin_panel_in_minutes: "Crea tu panel de administración de Firebase en minutos",
|
|
33723
33769
|
go_live_instantly: "En vivo al instante:",
|
|
@@ -34387,8 +34433,8 @@
|
|
|
34387
34433
|
cms_users: "CMS-Benutzer",
|
|
34388
34434
|
roles_menu: "Rollen",
|
|
34389
34435
|
project_settings: "Projekteinstellungen",
|
|
34390
|
-
|
|
34391
|
-
|
|
34436
|
+
firestore_manager: "Firestore-Manager",
|
|
34437
|
+
manage_your_firestore_data: "Deine Firestore-Daten verwalten",
|
|
34392
34438
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
34393
34439
|
build_admin_panel_in_minutes: "Erstellen Sie Ihr Firebase Admin Panel in wenigen Minuten",
|
|
34394
34440
|
go_live_instantly: "Sofort live gehen:",
|
|
@@ -35056,8 +35102,8 @@
|
|
|
35056
35102
|
cms_users: "Utilisateurs du CMS",
|
|
35057
35103
|
roles_menu: "Rôles",
|
|
35058
35104
|
project_settings: "Paramètres du projet",
|
|
35059
|
-
|
|
35060
|
-
|
|
35105
|
+
firestore_manager: "Gestionnaire Firestore",
|
|
35106
|
+
manage_your_firestore_data: "Gérez vos données Firestore",
|
|
35061
35107
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
35062
35108
|
build_admin_panel_in_minutes: "Créez votre panneau d'administration Firebase en quelques minutes",
|
|
35063
35109
|
go_live_instantly: "Mise en ligne immédiate :",
|
|
@@ -35725,8 +35771,8 @@
|
|
|
35725
35771
|
cms_users: "Utenti CMS",
|
|
35726
35772
|
roles_menu: "Ruoli",
|
|
35727
35773
|
project_settings: "Impostazioni del progetto",
|
|
35728
|
-
|
|
35729
|
-
|
|
35774
|
+
firestore_manager: "Gestore Firestore",
|
|
35775
|
+
manage_your_firestore_data: "Gestisci i tuoi dati Firestore",
|
|
35730
35776
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
35731
35777
|
build_admin_panel_in_minutes: "Crea il tuo pannello di amministrazione Firebase in pochi minuti",
|
|
35732
35778
|
go_live_instantly: "Online in un istante:",
|
|
@@ -36394,8 +36440,8 @@
|
|
|
36394
36440
|
cms_users: "CMS उपयोगकर्ता",
|
|
36395
36441
|
roles_menu: "भूमिकाएँ",
|
|
36396
36442
|
project_settings: "परियोजना सेटिंग",
|
|
36397
|
-
|
|
36398
|
-
|
|
36443
|
+
firestore_manager: "Firestore मैनेजर",
|
|
36444
|
+
manage_your_firestore_data: "अपने Firestore डेटा का प्रबंधन करें",
|
|
36399
36445
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
36400
36446
|
build_admin_panel_in_minutes: "मिनटों में अपना Firebase एडमिन पैनल बनाएं",
|
|
36401
36447
|
go_live_instantly: "तुरंत लाइव जाएं:",
|
|
@@ -37063,8 +37109,8 @@
|
|
|
37063
37109
|
cms_users: "Utilizadores do CMS",
|
|
37064
37110
|
roles_menu: "Funções",
|
|
37065
37111
|
project_settings: "Definições do projeto",
|
|
37066
|
-
|
|
37067
|
-
|
|
37112
|
+
firestore_manager: "Gerenciador do Firestore",
|
|
37113
|
+
manage_your_firestore_data: "Gerencie os seus dados do Firestore",
|
|
37068
37114
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
37069
37115
|
build_admin_panel_in_minutes: "Construa o Seu Painel de Administração Firebase em Minutos",
|
|
37070
37116
|
go_live_instantly: "Entre em produção instantaneamente:",
|