diff --git a/packages/plugins/@nocobase/plugin-workflow-aggregate/src/client/AggregateInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-aggregate/src/client/AggregateInstruction.tsx index 6ab62c34fc..0db525c3a5 100644 --- a/packages/plugins/@nocobase/plugin-workflow-aggregate/src/client/AggregateInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-aggregate/src/client/AggregateInstruction.tsx @@ -10,6 +10,7 @@ import { useForm } from '@formily/react'; import { Cascader } from 'antd'; import React, { useCallback, useEffect, useState } from 'react'; +import { BarChartOutlined } from '@ant-design/icons'; import { SchemaComponentContext, @@ -169,6 +170,7 @@ export default class extends Instruction { type = 'aggregate'; group = 'collection'; description = `{{t("Counting, summing, finding maximum, minimum, and average values for multiple records of a collection or associated data of a record.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { aggregator: { type: 'string', diff --git a/packages/plugins/@nocobase/plugin-workflow-delay/src/client/DelayInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-delay/src/client/DelayInstruction.tsx index 9ffcf50f5f..81935fa347 100644 --- a/packages/plugins/@nocobase/plugin-workflow-delay/src/client/DelayInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-delay/src/client/DelayInstruction.tsx @@ -9,8 +9,10 @@ import React from 'react'; import { InputNumber, Select } from 'antd'; -import { css, useCompile, usePlugin } from '@nocobase/client'; -import WorkflowPlugin, { Instruction, JOB_STATUS } from '@nocobase/plugin-workflow/client'; +import { HourglassOutlined } from '@ant-design/icons'; + +import { css, useCompile } from '@nocobase/client'; +import { Instruction, JOB_STATUS } from '@nocobase/plugin-workflow/client'; import { NAMESPACE } from '../locale'; @@ -68,6 +70,7 @@ export default class extends Instruction { type = 'delay'; group = 'control'; description = `{{t("Delay a period of time and then continue or exit the process. Can be used to set wait or timeout times in parallel branches.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { duration: { type: 'number', diff --git a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/src/client/DynamicCalculation.tsx b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/src/client/DynamicCalculation.tsx index a5c0dc293f..efd6043827 100644 --- a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/src/client/DynamicCalculation.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/src/client/DynamicCalculation.tsx @@ -8,6 +8,7 @@ */ import React from 'react'; +import { FunctionOutlined } from '@ant-design/icons'; import { SchemaInitializerItemType, Variable, useCollectionManager_deprecated } from '@nocobase/client'; import { @@ -47,6 +48,7 @@ export default class extends Instruction { type = 'dynamic-calculation'; group = 'calculation'; description = `{{t("Calculate an expression based on a calculation engine and obtain a value as the result. Variables in the upstream nodes can be used in the expression. The expression is dynamic one from an expression collections.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { expression: { type: 'string', diff --git a/packages/plugins/@nocobase/plugin-workflow-loop/src/client/LoopInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-loop/src/client/LoopInstruction.tsx index b3e72c902d..c10914cf06 100644 --- a/packages/plugins/@nocobase/plugin-workflow-loop/src/client/LoopInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-loop/src/client/LoopInstruction.tsx @@ -8,7 +8,7 @@ */ import React, { useCallback } from 'react'; -import { ArrowUpOutlined } from '@ant-design/icons'; +import { ArrowUpOutlined, RollbackOutlined } from '@ant-design/icons'; import { Card, Checkbox } from 'antd'; import { FormLayout, FormItem } from '@formily/antd-v5'; import { useForm } from '@formily/react'; @@ -28,7 +28,6 @@ import { Instruction, RadioWithTooltip, renderEngineReference, - RadioWithTooltipOption, CalculationConfig, useWorkflowVariableOptions, UseVariableOptions, @@ -246,6 +245,7 @@ export default class extends Instruction { type = 'loop'; group = 'control'; description = `{{t("By using a loop node, you can perform the same operation on multiple sets of data. The source of these sets can be either multiple records from a query node or multiple associated records of a single record. Loop node can also be used for iterating a certain number of times or for looping through each character in a string. However, excessive looping may cause performance issues, so use with caution.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { target: { type: 'string', @@ -381,7 +381,7 @@ export default class extends Instruction { className={cx( styles.branchBlockClass, css` - padding-left: 20em; + padding-left: 16em; `, )} > @@ -389,7 +389,7 @@ export default class extends Instruction {
-
+
diff --git a/packages/plugins/@nocobase/plugin-workflow-mailer/src/client/MailerInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-mailer/src/client/MailerInstruction.tsx index deccb74dfa..08c148521d 100644 --- a/packages/plugins/@nocobase/plugin-workflow-mailer/src/client/MailerInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-mailer/src/client/MailerInstruction.tsx @@ -7,6 +7,8 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ +import React from 'react'; +import { MailOutlined } from '@ant-design/icons'; import { ArrayItems } from '@formily/antd-v5'; import { SchemaComponentContext, css } from '@nocobase/client'; @@ -32,6 +34,7 @@ export default class extends Instruction { type = 'mailer'; group = 'extended'; description = `{{t("Send email. You can use the variables in the upstream nodes as receivers, subject and content of the email.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { provider: { type: 'object', diff --git a/packages/plugins/@nocobase/plugin-workflow-manual/src/client/instruction/index.tsx b/packages/plugins/@nocobase/plugin-workflow-manual/src/client/instruction/index.tsx index b345d54dae..0d0c440eaf 100644 --- a/packages/plugins/@nocobase/plugin-workflow-manual/src/client/instruction/index.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-manual/src/client/instruction/index.tsx @@ -7,6 +7,9 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ +import React from 'react'; +import { SolutionOutlined } from '@ant-design/icons'; + import { SchemaInitializerItemType, useCollectionManager_deprecated, useCompile, usePlugin } from '@nocobase/client'; import { @@ -75,6 +78,7 @@ export default class extends Instruction { type = 'manual'; group = 'manual'; description = `{{t("Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { assignees: { type: 'array', diff --git a/packages/plugins/@nocobase/plugin-workflow-notification/src/client/NotificationInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-notification/src/client/NotificationInstruction.tsx index 1054c394eb..ba1115be95 100644 --- a/packages/plugins/@nocobase/plugin-workflow-notification/src/client/NotificationInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-notification/src/client/NotificationInstruction.tsx @@ -7,6 +7,7 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ import React from 'react'; +import { NotificationOutlined } from '@ant-design/icons'; import { Instruction, useWorkflowVariableOptions } from '@nocobase/plugin-workflow/client'; import { MessageConfigForm } from '@nocobase/plugin-notification-manager/client'; @@ -22,6 +23,7 @@ export default class extends Instruction { type = 'notification'; group = 'extended'; description = `{{t("Send notification. You can use the variables in the upstream nodes as content and ohter config.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { message: { type: 'void', diff --git a/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx index 13006e1bc2..689ff20c17 100644 --- a/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx @@ -9,7 +9,7 @@ import React, { useState } from 'react'; import { Button, Tooltip } from 'antd'; -import { PlusOutlined } from '@ant-design/icons'; +import { ApartmentOutlined, PlusOutlined } from '@ant-design/icons'; import { css } from '@nocobase/client'; @@ -30,6 +30,7 @@ export default class extends Instruction { type = 'parallel'; group = 'control'; description = `{{t("Run multiple branch processes in parallel.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { mode: { type: 'string', diff --git a/packages/plugins/@nocobase/plugin-workflow-request/src/client/RequestInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-request/src/client/RequestInstruction.tsx index fcacdc3fe0..91703f7129 100644 --- a/packages/plugins/@nocobase/plugin-workflow-request/src/client/RequestInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-request/src/client/RequestInstruction.tsx @@ -11,7 +11,9 @@ import { onFieldValueChange } from '@formily/core'; import { uid } from '@formily/shared'; import { useForm, useField, useFormEffects } from '@formily/react'; import { ArrayItems } from '@formily/antd-v5'; +import { GlobalOutlined } from '@ant-design/icons'; +import { SchemaComponent, css } from '@nocobase/client'; import { Instruction, WorkflowVariableJSON, @@ -21,7 +23,6 @@ import { } from '@nocobase/plugin-workflow/client'; import { NAMESPACE, useLang } from '../locale'; -import { SchemaComponent, css } from '@nocobase/client'; const BodySchema = { 'application/json': { @@ -155,6 +156,7 @@ export default class extends Instruction { type = 'request'; group = 'extended'; description = `{{t("Send HTTP request to a URL. You can use the variables in the upstream nodes as request headers, parameters and request body.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { method: { type: 'string', diff --git a/packages/plugins/@nocobase/plugin-workflow-sql/src/client/SQLInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-sql/src/client/SQLInstruction.tsx index 28762241af..1a90a4904b 100644 --- a/packages/plugins/@nocobase/plugin-workflow-sql/src/client/SQLInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-sql/src/client/SQLInstruction.tsx @@ -12,6 +12,7 @@ import { DEFAULT_DATA_SOURCE_KEY, css } from '@nocobase/client'; import { Instruction, WorkflowVariableRawTextArea, defaultFieldNames } from '@nocobase/plugin-workflow/client'; import React from 'react'; +import { ConsoleSqlOutlined } from '@ant-design/icons'; import { Trans } from 'react-i18next'; import { NAMESPACE } from '../locale'; @@ -20,6 +21,7 @@ export default class extends Instruction { type = 'sql'; group = 'collection'; description = `{{t("Execute a SQL statement in database.", { ns: "${NAMESPACE}" })}}`; + icon = (); fieldset = { dataSource: { type: 'string', diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/AddNodeContext.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/AddNodeContext.tsx index 053ec3ffe5..82b5736c8b 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/AddNodeContext.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/AddNodeContext.tsx @@ -14,6 +14,7 @@ import { observer, useForm } from '@formily/react'; import { ActionContextProvider, css, + cx, SchemaComponent, useActionContext, useAPIClient, @@ -68,6 +69,7 @@ export function AddButton(props: AddButtonProps) { 'aria-label': item.type, key: item.type, label: item.title, + icon: item.icon, })), }; }) @@ -89,7 +91,7 @@ export function AddButton(props: AddButtonProps) { } return ( -
+