@decaf-ts/ui-decorators 0.4.6 → 0.5.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.
Files changed (44) hide show
  1. package/README.md +74 -31
  2. package/dist/ui-decorators.cjs +614 -0
  3. package/dist/ui-decorators.esm.cjs +591 -0
  4. package/lib/esm/index.d.ts +1 -1
  5. package/lib/esm/index.js +2 -3
  6. package/lib/esm/model/Renderable.js +1 -2
  7. package/lib/esm/model/decorators.js +1 -2
  8. package/lib/esm/model/index.js +1 -2
  9. package/lib/esm/model/model.js +1 -2
  10. package/lib/esm/model/overrides.js +1 -2
  11. package/lib/esm/ui/Rendering.js +7 -4
  12. package/lib/esm/ui/constants.d.ts +6 -0
  13. package/lib/esm/ui/constants.js +29 -24
  14. package/lib/esm/ui/decorators.js +1 -2
  15. package/lib/esm/ui/errors.js +1 -2
  16. package/lib/esm/ui/index.js +1 -2
  17. package/lib/esm/ui/interfaces.js +1 -2
  18. package/lib/esm/ui/types.d.ts +7 -0
  19. package/lib/esm/ui/types.js +2 -3
  20. package/lib/esm/ui/utils.d.ts +1 -1
  21. package/lib/esm/ui/utils.js +2 -3
  22. package/lib/index.cjs +2 -1
  23. package/lib/index.d.ts +1 -1
  24. package/lib/model/Renderable.cjs +1 -0
  25. package/lib/model/decorators.cjs +3 -2
  26. package/lib/model/index.cjs +1 -0
  27. package/lib/model/model.cjs +1 -0
  28. package/lib/model/overrides.cjs +2 -1
  29. package/lib/ui/Rendering.cjs +6 -1
  30. package/lib/ui/constants.cjs +28 -21
  31. package/lib/ui/constants.d.ts +6 -0
  32. package/lib/ui/decorators.cjs +1 -0
  33. package/lib/ui/errors.cjs +1 -0
  34. package/lib/ui/index.cjs +1 -0
  35. package/lib/ui/interfaces.cjs +1 -0
  36. package/lib/ui/types.cjs +2 -0
  37. package/lib/ui/types.d.ts +7 -0
  38. package/lib/ui/utils.cjs +2 -1
  39. package/lib/ui/utils.d.ts +1 -1
  40. package/package.json +36 -38
  41. package/dist/esm/ui-decorators.bundle.min.esm.js +0 -2
  42. package/dist/esm/ui-decorators.bundle.min.esm.js.LICENSE.txt +0 -14
  43. package/dist/ui-decorators.bundle.min.js +0 -2
  44. package/dist/ui-decorators.bundle.min.js.LICENSE.txt +0 -14
package/README.md CHANGED
@@ -1,53 +1,96 @@
1
- [![Build](https://github.com/TiagoVenceslau/ui-decorators/actions/workflows/nodejs-build.yaml/badge.svg)](https://github.com/TiagoVenceslau/ui-decorators)
2
- [![Tests](https://github.com/TiagoVenceslau/ui-decorators/actions/workflows/jest-test.yaml/badge.svg)](https://github.com/TiagoVenceslau/ui-decorators)
3
- ![Alt text](https://raw.github.com/TiagoVenceslau/ui-decorators/master/workdocs/badges/badge-lines.svg?sanitize=true)
4
- ![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/TiagoVenceslau/ui-decorators?style=plastic)
1
+ ![Banner](./workdocs/assets/Banner.png)
5
2
 
6
- ![Licence](https://img.shields.io/github/license/TiagoVenceslau/ui-decorators.svg)
7
- ![GitHub language count](https://img.shields.io/github/languages/count/TiagoVenceslau/ui-decorators?style=plastic)
8
- ![GitHub top language](https://img.shields.io/github/languages/top/TiagoVenceslau/ui-decorators?style=plastic)
9
- [![CodeQL](https://github.com/starnowski/posmulten/workflows/CodeQL/badge.svg)](https://github.com/TiagoVenceslau/ui-decorators/actions?query=workflow%3ACodeQL)
3
+ ## User Interface Decorators
4
+
5
+ Introduces a declarative way to render UI forms
6
+
7
+
8
+
9
+ ![Licence](https://img.shields.io/github/license/decaf-ts/ui-decorators.svg?style=plastic)
10
+ ![GitHub language count](https://img.shields.io/github/languages/count/decaf-ts/ui-decorators?style=plastic)
11
+ ![GitHub top language](https://img.shields.io/github/languages/top/decaf-ts/ui-decorators?style=plastic)
12
+
13
+ [![Build & Test](https://github.com/decaf-ts/ui-decorators/actions/workflows/nodejs-build-prod.yaml/badge.svg)](https://github.com/decaf-ts/ui-decorators/actions/workflows/nodejs-build-prod.yaml)
14
+ [![CodeQL](https://github.com/decaf-ts/ui-decorators/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/decaf-ts/ui-decorators/actions/workflows/codeql-analysis.yml)[![Snyk Analysis](https://github.com/decaf-ts/ui-decorators/actions/workflows/snyk-analysis.yaml/badge.svg)](https://github.com/decaf-ts/ui-decorators/actions/workflows/snyk-analysis.yaml)
15
+ [![Pages builder](https://github.com/decaf-ts/ui-decorators/actions/workflows/pages.yaml/badge.svg)](https://github.com/decaf-ts/ui-decorators/actions/workflows/pages.yaml)
16
+ [![.github/workflows/release-on-tag.yaml](https://github.com/decaf-ts/ui-decorators/actions/workflows/release-on-tag.yaml/badge.svg?event=release)](https://github.com/decaf-ts/ui-decorators/actions/workflows/release-on-tag.yaml)
17
+
18
+ ![Open Issues](https://img.shields.io/github/issues/decaf-ts/ui-decorators.svg)
19
+ ![Closed Issues](https://img.shields.io/github/issues-closed/decaf-ts/ui-decorators.svg)
20
+ ![Pull Requests](https://img.shields.io/github/issues-pr-closed/decaf-ts/ui-decorators.svg)
21
+ ![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green.svg)
22
+
23
+ ![Forks](https://img.shields.io/github/forks/decaf-ts/ui-decorators.svg)
24
+ ![Stars](https://img.shields.io/github/stars/decaf-ts/ui-decorators.svg)
25
+ ![Watchers](https://img.shields.io/github/watchers/decaf-ts/ui-decorators.svg)
10
26
 
11
27
  ![Node Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbadges%2Fshields%2Fmaster%2Fpackage.json&label=Node&query=$.engines.node&colorB=blue)
12
28
  ![NPM Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbadges%2Fshields%2Fmaster%2Fpackage.json&label=NPM&query=$.engines.npm&colorB=purple)
13
29
 
30
+ Documentation available [here](https://decaf-ts.github.io/ui-decorators/)
14
31
 
15
- ## User Interface Decorators
32
+ ### Description
16
33
 
17
- Adds a new Decorator ```uielement``` to add UI metadata to the model, that can be later interpreted by different rendering strategies
34
+ Extension of `db-decorators`, exposes a simple implementation to handle automatic model rendering:
35
+ - decorate classes and attributes as UI elements or UI element properties;
36
+ - provides the base objects to implement `RenderingEngine` specific to each tech (Ionic, Angular, React, HTML5, etc);
37
+ - automatic CRUD view rendering;
38
+ - automatic UI validation according to `decorator-validation`'s decorators;
39
+ - enables automatic custom validation (not HTML standard);
18
40
 
19
- This package will:
20
- - expose the basic api to enable each Model to be rendered according to a 'Rendering Strategy';
41
+ Adds a new Decorator ```uimodel``` to add UI metadata to the model, that can be later interpreted by different rendering strategies
42
+ Adds a new Decorator ```uiprop``` to add UI metadata to the model's properties, that can later be converted into properties for the `uimodel`
43
+ Adds a new Decorator ```uielement``` to add UI metadata to the model's properties, that can later be converted into Graphical elements
44
+ Adds a new Decorator ```hideOn``` to add UI metadata to the model's properties, so heir visibility can be controlled depending on the CRUD operation
21
45
 
22
- Extending this with the ```ui-decorators-web``` package.
23
- - Use an HTML5 rendering strategy
24
- - perform automatic From-end form validation, using native HTML5 APIs, extensible with custom validators and custom errors messages;
25
46
 
47
+ ### How to Use
26
48
 
27
- ![Forks](https://img.shields.io/github/forks/TiagoVenceslau/ui-decorators.svg)
28
- ![Stars](https://img.shields.io/github/stars/TiagoVenceslau/ui-decorators.svg)
29
- ![Watchers](https://img.shields.io/github/watchers/TiagoVenceslau/ui-decorators.svg)
49
+ - [Initial Setup](../../workdocs/tutorials/For%20Developers.md#_initial-setup_)
50
+ - [Installation](../../workdocs/tutorials/For%20Developers.md#installation)
30
51
 
31
- ![Open Issues](https://img.shields.io/github/issues/TiagoVenceslau/ui-decorators.svg)
32
- ![Closed Issues](https://img.shields.io/github/issues-closed/TiagoVenceslau/ui-decorators.svg)
33
- ![Pull Requests](https://img.shields.io/github/issues-pr-closed/TiagoVenceslau/ui-decorators.svg)
34
- ![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green.svg)
35
52
 
36
- [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=TiagoVenceslau&repo=ui-decorators)](https://github.com/TiagoVenceslau/ui-decorators)
37
53
 
38
- ### Related
39
54
 
40
- [![UI Decorators Web](https://github-readme-stats.vercel.app/api/pin/?username=TiagoVenceslau&repo=ui-decorators-web)](https://github.com/TiagoVenceslau/ui-decorators-web)
55
+ ### Related
41
56
 
57
+ [![decaf-ts](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=decaf-ts)](https://github.com/decaf-ts/decaf-ts)
58
+ [![decorator-validation](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=decorator-validation)](https://github.com/decaf-ts/decorator-validation)
59
+ [![db-decorators](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=db-decorators)](https://github.com/decaf-ts/db-decorators)
42
60
 
43
- [![Decorator Validation](https://github-readme-stats.vercel.app/api/pin/?username=TiagoVenceslau&repo=decorator-validation)](https://github.com/TiagoVenceslau/decorator-validation)
44
- [![Database Decorators](https://github-readme-stats.vercel.app/api/pin/?username=TiagoVenceslau&repo=db-decorators)](https://github.com/TiagoVenceslau/db-decorators)
45
- [![DSU Blueprint](https://github-readme-stats.vercel.app/api/pin/?username=TiagoVenceslau&repo=dsu-blueprint)](https://github.com/TiagoVenceslau/dsu-blueprint)
46
61
 
47
62
  ### Social
48
63
 
49
- [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/tiagovenceslau/)
64
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/decaf-ts/)
65
+
66
+
67
+
68
+
69
+ #### Languages
70
+
71
+ ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
72
+ ![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)
73
+ ![NodeJS](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)
74
+ ![ShellScript](https://img.shields.io/badge/Shell_Script-121011?style=for-the-badge&logo=gnu-bash&logoColor=white)
75
+
76
+ ## Getting help
77
+
78
+ If you have bug reports, questions or suggestions please [create a new issue](https://github.com/decaf-ts/ts-workspace/issues/new/choose).
79
+
80
+ ## Contributing
81
+
82
+ I am grateful for any contributions made to this project. Please read [this](./workdocs/98-Contributing.md) to get started.
83
+
84
+ ## Supporting
85
+
86
+ The first and easiest way you can support it is by [Contributing](./workdocs/98-Contributing.md). Even just finding a typo in the documentation is important.
87
+
88
+ Financial support is always welcome and helps keep both me and the project alive and healthy.
89
+
90
+ So if you can, if this project in any way. either by learning something or simply by helping you save precious time, please consider donating.
91
+
92
+ ## License
50
93
 
51
- #### Disclaimer:
94
+ This project is released under the [MIT License](./LICENSE.md).
52
95
 
53
- badges found [here](https://dev.to/envoy_/150-badges-for-github-pnk), [here](https://github.com/alexandresanlim/Badges4-README.md-Profile#-social-) and [here](https://github.com/Ileriayo/markdown-badges)
96
+ By developers, for developers...