|
|
@ -1,14 +1,30 @@ |
|
|
|
import type { Input as AntInput } from 'ant-design-vue' |
|
|
|
import type { Input as AntInput } from 'ant-design-vue' |
|
|
|
|
|
|
|
|
|
|
|
const formulaTypes = { |
|
|
|
enum formulaTypes { |
|
|
|
NUMERIC: 'numeric', |
|
|
|
NUMERIC = 'numeric', |
|
|
|
STRING: 'string', |
|
|
|
STRING = 'string', |
|
|
|
DATE: 'date', |
|
|
|
DATE = 'date', |
|
|
|
LOGICAL: 'logical', |
|
|
|
LOGICAL = 'logical', |
|
|
|
COND_EXP: 'conditional_expression', |
|
|
|
COND_EXP = 'conditional_expression', |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const formulas: Record<string, any> = { |
|
|
|
interface FormulaMeta { |
|
|
|
|
|
|
|
type?: string |
|
|
|
|
|
|
|
validation?: { |
|
|
|
|
|
|
|
args?: { |
|
|
|
|
|
|
|
min?: number |
|
|
|
|
|
|
|
max?: number |
|
|
|
|
|
|
|
rqd?: number |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
description?: string |
|
|
|
|
|
|
|
syntax?: string |
|
|
|
|
|
|
|
examples?: string[] |
|
|
|
|
|
|
|
returnType?: ((args: any[]) => formulaTypes) | formulaTypes |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const formulas: Record<string, FormulaMeta> = { |
|
|
|
|
|
|
|
|
|
|
|
AVG: { |
|
|
|
AVG: { |
|
|
|
type: formulaTypes.NUMERIC, |
|
|
|
type: formulaTypes.NUMERIC, |
|
|
|
validation: { |
|
|
|
validation: { |
|
|
|