@tinacms/schema-tools 2.4.0 → 2.5.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/types/index.d.ts +10 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -777,6 +777,16 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
|
|
|
777
777
|
* Customize the way filenames are generated during content creation
|
|
778
778
|
*/
|
|
779
779
|
filename?: {
|
|
780
|
+
/**
|
|
781
|
+
* A callback function which formats the filename each time the value changes
|
|
782
|
+
* to enforce naming constraints (the extension is not necessary)
|
|
783
|
+
*
|
|
784
|
+
* eg:
|
|
785
|
+
* ```ts
|
|
786
|
+
* parse: (value) => value.toLowerCase().split(" ").join("-")
|
|
787
|
+
* ```
|
|
788
|
+
*/
|
|
789
|
+
parse?: (filename: string) => string;
|
|
780
790
|
/**
|
|
781
791
|
* A callback which receives form values as an argument. The return value
|
|
782
792
|
* here will be used as the filename (the extension is not necessary)
|