@edsis/angular 0.0.2 → 21.0.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.
- package/README.md +77 -178
- package/fesm2022/edsis-angular-auth.mjs +992 -0
- package/fesm2022/edsis-angular-auth.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-access.mjs +1365 -0
- package/fesm2022/edsis-angular-sdk-access.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-approval.mjs +1259 -0
- package/fesm2022/edsis-angular-sdk-approval.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-auth.mjs +254 -0
- package/fesm2022/edsis-angular-sdk-auth.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-employee.mjs +284 -0
- package/fesm2022/edsis-angular-sdk-employee.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-health.mjs +96 -0
- package/fesm2022/edsis-angular-sdk-health.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-shared.mjs +2740 -0
- package/fesm2022/edsis-angular-sdk-shared.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-storage.mjs +288 -0
- package/fesm2022/edsis-angular-sdk-storage.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk-user.mjs +489 -0
- package/fesm2022/edsis-angular-sdk-user.mjs.map +1 -0
- package/fesm2022/edsis-angular-sdk.mjs +75 -0
- package/fesm2022/edsis-angular-sdk.mjs.map +1 -0
- package/fesm2022/edsis-angular.mjs +0 -5707
- package/fesm2022/edsis-angular.mjs.map +1 -1
- package/package.json +51 -46
- package/types/edsis-angular-auth.d.ts +117 -0
- package/types/edsis-angular-sdk-access.d.ts +547 -0
- package/types/edsis-angular-sdk-approval.d.ts +638 -0
- package/types/edsis-angular-sdk-auth.d.ts +128 -0
- package/types/edsis-angular-sdk-employee.d.ts +159 -0
- package/types/edsis-angular-sdk-health.d.ts +35 -0
- package/types/edsis-angular-sdk-shared.d.ts +176 -0
- package/types/edsis-angular-sdk-storage.d.ts +102 -0
- package/types/edsis-angular-sdk-user.d.ts +189 -0
- package/types/edsis-angular-sdk.d.ts +26 -0
- package/types/edsis-angular.d.ts +1 -824
- package/src/lib/styles/USAGE.md +0 -238
- package/src/lib/styles/container.css +0 -38
- package/src/lib/styles/fonts/commit-mono/CommitMonoVariable.woff2 +0 -0
- package/src/lib/styles/fonts/commit-mono/commit-mono.css +0 -2
- package/src/lib/styles/fonts/inter/InterVariable-Italic.woff2 +0 -0
- package/src/lib/styles/fonts/inter/InterVariable.woff2 +0 -0
- package/src/lib/styles/fonts/inter/inter.css +0 -2
- package/src/lib/styles/icons/README.md +0 -313
- package/src/lib/styles/icons/lucide.svg +0 -9768
- package/src/lib/styles/icons/material-symbols.css +0 -48
- package/src/lib/styles/main.css +0 -24
- package/src/lib/styles/tailwind/component/card.css +0 -7
- package/src/lib/styles/tailwind/tailwind.css +0 -144
- package/src/lib/styles/theme.css +0 -406
package/README.md
CHANGED
|
@@ -1,227 +1,126 @@
|
|
|
1
1
|
# @edsis/angular
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular library package for Edsis, including the generated SDK entry points:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- `@edsis/angular/auth`
|
|
6
|
+
- `@edsis/angular/sdk`
|
|
7
|
+
- `@edsis/angular/sdk/shared`
|
|
8
|
+
- `@edsis/angular/sdk/access`
|
|
9
|
+
- `@edsis/angular/sdk/approval`
|
|
10
|
+
- `@edsis/angular/sdk/auth`
|
|
11
|
+
- `@edsis/angular/sdk/employee`
|
|
12
|
+
- `@edsis/angular/sdk/health`
|
|
13
|
+
- `@edsis/angular/sdk/storage`
|
|
14
|
+
- `@edsis/angular/sdk/user`
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
## Generate and build
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
- `@edsis/angular/styles/main.css` for the shared stylesheet
|
|
11
|
-
|
|
12
|
-
Domain routes, auth helpers, and generated API clients live in `@edsis/library`.
|
|
13
|
-
|
|
14
|
-
Category-style imports such as `@edsis/angular/components` or `@edsis/angular/themes` are not published secondary entry points. Those paths only work inside this monorepo because the workspace `tsconfig.json` defines development aliases.
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
The package is published publicly to npm.
|
|
18
|
+
Use the root workspace scripts so SDK generation and library packaging stay in sync:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
21
|
+
bun run build:library
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
That command runs:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
27
|
+
bun run gen:sdk
|
|
28
|
+
bunx ng build library
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- Angular 21 (`@angular/core`, `@angular/common`, `@angular/forms`, `@angular/router`, `@angular/cdk`, `@angular/material`, `@angular/animations`)
|
|
31
|
+
The packaged output is written to `dist/library`, including the reusable `@edsis/angular/auth` entry point.
|
|
33
32
|
|
|
34
|
-
##
|
|
33
|
+
## Full release
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
Run the guarded release flow with:
|
|
37
36
|
|
|
38
|
-
```
|
|
39
|
-
|
|
37
|
+
```bash
|
|
38
|
+
bun run release:library
|
|
40
39
|
```
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"styles": ["node_modules/@edsis/angular/styles/main.css", "src/styles.css"]
|
|
47
|
-
}
|
|
48
|
-
```
|
|
41
|
+
The script will:
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
template: `
|
|
60
|
-
<icon>heart</icon>
|
|
61
|
-
<button type="button" (click)="toggleTheme()">Toggle theme</button>
|
|
62
|
-
`,
|
|
63
|
-
})
|
|
64
|
-
export class AppComponent {
|
|
65
|
-
private readonly themeService = inject(ThemeService);
|
|
66
|
-
|
|
67
|
-
toggleTheme(): void {
|
|
68
|
-
this.themeService.toggleTheme();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
useSystemTheme(): void {
|
|
72
|
-
this.themeService.setTheme('system');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
setScheme(scheme: ColorScheme): void {
|
|
76
|
-
this.themeService.setScheme(scheme);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
```
|
|
43
|
+
- reject the release if the git worktree is dirty
|
|
44
|
+
- reject the release if the current branch still has commits that are not pushed, is behind, or is diverged from its upstream branch
|
|
45
|
+
- ask for a version bump using `X`, `Y`, or `Z`
|
|
46
|
+
- map `X` to major, `Y` to minor, and `Z` to patch, then increment the current version automatically
|
|
47
|
+
- ask for a final confirmation before continuing
|
|
48
|
+
- run `bun run build:library`
|
|
49
|
+
- commit the version bump and generated SDK updates with `update version ke {{version}}`
|
|
50
|
+
- push the commit
|
|
51
|
+
- publish `dist/library` to the public npm registry
|
|
80
52
|
|
|
81
|
-
|
|
53
|
+
For a non-interactive release, provide the bump and confirmation flags explicitly:
|
|
82
54
|
|
|
83
|
-
```
|
|
84
|
-
|
|
55
|
+
```bash
|
|
56
|
+
bun run release:library --bump Z --yes
|
|
85
57
|
```
|
|
86
58
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Inside this repository, `tsconfig.json` exposes development-only aliases:
|
|
59
|
+
Preview the release plan without changing files:
|
|
90
60
|
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
"compilerOptions": {
|
|
94
|
-
"paths": {
|
|
95
|
-
"@edsis/angular": ["./projects/library/angular/src/public-api"],
|
|
96
|
-
"@edsis/angular/*": ["./projects/library/angular/src/lib/*"]
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
61
|
+
```bash
|
|
62
|
+
bun run release:library:dry-run --bump Y --yes
|
|
100
63
|
```
|
|
101
64
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
## Theme Bootstrapping
|
|
105
|
-
|
|
106
|
-
`ThemeService` reads settings in this order:
|
|
107
|
-
|
|
108
|
-
1. localStorage values if they exist
|
|
109
|
-
2. HTML `data-*` attributes if storage is empty
|
|
110
|
-
3. built-in defaults if neither source is present
|
|
111
|
-
|
|
112
|
-
Supported attributes on `<html>`:
|
|
113
|
-
|
|
114
|
-
- `data-theme`
|
|
115
|
-
- `data-scheme`
|
|
116
|
-
- `data-container`
|
|
117
|
-
- `data-layout`
|
|
65
|
+
## Versioning
|
|
118
66
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- `data-theme="light"`
|
|
122
|
-
- `data-container="boxed"`
|
|
123
|
-
- `data-scheme="blue"`
|
|
124
|
-
- `data-layout="vertical"`
|
|
125
|
-
|
|
126
|
-
## Library Development
|
|
127
|
-
|
|
128
|
-
Useful commands from the workspace root:
|
|
67
|
+
Update the publishable package version in `projects/library/package.json` with:
|
|
129
68
|
|
|
130
69
|
```bash
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
### Reactive Signals
|
|
137
|
-
|
|
138
|
-
All settings are exposed as Angular signals for reactive updates:
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
import { Component, inject, computed } from '@angular/core';
|
|
142
|
-
import { ThemeService } from '@edsis/angular';
|
|
143
|
-
|
|
144
|
-
@Component({
|
|
145
|
-
template: `
|
|
146
|
-
<div>
|
|
147
|
-
<p>Current theme: {{ currentTheme() }}</p>
|
|
148
|
-
<p>Is dark mode: {{ isDark() }}</p>
|
|
149
|
-
<p>Scheme color: {{ schemeColor() }}</p>
|
|
150
|
-
</div>
|
|
151
|
-
`,
|
|
152
|
-
})
|
|
153
|
-
export class MyComponent {
|
|
154
|
-
themeService = inject(ThemeService);
|
|
155
|
-
|
|
156
|
-
// Direct access to signals
|
|
157
|
-
currentTheme = this.themeService.theme;
|
|
158
|
-
currentResolvedTheme = this.themeService.resolvedTheme;
|
|
159
|
-
|
|
160
|
-
// Computed signals
|
|
161
|
-
isDark = computed(() => this.themeService.resolvedTheme() === 'dark');
|
|
162
|
-
schemeColor = computed(() => this.themeService.getCurrentSchemeColor());
|
|
163
|
-
}
|
|
70
|
+
bun run version:library patch
|
|
71
|
+
bun run version:library minor
|
|
72
|
+
bun run version:library 1.2.3
|
|
73
|
+
bun run version:library prerelease --preid beta
|
|
164
74
|
```
|
|
165
75
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
All settings are automatically:
|
|
76
|
+
The version script only updates the source package manifest. The built package in
|
|
77
|
+
`dist/library` picks up the version on the next `bun run build:library`.
|
|
169
78
|
|
|
170
|
-
|
|
171
|
-
- ✅ Loaded from `localStorage` on app init
|
|
172
|
-
- ✅ Applied to DOM via `data-*` attributes
|
|
173
|
-
- ✅ `data-theme="system"` follows the OS light/dark preference
|
|
174
|
-
- ✅ Synced across tabs/windows
|
|
79
|
+
## Pack and publish locally
|
|
175
80
|
|
|
176
|
-
|
|
81
|
+
Preview the npm tarball:
|
|
177
82
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
- `--foreground` / `text-foreground`
|
|
182
|
-
- `--card` / `bg-card`
|
|
183
|
-
- `--primary` / `bg-primary`
|
|
184
|
-
- `--secondary` / `bg-secondary`
|
|
185
|
-
- `--muted` / `bg-muted`
|
|
186
|
-
- `--accent` / `bg-accent`
|
|
187
|
-
- `--destructive` / `bg-destructive`
|
|
188
|
-
- `--border` / `border-border`
|
|
83
|
+
```bash
|
|
84
|
+
bun run pack:library
|
|
85
|
+
```
|
|
189
86
|
|
|
190
|
-
|
|
87
|
+
Publish to npm:
|
|
191
88
|
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
|
|
89
|
+
```bash
|
|
90
|
+
bun run publish:library
|
|
91
|
+
bun run publish:library --tag next
|
|
195
92
|
```
|
|
196
93
|
|
|
197
|
-
|
|
94
|
+
Run a local publish dry-run:
|
|
198
95
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
- `font-bold` - 700
|
|
96
|
+
```bash
|
|
97
|
+
bun run publish:library:dry-run
|
|
98
|
+
```
|
|
203
99
|
|
|
204
|
-
|
|
100
|
+
`publish:library` publishes from `dist/library` and forces `--access public`.
|
|
205
101
|
|
|
206
|
-
For
|
|
102
|
+
For local publishes, the script does not add `--provenance` by default because npm provenance generation is not supported outside compatible CI providers. If you need provenance in a supported CI environment, pass it explicitly:
|
|
207
103
|
|
|
208
|
-
|
|
209
|
-
|
|
104
|
+
```bash
|
|
105
|
+
bun run publish:library --provenance
|
|
106
|
+
```
|
|
210
107
|
|
|
211
|
-
##
|
|
108
|
+
## GitHub publish workflow
|
|
212
109
|
|
|
213
|
-
|
|
214
|
-
# Build library
|
|
215
|
-
ng build edsis-angular
|
|
110
|
+
The repository includes `.github/workflows/publish-library.yml`.
|
|
216
111
|
|
|
217
|
-
|
|
218
|
-
ng build edsis-angular --watch
|
|
219
|
-
```
|
|
112
|
+
It supports:
|
|
220
113
|
|
|
221
|
-
|
|
114
|
+
- pushing a tag named `library-vX.Y.Z`
|
|
115
|
+
- manual `workflow_dispatch` runs with an npm tag and optional dry-run
|
|
222
116
|
|
|
223
|
-
|
|
117
|
+
The workflow uses npm trusted publishing via GitHub Actions OIDC, so it does
|
|
118
|
+
not require a repository `NPM_TOKEN` secret. The npm package must be configured
|
|
119
|
+
to trust this repository workflow as a publisher. On tag pushes, the tag
|
|
120
|
+
version must match `projects/library/package.json`.
|
|
224
121
|
|
|
225
|
-
|
|
122
|
+
Recommended local release flow:
|
|
226
123
|
|
|
227
|
-
|
|
124
|
+
1. Run `bun run release:library`.
|
|
125
|
+
2. Select `X`, `Y`, or `Z`, then confirm the computed version.
|
|
126
|
+
3. Let the script build, commit, push, and publish the package.
|