@nocobase/plugin-workflow-manual 1.2.12-alpha → 1.3.0-alpha.20240710084543
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/package.json +2 -2
- package/dist/client/WorkflowTodo.d.ts +0 -13
- package/dist/client/WorkflowTodoBlockInitializer.d.ts +0 -10
- package/dist/client/index.d.ts +0 -14
- package/dist/client/index.js +0 -22
- package/dist/client/instruction/AssigneesSelect.d.ts +0 -14
- package/dist/client/instruction/FormBlockInitializer.d.ts +0 -10
- package/dist/client/instruction/FormBlockProvider.d.ts +0 -10
- package/dist/client/instruction/ModeConfig.d.ts +0 -13
- package/dist/client/instruction/SchemaConfig.d.ts +0 -68
- package/dist/client/instruction/createManualFormBlockUISchema.d.ts +0 -65
- package/dist/client/instruction/forms/create.d.ts +0 -11
- package/dist/client/instruction/forms/custom.d.ts +0 -18
- package/dist/client/instruction/forms/update.d.ts +0 -11
- package/dist/client/instruction/index.d.ts +0 -99
- package/dist/client/instruction/utils.d.ts +0 -9
- package/dist/externalVersion.js +0 -29
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/locale/en-US.json +0 -30
- package/dist/locale/index.d.ts +0 -12
- package/dist/locale/index.js +0 -51
- package/dist/locale/ko_KR.json +0 -32
- package/dist/locale/zh-CN.json +0 -32
- package/dist/server/ManualInstruction.d.ts +0 -36
- package/dist/server/ManualInstruction.js +0 -164
- package/dist/server/Plugin.d.ts +0 -12
- package/dist/server/Plugin.js +0 -77
- package/dist/server/actions.d.ts +0 -10
- package/dist/server/actions.js +0 -113
- package/dist/server/collections/1-users_jobs.d.ts +0 -10
- package/dist/server/collections/1-users_jobs.js +0 -82
- package/dist/server/collections/2-jobs.d.ts +0 -14
- package/dist/server/collections/2-jobs.js +0 -49
- package/dist/server/collections/3-users.d.ts +0 -14
- package/dist/server/collections/3-users.js +0 -47
- package/dist/server/forms/create.d.ts +0 -14
- package/dist/server/forms/create.js +0 -50
- package/dist/server/forms/index.d.ts +0 -14
- package/dist/server/forms/index.js +0 -47
- package/dist/server/forms/update.d.ts +0 -15
- package/dist/server/forms/update.js +0 -50
- package/dist/server/index.d.ts +0 -9
- package/dist/server/index.js +0 -42
- package/dist/server/migrations/20240325213145-fix-schema.d.ts +0 -13
- package/dist/server/migrations/20240325213145-fix-schema.js +0 -98
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "工作流:人工处理节点",
|
|
5
5
|
"description": "Could be used for workflows which some of decisions are made by users.",
|
|
6
6
|
"description.zh-CN": "用于人工控制部分决策的流程。",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.3.0-alpha.20240710084543",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/workflow-manual",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@nocobase/test": "1.x",
|
|
31
31
|
"@nocobase/utils": "1.x"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "07a8b596fc64a9779a194cb9b0dc2ca7570ed9d4",
|
|
34
34
|
"keywords": [
|
|
35
35
|
"Workflow"
|
|
36
36
|
]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export declare const WorkflowTodo: React.FC & {
|
|
11
|
-
Drawer: React.FC;
|
|
12
|
-
Decorator: React.FC;
|
|
13
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { FC } from 'react';
|
|
10
|
-
export declare const WorkflowTodoBlockInitializer: FC<any>;
|
package/dist/client/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Plugin } from '@nocobase/client';
|
|
10
|
-
export default class extends Plugin {
|
|
11
|
-
afterAdd(): Promise<void>;
|
|
12
|
-
load(): Promise<void>;
|
|
13
|
-
addComponents(): void;
|
|
14
|
-
}
|
package/dist/client/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
(function(C,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react/jsx-runtime"),require("@formily/antd-v5"),require("@formily/core"),require("@formily/react"),require("antd"),require("react"),require("react-i18next"),require("@nocobase/utils/client"),require("lodash"),require("@ant-design/icons"),require("dayjs")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","@nocobase/plugin-workflow/client","react/jsx-runtime","@formily/antd-v5","@formily/core","@formily/react","antd","react","react-i18next","@nocobase/utils/client","lodash","@ant-design/icons","dayjs"],e):(C=typeof globalThis!="undefined"?globalThis:C||self,e(C["@nocobase/plugin-workflow-manual"]={},C["@nocobase/client"],C["@nocobase/plugin-workflow"],C.jsxRuntime,C["@formily/antd-v5"],C["@formily/core"],C["@formily/react"],C.antd,C.react,C["react-i18next"],C["@nocobase/utils"],C.lodash,C["@ant-design/icons"],C.dayjs))})(this,function(C,e,l,s,_,E,S,b,h,j,M,K,q,de){"use strict";var so=Object.defineProperty,io=Object.defineProperties;var ao=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var H=(C,e,l)=>e in C?so(C,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):C[e]=l,g=(C,e)=>{for(var l in e||(e={}))le.call(e,l)&&H(C,l,e[l]);if(G)for(var l of G(e))pe.call(e,l)&&H(C,l,e[l]);return C},k=(C,e)=>io(C,ao(e));var $=(C,e)=>{var l={};for(var s in C)le.call(C,s)&&e.indexOf(s)<0&&(l[s]=C[s]);if(C!=null&&G)for(var s of G(C))e.indexOf(s)<0&&pe.call(C,s)&&(l[s]=C[s]);return l};var P=(C,e,l)=>(H(C,typeof e!="symbol"?e+"":e,l),l);var U=(C,e,l)=>new Promise((s,_)=>{var E=h=>{try{b(l.next(h))}catch(j){_(j)}},S=h=>{try{b(l.throw(h))}catch(j){_(j)}},b=h=>h.done?s(h.value):Promise.resolve(h.value).then(E,S);b((l=l.apply(C,e)).next())});const y="workflow-manual";function T(o,r={}){const{t:n}=L(r);return n(o)}function L(o){return j.useTranslation(y,o)}function X(o){var D,N;const r=e.useRecord(),n=S.useFieldSchema(),t=S.useField(),i=h.useRef(null),a=o.dataSource||e.DEFAULT_DATA_SOURCE_KEY,{token:u}=b.theme.useToken(),{getAssociationAppends:d}=e.useAssociationNames(a),{appends:p,updateAssociationValues:m}=d(),[f]=Object.keys((D=n.toJSON().properties)!=null?D:{}),c=(N=r==null?void 0:r.result)==null?void 0:N[f];e.useDesignable();const x=h.useMemo(()=>E.createForm({initialValues:c}),[c]),F=h.useMemo(()=>g({appends:p},o.params),[p,o.params]),v=h.useMemo(()=>({loading:!1,data:{data:c}}),[c]),w=e.useAPIClient(),I=e.useDataSourceHeaders(a),B=w.resource(o.collection,void 0,I),A=e.useBlockRequestContext(),O=h.useMemo(()=>({params:F,form:x,field:t,service:v,updateAssociationValues:m,formBlockRef:i}),[t,x,F,v,m]);return!r.status||c?s.jsx(e.CollectionManagerProvider,{dataSource:a,children:s.jsx(e.CollectionProvider_deprecated,{collection:o.collection,children:s.jsx(e.RecordProvider,{record:c,parent:null,children:s.jsx(e.FormActiveFieldsProvider,{name:"form",children:s.jsx(e.BlockRequestContext_deprecated.Provider,{value:{block:"form",props:o,field:t,service:v,resource:B,__parent:A},children:s.jsxs(e.FormBlockContext.Provider,{value:O,children:[s.jsx(e.FormV2.Templates,{style:{marginBottom:u.margin},form:x}),s.jsx("div",{ref:i,children:o.children})]})})})})})}):null}function ue(o){return e.createFormBlockSchema(o)}function me(n){var t=n,{schema:o}=t,r=$(t,["schema"]);const{getTemplateSchemaByMode:i}=e.useSchemaTemplateManager(),{insert:a}=e.useSchemaInitializer(),u=e.useRecordCollectionDataSourceItems("FormItem");function d(m){return U(this,arguments,function*({item:p}){var v;const f=p.template?yield i(p):null,c=ue(k(g({actionInitializers:"workflowManual:form:configureActions",actions:{resolve:{type:"void",title:`{{t("Continue the process", { ns: "${y}" })}}`,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:l.JOB_STATUS.RESOLVED},"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useSubmit }}"},"x-designer":"ManualActionDesigner","x-designer-props":{}}}},o),{template:f}));delete c["x-acl-action-props"],delete c["x-acl-action"];const[x]=Object.keys(c.properties),F=((v=Object.entries(c.properties[x].properties).find(([w,I])=>I["x-component"]==="ActionBar"))==null?void 0:v[0])||"actions";c.properties[x].properties[F]["x-decorator"]="ActionBarProvider",c.properties[x].properties[F]["x-component-props"].style={marginTop:"1.5em",flexWrap:"wrap"},l.traverseSchema(c,w=>{w["x-uid"]&&delete w["x-uid"]}),a(c)})}return s.jsx(e.SchemaInitializerItem,k(g({},r),{onClick:d,items:u}))}function Z(){var r,n;const o=e.useSchemaInitializerItem();return s.jsx(e.CollectionProvider_deprecated,{dataSource:(r=o.schema)==null?void 0:r.dataSource,collection:(n=o.schema)==null?void 0:n.collection,children:s.jsx(me,g({},o))})}function V(o,r,n=!1){const t=[];return o?r(o)&&(!n||!o.properties)?(t.push(o),t):(o.properties&&Object.keys(o.properties).forEach(i=>{t.push(...V(o.properties[i],r))}),t):t}function fe(){const{name:o,title:r}=e.useCollection_deprecated();return s.jsxs(e.GeneralSchemaDesigner,{title:r||o,children:[s.jsx(e.SchemaSettingsBlockTitleItem,{}),s.jsx(e.SchemaSettingsLinkageRules,{collectionName:o}),s.jsx(e.SchemaSettingsDataTemplates,{collectionName:o}),s.jsx(e.SchemaSettingsDivider,{}),s.jsx(e.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})}const he={title:`{{t("Create record form", { ns: "${y}" })}}`,config:{useInitializer({allCollections:o}){const r=h.useMemo(()=>o.map(({key:a,displayName:u,collections:d})=>({key:a,name:a,label:u,type:"subMenu",children:d.map(p=>({name:K.camelCase(`createRecordForm-child-${p.name}`),type:"item",title:p.title||p.tableName,schema:{collection:p.name,dataSource:a,title:`{{t("Create record", { ns: "${y}" })}}`,formType:"create","x-designer":"CreateFormDesigner"},Component:Z}))})),[o]),[n,t]=h.useState([]),i=e.useMenuSearch({data:r,openKeys:n});return{name:"createRecordForm",key:"createRecordForm",type:"subMenu",title:`{{t("Create record form", { ns: "${y}" })}}`,componentProps:{onOpenChange(a){t(a)}},children:i}},initializers:{},components:{CreateFormDesigner:fe},parseFormOptions(o){const r={};return V(o,t=>t["x-decorator"]==="FormBlockProvider"&&t["x-decorator-props"].formType==="create").forEach(t=>{var d,p;const[i]=Object.keys(t.properties),a=t.properties[i],u=((d=Object.entries(a.properties).find(([m,f])=>f["x-component"]==="ActionBar"))==null?void 0:d[0])||"actions";r[i]={type:"create",title:((p=t["x-component-props"])==null?void 0:p.title)||i,actions:V(a.properties[u],m=>m["x-component"]==="Action").map(m=>{var f,c;return{status:m["x-decorator-props"].value,values:(c=(f=m["x-action-settings"])==null?void 0:f.assignedValues)==null?void 0:c.values,key:m.name}}),collection:t["x-decorator-props"].collection}}),r}},block:{scope:{},components:{}}};function W(o){var m,f,c,x;const[r,n]=h.useState((f=(m=o.collection)==null?void 0:m.fields)!=null?f:[]),t=e.useRecord(),i=S.useField(),a=S.useFieldSchema(),[u]=Object.keys((c=a.toJSON().properties)!=null?c:{}),d=(x=t==null?void 0:t.result)==null?void 0:x[u],p=h.useMemo(()=>E.createForm({initialValues:d}),[d]);return!t.status||d?s.jsx(e.CollectionProvider_deprecated,{collection:k(g({},o.collection),{fields:r}),children:s.jsx(e.RecordProvider,{record:d,parent:null,children:s.jsx(e.FormBlockContext.Provider,{value:{form:p,field:i,setCollectionFields:n},children:o.children})})}):null}function xe(){const{insert:o}=e.useSchemaInitializer(),r=e.useSchemaInitializerItem();return s.jsx(e.SchemaInitializerItem,k(g({},r),{onClick:()=>{o({type:"void","x-decorator":"CustomFormBlockProvider","x-decorator-props":{collection:{name:M.uid(),fields:[]}},"x-component":"CardItem","x-component-props":{title:'{{t("Form")}}'},"x-designer":"SimpleDesigner","x-designer-props":{type:"customForm"},properties:{[M.uid()]:{type:"void","x-component":"FormV2","x-use-component-props":"useFormBlockProps",properties:{grid:{type:"void","x-component":"Grid","x-initializer":"workflowManual:customForm:configureFields"},actions:{type:"void","x-decorator":"ActionBarProvider","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{marginTop:"1.5em",flexWrap:"wrap"}},"x-initializer":"workflowManual:form:configureActions",properties:{resolve:{type:"void",title:`{{t("Continue the process", { ns: "${y}" })}}`,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:l.JOB_STATUS.RESOLVED},"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useSubmit }}"},"x-designer":"ManualActionDesigner"}}}}}}})}}))}const R={basic:'{{t("Basic")}}',choices:'{{t("Choices")}}',media:'{{t("Media")}}',datetime:'{{t("Date & Time")}}',relation:'{{t("Relation")}}',advanced:'{{t("Advanced type")}}',systemInfo:'{{t("System info")}}',others:'{{t("Others")}}'};function Ce(o){const r={};return Object.keys(o).forEach(n=>{const t=o[n],{group:i="others"}=t;r[i]=r[i]||{},K.set(r,[i,n],t)}),Object.keys(R).filter(n=>["basic","choices","datetime","media"].includes(n)).map(n=>({title:R[n],children:Object.keys(r[n]||{}).map(t=>{const i=r[n][t];return g({value:t,title:i.title,name:t},r[n][t])}).sort((t,i)=>t.order-i.order)}))}function ge(){const{interfaces:o}=e.useCollectionManager_deprecated();return Ce(o).map(n=>({name:n.title,type:"itemGroup",title:n.title,children:n.children.map(t=>({name:t.name,type:"item",title:t.title,Component:ve,fieldInterface:t.name}))}))}const Y=h.createContext({});function ye(){const{values:o,query:r,reset:n}=S.useForm(),t=[T("Field name existed in form")],{collection:i,interfaceOptions:a,setCollectionFields:u,insert:d,setCallback:p,setInterface:m}=h.useContext(Y);return{run(){return U(this,null,function*(){var w,I,B,A;const{default:c}=a,x=M.uid();if(c.name=(w=o.name)!=null?w:x,c.uiSchema.title=(B=(I=o.uiSchema)==null?void 0:I.title)!=null?B:x,c.interface=a.name,(A=i.fields)==null?void 0:A.find(O=>O.name===c.name)){r("name").take().setFeedback({type:"error",messages:t});return}const v=M.merge(c,o);u([...i.fields,v]),d({name:c.name,type:c.uiSchema.type,"x-decorator":"FormItem","x-component":"CollectionField","x-component-props":{field:v},"x-collection-field":`${i.name}.${c.name}`,"x-toolbar":"FormItemSchemaToolbar","x-settings":"fieldSettings:FormItem"}),n(),p(null),m(null)})}}}const be=o=>{const[r,n]=h.useState(null),[t,i]=h.useState(),a=ge(),u=e.useCollection_deprecated(),{setCollectionFields:d}=h.useContext(e.FormBlockContext),p=h.useMemo(()=>E.createForm(),[]);return s.jsxs(Y.Provider,{value:{collection:u,insert:t,interfaceOptions:r,onAddField(m){const f=K.pick(m,["name","group","title","default","validateSchema"]),{properties:B}=m,A=B,{unique:c,type:x,layout:F,autoIncrement:v}=A,w=$(A,["unique","type","layout","autoIncrement"]);f.properties=w;const I=K.cloneDeep(f);delete I.properties.name["x-disabled"],n(I)},setCallback:i,setInterface:n,setCollectionFields:d},children:[s.jsx(e.SchemaInitializerItems,k(g({},o),{items:a})),s.jsx(e.ActionContextProvider,{value:{visible:!!r,setVisible(m){m||n(null)}},children:r?s.jsx(e.SchemaComponent,{schema:{type:"void",name:"drawer",title:'{{t("Configure field")}}',"x-decorator":"FormV2","x-decorator-props":{form:p},"x-component":"Action.Drawer",properties:k(g({},r.properties),{footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{type:"void",title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction(){const m=S.useForm();return{run(){return U(this,null,function*(){i(null),n(null),m.reset()})}}}}},submit:{type:"void",title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:ye}}}}})},components:{ArrayTable:_.ArrayTable}}):null})]})},ee={wrap:e.gridRowColWrap,insertPosition:"beforeEnd",title:"{{t('Configure fields')}}",ItemsComponent:be},oe=new e.CompatibleSchemaInitializer(g({name:"AddCustomFormField"},ee)),Se=new e.CompatibleSchemaInitializer(g({name:"workflowManual:customForm:configureFields"},ee),oe);function ve(){const o=e.useSchemaInitializerItem(),{insert:r}=e.useSchemaInitializer(),{onAddField:n,setCallback:t}=h.useContext(Y),{getInterface:i}=e.useCollectionManager_deprecated(),a=i(o.fieldInterface);return s.jsx(e.SchemaInitializerItem,g({onClick:()=>{t(()=>r),n(a)}},o),o.fieldInterface)}const Fe={title:`{{t("Custom form", { ns: "${y}" })}}`,config:{useInitializer(){return{name:"customForm",type:"item",title:`{{t("Custom form", { ns: "${y}" })}}`,Component:xe}},initializers:{},components:{CustomFormBlockProvider:W},parseFormOptions(o){const r={};return V(o,t=>t["x-decorator"]==="CustomFormBlockProvider").forEach(t=>{var p,m;const[i]=Object.keys(t.properties),a=t.properties[i],u=V(a.properties.grid,f=>f["x-component"]==="CollectionField",!0);t["x-decorator-props"].collection.fields=u.map(f=>{var c,x;return(x=(c=f["x-component-props"])==null?void 0:c.field)!=null?x:f["x-interface-options"]});const d=((p=Object.entries(a.properties).find(([f,c])=>c["x-component"]==="ActionBar"))==null?void 0:p[0])||"actions";r[i]={type:"custom",title:((m=t["x-component-props"])==null?void 0:m.title)||i,actions:V(a.properties[d],f=>f["x-component"]==="Action").map(f=>{var c,x;return{status:f["x-decorator-props"].value,values:(x=(c=f["x-action-settings"])==null?void 0:c.assignedValues)==null?void 0:x.values,key:f.name}}),collection:t["x-decorator-props"].collection}}),r}},block:{scope:{},components:{CustomFormBlockProvider:W}}};function ke(){const{name:o,title:r}=e.useCollection_deprecated(),n=S.useFieldSchema(),{t}=j.useTranslation(),{dn:i}=e.useDesignable();return s.jsxs(e.GeneralSchemaDesigner,{title:r||o,children:[s.jsx(e.SchemaSettingsBlockTitleItem,{}),s.jsx(e.SchemaSettingsActionModalItem,{title:t("Filter settings",{ns:y}),schema:{name:"filter",type:"object",title:'{{t("Filter")}}',"x-component":"Filter","x-use-component-props":()=>{var u;return{options:e.useCollectionFilterOptions((u=n==null?void 0:n["x-decorator-props"])==null?void 0:u.collection)}},"x-component-props":{dynamicComponent:"FilterDynamicComponent"}},initialValues:n==null?void 0:n["x-decorator-props"],onSubmit:({filter:a})=>{n["x-decorator-props"].filter=a,i.emit("patch",{schema:{"x-decorator-props":n["x-decorator-props"]}}),i.refresh()}}),s.jsx(e.SchemaSettingsLinkageRules,{collectionName:o}),s.jsx(e.SchemaSettingsDivider,{}),s.jsx(e.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})}const we={title:`{{t("Update record form", { ns: "${y}" })}}`,config:{useInitializer({allCollections:o}){const r=h.useMemo(()=>o.map(({key:a,displayName:u,collections:d})=>({key:a,name:a,label:u,type:"subMenu",children:d.map(p=>({name:K.camelCase(`updateRecordForm-child-${p.name}`),type:"item",title:p.title||p.tableName,schema:{collection:p.name,dataSource:a,title:`{{t("Update record", { ns: "${y}" })}}`,formType:"update","x-designer":"UpdateFormDesigner"},Component:Z}))})),[o]),[n,t]=h.useState([]),i=e.useMenuSearch({data:r,openKeys:n});return{name:"updateRecordForm",key:"updateRecordForm",type:"subMenu",title:`{{t("Update record form", { ns: "${y}" })}}`,componentProps:{onOpenChange(a){t(a)}},children:i}},initializers:{},components:{FilterDynamicComponent:l.FilterDynamicComponent,UpdateFormDesigner:ke},parseFormOptions(o){const r={};return V(o,t=>t["x-decorator"]==="FormBlockProvider"&&t["x-decorator-props"].formType==="update").forEach(t=>{var d,p;const[i]=Object.keys(t.properties),a=t.properties[i],u=((d=Object.entries(a.properties).find(([m,f])=>f["x-component"]==="ActionBar"))==null?void 0:d[0])||"actions";r[i]=k(g({},t["x-decorator-props"]),{type:"update",title:((p=t["x-component-props"])==null?void 0:p.title)||i,actions:V(a.properties[u],m=>m["x-component"]==="Action").map(m=>{var f,c;return{status:m["x-decorator-props"].value,values:(c=(f=m["x-action-settings"])==null?void 0:f.assignedValues)==null?void 0:c.values,key:m.name}})})}),r}},block:{scope:{},components:{}},validate({filter:o}){return!o||!M.isValidFilter(o)?"Please check one of your update record form, and add at least one filter condition in form settings.":null}},z=new M.Registry;z.register("custom",Fe),z.register("create",he),z.register("update",we);function Ie(){const{workflow:o}=l.useFlowContext(),r=l.useTrigger();return r.useInitializers?r.useInitializers(o.config):null}const te={wrap:e.gridRowColWrap,title:'{{t("Add block")}}',items:[{type:"itemGroup",name:"dataBlocks",title:'{{t("Data blocks")}}',hideIfNoChildren:!0,useChildren(){const o=e.usePlugin(l),r=l.useNodeContext(),n=l.useAvailableUpstreams(r),t=[Ie()].filter(Boolean),i=n.map(u=>{var p;const d=o.instructions.get(u.type);return(p=d==null?void 0:d.useInitializers)==null?void 0:p.call(d,u)}).filter(Boolean);return[...t,...i.length?[{name:"nodes",type:"subMenu",title:`{{t("Node result", { ns: "${y}" })}}`,children:i}]:[]].filter(Boolean)}},{type:"itemGroup",name:"form",title:'{{t("Form")}}',useChildren(){const r=e.useDataSourceManager().getAllCollections();return Array.from(z.getValues()).map(n=>{const{useInitializer:t}=n.config;return t({allCollections:r})})}},{type:"itemGroup",name:"otherBlocks",title:'{{t("Other blocks")}}',children:[{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"}]}]},ne=new e.CompatibleSchemaInitializer(g({name:"AddBlockButton"},te)),Ae=new e.CompatibleSchemaInitializer(g({name:"workflowManual:popup:configureUserInterface:addBlock"},te),ne);function Te(){var B,A,O;const o=h.useContext(e.SchemaComponentContext),{t:r}=j.useTranslation(),{t:n}=L(),t=S.useFieldSchema(),i=l.useWorkflowVariableOptions(),[a,u]=h.useState(!1),[d,p]=h.useState((O=(A=(B=t==null?void 0:t["x-action-settings"])==null?void 0:B.assignedValues)==null?void 0:A.schema)!=null?O:{type:"void","x-component":"Grid","x-initializer":"assignFieldValuesForm:configureFields",properties:{}}),[m,f]=h.useState(null),{components:c}=e.useSchemaOptionsContext();h.useEffect(()=>{f(new S.Schema({properties:{grid:d}}))},[d]);const x=h.useMemo(()=>{var N,J;const D=(J=(N=t==null?void 0:t["x-action-settings"])==null?void 0:N.assignedValues)==null?void 0:J.values;return E.createForm({initialValues:M.lodash.cloneDeep(D),values:M.lodash.cloneDeep(D)})},[t]),F=e.useFormActiveFields(),v=r("Assign field values");function w(){u(!1)}function I(){t["x-action-settings"]||(t["x-action-settings"]={}),t["x-action-settings"].assignedValues||(t["x-action-settings"].assignedValues={}),t["x-action-settings"].assignedValues.schema=d,t["x-action-settings"].assignedValues.values=x.values,u(!1),setTimeout(()=>{var D;(D=o.refresh)==null||D.call(o)},300)}return s.jsxs(s.Fragment,{children:[s.jsx(e.SchemaSettingsItem,{title:v,onClick:()=>u(!0),children:v}),s.jsx(b.Modal,{width:"50%",title:v,open:a,onCancel:w,footer:s.jsxs(b.Space,{children:[s.jsx(b.Button,{onClick:w,children:n("Cancel")}),s.jsx(b.Button,{type:"primary",onClick:I,children:n("Submit")})]}),children:s.jsx(e.DefaultValueProvider,{isAllowToSetDefaultValue:()=>!1,children:s.jsx(e.VariableScopeProvider,{scope:i,children:s.jsx(e.FormActiveFieldsProvider,{name:"form",getActiveFieldsName:F==null?void 0:F.getActiveFieldsName,children:s.jsx(S.FormProvider,{form:x,children:s.jsxs(_.FormLayout,{layout:"vertical",children:[s.jsx(b.Alert,{message:n("Values preset in this form will override user submitted ones when continue or reject.")}),s.jsx("br",{}),a&&m&&s.jsx(e.SchemaComponentContext.Provider,{value:k(g({},o),{refresh(){p(M.lodash.get(m.toJSON(),"properties.grid"))}}),children:s.jsx(e.SchemaComponent,{schema:m,components:c})})]})})})})})})]})}function Be(o){return s.jsxs(e.GeneralSchemaDesigner,k(g({},o),{disableInitializer:!0,children:[s.jsx(e.Action.Designer.ButtonEditor,{}),s.jsx(Te,{}),s.jsx(e.SchemaSettingsDivider,{}),s.jsx(e.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"ActionBar"}})]}))}function Me(){const a=e.useSchemaInitializerItem(),{action:r,actionProps:n}=a,t=$(a,["action","actionProps"]),{insert:i}=e.useSchemaInitializer();return s.jsx(e.SchemaInitializerItem,k(g({},t),{onClick:()=>{i({type:"void",title:t.title,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:r},"x-component":"Action","x-component-props":k(g({},n),{useAction:"{{ useSubmit }}"}),"x-designer":"ManualActionDesigner","x-action-settings":{}})}}))}function re(){const o=e.useSchemaInitializerItem(),i=o,{action:r,actionProps:n}=i,t=$(i,["action","actionProps"]);return s.jsx(e.InitializerWithSwitch,k(g({},t),{item:o,schema:{type:"void",title:t.title,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:r},"x-component":"Action","x-component-props":k(g({},n),{useAction:"{{ useSubmit }}"}),"x-designer":"Action.Designer","x-action":`${r}`},type:"x-action"}))}const se={title:'{{t("Configure actions")}}',items:[{name:"jobStatusResolved",title:`{{t("Continue the process", { ns: "${y}" })}}`,Component:Me,action:l.JOB_STATUS.RESOLVED,actionProps:{type:"primary"}},{name:"jobStatusRejected",title:`{{t("Terminate the process", { ns: "${y}" })}}`,Component:re,action:l.JOB_STATUS.REJECTED,actionProps:{danger:!0}},{name:"jobStatusPending",title:`{{t("Save temporarily", { ns: "${y}" })}}`,Component:re,action:l.JOB_STATUS.PENDING}]},ie=new e.CompatibleSchemaInitializer(g({name:"AddActionButton"},se)),Oe=new e.CompatibleSchemaInitializer(g({name:"workflowManual:form:configureActions"},se),ie);function ze(){return{run(){}}}function De({value:o,onChange:r}){const n=e.usePlugin(l),t=h.useContext(e.SchemaComponentContext),i=l.useNodeContext(),a=l.useAvailableUpstreams(i),u=S.useForm(),{workflow:d}=l.useFlowContext(),p={};a.forEach(c=>{const x=n.instructions.get(c.type);Object.assign(p,x.components)});const m=h.useMemo(()=>new S.Schema({properties:{drawer:{type:"void",title:`{{t("User interface", { ns: "${y}" })}}`,"x-decorator":"Form","x-component":"Action.Drawer","x-component-props":{className:e.css`
|
|
11
|
-
.ant-drawer-body {
|
|
12
|
-
background: var(--nb-box-bg);
|
|
13
|
-
}
|
|
14
|
-
`},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab","x-initializer-props":{gridInitializer:"workflowManual:popup:configureUserInterface:addBlock"},properties:o!=null?o:{tab1:{type:"void",title:`{{t("Manual", { ns: "${y}" })}}`,"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer",properties:{grid:{type:"void","x-component":"Grid","x-initializer":"workflowManual:popup:configureUserInterface:addBlock",properties:{}}}}}}}}}}),[]),f=h.useCallback(function(){const{tabs:x}=M.lodash.get(m.toJSON(),"properties.drawer.properties"),F=Array.from(z.getValues()).reduce((v,w)=>Object.assign(v,w.config.parseFormOptions(x)),{});u.setValuesIn("forms",F),r(x.properties)},[u,r,m]);return s.jsx(e.SchemaComponentContext.Provider,{value:k(g({},t),{designable:!d.executed,refresh:f}),children:s.jsx(e.SchemaComponent,{schema:m,components:k(g(g({},p),Array.from(z.getValues()).reduce((c,x)=>Object.assign(c,x.config.components),{})),{FormBlockProvider:X,DetailsBlockProvider:l.DetailsBlockProvider,ManualActionStatusProvider(c){return c.children},ActionBarProvider(c){return c.children},SimpleDesigner:l.SimpleDesigner,ManualActionDesigner:Be}),scope:{useSubmit:ze,useDetailsBlockProps:e.useFormBlockContext}})})}function Ve(o={}){for(const r of Object.values(o)){const n=z.get(r.type);if(typeof n.validate=="function"){const t=n.validate(r);if(t)return t}}}function Pe(o){const{workflow:r}=l.useFlowContext(),[n,t]=h.useState(!1),{values:i}=S.useForm(),{t:a}=L(),u=h.useCallback(d=>{if(!d){const p=Ve(i.forms);if(p){b.message.error({title:a("Validation failed"),content:a(p)});return}}t(d)},[i.forms]);return s.jsxs(s.Fragment,{children:[s.jsx(b.Button,{type:"primary",onClick:()=>t(!0),disabled:!1,children:a(r.executed?"View user interface":"Configure user interface")}),s.jsx(e.ActionContextProvider,{value:{visible:n,setVisible:u,formValueChanged:!1},children:o.children})]})}function je({value:o,onChange:r}){const n=s.jsx("fieldset",{children:s.jsx(_.FormLayout,{layout:"vertical",children:s.jsx(e.FormItem,{label:T("Negotiation"),children:s.jsxs(b.Radio.Group,{value:o,onChange:r,children:[s.jsx(b.Radio,{value:1,children:s.jsxs(b.Tooltip,{title:T("Everyone should pass"),placement:"bottom",children:[s.jsx("span",{children:T("All pass")}),s.jsx(q.QuestionCircleOutlined,{style:{color:"#999"}})]})}),s.jsx(b.Radio,{value:-1,children:s.jsxs(b.Tooltip,{title:T("Anyone pass"),placement:"bottom",children:[s.jsx("span",{children:T("Any pass")}),s.jsx(q.QuestionCircleOutlined,{style:{color:"#999"}})]})})]})})})});return s.jsxs("fieldset",{className:e.css`
|
|
15
|
-
.ant-radio-group {
|
|
16
|
-
.anticon {
|
|
17
|
-
margin-left: 0.5em;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
`,children:[s.jsx(b.Form.Item,{children:s.jsxs(b.Radio.Group,{value:!!o,onChange:({target:{value:t}})=>{console.log(t),r(Number(t))},children:[s.jsx(b.Radio,{value:!0,children:s.jsxs(b.Tooltip,{title:T("Each user has own task"),placement:"bottom",children:[s.jsx("span",{children:T("Separately")}),s.jsx(q.QuestionCircleOutlined,{style:{color:"#999"}})]})}),s.jsx(b.Radio,{value:!1,children:s.jsxs(b.Tooltip,{title:T("Everyone shares one task"),placement:"bottom",children:[s.jsx("span",{children:T("Collaboratively")}),s.jsx(q.QuestionCircleOutlined,{style:{color:"#999"}})]})})]})}),o?n:null]})}function Ne(o){return o.isForeignKey?o.target==="users":o.collectionName==="users"&&o.name==="id"}function $e({multiple:o=!1,value:r=[],onChange:n}){const t=l.useWorkflowVariableOptions({types:[Ne]});return s.jsx(e.Variable.Input,{scope:t,value:r[0],onChange:i=>{n([i])},children:s.jsx(e.RemoteSelect,{fieldNames:{label:"nickname",value:"id"},service:{resource:"users"},manual:!1,value:r[0],onChange:i=>{n(i!=null?[i]:[])}})})}function Ue({key:o,title:r,config:n},{types:t,fieldNames:i=l.defaultFieldNames}){var m;const a=e.useCompile(),{getCollectionFields:u}=e.useCollectionManager_deprecated(),d=Object.keys((m=n.forms)!=null?m:{});if(!d.length)return null;const p=d.map(f=>{var v;const c=n.forms[f],x=l.getCollectionFieldOptions({fields:(v=c.collection)==null?void 0:v.fields,collection:c.collection,types:t,compile:a,getCollectionFields:u}),F=a(c.title)||f;return x.length?{key:f,value:f,label:F,title:F,children:x}:null}).filter(Boolean);return p.length?{[i.value]:o,[i.label]:r,[i.children]:p}:null}class _e extends l.Instruction{constructor(){super(...arguments);P(this,"title",`{{t("Manual", { ns: "${y}" })}}`);P(this,"type","manual");P(this,"group","manual");P(this,"description",`{{t("Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.", { ns: "${y}" })}}`);P(this,"fieldset",{assignees:{type:"array",title:`{{t("Assignees", { ns: "${y}" })}}`,"x-decorator":"FormItem","x-component":"AssigneesSelect","x-component-props":{},required:!0,default:[]},mode:{type:"number",title:`{{t("Mode", { ns: "${y}" })}}`,"x-decorator":"FormItem","x-component":"ModeConfig",default:1,"x-reactions":{dependencies:["assignees"],fulfill:{state:{visible:"{{$deps[0].length > 1}}"}}}},schema:{type:"void",title:`{{t("User interface", { ns: "${y}" })}}`,"x-decorator":"FormItem","x-component":"SchemaConfigButton",properties:{schema:{type:"object","x-component":"SchemaConfig",default:null}}},forms:{type:"object",default:{}}});P(this,"components",{SchemaConfigButton:Pe,SchemaConfig:De,ModeConfig:je,AssigneesSelect:$e});P(this,"useVariables",Ue)}useInitializers(n){var u;const{getCollection:t}=e.useCollectionManager_deprecated(),i=Object.keys((u=n.config.forms)!=null?u:{});if(!i.length||n.config.mode)return null;const a=i.map(d=>{var f,c;const p=n.config.forms[d],{fields:m=[]}=t(p.collection);return m.length?{name:(f=p.title)!=null?f:d,type:"item",title:(c=p.title)!=null?c:d,Component:l.CollectionBlockInitializer,collection:p.collection,dataPath:`$jobsMapByNodeKey.${n.key}.${d}`}:null}).filter(Boolean);return a.length?{name:`#${n.id}`,key:"forms",type:"subMenu",title:n.title,children:a}:null}isAvailable({engine:n,workflow:t,upstream:i,branchIndex:a}){return!n.isWorkflowSync(t)}}const Ee={title:`{{t("Task", { ns: "${y}" })}}`,name:"flow_nodes",fields:[{type:"bigInt",name:"id",interface:"m2o",uiSchema:{type:"number",title:"ID","x-component":"RemoteSelect","x-component-props":{fieldNames:{label:"title",value:"id"},service:{resource:"flow_nodes",params:{filter:{type:"manual"}}}}}},{type:"string",name:"title",interface:"input",uiSchema:{type:"string",title:'{{t("Title")}}',"x-component":"Input"}}]},Ke={title:`{{t("Workflow", { ns: "${y}" })}}`,name:"workflows",fields:[{type:"string",name:"title",interface:"input",uiSchema:{title:'{{t("Name")}}',type:"string","x-component":"Input",required:!0}}]},qe={title:`{{t("Workflow todos", { ns: "${y}" })}}`,name:"users_jobs",fields:[{type:"belongsTo",name:"user",target:"users",foreignKey:"userId",interface:"m2o",uiSchema:{type:"number",title:'{{t("User")}}',"x-component":"RemoteSelect","x-component-props":{fieldNames:{label:"nickname",value:"id"},service:{resource:"users"}}}},{type:"belongsTo",name:"node",target:"flow_nodes",foreignKey:"nodeId",interface:"m2o",isAssociation:!0,uiSchema:{type:"number",title:`{{t("Task", { ns: "${y}" })}}`,"x-component":"RemoteSelect","x-component-props":{fieldNames:{label:"title",value:"id"},service:{resource:"flow_nodes"}}}},{type:"belongsTo",name:"workflow",target:"workflows",foreignKey:"workflowId",interface:"m2o",uiSchema:{type:"number",title:`{{t("Workflow", { ns: "${y}" })}}`,"x-component":"RemoteSelect","x-component-props":{fieldNames:{label:"title",value:"id"},service:{resource:"workflows"}}}},{type:"integer",name:"status",interface:"select",uiSchema:{type:"number",title:`{{t("Status", { ns: "${y}" })}}`,"x-component":"Select",enum:l.JobStatusOptions}},{name:"createdAt",type:"date",interface:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at")}}',"x-component":"DatePicker","x-component-props":{showTime:!0}}}]},Je=S.observer(()=>{var r,n,t;const o=S.useField();return(t=(r=o==null?void 0:o.value)==null?void 0:r.title)!=null?t:`#${(n=o.value)==null?void 0:n.id}`},{displayName:"NodeColumn"}),Ge=S.observer(()=>{var r,n,t;const o=S.useField();return(t=(r=o==null?void 0:o.value)==null?void 0:r.title)!=null?t:`#${(n=o.value)==null?void 0:n.id}`},{displayName:"WorkflowColumn"}),Le=S.observer(()=>{var r,n,t;const o=S.useField();return(t=(r=o==null?void 0:o.value)==null?void 0:r.nickname)!=null?t:(n=o.value)==null?void 0:n.id},{displayName:"UserColumn"});function Ye(o){const r=e.useRecord(),n=T("Unprocessed");return r.execution.status&&!r.status?s.jsx(b.Tag,{children:n}):o.children}const Q=()=>s.jsx(e.SchemaComponent,{components:{NodeColumn:Je,WorkflowColumn:Ge,UserColumn:Le,UserJobStatusColumn:Ye},schema:{type:"void",properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--nb-spacing)"}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',"x-action":"filter","x-designer":"Filter.Action.Designer","x-component":"Filter.Action","x-use-component-props":"useFilterActionProps","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresher:{type:"void",title:'{{ t("Refresh") }}',"x-action":"refresh","x-component":"Action","x-use-component-props":"useRefreshActionProps","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:refresh","x-component-props":{icon:"ReloadOutlined"},"x-align":"right"}}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"id"},properties:{actions:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:60},title:'{{t("Actions")}}',properties:{view:{type:"void","x-component":"Action.Link",title:'{{t("View")}}',properties:{drawer:{"x-component":"WorkflowTodo.Drawer"}}}}},node:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:null},title:`{{t("Task node", { ns: "${y}" })}}`,properties:{node:{"x-component":"NodeColumn","x-read-pretty":!0}}},workflow:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:null},title:'{{t("Workflow", { ns: "workflow" })}}',properties:{workflow:{"x-component":"WorkflowColumn","x-read-pretty":!0}}},status:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:100},title:'{{t("Status", { ns: "workflow" })}}',properties:{status:{type:"number","x-decorator":"UserJobStatusColumn","x-component":"CollectionField","x-read-pretty":!0}}},user:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:140},title:`{{t("Assignee", { ns: "${y}" })}}`,properties:{user:{"x-component":"UserColumn","x-read-pretty":!0}}},createdAt:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:160},properties:{createdAt:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}}}}}}});function Qe(o){var m;const{data:r}=e.useCurrentUserContext(),{userJob:n}=l.useFlowContext(),{status:t,result:i,userId:a}=n,u=S.useFieldSchema(),{name:d}=u.parent.toJSON();let{children:p}=o;return t?i[d]||(p=null):((m=r==null?void 0:r.data)==null?void 0:m.id)!==a&&(p=null),p}const ae=h.createContext(null);ae.displayName="ManualActionStatusContext";function He({value:o,children:r}){const{userJob:n,execution:t}=l.useFlowContext(),i=S.useField(),a=S.useFieldSchema();return h.useEffect(()=>{(t.status||n.status)&&(i.disabled=!0,i.visible=n.status===o&&n.result._===a.name)},[t,n,o,i,a.name]),s.jsx(ae.Provider,{value:o,children:r})}function Xe(){const o=e.useAPIClient(),{setVisible:r}=e.useActionContext(),{values:n,submit:t}=S.useForm(),i=S.useFieldSchema(),{service:a}=e.useTableBlockContext(),{userJob:u,execution:d}=l.useFlowContext(),{name:p}=i,{name:m}=i.parent.parent;return{run(){return U(this,null,function*(){d.status||u.status||(yield t(),yield o.resource("users_jobs").submit({filterByTk:u.id,values:{result:{[m]:n,_:p}}}),r(!1),a.refresh())})}}}function Ze(o){var f;const r=e.usePlugin(l),n=e.useAPIClient(),{id:t}=e.useRecord(),[i,a]=h.useState(null),[u,d]=h.useState(null);h.useEffect(()=>{var c,x;t&&((x=(c=n.resource("users_jobs")).get)==null||x.call(c,{filterByTk:t,appends:["node","job","workflow","workflow.nodes","execution","execution.jobs"]}).then(({data:F})=>{var O;const D=(O=F==null?void 0:F.data)!=null?O:{},{node:v,workflow:N={}}=D,J=N,{nodes:w=[]}=J,I=$(J,["nodes"]),ce=D,{execution:B}=ce,A=$(ce,["node","workflow","execution"]);l.linkNodes(w),d(v),a({userJob:A,workflow:I,nodes:w,execution:B})}))},[n,t]);const m=l.useAvailableUpstreams(i==null?void 0:i.nodes.find(c=>c.id===u.id)).reduce((c,{type:x})=>Object.assign(c,r.instructions.get(x).components),{});return u&&i?s.jsx(l.FlowContext.Provider,{value:i,children:s.jsx(e.SchemaComponent,{components:g(g({FormBlockProvider:X,DetailsBlockProvider:l.DetailsBlockProvider,ActionBarProvider:Qe,ManualActionStatusProvider:He},Array.from(z.getValues()).reduce((c,x)=>Object.assign(c,x.block.components),{})),m),scope:g({useSubmit:Xe,useFormBlockProps:We,useDetailsBlockProps:Re},Array.from(z.getValues()).reduce((c,x)=>Object.assign(c,x.block.scope),{})),schema:{type:"void",name:"tabs","x-component":"Tabs",properties:(f=u.config)==null?void 0:f.schema}})}):s.jsx(b.Spin,{})}function We(){var u;const{userJob:o,execution:r}=l.useFlowContext(),n=e.useRecord(),{data:t}=e.useCurrentUserContext(),{form:i}=e.useFormBlockContext(),a=r.status||o.status?n?"readPretty":"disabled":((u=t==null?void 0:t.data)==null?void 0:u.id)!==o.userId?"disabled":"editable";return h.useEffect(()=>{i==null||i.setPattern(a)},[a,i]),{form:i}}function Re(){const{form:o}=e.useFormBlockContext();return{form:o}}function eo(){const o=e.useCompile(),{status:r,updatedAt:n}=e.useRecord(),t=l.JobStatusOptionsMap[r];return r?s.jsxs(b.Space,{children:[s.jsx("time",{className:e.css`
|
|
21
|
-
margin-right: 0.5em;
|
|
22
|
-
`,children:de(n).format("YYYY-MM-DD HH:mm:ss")}),s.jsx(b.Tag,{icon:t.icon,color:t.color,children:o(t.label)})]}):null}function oo(){var a;const o=h.useContext(e.SchemaComponentContext),{id:r,node:n,workflow:t,status:i}=e.useRecord();return s.jsx(e.SchemaComponentContext.Provider,{value:k(g({},o),{reset(){},designable:!1}),children:s.jsx(e.SchemaComponent,{components:{FooterStatus:eo,FlowContextProvider:Ze},schema:{type:"void",name:`drawer-${r}-${i}`,"x-component":"Action.Drawer","x-component-props":{className:"nb-action-popup"},title:`${t.title} - ${(a=n.title)!=null?a:`#${n.id}`}`,properties:{tabs:{type:"void","x-component":"FlowContextProvider"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{content:{type:"void","x-component":"FooterStatus"}}}}}})})}function to({params:o={},children:r}){const n={collection:"users_jobs",resource:"users_jobs",action:"list",params:k(g({pageSize:20,sort:["-createdAt"]},o),{appends:["user","node","workflow","execution.status"],except:["node.config","workflow.config","workflow.options"]}),rowKey:"id",showIndex:!0,dragSort:!1};return s.jsx(e.ExtendCollectionsProvider,{collections:[Ee,Ke,qe],children:s.jsx(e.TableBlockProvider,k(g({name:"workflow-todo"},n),{children:r}))})}Q.Drawer=oo,Q.Decorator=to;const no=()=>{const o=e.useSchemaInitializerItem(),{insert:r}=e.useSchemaInitializer();return s.jsx(e.SchemaInitializerItem,k(g({icon:s.jsx(q.TableOutlined,{})},o),{onClick:()=>{r({type:"void","x-decorator":"WorkflowTodo.Decorator","x-decorator-props":{},"x-component":"CardItem","x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:table",properties:{todos:{type:"void","x-component":"WorkflowTodo"}}})}}))};class ro extends e.Plugin{afterAdd(){return U(this,null,function*(){})}load(){return U(this,null,function*(){this.addComponents(),this.app.pm.get("workflow").registerInstruction("manual",_e),this.app.schemaInitializerManager.add(ne),this.app.schemaInitializerManager.add(Ae),this.app.schemaInitializerManager.add(ie),this.app.schemaInitializerManager.add(Oe),this.app.schemaInitializerManager.add(oe),this.app.schemaInitializerManager.add(Se),this.app.schemaInitializerManager.get("page:addBlock").add("otherBlocks.workflowTodos",{title:`{{t("Workflow todos", { ns: "${y}" })}}`,Component:"WorkflowTodoBlockInitializer",icon:"CheckSquareOutlined"})})}addComponents(){this.app.addComponents({WorkflowTodo:Q,WorkflowTodoBlockInitializer:no})}}C.default=ro,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export declare function AssigneesSelect({ multiple, value, onChange }: {
|
|
11
|
-
multiple?: boolean;
|
|
12
|
-
value?: any[];
|
|
13
|
-
onChange: any;
|
|
14
|
-
}): React.JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export declare function FormBlockInitializer(): React.JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export declare function FormBlockProvider(props: any): React.JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
export declare function ModeConfig({ value, onChange }: {
|
|
11
|
-
value: any;
|
|
12
|
-
onChange: any;
|
|
13
|
-
}): React.JSX.Element;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { ISchema } from '@formily/react';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { CompatibleSchemaInitializer, SchemaInitializerItemType } from '@nocobase/client';
|
|
12
|
-
import { JOB_STATUS } from '@nocobase/plugin-workflow/client';
|
|
13
|
-
type ValueOf<T> = T[keyof T];
|
|
14
|
-
export type FormType = {
|
|
15
|
-
type: 'create' | 'update' | 'custom';
|
|
16
|
-
title: string;
|
|
17
|
-
actions: ValueOf<typeof JOB_STATUS>[];
|
|
18
|
-
collection: string | {
|
|
19
|
-
name: string;
|
|
20
|
-
fields: any[];
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export type ManualFormType = {
|
|
25
|
-
title: string;
|
|
26
|
-
config: {
|
|
27
|
-
useInitializer: ({ allCollections }?: {
|
|
28
|
-
allCollections: any[];
|
|
29
|
-
}) => SchemaInitializerItemType;
|
|
30
|
-
initializers?: {
|
|
31
|
-
[key: string]: React.FC;
|
|
32
|
-
};
|
|
33
|
-
components?: {
|
|
34
|
-
[key: string]: React.FC;
|
|
35
|
-
};
|
|
36
|
-
parseFormOptions(root: ISchema): {
|
|
37
|
-
[key: string]: FormType;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
block: {
|
|
41
|
-
scope?: {
|
|
42
|
-
[key: string]: () => any;
|
|
43
|
-
};
|
|
44
|
-
components?: {
|
|
45
|
-
[key: string]: React.FC;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
validate?: (config: any) => string | null;
|
|
49
|
-
};
|
|
50
|
-
export declare const manualFormTypes: any;
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated
|
|
53
|
-
* use `addBlockButton` instead
|
|
54
|
-
*/
|
|
55
|
-
export declare const addBlockButton_deprecated: CompatibleSchemaInitializer;
|
|
56
|
-
export declare const addBlockButton: CompatibleSchemaInitializer;
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated
|
|
59
|
-
* use `addActionButton` instead
|
|
60
|
-
*/
|
|
61
|
-
export declare const addActionButton_deprecated: CompatibleSchemaInitializer;
|
|
62
|
-
export declare const addActionButton: CompatibleSchemaInitializer;
|
|
63
|
-
export declare function SchemaConfig({ value, onChange }: {
|
|
64
|
-
value: any;
|
|
65
|
-
onChange: any;
|
|
66
|
-
}): React.JSX.Element;
|
|
67
|
-
export declare function SchemaConfigButton(props: any): React.JSX.Element;
|
|
68
|
-
export {};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export declare function createManualFormBlockUISchema(options: any): import("@formily/json-schema").Stringify<{
|
|
10
|
-
[key: symbol]: any;
|
|
11
|
-
[key: `x-${string}`]: any;
|
|
12
|
-
[key: `x-${number}`]: any;
|
|
13
|
-
version?: string;
|
|
14
|
-
name?: import("@formily/json-schema").SchemaKey;
|
|
15
|
-
title?: any;
|
|
16
|
-
description?: any;
|
|
17
|
-
default?: any;
|
|
18
|
-
readOnly?: boolean;
|
|
19
|
-
writeOnly?: boolean;
|
|
20
|
-
type?: import("@formily/json-schema").SchemaTypes;
|
|
21
|
-
enum?: import("@formily/json-schema").SchemaEnum<any>;
|
|
22
|
-
const?: any;
|
|
23
|
-
multipleOf?: number;
|
|
24
|
-
maximum?: number;
|
|
25
|
-
exclusiveMaximum?: number;
|
|
26
|
-
minimum?: number;
|
|
27
|
-
exclusiveMinimum?: number;
|
|
28
|
-
maxLength?: number;
|
|
29
|
-
minLength?: number;
|
|
30
|
-
pattern?: string | RegExp;
|
|
31
|
-
maxItems?: number;
|
|
32
|
-
minItems?: number;
|
|
33
|
-
uniqueItems?: boolean;
|
|
34
|
-
maxProperties?: number;
|
|
35
|
-
minProperties?: number;
|
|
36
|
-
required?: string | boolean | string[];
|
|
37
|
-
format?: string;
|
|
38
|
-
$ref?: string;
|
|
39
|
-
$namespace?: string;
|
|
40
|
-
definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
41
|
-
properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
42
|
-
items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
43
|
-
additionalItems?: import("@formily/json-schema").Stringify<any>;
|
|
44
|
-
patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
45
|
-
additionalProperties?: import("@formily/json-schema").Stringify<any>;
|
|
46
|
-
"x-value"?: any;
|
|
47
|
-
"x-index"?: number;
|
|
48
|
-
"x-pattern"?: any;
|
|
49
|
-
"x-display"?: any;
|
|
50
|
-
"x-validator"?: any;
|
|
51
|
-
"x-decorator"?: any;
|
|
52
|
-
"x-decorator-props"?: any;
|
|
53
|
-
"x-component"?: any;
|
|
54
|
-
"x-component-props"?: any;
|
|
55
|
-
"x-reactions"?: import("@formily/json-schema").SchemaReactions<any>;
|
|
56
|
-
"x-content"?: any;
|
|
57
|
-
"x-data"?: any;
|
|
58
|
-
"x-visible"?: boolean;
|
|
59
|
-
"x-hidden"?: boolean;
|
|
60
|
-
"x-disabled"?: boolean;
|
|
61
|
-
"x-editable"?: boolean;
|
|
62
|
-
"x-read-only"?: boolean;
|
|
63
|
-
"x-read-pretty"?: boolean;
|
|
64
|
-
"x-compile-omitted"?: string[];
|
|
65
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { ManualFormType } from '../SchemaConfig';
|
|
10
|
-
declare const _default: ManualFormType;
|
|
11
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { CompatibleSchemaInitializer } from '@nocobase/client';
|
|
10
|
-
import { ManualFormType } from '../SchemaConfig';
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated
|
|
13
|
-
* use `addCustomFormField` instead
|
|
14
|
-
*/
|
|
15
|
-
export declare const addCustomFormField_deprecated: CompatibleSchemaInitializer;
|
|
16
|
-
export declare const addCustomFormField: CompatibleSchemaInitializer;
|
|
17
|
-
declare const _default: ManualFormType;
|
|
18
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { ManualFormType } from '../SchemaConfig';
|
|
10
|
-
declare const _default: ManualFormType;
|
|
11
|
-
export default _default;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { SchemaInitializerItemType } from '@nocobase/client';
|
|
10
|
-
import { Instruction } from '@nocobase/plugin-workflow/client';
|
|
11
|
-
import { SchemaConfig, SchemaConfigButton } from './SchemaConfig';
|
|
12
|
-
import { ModeConfig } from './ModeConfig';
|
|
13
|
-
import { AssigneesSelect } from './AssigneesSelect';
|
|
14
|
-
declare function useVariables({ key, title, config }: {
|
|
15
|
-
key: any;
|
|
16
|
-
title: any;
|
|
17
|
-
config: any;
|
|
18
|
-
}, { types, fieldNames }: {
|
|
19
|
-
types: any;
|
|
20
|
-
fieldNames?: {
|
|
21
|
-
readonly label: "label";
|
|
22
|
-
readonly value: "value";
|
|
23
|
-
readonly children: "children";
|
|
24
|
-
};
|
|
25
|
-
}): {
|
|
26
|
-
value: any;
|
|
27
|
-
label: any;
|
|
28
|
-
children: {
|
|
29
|
-
key: string;
|
|
30
|
-
value: string;
|
|
31
|
-
label: any;
|
|
32
|
-
title: any;
|
|
33
|
-
children: import("@nocobase/plugin-workflow/client").VariableOption[];
|
|
34
|
-
}[];
|
|
35
|
-
};
|
|
36
|
-
export default class extends Instruction {
|
|
37
|
-
title: string;
|
|
38
|
-
type: string;
|
|
39
|
-
group: string;
|
|
40
|
-
description: string;
|
|
41
|
-
fieldset: {
|
|
42
|
-
assignees: {
|
|
43
|
-
type: string;
|
|
44
|
-
title: string;
|
|
45
|
-
'x-decorator': string;
|
|
46
|
-
'x-component': string;
|
|
47
|
-
'x-component-props': {};
|
|
48
|
-
required: boolean;
|
|
49
|
-
default: any[];
|
|
50
|
-
};
|
|
51
|
-
mode: {
|
|
52
|
-
type: string;
|
|
53
|
-
title: string;
|
|
54
|
-
'x-decorator': string;
|
|
55
|
-
'x-component': string;
|
|
56
|
-
default: number;
|
|
57
|
-
'x-reactions': {
|
|
58
|
-
dependencies: string[];
|
|
59
|
-
fulfill: {
|
|
60
|
-
state: {
|
|
61
|
-
visible: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
schema: {
|
|
67
|
-
type: string;
|
|
68
|
-
title: string;
|
|
69
|
-
'x-decorator': string;
|
|
70
|
-
'x-component': string;
|
|
71
|
-
properties: {
|
|
72
|
-
schema: {
|
|
73
|
-
type: string;
|
|
74
|
-
'x-component': string;
|
|
75
|
-
default: any;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
forms: {
|
|
80
|
-
type: string;
|
|
81
|
-
default: {};
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
components: {
|
|
85
|
-
SchemaConfigButton: typeof SchemaConfigButton;
|
|
86
|
-
SchemaConfig: typeof SchemaConfig;
|
|
87
|
-
ModeConfig: typeof ModeConfig;
|
|
88
|
-
AssigneesSelect: typeof AssigneesSelect;
|
|
89
|
-
};
|
|
90
|
-
useVariables: typeof useVariables;
|
|
91
|
-
useInitializers(node: any): SchemaInitializerItemType | null;
|
|
92
|
-
isAvailable({ engine, workflow, upstream, branchIndex }: {
|
|
93
|
-
engine: any;
|
|
94
|
-
workflow: any;
|
|
95
|
-
upstream: any;
|
|
96
|
-
branchIndex: any;
|
|
97
|
-
}): boolean;
|
|
98
|
-
}
|
|
99
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export declare function findSchema(schema: any, filter: any, onlyLeaf?: boolean): any[];
|
package/dist/externalVersion.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
"@formily/react": "2.3.0",
|
|
12
|
-
"antd": "5.12.8",
|
|
13
|
-
"dayjs": "1.11.10",
|
|
14
|
-
"react": "18.2.0",
|
|
15
|
-
"@nocobase/client": "1.2.12-alpha",
|
|
16
|
-
"@nocobase/plugin-workflow": "1.2.12-alpha",
|
|
17
|
-
"@ant-design/icons": "5.2.6",
|
|
18
|
-
"react-i18next": "11.18.6",
|
|
19
|
-
"@nocobase/utils": "1.2.12-alpha",
|
|
20
|
-
"@nocobase/server": "1.2.12-alpha",
|
|
21
|
-
"@nocobase/actions": "1.2.12-alpha",
|
|
22
|
-
"@nocobase/resourcer": "1.2.12-alpha",
|
|
23
|
-
"@nocobase/test": "1.2.12-alpha",
|
|
24
|
-
"@nocobase/plugin-workflow-test": "1.2.12-alpha",
|
|
25
|
-
"@formily/core": "2.3.0",
|
|
26
|
-
"@formily/antd-v5": "1.1.9",
|
|
27
|
-
"@nocobase/database": "1.2.12-alpha",
|
|
28
|
-
"lodash": "4.17.21"
|
|
29
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export * from './server';
|
|
10
|
-
export { default } from './server';
|
package/dist/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
-
mod
|
|
36
|
-
));
|
|
37
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
-
var src_exports = {};
|
|
39
|
-
__export(src_exports, {
|
|
40
|
-
default: () => import_server.default
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(src_exports);
|
|
43
|
-
__reExport(src_exports, require("./server"), module.exports);
|
|
44
|
-
var import_server = __toESM(require("./server"));
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
...require("./server")
|
|
48
|
-
});
|
package/dist/locale/en-US.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Manual": "Manual",
|
|
3
|
-
"Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.": "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.",
|
|
4
|
-
"Values preset in this form will override user submitted ones when continue or reject.": "Values preset in this form will override user submitted ones when continue or reject.",
|
|
5
|
-
"Assignee": "Assignee",
|
|
6
|
-
"Assignees": "Assignees",
|
|
7
|
-
"User interface": "User interface",
|
|
8
|
-
"Configure user interface": "Configure user interface",
|
|
9
|
-
"View user interface": "View user interface",
|
|
10
|
-
"Separately": "Separately",
|
|
11
|
-
"Each user has own task": "Each user has own task",
|
|
12
|
-
"Collaboratively": "Collaboratively",
|
|
13
|
-
"Everyone shares one task": "Everyone shares one task",
|
|
14
|
-
"Negotiation": "Negotiation",
|
|
15
|
-
"All pass": "All pass",
|
|
16
|
-
"Everyone should pass": "Everyone should pass",
|
|
17
|
-
"Any pass": "Any pass",
|
|
18
|
-
"Anyone pass": "Anyone pass",
|
|
19
|
-
"Field name existed in form": "Field name existed in form",
|
|
20
|
-
"Continue the process": "Continue the process",
|
|
21
|
-
"Terminate the process": "Terminate the process",
|
|
22
|
-
"Save temporarily": "Save temporarily",
|
|
23
|
-
"Custom form": "Custom form",
|
|
24
|
-
"Data record": "Data record",
|
|
25
|
-
"Create record form": "Create record form",
|
|
26
|
-
"Update record form": "Update record form",
|
|
27
|
-
"Filter settings": "Filter settings",
|
|
28
|
-
"Workflow todos": "Workflow todos",
|
|
29
|
-
"Task": "Task"
|
|
30
|
-
}
|