-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.ts
25 lines (21 loc) · 774 Bytes
/
index.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
export { default as DatePicker } from './src/DatePicker.svelte'
export { default as DateInput } from './src/DateInput.svelte'
export { localeFromDateFnsLocale } from './src/locale'
import Wrapper from "./lib/Wrapper.svelte"
import schema from "./schema.json"
import pkg from "./package.json"
if (window) {
const plugin = { Component: Wrapper, schema, version: pkg.version }
if (!window["##BUDIBASE_CUSTOM_COMPONENTS##"]) {
window["##BUDIBASE_CUSTOM_COMPONENTS##"] = []
}
window["##BUDIBASE_CUSTOM_COMPONENTS##"].push(plugin)
//@ts-ignore
if (window.registerCustomComponent) {
//@ts-ignore
window.registerCustomComponent(plugin)
}
}
export const Component = Wrapper
export const version = pkg.version
export { schema }