@firecms/core 3.0.0-canary.172 → 3.0.0-canary.174

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.172",
4
+ "version": "3.0.0-canary.174",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -50,9 +50,9 @@
50
50
  "./package.json": "./package.json"
51
51
  },
52
52
  "dependencies": {
53
- "@firecms/editor": "^3.0.0-canary.172",
54
- "@firecms/formex": "^3.0.0-canary.172",
55
- "@firecms/ui": "^3.0.0-canary.172",
53
+ "@firecms/editor": "^3.0.0-canary.174",
54
+ "@firecms/formex": "^3.0.0-canary.174",
55
+ "@firecms/ui": "^3.0.0-canary.174",
56
56
  "@hello-pangea/dnd": "^17.0.0",
57
57
  "@radix-ui/react-portal": "^1.1.2",
58
58
  "clsx": "^2.1.1",
@@ -104,7 +104,7 @@
104
104
  "dist",
105
105
  "src"
106
106
  ],
107
- "gitHead": "538f682b9f89bfd08db9891b57cb71f618f4764b",
107
+ "gitHead": "268a99741b93a8b745422740faf90aa808da97fb",
108
108
  "publishConfig": {
109
109
  "access": "public"
110
110
  },
@@ -109,7 +109,7 @@ export function ArrayContainer<T>({
109
109
 
110
110
  const insertInEnd = (e: React.SyntheticEvent) => {
111
111
  e.preventDefault();
112
- if (disabled || value.length >= max) return;
112
+ if (disabled || (value ?? []).length >= max) return;
113
113
  const id = getRandomId();
114
114
  const newIds: number[] = [...internalIds, id];
115
115
  if (onInternalIdAdded)
@@ -119,7 +119,7 @@ export function ArrayContainer<T>({
119
119
  };
120
120
 
121
121
  const remove = (index: number) => {
122
- if (value.length <= min) return;
122
+ if ((value ?? []).length <= min) return;
123
123
  const newIds = [...internalIds];
124
124
  newIds.splice(index, 1);
125
125
  setInternalIds(newIds);
@@ -127,7 +127,7 @@ export function ArrayContainer<T>({
127
127
  };
128
128
 
129
129
  const copy = (index: number) => {
130
- if (value.length >= max) return;
130
+ if ((value ?? []).length >= max) return;
131
131
  const id = getRandomId();
132
132
  const copyingItem = value[index];
133
133
  const newIds: number[] = [
@@ -143,7 +143,7 @@ export function ArrayContainer<T>({
143
143
  };
144
144
 
145
145
  const addInIndex = (index: number) => {
146
- if (value.length >= max) return;
146
+ if ((value ?? []).length >= max) return;
147
147
  const id = getRandomId();
148
148
  const newIds: number[] = [
149
149
  ...internalIds.slice(0, index),
@@ -1042,13 +1042,11 @@ export function EntityEditViewInner<M extends Record<string, any>>({
1042
1042
 
1043
1043
  </div>
1044
1044
 
1045
- {mainViewVisible && shouldShowEntityActions && !actionsAtTheBottom && dialogActions}
1046
-
1047
1045
  {customViewsView}
1048
1046
 
1049
1047
  {subCollectionsViews}
1050
1048
 
1051
- {shouldShowEntityActions && actionsAtTheBottom && dialogActions}
1049
+ {shouldShowEntityActions && dialogActions}
1052
1050
 
1053
1051
  </form>
1054
1052
 
@@ -211,11 +211,9 @@ function EntityFullScreenRoute({
211
211
  selectedTab={selectedTab ?? undefined}
212
212
  onValuesModified={(modified) => blocked.current = modified}
213
213
  onSaved={(params) => {
214
- console.log("EntityEditView Saved", params);
215
214
  updateUrl(params.entityId, params.selectedTab, true, params.path, isNew);
216
215
  }}
217
216
  onTabChange={(params) => {
218
- console.log("EntityEditView onTabChange", params);
219
217
  updateUrl(params.entityId, params.selectedTab, !isNew, params.path, isNew);
220
218
  setSelectedTab(params.selectedTab);
221
219
  }}