@firecms/collection_editor 3.0.0-canary.80 → 3.0.0-canary.82

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,16 +1,18 @@
1
1
  {
2
2
  "name": "@firecms/collection_editor",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.80",
4
+ "version": "3.0.0-canary.82",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "source": "src/index.ts",
9
9
  "dependencies": {
10
- "@firecms/data_import_export": "^3.0.0-canary.80",
11
- "@firecms/formex": "^3.0.0-canary.80",
12
- "@firecms/schema_inference": "^3.0.0-canary.80",
13
- "@firecms/ui": "^3.0.0-canary.80",
10
+ "@firecms/data_export": "^3.0.0-canary.82",
11
+ "@firecms/data_import": "^3.0.0-canary.82",
12
+ "@firecms/data_import_export": "^3.0.0-canary.82",
13
+ "@firecms/formex": "^3.0.0-canary.82",
14
+ "@firecms/schema_inference": "^3.0.0-canary.82",
15
+ "@firecms/ui": "^3.0.0-canary.82",
14
16
  "json5": "^2.2.3",
15
17
  "prism-react-renderer": "^2.3.1"
16
18
  },
@@ -65,5 +67,5 @@
65
67
  "publishConfig": {
66
68
  "access": "public"
67
69
  },
68
- "gitHead": "e41e7401fda1929c44300ada0b993e5b0703b7a1"
70
+ "gitHead": "5bd98b85c3f5c0c9a08860188e15e2687f1d0542"
69
71
  }
@@ -44,11 +44,13 @@ export function StoragePropertyField({
44
44
 
45
45
  const metadata = `${baseStoragePath}.metadata`;
46
46
  const fileName = `${baseStoragePath}.fileName`;
47
+ const maxSize = `${baseStoragePath}.maxSize`;
47
48
  const storagePath = `${baseStoragePath}.storagePath`;
48
49
  const storeUrl = `${baseStoragePath}.storeUrl`;
49
50
 
50
51
  const fileNameValue = getIn(values, fileName) ?? "{rand}_{file}";
51
52
  const storagePathValue = getIn(values, storagePath) ?? "/";
53
+ const maxSizeValue = getIn(values, maxSize);
52
54
 
53
55
  const storedValue = getIn(values, acceptedFiles);
54
56
  const fileTypesValue: string[] | undefined = Array.isArray(storedValue) ? storedValue : undefined;
@@ -161,7 +163,10 @@ export function StoragePropertyField({
161
163
 
162
164
  <Field name={storeUrl}
163
165
  type="checkbox">
164
- {({ field, form }: FormexFieldProps) => {
166
+ {({
167
+ field,
168
+ form
169
+ }: FormexFieldProps) => {
165
170
  return <SwitchControl
166
171
  label={"Save URL instead of storage path"}
167
172
  disabled={existing || disabled}
@@ -178,6 +183,21 @@ export function StoragePropertyField({
178
183
  You can only change this prop upon creation.
179
184
  </Typography>
180
185
  </div>
186
+
187
+ <div className={"col-span-12"}>
188
+ <DebouncedTextField name={maxSize}
189
+ type={"number"}
190
+ label={"Max size (in bytes)"}
191
+ size={"small"}
192
+ value={maxSizeValue !== undefined && maxSizeValue !== null ? maxSizeValue.toString() : ""}
193
+ onChange={(e) => {
194
+ const value = e.target.value;
195
+ if (value === "") setFieldValue(maxSize, undefined);
196
+ else setFieldValue(maxSize, parseInt(value));
197
+ }}
198
+ />
199
+ </div>
200
+
181
201
  </div>
182
202
  </ExpandablePanel>
183
203