@netwo/devkit 0.0.0-stage → 1.1.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/LICENSE +21 -0
- package/README.md +45 -2
- package/fesm2022/netwo-devkit-angular-forms.mjs +2125 -0
- package/fesm2022/netwo-devkit-angular-forms.mjs.map +1 -0
- package/fesm2022/netwo-devkit-angular.mjs +3782 -0
- package/fesm2022/netwo-devkit-angular.mjs.map +1 -0
- package/fesm2022/netwo-devkit.mjs +1910 -0
- package/fesm2022/netwo-devkit.mjs.map +1 -0
- package/package.json +55 -3
- package/types/netwo-devkit-angular-forms.d.ts +516 -0
- package/types/netwo-devkit-angular.d.ts +1670 -0
- package/types/netwo-devkit.d.ts +781 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Netwo
|
|
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
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @netwo/devkit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The development kit of the Netwo Angular applications: the utilities shared by the applications and the libraries.
|
|
4
|
+
|
|
5
|
+
- Formatters and helpers in plain TypeScript, usable outside of Angular.
|
|
6
|
+
- RxJS operators.
|
|
7
|
+
- Angular signals, NgRx signal store features, directives, pipes and injection helpers.
|
|
8
|
+
- Angular forms validators and helpers.
|
|
9
|
+
|
|
10
|
+
| Entrypoint | Content |
|
|
11
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
12
|
+
| `@netwo/devkit` | Framework agnostic: formatters (phone numbers, addresses, file sizes…), helpers, RxJS operators and types |
|
|
13
|
+
| `@netwo/devkit/angular` | Angular: signals, signal store features, directives, pipes, injectors, providers and services |
|
|
14
|
+
| `@netwo/devkit/angular-forms` | Angular forms: validators (signal based too), a `ControlValueAccessor` directive and form helpers |
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
# npm
|
|
20
|
+
npm install @netwo/devkit
|
|
21
|
+
|
|
22
|
+
# pnpm
|
|
23
|
+
pnpm add @netwo/devkit
|
|
24
|
+
|
|
25
|
+
# yarn
|
|
26
|
+
yarn add @netwo/devkit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The peer dependencies depend on the entrypoints used:
|
|
30
|
+
|
|
31
|
+
- `@netwo/devkit`: `rxjs`, `luxon` and `google-libphonenumber`,
|
|
32
|
+
- `@netwo/devkit/angular`: also `@angular/core`, `@angular/common`, `@angular/router`, `@angular/cdk`,
|
|
33
|
+
`@angular/localize`, `@ngrx/signals`, `@ngrx/component-store` and `ngxtension`,
|
|
34
|
+
- `@netwo/devkit/angular-forms`: also `@angular/forms`.
|
|
35
|
+
|
|
36
|
+
## Setup with Angular
|
|
37
|
+
|
|
38
|
+
Add the providers of the kit to the application, with the default currency of the currency pipes (`EUR` by default):
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { provideDevKitAngular } from "@netwo/devkit/angular";
|
|
42
|
+
|
|
43
|
+
export const appConfig: ApplicationConfig = {
|
|
44
|
+
providers: [provideDevKitAngular({ currencyCode: "EUR" })],
|
|
45
|
+
};
|
|
46
|
+
```
|