Create SWITCHABLE_TYPES in shared-core
This commit is contained in:
parent
9292ac7fae
commit
8161dfc0a9
|
@ -0,0 +1,33 @@
|
|||
import { FieldType } from "@budibase/types"
|
||||
|
||||
type SwitchableTypes = Partial<{
|
||||
[K in FieldType]: [K, ...FieldType[]]
|
||||
}>
|
||||
|
||||
export const SWITCHABLE_TYPES: Partial<SwitchableTypes> = {
|
||||
[FieldType.STRING]: [
|
||||
FieldType.STRING,
|
||||
FieldType.OPTIONS,
|
||||
FieldType.LONGFORM,
|
||||
FieldType.BARCODEQR,
|
||||
],
|
||||
[FieldType.OPTIONS]: [
|
||||
FieldType.OPTIONS,
|
||||
FieldType.STRING,
|
||||
FieldType.LONGFORM,
|
||||
FieldType.BARCODEQR,
|
||||
],
|
||||
[FieldType.LONGFORM]: [
|
||||
FieldType.LONGFORM,
|
||||
FieldType.STRING,
|
||||
FieldType.OPTIONS,
|
||||
FieldType.BARCODEQR,
|
||||
],
|
||||
[FieldType.BARCODEQR]: [
|
||||
FieldType.BARCODEQR,
|
||||
FieldType.STRING,
|
||||
FieldType.OPTIONS,
|
||||
FieldType.LONGFORM,
|
||||
],
|
||||
[FieldType.NUMBER]: [FieldType.NUMBER, FieldType.BOOLEAN],
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
export * from "./api"
|
||||
export * from "./fields"
|
||||
|
||||
export const OperatorOptions = {
|
||||
Equals: {
|
||||
|
|
Loading…
Reference in New Issue