@vef-framework-react/approval 2.17.2 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/flow-api.cjs +1 -1
- package/dist/cjs/components/principal/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/basic-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
- package/dist/cjs/plugins/index.cjs +1 -1
- package/dist/cjs/types/enums.cjs +1 -1
- package/dist/cjs/types/index.cjs +1 -1
- package/dist/es/api/admin-api.js +1 -1
- package/dist/es/api/category-api.js +1 -1
- package/dist/es/api/delegation-api.js +1 -1
- package/dist/es/api/flow-api.js +3 -2
- package/dist/es/api/index.js +1 -1
- package/dist/es/api/instance-api.js +1 -1
- package/dist/es/api/my-api.js +1 -1
- package/dist/es/api/query.js +1 -1
- package/dist/es/components/detail/action-modals.js +1 -1
- package/dist/es/components/detail/admin.js +1 -1
- package/dist/es/components/detail/drawer.js +1 -1
- package/dist/es/components/detail/index.js +1 -1
- package/dist/es/components/flow-graph/index.js +1 -1
- package/dist/es/components/flow-graph/node.js +1 -1
- package/dist/es/components/flow-graph/people-overlay.js +1 -1
- package/dist/es/components/flow-graph/people.js +1 -1
- package/dist/es/components/form-panel/index.js +1 -1
- package/dist/es/components/format.js +1 -1
- package/dist/es/components/icon.js +1 -1
- package/dist/es/components/index.js +1 -1
- package/dist/es/components/principal/index.js +12 -12
- package/dist/es/components/status/colors.js +1 -1
- package/dist/es/components/status/index.js +1 -1
- package/dist/es/components/status/labels.js +1 -1
- package/dist/es/components/timeline/index.js +1 -1
- package/dist/es/components/user/index.js +1 -1
- package/dist/es/index.js +10 -10
- package/dist/es/pages/admin-page/index.js +1 -1
- package/dist/es/pages/admin-page/instances.js +1 -1
- package/dist/es/pages/admin-page/metrics.js +1 -1
- package/dist/es/pages/admin-page/projections.js +1 -1
- package/dist/es/pages/admin-page/tasks.js +1 -1
- package/dist/es/pages/category-page/columns.js +1 -1
- package/dist/es/pages/category-page/form.js +1 -1
- package/dist/es/pages/category-page/index.js +1 -1
- package/dist/es/pages/delegation-page/columns.js +1 -1
- package/dist/es/pages/delegation-page/form.js +1 -1
- package/dist/es/pages/delegation-page/index.js +1 -1
- package/dist/es/pages/flow-page/columns.js +1 -1
- package/dist/es/pages/flow-page/designer/basic-step.js +142 -140
- package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
- package/dist/es/pages/flow-page/designer/form-step.js +1 -1
- package/dist/es/pages/flow-page/designer/index.js +87 -70
- package/dist/es/pages/flow-page/designer/review-step.js +1 -1
- package/dist/es/pages/flow-page/designer/types.js +1 -1
- package/dist/es/pages/flow-page/index.js +1 -1
- package/dist/es/pages/flow-page/search.js +1 -1
- package/dist/es/pages/flow-page/versions.js +1 -1
- package/dist/es/pages/index.js +1 -1
- package/dist/es/pages/initiate-page/index.js +1 -1
- package/dist/es/pages/initiate-page/start-drawer.js +1 -1
- package/dist/es/pages/my-instances-page/index.js +1 -1
- package/dist/es/pages/task-center-page/index.js +1 -1
- package/dist/es/permissions.js +1 -1
- package/dist/es/plugins/index.js +4 -2
- package/dist/es/types/enums.js +19 -2
- package/dist/es/types/index.js +3 -3
- package/dist/types/api/flow-api.d.ts +7 -1
- package/dist/types/components/principal/index.d.ts +16 -7
- package/dist/types/index.d.ts +1 -1
- package/dist/types/pages/flow-page/designer/basic-step.d.ts +9 -2
- package/dist/types/plugins/index.d.ts +19 -8
- package/dist/types/types/enums.d.ts +14 -8
- package/dist/types/types/flow.d.ts +13 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./query.cjs");let t=require("@vef-framework-react/core"),n=require("react");var r=`approval/flow`;function i(){let i=(0,t.useApiClient)();return(0,n.useMemo)(()=>({findFlows:i.createQueryFn(`approval_flow_find_flows`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`find_flows`,e.toPagedParams(i))})).data),create:i.createMutationFn(`approval_flow_create`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`create`,i)})).data),update:i.createMutationFn(`approval_flow_update`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`update`,i)})).data),deploy:i.createMutationFn(`approval_flow_deploy`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`deploy`,i)})).data),publishVersion:i.createMutationFn(`approval_flow_publish_version`,({post:n})=>i=>n(e.API_PATH,{data:(0,t.createApiRequest)(r,`publish_version`,i)})),toggleActive:i.createMutationFn(`approval_flow_toggle_active`,({post:n})=>i=>n(e.API_PATH,{data:(0,t.createApiRequest)(r,`toggle_active`,i)})),getGraph:i.createQueryFn(`approval_flow_get_graph`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`get_graph`,i)})).data),findVersions:i.createQueryFn(`approval_flow_find_versions`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`find_versions`,i)})).data),findInitiators:i.createQueryFn(`approval_flow_find_initiators`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`find_initiators`,i)})).data)}),[i])}exports.useFlowApi=i;
|
|
1
|
+
const e=require("./query.cjs");let t=require("@vef-framework-react/core"),n=require("react");var r=`approval/flow`;function i(){let i=(0,t.useApiClient)();return(0,n.useMemo)(()=>({findFlows:i.createQueryFn(`approval_flow_find_flows`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`find_flows`,e.toPagedParams(i))})).data),create:i.createMutationFn(`approval_flow_create`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`create`,i)})).data),update:i.createMutationFn(`approval_flow_update`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`update`,i)})).data),deploy:i.createMutationFn(`approval_flow_deploy`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`deploy`,i)})).data),publishVersion:i.createMutationFn(`approval_flow_publish_version`,({post:n})=>i=>n(e.API_PATH,{data:(0,t.createApiRequest)(r,`publish_version`,i)})),toggleActive:i.createMutationFn(`approval_flow_toggle_active`,({post:n})=>i=>n(e.API_PATH,{data:(0,t.createApiRequest)(r,`toggle_active`,i)})),getGraph:i.createQueryFn(`approval_flow_get_graph`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`get_graph`,i)})).data),findVersions:i.createQueryFn(`approval_flow_find_versions`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`find_versions`,i)})).data),findInitiators:i.createQueryFn(`approval_flow_find_initiators`,({post:n})=>async i=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`find_initiators`,i)})).data),listKindOptions:i.createQueryFn(`approval_flow_list_kind_options`,({post:n})=>async()=>(await n(e.API_PATH,{data:(0,t.createApiRequest)(r,`list_kind_options`,{})})).data)}),[i])}exports.useFlowApi=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../plugins/index.cjs");let t=require("@vef-framework-react/components"),n=require("@emotion/react/jsx-runtime");var r={user:`输入用户 ID,回车添加`,role:`输入角色 ID,回车添加`,department:`输入部门 ID,回车添加`};function i({kind:i,
|
|
1
|
+
const e=require("../../plugins/index.cjs");let t=require("@vef-framework-react/components"),n=require("@emotion/react/jsx-runtime");var r={user:`输入用户 ID,回车添加`,role:`输入角色 ID,回车添加`,department:`输入部门 ID,回车添加`};function i({kind:i,selection:a,value:o,onChange:s,disabled:c,maxCount:l}){let{pickers:u}=e.useApprovalPlugins(),d=u?.[i]??(a?u?.[a]:void 0),f=e=>{s(l===void 0?e:e.slice(0,l))};return d?(0,n.jsx)(d,{disabled:c,value:o,onChange:f}):(0,n.jsx)(t.Select,{allowClear:!0,disabled:c,mode:`tags`,open:!1,placeholder:r[i]??(a?r[a]:void 0)??`输入 ID,回车添加`,style:{width:`100%`},value:o,onChange:f})}exports.PrincipalSelect=i;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./api/query.cjs"),t=require("./api/admin-api.cjs"),n=require("./api/category-api.cjs"),r=require("./api/delegation-api.cjs"),i=require("./api/flow-api.cjs"),a=require("./api/instance-api.cjs"),o=require("./api/my-api.cjs"),s=require("./plugins/index.cjs"),c=require("./components/format.cjs"),l=require("./components/status/labels.cjs"),u=require("./components/status/colors.cjs"),d=require("./components/status/index.cjs"),f=require("./components/user/index.cjs"),p=require("./components/flow-graph/index.cjs"),m=require("./components/form-panel/index.cjs"),h=require("./components/timeline/index.cjs"),g=require("./components/principal/index.cjs"),_=require("./components/detail/index.cjs"),v=require("./components/detail/admin.cjs"),y=require("./components/detail/drawer.cjs"),b=require("./permissions.cjs"),x=require("./pages/admin-page/index.cjs"),S=require("./pages/category-page/index.cjs"),C=require("./pages/delegation-page/index.cjs"),w=require("./pages/flow-page/designer/index.cjs"),
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./api/query.cjs"),t=require("./api/admin-api.cjs"),n=require("./api/category-api.cjs"),r=require("./api/delegation-api.cjs"),i=require("./api/flow-api.cjs"),a=require("./api/instance-api.cjs"),o=require("./api/my-api.cjs"),s=require("./plugins/index.cjs"),c=require("./components/format.cjs"),l=require("./components/status/labels.cjs"),u=require("./components/status/colors.cjs"),d=require("./components/status/index.cjs"),f=require("./components/user/index.cjs"),p=require("./components/flow-graph/index.cjs"),m=require("./components/form-panel/index.cjs"),h=require("./components/timeline/index.cjs"),g=require("./components/principal/index.cjs"),_=require("./components/detail/index.cjs"),v=require("./components/detail/admin.cjs"),y=require("./components/detail/drawer.cjs"),b=require("./permissions.cjs"),x=require("./pages/admin-page/index.cjs"),S=require("./pages/category-page/index.cjs"),C=require("./pages/delegation-page/index.cjs"),w=require("./types/enums.cjs"),T=require("./pages/flow-page/designer/index.cjs"),E=require("./pages/flow-page/versions.cjs"),D=require("./pages/flow-page/index.cjs"),O=require("./pages/initiate-page/start-drawer.cjs"),k=require("./pages/initiate-page/index.cjs"),A=require("./pages/my-instances-page/index.cjs"),j=require("./pages/task-center-page/index.cjs");exports.ACTIVITY_ACTION_LABELS=l.ACTIVITY_ACTION_LABELS,exports.API_PATH=e.API_PATH,exports.APPROVAL_PERMISSIONS=b.APPROVAL_PERMISSIONS,exports.AdminInstanceDetailPanel=v.AdminInstanceDetailPanel,exports.ApprovalAdminPage=x.ApprovalAdminPage,exports.ApprovalCategoryPage=S.ApprovalCategoryPage,exports.ApprovalDelegationPage=C.ApprovalDelegationPage,exports.ApprovalFlowPage=D.ApprovalFlowPage,exports.ApprovalInitiatePage=k.ApprovalInitiatePage,exports.ApprovalMyInstancesPage=A.ApprovalMyInstancesPage,exports.ApprovalProvider=s.ApprovalProvider,exports.ApprovalTaskCenterPage=j.ApprovalTaskCenterPage,exports.BINDING_PROJECTION_STATUS_COLORS=u.BINDING_PROJECTION_STATUS_COLORS,exports.BINDING_PROJECTION_STATUS_LABELS=l.BINDING_PROJECTION_STATUS_LABELS,exports.BINDING_PROJECTION_STATUS_OPTIONS=l.BINDING_PROJECTION_STATUS_OPTIONS,exports.BUILTIN_INITIATOR_KINDS=w.BUILTIN_INITIATOR_KINDS,exports.FINAL_INSTANCE_STATUSES=w.FINAL_INSTANCE_STATUSES,exports.FlowDesignerDrawer=T.FlowDesignerDrawer,exports.FlowVersionsDrawer=E.FlowVersionsDrawer,exports.INSTANCE_STATUS_COLORS=u.INSTANCE_STATUS_COLORS,exports.INSTANCE_STATUS_LABELS=l.INSTANCE_STATUS_LABELS,exports.INSTANCE_STATUS_OPTIONS=l.INSTANCE_STATUS_OPTIONS,exports.InstanceDetailDrawer=y.InstanceDetailDrawer,exports.InstanceDetailPanel=_.InstanceDetailPanel,exports.InstanceFlowGraphViewer=p.InstanceFlowGraphViewer,exports.InstanceFormPanel=m.InstanceFormPanel,exports.InstanceHeader=_.InstanceHeader,exports.InstanceStatusTag=d.InstanceStatusTag,exports.InstanceTimeline=h.InstanceTimeline,exports.NODE_PROGRESS_COLORS=u.NODE_PROGRESS_COLORS,exports.NODE_PROGRESS_LABELS=l.NODE_PROGRESS_LABELS,exports.NodeProgressTag=d.NodeProgressTag,exports.PROCESS_TASK_ACTION_LABELS=l.PROCESS_TASK_ACTION_LABELS,exports.PrincipalSelect=g.PrincipalSelect,exports.ProjectionStatusTag=d.ProjectionStatusTag,exports.StartInstanceDrawer=O.StartInstanceDrawer,exports.TASK_STATUS_COLORS=u.TASK_STATUS_COLORS,exports.TASK_STATUS_LABELS=l.TASK_STATUS_LABELS,exports.TASK_STATUS_OPTIONS=l.TASK_STATUS_OPTIONS,exports.TaskStatusTag=d.TaskStatusTag,exports.UserGroup=f.UserGroup,exports.UserLabel=f.UserLabel,exports.VERSION_STATUS_COLORS=u.VERSION_STATUS_COLORS,exports.VERSION_STATUS_LABELS=l.VERSION_STATUS_LABELS,exports.VersionStatusTag=d.VersionStatusTag,exports.formatDurationSeconds=c.formatDurationSeconds,exports.formatTimestamp=c.formatTimestamp,exports.isFinalInstanceStatus=w.isFinalInstanceStatus,exports.toEditorPlugins=s.toEditorPlugins,exports.toPagedParams=e.toPagedParams,exports.useAdminApprovalApi=t.useAdminApprovalApi,exports.useApprovalPlugins=s.useApprovalPlugins,exports.useCategoryApi=n.useCategoryApi,exports.useDelegationApi=r.useDelegationApi,exports.useFlowApi=i.useFlowApi,exports.useInstanceApi=a.useInstanceApi,exports.useMyApprovalApi=o.useMyApprovalApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../components/status/labels.cjs"),t=require("../../../components/principal/index.cjs");let
|
|
1
|
+
const e=require("../../../components/status/labels.cjs"),t=require("../../../components/principal/index.cjs"),n=require("../../../types/enums.cjs");let r=require("@vef-framework-react/components"),i=require("lucide-react"),a=require("@emotion/react/jsx-runtime");function o({initiators:e,kinds:n,onChange:o}){let s=new Map(n.map(e=>[e.kind,e])),c=n.map(e=>({label:e.label,value:e.kind}));function l(t,n){o(e.map((e,r)=>r===t?{...e,...n}:e))}return(0,a.jsxs)(r.Stack,{gap:8,children:[e.map((n,u)=>{let d=s.get(n.kind);return(0,a.jsxs)(r.Flex,{align:`center`,gap:`small`,children:[(0,a.jsx)(r.Select,{options:c,style:{width:120,flexShrink:0},value:n.kind,onChange:e=>l(u,{kind:e,ids:[]})}),(0,a.jsx)(`div`,{style:{flex:1,minWidth:0},children:d===void 0?(0,a.jsx)(`span`,{style:{color:r.globalCssVars.colorErrorText},children:`当前应用未注册该类型:${n.kind}`}):d.selection===`none`?(0,a.jsx)(`span`,{style:{color:r.globalCssVars.colorTextTertiary},children:`该类型按发起人自动解析,无需选择`}):(0,a.jsx)(t.PrincipalSelect,{kind:n.kind,selection:d.selection,value:n.ids,onChange:e=>l(u,{ids:e})})}),(0,a.jsx)(r.Button,{icon:(0,a.jsx)(r.Icon,{component:i.Trash2Icon}),onClick:()=>o(e.filter((e,t)=>t!==u))})]},u)}),(0,a.jsx)(r.Button,{block:!0,icon:(0,a.jsx)(r.Icon,{component:i.PlusIcon}),type:`dashed`,onClick:()=>o([...e,{kind:n[0]?.kind??`user`,ids:[]}]),children:`添加发起规则`})]})}var s=[`running`,`approved`,`rejected`,`withdrawn`,`returned`,`terminated`];function c({binding:t,onChange:n}){return(0,a.jsxs)(r.Stack,{gap:12,children:[(0,a.jsxs)(r.Grid,{columnGap:`small`,rowGap:12,children:[(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{required:!0,label:`业务表名`,children:(0,a.jsx)(r.Input,{placeholder:`如 biz_purchase_order`,value:t.tableName,onChange:e=>n({...t,tableName:e.target.value})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{required:!0,hint:`必须与业务表上的主键或唯一键完全一致`,label:`记录键列`,children:(0,a.jsx)(r.Select,{mode:`tags`,open:!1,placeholder:`输入列名,回车添加`,style:{width:`100%`},value:t.keyColumns,onChange:e=>n({...t,keyColumns:e})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{required:!0,label:`状态列`,children:(0,a.jsx)(r.Input,{placeholder:`如 approval_status`,value:t.statusColumn,onChange:e=>n({...t,statusColumn:e.target.value})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{required:!0,hint:`防止过期实例覆盖新一轮审批的写入`,label:`实例 ID 列`,children:(0,a.jsx)(r.Input,{placeholder:`如 approval_instance_id`,value:t.instanceIdColumn??``,onChange:e=>n({...t,instanceIdColumn:e.target.value||void 0})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{label:`开始时间列`,children:(0,a.jsx)(r.Input,{placeholder:`可选`,value:t.startedAtColumn??``,onChange:e=>n({...t,startedAtColumn:e.target.value||void 0})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{label:`完成时间列`,children:(0,a.jsx)(r.Input,{placeholder:`可选`,value:t.finishedAtColumn??``,onChange:e=>n({...t,finishedAtColumn:e.target.value||void 0})})})})]}),(0,a.jsx)(r.Collapse,{ghost:!0,items:[{key:`statusMapping`,label:`状态映射(可选,缺省写入状态原文)`,children:(0,a.jsx)(r.Grid,{columnGap:`small`,rowGap:12,children:s.map(i=>(0,a.jsx)(r.Grid.Item,{span:8,children:(0,a.jsx)(r.Labeled,{label:e.INSTANCE_STATUS_LABELS[i],children:(0,a.jsx)(r.Input,{placeholder:i,value:t.statusMapping?.[i]??``,onChange:e=>{let r={...t.statusMapping};e.target.value===``?delete r[i]:r[i]=e.target.value,n({...t,statusMapping:r})}})})},i))})}]})]})}var l={tableName:``,keyColumns:[],statusColumn:``,instanceIdColumn:void 0};function u({basic:e,initiators:i,initiatorKinds:s,categoryOptions:u,isEditing:d,onBasicChange:f,onInitiatorsChange:p}){return(0,a.jsxs)(r.Stack,{gap:16,style:{maxWidth:920,marginInline:`auto`,width:`100%`},children:[(0,a.jsx)(r.Card,{title:`基本信息`,children:(0,a.jsxs)(r.Grid,{columnGap:`small`,rowGap:12,children:[(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{required:!0,hint:d?`流程编码创建后不可修改`:`唯一标识,创建后不可修改`,label:`流程编码`,children:(0,a.jsx)(r.Input,{disabled:d,placeholder:`如 leave-request`,value:e.code,onChange:e=>f({code:e.target.value})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{required:!0,label:`流程名称`,children:(0,a.jsx)(r.Input,{placeholder:`如 请假审批`,value:e.name,onChange:e=>f({name:e.target.value})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{required:!0,label:`所属分类`,children:(0,a.jsx)(r.TreeSelect,{placeholder:`选择流程分类`,style:{width:`100%`},treeData:u,value:e.categoryId||void 0,onChange:e=>f({categoryId:e})})})}),(0,a.jsx)(r.Grid.Item,{span:12,children:(0,a.jsx)(r.Labeled,{label:`图标`,children:(0,a.jsx)(r.IconPicker,{allowClear:!0,placeholder:`选择图标(可选)`,style:{width:`100%`},value:e.icon,onChange:e=>f({icon:e??void 0})})})}),(0,a.jsx)(r.Grid.Item,{span:24,children:(0,a.jsx)(r.Labeled,{required:!0,hint:`支持 {{.flowName}} / {{.instanceNo}} / {{.applicantName}} / {{.formData.字段}} 模板变量`,label:`单据标题模板`,children:(0,a.jsx)(r.Input,{placeholder:`如 {{.applicantName}}的请假申请({{.instanceNo}})`,value:e.instanceTitleTemplate,onChange:e=>f({instanceTitleTemplate:e.target.value})})})}),(0,a.jsx)(r.Grid.Item,{span:24,children:(0,a.jsx)(r.Labeled,{label:`流程描述`,children:(0,a.jsx)(r.Input.TextArea,{maxLength:500,placeholder:`描述该流程的用途(可选)`,rows:2,value:e.description??``,onChange:e=>f({description:e.target.value||void 0})})})}),(0,a.jsx)(r.Grid.Item,{span:24,children:(0,a.jsx)(r.Labeled,{hint:`管理员可作为空审批人/超时的兜底处理人`,label:`流程管理员`,children:(0,a.jsx)(t.PrincipalSelect,{kind:`user`,value:e.adminUserIds,onChange:e=>f({adminUserIds:e})})})})]})}),(0,a.jsx)(r.Card,{title:`流程标签`,children:(0,a.jsxs)(r.Stack,{gap:8,children:[(0,a.jsx)(r.Text,{style:{fontSize:r.globalCssVars.fontSizeSm},type:`secondary`,children:`标签用于业务方自定义筛选,例如所属应用(app: crm)或移动端可发起(mobile)。列表与发起接口均支持按标签过滤。`}),(0,a.jsx)(r.LabelsEditor,{value:e.labels,onChange:e=>f({labels:e})})]})}),(0,a.jsx)(r.Card,{title:`发起权限`,children:(0,a.jsxs)(r.Stack,{gap:12,children:[(0,a.jsxs)(r.Flex,{align:`center`,gap:`small`,children:[(0,a.jsx)(r.Switch,{checked:e.isAllInitiationAllowed,onChange:e=>f({isAllInitiationAllowed:e})}),(0,a.jsx)(r.Text,{children:`所有人可发起`})]}),!e.isAllInitiationAllowed&&(0,a.jsx)(o,{initiators:i,kinds:s??n.BUILTIN_INITIATOR_KINDS,onChange:p})]})}),(0,a.jsx)(r.Card,{title:`业务绑定`,children:(0,a.jsxs)(r.Stack,{gap:12,children:[(0,a.jsx)(r.Radio.Group,{optionType:`button`,value:e.bindingMode,options:[{label:`独立存储`,value:`standalone`},{label:`绑定业务表`,value:`business`}],onChange:e=>{let t=e.target.value;(t===`standalone`||t===`business`)&&f({bindingMode:t})}}),(0,a.jsx)(r.Text,{style:{fontSize:r.globalCssVars.fontSizeSm},type:`secondary`,children:e.bindingMode===`standalone`?`表单数据存储在审批系统内,适合独立审批单。`:`审批状态回写到既有业务表,业务记录是事实源,审批引擎按版本快照投影状态。`}),e.bindingMode===`business`&&(0,a.jsx)(c,{binding:e.businessBinding??l,onChange:e=>f({businessBinding:e})})]})})]})}exports.BasicStep=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../api/category-api.cjs"),t=require("../../../api/flow-api.cjs"),n=require("../../../plugins/index.cjs"),r=require("../../category-page/form.cjs"),i=require("./basic-step.cjs"),a=require("./flow-step.cjs"),o=require("./form-step.cjs"),s=require("./types.cjs"),c=require("./review-step.cjs");let l=require("@vef-framework-react/core"),u=require("react"),d=require("@vef-framework-react/components"),f=require("@vef-framework-react/approval-form-bridge"),p=require("@emotion/react/jsx-runtime"),m=require("@vef-framework-react/approval-flow-editor");var h=[{title:`流程设置`},{title:`表单设计`},{title:`流程设计`},{title:`审阅提交`}];function g({flow:g,tenantId:_,onClose:v}){let y=t.useFlowApi(),b=e.useCategoryApi(),x=n.useApprovalPlugins(),S=g!==void 0,[C,w]=(0,u.useState)(0),[T,E]=(0,u.useState)(()=>S?null:s.createEmptyDraft(_)),[D,
|
|
1
|
+
const e=require("../../../api/category-api.cjs"),t=require("../../../api/flow-api.cjs"),n=require("../../../plugins/index.cjs"),r=require("../../category-page/form.cjs"),i=require("./basic-step.cjs"),a=require("./flow-step.cjs"),o=require("./form-step.cjs"),s=require("./types.cjs"),c=require("./review-step.cjs");let l=require("@vef-framework-react/core"),u=require("react"),d=require("@vef-framework-react/components"),f=require("@vef-framework-react/approval-form-bridge"),p=require("@emotion/react/jsx-runtime"),m=require("@vef-framework-react/approval-flow-editor");var h=[{title:`流程设置`},{title:`表单设计`},{title:`流程设计`},{title:`审阅提交`}];function g({flow:g,tenantId:_,onClose:v}){let y=t.useFlowApi(),b=e.useCategoryApi(),x=n.useApprovalPlugins(),S=g!==void 0,[C,w]=(0,u.useState)(0),[T,E]=(0,u.useState)(()=>S?null:s.createEmptyDraft(_)),[D,ee]=(0,u.useState)(``),[O,k]=(0,u.useState)(!0),[A,j]=(0,u.useState)(!1),{data:M}=(0,l.useQuery)({queryFn:b.findTree,queryKey:[b.findTree.key,{}]}),N=(0,u.useMemo)(()=>r.buildCategoryTreeOptions(M??[]),[M]),{data:P}=(0,l.useQuery)({queryFn:y.findVersions,queryKey:[y.findVersions.key,{flowId:g?.id??``}],enabled:S}),F=P?.[0]?.id,{data:I}=(0,l.useQuery)({queryFn:y.getGraph,queryKey:[y.getGraph.key,{flowId:g?.id??``,versionId:F??``}],enabled:S&&F!==void 0}),{data:L}=(0,l.useQuery)({queryFn:y.findInitiators,queryKey:[y.findInitiators.key,{flowId:g?.id??``}],enabled:S}),{data:R}=(0,l.useQuery)({queryFn:y.listKindOptions,queryKey:[y.listKindOptions.key,{}],staleTime:1/0});(0,u.useEffect)(()=>{if(!S||T!==null||P===void 0||L===void 0||P.length>0&&I===void 0)return;let e=I?.version??null;E({flowId:g.id,basic:{tenantId:g.tenantId,code:g.code,name:g.name,categoryId:g.categoryId,icon:g.icon??void 0,description:g.description??void 0,labels:g.labels??{},bindingMode:g.bindingMode,businessBinding:g.businessBinding??void 0,adminUserIds:g.adminUserIds,isAllInitiationAllowed:g.isAllInitiationAllowed,instanceTitleTemplate:g.instanceTitleTemplate},initiators:L.map(e=>({kind:e.kind,ids:e.ids})),storageMode:e?.storageMode??`json`,formSchema:e?.formSchema??null,flowDefinition:e?.flowSchema??s.EMPTY_FLOW_DEFINITION})},[S,T,P,I,L,g]);let z={shouldShowSuccessFeedback:!1,invalidates:[[y.findFlows.key],[y.findVersions.key]]},B=(0,l.useMutation)({mutationFn:y.create,meta:z}),V=(0,l.useMutation)({mutationFn:y.update,meta:z}),H=(0,l.useMutation)({mutationFn:y.deploy,meta:z}),U=(0,l.useMutation)({mutationFn:y.publishVersion,meta:z}),W=(0,u.useMemo)(()=>T?.formSchema?(0,f.projectFormSchema)(T.formSchema):null,[T?.formSchema]),G=(0,u.useMemo)(()=>T?.formSchema?(0,f.validateApprovalSchema)(T.formSchema,x.registries):null,[T?.formSchema,x.registries]),K=(0,u.useMemo)(()=>T?(0,m.validateFlowDefinition)(T.flowDefinition,{formFields:W?.formFields??[],assigneeKinds:R?.assignees,ccKinds:R?.ccs}):[],[T,W,R]),q=(0,u.useMemo)(()=>n.toEditorPlugins(x,W?.formFields??[],R),[x,W,R]),J=(0,u.useCallback)(e=>{E(t=>t&&{...t,basic:{...t.basic,...e}})},[]),Y=(0,u.useCallback)(e=>{E(t=>t&&{...t,initiators:e})},[]),X=(0,u.useCallback)(e=>{E(t=>t&&{...t,formSchema:e})},[]),Z=(0,u.useCallback)(e=>{E(t=>t&&{...t,flowDefinition:e})},[]);if(T===null)return(0,p.jsx)(d.Flex,{align:`center`,justify:`center`,style:{height:`100%`},children:(0,p.jsx)(d.Spin,{})});let Q=T,{basic:$}=Q,te=[$.code.trim()!==``&&$.name.trim()!==``&&$.categoryId!==``&&$.instanceTitleTemplate.trim()!==``&&($.bindingMode!==`business`||s.isBindingValid($.businessBinding))&&($.isAllInitiationAllowed||s.initiatorsForSubmit(T).length>0),G===null||G.valid,K.length===0,!0][C]??!1;async function ne(){j(!0);try{let e=$.bindingMode===`business`?$.businessBinding:void 0,t=s.initiatorsForSubmit(Q),n;n=Q.flowId===void 0?(await B.mutateAsync({tenantId:$.tenantId,code:$.code,name:$.name,categoryId:$.categoryId,icon:$.icon,description:$.description,labels:$.labels,bindingMode:$.bindingMode,businessBinding:e,adminUserIds:$.adminUserIds,isAllInitiationAllowed:$.isAllInitiationAllowed,instanceTitleTemplate:$.instanceTitleTemplate,initiators:t})).id:(await V.mutateAsync({flowId:Q.flowId,name:$.name,icon:$.icon,description:$.description,labels:$.labels,bindingMode:$.bindingMode,businessBinding:e,adminUserIds:$.adminUserIds,isAllInitiationAllowed:$.isAllInitiationAllowed,instanceTitleTemplate:$.instanceTitleTemplate,initiators:t})).id;let r=await H.mutateAsync({flowId:n,description:D.trim()||void 0,storageMode:Q.storageMode,flowDefinition:Q.flowDefinition,formSchema:Q.formSchema??void 0});O&&await U.mutateAsync({versionId:r.id}),(0,d.showSuccessMessage)(O?`流程已部署并发布`:`流程已部署为草稿版本`),v()}catch{}finally{j(!1)}}let re=[(0,p.jsx)(i.BasicStep,{basic:$,categoryOptions:N,initiatorKinds:R?.initiators,initiators:T.initiators,isEditing:S,onBasicChange:J,onInitiatorsChange:Y},`basic`),(0,p.jsx)(o.FormStep,{initialSchema:T.formSchema??void 0,issues:G?.issues??[],registries:x.registries,storageMode:T.storageMode,onSchemaChange:X,onStorageModeChange:e=>E(t=>t&&{...t,storageMode:e})},`form`),(0,p.jsx)(a.FlowStep,{errors:K,plugins:q,value:T.flowDefinition,onChange:Z},`flow`),(0,p.jsx)(c.ReviewStep,{draft:T,fields:W?.fields??[],publishNow:O,versionDescription:D,onPublishNowChange:k,onVersionDescriptionChange:ee},`review`)];return(0,p.jsxs)(d.Flex,{style:{height:`100%`,flexDirection:`column`},children:[(0,p.jsx)(`div`,{style:{padding:`12px 32px`,borderBottom:`1px solid var(--vef-color-border-secondary)`},children:(0,p.jsx)(d.Steps,{current:C,items:h,size:`small`,style:{maxWidth:720,marginInline:`auto`}})}),(0,p.jsx)(`div`,{style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:re.map((e,t)=>{let n=t===C,r=t===0||t===3;return(0,p.jsx)(`div`,{style:{display:n?`flex`:`none`,flexDirection:`column`,flex:1,minHeight:0,overflow:r?`auto`:`hidden`,padding:r?`24px 32px`:`16px 24px`},children:e},t)})}),(0,p.jsxs)(d.Flex,{align:`center`,justify:`space-between`,style:{padding:`12px 32px`,borderTop:`1px solid var(--vef-color-border-secondary)`},children:[(0,p.jsx)(d.Button,{disabled:C===0||A,onClick:()=>w(e=>e-1),children:`上一步`}),C<h.length-1?(0,p.jsx)(d.Button,{disabled:!te,type:`primary`,onClick:()=>w(e=>e+1),children:`下一步`}):(0,p.jsx)(d.Button,{loading:A,type:`primary`,onClick:()=>void ne(),children:O?`部署并发布`:`部署为草稿`})]})]})}function _({open:e,flow:t,tenantId:n,onClose:r}){return(0,p.jsx)(d.Drawer,{destroyOnHidden:!0,open:e,placement:`right`,size:`100%`,styles:{body:{padding:0}},title:t?`流程设计 · ${t.name}`:`新建流程`,onClose:r,children:e&&(0,p.jsx)(g,{flow:t,tenantId:n,onClose:r},t?.id??`create`)})}exports.FlowDesignerDrawer=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=require("react"),t=require("@vef-framework-react/approval-form-bridge"),n=require("@emotion/react/jsx-runtime");var r=(0,e.createContext)(null);r.displayName=`ApprovalPluginsContext`;function i({plugins:i,children:a}){let[o]=(0,e.useState)(t.createApprovalRegistries),s=(0,e.useMemo)(()=>({...i,registries:i?.registries??o}),[i,o]);return(0,n.jsx)(r,{value:s,children:a})}var a={};function o(){let n=(0,e.use)(r),[i]=(0,e.useState)(t.createApprovalRegistries);return(0,e.useMemo)(()=>n??{...a,registries:i},[n,i])}function s(e,t){return{pickers:e.pickers,globalSubjects:e.globalSubjects,formFields:t}}exports.ApprovalProvider=i,exports.toEditorPlugins=s,exports.useApprovalPlugins=o;
|
|
1
|
+
let e=require("react"),t=require("@vef-framework-react/approval-form-bridge"),n=require("@emotion/react/jsx-runtime");var r=(0,e.createContext)(null);r.displayName=`ApprovalPluginsContext`;function i({plugins:i,children:a}){let[o]=(0,e.useState)(t.createApprovalRegistries),s=(0,e.useMemo)(()=>({...i,registries:i?.registries??o}),[i,o]);return(0,n.jsx)(r,{value:s,children:a})}var a={};function o(){let n=(0,e.use)(r),[i]=(0,e.useState)(t.createApprovalRegistries);return(0,e.useMemo)(()=>n??{...a,registries:i},[n,i])}function s(e,t,n){return{pickers:e.pickers,globalSubjects:e.globalSubjects,assigneeKinds:n?.assignees,ccKinds:n?.ccs,formFields:t}}exports.ApprovalProvider=i,exports.toEditorPlugins=s,exports.useApprovalPlugins=o;
|
package/dist/cjs/types/enums.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=[`approved`,`rejected`,`terminated`];function t(t){return e.includes(t)}exports.FINAL_INSTANCE_STATUSES=e,exports.isFinalInstanceStatus=t;
|
|
1
|
+
var e=[`approved`,`rejected`,`terminated`];function t(t){return e.includes(t)}var n=[{kind:`user`,label:`指定用户`,selection:`user`},{kind:`role`,label:`指定角色`,selection:`role`},{kind:`department`,label:`指定部门`,selection:`department`}];exports.BUILTIN_INITIATOR_KINDS=n,exports.FINAL_INSTANCE_STATUSES=e,exports.isFinalInstanceStatus=t;
|
package/dist/cjs/types/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./enums.cjs");exports.FINAL_INSTANCE_STATUSES=e.FINAL_INSTANCE_STATUSES,exports.isFinalInstanceStatus=e.isFinalInstanceStatus;
|
|
1
|
+
const e=require("./enums.cjs");exports.BUILTIN_INITIATOR_KINDS=e.BUILTIN_INITIATOR_KINDS,exports.FINAL_INSTANCE_STATUSES=e.FINAL_INSTANCE_STATUSES,exports.isFinalInstanceStatus=e.isFinalInstanceStatus;
|
package/dist/es/api/admin-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { createApiRequest as n, useApiClient as r } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as i } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e } from "./query.js";
|
|
3
3
|
import { createApiRequest as t, useApiClient as n } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as r } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e } from "./query.js";
|
|
3
3
|
import { createApiRequest as t, useApiClient as n } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as r } from "react";
|
package/dist/es/api/flow-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { createApiRequest as n, useApiClient as r } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as i } from "react";
|
|
@@ -15,7 +15,8 @@ function o() {
|
|
|
15
15
|
toggleActive: o.createMutationFn("approval_flow_toggle_active", ({ post: t }) => (r) => t(e, { data: n(a, "toggle_active", r) })),
|
|
16
16
|
getGraph: o.createQueryFn("approval_flow_get_graph", ({ post: t }) => async (r) => (await t(e, { data: n(a, "get_graph", r) })).data),
|
|
17
17
|
findVersions: o.createQueryFn("approval_flow_find_versions", ({ post: t }) => async (r) => (await t(e, { data: n(a, "find_versions", r) })).data),
|
|
18
|
-
findInitiators: o.createQueryFn("approval_flow_find_initiators", ({ post: t }) => async (r) => (await t(e, { data: n(a, "find_initiators", r) })).data)
|
|
18
|
+
findInitiators: o.createQueryFn("approval_flow_find_initiators", ({ post: t }) => async (r) => (await t(e, { data: n(a, "find_initiators", r) })).data),
|
|
19
|
+
listKindOptions: o.createQueryFn("approval_flow_list_kind_options", ({ post: t }) => async () => (await t(e, { data: n(a, "list_kind_options", {}) })).data)
|
|
19
20
|
}), [o]);
|
|
20
21
|
}
|
|
21
22
|
//#endregion
|
package/dist/es/api/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { useAdminApprovalApi as n } from "./admin-api.js";
|
|
4
4
|
import { useCategoryApi as r } from "./category-api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e } from "./query.js";
|
|
3
3
|
import { createApiRequest as t, useApiClient as n } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as r } from "react";
|
package/dist/es/api/my-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./query.js";
|
|
3
3
|
import { createApiRequest as n, useApiClient as r } from "@vef-framework-react/core";
|
|
4
4
|
import { useMemo as i } from "react";
|
package/dist/es/api/query.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { SYMBOL_PAGINATION as e } from "@vef-framework-react/components";
|
|
3
3
|
//#region src/api/query.ts
|
|
4
4
|
var t = "/api";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { TASK_STATUS_LABELS as e } from "../status/labels.js";
|
|
3
3
|
import { isTaskStatus as t } from "../status/index.js";
|
|
4
4
|
import { PrincipalSelect as n } from "../principal/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { formatTimestamp as t } from "../format.js";
|
|
4
4
|
import { ACTIVITY_ACTION_LABELS as n } from "../status/labels.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { InstanceDetailPanel as e } from "./index.js";
|
|
3
3
|
import { Drawer as t } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useInstanceApi as e } from "../../api/instance-api.js";
|
|
3
3
|
import { useMyApprovalApi as t } from "../../api/my-api.js";
|
|
4
4
|
import { useApprovalPlugins as n } from "../../plugins/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { ViewerNode as e } from "./node.js";
|
|
3
3
|
import { useMemo as t } from "react";
|
|
4
4
|
import { globalCssVars as n } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { formatTimestamp as e } from "../format.js";
|
|
3
3
|
import { NODE_PROGRESS_LABELS as t } from "../status/labels.js";
|
|
4
4
|
import { collectNodePeople as n } from "./people.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { formatTimestamp as e } from "../format.js";
|
|
3
3
|
import { ACTIVITY_ACTION_LABELS as t } from "../status/labels.js";
|
|
4
4
|
import { personTone as n } from "./people.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useApprovalPlugins as e } from "../../plugins/index.js";
|
|
3
3
|
import { Empty as t } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { DynamicIcon as e } from "@vef-framework-react/components";
|
|
3
3
|
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/components/icon.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { formatDurationSeconds as e, formatTimestamp as t } from "./format.js";
|
|
3
3
|
import { ACTIVITY_ACTION_LABELS as n, BINDING_PROJECTION_STATUS_LABELS as r, BINDING_PROJECTION_STATUS_OPTIONS as i, INSTANCE_STATUS_LABELS as a, INSTANCE_STATUS_OPTIONS as o, NODE_PROGRESS_LABELS as s, PROCESS_TASK_ACTION_LABELS as c, TASK_STATUS_LABELS as l, TASK_STATUS_OPTIONS as u, VERSION_STATUS_LABELS as d } from "./status/labels.js";
|
|
4
4
|
import { BINDING_PROJECTION_STATUS_COLORS as f, INSTANCE_STATUS_COLORS as p, NODE_PROGRESS_COLORS as m, TASK_STATUS_COLORS as h, VERSION_STATUS_COLORS as g } from "./status/colors.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useApprovalPlugins as e } from "../../plugins/index.js";
|
|
3
3
|
import { Select as t } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
@@ -8,23 +8,23 @@ var r = {
|
|
|
8
8
|
role: "输入角色 ID,回车添加",
|
|
9
9
|
department: "输入部门 ID,回车添加"
|
|
10
10
|
};
|
|
11
|
-
function i({ kind: i,
|
|
12
|
-
let { pickers:
|
|
13
|
-
|
|
11
|
+
function i({ kind: i, selection: a, value: o, onChange: s, disabled: c, maxCount: l }) {
|
|
12
|
+
let { pickers: u } = e(), d = u?.[i] ?? (a ? u?.[a] : void 0), f = (e) => {
|
|
13
|
+
s(l === void 0 ? e : e.slice(0, l));
|
|
14
14
|
};
|
|
15
|
-
return
|
|
16
|
-
disabled:
|
|
17
|
-
value:
|
|
18
|
-
onChange:
|
|
15
|
+
return d ? /* @__PURE__ */ n(d, {
|
|
16
|
+
disabled: c,
|
|
17
|
+
value: o,
|
|
18
|
+
onChange: f
|
|
19
19
|
}) : /* @__PURE__ */ n(t, {
|
|
20
20
|
allowClear: !0,
|
|
21
|
-
disabled:
|
|
21
|
+
disabled: c,
|
|
22
22
|
mode: "tags",
|
|
23
23
|
open: !1,
|
|
24
|
-
placeholder: r[i],
|
|
24
|
+
placeholder: r[i] ?? (a ? r[a] : void 0) ?? "输入 ID,回车添加",
|
|
25
25
|
style: { width: "100%" },
|
|
26
|
-
value:
|
|
27
|
-
onChange:
|
|
26
|
+
value: o,
|
|
27
|
+
onChange: f
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { BINDING_PROJECTION_STATUS_LABELS as e, INSTANCE_STATUS_LABELS as t, NODE_PROGRESS_LABELS as n, TASK_STATUS_LABELS as r, VERSION_STATUS_LABELS as i } from "./labels.js";
|
|
3
3
|
import { BINDING_PROJECTION_STATUS_COLORS as a, INSTANCE_STATUS_COLORS as o, NODE_PROGRESS_COLORS as s, TASK_STATUS_COLORS as c, VERSION_STATUS_COLORS as l } from "./colors.js";
|
|
4
4
|
import { Tag as u } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { formatTimestamp as e } from "../format.js";
|
|
3
3
|
import { ACTIVITY_ACTION_LABELS as t } from "../status/labels.js";
|
|
4
4
|
import { TaskStatusTag as n } from "../status/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { Avatar as e, Space as t, Text as n, Tooltip as r } from "@vef-framework-react/components";
|
|
3
3
|
import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/components/user/index.tsx
|
package/dist/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { API_PATH as e, toPagedParams as t } from "./api/query.js";
|
|
3
3
|
import { useAdminApprovalApi as n } from "./api/admin-api.js";
|
|
4
4
|
import { useCategoryApi as r } from "./api/category-api.js";
|
|
@@ -23,12 +23,12 @@ import { APPROVAL_PERMISSIONS as U } from "./permissions.js";
|
|
|
23
23
|
import { ApprovalAdminPage as W } from "./pages/admin-page/index.js";
|
|
24
24
|
import { ApprovalCategoryPage as G } from "./pages/category-page/index.js";
|
|
25
25
|
import { ApprovalDelegationPage as K } from "./pages/delegation-page/index.js";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
export { p as ACTIVITY_ACTION_LABELS, e as API_PATH, U as APPROVAL_PERMISSIONS, V as AdminInstanceDetailPanel, W as ApprovalAdminPage, G as ApprovalCategoryPage, K as ApprovalDelegationPage,
|
|
26
|
+
import { BUILTIN_INITIATOR_KINDS as q, FINAL_INSTANCE_STATUSES as J, isFinalInstanceStatus as Y } from "./types/enums.js";
|
|
27
|
+
import { FlowDesignerDrawer as X } from "./pages/flow-page/designer/index.js";
|
|
28
|
+
import { FlowVersionsDrawer as Z } from "./pages/flow-page/versions.js";
|
|
29
|
+
import { ApprovalFlowPage as Q } from "./pages/flow-page/index.js";
|
|
30
|
+
import { StartInstanceDrawer as $ } from "./pages/initiate-page/start-drawer.js";
|
|
31
|
+
import { ApprovalInitiatePage as ee } from "./pages/initiate-page/index.js";
|
|
32
|
+
import { ApprovalMyInstancesPage as te } from "./pages/my-instances-page/index.js";
|
|
33
|
+
import { ApprovalTaskCenterPage as ne } from "./pages/task-center-page/index.js";
|
|
34
|
+
export { p as ACTIVITY_ACTION_LABELS, e as API_PATH, U as APPROVAL_PERMISSIONS, V as AdminInstanceDetailPanel, W as ApprovalAdminPage, G as ApprovalCategoryPage, K as ApprovalDelegationPage, Q as ApprovalFlowPage, ee as ApprovalInitiatePage, te as ApprovalMyInstancesPage, c as ApprovalProvider, ne as ApprovalTaskCenterPage, C as BINDING_PROJECTION_STATUS_COLORS, m as BINDING_PROJECTION_STATUS_LABELS, h as BINDING_PROJECTION_STATUS_OPTIONS, q as BUILTIN_INITIATOR_KINDS, J as FINAL_INSTANCE_STATUSES, X as FlowDesignerDrawer, Z as FlowVersionsDrawer, w as INSTANCE_STATUS_COLORS, g as INSTANCE_STATUS_LABELS, _ as INSTANCE_STATUS_OPTIONS, H as InstanceDetailDrawer, z as InstanceDetailPanel, F as InstanceFlowGraphViewer, I as InstanceFormPanel, B as InstanceHeader, O as InstanceStatusTag, L as InstanceTimeline, T as NODE_PROGRESS_COLORS, v as NODE_PROGRESS_LABELS, k as NodeProgressTag, y as PROCESS_TASK_ACTION_LABELS, R as PrincipalSelect, A as ProjectionStatusTag, $ as StartInstanceDrawer, E as TASK_STATUS_COLORS, b as TASK_STATUS_LABELS, x as TASK_STATUS_OPTIONS, j as TaskStatusTag, N as UserGroup, P as UserLabel, D as VERSION_STATUS_COLORS, S as VERSION_STATUS_LABELS, M as VersionStatusTag, d as formatDurationSeconds, f as formatTimestamp, Y as isFinalInstanceStatus, l as toEditorPlugins, t as toPagedParams, n as useAdminApprovalApi, u as useApprovalPlugins, r as useCategoryApi, i as useDelegationApi, a as useFlowApi, o as useInstanceApi, s as useMyApprovalApi };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { APPROVAL_PERMISSIONS as e } from "../../permissions.js";
|
|
3
3
|
import { InstancesPanel as t } from "./instances.js";
|
|
4
4
|
import { MetricsPanel as n } from "./metrics.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { formatTimestamp as t } from "../../components/format.js";
|
|
4
4
|
import { INSTANCE_STATUS_OPTIONS as n } from "../../components/status/labels.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { formatDurationSeconds as t, formatTimestamp as n } from "../../components/format.js";
|
|
4
4
|
import { BINDING_PROJECTION_STATUS_LABELS as r, INSTANCE_STATUS_LABELS as i, TASK_STATUS_LABELS as a } from "../../components/status/labels.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { formatTimestamp as t } from "../../components/format.js";
|
|
4
4
|
import { BINDING_PROJECTION_STATUS_OPTIONS as n } from "../../components/status/labels.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useAdminApprovalApi as e } from "../../api/admin-api.js";
|
|
3
3
|
import { formatTimestamp as t } from "../../components/format.js";
|
|
4
4
|
import { TASK_STATUS_OPTIONS as n } from "../../components/status/labels.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { formatTimestamp as e } from "../../components/format.js";
|
|
3
3
|
import { FlowIcon as t } from "../../components/icon.js";
|
|
4
4
|
import { Flex as n, Tag as r, Text as i } from "@vef-framework-react/components";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { Grid as e, useFormContext as t } from "@vef-framework-react/components";
|
|
3
3
|
import { jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { z as i } from "@vef-framework-react/shared";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useCategoryApi as e } from "../../api/category-api.js";
|
|
3
3
|
import { APPROVAL_PERMISSIONS as t } from "../../permissions.js";
|
|
4
4
|
import { categoryColumns as n } from "./columns.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { formatTimestamp as e } from "../../components/format.js";
|
|
3
3
|
import { Tag as t, Text as n } from "@vef-framework-react/components";
|
|
4
4
|
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useCategoryApi as e } from "../../api/category-api.js";
|
|
3
3
|
import { PrincipalSelect as t } from "../../components/principal/index.js";
|
|
4
4
|
import { buildCategoryTreeOptions as n } from "../category-page/form.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { useDelegationApi as e } from "../../api/delegation-api.js";
|
|
3
3
|
import { APPROVAL_PERMISSIONS as t } from "../../permissions.js";
|
|
4
4
|
import { delegationColumns as n } from "./columns.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.18.0 made by Venus | 2026-08-31T14:48:19.173Z */
|
|
2
2
|
import { formatTimestamp as e } from "../../components/format.js";
|
|
3
3
|
import { FlowIcon as t } from "../../components/icon.js";
|
|
4
4
|
import { Flex as n, LabelsDisplay as r, Tag as i, Text as a } from "@vef-framework-react/components";
|