@rytass/bpm-core-react 0.3.3 → 0.3.4

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 (3) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +54 -0
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -8,6 +8,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  Releases are managed by [`nx release`](https://nx.dev/recipes/nx-release) with
9
9
  Conventional Commits — see `nx.json` for the release config.
10
10
 
11
+ ## 0.3.4 — 2026-05-28
12
+
13
+ ### Documentation
14
+
15
+ - **README "Mounting BPM under a non-root URL prefix"** added. Shows
16
+ the exhaustive `createPrefixedRoutes(prefix)` factory covering all
17
+ **19** `BPMRoutes` entries (previously the README only sketched
18
+ 2-3). Spreading `createDefaultBPMRoutes()` first means new BPMCore
19
+ versions that add routes never silently regress consumer hosts.
20
+
21
+ ### Why a patch
22
+
23
+ Documentation-only. No source change.
24
+
11
25
  ## 0.3.3 — 2026-05-28
12
26
 
13
27
  ### Fixed
package/README.md CHANGED
@@ -63,6 +63,60 @@ function MyLoginPage() {
63
63
 
64
64
  For SPA / Remix / Tanstack Router hosts, supply a `RouterAdapter` that bridges your router primitives.
65
65
 
66
+ ### Mounting BPM under a non-root URL prefix
67
+
68
+ If your host already owns the `/` namespace (Shuttle, an existing
69
+ admin console, etc.), wrap the BPM tree in `<BPMRoutesProvider>` and
70
+ override every internal cross-link to a prefixed path. The full
71
+ `BPMRoutes` contract has **19 entries** — overriding only some leaves
72
+ the rest pointing at the unprefixed defaults, which usually 404s on
73
+ your host. Use a small factory to keep the override exhaustive:
74
+
75
+ ```tsx
76
+ import {
77
+ BPMRoutesProvider,
78
+ createDefaultBPMRoutes,
79
+ type BPMRoutes,
80
+ } from '@rytass/bpm-core-react/next';
81
+
82
+ function createPrefixedRoutes(prefix: string): BPMRoutes {
83
+ const trim = prefix.replace(/\/$/, '');
84
+ return {
85
+ ...createDefaultBPMRoutes(), // safety net for any future routes
86
+ dashboard: () => `${trim}`,
87
+ inbox: () => `${trim}/inbox`,
88
+ sent: () => `${trim}/sent`,
89
+ cc: () => `${trim}/cc`,
90
+ search: () => `${trim}/search`,
91
+ delegations: () => `${trim}/delegations`,
92
+ notifications: () => `${trim}/notifications`,
93
+ caseDetail: (id) => `${trim}/instances/${id}`,
94
+ caseNew: (templateId) => templateId
95
+ ? `${trim}/instances/new?templateId=${encodeURIComponent(templateId)}`
96
+ : `${trim}/instances/new`,
97
+ templates: () => `${trim}/templates`,
98
+ templateDesigner: (id) => `${trim}/templates/${id}/designer`,
99
+ templateVersions: (id) => `${trim}/templates/${id}/versions`,
100
+ templateCategories: () => `${trim}/templates/categories`,
101
+ forms: () => `${trim}/forms`,
102
+ formBuilder: (id) => `${trim}/forms/${id}/builder`,
103
+ notificationSettings: () => `${trim}/settings/notifications`,
104
+ adminOrgs: () => `${trim}/admin/orgs`,
105
+ adminUsers: () => `${trim}/admin/users`,
106
+ adminDelegations: () => `${trim}/admin/delegations`,
107
+ };
108
+ }
109
+
110
+ // In your layout:
111
+ <BPMRoutesProvider value={createPrefixedRoutes('/operations/approval')}>
112
+ <BPMNextProviders>{children}</BPMNextProviders>
113
+ </BPMRoutesProvider>
114
+ ```
115
+
116
+ `createDefaultBPMRoutes()` is the source of truth for the route shape;
117
+ spreading it first means new BPMCore versions that add routes never
118
+ silently regress your host.
119
+
66
120
  ## License
67
121
 
68
122
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytass/bpm-core-react",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "BPM approval workflow React components and views for the Rytass BPM stack. Self-contained AuthProvider, NotificationDrawer, AppNavigation, plus full views for inbox / instances / templates / forms / admin / settings that compose on top of Mezzanine UI and the BPM client functions.",
5
5
  "keywords": [
6
6
  "bpm",
@@ -278,8 +278,8 @@
278
278
  }
279
279
  },
280
280
  "peerDependencies": {
281
- "@rytass/bpm-core-client": "^0.1.6",
282
- "@rytass/bpm-core-shared": "^0.1.6",
281
+ "@rytass/bpm-core-client": "^0.1.7",
282
+ "@rytass/bpm-core-shared": "^0.1.7",
283
283
  "@mezzanine-ui/react": "^1.1.0",
284
284
  "@mezzanine-ui/icons": "^1.0.2",
285
285
  "react": "^18.0.0 || ^19.0.0",