@factorialco/fcode-react-forms 3.6.0 → 3.7.0
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/components/fcode-form/fcode-form.d.ts +5 -2
- package/dist/components/json-schema-form/oauth/types.d.ts +14 -0
- package/dist/fcode-form.cjs.js +69 -69
- package/dist/fcode-form.cjs.js.map +1 -1
- package/dist/fcode-form.es.js +7192 -7137
- package/dist/fcode-form.es.js.map +1 -1
- package/dist/fcode-form.umd.js +69 -69
- package/dist/fcode-form.umd.js.map +1 -1
- package/dist/types.d.ts +7 -1
- package/dist/utils/kept-files.d.ts +35 -0
- package/dist/utils/kept-files.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -40,7 +40,9 @@ interface FcodeFormBaseProps extends Omit<FcodeJsonSchemaFormProps, 'onError' |
|
|
|
40
40
|
* Receives the following parameters:
|
|
41
41
|
* - formId: The ID of the form.
|
|
42
42
|
* - processExecutionResult: The result of the process execution as a generic object.
|
|
43
|
-
* - formSubmittedData: The data submitted with the form.
|
|
43
|
+
* - formSubmittedData: The data submitted with the form. A file above
|
|
44
|
+
* 50 MiB appears as its content-less placeholder `data:` URL
|
|
45
|
+
* (`;fcode-kept=…;`), not as its content: the form never reads it.
|
|
44
46
|
*/
|
|
45
47
|
onSuccess?: (formId: string, processExecutionResult: GenericObjectType, formSubmittedData: FormData) => void;
|
|
46
48
|
/**
|
|
@@ -61,7 +63,8 @@ interface FcodeFormBaseProps extends Omit<FcodeJsonSchemaFormProps, 'onError' |
|
|
|
61
63
|
* Receives the following parameters:
|
|
62
64
|
* - formId: The ID of the form.
|
|
63
65
|
* - error: The error that occurred, of unknown type.
|
|
64
|
-
* - formSubmittedData: The data submitted with the form
|
|
66
|
+
* - formSubmittedData: The data submitted with the form, large files as
|
|
67
|
+
* placeholders (see `onSuccess`).
|
|
65
68
|
*/
|
|
66
69
|
onError?: (formId: string, error: unknown, formSubmittedData: FormData) => void;
|
|
67
70
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { KeptFiles } from '../../../utils/kept-files';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
export type OauthOnComplete = 'none' | 'submit' | 'reload';
|
|
3
4
|
export type OauthValueKind = 'boolean' | 'string' | 'object';
|
|
@@ -85,5 +86,18 @@ export interface FcodeFormContext {
|
|
|
85
86
|
/** Skip the loading overlay: a background refresh. */
|
|
86
87
|
silent?: boolean;
|
|
87
88
|
}) => void;
|
|
89
|
+
/**
|
|
90
|
+
* `false` stops the form from offering `keptFiles`, so every file is read
|
|
91
|
+
* into a `data:` URL as before.
|
|
92
|
+
*/
|
|
93
|
+
keepLargeFiles?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Where a file widget holds a large file instead of reading it into a
|
|
96
|
+
* `data:` URL, which a file near 1 GB cannot become. The widget stores the
|
|
97
|
+
* placeholder `keep` returns as the field's value; the form swaps the
|
|
98
|
+
* `File` back in at submit. Set by `FcodeForm`, read by the f0 theme's
|
|
99
|
+
* `FileWidget` (`@factorialco/rjsf-f0`) for top-level single-file fields.
|
|
100
|
+
*/
|
|
101
|
+
keptFiles?: KeptFiles;
|
|
88
102
|
};
|
|
89
103
|
}
|