@nocobase/plugin-workflow 1.3.32-beta → 1.3.33-beta

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.getCollectionFields(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,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`
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`
@@ -566,4 +566,4 @@
566
566
  .ant-form-item-control-input-content {
567
567
  display: flex;
568
568
  }
569
- `,children:[n.jsx(l.Variable.Input,{scope:d,value:e[S.name],changeOnSelect:!0,onChange:P=>{o(A(C({},e),{[S.name]:P}))},children:n.jsx(l.SchemaComponent,{schema:{type:"void",properties:{[S.name]:{"x-component":E,"x-validator"(){return""}}}}})}),T?null:n.jsx(h.Button,{"aria-label":"icon-close",type:"link",icon:n.jsx(V.CloseCircleOutlined,{}),onClick:()=>{var F;const I=e,{[F=S.name]:P}=I,D=Z(I,[Go(F)]);o(D)}})]},S.name)}),k.length?n.jsx(h.Dropdown,{menu:B,children:n.jsx(h.Button,{icon:n.jsx(V.PlusOutlined,{}),children:i("Add field")})}):null]}):n.jsx("p",{style:{color:s.colorText},children:N("Please select collection first")})})},{displayName:"CollectionFieldSet"});function Oo(e,t){t(e),e!=null&&e.properties&&Object.values(e.properties).forEach(o=>{Oo(o,t)})}function No(){return{name:X.uid(),type:"void","x-component":"Grid","x-initializer":"assignFieldValuesForm:configureFields"}}function Do(e){const{workflow:t}=H(),{setFormValueChanged:o}=l.useActionContext();l.useAPIClient();const r=me(),{values:s,setValuesIn:i,disabled:a}=O.useForm(),c=ft.toJS(s.params),[u,d]=l.parseCollectionName(s.collection),f=l.useSchemaOptionsContext(),[y,x]=g.useState(e.value&&Object.keys(e.value).length?e.value:No()),b=g.useMemo(()=>ve.createForm({initialValues:c.values,disabled:t.executed,effects(){ve.onFormValuesChange(k=>{i("params.values",ft.toJS(k.values)),o(!0)})}}),[t.executed]);O.useFormEffects(()=>{ve.onFieldValueChange("collection",k=>J(this,null,function*(){b.clearFormGraph("*");const T=No();i("params.values",{}),x(T)}))});const m=g.useCallback(k=>{const[T]=Object.values(k.toJSON().properties);e.onChange(T);const B=new Set;Oo(T,E=>{var L;if(E["x-component"]==="AssignedField"&&(L=E["x-collection-field"])!=null&&L.startsWith(`${d}.`)){const[,$]=E["x-collection-field"].split(".");B.add($)}});const S={};Array.from(B).forEach(E=>{E in b.values&&(S[E]=b.values[E])}),i("params.values",S)},[d,e.onChange]);return n.jsx(h.Card,{children:n.jsx(l.CollectionManagerProvider,{dataSource:u,children:n.jsx(l.CollectionProvider,{name:d,children:n.jsx(l.RerenderDataBlockProvider,{children:n.jsx(l.FormProvider,{form:b,children:n.jsx(Vt.FormLayout,{layout:"vertical",children:n.jsx(l.VariableScopeProvider,{scope:r,children:n.jsx(l.SchemaComponentProvider,{form:b,designable:!a,children:n.jsx(l.SchemaComponentOptions,A(C({},f),{children:n.jsx(l.SchemaComponent,{schema:y,onChange:m})}))})})})})})})})})}function xr({key:e,title:t,config:o},r){var d,f;const[s,i]=l.parseCollectionName(o.collection),a=l.useCompile(),c=We(s),[u]=Fe(A(C({appends:[e,...((f=(d=o.params)==null?void 0:d.appends)==null?void 0:f.map(y=>`${e}.${y}`))||[]]},r),{fields:[{collectionName:i,name:e,type:"hasOne",target:i,uiSchema:{title:t}}],compile:a,getCollectionFields:c}));return u}class wr extends ge{constructor(){super(...arguments);w(this,"title",`{{t("Create record", { ns: "${p}" })}}`);w(this,"type","create");w(this,"group","collection");w(this,"description",`{{t("Add new record to a collection. You can use variables from upstream nodes to assign values to fields.", { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":'{{ useNodeSavedConfig(["collection"]) }}',"x-reactions":[...ce["x-reactions"],{target:"params",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}}]}),usingAssignFormSchema:{type:"boolean"},assignFormSchema:{type:"object",title:'{{t("Fields values")}}',"x-decorator":"FormItem","x-component":"AssignedFieldsFormSchemaConfig","x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && $deps[1]) ? "visible" : "hidden"}}'}}}]},params:{type:"object",properties:{values:A(C({},Rt),{"x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && !$deps[1]) ? "visible" : "hidden"}}'}}}]}),appends:je}}});w(this,"scope",{useCollectionDataSource:l.useCollectionDataSource,useNodeSavedConfig:Be});w(this,"components",{CollectionFieldset:Fo,AssignedFieldsFormSchemaConfig:Do});w(this,"useVariables",xr)}createDefaultConfig(){return{usingAssignFormSchema:!0,assignFormSchema:{}}}useInitializers(o){var r,s;return o.config.collection?{name:(r=o.title)!=null?r:`#${o.id}`,type:"item",title:(s=o.title)!=null?s:`#${o.id}`,Component:Ve,collection:o.config.collection,dataPath:`$jobsMapByNodeKey.${o.key}`}:null}}class Cr extends ge{constructor(){super(...arguments);w(this,"title",`{{t("Update record", { ns: "${p}" })}}`);w(this,"type","update");w(this,"group","collection");w(this,"description",`{{t("Update records of a collection. You can use variables from upstream nodes as query conditions and field values.", { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":'{{ useNodeSavedConfig(["collection"]) }}',"x-reactions":[...ce["x-reactions"],{target:"params",fulfill:{state:{visible:"{{!!$self.value}}"}}},{target:"params.filter",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}},{target:"params.values",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}}]}),params:{type:"object",properties:{individualHooks:{type:"boolean",title:`{{t("Update mode", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"RadioWithTooltip","x-component-props":{options:[{label:`{{t("Update in a batch", { ns: "${p}" })}}`,value:!1,tooltip:`{{t("Update all eligible data at one time, which has better performance when the amount of data is large. But the updated data will not trigger other workflows, and will not record audit logs.", { ns: "${p}" })}}`},{label:`{{t("Update one by one", { ns: "${p}" })}}`,value:!0,tooltip:`{{t("The updated data can trigger other workflows, and the audit log will also be recorded. But it is usually only applicable to several or dozens of pieces of data, otherwise there will be performance problems.", { ns: "${p}" })}}`}]},default:!1},filter:A(C({},Ze),{title:`{{t("Only update records matching conditions", { ns: "${p}" })}}`,"x-validator"(o){return oe.isValidFilter(o)?"":N("Please add at least one condition")}}),values:A(C({},Rt),{"x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && !$deps[1]) ? "visible" : "hidden"}}'}}}]})}},usingAssignFormSchema:{type:"boolean"},assignFormSchema:{type:"object",title:'{{t("Fields values")}}',"x-decorator":"FormItem","x-component":"AssignedFieldsFormSchemaConfig","x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && $deps[1]) ? "visible" : "hidden"}}'}}}]}});w(this,"scope",{useCollectionDataSource:l.useCollectionDataSource,useNodeSavedConfig:Be});w(this,"components",{FilterDynamicComponent:ot,CollectionFieldset:Fo,AssignedFieldsFormSchemaConfig:Do,RadioWithTooltip:Ne})}createDefaultConfig(){return{usingAssignFormSchema:!0,assignFormSchema:{}}}}class kr extends ge{constructor(){super(...arguments);w(this,"title",'{{t("Delete record")}}');w(this,"type","destroy");w(this,"group","collection");w(this,"description",`{{t("Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.", { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":'{{ useNodeSavedConfig(["collection"]) }}',"x-reactions":[...ce["x-reactions"],{target:"params",fulfill:{state:{visible:"{{!!$self.value}}"}}},{target:"params",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}}]}),params:{type:"object",properties:{filter:A(C({},Ze),{"x-validator"(o){return oe.isValidFilter(o)?"":N("Please add at least one condition")}})}}});w(this,"scope",{useNodeSavedConfig:Be,useCollectionDataSource:l.useCollectionDataSource});w(this,"components",{FilterDynamicComponent:ot})}}const Sr=new l.SchemaSettings({name:"actionSettings:submitToWorkflow",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps(){const{buttonEditorProps:e}=l.useSchemaToolbar();return e}},{name:"secondConfirmation",Component:l.SecondConFirm},{name:"assignFieldValues",Component:l.AssignedFieldValues},{name:"skipRequiredValidation",Component:l.SkipValidation},{name:"afterSuccessfulSubmission",Component:l.AfterSuccess,useVisible(){var t;const e=O.useFieldSchema();return X.isValid((t=e==null?void 0:e["x-action-settings"])==null?void 0:t.onSuccess)}},{name:"bindWorkflow",Component:l.WorkflowConfig},{name:"delete",sort:100,Component:l.RemoveButton,useComponentProps(){const{removeButtonProps:e}=l.useSchemaToolbar();return e}}]});function Ar({children:e,workflow:t,execution:o,nodes:r}){const s=l.usePlugin(ue),i=s.triggers.get(t.type).components,a=r.reduce((c,{type:u})=>Object.assign(c,s.instructions.get(u).components),{});return n.jsx(Me.Provider,{value:{workflow:t,nodes:r,execution:o},children:n.jsx(l.SchemaComponentOptions,{components:C(C({},i),a),children:e})})}class ue extends l.Plugin{constructor(){super(...arguments);w(this,"triggers",new oe.Registry);w(this,"instructions",new oe.Registry);w(this,"useTriggersOptions",()=>{const o=l.useCompile();return Array.from(this.triggers.getEntities()).map(a=>{var[r,c]=a,u=c,{title:s}=u,i=Z(u,["title"]);return{value:r,label:o(s),color:"gold",options:i}})})}isWorkflowSync(o){var r,s;return(s=(r=this.triggers.get(o.type))==null?void 0:r.sync)!=null?s:o.sync}registerTrigger(o,r){if(typeof r=="function")this.triggers.register(o,new r);else if(r)this.triggers.register(o,r);else throw new TypeError("invalid trigger type to register")}registerInstruction(o,r){if(typeof r=="function")this.instructions.register(o,new r);else if(r instanceof ge)this.instructions.register(o,r);else throw new TypeError("invalid instruction type to register")}load(){return J(this,null,function*(){this.app.router.add("admin.workflow.workflows.id",{path:we(":id"),element:n.jsx(Qt,{})}),this.app.router.add("admin.workflow.executions.id",{path:_e(":id"),element:n.jsx(Yt,{})}),this.app.addComponents({WorkflowPage:Qt,ExecutionPage:Yt}),this.app.pluginSettingsManager.add(p,{icon:"PartitionOutlined",title:`{{t("Workflow", { ns: "${p}" })}}`,Component:Tn,aclSnippet:"pm.workflow.workflows"}),this.app.schemaSettingsManager.add(Sr),this.app.schemaSettingsManager.addItem("actionSettings:delete","workflowConfig",{Component:l.WorkflowConfig,useVisible(){var r;const o=O.useFieldSchema();return X.isValid((r=o==null?void 0:o["x-action-settings"])==null?void 0:r.triggerWorkflows)}}),this.registerTrigger("collection",Ln),this.registerTrigger("schedule",rr),this.registerInstruction("calculation",ar),this.registerInstruction("condition",pr),this.registerInstruction("end",mr),this.registerInstruction("query",br),this.registerInstruction("create",wr),this.registerInstruction("update",Cr),this.registerInstruction("destroy",kr)})}}v.BaseTypeSets=Qe,v.Branch=Ke,v.CheckboxGroupWithTooltip=yr,v.CollectionBlockInitializer=Ve,v.DetailsBlockProvider=hr,v.EXECUTION_STATUS=ae,v.ExecutionContextProvider=Ar,v.ExecutionStatusOptions=Ye,v.ExecutionStatusOptionsMap=qe,v.FieldsSelect=Ft,v.FilterDynamicComponent=ot,v.FlowContext=Me,v.Instruction=ge,v.JOB_STATUS=ie,v.JobButton=wt,v.JobStatusOptions=bt,v.JobStatusOptionsMap=Ge,v.Node=Ut,v.NodeContext=vt,v.NodeDefaultView=Ct,v.RadioWithTooltip=Ne,v.RemoveButton=xt,v.SimpleDesigner=ko,v.Trigger=kt,v.ValueBlock=De,v.WorkflowVariableInput=so,v.WorkflowVariableJSON=Mn,v.WorkflowVariableRawTextArea=In,v.WorkflowVariableTextArea=$t,v.default=ue,v.defaultFieldNames=Te,v.getCollectionFieldOptions=Fe,v.getWorkflowDetailPath=we,v.getWorkflowExecutionsPath=_e,v.linkNodes=At,v.nodesOptions=eo,v.scopeOptions=oo,v.systemOptions=no,v.traverseSchema=Tt,v.triggerOptions=to,v.useAvailableUpstreams=zt,v.useFlowContext=H,v.useGetAriaLabelOfAddButton=gt,v.useGetCollectionFields=We,v.useNodeContext=xe,v.useNodeSavedConfig=Be,v.useRecordTriggerWorkflowsActionProps=Bn,v.useStyles=ne,v.useTrigger=St,v.useTriggerWorkflowsActionProps=Pn,v.useUpstreamScopes=Jt,v.useWorkflowAnyExecuted=lo,v.useWorkflowExecuted=Vn,v.useWorkflowVariableOptions=me,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
569
+ `,children:[n.jsx(l.Variable.Input,{scope:d,value:e[S.name],changeOnSelect:!0,onChange:P=>{o(A(C({},e),{[S.name]:P}))},children:n.jsx(l.SchemaComponent,{schema:{type:"void",properties:{[S.name]:{"x-component":E,"x-validator"(){return""}}}}})}),T?null:n.jsx(h.Button,{"aria-label":"icon-close",type:"link",icon:n.jsx(V.CloseCircleOutlined,{}),onClick:()=>{var F;const I=e,{[F=S.name]:P}=I,D=Z(I,[Go(F)]);o(D)}})]},S.name)}),k.length?n.jsx(h.Dropdown,{menu:B,children:n.jsx(h.Button,{icon:n.jsx(V.PlusOutlined,{}),children:i("Add field")})}):null]}):n.jsx("p",{style:{color:s.colorText},children:N("Please select collection first")})})},{displayName:"CollectionFieldSet"});function Oo(e,t){t(e),e!=null&&e.properties&&Object.values(e.properties).forEach(o=>{Oo(o,t)})}function No(){return{name:X.uid(),type:"void","x-component":"Grid","x-initializer":"assignFieldValuesForm:configureFields"}}function Do(e){const{workflow:t}=H(),{setFormValueChanged:o}=l.useActionContext();l.useAPIClient();const r=me(),{values:s,setValuesIn:i,disabled:a}=O.useForm(),c=ft.toJS(s.params),[u,d]=l.parseCollectionName(s.collection),f=l.useSchemaOptionsContext(),[y,x]=g.useState(e.value&&Object.keys(e.value).length?e.value:No()),b=g.useMemo(()=>ve.createForm({initialValues:c.values,disabled:t.executed,effects(){ve.onFormValuesChange(k=>{i("params.values",ft.toJS(k.values)),o(!0)})}}),[t.executed]);O.useFormEffects(()=>{ve.onFieldValueChange("collection",k=>J(this,null,function*(){b.clearFormGraph("*");const T=No();i("params.values",{}),x(T)}))});const m=g.useCallback(k=>{const[T]=Object.values(k.toJSON().properties);e.onChange(T);const B=new Set;Oo(T,E=>{var L;if(E["x-component"]==="AssignedField"&&(L=E["x-collection-field"])!=null&&L.startsWith(`${d}.`)){const[,$]=E["x-collection-field"].split(".");B.add($)}});const S={};Array.from(B).forEach(E=>{E in b.values&&(S[E]=b.values[E])}),i("params.values",S)},[d,e.onChange]);return n.jsx(h.Card,{children:n.jsx(l.CollectionManagerProvider,{dataSource:u,children:n.jsx(l.CollectionProvider,{name:d,children:n.jsx(l.RerenderDataBlockProvider,{children:n.jsx(l.FormProvider,{form:b,children:n.jsx(Vt.FormLayout,{layout:"vertical",children:n.jsx(l.VariableScopeProvider,{scope:r,children:n.jsx(l.SchemaComponentProvider,{form:b,designable:!a,children:n.jsx(l.SchemaComponentOptions,A(C({},f),{children:n.jsx(l.SchemaComponent,{schema:y,onChange:m})}))})})})})})})})})}function xr({key:e,title:t,config:o},r){var d,f;const[s,i]=l.parseCollectionName(o.collection),a=l.useCompile(),c=We(s),[u]=Fe(A(C({appends:[e,...((f=(d=o.params)==null?void 0:d.appends)==null?void 0:f.map(y=>`${e}.${y}`))||[]]},r),{fields:[{collectionName:i,name:e,type:"hasOne",target:i,uiSchema:{title:t}}],compile:a,getCollectionFields:c}));return u}class wr extends ge{constructor(){super(...arguments);w(this,"title",`{{t("Create record", { ns: "${p}" })}}`);w(this,"type","create");w(this,"group","collection");w(this,"description",`{{t("Add new record to a collection. You can use variables from upstream nodes to assign values to fields.", { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":'{{ useNodeSavedConfig(["collection"]) }}',"x-reactions":[...ce["x-reactions"],{target:"params",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}}]}),usingAssignFormSchema:{type:"boolean"},assignFormSchema:{type:"object",title:'{{t("Fields values")}}',"x-decorator":"FormItem","x-component":"AssignedFieldsFormSchemaConfig","x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && $deps[1]) ? "visible" : "hidden"}}'}}}]},params:{type:"object",properties:{values:A(C({},Rt),{"x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && !$deps[1]) ? "visible" : "hidden"}}'}}}]}),appends:je}}});w(this,"scope",{useCollectionDataSource:l.useCollectionDataSource,useNodeSavedConfig:Be});w(this,"components",{CollectionFieldset:Fo,AssignedFieldsFormSchemaConfig:Do});w(this,"useVariables",xr)}createDefaultConfig(){return{usingAssignFormSchema:!0,assignFormSchema:{}}}useInitializers(o){var r,s;return o.config.collection?{name:(r=o.title)!=null?r:`#${o.id}`,type:"item",title:(s=o.title)!=null?s:`#${o.id}`,Component:Ve,collection:o.config.collection,dataPath:`$jobsMapByNodeKey.${o.key}`}:null}}class Cr extends ge{constructor(){super(...arguments);w(this,"title",`{{t("Update record", { ns: "${p}" })}}`);w(this,"type","update");w(this,"group","collection");w(this,"description",`{{t("Update records of a collection. You can use variables from upstream nodes as query conditions and field values.", { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":'{{ useNodeSavedConfig(["collection"]) }}',"x-reactions":[...ce["x-reactions"],{target:"params",fulfill:{state:{visible:"{{!!$self.value}}"}}},{target:"params.filter",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}},{target:"params.values",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}}]}),params:{type:"object",properties:{individualHooks:{type:"boolean",title:`{{t("Update mode", { ns: "${p}" })}}`,"x-decorator":"FormItem","x-component":"RadioWithTooltip","x-component-props":{options:[{label:`{{t("Update in a batch", { ns: "${p}" })}}`,value:!1,tooltip:`{{t("Update all eligible data at one time, which has better performance when the amount of data is large. But association fields are not supported (unless foreign key in current collection), and the updated data will not trigger other workflows.", { ns: "${p}" })}}`},{label:`{{t("Update one by one", { ns: "${p}" })}}`,value:!0,tooltip:`{{t("The updated data can trigger other workflows, and the audit log will also be recorded. But it is usually only applicable to several or dozens of pieces of data, otherwise there will be performance problems.", { ns: "${p}" })}}`}]},default:!1},filter:A(C({},Ze),{title:`{{t("Only update records matching conditions", { ns: "${p}" })}}`,"x-validator"(o){return oe.isValidFilter(o)?"":N("Please add at least one condition")}}),values:A(C({},Rt),{"x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && !$deps[1]) ? "visible" : "hidden"}}'}}}]})}},usingAssignFormSchema:{type:"boolean"},assignFormSchema:{type:"object",title:'{{t("Fields values")}}',"x-decorator":"FormItem","x-component":"AssignedFieldsFormSchemaConfig","x-reactions":[{dependencies:["collection","usingAssignFormSchema"],fulfill:{state:{display:'{{($deps[0] && $deps[1]) ? "visible" : "hidden"}}'}}}]}});w(this,"scope",{useCollectionDataSource:l.useCollectionDataSource,useNodeSavedConfig:Be});w(this,"components",{FilterDynamicComponent:ot,CollectionFieldset:Fo,AssignedFieldsFormSchemaConfig:Do,RadioWithTooltip:Ne})}createDefaultConfig(){return{usingAssignFormSchema:!0,assignFormSchema:{}}}}class kr extends ge{constructor(){super(...arguments);w(this,"title",'{{t("Delete record")}}');w(this,"type","destroy");w(this,"group","collection");w(this,"description",`{{t("Delete records of a collection. Could use variables in workflow context as filter. All records match the filter will be deleted.", { ns: "${p}" })}}`);w(this,"fieldset",{collection:A(C({},ce),{"x-disabled":'{{ useNodeSavedConfig(["collection"]) }}',"x-reactions":[...ce["x-reactions"],{target:"params",fulfill:{state:{visible:"{{!!$self.value}}"}}},{target:"params",effects:["onFieldValueChange"],fulfill:{state:{value:"{{Object.create({})}}"}}}]}),params:{type:"object",properties:{filter:A(C({},Ze),{"x-validator"(o){return oe.isValidFilter(o)?"":N("Please add at least one condition")}})}}});w(this,"scope",{useNodeSavedConfig:Be,useCollectionDataSource:l.useCollectionDataSource});w(this,"components",{FilterDynamicComponent:ot})}}const Sr=new l.SchemaSettings({name:"actionSettings:submitToWorkflow",items:[{name:"editButton",Component:l.ButtonEditor,useComponentProps(){const{buttonEditorProps:e}=l.useSchemaToolbar();return e}},{name:"secondConfirmation",Component:l.SecondConFirm},{name:"assignFieldValues",Component:l.AssignedFieldValues},{name:"skipRequiredValidation",Component:l.SkipValidation},{name:"afterSuccessfulSubmission",Component:l.AfterSuccess,useVisible(){var t;const e=O.useFieldSchema();return X.isValid((t=e==null?void 0:e["x-action-settings"])==null?void 0:t.onSuccess)}},{name:"bindWorkflow",Component:l.WorkflowConfig},{name:"delete",sort:100,Component:l.RemoveButton,useComponentProps(){const{removeButtonProps:e}=l.useSchemaToolbar();return e}}]});function Ar({children:e,workflow:t,execution:o,nodes:r}){const s=l.usePlugin(ue),i=s.triggers.get(t.type).components,a=r.reduce((c,{type:u})=>Object.assign(c,s.instructions.get(u).components),{});return n.jsx(Me.Provider,{value:{workflow:t,nodes:r,execution:o},children:n.jsx(l.SchemaComponentOptions,{components:C(C({},i),a),children:e})})}class ue extends l.Plugin{constructor(){super(...arguments);w(this,"triggers",new oe.Registry);w(this,"instructions",new oe.Registry);w(this,"useTriggersOptions",()=>{const o=l.useCompile();return Array.from(this.triggers.getEntities()).map(a=>{var[r,c]=a,u=c,{title:s}=u,i=Z(u,["title"]);return{value:r,label:o(s),color:"gold",options:i}})})}isWorkflowSync(o){var r,s;return(s=(r=this.triggers.get(o.type))==null?void 0:r.sync)!=null?s:o.sync}registerTrigger(o,r){if(typeof r=="function")this.triggers.register(o,new r);else if(r)this.triggers.register(o,r);else throw new TypeError("invalid trigger type to register")}registerInstruction(o,r){if(typeof r=="function")this.instructions.register(o,new r);else if(r instanceof ge)this.instructions.register(o,r);else throw new TypeError("invalid instruction type to register")}load(){return J(this,null,function*(){this.app.router.add("admin.workflow.workflows.id",{path:we(":id"),element:n.jsx(Qt,{})}),this.app.router.add("admin.workflow.executions.id",{path:_e(":id"),element:n.jsx(Yt,{})}),this.app.addComponents({WorkflowPage:Qt,ExecutionPage:Yt}),this.app.pluginSettingsManager.add(p,{icon:"PartitionOutlined",title:`{{t("Workflow", { ns: "${p}" })}}`,Component:Tn,aclSnippet:"pm.workflow.workflows"}),this.app.schemaSettingsManager.add(Sr),this.app.schemaSettingsManager.addItem("actionSettings:delete","workflowConfig",{Component:l.WorkflowConfig,useVisible(){var r;const o=O.useFieldSchema();return X.isValid((r=o==null?void 0:o["x-action-settings"])==null?void 0:r.triggerWorkflows)}}),this.registerTrigger("collection",Ln),this.registerTrigger("schedule",rr),this.registerInstruction("calculation",ar),this.registerInstruction("condition",pr),this.registerInstruction("end",mr),this.registerInstruction("query",br),this.registerInstruction("create",wr),this.registerInstruction("update",Cr),this.registerInstruction("destroy",kr)})}}v.BaseTypeSets=Qe,v.Branch=Ke,v.CheckboxGroupWithTooltip=yr,v.CollectionBlockInitializer=Ve,v.DetailsBlockProvider=hr,v.EXECUTION_STATUS=ae,v.ExecutionContextProvider=Ar,v.ExecutionStatusOptions=Ye,v.ExecutionStatusOptionsMap=qe,v.FieldsSelect=Ft,v.FilterDynamicComponent=ot,v.FlowContext=Me,v.Instruction=ge,v.JOB_STATUS=ie,v.JobButton=wt,v.JobStatusOptions=bt,v.JobStatusOptionsMap=Ge,v.Node=Ut,v.NodeContext=vt,v.NodeDefaultView=Ct,v.RadioWithTooltip=Ne,v.RemoveButton=xt,v.SimpleDesigner=ko,v.Trigger=kt,v.ValueBlock=De,v.WorkflowVariableInput=so,v.WorkflowVariableJSON=Mn,v.WorkflowVariableRawTextArea=In,v.WorkflowVariableTextArea=$t,v.default=ue,v.defaultFieldNames=Te,v.getCollectionFieldOptions=Fe,v.getWorkflowDetailPath=we,v.getWorkflowExecutionsPath=_e,v.linkNodes=At,v.nodesOptions=eo,v.scopeOptions=oo,v.systemOptions=no,v.traverseSchema=Tt,v.triggerOptions=to,v.useAvailableUpstreams=zt,v.useFlowContext=H,v.useGetAriaLabelOfAddButton=gt,v.useGetCollectionFields=We,v.useNodeContext=xe,v.useNodeSavedConfig=Be,v.useRecordTriggerWorkflowsActionProps=Bn,v.useStyles=ne,v.useTrigger=St,v.useTriggerWorkflowsActionProps=Pn,v.useUpstreamScopes=Jt,v.useWorkflowAnyExecuted=lo,v.useWorkflowExecuted=Vn,v.useWorkflowVariableOptions=me,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -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.32-beta",
14
+ "@nocobase/client": "1.3.33-beta",
15
15
  "react-router-dom": "6.21.0",
16
- "@nocobase/utils": "1.3.32-beta",
16
+ "@nocobase/utils": "1.3.33-beta",
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.0",
21
21
  "lodash": "4.17.21",
22
- "@nocobase/database": "1.3.32-beta",
23
- "@nocobase/server": "1.3.32-beta",
24
- "@nocobase/logger": "1.3.32-beta",
25
- "@nocobase/evaluators": "1.3.32-beta",
22
+ "@nocobase/database": "1.3.33-beta",
23
+ "@nocobase/server": "1.3.33-beta",
24
+ "@nocobase/logger": "1.3.33-beta",
25
+ "@nocobase/evaluators": "1.3.33-beta",
26
26
  "@formily/antd-v5": "1.1.9",
27
27
  "@formily/reactive": "2.3.0",
28
- "@nocobase/actions": "1.3.32-beta",
28
+ "@nocobase/actions": "1.3.33-beta",
29
29
  "dayjs": "1.11.10",
30
- "@nocobase/data-source-manager": "1.3.32-beta",
30
+ "@nocobase/data-source-manager": "1.3.33-beta",
31
31
  "sequelize": "6.35.2",
32
- "@nocobase/plugin-workflow-test": "1.3.32-beta",
33
- "@nocobase/test": "1.3.32-beta"
32
+ "@nocobase/plugin-workflow-test": "1.3.33-beta",
33
+ "@nocobase/test": "1.3.33-beta"
34
34
  };
@@ -169,8 +169,8 @@
169
169
  "Update mode": "更新模式",
170
170
  "Update in a batch": "批量更新",
171
171
  "Update one by one": "逐条更新",
172
- "Update all eligible data at one time, which has better performance when the amount of data is large. But the updated data will not trigger other workflows, and will not record audit logs.":
173
- "一次性更新所有符合条件的数据,在数据量较大时有比较好的性能;但被更新的数据不会触发其他工作流,也不会记录更新日志。",
172
+ "Update all eligible data at one time, which has better performance when the amount of data is large. But association fields are not supported (unless foreign key in current collection), and the updated data will not trigger other workflows.":
173
+ "一次性更新所有符合条件的数据,在数据量较大时有比较好的性能;但不支持关系字段的更新(除非是在当前表中的外键),被更新的数据也不会触发其他工作流。",
174
174
  "The updated data can trigger other workflows, and the audit log will also be recorded. But it is usually only applicable to several or dozens of pieces of data, otherwise there will be performance problems.":
175
175
  "被更新的数据可以再次触发其他工作流,也会记录更新日志;但通常只适用于数条或数十条数据,否则会有性能问题。",
176
176
  "Query record": "查询数据",
@@ -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-10-13T01:10:52.531Z"}
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-10-16T23:38:47.019Z"}
@@ -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-10-13T01:10:52.165Z"}
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-10-16T23:38:46.679Z"}
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.32-beta",
7
+ "version": "1.3.33-beta",
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.32-beta"
13
+ "@nocobase/plugin-workflow-test": "1.3.33-beta"
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": "ace662dd3902de2431f6c1d9dad66bbe275060c2",
47
+ "gitHead": "8c027d81bc5815930823af0dee29eb13ce51dbdf",
48
48
  "keywords": [
49
49
  "Workflow"
50
50
  ]