tachybase_todo/packages/plugins/workflow/src/client/interfaces/expression.tsx
Junyi 52329df140
feat: (plugin-workflow) dynamic expression (#1560)
* feat(plugin-formula): add dynamic expression field

* feat(plugin-workflow): add dynamic expression for calculation

* refactor(client): allow select part of paths in variable component

* fix(client): fix types

* feat(plugin-formula): add dynamic expression config

* feat(plugin-workflow): add dynamic calculation

* refactor(plugin-formula): move expression field type to workflow plugin

* fix(plugin-workflow): fix types

* fix(plugin-workflow): fix register field in client

* fix(plugin-workflow): fix expression result value default

* fix(plugin-workflow): fix dynamic expression field error when switch collection

* fix(plugin-workflow): test component value change

* test(plugin-workflow): test component linkages

* refactor(plugin-workflow): change to expression collection template

* fix(client): fix hooks of Variable.TextArea

* fix(client): fix to import evaluators in client

* fix(evaluators): move renderReference method to plugin

* fix(plugin-workflow): fix missed component

* fix(plugin-workflow): fix dynamic expression test case

* refactor(client): change popover to double click to choose entire object

* refactor(plugin-workflow): make variable options and filter more sensible

* fix(plugin-workflow): fix form effect

* fix(plugin-workflow): fix variable filtering in collection trigger

* fix(plugin-workflow): fix types

---------

Co-authored-by: chenos <chenlinxh@gmail.com>
2023-04-07 19:52:31 -07:00

25 lines
568 B
TypeScript

import { IField, interfacesProperties } from "@nocobase/client";
import { NAMESPACE } from "../locale";
const { defaultProps } = interfacesProperties;
export default {
name: 'expression',
type: 'string',
group: 'advanced',
order: 1,
title: `{{t("Expression", { ns: "${NAMESPACE}" })}}`,
description: `{{t("An expression for calculation in each rows", { ns: "${NAMESPACE}" })}}`,
sortable: true,
default: {
type: 'text',
uiSchema: {
'x-component': 'DynamicExpression',
},
},
properties: {
...defaultProps,
},
} as IField;