@coolms/core-angular 2.0.0-alpha.3 → 2.0.0-alpha.5
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/CHANGELOG.md +134 -0
- package/README.md +16 -15
- package/fesm2022/coolms-core-angular.mjs +1254 -249
- package/fesm2022/coolms-core-angular.mjs.map +1 -1
- package/package.json +4 -1
- package/types/coolms-core-angular.d.ts +831 -69
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@coolms/core-angular` are recorded here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
|
|
7
|
+
This file starts at the version named below, which is what the registry
|
|
8
|
+
currently serves. Earlier alphas are deliberately not reconstructed: entries are written
|
|
9
|
+
in the same commit as the work they describe, and inventing the ones that
|
|
10
|
+
predate this file would be a worse record than not having them.
|
|
11
|
+
|
|
12
|
+
## 2.0.0-alpha.5 - 2026-10-09
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **The elevation prompt opens only when a person asks for it.** A 403 that
|
|
17
|
+
the server stamps `X-Elevation-Required` no longer opens the prompt by
|
|
18
|
+
itself. `elevationInterceptor` now:
|
|
19
|
+
- leaves a refused read (`GET`, `HEAD`, `OPTIONS`: a page loading, a poll)
|
|
20
|
+
to its caller, which shows its own state;
|
|
21
|
+
- leaves a refused background request alone (see `BACKGROUND_REQUEST`);
|
|
22
|
+
- tells `ELEVATION_NOTICE` when a write a person made is refused, and hands
|
|
23
|
+
the 403 back at once. The application shows the refusal with an Elevate
|
|
24
|
+
button, and only that click opens the prompt (`ElevationService.offerFor`).
|
|
25
|
+
The refused action is not repeated by itself.
|
|
26
|
+
- `ErrorHandlerService.humanize()` says "This needs an elevated session." for
|
|
27
|
+
a stamped refusal, and "You don't have access to this." in place of the
|
|
28
|
+
framework's bare "Access Denied." for any other 403. A sentence the server
|
|
29
|
+
wrote for the refused action is kept.
|
|
30
|
+
- `ConfigService` no longer caches a failed read, so a page that was refused
|
|
31
|
+
reads again after the person elevates.
|
|
32
|
+
- **The console opens for an account the server grants it to.** Once the
|
|
33
|
+
session is settled, the auth guard asks for the admin's endpoint map: a 200
|
|
34
|
+
merges it into the app config, and a 403 signs this sign-in out (on the
|
|
35
|
+
server too) and returns to the sign-in page, which says the account has no
|
|
36
|
+
access to the console. A failure to ask is not an answer: the console opens,
|
|
37
|
+
and each of its requests is still decided by the server.
|
|
38
|
+
- The map is read at `/api/v1/admin/manifest`, and at the older
|
|
39
|
+
`/api/v1/console/manifest` only when the server answers 404 there.
|
|
40
|
+
- An answer is kept only for the sign-in that asked. Nothing is asked while
|
|
41
|
+
nobody is signed in.
|
|
42
|
+
- A module route waits for the map when someone is signed in.
|
|
43
|
+
- The realtime connection opens after this check, and a refused sign-in
|
|
44
|
+
opens none.
|
|
45
|
+
- The sign-in page shows its answer (a wrong password, or the console's
|
|
46
|
+
refusal) as soon as it arrives, without waiting for the person to type.
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- `BACKGROUND_REQUEST`: an `HttpContextToken` marking a request no person
|
|
51
|
+
made. The realtime connection and subscription tokens and the preferences
|
|
52
|
+
sync carry it.
|
|
53
|
+
- `ELEVATION_NOTICE` and `ElevationNoticePort`: how an application is told
|
|
54
|
+
that a person's write was refused for want of elevation.
|
|
55
|
+
- `isElevationRefusal(err)`: the one test for a stamped 403.
|
|
56
|
+
- `ConsoleAccessService` in the public API.
|
|
57
|
+
|
|
58
|
+
## 2.0.0-alpha.4 - 2026-09-27
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
- `ElevationService`: an elevation whose `expiresAt` is already past is
|
|
63
|
+
reported as expired **when its state is read** -- `state()` and
|
|
64
|
+
`elevated()` are plain accessors that compare against the clock and demote
|
|
65
|
+
the stored state on the spot -- rather than when a timer fires. A timer only
|
|
66
|
+
reschedules the announcement; the read does the work, which is what a
|
|
67
|
+
suspended tab, a moved clock or a missed tick could never defeat. The
|
|
68
|
+
service also reconciles on `visibilitychange` and `focus`, coalesced to one
|
|
69
|
+
refresh per two seconds.
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- `ElevationService` and the rest of the elevation client in the public API:
|
|
74
|
+
`elevationInterceptor`, `BYPASS_ELEVATION`, `ELEVATION_REQUIRED_HEADER`,
|
|
75
|
+
`ELEVATION_PROMPT` and the three `ELEVATION_WARNING_*` reasons. 2.0.0-alpha.3
|
|
76
|
+
did not export them, so a package importing `ElevationService` from the
|
|
77
|
+
published build failed to compile (TS2305) -- the reason this release was cut.
|
|
78
|
+
Measured on the bundles: 30 runtime exports in alpha.3, 51 here, none removed.
|
|
79
|
+
- `console@1`, the administration host contract (the platform rule: hosts implement contracts, modules offer entries):
|
|
80
|
+
`ConsoleEntry` and the six lists a module contributes as data (`routes`,
|
|
81
|
+
`bindings`, `topbar`, `overlays`, `panels`, `states`, `providers`),
|
|
82
|
+
`consoleEntry()` for an entry file that exports one object and runs nothing,
|
|
83
|
+
`assembleConsole()` which refuses a range this contract does not meet and
|
|
84
|
+
every collision (a path, a binding name, a top-bar id, a port claimed by two
|
|
85
|
+
modules) by name, and the host side a theme calls: `consoleChildren()` (one
|
|
86
|
+
lazy child per mount, `canMatch` from the manifest), `provideConsole()` (the
|
|
87
|
+
store with the host's and the modules' states, the registry bindings as an
|
|
88
|
+
initializer, every provision), `ConsoleActivation` (what the backend's
|
|
89
|
+
`ui.modules` says is installed: the tiles, overlays and panels to render,
|
|
90
|
+
and the modules named but missing from the build), and `ConsolePanelHost`,
|
|
91
|
+
the port a dock panel talks back through. `ApiManifest.ui` mirrors the
|
|
92
|
+
backend's section. The mount's `canMatch` answers once `AppInitService`
|
|
93
|
+
signals ready: the router recognises a pasted module URL while the
|
|
94
|
+
initializer is still fetching the manifest, and a synchronous read there
|
|
95
|
+
sent every cold deep link to the dashboard.
|
|
96
|
+
- Declares `bugs` so a page imported from this package, and the catalogue,
|
|
97
|
+
know where a correction is filed. The registry filled the gap from GitHub when
|
|
98
|
+
the manifest was silent; the declared field is the one that holds on any
|
|
99
|
+
registry.
|
|
100
|
+
|
|
101
|
+
**`DocumentApiManifest` gained `spacesAvailableUrl` and `spaceEnablementUrl`.**
|
|
102
|
+
Optional, mirroring the backend manifest DTO. They let the Documents space
|
|
103
|
+
accordion offer an *Add space* control instead of only ever losing entries when
|
|
104
|
+
a site is not enabled for documents.
|
|
105
|
+
|
|
106
|
+
Both optional, so a client built against an older backend simply hides the
|
|
107
|
+
control rather than showing one that cannot work.
|
|
108
|
+
|
|
109
|
+
### Fixed
|
|
110
|
+
|
|
111
|
+
- The README named a package that does not exist (`@coolms/admin-ui-angular`),
|
|
112
|
+
said the package installs no toolchain of its own (it does, from its lockfile,
|
|
113
|
+
outside the workspace), said it was built against Angular 19 (it is built with
|
|
114
|
+
22 and peers on ^22), listed `@angular/cdk` as a peer (it is not one), and said
|
|
115
|
+
`latest` waits for a stable release (npm points it at the newest alpha).
|
|
116
|
+
|
|
117
|
+
## 2.0.0-alpha.3 -- 2026-09-03
|
|
118
|
+
|
|
119
|
+
**A pre-release, carrying no compatibility promise.** Published under the
|
|
120
|
+
`alpha` dist-tag.
|
|
121
|
+
|
|
122
|
+
The client runtime the other CoolMS Angular packages sit on: session and token
|
|
123
|
+
refresh with a single-flight coordinator, the boot manifest and application
|
|
124
|
+
config state, theme and user preferences, the error handler, the HTTP
|
|
125
|
+
interceptors, and the wire types the CoolMS API emits.
|
|
126
|
+
|
|
127
|
+
It is the bottom of the layer graph -- it has no `@coolms` peers of its own, and
|
|
128
|
+
no runtime dependencies at all. Angular, NGXS and RxJS are peers.
|
|
129
|
+
|
|
130
|
+
### Fixed
|
|
131
|
+
|
|
132
|
+
- The Status section told readers the package was not published to npm, which
|
|
133
|
+
it served from its own npm page. It now states what does not change when a
|
|
134
|
+
version is tagged.
|
package/README.md
CHANGED
|
@@ -20,11 +20,10 @@ it is only useful against a CoolMS backend.
|
|
|
20
20
|
|
|
21
21
|
## Layering
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
The naming rule: `-angular` is a library, `-ui-angular` ships components.
|
|
23
|
+
The bottom of the CoolMS Angular packages: it has no `@coolms` peers of its own.
|
|
24
|
+
The UI kit (`@coolms/ui-angular`) and the feature packages -- the editors, the
|
|
25
|
+
viewers and the rest of `@coolms/*-angular` -- build on it; nothing here depends
|
|
26
|
+
on them.
|
|
28
27
|
|
|
29
28
|
The reason this is a package rather than application code is federation. The UI
|
|
30
29
|
kit and every federated remote need the session, config, error handling and
|
|
@@ -47,20 +46,22 @@ npm run build
|
|
|
47
46
|
|
|
48
47
|
Produces `dist/` — FESM 2022 bundles plus type definitions, compiled in Angular's
|
|
49
48
|
*partial* mode so the consuming application's own compiler finishes the job. That
|
|
50
|
-
is what keeps a
|
|
51
|
-
|
|
49
|
+
is what keeps a build made with one Angular 22 release working in an application
|
|
50
|
+
on a later one within the peer range. `@angular/*`, `@ngxs/store` and `rxjs` stay external, as peers.
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
On its own -- a clone, or CI -- it installs its toolchain (`ng-packagr`, the
|
|
53
|
+
Angular compiler, TypeScript) from its committed lockfile, and that is how a
|
|
54
|
+
published build is made. Inside the CoolMS workspace its `node_modules` is instead
|
|
55
|
+
a relative symlink to the admin application's, so exactly one `@angular` tree is
|
|
56
|
+
in play while the admin consumes this package from source: a second copy would
|
|
57
|
+
give two type identities for the same class.
|
|
58
58
|
|
|
59
59
|
## Status
|
|
60
60
|
|
|
61
61
|
A pre-release: the shape is still moving and it carries no compatibility
|
|
62
|
-
promise. Published under the `alpha` dist-tag
|
|
63
|
-
|
|
62
|
+
promise. Published under the `alpha` dist-tag. Until a stable release exists, `latest`
|
|
63
|
+
points at the newest alpha as well -- npm set it on the first publish -- so a bare
|
|
64
|
+
`npm install @coolms/core-angular` gets a pre-release.
|
|
64
65
|
|
|
65
66
|
The CoolMS admin application consumes it from source via a TypeScript path
|
|
66
67
|
mapping rather than from the registry, so the published build and the one the
|
|
@@ -68,7 +69,7 @@ admin runs are produced the same way but resolved differently.
|
|
|
68
69
|
|
|
69
70
|
## Requirements
|
|
70
71
|
|
|
71
|
-
Angular, NGXS
|
|
72
|
+
Angular (`common`, `core`, `forms`, `router`), NGXS and RxJS are peers; the supported ranges are declared in `package.json`, which is what an install actually checks.
|
|
72
73
|
|
|
73
74
|
## Licence
|
|
74
75
|
|