@rytass/bpm-core-react 0.17.0 → 0.17.1

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 (215) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/chunks/admin-pickers-BRHk3qKq.cjs +2 -0
  3. package/dist/chunks/admin-pickers-BRHk3qKq.cjs.map +1 -0
  4. package/dist/chunks/{admin-pickers-DxhzECkD.js → admin-pickers-Djq3h-UR.js} +41 -39
  5. package/dist/chunks/admin-pickers-Djq3h-UR.js.map +1 -0
  6. package/dist/chunks/{categories-DjENouRm.cjs → categories-AxxhqjLZ.cjs} +2 -2
  7. package/dist/chunks/{categories-DjENouRm.cjs.map → categories-AxxhqjLZ.cjs.map} +1 -1
  8. package/dist/chunks/{categories-1gKxeEqw.js → categories-riC33J_j.js} +2 -2
  9. package/dist/chunks/{categories-1gKxeEqw.js.map → categories-riC33J_j.js.map} +1 -1
  10. package/dist/chunks/{compose-DZ7RKvUp.cjs → compose-B7TtrpQJ.cjs} +2 -2
  11. package/dist/chunks/{compose-DZ7RKvUp.cjs.map → compose-B7TtrpQJ.cjs.map} +1 -1
  12. package/dist/chunks/{compose-Crklayzy.js → compose-_pREPtfN.js} +2 -2
  13. package/dist/chunks/{compose-Crklayzy.js.map → compose-_pREPtfN.js.map} +1 -1
  14. package/dist/chunks/{designer-D9eFma1W.js → designer-BiywgNXs.js} +2 -2
  15. package/dist/chunks/{designer-D9eFma1W.js.map → designer-BiywgNXs.js.map} +1 -1
  16. package/dist/chunks/{designer-sJGTGYOf.cjs → designer-ttAqv859.cjs} +2 -2
  17. package/dist/chunks/{designer-sJGTGYOf.cjs.map → designer-ttAqv859.cjs.map} +1 -1
  18. package/dist/chunks/{orgs-Dr0FFoZo.cjs → orgs-C8usknWb.cjs} +2 -2
  19. package/dist/chunks/{orgs-Dr0FFoZo.cjs.map → orgs-C8usknWb.cjs.map} +1 -1
  20. package/dist/chunks/{orgs-CY0i1fie.js → orgs-Lg7tXv2u.js} +2 -2
  21. package/dist/chunks/{orgs-CY0i1fie.js.map → orgs-Lg7tXv2u.js.map} +1 -1
  22. package/dist/chunks/{users-BCyePbwB.js → users-DRbuDYF1.js} +2 -2
  23. package/dist/chunks/{users-BCyePbwB.js.map → users-DRbuDYF1.js.map} +1 -1
  24. package/dist/chunks/{users-DVBJluFR.cjs → users-DVQicZIo.cjs} +2 -2
  25. package/dist/chunks/{users-DVBJluFR.cjs.map → users-DVQicZIo.cjs.map} +1 -1
  26. package/dist/components/admin-pickers.d.cts +65 -0
  27. package/dist/components/approval-instance-list-page.d.cts +17 -0
  28. package/dist/components/bpm-form-field.d.cts +10 -0
  29. package/dist/components/bpm-notification-bell-button.d.cts +22 -0
  30. package/dist/components/dashboard-page.d.cts +7 -0
  31. package/dist/components/notification-drawer.d.cts +11 -0
  32. package/dist/components/org-unit-tree-draft-editor.d.cts +24 -0
  33. package/dist/components/org-unit-tree-draft-editor.d.ts +1 -1
  34. package/dist/components/pdf-preview.d.cts +12 -0
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.d.cts +15 -0
  37. package/dist/index.d.ts +15 -15
  38. package/dist/index.js +1 -1
  39. package/dist/lib/auth-provider.d.cts +37 -0
  40. package/dist/lib/format-date-time.d.cts +5 -0
  41. package/dist/lib/format-member-label.d.cts +12 -0
  42. package/dist/lib/member-profile-resolution.d.cts +48 -0
  43. package/dist/lib/notification-drawer-provider.d.cts +27 -0
  44. package/dist/lib/notification-unread-provider.d.cts +25 -0
  45. package/dist/lib/org-tree-draft.d.cts +27 -0
  46. package/dist/lib/providers.d.cts +31 -0
  47. package/dist/lib/router-adapter.d.cts +47 -0
  48. package/dist/lib/routes-config.d.cts +117 -0
  49. package/dist/lib/task-node-label.d.cts +10 -0
  50. package/dist/lib/use-bpm-logout.d.cts +12 -0
  51. package/dist/lib/use-bpm-member.d.cts +17 -0
  52. package/dist/next/BPMNextProviders.d.cts +51 -0
  53. package/dist/next/index.d.cts +2 -0
  54. package/dist/next/index.d.ts +2 -2
  55. package/dist/next/workflow-chat-route.d.cts +17 -0
  56. package/dist/pages/admin/delegations/index.d.cts +4 -0
  57. package/dist/pages/admin/orgs/index.cjs +1 -1
  58. package/dist/pages/admin/orgs/index.d.cts +4 -0
  59. package/dist/pages/admin/orgs/index.js +1 -1
  60. package/dist/pages/admin/users/index.cjs +1 -1
  61. package/dist/pages/admin/users/index.d.cts +4 -0
  62. package/dist/pages/admin/users/index.js +1 -1
  63. package/dist/pages/admin/webhook-endpoints/index.d.cts +4 -0
  64. package/dist/pages/cc/index.d.cts +16 -0
  65. package/dist/pages/dashboard/index.d.cts +16 -0
  66. package/dist/pages/delegations/index.d.cts +4 -0
  67. package/dist/pages/inbox/index.d.cts +16 -0
  68. package/dist/pages/instances/detail/index.d.cts +23 -0
  69. package/dist/pages/instances/new/index.d.cts +20 -0
  70. package/dist/pages/login/index.d.cts +21 -0
  71. package/dist/pages/root/index.d.cts +18 -0
  72. package/dist/pages/search/index.d.cts +16 -0
  73. package/dist/pages/sent/index.d.cts +16 -0
  74. package/dist/pages/settings/notifications/index.d.cts +4 -0
  75. package/dist/pages/templates/categories/index.cjs +1 -1
  76. package/dist/pages/templates/categories/index.d.cts +4 -0
  77. package/dist/pages/templates/categories/index.js +1 -1
  78. package/dist/pages/templates/compose/index.cjs +1 -1
  79. package/dist/pages/templates/compose/index.d.cts +25 -0
  80. package/dist/pages/templates/compose/index.js +1 -1
  81. package/dist/pages/templates/designer/index.cjs +1 -1
  82. package/dist/pages/templates/designer/index.d.cts +8 -0
  83. package/dist/pages/templates/designer/index.js +1 -1
  84. package/dist/pages/templates/index.d.cts +4 -0
  85. package/dist/pages/templates/versions/index.d.cts +8 -0
  86. package/dist/views/admin/delegations/AdminDelegationsView.d.cts +2 -0
  87. package/dist/views/admin/delegations/index.d.cts +1 -0
  88. package/dist/views/admin/delegations/index.d.ts +1 -1
  89. package/dist/views/admin/index.cjs +1 -1
  90. package/dist/views/admin/index.d.cts +4 -0
  91. package/dist/views/admin/index.d.ts +4 -4
  92. package/dist/views/admin/index.js +2 -2
  93. package/dist/views/admin/orgs/AdminOrgsView.d.cts +2 -0
  94. package/dist/views/admin/orgs/index.cjs +1 -1
  95. package/dist/views/admin/orgs/index.d.cts +1 -0
  96. package/dist/views/admin/orgs/index.d.ts +1 -1
  97. package/dist/views/admin/orgs/index.js +1 -1
  98. package/dist/views/admin/users/AdminUsersView.d.cts +2 -0
  99. package/dist/views/admin/users/MemberTaskReassignModal.d.cts +13 -0
  100. package/dist/views/admin/users/index.cjs +1 -1
  101. package/dist/views/admin/users/index.d.cts +1 -0
  102. package/dist/views/admin/users/index.d.ts +1 -1
  103. package/dist/views/admin/users/index.js +1 -1
  104. package/dist/views/admin/webhook-endpoints/AdminWebhookEndpointsView.d.cts +8 -0
  105. package/dist/views/admin/webhook-endpoints/index.d.cts +1 -0
  106. package/dist/views/admin/webhook-endpoints/index.d.ts +1 -1
  107. package/dist/views/cc/CcView.d.cts +7 -0
  108. package/dist/views/cc/index.d.cts +1 -0
  109. package/dist/views/cc/index.d.ts +1 -1
  110. package/dist/views/dashboard/DashboardView.d.cts +7 -0
  111. package/dist/views/dashboard/index.d.cts +1 -0
  112. package/dist/views/dashboard/index.d.ts +1 -1
  113. package/dist/views/delegations/DelegationsView.d.cts +2 -0
  114. package/dist/views/delegations/index.d.cts +1 -0
  115. package/dist/views/delegations/index.d.ts +1 -1
  116. package/dist/views/forms/builder/FormBuilderView.d.cts +18 -0
  117. package/dist/views/forms/builder/index.d.cts +1 -0
  118. package/dist/views/forms/builder/index.d.ts +1 -1
  119. package/dist/views/forms/builder/json-code-editor.d.cts +11 -0
  120. package/dist/views/forms/renderer/FormRendererView.d.cts +24 -0
  121. package/dist/views/forms/renderer/FormRendererView.d.ts +1 -1
  122. package/dist/views/forms/renderer/form-data-source-field.d.cts +65 -0
  123. package/dist/views/forms/renderer/form-field-link.d.cts +16 -0
  124. package/dist/views/forms/renderer/index.d.cts +2 -0
  125. package/dist/views/forms/renderer/index.d.ts +2 -2
  126. package/dist/views/forms/renderer/member-field-options.d.cts +39 -0
  127. package/dist/views/forms/renderer/member-field.d.cts +21 -0
  128. package/dist/views/inbox/InboxView.d.cts +7 -0
  129. package/dist/views/inbox/index.d.cts +1 -0
  130. package/dist/views/inbox/index.d.ts +1 -1
  131. package/dist/views/instances/detail/InstanceDetailView.d.cts +27 -0
  132. package/dist/views/instances/detail/index.d.cts +7 -0
  133. package/dist/views/instances/detail/index.d.ts +7 -7
  134. package/dist/views/instances/detail/sections/InstanceAttachmentsSection.d.cts +15 -0
  135. package/dist/views/instances/detail/sections/InstanceFormSection.d.cts +36 -0
  136. package/dist/views/instances/detail/sections/InstanceFormSection.d.ts +1 -1
  137. package/dist/views/instances/detail/sections/InstanceHistorySection.d.cts +29 -0
  138. package/dist/views/instances/detail/sections/InstanceSignaturesSection.d.cts +14 -0
  139. package/dist/views/instances/detail/sections/InstanceTasksSection.d.cts +55 -0
  140. package/dist/views/instances/detail/sections/InstanceWebhookDeliveriesSection.d.cts +20 -0
  141. package/dist/views/instances/detail/sections/container-helpers.d.cts +10 -0
  142. package/dist/views/instances/detail/sections/container-helpers.d.ts +1 -1
  143. package/dist/views/instances/detail/sections/shared.d.cts +141 -0
  144. package/dist/views/instances/detail/submitted-by.d.cts +23 -0
  145. package/dist/views/instances/index.d.cts +1 -0
  146. package/dist/views/instances/index.d.ts +1 -1
  147. package/dist/views/instances/new/InstanceNewView.d.cts +15 -0
  148. package/dist/views/instances/new/index.d.cts +1 -0
  149. package/dist/views/instances/new/index.d.ts +1 -1
  150. package/dist/views/login/LoginView.d.cts +47 -0
  151. package/dist/views/login/index.d.cts +1 -0
  152. package/dist/views/login/index.d.ts +1 -1
  153. package/dist/views/root/RootView.d.cts +10 -0
  154. package/dist/views/root/index.d.cts +1 -0
  155. package/dist/views/root/index.d.ts +1 -1
  156. package/dist/views/search/SearchView.d.cts +7 -0
  157. package/dist/views/search/index.d.cts +1 -0
  158. package/dist/views/search/index.d.ts +1 -1
  159. package/dist/views/sent/SentView.d.cts +7 -0
  160. package/dist/views/sent/index.d.cts +1 -0
  161. package/dist/views/sent/index.d.ts +1 -1
  162. package/dist/views/settings/index.d.cts +1 -0
  163. package/dist/views/settings/index.d.ts +1 -1
  164. package/dist/views/settings/notifications/SettingsNotificationsView.d.cts +2 -0
  165. package/dist/views/settings/notifications/index.d.cts +1 -0
  166. package/dist/views/settings/notifications/index.d.ts +1 -1
  167. package/dist/views/templates/TemplatesView.d.cts +7 -0
  168. package/dist/views/templates/categories/TemplateCategoriesView.d.cts +2 -0
  169. package/dist/views/templates/categories/index.cjs +1 -1
  170. package/dist/views/templates/categories/index.d.cts +1 -0
  171. package/dist/views/templates/categories/index.d.ts +1 -1
  172. package/dist/views/templates/categories/index.js +1 -1
  173. package/dist/views/templates/compose/TemplateComposeWizardView.d.cts +21 -0
  174. package/dist/views/templates/compose/index.cjs +1 -1
  175. package/dist/views/templates/compose/index.d.cts +2 -0
  176. package/dist/views/templates/compose/index.d.ts +2 -2
  177. package/dist/views/templates/compose/index.js +1 -1
  178. package/dist/views/templates/compose/steps/ComposeFormStep.d.cts +15 -0
  179. package/dist/views/templates/compose/steps/ComposeReviewStep.d.cts +12 -0
  180. package/dist/views/templates/compose/steps/ComposeWorkflowStep.d.cts +22 -0
  181. package/dist/views/templates/compose/use-template-compose-wizard.d.cts +46 -0
  182. package/dist/views/templates/designer/NotifyWebhookTargetsEditor.d.cts +20 -0
  183. package/dist/views/templates/designer/NotifyWebhookTargetsEditor.d.ts +1 -1
  184. package/dist/views/templates/designer/TemplateDesignerView.d.cts +65 -0
  185. package/dist/views/templates/designer/chrome-workflow-chat.d.cts +12 -0
  186. package/dist/views/templates/designer/chrome-workflow-chat.d.ts +1 -1
  187. package/dist/views/templates/designer/decision-policy-options.d.cts +8 -0
  188. package/dist/views/templates/designer/designer-version-labels.d.cts +12 -0
  189. package/dist/views/templates/designer/dry-run-assignee-label.d.cts +28 -0
  190. package/dist/views/templates/designer/dry-run-sample-data.d.cts +9 -0
  191. package/dist/views/templates/designer/dynamic-form-resolver-options.d.cts +35 -0
  192. package/dist/views/templates/designer/index.cjs +1 -1
  193. package/dist/views/templates/designer/index.d.cts +1 -0
  194. package/dist/views/templates/designer/index.d.ts +1 -1
  195. package/dist/views/templates/designer/index.js +1 -1
  196. package/dist/views/templates/designer/notify-webhook-designer.d.cts +74 -0
  197. package/dist/views/templates/designer/position-level-options.d.cts +17 -0
  198. package/dist/views/templates/designer/use-workflow-chat.d.cts +21 -0
  199. package/dist/views/templates/designer/use-workflow-chat.d.ts +1 -1
  200. package/dist/views/templates/designer/use-workflow-designer-controller.d.cts +41 -0
  201. package/dist/views/templates/designer/workflow-chat-drawer.d.cts +16 -0
  202. package/dist/views/templates/designer/workflow-chat-drawer.d.ts +1 -1
  203. package/dist/views/templates/index.cjs +1 -1
  204. package/dist/views/templates/index.d.cts +3 -0
  205. package/dist/views/templates/index.d.ts +3 -3
  206. package/dist/views/templates/index.js +1 -1
  207. package/dist/views/templates/versions/TemplateVersionsView.d.cts +5 -0
  208. package/dist/views/templates/versions/index.d.cts +1 -0
  209. package/dist/views/templates/versions/index.d.ts +1 -1
  210. package/dist/views/workflow/index.d.cts +4 -0
  211. package/dist/views/workflow/index.d.ts +4 -4
  212. package/package.json +387 -147
  213. package/dist/chunks/admin-pickers-DxhzECkD.js.map +0 -1
  214. package/dist/chunks/admin-pickers-qe3j--gX.cjs +0 -2
  215. package/dist/chunks/admin-pickers-qe3j--gX.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});require('./index.css');const e=require("./chunks/router-adapter--gYs13E8.cjs"),t=require("./chunks/auth-provider-4BeCw7cI.cjs"),n=require("./chunks/format-date-time-D-cx5M8z.cjs"),r=require("./chunks/providers-DHtDZFNA.cjs"),i=require("./chunks/routes-config-C1j_vFKo.cjs"),a=require("./chunks/bpm-form-field-Bc6k4ZEO.cjs"),o=require("./chunks/use-bpm-member-DpNAQtNC.cjs"),s=require("./chunks/admin-pickers-qe3j--gX.cjs"),c=require("./chunks/approval-instance-list-page-ax0pm8bt.cjs"),l=require("./chunks/dashboard-page-BWQBSGDq.cjs");let u=require("@mezzanine-ui/react"),d=require("react/jsx-runtime"),f=require("@mezzanine-ui/icons");function p(){let{logout:e}=t.n();return e}var m={root:`bpm_root_jl5S-`,badge:`bpm_badge_SIKJk`};function h({label:e=`通知中心`}={}){let{open:t}=r.o(),{unreadCount:n}=r.i(),i=n>0?`${e},${n} 則未讀`:e;return(0,d.jsxs)(`span`,{className:m.root,children:[(0,d.jsx)(u.NavigationIconButton,{"aria-label":i,icon:f.NotificationUnreadIcon,onClick:()=>{t()},title:e,type:`button`}),n>0?(0,d.jsx)(`span`,{className:m.badge,children:n>99?`99+`:n}):null]})}exports.ApprovalInstanceListPage=c.t,exports.AuthProvider=t.t,exports.BPMFormField=a.t,exports.BPMNotificationBellButton=h,exports.BPMRoutesProvider=i.t,exports.DashboardPage=l.t,exports.MemberPicker=s.t,exports.NotificationDrawer=r.n,exports.NotificationDrawerProvider=r.a,exports.NotificationUnreadProvider=r.r,exports.OrgUnitPicker=s.n,exports.PositionPicker=s.r,exports.Providers=r.t,exports.RouterAdapterProvider=e.t,exports.createDefaultBPMRoutes=i.n,exports.defaultBrowserSearchParams=e.n,exports.formatDateTime=n.t,exports.isBPMAdminMember=o.t,exports.readMemberOption=s.i,exports.readOrgUnitOption=s.a,exports.readPositionOption=s.o,exports.useAuth=t.n,exports.useBPMLogout=p,exports.useBPMMember=o.n,exports.useBPMRoutes=i.r,exports.useNotificationDrawer=r.o,exports.useNotificationUnread=r.i,exports.useRouterAdapter=e.r;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});require('./index.css');const e=require("./chunks/router-adapter--gYs13E8.cjs"),t=require("./chunks/auth-provider-4BeCw7cI.cjs"),n=require("./chunks/format-date-time-D-cx5M8z.cjs"),r=require("./chunks/providers-DHtDZFNA.cjs"),i=require("./chunks/routes-config-C1j_vFKo.cjs"),a=require("./chunks/bpm-form-field-Bc6k4ZEO.cjs"),o=require("./chunks/use-bpm-member-DpNAQtNC.cjs"),s=require("./chunks/admin-pickers-BRHk3qKq.cjs"),c=require("./chunks/approval-instance-list-page-ax0pm8bt.cjs"),l=require("./chunks/dashboard-page-BWQBSGDq.cjs");let u=require("@mezzanine-ui/react"),d=require("react/jsx-runtime"),f=require("@mezzanine-ui/icons");function p(){let{logout:e}=t.n();return e}var m={root:`bpm_root_jl5S-`,badge:`bpm_badge_SIKJk`};function h({label:e=`通知中心`}={}){let{open:t}=r.o(),{unreadCount:n}=r.i(),i=n>0?`${e},${n} 則未讀`:e;return(0,d.jsxs)(`span`,{className:m.root,children:[(0,d.jsx)(u.NavigationIconButton,{"aria-label":i,icon:f.NotificationUnreadIcon,onClick:()=>{t()},title:e,type:`button`}),n>0?(0,d.jsx)(`span`,{className:m.badge,children:n>99?`99+`:n}):null]})}exports.ApprovalInstanceListPage=c.t,exports.AuthProvider=t.t,exports.BPMFormField=a.t,exports.BPMNotificationBellButton=h,exports.BPMRoutesProvider=i.t,exports.DashboardPage=l.t,exports.MemberPicker=s.t,exports.NotificationDrawer=r.n,exports.NotificationDrawerProvider=r.a,exports.NotificationUnreadProvider=r.r,exports.OrgUnitPicker=s.n,exports.PositionPicker=s.r,exports.Providers=r.t,exports.RouterAdapterProvider=e.t,exports.createDefaultBPMRoutes=i.n,exports.defaultBrowserSearchParams=e.n,exports.formatDateTime=n.t,exports.isBPMAdminMember=o.t,exports.readMemberOption=s.i,exports.readOrgUnitOption=s.a,exports.readPositionOption=s.o,exports.useAuth=t.n,exports.useBPMLogout=p,exports.useBPMMember=o.n,exports.useBPMRoutes=i.r,exports.useNotificationDrawer=r.o,exports.useNotificationUnread=r.i,exports.useRouterAdapter=e.r;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,15 @@
1
+ export * from './lib/auth-provider.cjs';
2
+ export * from './lib/format-date-time.cjs';
3
+ export * from './lib/notification-drawer-provider.cjs';
4
+ export * from './lib/notification-unread-provider.cjs';
5
+ export * from './lib/providers.cjs';
6
+ export * from './lib/router-adapter.cjs';
7
+ export * from './lib/routes-config.cjs';
8
+ export * from './lib/use-bpm-logout.cjs';
9
+ export * from './lib/use-bpm-member.cjs';
10
+ export * from './components/admin-pickers.cjs';
11
+ export * from './components/approval-instance-list-page.cjs';
12
+ export * from './components/bpm-form-field.cjs';
13
+ export * from './components/bpm-notification-bell-button.cjs';
14
+ export * from './components/dashboard-page.cjs';
15
+ export * from './components/notification-drawer.cjs';
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- export * from './lib/auth-provider';
2
- export * from './lib/format-date-time';
3
- export * from './lib/notification-drawer-provider';
4
- export * from './lib/notification-unread-provider';
5
- export * from './lib/providers';
6
- export * from './lib/router-adapter';
7
- export * from './lib/routes-config';
8
- export * from './lib/use-bpm-logout';
9
- export * from './lib/use-bpm-member';
10
- export * from './components/admin-pickers';
11
- export * from './components/approval-instance-list-page';
12
- export * from './components/bpm-form-field';
13
- export * from './components/bpm-notification-bell-button';
14
- export * from './components/dashboard-page';
15
- export * from './components/notification-drawer';
1
+ export * from './lib/auth-provider.js';
2
+ export * from './lib/format-date-time.js';
3
+ export * from './lib/notification-drawer-provider.js';
4
+ export * from './lib/notification-unread-provider.js';
5
+ export * from './lib/providers.js';
6
+ export * from './lib/router-adapter.js';
7
+ export * from './lib/routes-config.js';
8
+ export * from './lib/use-bpm-logout.js';
9
+ export * from './lib/use-bpm-member.js';
10
+ export * from './components/admin-pickers.js';
11
+ export * from './components/approval-instance-list-page.js';
12
+ export * from './components/bpm-form-field.js';
13
+ export * from './components/bpm-notification-bell-button.js';
14
+ export * from './components/dashboard-page.js';
15
+ export * from './components/notification-drawer.js';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { a as o, i as s, n as c, o as l, r as u, t as d } from "./chunks/provide
6
6
  import { n as f, r as p, t as m } from "./chunks/routes-config-yZbESPlw.js";
7
7
  import { t as h } from "./chunks/bpm-form-field-Cao0rMol.js";
8
8
  import { n as g, t as _ } from "./chunks/use-bpm-member-D57LKe_u.js";
9
- import { a as v, i as y, n as b, o as x, r as S, t as C } from "./chunks/admin-pickers-DxhzECkD.js";
9
+ import { a as v, i as y, n as b, o as x, r as S, t as C } from "./chunks/admin-pickers-Djq3h-UR.js";
10
10
  import { t as w } from "./chunks/approval-instance-list-page-CPXMP3PL.js";
11
11
  import { t as T } from "./chunks/dashboard-page-DdBvV6YI.js";
12
12
  import { NavigationIconButton as E } from "@mezzanine-ui/react";
@@ -0,0 +1,37 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { ApiMember } from '@rytass/bpm-core-client';
3
+ interface AuthContextValue {
4
+ readonly loading: boolean;
5
+ readonly member: ApiMember | null;
6
+ readonly login: (input: {
7
+ readonly identifier: string;
8
+ readonly password: string;
9
+ }) => Promise<ApiMember>;
10
+ readonly logout: () => Promise<void>;
11
+ readonly refresh: () => Promise<ApiMember | null>;
12
+ }
13
+ export interface AuthProviderProps {
14
+ readonly children: ReactNode;
15
+ /**
16
+ * Paths that should not redirect to `/login` when there is no session.
17
+ * Defaults to `['/login']`. Override when your host runs the login UI
18
+ * under a different path.
19
+ */
20
+ readonly publicPaths?: readonly string[];
21
+ /**
22
+ * Where to send unauthenticated users. Defaults to `'/login'`.
23
+ */
24
+ readonly loginPath?: string;
25
+ }
26
+ /**
27
+ * BPM auth context provider. Reads / writes the host BPM API session via
28
+ * `@rytass/bpm-core-client` (`loginApi` / `logoutApi` / `readApiCurrentMember`)
29
+ * and uses the host-supplied {@link useRouterAdapter} to redirect
30
+ * unauthenticated users.
31
+ */
32
+ export declare function AuthProvider({ children, publicPaths, loginPath, }: AuthProviderProps): ReactElement;
33
+ /**
34
+ * Access the BPM auth context. Throws when used outside `<AuthProvider>`.
35
+ */
36
+ export declare function useAuth(): AuthContextValue;
37
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Default BPM datetime formatter: `YYYY-MM-DD HH:mm:ss`. Returns `'-'` for
3
+ * `null` / `undefined` so list cells render a consistent placeholder.
4
+ */
5
+ export declare function formatDateTime(value: string | null | undefined): string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * How the e-mail is attached to the name: `ascii` is `name (email)`,
3
+ * `fullwidth` is `name(email)` and `dot` is `name · email`. Each call site
4
+ * keeps the separator it always had.
5
+ */
6
+ export type MemberLabelStyle = 'ascii' | 'dot' | 'fullwidth';
7
+ /**
8
+ * `name` followed by the e-mail in the given style. A host may resolve a member
9
+ * with `email: ''` (or a blank string), and then the label is just the name —
10
+ * never `name ()` or `name · `.
11
+ */
12
+ export declare function formatMemberLabel(name: string, email: string | null | undefined, style?: MemberLabelStyle): string;
@@ -0,0 +1,48 @@
1
+ import { MemberProfileRecord } from '@rytass/bpm-core-client/template';
2
+ /** Most ids asked for on their own after a failed batch, per round. */
3
+ export declare const MAX_PER_ID_REQUESTS = 20;
4
+ /** Most per-id requests in flight at once. */
5
+ export declare const PER_ID_CONCURRENCY = 4;
6
+ export type MemberProfileResolution = Readonly<{
7
+ /** Ids whose lookup failed even when asked for on their own. */
8
+ failedIds: readonly string[];
9
+ profiles: readonly MemberProfileRecord[];
10
+ /**
11
+ * Ids left unasked because a failed batch held more than the per-id budget.
12
+ * They were not tried, so a later round may ask for them again.
13
+ */
14
+ skippedIds: readonly string[];
15
+ }>;
16
+ export type MemberProfileResolutionLimits = Readonly<{
17
+ concurrency?: number;
18
+ maxPerIdRequests?: number;
19
+ }>;
20
+ /**
21
+ * Looks up member profiles in one batch, and degrades per id when the batch
22
+ * request fails.
23
+ *
24
+ * The host fails a whole lookup when it contains an id it cannot handle (a
25
+ * foreign id stored in a template, say). Treating that as "nobody resolved"
26
+ * labels every approver of the template 「未知會員」 for the sake of one bad
27
+ * id, so a failed batch is retried one id at a time and only the ids that fail
28
+ * on their own are reported back in `failedIds`.
29
+ *
30
+ * The retry is bounded: at most `maxPerIdRequests` ids are asked for on their
31
+ * own (the rest come back in `skippedIds` without a request), and at most
32
+ * `concurrency` of those requests run at once, so one bad id in a large
33
+ * template cannot turn into a burst of requests.
34
+ *
35
+ * A single-id batch is not retried: it already is the per-id request.
36
+ */
37
+ export declare function resolveMemberProfilesPerIdOnFailure(memberIds: readonly string[], resolveMembers: (memberIds: readonly string[]) => Promise<readonly MemberProfileRecord[]>, limits?: MemberProfileResolutionLimits): Promise<MemberProfileResolution>;
38
+ /**
39
+ * The ids still worth asking the directory for: those that already failed on
40
+ * their own in this session are left out, so they stay 「未知會員」 instead of
41
+ * being re-requested every time the option list changes.
42
+ *
43
+ * A failed id stays 「未知會員」 for the rest of the session, even when the
44
+ * failure was transient (a network blip, say), unless a later member search
45
+ * returns it and replaces the placeholder. Ids skipped over the per-id cap
46
+ * were never asked and must not be added to `failedMemberIds`.
47
+ */
48
+ export declare function excludeFailedMemberIds(memberIds: readonly string[], failedMemberIds: ReadonlySet<string>): readonly string[];
@@ -0,0 +1,27 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ interface NotificationDrawerContextValue {
3
+ readonly close: () => void;
4
+ readonly isOpen: boolean;
5
+ readonly open: () => void;
6
+ readonly toggle: () => void;
7
+ }
8
+ interface NotificationDrawerProviderProps {
9
+ readonly children: ReactNode;
10
+ }
11
+ /**
12
+ * Controls the open/closed state of the BPM notification drawer. Wraps
13
+ * children with a context that `<NotificationDrawer />` reads to mount /
14
+ * hide itself, and that the host navigation reads (via
15
+ * `<BPMNotificationBellButton />` or `useNotificationDrawer().open`) to
16
+ * open the drawer when the bell icon is clicked.
17
+ *
18
+ * When used outside this provider, the returned hook is a safe no-op so
19
+ * components don't crash in test or storybook environments.
20
+ */
21
+ export declare function NotificationDrawerProvider({ children, }: NotificationDrawerProviderProps): ReactElement;
22
+ /**
23
+ * Read the BPM notification drawer's open state and control helpers.
24
+ * Returns a no-op stub when used outside `<NotificationDrawerProvider>`.
25
+ */
26
+ export declare function useNotificationDrawer(): NotificationDrawerContextValue;
27
+ export {};
@@ -0,0 +1,25 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ interface NotificationUnreadContextValue {
3
+ readonly refreshUnreadCount: () => Promise<number>;
4
+ readonly unreadCount: number;
5
+ }
6
+ interface NotificationUnreadProviderProps {
7
+ readonly children: ReactNode;
8
+ }
9
+ /**
10
+ * Polls BPM for the current member's unread notification count via
11
+ * `readUnreadNotificationCount` and exposes it through context for the
12
+ * host navigation (`<BPMNotificationBellButton />` badge or any custom
13
+ * trigger using `useNotificationUnread().unreadCount`) and the BPM
14
+ * `<NotificationDrawer />` (header count). Refresh is triggered on
15
+ * mount and whenever the auth member id changes; consumers can call
16
+ * `refreshUnreadCount()` after acknowledging a notification.
17
+ */
18
+ export declare function NotificationUnreadProvider({ children, }: NotificationUnreadProviderProps): ReactElement;
19
+ /**
20
+ * Read the current unread-notification count and a manual refresh helper.
21
+ * Returns a zero/no-op stub when used outside
22
+ * `<NotificationUnreadProvider>`.
23
+ */
24
+ export declare function useNotificationUnread(): NotificationUnreadContextValue;
25
+ export {};
@@ -0,0 +1,27 @@
1
+ import { OrgUnitRecord } from '@rytass/bpm-core-client/organization';
2
+ export type OrgUnitParentDraftMap = ReadonlyMap<string, string | null>;
3
+ export type OrgUnitHierarchyDraftChange = Readonly<{
4
+ orgUnitId: string;
5
+ parentId: string | null;
6
+ previousParentId: string | null;
7
+ }>;
8
+ export type OrgUnitParentAssignmentResult = Readonly<{
9
+ message: string;
10
+ parentDraft: OrgUnitParentDraftMap;
11
+ status: 'INVALID' | 'UNCHANGED' | 'UPDATED';
12
+ }>;
13
+ export declare function createOrgUnitParentDraftMap(orgUnits: readonly OrgUnitRecord[]): OrgUnitParentDraftMap;
14
+ export declare function assignOrgUnitDraftParent({ orgUnitId, parentDraft, parentId, }: {
15
+ readonly orgUnitId: string;
16
+ readonly parentDraft: OrgUnitParentDraftMap;
17
+ readonly parentId: string | null;
18
+ }): OrgUnitParentAssignmentResult;
19
+ export declare function readOrgUnitHierarchyDraftChanges({ orgUnits, parentDraft, }: {
20
+ readonly orgUnits: readonly OrgUnitRecord[];
21
+ readonly parentDraft: OrgUnitParentDraftMap;
22
+ }): readonly OrgUnitHierarchyDraftChange[];
23
+ export declare function readOrgUnitParentValidationMessage({ orgUnitId, parentDraft, parentId, }: {
24
+ readonly orgUnitId: string;
25
+ readonly parentDraft: OrgUnitParentDraftMap;
26
+ readonly parentId: string | null;
27
+ }): string | null;
@@ -0,0 +1,31 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { CalendarLocale } from '@mezzanine-ui/react/moment';
3
+ interface ProvidersProps {
4
+ readonly children: ReactNode;
5
+ /** Override Mezzanine calendar locale. Defaults to `CalendarLocale.ZH_TW`. */
6
+ readonly locale?: CalendarLocale;
7
+ /**
8
+ * Public paths that should not trigger redirect to `/login` when there
9
+ * is no session. Forwarded to `<AuthProvider>`. Defaults to `['/login']`.
10
+ */
11
+ readonly publicPaths?: readonly string[];
12
+ /** Where to send unauthenticated users. Defaults to `'/login'`. */
13
+ readonly loginPath?: string;
14
+ }
15
+ /**
16
+ * One-stop BPM admin provider stack. Wires:
17
+ *
18
+ * - Mezzanine UI calendar locale (moment-based, `ZH_TW` by default)
19
+ * - `<AuthProvider>` (BPM session via REST `/auth/*`)
20
+ * - `<NotificationUnreadProvider>` (polls unread count)
21
+ * - `<NotificationDrawerProvider>` (controls drawer open/close state)
22
+ * - `<NotificationDrawer />` mounted at the root so the host navigation
23
+ * bell (`<BPMNotificationBellButton />` or any custom trigger calling
24
+ * `useNotificationDrawer().open`) can open it.
25
+ *
26
+ * Consumer hosts wrap this **inside** a `<RouterAdapterProvider>` (provided
27
+ * by the `pages/*` subpath shims when consuming via Next.js, or wired by
28
+ * hand for other frameworks).
29
+ */
30
+ export declare function Providers({ children, locale, publicPaths, loginPath, }: ProvidersProps): ReactElement;
31
+ export {};
@@ -0,0 +1,47 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ /**
3
+ * Framework-agnostic router contract every BPM view consumes.
4
+ *
5
+ * Next.js App Router consumers wire it from `useRouter()` / `usePathname()`,
6
+ * but the contract is intentionally generic so SPA / Remix / Tanstack Router
7
+ * hosts can plug in the same `<RouterAdapterProvider>` with their own
8
+ * navigation primitives.
9
+ */
10
+ export interface RouterAdapter {
11
+ /** Current pathname (e.g. "/inbox"). `null` during SSR before hydration. */
12
+ readonly pathname: string | null;
13
+ /** Navigate to `href` (push onto history). */
14
+ push(href: string): void;
15
+ /** Navigate to `href` and replace the current history entry. */
16
+ replace(href: string): void;
17
+ /** Optional: go back. Falls back to `history.back()` when omitted. */
18
+ back?(): void;
19
+ /**
20
+ * Optional search params accessor. Returned `URLSearchParams` should be
21
+ * read-only — mutating it does not navigate. Default implementation reads
22
+ * `window.location.search` on the client.
23
+ */
24
+ searchParams?(): URLSearchParams;
25
+ }
26
+ export interface RouterAdapterProviderProps {
27
+ readonly value: RouterAdapter;
28
+ readonly children: ReactNode;
29
+ }
30
+ /**
31
+ * Wraps the BPM React tree so `useRouterAdapter()` resolves to the host's
32
+ * navigation primitives. Consumers typically put this once at the very root
33
+ * of their layout (or inside a `'use client'` shim that reads
34
+ * `useRouter()` + `usePathname()` from `next/navigation`).
35
+ */
36
+ export declare function RouterAdapterProvider({ value, children, }: RouterAdapterProviderProps): ReactElement;
37
+ /**
38
+ * Reads the host-provided {@link RouterAdapter}. Throws when used outside a
39
+ * `<RouterAdapterProvider>` to surface wiring mistakes early.
40
+ */
41
+ export declare function useRouterAdapter(): RouterAdapter;
42
+ /**
43
+ * Pure default search-params reader for the browser. Server-side returns an
44
+ * empty `URLSearchParams`. Used internally when a {@link RouterAdapter}
45
+ * does not override `searchParams()`.
46
+ */
47
+ export declare function defaultBrowserSearchParams(): URLSearchParams;
@@ -0,0 +1,117 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ /**
3
+ * Framework-agnostic path mapping every BPM view uses for internal
4
+ * cross-navigation. When a host embeds BPM under a non-root prefix
5
+ * (e.g. `/workspace/bpm/*`) it provides its own implementation through
6
+ * `<BPMRoutesProvider value={...}>`; otherwise the default factory
7
+ * preserves the historical `/instances/:id`, `/templates`, etc. paths.
8
+ *
9
+ * Function-shape (instead of string templates) means:
10
+ * - Optional and multi-param routes can branch on argument presence
11
+ * (`caseNew(templateId?)`).
12
+ * - Query-string composition stays inside the host's resolver, not the
13
+ * view.
14
+ * - TypeScript flags missing arguments at compile time.
15
+ *
16
+ * Mirror sibling: {@link RouterAdapter} owns *navigation primitives*
17
+ * (`push`, `replace`, `pathname`); `BPMRoutes` owns *path strings*. The
18
+ * two compose: views call `router.push(routes.caseDetail(id))`.
19
+ */
20
+ export interface BPMRoutes {
21
+ /** Workflow dashboard landing. Used by sidebar + dashboard tiles. */
22
+ dashboard(): string;
23
+ /** Inbox (待簽) — pending tasks assigned to the current member. */
24
+ inbox(): string;
25
+ /** Sent (我發起的) — instances the current member initiated or submitted on someone's behalf. */
26
+ sent(): string;
27
+ /** CC (抄送給我) — instances the current member is copied on. */
28
+ cc(): string;
29
+ /** Cross-view search. */
30
+ search(): string;
31
+ /** Personal delegation rules. */
32
+ delegations(): string;
33
+ /**
34
+ * Reserved for hosts that want a dedicated `/notifications` page —
35
+ * BPM's built-in views do **not** navigate here by default (the
36
+ * notification drawer mounted by `<BPMNextProviders>` is the primary
37
+ * unread-notification UX). The `createDefaultBPMRoutes()` factory
38
+ * returns `'/notifications'` so consumers can mount their own page
39
+ * at that path if desired; no BPM-shipped `pages/notifications`
40
+ * shim exists.
41
+ */
42
+ notifications(): string;
43
+ /**
44
+ * Detail page for one approval instance.
45
+ *
46
+ * @example default → `/instances/abc123`
47
+ */
48
+ caseDetail(instanceId: string): string;
49
+ /**
50
+ * Launch a new approval instance. When `templateId` is passed, the
51
+ * launch form is pre-populated for that template — by default this is
52
+ * appended as a `?templateId=` query string so the path itself stays
53
+ * stable for routing.
54
+ *
55
+ * @example default `caseNew()` → `/instances/new`
56
+ * @example default `caseNew('tpl-1')` → `/instances/new?templateId=tpl-1`
57
+ */
58
+ caseNew(templateId?: string): string;
59
+ /** Template index. */
60
+ templates(): string;
61
+ /**
62
+ * Unified "form + flow" creation wizard. Designs a form and an approval
63
+ * flow together, then publishes both atomically. This is the only place
64
+ * forms are designed — there is no separate standalone form builder page.
65
+ */
66
+ templateCompose(): string;
67
+ /** Template designer (xyflow canvas). */
68
+ templateDesigner(templateId: string): string;
69
+ /** Template version history. */
70
+ templateVersions(templateId: string): string;
71
+ /** Template categories admin. */
72
+ templateCategories(): string;
73
+ /** Per-member notification preferences. */
74
+ notificationSettings(): string;
75
+ /** Admin: organization tree management. */
76
+ adminOrgs(): string;
77
+ /** Admin: member directory mapping. */
78
+ adminUsers(): string;
79
+ /** Admin: delegation rule management. */
80
+ adminDelegations(): string;
81
+ /** Admin: database-managed notify webhook endpoints (ADR 18). */
82
+ adminWebhookEndpoints(): string;
83
+ }
84
+ /**
85
+ * Factory for the default `BPMRoutes` value. Reproduces the exact path
86
+ * literals BPM views used before `BPMRoutesContext` existed, so existing
87
+ * hosts (no provider mounted) keep working unchanged.
88
+ */
89
+ export declare function createDefaultBPMRoutes(): BPMRoutes;
90
+ export interface BPMRoutesProviderProps {
91
+ /**
92
+ * Override the path mapping. Provide a full implementation, or spread
93
+ * the default and override individual entries:
94
+ *
95
+ * ```tsx
96
+ * <BPMRoutesProvider value={{
97
+ * ...createDefaultBPMRoutes(),
98
+ * caseDetail: (id) => `/workspace/cases/${id}`,
99
+ * }}>
100
+ * ```
101
+ */
102
+ readonly value?: BPMRoutes;
103
+ readonly children: ReactNode;
104
+ }
105
+ /**
106
+ * Wraps the BPM React tree with a {@link BPMRoutes} value. Mounting the
107
+ * provider is **optional** — `useBPMRoutes()` falls back to
108
+ * {@link createDefaultBPMRoutes} when no provider is present. Use it
109
+ * only when the host needs to remap BPM's internal paths.
110
+ */
111
+ export declare function BPMRoutesProvider({ value, children, }: BPMRoutesProviderProps): ReactElement;
112
+ /**
113
+ * Reads the host-configured {@link BPMRoutes}. Falls back to
114
+ * {@link createDefaultBPMRoutes} when no `<BPMRoutesProvider>` ancestor
115
+ * is mounted, so views remain self-contained.
116
+ */
117
+ export declare function useBPMRoutes(): BPMRoutes;
@@ -0,0 +1,10 @@
1
+ import { TaskRecord } from '@rytass/bpm-core-client/workflow';
2
+ /**
3
+ * What a task list shows in its 「節點」 column: the node's display name
4
+ * (`nodeLabel`, resolved server-side from the instance's workflow snapshot),
5
+ * falling back to the raw `nodeId` when the server sent none — an unknown node
6
+ * or a host running its own queries. An ad-hoc task keeps the label of the
7
+ * node it was spawned on and gets the same 臨時會簽/臨時加簽 marker the
8
+ * instance timeline uses.
9
+ */
10
+ export declare function readTaskNodeText(task: Pick<TaskRecord, 'adhocType' | 'isAdhoc' | 'nodeId' | 'nodeLabel'>): string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Drop-in logout handler for host navigation menus. Wraps the BPM auth
3
+ * context's logout flow — calls `logoutApi()` against the BPM REST
4
+ * session endpoint, clears the in-memory member, then redirects to the
5
+ * configured `loginPath`.
6
+ *
7
+ * Hosts mount this on their own logout buttons / menu items so they do
8
+ * not need to touch `useAuth()` directly. To customize the post-logout
9
+ * destination, override the `loginPath` prop on `<BPMNextProviders>` or
10
+ * `<AuthProvider>`.
11
+ */
12
+ export declare function useBPMLogout(): () => Promise<void>;
@@ -0,0 +1,17 @@
1
+ import { ApiMember } from '@rytass/bpm-core-client';
2
+ /**
3
+ * Read the currently authenticated BPM member. Returns `null` when there
4
+ * is no active session — typically only seen on the login page or during
5
+ * the brief loading window before `<AuthProvider>` resolves the cookie.
6
+ *
7
+ * Convenience alias for `useAuth().member` aimed at host navigations
8
+ * (avatar, display name, role-based menu visibility) that should not
9
+ * depend on the broader `useAuth()` surface.
10
+ */
11
+ export declare function useBPMMember(): ApiMember | null;
12
+ /**
13
+ * Whether the member passes the server's `@BPMAdminOnly()` check — the
14
+ * `BPM_ADMIN` role or one of the administrator permissions. Use it to decide
15
+ * whether to show administrator-only UI; the server still enforces access.
16
+ */
17
+ export declare function isBPMAdminMember(member: Pick<ApiMember, 'permissions' | 'roles'> | null): boolean;
@@ -0,0 +1,51 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { CalendarLocale } from '@mezzanine-ui/react/moment';
3
+ export interface BPMNextProvidersProps {
4
+ readonly children: ReactNode;
5
+ /**
6
+ * Override the Mezzanine calendar locale. Forwarded to the inner
7
+ * `<Providers>`. Defaults to `CalendarLocale.ZH_TW`.
8
+ */
9
+ readonly locale?: CalendarLocale;
10
+ /**
11
+ * Routes that must remain accessible without a BPM session — visiting
12
+ * these does not redirect to `loginPath` even when `member` is null.
13
+ * Forwarded to `<AuthProvider>`. Defaults to `['/login']`.
14
+ *
15
+ * Hosts that mount BPM under a non-root prefix (see
16
+ * `<BPMRoutesProvider>`) should typically expand this to include their
17
+ * own auth-bypass paths.
18
+ */
19
+ readonly publicPaths?: readonly string[];
20
+ /**
21
+ * Where to redirect unauthenticated users. Forwarded to
22
+ * `<AuthProvider>`. Defaults to `'/login'`. Hosts owning their own
23
+ * login route (the recommended case) override this to their host
24
+ * route, e.g. `'/auth/sign-in'`.
25
+ */
26
+ readonly loginPath?: string;
27
+ }
28
+ /**
29
+ * One-line Next.js App Router shim for the full BPM provider stack.
30
+ * Mounts in the host's root layout (or layout for the BPM sub-tree):
31
+ *
32
+ * ```tsx
33
+ * import { BPMNextProviders } from '@rytass/bpm-core-react/next';
34
+ *
35
+ * export default function RootLayout({ children }) {
36
+ * return (
37
+ * <html><body>
38
+ * <BPMNextProviders loginPath="/auth/sign-in">
39
+ * {children}
40
+ * </BPMNextProviders>
41
+ * </body></html>
42
+ * );
43
+ * }
44
+ * ```
45
+ *
46
+ * Forwards every prop on {@link BPMNextProvidersProps} to the inner
47
+ * `<Providers>` and `<AuthProvider>`. For per-feature path remapping
48
+ * (BPM internal navigation), additionally wrap with
49
+ * `<BPMRoutesProvider>` exported from the same subpath.
50
+ */
51
+ export declare function BPMNextProviders({ children, locale, publicPaths, loginPath, }: BPMNextProvidersProps): ReactElement;
@@ -0,0 +1,2 @@
1
+ export * from './BPMNextProviders.cjs';
2
+ export { BPMRoutesProvider, createDefaultBPMRoutes, useBPMRoutes, type BPMRoutes, type BPMRoutesProviderProps, } from '../lib/routes-config.cjs';
@@ -1,2 +1,2 @@
1
- export * from './BPMNextProviders';
2
- export { BPMRoutesProvider, createDefaultBPMRoutes, useBPMRoutes, type BPMRoutes, type BPMRoutesProviderProps, } from '../lib/routes-config';
1
+ export * from './BPMNextProviders.js';
2
+ export { BPMRoutesProvider, createDefaultBPMRoutes, useBPMRoutes, type BPMRoutes, type BPMRoutesProviderProps, } from '../lib/routes-config.js';
@@ -0,0 +1,17 @@
1
+ import { ToolSet } from 'ai';
2
+ /**
3
+ * Strict guardrail: the assistant may ONLY design this approval flow, using the
4
+ * provided tools. Anything else is declined. Lives server-side so it cannot be
5
+ * overridden by client-supplied messages.
6
+ */
7
+ export declare const WORKFLOW_CHAT_SYSTEM_PROMPT = "\u4F60\u662F\u300C\u7C3D\u6838\u6D41\u7A0B\u8A2D\u8A08\u5668\u300D\u9801\u9762\u5167\u5EFA\u7684 AI \u52A9\u7406\uFF0C\u552F\u4E00\u8077\u8CAC\u662F\u5354\u52A9\u4F7F\u7528\u8005\u5728\u9019\u500B\u756B\u5E03\u4E0A\u8A2D\u8A08\uFF0F\u4FEE\u6539\u4E00\u500B\u7C3D\u6838\u5BE9\u6279\u6D41\u7A0B\uFF08workflow\uFF09\u3002\n\n\u4F60\u53EA\u80FD\u900F\u904E\u7CFB\u7D71\u63D0\u4F9B\u7684\u5DE5\u5177\uFF08tools\uFF09\u4F86\u64CD\u4F5C\u6D41\u7A0B\uFF1A\u65B0\u589E/\u91CD\u547D\u540D/\u522A\u9664\u7BC0\u9EDE\u3001\u9023\u7DDA\u3001\u8A2D\u5B9A\u7C3D\u6838\u4EBA\u3001\u8A2D\u5B9A\u689D\u4EF6\u5206\u6D41\u3001\u8A2D\u5B9A\u7CFB\u7D71\u7BC0\u9EDE\u52D5\u4F5C\u3001\u81EA\u52D5\u6392\u7248\u3001\u67E5\u8A62\u73FE\u6CC1\u8207\u9A57\u8B49\u7B49\u3002\u9664\u4E86\u9019\u4E9B\u5DE5\u5177\uFF0C\u4F60\u6C92\u6709\u5176\u4ED6\u80FD\u529B\u3002\n\n\u5DE5\u4F5C\u5B88\u5247\uFF1A\n1. \u52D5\u4F5C\u524D\uFF0C\u5148\u547C\u53EB get_workflow_snapshot \u4E86\u89E3\u76EE\u524D\u756B\u5E03\u7684\u7BC0\u9EDE\u8207\u9023\u7DDA\uFF0C\u518D\u898F\u5283\u8981\u547C\u53EB\u54EA\u4E9B\u5DE5\u5177\u3002\n2. \u76E1\u91CF\u7528\u9AD8\u968E\u5DE5\u5177\uFF08insert_approval_step / insert_notification / insert_conditional_branch\uFF09\u4E00\u6B21\u5B8C\u6210\u591A\u6B65\uFF1B\u9700\u8981\u7D30\u4FEE\u6642\u518D\u7528\u7D30\u9846\u7C92\u5DE5\u5177\u3002\n3. **\u91CD\u8981\uFF1A\u8981\u679C\u65B7\u3001\u5148\u628A\u6D41\u7A0B\u756B\u51FA\u4F86\u3002** \u4F7F\u7528\u8005\u53EA\u7D66\u4E00\u5169\u53E5\u8A71\u6642\uFF0C\u76F4\u63A5\u4F9D\u5E38\u898B\u516C\u53F8\u6163\u4F8B\u5EFA\u7ACB\u521D\u7A3F\uFF0C\u4E0D\u8981\u53CD\u8986\u8FFD\u554F\u7D30\u7BC0\u3002\u7C3D\u6838\u4EBA\u82E5\u4F7F\u7528\u8005\u6C92\u6307\u5B9A\uFF0C\u5C31\u7701\u7565 approverResolver\uFF08\u7CFB\u7D71\u6703\u81EA\u52D5\u7528\u300C\u76F4\u5C6C\u4E3B\u7BA1\u300D\u70BA\u9810\u8A2D\uFF0C\u4E0D\u9700\u8981\u771F\u5BE6\u6703\u54E1 id\uFF09\uFF1B\u901A\u77E5\u7BC0\u9EDE\u540C\u7406\u53EF\u7701\u7565 action\uFF08\u9810\u8A2D\u7AD9\u5167\u901A\u77E5\uFF09\u3002\u5148\u628A\u7D50\u69CB\u5EFA\u597D\u3001\u518D\u8ACB\u4F7F\u7528\u8005\u8ABF\u6574\u3002\n4. \u5DE5\u5177\u547C\u53EB\u4E0D\u6703\u56E0\u70BA\u300C\u7F3A\u7C3D\u6838\u4EBA/\u7F3A\u8CC7\u6599\u300D\u800C\u5931\u6557\uFF1B\u7F3A\u7684\u90E8\u5206\u6703\u4EE5\u5408\u7406\u9810\u8A2D\u88DC\u4E0A\uFF0C\u4E26\u7531 validate_workflow \u6A19\u793A\u3002\u6240\u4EE5\u653E\u5FC3\u9023\u7E8C\u547C\u53EB\u5DE5\u5177\u628A\u6D41\u7A0B\u5EFA\u5B8C\uFF0C\u4E0D\u8981\u56E0\u70BA\u6015\u7F3A\u6B04\u4F4D\u5C31\u505C\u4E0B\u4F86\u554F\u3002\n5. \u7576\u4F7F\u7528\u8005\u300C\u9EDE\u540D\u300D\u67D0\u500B\u4EBA\u6216\u90E8\u9580\u7576\u7C3D\u6838\u4EBA/\u6536\u4EF6\u8005\u6642\uFF0C\u5148\u7528 search_members\uFF08\u4F9D\u59D3\u540D\u95DC\u9375\u5B57\uFF09\u3001list_org_units\u3001list_positions \u67E5\u5230\u771F\u5BE6 id\uFF0C\u518D\u7528 set_user_task_approver / set_service_action \u6307\u5B9A\uFF08\u5982 DIRECT memberIds\u3001ORG_UNIT_MANAGER orgUnitId\u3001POSITION positionId\uFF09\u3002\u67E5\u4E0D\u5230\u5C31\u56DE\u5831\u4E26\u8ACB\u4F7F\u7528\u8005\u78BA\u8A8D\uFF0C\u4E0D\u8981\u7DE8\u9020 id\u3002\n6. \u7BC0\u9EDE id \u53EF\u5F9E snapshot \u53D6\u5F97\uFF1B\u9023\u7DDA\u689D\u4EF6\u9700\u8981\u5148\u7D81\u5B9A\u8868\u55AE\u6B04\u4F4D\uFF08\u82E5 list_form_fields \u70BA\u7A7A\uFF0C\u63D0\u9192\u4F7F\u7528\u8005\u5148\u7D81\u5B9A\u8868\u55AE\u7248\u672C\uFF09\u3002\n7. **\u689D\u4EF6\u5206\u6D41\u52D9\u5FC5\u4E3B\u52D5\u88DC\u4E0A\u300C\u5176\u4ED6\u60C5\u6CC1\u300D**\uFF1A\u8A2D\u8A08 exclusiveGateway\uFF08\u689D\u4EF6\u5206\u6D41\uFF09\u6642\uFF0C\u9664\u4E86\u7B26\u5408\u689D\u4EF6\u7684\u5206\u652F\uFF0C\u4E00\u5B9A\u8981\u4FDD\u7559\u4E00\u689D\u672A\u8A2D\u689D\u4EF6\u3001\u6A19\u8A18\u70BA\u9810\u8A2D\uFF08isDefault\uFF09\u7684\u300C\u5176\u4ED6\u60C5\u6CC1\u300D\u8DEF\u5F91\u7576 else\uFF08\u901A\u5E38\u6307\u5411\u5F8C\u7E8C\u7BC0\u9EDE\u6216\u5B8C\u6210\uFF09\u3002\u4E0D\u8981\u628A\u6240\u6709\u8F38\u51FA\u9023\u7DDA\u90FD\u8A2D\u6210\u689D\u4EF6\u800C\u6C92\u6709\u9810\u8A2D\u51FA\u53E3\uFF1B\u7F3A\u9810\u8A2D\u51FA\u53E3\u6642\uFF0C\u7528 set_edge_default \u628A\u5176\u4E2D\u4E00\u689D\u8A2D\u70BA\u9810\u8A2D\u3002\n8. \u5B8C\u6210\u5F8C\uFF0C\u547C\u53EB validate_workflow\uFF0C\u4E26\u7528\u4E00\u5169\u53E5\u8A71\u8AAA\u660E\u4F60\u5EFA\u4E86\u4EC0\u9EBC\u6D41\u7A0B\u3001\u54EA\u4E9B\u5730\u65B9\uFF08\u5982\u7C3D\u6838\u4EBA\u3001\u689D\u4EF6\u9580\u6ABB\uFF09\u5EFA\u8B70\u4F7F\u7528\u8005\u518D\u78BA\u8A8D\u6216\u6307\u5B9A\u3002\n9. \u5168\u7A0B\u4F7F\u7528\u7E41\u9AD4\u4E2D\u6587\uFF08\u53F0\u7063\u7528\u8A9E\uFF09\u56DE\u8986\u3002\n\n\u56B4\u683C\u754C\u7DDA\uFF1A\n- \u53EA\u505A\u300C\u8A2D\u8A08\u9019\u500B\u7C3D\u6838\u6D41\u7A0B\u300D\u76F8\u95DC\u7684\u4E8B\u3002\u4EFB\u4F55\u8207\u6B64\u7121\u95DC\u7684\u8ACB\u6C42\uFF08\u9592\u804A\u3001\u5BEB\u8A69\u3001\u5BEB\u7A0B\u5F0F\u3001\u67E5\u5929\u6C23\uFF0F\u65B0\u805E\u3001\u64CD\u4F5C\u5176\u4ED6\u7CFB\u7D71\u6216\u9801\u9762\u3001\u56DE\u7B54\u4E00\u822C\u77E5\u8B58\u554F\u984C\u7B49\uFF09\u4E00\u5F8B\u5A49\u62D2\uFF0C\u4E26\u7C21\u77ED\u5F15\u5C0E\u4F7F\u7528\u8005\u56DE\u5230\u6D41\u7A0B\u8A2D\u8A08\uFF0C\u4F8B\u5982\uFF1A\u300C\u6211\u53EA\u80FD\u5354\u52A9\u4F60\u8A2D\u8A08\u9019\u500B\u7C3D\u6838\u6D41\u7A0B\uFF0C\u9700\u8981\u6211\u5E6B\u4F60\u65B0\u589E\u95DC\u5361\u6216\u8A2D\u5B9A\u689D\u4EF6\u55CE\uFF1F\u300D\n- \u4E0D\u8981\u5047\u88DD\u57F7\u884C\u4F60\u5DE5\u5177\u4EE5\u5916\u7684\u52D5\u4F5C\uFF0C\u4E5F\u4E0D\u8981\u7DE8\u9020\u7D50\u679C\u3002";
8
+ /** Build AI SDK tools from WORKFLOW_TOOLSET — no `execute`, so the browser runs them. */
9
+ export declare function buildWorkflowAiSdkTools(): ToolSet;
10
+ export interface WorkflowChatRouteOptions {
11
+ /** Override the OpenAI model id (else BPM_LLM_MODEL env, else the default). */
12
+ readonly model?: string;
13
+ /** Override the system prompt (else the strict design-only guardrail). */
14
+ readonly system?: string;
15
+ }
16
+ /** Create the `POST` handler for the workflow chat route. */
17
+ export declare function createWorkflowChatPOST(options?: WorkflowChatRouteOptions): (request: Request) => Promise<Response>;
@@ -0,0 +1,4 @@
1
+ import { Metadata } from 'next';
2
+ import { ReactElement } from 'react';
3
+ export declare const metadata: Metadata;
4
+ export default function AdminDelegationsPage(): ReactElement;
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/orgs-Dr0FFoZo.cjs");let t=require("react/jsx-runtime");var n={title:`組織管理 | BPM Admin`,description:`維護組織樹、職位、會員歸屬與簽核主管解析規則。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/orgs-C8usknWb.cjs");let t=require("react/jsx-runtime");var n={title:`組織管理 | BPM Admin`,description:`維護組織樹、職位、會員歸屬與簽核主管解析規則。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,4 @@
1
+ import { Metadata } from 'next';
2
+ import { ReactElement } from 'react';
3
+ export declare const metadata: Metadata;
4
+ export default function AdminOrgsPage(): ReactElement;
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/orgs-CY0i1fie.js";
1
+ import { t as e } from "../../../chunks/orgs-Lg7tXv2u.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/admin/orgs/index.tsx
4
4
  var n = {
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/users-DVBJluFR.cjs");let t=require("react/jsx-runtime");var n={title:`會員對照 | BPM Admin`,description:`檢視 BPM 內部會員組織歸屬與主管解析。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/users-DVQicZIo.cjs");let t=require("react/jsx-runtime");var n={title:`會員對照 | BPM Admin`,description:`檢視 BPM 內部會員組織歸屬與主管解析。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,4 @@
1
+ import { Metadata } from 'next';
2
+ import { ReactElement } from 'react';
3
+ export declare const metadata: Metadata;
4
+ export default function AdminUsersPage(): ReactElement;
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../../chunks/users-BCyePbwB.js";
1
+ import { t as e } from "../../../chunks/users-DRbuDYF1.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/pages/admin/users/index.tsx
4
4
  var n = {