-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathmod.ts
54 lines (50 loc) · 1.78 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import Cms, { CmsOptions } from "./core/cms.ts";
import checkbox from "./fields/checkbox.ts";
import chooseList from "./fields/choose-list.ts";
import code from "./fields/code.ts";
import color from "./fields/color.ts";
import currentDatetime from "./fields/current-datetime.ts";
import date from "./fields/date.ts";
import dateTime from "./fields/datetime.ts";
import email from "./fields/email.ts";
import fileList from "./fields/file-list.ts";
import file from "./fields/file.ts";
import hidden from "./fields/hidden.ts";
import list from "./fields/list.ts";
import markdown from "./fields/markdown.ts";
import number from "./fields/number.ts";
import objectList from "./fields/object-list.ts";
import object from "./fields/object.ts";
import radio from "./fields/radio.ts";
import select from "./fields/select.ts";
import text from "./fields/text.ts";
import textarea from "./fields/textarea.ts";
import time from "./fields/time.ts";
import url from "./fields/url.ts";
export default function (options?: Partial<CmsOptions>): Cms {
const cms = new Cms(options);
// Register default fields
cms.field("checkbox", checkbox);
cms.field("choose-list", chooseList);
cms.field("code", code);
cms.field("color", color);
cms.field("current-datetime", currentDatetime);
cms.field("date", date);
cms.field("datetime", dateTime);
cms.field("email", email);
cms.field("file-list", fileList);
cms.field("file", file);
cms.field("hidden", hidden);
cms.field("list", list);
cms.field("markdown", markdown);
cms.field("number", number);
cms.field("object-list", objectList);
cms.field("object", object);
cms.field("radio", radio);
cms.field("select", select);
cms.field("text", text);
cms.field("textarea", textarea);
cms.field("time", time);
cms.field("url", url);
return cms;
}