@5minds/processcube_app_sdk 6.3.0-develop-99b52f-mc9028y7 → 7.0.0-feature-7b919e-md8tab3m
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/actions-3JRWY3XI.mjs +1 -0
- package/build/client/components/DropdownMenu.d.ts +2 -2
- package/build/client/components/DynamicUi/DynamicUi.d.ts +1 -1
- package/build/client/components/DynamicUi/FormFields/index.d.ts +5 -3
- package/build/client/components/ProcessInstanceInspector/ProcessInstanceInspector.d.ts +1 -1
- package/build/client/components/SplitterLayout.d.ts +1 -1
- package/build/client/index.cjs +9 -9
- package/build/client/index.mjs +10 -10
- package/build/common/index.cjs +1 -1
- package/build/common/index.mjs +1 -1
- package/build/server/index.cjs +1 -1
- package/build/server/index.mjs +3 -49
- package/package.json +31 -31
- package/build/client/actions-C6ZNF7JX.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use server";import{DataModels as C}from"@5minds/processcube_engine_client";import{DataModels as b}from"@5minds/processcube_engine_client";import{getToken as d}from"next-auth/jwt";import{ResponseCookies as k}from"next/dist/compiled/@edge-runtime/cookies";import{cookies as a,headers as y}from"next/headers";async function i(){let e=await d({req:{cookies:await a(),headers:await y()}});if(e?.expiresAt&&Date.now()>=e.expiresAt*1e3){let s=await fetch(`${process.env.NEXTAUTH_URL}/api/auth/session`,{method:"GET",headers:{"Content-Type":"application/json",cookie:(await a()).toString()}}),o=new k(s.headers);if(o.getAll().length){let p=!1;try{for(let c of o.getAll())(await a()).set(c.name,c.value,{...c})}catch{p=!0}if(e=await d({req:{cookies:p?o:await a(),headers:await y()}}),e?.error)throw e.error}}if(!e?.accessToken||!e?.sub)throw new Error("AccessToken or Sub could not be determined!");return{token:e?.accessToken,userId:e?.sub}}import{EngineClient as T}from"@5minds/processcube_engine_client";var h=process.env.PROCESSCUBE_ENGINE_URL??"http://localhost:10560",n=new T(h);async function r(){try{return i()}catch{return}}async function u(e){let t=await r();return(await n.processInstances.query({processInstanceId:e},{identity:t})).processInstances[0]}async function I(e,t={sortSettings:{sortBy:b.FlowNodeInstances.FlowNodeInstanceSortableColumns.createdAt,sortDir:"ASC"}}){return(await n.flowNodeInstances.query({processInstanceId:e},{...t,identity:t.identity??await r()})).flowNodeInstances}async function l(e){let t=await r();return(await n.flowNodeInstances.query({triggeredByFlowNodeInstance:e},{identity:t})).flowNodeInstances}async function f(e,t,s){let o=await r();await n.processInstances.retryProcessInstance(e,{flowNodeInstanceId:t,newStartToken:s,identity:o})}async function m(e){let t=await r();await n.processInstances.terminateProcessInstance(e,t)}async function w(...e){await n.manualTasks.finishManualTask(...e)}async function g(...e){await n.userTasks.finishUserTask(...e)}async function P(...e){await n.untypedTasks.finishTask(...e)}async function E(){try{return i()}catch{return}}var X=async(e,t)=>{let s=await E();t==="bpmn:UserTask"?await g(e,{},s):t==="bpmn:ManualTask"?await w(e,s):t==="bpmn:Task"?await P(e,s):console.error(`[@5minds/processcube_app_sdk:handlePlay] Unsupported flow node type: ${t}`)},z=async e=>{await m(e)},J=async(e,t,s)=>{await f(e,t,s)},K=async e=>u(e),V=async e=>I(e,{sortSettings:{sortBy:C.FlowNodeInstances.FlowNodeInstanceSortableColumns.createdAt,sortDir:"DESC"}}),W=async e=>l(e);export{X as finishTask,V as getFlowNodeInstances,K as getProcessInstance,W as getTriggeredFlowNodeInstances,J as retryProcess,z as terminateProcess};
|
|
@@ -4,8 +4,8 @@ export declare function DropdownMenu(props: {
|
|
|
4
4
|
collapsedIcon?: React.ReactNode;
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare function DropdownMenuItem(props: {
|
|
7
|
-
title: string | JSX.Element;
|
|
7
|
+
title: string | React.JSX.Element;
|
|
8
8
|
onClick: () => void | Promise<void>;
|
|
9
9
|
isDanger?: boolean;
|
|
10
10
|
className?: string;
|
|
11
|
-
}): JSX.Element;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -32,7 +32,7 @@ export declare function DynamicUi(props: PropsWithChildren<{
|
|
|
32
32
|
/** UserTaskInstance with a defined dynamic form */
|
|
33
33
|
task: DataModels.FlowNodeInstances.UserTaskInstance | UserTaskInstance;
|
|
34
34
|
/** Custom element to insert into the DynamicUI Headline */
|
|
35
|
-
headerComponent?: JSX.Element;
|
|
35
|
+
headerComponent?: React.JSX.Element;
|
|
36
36
|
/** Callback, that will be called when the form is submitted */
|
|
37
37
|
onSubmit: (result: UserTaskResult, rawFormData: FormData, task: UserTaskInstance) => Promise<void>;
|
|
38
38
|
/** Custom class name for the root element */
|
|
@@ -43,12 +43,14 @@ declare const UserTaskFormFieldType: {
|
|
|
43
43
|
color: MissingFormFieldType.color;
|
|
44
44
|
password: MissingFormFieldType.password;
|
|
45
45
|
custom: MissingFormFieldType.custom;
|
|
46
|
+
long: DataModels.FlowNodeInstances.UserTaskFormFieldType.long;
|
|
47
|
+
string: DataModels.FlowNodeInstances.UserTaskFormFieldType.string;
|
|
46
48
|
boolean: DataModels.FlowNodeInstances.UserTaskFormFieldType.boolean;
|
|
49
|
+
text: DataModels.FlowNodeInstances.UserTaskFormFieldType.string;
|
|
50
|
+
integer: DataModels.FlowNodeInstances.UserTaskFormFieldType.long;
|
|
51
|
+
number: DataModels.FlowNodeInstances.UserTaskFormFieldType.number;
|
|
47
52
|
date: DataModels.FlowNodeInstances.UserTaskFormFieldType.date;
|
|
48
53
|
enum: DataModels.FlowNodeInstances.UserTaskFormFieldType.enum;
|
|
49
|
-
long: DataModels.FlowNodeInstances.UserTaskFormFieldType.long;
|
|
50
|
-
number: DataModels.FlowNodeInstances.UserTaskFormFieldType.number;
|
|
51
|
-
string: DataModels.FlowNodeInstances.UserTaskFormFieldType.string;
|
|
52
54
|
};
|
|
53
55
|
type CommonFormFieldTypeComponentMap = {
|
|
54
56
|
[TFormFieldType in keyof typeof UserTaskFormFieldType]: DynamicUiFormFieldComponent;
|
|
@@ -23,6 +23,6 @@ type ProcessInstanceInspectorProps = {
|
|
|
23
23
|
* Displays a BPMN diagram with additional information about the process instance.
|
|
24
24
|
* The diagram is interactive and allows the user to inspect the flow node instances and navigate to related flow nodes.
|
|
25
25
|
*/
|
|
26
|
-
export declare function ProcessInstanceInspector(props: ProcessInstanceInspectorProps): string | number | bigint | true | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<React.
|
|
26
|
+
export declare function ProcessInstanceInspector(props: ProcessInstanceInspectorProps): string | number | bigint | true | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined>;
|
|
27
27
|
export declare const ProcessInstanceInspectorNextJS: React.ComponentType<ProcessInstanceInspectorProps>;
|
|
28
28
|
export {};
|