@rytass/bpm-core-react 0.15.0 → 0.17.0

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 (230) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +54 -6
  3. package/dist/chunks/{FormBuilderView-CLg-JYmu.js → FormBuilderView-BYL42M0d.js} +13 -33
  4. package/dist/chunks/FormBuilderView-BYL42M0d.js.map +1 -0
  5. package/dist/chunks/FormBuilderView-aBcA-_tt.cjs +3 -0
  6. package/dist/chunks/FormBuilderView-aBcA-_tt.cjs.map +1 -0
  7. package/dist/chunks/FormRendererView-DRFi_IH7.cjs +4 -0
  8. package/dist/chunks/FormRendererView-DRFi_IH7.cjs.map +1 -0
  9. package/dist/chunks/{FormRendererView-DU9LLrOF.js → FormRendererView-cZGOOjU5.js} +319 -332
  10. package/dist/chunks/FormRendererView-cZGOOjU5.js.map +1 -0
  11. package/dist/chunks/{admin-pickers-DLlG_1du.js → admin-pickers-DxhzECkD.js} +52 -51
  12. package/dist/chunks/admin-pickers-DxhzECkD.js.map +1 -0
  13. package/dist/chunks/admin-pickers-qe3j--gX.cjs +2 -0
  14. package/dist/chunks/admin-pickers-qe3j--gX.cjs.map +1 -0
  15. package/dist/chunks/approval-instance-list-page-CPXMP3PL.js.map +1 -1
  16. package/dist/chunks/approval-instance-list-page-ax0pm8bt.cjs.map +1 -1
  17. package/dist/chunks/auth-provider-4BeCw7cI.cjs.map +1 -1
  18. package/dist/chunks/auth-provider-B5oPmvk2.js.map +1 -1
  19. package/dist/chunks/bpm-form-field-Bc6k4ZEO.cjs.map +1 -1
  20. package/dist/chunks/bpm-form-field-Cao0rMol.js.map +1 -1
  21. package/dist/chunks/{categories-DGlxuC6X.js → categories-1gKxeEqw.js} +4 -10
  22. package/dist/chunks/categories-1gKxeEqw.js.map +1 -0
  23. package/dist/chunks/{categories-Yid05WAX.cjs → categories-DjENouRm.cjs} +2 -2
  24. package/dist/chunks/categories-DjENouRm.cjs.map +1 -0
  25. package/dist/chunks/{compose-BtQPBd1Q.js → compose-Crklayzy.js} +4 -4
  26. package/dist/chunks/compose-Crklayzy.js.map +1 -0
  27. package/dist/chunks/{compose-DZhTQOt4.cjs → compose-DZ7RKvUp.cjs} +2 -2
  28. package/dist/chunks/compose-DZ7RKvUp.cjs.map +1 -0
  29. package/dist/chunks/dashboard-page-BWQBSGDq.cjs +2 -0
  30. package/dist/chunks/dashboard-page-BWQBSGDq.cjs.map +1 -0
  31. package/dist/chunks/{dashboard-page-CeCLV1tp.js → dashboard-page-DdBvV6YI.js} +15 -16
  32. package/dist/chunks/dashboard-page-DdBvV6YI.js.map +1 -0
  33. package/dist/chunks/delegations-Ckf03icM.cjs +2 -0
  34. package/dist/chunks/delegations-Ckf03icM.cjs.map +1 -0
  35. package/dist/chunks/{delegations-DRupxJ4_.js → delegations-MxF3uJGW.js} +205 -215
  36. package/dist/chunks/delegations-MxF3uJGW.js.map +1 -0
  37. package/dist/chunks/delegations-V9HIe3_P.cjs +2 -0
  38. package/dist/chunks/delegations-V9HIe3_P.cjs.map +1 -0
  39. package/dist/chunks/{delegations-B8gLSt0i.js → delegations-xUt1tj8d.js} +168 -173
  40. package/dist/chunks/delegations-xUt1tj8d.js.map +1 -0
  41. package/dist/chunks/{designer-CrbBRPUU.js → designer-D9eFma1W.js} +1180 -1134
  42. package/dist/chunks/designer-D9eFma1W.js.map +1 -0
  43. package/dist/chunks/designer-sJGTGYOf.cjs +65 -0
  44. package/dist/chunks/designer-sJGTGYOf.cjs.map +1 -0
  45. package/dist/chunks/detail-DRCTnuKm.cjs +2 -0
  46. package/dist/chunks/detail-DRCTnuKm.cjs.map +1 -0
  47. package/dist/chunks/{detail-_c21WQla.js → detail-DScLf42P.js} +849 -836
  48. package/dist/chunks/detail-DScLf42P.js.map +1 -0
  49. package/dist/chunks/format-date-time-CB-LxzqT.js.map +1 -1
  50. package/dist/chunks/format-date-time-D-cx5M8z.cjs.map +1 -1
  51. package/dist/chunks/format-member-label-DudVI55w.js +13 -0
  52. package/dist/chunks/format-member-label-DudVI55w.js.map +1 -0
  53. package/dist/chunks/format-member-label-t7ANTF62.cjs +2 -0
  54. package/dist/chunks/format-member-label-t7ANTF62.cjs.map +1 -0
  55. package/dist/chunks/login-AtVxZBsC.cjs.map +1 -1
  56. package/dist/chunks/login-C6qlTC6F.js.map +1 -1
  57. package/dist/chunks/notifications-Bc4mgSds.cjs.map +1 -1
  58. package/dist/chunks/notifications-DJ5wzCye.js.map +1 -1
  59. package/dist/chunks/{orgs-BpqVu5ka.js → orgs-CY0i1fie.js} +787 -766
  60. package/dist/chunks/orgs-CY0i1fie.js.map +1 -0
  61. package/dist/chunks/orgs-Dr0FFoZo.cjs +2 -0
  62. package/dist/chunks/orgs-Dr0FFoZo.cjs.map +1 -0
  63. package/dist/chunks/providers-DHtDZFNA.cjs.map +1 -1
  64. package/dist/chunks/providers-J5eyByQj.js.map +1 -1
  65. package/dist/chunks/router-adapter--gYs13E8.cjs.map +1 -1
  66. package/dist/chunks/router-adapter-DftlFTOd.js.map +1 -1
  67. package/dist/chunks/routes-config-C1j_vFKo.cjs.map +1 -1
  68. package/dist/chunks/routes-config-yZbESPlw.js.map +1 -1
  69. package/dist/chunks/task-node-label-BF6UllxP.cjs.map +1 -1
  70. package/dist/chunks/task-node-label-CWZgOBj0.js.map +1 -1
  71. package/dist/chunks/use-bpm-member-D57LKe_u.js.map +1 -1
  72. package/dist/chunks/use-bpm-member-DpNAQtNC.cjs.map +1 -1
  73. package/dist/chunks/users-BCyePbwB.js +422 -0
  74. package/dist/chunks/users-BCyePbwB.js.map +1 -0
  75. package/dist/chunks/users-DVBJluFR.cjs +2 -0
  76. package/dist/chunks/users-DVBJluFR.cjs.map +1 -0
  77. package/dist/index.cjs +1 -1
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.js +2 -2
  80. package/dist/index.js.map +1 -1
  81. package/dist/lib/format-member-label.d.ts +12 -0
  82. package/dist/next/index.cjs.map +1 -1
  83. package/dist/next/index.js.map +1 -1
  84. package/dist/next/workflow-chat-route.cjs.map +1 -1
  85. package/dist/next/workflow-chat-route.js.map +1 -1
  86. package/dist/pages/admin/delegations/index.cjs +1 -1
  87. package/dist/pages/admin/delegations/index.cjs.map +1 -1
  88. package/dist/pages/admin/delegations/index.js +1 -1
  89. package/dist/pages/admin/delegations/index.js.map +1 -1
  90. package/dist/pages/admin/orgs/index.cjs +1 -1
  91. package/dist/pages/admin/orgs/index.cjs.map +1 -1
  92. package/dist/pages/admin/orgs/index.js +1 -1
  93. package/dist/pages/admin/orgs/index.js.map +1 -1
  94. package/dist/pages/admin/users/index.cjs +1 -1
  95. package/dist/pages/admin/users/index.cjs.map +1 -1
  96. package/dist/pages/admin/users/index.js +1 -1
  97. package/dist/pages/admin/users/index.js.map +1 -1
  98. package/dist/pages/admin/webhook-endpoints/index.cjs.map +1 -1
  99. package/dist/pages/admin/webhook-endpoints/index.js.map +1 -1
  100. package/dist/pages/cc/index.cjs.map +1 -1
  101. package/dist/pages/cc/index.js.map +1 -1
  102. package/dist/pages/dashboard/index.cjs.map +1 -1
  103. package/dist/pages/dashboard/index.js.map +1 -1
  104. package/dist/pages/delegations/index.cjs +1 -1
  105. package/dist/pages/delegations/index.cjs.map +1 -1
  106. package/dist/pages/delegations/index.js +1 -1
  107. package/dist/pages/delegations/index.js.map +1 -1
  108. package/dist/pages/inbox/index.cjs.map +1 -1
  109. package/dist/pages/inbox/index.js.map +1 -1
  110. package/dist/pages/instances/detail/index.cjs +1 -1
  111. package/dist/pages/instances/detail/index.cjs.map +1 -1
  112. package/dist/pages/instances/detail/index.js +1 -1
  113. package/dist/pages/instances/detail/index.js.map +1 -1
  114. package/dist/pages/instances/new/index.cjs.map +1 -1
  115. package/dist/pages/instances/new/index.js.map +1 -1
  116. package/dist/pages/login/index.cjs.map +1 -1
  117. package/dist/pages/login/index.js.map +1 -1
  118. package/dist/pages/root/index.cjs.map +1 -1
  119. package/dist/pages/root/index.js.map +1 -1
  120. package/dist/pages/search/index.cjs.map +1 -1
  121. package/dist/pages/search/index.js.map +1 -1
  122. package/dist/pages/sent/index.cjs.map +1 -1
  123. package/dist/pages/sent/index.js.map +1 -1
  124. package/dist/pages/settings/notifications/index.cjs.map +1 -1
  125. package/dist/pages/settings/notifications/index.js.map +1 -1
  126. package/dist/pages/templates/categories/index.cjs +1 -1
  127. package/dist/pages/templates/categories/index.cjs.map +1 -1
  128. package/dist/pages/templates/categories/index.js +1 -1
  129. package/dist/pages/templates/categories/index.js.map +1 -1
  130. package/dist/pages/templates/compose/index.cjs +1 -1
  131. package/dist/pages/templates/compose/index.cjs.map +1 -1
  132. package/dist/pages/templates/compose/index.js +1 -1
  133. package/dist/pages/templates/compose/index.js.map +1 -1
  134. package/dist/pages/templates/designer/index.cjs +1 -1
  135. package/dist/pages/templates/designer/index.cjs.map +1 -1
  136. package/dist/pages/templates/designer/index.js +1 -1
  137. package/dist/pages/templates/designer/index.js.map +1 -1
  138. package/dist/pages/templates/index.cjs.map +1 -1
  139. package/dist/pages/templates/index.js.map +1 -1
  140. package/dist/pages/templates/versions/index.cjs.map +1 -1
  141. package/dist/pages/templates/versions/index.js.map +1 -1
  142. package/dist/views/admin/delegations/index.cjs +1 -1
  143. package/dist/views/admin/delegations/index.js +1 -2
  144. package/dist/views/admin/index.cjs +1 -1
  145. package/dist/views/admin/index.js +3 -3
  146. package/dist/views/admin/orgs/index.cjs +1 -1
  147. package/dist/views/admin/orgs/index.js +1 -2
  148. package/dist/views/admin/users/MemberTaskReassignModal.d.ts +13 -0
  149. package/dist/views/admin/users/index.cjs +1 -1
  150. package/dist/views/admin/users/index.js +1 -2
  151. package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
  152. package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
  153. package/dist/views/cc/index.cjs.map +1 -1
  154. package/dist/views/cc/index.js.map +1 -1
  155. package/dist/views/dashboard/index.cjs +1 -1
  156. package/dist/views/dashboard/index.cjs.map +1 -1
  157. package/dist/views/dashboard/index.js +1 -1
  158. package/dist/views/dashboard/index.js.map +1 -1
  159. package/dist/views/delegations/index.cjs +1 -1
  160. package/dist/views/delegations/index.js +1 -2
  161. package/dist/views/forms/builder/index.cjs +1 -1
  162. package/dist/views/forms/builder/index.js +1 -2
  163. package/dist/views/forms/renderer/index.cjs +1 -1
  164. package/dist/views/forms/renderer/index.js +1 -2
  165. package/dist/views/inbox/index.cjs +1 -1
  166. package/dist/views/inbox/index.cjs.map +1 -1
  167. package/dist/views/inbox/index.js +1 -5
  168. package/dist/views/inbox/index.js.map +1 -1
  169. package/dist/views/instances/detail/index.cjs +1 -1
  170. package/dist/views/instances/detail/index.js +1 -2
  171. package/dist/views/instances/index.js +1 -2
  172. package/dist/views/instances/new/index.cjs +1 -1
  173. package/dist/views/instances/new/index.cjs.map +1 -1
  174. package/dist/views/instances/new/index.js +4 -11
  175. package/dist/views/instances/new/index.js.map +1 -1
  176. package/dist/views/login/index.js +1 -2
  177. package/dist/views/search/index.cjs.map +1 -1
  178. package/dist/views/search/index.js.map +1 -1
  179. package/dist/views/sent/index.cjs.map +1 -1
  180. package/dist/views/sent/index.js.map +1 -1
  181. package/dist/views/settings/index.js +1 -2
  182. package/dist/views/settings/notifications/index.js +1 -2
  183. package/dist/views/templates/categories/index.cjs +1 -1
  184. package/dist/views/templates/categories/index.js +1 -2
  185. package/dist/views/templates/compose/index.cjs +1 -1
  186. package/dist/views/templates/compose/index.js +1 -2
  187. package/dist/views/templates/designer/index.cjs +1 -1
  188. package/dist/views/templates/designer/index.js +1 -2
  189. package/dist/views/templates/index.cjs +1 -1
  190. package/dist/views/templates/index.cjs.map +1 -1
  191. package/dist/views/templates/index.js +1 -1
  192. package/dist/views/templates/index.js.map +1 -1
  193. package/dist/views/templates/versions/index.cjs.map +1 -1
  194. package/dist/views/templates/versions/index.js.map +1 -1
  195. package/package.json +5 -5
  196. package/dist/chunks/FormBuilderView-6bCbIkz6.cjs +0 -3
  197. package/dist/chunks/FormBuilderView-6bCbIkz6.cjs.map +0 -1
  198. package/dist/chunks/FormBuilderView-CLg-JYmu.js.map +0 -1
  199. package/dist/chunks/FormRendererView-DU9LLrOF.js.map +0 -1
  200. package/dist/chunks/FormRendererView-gctFIqwC.cjs +0 -4
  201. package/dist/chunks/FormRendererView-gctFIqwC.cjs.map +0 -1
  202. package/dist/chunks/admin-pickers-Btvij1at.cjs +0 -2
  203. package/dist/chunks/admin-pickers-Btvij1at.cjs.map +0 -1
  204. package/dist/chunks/admin-pickers-DLlG_1du.js.map +0 -1
  205. package/dist/chunks/categories-DGlxuC6X.js.map +0 -1
  206. package/dist/chunks/categories-Yid05WAX.cjs.map +0 -1
  207. package/dist/chunks/compose-BtQPBd1Q.js.map +0 -1
  208. package/dist/chunks/compose-DZhTQOt4.cjs.map +0 -1
  209. package/dist/chunks/dashboard-page-CeCLV1tp.js.map +0 -1
  210. package/dist/chunks/dashboard-page-DooFJsxM.cjs +0 -2
  211. package/dist/chunks/dashboard-page-DooFJsxM.cjs.map +0 -1
  212. package/dist/chunks/delegations-8LsxcQM4.cjs +0 -2
  213. package/dist/chunks/delegations-8LsxcQM4.cjs.map +0 -1
  214. package/dist/chunks/delegations-B8gLSt0i.js.map +0 -1
  215. package/dist/chunks/delegations-DRupxJ4_.js.map +0 -1
  216. package/dist/chunks/delegations-DlYwMiAW.cjs +0 -2
  217. package/dist/chunks/delegations-DlYwMiAW.cjs.map +0 -1
  218. package/dist/chunks/designer-CrbBRPUU.js.map +0 -1
  219. package/dist/chunks/designer-D3_lWmfa.cjs +0 -65
  220. package/dist/chunks/designer-D3_lWmfa.cjs.map +0 -1
  221. package/dist/chunks/detail-CVXb5Vy8.cjs +0 -2
  222. package/dist/chunks/detail-CVXb5Vy8.cjs.map +0 -1
  223. package/dist/chunks/detail-_c21WQla.js.map +0 -1
  224. package/dist/chunks/orgs-BpqVu5ka.js.map +0 -1
  225. package/dist/chunks/orgs-D0-5BaHT.cjs +0 -2
  226. package/dist/chunks/orgs-D0-5BaHT.cjs.map +0 -1
  227. package/dist/chunks/users-C9LA-Rd7.cjs +0 -2
  228. package/dist/chunks/users-C9LA-Rd7.cjs.map +0 -1
  229. package/dist/chunks/users-FWrb3ehW.js +0 -214
  230. package/dist/chunks/users-FWrb3ehW.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,89 @@
1
+ ## 0.17.0 (2026-10-15)
2
+
3
+ ### 🚀 Features
4
+
5
+ - ⚠️ **workflow-engine:** end SLA-terminated instances as EXPIRED ([7dcca4e](https://github.com/Rytass/BPMCore/commit/7dcca4e))
6
+ - **template:** allow lastDecision in edge conditions ([e8b4788](https://github.com/Rytass/BPMCore/commit/e8b4788))
7
+ - **react:** add member task reassignment modal to admin users ([f12e9f8](https://github.com/Rytass/BPMCore/commit/f12e9f8))
8
+ - **workflow-engine:** add administrator in-place task reassignment ([02ce920](https://github.com/Rytass/BPMCore/commit/02ce920))
9
+ - **template-designer:** let the fallback mode pick a position ([257a361](https://github.com/Rytass/BPMCore/commit/257a361))
10
+ - **views:** ask for a successor unit before retiring an org unit ([b79cd5c](https://github.com/Rytass/BPMCore/commit/b79cd5c))
11
+ - ⚠️ **organization:** retire org units into a successor unit ([514e0b2](https://github.com/Rytass/BPMCore/commit/514e0b2))
12
+
13
+ ### 🩹 Fixes
14
+
15
+ - **migrations:** check pg_trgm with the other required extensions ([30a1e58](https://github.com/Rytass/BPMCore/commit/30a1e58))
16
+ - **template:** check CEL roots per call site on publish ([868d236](https://github.com/Rytass/BPMCore/commit/868d236))
17
+ - **instance-detail:** show how a closed instance ended ([a110e08](https://github.com/Rytass/BPMCore/commit/a110e08))
18
+ - ⚠️ **delegation:** order rules by priority, higher first ([96cca55](https://github.com/Rytass/BPMCore/commit/96cca55))
19
+ - **react:** drop a late member task listing in the reassignment modal ([1a7724e](https://github.com/Rytass/BPMCore/commit/1a7724e))
20
+ - **react:** keep reassigned task titles and fit the result table ([3b90530](https://github.com/Rytass/BPMCore/commit/3b90530))
21
+ - **template-designer:** keep unknown approver fallbacks read-only ([5ea88fe](https://github.com/Rytass/BPMCore/commit/5ea88fe))
22
+
23
+ ### ⚠️ Breaking Changes
24
+
25
+ - **workflow-engine:** end SLA-terminated instances as EXPIRED ([7dcca4e](https://github.com/Rytass/BPMCore/commit/7dcca4e))
26
+ an instance ended by SLA `TERMINATE_INSTANCE` is now
27
+ `EXPIRED` instead of `CANCELLED`, and its activity log is
28
+ `INSTANCE_EXPIRED` with a null actor instead of `INSTANCE_CANCELLED` in
29
+ the initiator's name. Instances terminated before this change stay
30
+ CANCELLED. A host implementing `BPMWorkflowEngineService` itself must add
31
+ `expireApprovalInstance`.
32
+ - **delegation:** order rules by priority, higher first ([96cca55](https://github.com/Rytass/BPMCore/commit/96cca55))
33
+ when several active delegation rules of one principal
34
+ match a task, the rule with the highest priority now applies instead of
35
+ the oldest. No data migration is needed: priority had no effect before,
36
+ but principals with overlapping rules may now be delegated differently,
37
+ so review their priorities.
38
+ - **organization:** retire org units into a successor unit ([514e0b2](https://github.com/Rytass/BPMCore/commit/514e0b2))
39
+ deleteOrgUnit now also refuses a unit that has no open
40
+ memberships but still has an open ORG_UNIT-scoped manager rule; it used to
41
+ retire it and leave the rule silently dormant. Pass transferToOrgUnitId (or
42
+ end the rule first) to retire such a unit. The refusal message keeps its
43
+ leading "Org unit with memberships cannot be deleted" sentence.
44
+
45
+ ### ❤️ Thank You
46
+
47
+ - Chia Yu Pai @fantasywind
48
+
49
+ ## 0.16.2 (2026-10-14)
50
+
51
+ ### 🚀 Features
52
+
53
+ - **react:** support react-pdf 11 and pdfjs-dist 6 in the PDF preview ([ab7f3ca](https://github.com/Rytass/BPMCore/commit/ab7f3ca))
54
+
55
+ ### 🩹 Fixes
56
+
57
+ - **views:** treat a blank member e-mail as missing ([d8504ed](https://github.com/Rytass/BPMCore/commit/d8504ed))
58
+ - **views:** drop empty parentheses when a member has no e-mail ([2b02a60](https://github.com/Rytass/BPMCore/commit/2b02a60))
59
+
60
+ ### ❤️ Thank You
61
+
62
+ - Chia Yu Pai @fantasywind
63
+ - Kai-Chieh Yang
64
+
65
+ ## 0.16.0 (2026-10-13)
66
+
67
+ ### 🚀 Features
68
+
69
+ - ⚠️ **attachment:** boot without attachment settings ([808bc65](https://github.com/Rytass/BPMCore/commit/808bc65))
70
+
71
+ ### ⚠️ Breaking Changes
72
+
73
+ - **attachment:** boot without attachment settings ([808bc65](https://github.com/Rytass/BPMCore/commit/808bc65))
74
+ BPMResolvedAttachmentOptions.publicBaseUrl is
75
+ string | null, DEFAULT_BPM_ATTACHMENT_OPTIONS no longer carries a
76
+ signedUrlSecret, and attachmentAllowInsecureSignedUrlSecret is
77
+ deprecated and ignored. A host running more than one API replica must
78
+ set a shared attachmentSignedUrlSecret, since a generated one only
79
+ verifies on the process that signed the URL.
80
+ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
81
+
82
+ ### ❤️ Thank You
83
+
84
+ - Chia Yu Pai @fantasywind
85
+ - Claude Opus 5.5
86
+
1
87
  ## 0.15.0 (2026-10-13)
2
88
 
3
89
  ### ⚠️ Breaking Changes
package/README.md CHANGED
@@ -17,13 +17,23 @@ network query.
17
17
  The controlled `FormBuilderView` loads only the host-registered DataSource
18
18
  Catalog. It filters sources by control capability, supports typed field and
19
19
  constant parameter bindings, preserves bindings when a field key is renamed,
20
- and asks for confirmation before source/mode changes or removing a field used
21
- by another dynamic field. The editor can send the complete schema to the
20
+ and asks for confirmation before switching the selection mode, replacing an
21
+ already-configured DataSource, or removing a field used by another dynamic
22
+ field. Picking a source applies at once; switching away from a configured
23
+ source drops its bindings. The editor can send the complete schema to the
22
24
  server-side lint contract before publishing.
23
25
 
24
26
  ## Status
25
27
 
26
- `0.4.0` (breaking) — drops the bundled navigation shell. BPM views no longer wrap themselves in an `<AppLayout>` / Mezzanine `<Navigation>`; the host owns the layout chrome and mounts BPM views inside its own sidebar / top bar. New host-facing widgets ship in the root barrel: `useBPMMember`, `useBPMLogout`, `<BPMNotificationBellButton />`. See `CHANGELOG.md` for the migration walkthrough, and `docs/integration-guide.md` for a host integration recipe.
28
+ The current version is in `package.json` and `CHANGELOG.md` (the packages
29
+ share one version number under `nx release`).
30
+
31
+ Version 0.4.0 was a breaking release that dropped the bundled navigation shell:
32
+ BPM views no longer wrap themselves in an `<AppLayout>` / Mezzanine `<Navigation>`,
33
+ and the host owns the layout chrome. The 0.4.0 entry in `CHANGELOG.md` has the
34
+ migration walkthrough. Host-facing widgets in the root barrel are `useBPMMember`,
35
+ `useBPMLogout`, and `<BPMNotificationBellButton />`. For a host integration
36
+ recipe, see `docs/integration-guide.md`.
27
37
 
28
38
  ## Install
29
39
 
@@ -31,11 +41,35 @@ server-side lint contract before publishing.
31
41
  pnpm add @rytass/bpm-core-react @rytass/bpm-core-client @rytass/bpm-core-shared @mezzanine-ui/react @mezzanine-ui/icons
32
42
  ```
33
43
 
34
- Peer requirements: React 18+, Mezzanine UI 1.1+. Next.js is required only when consuming the `pages/*` subpath; framework-agnostic consumers can use `views/*` directly with their own router adapter.
44
+ Required peers: `react` / `react-dom` 18+, `@mezzanine-ui/react`, `@mezzanine-ui/core`
45
+ and `@mezzanine-ui/icons` `>=1.0.0` (this workspace develops against Mezzanine
46
+ 1.5.1, pinned in the root `package.json`), plus `@rytass/bpm-core-client` and
47
+ `@rytass/bpm-core-shared` at the same version. Every other peer is declared
48
+ optional in `package.json` → `peerDependenciesMeta` and is needed only by the
49
+ feature that imports it:
50
+
51
+ - `next` (>=15) — the `pages/*` and `next/*` subpaths; framework-agnostic
52
+ consumers can use `views/*` directly with their own router adapter.
53
+ - `@xyflow/react`, `dagre` — the flow designer and flow diagrams.
54
+ - `@hello-pangea/dnd` — drag-and-drop in the form builder.
55
+ - `@uiw/react-codemirror`, `@codemirror/view`, `@codemirror/lang-json` — JSON editors.
56
+ - `react-pdf` (>=10), `pdfjs-dist` (`^5.4.296 || ^6.3.289`) — PDF preview.
57
+ - `ai` (>=6), `@ai-sdk/react`, `@ai-sdk/openai` — the designer AI assistant.
58
+
59
+ `package.json` is the authoritative list.
60
+
61
+ ### Next.js + pnpm setup (conditional)
35
62
 
36
- ### Next.js + pnpm setup
63
+ `transpilePackages` is **not required by default**. The published packages ship
64
+ compiled `dist/` output with `exports` maps. This repository's `apps/client`
65
+ does not set `transpilePackages` (`apps/client/next.config.js`) and imports the
66
+ libraries through tsconfig path aliases to their source.
37
67
 
38
- If your host uses Next.js (15+) with pnpm strict mode, add the package to `transpilePackages` in `next.config.js`. Without this, Next's Turbopack cannot resolve transitive peer-dep imports such as `@rytass/bpm-core-client/workflow` from inside pnpm-isolated `node_modules/.pnpm/...` paths.
68
+ Add the setting only if your build reports an unresolved transitive import
69
+ under pnpm strict mode, for example `@rytass/bpm-core-client/workflow` imported
70
+ from inside `node_modules/.pnpm/...`. This README has **not** reproduced that
71
+ failure against the published packages; treat the snippet below as the workaround
72
+ to try in that case, not as a requirement.
39
73
 
40
74
  ```js
41
75
  /** @type {import('next').NextConfig} */
@@ -54,6 +88,20 @@ module.exports = {
54
88
  };
55
89
  ```
56
90
 
91
+ ### Designer feature flags (Next.js host env)
92
+
93
+ The designer page shim (`pages/templates/designer`) reads these server-side
94
+ environment variables. Set them in the host's `.env.local` or deployment config.
95
+
96
+ - `BPM_AI_ASSISTANT_ENABLED=true`: shows the designer AI assistant. It is hidden
97
+ by default. It also needs `OPENAI_API_KEY` (server-only); without the key the
98
+ toggle shows as a disabled placeholder.
99
+ - `BPM_TEMPLATE_DRY_RUN_ENABLED=false`: hides the 試跑流程 (dry-run) button. The
100
+ button is shown by default; only the exact value `'false'` hides it.
101
+
102
+ For direct control, `TemplateDesignerView` accepts `showAiAssistant`,
103
+ `aiAssistantAvailable`, and `showDryRun` props.
104
+
57
105
  ## Usage
58
106
 
59
107
  ### Host integration shape
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { t as e } from "./bpm-form-field-Cao0rMol.js";
3
- import { t } from "./FormRendererView-DU9LLrOF.js";
3
+ import { t } from "./FormRendererView-cZGOOjU5.js";
4
4
  import { useEffect as n, useMemo as r, useState as i } from "react";
5
5
  import { Accordion as a, Badge as o, BaseCard as s, Button as c, DatePicker as l, DateTimePicker as u, Icon as d, Input as f, Modal as ee, Section as te, SectionGroup as ne, Select as p, Tab as re, TabItem as ie, Table as ae, Tag as oe, Textarea as se, Toggle as m, Typography as h } from "@mezzanine-ui/react";
6
6
  import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
@@ -444,15 +444,11 @@ function mn({ onChange: le, value: y }) {
444
444
  }
445
445
  function Gn(e) {
446
446
  let t = b.fields.flatMap((t) => k(t) ? t.columns.flatMap((n) => O(n) && Ve(n).includes(e) ? [`${t.fieldKey}.${n.fieldKey}`] : []) : O(t) && Ve(t).includes(e) ? [t.fieldKey] : []);
447
- if (t.length > 0) {
448
- W({
449
- affectedFieldKeys: t,
450
- fieldKey: e,
451
- kind: "remove-field"
452
- });
453
- return;
454
- }
455
- Kn(e);
447
+ t.length > 0 ? W({
448
+ affectedFieldKeys: t,
449
+ fieldKey: e,
450
+ kind: "remove-field"
451
+ }) : Kn(e);
456
452
  }
457
453
  function Kn(e) {
458
454
  let t = b.fields.filter((t) => t.fieldKey !== e);
@@ -588,25 +584,13 @@ function mn({ onChange: le, value: y }) {
588
584
  U && (nr(U), W(null));
589
585
  }
590
586
  function nr(e) {
591
- if (e.kind === "remove-field") {
592
- Kn(e.fieldKey);
593
- return;
594
- }
595
- if (e.kind === "remove-column") {
596
- Xn(e.fieldKey, e.columnIndex);
597
- return;
598
- }
599
- if (e.kind === "replace-column") {
600
- Y(e.fieldKey, (t) => ({
601
- ...t,
602
- columns: t.columns.map((t) => t.fieldKey === e.columnKey ? e.nextColumn : t)
603
- })), G(e.columnIndex);
604
- return;
605
- }
606
- x({
587
+ e.kind === "remove-field" ? Kn(e.fieldKey) : e.kind === "remove-column" ? Xn(e.fieldKey, e.columnIndex) : e.kind === "replace-column" ? (Y(e.fieldKey, (t) => ({
588
+ ...t,
589
+ columns: t.columns.map((t) => t.fieldKey === e.columnKey ? e.nextColumn : t)
590
+ })), G(e.columnIndex)) : (x({
607
591
  ...b,
608
592
  fields: b.fields.map((t) => t.fieldKey === e.fieldKey ? e.nextField : t)
609
- }), M(null), H(null);
593
+ }), M(null), H(null));
610
594
  }
611
595
  async function rr() {
612
596
  Vn(!0);
@@ -1075,11 +1059,7 @@ function mn({ onChange: le, value: y }) {
1075
1059
  let r = e.columns[t], i = P.find((e) => e.id === n)?.id;
1076
1060
  if (!r || !i || r.type === i) return;
1077
1061
  let a = wn(r, i), o = Cn(r);
1078
- if (o.length === 0) {
1079
- X(e, t, a), G(t);
1080
- return;
1081
- }
1082
- W({
1062
+ o.length === 0 ? (X(e, t, a), G(t)) : W({
1083
1063
  columnIndex: t,
1084
1064
  columnKey: r.fieldKey,
1085
1065
  fieldKey: e.fieldKey,
@@ -2000,4 +1980,4 @@ function Pn(e, t, n) {
2000
1980
  //#endregion
2001
1981
  export { mn as t };
2002
1982
 
2003
- //# sourceMappingURL=FormBuilderView-CLg-JYmu.js.map
1983
+ //# sourceMappingURL=FormBuilderView-BYL42M0d.js.map