@nocobase/plugin-workflow-manual 1.0.0-alpha.2 → 1.0.0-alpha.4
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/dist/client/WorkflowTodo.d.ts +8 -0
- package/dist/client/WorkflowTodoBlockInitializer.d.ts +8 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.js +9 -0
- package/dist/client/instruction/AssigneesSelect.d.ts +8 -0
- package/dist/client/instruction/FormBlockInitializer.d.ts +8 -0
- package/dist/client/instruction/FormBlockProvider.d.ts +8 -0
- package/dist/client/instruction/ModeConfig.d.ts +8 -0
- package/dist/client/instruction/SchemaConfig.d.ts +8 -0
- package/dist/client/instruction/createManualFormBlockUISchema.d.ts +8 -0
- package/dist/client/instruction/forms/create.d.ts +8 -0
- package/dist/client/instruction/forms/custom.d.ts +8 -0
- package/dist/client/instruction/forms/update.d.ts +8 -0
- package/dist/client/instruction/index.d.ts +8 -0
- package/dist/client/instruction/utils.d.ts +8 -0
- package/dist/externalVersion.js +18 -9
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/locale/index.d.ts +8 -0
- package/dist/locale/index.js +9 -0
- package/dist/server/ManualInstruction.d.ts +8 -0
- package/dist/server/ManualInstruction.js +9 -0
- package/dist/server/Plugin.d.ts +8 -0
- package/dist/server/Plugin.js +9 -0
- package/dist/server/actions.d.ts +8 -0
- package/dist/server/actions.js +9 -0
- package/dist/server/collections/1-users_jobs.d.ts +8 -0
- package/dist/server/collections/1-users_jobs.js +9 -0
- package/dist/server/collections/2-jobs.d.ts +8 -0
- package/dist/server/collections/2-jobs.js +9 -0
- package/dist/server/collections/3-users.d.ts +8 -0
- package/dist/server/collections/3-users.js +9 -0
- package/dist/server/forms/create.d.ts +8 -0
- package/dist/server/forms/create.js +9 -0
- package/dist/server/forms/index.d.ts +8 -0
- package/dist/server/forms/index.js +9 -0
- package/dist/server/forms/update.d.ts +8 -0
- package/dist/server/forms/update.js +9 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.js +9 -0
- package/dist/server/migrations/20240325213145-fix-schema.d.ts +8 -0
- package/dist/server/migrations/20240325213145-fix-schema.js +9 -0
- package/package.json +2 -2
- package/src/client/WorkflowTodo.tsx +0 -647
- package/src/client/WorkflowTodoBlockInitializer.tsx +0 -32
- package/src/client/__e2e__/assignees.test.ts +0 -0
- package/src/client/__e2e__/createRecordForm.test.ts +0 -2287
- package/src/client/__e2e__/customFormBlocks.test.ts +0 -1933
- package/src/client/__e2e__/datablocks.test.ts +0 -1208
- package/src/client/__e2e__/updateRecordForm.test.ts +0 -2338
- package/src/client/__e2e__/workflowTodo.test.ts +0 -242
- package/src/client/index.ts +0 -51
- package/src/client/instruction/AssigneesSelect.tsx +0 -39
- package/src/client/instruction/FormBlockInitializer.tsx +0 -79
- package/src/client/instruction/FormBlockProvider.tsx +0 -92
- package/src/client/instruction/ModeConfig.tsx +0 -85
- package/src/client/instruction/SchemaConfig.tsx +0 -659
- package/src/client/instruction/createManualFormBlockUISchema.ts +0 -5
- package/src/client/instruction/forms/create.tsx +0 -123
- package/src/client/instruction/forms/custom.tsx +0 -439
- package/src/client/instruction/forms/update.tsx +0 -167
- package/src/client/instruction/index.tsx +0 -160
- package/src/client/instruction/utils.ts +0 -19
- package/src/index.ts +0 -2
- package/src/locale/en-US.json +0 -30
- package/src/locale/index.ts +0 -14
- package/src/locale/ko_KR.json +0 -32
- package/src/locale/zh-CN.json +0 -32
- package/src/server/ManualInstruction.ts +0 -157
- package/src/server/Plugin.ts +0 -43
- package/src/server/__tests__/assignees.test.ts +0 -153
- package/src/server/__tests__/collections/categories.ts +0 -15
- package/src/server/__tests__/collections/comments.ts +0 -24
- package/src/server/__tests__/collections/posts.ts +0 -40
- package/src/server/__tests__/collections/replies.ts +0 -9
- package/src/server/__tests__/collections/tags.ts +0 -15
- package/src/server/__tests__/data-source.test.ts +0 -223
- package/src/server/__tests__/form.test.ts +0 -637
- package/src/server/__tests__/mode.test.ts +0 -561
- package/src/server/actions.ts +0 -103
- package/src/server/collections/1-users_jobs.ts +0 -52
- package/src/server/collections/2-jobs.ts +0 -19
- package/src/server/collections/3-users.ts +0 -17
- package/src/server/forms/create.ts +0 -30
- package/src/server/forms/index.ts +0 -13
- package/src/server/forms/update.ts +0 -30
- package/src/server/index.ts +0 -1
- package/src/server/migrations/20240325213145-fix-schema.ts +0 -82
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const WorkflowTodo: React.FC & {
|
|
3
11
|
Drawer: React.FC;
|
|
@@ -1,2 +1,10 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { FC } from 'react';
|
|
2
10
|
export declare const WorkflowTodoBlockInitializer: FC<any>;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Plugin } from '@nocobase/client';
|
|
2
10
|
export default class extends Plugin {
|
|
3
11
|
afterAdd(): Promise<void>;
|
package/dist/client/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
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,c,s,_,K,b,S,h,j,D,J,q,ue){"use strict";var eo=Object.defineProperty,oo=Object.defineProperties;var to=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var H=(C,e,c)=>e in C?eo(C,e,{enumerable:!0,configurable:!0,writable:!0,value:c}):C[e]=c,y=(C,e)=>{for(var c in e||(e={}))pe.call(e,c)&&H(C,c,e[c]);if(L)for(var c of L(e))de.call(e,c)&&H(C,c,e[c]);return C},w=(C,e)=>oo(C,to(e));var $=(C,e)=>{var c={};for(var s in C)pe.call(C,s)&&e.indexOf(s)<0&&(c[s]=C[s]);if(C!=null&&L)for(var s of L(C))e.indexOf(s)<0&&de.call(C,s)&&(c[s]=C[s]);return c};var E=(C,e,c)=>(H(C,typeof e!="symbol"?e+"":e,c),c);var U=(C,e,c)=>new Promise((s,_)=>{var K=h=>{try{S(c.next(h))}catch(j){_(j)}},b=h=>{try{S(c.throw(h))}catch(j){_(j)}},S=h=>h.done?s(h.value):Promise.resolve(h.value).then(K,b);S((c=c.apply(C,e)).next())});const g="workflow-manual";function T(o,r={}){const{t:n}=Y(r);return n(o)}function Y(o){return j.useTranslation(g,o)}function X(o){var z,B;const r=e.useRecord(),n=b.useFieldSchema(),t=b.useField(),i=h.useRef(null),a=o.dataSource||e.DEFAULT_DATA_SOURCE_KEY,{getAssociationAppends:p}=e.useAssociationNames(a),{appends:d,updateAssociationValues:u}=p(),[m]=Object.keys((z=n.toJSON().properties)!=null?z:{}),f=(B=r==null?void 0:r.result)==null?void 0:B[m];e.useDesignable();const l=h.useMemo(()=>K.createForm({initialValues:f}),[f]),x=h.useMemo(()=>y({appends:d},o.params),[d,o.params]),F=h.useMemo(()=>({loading:!1,data:{data:f}}),[f]),v=e.useAPIClient(),k=e.useDataSourceHeaders(a),I=v.resource(o.collection,void 0,k),M=e.useBlockRequestContext(),A=h.useMemo(()=>({params:x,form:l,field:t,service:F,updateAssociationValues:u,formBlockRef:i}),[t,l,x,F,u]);return!r.status||f?s.jsx(e.CollectionManagerProvider,{dataSource:a,children:s.jsx(e.CollectionProvider_deprecated,{collection:o.collection,children:s.jsx(e.RecordProvider,{record:f,parent:null,children:s.jsx(e.FormActiveFieldsProvider,{name:"form",children:s.jsx(e.BlockRequestContext_deprecated.Provider,{value:{block:"form",props:o,field:t,service:F,resource:I,__parent:M},children:s.jsxs(e.FormBlockContext.Provider,{value:A,children:[s.jsx(e.FormV2.Templates,{style:{marginBottom:18},form:l}),s.jsx("div",{ref:i,children:o.children})]})})})})})}):null}function me(o){return e.createFormBlockSchema(o)}function fe(n){var t=n,{schema:o}=t,r=$(t,["schema"]);const{getTemplateSchemaByMode:i}=e.useSchemaTemplateManager(),{insert:a}=e.useSchemaInitializer(),p=e.useRecordCollectionDataSourceItems("FormItem");function d(m){return U(this,arguments,function*({item:u}){var v;const f=u.template?yield i(u):null,l=me(w(y({actionInitializers:"workflowManual:form:configureActions",actions:{resolve:{type:"void",title:`{{t("Continue the process", { ns: "${g}" })}}`,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:c.JOB_STATUS.RESOLVED},"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useSubmit }}"},"x-designer":"ManualActionDesigner","x-designer-props":{}}}},o),{template:f}));delete l["x-acl-action-props"],delete l["x-acl-action"];const[x]=Object.keys(l.properties),F=((v=Object.entries(l.properties[x].properties).find(([k,I])=>I["x-component"]==="ActionBar"))==null?void 0:v[0])||"actions";l.properties[x].properties[F]["x-decorator"]="ActionBarProvider",l.properties[x].properties[F]["x-component-props"].style={marginTop:"1.5em",flexWrap:"wrap"},c.traverseSchema(l,k=>{k["x-uid"]&&delete k["x-uid"]}),a(l)})}return s.jsx(e.SchemaInitializerItem,w(y({},r),{onClick:d,items:p}))}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(fe,y({},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 he(){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 xe={title:`{{t("Create record form", { ns: "${g}" })}}`,config:{useInitializer({allCollections:o}){const r=h.useMemo(()=>o.map(({key:a,displayName:p,collections:d})=>({key:a,name:a,label:p,type:"subMenu",children:d.map(u=>({name:J.camelCase(`createRecordForm-child-${u.name}`),type:"item",title:u.title||u.tableName,schema:{collection:u.name,dataSource:a,title:`{{t("Create record", { ns: "${g}" })}}`,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: "${g}" })}}`,componentProps:{onOpenChange(a){t(a)}},children:i}},initializers:{},components:{CreateFormDesigner:he},parseFormOptions(o){const r={};return V(o,t=>t["x-decorator"]==="FormBlockProvider"&&t["x-decorator-props"].formType==="create").forEach(t=>{var d,u;const[i]=Object.keys(t.properties),a=t.properties[i],p=((d=Object.entries(a.properties).find(([m,f])=>f["x-component"]==="ActionBar"))==null?void 0:d[0])||"actions";r[i]={type:"create",title:((u=t["x-component-props"])==null?void 0:u.title)||i,actions:V(a.properties[p],m=>m["x-component"]==="Action").map(m=>{var f,l;return{status:m["x-decorator-props"].value,values:(l=(f=m["x-action-settings"])==null?void 0:f.assignedValues)==null?void 0:l.values,key:m.name}}),collection:t["x-decorator-props"].collection}}),r}},block:{scope:{},components:{}}};function W(o){var m,f,l,x;const[r,n]=h.useState((f=(m=o.collection)==null?void 0:m.fields)!=null?f:[]),t=e.useRecord(),i=b.useField(),a=b.useFieldSchema(),[p]=Object.keys((l=a.toJSON().properties)!=null?l:{}),d=(x=t==null?void 0:t.result)==null?void 0:x[p],u=h.useMemo(()=>K.createForm({initialValues:d}),[d]);return!t.status||d?s.jsx(e.CollectionProvider_deprecated,{collection:w(y({},o.collection),{fields:r}),children:s.jsx(e.RecordProvider,{record:d,parent:null,children:s.jsx(e.FormBlockContext.Provider,{value:{form:u,field:i,setCollectionFields:n},children:o.children})})}):null}function Ce(){const{insert:o}=e.useSchemaInitializer(),r=e.useSchemaInitializerItem();return s.jsx(e.SchemaInitializerItem,w(y({},r),{onClick:()=>{o({type:"void","x-decorator":"CustomFormBlockProvider","x-decorator-props":{collection:{name:D.uid(),fields:[]}},"x-component":"CardItem","x-component-props":{title:'{{t("Form")}}'},"x-designer":"SimpleDesigner","x-designer-props":{type:"customForm"},properties:{[D.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: "${g}" })}}`,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:c.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 ge(o){const r={};return Object.keys(o).forEach(n=>{const t=o[n],{group:i="others"}=t;r[i]=r[i]||{},J.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 y({value:t,title:i.title,name:t},r[n][t])}).sort((t,i)=>t.order-i.order)}))}function ye(){const{interfaces:o}=e.useCollectionManager_deprecated();return ge(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:Se,fieldInterface:t.name}))}))}const ee=h.createContext({}),oe=o=>{const[r,n]=h.useState(null),[t,i]=h.useState(),a=ye(),p=e.useCollection_deprecated(),{setCollectionFields:d}=h.useContext(e.FormBlockContext),u=h.useMemo(()=>K.createForm(),[r]);return s.jsxs(ee.Provider,{value:{onAddField(m){const f=J.pick(m,["name","group","title","default","validateSchema"]),{properties:M}=m,A=M,{unique:l,type:x,layout:F,autoIncrement:v}=A,k=$(A,["unique","type","layout","autoIncrement"]);f.properties=k;const I=J.cloneDeep(f);delete I.properties.name["x-disabled"],n(I)},setCallback:i},children:[s.jsx(e.SchemaInitializerItems,w(y({},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:u},"x-component":"Action.Drawer",properties:w(y({},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=b.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(){const{values:m,query:f,reset:l}=b.useForm(),x=[T("Field name existed in form")];return{run(){return U(this,null,function*(){var A,z,B,N;const{default:v}=r,k=D.uid();if(v.name=(A=m.name)!=null?A:k,v.uiSchema.title=(B=(z=m.uiSchema)==null?void 0:z.title)!=null?B:k,v.interface=r.name,(N=p.fields)==null?void 0:N.find(P=>P.name===v.name)){f("name").take().setFeedback({type:"error",messages:x});return}const M=D.merge(v,m);d([...p.fields,M]),t({name:v.name,type:v.uiSchema.type,"x-decorator":"FormItem","x-component":"CollectionField","x-component-props":{field:M},"x-collection-field":`${p.name}.${v.name}`,"x-toolbar":"FormItemSchemaToolbar","x-settings":"fieldSettings:FormItem"}),l(),i(null),n(null)})}}}}}}}})},components:{ArrayTable:_.ArrayTable}}):null})]})},te=new e.CompatibleSchemaInitializer({name:"AddCustomFormField",wrap:e.gridRowColWrap,insertPosition:"beforeEnd",title:"{{t('Configure fields')}}",ItemsComponent:oe}),be=new e.CompatibleSchemaInitializer({name:"workflowManual:customForm:configureFields",wrap:e.gridRowColWrap,insertPosition:"beforeEnd",title:"{{t('Configure fields')}}",ItemsComponent:oe},te);function Se(){const o=e.useSchemaInitializerItem(),{insert:r,setVisible:n}=e.useSchemaInitializer(),{onAddField:t,setCallback:i}=h.useContext(ee),{getInterface:a}=e.useCollectionManager_deprecated(),p=a(o.fieldInterface);return s.jsx(e.SchemaInitializerItem,y({onClick:()=>{i(()=>r),t(p),n(!1)}},o),o.fieldInterface)}const ne={title:`{{t("Custom form", { ns: "${g}" })}}`,config:{useInitializer(){return{name:"customForm",type:"item",title:`{{t("Custom form", { ns: "${g}" })}}`,Component:Ce}},initializers:{},components:{CustomFormBlockProvider:W},parseFormOptions(o){const r={};return V(o,t=>t["x-decorator"]==="CustomFormBlockProvider").forEach(t=>{var u,m;const[i]=Object.keys(t.properties),a=t.properties[i],p=V(a.properties.grid,f=>f["x-component"]==="CollectionField",!0);t["x-decorator-props"].collection.fields=p.map(f=>{var l,x;return(x=(l=f["x-component-props"])==null?void 0:l.field)!=null?x:f["x-interface-options"]});const d=((u=Object.entries(a.properties).find(([f,l])=>l["x-component"]==="ActionBar"))==null?void 0:u[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 l,x;return{status:f["x-decorator-props"].value,values:(x=(l=f["x-action-settings"])==null?void 0:l.assignedValues)==null?void 0:x.values,key:f.name}}),collection:t["x-decorator-props"].collection}}),r}},block:{scope:{},components:{CustomFormBlockProvider:W}}};function ve(){const{name:o,title:r}=e.useCollection_deprecated(),n=b.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:g}),schema:{name:"filter",type:"object",title:'{{t("Filter")}}',"x-component":"Filter","x-use-component-props":()=>{var p;return{options:e.useCollectionFilterOptions((p=n==null?void 0:n["x-decorator-props"])==null?void 0:p.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 Fe={title:`{{t("Update record form", { ns: "${g}" })}}`,config:{useInitializer({allCollections:o}){const r=h.useMemo(()=>o.map(({key:a,displayName:p,collections:d})=>({key:a,name:a,label:p,type:"subMenu",children:d.map(u=>({name:J.camelCase(`updateRecordForm-child-${u.name}`),type:"item",title:u.title||u.tableName,schema:{collection:u.name,dataSource:a,title:`{{t("Update record", { ns: "${g}" })}}`,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: "${g}" })}}`,componentProps:{onOpenChange(a){t(a)}},children:i}},initializers:{},components:{FilterDynamicComponent:c.FilterDynamicComponent,UpdateFormDesigner:ve},parseFormOptions(o){const r={};return V(o,t=>t["x-decorator"]==="FormBlockProvider"&&t["x-decorator-props"].formType==="update").forEach(t=>{var d,u;const[i]=Object.keys(t.properties),a=t.properties[i],p=((d=Object.entries(a.properties).find(([m,f])=>f["x-component"]==="ActionBar"))==null?void 0:d[0])||"actions";r[i]=w(y({},t["x-decorator-props"]),{type:"update",title:((u=t["x-component-props"])==null?void 0:u.title)||i,actions:V(a.properties[p],m=>m["x-component"]==="Action").map(m=>{var f,l;return{status:m["x-decorator-props"].value,values:(l=(f=m["x-action-settings"])==null?void 0:f.assignedValues)==null?void 0:l.values,key:m.name}})})}),r}},block:{scope:{},components:{}},validate({filter:o}){return!o||!D.isValidFilter(o)?"Please check one of your update record form, and add at least one filter condition in form settings.":null}},O=new D.Registry;O.register("custom",ne),O.register("create",xe),O.register("update",Fe);function re(){const{workflow:o}=c.useFlowContext(),r=c.useTrigger();return r.useInitializers?r.useInitializers(o.config):null}ne.title,`${g}`;const se=new e.CompatibleSchemaInitializer({name:"AddBlockButton",wrap:e.gridRowColWrap,title:'{{t("Add block")}}',items:[{type:"itemGroup",name:"dataBlocks",title:'{{t("Data blocks")}}',hideIfNoChildren:!0,useChildren(){const o=e.usePlugin(c),r=c.useNodeContext(),n=c.useAvailableUpstreams(r),t=[re()].filter(Boolean),i=n.map(p=>{var u;const d=o.instructions.get(p.type);return(u=d==null?void 0:d.useInitializers)==null?void 0:u.call(d,p)}).filter(Boolean);return[...t,...i.length?[{name:"nodes",type:"subMenu",title:'{{t("Node result", { ns: "workflow" })}}',children:i}]:[]].filter(Boolean)}},{type:"itemGroup",name:"form",title:'{{t("Form")}}',useChildren(){const r=e.useDataSourceManager().getAllCollections();return Array.from(O.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"}]}]}),ke=new e.CompatibleSchemaInitializer({name:"workflowManual:popup:configureUserInterface:addBlock",wrap:e.gridRowColWrap,title:'{{t("Add block")}}',items:[{type:"itemGroup",name:"dataBlocks",title:'{{t("Data blocks")}}',hideIfNoChildren:!0,useChildren(){const o=e.usePlugin(c),r=c.useNodeContext(),n=c.useAvailableUpstreams(r),t=[re()].filter(Boolean),i=n.map(p=>{var u;const d=o.instructions.get(p.type);return(u=d==null?void 0:d.useInitializers)==null?void 0:u.call(d,p)}).filter(Boolean);return[...t,...i.length?[{name:"nodes",type:"subMenu",title:`{{t("Node result", { ns: "${g}" })}}`,children:i}]:[]].filter(Boolean)}},{type:"itemGroup",name:"form",title:'{{t("Form")}}',useChildren(){const r=e.useDataSourceManager().getAllCollections();return Array.from(O.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"}]}]},se);function we(){var M,A,z;const o=h.useContext(e.SchemaComponentContext),{t:r}=j.useTranslation(),{t:n}=Y(),t=b.useFieldSchema(),i=c.useWorkflowVariableOptions(),[a,p]=h.useState(!1),[d,u]=h.useState((z=(A=(M=t==null?void 0:t["x-action-settings"])==null?void 0:M.assignedValues)==null?void 0:A.schema)!=null?z:{type:"void","x-component":"Grid","x-initializer":"assignFieldValuesForm:configureFields",properties:{}}),[m,f]=h.useState(null),{components:l}=e.useSchemaOptionsContext();h.useEffect(()=>{f(new b.Schema({properties:{grid:d}}))},[d]);const x=h.useMemo(()=>{var N,P;const B=(P=(N=t==null?void 0:t["x-action-settings"])==null?void 0:N.assignedValues)==null?void 0:P.values;return K.createForm({initialValues:D.lodash.cloneDeep(B),values:D.lodash.cloneDeep(B)})},[t]),F=e.useFormActiveFields(),v=r("Assign field values");function k(){p(!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,p(!1),setTimeout(()=>{var B;(B=o.refresh)==null||B.call(o)},300)}return s.jsxs(s.Fragment,{children:[s.jsx(e.SchemaSettingsItem,{title:v,onClick:()=>p(!0),children:v}),s.jsx(S.Modal,{width:"50%",title:v,open:a,onCancel:k,footer:s.jsxs(S.Space,{children:[s.jsx(S.Button,{onClick:k,children:n("Cancel")}),s.jsx(S.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(b.FormProvider,{form:x,children:s.jsxs(_.FormLayout,{layout:"vertical",children:[s.jsx(S.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:w(y({},o),{refresh(){u(D.lodash.get(m.toJSON(),"properties.grid"))}}),children:s.jsx(e.SchemaComponent,{schema:m,components:l})})]})})})})})})]})}function Ie(o){return s.jsxs(e.GeneralSchemaDesigner,w(y({},o),{disableInitializer:!0,children:[s.jsx(e.Action.Designer.ButtonEditor,{}),s.jsx(we,{}),s.jsx(e.SchemaSettingsDivider,{}),s.jsx(e.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"ActionBar"}})]}))}function ie(){const a=e.useSchemaInitializerItem(),{action:r,actionProps:n}=a,t=$(a,["action","actionProps"]),{insert:i}=e.useSchemaInitializer();return s.jsx(e.SchemaInitializerItem,w(y({},t),{onClick:()=>{i({type:"void",title:t.title,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:r},"x-component":"Action","x-component-props":w(y({},n),{useAction:"{{ useSubmit }}"}),"x-designer":"ManualActionDesigner","x-action-settings":{}})}}))}function G(){const o=e.useSchemaInitializerItem(),i=o,{action:r,actionProps:n}=i,t=$(i,["action","actionProps"]);return s.jsx(e.InitializerWithSwitch,w(y({},t),{item:o,schema:{type:"void",title:t.title,"x-decorator":"ManualActionStatusProvider","x-decorator-props":{value:r},"x-component":"Action","x-component-props":w(y({},n),{useAction:"{{ useSubmit }}"}),"x-designer":"Action.Designer","x-action":`${r}`},type:"x-action"}))}const ae=new e.CompatibleSchemaInitializer({name:"AddActionButton",title:'{{t("Configure actions")}}',items:[{name:"jobStatusResolved",title:`{{t("Continue the process", { ns: "${g}" })}}`,Component:ie,action:c.JOB_STATUS.RESOLVED,actionProps:{type:"primary"}},{name:"jobStatusRejected",title:`{{t("Terminate the process", { ns: "${g}" })}}`,Component:G,action:c.JOB_STATUS.REJECTED,actionProps:{danger:!0}},{name:"jobStatusPending",title:`{{t("Save temporarily", { ns: "${g}" })}}`,Component:G,action:c.JOB_STATUS.PENDING}]}),Ae=new e.CompatibleSchemaInitializer({name:"workflowManual:form:configureActions",title:'{{t("Configure actions")}}',items:[{name:"jobStatusResolved",title:`{{t("Continue the process", { ns: "${g}" })}}`,Component:ie,action:c.JOB_STATUS.RESOLVED,actionProps:{type:"primary"}},{name:"jobStatusRejected",title:`{{t("Terminate the process", { ns: "${g}" })}}`,Component:G,action:c.JOB_STATUS.REJECTED,actionProps:{danger:!0}},{name:"jobStatusPending",title:`{{t("Save temporarily", { ns: "${g}" })}}`,Component:G,action:c.JOB_STATUS.PENDING}]},ae);function Be(){return{run(){}}}function Te({value:o,onChange:r}){const n=e.usePlugin(c),t=h.useContext(e.SchemaComponentContext),i=c.useNodeContext(),a=c.useAvailableUpstreams(i),p=b.useForm(),{workflow:d}=c.useFlowContext(),u={};a.forEach(l=>{const x=n.instructions.get(l.type);Object.assign(u,x.components)});const m=h.useMemo(()=>new b.Schema({properties:{drawer:{type:"void",title:`{{t("User interface", { ns: "${g}" })}}`,"x-decorator":"Form","x-component":"Action.Drawer","x-component-props":{className:e.css`
|
|
2
11
|
.ant-drawer-body {
|
|
3
12
|
background: var(--nb-box-bg);
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare function AssigneesSelect({ multiple, value, onChange }: {
|
|
3
11
|
multiple?: boolean;
|
|
@@ -1,2 +1,10 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare function FormBlockInitializer(): React.JSX.Element;
|
|
@@ -1,2 +1,10 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare function FormBlockProvider(props: any): React.JSX.Element;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare function ModeConfig({ value, onChange }: {
|
|
3
11
|
value: any;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ISchema } from '@formily/react';
|
|
2
10
|
import React from 'react';
|
|
3
11
|
import { CompatibleSchemaInitializer, SchemaInitializerItemType } from '@nocobase/client';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare function createManualFormBlockUISchema(options: any): import("@formily/json-schema").Stringify<{
|
|
2
10
|
[key: symbol]: any;
|
|
3
11
|
[key: `x-${string}`]: any;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ManualFormType } from '../SchemaConfig';
|
|
2
10
|
declare const _default: ManualFormType;
|
|
3
11
|
export default _default;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { CompatibleSchemaInitializer } from '@nocobase/client';
|
|
2
10
|
import { ManualFormType } from '../SchemaConfig';
|
|
3
11
|
/**
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ManualFormType } from '../SchemaConfig';
|
|
2
10
|
declare const _default: ManualFormType;
|
|
3
11
|
export default _default;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { SchemaInitializerItemType } from '@nocobase/client';
|
|
2
10
|
import { Instruction } from '@nocobase/plugin-workflow/client';
|
|
3
11
|
import { SchemaConfig, SchemaConfigButton } from './SchemaConfig';
|
|
@@ -1 +1,9 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare function findSchema(schema: any, filter: any, onlyLeaf?: boolean): any[];
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
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
|
+
|
|
1
10
|
module.exports = {
|
|
2
11
|
"@formily/react": "2.3.0",
|
|
3
12
|
"antd": "5.12.8",
|
|
4
13
|
"dayjs": "1.11.10",
|
|
5
14
|
"react": "18.2.0",
|
|
6
|
-
"@nocobase/client": "1.0.0-alpha.
|
|
7
|
-
"@nocobase/plugin-workflow": "1.0.0-alpha.
|
|
15
|
+
"@nocobase/client": "1.0.0-alpha.4",
|
|
16
|
+
"@nocobase/plugin-workflow": "1.0.0-alpha.4",
|
|
8
17
|
"@ant-design/icons": "5.2.6",
|
|
9
18
|
"react-i18next": "11.18.6",
|
|
10
|
-
"@nocobase/utils": "1.0.0-alpha.
|
|
11
|
-
"@nocobase/server": "1.0.0-alpha.
|
|
12
|
-
"@nocobase/actions": "1.0.0-alpha.
|
|
13
|
-
"@nocobase/resourcer": "1.0.0-alpha.
|
|
14
|
-
"@nocobase/plugin-workflow-test": "1.0.0-alpha.
|
|
15
|
-
"@nocobase/test": "1.0.0-alpha.
|
|
19
|
+
"@nocobase/utils": "1.0.0-alpha.4",
|
|
20
|
+
"@nocobase/server": "1.0.0-alpha.4",
|
|
21
|
+
"@nocobase/actions": "1.0.0-alpha.4",
|
|
22
|
+
"@nocobase/resourcer": "1.0.0-alpha.4",
|
|
23
|
+
"@nocobase/plugin-workflow-test": "1.0.0-alpha.4",
|
|
24
|
+
"@nocobase/test": "1.0.0-alpha.4",
|
|
16
25
|
"@formily/core": "2.3.0",
|
|
17
26
|
"@formily/antd-v5": "1.1.9",
|
|
18
|
-
"@nocobase/database": "1.0.0-alpha.
|
|
27
|
+
"@nocobase/database": "1.0.0-alpha.4",
|
|
19
28
|
"lodash": "4.17.21"
|
|
20
29
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export * from './server';
|
|
2
10
|
export { default } from './server';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/locale/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const NAMESPACE = "workflow-manual";
|
|
2
10
|
export declare function useLang(key: string, options?: {}): string;
|
|
3
11
|
export declare const lang: typeof useLang;
|
package/dist/locale/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Registry } from '@nocobase/utils';
|
|
2
10
|
import WorkflowPlugin, { Processor, Instruction } from '@nocobase/plugin-workflow';
|
|
3
11
|
import { FormHandler } from './forms';
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Plugin } from '@nocobase/server';
|
|
2
10
|
export default class extends Plugin {
|
|
3
11
|
load(): Promise<void>;
|
package/dist/server/Plugin.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/server/actions.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Context } from '@nocobase/actions';
|
|
2
10
|
export declare function submit(context: Context, next: any): Promise<never>;
|
package/dist/server/actions.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,2 +1,10 @@
|
|
|
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
|
+
*/
|
|
1
9
|
declare const _default: import("@nocobase/database").CollectionOptions;
|
|
2
10
|
export default _default;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
declare const _default: {
|
|
2
10
|
collectionOptions: import("@nocobase/database").CollectionOptions;
|
|
3
11
|
mergeOptions: import("deepmerge").Options;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
declare const _default: {
|
|
2
10
|
collectionOptions: import("@nocobase/database").CollectionOptions;
|
|
3
11
|
mergeOptions: import("deepmerge").Options;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Processor } from '@nocobase/plugin-workflow';
|
|
2
10
|
import ManualInstruction from '../ManualInstruction';
|
|
3
11
|
export default function (this: ManualInstruction, instance: any, { dataSource, collection }: {
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Processor } from '@nocobase/plugin-workflow';
|
|
2
10
|
import ManualInstruction from '../ManualInstruction';
|
|
3
11
|
export type FormHandler = (this: ManualInstruction, instance: any, formConfig: any, processor: Processor) => Promise<void>;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Processor } from '@nocobase/plugin-workflow';
|
|
2
10
|
import ManualInstruction from '../ManualInstruction';
|
|
3
11
|
export default function (this: ManualInstruction, instance: any, { dataSource, collection, filter }: {
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export { default } from './Plugin';
|
package/dist/server/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Migration } from '@nocobase/server';
|
|
2
10
|
export default class extends Migration {
|
|
3
11
|
appVersion: string;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|