@wawjs/ngx-bos 22.0.2 → 22.0.3

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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Reusable Angular 22 contracts, services, guards, selectors, pages, and AI guidance for Ngx BOS CRM and business operating system applications.
4
4
 
5
- Current package line: `22.0.2`.
5
+ Current package line: `22.0.2`.
6
6
 
7
7
  ## App Contract
8
8
 
@@ -51,7 +51,7 @@ export const appConfig = {
51
51
  userForm: environment.userForm ?? [],
52
52
  signPath: '/sign',
53
53
  profilePath: '/profile',
54
- defaultUserThumb: 'assets/default.png',
54
+ defaultUserThumb: 'default.png',
55
55
  }),
56
56
  // ...other WAW providers
57
57
  ],
@@ -68,7 +68,7 @@ export const appConfig = {
68
68
  | `userForm` | `[]` | Form component descriptors for the user form |
69
69
  | `signPath` | `'/sign'` | Route to redirect to on logout |
70
70
  | `profilePath` | `'/profile'` | Route for the signed-in user's profile / avatar link |
71
- | `defaultUserThumb` | `'assets/default.png'` | Fallback avatar when the user has no thumbnail |
71
+ | `defaultUserThumb` | `'default.png'` | Fallback avatar when the user has no thumbnail |
72
72
 
73
73
  The resolved config is available through the `NGX_BOS_CONFIG` injection token.
74
74
 
@@ -36,5 +36,43 @@ files, or business-specific modules. Consumer projects receive this behavior thr
36
36
 
37
37
  ## SPA Contract
38
38
 
39
- Do not introduce SSR, prerendering, static SEO generation, or landing-page-first structure unless
40
- the developer explicitly asks. Browser-only behavior is the default.
39
+ This is not a marketing/SEO site — do not introduce static SEO generation or landing-page-first
40
+ structure unless the developer explicitly asks; browser-only behavior remains the default there.
41
+
42
+ Prerendering is the one exception, already in place: `src/main.server.ts`,
43
+ `src/app/app.config.server.ts`, and `src/app/app.routes.server.ts` exist purely so GitHub Pages has a
44
+ real file per route (no server-side routing fallback exists on static hosting), not for SEO. Every
45
+ guard treats `!isPlatformBrowser(...)` as "allow" — there is no real session at build time, so guards
46
+ defer the actual authorization check to the client after hydration; do not add code that assumes a
47
+ real user/session exists during prerendering.
48
+
49
+ ## Theming
50
+
51
+ Applying or changing a design touches these files:
52
+
53
+ - `src/styles/_theme.scss` — the single source of truth for colors, spacing (`--sp-*`), radius,
54
+ shadows, motion, and focus ring, plus `--ff-base`/`--fs`/`--letter-spacing` for typography. `:root`
55
+ holds defaults; `html[data-mode='dark']`, `html[data-density='compact']`, and
56
+ `html[data-radius='square']` override per mode. A design can use a different font per mode the same
57
+ way colors do — set `--ff-base` again inside `html[data-mode='dark']` if needed, and make sure the
58
+ font is actually loaded (see next item).
59
+ - `src/scss/utils/_fonts.scss` — self-hosted `@font-face` declarations (currently Poppins, weights
60
+ 300/400/500). If typography changes, add the new family's `@font-face` rules here; do not assume a
61
+ font is available just because `--ff-base` names it.
62
+
63
+ This repo also carries the org-branch override contract documented in
64
+ `documentation/org-branches.md` — `src/styles/_theme.scss` is the exact file org branding branches
65
+ override, so it must always satisfy the full token contract described there.
66
+
67
+ ## Routing And Prerender
68
+
69
+ - any page bound to a URL param (e.g. `admin/form/:formId`) needs a matching
70
+ `src/data/{feature}/{feature}s.json` (plural file name) and a `getPrerenderParams()` entry in
71
+ `src/app/app.routes.server.ts` that reads it. Add both in the same change as the route; the data
72
+ file can start as `[]`.
73
+ - unlike a git-committed content site, BOS's param data (forms, etc.) is live and per-tenant — these
74
+ JSON files only reflect what's known as of the last build, kept current by a manual rebuild+redeploy
75
+ when the underlying data changes. Any ID missing from the file still resolves via the GitHub Pages
76
+ 404.html SPA-fallback (`.github/deploy.yml`) until the next rebuild; that's expected, not a bug.
77
+ - do not add `getPrerenderParams` sources that require a live API call — Node has no reachable backend
78
+ at build time. Read from the committed JSON file only.