hn-workflow-components 1.1.4 → 1.1.5
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.
|
@@ -38992,18 +38992,18 @@ const Pw = {
|
|
|
38992
38992
|
/* @__PURE__ */ I(uj, {})
|
|
38993
38993
|
] });
|
|
38994
38994
|
}), KF = Ye((e) => {
|
|
38995
|
-
const { materialUis: t, processKey: n, processName: r
|
|
38996
|
-
onSave:
|
|
38997
|
-
onPublish:
|
|
38998
|
-
onSelectMembers:
|
|
38999
|
-
onSelectRoles:
|
|
38995
|
+
const { materialUis: t, processKey: n, processName: r } = e, o = Ee({
|
|
38996
|
+
onSave: e.onSave,
|
|
38997
|
+
onPublish: e.onPublish,
|
|
38998
|
+
onSelectMembers: e.onSelectMembers,
|
|
38999
|
+
onSelectRoles: e.onSelectRoles
|
|
39000
39000
|
});
|
|
39001
|
-
return /* @__PURE__ */ I(Ew.Provider, { value:
|
|
39001
|
+
return /* @__PURE__ */ I(Ew.Provider, { value: o.current, children: /* @__PURE__ */ I(
|
|
39002
39002
|
cz,
|
|
39003
39003
|
{
|
|
39004
39004
|
materialUis: t,
|
|
39005
39005
|
processKey: n,
|
|
39006
|
-
children: /* @__PURE__ */ I(GF, {
|
|
39006
|
+
children: /* @__PURE__ */ I(GF, { processKey: n, processName: r })
|
|
39007
39007
|
}
|
|
39008
39008
|
) });
|
|
39009
39009
|
});
|
|
@@ -39037,19 +39037,23 @@ const YF = Ye((e) => {
|
|
|
39037
39037
|
style: { height: "100%" }
|
|
39038
39038
|
}
|
|
39039
39039
|
) });
|
|
39040
|
-
}), xB = Ye((e) =>
|
|
39041
|
-
|
|
39042
|
-
|
|
39043
|
-
|
|
39044
|
-
|
|
39045
|
-
|
|
39046
|
-
|
|
39047
|
-
|
|
39048
|
-
{
|
|
39049
|
-
|
|
39050
|
-
|
|
39051
|
-
|
|
39052
|
-
|
|
39040
|
+
}), xB = Ye((e) => {
|
|
39041
|
+
hw({
|
|
39042
|
+
baseURL: e.baseUrl,
|
|
39043
|
+
headers: e.customHeaders
|
|
39044
|
+
}), bw({
|
|
39045
|
+
key: e.processKey,
|
|
39046
|
+
name: e.processName
|
|
39047
|
+
});
|
|
39048
|
+
const { customHeaders: t, baseUrl: n, ...r } = e;
|
|
39049
|
+
return /* @__PURE__ */ I(_w, { children: /* @__PURE__ */ I(
|
|
39050
|
+
KF,
|
|
39051
|
+
{
|
|
39052
|
+
materialUis: Pw,
|
|
39053
|
+
...r
|
|
39054
|
+
}
|
|
39055
|
+
) });
|
|
39056
|
+
}), wB = Ye((e) => (hw({
|
|
39053
39057
|
baseURL: e.baseUrl,
|
|
39054
39058
|
headers: e.customHeaders
|
|
39055
39059
|
}), bw({
|
|
@@ -1358,4 +1358,4 @@ See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-sev
|
|
|
1358
1358
|
background-color: ${e=>{var t;return(t=e.theme.token)==null?void 0:t.colorBgBase}};
|
|
1359
1359
|
color: ${e=>{var t;return(t=e.theme.token)==null?void 0:t.colorText}};
|
|
1360
1360
|
height: 0;
|
|
1361
|
-
`,YF=C.memo(e=>{const{onSave:t}=Uc(),{className:n,processKey:r,processName:o,...i}=e,a=Ec(),s=vA(),l=bA(),[c,d]=C.useState(!1),f=C.useMemo(()=>[{label:"导入",key:"import",icon:O.jsx(AS,{}),onClick:l},{label:"导出",key:"export",icon:O.jsx(DS,{}),onClick:s}],[s,l]),m=async()=>{if(c)return!1;d(!0);const g={jsonBpmn:JSON.stringify(a),name:o,pic:"",processKey:r};if(t){await t(g),d(!1);return}try{const v=(await dz(JSON.stringify(g))).data;v.errorCode===0?(localStorage.setItem("startNode",JSON.stringify(a)),Lr.success("保存成功")):Lr.error(v.msg)}catch{Lr.error("保存失败")}finally{d(!1)}};return O.jsxs(XF,{className:K("workflow-editor",n||""),...i,children:[O.jsx(J9,{title:O.jsx(Or,{children:o}),actions:O.jsxs(Or,{children:[O.jsx(Nt,{type:"text",loading:c,icon:O.jsx(LS,{}),onClick:m,children:"保存"}),O.jsx(KF,{processKey:r,processName:o}),O.jsx(hp,{menu:{items:f},trigger:["click"],children:O.jsx(Nt,{icon:O.jsx(Ul,{})})})]})}),O.jsx(Sj,{})]})}),JF=C.memo(e=>{const{materialUis:t,processKey:n,processName:r
|
|
1361
|
+
`,YF=C.memo(e=>{const{onSave:t}=Uc(),{className:n,processKey:r,processName:o,...i}=e,a=Ec(),s=vA(),l=bA(),[c,d]=C.useState(!1),f=C.useMemo(()=>[{label:"导入",key:"import",icon:O.jsx(AS,{}),onClick:l},{label:"导出",key:"export",icon:O.jsx(DS,{}),onClick:s}],[s,l]),m=async()=>{if(c)return!1;d(!0);const g={jsonBpmn:JSON.stringify(a),name:o,pic:"",processKey:r};if(t){await t(g),d(!1);return}try{const v=(await dz(JSON.stringify(g))).data;v.errorCode===0?(localStorage.setItem("startNode",JSON.stringify(a)),Lr.success("保存成功")):Lr.error(v.msg)}catch{Lr.error("保存失败")}finally{d(!1)}};return O.jsxs(XF,{className:K("workflow-editor",n||""),...i,children:[O.jsx(J9,{title:O.jsx(Or,{children:o}),actions:O.jsxs(Or,{children:[O.jsx(Nt,{type:"text",loading:c,icon:O.jsx(LS,{}),onClick:m,children:"保存"}),O.jsx(KF,{processKey:r,processName:o}),O.jsx(hp,{menu:{items:f},trigger:["click"],children:O.jsx(Nt,{icon:O.jsx(Ul,{})})})]})}),O.jsx(Sj,{})]})}),JF=C.memo(e=>{const{materialUis:t,processKey:n,processName:r}=e,o=C.useRef({onSave:e.onSave,onPublish:e.onPublish,onSelectMembers:e.onSelectMembers,onSelectRoles:e.onSelectRoles});return O.jsx(Bx.Provider,{value:o.current,children:O.jsx(mz,{materialUis:t,processKey:n,children:O.jsx(YF,{processKey:n,processName:r})})})});function ZF(e){var n,r,o;const t={};return(n=e.completedNode)==null||n.forEach(i=>t[i]="completed"),(r=e.activityNode)==null||r.forEach(i=>t[i]="processing"),(o=e.pendingNode)==null||o.forEach(i=>t[i]="pending"),t}const QF=C.memo(e=>{const{materialUis:t}=e,[n,r]=C.useState({}),[o,i]=C.useState({});return C.useEffect(()=>{cz({processInstanceId:e.processKey}).then(a=>{const{jsonBpmn:s,taskNodeStatusInfo:l}=a.data.data;i(ZF(l)),r(s)})},[]),O.jsx("div",{style:{width:"100vw",height:"100vh",boxSizing:"border-box"},children:O.jsx(Wz,{workflowData:n,nodeStatuses:o,statusColors:{completed:"#52c41a",processing:"#faad14",...e.statusColors},materials:[],materialUis:t,defaultZoom:1,style:{height:"100%"}})})}),ek=C.memo(e=>{Tx({baseURL:e.baseUrl,headers:e.customHeaders}),Mx({key:e.processKey,name:e.processName});const{customHeaders:t,baseUrl:n,...r}=e;return O.jsx(pw,{children:O.jsx(JF,{materialUis:fw,...r})})}),tk=C.memo(e=>(Tx({baseURL:e.baseUrl,headers:e.customHeaders}),Mx({key:e.processKey}),O.jsx(pw,{children:O.jsx(QF,{materialUis:fw,statusColors:e.statusColors,...e})})));$n.WorkflowComponents=ek,$n.WorkflowViewerComponents=tk,Object.defineProperty($n,Symbol.toStringTag,{value:"Module"})}));
|