@edsis/angular 0.0.2 → 21.0.0
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 +74 -178
- 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 +47 -46
- 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,123 @@
|
|
|
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/sdk`
|
|
6
|
+
- `@edsis/angular/sdk/shared`
|
|
7
|
+
- `@edsis/angular/sdk/access`
|
|
8
|
+
- `@edsis/angular/sdk/approval`
|
|
9
|
+
- `@edsis/angular/sdk/auth`
|
|
10
|
+
- `@edsis/angular/sdk/employee`
|
|
11
|
+
- `@edsis/angular/sdk/health`
|
|
12
|
+
- `@edsis/angular/sdk/storage`
|
|
13
|
+
- `@edsis/angular/sdk/user`
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
## Generate and build
|
|
8
16
|
|
|
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.
|
|
17
|
+
Use the root workspace scripts so SDK generation and library packaging stay in sync:
|
|
19
18
|
|
|
20
19
|
```bash
|
|
21
|
-
|
|
20
|
+
bun run build:library
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
That command runs:
|
|
25
24
|
|
|
26
25
|
```bash
|
|
27
|
-
|
|
26
|
+
bun run gen:sdk
|
|
27
|
+
bunx ng build library
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- Angular 21 (`@angular/core`, `@angular/common`, `@angular/forms`, `@angular/router`, `@angular/cdk`, `@angular/material`, `@angular/animations`)
|
|
30
|
+
The packaged output is written to `dist/library`.
|
|
33
31
|
|
|
34
|
-
##
|
|
32
|
+
## Full release
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
Run the guarded release flow with:
|
|
37
35
|
|
|
38
|
-
```
|
|
39
|
-
|
|
36
|
+
```bash
|
|
37
|
+
bun run release:library
|
|
40
38
|
```
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"styles": ["node_modules/@edsis/angular/styles/main.css", "src/styles.css"]
|
|
47
|
-
}
|
|
48
|
-
```
|
|
40
|
+
The script will:
|
|
49
41
|
|
|
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
|
-
```
|
|
42
|
+
- reject the release if the git worktree is dirty
|
|
43
|
+
- reject the release if the current branch still has commits that are not pushed, is behind, or is diverged from its upstream branch
|
|
44
|
+
- ask for a version bump using `X`, `Y`, or `Z`
|
|
45
|
+
- map `X` to major, `Y` to minor, and `Z` to patch, then increment the current version automatically
|
|
46
|
+
- ask for a final confirmation before continuing
|
|
47
|
+
- run `bun run build:library`
|
|
48
|
+
- commit the version bump and generated SDK updates with `update version ke {{version}}`
|
|
49
|
+
- push the commit
|
|
50
|
+
- publish `dist/library` to the public npm registry
|
|
80
51
|
|
|
81
|
-
|
|
52
|
+
For a non-interactive release, provide the bump and confirmation flags explicitly:
|
|
82
53
|
|
|
83
|
-
```
|
|
84
|
-
|
|
54
|
+
```bash
|
|
55
|
+
bun run release:library --bump Z --yes
|
|
85
56
|
```
|
|
86
57
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Inside this repository, `tsconfig.json` exposes development-only aliases:
|
|
58
|
+
Preview the release plan without changing files:
|
|
90
59
|
|
|
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
|
-
}
|
|
60
|
+
```bash
|
|
61
|
+
bun run release:library:dry-run --bump Y --yes
|
|
100
62
|
```
|
|
101
63
|
|
|
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`
|
|
64
|
+
## Versioning
|
|
118
65
|
|
|
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:
|
|
66
|
+
Update the publishable package version in `projects/library/package.json` with:
|
|
129
67
|
|
|
130
68
|
```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
|
-
}
|
|
69
|
+
bun run version:library patch
|
|
70
|
+
bun run version:library minor
|
|
71
|
+
bun run version:library 1.2.3
|
|
72
|
+
bun run version:library prerelease --preid beta
|
|
164
73
|
```
|
|
165
74
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
All settings are automatically:
|
|
75
|
+
The version script only updates the source package manifest. The built package in
|
|
76
|
+
`dist/library` picks up the version on the next `bun run build:library`.
|
|
169
77
|
|
|
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
|
|
78
|
+
## Pack and publish locally
|
|
175
79
|
|
|
176
|
-
|
|
80
|
+
Preview the npm tarball:
|
|
177
81
|
|
|
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`
|
|
82
|
+
```bash
|
|
83
|
+
bun run pack:library
|
|
84
|
+
```
|
|
189
85
|
|
|
190
|
-
|
|
86
|
+
Publish to npm:
|
|
191
87
|
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
|
|
88
|
+
```bash
|
|
89
|
+
bun run publish:library
|
|
90
|
+
bun run publish:library --tag next
|
|
195
91
|
```
|
|
196
92
|
|
|
197
|
-
|
|
93
|
+
Run a local publish dry-run:
|
|
198
94
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
- `font-bold` - 700
|
|
95
|
+
```bash
|
|
96
|
+
bun run publish:library:dry-run
|
|
97
|
+
```
|
|
203
98
|
|
|
204
|
-
|
|
99
|
+
`publish:library` publishes from `dist/library` and forces `--access public`.
|
|
205
100
|
|
|
206
|
-
For
|
|
101
|
+
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
102
|
|
|
208
|
-
|
|
209
|
-
|
|
103
|
+
```bash
|
|
104
|
+
bun run publish:library --provenance
|
|
105
|
+
```
|
|
210
106
|
|
|
211
|
-
##
|
|
107
|
+
## GitHub publish workflow
|
|
212
108
|
|
|
213
|
-
|
|
214
|
-
# Build library
|
|
215
|
-
ng build edsis-angular
|
|
109
|
+
The repository includes `.github/workflows/publish-library.yml`.
|
|
216
110
|
|
|
217
|
-
|
|
218
|
-
ng build edsis-angular --watch
|
|
219
|
-
```
|
|
111
|
+
It supports:
|
|
220
112
|
|
|
221
|
-
|
|
113
|
+
- pushing a tag named `library-vX.Y.Z`
|
|
114
|
+
- manual `workflow_dispatch` runs with an npm tag and optional dry-run
|
|
222
115
|
|
|
223
|
-
|
|
116
|
+
The workflow expects the `NPM_TOKEN` repository secret to be configured. On tag
|
|
117
|
+
pushes, the tag version must match `projects/library/package.json`.
|
|
224
118
|
|
|
225
|
-
|
|
119
|
+
Recommended local release flow:
|
|
226
120
|
|
|
227
|
-
|
|
121
|
+
1. Run `bun run release:library`.
|
|
122
|
+
2. Select `X`, `Y`, or `Z`, then confirm the computed version.
|
|
123
|
+
3. Let the script build, commit, push, and publish the package.
|