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

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.173",
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.173",
54
+ "@firecms/formex": "^3.0.0-canary.173",
55
+ "@firecms/ui": "^3.0.0-canary.173",
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": "e406bf233e041e7361697bd583e622894a0bd631",
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),
@@ -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
  }}