@vef-framework-react/approval 2.13.0 → 2.13.1

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 (61) hide show
  1. package/dist/cjs/components/timeline/index.cjs +1 -1
  2. package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
  3. package/dist/cjs/pages/flow-page/designer/review-step.cjs +1 -1
  4. package/dist/cjs/pages/flow-page/designer/types.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/detail/action-modals.js +1 -1
  14. package/dist/es/components/detail/admin.js +1 -1
  15. package/dist/es/components/detail/drawer.js +1 -1
  16. package/dist/es/components/detail/index.js +1 -1
  17. package/dist/es/components/flow-graph/index.js +1 -1
  18. package/dist/es/components/form-panel/index.js +1 -1
  19. package/dist/es/components/format.js +1 -1
  20. package/dist/es/components/icon.js +1 -1
  21. package/dist/es/components/index.js +1 -1
  22. package/dist/es/components/principal/index.js +1 -1
  23. package/dist/es/components/status/colors.js +1 -1
  24. package/dist/es/components/status/index.js +1 -1
  25. package/dist/es/components/status/labels.js +1 -1
  26. package/dist/es/components/timeline/index.js +15 -9
  27. package/dist/es/components/user/index.js +1 -1
  28. package/dist/es/index.js +1 -1
  29. package/dist/es/pages/admin-page/index.js +1 -1
  30. package/dist/es/pages/admin-page/instances.js +1 -1
  31. package/dist/es/pages/admin-page/metrics.js +1 -1
  32. package/dist/es/pages/admin-page/projections.js +1 -1
  33. package/dist/es/pages/admin-page/tasks.js +1 -1
  34. package/dist/es/pages/category-page/columns.js +1 -1
  35. package/dist/es/pages/category-page/form.js +1 -1
  36. package/dist/es/pages/category-page/index.js +1 -1
  37. package/dist/es/pages/delegation-page/columns.js +1 -1
  38. package/dist/es/pages/delegation-page/form.js +1 -1
  39. package/dist/es/pages/delegation-page/index.js +1 -1
  40. package/dist/es/pages/flow-page/columns.js +1 -1
  41. package/dist/es/pages/flow-page/designer/basic-step.js +1 -1
  42. package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
  43. package/dist/es/pages/flow-page/designer/form-step.js +1 -1
  44. package/dist/es/pages/flow-page/designer/index.js +134 -134
  45. package/dist/es/pages/flow-page/designer/review-step.js +40 -39
  46. package/dist/es/pages/flow-page/designer/types.js +5 -2
  47. package/dist/es/pages/flow-page/index.js +1 -1
  48. package/dist/es/pages/flow-page/search.js +1 -1
  49. package/dist/es/pages/flow-page/versions.js +1 -1
  50. package/dist/es/pages/index.js +1 -1
  51. package/dist/es/pages/initiate-page/index.js +1 -1
  52. package/dist/es/pages/initiate-page/start-drawer.js +1 -1
  53. package/dist/es/pages/my-instances-page/index.js +1 -1
  54. package/dist/es/pages/task-center-page/index.js +1 -1
  55. package/dist/es/permissions.js +1 -1
  56. package/dist/es/plugins/index.js +1 -1
  57. package/dist/es/types/enums.js +1 -1
  58. package/dist/es/types/index.js +1 -1
  59. package/dist/types/pages/flow-page/designer/types.d.ts +14 -0
  60. package/dist/types/types/detail.d.ts +6 -2
  61. package/package.json +7 -7
@@ -1 +1 @@
1
- const e=require("../status/labels.cjs"),t=require("../format.cjs"),n=require("../status/index.cjs"),r=require("../user/index.cjs");let i=require("@vef-framework-react/components"),a=require("@emotion/react/jsx-runtime");var o={active:`blue`,passed:`green`,rejected:`red`,returned:`orange`,canceled:`gray`};function s({opinion:e}){return(0,a.jsx)(`div`,{style:{padding:`4px 10px`,borderInlineStart:`3px solid ${i.globalCssVars.colorBorder}`,background:i.globalCssVars.colorFillQuaternary,borderRadius:4},children:(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm,whiteSpace:`pre-wrap`},children:e})})}function c({participant:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{user:e.user}),e.delegator&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`(受 ${e.delegator.name||e.delegator.id} 委托)`}),(0,a.jsx)(n.TaskStatusTag,{status:e.status}),e.isTimeout&&(0,a.jsx)(i.Tag,{color:`error`,children:`已超时`}),e.transferTo&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`转办给 ${e.transferTo.name||e.transferTo.id}`}),e.actionTime&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.actionTime)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function l(t){let n=[e.ACTIVITY_ACTION_LABELS[t.action]];t.transferTo&&n.push(`给 ${t.transferTo.name||t.transferTo.id}`),t.target&&n.push(`(${t.target.name||t.target.id})`),t.rollbackToNodeName&&n.push(`至「${t.rollbackToNodeName}」`);let r=[...t.addedAssignees??[],...t.removedAssignees??[],...t.ccUsers??[]];return r.length>0&&n.push(r.map(e=>e.name||e.id).join(`、`)),n.join(` `)}function u({activity:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{avatarSize:18,user:e.operator}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},children:l(e)}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.createdAt)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function d({recipients:e}){let n=e.filter(e=>e.readAt).length;return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`抄送`}),e.map(e=>(0,a.jsx)(i.Tooltip,{title:e.readAt?`已读 ${t.formatTimestamp(e.readAt)}`:`未读`,children:(0,a.jsx)(i.Tag,{color:e.readAt?`success`:`default`,style:{marginInlineEnd:0},children:e.user.name||e.user.id})},e.user.id)),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`已读 ${n}/${e.length}`})]})}function f(e){return e.kind===`withdraw`?`gray`:e.kind===`terminate`?`red`:e.status?o[e.status]:`gray`}function p(e){return e.kind===`withdraw`?`撤回`:e.kind===`terminate`?`终止`:e.name??``}function m({entry:e}){return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{strong:!0,children:p(e)}),(0,a.jsxs)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:[t.formatTimestamp(e.startedAt),e.finishedAt?` → ${t.formatTimestamp(e.finishedAt)}`:``]})]})}function h({entry:e}){let t=e.participants??[],n=e.activities??[],r=e.ccRecipients??[];return t.length===0&&n.length===0&&r.length===0?null:(0,a.jsxs)(i.Stack,{gap:8,children:[t.map(e=>(0,a.jsx)(c,{participant:e},e.taskId)),r.length>0&&(0,a.jsx)(d,{recipients:r}),n.map((e,t)=>(0,a.jsx)(u,{activity:e},t))]})}function g({timeline:e}){if(e.length===0)return(0,a.jsx)(i.Empty,{description:`暂无流转记录`});let t=e.map((e,t)=>({key:String(t),color:f(e),title:(0,a.jsx)(m,{entry:e}),content:(0,a.jsx)(h,{entry:e})}));return(0,a.jsx)(i.Timeline,{items:t,mode:`left`})}exports.InstanceTimeline=g;
1
+ const e=require("../status/labels.cjs"),t=require("../format.cjs"),n=require("../status/index.cjs"),r=require("../user/index.cjs");let i=require("@vef-framework-react/components"),a=require("@emotion/react/jsx-runtime");var o={active:`blue`,passed:`green`,rejected:`red`,returned:`orange`,canceled:`gray`};function s({opinion:e}){return(0,a.jsx)(`div`,{style:{padding:`4px 10px`,borderInlineStart:`3px solid ${i.globalCssVars.colorBorder}`,background:i.globalCssVars.colorFillQuaternary,borderRadius:4},children:(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm,whiteSpace:`pre-wrap`},children:e})})}function c({participant:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{user:e.user}),e.delegator&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`(受 ${e.delegator.name||e.delegator.id} 委托)`}),(0,a.jsx)(n.TaskStatusTag,{status:e.status}),e.isTimeout&&(0,a.jsx)(i.Tag,{color:`error`,children:`已超时`}),e.transferTo&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`转办给 ${e.transferTo.name||e.transferTo.id}`}),e.actionTime&&(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.actionTime)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function l(t){let n=[e.ACTIVITY_ACTION_LABELS[t.action]];t.transferTo&&n.push(`给 ${t.transferTo.name||t.transferTo.id}`),t.target&&n.push(`(${t.target.name||t.target.id})`),t.rollbackToNodeName&&n.push(`至「${t.rollbackToNodeName}」`);let r=[...t.addedAssignees??[],...t.removedAssignees??[],...t.ccUsers??[]];return r.length>0&&n.push(r.map(e=>e.name||e.id).join(`、`)),n.join(` `)}function u({activity:e}){return(0,a.jsxs)(i.Stack,{gap:4,children:[(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(r.UserLabel,{avatarSize:18,user:e.operator}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},children:l(e)}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:t.formatTimestamp(e.createdAt)})]}),e.opinion&&(0,a.jsx)(s,{opinion:e.opinion})]})}function d({recipients:e}){let n=e.filter(e=>e.readAt).length;return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`抄送`}),e.map(e=>(0,a.jsx)(i.Tooltip,{title:e.readAt?`已读 ${t.formatTimestamp(e.readAt)}`:`未读`,children:(0,a.jsx)(i.Tag,{color:e.readAt?`success`:`default`,style:{marginInlineEnd:0},children:e.user.name||e.user.id})},e.user.id)),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:`已读 ${n}/${e.length}`})]})}function f(e){return e.kind===`withdraw`?`gray`:e.kind===`terminate`?`red`:e.status?o[e.status]:`gray`}function p(e){return e.kind===`withdraw`?`撤回`:e.kind===`terminate`?`终止`:e.name??``}function m(e){let n=t.formatTimestamp(e.startedAt);if(!e.finishedAt)return n;let r=t.formatTimestamp(e.finishedAt);return r===n?n:`${n} → ${r}`}function h({entry:e}){return(0,a.jsxs)(i.Flex,{align:`center`,gap:`small`,wrap:`wrap`,children:[(0,a.jsx)(i.Text,{strong:!0,children:p(e)}),(0,a.jsx)(i.Text,{style:{fontSize:i.globalCssVars.fontSizeSm},type:`secondary`,children:m(e)})]})}function g({entry:e}){let t=e.participants??[],n=e.activities??[],r=e.ccRecipients??[];return t.length===0&&n.length===0&&r.length===0?null:(0,a.jsxs)(i.Stack,{gap:8,children:[t.map(e=>(0,a.jsx)(c,{participant:e},e.taskId)),r.length>0&&(0,a.jsx)(d,{recipients:r}),n.map((e,t)=>(0,a.jsx)(u,{activity:e},t))]})}function _({timeline:e}){if(e.length===0)return(0,a.jsx)(i.Empty,{description:`暂无流转记录`});let t=e.map((e,t)=>({key:String(t),color:f(e),title:(0,a.jsx)(h,{entry:e}),content:(0,a.jsx)(g,{entry:e})}));return(0,a.jsx)(i.Timeline,{items:t,mode:`left`})}exports.InstanceTimeline=_;
@@ -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("./review-step.cjs"),c=require("./types.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:c.createEmptyDraft(_)),[D,O]=(0,u.useState)(``),[k,A]=(0,u.useState)(!0),[j,M]=(0,u.useState)(!1),{data:N}=(0,l.useQuery)({queryFn:b.findTree,queryKey:[b.findTree.key,{}]}),P=(0,u.useMemo)(()=>r.buildCategoryTreeOptions(N??[]),[N]),{data:F}=(0,l.useQuery)({queryFn:y.findVersions,queryKey:[y.findVersions.key,{flowId:g?.id??``}],enabled:S}),I=F?.[0]?.id,{data:L}=(0,l.useQuery)({queryFn:y.getGraph,queryKey:[y.getGraph.key,{flowId:g?.id??``,versionId:I??``}],enabled:S&&I!==void 0}),{data:R}=(0,l.useQuery)({queryFn:y.findInitiators,queryKey:[y.findInitiators.key,{flowId:g?.id??``}],enabled:S});(0,u.useEffect)(()=>{if(!S||T!==null||F===void 0||R===void 0||F.length>0&&L===void 0)return;let e=L?.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:R.map(e=>({kind:e.kind,ids:e.ids})),storageMode:e?.storageMode??`json`,formSchema:e?.formSchema??null,flowDefinition:e?.flowSchema??c.EMPTY_FLOW_DEFINITION})},[S,T,F,L,R,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,W?.formFields??[]):[],[T,W]),q=(0,u.useMemo)(()=>n.toEditorPlugins(x,W?.formFields??[]),[x,W]),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,ee=[$.code.trim()!==``&&$.name.trim()!==``&&$.categoryId!==``&&$.instanceTitleTemplate.trim()!==``&&($.bindingMode!==`business`||c.isBindingValid($.businessBinding))&&($.isAllInitiationAllowed||T.initiators.some(e=>e.ids.length>0)),G===null||G.valid,K.length===0,!0][C]??!1;async function te(){M(!0);try{let e=$.bindingMode===`business`?$.businessBinding:void 0,t=Q.initiators.filter(e=>e.ids.length>0),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});k&&await U.mutateAsync({versionId:r.id}),(0,d.showSuccessMessage)(k?`流程已部署并发布`:`流程已部署为草稿版本`),v()}catch{}finally{M(!1)}}let ne=[(0,p.jsx)(i.BasicStep,{basic:$,categoryOptions:P,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)(s.ReviewStep,{draft:T,fields:W?.fields??[],publishNow:k,versionDescription:D,onPublishNowChange:A,onVersionDescriptionChange:O},`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:ne.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||j,onClick:()=>w(e=>e-1),children:`上一步`}),C<h.length-1?(0,p.jsx)(d.Button,{disabled:!ee,type:`primary`,onClick:()=>w(e=>e+1),children:`下一步`}):(0,p.jsx)(d.Button,{loading:j,type:`primary`,onClick:()=>void te(),children:k?`部署并发布`:`部署为草稿`})]})]})}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
+ 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,O]=(0,u.useState)(``),[k,A]=(0,u.useState)(!0),[j,M]=(0,u.useState)(!1),{data:N}=(0,l.useQuery)({queryFn:b.findTree,queryKey:[b.findTree.key,{}]}),P=(0,u.useMemo)(()=>r.buildCategoryTreeOptions(N??[]),[N]),{data:F}=(0,l.useQuery)({queryFn:y.findVersions,queryKey:[y.findVersions.key,{flowId:g?.id??``}],enabled:S}),I=F?.[0]?.id,{data:L}=(0,l.useQuery)({queryFn:y.getGraph,queryKey:[y.getGraph.key,{flowId:g?.id??``,versionId:I??``}],enabled:S&&I!==void 0}),{data:R}=(0,l.useQuery)({queryFn:y.findInitiators,queryKey:[y.findInitiators.key,{flowId:g?.id??``}],enabled:S});(0,u.useEffect)(()=>{if(!S||T!==null||F===void 0||R===void 0||F.length>0&&L===void 0)return;let e=L?.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:R.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,F,L,R,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,W?.formFields??[]):[],[T,W]),q=(0,u.useMemo)(()=>n.toEditorPlugins(x,W?.formFields??[]),[x,W]),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,ee=[$.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 te(){M(!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});k&&await U.mutateAsync({versionId:r.id}),(0,d.showSuccessMessage)(k?`流程已部署并发布`:`流程已部署为草稿版本`),v()}catch{}finally{M(!1)}}let ne=[(0,p.jsx)(i.BasicStep,{basic:$,categoryOptions:P,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:k,versionDescription:D,onPublishNowChange:A,onVersionDescriptionChange:O},`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:ne.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||j,onClick:()=>w(e=>e-1),children:`上一步`}),C<h.length-1?(0,p.jsx)(d.Button,{disabled:!ee,type:`primary`,onClick:()=>w(e=>e+1),children:`下一步`}):(0,p.jsx)(d.Button,{loading:j,type:`primary`,onClick:()=>void te(),children:k?`部署并发布`:`部署为草稿`})]})]})}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("@vef-framework-react/components"),t=require("@emotion/react/jsx-runtime");function n({draft:n,fields:r,versionDescription:i,publishNow:a,onVersionDescriptionChange:o,onPublishNowChange:s}){let{basic:c}=n,l=n.flowDefinition.nodes.length;return(0,t.jsxs)(e.Stack,{gap:16,style:{maxWidth:920,marginInline:`auto`,width:`100%`},children:[(0,t.jsx)(e.Card,{title:`流程设置`,children:(0,t.jsx)(e.Descriptions,{colon:!0,column:{xs:1,sm:2},size:`small`,items:[{key:`code`,label:`流程编码`,children:(0,t.jsx)(e.Text,{code:!0,children:c.code})},{key:`name`,label:`流程名称`,children:c.name},{key:`binding`,label:`业务绑定`,children:c.bindingMode===`business`?(0,t.jsx)(e.Tag,{color:`blue`,children:`业务表 ${c.businessBinding?.tableName??``}`}):(0,t.jsx)(e.Tag,{children:`独立存储`})},{key:`initiation`,label:`发起权限`,children:c.isAllInitiationAllowed?`所有人可发起`:`${n.initiators.length} 条发起规则`},{key:`labels`,label:`标签`,children:(0,t.jsx)(e.LabelsDisplay,{labels:c.labels})},{key:`storage`,label:`存储模式`,children:n.storageMode===`table`?`独立表存储`:`JSON 存储`}]})}),(0,t.jsx)(e.Card,{title:`表单字段(${r.length})`,children:r.length===0?(0,t.jsx)(e.Text,{type:`secondary`,children:`该流程未设计表单。`}):(0,t.jsx)(e.Table,{dataSource:r,pagination:!1,rowKey:`key`,size:`small`,columns:[{title:`字段键`,dataIndex:`key`,width:220,render:n=>(0,t.jsx)(e.Text,{code:!0,children:n})},{title:`名称`,dataIndex:`label`},{title:`类型`,dataIndex:`kind`,width:120,render:n=>(0,t.jsx)(e.Tag,{children:n})}]})}),(0,t.jsx)(e.Card,{title:`发布选项`,children:(0,t.jsxs)(e.Stack,{gap:12,children:[(0,t.jsx)(e.Text,{style:{fontSize:e.globalCssVars.fontSizeSm},type:`secondary`,children:`流程图共 ${l} 个节点。提交将保存流程设置并部署为新版本;发布后新发起的审批立即走新版本,进行中的实例仍沿用其原版本。`}),(0,t.jsx)(e.Labeled,{label:`版本说明`,children:(0,t.jsx)(e.Input.TextArea,{maxLength:500,placeholder:`本次变更说明(可选)`,rows:2,value:i,onChange:e=>o(e.target.value)})}),(0,t.jsxs)(e.Flex,{align:`center`,gap:`small`,children:[(0,t.jsx)(e.Switch,{checked:a,onChange:s}),(0,t.jsx)(e.Text,{children:`部署后立即发布`})]})]})})]})}exports.ReviewStep=n;
1
+ const e=require("./types.cjs");let t=require("@vef-framework-react/components"),n=require("@emotion/react/jsx-runtime");function r({draft:r,fields:i,versionDescription:a,publishNow:o,onVersionDescriptionChange:s,onPublishNowChange:c}){let{basic:l}=r,u=r.flowDefinition.nodes.length;return(0,n.jsxs)(t.Stack,{gap:16,style:{maxWidth:920,marginInline:`auto`,width:`100%`},children:[(0,n.jsx)(t.Card,{title:`流程设置`,children:(0,n.jsx)(t.Descriptions,{colon:!0,column:{xs:1,sm:2},size:`small`,items:[{key:`code`,label:`流程编码`,children:(0,n.jsx)(t.Text,{code:!0,children:l.code})},{key:`name`,label:`流程名称`,children:l.name},{key:`binding`,label:`业务绑定`,children:l.bindingMode===`business`?(0,n.jsx)(t.Tag,{color:`blue`,children:`业务表 ${l.businessBinding?.tableName??``}`}):(0,n.jsx)(t.Tag,{children:`独立存储`})},{key:`initiation`,label:`发起权限`,children:l.isAllInitiationAllowed?`所有人可发起`:`${e.initiatorsForSubmit(r).length} 条发起规则`},{key:`labels`,label:`标签`,children:(0,n.jsx)(t.LabelsDisplay,{labels:l.labels})},{key:`storage`,label:`存储模式`,children:r.storageMode===`table`?`独立表存储`:`JSON 存储`}]})}),(0,n.jsx)(t.Card,{title:`表单字段(${i.length})`,children:i.length===0?(0,n.jsx)(t.Text,{type:`secondary`,children:`该流程未设计表单。`}):(0,n.jsx)(t.Table,{dataSource:i,pagination:!1,rowKey:`key`,size:`small`,columns:[{title:`字段键`,dataIndex:`key`,width:220,render:e=>(0,n.jsx)(t.Text,{code:!0,children:e})},{title:`名称`,dataIndex:`label`},{title:`类型`,dataIndex:`kind`,width:120,render:e=>(0,n.jsx)(t.Tag,{children:e})}]})}),(0,n.jsx)(t.Card,{title:`发布选项`,children:(0,n.jsxs)(t.Stack,{gap:12,children:[(0,n.jsx)(t.Text,{style:{fontSize:t.globalCssVars.fontSizeSm},type:`secondary`,children:`流程图共 ${u} 个节点。提交将保存流程设置并部署为新版本;发布后新发起的审批立即走新版本,进行中的实例仍沿用其原版本。`}),(0,n.jsx)(t.Labeled,{label:`版本说明`,children:(0,n.jsx)(t.Input.TextArea,{maxLength:500,placeholder:`本次变更说明(可选)`,rows:2,value:a,onChange:e=>s(e.target.value)})}),(0,n.jsxs)(t.Flex,{align:`center`,gap:`small`,children:[(0,n.jsx)(t.Switch,{checked:o,onChange:c}),(0,n.jsx)(t.Text,{children:`部署后立即发布`})]})]})})]})}exports.ReviewStep=r;
@@ -1 +1 @@
1
- var e={nodes:[],edges:[]};function t(t){return{basic:{tenantId:t,code:``,name:``,categoryId:``,labels:{},bindingMode:`standalone`,adminUserIds:[],isAllInitiationAllowed:!1,instanceTitleTemplate:``},initiators:[],storageMode:`json`,formSchema:null,flowDefinition:e}}var n=/^[A-Z_]\w{0,62}$/i;function r(e){if(!e)return!1;let t=[e.tableName,...e.keyColumns,e.statusColumn,...e.instanceIdColumn===void 0?[]:[e.instanceIdColumn],...e.startedAtColumn!==void 0&&e.startedAtColumn!==``?[e.startedAtColumn]:[],...e.finishedAtColumn!==void 0&&e.finishedAtColumn!==``?[e.finishedAtColumn]:[]];return e.keyColumns.length>0&&e.instanceIdColumn!==void 0&&e.instanceIdColumn!==``&&t.every(e=>n.test(e))&&Object.values(e.statusMapping??{}).every(e=>e===void 0||e.trim()!==``)}exports.BUSINESS_IDENTIFIER_PATTERN=n,exports.EMPTY_FLOW_DEFINITION=e,exports.createEmptyDraft=t,exports.isBindingValid=r;
1
+ var e={nodes:[],edges:[]};function t(t){return{basic:{tenantId:t,code:``,name:``,categoryId:``,labels:{},bindingMode:`standalone`,adminUserIds:[],isAllInitiationAllowed:!1,instanceTitleTemplate:``},initiators:[],storageMode:`json`,formSchema:null,flowDefinition:e}}var n=/^[A-Z_]\w{0,62}$/i;function r(e){return e.basic.isAllInitiationAllowed?[]:e.initiators.filter(e=>e.ids.length>0)}function i(e){if(!e)return!1;let t=[e.tableName,...e.keyColumns,e.statusColumn,...e.instanceIdColumn===void 0?[]:[e.instanceIdColumn],...e.startedAtColumn!==void 0&&e.startedAtColumn!==``?[e.startedAtColumn]:[],...e.finishedAtColumn!==void 0&&e.finishedAtColumn!==``?[e.finishedAtColumn]:[]];return e.keyColumns.length>0&&e.instanceIdColumn!==void 0&&e.instanceIdColumn!==``&&t.every(e=>n.test(e))&&Object.values(e.statusMapping??{}).every(e=>e===void 0||e.trim()!==``)}exports.BUSINESS_IDENTIFIER_PATTERN=n,exports.EMPTY_FLOW_DEFINITION=e,exports.createEmptyDraft=t,exports.initiatorsForSubmit=r,exports.isBindingValid=i;
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { useAdminApprovalApi as e } from "../../api/admin-api.js";
3
3
  import { ACTIVITY_ACTION_LABELS as t } from "../status/labels.js";
4
4
  import { InstanceFlowGraphViewer as n } from "../flow-graph/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { NODE_PROGRESS_LABELS as e } from "../status/labels.js";
3
3
  import { useMemo as t } from "react";
4
4
  import { Icon as n, Tooltip as r, globalCssVars as i } from "@vef-framework-react/components";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { ACTIVITY_ACTION_LABELS as e, BINDING_PROJECTION_STATUS_LABELS as t, BINDING_PROJECTION_STATUS_OPTIONS as n, INSTANCE_STATUS_LABELS as r, INSTANCE_STATUS_OPTIONS as i, NODE_PROGRESS_LABELS as a, PROCESS_TASK_ACTION_LABELS as o, TASK_STATUS_LABELS as s, TASK_STATUS_OPTIONS as c, VERSION_STATUS_LABELS as l } from "./status/labels.js";
3
3
  import { InstanceFlowGraphViewer as u } from "./flow-graph/index.js";
4
4
  import { InstanceFormPanel as d } from "./form-panel/index.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { ACTIVITY_ACTION_LABELS as e } from "../status/labels.js";
3
3
  import { formatTimestamp as t } from "../format.js";
4
4
  import { TaskStatusTag as n } from "../status/index.js";
@@ -132,7 +132,13 @@ function b(e) {
132
132
  function x(e) {
133
133
  return e.kind === "withdraw" ? "撤回" : e.kind === "terminate" ? "终止" : e.name ?? "";
134
134
  }
135
- function S({ entry: e }) {
135
+ function S(e) {
136
+ let n = t(e.startedAt);
137
+ if (!e.finishedAt) return n;
138
+ let r = t(e.finishedAt);
139
+ return r === n ? n : `${n} → ${r}`;
140
+ }
141
+ function C({ entry: e }) {
136
142
  return /* @__PURE__ */ p(a, {
137
143
  align: "center",
138
144
  gap: "small",
@@ -140,14 +146,14 @@ function S({ entry: e }) {
140
146
  children: [/* @__PURE__ */ f(c, {
141
147
  strong: !0,
142
148
  children: x(e)
143
- }), /* @__PURE__ */ p(c, {
149
+ }), /* @__PURE__ */ f(c, {
144
150
  style: { fontSize: d.fontSizeSm },
145
151
  type: "secondary",
146
- children: [t(e.startedAt), e.finishedAt ? ` → ${t(e.finishedAt)}` : ""]
152
+ children: S(e)
147
153
  })]
148
154
  });
149
155
  }
150
- function C({ entry: e }) {
156
+ function w({ entry: e }) {
151
157
  let t = e.participants ?? [], n = e.activities ?? [], r = e.ccRecipients ?? [];
152
158
  return t.length === 0 && n.length === 0 && r.length === 0 ? null : /* @__PURE__ */ p(o, {
153
159
  gap: 8,
@@ -158,16 +164,16 @@ function C({ entry: e }) {
158
164
  ]
159
165
  });
160
166
  }
161
- function w({ timeline: e }) {
167
+ function T({ timeline: e }) {
162
168
  return e.length === 0 ? /* @__PURE__ */ f(i, { description: "暂无流转记录" }) : /* @__PURE__ */ f(l, {
163
169
  items: e.map((e, t) => ({
164
170
  key: String(t),
165
171
  color: b(e),
166
- title: /* @__PURE__ */ f(S, { entry: e }),
167
- content: /* @__PURE__ */ f(C, { entry: e })
172
+ title: /* @__PURE__ */ f(C, { entry: e }),
173
+ content: /* @__PURE__ */ f(w, { entry: e })
168
174
  })),
169
175
  mode: "left"
170
176
  });
171
177
  }
172
178
  //#endregion
173
- export { w as InstanceTimeline };
179
+ export { T as InstanceTimeline };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { useAdminApprovalApi as e } from "../../api/admin-api.js";
3
3
  import { INSTANCE_STATUS_OPTIONS as t } from "../../components/status/labels.js";
4
4
  import { formatTimestamp as n } from "../../components/format.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { useAdminApprovalApi as e } from "../../api/admin-api.js";
3
3
  import { BINDING_PROJECTION_STATUS_LABELS as t, INSTANCE_STATUS_LABELS as n, TASK_STATUS_LABELS as r } from "../../components/status/labels.js";
4
4
  import { formatDurationSeconds as i, formatTimestamp as a } from "../../components/format.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { useAdminApprovalApi as e } from "../../api/admin-api.js";
3
3
  import { BINDING_PROJECTION_STATUS_OPTIONS as t } from "../../components/status/labels.js";
4
4
  import { formatTimestamp as n } from "../../components/format.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { useAdminApprovalApi as e } from "../../api/admin-api.js";
3
3
  import { TASK_STATUS_OPTIONS as t } from "../../components/status/labels.js";
4
4
  import { formatTimestamp as n } from "../../components/format.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
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 { Button as n, Card as r, Collapse as i, Flex as a, Grid as o, Icon as s, IconPicker as c, Input as l, Labeled as u, LabelsEditor as d, Radio as f, Select as p, Stack as m, Switch as h, Text as g, TreeSelect as _, globalCssVars as v } from "@vef-framework-react/components";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { Alert as e, Stack as t, globalCssVars as n } from "@vef-framework-react/components";
3
3
  import { jsx as r, jsxs as i } from "@emotion/react/jsx-runtime";
4
4
  import { ApprovalFlowEditor as a } from "@vef-framework-react/approval-flow-editor";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.13.0 made by Venus | 2026-07-21T07:17:01.300Z */
1
+ /*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
2
2
  import { Alert as e, Flex as t, Segmented as n, Stack as r, Text as i, globalCssVars as a } from "@vef-framework-react/components";
3
3
  import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
4
4
  import { FormEditor as c } from "@vef-framework-react/form-editor";