@nocobase/plugin-workflow 1.3.50-beta → 1.3.52

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.
@@ -456,7 +456,7 @@
456
456
  `},"x-component":"CollectionFieldset"},Ze={type:"object",title:'{{t("Filter")}}',"x-decorator":"FormItem","x-component":"Filter","x-use-component-props":()=>{const{values:e}=O.useForm(),[t,o]=l.parseCollectionName(e==null?void 0:e.collection);return{options:l.useCollectionFilterOptions(o,t),className:l.css`
457
457
  position: relative;
458
458
  width: 100%;
459
- `}},"x-component-props":{dynamicComponent:"FilterDynamicComponent"}},Nn={type:"array",title:'{{t("Sort")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:"{{useSortableFields()}}",required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260}}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:'{{t("ASC")}}',value:"asc"},{label:'{{t("DESC")}}',value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:'{{t("Add sort field")}}',"x-component":"ArrayItems.Addition"}}},Dn={type:"void",title:'{{t("Pagination")}}',"x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{page:{type:"void","x-component":"Grid.Col",properties:{page:{type:"number",title:'{{t("Page number")}}',"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["number","null"]},default:1}}},pageSize:{type:"void","x-component":"Grid.Col",properties:{pageSize:{type:"number",title:'{{t("Page size")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:100},default:20}}}}}}},je={type:"array",title:`{{t("Preload associations", { ns: "${p}" })}}`,description:`{{t("Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"AppendsTreeSelect","x-component-props":{title:"Preload associations",multiple:!0,useCollection(){const{values:e}=O.useForm();return e==null?void 0:e.collection}},"x-reactions":[{dependencies:["collection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]},Te={label:"label",value:"value",children:"children"},En=e=>[{key:"yesterday",value:"yesterday",label:e("Yesterday")},{key:"today",value:"today",label:e("Today")},{key:"tomorrow",value:"tomorrow",label:e("Tomorrow")},{key:"lastWeek",value:"lastWeek",label:e("Last week")},{key:"thisWeek",value:"thisWeek",label:e("This week")},{key:"nextWeek",value:"nextWeek",label:e("Next week")},{key:"lastMonth",value:"lastMonth",label:e("Last month")},{key:"thisMonth",value:"thisMonth",label:e("This month")},{key:"nextMonth",value:"nextMonth",label:e("Next month")},{key:"lastQuarter",value:"lastQuarter",label:e("Last quarter")},{key:"thisQuarter",value:"thisQuarter",label:e("This quarter")},{key:"nextQuarter",value:"nextQuarter",label:e("Next quarter")},{key:"lastYear",value:"lastYear",label:e("Last year")},{key:"thisYear",value:"thisYear",label:e("This year")},{key:"nextYear",value:"nextYear",label:e("Next year")},{key:"last7Days",value:"last7Days",label:e("Last 7 days")},{key:"next7Days",value:"next7Days",label:e("Next 7 days")},{key:"last30Days",value:"last30Days",label:e("Last 30 days")},{key:"next30Days",value:"next30Days",label:e("Next 30 days")},{key:"last90Days",value:"last90Days",label:e("Last 90 days")},{key:"next90Days",value:"next90Days",label:e("Next 90 days")}],eo={label:`{{t("Node result", { ns: "${p}" })}}`,value:"$jobsMapByNodeKey",useOptions(e){const{instructions:t}=l.usePlugin(ue),o=xe(),r=zt(o),s=[];return r.forEach(i=>{var u;const a=t.get(i.type),c=(u=a.useVariables)==null?void 0:u.call(a,i,e);c&&s.push(c)}),s}},to={label:`{{t("Trigger variables", { ns: "${p}" })}}`,value:"$context",useOptions(e){var s,i;const{triggers:t}=l.usePlugin(ue),{workflow:o}=H(),r=t.get(o.type);return(i=(s=r==null?void 0:r.useVariables)==null?void 0:s.call(r,o.config,e))!=null?i:null}},oo={label:`{{t("Scope variables", { ns: "${p}" })}}`,value:"$scopes",useOptions(e){const{fieldNames:t=Te,current:o}=e,{instructions:r}=l.usePlugin(ue),s=xe(),i=o!=null?o:s,a=Jt(i),c=[];return a.forEach(u=>{var y,x;const d=r.get(u.type),f=(y=d.useScopeVariables)==null?void 0:y.call(d,u,e);f&&c.push({key:u.key,[t.value]:u.key,[t.label]:(x=u.title)!=null?x:`#${u.id}`,[t.children]:f})}),c}},no={label:`{{t("System variables", { ns: "${p}" })}}`,value:"$system",useOptions({types:e,fieldNames:t=Te}){const{t:o}=q.useTranslation();return[...!e||e.includes("date")?[{key:"now",[t.label]:N("System time"),[t.value]:"now"},{key:"dateRange",[t.label]:N("Date range"),[t.value]:"dateRange",children:En(o)}]:[]]}},Qe={boolean:new Set(["checkbox"]),number:new Set(["integer","number","percent"]),string:new Set(["input","password","email","phone","select","radioGroup","text","markdown","richText","expression","time"]),date:new Set(["date","createdAt","updatedAt"])};function ro(e,t){var o,r,s,i,a,c;return typeof t=="string"?(o=Qe[t])==null?void 0:o.has(e.interface):typeof t=="object"&&t.type==="reference"?Ot(e)?((r=t.options)==null?void 0:r.entity)&&(e.collectionName===((s=t.options)==null?void 0:s.collection)||((i=t.options)==null?void 0:i.collection)==="*"):e.isForeignKey?e.collectionName===((a=t.options)==null?void 0:a.collection)&&e.name==="id"||e.target===((c=t.options)==null?void 0:c.collection):!1:typeof t=="function"?t(e):!1}function Ot(e){return["belongsTo","hasOne","hasMany","belongsToMany","belongsToArray"].includes(e.type)}function Nt(e,t){if(t==null)return null;const o=`${e.name}.`;return t.filter(r=>r.startsWith(o)).map(r=>r.replace(o,""))}function Dt({fields:e,types:t,appends:o,depth:r=1,compile:s,getCollectionFields:i}){return e.filter(a=>{const c=t!=null&&t.length?t.some(u=>ro(a,u)):!0;if(Ot(a)){if(o===null)return r?c||Dt({fields:Et(a.target,{compile:s,getCollectionFields:i}),types:t,depth:r-1,appends:o,compile:s,getCollectionFields:i}):!1;const u=Nt(a,o),d=o.includes(a.name);return c?d:((u==null?void 0:u.length)||d)&&Dt({fields:Et(a.target,{compile:s,getCollectionFields:i}),types:t,appends:u,compile:s,getCollectionFields:i}).length}else return c})}function Xe(e,t){var i,a;const o=l.useCompile(),r=(a=(i=e.useOptions)==null?void 0:i.call(e,t))==null?void 0:a.filter(Boolean),{fieldNames:s}=t;return{[s.label]:o(e.label),[s.value]:e.value,key:e[s.value],[s.children]:r,disabled:!r||!r.length}}function me(e={}){var s;const t=Object.assign({},Te,(s=e.fieldNames)!=null?s:{}),o=Object.assign(e,{fieldNames:t});return[Xe(oo,o),Xe(eo,o),Xe(to,o),Xe(no,o)]}function Et(e,{compile:t,getCollectionFields:o}){var d,f,y,x;const[r,s]=l.parseCollectionName(e),i=o(s,r),a=[],c=[];i.forEach(b=>{if(b.isForeignKey&&!b.primaryKey)a.push(b);else{const m=i.find(k=>k.name===b.foreignKey);m&&a.push(m),c.push(b)}});const u=Ae.uniqBy(a,"name");for(let b=c.length-1;b>=0;b--){const m=c[b];if(m.type==="belongsTo"){const k=u.findIndex(T=>T.name===m.foreignKey);if(k>-1){const T=u[k];c.splice(b,0,A(C(C({},m),T),{uiSchema:A(C({},m.uiSchema),{title:(d=T.uiSchema)!=null&&d.title?t((f=T.uiSchema)==null?void 0:f.title):T.name})})),u.splice(k,1)}else c.splice(b,0,A(C({},m),{name:m.foreignKey,type:"bigInt",isForeignKey:!0,interface:m.interface,uiSchema:A(C({},m.uiSchema),{title:(y=m.uiSchema)!=null&&y.title?`${t((x=m.uiSchema)==null?void 0:x.title)} ID`:m.name})}))}else m.type==="context"&&m.collectionName==="users"&&c.splice(b,1)}return c.push(...u),Ae.uniqBy(c,"name").filter(b=>b.interface&&!b.hidden)}function $n(e){const t=Nt(e.field,e.appends),o=Fe(C({collection:`${e.field.dataSourceKey&&e.field.dataSourceKey!=="main"?`${e.field.dataSourceKey}:`:""}${e.field.target}`,types:e.types,appends:t,depth:e.depth-1},this));e.loadChildren=null,o.length?e.children=o:(e.isLeaf=!0,!e.types||e.types.some(s=>ro(e.field,s))||(e.disabled=!0))}function Fe(e){const{fields:t,collection:o,types:r,appends:s=[],depth:i=1,compile:a,getCollectionFields:c,fieldNames:u=Te}=e,d=t!=null?t:Et(o,{compile:a,getCollectionFields:c}),f=$n.bind({compile:a,getCollectionFields:c,fieldNames:u});return Dt({fields:d,types:r,depth:i,appends:s,compile:a,getCollectionFields:c}).map(x=>{var T;const b=a(((T=x.uiSchema)==null?void 0:T.title)||x.name),m=Nt(x,s),k=!Ot(x)||m&&!m.length&&!s.includes(x.name)||!1;return{[u.label]:b,key:x.name,[u.value]:x.name,isLeaf:k,loadChildren:k?null:f,field:x,depth:i,appends:s,types:r}})}function We(e){const t=l.useApp(),{collectionManager:o}=t.dataSourceManager.getDataSource(e);return g.useCallback(r=>o.getCollectionAllFields(r),[o])}function so(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.Input,C({scope:s},t))}function $t(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.TextArea,C({scope:s},t))}function In(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.RawTextArea,C({scope:s},t))}function Mn(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.JSON,C({scope:s},t))}function Pn(){const e=l.useAPIClient(),t=O.useForm(),{field:o,__parent:r}=l.useBlockRequestContext(),{setVisible:s}=l.useActionContext(),i=se.useNavigate(),a=O.useFieldSchema(),c=O.useField(),u=l.useCompile(),{modal:d}=h.App.useApp(),f=l.useCollectValuesToSubmit(),y=c.componentProps.filterKeys||[];return{onClick(){return J(this,null,function*(){var B,S,E;const{onSuccess:b,skipValidator:m,triggerWorkflows:k}=(B=a==null?void 0:a["x-action-settings"])!=null?B:{};m||(yield t.submit());const T=yield f();c.data=o.data||{},c.data.loading=!0;try{const L=yield e.resource("workflows").trigger({values:T,filterKeys:y,triggerWorkflows:k!=null&&k.length?k.map($=>[$.workflowKey,$.context].filter(Boolean).join("!")).join(","):void 0});if(c.data.loading=!1,c.data.data=L,(E=(S=r==null?void 0:r.service)==null?void 0:S.refresh)==null||E.call(S),s==null||s(!1),!(b!=null&&b.successMessage))return;b!=null&&b.manualClose?d.success({title:u(b==null?void 0:b.successMessage),onOk:()=>J(this,null,function*(){yield t.reset(),b!=null&&b.redirecting&&(b!=null&&b.redirectTo)&&(oe.isURL(b.redirectTo)?window.location.href=b.redirectTo:i(b.redirectTo))})}):h.message.success(u(b==null?void 0:b.successMessage))}catch(L){c.data.loading=!1}})}}}function Bn(){var b;const e=l.useCompile(),t=l.useAPIClient(),o=l.useRecord(),r=O.useField(),s=O.useFieldSchema(),{field:i,__parent:a}=l.useBlockRequestContext(),{setVisible:c,setSubmitted:u}=l.useActionContext(),{modal:d}=h.App.useApp(),f=se.useNavigate(),{onSuccess:y,triggerWorkflows:x}=(b=s==null?void 0:s["x-action-settings"])!=null?b:{};return{onClick(k,T){return J(this,null,function*(){r.data=i.data||{},r.data.loading=!0;try{if(yield t.resource("workflows").trigger({values:o,triggerWorkflows:x!=null&&x.length?x.map(B=>[B.workflowKey,B.context].filter(Boolean).join("!")).join(","):void 0}),T&&T(),c==null||c(!1),u==null||u(!0),!(y!=null&&y.successMessage))return;if(y!=null&&y.manualClose){let B;d.success({title:e(y==null?void 0:y.successMessage),onOk(){return J(this,null,function*(){y!=null&&y.redirecting&&(y!=null&&y.redirectTo)&&(oe.isURL(y.redirectTo)?window.location.href=y.redirectTo:f(y.redirectTo))})}})}else h.message.success(e(y==null?void 0:y.successMessage))}catch(B){console.error(B)}finally{r.data.loading=!1}})}}}function Vn(){const{workflow:e}=H();return!!(e!=null&&e.executed)}function lo(){const{workflow:e}=H();return!!(e!=null&&e.allExecuted)}const Ce={CREATED:1,UPDATED:2,SAVED:3,DELETED:4},jn=[{label:`{{t("After record added", { ns: "${p}" })}}`,value:Ce.CREATED},{label:`{{t("After record updated", { ns: "${p}" })}}`,value:Ce.UPDATED},{label:`{{t("After record added or updated", { ns: "${p}" })}}`,value:Ce.SAVED},{label:`{{t("After record deleted", { ns: "${p}" })}}`,value:Ce.DELETED}];function Wn(e,t){var u;const[o,r]=l.parseCollectionName(e.collection),s=l.useCompile(),i=We(o),a=[{collectionName:r,name:"data",type:"hasOne",target:r,uiSchema:{title:N("Trigger data")}}];return Fe(A(C({appends:["data",...((u=e.appends)==null?void 0:u.map(d=>`data.${d}`))||[]]},t),{fields:a,compile:s,getCollectionFields:i}))}class Ln extends kt{constructor(){super(...arguments);w(this,"title",`{{t("Collection event", { ns: "${p}" })}}`);w(this,"description",`{{t('Triggered when data changes in the collection, such as after adding, updating, or deleting a record. Unlike "Post-action event", Collection event listens for data changes rather than HTTP requests. Unless you understand the exact meaning, it is recommended to use "Post-action event".', { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":"{{ useWorkflowAnyExecuted() }}","x-component-props":{dataSourceFilter(o){return o.options.key==="main"||o.options.isDBInstance}},"x-reactions":[...ce["x-reactions"],{target:"changed",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}},{target:"condition",effects:["onFieldValueChange"],fulfill:{state:{value:null}}},{target:"appends",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}}]}),mode:{type:"number",title:`{{t("Trigger on", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"Select","x-component-props":{popupMatchSelectWidth:!1,placeholder:`{{t("Trigger on", { ns: "${p}" })}}`,className:"auto-width"},enum:jn,required:!0,"x-reactions":[{dependencies:["collection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]},changed:{type:"array",title:`{{t("Changed fields", { ns: "${p}" })}}`,description:`{{t("Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"FieldsSelect","x-component-props":{mode:"multiple",placeholder:'{{t("Select field")}}',filter(o){return!o.hidden&&(o.uiSchema?!o.uiSchema["x-read-pretty"]:!0)&&!["linkTo","hasOne","hasMany","belongsToMany"].includes(o.type)}},"x-reactions":[{dependencies:["collection","mode"],fulfill:{state:{visible:`{{!!$deps[0] && ($deps[1] & ${Ce.UPDATED})}}`}}}]},condition:A(C({},Ze),{title:`{{t("Only triggers when match conditions", { ns: "${p}" })}}`,"x-component-props":{},"x-reactions":[{dependencies:["collection","mode"],fulfill:{state:{visible:`{{!!$deps[0] && !($deps[1] & ${Ce.DELETED})}}`}}}]}),appends:A(C({},je),{"x-reactions":[...je["x-reactions"],{dependencies:["mode"],fulfill:{state:{visible:`{{!($deps[0] & ${Ce.DELETED})}}`}}}]})});w(this,"scope",{useCollectionDataSource:l.useCollectionDataSource,useWorkflowAnyExecuted:lo});w(this,"components",{FieldsSelect:Ft});w(this,"useVariables",Wn)}useInitializers(o){return o.collection?{name:"triggerData",type:"item",key:"triggerData",title:`{{t("Trigger data", { ns: "${p}" })}}`,Component:Ve,collection:o.collection,dataPath:"$context.data"}:null}}const ke={STATIC:0,DATE_FIELD:1};function zn(e){return!e.hidden&&(e.uiSchema?e.type==="date":!1)}function ao({value:e,onChange:t}){const o=e!=null?e:{},{t:r}=q.useTranslation(),[s,i]=g.useState(o.offset?o.offset/Math.abs(o.offset):0);return n.jsxs("fieldset",{className:l.css`
459
+ `}},"x-component-props":{dynamicComponent:"FilterDynamicComponent"}},Nn={type:"array",title:'{{t("Sort")}}',"x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:"{{useSortableFields()}}",required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260}}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:'{{t("ASC")}}',value:"asc"},{label:'{{t("DESC")}}',value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:'{{t("Add sort field")}}',"x-component":"ArrayItems.Addition"}}},Dn={type:"void",title:'{{t("Pagination")}}',"x-decorator":"SchemaComponentContext.Provider","x-decorator-props":{value:{designable:!1}},"x-component":"Grid",properties:{row:{type:"void","x-component":"Grid.Row",properties:{page:{type:"void","x-component":"Grid.Col",properties:{page:{type:"number",title:'{{t("Page number")}}',"x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{useTypedConstant:["number","null"]},default:1}}},pageSize:{type:"void","x-component":"Grid.Col",properties:{pageSize:{type:"number",title:'{{t("Page size")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1},default:20}}}}}}},je={type:"array",title:`{{t("Preload associations", { ns: "${p}" })}}`,description:`{{t("Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"AppendsTreeSelect","x-component-props":{title:"Preload associations",multiple:!0,useCollection(){const{values:e}=O.useForm();return e==null?void 0:e.collection}},"x-reactions":[{dependencies:["collection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]},Te={label:"label",value:"value",children:"children"},En=e=>[{key:"yesterday",value:"yesterday",label:e("Yesterday")},{key:"today",value:"today",label:e("Today")},{key:"tomorrow",value:"tomorrow",label:e("Tomorrow")},{key:"lastWeek",value:"lastWeek",label:e("Last week")},{key:"thisWeek",value:"thisWeek",label:e("This week")},{key:"nextWeek",value:"nextWeek",label:e("Next week")},{key:"lastMonth",value:"lastMonth",label:e("Last month")},{key:"thisMonth",value:"thisMonth",label:e("This month")},{key:"nextMonth",value:"nextMonth",label:e("Next month")},{key:"lastQuarter",value:"lastQuarter",label:e("Last quarter")},{key:"thisQuarter",value:"thisQuarter",label:e("This quarter")},{key:"nextQuarter",value:"nextQuarter",label:e("Next quarter")},{key:"lastYear",value:"lastYear",label:e("Last year")},{key:"thisYear",value:"thisYear",label:e("This year")},{key:"nextYear",value:"nextYear",label:e("Next year")},{key:"last7Days",value:"last7Days",label:e("Last 7 days")},{key:"next7Days",value:"next7Days",label:e("Next 7 days")},{key:"last30Days",value:"last30Days",label:e("Last 30 days")},{key:"next30Days",value:"next30Days",label:e("Next 30 days")},{key:"last90Days",value:"last90Days",label:e("Last 90 days")},{key:"next90Days",value:"next90Days",label:e("Next 90 days")}],eo={label:`{{t("Node result", { ns: "${p}" })}}`,value:"$jobsMapByNodeKey",useOptions(e){const{instructions:t}=l.usePlugin(ue),o=xe(),r=zt(o),s=[];return r.forEach(i=>{var u;const a=t.get(i.type),c=(u=a.useVariables)==null?void 0:u.call(a,i,e);c&&s.push(c)}),s}},to={label:`{{t("Trigger variables", { ns: "${p}" })}}`,value:"$context",useOptions(e){var s,i;const{triggers:t}=l.usePlugin(ue),{workflow:o}=H(),r=t.get(o.type);return(i=(s=r==null?void 0:r.useVariables)==null?void 0:s.call(r,o.config,e))!=null?i:null}},oo={label:`{{t("Scope variables", { ns: "${p}" })}}`,value:"$scopes",useOptions(e){const{fieldNames:t=Te,current:o}=e,{instructions:r}=l.usePlugin(ue),s=xe(),i=o!=null?o:s,a=Jt(i),c=[];return a.forEach(u=>{var y,x;const d=r.get(u.type),f=(y=d.useScopeVariables)==null?void 0:y.call(d,u,e);f&&c.push({key:u.key,[t.value]:u.key,[t.label]:(x=u.title)!=null?x:`#${u.id}`,[t.children]:f})}),c}},no={label:`{{t("System variables", { ns: "${p}" })}}`,value:"$system",useOptions({types:e,fieldNames:t=Te}){const{t:o}=q.useTranslation();return[...!e||e.includes("date")?[{key:"now",[t.label]:N("System time"),[t.value]:"now"},{key:"dateRange",[t.label]:N("Date range"),[t.value]:"dateRange",children:En(o)}]:[]]}},Qe={boolean:new Set(["checkbox"]),number:new Set(["integer","number","percent"]),string:new Set(["input","password","email","phone","select","radioGroup","text","markdown","richText","expression","time"]),date:new Set(["date","createdAt","updatedAt"])};function ro(e,t){var o,r,s,i,a,c;return typeof t=="string"?(o=Qe[t])==null?void 0:o.has(e.interface):typeof t=="object"&&t.type==="reference"?Ot(e)?((r=t.options)==null?void 0:r.entity)&&(e.collectionName===((s=t.options)==null?void 0:s.collection)||((i=t.options)==null?void 0:i.collection)==="*"):e.isForeignKey?e.collectionName===((a=t.options)==null?void 0:a.collection)&&e.name==="id"||e.target===((c=t.options)==null?void 0:c.collection):!1:typeof t=="function"?t(e):!1}function Ot(e){return["belongsTo","hasOne","hasMany","belongsToMany","belongsToArray"].includes(e.type)}function Nt(e,t){if(t==null)return null;const o=`${e.name}.`;return t.filter(r=>r.startsWith(o)).map(r=>r.replace(o,""))}function Dt({fields:e,types:t,appends:o,depth:r=1,compile:s,getCollectionFields:i}){return e.filter(a=>{const c=t!=null&&t.length?t.some(u=>ro(a,u)):!0;if(Ot(a)){if(o===null)return r?c||Dt({fields:Et(a.target,{compile:s,getCollectionFields:i}),types:t,depth:r-1,appends:o,compile:s,getCollectionFields:i}):!1;const u=Nt(a,o),d=o.includes(a.name);return c?d:((u==null?void 0:u.length)||d)&&Dt({fields:Et(a.target,{compile:s,getCollectionFields:i}),types:t,appends:u,compile:s,getCollectionFields:i}).length}else return c})}function Xe(e,t){var i,a;const o=l.useCompile(),r=(a=(i=e.useOptions)==null?void 0:i.call(e,t))==null?void 0:a.filter(Boolean),{fieldNames:s}=t;return{[s.label]:o(e.label),[s.value]:e.value,key:e[s.value],[s.children]:r,disabled:!r||!r.length}}function me(e={}){var s;const t=Object.assign({},Te,(s=e.fieldNames)!=null?s:{}),o=Object.assign(e,{fieldNames:t});return[Xe(oo,o),Xe(eo,o),Xe(to,o),Xe(no,o)]}function Et(e,{compile:t,getCollectionFields:o}){var d,f,y,x;const[r,s]=l.parseCollectionName(e),i=o(s,r),a=[],c=[];i.forEach(b=>{if(b.isForeignKey&&!b.primaryKey)a.push(b);else{const m=i.find(k=>k.name===b.foreignKey);m&&a.push(m),c.push(b)}});const u=Ae.uniqBy(a,"name");for(let b=c.length-1;b>=0;b--){const m=c[b];if(m.type==="belongsTo"){const k=u.findIndex(T=>T.name===m.foreignKey);if(k>-1){const T=u[k];c.splice(b,0,A(C(C({},m),T),{uiSchema:A(C({},m.uiSchema),{title:(d=T.uiSchema)!=null&&d.title?t((f=T.uiSchema)==null?void 0:f.title):T.name})})),u.splice(k,1)}else c.splice(b,0,A(C({},m),{name:m.foreignKey,type:"bigInt",isForeignKey:!0,interface:m.interface,uiSchema:A(C({},m.uiSchema),{title:(y=m.uiSchema)!=null&&y.title?`${t((x=m.uiSchema)==null?void 0:x.title)} ID`:m.name})}))}else m.type==="context"&&m.collectionName==="users"&&c.splice(b,1)}return c.push(...u),Ae.uniqBy(c,"name").filter(b=>b.interface&&!b.hidden)}function $n(e){const t=Nt(e.field,e.appends),o=Fe(C({collection:`${e.field.dataSourceKey&&e.field.dataSourceKey!=="main"?`${e.field.dataSourceKey}:`:""}${e.field.target}`,types:e.types,appends:t,depth:e.depth-1},this));e.loadChildren=null,o.length?e.children=o:(e.isLeaf=!0,!e.types||e.types.some(s=>ro(e.field,s))||(e.disabled=!0))}function Fe(e){const{fields:t,collection:o,types:r,appends:s=[],depth:i=1,compile:a,getCollectionFields:c,fieldNames:u=Te}=e,d=t!=null?t:Et(o,{compile:a,getCollectionFields:c}),f=$n.bind({compile:a,getCollectionFields:c,fieldNames:u});return Dt({fields:d,types:r,depth:i,appends:s,compile:a,getCollectionFields:c}).map(x=>{var T;const b=a(((T=x.uiSchema)==null?void 0:T.title)||x.name),m=Nt(x,s),k=!Ot(x)||m&&!m.length&&!s.includes(x.name)||!1;return{[u.label]:b,key:x.name,[u.value]:x.name,isLeaf:k,loadChildren:k?null:f,field:x,depth:i,appends:s,types:r}})}function We(e){const t=l.useApp(),{collectionManager:o}=t.dataSourceManager.getDataSource(e);return g.useCallback(r=>o.getCollectionAllFields(r),[o])}function so(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.Input,C({scope:s},t))}function $t(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.TextArea,C({scope:s},t))}function In(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.RawTextArea,C({scope:s},t))}function Mn(o){var r=o,{variableOptions:e}=r,t=Z(r,["variableOptions"]);const s=me(e);return n.jsx(l.Variable.JSON,C({scope:s},t))}function Pn(){const e=l.useAPIClient(),t=O.useForm(),{field:o,__parent:r}=l.useBlockRequestContext(),{setVisible:s}=l.useActionContext(),i=se.useNavigate(),a=O.useFieldSchema(),c=O.useField(),u=l.useCompile(),{modal:d}=h.App.useApp(),f=l.useCollectValuesToSubmit(),y=c.componentProps.filterKeys||[];return{onClick(){return J(this,null,function*(){var B,S,E;const{onSuccess:b,skipValidator:m,triggerWorkflows:k}=(B=a==null?void 0:a["x-action-settings"])!=null?B:{};m||(yield t.submit());const T=yield f();c.data=o.data||{},c.data.loading=!0;try{const L=yield e.resource("workflows").trigger({values:T,filterKeys:y,triggerWorkflows:k!=null&&k.length?k.map($=>[$.workflowKey,$.context].filter(Boolean).join("!")).join(","):void 0});if(c.data.loading=!1,c.data.data=L,(E=(S=r==null?void 0:r.service)==null?void 0:S.refresh)==null||E.call(S),s==null||s(!1),!(b!=null&&b.successMessage))return;b!=null&&b.manualClose?d.success({title:u(b==null?void 0:b.successMessage),onOk:()=>J(this,null,function*(){yield t.reset(),b!=null&&b.redirecting&&(b!=null&&b.redirectTo)&&(oe.isURL(b.redirectTo)?window.location.href=b.redirectTo:i(b.redirectTo))})}):h.message.success(u(b==null?void 0:b.successMessage))}catch(L){c.data.loading=!1}})}}}function Bn(){var b;const e=l.useCompile(),t=l.useAPIClient(),o=l.useRecord(),r=O.useField(),s=O.useFieldSchema(),{field:i,__parent:a}=l.useBlockRequestContext(),{setVisible:c,setSubmitted:u}=l.useActionContext(),{modal:d}=h.App.useApp(),f=se.useNavigate(),{onSuccess:y,triggerWorkflows:x}=(b=s==null?void 0:s["x-action-settings"])!=null?b:{};return{onClick(k,T){return J(this,null,function*(){r.data=i.data||{},r.data.loading=!0;try{if(yield t.resource("workflows").trigger({values:o,triggerWorkflows:x!=null&&x.length?x.map(B=>[B.workflowKey,B.context].filter(Boolean).join("!")).join(","):void 0}),T&&T(),c==null||c(!1),u==null||u(!0),!(y!=null&&y.successMessage))return;if(y!=null&&y.manualClose){let B;d.success({title:e(y==null?void 0:y.successMessage),onOk(){return J(this,null,function*(){y!=null&&y.redirecting&&(y!=null&&y.redirectTo)&&(oe.isURL(y.redirectTo)?window.location.href=y.redirectTo:f(y.redirectTo))})}})}else h.message.success(e(y==null?void 0:y.successMessage))}catch(B){console.error(B)}finally{r.data.loading=!1}})}}}function Vn(){const{workflow:e}=H();return!!(e!=null&&e.executed)}function lo(){const{workflow:e}=H();return!!(e!=null&&e.allExecuted)}const Ce={CREATED:1,UPDATED:2,SAVED:3,DELETED:4},jn=[{label:`{{t("After record added", { ns: "${p}" })}}`,value:Ce.CREATED},{label:`{{t("After record updated", { ns: "${p}" })}}`,value:Ce.UPDATED},{label:`{{t("After record added or updated", { ns: "${p}" })}}`,value:Ce.SAVED},{label:`{{t("After record deleted", { ns: "${p}" })}}`,value:Ce.DELETED}];function Wn(e,t){var u;const[o,r]=l.parseCollectionName(e.collection),s=l.useCompile(),i=We(o),a=[{collectionName:r,name:"data",type:"hasOne",target:r,uiSchema:{title:N("Trigger data")}}];return Fe(A(C({appends:["data",...((u=e.appends)==null?void 0:u.map(d=>`data.${d}`))||[]]},t),{fields:a,compile:s,getCollectionFields:i}))}class Ln extends kt{constructor(){super(...arguments);w(this,"title",`{{t("Collection event", { ns: "${p}" })}}`);w(this,"description",`{{t('Triggered when data changes in the collection, such as after adding, updating, or deleting a record. Unlike "Post-action event", Collection event listens for data changes rather than HTTP requests. Unless you understand the exact meaning, it is recommended to use "Post-action event".', { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":"{{ useWorkflowAnyExecuted() }}","x-component-props":{dataSourceFilter(o){return o.options.key==="main"||o.options.isDBInstance}},"x-reactions":[...ce["x-reactions"],{target:"changed",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}},{target:"condition",effects:["onFieldValueChange"],fulfill:{state:{value:null}}},{target:"appends",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}}]}),mode:{type:"number",title:`{{t("Trigger on", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"Select","x-component-props":{popupMatchSelectWidth:!1,placeholder:`{{t("Trigger on", { ns: "${p}" })}}`,className:"auto-width"},enum:jn,required:!0,"x-reactions":[{dependencies:["collection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]},changed:{type:"array",title:`{{t("Changed fields", { ns: "${p}" })}}`,description:`{{t("Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"FieldsSelect","x-component-props":{mode:"multiple",placeholder:'{{t("Select field")}}',filter(o){return!o.hidden&&(o.uiSchema?!o.uiSchema["x-read-pretty"]:!0)&&!["linkTo","hasOne","hasMany","belongsToMany"].includes(o.type)}},"x-reactions":[{dependencies:["collection","mode"],fulfill:{state:{visible:`{{!!$deps[0] && ($deps[1] & ${Ce.UPDATED})}}`}}}]},condition:A(C({},Ze),{title:`{{t("Only triggers when match conditions", { ns: "${p}" })}}`,"x-component-props":{},"x-reactions":[{dependencies:["collection","mode"],fulfill:{state:{visible:`{{!!$deps[0] && !($deps[1] & ${Ce.DELETED})}}`}}}]}),appends:A(C({},je),{"x-reactions":[...je["x-reactions"],{dependencies:["mode"],fulfill:{state:{visible:`{{!($deps[0] & ${Ce.DELETED})}}`}}}]})});w(this,"scope",{useCollectionDataSource:l.useCollectionDataSource,useWorkflowAnyExecuted:lo});w(this,"components",{FieldsSelect:Ft});w(this,"useVariables",Wn)}useInitializers(o){return o.collection?{name:"triggerData",type:"item",key:"triggerData",title:`{{t("Trigger data", { ns: "${p}" })}}`,Component:Ve,collection:o.collection,dataPath:"$context.data"}:null}}const ke={STATIC:0,DATE_FIELD:1};function zn(e){return!e.hidden&&(e.uiSchema?e.type==="date":!1)}function ao({value:e,onChange:t}){const o=e!=null?e:{},{t:r}=q.useTranslation(),[s,i]=g.useState(o.offset?o.offset/Math.abs(o.offset):0);return n.jsxs("fieldset",{className:l.css`
460
460
  display: flex;
461
461
  gap: 0.5em;
462
462
  `,children:[n.jsx(Ft,{value:o.field,onChange:a=>t(A(C({},o),{field:a})),filter:zn,placeholder:r("Select field"),className:"auto-width"}),o.field?n.jsx(h.Select,{value:s,onChange:a=>{i(a),t(A(C({},o),{offset:Math.abs(o.offset)*a}))},options:[{value:0,label:N("Exactly at")},{value:-1,label:r("Before")},{value:1,label:r("After")}],className:"auto-width"}):null,s?n.jsxs(n.Fragment,{children:[n.jsx(h.InputNumber,{value:Math.abs(o.offset),onChange:a=>t(A(C({},o),{offset:(a!=null?a:0)*s}))}),n.jsx(h.Select,{value:o.unit||864e5,onChange:a=>t(A(C({},o),{unit:a})),options:[{value:864e5,label:N("Days")},{value:36e5,label:N("Hours")},{value:6e4,label:N("Minutes")},{value:1e3,label:N("Seconds")}],className:"auto-width"})]}):null]})}function Jn({value:e,onChange:t}){const{t:o}=yt(),r=e!=null?typeof e=="object"&&!(e instanceof Date)?"field":"date":null;return n.jsxs("fieldset",{className:l.css`
@@ -164,7 +164,6 @@ export default class extends Instruction {
164
164
  'x-component': string;
165
165
  'x-component-props': {
166
166
  min: number;
167
- max: number;
168
167
  };
169
168
  default: number;
170
169
  };
@@ -138,7 +138,6 @@ export declare const pagination: {
138
138
  'x-component': string;
139
139
  'x-component-props': {
140
140
  min: number;
141
- max: number;
142
141
  };
143
142
  default: number;
144
143
  };
@@ -11,24 +11,24 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "antd": "5.12.8",
13
13
  "@ant-design/icons": "5.2.6",
14
- "@nocobase/client": "1.3.50-beta",
14
+ "@nocobase/client": "1.3.52",
15
15
  "react-router-dom": "6.21.0",
16
- "@nocobase/utils": "1.3.50-beta",
16
+ "@nocobase/utils": "1.3.52",
17
17
  "react-i18next": "11.18.6",
18
18
  "@formily/core": "2.3.0",
19
19
  "@formily/react": "2.3.0",
20
20
  "@formily/shared": "2.3.2",
21
21
  "lodash": "4.17.21",
22
- "@nocobase/database": "1.3.50-beta",
23
- "@nocobase/server": "1.3.50-beta",
24
- "@nocobase/logger": "1.3.50-beta",
25
- "@nocobase/evaluators": "1.3.50-beta",
22
+ "@nocobase/database": "1.3.52",
23
+ "@nocobase/server": "1.3.52",
24
+ "@nocobase/logger": "1.3.52",
25
+ "@nocobase/evaluators": "1.3.52",
26
26
  "@formily/antd-v5": "1.1.9",
27
27
  "@formily/reactive": "2.3.0",
28
- "@nocobase/actions": "1.3.50-beta",
28
+ "@nocobase/actions": "1.3.52",
29
29
  "dayjs": "1.11.10",
30
- "@nocobase/data-source-manager": "1.3.50-beta",
30
+ "@nocobase/data-source-manager": "1.3.52",
31
31
  "sequelize": "6.35.2",
32
- "@nocobase/plugin-workflow-test": "1.3.50-beta",
33
- "@nocobase/test": "1.3.50-beta"
32
+ "@nocobase/plugin-workflow-test": "1.3.52",
33
+ "@nocobase/test": "1.3.52"
34
34
  };
@@ -1 +1 @@
1
- {"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2024-11-14T04:03:14.126Z"}
1
+ {"name":"cron-parser","version":"4.4.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^1.28.0"},"devDependencies":{"eslint":"^8.2.0","sinon":"^10.0.0","tap":"^16.0.1","tsd":"^0.19.0"},"engines":{"node":">=0.8"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"_lastModified":"2024-11-21T02:27:05.026Z"}
@@ -1 +1 @@
1
- {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2024-11-14T04:03:13.774Z"}
1
+ {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"8.0.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","preprepare":"rm -rf dist","prepare":"tsc -p tsconfig.json && tsc -p tsconfig-esm.json","postprepare":"bash fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"c8 tap","snap":"c8 tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig tsconfig-esm.json ./src/*.ts","benchmark-results-typedoc":"bash scripts/benchmark-results-typedoc.sh","prebenchmark":"npm run prepare","benchmark":"make -C benchmark","preprofile":"npm run prepare","profile":"make -C benchmark profile"},"main":"./dist/cjs/index-cjs.js","module":"./dist/mjs/index.js","types":"./dist/mjs/index.d.ts","exports":{"./min":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.min.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.min.js"}},".":{"import":{"types":"./dist/mjs/index.d.ts","default":"./dist/mjs/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index-cjs.js"}}},"repository":"git://github.com/isaacs/node-lru-cache.git","devDependencies":{"@size-limit/preset-small-lib":"^7.0.8","@types/node":"^17.0.31","@types/tap":"^15.0.6","benchmark":"^2.1.4","c8":"^7.11.2","clock-mock":"^1.0.6","esbuild":"^0.17.11","eslint-config-prettier":"^8.5.0","marked":"^4.2.12","mkdirp":"^2.1.5","prettier":"^2.6.2","size-limit":"^7.0.8","tap":"^16.3.4","ts-node":"^10.7.0","tslib":"^2.4.0","typedoc":"^0.23.24","typescript":"^4.6.4"},"license":"ISC","files":["dist"],"engines":{"node":">=16.14"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tap":{"coverage":false,"node-arg":["--expose-gc","--no-warnings","--loader","ts-node/esm"],"ts":false},"size-limit":[{"path":"./dist/mjs/index.js"}],"_lastModified":"2024-11-21T02:27:04.689Z"}
@@ -76,8 +76,7 @@ function workflows_default() {
76
76
  },
77
77
  {
78
78
  type: "hasMany",
79
- name: "executions",
80
- onDelete: "CASCADE"
79
+ name: "executions"
81
80
  },
82
81
  {
83
82
  type: "integer",
package/package.json CHANGED
@@ -4,13 +4,13 @@
4
4
  "displayName.zh-CN": "工作流",
5
5
  "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
6
6
  "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
7
- "version": "1.3.50-beta",
7
+ "version": "1.3.52",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow",
11
11
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow",
12
12
  "dependencies": {
13
- "@nocobase/plugin-workflow-test": "1.3.50-beta"
13
+ "@nocobase/plugin-workflow-test": "1.3.52"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@ant-design/icons": "5.x",
@@ -44,7 +44,7 @@
44
44
  "@nocobase/test": "1.x",
45
45
  "@nocobase/utils": "1.x"
46
46
  },
47
- "gitHead": "ae3ceb799109d3a088d13f999e52b02af6df2457",
47
+ "gitHead": "90afbd90f915cf5df0ee6766ddbdf7803b3ab7ea",
48
48
  "keywords": [
49
49
  "Workflow"
50
50
  ]