@vef-framework-react/approval 2.28.0 → 2.30.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.
Files changed (67) hide show
  1. package/dist/cjs/pages/flow-page/designer/basic-step.cjs +1 -1
  2. package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -1
  3. package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
  4. package/dist/cjs/plugins/index.cjs +1 -1
  5. package/dist/es/api/admin-api.js +1 -1
  6. package/dist/es/api/category-api.js +1 -1
  7. package/dist/es/api/delegation-api.js +1 -1
  8. package/dist/es/api/flow-api.js +1 -1
  9. package/dist/es/api/index.js +1 -1
  10. package/dist/es/api/instance-api.js +1 -1
  11. package/dist/es/api/my-api.js +1 -1
  12. package/dist/es/api/query.js +1 -1
  13. package/dist/es/components/action-dialog/index.js +1 -1
  14. package/dist/es/components/detail/action-modals.js +1 -1
  15. package/dist/es/components/detail/admin.js +1 -1
  16. package/dist/es/components/detail/drawer.js +1 -1
  17. package/dist/es/components/detail/index.js +1 -1
  18. package/dist/es/components/flow-graph/index.js +1 -1
  19. package/dist/es/components/flow-graph/node.js +1 -1
  20. package/dist/es/components/flow-graph/people-overlay.js +1 -1
  21. package/dist/es/components/flow-graph/people.js +1 -1
  22. package/dist/es/components/form-panel/index.js +1 -1
  23. package/dist/es/components/format.js +1 -1
  24. package/dist/es/components/icon.js +1 -1
  25. package/dist/es/components/index.js +1 -1
  26. package/dist/es/components/principal/index.js +1 -1
  27. package/dist/es/components/status/colors.js +1 -1
  28. package/dist/es/components/status/index.js +1 -1
  29. package/dist/es/components/status/labels.js +1 -1
  30. package/dist/es/components/timeline/index.js +1 -1
  31. package/dist/es/components/user/index.js +1 -1
  32. package/dist/es/index.js +1 -1
  33. package/dist/es/pages/admin-page/index.js +1 -1
  34. package/dist/es/pages/admin-page/instances.js +1 -1
  35. package/dist/es/pages/admin-page/metrics.js +1 -1
  36. package/dist/es/pages/admin-page/projections.js +1 -1
  37. package/dist/es/pages/admin-page/tasks.js +1 -1
  38. package/dist/es/pages/category-page/columns.js +1 -1
  39. package/dist/es/pages/category-page/form.js +1 -1
  40. package/dist/es/pages/category-page/index.js +1 -1
  41. package/dist/es/pages/delegation-page/columns.js +1 -1
  42. package/dist/es/pages/delegation-page/form.js +1 -1
  43. package/dist/es/pages/delegation-page/index.js +1 -1
  44. package/dist/es/pages/flow-page/columns.js +1 -1
  45. package/dist/es/pages/flow-page/designer/basic-step.js +2 -2
  46. package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
  47. package/dist/es/pages/flow-page/designer/form-step.js +7 -6
  48. package/dist/es/pages/flow-page/designer/index.js +3 -5
  49. package/dist/es/pages/flow-page/designer/review-step.js +1 -1
  50. package/dist/es/pages/flow-page/designer/types.js +1 -1
  51. package/dist/es/pages/flow-page/index.js +1 -1
  52. package/dist/es/pages/flow-page/search.js +1 -1
  53. package/dist/es/pages/flow-page/versions.js +1 -1
  54. package/dist/es/pages/index.js +1 -1
  55. package/dist/es/pages/initiate-page/index.js +1 -1
  56. package/dist/es/pages/initiate-page/start-drawer.js +1 -1
  57. package/dist/es/pages/my-instances-page/index.js +1 -1
  58. package/dist/es/pages/task-center-page/index.js +1 -1
  59. package/dist/es/pages/task-center-page/search.js +1 -1
  60. package/dist/es/permissions.js +1 -1
  61. package/dist/es/plugins/form-context.js +1 -1
  62. package/dist/es/plugins/index.js +2 -1
  63. package/dist/es/types/enums.js +1 -1
  64. package/dist/es/types/index.js +1 -1
  65. package/dist/types/index.d.ts +1 -1
  66. package/dist/types/plugins/index.d.ts +20 -2
  67. package/package.json +7 -7
@@ -1 +1 @@
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,{label:`全局流程`,hint:d?`创建后不可修改`:`开启后所有租户都可发起;审批人与抄送人不能指定具体的用户、角色或部门。创建后不可修改`,children:(0,a.jsx)(r.Switch,{checked:e.isShared,disabled:d,onChange:e=>f({isShared:e})})})}),(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
+ 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,{label:`全局流程`,hint:d?`创建后不可修改`:`开启后所有机构都可发起,审批人与抄送人可以指定其他机构的用户或部门。创建后不可修改`,children:(0,a.jsx)(r.Switch,{checked:e.isShared,disabled:d,onChange:e=>f({isShared:e})})})}),(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("../../../plugins/index.cjs"),t=require("../../../plugins/form-context.cjs");let n=require("react"),r=require("@vef-framework-react/components"),i=require("@vef-framework-react/approval-form-bridge"),a=require("@emotion/react/jsx-runtime"),o=require("@vef-framework-react/form-editor");var s=[{label:`JSON 存储`,value:`json`},{label:`独立表存储`,value:`table`}];function c(e){return e===`json`||e===`table`}var l={json:`表单数据以 JSONB 存入实例表,字段可灵活增减,查询能力有限。`,table:`表单数据投影到按版本生成的独立表(明细表各自成表),适合复杂查询与数据分析。`};function u({storageMode:u,initialSchema:d,registries:f,onStorageModeChange:p,onSchemaChange:m}){let{dataSourceApis:h,dataSourceResolver:g,evaluators:_,formGlobals:v}=e.useApprovalPlugins(),y=(0,n.useMemo)(()=>t.toFormContextSources(v),[v]);return(0,a.jsxs)(r.Stack,{gap:8,style:{height:`100%`,minHeight:0},children:[(0,a.jsxs)(r.Flex,{align:`center`,gap:`middle`,wrap:`wrap`,children:[(0,a.jsx)(r.Text,{type:`secondary`,children:`存储模式`}),(0,a.jsx)(r.Segmented,{options:s,value:u,onChange:e=>{c(e)&&p(e)}}),(0,a.jsx)(r.Text,{style:{fontSize:r.globalCssVars.fontSizeSm},type:`secondary`,children:l[u]})]}),(0,a.jsx)(`div`,{style:{flex:1,minHeight:0,border:`1px solid ${r.globalCssVars.colorBorderSecondary}`,borderRadius:8,overflow:`hidden`},children:(0,a.jsx)(o.FormEditor,{contextSources:y,dataSourceApis:h,dataSourceResolver:g,evaluators:_,initialSchema:d,registries:f,validate:i.validateApprovalProjection,onSchemaChange:m})})]})}exports.FormStep=u;
1
+ const e=require("../../../plugins/index.cjs"),t=require("../../../plugins/form-context.cjs");let n=require("react"),r=require("@vef-framework-react/components"),i=require("@vef-framework-react/approval-form-bridge"),a=require("@emotion/react/jsx-runtime"),o=require("@vef-framework-react/form-editor");var s=[{label:`JSON 存储`,value:`json`},{label:`独立表存储`,value:`table`}];function c(e){return e===`json`||e===`table`}var l={json:`表单数据以 JSONB 存入实例表,字段可灵活增减,查询能力有限。`,table:`表单数据投影到按版本生成的独立表(明细表各自成表),适合复杂查询与数据分析。`};function u({storageMode:u,initialSchema:d,registries:f,onStorageModeChange:p,onSchemaChange:m}){let{codeSets:h,dataSourceApis:g,dataSourceResolver:_,evaluators:v,formGlobals:y}=e.useApprovalPlugins(),b=(0,n.useMemo)(()=>t.toFormContextSources(y),[y]);return(0,a.jsxs)(r.Stack,{gap:8,style:{height:`100%`,minHeight:0},children:[(0,a.jsxs)(r.Flex,{align:`center`,gap:`middle`,wrap:`wrap`,children:[(0,a.jsx)(r.Text,{type:`secondary`,children:`存储模式`}),(0,a.jsx)(r.Segmented,{options:s,value:u,onChange:e=>{c(e)&&p(e)}}),(0,a.jsx)(r.Text,{style:{fontSize:r.globalCssVars.fontSizeSm},type:`secondary`,children:l[u]})]}),(0,a.jsx)(`div`,{style:{flex:1,minHeight:0,border:`1px solid ${r.globalCssVars.colorBorderSecondary}`,borderRadius:8,overflow:`hidden`},children:(0,a.jsx)(o.FormEditor,{codeSets:h,contextSources:b,dataSourceApis:g,dataSourceResolver:_,evaluators:v,initialSchema:d,registries:f,validate:i.validateApprovalProjection,onSchemaChange:m})})]})}exports.FormStep=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"),ee=require("./review-step.cjs");let c=require("@vef-framework-react/core"),l=require("react"),u=require("@vef-framework-react/components"),d=require("@vef-framework-react/approval-form-bridge"),f=require("@emotion/react/jsx-runtime"),p=require("@vef-framework-react/approval-flow-editor");var m=[{title:`流程设置`},{title:`表单设计`},{title:`流程设计`},{title:`审阅提交`}];function h({flow:h,tenantId:g,onClose:_}){let v=t.useFlowApi(),y=e.useCategoryApi(),b=n.useApprovalPlugins(),x=h!==void 0,[S,C]=(0,l.useState)(0),[w,T]=(0,l.useState)(()=>x?null:s.createEmptyDraft(g)),[E,te]=(0,l.useState)(``),[D,O]=(0,l.useState)(!0),[k,A]=(0,l.useState)(!1),ne=h?.tenantId??g,j=h?.isShared??w?.basic.isShared??!1,{data:M}=(0,c.useQuery)({queryFn:y.findTree,queryKey:[y.findTree.key,{tenantId:ne}]}),re=(0,l.useMemo)(()=>r.buildCategoryTreeOptions(M??[]),[M]),{data:N}=(0,c.useQuery)({queryFn:v.findVersions,queryKey:[v.findVersions.key,{flowId:h?.id??``}],enabled:x}),P=N?.[0]?.id,{data:F}=(0,c.useQuery)({queryFn:v.getGraph,queryKey:[v.getGraph.key,{flowId:h?.id??``,versionId:P??``}],enabled:x&&P!==void 0}),{data:I}=(0,c.useQuery)({queryFn:v.findInitiators,queryKey:[v.findInitiators.key,{flowId:h?.id??``}],enabled:x}),{data:L}=(0,c.useQuery)({queryFn:v.listKindOptions,queryKey:[v.listKindOptions.key,{}],staleTime:1/0});(0,l.useEffect)(()=>{if(!x||w!==null||N===void 0||I===void 0||N.length>0&&F===void 0)return;let e=F?.version??null;T({flowId:h.id,basic:{tenantId:h.tenantId,isShared:h.isShared,code:h.code,name:h.name,categoryId:h.categoryId,icon:h.icon??void 0,description:h.description??void 0,labels:h.labels??{},bindingMode:h.bindingMode,businessBinding:h.businessBinding??void 0,adminUserIds:h.adminUserIds,isAllInitiationAllowed:h.isAllInitiationAllowed,instanceTitleTemplate:h.instanceTitleTemplate},initiators:I.map(e=>({kind:e.kind,ids:e.ids})),storageMode:e?.storageMode??`json`,formSchema:e?.formSchema??null,flowDefinition:e?.flowSchema??s.EMPTY_FLOW_DEFINITION})},[x,w,N,F,I,h]);let R={shouldShowSuccessFeedback:!1,invalidates:[[v.findFlows.key],[v.findVersions.key]]},z=(0,c.useMutation)({mutationFn:v.create,meta:R}),B=(0,c.useMutation)({mutationFn:v.update,meta:R}),V=(0,c.useMutation)({mutationFn:v.deploy,meta:R}),H=(0,c.useMutation)({mutationFn:v.publishVersion,meta:R}),U=(0,l.useMemo)(()=>w?.formSchema?(0,d.projectFormSchema)(w.formSchema):null,[w?.formSchema]),W=(0,l.useMemo)(()=>w?.formSchema?(0,d.validateApprovalSchema)(w.formSchema,b.registries):null,[w?.formSchema,b.registries]),G=(0,l.useMemo)(()=>w?(0,p.validateFlowDefinition)(w.flowDefinition,{formFields:U?.formFields??[],assigneeKinds:L?.assignees,ccKinds:L?.ccs,shared:j}):[],[w,U,L,j]),K=(0,l.useMemo)(()=>({...n.toEditorPlugins(b,U?.formFields??[],L),shared:j}),[b,U,L,j]),q=(0,l.useCallback)(e=>{T(t=>t&&{...t,basic:{...t.basic,...e}})},[]),J=(0,l.useCallback)(e=>{T(t=>t&&{...t,initiators:e})},[]),Y=(0,l.useCallback)(e=>{T(t=>t&&{...t,formSchema:e})},[]),ie=(0,l.useCallback)(e=>{T(t=>t&&{...t,flowDefinition:e})},[]);if(w===null)return(0,f.jsx)(u.Flex,{align:`center`,justify:`center`,style:{height:`100%`},children:(0,f.jsx)(u.Spin,{})});let X=w,{basic:Z}=X,Q=[Z.code.trim()!==``&&Z.name.trim()!==``&&Z.categoryId!==``&&Z.instanceTitleTemplate.trim()!==``&&(Z.bindingMode!==`business`||s.isBindingValid(Z.businessBinding))&&(Z.isAllInitiationAllowed||s.initiatorsForSubmit(w).length>0),W===null||W.valid,G.length===0,!0][S]??!1,ae=[`请先完善流程设置中的必填项`,`表单存在 ${W?.issues.filter(e=>e.severity===`error`).length??0} 个错误,可在编辑器底部的问题提示中查看并定位`,`流程存在 ${G.length} 个问题,可在画布工具栏的问题提示中查看并定位`,void 0],$=Q?void 0:ae[S];async function oe(){A(!0);try{let e=Z.bindingMode===`business`?Z.businessBinding:void 0,t=s.initiatorsForSubmit(X),n;n=X.flowId===void 0?(await z.mutateAsync({tenantId:Z.tenantId,isShared:Z.isShared,code:Z.code,name:Z.name,categoryId:Z.categoryId,icon:Z.icon,description:Z.description,labels:Z.labels,bindingMode:Z.bindingMode,businessBinding:e,adminUserIds:Z.adminUserIds,isAllInitiationAllowed:Z.isAllInitiationAllowed,instanceTitleTemplate:Z.instanceTitleTemplate,initiators:t})).id:(await B.mutateAsync({flowId:X.flowId,name:Z.name,icon:Z.icon,description:Z.description,labels:Z.labels,bindingMode:Z.bindingMode,businessBinding:e,adminUserIds:Z.adminUserIds,isAllInitiationAllowed:Z.isAllInitiationAllowed,instanceTitleTemplate:Z.instanceTitleTemplate,initiators:t})).id;let r=await V.mutateAsync({flowId:n,description:E.trim()||void 0,storageMode:X.storageMode,flowDefinition:X.flowDefinition,formSchema:X.formSchema??void 0});D&&await H.mutateAsync({versionId:r.id}),(0,u.showSuccessMessage)(D?`流程已部署并发布`:`流程已部署为草稿版本`),_()}catch{}finally{A(!1)}}let se=[(0,f.jsx)(i.BasicStep,{basic:Z,categoryOptions:re,initiatorKinds:L?.initiators,initiators:w.initiators,isEditing:x,onBasicChange:q,onInitiatorsChange:J},`basic`),(0,f.jsx)(o.FormStep,{initialSchema:w.formSchema??void 0,registries:b.registries,storageMode:w.storageMode,onSchemaChange:Y,onStorageModeChange:e=>T(t=>t&&{...t,storageMode:e})},`form`),(0,f.jsx)(a.FlowStep,{plugins:K,value:w.flowDefinition,onChange:ie},`flow`),(0,f.jsx)(ee.ReviewStep,{draft:w,fields:U?.fields??[],publishNow:D,versionDescription:E,onPublishNowChange:O,onVersionDescriptionChange:te},`review`)];return(0,f.jsxs)(u.Flex,{style:{height:`100%`,flexDirection:`column`},children:[(0,f.jsx)(`div`,{style:{padding:`12px 32px`,borderBottom:`1px solid var(--vef-color-border-secondary)`},children:(0,f.jsx)(u.Steps,{current:S,items:m,size:`small`,style:{maxWidth:720,marginInline:`auto`}})}),(0,f.jsx)(`div`,{style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:se.map((e,t)=>{let n=t===S,r=t===0||t===3;return(0,f.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,f.jsxs)(u.Flex,{align:`center`,justify:`space-between`,style:{padding:`12px 32px`,borderTop:`1px solid var(--vef-color-border-secondary)`},children:[(0,f.jsx)(u.Button,{disabled:S===0||k,onClick:()=>C(e=>e-1),children:`上一步`}),(0,f.jsxs)(u.Flex,{align:`center`,gap:`middle`,children:[$===void 0?null:(0,f.jsx)(u.Text,{style:{fontSize:u.globalCssVars.fontSizeSm},type:`danger`,children:$}),S<m.length-1?(0,f.jsx)(u.Button,{disabled:!Q,type:`primary`,onClick:()=>C(e=>e+1),children:`下一步`}):(0,f.jsx)(u.Button,{loading:k,type:`primary`,onClick:()=>void oe(),children:D?`部署并发布`:`部署为草稿`})]})]})]})}function g({open:e,flow:t,tenantId:n,onClose:r}){return(0,f.jsx)(u.Drawer,{destroyOnHidden:!0,open:e,placement:`right`,size:`100%`,styles:{body:{padding:0}},title:t?`流程设计 · ${t.name}`:`新建流程`,onClose:r,children:e&&(0,f.jsx)(h,{flow:t,tenantId:n,onClose:r},t?.id??`create`)})}exports.FlowDesignerDrawer=g;
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"),ee=require("./basic-step.cjs"),te=require("./flow-step.cjs"),i=require("./form-step.cjs"),a=require("./types.cjs"),o=require("./review-step.cjs");let s=require("@vef-framework-react/core"),c=require("react"),l=require("@vef-framework-react/components"),u=require("@vef-framework-react/approval-form-bridge"),d=require("@emotion/react/jsx-runtime"),f=require("@vef-framework-react/approval-flow-editor");var p=[{title:`流程设置`},{title:`表单设计`},{title:`流程设计`},{title:`审阅提交`}];function m({flow:m,tenantId:h,onClose:g}){let _=t.useFlowApi(),v=e.useCategoryApi(),y=n.useApprovalPlugins(),b=m!==void 0,[x,S]=(0,c.useState)(0),[C,w]=(0,c.useState)(()=>b?null:a.createEmptyDraft(h)),[T,E]=(0,c.useState)(``),[D,O]=(0,c.useState)(!0),[k,A]=(0,c.useState)(!1),ne=m?.tenantId??h,j=m?.isShared??C?.basic.isShared??!1,{data:M}=(0,s.useQuery)({queryFn:v.findTree,queryKey:[v.findTree.key,{tenantId:ne}]}),re=(0,c.useMemo)(()=>r.buildCategoryTreeOptions(M??[]),[M]),{data:N}=(0,s.useQuery)({queryFn:_.findVersions,queryKey:[_.findVersions.key,{flowId:m?.id??``}],enabled:b}),P=N?.[0]?.id,{data:F}=(0,s.useQuery)({queryFn:_.getGraph,queryKey:[_.getGraph.key,{flowId:m?.id??``,versionId:P??``}],enabled:b&&P!==void 0}),{data:I}=(0,s.useQuery)({queryFn:_.findInitiators,queryKey:[_.findInitiators.key,{flowId:m?.id??``}],enabled:b}),{data:L}=(0,s.useQuery)({queryFn:_.listKindOptions,queryKey:[_.listKindOptions.key,{}],staleTime:1/0});(0,c.useEffect)(()=>{if(!b||C!==null||N===void 0||I===void 0||N.length>0&&F===void 0)return;let e=F?.version??null;w({flowId:m.id,basic:{tenantId:m.tenantId,isShared:m.isShared,code:m.code,name:m.name,categoryId:m.categoryId,icon:m.icon??void 0,description:m.description??void 0,labels:m.labels??{},bindingMode:m.bindingMode,businessBinding:m.businessBinding??void 0,adminUserIds:m.adminUserIds,isAllInitiationAllowed:m.isAllInitiationAllowed,instanceTitleTemplate:m.instanceTitleTemplate},initiators:I.map(e=>({kind:e.kind,ids:e.ids})),storageMode:e?.storageMode??`json`,formSchema:e?.formSchema??null,flowDefinition:e?.flowSchema??a.EMPTY_FLOW_DEFINITION})},[b,C,N,F,I,m]);let R={shouldShowSuccessFeedback:!1,invalidates:[[_.findFlows.key],[_.findVersions.key]]},z=(0,s.useMutation)({mutationFn:_.create,meta:R}),B=(0,s.useMutation)({mutationFn:_.update,meta:R}),V=(0,s.useMutation)({mutationFn:_.deploy,meta:R}),H=(0,s.useMutation)({mutationFn:_.publishVersion,meta:R}),U=(0,c.useMemo)(()=>C?.formSchema?(0,u.projectFormSchema)(C.formSchema):null,[C?.formSchema]),W=(0,c.useMemo)(()=>C?.formSchema?(0,u.validateApprovalSchema)(C.formSchema,y.registries):null,[C?.formSchema,y.registries]),G=(0,c.useMemo)(()=>C?(0,f.validateFlowDefinition)(C.flowDefinition,{formFields:U?.formFields??[],assigneeKinds:L?.assignees,ccKinds:L?.ccs}):[],[C,U,L]),K=(0,c.useMemo)(()=>({...n.toEditorPlugins(y,U?.formFields??[],L),shared:j}),[y,U,L,j]),q=(0,c.useCallback)(e=>{w(t=>t&&{...t,basic:{...t.basic,...e}})},[]),J=(0,c.useCallback)(e=>{w(t=>t&&{...t,initiators:e})},[]),Y=(0,c.useCallback)(e=>{w(t=>t&&{...t,formSchema:e})},[]),ie=(0,c.useCallback)(e=>{w(t=>t&&{...t,flowDefinition:e})},[]);if(C===null)return(0,d.jsx)(l.Flex,{align:`center`,justify:`center`,style:{height:`100%`},children:(0,d.jsx)(l.Spin,{})});let X=C,{basic:Z}=X,Q=[Z.code.trim()!==``&&Z.name.trim()!==``&&Z.categoryId!==``&&Z.instanceTitleTemplate.trim()!==``&&(Z.bindingMode!==`business`||a.isBindingValid(Z.businessBinding))&&(Z.isAllInitiationAllowed||a.initiatorsForSubmit(C).length>0),W===null||W.valid,G.length===0,!0][x]??!1,ae=[`请先完善流程设置中的必填项`,`表单存在 ${W?.issues.filter(e=>e.severity===`error`).length??0} 个错误,可在编辑器底部的问题提示中查看并定位`,`流程存在 ${G.length} 个问题,可在画布工具栏的问题提示中查看并定位`,void 0],$=Q?void 0:ae[x];async function oe(){A(!0);try{let e=Z.bindingMode===`business`?Z.businessBinding:void 0,t=a.initiatorsForSubmit(X),n;n=X.flowId===void 0?(await z.mutateAsync({tenantId:Z.tenantId,isShared:Z.isShared,code:Z.code,name:Z.name,categoryId:Z.categoryId,icon:Z.icon,description:Z.description,labels:Z.labels,bindingMode:Z.bindingMode,businessBinding:e,adminUserIds:Z.adminUserIds,isAllInitiationAllowed:Z.isAllInitiationAllowed,instanceTitleTemplate:Z.instanceTitleTemplate,initiators:t})).id:(await B.mutateAsync({flowId:X.flowId,name:Z.name,icon:Z.icon,description:Z.description,labels:Z.labels,bindingMode:Z.bindingMode,businessBinding:e,adminUserIds:Z.adminUserIds,isAllInitiationAllowed:Z.isAllInitiationAllowed,instanceTitleTemplate:Z.instanceTitleTemplate,initiators:t})).id;let r=await V.mutateAsync({flowId:n,description:T.trim()||void 0,storageMode:X.storageMode,flowDefinition:X.flowDefinition,formSchema:X.formSchema??void 0});D&&await H.mutateAsync({versionId:r.id}),(0,l.showSuccessMessage)(D?`流程已部署并发布`:`流程已部署为草稿版本`),g()}catch{}finally{A(!1)}}let se=[(0,d.jsx)(ee.BasicStep,{basic:Z,categoryOptions:re,initiatorKinds:L?.initiators,initiators:C.initiators,isEditing:b,onBasicChange:q,onInitiatorsChange:J},`basic`),(0,d.jsx)(i.FormStep,{initialSchema:C.formSchema??void 0,registries:y.registries,storageMode:C.storageMode,onSchemaChange:Y,onStorageModeChange:e=>w(t=>t&&{...t,storageMode:e})},`form`),(0,d.jsx)(te.FlowStep,{plugins:K,value:C.flowDefinition,onChange:ie},`flow`),(0,d.jsx)(o.ReviewStep,{draft:C,fields:U?.fields??[],publishNow:D,versionDescription:T,onPublishNowChange:O,onVersionDescriptionChange:E},`review`)];return(0,d.jsxs)(l.Flex,{style:{height:`100%`,flexDirection:`column`},children:[(0,d.jsx)(`div`,{style:{padding:`12px 32px`,borderBottom:`1px solid var(--vef-color-border-secondary)`},children:(0,d.jsx)(l.Steps,{current:x,items:p,size:`small`,style:{maxWidth:720,marginInline:`auto`}})}),(0,d.jsx)(`div`,{style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:se.map((e,t)=>{let n=t===x,r=t===0||t===3;return(0,d.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,d.jsxs)(l.Flex,{align:`center`,justify:`space-between`,style:{padding:`12px 32px`,borderTop:`1px solid var(--vef-color-border-secondary)`},children:[(0,d.jsx)(l.Button,{disabled:x===0||k,onClick:()=>S(e=>e-1),children:`上一步`}),(0,d.jsxs)(l.Flex,{align:`center`,gap:`middle`,children:[$===void 0?null:(0,d.jsx)(l.Text,{style:{fontSize:l.globalCssVars.fontSizeSm},type:`danger`,children:$}),x<p.length-1?(0,d.jsx)(l.Button,{disabled:!Q,type:`primary`,onClick:()=>S(e=>e+1),children:`下一步`}):(0,d.jsx)(l.Button,{loading:k,type:`primary`,onClick:()=>void oe(),children:D?`部署并发布`:`部署为草稿`})]})]})]})}function h({open:e,flow:t,tenantId:n,onClose:r}){return(0,d.jsx)(l.Drawer,{destroyOnHidden:!0,open:e,placement:`right`,size:`100%`,styles:{body:{padding:0}},title:t?`流程设计 · ${t.name}`:`新建流程`,onClose:r,children:e&&(0,d.jsx)(m,{flow:t,tenantId:n,onClose:r},t?.id??`create`)})}exports.FlowDesignerDrawer=h;
@@ -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,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;
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,tenants:e.tenants,globalSubjects:e.globalSubjects,assigneeKinds:n?.assignees,ccKinds:n?.ccs,formFields:t}}exports.ApprovalProvider=i,exports.toEditorPlugins=s,exports.useApprovalPlugins=o;
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { API_PATH as e, toCrudReadMeta 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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useState as e } from "react";
3
3
  import { Button as t, Modal as n } from "@vef-framework-react/components";
4
4
  import { jsx as r, jsxs as i } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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 { ActionDialog as n, ActionFooter as r, useConfirm as i } from "../action-dialog/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  //#region src/components/flow-graph/people.ts
3
3
  var e = {
4
4
  waiting: "default",
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useApprovalPlugins as e } from "../../plugins/index.js";
3
3
  import { toFormEvaluationContext as t } from "../../plugins/form-context.js";
4
4
  import { useMemo as n } from "react";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import e from "dayjs";
3
3
  //#region src/components/format.ts
4
4
  function t(t) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  //#region src/components/status/colors.ts
3
3
  var e = {
4
4
  running: "processing",
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  //#region src/components/status/labels.ts
3
3
  var e = {
4
4
  running: "审批中",
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { INSTANCE_STATUS_LABELS as e } from "../../../components/status/labels.js";
3
3
  import { PrincipalSelect as t } from "../../../components/principal/index.js";
4
4
  import { BUILTIN_INITIATOR_KINDS as n } from "../../../types/enums.js";
@@ -290,7 +290,7 @@ function O({ basic: e, initiators: r, initiatorKinds: a, categoryOptions: c, isE
290
290
  span: 24,
291
291
  children: /* @__PURE__ */ S(d, {
292
292
  label: "全局流程",
293
- hint: m ? "创建后不可修改" : "开启后所有租户都可发起;审批人与抄送人不能指定具体的用户、角色或部门。创建后不可修改",
293
+ hint: m ? "创建后不可修改" : "开启后所有机构都可发起,审批人与抄送人可以指定其他机构的用户或部门。创建后不可修改",
294
294
  children: /* @__PURE__ */ S(g, {
295
295
  checked: e.isShared,
296
296
  disabled: m,
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { globalCssVars as e } from "@vef-framework-react/components";
3
3
  import { jsx as t } from "@emotion/react/jsx-runtime";
4
4
  import { ApprovalFlowEditor as n } from "@vef-framework-react/approval-flow-editor";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useApprovalPlugins as e } from "../../../plugins/index.js";
3
3
  import { toFormContextSources as t } from "../../../plugins/form-context.js";
4
4
  import { useMemo as n } from "react";
@@ -22,7 +22,7 @@ var m = {
22
22
  table: "表单数据投影到按版本生成的独立表(明细表各自成表),适合复杂查询与数据分析。"
23
23
  };
24
24
  function h({ storageMode: h, initialSchema: g, registries: _, onStorageModeChange: v, onSchemaChange: y }) {
25
- let { dataSourceApis: b, dataSourceResolver: x, evaluators: S, formGlobals: C } = e(), w = n(() => t(C), [C]);
25
+ let { codeSets: b, dataSourceApis: x, dataSourceResolver: S, evaluators: C, formGlobals: w } = e(), T = n(() => t(w), [w]);
26
26
  return /* @__PURE__ */ u(a, {
27
27
  gap: 8,
28
28
  style: {
@@ -60,10 +60,11 @@ function h({ storageMode: h, initialSchema: g, registries: _, onStorageModeChang
60
60
  overflow: "hidden"
61
61
  },
62
62
  children: /* @__PURE__ */ l(d, {
63
- contextSources: w,
64
- dataSourceApis: b,
65
- dataSourceResolver: x,
66
- evaluators: S,
63
+ codeSets: b,
64
+ contextSources: T,
65
+ dataSourceApis: x,
66
+ dataSourceResolver: S,
67
+ evaluators: C,
67
68
  initialSchema: g,
68
69
  registries: _,
69
70
  validate: c,
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useCategoryApi as e } from "../../../api/category-api.js";
3
3
  import { useFlowApi as t } from "../../../api/flow-api.js";
4
4
  import { toEditorPlugins as n, useApprovalPlugins as r } from "../../../plugins/index.js";
@@ -99,13 +99,11 @@ function x({ flow: m, tenantId: x, onClose: S }) {
99
99
  }), K = d(() => k?.formSchema ? de(k.formSchema) : null, [k?.formSchema]), q = d(() => k?.formSchema ? g(k.formSchema, T.registries) : null, [k?.formSchema, T.registries]), J = d(() => k ? y(k.flowDefinition, {
100
100
  formFields: K?.formFields ?? [],
101
101
  assigneeKinds: W?.assignees,
102
- ccKinds: W?.ccs,
103
- shared: L
102
+ ccKinds: W?.ccs
104
103
  }) : [], [
105
104
  k,
106
105
  K,
107
- W,
108
- L
106
+ W
109
107
  ]), _e = d(() => ({
110
108
  ...n(T, K?.formFields ?? [], W),
111
109
  shared: L
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { initiatorsForSubmit as e } from "./types.js";
3
3
  import { Card as t, Descriptions as n, Flex as r, Input as i, Labeled as a, LabelsDisplay as o, Stack as s, Switch as c, Table as l, Tag as u, Text as d, globalCssVars as f } from "@vef-framework-react/components";
4
4
  import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  //#region src/pages/flow-page/designer/types.ts
3
3
  var e = {
4
4
  nodes: [],
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useCategoryApi as e } from "../../api/category-api.js";
3
3
  import { useFlowApi as t } from "../../api/flow-api.js";
4
4
  import { APPROVAL_PERMISSIONS as n } from "../../permissions.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { LabelFilterSelect as e, Select as t, useFormContext as n } from "@vef-framework-react/components";
3
3
  import { Fragment as r, jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
4
4
  //#region src/pages/flow-page/search.tsx
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useFlowApi as e } from "../../api/flow-api.js";
3
3
  import { formatTimestamp as t } from "../../components/format.js";
4
4
  import { VersionStatusTag as n } from "../../components/status/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { ApprovalAdminPage as e } from "./admin-page/index.js";
3
3
  import { ApprovalCategoryPage as t } from "./category-page/index.js";
4
4
  import { ApprovalDelegationPage as n } from "./delegation-page/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useMyApprovalApi as e } from "../../api/my-api.js";
3
3
  import { FlowIcon as t } from "../../components/icon.js";
4
4
  import { StartInstanceDrawer as n } from "./start-drawer.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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 { InstanceFormPanel as n } from "../../components/form-panel/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
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 { formatTimestamp as n } from "../../components/format.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { useMyApprovalApi as e } from "../../api/my-api.js";
3
3
  import { formatTimestamp as t } from "../../components/format.js";
4
4
  import { TaskStatusTag as n } from "../../components/status/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { INSTANCE_STATUS_OPTIONS as e, TASK_STATUS_LABELS as t } from "../../components/status/labels.js";
3
3
  import { Col as n, DatePicker as r, Labeled as i, Row as a, Select as o, useFormContext as s } from "@vef-framework-react/components";
4
4
  import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  //#region src/permissions.ts
3
3
  var e = {
4
4
  category: {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  //#region src/plugins/form-context.ts
3
3
  var e = [
4
4
  {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { createContext as e, use as t, useMemo as n, useState as r } from "react";
3
3
  import { createApprovalRegistries as i } from "@vef-framework-react/approval-form-bridge";
4
4
  import { jsx as a } from "@emotion/react/jsx-runtime";
@@ -26,6 +26,7 @@ function l() {
26
26
  function u(e, t, n) {
27
27
  return {
28
28
  pickers: e.pickers,
29
+ tenants: e.tenants,
29
30
  globalSubjects: e.globalSubjects,
30
31
  assigneeKinds: n?.assignees,
31
32
  ccKinds: n?.ccs,
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  //#region src/types/enums.ts
3
3
  var e = [
4
4
  "approved",
@@ -1,3 +1,3 @@
1
- /*! @vef-framework-react/approval v2.28.0 made by Venus | 2026-10-15T09:09:28.607Z */
1
+ /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
2
  import { BUILTIN_INITIATOR_KINDS as e, FINAL_INSTANCE_STATUSES as t, isFinalInstanceStatus as n } from "./enums.js";
3
3
  export { e as BUILTIN_INITIATOR_KINDS, t as FINAL_INSTANCE_STATUSES, n as isFinalInstanceStatus };
@@ -7,4 +7,4 @@ export { ApprovalProvider, toEditorPlugins, useApprovalPlugins } from './plugins
7
7
  export type { ApprovalPlugins, ApprovalProviderProps, ResolvedApprovalPlugins } from './plugins';
8
8
  export type { FormGlobalDefinition } from './plugins/form-context';
9
9
  export * from './types';
10
- export type { EditorPlugins, KindDescriptor, PickerProps, PrincipalKind, SelectionMode } from '@vef-framework-react/approval-flow-editor';
10
+ export type { EditorPlugins, KindDescriptor, PickerProps, PrincipalKind, SelectionMode, TenantOption } from '@vef-framework-react/approval-flow-editor';
@@ -1,5 +1,5 @@
1
- import { EditorPlugins, FormFieldDefinition, PickerProps } from '@vef-framework-react/approval-flow-editor';
2
- import { DataSourceApi, DataSourceResolver, DeviceRegistries, LinkageEvaluators } from '@vef-framework-react/form-editor';
1
+ import { EditorPlugins, FormFieldDefinition, PickerProps, TenantOption } from '@vef-framework-react/approval-flow-editor';
2
+ import { CodeSetDescriptor, DataSourceApi, DataSourceResolver, DeviceRegistries, LinkageEvaluators } from '@vef-framework-react/form-editor';
3
3
  import { FC, PropsWithChildren, ReactNode } from 'react';
4
4
  import { KindOptions } from '../types';
5
5
  import { FormGlobalDefinition } from './form-context';
@@ -21,6 +21,16 @@ export interface ApprovalPlugins {
21
21
  * input, so the pages stay functional without host wiring.
22
22
  */
23
23
  pickers?: Partial<Record<string, FC<PickerProps>>>;
24
+ /**
25
+ * The tenants a shared flow's rules can pick people from. A shared flow is
26
+ * offered to every tenant and routes work to people of other tenants than
27
+ * the one that starts it, so its designer picks a tenant first and then the
28
+ * users or departments of that tenant. Wire the `user` and `department`
29
+ * pickers to list the tenant they are handed (`PickerProps.tenantId`); roles
30
+ * and host catalogs are not per tenant. Without it a shared flow picks
31
+ * people through the plain pickers.
32
+ */
33
+ tenants?: TenantOption[];
24
34
  /**
25
35
  * Form field registries for rendering and designing approval forms.
26
36
  * Defaults to the approval profile from `approval-form-bridge`
@@ -60,6 +70,14 @@ export interface ApprovalPlugins {
60
70
  * listed here.
61
71
  */
62
72
  dataSourceApis?: DataSourceApi[];
73
+ /**
74
+ * The host's catalog of data dictionaries. The form designer's 数据字典
75
+ * option source then offers a searchable picker instead of a key typed by
76
+ * hand. A pick stores the key alone: forms load their dictionaries through
77
+ * the application's `AppContext.codeSetQueryFn`, which must serve every key
78
+ * listed here.
79
+ */
80
+ codeSets?: CodeSetDescriptor[];
63
81
  /**
64
82
  * Overrides for expression / script evaluation in form linkage and in
65
83
  * data-source parameters bound to the form. Optional: the form runtime falls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vef-framework-react/approval",
3
- "version": "2.28.0",
3
+ "version": "2.30.0",
4
4
  "private": false,
5
5
  "description": "Approval engine pages and runtime components for VEF framework",
6
6
  "keywords": [
@@ -44,12 +44,12 @@
44
44
  "@xyflow/react": "^12.11.1",
45
45
  "dayjs": "^1.11.0",
46
46
  "lucide-react": "^1.23.0",
47
- "@vef-framework-react/approval-form-bridge": "2.28.0",
48
- "@vef-framework-react/components": "2.28.0",
49
- "@vef-framework-react/form-editor": "2.28.0",
50
- "@vef-framework-react/core": "2.28.0",
51
- "@vef-framework-react/approval-flow-editor": "2.28.0",
52
- "@vef-framework-react/shared": "2.28.0"
47
+ "@vef-framework-react/approval-form-bridge": "2.30.0",
48
+ "@vef-framework-react/components": "2.30.0",
49
+ "@vef-framework-react/approval-flow-editor": "2.30.0",
50
+ "@vef-framework-react/core": "2.30.0",
51
+ "@vef-framework-react/form-editor": "2.30.0",
52
+ "@vef-framework-react/shared": "2.30.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "react": "^19.2.7"