generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate between form format versions
fixes #92
- Loading branch information
1 parent
73c74c5
commit b4e6c96
Showing
6 changed files
with
424 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,330 @@ | ||
{ | ||
"editorPosition": "mainView", | ||
"formDefinitions": [ | ||
{ | ||
"title": "Kill bugs softly", | ||
"name": "kill-bugs", | ||
"fields": [ | ||
{ | ||
"name": "num", | ||
"label": "Number of people", | ||
"description": "Be nice", | ||
"input": { | ||
"type": "number", | ||
"source": "notes", | ||
"options": [ | ||
{ | ||
"label": "", | ||
"value": "" | ||
}, | ||
{ | ||
"label": "", | ||
"value": "" | ||
} | ||
], | ||
"folder": "Books" | ||
} | ||
}, | ||
{ | ||
"name": "lol", | ||
"label": "Lol", | ||
"description": "Super lol", | ||
"input": { | ||
"type": "select", | ||
"source": "fixed", | ||
"options": [ | ||
{ | ||
"label": "First", | ||
"value": "1" | ||
}, | ||
{ | ||
"label": "Second", | ||
"value": "2" | ||
} | ||
], | ||
"folder": "People" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Is example", | ||
"name": "example-form", | ||
"fields": [ | ||
{ | ||
"name": "second", | ||
"label": "Second", | ||
"description": "Slide it", | ||
"input": { | ||
"type": "slider", | ||
"min": 1, | ||
"max": 12 | ||
} | ||
}, | ||
{ | ||
"name": "dataview", | ||
"label": "persons", | ||
"description": "This is persons dv", | ||
"input": { | ||
"type": "dataview", | ||
"query": "dv.pages('#person').map(p=>p.file.name)" | ||
} | ||
}, | ||
{ | ||
"name": "toggle", | ||
"label": "Toggle", | ||
"description": "Yes or no", | ||
"input": { | ||
"type": "toggle" | ||
} | ||
}, | ||
{ | ||
"name": "multi_books", | ||
"label": "Books read", | ||
"description": "they are nice", | ||
"input": { | ||
"type": "multiselect", | ||
"source": "notes", | ||
"folder": "Books", | ||
"min": 1, | ||
"max": 11 | ||
} | ||
}, | ||
{ | ||
"name": "select", | ||
"label": "Select", | ||
"description": "Pick a value", | ||
"input": { | ||
"type": "select", | ||
"source": "fixed", | ||
"options": [ | ||
{ | ||
"label": "First", | ||
"value": "first" | ||
}, | ||
{ | ||
"label": "Second", | ||
"value": "second" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "multi_2", | ||
"label": "Multi select fixed", | ||
"description": "Pick some values", | ||
"input": { | ||
"type": "multiselect", | ||
"source": "fixed", | ||
"options": [ | ||
"static one", | ||
"static two", | ||
"" | ||
], | ||
"multi_select_options": [ | ||
"first", | ||
"second", | ||
"LOL" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "text_area", | ||
"label": "", | ||
"description": "Multi line", | ||
"input": { | ||
"type": "textarea" | ||
} | ||
}, | ||
{ | ||
"name": "text_area_1", | ||
"label": "", | ||
"description": "Multi line", | ||
"input": { | ||
"type": "textarea" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "New form", | ||
"name": "Suggesters", | ||
"fields": [ | ||
{ | ||
"name": "automata", | ||
"label": "Automata type", | ||
"description": "LOL", | ||
"input": { | ||
"type": "select", | ||
"source": "fixed", | ||
"multi_select_options": [ | ||
"" | ||
], | ||
"options": [ | ||
{ | ||
"value": "robot", | ||
"label": "🤖 Robot" | ||
}, | ||
{ | ||
"value": "huan", | ||
"label": "Human" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "select_notes", | ||
"label": "Select notes", | ||
"description": "Les notes", | ||
"input": { | ||
"type": "select", | ||
"source": "notes", | ||
"multi_select_options": [ | ||
"" | ||
], | ||
"options": [ | ||
{ | ||
"value": "robot", | ||
"label": "🤖 Robot" | ||
}, | ||
{ | ||
"value": "huan", | ||
"label": "Human" | ||
} | ||
], | ||
"folder": "Books" | ||
} | ||
}, | ||
{ | ||
"name": "note", | ||
"label": "Suggest note", | ||
"description": "pick a note", | ||
"input": { | ||
"type": "note", | ||
"folder": "People" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "New form", | ||
"name": "Suggesters-copy", | ||
"fields": [ | ||
{ | ||
"name": "automata", | ||
"label": "Automata type", | ||
"description": "LOL", | ||
"input": { | ||
"type": "select", | ||
"source": "fixed", | ||
"multi_select_options": [ | ||
"" | ||
], | ||
"options": [ | ||
{ | ||
"value": "robot", | ||
"label": "🤖 Robot" | ||
}, | ||
{ | ||
"value": "huan", | ||
"label": "Human" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "select_notes", | ||
"label": "Select notes", | ||
"description": "Les notes", | ||
"input": { | ||
"type": "select", | ||
"source": "notes", | ||
"multi_select_options": [ | ||
"" | ||
], | ||
"options": [ | ||
{ | ||
"value": "robot", | ||
"label": "🤖 Robot" | ||
}, | ||
{ | ||
"value": "huan", | ||
"label": "Human" | ||
} | ||
], | ||
"folder": "Books" | ||
} | ||
}, | ||
{ | ||
"name": "note", | ||
"label": "Suggest note", | ||
"description": "pick a note", | ||
"input": { | ||
"type": "note", | ||
"folder": "People" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "New form", | ||
"name": "Suggesters renamed", | ||
"fields": [ | ||
{ | ||
"name": "automata", | ||
"label": "Automata type", | ||
"description": "LOL", | ||
"input": { | ||
"type": "select", | ||
"source": "fixed", | ||
"multi_select_options": [ | ||
"" | ||
], | ||
"options": [ | ||
{ | ||
"value": "robot", | ||
"label": "🤖 Robot" | ||
}, | ||
{ | ||
"value": "huan", | ||
"label": "Human" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "select_notes", | ||
"label": "Select notes", | ||
"description": "Les notes", | ||
"input": { | ||
"type": "select", | ||
"source": "notes", | ||
"multi_select_options": [ | ||
"" | ||
], | ||
"options": [ | ||
{ | ||
"value": "robot", | ||
"label": "🤖 Robot" | ||
}, | ||
{ | ||
"value": "huan", | ||
"label": "Human" | ||
} | ||
], | ||
"folder": "Books" | ||
} | ||
}, | ||
{ | ||
"name": "note", | ||
"label": "Suggest note", | ||
"description": "pick a note", | ||
"input": { | ||
"type": "note", | ||
"folder": "People" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
"typescript": "^5.2.2" | ||
}, | ||
"dependencies": { | ||
"fp-ts": "^2.16.1", | ||
"fuse.js": "^6.6.2", | ||
"valibot": "^0.19.0" | ||
} | ||
} | ||
} |
Oops, something went wrong.