3 - Added Prettier for formatting and formatted.
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
import { Book } from "./books.en";
|
||||
|
||||
export const BOOKS_DE: Book[] = [
|
||||
{ name: "1. Mose", aliases: ["Genesis", "Gen", "1Mo"] },
|
||||
{ name: "2. Mose", aliases: ["Exodus", "Ex", "2Mo"] },
|
||||
{ name: "3. Mose", aliases: ["Levitikus", "Lev", "3Mo"] },
|
||||
{ name: "4. Mose", aliases: ["Numeri", "Num", "4Mo"] },
|
||||
{ name: "5. Mose", aliases: ["Deuteronomium", "Dtn", "5Mo"] },
|
||||
{ name: "Josua", aliases: ["Jos", "Jos"] },
|
||||
{ name: "Richter", aliases: ["Ri", "Richt"] },
|
||||
{ name: "Rut", aliases: ["Rut", "Ru"] },
|
||||
{ name: "1. Samuel", aliases: ["1Sam", "1Sa"] },
|
||||
{ name: "2. Samuel", aliases: ["2Sam", "2Sa"] },
|
||||
{ name: "1. Könige", aliases: ["1Kön", "1Kö"] },
|
||||
{ name: "2. Könige", aliases: ["2Kön", "2Kö"] },
|
||||
{ name: "1. Chronik", aliases: ["1Chr", "1Ch"] },
|
||||
{ name: "2. Chronik", aliases: ["2Chr", "2Ch"] },
|
||||
{ name: "Esra", aliases: ["Esr", "Esr"] },
|
||||
{ name: "Nehemia", aliases: ["Neh", "Neh"] },
|
||||
{ name: "Ester", aliases: ["Esther", "Est", "Est"] },
|
||||
{ name: "Ijob", aliases: ["Hiob", "Ijob", "Hi"] },
|
||||
{ name: "Psalmen", aliases: ["Psalter", "Ps"] },
|
||||
{ name: "Sprüche", aliases: ["Sprüche Salomos", "Spr"] },
|
||||
{ name: "Kohelet", aliases: ["Prediger", "Koh", "Pred"] },
|
||||
{ name: "Hoheslied", aliases: ["Lied der Lieder", "Hld", "Hl"] },
|
||||
{ name: "Jesaja", aliases: ["Jes"] },
|
||||
{ name: "Jeremia", aliases: ["Jer"] },
|
||||
{ name: "Klagelieder", aliases: ["Threni", "Klgl", "Kla"] },
|
||||
{ name: "Ezechiel", aliases: ["Hesekiel", "Ez", "Hes"] },
|
||||
{ name: "Daniel", aliases: ["Dan"] },
|
||||
{ name: "Hosea", aliases: ["Hos", "Hos"] },
|
||||
{ name: "Joel", aliases: ["Joe"] },
|
||||
{ name: "Amos", aliases: ["Am", "Amos"] },
|
||||
{ name: "Obadja", aliases: ["Ob", "Oba"] },
|
||||
{ name: "Jona", aliases: ["Jon"] },
|
||||
{ name: "Micha", aliases: ["Mi", "Mic"] },
|
||||
{ name: "Nahum", aliases: ["Nah"] },
|
||||
{ name: "Habakuk", aliases: ["Hab", "Hab"] },
|
||||
{ name: "Zefanja", aliases: ["Zephanja", "Zef", "Zeph"] },
|
||||
{ name: "Haggai", aliases: ["Hag"] },
|
||||
{ name: "Sacharja", aliases: ["Sach"] },
|
||||
{ name: "Maleachi", aliases: ["Mal"] },
|
||||
{ name: "Matthäus", aliases: ["Mt"] },
|
||||
{ name: "Markus", aliases: ["Mk"] },
|
||||
{ name: "Lukas", aliases: ["Lk"] },
|
||||
{ name: "Johannes", aliases: ["Joh"] },
|
||||
{ name: "Apostelgeschichte", aliases: ["Taten der Apostel", "Apg"] },
|
||||
{ name: "Römer", aliases: ["Röm", "Rö"] },
|
||||
{ name: "1. Korinther", aliases: ["1Kor", "1Ko"] },
|
||||
{ name: "2. Korinther", aliases: ["2Kor", "2Ko"] },
|
||||
{ name: "Galater", aliases: ["Gal", "Gal"] },
|
||||
{ name: "Epheser", aliases: ["Eph", "Eph"] },
|
||||
{ name: "Philipper", aliases: ["Phil"] },
|
||||
{ name: "Kolosser", aliases: ["Kol"] },
|
||||
{ name: "1. Thessalonicher", aliases: ["1Thes", "1Th"] },
|
||||
{ name: "2. Thessalonicher", aliases: ["2Thes", "2Th"] },
|
||||
{ name: "1. Timotheus", aliases: ["1Tim", "1Ti"] },
|
||||
{ name: "2. Timotheus", aliases: ["2Tim", "2Ti"] },
|
||||
{ name: "Titus", aliases: ["Tit"] },
|
||||
{ name: "Philemon", aliases: ["Phlm", "Phm"] },
|
||||
{ name: "Hebräer", aliases: ["Hebr", "Heb"] },
|
||||
{ name: "Jakobus", aliases: ["Jak", "Jak"] },
|
||||
{ name: "1. Petrus", aliases: ["1Pet", "1Pe"] },
|
||||
{ name: "2. Petrus", aliases: ["2Pet", "2Pe"] },
|
||||
{ name: "1. Johannes", aliases: ["1Joh", "1Jo"] },
|
||||
{ name: "2. Johannes", aliases: ["2Joh", "2Jo"] },
|
||||
{ name: "3. Johannes", aliases: ["3Joh", "3Jo"] },
|
||||
{ name: "Judas", aliases: ["Jud"] },
|
||||
{ name: "Offenbarung", aliases: ["Apokalypse", "Off", "Apk"] },
|
||||
];
|
||||
@@ -1,244 +0,0 @@
|
||||
export interface Book {
|
||||
name: string;
|
||||
aliases: string[];
|
||||
}
|
||||
|
||||
export const BOOKS_EN: Book[] = [
|
||||
{ name: "Genesis", aliases: ["gen"] },
|
||||
{ name: "Exodus", aliases: ["exo", "ex", "exod"] },
|
||||
{ name: "Leviticus", aliases: ["lev"] },
|
||||
{ name: "Numbers", aliases: ["num"] },
|
||||
{ name: "Deuteronomy", aliases: ["deu", "deut"] },
|
||||
{ name: "Joshua", aliases: ["jos", "josh"] },
|
||||
{ name: "Judges", aliases: ["jdg", "judg"] },
|
||||
{ name: "Ruth", aliases: ["rut"] },
|
||||
{
|
||||
name: "1 Samuel",
|
||||
aliases: [
|
||||
"1sa",
|
||||
"1samuel",
|
||||
"1 sam",
|
||||
"1st sam",
|
||||
"1st samuel",
|
||||
"first samuel"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 Samuel",
|
||||
aliases: [
|
||||
"2sa",
|
||||
"2samuel",
|
||||
"2 sam",
|
||||
"2nd sam",
|
||||
"2nd samuel",
|
||||
"second samuel"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "1 Kings",
|
||||
aliases: [
|
||||
"1ki",
|
||||
"1kings",
|
||||
"1 kgs",
|
||||
"1st kgs",
|
||||
"1st kings",
|
||||
"first kings"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 Kings",
|
||||
aliases: [
|
||||
"2ki",
|
||||
"2kings",
|
||||
"2 kgs",
|
||||
"2nd kgs",
|
||||
"2nd kings",
|
||||
"second kings"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "1 Chronicles",
|
||||
aliases: [
|
||||
"1ch",
|
||||
"1chronicles",
|
||||
"1 chr",
|
||||
"1st chr",
|
||||
"1st chronicles",
|
||||
"first chronicles"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 Chronicles",
|
||||
aliases: [
|
||||
"2ch",
|
||||
"2chronicles",
|
||||
"2 chr",
|
||||
"2nd chr",
|
||||
"2nd chronicles",
|
||||
"second chronicles"
|
||||
]
|
||||
},
|
||||
{ name: "Ezra", aliases: ["ezr"] },
|
||||
{ name: "Nehemiah", aliases: ["neh"] },
|
||||
{ name: "Esther", aliases: ["est", "esth"] },
|
||||
{ name: "Job", aliases: ["job"] },
|
||||
{ name: "Psalms", aliases: ["psa", "ps", "psalm"] },
|
||||
{ name: "Proverbs", aliases: ["pro", "prov"] },
|
||||
{ name: "Ecclesiastes", aliases: ["ecc", "eccl"] },
|
||||
{
|
||||
name: "Song of Songs",
|
||||
aliases: [
|
||||
"sng",
|
||||
"Song of Solomon",
|
||||
"song"
|
||||
]
|
||||
},
|
||||
{ name: "Isaiah", aliases: ["isa"] },
|
||||
{ name: "Jeremiah", aliases: ["jer"] },
|
||||
{ name: "Lamentations", aliases: ["lam"] },
|
||||
{ name: "Ezekiel", aliases: ["ezk", "ezek"] },
|
||||
{ name: "Daniel", aliases: ["dan"] },
|
||||
{ name: "Hosea", aliases: ["hos"] },
|
||||
{ name: "Joel", aliases: ["jol"] },
|
||||
{ name: "Amos", aliases: ["amo"] },
|
||||
{ name: "Obadiah", aliases: ["oba", "obad"] },
|
||||
{ name: "Jonah", aliases: ["jon"] },
|
||||
{ name: "Micah", aliases: ["mic"] },
|
||||
{ name: "Nahum", aliases: ["nam"] },
|
||||
{ name: "Habakkuk", aliases: ["hab"] },
|
||||
{ name: "Zephaniah", aliases: ["zep", "zeph"] },
|
||||
{ name: "Haggai", aliases: ["hag"] },
|
||||
{ name: "Zechariah", aliases: ["zec", "zech"] },
|
||||
{ name: "Malachi", aliases: ["mal"] },
|
||||
{ name: "Matthew", aliases: ["mat", "matt"] },
|
||||
{ name: "Mark", aliases: ["mrk"] },
|
||||
{ name: "Luke", aliases: ["luk"] },
|
||||
{ name: "John", aliases: ["jhn"] },
|
||||
{ name: "Acts", aliases: ["act"] },
|
||||
{ name: "Romans", aliases: ["rom"] },
|
||||
{
|
||||
name: "1 Corinthians",
|
||||
aliases: [
|
||||
"1co",
|
||||
"1corinthians",
|
||||
"1 cor",
|
||||
"1st cor",
|
||||
"1st corinthians",
|
||||
"first corinthians"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 Corinthians",
|
||||
aliases: [
|
||||
"2co",
|
||||
"2corinthians",
|
||||
"2 cor",
|
||||
"2nd cor",
|
||||
"2nd corinthians",
|
||||
"second corinthians"
|
||||
]
|
||||
},
|
||||
{ name: "Galatians", aliases: ["gal"] },
|
||||
{ name: "Ephesians", aliases: ["eph"] },
|
||||
{ name: "Philippians", aliases: ["php", "phil"] },
|
||||
{ name: "Colossians", aliases: ["col"] },
|
||||
{
|
||||
name: "1 Thessalonians",
|
||||
aliases: [
|
||||
"1th",
|
||||
"1thessalonians",
|
||||
"1 thess",
|
||||
"1st thess",
|
||||
"1st thessalonians",
|
||||
"first thessalonians"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 Thessalonians",
|
||||
aliases: [
|
||||
"2th",
|
||||
"2thessalonians",
|
||||
"2 thess",
|
||||
"2nd thess",
|
||||
"2nd thessalonians",
|
||||
"second thessalonians"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "1 Timothy",
|
||||
aliases: [
|
||||
"1ti",
|
||||
"1timothy",
|
||||
"1 tim",
|
||||
"1st tim",
|
||||
"1st timothy",
|
||||
"first timothy"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 Timothy",
|
||||
aliases: [
|
||||
"2ti",
|
||||
"2timothy",
|
||||
"2 tim",
|
||||
"2nd tim",
|
||||
"2nd timothy",
|
||||
"second timothy"
|
||||
]
|
||||
},
|
||||
{ name: "Titus", aliases: ["tit"] },
|
||||
{ name: "Philemon", aliases: ["phm", "phlm"] },
|
||||
{ name: "Hebrews", aliases: ["heb"] },
|
||||
{ name: "James", aliases: ["jas"] },
|
||||
{
|
||||
name: "1 Peter",
|
||||
aliases: [
|
||||
"1pe",
|
||||
"1peter",
|
||||
"1 pet",
|
||||
"1st pet",
|
||||
"1st peter",
|
||||
"first peter"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 Peter",
|
||||
aliases: [
|
||||
"2pe",
|
||||
"2peter",
|
||||
"2 pet",
|
||||
"2nd pet",
|
||||
"2nd peter",
|
||||
"second peter"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "1 John",
|
||||
aliases: [
|
||||
"1jn",
|
||||
"1john",
|
||||
"1st john",
|
||||
"first john"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "2 John",
|
||||
aliases: [
|
||||
"2jn",
|
||||
"2john",
|
||||
"2nd john",
|
||||
"second john"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "3 John",
|
||||
aliases: [
|
||||
"3jn",
|
||||
"3john",
|
||||
"3rd john",
|
||||
"third john"
|
||||
]
|
||||
},
|
||||
{ name: "Jude", aliases: ["jud"] },
|
||||
{ name: "Revelation", aliases: ["rev"] },
|
||||
];
|
||||
@@ -1,70 +1,74 @@
|
||||
import { Book } from "../models";
|
||||
import { Book } from '../models';
|
||||
|
||||
export const BOOKS_DE: Book[] = [
|
||||
{ id: "gen", name: "1. Mose", aliases: ["Genesis", "Gen", "1Mo"] },
|
||||
{ id: "exo", name: "2. Mose", aliases: ["Exodus", "Ex", "2Mo"] },
|
||||
{ id: "lev", name: "3. Mose", aliases: ["Levitikus", "Lev", "3Mo"] },
|
||||
{ id: "num", name: "4. Mose", aliases: ["Numeri", "Num", "4Mo"] },
|
||||
{ id: "deu", name: "5. Mose", aliases: ["Deuteronomium", "Dtn", "5Mo"] },
|
||||
{ id: "jos", name: "Josua", aliases: ["Jos", "Jos"] },
|
||||
{ id: "jdg", name: "Richter", aliases: ["Ri", "Richt"] },
|
||||
{ id: "rut", name: "Rut", aliases: ["Rut", "Ru"] },
|
||||
{ id: "1sa", name: "1. Samuel", aliases: ["1Sam", "1Sa"] },
|
||||
{ id: "2sa", name: "2. Samuel", aliases: ["2Sam", "2Sa"] },
|
||||
{ id: "1ki", name: "1. Könige", aliases: ["1Kön", "1Kö"] },
|
||||
{ id: "2ki", name: "2. Könige", aliases: ["2Kön", "2Kö"] },
|
||||
{ id: "1ch", name: "1. Chronik", aliases: ["1Chr", "1Ch"] },
|
||||
{ id: "2ch", name: "2. Chronik", aliases: ["2Chr", "2Ch"] },
|
||||
{ id: "ezr", name: "Esra", aliases: ["Esr", "Esr"] },
|
||||
{ id: "neh", name: "Nehemia", aliases: ["Neh", "Neh"] },
|
||||
{ id: "est", name: "Ester", aliases: ["Esther", "Est", "Est"] },
|
||||
{ id: "job", name: "Ijob", aliases: ["Hiob", "Ijob", "Hi"] },
|
||||
{ id: "psa", name: "Psalmen", aliases: ["Psalter", "Ps"] },
|
||||
{ id: "pro", name: "Sprüche", aliases: ["Sprüche Salomos", "Spr"] },
|
||||
{ id: "ecc", name: "Kohelet", aliases: ["Prediger", "Koh", "Pred"] },
|
||||
{ id: "sng", name: "Hoheslied", aliases: ["Lied der Lieder", "Hld", "Hl"] },
|
||||
{ id: "isa", name: "Jesaja", aliases: ["Jes"] },
|
||||
{ id: "jer", name: "Jeremia", aliases: ["Jer"] },
|
||||
{ id: "lam", name: "Klagelieder", aliases: ["Threni", "Klgl", "Kla"] },
|
||||
{ id: "ezk", name: "Ezechiel", aliases: ["Hesekiel", "Ez", "Hes"] },
|
||||
{ id: "dan", name: "Daniel", aliases: ["Dan"] },
|
||||
{ id: "hos", name: "Hosea", aliases: ["Hos", "Hos"] },
|
||||
{ id: "jol", name: "Joel", aliases: ["Joe"] },
|
||||
{ id: "amo", name: "Amos", aliases: ["Am", "Amos"] },
|
||||
{ id: "oba", name: "Obadja", aliases: ["Ob", "Oba"] },
|
||||
{ id: "jon", name: "Jona", aliases: ["Jon"] },
|
||||
{ id: "mic", name: "Micha", aliases: ["Mi", "Mic"] },
|
||||
{ id: "nam", name: "Nahum", aliases: ["Nah"] },
|
||||
{ id: "hab", name: "Habakuk", aliases: ["Hab", "Hab"] },
|
||||
{ id: "zep", name: "Zefanja", aliases: ["Zephanja", "Zef", "Zeph"] },
|
||||
{ id: "hag", name: "Haggai", aliases: ["Hag"] },
|
||||
{ id: "zec", name: "Sacharja", aliases: ["Sach"] },
|
||||
{ id: "mal", name: "Maleachi", aliases: ["Mal"] },
|
||||
{ id: "mat", name: "Matthäus", aliases: ["Mt"] },
|
||||
{ id: "mrk", name: "Markus", aliases: ["Mk"] },
|
||||
{ id: "luk", name: "Lukas", aliases: ["Lk"] },
|
||||
{ id: "jhn", name: "Johannes", aliases: ["Joh"] },
|
||||
{ id: "act", name: "Apostelgeschichte", aliases: ["Taten der Apostel", "Apg"] },
|
||||
{ id: "rom", name: "Römer", aliases: ["Röm", "Rö"] },
|
||||
{ id: "1co", name: "1. Korinther", aliases: ["1Kor", "1Ko"] },
|
||||
{ id: "2co", name: "2. Korinther", aliases: ["2Kor", "2Ko"] },
|
||||
{ id: "gal", name: "Galater", aliases: ["Gal", "Gal"] },
|
||||
{ id: "eph", name: "Epheser", aliases: ["Eph", "Eph"] },
|
||||
{ id: "php", name: "Philipper", aliases: ["Phil"] },
|
||||
{ id: "col", name: "Kolosser", aliases: ["Kol"] },
|
||||
{ id: "1th", name: "1. Thessalonicher", aliases: ["1Thes", "1Th"] },
|
||||
{ id: "2th", name: "2. Thessalonicher", aliases: ["2Thes", "2Th"] },
|
||||
{ id: "1ti", name: "1. Timotheus", aliases: ["1Tim", "1Ti"] },
|
||||
{ id: "2ti", name: "2. Timotheus", aliases: ["2Tim", "2Ti"] },
|
||||
{ id: "tit", name: "Titus", aliases: ["Tit"] },
|
||||
{ id: "phm", name: "Philemon", aliases: ["Phlm", "Phm"] },
|
||||
{ id: "heb", name: "Hebräer", aliases: ["Hebr", "Heb"] },
|
||||
{ id: "jas", name: "Jakobus", aliases: ["Jak", "Jak"] },
|
||||
{ id: "1pe", name: "1. Petrus", aliases: ["1Pet", "1Pe"] },
|
||||
{ id: "2pe", name: "2. Petrus", aliases: ["2Pet", "2Pe"] },
|
||||
{ id: "1jn", name: "1. Johannes", aliases: ["1Joh", "1Jo"] },
|
||||
{ id: "2jn", name: "2. Johannes", aliases: ["2Joh", "2Jo"] },
|
||||
{ id: "3jn", name: "3. Johannes", aliases: ["3Joh", "3Jo"] },
|
||||
{ id: "jud", name: "Judas", aliases: ["Jud"] },
|
||||
{ id: "rev", name: "Offenbarung", aliases: ["Apokalypse", "Off", "Apk"] },
|
||||
];
|
||||
export const BOOKS: Book[] = [
|
||||
{ id: 'gen', name: '1. Mose', aliases: ['Genesis', 'Gen', '1Mo'] },
|
||||
{ id: 'exo', name: '2. Mose', aliases: ['Exodus', 'Ex', '2Mo'] },
|
||||
{ id: 'lev', name: '3. Mose', aliases: ['Levitikus', 'Lev', '3Mo'] },
|
||||
{ id: 'num', name: '4. Mose', aliases: ['Numeri', 'Num', '4Mo'] },
|
||||
{ id: 'deu', name: '5. Mose', aliases: ['Deuteronomium', 'Dtn', '5Mo'] },
|
||||
{ id: 'jos', name: 'Josua', aliases: ['Jos', 'Jos'] },
|
||||
{ id: 'jdg', name: 'Richter', aliases: ['Ri', 'Richt'] },
|
||||
{ id: 'rut', name: 'Rut', aliases: ['Rut', 'Ru'] },
|
||||
{ id: '1sa', name: '1. Samuel', aliases: ['1Sam', '1Sa'] },
|
||||
{ id: '2sa', name: '2. Samuel', aliases: ['2Sam', '2Sa'] },
|
||||
{ id: '1ki', name: '1. Könige', aliases: ['1Kön', '1Kö'] },
|
||||
{ id: '2ki', name: '2. Könige', aliases: ['2Kön', '2Kö'] },
|
||||
{ id: '1ch', name: '1. Chronik', aliases: ['1Chr', '1Ch'] },
|
||||
{ id: '2ch', name: '2. Chronik', aliases: ['2Chr', '2Ch'] },
|
||||
{ id: 'ezr', name: 'Esra', aliases: ['Esr', 'Esr'] },
|
||||
{ id: 'neh', name: 'Nehemia', aliases: ['Neh', 'Neh'] },
|
||||
{ id: 'est', name: 'Ester', aliases: ['Esther', 'Est', 'Est'] },
|
||||
{ id: 'job', name: 'Ijob', aliases: ['Hiob', 'Ijob', 'Hi'] },
|
||||
{ id: 'psa', name: 'Psalmen', aliases: ['Psalter', 'Ps'] },
|
||||
{ id: 'pro', name: 'Sprüche', aliases: ['Sprüche Salomos', 'Spr'] },
|
||||
{ id: 'ecc', name: 'Kohelet', aliases: ['Prediger', 'Koh', 'Pred'] },
|
||||
{ id: 'sng', name: 'Hoheslied', aliases: ['Lied der Lieder', 'Hld', 'Hl'] },
|
||||
{ id: 'isa', name: 'Jesaja', aliases: ['Jes'] },
|
||||
{ id: 'jer', name: 'Jeremia', aliases: ['Jer'] },
|
||||
{ id: 'lam', name: 'Klagelieder', aliases: ['Threni', 'Klgl', 'Kla'] },
|
||||
{ id: 'ezk', name: 'Ezechiel', aliases: ['Hesekiel', 'Ez', 'Hes'] },
|
||||
{ id: 'dan', name: 'Daniel', aliases: ['Dan'] },
|
||||
{ id: 'hos', name: 'Hosea', aliases: ['Hos', 'Hos'] },
|
||||
{ id: 'jol', name: 'Joel', aliases: ['Joe'] },
|
||||
{ id: 'amo', name: 'Amos', aliases: ['Am', 'Amos'] },
|
||||
{ id: 'oba', name: 'Obadja', aliases: ['Ob', 'Oba'] },
|
||||
{ id: 'jon', name: 'Jona', aliases: ['Jon'] },
|
||||
{ id: 'mic', name: 'Micha', aliases: ['Mi', 'Mic'] },
|
||||
{ id: 'nam', name: 'Nahum', aliases: ['Nah'] },
|
||||
{ id: 'hab', name: 'Habakuk', aliases: ['Hab', 'Hab'] },
|
||||
{ id: 'zep', name: 'Zefanja', aliases: ['Zephanja', 'Zef', 'Zeph'] },
|
||||
{ id: 'hag', name: 'Haggai', aliases: ['Hag'] },
|
||||
{ id: 'zec', name: 'Sacharja', aliases: ['Sach'] },
|
||||
{ id: 'mal', name: 'Maleachi', aliases: ['Mal'] },
|
||||
{ id: 'mat', name: 'Matthäus', aliases: ['Mt'] },
|
||||
{ id: 'mrk', name: 'Markus', aliases: ['Mk'] },
|
||||
{ id: 'luk', name: 'Lukas', aliases: ['Lk'] },
|
||||
{ id: 'jhn', name: 'Johannes', aliases: ['Joh'] },
|
||||
{
|
||||
id: 'act',
|
||||
name: 'Apostelgeschichte',
|
||||
aliases: ['Taten der Apostel', 'Apg'],
|
||||
},
|
||||
{ id: 'rom', name: 'Römer', aliases: ['Röm', 'Rö'] },
|
||||
{ id: '1co', name: '1. Korinther', aliases: ['1Kor', '1Ko'] },
|
||||
{ id: '2co', name: '2. Korinther', aliases: ['2Kor', '2Ko'] },
|
||||
{ id: 'gal', name: 'Galater', aliases: ['Gal', 'Gal'] },
|
||||
{ id: 'eph', name: 'Epheser', aliases: ['Eph', 'Eph'] },
|
||||
{ id: 'php', name: 'Philipper', aliases: ['Phil'] },
|
||||
{ id: 'col', name: 'Kolosser', aliases: ['Kol'] },
|
||||
{ id: '1th', name: '1. Thessalonicher', aliases: ['1Thes', '1Th'] },
|
||||
{ id: '2th', name: '2. Thessalonicher', aliases: ['2Thes', '2Th'] },
|
||||
{ id: '1ti', name: '1. Timotheus', aliases: ['1Tim', '1Ti'] },
|
||||
{ id: '2ti', name: '2. Timotheus', aliases: ['2Tim', '2Ti'] },
|
||||
{ id: 'tit', name: 'Titus', aliases: ['Tit'] },
|
||||
{ id: 'phm', name: 'Philemon', aliases: ['Phlm', 'Phm'] },
|
||||
{ id: 'heb', name: 'Hebräer', aliases: ['Hebr', 'Heb'] },
|
||||
{ id: 'jas', name: 'Jakobus', aliases: ['Jak', 'Jak'] },
|
||||
{ id: '1pe', name: '1. Petrus', aliases: ['1Pet', '1Pe'] },
|
||||
{ id: '2pe', name: '2. Petrus', aliases: ['2Pet', '2Pe'] },
|
||||
{ id: '1jn', name: '1. Johannes', aliases: ['1Joh', '1Jo'] },
|
||||
{ id: '2jn', name: '2. Johannes', aliases: ['2Joh', '2Jo'] },
|
||||
{ id: '3jn', name: '3. Johannes', aliases: ['3Joh', '3Jo'] },
|
||||
{ id: 'jud', name: 'Judas', aliases: ['Jud'] },
|
||||
{ id: 'rev', name: 'Offenbarung', aliases: ['Apokalypse', 'Off', 'Apk'] },
|
||||
];
|
||||
|
||||
7
src/i18n/de/index.ts
Normal file
7
src/i18n/de/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { BOOKS } from './books';
|
||||
import { SETTINGS } from './settings';
|
||||
|
||||
export const DE = {
|
||||
BOOKS,
|
||||
SETTINGS,
|
||||
};
|
||||
@@ -1,65 +1,72 @@
|
||||
import { Settings } from "../models";
|
||||
import { Settings } from '../models';
|
||||
|
||||
export const SETTINGS: Settings = {
|
||||
required: {
|
||||
name: 'Required Settings',
|
||||
controls: {
|
||||
biblesPath: {
|
||||
name: 'Bibles path',
|
||||
description: 'The path to the folder containing your bibles.'
|
||||
},
|
||||
}
|
||||
},
|
||||
required: {
|
||||
name: 'Required Settings',
|
||||
controls: {
|
||||
biblesPath: {
|
||||
name: 'Bibles path',
|
||||
description: 'The path to the folder containing your bibles.',
|
||||
placeholder: 'e.g. Data/Bibles',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
optional: {
|
||||
name: 'Optional Settings',
|
||||
controls: {
|
||||
defaultVersion: {
|
||||
name: 'Default version',
|
||||
description: 'The version to use by default - shorthand. This should correspond to a folder in the bibles folder selected above.'
|
||||
},
|
||||
defaultPassageFormat: {
|
||||
name: 'Default passage format',
|
||||
description: 'The markdown format to use for passages by default.'
|
||||
},
|
||||
bibleFormat: {
|
||||
name: 'Bible format',
|
||||
description: 'The formatting style you use for your vault bibles. Local Bible Ref relies on this to parse passages correctly.'
|
||||
}
|
||||
}
|
||||
},
|
||||
optional: {
|
||||
name: 'Optional Settings',
|
||||
controls: {
|
||||
defaultVersion: {
|
||||
name: 'Default version',
|
||||
description:
|
||||
'The version to use by default - shorthand. This should correspond to a folder in the bibles folder selected above.',
|
||||
placeholder: 'e.g. NIV',
|
||||
},
|
||||
defaultPassageFormat: {
|
||||
name: 'Default passage format',
|
||||
description: 'The markdown format to use for passages by default.',
|
||||
},
|
||||
bibleFormat: {
|
||||
name: 'Bible format',
|
||||
description:
|
||||
'The formatting style you use for your vault bibles. Local Bible Ref relies on this to parse passages correctly.',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
quoteFormat: {
|
||||
name: 'Quote Format Settings',
|
||||
description: 'Settings for the quote passage format.',
|
||||
controls: {
|
||||
includeReference: {
|
||||
name: 'Include reference',
|
||||
description: 'Whether to include a reference to the passage.'
|
||||
},
|
||||
referencePosition: {
|
||||
name: 'Reference position',
|
||||
description: 'The position of the reference in relation to the quoted text.'
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description: 'Whether to link the reference to the passage in your vault Bible.'
|
||||
}
|
||||
}
|
||||
},
|
||||
quoteFormat: {
|
||||
name: 'Quote Format Settings',
|
||||
description: 'Settings for the quote passage format.',
|
||||
controls: {
|
||||
includeReference: {
|
||||
name: 'Include reference',
|
||||
description: 'Whether to include a reference to the passage.',
|
||||
},
|
||||
referencePosition: {
|
||||
name: 'Reference position',
|
||||
description:
|
||||
'The position of the reference in relation to the quoted text.',
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description:
|
||||
'Whether to link the reference to the passage in your vault Bible.',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
calloutFormat: {
|
||||
name: 'Callout Format Settings',
|
||||
description: 'Settings for the callout passage format.',
|
||||
controls: {
|
||||
calloutType: {
|
||||
name: 'Callout type',
|
||||
description: 'The type of callout to use for the passage.'
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description: 'Whether to link the reference to the passage in your vault Bible.'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
calloutFormat: {
|
||||
name: 'Callout Format Settings',
|
||||
description: 'Settings for the callout passage format.',
|
||||
controls: {
|
||||
calloutType: {
|
||||
name: 'Callout type',
|
||||
description: 'The type of callout to use for the passage.',
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description:
|
||||
'Whether to link the reference to the passage in your vault Bible.',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,70 +1,212 @@
|
||||
import { Book } from "../models";
|
||||
import { Book } from '../models';
|
||||
|
||||
export const BOOKS: Book[] = [
|
||||
{ id: "gen", name: "Genesis", aliases: ["gen"] },
|
||||
{ id: "exo", name: "Exodus", aliases: ["exo", "ex", "exod"] },
|
||||
{ id: "lev", name: "Leviticus", aliases: ["lev"] },
|
||||
{ id: "num", name: "Numbers", aliases: ["num"] },
|
||||
{ id: "deu", name: "Deuteronomy", aliases: ["deu", "deut"] },
|
||||
{ id: "jos", name: "Joshua", aliases: ["jos", "josh"] },
|
||||
{ id: "jdg", name: "Judges", aliases: ["jdg", "judg"] },
|
||||
{ id: "rut", name: "Ruth", aliases: ["rut"] },
|
||||
{ id: "1sa", name: "1 Samuel", aliases: ["1sa", "1samuel", "1 sam", "1st sam", "1st samuel", "first samuel"] },
|
||||
{ id: "2sa", name: "2 Samuel", aliases: ["2sa", "2samuel", "2 sam", "2nd sam", "2nd samuel", "second samuel"] },
|
||||
{ id: "1ki", name: "1 Kings", aliases: ["1ki", "1kings", "1 kgs", "1st kgs", "1st kings", "first kings"] },
|
||||
{ id: "2ki", name: "2 Kings", aliases: ["2ki", "2kings", "2 kgs", "2nd kgs", "2nd kings", "second kings"] },
|
||||
{ id: "1ch", name: "1 Chronicles", aliases: ["1ch", "1chronicles", "1 chr", "1st chr", "1st chronicles", "first chronicles"] },
|
||||
{ id: "2ch", name: "2 Chronicles", aliases: ["2ch", "2chronicles", "2 chr", "2nd chr", "2nd chronicles", "second chronicles"] },
|
||||
{ id: "ezr", name: "Ezra", aliases: ["ezr"] },
|
||||
{ id: "neh", name: "Nehemiah", aliases: ["neh"] },
|
||||
{ id: "est", name: "Esther", aliases: ["est", "esth"] },
|
||||
{ id: "job", name: "Job", aliases: ["job"] },
|
||||
{ id: "psa", name: "Psalms", aliases: ["psa", "ps", "psalm"] },
|
||||
{ id: "pro", name: "Proverbs", aliases: ["pro", "prov"] },
|
||||
{ id: "ecc", name: "Ecclesiastes", aliases: ["ecc", "eccl"] },
|
||||
{ id: "sng", name: "Song of Songs", aliases: ["sng", "Song of Solomon", "song"] },
|
||||
{ id: "isa", name: "Isaiah", aliases: ["isa"] },
|
||||
{ id: "jer", name: "Jeremiah", aliases: ["jer"] },
|
||||
{ id: "lam", name: "Lamentations", aliases: ["lam"] },
|
||||
{ id: "ezk", name: "Ezekiel", aliases: ["ezk", "ezek"] },
|
||||
{ id: "dan", name: "Daniel", aliases: ["dan"] },
|
||||
{ id: "hos", name: "Hosea", aliases: ["hos"] },
|
||||
{ id: "jol", name: "Joel", aliases: ["jol"] },
|
||||
{ id: "amo", name: "Amos", aliases: ["amo"] },
|
||||
{ id: "oba", name: "Obadiah", aliases: ["oba", "obad"] },
|
||||
{ id: "jon", name: "Jonah", aliases: ["jon"] },
|
||||
{ id: "mic", name: "Micah", aliases: ["mic"] },
|
||||
{ id: "nam", name: "Nahum", aliases: ["nam"] },
|
||||
{ id: "hab", name: "Habakkuk", aliases: ["hab"] },
|
||||
{ id: "zep", name: "Zephaniah", aliases: ["zep", "zeph"] },
|
||||
{ id: "hag", name: "Haggai", aliases: ["hag"] },
|
||||
{ id: "zec", name: "Zechariah", aliases: ["zec", "zech"] },
|
||||
{ id: "mal", name: "Malachi", aliases: ["mal"] },
|
||||
{ id: "mat", name: "Matthew", aliases: ["mat", "matt"] },
|
||||
{ id: "mrk", name: "Mark", aliases: ["mrk"] },
|
||||
{ id: "luk", name: "Luke", aliases: ["luk"] },
|
||||
{ id: "jhn", name: "John", aliases: ["jhn"] },
|
||||
{ id: "act", name: "Acts", aliases: ["act"] },
|
||||
{ id: "rom", name: "Romans", aliases: ["rom"] },
|
||||
{ id: "1co", name: "1 Corinthians", aliases: ["1co", "1corinthians", "1 cor", "1st cor", "1st corinthians", "first corinthians"] },
|
||||
{ id: "2co", name: "2 Corinthians", aliases: ["2co", "2corinthians", "2 cor", "2nd cor", "2nd corinthians", "second corinthians"] },
|
||||
{ id: "gal", name: "Galatians", aliases: ["gal"] },
|
||||
{ id: "eph", name: "Ephesians", aliases: ["eph"] },
|
||||
{ id: "php", name: "Philippians", aliases: ["php", "phil"] },
|
||||
{ id: "col", name: "Colossians", aliases: ["col"] },
|
||||
{ id: "1th", name: "1 Thessalonians", aliases: ["1th", "1thessalonians", "1 thess", "1st thess", "1st thessalonians", "first thessalonians"] },
|
||||
{ id: "2th", name: "2 Thessalonians", aliases: ["2th", "2thessalonians", "2 thess", "2nd thess", "2nd thessalonians", "second thessalonians"] },
|
||||
{ id: "1ti", name: "1 Timothy", aliases: ["1ti", "1timothy", "1 tim", "1st tim", "1st timothy", "first timothy"] },
|
||||
{ id: "2ti", name: "2 Timothy", aliases: ["2ti", "2timothy", "2 tim", "2nd tim", "2nd timothy", "second timothy"] },
|
||||
{ id: "tit", name: "Titus", aliases: ["tit"] },
|
||||
{ id: "phm", name: "Philemon", aliases: ["phm", "phlm"] },
|
||||
{ id: "heb", name: "Hebrews", aliases: ["heb"] },
|
||||
{ id: "jas", name: "James", aliases: ["jas"] },
|
||||
{ id: "1pe", name: "1 Peter", aliases: ["1pe", "1peter", "1 pet", "1st pet", "1st peter", "first peter"] },
|
||||
{ id: "2pe", name: "2 Peter", aliases: ["2pe", "2peter", "2 pet", "2nd pet", "2nd peter", "second peter"] },
|
||||
{ id: "1jn", name: "1 John", aliases: ["1jn", "1john", "1st john", "first john"] },
|
||||
{ id: "2jn", name: "2 John", aliases: ["2jn", "2john", "2nd john", "second john"] },
|
||||
{ id: "3jn", name: "3 John", aliases: ["3jn", "3john", "3rd john", "third john"] },
|
||||
{ id: "jud", name: "Jude", aliases: ["jud"] },
|
||||
{ id: "rev", name: "Revelation", aliases: ["rev"] },
|
||||
{ id: 'gen', name: 'Genesis', aliases: ['gen'] },
|
||||
{ id: 'exo', name: 'Exodus', aliases: ['exo', 'ex', 'exod'] },
|
||||
{ id: 'lev', name: 'Leviticus', aliases: ['lev'] },
|
||||
{ id: 'num', name: 'Numbers', aliases: ['num'] },
|
||||
{ id: 'deu', name: 'Deuteronomy', aliases: ['deu', 'deut'] },
|
||||
{ id: 'jos', name: 'Joshua', aliases: ['jos', 'josh'] },
|
||||
{ id: 'jdg', name: 'Judges', aliases: ['jdg', 'judg'] },
|
||||
{ id: 'rut', name: 'Ruth', aliases: ['rut'] },
|
||||
{
|
||||
id: '1sa',
|
||||
name: '1 Samuel',
|
||||
aliases: [
|
||||
'1sa',
|
||||
'1samuel',
|
||||
'1 sam',
|
||||
'1st sam',
|
||||
'1st samuel',
|
||||
'first samuel',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '2sa',
|
||||
name: '2 Samuel',
|
||||
aliases: [
|
||||
'2sa',
|
||||
'2samuel',
|
||||
'2 sam',
|
||||
'2nd sam',
|
||||
'2nd samuel',
|
||||
'second samuel',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '1ki',
|
||||
name: '1 Kings',
|
||||
aliases: ['1ki', '1kings', '1 kgs', '1st kgs', '1st kings', 'first kings'],
|
||||
},
|
||||
{
|
||||
id: '2ki',
|
||||
name: '2 Kings',
|
||||
aliases: ['2ki', '2kings', '2 kgs', '2nd kgs', '2nd kings', 'second kings'],
|
||||
},
|
||||
{
|
||||
id: '1ch',
|
||||
name: '1 Chronicles',
|
||||
aliases: [
|
||||
'1ch',
|
||||
'1chronicles',
|
||||
'1 chr',
|
||||
'1st chr',
|
||||
'1st chronicles',
|
||||
'first chronicles',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '2ch',
|
||||
name: '2 Chronicles',
|
||||
aliases: [
|
||||
'2ch',
|
||||
'2chronicles',
|
||||
'2 chr',
|
||||
'2nd chr',
|
||||
'2nd chronicles',
|
||||
'second chronicles',
|
||||
],
|
||||
},
|
||||
{ id: 'ezr', name: 'Ezra', aliases: ['ezr'] },
|
||||
{ id: 'neh', name: 'Nehemiah', aliases: ['neh'] },
|
||||
{ id: 'est', name: 'Esther', aliases: ['est', 'esth'] },
|
||||
{ id: 'job', name: 'Job', aliases: ['job'] },
|
||||
{ id: 'psa', name: 'Psalms', aliases: ['psa', 'ps', 'psalm'] },
|
||||
{ id: 'pro', name: 'Proverbs', aliases: ['pro', 'prov'] },
|
||||
{ id: 'ecc', name: 'Ecclesiastes', aliases: ['ecc', 'eccl'] },
|
||||
{
|
||||
id: 'sng',
|
||||
name: 'Song of Songs',
|
||||
aliases: ['sng', 'Song of Solomon', 'song'],
|
||||
},
|
||||
{ id: 'isa', name: 'Isaiah', aliases: ['isa'] },
|
||||
{ id: 'jer', name: 'Jeremiah', aliases: ['jer'] },
|
||||
{ id: 'lam', name: 'Lamentations', aliases: ['lam'] },
|
||||
{ id: 'ezk', name: 'Ezekiel', aliases: ['ezk', 'ezek'] },
|
||||
{ id: 'dan', name: 'Daniel', aliases: ['dan'] },
|
||||
{ id: 'hos', name: 'Hosea', aliases: ['hos'] },
|
||||
{ id: 'jol', name: 'Joel', aliases: ['jol'] },
|
||||
{ id: 'amo', name: 'Amos', aliases: ['amo'] },
|
||||
{ id: 'oba', name: 'Obadiah', aliases: ['oba', 'obad'] },
|
||||
{ id: 'jon', name: 'Jonah', aliases: ['jon'] },
|
||||
{ id: 'mic', name: 'Micah', aliases: ['mic'] },
|
||||
{ id: 'nam', name: 'Nahum', aliases: ['nam'] },
|
||||
{ id: 'hab', name: 'Habakkuk', aliases: ['hab'] },
|
||||
{ id: 'zep', name: 'Zephaniah', aliases: ['zep', 'zeph'] },
|
||||
{ id: 'hag', name: 'Haggai', aliases: ['hag'] },
|
||||
{ id: 'zec', name: 'Zechariah', aliases: ['zec', 'zech'] },
|
||||
{ id: 'mal', name: 'Malachi', aliases: ['mal'] },
|
||||
{ id: 'mat', name: 'Matthew', aliases: ['mat', 'matt'] },
|
||||
{ id: 'mrk', name: 'Mark', aliases: ['mrk'] },
|
||||
{ id: 'luk', name: 'Luke', aliases: ['luk'] },
|
||||
{ id: 'jhn', name: 'John', aliases: ['jhn'] },
|
||||
{ id: 'act', name: 'Acts', aliases: ['act'] },
|
||||
{ id: 'rom', name: 'Romans', aliases: ['rom'] },
|
||||
{
|
||||
id: '1co',
|
||||
name: '1 Corinthians',
|
||||
aliases: [
|
||||
'1co',
|
||||
'1corinthians',
|
||||
'1 cor',
|
||||
'1st cor',
|
||||
'1st corinthians',
|
||||
'first corinthians',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '2co',
|
||||
name: '2 Corinthians',
|
||||
aliases: [
|
||||
'2co',
|
||||
'2corinthians',
|
||||
'2 cor',
|
||||
'2nd cor',
|
||||
'2nd corinthians',
|
||||
'second corinthians',
|
||||
],
|
||||
},
|
||||
{ id: 'gal', name: 'Galatians', aliases: ['gal'] },
|
||||
{ id: 'eph', name: 'Ephesians', aliases: ['eph'] },
|
||||
{ id: 'php', name: 'Philippians', aliases: ['php', 'phil'] },
|
||||
{ id: 'col', name: 'Colossians', aliases: ['col'] },
|
||||
{
|
||||
id: '1th',
|
||||
name: '1 Thessalonians',
|
||||
aliases: [
|
||||
'1th',
|
||||
'1thessalonians',
|
||||
'1 thess',
|
||||
'1st thess',
|
||||
'1st thessalonians',
|
||||
'first thessalonians',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '2th',
|
||||
name: '2 Thessalonians',
|
||||
aliases: [
|
||||
'2th',
|
||||
'2thessalonians',
|
||||
'2 thess',
|
||||
'2nd thess',
|
||||
'2nd thessalonians',
|
||||
'second thessalonians',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '1ti',
|
||||
name: '1 Timothy',
|
||||
aliases: [
|
||||
'1ti',
|
||||
'1timothy',
|
||||
'1 tim',
|
||||
'1st tim',
|
||||
'1st timothy',
|
||||
'first timothy',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: '2ti',
|
||||
name: '2 Timothy',
|
||||
aliases: [
|
||||
'2ti',
|
||||
'2timothy',
|
||||
'2 tim',
|
||||
'2nd tim',
|
||||
'2nd timothy',
|
||||
'second timothy',
|
||||
],
|
||||
},
|
||||
{ id: 'tit', name: 'Titus', aliases: ['tit'] },
|
||||
{ id: 'phm', name: 'Philemon', aliases: ['phm', 'phlm'] },
|
||||
{ id: 'heb', name: 'Hebrews', aliases: ['heb'] },
|
||||
{ id: 'jas', name: 'James', aliases: ['jas'] },
|
||||
{
|
||||
id: '1pe',
|
||||
name: '1 Peter',
|
||||
aliases: ['1pe', '1peter', '1 pet', '1st pet', '1st peter', 'first peter'],
|
||||
},
|
||||
{
|
||||
id: '2pe',
|
||||
name: '2 Peter',
|
||||
aliases: ['2pe', '2peter', '2 pet', '2nd pet', '2nd peter', 'second peter'],
|
||||
},
|
||||
{
|
||||
id: '1jn',
|
||||
name: '1 John',
|
||||
aliases: ['1jn', '1john', '1st john', 'first john'],
|
||||
},
|
||||
{
|
||||
id: '2jn',
|
||||
name: '2 John',
|
||||
aliases: ['2jn', '2john', '2nd john', 'second john'],
|
||||
},
|
||||
{
|
||||
id: '3jn',
|
||||
name: '3 John',
|
||||
aliases: ['3jn', '3john', '3rd john', 'third john'],
|
||||
},
|
||||
{ id: 'jud', name: 'Jude', aliases: ['jud'] },
|
||||
{ id: 'rev', name: 'Revelation', aliases: ['rev'] },
|
||||
];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { BOOKS } from "./books";
|
||||
import { SETTINGS } from "./settings";
|
||||
import { BOOKS } from './books';
|
||||
import { SETTINGS } from './settings';
|
||||
|
||||
export const EN = {
|
||||
BOOKS,
|
||||
SETTINGS,
|
||||
}
|
||||
BOOKS,
|
||||
SETTINGS,
|
||||
};
|
||||
|
||||
@@ -1,67 +1,72 @@
|
||||
import { Settings } from "../models";
|
||||
import { Settings } from '../models';
|
||||
|
||||
export const SETTINGS: Settings = {
|
||||
required: {
|
||||
name: 'Required Settings',
|
||||
controls: {
|
||||
biblesPath: {
|
||||
name: 'Bibles path',
|
||||
description: 'The path to the folder containing your bibles.',
|
||||
placeholder: 'e.g. Data/Bibles'
|
||||
},
|
||||
}
|
||||
},
|
||||
required: {
|
||||
name: 'Required Settings',
|
||||
controls: {
|
||||
biblesPath: {
|
||||
name: 'Bibles path',
|
||||
description: 'The path to the folder containing your bibles.',
|
||||
placeholder: 'e.g. Data/Bibles',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
optional: {
|
||||
name: 'Optional Settings',
|
||||
controls: {
|
||||
defaultVersion: {
|
||||
name: 'Default version',
|
||||
description: 'The version to use by default - shorthand. This should correspond to a folder in the bibles folder selected above.',
|
||||
placeholder: 'e.g. NIV'
|
||||
},
|
||||
defaultPassageFormat: {
|
||||
name: 'Default passage format',
|
||||
description: 'The markdown format to use for passages by default.'
|
||||
},
|
||||
bibleFormat: {
|
||||
name: 'Bible format',
|
||||
description: 'The formatting style you use for your vault bibles. Local Bible Ref relies on this to parse passages correctly.'
|
||||
}
|
||||
}
|
||||
},
|
||||
optional: {
|
||||
name: 'Optional Settings',
|
||||
controls: {
|
||||
defaultVersion: {
|
||||
name: 'Default version',
|
||||
description:
|
||||
'The version to use by default - shorthand. This should correspond to a folder in the bibles folder selected above.',
|
||||
placeholder: 'e.g. NIV',
|
||||
},
|
||||
defaultPassageFormat: {
|
||||
name: 'Default passage format',
|
||||
description: 'The markdown format to use for passages by default.',
|
||||
},
|
||||
bibleFormat: {
|
||||
name: 'Bible format',
|
||||
description:
|
||||
'The formatting style you use for your vault bibles. Local Bible Ref relies on this to parse passages correctly.',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
quoteFormat: {
|
||||
name: 'Quote Format Settings',
|
||||
description: 'Settings for the quote passage format.',
|
||||
controls: {
|
||||
includeReference: {
|
||||
name: 'Include reference',
|
||||
description: 'Whether to include a reference to the passage.'
|
||||
},
|
||||
referencePosition: {
|
||||
name: 'Reference position',
|
||||
description: 'The position of the reference in relation to the quoted text.'
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description: 'Whether to link the reference to the passage in your vault Bible.'
|
||||
}
|
||||
}
|
||||
},
|
||||
quoteFormat: {
|
||||
name: 'Quote Format Settings',
|
||||
description: 'Settings for the quote passage format.',
|
||||
controls: {
|
||||
includeReference: {
|
||||
name: 'Include reference',
|
||||
description: 'Whether to include a reference to the passage.',
|
||||
},
|
||||
referencePosition: {
|
||||
name: 'Reference position',
|
||||
description:
|
||||
'The position of the reference in relation to the quoted text.',
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description:
|
||||
'Whether to link the reference to the passage in your vault Bible.',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
calloutFormat: {
|
||||
name: 'Callout Format Settings',
|
||||
description: 'Settings for the callout passage format.',
|
||||
controls: {
|
||||
calloutType: {
|
||||
name: 'Callout type',
|
||||
description: 'The type of callout to use for the passage.'
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description: 'Whether to link the reference to the passage in your vault Bible.'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
calloutFormat: {
|
||||
name: 'Callout Format Settings',
|
||||
description: 'Settings for the callout passage format.',
|
||||
controls: {
|
||||
calloutType: {
|
||||
name: 'Callout type',
|
||||
description: 'The type of callout to use for the passage.',
|
||||
},
|
||||
linkToPassage: {
|
||||
name: 'Link to passage',
|
||||
description:
|
||||
'Whether to link the reference to the passage in your vault Bible.',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { EN } from "./en";
|
||||
import { DE } from './de';
|
||||
import { EN } from './en';
|
||||
|
||||
export const I18N = {
|
||||
EN,
|
||||
}
|
||||
EN,
|
||||
DE,
|
||||
};
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
export interface Book {
|
||||
id: string;
|
||||
id: string;
|
||||
name: string;
|
||||
aliases: string[];
|
||||
}
|
||||
|
||||
export interface Settings {
|
||||
[key: string]: SettingsGroup
|
||||
[key: string]: SettingsGroup;
|
||||
}
|
||||
|
||||
interface SettingsGroup {
|
||||
name: string;
|
||||
description?: string;
|
||||
controls: { [key: string]: Control };
|
||||
name: string;
|
||||
description?: string;
|
||||
controls: { [key: string]: Control };
|
||||
}
|
||||
|
||||
interface Control {
|
||||
name: string;
|
||||
description?: string;
|
||||
placeholder?: string;
|
||||
}
|
||||
name: string;
|
||||
description?: string;
|
||||
placeholder?: string;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import LocalBibleRefPlugin from 'main';
|
||||
import { App, normalizePath, Notice, PluginSettingTab, Setting, TextComponent } from 'obsidian';
|
||||
import {
|
||||
App,
|
||||
normalizePath,
|
||||
Notice,
|
||||
PluginSettingTab,
|
||||
Setting,
|
||||
TextComponent,
|
||||
} from 'obsidian';
|
||||
import { PassageFormat } from './passage-reference';
|
||||
import PathSuggest from './path-suggest';
|
||||
import { CalloutType, QuoteReferencePosition } from './settings';
|
||||
@@ -17,203 +24,234 @@ export default class LocalBibleRefSettingTab extends PluginSettingTab {
|
||||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Required Settings')
|
||||
.setHeading();
|
||||
new Setting(containerEl).setName('Required Settings').setHeading();
|
||||
|
||||
let biblesPathTimeout: number;
|
||||
new Setting(containerEl)
|
||||
let biblesPathTimeout: number;
|
||||
new Setting(containerEl)
|
||||
.setName('Bibles path')
|
||||
.setDesc('The path to the folder containing your bibles.')
|
||||
.addText(text => {
|
||||
text.setPlaceholder('e.g. Data/Bibles')
|
||||
.setValue(this.plugin.settings.biblesPath)
|
||||
.onChange(async (value) => {
|
||||
// toggle visibility of default version setting
|
||||
if (value) {
|
||||
defaultVersionSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
} else {
|
||||
defaultVersionSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
(defaultVersionSetting.components[0] as TextComponent).inputEl.value = '';
|
||||
this.plugin.settings.defaultVersionShorthand = '';
|
||||
}
|
||||
.addText((text) => {
|
||||
text
|
||||
.setPlaceholder('e.g. Data/Bibles')
|
||||
.setValue(this.plugin.settings.biblesPath)
|
||||
.onChange(async (value) => {
|
||||
// toggle visibility of default version setting
|
||||
if (value) {
|
||||
defaultVersionSetting.settingEl.removeClass(
|
||||
'local-bible-ref-hidden'
|
||||
);
|
||||
} else {
|
||||
defaultVersionSetting.settingEl.addClass(
|
||||
'local-bible-ref-hidden'
|
||||
);
|
||||
(
|
||||
defaultVersionSetting.components[0] as TextComponent
|
||||
).inputEl.value = '';
|
||||
this.plugin.settings.defaultVersionShorthand = '';
|
||||
}
|
||||
|
||||
const path = value ? normalizePath(value) : '';
|
||||
this.plugin.settings.biblesPath = path;
|
||||
await this.plugin.saveSettings();
|
||||
const path = value ? normalizePath(value) : '';
|
||||
this.plugin.settings.biblesPath = path;
|
||||
await this.plugin.saveSettings();
|
||||
|
||||
clearTimeout(biblesPathTimeout);
|
||||
biblesPathTimeout = window.setTimeout(async () => {
|
||||
if (!path) return;
|
||||
const exists = this.app.vault.getFolderByPath(path);
|
||||
if (!exists) new Notice(`Folder doesn't exist at path: ${path}.`);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
new PathSuggest(this.app, text.inputEl);
|
||||
});
|
||||
clearTimeout(biblesPathTimeout);
|
||||
biblesPathTimeout = window.setTimeout(async () => {
|
||||
if (!path) return;
|
||||
const exists = this.app.vault.getFolderByPath(path);
|
||||
if (!exists) new Notice(`Folder doesn't exist at path: ${path}.`);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Optional Settings')
|
||||
.setHeading();
|
||||
new PathSuggest(this.app, text.inputEl);
|
||||
});
|
||||
|
||||
let defaultVersionTimeout: number;
|
||||
const defaultVersionSetting = new Setting(containerEl)
|
||||
.setName('Default version')
|
||||
.setDesc('The version to use by default - shorthand. This should correspond to a folder in the bibles folder selected above.')
|
||||
.addText(text => {
|
||||
text.setPlaceholder('e.g. NIV')
|
||||
.setValue(this.plugin.settings.defaultVersionShorthand)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.defaultVersionShorthand = value;
|
||||
await this.plugin.saveSettings();
|
||||
new Setting(containerEl).setName('Optional Settings').setHeading();
|
||||
|
||||
clearTimeout(defaultVersionTimeout);
|
||||
defaultVersionTimeout = window.setTimeout(async () => {
|
||||
const path = `${this.plugin.settings.biblesPath}/${value}`;
|
||||
const exists = this.app.vault.getFolderByPath(normalizePath(path));
|
||||
if (!exists) new Notice(`Folder doesn't exist at path: ${path}.`);
|
||||
}, 1000);
|
||||
});
|
||||
let defaultVersionTimeout: number;
|
||||
const defaultVersionSetting = new Setting(containerEl)
|
||||
.setName('Default version')
|
||||
.setDesc(
|
||||
'The version to use by default - shorthand. This should correspond to a folder in the bibles folder selected above.'
|
||||
)
|
||||
.addText((text) => {
|
||||
text
|
||||
.setPlaceholder('e.g. NIV')
|
||||
.setValue(this.plugin.settings.defaultVersionShorthand)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.defaultVersionShorthand = value;
|
||||
await this.plugin.saveSettings();
|
||||
|
||||
new VersionSuggest(this.app, text.inputEl, this.plugin.settings);
|
||||
});
|
||||
clearTimeout(defaultVersionTimeout);
|
||||
defaultVersionTimeout = window.setTimeout(async () => {
|
||||
const path = `${this.plugin.settings.biblesPath}/${value}`;
|
||||
const exists = this.app.vault.getFolderByPath(
|
||||
normalizePath(path)
|
||||
);
|
||||
if (!exists) new Notice(`Folder doesn't exist at path: ${path}.`);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
if (this.plugin.settings.biblesPath) {
|
||||
defaultVersionSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
} else {
|
||||
defaultVersionSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
}
|
||||
new VersionSuggest(this.app, text.inputEl, this.plugin.settings);
|
||||
});
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Default passage format')
|
||||
.setDesc('The markdown format to use for passages by default.')
|
||||
.addDropdown(dropdown => dropdown
|
||||
.addOptions({
|
||||
manuscript: 'Manuscript',
|
||||
paragraph: 'Paragraph',
|
||||
quote: 'Quote',
|
||||
callout: 'Callout',
|
||||
})
|
||||
.setValue(this.plugin.settings.defaultPassageFormat)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.defaultPassageFormat = value as PassageFormat;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
if (this.plugin.settings.biblesPath) {
|
||||
defaultVersionSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
} else {
|
||||
defaultVersionSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
}
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Bible Format')
|
||||
.setDesc('The formatting style you use for your vault bibles. Local Bible Ref relies on this to parse passages correctly.')
|
||||
.addDropdown(dropdown => dropdown
|
||||
.addOptions({
|
||||
localBibleRef: 'Local Bible Ref',
|
||||
bibleLinker: 'Bible Linker',
|
||||
})
|
||||
.setValue(this.plugin.settings.bibleFormat)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.bibleFormat = value as BibleFormat;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
new Setting(containerEl)
|
||||
.setName('Default passage format')
|
||||
.setDesc('The markdown format to use for passages by default.')
|
||||
.addDropdown((dropdown) =>
|
||||
dropdown
|
||||
.addOptions({
|
||||
manuscript: 'Manuscript',
|
||||
paragraph: 'Paragraph',
|
||||
quote: 'Quote',
|
||||
callout: 'Callout',
|
||||
})
|
||||
.setValue(this.plugin.settings.defaultPassageFormat)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.defaultPassageFormat = value as PassageFormat;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Quote Format Settings')
|
||||
.setDesc('Settings for the quote passage format.')
|
||||
.setHeading();
|
||||
new Setting(containerEl)
|
||||
.setName('Bible Format')
|
||||
.setDesc(
|
||||
'The formatting style you use for your vault bibles. Local Bible Ref relies on this to parse passages correctly.'
|
||||
)
|
||||
.addDropdown((dropdown) =>
|
||||
dropdown
|
||||
.addOptions({
|
||||
localBibleRef: 'Local Bible Ref',
|
||||
bibleLinker: 'Bible Linker',
|
||||
})
|
||||
.setValue(this.plugin.settings.bibleFormat)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.bibleFormat = value as BibleFormat;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Include reference')
|
||||
.setDesc('Whether to include a reference to the passage.')
|
||||
.addToggle(toggle => toggle
|
||||
.setValue(this.plugin.settings.quote.includeReference)
|
||||
.onChange(async (value) => {
|
||||
// toggle visibility of other paragraph reference settings
|
||||
if (value) {
|
||||
quoteRefPositionSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
quoteRefLinkSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
} else {
|
||||
quoteRefPositionSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
quoteRefLinkSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
}
|
||||
new Setting(containerEl)
|
||||
.setName('Quote Format Settings')
|
||||
.setDesc('Settings for the quote passage format.')
|
||||
.setHeading();
|
||||
|
||||
this.plugin.settings.quote.includeReference = value;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
new Setting(containerEl)
|
||||
.setName('Include reference')
|
||||
.setDesc('Whether to include a reference to the passage.')
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.quote.includeReference)
|
||||
.onChange(async (value) => {
|
||||
// toggle visibility of other paragraph reference settings
|
||||
if (value) {
|
||||
quoteRefPositionSetting.settingEl.removeClass(
|
||||
'local-bible-ref-hidden'
|
||||
);
|
||||
quoteRefLinkSetting.settingEl.removeClass(
|
||||
'local-bible-ref-hidden'
|
||||
);
|
||||
} else {
|
||||
quoteRefPositionSetting.settingEl.addClass(
|
||||
'local-bible-ref-hidden'
|
||||
);
|
||||
quoteRefLinkSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
}
|
||||
|
||||
const quoteRefPositionSetting = new Setting(containerEl)
|
||||
.setName('Reference position')
|
||||
.setDesc('Where to position the reference.')
|
||||
.addDropdown(dropdown => dropdown
|
||||
.addOptions({
|
||||
beginning: 'Beginning',
|
||||
end: 'End',
|
||||
})
|
||||
.setValue(this.plugin.settings.quote.referencePosition)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.quote.referencePosition = value as QuoteReferencePosition;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
this.plugin.settings.quote.includeReference = value;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
const quoteRefLinkSetting = new Setting(containerEl)
|
||||
.setName('Link to passage')
|
||||
.setDesc('Whether the reference should link to the passage in the Bible.')
|
||||
.addToggle(toggle => toggle
|
||||
.setValue(this.plugin.settings.quote.linkToPassage)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.quote.linkToPassage = value;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
const quoteRefPositionSetting = new Setting(containerEl)
|
||||
.setName('Reference position')
|
||||
.setDesc('Where to position the reference.')
|
||||
.addDropdown((dropdown) =>
|
||||
dropdown
|
||||
.addOptions({
|
||||
beginning: 'Beginning',
|
||||
end: 'End',
|
||||
})
|
||||
.setValue(this.plugin.settings.quote.referencePosition)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.quote.referencePosition =
|
||||
value as QuoteReferencePosition;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
if (this.plugin.settings.quote.includeReference) {
|
||||
quoteRefPositionSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
quoteRefLinkSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
} else {
|
||||
quoteRefPositionSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
quoteRefLinkSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
}
|
||||
const quoteRefLinkSetting = new Setting(containerEl)
|
||||
.setName('Link to passage')
|
||||
.setDesc('Whether the reference should link to the passage in the Bible.')
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.quote.linkToPassage)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.quote.linkToPassage = value;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Callout Format Settings')
|
||||
.setDesc('Settings for the callout passage format.')
|
||||
.setHeading();
|
||||
if (this.plugin.settings.quote.includeReference) {
|
||||
quoteRefPositionSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
quoteRefLinkSetting.settingEl.removeClass('local-bible-ref-hidden');
|
||||
} else {
|
||||
quoteRefPositionSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
quoteRefLinkSetting.settingEl.addClass('local-bible-ref-hidden');
|
||||
}
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Callout type')
|
||||
.setDesc('The type of callout to use for passages.')
|
||||
.addDropdown(dropdown => dropdown
|
||||
.addOptions({
|
||||
note: 'Note',
|
||||
abstract: 'Abstract',
|
||||
info: 'Info',
|
||||
todo: 'Todo',
|
||||
tip: 'Tip',
|
||||
success: 'Success',
|
||||
question: 'Question',
|
||||
warning: 'Warning',
|
||||
failure: 'Failure',
|
||||
danger: 'Danger',
|
||||
bug: 'Bug',
|
||||
example: 'Example',
|
||||
quote: 'Quote',
|
||||
})
|
||||
.setValue(this.plugin.settings.callout.type)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.callout.type = value as CalloutType;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
new Setting(containerEl)
|
||||
.setName('Callout Format Settings')
|
||||
.setDesc('Settings for the callout passage format.')
|
||||
.setHeading();
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Link to passage')
|
||||
.setDesc('Whether the reference should link to the passage in the Bible.')
|
||||
.addToggle(toggle => toggle
|
||||
.setValue(this.plugin.settings.callout.linkToPassage)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.callout.linkToPassage = value;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
}
|
||||
new Setting(containerEl)
|
||||
.setName('Callout type')
|
||||
.setDesc('The type of callout to use for passages.')
|
||||
.addDropdown((dropdown) =>
|
||||
dropdown
|
||||
.addOptions({
|
||||
note: 'Note',
|
||||
abstract: 'Abstract',
|
||||
info: 'Info',
|
||||
todo: 'Todo',
|
||||
tip: 'Tip',
|
||||
success: 'Success',
|
||||
question: 'Question',
|
||||
warning: 'Warning',
|
||||
failure: 'Failure',
|
||||
danger: 'Danger',
|
||||
bug: 'Bug',
|
||||
example: 'Example',
|
||||
quote: 'Quote',
|
||||
})
|
||||
.setValue(this.plugin.settings.callout.type)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.callout.type = value as CalloutType;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Link to passage')
|
||||
.setDesc('Whether the reference should link to the passage in the Bible.')
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.callout.linkToPassage)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.callout.linkToPassage = value;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export enum BibleFormat {
|
||||
LocalBibleRef = 'localBibleRef',
|
||||
BibleLinker = 'bibleLinker',
|
||||
}
|
||||
LocalBibleRef = 'localBibleRef',
|
||||
BibleLinker = 'bibleLinker',
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Book, BOOKS_EN } from "./books/books.en";
|
||||
import { Book, BOOKS_EN } from './books/books.en';
|
||||
|
||||
export default class PassageReference implements ChapterReference, PassageOptions {
|
||||
export default class PassageReference
|
||||
implements ChapterReference, PassageOptions
|
||||
{
|
||||
startChapter: number;
|
||||
startVerse: number;
|
||||
endChapter: number;
|
||||
@@ -51,15 +53,16 @@ export default class PassageReference implements ChapterReference, PassageOption
|
||||
|
||||
/** Builds the passage matching regular expression. */
|
||||
static get regExp(): RegExp {
|
||||
let regExpString = "^\\-\\- ?(";
|
||||
let regExpString = '^\\-\\- ?(';
|
||||
regExpString += BOOKS_EN.map(
|
||||
(b) => `${b.name}|${b.aliases.join("|")}`
|
||||
).join("|");
|
||||
regExpString += ") ?(\\d{1,3}(?::\\d{1,3})?" +
|
||||
"(?: ?\\- ?\\d{1,3}(?::\\d{1,3})?)?)" +
|
||||
"((?: ?\\+[a-z]+(?::[a-z]+)?){0,2})$";
|
||||
(b) => `${b.name}|${b.aliases.join('|')}`
|
||||
).join('|');
|
||||
regExpString +=
|
||||
') ?(\\d{1,3}(?::\\d{1,3})?' +
|
||||
'(?: ?\\- ?\\d{1,3}(?::\\d{1,3})?)?)' +
|
||||
'((?: ?\\+[a-z]+(?::[a-z]+)?){0,2})$';
|
||||
|
||||
return new RegExp(regExpString, "i");
|
||||
return new RegExp(regExpString, 'i');
|
||||
}
|
||||
|
||||
/** Stringifies the passage reference back into text. */
|
||||
@@ -67,9 +70,7 @@ export default class PassageReference implements ChapterReference, PassageOption
|
||||
// multi-chapter ref
|
||||
if (this.startVerse === 1 && this.endVerse === -1) {
|
||||
if (this.startChapter === this.endChapter)
|
||||
return (
|
||||
this.book.name + ` ${this.startChapter} - ${this.version}`
|
||||
);
|
||||
return this.book.name + ` ${this.startChapter} - ${this.version}`;
|
||||
return (
|
||||
`${this.book.name} ${this.startChapter}-` +
|
||||
`${this.endChapter} - ${this.version}`
|
||||
@@ -116,7 +117,9 @@ export default class PassageReference implements ChapterReference, PassageOption
|
||||
* Parses a multi-chapter-and-verse reference from the given text.
|
||||
* Reference format: `startChapter:startVerse[ ]-[ ]endChapter:endVerse`.
|
||||
*/
|
||||
private static parseMultiChapterVerseRef(text: string): ChapterReference | null {
|
||||
private static parseMultiChapterVerseRef(
|
||||
text: string
|
||||
): ChapterReference | null {
|
||||
const regex = /^(\d{1,3}):(\d{1,3}) ?- ?(\d{1,3}):(\d{1,3})$/i;
|
||||
const match = text.match(regex);
|
||||
if (!match) return null;
|
||||
@@ -145,7 +148,7 @@ export default class PassageReference implements ChapterReference, PassageOption
|
||||
endVerse: match[3] ? +match[3] : +match[2],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/** Retrieves a book based on its alias. */
|
||||
private static getBook(alias: string): Book | undefined {
|
||||
alias = alias.toLowerCase();
|
||||
@@ -164,7 +167,7 @@ export default class PassageReference implements ChapterReference, PassageOption
|
||||
): PassageOptions {
|
||||
const optionArgs = text
|
||||
.toLowerCase()
|
||||
.split("+")
|
||||
.split('+')
|
||||
.filter(Boolean)
|
||||
.map((x) => x.trim());
|
||||
|
||||
@@ -177,20 +180,20 @@ export default class PassageReference implements ChapterReference, PassageOption
|
||||
// example) - anything else is treated as a Bible version code
|
||||
for (const option of optionArgs) {
|
||||
switch (option) {
|
||||
case "m":
|
||||
case "manuscript":
|
||||
case 'm':
|
||||
case 'manuscript':
|
||||
options.format = PassageFormat.Manuscript;
|
||||
break;
|
||||
case "p":
|
||||
case "paragraph":
|
||||
case 'p':
|
||||
case 'paragraph':
|
||||
options.format = PassageFormat.Paragraph;
|
||||
break;
|
||||
case "q":
|
||||
case "quote":
|
||||
case 'q':
|
||||
case 'quote':
|
||||
options.format = PassageFormat.Quote;
|
||||
break;
|
||||
case "c":
|
||||
case "callout":
|
||||
case 'c':
|
||||
case 'callout':
|
||||
options.format = PassageFormat.Callout;
|
||||
break;
|
||||
default:
|
||||
@@ -204,10 +207,10 @@ export default class PassageReference implements ChapterReference, PassageOption
|
||||
}
|
||||
|
||||
export enum PassageFormat {
|
||||
Manuscript = "manuscript",
|
||||
Paragraph = "paragraph",
|
||||
Quote = "quote",
|
||||
Callout = "callout",
|
||||
Manuscript = 'manuscript',
|
||||
Paragraph = 'paragraph',
|
||||
Quote = 'quote',
|
||||
Callout = 'callout',
|
||||
}
|
||||
|
||||
interface ChapterReference {
|
||||
|
||||
@@ -9,10 +9,10 @@ import {
|
||||
Notice,
|
||||
TFile,
|
||||
TFolder,
|
||||
} from "obsidian";
|
||||
import { BibleFormat } from "./local-bible-ref-setting-tab";
|
||||
import PassageReference, { PassageFormat } from "./passage-reference";
|
||||
import LocalBibleRefSettings, { QuoteReferencePosition } from "./settings";
|
||||
} from 'obsidian';
|
||||
import { BibleFormat } from './local-bible-ref-setting-tab';
|
||||
import PassageReference, { PassageFormat } from './passage-reference';
|
||||
import LocalBibleRefSettings, { QuoteReferencePosition } from './settings';
|
||||
|
||||
export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
private settings: LocalBibleRefSettings;
|
||||
@@ -30,14 +30,15 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
): EditorSuggestTriggerInfo | null {
|
||||
// line must start with '--'
|
||||
const line = editor.getLine(cursor.line);
|
||||
if (!line.startsWith("--")) return null;
|
||||
if (!line.startsWith('--')) return null;
|
||||
|
||||
// if no settings, alert user
|
||||
if (!this.settings.biblesPath) {
|
||||
if (!this.noSettingsNotice?.messageEl.isShown()) {
|
||||
const noticeText = "Local Bible Ref settings are not " +
|
||||
"configured. Please set the bibles path before " +
|
||||
"attempting to reference passages.";
|
||||
const noticeText =
|
||||
'Local Bible Ref settings are not ' +
|
||||
'configured. Please set the bibles path before ' +
|
||||
'attempting to reference passages.';
|
||||
this.noSettingsNotice = new Notice(noticeText);
|
||||
}
|
||||
|
||||
@@ -68,12 +69,14 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
let version = this.settings.defaultVersionShorthand;
|
||||
if (!version) {
|
||||
const folder = this.app.vault.getFolderByPath(this.settings.biblesPath);
|
||||
version = folder?.children?.filter(c => c instanceof TFolder)?.first()?.name ?? '';
|
||||
version =
|
||||
folder?.children?.filter((c) => c instanceof TFolder)?.first()?.name ??
|
||||
'';
|
||||
}
|
||||
const passageRef = PassageReference.parse(
|
||||
context.query,
|
||||
version,
|
||||
this.settings.defaultPassageFormat,
|
||||
this.settings.defaultPassageFormat
|
||||
);
|
||||
if (!passageRef) return [];
|
||||
|
||||
@@ -82,19 +85,13 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
if (!texts) return [];
|
||||
|
||||
// split first chapter by start verse
|
||||
const textFromVerse = this.getTextFromStartVerse(
|
||||
texts[0],
|
||||
passageRef
|
||||
);
|
||||
const textFromVerse = this.getTextFromStartVerse(texts[0], passageRef);
|
||||
if (!textFromVerse) return [];
|
||||
texts[0] = textFromVerse;
|
||||
|
||||
// split last chapter by end verse
|
||||
const lastIndex = texts.length - 1;
|
||||
const textToVerse = this.getTextToEndVerse(
|
||||
texts[lastIndex],
|
||||
passageRef
|
||||
);
|
||||
const textToVerse = this.getTextToEndVerse(texts[lastIndex], passageRef);
|
||||
if (!textToVerse) return [];
|
||||
texts[lastIndex] = textToVerse;
|
||||
|
||||
@@ -131,9 +128,9 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
private async getChapterTexts(
|
||||
ref: PassageReference
|
||||
): Promise<string[] | null> {
|
||||
let basePath = "";
|
||||
let basePath = '';
|
||||
for (const alias of [ref.book.name, ...ref.book.aliases]) {
|
||||
basePath = [this.settings.biblesPath, ref.version, alias].join("/");
|
||||
basePath = [this.settings.biblesPath, ref.version, alias].join('/');
|
||||
basePath = normalizePath(basePath);
|
||||
|
||||
// if the book exists at this alias, use the alias instead
|
||||
@@ -174,7 +171,7 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
const verseNum = `<sup>${ref.startVerse}</sup>`;
|
||||
pattern = quoteOrList + chapterNum + verseNum;
|
||||
}
|
||||
|
||||
|
||||
const regExp = new RegExp(pattern);
|
||||
const match = text.match(regExp);
|
||||
if (!match) return null;
|
||||
@@ -223,13 +220,13 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
text = this.removeVerseSpacing(text);
|
||||
}
|
||||
|
||||
const chapterMd = multipleChapters ? `**${chapterNumber}**` : "";
|
||||
if (text.startsWith("> ")) {
|
||||
const chapterMd = multipleChapters ? `**${chapterNumber}**` : '';
|
||||
if (text.startsWith('> ')) {
|
||||
const quoteMd = text.match(/^(?:> )+/)![0];
|
||||
return text.replace(quoteMd, `${quoteMd}${chapterMd} `);
|
||||
}
|
||||
|
||||
if (text.startsWith("- ")) {
|
||||
if (text.startsWith('- ')) {
|
||||
const listMd = text.match(/^(?:- )+/)![0];
|
||||
return text.replace(listMd, `${listMd}${chapterMd} `);
|
||||
}
|
||||
@@ -241,28 +238,28 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
private formatBibleLinkerVerses(text: string): string {
|
||||
return text.replace(
|
||||
/#{1,6} [a-zA-Z]*(\d{1,3})[a-zA-Z]*\n(\w+)/g,
|
||||
"<sup>$1</sup> $2",
|
||||
'<sup>$1</sup> $2'
|
||||
);
|
||||
}
|
||||
|
||||
/** Removes chapter numbers from the given text. */
|
||||
private removeChapterNumbers(text: string): string {
|
||||
return text.replace(/\*\*\d{1,3}\*\* /g, "");
|
||||
return text.replace(/\*\*\d{1,3}\*\* /g, '');
|
||||
}
|
||||
|
||||
/** Removes headings from the given text. */
|
||||
private removeHeadings(text: string): string {
|
||||
return text.replace(/^#.*[\n\r\f]*/gm, "");
|
||||
return text.replace(/^#.*[\n\r\f]*/gm, '');
|
||||
}
|
||||
|
||||
/** Removes footnote refs from the given text. */
|
||||
private removeFootnoteRefs(text: string): string {
|
||||
return text.replace(/ \[\^\w{1,9}\]/g, "");
|
||||
return text.replace(/ \[\^\w{1,9}\]/g, '');
|
||||
}
|
||||
|
||||
/** Removes the beginning-of-file content from the given text. */
|
||||
private removeBOF(text: string): string {
|
||||
if (!text.startsWith("---")) return text;
|
||||
if (!text.startsWith('---')) return text;
|
||||
// split at YAML front matter
|
||||
const split = text.split(/^---$/m);
|
||||
return split[2].trim();
|
||||
@@ -279,76 +276,78 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
|
||||
/** Removes extra spacing between verses in Bible Linker formatting. */
|
||||
private removeVerseSpacing(text: string): string {
|
||||
return text.replace(/\n{2,}/g, " ");
|
||||
return text.replace(/\n{2,}/g, ' ');
|
||||
}
|
||||
|
||||
/** Generates an excerpt for the suggestion. */
|
||||
private generateExcerpt(text: string): string {
|
||||
text = text.split(/<\/sup>/, 2)[1];
|
||||
text = text.replace(/(?:<sup>\d+<\/sup>|> |- )/g, "");
|
||||
text = text.replace(/(?:<sup>\d+<\/sup>|> |- )/g, '');
|
||||
text = text.replace(
|
||||
/<span style='font-variant: small-caps;'>Lord<\/span>/g,
|
||||
"Lord"
|
||||
'Lord'
|
||||
);
|
||||
text = text.replace(/\n/g, " ");
|
||||
text = text.replace(/ {2,}/g, " ");
|
||||
return text.slice(0, 45) + "...";
|
||||
text = text.replace(/\n/g, ' ');
|
||||
text = text.replace(/ {2,}/g, ' ');
|
||||
return text.slice(0, 45) + '...';
|
||||
}
|
||||
|
||||
/** Formats the final text for suggestion. */
|
||||
private formatTexts(
|
||||
texts: string[],
|
||||
passageRef: PassageReference,
|
||||
context: EditorSuggestContext
|
||||
texts: string[],
|
||||
passageRef: PassageReference,
|
||||
context: EditorSuggestContext
|
||||
): string {
|
||||
let formatted = "";
|
||||
let formatted = '';
|
||||
switch (passageRef.format) {
|
||||
case PassageFormat.Manuscript:
|
||||
formatted = texts.join(" ").trim();
|
||||
formatted = formatted.replace(/\n+/g, " ");
|
||||
formatted = formatted.replace(/\*\*\d{1,3}\*\*/g, "");
|
||||
formatted = formatted.replace(/<sup>\d{1,3}<\/sup> /g, "");
|
||||
formatted = formatted.replace(/(?:^[>-] | [>-] )/g, " ");
|
||||
formatted = formatted.trim() + "\n\n";
|
||||
formatted = texts.join(' ').trim();
|
||||
formatted = formatted.replace(/\n+/g, ' ');
|
||||
formatted = formatted.replace(/\*\*\d{1,3}\*\*/g, '');
|
||||
formatted = formatted.replace(/<sup>\d{1,3}<\/sup> /g, '');
|
||||
formatted = formatted.replace(/(?:^[>-] | [>-] )/g, ' ');
|
||||
formatted = formatted.trim() + '\n\n';
|
||||
break;
|
||||
case PassageFormat.Paragraph:
|
||||
formatted = texts.join("\n\n").trim();
|
||||
formatted += "\n\n";
|
||||
formatted = texts.join('\n\n').trim();
|
||||
formatted += '\n\n';
|
||||
break;
|
||||
case PassageFormat.Quote: {
|
||||
const {
|
||||
includeReference,
|
||||
referencePosition,
|
||||
linkToPassage
|
||||
} = this.settings.quote;
|
||||
const { includeReference, referencePosition, linkToPassage } =
|
||||
this.settings.quote;
|
||||
|
||||
let stringRef = '';
|
||||
if (includeReference) {
|
||||
if (linkToPassage) stringRef = this.generatePassageLink(passageRef, context);
|
||||
if (linkToPassage)
|
||||
stringRef = this.generatePassageLink(passageRef, context);
|
||||
else stringRef = passageRef.stringify();
|
||||
if (referencePosition === QuoteReferencePosition.Beginning) stringRef += "\n";
|
||||
if (referencePosition === QuoteReferencePosition.Beginning)
|
||||
stringRef += '\n';
|
||||
else stringRef = `\n> ${stringRef}`;
|
||||
}
|
||||
|
||||
formatted = "> ";
|
||||
if (referencePosition === QuoteReferencePosition.Beginning) formatted += stringRef;
|
||||
formatted += texts.join("\n\n").trim();
|
||||
formatted = formatted.replace(/\n/gm, "\n> ");
|
||||
if (referencePosition === QuoteReferencePosition.End) formatted += stringRef;
|
||||
formatted += "\n\n";
|
||||
formatted = '> ';
|
||||
if (referencePosition === QuoteReferencePosition.Beginning)
|
||||
formatted += stringRef;
|
||||
formatted += texts.join('\n\n').trim();
|
||||
formatted = formatted.replace(/\n/gm, '\n> ');
|
||||
if (referencePosition === QuoteReferencePosition.End)
|
||||
formatted += stringRef;
|
||||
formatted += '\n\n';
|
||||
break;
|
||||
}
|
||||
case PassageFormat.Callout: {
|
||||
const { type, linkToPassage } = this.settings.callout;
|
||||
|
||||
let stringRef = '';
|
||||
if (linkToPassage) stringRef = this.generatePassageLink(passageRef, context);
|
||||
if (linkToPassage)
|
||||
stringRef = this.generatePassageLink(passageRef, context);
|
||||
else stringRef = passageRef.stringify();
|
||||
|
||||
formatted = `> [!${type}] ${stringRef}\n`;
|
||||
formatted += texts.join("\n\n").trim();
|
||||
formatted = formatted.replace(/\n/gm, "\n> ");
|
||||
formatted += "\n\n";
|
||||
formatted += texts.join('\n\n').trim();
|
||||
formatted = formatted.replace(/\n/gm, '\n> ');
|
||||
formatted += '\n\n';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -356,7 +355,7 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
return formatted;
|
||||
}
|
||||
|
||||
/** Generates a link to the passage within the vault. */
|
||||
/** Generates a link to the passage within the vault. */
|
||||
private generatePassageLink(
|
||||
ref: PassageReference,
|
||||
context: EditorSuggestContext
|
||||
@@ -372,7 +371,7 @@ export default class PassageSuggest extends EditorSuggest<PassageSuggestion> {
|
||||
this.settings.bibleFormat === BibleFormat.BibleLinker
|
||||
? `#${startVerse}`
|
||||
: undefined,
|
||||
ref.stringify(),
|
||||
ref.stringify()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
import { AbstractInputSuggest, App, TFolder } from "obsidian";
|
||||
import { AbstractInputSuggest, App, TFolder } from 'obsidian';
|
||||
|
||||
export default class PathSuggest extends AbstractInputSuggest<string> {
|
||||
private textInputEl: HTMLInputElement | HTMLDivElement;
|
||||
private textInputEl: HTMLInputElement | HTMLDivElement;
|
||||
|
||||
constructor(app: App, textInputEl: HTMLInputElement | HTMLDivElement) {
|
||||
super(app, textInputEl);
|
||||
this.textInputEl = textInputEl;
|
||||
}
|
||||
constructor(app: App, textInputEl: HTMLInputElement | HTMLDivElement) {
|
||||
super(app, textInputEl);
|
||||
this.textInputEl = textInputEl;
|
||||
}
|
||||
|
||||
async getSuggestions(query: string): Promise<string[]> {
|
||||
query ||= '/';
|
||||
const folder = this.app.vault.getFolderByPath(query);
|
||||
if (!folder) return [];
|
||||
return folder.children
|
||||
.filter(c => c instanceof TFolder)
|
||||
.map(f => f.path);
|
||||
}
|
||||
async getSuggestions(query: string): Promise<string[]> {
|
||||
query ||= '/';
|
||||
const folder = this.app.vault.getFolderByPath(query);
|
||||
if (!folder) return [];
|
||||
return folder.children
|
||||
.filter((c) => c instanceof TFolder)
|
||||
.map((f) => f.path);
|
||||
}
|
||||
|
||||
renderSuggestion(item: string, el: HTMLElement): void {
|
||||
el.setText(item);
|
||||
}
|
||||
renderSuggestion(item: string, el: HTMLElement): void {
|
||||
el.setText(item);
|
||||
}
|
||||
|
||||
selectSuggestion(item: string, _: MouseEvent | KeyboardEvent): void {
|
||||
this.setValue(item);
|
||||
this.textInputEl.dispatchEvent(new Event('input'));
|
||||
}
|
||||
}
|
||||
selectSuggestion(item: string, _: MouseEvent | KeyboardEvent): void {
|
||||
this.setValue(item);
|
||||
this.textInputEl.dispatchEvent(new Event('input'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
import { BibleFormat } from "./local-bible-ref-setting-tab";
|
||||
import { PassageFormat } from "./passage-reference";
|
||||
import { BibleFormat } from './local-bible-ref-setting-tab';
|
||||
import { PassageFormat } from './passage-reference';
|
||||
|
||||
export default interface LocalBibleRefSettings {
|
||||
biblesPath: string;
|
||||
defaultVersionShorthand: string;
|
||||
defaultPassageFormat: PassageFormat;
|
||||
bibleFormat: BibleFormat;
|
||||
quote: {
|
||||
includeReference: boolean;
|
||||
referencePosition: QuoteReferencePosition;
|
||||
linkToPassage: boolean;
|
||||
},
|
||||
callout: {
|
||||
type: CalloutType;
|
||||
linkToPassage: boolean;
|
||||
}
|
||||
biblesPath: string;
|
||||
defaultVersionShorthand: string;
|
||||
defaultPassageFormat: PassageFormat;
|
||||
bibleFormat: BibleFormat;
|
||||
quote: {
|
||||
includeReference: boolean;
|
||||
referencePosition: QuoteReferencePosition;
|
||||
linkToPassage: boolean;
|
||||
};
|
||||
callout: {
|
||||
type: CalloutType;
|
||||
linkToPassage: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export enum QuoteReferencePosition {
|
||||
Beginning = "beginning",
|
||||
End = "end",
|
||||
Beginning = 'beginning',
|
||||
End = 'end',
|
||||
}
|
||||
|
||||
export enum CalloutType {
|
||||
Note = "note",
|
||||
Abstract = "abstract",
|
||||
Info = "info",
|
||||
Todo = "todo",
|
||||
Tip = "tip",
|
||||
Success = "success",
|
||||
Question = "question",
|
||||
Warning = "warning",
|
||||
Failure = "failure",
|
||||
Danger = "danger",
|
||||
Bug = "bug",
|
||||
Example = "example",
|
||||
Quote = "quote",
|
||||
}
|
||||
Note = 'note',
|
||||
Abstract = 'abstract',
|
||||
Info = 'info',
|
||||
Todo = 'todo',
|
||||
Tip = 'tip',
|
||||
Success = 'success',
|
||||
Question = 'question',
|
||||
Warning = 'warning',
|
||||
Failure = 'failure',
|
||||
Danger = 'danger',
|
||||
Bug = 'bug',
|
||||
Example = 'example',
|
||||
Quote = 'quote',
|
||||
}
|
||||
|
||||
@@ -1,30 +1,34 @@
|
||||
import { AbstractInputSuggest, App, TFolder } from "obsidian";
|
||||
import LocalBibleRefSettings from "./settings";
|
||||
import { AbstractInputSuggest, App, TFolder } from 'obsidian';
|
||||
import LocalBibleRefSettings from './settings';
|
||||
|
||||
export default class VersionSuggest extends AbstractInputSuggest<string> {
|
||||
private settings: LocalBibleRefSettings;
|
||||
private textInputEl: HTMLInputElement | HTMLDivElement;
|
||||
private settings: LocalBibleRefSettings;
|
||||
private textInputEl: HTMLInputElement | HTMLDivElement;
|
||||
|
||||
constructor(app: App, textInputEl: HTMLInputElement | HTMLDivElement, settings: LocalBibleRefSettings) {
|
||||
super(app, textInputEl);
|
||||
this.textInputEl = textInputEl;
|
||||
this.settings = settings;
|
||||
}
|
||||
constructor(
|
||||
app: App,
|
||||
textInputEl: HTMLInputElement | HTMLDivElement,
|
||||
settings: LocalBibleRefSettings
|
||||
) {
|
||||
super(app, textInputEl);
|
||||
this.textInputEl = textInputEl;
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
async getSuggestions(): Promise<string[]> {
|
||||
const folder = this.app.vault.getFolderByPath(this.settings.biblesPath);
|
||||
if (!folder) return [];
|
||||
return folder.children
|
||||
.filter(c => c instanceof TFolder)
|
||||
.map(f => f.name);
|
||||
}
|
||||
async getSuggestions(): Promise<string[]> {
|
||||
const folder = this.app.vault.getFolderByPath(this.settings.biblesPath);
|
||||
if (!folder) return [];
|
||||
return folder.children
|
||||
.filter((c) => c instanceof TFolder)
|
||||
.map((f) => f.name);
|
||||
}
|
||||
|
||||
renderSuggestion(item: string, el: HTMLElement): void {
|
||||
el.setText(item);
|
||||
}
|
||||
renderSuggestion(item: string, el: HTMLElement): void {
|
||||
el.setText(item);
|
||||
}
|
||||
|
||||
selectSuggestion(item: string, _: MouseEvent | KeyboardEvent): void {
|
||||
this.setValue(item);
|
||||
this.textInputEl.dispatchEvent(new Event('input'));
|
||||
}
|
||||
}
|
||||
selectSuggestion(item: string, _: MouseEvent | KeyboardEvent): void {
|
||||
this.setValue(item);
|
||||
this.textInputEl.dispatchEvent(new Event('input'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user