@nocobase/plugin-workflow 2.2.0-alpha.7 → 2.2.0-alpha.8

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.
Files changed (50) hide show
  1. package/dist/client/{509.e8d543f308a5823c.js → 509.8a85abc526e8cfe0.js} +1 -1
  2. package/dist/client/{67.ea0c78153b4842ef.js → 67.c206df2fb7e32468.js} +1 -1
  3. package/dist/client/719.79871d3000b54948.js +10 -0
  4. package/dist/client/972.5df5193573fe04e5.js +10 -0
  5. package/dist/client/index.js +1 -1
  6. package/dist/client-v2/142.a8c8df2a9abb43c5.js +10 -0
  7. package/dist/client-v2/276.7f746d899e221e2f.js +10 -0
  8. package/dist/client-v2/{387.fd0a379e808b069f.js → 387.20ffad90130780e6.js} +1 -1
  9. package/dist/client-v2/635.14a6f21cf4f16345.js +10 -0
  10. package/dist/client-v2/{677.a8c841cd3c3a6f7d.js → 677.36a6fe395279deeb.js} +1 -1
  11. package/dist/client-v2/canvas/Node.d.ts +2 -2
  12. package/dist/client-v2/components/FilterDynamicComponent.d.ts +2 -1
  13. package/dist/client-v2/index.js +1 -1
  14. package/dist/externalVersion.js +13 -13
  15. package/dist/locale/de-DE.json +1 -0
  16. package/dist/locale/en-US.json +1 -0
  17. package/dist/locale/es-ES.json +1 -0
  18. package/dist/locale/fr-FR.json +1 -0
  19. package/dist/locale/hu-HU.json +1 -0
  20. package/dist/locale/id-ID.json +1 -0
  21. package/dist/locale/it-IT.json +1 -0
  22. package/dist/locale/ja-JP.json +1 -0
  23. package/dist/locale/ko-KR.json +1 -0
  24. package/dist/locale/nl-NL.json +1 -0
  25. package/dist/locale/pt-BR.json +1 -0
  26. package/dist/locale/ru-RU.json +1 -0
  27. package/dist/locale/tr-TR.json +1 -0
  28. package/dist/locale/uk-UA.json +1 -0
  29. package/dist/locale/vi-VN.json +1 -0
  30. package/dist/locale/zh-CN.json +1 -0
  31. package/dist/locale/zh-TW.json +1 -0
  32. package/dist/node_modules/cron-parser/package.json +1 -1
  33. package/dist/node_modules/joi/package.json +1 -1
  34. package/dist/node_modules/lru-cache/package.json +1 -1
  35. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  36. package/dist/server/Dispatcher.d.ts +3 -2
  37. package/dist/server/Dispatcher.js +37 -17
  38. package/dist/server/Plugin.d.ts +1 -1
  39. package/dist/server/actions/workflows.js +6 -0
  40. package/dist/server/triggers/CollectionTrigger.js +3 -0
  41. package/dist/server/triggers/ScheduleTrigger/StaticScheduleTrigger.d.ts +1 -1
  42. package/dist/server/triggers/index.d.ts +1 -1
  43. package/dist/swagger/index.d.ts +1 -0
  44. package/dist/swagger/index.js +4 -2
  45. package/package.json +2 -2
  46. package/dist/client/719.cd8ca7c9f00584be.js +0 -10
  47. package/dist/client/972.600a190e71978122.js +0 -10
  48. package/dist/client-v2/142.fe4f9b7869876ff1.js +0 -10
  49. package/dist/client-v2/276.8ca10542a0424df3.js +0 -10
  50. package/dist/client-v2/635.20680bb5710698d0.js +0 -10
@@ -11,33 +11,33 @@ module.exports = {
11
11
  "react": "18.2.0",
12
12
  "@formily/core": "2.3.7",
13
13
  "@formily/react": "2.3.7",
14
- "@nocobase/client": "2.2.0-alpha.7",
15
- "@nocobase/utils": "2.2.0-alpha.7",
14
+ "@nocobase/client": "2.2.0-alpha.8",
15
+ "@nocobase/utils": "2.2.0-alpha.8",
16
16
  "antd": "5.24.2",
17
17
  "@ant-design/icons": "5.6.1",
18
- "@nocobase/flow-engine": "2.2.0-alpha.7",
18
+ "@nocobase/flow-engine": "2.2.0-alpha.8",
19
19
  "ahooks": "3.7.8",
20
20
  "react-router-dom": "6.30.1",
21
21
  "react-i18next": "11.18.6",
22
22
  "lodash": "4.18.1",
23
23
  "@dnd-kit/core": "6.1.0",
24
24
  "@formily/shared": "2.3.7",
25
- "@nocobase/plugin-mobile": "2.2.0-alpha.7",
26
- "@nocobase/client-v2": "2.2.0-alpha.7",
25
+ "@nocobase/plugin-mobile": "2.2.0-alpha.8",
26
+ "@nocobase/client-v2": "2.2.0-alpha.8",
27
27
  "sequelize": "6.35.2",
28
- "@nocobase/server": "2.2.0-alpha.7",
29
- "@nocobase/database": "2.2.0-alpha.7",
30
- "@nocobase/data-source-manager": "2.2.0-alpha.7",
31
- "@nocobase/logger": "2.2.0-alpha.7",
32
- "@nocobase/evaluators": "2.2.0-alpha.7",
28
+ "@nocobase/server": "2.2.0-alpha.8",
29
+ "@nocobase/database": "2.2.0-alpha.8",
30
+ "@nocobase/data-source-manager": "2.2.0-alpha.8",
31
+ "@nocobase/logger": "2.2.0-alpha.8",
32
+ "@nocobase/evaluators": "2.2.0-alpha.8",
33
33
  "@formily/antd-v5": "1.2.3",
34
34
  "@formily/reactive": "2.3.7",
35
35
  "@emotion/css": "11.13.0",
36
36
  "@formily/json-schema": "2.3.7",
37
37
  "antd-style": "3.7.1",
38
38
  "dayjs": "1.11.13",
39
- "@nocobase/actions": "2.2.0-alpha.7",
40
- "@nocobase/plugin-workflow-test": "2.2.0-alpha.7",
41
- "@nocobase/test": "2.2.0-alpha.7",
39
+ "@nocobase/actions": "2.2.0-alpha.8",
40
+ "@nocobase/plugin-workflow-test": "2.2.0-alpha.8",
41
+ "@nocobase/test": "2.2.0-alpha.8",
42
42
  "@dnd-kit/sortable": "7.0.2"
43
43
  };
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Wird im Hintergrund als Aufgabe in der Warteschlange ausgeführt.",
256
256
  "Workflow": "Workflow",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow ausgeführt, der Ergebnisstatus ist <1>{{statusText}}</1><2>Ausführung anzeigen</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Der Workflow wurde nicht ausgelöst, weil die aktuelle Anfrage die Auslöseanforderungen nicht erfüllt.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow-Aufgaben",
@@ -282,6 +282,7 @@
282
282
  "Workflow title": "Workflow title",
283
283
  "Workflow canvas editor is being migrated to the new UI.": "Workflow canvas editor is being migrated to the new UI.",
284
284
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
285
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Workflow was not triggered because the current request did not meet the trigger requirements.",
285
286
  "Workflow of execution is not existed": "Workflow of execution is not existed",
286
287
  "Workflow tasks": "Workflow tasks",
287
288
  "Workflow todos": "Workflow todos",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
256
256
  "Workflow": "Flujo de trabajo",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "El flujo de trabajo no se activó porque la solicitud actual no cumplió los requisitos del desencadenador.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow todos",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
256
256
  "Workflow": "Workflow",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Le workflow n’a pas été déclenché, car la requête actuelle ne répond pas aux exigences du déclencheur.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow todos",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "A háttérben sorba állított feladatként kerül végrehajtásra.",
256
256
  "Workflow": "Munkafolyamat",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Munkafolyamat végrehajtva, az eredmény állapota: <1>{{statusText}}</1><2>Végrehajtás megtekintése</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "A munkafolyamat nem indult el, mert az aktuális kérés nem felelt meg az indítási feltételeknek.",
258
259
  "Workflow is not exists": "Workflow is not exists",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Munkafolyamat teendők",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Akan dieksekusi di latar belakang sebagai tugas antrean.",
256
256
  "Workflow": "Alur kerja",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Alur kerja dieksekusi, status hasilnya adalah <1>{{statusText}}</1><2>Lihat eksekusi</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Alur kerja tidak dipicu karena permintaan saat ini tidak memenuhi persyaratan pemicu.",
258
259
  "Workflow is not exists": "Workflow is not exists",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Tugas alur kerja",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Verrà eseguito in background come attività in coda.",
256
256
  "Workflow": "Workflow",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow eseguito, lo stato del risultato è <1>{{statusText}}</1><2>Visualizza l'esecuzione</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Il workflow non è stato attivato perché la richiesta corrente non soddisfa i requisiti del trigger.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Da fare",
@@ -257,6 +257,7 @@
257
257
  "Will be executed in the background as a queued task.": "キュータスクとしてバックグラウンドで実行されます。",
258
258
  "Workflow": "ワークフロー",
259
259
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "ワークフローが実行されました。結果ステータス: <1>{{statusText}}</1><2>実行詳細を表示</2>",
260
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "現在のリクエストがトリガー要件を満たしていないため、ワークフローはトリガーされませんでした。",
260
261
  "Workflow of execution is not existed": "Workflow of execution is not existed",
261
262
  "Workflow tasks": "Workflow tasks",
262
263
  "Workflow todos": "ワークフロー対応事項",
@@ -273,6 +273,7 @@
273
273
  "Will be executed in the background as a queued task.": "백그라운드에서 대기 작업으로 실행됩니다.",
274
274
  "Workflow": "워크플로우",
275
275
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "워크플로우가 실행되었습니다. 결과 상태는 <1>{{statusText}}</1><2>실행 보기</2>",
276
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "현재 요청이 트리거 요구 사항을 충족하지 않아 워크플로우가 트리거되지 않았습니다.",
276
277
  "Workflow of execution is not existed": "Workflow of execution is not existed",
277
278
  "Workflow tasks": "Workflow tasks",
278
279
  "Workflow todos": "워크플로우 할 일",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
256
256
  "Workflow": "Workflow",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "De workflow is niet geactiveerd omdat de huidige aanvraag niet aan de triggervereisten voldoet.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow todos",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
256
256
  "Workflow": "Fluxo de trabalho",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "O workflow não foi acionado porque a solicitação atual não atende aos requisitos do gatilho.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow todos",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Будет выполнен в фоновом режиме как задача в очереди.",
256
256
  "Workflow": "Рабочий процесс",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Рабочий процесс выполнен, статус результата: <1>{{statusText}}</1><2>Посмотреть выполнение</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Рабочий процесс не был запущен, так как текущий запрос не соответствует требованиям триггера.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Задачи рабочего процесса",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
256
256
  "Workflow": "İş Akışı",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Geçerli istek tetikleme gereksinimlerini karşılamadığı için iş akışı tetiklenmedi.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow todos",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
256
256
  "Workflow": "Workflow",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Робочий процес не було запущено, оскільки поточний запит не відповідає вимогам тригера.",
258
259
  "Workflow of execution is not existed": "Workflow of execution is not existed",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow todos",
@@ -255,6 +255,7 @@
255
255
  "Will be executed in the background as a queued task.": "Will be executed in the background as a queued task.",
256
256
  "Workflow": "Workflow",
257
257
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
258
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "Quy trình làm việc không được kích hoạt vì yêu cầu hiện tại không đáp ứng các điều kiện kích hoạt.",
258
259
  "Workflow is not exists": "Workflow is not exists",
259
260
  "Workflow tasks": "Workflow tasks",
260
261
  "Workflow todos": "Workflow todos",
@@ -290,6 +290,7 @@
290
290
  "Workflow title": "工作流名称",
291
291
  "Workflow canvas editor is being migrated to the new UI.": "工作流画布编辑器正在迁移到新版界面。",
292
292
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "工作流已执行,结果状态为 <1>{{statusText}}</1><2>查看执行详情</2>",
293
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "当前请求未满足触发要求,工作流未触发。",
293
294
  "Workflow of execution is not existed": "执行计划对应的工作流不存在",
294
295
  "Workflow tasks": "流程待办",
295
296
  "Workflow todos": "流程待办",
@@ -258,6 +258,7 @@
258
258
  "Workflow": "Workflow",
259
259
  "Workflow title": "工作流名稱",
260
260
  "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>": "Workflow executed, the result status is <1>{{statusText}}</1><2>View the execution</2>",
261
+ "Workflow was not triggered because the current request did not meet the trigger requirements.": "目前請求未滿足觸發要求,工作流未觸發。",
261
262
  "Workflow of execution is not existed": "Workflow of execution is not existed",
262
263
  "Workflow tasks": "Workflow tasks",
263
264
  "Workflow todos": "Workflow todos",
@@ -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":"2026-07-09T09:54:10.400Z"}
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":"2026-07-12T22:53:42.833Z"}
@@ -1 +1 @@
1
- {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-07-09T09:54:10.076Z"}
1
+ {"name":"joi","description":"Object schema validation","version":"17.13.3","repository":"git://github.com/hapijs/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.3.0","@hapi/topo":"^5.1.0","@sideway/address":"^4.1.5","@sideway/formula":"^3.0.1","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"^25.1.3","@types/node":"^14.18.63","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause","_lastModified":"2026-07-12T22:53:42.560Z"}
@@ -1 +1 @@
1
- {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/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","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-09T09:54:09.237Z"}
1
+ {"name":"lru-cache","description":"A cache object that deletes the least-recently-used items.","version":"11.3.5","author":"Isaac Z. Schlueter <i@izs.me>","keywords":["mru","lru","cache"],"sideEffects":false,"scripts":{"build":"npm run prepare","prepare":"tshy && bash scripts/build.sh","pretest":"npm run prepare","presnap":"npm run prepare","test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","format":"prettier --write .","typedoc":"typedoc --tsconfig ./.tshy/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","lint":"oxlint --fix src test","postsnap":"npm run lint","postlint":"npm run format"},"main":"./dist/commonjs/index.min.js","types":"./dist/commonjs/index.d.ts","tshy":{"esmDialects":["node","browser"],"exports":{"./raw":"./src/index.ts",".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"selfLink":false},"repository":{"type":"git","url":"git+ssh://git@github.com/isaacs/node-lru-cache.git"},"devDependencies":{"benchmark":"^2.1.4","esbuild":"^0.25.9","marked":"^4.2.12","mkdirp":"^3.0.1","oxlint":"^1.58.0","oxlint-tsgolint":"^0.19.0","prettier":"^3.8.1","tap":"^21.6.3","tshy":"^4.1.1","typedoc":"^0.28.18"},"license":"BlueOak-1.0.0","files":["dist"],"engines":{"node":"20 || >=22"},"exports":{"./raw":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},".":{"import":{"node":{"types":"./dist/esm/node/index.d.ts","default":"./dist/esm/node/index.min.js"},"browser":{"types":"./dist/esm/browser/index.d.ts","default":"./dist/esm/browser/index.min.js"},"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.min.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.min.js"}}},"type":"module","module":"./dist/esm/index.min.js","_lastModified":"2026-07-12T22:53:41.826Z"}
@@ -1 +1 @@
1
- {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-09T09:54:09.048Z"}
1
+ {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-12T22:53:41.660Z"}
@@ -26,7 +26,7 @@ export type EventOptions = {
26
26
  force?: boolean;
27
27
  stack?: Array<number | string>;
28
28
  parentExecutionId?: number | string;
29
- onTriggerFail?: Function;
29
+ onTriggerFail?: (workflow: WorkflowModel, context: object, options: EventOptions, error?: unknown) => void | Promise<void>;
30
30
  [key: string]: any;
31
31
  } & Transactionable;
32
32
  export default class Dispatcher {
@@ -42,7 +42,7 @@ export default class Dispatcher {
42
42
  readonly onQueueExecution: QueueEventOptions['process'];
43
43
  setReady(ready: boolean): void;
44
44
  getEventsCount(): number;
45
- trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null>;
45
+ trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null | void>;
46
46
  private saveEvent;
47
47
  resume(job: JobModel): Promise<void>;
48
48
  start(execution: ExecutionModel): Promise<void>;
@@ -51,6 +51,7 @@ export default class Dispatcher {
51
51
  run(pending: Pending): Promise<void>;
52
52
  private triggerSync;
53
53
  private validateEvent;
54
+ private handleTriggerFail;
54
55
  private createExecution;
55
56
  private prepare;
56
57
  private acquireExecution;
@@ -71,7 +71,7 @@ class Dispatcher {
71
71
  if (!this.ready) {
72
72
  logger.warn(`app is not ready, event of workflow ${workflow.id} will be ignored`);
73
73
  logger.debug(`ignored event data:`, context);
74
- return;
74
+ return this.handleTriggerFail(workflow, context, options, new Error("app is not ready"));
75
75
  }
76
76
  if (!options.force && !options.manually && !workflow.enabled) {
77
77
  logger.warn(`workflow ${workflow.id} is not enabled, event will be ignored`);
@@ -88,7 +88,7 @@ class Dispatcher {
88
88
  }
89
89
  if (context == null) {
90
90
  logger.warn(`workflow ${workflow.id} event data context is null, event will be ignored`);
91
- return;
91
+ return this.handleTriggerFail(workflow, context, options, new Error("event context is null"));
92
92
  }
93
93
  if (options.manually || this.plugin.isWorkflowSync(workflow)) {
94
94
  return this.triggerSync(workflow, context, options);
@@ -303,8 +303,15 @@ class Dispatcher {
303
303
  }
304
304
  return valid;
305
305
  }
306
- async createExecution(workflow, context, options) {
306
+ async handleTriggerFail(workflow, context, options, error) {
307
307
  var _a;
308
+ try {
309
+ await ((_a = options.onTriggerFail) == null ? void 0 : _a.call(options, workflow, context, options, error));
310
+ } catch (triggerFailError) {
311
+ this.plugin.getLogger(workflow.id).error(`trigger failure callback failed`, { error: triggerFailError });
312
+ }
313
+ }
314
+ async createExecution(workflow, context, options) {
308
315
  const { deferred } = options;
309
316
  let stack = options.stack;
310
317
  if (options.parentExecutionId && !stack) {
@@ -313,21 +320,34 @@ class Dispatcher {
313
320
  });
314
321
  stack = parentExecution ? [...parentExecution.stack ?? [], parentExecution.id] : [];
315
322
  }
316
- const valid = await this.validateEvent(workflow, context, { ...options, stack });
323
+ let valid;
324
+ try {
325
+ valid = await this.validateEvent(workflow, context, { ...options, stack });
326
+ } catch (error) {
327
+ await this.handleTriggerFail(workflow, context, options, error);
328
+ throw error;
329
+ }
317
330
  if (!valid) {
318
- (_a = options.onTriggerFail) == null ? void 0 : _a.call(options, workflow, context, options);
319
- throw new Error("event is not valid");
320
- }
321
- const execution = await workflow.createExecution({
322
- context,
323
- key: workflow.key,
324
- eventKey: options.eventKey ?? (0, import_node_crypto.randomUUID)(),
325
- stack,
326
- parentExecutionId: options.parentExecutionId ?? null,
327
- dispatched: deferred ?? false,
328
- status: deferred ? import_constants.EXECUTION_STATUS.STARTED : import_constants.EXECUTION_STATUS.QUEUEING,
329
- manually: options.manually
330
- });
331
+ const error = new Error("event is not valid");
332
+ await this.handleTriggerFail(workflow, context, options, error);
333
+ throw error;
334
+ }
335
+ let execution;
336
+ try {
337
+ execution = await workflow.createExecution({
338
+ context,
339
+ key: workflow.key,
340
+ eventKey: options.eventKey ?? (0, import_node_crypto.randomUUID)(),
341
+ stack,
342
+ parentExecutionId: options.parentExecutionId ?? null,
343
+ dispatched: deferred ?? false,
344
+ status: deferred ? import_constants.EXECUTION_STATUS.STARTED : import_constants.EXECUTION_STATUS.QUEUEING,
345
+ manually: options.manually
346
+ });
347
+ } catch (error) {
348
+ await this.handleTriggerFail(workflow, context, options, error);
349
+ throw error;
350
+ }
331
351
  this.plugin.getLogger(workflow.id).info(`execution of workflow ${workflow.id} created as ${execution.id}`);
332
352
  if (!workflow.stats) {
333
353
  workflow.stats = await workflow.getStats();
@@ -74,7 +74,7 @@ export default class PluginWorkflowServer extends Plugin {
74
74
  */
75
75
  load(): Promise<void>;
76
76
  private toggle;
77
- trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null>;
77
+ trigger(workflow: WorkflowModel, context: object, options?: EventOptions): void | Promise<Processor | null | void>;
78
78
  run(pending: Parameters<Dispatcher['run']>[0]): Promise<void>;
79
79
  dispatch(): void;
80
80
  resume(job: any): Promise<void>;
@@ -188,6 +188,12 @@ async function execute(context, next) {
188
188
  let processor;
189
189
  try {
190
190
  processor = await plugin.execute(workflow, values, { manually: true });
191
+ if (processor === null) {
192
+ context.body = {
193
+ execution: null
194
+ };
195
+ return next();
196
+ }
191
197
  if (!processor) {
192
198
  return context.throw(400, "workflow not triggered");
193
199
  }
@@ -305,6 +305,9 @@ class CollectionTrigger extends import__.default {
305
305
  // }
306
306
  async execute(workflow, values, options) {
307
307
  const ctx = await this.prepare(workflow, values == null ? void 0 : values.data, options);
308
+ if (!ctx) {
309
+ return null;
310
+ }
308
311
  const [dataSourceName] = (0, import_data_source_manager.parseCollectionName)(workflow.config.collection);
309
312
  const { transaction } = options;
310
313
  return this.workflow.trigger(workflow, ctx, {
@@ -20,5 +20,5 @@ export default class StaticScheduleTrigger {
20
20
  trigger(workflow: WorkflowModel, time: number): Promise<void>;
21
21
  on(workflow: any): void;
22
22
  off(workflow: any): void;
23
- execute(workflow: any, values: any, options: any): void | Promise<import("../..").Processor>;
23
+ execute(workflow: any, values: any, options: any): void | Promise<void | import("../..").Processor>;
24
24
  }
@@ -26,6 +26,6 @@ export declare abstract class Trigger {
26
26
  [key: string]: string;
27
27
  };
28
28
  sync?: boolean;
29
- execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | Promise<void | Processor>;
29
+ execute?(workflow: WorkflowModel, values: any, options: Transactionable): void | Processor | null | Promise<void | Processor | null>;
30
30
  }
31
31
  export default Trigger;
@@ -428,6 +428,7 @@ declare const _default: {
428
428
  properties: {
429
429
  execution: {
430
430
  type: string;
431
+ nullable: boolean;
431
432
  properties: {
432
433
  id: {
433
434
  type: string;
@@ -394,7 +394,8 @@ var swagger_default = {
394
394
  "**autoRevision:** When set to `1`, if the workflow has never been executed",
395
395
  "(`executed === 0`), a new revision is created automatically after execution.",
396
396
  "",
397
- "**Returns:** `{ execution: { id, status }, newVersionId? }`"
397
+ "**Returns:** `{ execution: { id, status } | null, newVersionId? }`.",
398
+ "`execution` is `null` when the request is valid but no execution is started."
398
399
  ].join("\n"),
399
400
  parameters: [
400
401
  {
@@ -433,6 +434,7 @@ var swagger_default = {
433
434
  properties: {
434
435
  execution: {
435
436
  type: "object",
437
+ nullable: true,
436
438
  properties: {
437
439
  id: { type: "integer", description: "Execution ID" },
438
440
  status: { type: "integer", description: "Execution status code" }
@@ -449,7 +451,7 @@ var swagger_default = {
449
451
  }
450
452
  },
451
453
  400: {
452
- description: "Bad Request. Request body or `filterByTk` is missing/invalid, or workflow not triggered."
454
+ description: "Bad Request. Request body or `filterByTk` is missing/invalid."
453
455
  },
454
456
  404: { description: "Not Found. Workflow does not exist." }
455
457
  }
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
7
7
  "description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
8
8
  "description.ru-RU": "Мощный инструмент BPM, обеспечивающий базовую поддержку автоматизации бизнес-процессов с возможностью неограниченного расширения триггеров и узлов.",
9
- "version": "2.2.0-alpha.7",
9
+ "version": "2.2.0-alpha.8",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/workflow",
@@ -51,7 +51,7 @@
51
51
  "@nocobase/test": "2.x",
52
52
  "@nocobase/utils": "2.x"
53
53
  },
54
- "gitHead": "34ba02960fca9ab0b6881d3db7040a8a64067bba",
54
+ "gitHead": "810c81e5963966bda7ec03b6453a3a80fe60e027",
55
55
  "keywords": [
56
56
  "Workflow"
57
57
  ]
@@ -1,10 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_workflow=self.webpackChunk_nocobase_plugin_workflow||[]).push([["719"],{1801:function(e,t,r){r.d(t,{N$:function(){return S},yr:function(){return F}});var n=r(3485),a=r(7694),o=r(2625),i=r(9155),l=r.n(i),c=r(7768),u=r(4563),s=r(9488),f=r(3943);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o=[],i=!0,l=!1;try{for(a=a.call(e);!(i=(r=a.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==a.return||a.return()}finally{if(l)throw n}}return o}}(e,t)||g(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function g(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}}var b=/^\{\{\s*([^{}]+?)\s*\}\}$/,v=/^\{\{\s*ctx\.(\$[^{}]+?)\s*\}\}$/,w=["yesterday","today","tomorrow","lastWeek","thisWeek","nextWeek","lastMonth","thisMonth","nextMonth","lastQuarter","thisQuarter","nextQuarter","lastYear","thisYear","nextYear","last7Days","next7Days","last30Days","next30Days","last90Days","next90Days"],x={yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",lastWeek:"Last week",thisWeek:"This week",nextWeek:"Next week",lastMonth:"Last month",thisMonth:"This month",nextMonth:"Next month",lastQuarter:"Last quarter",thisQuarter:"This quarter",nextQuarter:"Next quarter",lastYear:"Last year",thisYear:"This year",nextYear:"Next year",last7Days:"Last 7 days",next7Days:"Next 7 days",last30Days:"Last 30 days",next30Days:"Next 30 days",last90Days:"Last 90 days",next90Days:"Next 90 days"};function O(e){if("string"!=typeof e)return e;var t=e.trim().match(b);return!t||t[1].startsWith("ctx.")?e:"{{ ctx.".concat(t[1]," }}")}function j(e){return!!(e&&(void 0===e?"undefined":p(e))==="object"&&"logic"in e&&"items"in e)}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||(void 0===e?"undefined":p(e))!=="object"||Array.isArray(e))return t.length?[{path:t.join("."),operator:"$eq",value:O(e)}]:[];var r=Object.entries(e),n=r.filter(function(e){return y(e,1)[0].startsWith("$")});return n.length?t.length?n.map(function(e){var r=y(e,2),n=r[0],a=r[1];return{path:t.join("."),operator:n,value:O(a)}}):[]:r.flatMap(function(e){var r=y(e,2),n=r[0];return k(r[1],h(t).concat([n]))})}function A(e){return Array.isArray(e.$or)?"$or":Array.isArray(e.$and)?"$and":void 0}function E(e){var t;return j(e)?e:null!=(t=function e(t){if(!(!t||(void 0===t?"undefined":p(t))!=="object"||Array.isArray(t))){var r=A(t);if(!r){var n=k(t);return n.length?{logic:"$and",items:n}:void 0}var a=t[r].flatMap(function(t){if(!t||(void 0===t?"undefined":p(t))!=="object"||Array.isArray(t))return[];if(A(t)){var r=e(t);return r?[r]:[]}return k(t)}).filter(function(e){return!!e});return a.length?{logic:r,items:a}:void 0}}(e))?t:{logic:"$and",items:[]}}function S(e){var t=e.collection,r=e.value,d=e.onChange,y=e.rightAsVariable,p=void 0===y||y,g=e.maxAssociationFieldDepth,b=void 0===g?2:g,O=(0,a.useFlowEngine)(),k=(0,s.kj)(),A=(0,o.useMemoizedFn)(function(e,t){return k(e,t)}),S=(0,u.P)(),F=(0,i.useMemo)(function(){var e,t;return e={name:"dateRange",title:A("Date range"),type:"object",paths:["$system","dateRange"],children:w.map(function(e){return{name:e,title:A(x[e]),type:"string",paths:["$system","dateRange",e]}})},(t=S.findIndex(function(e){return"$system"===e.name}))<0?h(S).concat([{name:"$system",title:A("System variables"),type:"",paths:["$system"],children:[e]}]):S.map(function(r,n){if(n!==t||"function"==typeof r.children)return r;var a,o,i=Array.isArray(r.children)?r.children.filter(function(e){return"dateRange"!==e.name}):[];return a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){m(e,t,r[t])})}return e}({},r),o=o={children:h(i).concat([e])},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(o)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(o,e))}),a})},[A,S]),M=(0,i.useMemo)(function(){return(0,f.X_)(O.context.dataSourceManager,t)},[O,t]),I=(0,i.useMemo)(function(){if(!M)return null;var e=O.createModel({uid:(0,a.randomId)("workflowFilter_"),use:a.FlowModel}),t=O.context.app;return t&&e.context.defineProperty("app",{value:t}),e.context.defineProperty("collection",{get:function(){return M}}),e},[M,O]);(0,i.useEffect)(function(){return function(){var e;null==I||null==(e=I.remove)||e.call(I)}},[I]);var P=(0,i.useRef)();P.current||(P.current=(0,a.observable)(E(r)));var D=(0,i.useRef)(null);(0,i.useEffect)(function(){var e=JSON.stringify(null!=r?r:{});if(D.current!==e){var t=E(r);P.current&&(P.current.logic=t.logic,P.current.items=t.items,D.current=e)}},[r]),(0,i.useEffect)(function(){if(P.current)return(0,a.reaction)(function(){return JSON.stringify((0,a.toJS)(P.current))},function(e){var t,r=JSON.parse(e),n=Array.isArray(r.items)?r.items.length:0,a=(0,c.removeInvalidFilterItems)(r);if(!a.items.length){n||null==d||d({});return}var o=null!=(t=function e(t){if(null==t||null==(r=t.items)?void 0:r.length){var r,n=t.items.map(function(t){if(j(t))return e(t);if("string"==typeof t.path&&"string"==typeof t.operator&&t.path&&t.operator)return function(e,t){for(var r=e.split("."),n=t,a=r.length-1;a>=0;a--)n=m({},r[a],n);return n}(t.path,m({},t.operator,function(e){if("string"!=typeof e)return e;var t=e.trim().match(v);return t?"{{".concat(t[1],"}}"):e}(t.value)))}).filter(function(e){return!!e});if(n.length)return m({},t.logic,n)}}(a))?t:{};D.current=JSON.stringify(o),null==d||d(o)},{fireImmediately:!1})},[d]);var N=(0,i.useMemo)(function(){if(!I)return null;var e=function(e){var t=e.value;return l().createElement(a.FlowModelProvider,{model:I},l().createElement(n.VariableFilterItem,{value:t,model:I,rightAsVariable:p,rightMetaTree:F,maxAssociationFieldDepth:b}))};return e.displayName="WorkflowVariableFilterItem",e},[I,b,p,F]);return l().createElement(n.FilterGroup,{value:P.current,FilterItem:null!=N?N:void 0})}var F=S},6242:function(e,t,r){r.r(t),r.d(t,{TriggerModeField:function(){return p},default:function(){return v},CollectionPresetConfig:function(){return b},SyncTransactionNotice:function(){return h},CollectionTriggerConfig:function(){return g}});var n=r(5477),a=r(2059),o=r(9155),i=r.n(o),l=r(2235),c=r(1801),u=r(8198),s=r(9488),f=[{label:'{{t("After record added", { ns: "'.concat(s.CU,'" })}}'),value:1},{label:'{{t("After record updated", { ns: "'.concat(s.CU,'" })}}'),value:2},{label:'{{t("After record added or updated", { ns: "'.concat(s.CU,'" })}}'),value:3},{label:'{{t("After record deleted", { ns: "'.concat(s.CU,'" })}}'),value:4}];function d(e,t){return(Number(e)&t)===t}function m(){var e,t,r=(e=["\n .ant-select.auto-width {\n width: auto;\n min-width: 6em;\n }\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return m=function(){return r},r}function y(e){return!e.hidden&&(!e.uiSchema||!e.uiSchema["x-read-pretty"])&&!["linkTo","hasOne","hasMany","belongsToMany"].includes(e.type)}function h(){var e=(0,s.kj)();return i().createElement(a.Alert,{type:"info",showIcon:!0,style:{marginBottom:"1em"},message:e("Synchronous collection event workflows run within the trigger transaction by default. Related data operations automatically use this transaction.")})}function p(){var e=(0,s.kj)(),t=a.Form.useWatch(["config","collection"]),r=(0,o.useMemo)(function(){return f.map(function(t){return{value:t.value,label:e(t.label)}})},[e]);return t?i().createElement(a.Form.Item,{name:["config","mode"],label:e("Trigger on"),rules:[{required:!0}]},i().createElement(a.Select,{popupMatchSelectWidth:!1,placeholder:e("Trigger on"),className:"auto-width",options:r})):null}function g(){var e=(0,s.kj)(),t=(0,l.Zt)(),r=a.Form.useWatch(["config","collection"]),o=Number(a.Form.useWatch(["config","mode"])||0),f=null==t?void 0:t.sync;return i().createElement("fieldset",{className:(0,n.css)(m())},i().createElement(a.Form.Item,{name:["config","collection"],label:e("Collection")},i().createElement(u.XJ,{disabled:!0})),i().createElement(p,null),r&&d(o,2)?i().createElement(a.Form.Item,{name:["config","changed"],label:e("Changed fields"),extra:e("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, any field is considered to have been changed.")},i().createElement(u.WY,{mode:"multiple",placeholder:e("Select field"),filter:y})):null,r&&!d(o,4)?i().createElement(a.Form.Item,{name:["config","condition"],label:e("Only triggers when match conditions")},i().createElement(c.yr,{collection:r,rightAsVariable:!1})):null,r&&!d(o,4)?i().createElement(a.Form.Item,{name:["config","appends"],label:e("Preload associations"),extra:e("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.")},i().createElement(u.Kr,{collection:r})):null,f?i().createElement(h,null):null,f?i().createElement(a.Form.Item,{name:["config","rollbackOnFailure"],valuePropName:"checked",extra:e("Only available in synchronous mode. When enabled, if the workflow execution ends with a failed status, the data operation that triggered it will fail and be rolled back."),initialValue:!1},i().createElement(a.Checkbox,null,e("Rollback when workflow execution fails"))):null)}function b(){var e=(0,s.kj)();return i().createElement(a.Form.Item,{name:["config","collection"],label:e("Collection"),rules:[{required:!0}]},i().createElement(u.XJ,null))}var v=g}}]);
@@ -1,10 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_workflow=self.webpackChunk_nocobase_plugin_workflow||[]).push([["972"],{1801:function(e,t,r){r.d(t,{N$:function(){return D},yr:function(){return F}});var n=r(3485),o=r(7694),a=r(2625),i=r(9155),u=r.n(i),l=r(7768),c=r(4563),s=r(9488),f=r(3943);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,u=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){u=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(u)throw n}}return a}}(e,t)||h(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}}var b=/^\{\{\s*([^{}]+?)\s*\}\}$/,g=/^\{\{\s*ctx\.(\$[^{}]+?)\s*\}\}$/,w=["yesterday","today","tomorrow","lastWeek","thisWeek","nextWeek","lastMonth","thisMonth","nextMonth","lastQuarter","thisQuarter","nextQuarter","lastYear","thisYear","nextYear","last7Days","next7Days","last30Days","next30Days","last90Days","next90Days"],x={yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",lastWeek:"Last week",thisWeek:"This week",nextWeek:"Next week",lastMonth:"Last month",thisMonth:"This month",nextMonth:"Next month",lastQuarter:"Last quarter",thisQuarter:"This quarter",nextQuarter:"Next quarter",lastYear:"Last year",thisYear:"This year",nextYear:"Next year",last7Days:"Last 7 days",next7Days:"Next 7 days",last30Days:"Last 30 days",next30Days:"Next 30 days",last90Days:"Last 90 days",next90Days:"Next 90 days"};function j(e){if("string"!=typeof e)return e;var t=e.trim().match(b);return!t||t[1].startsWith("ctx.")?e:"{{ ctx.".concat(t[1]," }}")}function O(e){return!!(e&&(void 0===e?"undefined":v(e))==="object"&&"logic"in e&&"items"in e)}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||(void 0===e?"undefined":v(e))!=="object"||Array.isArray(e))return t.length?[{path:t.join("."),operator:"$eq",value:j(e)}]:[];var r=Object.entries(e),n=r.filter(function(e){return m(e,1)[0].startsWith("$")});return n.length?t.length?n.map(function(e){var r=m(e,2),n=r[0],o=r[1];return{path:t.join("."),operator:n,value:j(o)}}):[]:r.flatMap(function(e){var r=m(e,2),n=r[0];return A(r[1],p(t).concat([n]))})}function k(e){return Array.isArray(e.$or)?"$or":Array.isArray(e.$and)?"$and":void 0}function S(e){var t;return O(e)?e:null!=(t=function e(t){if(!(!t||(void 0===t?"undefined":v(t))!=="object"||Array.isArray(t))){var r=k(t);if(!r){var n=A(t);return n.length?{logic:"$and",items:n}:void 0}var o=t[r].flatMap(function(t){if(!t||(void 0===t?"undefined":v(t))!=="object"||Array.isArray(t))return[];if(k(t)){var r=e(t);return r?[r]:[]}return A(t)}).filter(function(e){return!!e});return o.length?{logic:r,items:o}:void 0}}(e))?t:{logic:"$and",items:[]}}function D(e){var t=e.collection,r=e.value,y=e.onChange,m=e.rightAsVariable,v=void 0===m||m,h=e.maxAssociationFieldDepth,b=void 0===h?2:h,j=(0,o.useFlowEngine)(),A=(0,s.kj)(),k=(0,a.useMemoizedFn)(function(e,t){return A(e,t)}),D=(0,c.P)(),F=(0,i.useMemo)(function(){var e,t;return e={name:"dateRange",title:k("Date range"),type:"object",paths:["$system","dateRange"],children:w.map(function(e){return{name:e,title:k(x[e]),type:"string",paths:["$system","dateRange",e]}})},(t=D.findIndex(function(e){return"$system"===e.name}))<0?p(D).concat([{name:"$system",title:k("System variables"),type:"",paths:["$system"],children:[e]}]):D.map(function(r,n){if(n!==t||"function"==typeof r.children)return r;var o,a,i=Array.isArray(r.children)?r.children.filter(function(e){return"dateRange"!==e.name}):[];return o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){d(e,t,r[t])})}return e}({},r),a=a={children:p(i).concat([e])},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(a)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(a,e))}),o})},[k,D]),M=(0,i.useMemo)(function(){return(0,f.X_)(j.context.dataSourceManager,t)},[j,t]),P=(0,i.useMemo)(function(){if(!M)return null;var e=j.createModel({uid:(0,o.randomId)("workflowFilter_"),use:o.FlowModel}),t=j.context.app;return t&&e.context.defineProperty("app",{value:t}),e.context.defineProperty("collection",{get:function(){return M}}),e},[M,j]);(0,i.useEffect)(function(){return function(){var e;null==P||null==(e=P.remove)||e.call(P)}},[P]);var $=(0,i.useRef)();$.current||($.current=(0,o.observable)(S(r)));var E=(0,i.useRef)(null);(0,i.useEffect)(function(){var e=JSON.stringify(null!=r?r:{});if(E.current!==e){var t=S(r);$.current&&($.current.logic=t.logic,$.current.items=t.items,E.current=e)}},[r]),(0,i.useEffect)(function(){if($.current)return(0,o.reaction)(function(){return JSON.stringify((0,o.toJS)($.current))},function(e){var t,r=JSON.parse(e),n=Array.isArray(r.items)?r.items.length:0,o=(0,l.removeInvalidFilterItems)(r);if(!o.items.length){n||null==y||y({});return}var a=null!=(t=function e(t){if(null==t||null==(r=t.items)?void 0:r.length){var r,n=t.items.map(function(t){if(O(t))return e(t);if("string"==typeof t.path&&"string"==typeof t.operator&&t.path&&t.operator)return function(e,t){for(var r=e.split("."),n=t,o=r.length-1;o>=0;o--)n=d({},r[o],n);return n}(t.path,d({},t.operator,function(e){if("string"!=typeof e)return e;var t=e.trim().match(g);return t?"{{".concat(t[1],"}}"):e}(t.value)))}).filter(function(e){return!!e});if(n.length)return d({},t.logic,n)}}(o))?t:{};E.current=JSON.stringify(a),null==y||y(a)},{fireImmediately:!1})},[y]);var I=(0,i.useMemo)(function(){if(!P)return null;var e=function(e){var t=e.value;return u().createElement(o.FlowModelProvider,{model:P},u().createElement(n.VariableFilterItem,{value:t,model:P,rightAsVariable:v,rightMetaTree:F,maxAssociationFieldDepth:b}))};return e.displayName="WorkflowVariableFilterItem",e},[P,b,v,F]);return u().createElement(n.FilterGroup,{value:$.current,FilterItem:null!=I?I:void 0})}var F=D},5329:function(e,t,r){r.d(t,{F:function(){return c}});var n=r(9155),o=r.n(n),a=r(2059),i=r(8198),u=r(9488);function l(e){var t=e.value,r=e.onChange,a=e.disabled,u=e.onCollectionChanged,l=(0,n.useRef)();return o().createElement(i.XJ,{value:t,disabled:a,onChange:function(e){var n,o=null!=(n=l.current)?n:t;null==r||r(e),o&&o!==e&&(null==u||u(o,e)),l.current=e}})}function c(e){var t=e.disabled,r=e.onCollectionChanged,n=(0,u.kj)();return o().createElement(a.Form.Item,{name:["config","collection"],label:n("Collection"),rules:[{required:!0}]},o().createElement(l,{disabled:t,onCollectionChanged:r}))}},6855:function(e,t,r){r.d(t,{F:function(){return s}});var n=r(9155),o=r.n(n),a=r(2059),i=r(7768),u=r(1801),l=r(9488);function c(e,t,r,n,o,a,i){try{var u=e[a](i),l=u.value}catch(e){r(e);return}u.done?t(l):Promise.resolve(l).then(n,o)}function s(e){var t=e.collection,r=e.label,n=e.name,s=e.required,f=e.maxAssociationFieldDepth,y=(0,l.kj)();return o().createElement(a.Form.Item,{name:void 0===n?["config","params","filter"]:n,label:null!=r?r:y("Filter"),validateTrigger:["onChange","onBlur"],rules:void 0===s||s?[{validator:function(e,t){var r;return(r=function(){return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(i,"next",{value:l(0)}),u(i,"throw",{value:l(1)}),u(i,"return",{value:l(2)}),"function"==typeof Symbol&&u(i,Symbol.iterator,{value:function(){return this}}),i;function l(u){return function(l){var c=[u,l];if(r)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){if(!(0,i.isValidFilter)(t))throw Error(y("Please add at least one condition"));return[2]})},function(){var e=this,t=arguments;return new Promise(function(n,o){var a=r.apply(e,t);function i(e){c(a,n,o,i,u,"next",e)}function u(e){c(a,n,o,i,u,"throw",e)}i(void 0)})})()}}]:void 0},o().createElement(u.N$,{collection:t,maxAssociationFieldDepth:void 0===f?2:f}))}}}]);
@@ -1,10 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
-
10
- "use strict";(self.webpackChunk_nocobase_plugin_workflow_client_v2=self.webpackChunk_nocobase_plugin_workflow_client_v2||[]).push([["142"],{5329:function(e,n,t){t.d(n,{F:function(){return u}});var r=t(9155),l=t.n(r),o=t(2059),a=t(7806),i=t(9488);function c(e){var n=e.value,t=e.onChange,o=e.disabled,i=e.onCollectionChanged,c=(0,r.useRef)();return l().createElement(a.XJ,{value:n,disabled:o,onChange:function(e){var r,l=null!=(r=c.current)?r:n;null==t||t(e),l&&l!==e&&(null==i||i(l,e)),c.current=e}})}function u(e){var n=e.disabled,t=e.onCollectionChanged,r=(0,i.kj)();return l().createElement(o.Form.Item,{name:["config","collection"],label:r("Collection"),rules:[{required:!0}]},l().createElement(c,{disabled:n,onCollectionChanged:t}))}},6855:function(e,n,t){t.d(n,{F:function(){return s}});var r=t(9155),l=t.n(r),o=t(2059),a=t(7768),i=t(1801),c=t(9488);function u(e,n,t,r,l,o,a){try{var i=e[o](a),c=i.value}catch(e){t(e);return}i.done?n(c):Promise.resolve(c).then(r,l)}function s(e){var n=e.collection,t=e.label,r=e.name,s=e.required,f=e.maxAssociationFieldDepth,m=(0,c.kj)();return l().createElement(o.Form.Item,{name:void 0===r?["config","params","filter"]:r,label:null!=t?t:m("Filter"),validateTrigger:["onChange","onBlur"],rules:void 0===s||s?[{validator:function(e,n){var t;return(t=function(){return function(e,n){var t,r,l,o={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(a,"next",{value:c(0)}),i(a,"throw",{value:c(1)}),i(a,"return",{value:c(2)}),"function"==typeof Symbol&&i(a,Symbol.iterator,{value:function(){return this}}),a;function c(i){return function(c){var u=[i,c];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(t=1,r&&(l=2&u[0]?r.return:u[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,u[1])).done)return l;switch(r=0,l&&(u=[2&u[0],l.value]),u[0]){case 0:case 1:l=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(l=(l=o.trys).length>0&&l[l.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!l||u[1]>l[0]&&u[1]<l[3])){o.label=u[1];break}if(6===u[0]&&o.label<l[1]){o.label=l[1],l=u;break}if(l&&o.label<l[2]){o.label=l[2],o.ops.push(u);break}l[2]&&o.ops.pop(),o.trys.pop();continue}u=n.call(e,o)}catch(e){u=[6,e],r=0}finally{t=l=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(e){if(!(0,a.isValidFilter)(n))throw Error(m("Please add at least one condition"));return[2]})},function(){var e=this,n=arguments;return new Promise(function(r,l){var o=t.apply(e,n);function a(e){u(o,r,l,a,i,"next",e)}function i(e){u(o,r,l,a,i,"throw",e)}a(void 0)})})()}}]:void 0},l().createElement(i.N$,{collection:n,maxAssociationFieldDepth:void 0===f?2:f}))}},693:function(e,n,t){t.d(n,{QueryFieldset:function(){return d},QueryPresetFieldset:function(){return p}});var r=t(9155),l=t.n(r),o=t(2059),a=t(2235),i=t(7806),c=t(9785),u=t(9488),s=t(5329),f=t(6855);function m(){var e=(0,u.kj)(),n=o.Form.useWatch(["config","collection"]);return n?l().createElement(l().Fragment,null,l().createElement(f.F,{collection:n,required:!1}),l().createElement(o.Form.Item,{name:["config","params","sort"],label:e("Sort")},l().createElement(i.o5,{collection:n})),l().createElement(i.uc,{pageName:["config","params","page"],pageSizeName:["config","params","pageSize"]}),l().createElement(o.Form.Item,{name:["config","params","appends"],label:e("Preload associations"),extra:e("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.")},l().createElement(i.Kr,{collection:n}))):null}function d(){var e,n,t=(0,u.kj)(),i=(0,a.TA)(),f=o.Form.useFormInstance(),d=[{label:(e=(0,u.kj)())("Single record"),value:!1,tooltip:e("The result will be an object of the first matching record only, or null if no matched record.")},{label:e("Multiple records"),value:!0,tooltip:e("The result will be an array containing matched records, or an empty one if no matching records. This can be used to be processed in a loop node.")}];return(0,r.useEffect)(function(){void 0===f.getFieldValue(["config","multiple"])&&f.setFieldValue(["config","multiple"],!1)},[f]),l().createElement(l().Fragment,null,l().createElement(s.F,{disabled:!!(null==i||null==(n=i.config)?void 0:n.collection),onCollectionChanged:function(){f.setFieldValue(["config","params"],{})}}),l().createElement(o.Form.Item,{name:["config","multiple"],label:t("Result type")},l().createElement(c.$,{options:d})),l().createElement(m,null),l().createElement(o.Form.Item,{name:["config","failOnEmpty"],valuePropName:"checked"},l().createElement(o.Checkbox,null,t("Exit when query result is null"))))}function p(){return l().createElement(s.F,null)}}}]);