fix: plugin-workflow, import Instruction from nodes (#1095)

Reviewed-on: daoyoucloud/tachybase#1095
Co-authored-by: bai.zixv <bai.zixv@foxmail.com>
Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
bai.zixv 2024-05-31 19:09:39 +08:00 committed by baizixv
parent bc0f05ded2
commit 78af8dae67
6 changed files with 32 additions and 41 deletions

View File

@ -1,9 +1,10 @@
import { css } from '@tachybase/client';
import { ArrayTable } from '@tachybase/components';
import { Instruction, WorkflowVariableInput } from '@tachybase/plugin-workflow/client';
import { WorkflowVariableInput } from '../..';
import { NAMESPACE_INSTRUCTION_JSON_PARSE } from '../../../common/constants';
import { tval } from '../../locale';
import { Instruction } from '../../nodes';
export class JSONParseInstruction extends Instruction {
title = tval('JSON Parse');

View File

@ -1,22 +1,22 @@
import React from 'react';
import { ArrowUpOutlined } from '@ant-design/icons';
import { css, cx, useCompile } from '@tachybase/client';
import { ArrowUpOutlined } from '@ant-design/icons';
import {
NodeDefaultView,
Branch,
defaultFieldNames,
NodeDefaultView,
nodesOptions,
scopeOptions,
triggerOptions,
useFlowContext,
useStyles,
VariableOption,
WorkflowVariableInput,
defaultFieldNames,
nodesOptions,
scopeOptions,
triggerOptions,
Instruction,
} from '../..';
import { NAMESPACE, lang } from '../../locale';
import { lang, NAMESPACE } from '../../locale';
import { Instruction } from '../../nodes';
function findOption(options: VariableOption[], paths: string[]) {
let opts = options;

View File

@ -1,16 +1,11 @@
import { SchemaInitializerItemType, useCollectionManager_deprecated, useCompile, usePlugin } from '@tachybase/client';
import WorkflowPlugin, {
defaultFieldNames,
getCollectionFieldOptions,
CollectionBlockInitializer,
Instruction,
} from '../../..';
import { SchemaConfig, SchemaConfigButton } from './SchemaConfig';
import { ModeConfig } from './ModeConfig';
import { AssigneesSelect } from './AssigneesSelect';
import WorkflowPlugin, { CollectionBlockInitializer, defaultFieldNames, getCollectionFieldOptions } from '../../..';
import { NAMESPACE } from '../../../locale';
import { Instruction } from '../../../nodes';
import { AssigneesSelect } from './AssigneesSelect';
import { ModeConfig } from './ModeConfig';
import { SchemaConfig, SchemaConfigButton } from './SchemaConfig';
const MULTIPLE_ASSIGNED_MODE = {
SINGLE: Symbol('single'),

View File

@ -1,20 +1,19 @@
import React, { useState } from 'react';
import { Button, Tooltip } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import { css } from '@tachybase/client';
import {
NodeDefaultView,
Branch,
useFlowContext,
useStyles,
useGetAriaLabelOfAddButton,
RadioWithTooltip,
Instruction,
} from '../..';
import { PlusOutlined } from '@ant-design/icons';
import { Button, Tooltip } from 'antd';
import { NAMESPACE, lang } from '../../locale';
import {
Branch,
NodeDefaultView,
RadioWithTooltip,
useFlowContext,
useGetAriaLabelOfAddButton,
useStyles,
} from '../..';
import { lang, NAMESPACE } from '../../locale';
import { Instruction } from '../../nodes';
export default class extends Instruction {
title = `{{t("Parallel branch", { ns: "${NAMESPACE}" })}}`;

View File

@ -1,13 +1,8 @@
import { ArrayItems } from '@tachybase/components';
import {
defaultFieldNames,
Instruction,
WorkflowVariableInput,
WorkflowVariableJSON,
WorkflowVariableTextArea,
} from '../..';
import { defaultFieldNames, WorkflowVariableInput, WorkflowVariableJSON, WorkflowVariableTextArea } from '../..';
import { NAMESPACE } from '../../locale';
import { Instruction } from '../../nodes';
export default class extends Instruction {
title = `{{t("HTTP request", { ns: "${NAMESPACE}" })}}`;

View File

@ -3,8 +3,9 @@ import { css } from '@tachybase/client';
import { Trans } from 'react-i18next';
import { defaultFieldNames, Instruction, WorkflowVariableRawTextArea } from '../..';
import { defaultFieldNames, WorkflowVariableRawTextArea } from '../..';
import { NAMESPACE } from '../../locale';
import { Instruction } from '../../nodes';
export default class extends Instruction {
title = `{{t("SQL action", { ns: "${NAMESPACE}" })}}`;