@coolms/core-angular 2.0.0-alpha.2
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/LICENSE +21 -0
- package/README.md +74 -0
- package/fesm2022/coolms-core-angular.mjs +2085 -0
- package/fesm2022/coolms-core-angular.mjs.map +1 -0
- package/package.json +51 -0
- package/types/coolms-core-angular.d.ts +1415 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dmitry Popov / CoolMS contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @coolms/core-angular
|
|
2
|
+
|
|
3
|
+
The CoolMS client runtime for Angular — everything a CoolMS front end needs
|
|
4
|
+
before it has any UI:
|
|
5
|
+
|
|
6
|
+
- **Session** — login, token refresh with a single-flight coordinator,
|
|
7
|
+
cross-tab sync, route guards, and a sign-in page.
|
|
8
|
+
- **Boot and configuration** — the API manifest, app config state, and the
|
|
9
|
+
`ConfigService` that reads layout/dialog/form/datagrid configuration.
|
|
10
|
+
- **Theme and user preferences** — one preference store (`coolms_ui_prefs`)
|
|
11
|
+
covering grids, panels, page state, navigation and the terminal.
|
|
12
|
+
- **Cross-cutting** — the error handler, the auth and section HTTP
|
|
13
|
+
interceptors, the navigation graph, and entity search.
|
|
14
|
+
- **Wire types** — the shapes the CoolMS API emits, including the
|
|
15
|
+
`form-render` contract.
|
|
16
|
+
|
|
17
|
+
It is not admin-specific: nothing here is admin chrome. It is also not a
|
|
18
|
+
general-purpose Angular library — every endpoint it speaks is a CoolMS one, so
|
|
19
|
+
it is only useful against a CoolMS backend.
|
|
20
|
+
|
|
21
|
+
## Layering
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
@coolms/core-angular -> @coolms/admin-ui-angular -> @coolms/<module>-ui-angular
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The naming rule: `-angular` is a library, `-ui-angular` ships components.
|
|
28
|
+
|
|
29
|
+
The reason this is a package rather than application code is federation. The UI
|
|
30
|
+
kit and every federated remote need the session, config, error handling and
|
|
31
|
+
preferences **at runtime**, resolved to a single `singleton` instance — and a
|
|
32
|
+
remote cannot import from its host.
|
|
33
|
+
|
|
34
|
+
## Public surface
|
|
35
|
+
|
|
36
|
+
`src/public-api.ts` is the whole API. Nothing outside the package may deep-link
|
|
37
|
+
past it, and the consuming application enforces that with a lint rule, so the
|
|
38
|
+
barrel is a real contract rather than a convenience re-export. A symbol that is
|
|
39
|
+
not exported there is internal; exporting one is a deliberate decision about the
|
|
40
|
+
package API.
|
|
41
|
+
|
|
42
|
+
## Building
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
npm run build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Produces `dist/` — FESM 2022 bundles plus type definitions, compiled in Angular's
|
|
49
|
+
*partial* mode so the consuming application's own compiler finishes the job. That
|
|
50
|
+
is what keeps a package built against 19.x working as an application moves
|
|
51
|
+
forward. `@angular/*`, `@ngxs/store` and `rxjs` stay external, as peers.
|
|
52
|
+
|
|
53
|
+
The build runs through the admin application's `ng-packagr`, because this package
|
|
54
|
+
deliberately installs **no toolchain and no framework of its own**: its
|
|
55
|
+
`node_modules` is a relative symlink to the admin's, so exactly one `@angular`
|
|
56
|
+
tree is ever in play. A second copy would give two type identities for the same
|
|
57
|
+
class while the package is consumed from source.
|
|
58
|
+
|
|
59
|
+
## Status
|
|
60
|
+
|
|
61
|
+
Consumed today from source, via a TypeScript path mapping in the CoolMS admin
|
|
62
|
+
application — the same way `@coolms/editor-angular` is.
|
|
63
|
+
|
|
64
|
+
Still marked `private`: the distributable builds, but publishing to npm is a
|
|
65
|
+
deliberate step that has not been taken. Clearing the flag is what enables
|
|
66
|
+
`npm publish dist`.
|
|
67
|
+
|
|
68
|
+
## Requirements
|
|
69
|
+
|
|
70
|
+
Angular, NGXS, RxJS and `@angular/cdk` are peers; the supported ranges are declared in `package.json`, which is what an install actually checks.
|
|
71
|
+
|
|
72
|
+
## Licence
|
|
73
|
+
|
|
74
|
+
MIT — see [LICENSE](LICENSE).
|